diff --git a/assets/main/index.0df91.js b/assets/main/index.0df91.js index e9f4aa5..20f1e7e 100644 --- a/assets/main/index.0df91.js +++ b/assets/main/index.0df91.js @@ -1 +1 @@ -window.__require=function t(e,o,n){function a(r,c){if(!o[r]){if(!e[r]){var s=r.split("/");if(s=s[s.length-1],!e[s]){var l="function"==typeof __require&&__require;if(!c&&l)return l(s,!0);if(i)return i(s,!0);throw new Error("Cannot find module '"+r+"'")}r=s}var u=o[r]={exports:{}};e[r][0].call(u.exports,function(t){return a(e[r][1][t]||t)},u,u.exports,t,e,o,n)}return o[r].exports}for(var i="function"==typeof __require&&__require,r=0;rnull==t,s=Symbol("encodeFragmentIdentifier");function l(t){switch(t.arrayFormat){case"index":return e=>(o,n)=>{const a=o.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?o:null===n?[...o,[d(e,t),"[",a,"]"].join("")]:[...o,[d(e,t),"[",d(a,t),"]=",d(n,t)].join("")]};case"bracket":return e=>(o,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?o:null===n?[...o,[d(e,t),"[]"].join("")]:[...o,[d(e,t),"[]=",d(n,t)].join("")];case"colon-list-separator":return e=>(o,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?o:null===n?[...o,[d(e,t),":list="].join("")]:[...o,[d(e,t),":list=",d(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e="bracket-separator"===t.arrayFormat?"[]=":"=";return o=>(n,a)=>void 0===a||t.skipNull&&null===a||t.skipEmptyString&&""===a?n:(a=null===a?"":a,0===n.length?[[d(o,t),e,d(a,t)].join("")]:[[n,d(a,t)].join(t.arrayFormatSeparator)])}default:return e=>(o,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?o:null===n?[...o,d(e,t)]:[...o,[d(e,t),"=",d(n,t)].join("")]}}function u(t){let e;switch(t.arrayFormat){case"index":return(t,o,n)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=o):n[t]=o};case"bracket":return(t,o,n)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=[o]:n[t]=o};case"colon-list-separator":return(t,o,n)=>{e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=[o]:n[t]=o};case"comma":case"separator":return(e,o,n)=>{const a="string"==typeof o&&o.includes(t.arrayFormatSeparator),i="string"==typeof o&&!a&&h(o,t).includes(t.arrayFormatSeparator);o=i?h(o,t):o;const r=a||i?o.split(t.arrayFormatSeparator).map(e=>h(e,t)):null===o?o:h(o,t);n[e]=r};case"bracket-separator":return(e,o,n)=>{const a=/(\[\])$/.test(e);if(e=e.replace(/\[\]$/,""),!a)return void(n[e]=o?h(o,t):o);const i=null===o?[]:o.split(t.arrayFormatSeparator).map(e=>h(e,t));void 0!==n[e]?n[e]=[].concat(n[e],i):n[e]=i};default:return(t,e,o)=>{void 0!==o[t]?o[t]=[].concat(o[t],e):o[t]=e}}}function p(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function h(t,e){return e.decode?a(t):t}function f(t){return Array.isArray(t)?t.sort():"object"==typeof t?f(Object.keys(t)).sort((t,e)=>Number(t)-Number(e)).map(e=>t[e]):t}function m(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function g(t){let e="";const o=t.indexOf("#");return-1!==o&&(e=t.slice(o)),e}function y(t){const e=(t=m(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function v(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function b(t,e){p((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const o=u(e),n=Object.create(null);if("string"!=typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(const a of t.split("&")){if(""===a)continue;let[t,r]=i(e.decode?a.replace(/\+/g," "):a,"=");r=void 0===r?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?r:h(r,e),o(h(t,e),r,n)}for(const a of Object.keys(n)){const t=n[a];if("object"==typeof t&&null!==t)for(const o of Object.keys(t))t[o]=v(t[o],e);else n[a]=v(t,e)}return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((t,e)=>{const o=n[e];return Boolean(o)&&"object"==typeof o&&!Array.isArray(o)?t[e]=f(o):t[e]=o,t},Object.create(null))}o.extract=y,o.parse=b,o.stringify=(t,e)=>{if(!t)return"";p((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const o=o=>e.skipNull&&c(t[o])||e.skipEmptyString&&""===t[o],n=l(e),a={};for(const r of Object.keys(t))o(r)||(a[r]=t[r]);const i=Object.keys(a);return!1!==e.sort&&i.sort(e.sort),i.map(o=>{const a=t[o];return void 0===a?"":null===a?d(o,e):Array.isArray(a)?0===a.length&&"bracket-separator"===e.arrayFormat?d(o,e)+"[]":a.reduce(n(o),[]).join("&"):d(o,e)+"="+d(a,e)}).filter(t=>t.length>0).join("&")},o.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[o,n]=i(t,"#");return Object.assign({url:o.split("?")[0]||"",query:b(y(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:h(n,e)}:{})},o.stringifyUrl=(t,e)=>{e=Object.assign({encode:!0,strict:!0,[s]:!0},e);const n=m(t.url).split("?")[0]||"",a=o.extract(t.url),i=o.parse(a,{sort:!1}),r=Object.assign(i,t.query);let c=o.stringify(r,e);c&&(c=`?${c}`);let l=g(t.url);return t.fragmentIdentifier&&(l=`#${e[s]?d(t.fragmentIdentifier,e):t.fragmentIdentifier}`),`${n}${c}${l}`},o.pick=(t,e,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[s]:!1},n);const{url:a,query:i,fragmentIdentifier:c}=o.parseUrl(t,n);return o.stringifyUrl({url:a,query:r(i,e),fragmentIdentifier:c},n)},o.exclude=(t,e,n)=>{const a=Array.isArray(e)?t=>!e.includes(t):(t,o)=>!e(t,o);return o.pick(t,a,n)}},{"decode-uri-component":1,"filter-obj":2,"split-on-first":4,"strict-uri-encode":5}],4:[function(t,e){"use strict";e.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];const o=t.indexOf(e);return-1===o?[t]:[t.slice(0,o),t.slice(o+e.length)]}},{}],5:[function(t,e){"use strict";e.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)},{}],ApiTool:[function(t,e,o){"use strict";cc._RF.push(e,"b8fa1Acz1tD5ZSWCVi3x62F","ApiTool");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(o,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),Object.defineProperty(e,"instance",{get:function(){return this._instance||(this._instance=new e),this._instance},enumerable:!1,configurable:!0}),e._instance=null,e.avatar="",e.dailyAllNumber=0,e.dailywinNumber=0,e}(cc.Component);o.default=i,cc._RF.pop()},{}],BulletPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"36bd1+aRohPD6vyVZmmE1za","BulletPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/manager/data-manager"),s=t("../../script/tools/str-utils"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.speed=0,e.contentLabel=null,e.header=null,e.border=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setupData=function(t){if(t){var e=t.content;if(e||(e="\u96c4\u8d77"),t.region&&1==t.type)e=t.region+t.content;else if(2==t.type)if(c.default.rankUserInfo)(o=c.default.rankUserInfo.fail)&&0!=o||(o=1),e=s.default.formatStr(t.content,o);else{var o=r.default.randomNum(1,50);e=s.default.formatStr(t.content,o)}this.contentLabel.string=e,1==t.state?this.contentLabel.node.color=new cc.Color(255,246,0):this.contentLabel.node.color=new cc.Color(255,255,255),r.default.setAvatar(this.header,t.avatar),t.isSelf?this.border.active=!0:this.border.active=!1}},i([p({type:cc.Label,tooltip:"\u5185\u5bb9"})],e.prototype,"contentLabel",void 0),i([p({type:cc.Node,tooltip:"\u5934\u50cf"})],e.prototype,"header",void 0),i([p({type:cc.Node,tooltip:"\u8fb9\u6846"})],e.prototype,"border",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/manager/data-manager":"data-manager","../../script/tools/str-utils":"str-utils"}],CcJsFunc:[function(t,e,o){"use strict";cc._RF.push(e,"3f1d9y5Ey5CfqFDLJVTW6yo","CcJsFunc"),Object.defineProperty(o,"__esModule",{value:!0});var n=t("../effect/player-head-atlas"),a=t("./native/audio"),i=t("./sdk"),r=function(){function t(){}return t.shuffle=function(t){for(var e=t.length-1;e>=0;e--){var o=Math.floor(Math.random()*(e+1)),n=t[o];t[o]=t[e],t[e]=n}return t},t.addClickAudio=function(){a.default.playAudioMusic("audio/sound/clickBlock.mp3",!1),i.default.vibrateShort()},t.addbtnTouchStartScale=function(t,e){t.on("touchstart",function(){this.addClickAudio(),cc.tween(t).to(.1,{scale:.9}).start(),e&&e()},this)},t.addbtnTouchEndScale=function(t,e){t.on("touchend",function(o){cc.tween(t).to(.1,{scale:1}).start(),e&&(t.stopAllActions(),t.scale=1,e(o))},this)},t.addbtnTouchCancelScale=function(t,e){t.on("touchcancel",function(){cc.tween(t).to(.1,{scale:1}).start(),e&&e()},this)},t.addTargetTouchUpInside=function(t,e){t.on("touchstart",function(){this.addClickAudio(),cc.tween(t).to(.1,{scale:.9}).start()},this),t.on("touchcancel",function(){cc.tween(t).to(.1,{scale:1}).start()},this),t.on("touchend",function(o){cc.tween(t).to(.1,{scale:1}).start(),e&&(t.stopAllActions(),t.scale=1,e(o))},this)},t.addbtnTouchOriginStartScale=function(t,e){var o=.9,n=.9;t.scaleX<0&&(o=-o),t.scaleY<0&&(n=-n),t.on("touchstart",function(){this.addClickAudio(),cc.tween(t).to(.1,{scaleX:o,scaleY:n}).start(),e&&e()},this)},t.addbtnTouchOriginEndScale=function(t,e){var o=1,n=1;t.scaleX<0&&(o=-o),t.scaleY<0&&(n=-n),t.on("touchend",function(a){cc.tween(t).to(.1,{scaleX:o,scaleY:n}).start(),e&&(t.stopAllActions(),t.scaleX=o,t.scaleY=n,e(a))},this)},t.addbtnTouchOriginCancelScale=function(t,e){var o=1,n=1;t.scaleX<0&&(o=-o),t.scaleY<0&&(n=-n),t.on("touchcancel",function(){cc.tween(t).to(.1,{scaleX:o,scaleY:n}).start(),e&&e()},this)},t.setAnimation=function(t,e,o,n,a){var i=new cc.Node,r=(i.addComponent(cc.Sprite),i.addComponent(cc.Animation));return cc.loader.loadRes(t,cc.SpriteAtlas,function(t,i){if(e)for(var c=[],s=0;s=t.length?(o._loadResIndex=0,e()):o.loadResSpriteFrame(t,e)):cc.loader.loadRes(n,cc.SpriteFrame,function(a,i){a?cc.error("SpriteFrame\u52a0\u8f7d\u9519\u8bef, \u8282\u70b9\u540d: , url: "+n):(o._spriteFrameCache[n]=i,o._loadResIndex++,o._loadResIndex>=t.length?(o._loadResIndex=0,e()):o.loadResSpriteFrame(t,e))})},t.getUrlSpriteFrame=function(t){return this._spriteFrameCache[t]||!1},t.sliceURL=function(t){return/.+(?=\.png)/i.exec(t)[0].slice(10)},t.playFontAnimation=function(t,e,o,n){var a={num:e},i=t.getComponent(cc.Label);cc.tween(t).to(.05,{scale:1.3}).to(.05,{scale:1}).to(.05,{scale:1.3}).to(.05,{scale:1}).repeat(10).start(),i.string=a.num+"";var r=o-e<10?.3:(o-e)/10*.3;r>1&&(r=1),cc.tween(a).to(r,{num:o},{progress:function(t,e,o,a){return i.string=n?n+Math.ceil(t+(e-t)*a)+"":Math.ceil(t+(e-t)*a)+"",t+(e-t)*a}}).call(function(){t.stopAllActions(),t.scale=1}).start()},t.loadWxHeadImgSpriteFrame=function(t,e,o,n,a,i){var r=this;o=o||function(){},this._spriteFrameCache||(this._spriteFrameCache={});var c=t.getComponent(cc.Sprite);c.pp_url=e;var s=this._spriteFrameCache[e];if(s)return c.spriteFrame=s,void o();n&&(c.spriteFrame=null);var l={url:e};cc.loader.load(l,function(t,n){if(t)cc.error("SpriteFrame\u52a0\u8f7d\u9519\u8bef, \u8282\u70b9\u540d: "+c.node.name+", url: "+e);else{var a=new cc.SpriteFrame(n);i instanceof Array&&(a.insetTop=i[0]||0,a.insetBottom=i[1]||0,a.insetLeft=i[2]||0,a.insetRight=i[3]||0),r._spriteFrameCache[e]=a,c.pp_url===e&&(c.spriteFrame=a,o())}})},t.changeWXHeadImgSize=function(t,e){for(var o=t.split("/"),n="",a=0;a=e||t<0?"Jan":e[t]},t.ifHaveNode=function(t,e,o){return t||(t=cc.instantiate(e),o.addChild(t)),t},t.setAvatar=function(t,e,o){var a=this;if(t){var r=t.getComponent(cc.Sprite);if(!e||0==e.length){var c="rank/rank_icon_default.png";return i.default.isPlatform(i.Platform.wx)&&(c="rank/rank_icon_default_wx.png"),void cc.loader.loadRes(c,cc.SpriteFrame,function(t,e){t?console.log("avatar err = "+t):r.spriteFrame=e})}cc.assetManager.loadRemote(e,{ext:".head"},function(e,i){if(o){var c=n.default.instance;cc.isValid(a)&&cc.isValid(t)&&cc.isValid(r)&&(r.spriteFrame=new cc.SpriteFrame(i),o&&!cc.sys.isNative&&c.packToDynamicAtlas(o,r,r.spriteFrame))}else i.packable=!1,r.spriteFrame=new cc.SpriteFrame(i)})}else console.log("setAvatar node \u4e3a\u7a7a")},t.removeAvatar=function(t){t&&t.length&&n.default.instance.deleteInnerTextureByPath(t)},t.setAvatarHolder=function(t,e,o){if(t){var n=t.getComponent(cc.Sprite);if(!e||0==e.length){var a="rank/rank_icon_default.png";return i.default.isPlatform(i.Platform.wx)&&(a="rank/rank_icon_default_wx.png"),o&&(a=o),void cc.loader.loadRes(a,cc.SpriteFrame,function(t,e){t?console.log("avatar err = "+t):n.spriteFrame=e})}}else console.log("setAvatar node \u4e3a\u7a7a")},t}();o.default=r,cc._RF.pop()},{"../effect/player-head-atlas":"player-head-atlas","./native/audio":"audio","./sdk":"sdk"}],CoinEmitterByTime:[function(t,e,o){"use strict";cc._RF.push(e,"d2234O7oOZOV7MTLWcEx96i","CoinEmitterByTime");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("./CoinEmitter"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tickTime=0,e.countMinPerTick=0,e.countMaxPerTick=0,e._timePassed=0,e._timeTick=0,e._timeEnd=0,e}return a(e,t),e.prototype.fire=function(t,e,o){void 0===e&&(e=!1),this._timePassed=0,this._timeEnd=t,this._rndCur=0,this.newNode(e),this._cb=o},e.prototype.update=function(t){if(this._rndCur-a;){var s=o*(n+=.016666666666666666)*Math.sin(e)-this.G*n*n/2;i=s,c.push(s)}var l=new r.YPathCacheData(o,e,c);this._cachePaths.push(l),this._rndCur++}if(this._timePassed+=t,!(this._timePassed>=this._timeEnd)&&(this._timeTick+=t,this._timeTick>=this.tickTime)){this._timeTick=0;for(var u=this.randomInt(this.countMinPerTick,this.countMaxPerTick),p=0;p=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0}),o.CoinEmitter=o.YPathCacheData=void 0;var r=cc._decorator.ccclass,c=cc._decorator.property,s=cc._decorator.menu,l=function(t,e,o){this.v0=t,this.angle=e,this.path=o};o.YPathCacheData=l;var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.G=18e3,e.v0Min=11e3,e.v0Max=21e3,e.angleMin=20,e.angleMax=28,e.scaleStepMin=.065,e.scaleStepMax=.085,e.coinCount=50,e.xMoveStepMin=-18,e.xMoveStepMax=18,e.rotationStepMin=-1.3,e.rotationStepMax=1.3,e.bornOffsetXMin=1,e.bornOffsetXMax=-1,e.bornOffsetYMin=-10,e.bornOffsetYMax=0,e.bornScacle=.5,e.prefab=null,e._coinPool=new cc.NodePool,e._cachePaths=[],e._rndPathCount=100,e._rndCur=0,e._numFlying=0,e}return a(e,t),e.prototype.onLoad=function(){if(!(this._coinPool.size()>=70))for(var t=0;t<70;t++){var e=cc.instantiate(this.prefab);e&&this._coinPool.put(e)}},e.prototype.newNode=function(t){if(void 0===t&&(t=!1),t&&(this._coinPool.clear(),!(this._coinPool.size()>=70)))for(var e=0;e<70;e++){var o=cc.instantiate(this.prefab);o&&this._coinPool.put(o)}},e.prototype.fire=function(t,e,o){void 0===e&&(e=!1),console.log("push=>4"),this.newNode(e),t=t||this.coinCount,this._numFlying=t,this._cb=o;for(var n=0;n=this._rndPathCount)){for(var t=.017453293*this.randomInRange(this.angleMin,this.angleMax),e=this.randomInRange(this.v0Min,this.v0Max),o=0,n=2*cc.visibleRect.height,a=0,i=[];a>-n;){var r=e*(o+=.016666666666666666)*Math.sin(t)-this.G*o*o/2;a=r,i.push(r)}var c=new l(e,t,i);this._cachePaths.push(c),this._rndCur++}},e.prototype._resetNode=function(t){t.scale=0,t.angle=0,t.setPosition(0,0),t.stopAllActions(),this._coinPool.put(t),this._numFlying--,this._numFlying<=0&&this._cb&&this._cb()},e.prototype._runCoin=function(t){var e=this;t.getComponent(cc.Animation).play("",this.randomInRange(0,.7));var o=this.randomInArray(this._cachePaths).path;t.x=this.randomInRange(this.bornOffsetXMin,this.bornOffsetXMax),t.y=this.randomInRange(this.bornOffsetYMin,this.bornOffsetYMax);var n;n=t.x<=0?this.randomInRange(this.xMoveStepMin,0):this.randomInRange(0,this.xMoveStepMax);var a=this.randomInRange(this.rotationStepMin,this.rotationStepMax),i=this.randomInRange(this.scaleStepMin,this.scaleStepMax);t.scale=this.bornScacle;var r=0,c=function(){var s=o[r];r++,t.y=s,t.x+=n,t.scale+=i,t.angle+=a,r>=o.length&&(e._resetNode(t),e.unschedule(c))};this.schedule(c,1/60)},e.prototype.randomInRange=function(t,e){return t+(e-t)*Math.random()},e.prototype.randomInArray=function(t){return t[this.randomInt(0,t.length)]},e.prototype.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t},i([c({type:cc.Integer,tooltip:"\u91cd\u529b\u52a0\u901f\u5ea6"})],e.prototype,"G",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5c0f\u521d\u901f\u5ea6"})],e.prototype,"v0Min",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5927\u521d\u901f\u5ea6"})],e.prototype,"v0Max",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5c0f\u89d2\u5ea6"})],e.prototype,"angleMin",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5927\u89d2\u5ea6"})],e.prototype,"angleMax",void 0),i([c({type:cc.Float,tooltip:"\u6700\u5c0f\u6bcf\u5e27\u7f29\u653e\u589e\u52a0"})],e.prototype,"scaleStepMin",void 0),i([c({type:cc.Float,tooltip:"\u6700\u5927\u6bcf\u5e27\u7f29\u653e\u589e\u52a0"})],e.prototype,"scaleStepMax",void 0),i([c({type:cc.Integer,tooltip:"\u91d1\u5e01\u6570\u91cf"})],e.prototype,"coinCount",void 0),i([c({type:cc.Integer,tooltip:"x\u8f74\u6bcf\u5e27\u6700\u5c0f\u504f\u79fb"})],e.prototype,"xMoveStepMin",void 0),i([c({type:cc.Integer,tooltip:"x\u8f74\u6bcf\u5e27\u6700\u5927\u504f\u79fb"})],e.prototype,"xMoveStepMax",void 0),i([c(cc.Integer)],e.prototype,"rotationStepMin",void 0),i([c(cc.Integer)],e.prototype,"rotationStepMax",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5c0f\u521d\u59cbx\u504f\u79fb"})],e.prototype,"bornOffsetXMin",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5927\u521d\u59cbx\u504f\u79fb"})],e.prototype,"bornOffsetXMax",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5c0f\u521d\u59cby\u504f\u79fb"})],e.prototype,"bornOffsetYMin",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5927\u521d\u59cby\u504f\u79fb"})],e.prototype,"bornOffsetYMax",void 0),i([c({type:cc.Float,tooltip:"\u521d\u59cb\u7f29\u653e"})],e.prototype,"bornScacle",void 0),i([c(cc.Prefab)],e.prototype,"prefab",void 0),i([r,s("gameModules/common/CoinEmitter")],e)}(cc.Component);o.CoinEmitter=u,cc._RF.pop()},{}],DateManager:[function(t,e,o){"use strict";cc._RF.push(e,"5f103B5zARLaI+1jRcCObQr","DateManager"),Object.defineProperty(o,"__esModule",{value:!0});var n=cc._decorator,a=(n.ccclass,n.property,t("../common/enumConfig")),i=function(){function t(){this.cutType=a.CALENDAR.MONTH;var t=new Date,e=t.getFullYear(),o=t.getMonth(),n=t.getDate();this.nowDate=new Date(e,o,n),this.selDate=new Date(e,o,n)}return t.getInstance=function(){return this.instance||(this.instance=new t),this.instance},t.prototype.isNowMonth=function(t){return this.nowDate.getFullYear()===this.selDate.getFullYear()&&this.nowDate.getMonth()===t},t.prototype.isNowDay=function(t){if(this.nowDate.getFullYear()===this.selDate.getFullYear()&&this.nowDate.getMonth()===this.selDate.getMonth()){if(this.nowDate.getDate()===t)return!0}else if(this.selDate.getDate()==t)return!0;return!1},t.prototype.isOldDay=function(t){if(this.selDate.getFullYear()==this.nowDate.getFullYear()){if(this.nowDate.getMonth()==this.selDate.getMonth()){if(t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.closeBtn=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this))},e.prototype.closeBtnFunc=function(){this.node.active=!1,cc.game.emit("showPop",{popName:"todayRankPop",showPopData:{}})},e.prototype.showPop=function(){this.node.active=!0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),r.default.getPersonalInfo(function(t){if(t&&t.data){var e=t.data.daily_count;s.default.updateFirendCount(e)}})},i([p(cc.Node)],e.prototype,"popNode",void 0),i([p(cc.Node)],e.prototype,"closeBtn",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs"}],FriendSubContextView:[function(t,e,o){"use strict";cc._RF.push(e,"ea1df8KK9tCd5m1ulIYJEp0","FriendSubContextView");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]1334||cc.winSize.height/cc.winSize.width>2)&&(this.globalData.isFullScreen=!0),console.log("isFullScreen",this.globalData.isFullScreen)},t.setGameType=function(e){t.getInstance().gameType=e},t.blacksInfo={blockCurCount:0,blockAllCount:0},t}();o.default=i,cc._RF.pop()},{"../common/enumConfig":"enumConfig"}],PersonalPop:[function(t,e,o){"use strict";cc._RF.push(e,"23eb4oYlzpNJ74t7y6B9QZ/","PersonalPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/sdk"),u=t("../common/spine"),p=t("../common/util"),d=t("../manager/data-manager"),h=t("../manager/DateManager"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.nickName=null,e.registerLabel=null,e.dailyName=null,e.topicName=null,e.dailyCount=null,e.topicCount=null,e.idLabel=null,e.joinName=null,e.joinTime=null,e.failLabel=null,e.failCount=null,e.sheepNameLabel=null,e.spNode=null,e.headerImage=null,e.closeBtn=null,e.saveBtn=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.saveBtn,this.saveBtnFunc.bind(this)),l.default.isPlatform(l.Platform.wx)||l.default.isPlatform(l.Platform.tt)?this.saveBtn.active=!0:this.saveBtn.active=!1,this.saveBtn.active=!1},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.saveBtnFunc=function(){},e.prototype.showPop=function(){this.node.active=!0;var t=this;this.joinTime.node.active=!1,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),r.default.getPersonalInfo(function(e){e&&e.data&&t.setupSubviews(e.data)})},e.prototype.setupSubviews=function(t){if(this.nickName.string=t.nick_name||"",this.idLabel.string="ID:"+t.uid,t.register_time){var e=(f=h.default.getInstance().formatTs(t.register_time))[0]+"\u5e74"+f[1]+"\u6708"+f[2]+"\u65e5";this.registerLabel.string="\u4e8e"+e+"\u8bde\u751f\n\u8fc4\u4eca\u4e3a\u6b62\u6311\u6218 "+t.challenge+" \u6b21"}else this.registerLabel.string="";this.dailyCount.string=t.daily_count,this.topicCount.string=t.topic_count;var o="",n="",a="";if(1==t.today_state){o="sheep/Sheeps",n="skin_00",a="Jump2";for(var i=s.default.getSheepClothesData(),r=0;r=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0}),o.PoolManager=void 0;var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.prefab=[],e.prefabMap={},e.poolMap={},e}var o;return a(e,t),o=e,e.prototype.onLoad=function(){o.instance=this;for(var t=0;t0?o.active=!0:(o=cc.instantiate(this.prefab[e])).active=!0,o}console.log("\u9884\u5236\u4f53\u4e0d\u5b58\u5728\u6216\u672a\u52a0\u8f7d\uff08\u672a\u62d6\u62fd\uff09")},e.prototype.put=function(t){t.active=!1,this.poolMap[t.name+"Pool"].put(t)},i([s(cc.Prefab)],e.prototype,"prefab",void 0),o=i([c],e)}(cc.Component);o.PoolManager=l,cc._RF.pop()},{}],PrivacyPolicy:[function(t,e,o){"use strict";cc._RF.push(e,"83b1cbmnjRKCqtOVxg1KAz1","PrivacyPolicy");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.label=null,e.text="hello",e}return a(e,t),e.prototype.start=function(){},i([s(cc.Node)],e.prototype,"label",void 0),i([s],e.prototype,"text",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],PrivacyUserPop:[function(t,e,o){"use strict";cc._RF.push(e,"2a225F7jMhPWpqoKwvcsBGP","PrivacyUserPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.privacyNode=null,e.userNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.privacyCloseBtnFunc=function(){this.node.active=!1},e.prototype.userCloseBtnFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){this.node.active=!0,this.userNode.active=!1,this.privacyNode.active=!1,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),"user"==t.type?this.userNode.active=!0:this.privacyNode.active=!0},i([s(cc.Node)],e.prototype,"popNode",void 0),i([s(cc.Node)],e.prototype,"privacyNode",void 0),i([s(cc.Node)],e.prototype,"userNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],ScrollMsg:[function(t,e,o){"use strict";cc._RF.push(e,"0e6eb07gOpDPqlpg49sZaei","ScrollMsg");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r,c=cc._decorator,s=c.ccclass,l=c.property;(function(t){t[t.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",t[t.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT"})(r||(r={}));var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.label=null,e.maskNode=null,e.m_speed=100,e.m_xLeftEnd=0,e.m_xRightEnd=0,e.m_yPos=0,e.m_direction=r.LEFT_TO_RIGHT,e}return a(e,t),e.prototype.start=function(){},e.prototype.showMsg=function(t){this.label.string=t.msg,this.m_xRightEnd=this.node.x+this.maskNode.node.width*this.maskNode.node.anchorX,this.m_xLeftEnd=this.node.x-this.maskNode.node.width*this.maskNode.node.anchorX;var e,o=this.label.node.getContentSize();e=this.m_direction===r.LEFT_TO_RIGHT?this.m_xLeftEnd-o.width:this.m_xRightEnd,this.label.node.x=e,this.label.node.y=this.m_yPos},e.prototype.update=function(t){if(this.m_direction===r.LEFT_TO_RIGHT){var e=this.label.node.getContentSize();this.label.node.x>=this.m_xRightEnd&&(this.label.node.x=this.m_xLeftEnd-e.width),this.label.node.x+=this.m_speed*t}else e=this.label.node.getContentSize(),this.label.node.x<=this.m_xLeftEnd-e.width&&(this.label.node.x=this.m_xRightEnd),this.label.node.x-=this.m_speed*t},i([l(cc.Label)],e.prototype,"label",void 0),i([l(cc.Mask)],e.prototype,"maskNode",void 0),i([l({tooltip:"\u6bcf\u79d2\u79fb\u52a8\u591a\u5c11\u50cf\u7d20"})],e.prototype,"m_speed",void 0),i([l({tooltip:"\u6587\u5b57\u6eda\u52a8\u7684\u65b9\u5411\uff0c1\u662f\u4ece\u5de6\u5230\u53f3\uff0c2\u662f\u4ece\u53f3\u5230\u5de6"})],e.prototype,"m_direction",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{}],SpriteWithMaskAssembler:[function(t,e,o){"use strict";cc._RF.push(e,"6b309k9JDND+5aP2ebiAdxw","SpriteWithMaskAssembler");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(o,"__esModule",{value:!0}),o.getSpriteWithMaskAssembler=void 0,o.getSpriteWithMaskAssembler=function(){var t=cc.gfx;return new(function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return a(o,e),Object.defineProperty(o.prototype,"floatsPerVert",{get:function(){return 7},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"colorOffset",{get:function(){return 6},enumerable:!1,configurable:!0}),o.prototype.getVfmt=function(){return o.vfmtPosTowUvColor},o.prototype.getBuffer=function(){if(!o.meshBuffer){var t=cc.renderer._handle;t._SpriteWithMaskBuffer&&console.error("\u7adf\u7136\u5df2\u7ecf\u5b58\u5728 _SpriteWithMaskBuffer \u5bf9\u8c61\u4e86, \u8fd9\u53ef\u80fd\u662f\u4e2a\u4e25\u91cd\u7684 bug!"),o.meshBuffer=t.getBuffer("mesh",this.getVfmt())}return o.meshBuffer},o.prototype.updateRenderData=function(t){this.packToDynamicAtlas(t,t._spriteFrame),t._vertsDirty&&(this.updateUVs(t),this.updateVerts(t),t._vertsDirty=!1)},o.prototype.updateUVs=function(t){for(var e=t._spriteFrame.uv,n=this.uvOffset,a=this.floatsPerVert,i=this._renderData.vDatas[0],r=0;r<4;r++){var c=2*r,s=a*r+n;i[s]=e[c],i[s+1]=e[c+1],i[s+2]=o.uv2[c],i[s+3]=o.uv2[c+1]}},o.prototype.updateVerts=function(t){var e,o,n,a,i=t.node,r=i.width,c=i.height,s=i.anchorX*r,l=i.anchorY*c;if(t.trim)e=-s,o=-l,n=r-s,a=c-l;else{var u=t.spriteFrame,p=u._originalSize.width,d=u._originalSize.height,h=u._rect.width,f=u._rect.height,m=u._offset,g=r/p,y=c/d,v=m.x+(p-h)/2,b=m.x-(p-h)/2;e=v*g-s,o=(m.y+(d-f)/2)*y-l,n=r+b*g-s,a=c+(m.y-(d-f)/2)*y-l}var _=this._local;_[0]=e,_[1]=o,_[2]=n,_[3]=a,this.updateWorldVerts(t)},o.vfmtPosTowUvColor=new t.VertexFormat([{name:t.ATTR_POSITION,type:t.ATTR_TYPE_FLOAT32,num:2},{name:t.ATTR_UV0,type:t.ATTR_TYPE_FLOAT32,num:4},{name:t.ATTR_COLOR,type:t.ATTR_TYPE_UINT8,num:4,normalize:!0}]),o.uv2=[0,1,1,1,0,0,1,0],o}(cc.Assembler2D))},cc._RF.pop()},{}],SpriteWithMask:[function(t,e,o){"use strict";cc._RF.push(e,"16615oSi4lB+Y7u7Tdx2332","SpriteWithMask");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0}),o.SpriteWithMask=void 0;var r=t("./SpriteWithMaskAssembler"),c=cc._decorator,s=c.ccclass,l=(c.property,c.menu),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.onLoad=function(){var e;null===(e=t.prototype.onLoad)||void 0===e||e.call(this),this.type,cc.Sprite.Type.SIMPLE},e.prototype._resetAssembler=function(){this.setVertsDirty(),this._assembler=r.getSpriteWithMaskAssembler(),this._assembler.init(this)},i([s(),l("2D/SpriteWithMask")],e)}(cc.Sprite);o.SpriteWithMask=u,cc._RF.pop()},{"./SpriteWithMaskAssembler":"SpriteWithMaskAssembler"}],TodayRankPop:[function(t,e,o){"use strict";cc._RF.push(e,"3c9ecBLnyBEtad8HHAyJf0H","TodayRankPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.closeBtn=null,e.friendBtn=null,e.shareBtn=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.friendBtn,this.friendBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.shareBtn,this.shareBtnFunc.bind(this))},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.friendBtnFunc=function(){this.node.active=!1,console.log("\u597d\u53cb\u6392\u884c\u699c"),cc.game.emit("showPop",{popName:"friendRankPop",showPopData:{}})},e.prototype.shareBtnFunc=function(){console.log("\u5206\u4eab\u670b\u53cb\u5708")},e.prototype.showPop=function(){this.node.active=!0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),r.default.getUserRankInfo(function(t){if(0==t.err_code&&t.data&&t.data.user){var e=t.data.user.fail,o=t.data.user.state;1==o?s.default.updateTodayCount(o,"win"):s.default.updateTodayCount(e,"fail")}},function(){console.log("###### fail ######"),s.default.updateTodayCount(0,"fail")})},i([p(cc.Node)],e.prototype,"popNode",void 0),i([p(cc.Node)],e.prototype,"closeBtn",void 0),i([p(cc.Node)],e.prototype,"friendBtn",void 0),i([p(cc.Node)],e.prototype,"shareBtn",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs"}],TodaySubContextView:[function(t,e,o){"use strict";cc._RF.push(e,"6f5a44uIwZLR54OKfk5cZc9","TodaySubContextView");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=1063?qg.login().then(function(e){console.log(e),e.data.token?(console.log("\u5f53\u524d\u7528\u6237\u4fe1\u606f: "+JSON.stringify(e)),e.data&&l.default.post({url:"/sheep/v1/user/login_vivos",data:{token:e.data.token},success:function(e){if(t(),console.log("login_vivos res: ",JSON.stringify(e)),0==e.err_code&&e.data){console.log("res.data.uid: ",e.data.uid);var o=c.default.getUserData();o.userID=e.data.uid+"",o.openid=e.data.openid,o.token=e.data.token,c.default.saveUserData(o),u.default.user.uid=Number(o.userID),console.log("userData: ",o.userID)}},fail:function(){t()}})):t()},function(e){console.log("\u767b\u5f55\u5931\u8d25"+JSON.stringify(e)),t()}):t()})},e.requestUserInfo=function(){return i(this,void 0,Promise,function(){return r(this,function(){return[2,new Promise(function(t){l.default.get({url:"/sheep/v1/game/user_info",params:{uid:c.default.getUserData().userID},success:function(e){t(),console.log("user_info res: ",JSON.stringify(e)),0==e.err_code&&e.data&&(u.default.user.uid=e.data.uid,u.default.user.avatar=e.data.avatar,u.default.user.gender=e.data.gender,u.default.user.openId=e.data.openId,cc.game.emit(s.EMITKEY.USERINFOSUCCESS))},fail:function(){t()}})})]})})},e.requestRankUserInfo=function(){return i(this,void 0,Promise,function(){return r(this,function(){return[2,new Promise(function(t){l.default.get({url:"/sheep/v1/game/user_rank_info",params:{uid:c.default.getUserData().userID},success:function(e){t(),console.log("\u83b7\u53d6\u6392\u884c\u7528\u6237\u4fe1\u606f ### = ",JSON.stringify(e)),0==e.err_code&&e.data&&e.data.user&&(u.default.rankUserInfo=e.data.user,u.default.region=e.data.region,console.log("\u83b7\u53d6\u6392\u884c\u7528\u6237\u4fe1\u606f rankUserInfo ### = ",JSON.stringify(u.default.rankUserInfo)),cc.game.emit(s.EMITKEY.RANKUSERINFOSUCCESS))},fail:function(e){console.log("\u83b7\u53d6\u6392\u884c\u7528\u6237\u4fe1\u606f err = ",e),t()}})})]})})},e.getUserRankInfo=function(t,e){l.default.get({url:"/sheep/v1/game/user_rank_info",params:{uid:c.default.getUserData().userID},success:function(o){0==o.err_code?t&&t(o):(console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25"),e&&e())},fail:function(){e&&e()}})},e.getBulletData=function(t){l.default.get({url:"/sheep/v1/game/get_bullet",success:function(e){0==e.err_code?t&&t(e.data):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")}})},e.getRankInfoData=function(t){l.default.get({url:"/sheep/v1/game/rank_info",success:function(e){0==e.err_code?t&&t(e):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.getStageInfoData=function(t){l.default.get({url:"/sheep/v1/game/rank_stage_info",success:function(e){console.log("state_info result = "+JSON.stringify(e)),0==e.err_code?t&&t(e):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.gameOver=function(t,e){l.default.get({url:"/sheep/v1/game/game_over",params:t,success:function(t){console.log("game_over result = "+JSON.stringify(t)),0==t.err_code&&e&&e(t)}})},e.getTopicData=function(t){return i(this,void 0,Promise,function(){return r(this,function(){return[2,new Promise(function(e){l.default.get({url:"/sheep/v1/game/get_topic",params:{uid:c.default.getUserData().userID},success:function(o){e(),console.log("get_topic ### = ",JSON.stringify(o)),0==o.err_code&&(u.default.topicModel=o.data,t&&t(o),cc.game.emit(s.EMITKEY.TOPICACCOUNT))},fail:function(){e()}})})]})})},e.joinTopic=function(t,e){l.default.get({url:"/sheep/v1/game/topic_join",params:t,success:function(t){console.log("topic_join ### = ",JSON.stringify(t)),0==t.err_code&&e&&e(t)},fail:function(t){console.log("topic_join err = ",t)}})},e.topicGameOver=function(t,e){l.default.get({url:"/sheep/v1/game/topic_game_over",params:t,success:function(t){console.log("game_over result = "+JSON.stringify(t)),0==t.err_code&&e&&e(t)}})},e.topicRankInfo=function(t){return i(this,void 0,Promise,function(){return r(this,function(){return[2,new Promise(function(e){l.default.get({url:"/sheep/v1/game/topic_rank",params:{},success:function(o){e(),0==o.err_code&&(u.default.topicRankInfo=o.data,t&&t(o),cc.game.emit(s.EMITKEY.TOPICRANKINFO))},fail:function(){e()}})})]})})},e.getTopicUserInfo=function(t,e){l.default.get({url:"/sheep/v1/game/topic_user_info",params:{uid:t},success:function(t){0==t.err_code?e&&e(t):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.getMatchResult=function(t,e){l.default.get({url:"/sheep/v1/game/topic_match_info",params:{type:t,uid:c.default.getUserData().userID},success:function(t){0==t.err_code?e&&e(t):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.updateUserSkin=function(t,e){l.default.get({url:"/sheep/v1/game/update_user_skin",params:{skin:t},success:function(t){0==t.err_code?e&&e(t):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.getPersonalInfo=function(t){l.default.get({url:"/sheep/v1/game/personal_info",params:{},success:function(e){0==e.err_code?t&&t(e):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e}(cc.Component);o.default=p,cc._RF.pop()},{"../../script/manager/data-manager":"data-manager","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/sdk":"sdk"}],audio:[function(t,e,o){"use strict";cc._RF.push(e,"3d3f9s4k+9DLLd0qVZ7eBqp","audio"),Object.defineProperty(o,"__esModule",{value:!0});var n=t("../../manager/GameManager"),a=t("../dataTs"),i=t("../enumConfig"),r=function(){function t(){}return t.updateAudioStatus=function(){this._playingMusicName&&this.playAudioMusic(this._playingMusicName,!0)},t.playBGM=function(){if(this.setupData=a.default.getUserSetupData(),console.log(this.setupData.musicStatus),this.setupData.musicStatus<0)cc.audioEngine.stopAll();else{var e="audio/music/game_cycle.mp3";n.default.getInstance().gameType==i.GAMETYPE.GAMEMAIN?e="audio/music/main_music.mp3":n.default.getInstance().gameType==i.GAMETYPE.GAMEDAILY?e="audio/music/game_cycle.mp3":n.default.getInstance().gameType==i.GAMETYPE.GAMETOMB?e="audio/music/game_cycle.mp3":n.default.getInstance().gameType==i.GAMETYPE.GAMETOPIC&&(e="audio/music/game_cycle.mp3"),console.log("\u97f3\u4e50 ###### = ",e),console.log("gameType ###### = ",n.default.getInstance().gameType),t.playAudioMusic(e,!0)}},t.playAudioMusic=function(t,e){this.setupData=a.default.getUserSetupData();var o=this,n=null;this._bgMusicClip||(this._bgMusicClip={}),this._audioClip||(this._audioClip={}),this._playingMusicName||(this._playingMusicName=""),this.setupData.musicStatus<0&&e?cc.audioEngine.stopAll():this.setupData.effectStatus<0&&!e||(e?(this._playingMusicName==t&&console.log("\u540c\u4e00\u4e2a\u97f3\u4e50"),cc.audioEngine.stopAll(),n=!!this._bgMusicClip&&this._bgMusicClip[t],this._playingMusicName=t):n=!!this._audioClip&&this._audioClip[t],n?e?cc.audioEngine.playMusic(n,e):cc.audioEngine.playEffect(n,!1):o.loadPlayAudioEngine(t,e,function(t){var n=null;e?o._playingMusicName==t&&(n=o._bgMusicClip[t],cc.audioEngine.playMusic(n,e)):(n=o._audioClip[t],cc.audioEngine.playEffect(n,!1))}))},t.resumeAllAudio=function(e){var o=this._playingMusicName,n=!!this._bgMusicClip&&this._bgMusicClip[o];n?(cc.audioEngine.stopAll(),cc.audioEngine.play(n,!0,1)):e&&t.playAudioMusic(e,!0)},t.loadPlayAudioEngine=function(t,e,o){o=o||function(){};var n=this;cc.loader.loadRes(t,function(a,i){a||(e?n._bgMusicClip[t]=i:n._audioClip[t]=i,o(t))})},t.audioLocalName="audioLocal",t._bgMusicClip={},t._playingMusicName="",t._audioClip={},t.setupData=null,t}();o.default=r,cc._RF.pop()},{"../../manager/GameManager":"GameManager","../dataTs":"dataTs","../enumConfig":"enumConfig"}],blockArea:[function(t,e,o){"use strict";cc._RF.push(e,"abca32Q32NKQIkl20gPemwL","blockArea");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blockEditorPrefab=null,e}return a(e,t),e.prototype.start=function(){},i([s(cc.Prefab)],e.prototype,"blockEditorPrefab",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],blockEditorPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"5c0a1NoiWZPf7dwBgQqTPdJ","blockEditorPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.layerNumber=null,e.blockImg=null,e.moldTypeText=null,e.rolNum=0,e.rowNum=0,e.layerIndex=0,e.moldType=0,e.deleteCallback=null,e}return a(e,t),e.prototype.start=function(){this.node.on(cc.Node.EventType.TOUCH_END,this.deleteBlock,this)},e.prototype.setBlockLayerNum=function(t,e,o,n,a){this.rolNum=t,this.rowNum=e,this.layerIndex=o,this.moldType=n,2==this.moldType?this.moldTypeText.active=!0:this.moldTypeText.active=!1,this.deleteCallback=a,this.layerNumber.node.active=!0,this.layerNumber.string=""+this.layerIndex},e.prototype.setBlockImgType=function(t,e){if(this.moldType=e,2==this.moldType?this.moldTypeText.active=!0:this.moldTypeText.active=!1,0==t)this.blockImg.active=!1;else{this.blockImg.active=!0;var o="block/block_"+t+".png";r.default.changeSpriteFrame(this.blockImg,o)}},e.prototype.deleteBlock=function(){this.deleteCallback&&this.deleteCallback(this.rolNum,this.rowNum,this.layerIndex)},i([l(cc.Label)],e.prototype,"layerNumber",void 0),i([l(cc.Node)],e.prototype,"blockImg",void 0),i([l(cc.Node)],e.prototype,"moldTypeText",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],blockPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"163e04v/WJMCIjkhalOEqNm","blockPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/common/enumConfig"),s=t("../../script/common/native/audio"),l=t("../../script/common/sdk"),u=t("../../script/common/util"),p=t("../../script/manager/data-manager"),d=t("../../script/manager/GameManager"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blockImgBg=null,e.blockImg=null,e.blackMaskNode=null,e.rollAreaNode=null,e.rollContent=null,e.rollBlockNode=null,e.isShowLight=!1,e.isChoosed=!1,e.cardDataObj=null,e.newScale=1,e.touchCallback=null,e.isRotating=!1,e.circleCenter=cc.v2(0,0),e.circleRadius=0,e.circleRadiusMax=250,e.circleRadiusMin=250,e.addCircleLength=3,e.subCircleLength=-10,e.nowMoveInTimes=0,e.moveInTimes=15,e.rotationTimes=80,e.radian=0,e.radianMin=0,e.radianAdd=0,e.addRadianOnce=0,e.rotateParentComp=null,e.rotateOldPosition=null,e.touchCancelCallback=null,e}return a(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){this.node.on("touchstart",this.touchStart,this),this.node.on("touchend",this.touchEnd,this),this.node.on("touchcancel",this.touchCancel,this)},e.prototype.addBlockNode=function(t,e,o){this.isChoosed=!0,this.isShowLight=!0,this.blackMaskNode.active=!1,this.cardDataObj=t,this.touchCallback=e,this.touchCancelCallback=o||function(){},this.newScale=this.node.scale;var n=this.getBlockName(this.cardDataObj.type);r.default.changeSpriteFrame(this.blockImg,n),2==this.cardDataObj.moldType&&(this.blockImg.active=!1)},e.prototype.getBlockName=function(t){var e="block/block_"+t+".png";return p.default.topicModel&&d.default.getInstance().gameType==c.GAMETYPE.GAMETOPIC&&(1==p.default.topicModel.id?e="block/zombie/block_"+t+".png":2==p.default.topicModel.id?e="block/werewolf/block_"+t+".png":3==p.default.topicModel.id?e="block/man/block_"+t+".png":4==p.default.topicModel.id?e="block/autumn/block_"+t+".png":5==p.default.topicModel.id?e="block/teacher/block_"+t+".png":6==p.default.topicModel.id?e="block/autumn/block_"+t+".png":7==p.default.topicModel.id&&(e="block/teacher/block_"+t+".png")),e},e.prototype.getType=function(){return this.cardDataObj.type},e.prototype.getCardObj=function(){var t=!0;return this.isShowLight&&!this.isChoosed||(t=!1),{cardDataObj:this.cardDataObj,isCanMove:t}},e.prototype.updateBlockNodeData=function(t,e,o){this.isChoosed=!0,this.isShowLight=!0,this.blackMaskNode.active=!1,this.cardDataObj=t,this.touchCallback=e,this.newScale=this.node.scale,this.touchCancelCallback=o||function(){}},e.prototype.touchStart=function(t){t.stopPropagation(),this.isShowLight&&!this.isChoosed&&(l.default.vibrateShort(),this.newScale=this.node.scale,cc.game.emit(c.EMITKEY.SHOWMASKLAYER,2),s.default.playAudioMusic("audio/sound/clickBlock.mp3",!1),cc.tween(this.node).to(.1,{scale:1.4*this.newScale}).start(),this.node.setSiblingIndex(1e4))},e.prototype.touchEnd=function(t){t.stopPropagation(),this.isShowLight&&!this.isChoosed&&(cc.game.emit(c.EMITKEY.HIDEMASKLAYER,1),this.touchCallback&&this.touchCallback(this))},e.prototype.touchCancel=function(t){t.stopPropagation(),this.isShowLight&&!this.isChoosed&&(cc.game.emit(c.EMITKEY.HIDEMASKLAYER,6),cc.tween(this.node).to(.1,{scale:this.newScale}).start(),this.touchCancelCallback&&this.touchCancelCallback())},e.prototype.playRandomBlockAnimate=function(){if(2==this.cardDataObj.moldType&&this.isShowLight){var t=this;s.default.playAudioMusic("audio/sound/blockRandom.mp3",!1);var e=this.cardDataObj.type;this.rollAreaNode.active=!0;for(var o=[],n=[],a=0;a<12;a++){var i=u.default.rnd(1,8);o.push(i)}o.push(e);var c=u.default.rnd(1,8);o.push(c);var l=.5*(12*this.rollBlockNode.height+200);this.rollContent.y=l,this.rollContent.scale=.5;for(var p=0;pthis.rotationTimes+this.moveInTimes)return this.unschedule(this.circleMove),void this.moveOldPosition();this.circleRadius0?n>=0?Math.atan(i):2*Math.PI-Math.atan(i):n>=0?Math.PI-Math.atan(i):Math.PI+Math.atan(i)}else a=n>0?Math.PI/2:-Math.PI/2;return 180*a/Math.PI},i([m(cc.Node)],e.prototype,"blockImgBg",void 0),i([m(cc.Node)],e.prototype,"blockImg",void 0),i([m(cc.Node)],e.prototype,"blackMaskNode",void 0),i([m(cc.Node)],e.prototype,"rollAreaNode",void 0),i([m(cc.Node)],e.prototype,"rollContent",void 0),i([m(cc.Node)],e.prototype,"rollBlockNode",void 0),i([m(cc.Node)],e.prototype,"isShowLight",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/enumConfig":"enumConfig","../../script/common/native/audio":"audio","../../script/common/sdk":"sdk","../../script/common/util":"util","../../script/manager/GameManager":"GameManager","../../script/manager/data-manager":"data-manager"}],brickPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"713faAfsa9BN4dPx/ixKnJX","brickPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../itemSub/brickSubPrefab"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.brickSubPrefab=null,e.base_title_label=null,e.parentNode=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setNodeData=function(t,e){for(var o in this.parentNode=e,this.nodeData=t,this.base_title_label.string="- "+this.nodeData.name+" -",this.nodeData.brickArr){var n=cc.instantiate(this.brickSubPrefab);n.getComponent(l.default).setNodeData(this.nodeData.brickArr[o],this),this.content.addChild(n)}},e.prototype.refreshNode=function(t,e){this.parentNode=e,this.nodeData=t;var o=this.content.children;for(var n in o)o[n].getComponent(l.default).setNodeData(this.nodeData.brickArr[n],this)},i([s(cc.Node)],e.prototype,"content",void 0),i([s(cc.Prefab)],e.prototype,"brickSubPrefab",void 0),i([s(cc.Label)],e.prototype,"base_title_label",void 0),i([c],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../itemSub/brickSubPrefab":"brickSubPrefab"}],brickSubPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"d9565mv5uxJ9q8a8EOWqngx","brickSubPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/manager/GameManager"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgContent=null,e.imgContentSub=null,e.imgLock=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.node,this.clickNodeAction.bind(this))},e.prototype.clickNodeAction=function(){r.default.addClickAudio()},e.prototype.rewardNodeData=function(t){this.imgLock.active=!1,this.imgContent.active=!0;var e="block/block_"+t+".png";r.default.changeSpriteFrame(this.imgContentSub,e),this.imgContent.getChildByName("mark").active=!1},e.prototype.setNodeData=function(t){this.nodeData=t;var e="block/block_"+t.itemId+".png";r.default.changeSpriteFrame(this.imgContentSub,e),1==t.unlock?(this.imgContent.active=!0,this.imgLock.active=!1):(this.imgContent.active=!1,this.imgLock.active=!0),c.default.getInstance().collectionMark.brickNum==t.itemId?(this.imgContent.getChildByName("mark").active=!0,c.default.getInstance().collectionMark.brickNum=0):this.imgContent.getChildByName("mark").active=!1},i([u(cc.Node)],e.prototype,"imgContent",void 0),i([u(cc.Node)],e.prototype,"imgContentSub",void 0),i([u(cc.Node)],e.prototype,"imgLock",void 0),i([l],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/manager/GameManager":"GameManager"}],brickSv:[function(t,e,o){"use strict";cc._RF.push(e,"0fd69rlRCBO6pXp78mPsOUw","brickSv");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../common/dataTs"),u=t("../../../pre/item/brickPrefab"),p=t("../../../i18n/i18n"),d=t("../../../i18n/gd_language"),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.brickPrefab=null,e.pictureData=null,e.dataArray=[],e}return a(e,t),e.prototype.start=function(){for(var t in this.content.removeAllChildren(),this.parserData(),this.dataArray){var e=cc.instantiate(this.brickPrefab);e.getComponent(u.default).setNodeData(this.dataArray[t],this),this.content.addChild(e)}},e.prototype.onEnable=function(){this.dataArray.length>0&&this.refreshSubNode()},e.prototype.parserData=function(){this.pictureData=l.default.getPictureData();var t=l.default.gameConfigData.baseConfigData.pictureData.brickMaxNum,e=this.pictureData.brickNum;e>=t&&(e=t);var o=[];this.dataArray=[];for(var n=0;ne-1?0:1;if(o.push({itemId:n+1,unlock:a}),o.length>=5||n==t-1){for(var i=5-o.length,r=0;r=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../../script/manager/data-manager"),s=t("../tools/str-utils"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.bgSprite=null,e.descNode=null,e.clickBtn=null,e.failSF=null,e.winSF=null,e.showData=null,e.callback=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.clickBtn,this.clickBtnFunc.bind(this))},e.prototype.clickBtnFunc=function(){if(this.callback){var t=this.showData.data;this.callback(t)}},e.prototype.showSubData=function(t,e){this.showData=t,this.callback=e;var o=t.data,n=o.content;if(c.default.region&&1==o.type)n=c.default.region+o.content;else if(2==o.type&&c.default.rankUserInfo){var a=c.default.rankUserInfo.fail;a&&0!=a||(a=1),n=s.default.formatStr(o.content,a)}this.descNode.getComponent(cc.Label).string=n,1==t.type?(this.bgSprite.spriteFrame=this.winSF,this.descNode.color=new cc.Color(0,0,0)):(this.bgSprite.spriteFrame=this.failSF,this.descNode.color=new cc.Color(255,255,255))},i([p(cc.Sprite)],e.prototype,"bgSprite",void 0),i([p(cc.Node)],e.prototype,"descNode",void 0),i([p(cc.Node)],e.prototype,"clickBtn",void 0),i([p(cc.SpriteFrame)],e.prototype,"failSF",void 0),i([p(cc.SpriteFrame)],e.prototype,"winSF",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../../script/manager/data-manager":"data-manager","../common/CcJsFunc":"CcJsFunc","../tools/str-utils":"str-utils"}],"bullet-screen-pop":[function(t,e,o){"use strict";cc._RF.push(e,"a8b16hoKXVDjrSvCkcW6JEW","bullet-screen-pop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/enumConfig"),l=t("../common/sdk"),u=t("../manager/GameManager"),p=t("../../script/manager/data-manager"),d=t("../sub/bullet-item"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.closeBtn=null,e.contentNode=null,e.buttleItemNode=null,e.bulletsWin=[],e.bulletsFail=[],e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.mask,this.maskFunc.bind(this)),r.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),this.buttleItemNode.active=!1},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.maskFunc=function(){this.node.active=!1},e.prototype.showPop=function(){this.node.active=!0,this.bulletsWin=p.default.bulletsWin,this.bulletsFail=p.default.bulletsFail,p.default.rankUserInfo&&1==p.default.rankUserInfo.state?this.setupSubviews(this.bulletsWin,1):this.setupSubviews(this.bulletsFail,2)},e.prototype.setupSubviews=function(t,e){var o=this;this.contentNode.removeAllChildren();for(var n=0;n=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/api/api-sheep"),c=t("../../script/common/CcJsFunc"),s=t("../../script/common/enumConfig"),l=t("../../script/manager/PoolManager"),u=t("../../script/manager/data-manager"),p=t("../../pre/effect/BulletPrefab"),d=cc._decorator,h=d.ccclass,f=(d.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.bulletsCurrent=[],e.bulletsArray=[],e.timer=0,e}return a(e,t),e.prototype.start=function(){cc.game.on(s.EMITKEY.RANKUSERINFOSUCCESS,this.rankUserInfoFunc,this),cc.game.on(s.EMITKEY.BULLETSEND,this.bulletSendFunc,this),this.schedule(this.requestBulletData,60,1e4,1)},e.prototype.bulletSendFunc=function(t){for(var e={},o=0;o\u5f39\u5e55"),this.setDataInfo(e)):(console.log("\u7f13\u5b58\u6570\u636e\u8fc7\u671f->\u5f39\u5e55"),r.default.getBulletData(function(e){e&&(t.setDataInfo(e),u.default.setBulletData(e))}))},e.prototype.setDataInfo=function(t){this.bulletsCurrent=t,this.showBullets()},e.prototype.spawnBullets=function(){for(var t=this,e=this,o=this.randomBullet(),n=0;n=3&&(this.timer=0,this.showBullets())},e.prototype.showBullets=function(){0!=this.bulletsArray.length&&4!=this.bulletsArray.length||(console.log("\u518d\u6b21\u521b\u5efa\u5f39\u5e55 ### "+this.bulletsArray.length),this.spawnBullets())},i([h],e)}(cc.Component));o.default=f,cc._RF.pop()},{"../../pre/effect/BulletPrefab":"BulletPrefab","../../script/api/api-sheep":"api-sheep","../../script/common/CcJsFunc":"CcJsFunc","../../script/common/enumConfig":"enumConfig","../../script/manager/PoolManager":"PoolManager","../../script/manager/data-manager":"data-manager"}],"calendar-item":[function(t,e,o){"use strict";cc._RF.push(e,"312273bidZPd4yxEMIojF1F","calendar-item");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../common/dataTs"),u=t("../../common/enumConfig"),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgEnd=null,e.imgStart=null,e.imgWin=null,e.descNode=null,e.nodeData=null,e.parentNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setNodeData=function(t){this.nodeData=t,this.descNode.getComponent(cc.Label).string=String(t.day),this.show(t.type)},e.prototype.getNodeData=function(){return this.nodeData},e.prototype.isWin=function(){var t=this.nodeData.date.split("-");if(t.length>=3){var e=""+t[0]+t[1],o=""+t[0]+t[1]+t[2],n=l.default.getUserData().dailyData,a=this.nodeData.type==u.CALENDARITEM.ITEMOLD||this.nodeData.type==u.CALENDARITEM.ITEMNOW;if(n&&n[e]&&n[e][o]&&n[e][o].isWin&&a)return!0}return!1},e.prototype.show=function(t){void 0===t&&(t=u.CALENDARITEM.ITEMFUTURE),this.showBackground(t),this.isWin()&&(this.imgEnd.active=!1,this.imgStart.active=!1,this.imgWin.active=!0,this.descNode.color=(new cc.Color).fromHEX("58BF3A"))},e.prototype.showBackground=function(t){switch(this.imgEnd.active=!1,this.imgStart.active=!1,this.imgWin.active=!1,this.descNode.active=!0,this.descNode.color=(new cc.Color).fromHEX("#661C1C"),t){case u.CALENDARITEM.ITEMLAST:this.descNode.active=!1;break;case u.CALENDARITEM.ITEMOLD:this.imgEnd.active=!0;break;case u.CALENDARITEM.ITEMNOW:this.imgEnd.active=!0,this.imgStart.active=!0,this.descNode.color=(new cc.Color).fromHEX("#FFFFFF");break;case u.CALENDARITEM.ITEMFUTURE:this.descNode.color=(new cc.Color).fromHEX("#BBADAD");break;case u.CALENDARITEM.ITEMNEXT:this.descNode.active=!1,this.descNode.color=(new cc.Color).fromHEX("#BBADAD");break;case u.CALENDARITEM.ITEMNOR:this.imgEnd.active=!0,this.imgStart.active=!1,this.imgWin.active=!1;break;case u.CALENDARITEM.ITEMSELE:this.imgEnd.active=!1,this.imgStart.active=!0,this.imgWin.active=!1,this.descNode.color=(new cc.Color).fromHEX("#FFFFFF");break;case u.CALENDARITEM.ITEMSUC:this.imgEnd.active=!1,this.imgStart.active=!1,this.imgWin.active=!0,this.descNode.color=(new cc.Color).fromHEX("58BF3A")}},i([s(cc.Node)],e.prototype,"imgEnd",void 0),i([s(cc.Node)],e.prototype,"imgStart",void 0),i([s(cc.Node)],e.prototype,"imgWin",void 0),i([s(cc.Node)],e.prototype,"descNode",void 0),i([c],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig"}],"cat-house-progress":[function(t,e,o){"use strict";cc._RF.push(e,"a832bZG8ctCkbykfAYO9amD","cat-house-progress");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/CcJsFunc"),c=t("../../common/dataTs"),s=t("../../common/enumConfig"),l=t("../../common/spine"),u=t("../../main/houseLayer"),p=t("../../main/mainCultivateLayer"),d=t("../../pop/unlock-build-pop"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainCultivateLayer=null,e.mainUILayer=null,e.houseLayer=null,e.progressMain=null,e.progressNode=null,e.receiveNode=null,e.newCatNode=null,e.titleLabel=null,e.progressBar=null,e.progressLabel=null,e.boxNode=null,e.boxMark=null,e.clawSpine=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(s.EMITKEY.MAINUPDATEUI,this.updateSubUI,this),cc.game.on(s.EMITKEY.UPDATETABBARSEND,this.updateTabbar,this),r.default.addbtnTouchStartScale(this.node),r.default.addbtnTouchEndScale(this.node,this.catProgressFunc.bind(this)),r.default.addbtnTouchCancelScale(this.node),this.updateSubUI()},e.prototype.updateSubUI=function(){var t=this;if(this.updateProgress(),1==c.default.currentHouseUnlockAll()&&(c.default.haveNewHouseUnlock()?this.boxMark.active=!0:this.boxMark.active=!1,"1"==cc.sys.localStorage.getItem("unlockNewHouse")?this.unlockNewHouseFunc():this.receiveBox()),this.clawSpine.active=!1,!cc.sys.localStorage.getItem("unlockClawCache")){var e=c.default.getUserData();e.fish>=2&&e.playLevelId<10&&(this.clawSpine.active=!0,this.clawSpine.getComponent(l.default).play("6Pa",0,function(){t.clawSpine.active=!1}),cc.sys.localStorage.setItem("unlockClawCache",1))}},e.prototype.updateTabbar=function(t){t==s.MAINPAGE.PAGEMAIN&&(this.clawSpine.active=!1)},e.prototype.catProgressFunc=function(){if("1"==cc.sys.localStorage.getItem("unlockNewHouse"))return c.default.haveNewHouseUnlock()?(this.mainCultivateLayer.getComponent(p.default).unlockNewHouse(),void cc.sys.localStorage.setItem("unlockNewHouse","0")):(console.log("\u623f\u5c4b\u5df2\u5168\u90e8\u89e3\u9501"),void cc.game.emit("showMainTips","Waiting for new houses to be built!"));if(1==c.default.currentHouseUnlockAll())return c.default.getHourseUnlockData(),this.mainUILayer.getChildByName("unlock-build-pop").getComponent(d.default).showGetRemoveProp(),this.unlockNewHouseFunc(),void cc.sys.localStorage.setItem("unlockNewHouse","1");cc.game.emit(s.EMITKEY.UPDATETABBARRECEIVE,1);var t=c.default.getHourseUnlockData();t&&(t.length<=4?this.houseLayer.getComponent(u.default).moveWithRoomId(s.ROOMTYPE.ROOMONE):4=e[e.length-1][0].fish),this.titleLabel.string="\u732b\u5c4b"+e.length;var o=e[e.length-1],n=0;for(var a in o)o[a].unlock&&n++;this.progressLabel.string=n+"/"+o.length,this.progressBar.getComponent(cc.Sprite).fillRange=n/o.length}else this.boxMark.active=!1},e.prototype.receiveBox=function(){this.progressNode.active=!1,this.newCatNode.active=!1,this.receiveNode.active=!0},e.prototype.unlockNewHouseFunc=function(){this.progressMain.active=!1,this.newCatNode.active=!0,c.default.haveNewHouseUnlock()?this.newCatNode.getComponent(cc.Label).string="\u89e3\u9501\u65b0\u623f\u5c4b":this.newCatNode.getComponent(cc.Label).string="\u5df2\u5168\u90e8\u89e3\u9501"},i([m(cc.Node)],e.prototype,"mainCultivateLayer",void 0),i([m(cc.Node)],e.prototype,"mainUILayer",void 0),i([m(cc.Node)],e.prototype,"houseLayer",void 0),i([m(cc.Node)],e.prototype,"progressMain",void 0),i([m(cc.Node)],e.prototype,"progressNode",void 0),i([m(cc.Node)],e.prototype,"receiveNode",void 0),i([m(cc.Node)],e.prototype,"newCatNode",void 0),i([m(cc.Label)],e.prototype,"titleLabel",void 0),i([m(cc.Node)],e.prototype,"progressBar",void 0),i([m(cc.Label)],e.prototype,"progressLabel",void 0),i([m(cc.Node)],e.prototype,"boxNode",void 0),i([m(cc.Node)],e.prototype,"boxMark",void 0),i([m(cc.Node)],e.prototype,"clawSpine",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/spine":"spine","../../main/houseLayer":"houseLayer","../../main/mainCultivateLayer":"mainCultivateLayer","../../pop/unlock-build-pop":"unlock-build-pop"}],catClawPrefabs:[function(t,e,o){"use strict";cc._RF.push(e,"d608do4PQpDxZoRa+u6of6d","catClawPrefabs");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/spine"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.catClaw=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.playClawAnimation=function(){var t=this;t.node.active=!0,this.node.scale=.8,this.catClaw.getComponent(r.default).play("6Pa",0,function(){t.node.active=!1})},i([l(cc.Node)],e.prototype,"catClaw",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/spine":"spine"}],catNode:[function(t,e,o){"use strict";cc._RF.push(e,"576facriHVLQ5wzTbqa6xlT","catNode");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/dataTs"),c=t("../common/spine"),s=cc._decorator,l=s.ccclass,u=(s.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.catId=0,e.parentComp=null,e.touchStartPoint=null,e.touchEndPoint=null,e.distance=0,e.unlockClothingBg=null,e.unlockClothing=null,e}return a(e,t),e.prototype.start=function(){this.node.on("touchend",this.touchEndFunc,this),this.node.on("touchstart",this.touchStartFunc,this),this.node.on("touchmove",this.touchMoveFunc,this),this.node.on("touchcancel",this.touchCancelFunc,this);var t=this.node.parent;this.unlockClothingBg=t.getChildByName("unlockClothingBg"),this.unlockClothing=t.getChildByName("unlockClothing"),cc.tween(this.unlockClothingBg).by(10,{angle:360}).repeatForever().start()},e.prototype.setCatData=function(t,e){this.catId=t,this.parentComp=e,this.updateSkin()},e.prototype.playClothesAnimation=function(t){void 0===t&&(t=!1),this.unlockClothingBg.active=t,this.unlockClothing.active=t},e.prototype.updateSkin=function(t){void 0===t&&(t=!1);var e="cat_"+this.catId,o=r.default.getUserData().catClothesData[e];for(var n in o)1==o[n].isWear&&this.setCatSpine(o[n].clothesID,o[n].clothRank,t)},e.prototype.setCatSpine=function(t,e,o){void 0===o&&(o=!1);var n=this,a="Model"+(this.catId<10?"0"+this.catId:this.catId+"");this.node.getComponent(c.default).loadNewSpine(a,function(){var a=t%1e3,i=a<10?"0"+a:a+"";n.node.getComponent(c.default).setNewSkin(i),o?n.node.getComponent(c.default).play("2_SkinChange1",1,function(){n.node.getComponent(c.default).play("1_Standby1",0)}):n.node.getComponent(c.default).play("1_Standby1",0);var r=1;r=e<2?0:1;for(var s=["Collar2","Collar1"],l=0;l=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/ApiTool"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/spine"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.popNode=null,e.titleLabel=null,e.allLabel=null,e.numLabel=null,e.sheepSP=null,e.bgFlashSP=null,e.headerNode=null,e}return a(e,t),e.prototype.start=function(){c.default.addbtnTouchEndScale(this.maskNode,this.maskNodeFunc.bind(this))},e.prototype.maskNodeFunc=function(){this.node.active=!1},e.prototype.showPop=function(){var t=this;this.node.active=!0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),cc.tween(this.bgFlashSP).to(0,{scale:0}).to(.1,{scale:1}).call(function(){t.bgFlashSP.getComponent(l.default).loadSpine("sheep/UI",function(){t.bgFlashSP.getComponent(l.default).play("4Ray2",0)})}).start();for(var e="sheep/Sheeps",o="skin_00",n=s.default.getSheepClothesData(),a=0;a=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/main/blockPrefab"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../common/native/audio"),p=t("../manager/GameManager"),d=t("./crushArea"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blockPrefab=null,e.blockArea=null,e.crushAreaNode=null,e.gameTopNode=null,e.moveOutArea=null,e.cookieGetParticle=null,e.crushAreaArgs=null,e.levelID=0,e.nowLevelBlockObj={},e.parentComp=null,e.blockTypeArr=[],e.minBlockNum=8,e.blockMaxWidth=120,e.blockMaxHeight=135,e.cookieBlockType=0,e.scaleRate=1,e}return a(e,t),e.prototype.onLoad=function(){},e.prototype.onDestroy=function(){console.log("chessboard \u9000\u51fa\u7a0b\u5e8f ######")},e.prototype.start=function(){console.log("start ###")},e.prototype.onEnable=function(){console.log("onEnable ###")},e.prototype.init=function(t,e){this.node.scale=1,console.log("init ###### ",t.widthNum,t.heightNum,this.node.scale),this.parentComp=e,this.nowLevelData=t,this.blockArea.removeAllChildren(),this.levelID=t.levelID,this.createBlockTypeObj(),this.rewardBlockInit(t,!1),this.initBlockNodeLayer(!0),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,3),this.refreshIndex()},e.prototype.initNextLevelMap=function(t,e){this.node.scale=1,console.log("init ###### ",t.widthNum,t.heightNum,this.node.scale),this.parentComp=e,this.nowLevelData=t,this.blockArea.x=cc.winSize.width,this.blockArea.removeAllChildren(),this.createBlockTypeObj(),this.rewardBlockInit(t,!0),this.initBlockNodeLayer(!1),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,3),this.refreshIndex(),cc.tween(this.blockArea).to(1,{x:-360,y:0},{easing:cc.easing.quadOut}).call(function(){cc.game.emit(l.EMITKEY.HIDEMASKLAYER,11)},this).start()},e.prototype.rewardBlockInit=function(t,e){if(s.default.gameConfigData.baseConfigData){this.cookieBlockType=0;var o=s.default.getUserData().playLevelId,n=s.default.gameConfigData.baseConfigData.cookieRewardLevel;if(e&&o>=n&&o%2!=0){var a=this.getCookieLevelData();console.log("\u997c\u5e72\u7c7b\u578b\u4e3a",a.type);var i=s.default.getCookieRewardData();console.log("cookieData",JSON.stringify(i)),this.cookieBlockType=a.type}}},e.prototype.getCookieLevelData=function(){var t=this.blockTypeArr.concat(),e=this.sortAndGroup(t),o=c.default.shuffle(e);console.log("blockArr",t),console.log("randomArr",o);var n=[];30<=t.length&&t.length<=72&&n.push(3),36<=t.length&&t.length<=93&&n.push(6),60<=t.length&&t.length<=105&&n.push(9),54<=t.length&&t.length<=99&&n.push(12),69<=t.length&&t.length<=114&&n.push(15),114<=t.length&&t.length<=147&&n.push(21),console.log("countArr",n);var a=[];for(var i in n)for(var r in e)if(n[i]==e[r].length){a.push(n[i]);break}console.log("canArr",a);var s=a[Math.floor(Math.random()*a.length)];for(var l in console.log("count",s),o)if(s==o[l].length)return{count:s,type:o[l][0]};return{count:0,type:0}},e.prototype.sortAndGroup=function(t){var e,o=[];t.sort(function(t,e){return t-e});for(var n=0;n block ",this.blockTypeArr.length),this.blockTypeArr=c.default.shuffle(this.blockTypeArr),p.default.blacksInfo.blockCurCount=this.blockTypeArr.length,p.default.blacksInfo.blockAllCount=this.blockTypeArr.length,console.log("blockCurCount = "+p.default.blacksInfo.blockCurCount+" blockAllCount = "+p.default.blacksInfo.blockAllCount)},e.prototype.initBlockNodeLayer=function(t){p.default.getInstance().cookieDict.cookieCurCount=0;var e=this.nowLevelData.levelData;for(var o in e)for(var n in e[o])t?this.addBlockFunc(e[o][n],cc.winSize.height):this.addBlockFunc(e[o][n],0);t?this.playInitBlockAnimate():this.noPlayAnimate()},e.prototype.checkGameWin=function(){for(var t in this.nowLevelBlockObj)for(var e in this.nowLevelBlockObj[t])for(var o in this.nowLevelBlockObj[t][e])return!1;return!0},e.prototype.noPlayAnimate=function(){for(var t in this.nowLevelBlockObj)for(var e in this.nowLevelBlockObj[t])for(var o in this.nowLevelBlockObj[t][e]){var n=this.checkIsShow(t,Number(o),Number(e)),a=this.nowLevelBlockObj[t][e][o].getComponent(r.default),i=this.node.width/this.nowLevelData.widthNum/this.blockMaxWidth;i*=this.scaleRate,a.setStatus(n,i),a.isChoosed=!1,a.playRandomBlockAnimate()}},e.prototype.playInitBlockAnimate=function(){cc.tween(this.node).delay(.3).call(function(){u.default.playAudioMusic("audio/sound/levelInit.mp3",!1)}).start();var t=1e4,e=0,o=0;for(var n in this.nowLevelBlockObj)for(var a in this.nowLevelBlockObj[n])for(var i in this.nowLevelBlockObj[n][a])o++,Number(i)e&&(e=Number(a));var c=function(n){var a=function(a){var i=function(i){var c=.02*(Number(i)-t)+.02*(e-Number(a)),u=s.nowLevelBlockObj[n][a][i].getComponent(r.default);cc.tween(u.node).delay(c).by(.8,{y:-cc.winSize.height}).by(.1,{y:-5}).by(.1,{y:8}).by(.1,{y:-3}).call(function(){o--;var t=this.checkIsShow(n,Number(i),Number(a)),e=this.nowLevelBlockObj[n][a][i].getComponent(r.default),c=this.node.width/this.nowLevelData.widthNum/this.blockMaxWidth;c*=this.scaleRate,e.setStatus(t,c),e.isChoosed=!1,e.playRandomBlockAnimate(),0==o&&cc.game.emit(l.EMITKEY.HIDEMASKLAYER,3)},s).start()};for(var c in s.nowLevelBlockObj[n][a])i(c)};for(var i in s.nowLevelBlockObj[n])a(i)},s=this;for(var n in this.nowLevelBlockObj)c(n)},e.prototype.refreshIndex=function(){for(var t in this.nowLevelBlockObj)for(var e in this.nowLevelBlockObj[t])for(var o in this.nowLevelBlockObj[t][e])this.nowLevelBlockObj[t][e][o].setSiblingIndex(1e4)},e.prototype.refreshMask=function(){var t=0;for(var e in this.nowLevelBlockObj)for(var o in this.nowLevelBlockObj[e])for(var n in this.nowLevelBlockObj[e][o]){t++;var a=this.checkIsShow(e,Number(n),Number(o)),i=this.node.width/this.nowLevelData.widthNum/this.blockMaxWidth;i*=this.scaleRate,this.nowLevelBlockObj[e][o][n].getComponent(r.default).setStatus(a,i)}p.default.blacksInfo.blockCurCount=t},e.prototype.updateBlockArea=function(){var t=[];for(var e in cc.game.emit(l.EMITKEY.SHOWMASKLAYER,4),this.nowLevelBlockObj)for(var o in this.nowLevelBlockObj[e])for(var n in this.nowLevelBlockObj[e][o]){var a=this.nowLevelBlockObj[e][o][n].getComponent(r.default);t.push(a.cardDataObj.type)}if(!((t=c.default.shuffle(t)).length<1)){for(var e in this.nowLevelBlockObj)for(var o in this.nowLevelBlockObj[e])for(var n in this.nowLevelBlockObj[e][o]){a=this.nowLevelBlockObj[e][o][n].getComponent(r.default);var i=this.nowLevelData.widthNum*this.minBlockNum,s=this.node.width/i,u=this.node.width/this.nowLevelData.widthNum,p=a.cardDataObj.rolNum*s+u/2,d=u/this.blockMaxWidth;d*=this.scaleRate;var h=-(a.cardDataObj.rowNum*s+d*this.blockMaxHeight/2),f=cc.v3(p,h,0);a.beginRotate(this,t.pop(),f)}return!0}cc.game.emit(l.EMITKEY.HIDEMASKLAYER,4)},e.prototype.checkIsShow=function(t,e,o){var n=this.nowLevelBlockObj;for(var a in n)if(Number(a)>Number(t)){var i=e-this.minBlockNum,r=e+this.minBlockNum,c=o-this.minBlockNum,s=o+this.minBlockNum;for(var l in n[a])for(var u in n[a][l])if(Number(u)>i&&Number(u)c&&Number(l)=7)){this.crushAreaNode.setSiblingIndex(10),this.crushAreaArgs&&this.crushAreaArgs.setSiblingIndex(10);var e=t.cardDataObj;this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum]&&delete this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum],this.parentComp.crushBlockNode(t),t.comeParent="chessboard",this.refreshMask()}},e.prototype.addBlockFunc=function(t,e){var o=cc.instantiate(this.blockPrefab);this.blockArea.addChild(o);var n=this.nowLevelData.widthNum*this.minBlockNum,a=this.node.width/n,i=this.node.width/this.nowLevelData.widthNum,c=i/this.blockMaxWidth;c*=this.scaleRate,o.scale=c;var s=t.rolNum*a+i/2,l=-(t.rowNum*a+c*this.blockMaxHeight/2);if(o.x=s,o.y=l+e,0==t.type){var u=this.blockTypeArr.pop();t.type=u}this.cookieBlockType==t.type?t.cookie=1:t.cookie=0,t.cookieType=this.cookieBlockType,o.getComponent(r.default).addBlockNode(t,this.removeCardNode.bind(this),this.refreshIndex.bind(this)),this.addBlockDataObj(o,t)},e.prototype.cancelAddBlockFunc=function(t){t.node.setSiblingIndex(1e3);var e=t.node,o=e.convertToWorldSpaceAR(cc.v2(0,0)),n=this.blockArea.convertToNodeSpaceAR(o);e.removeFromParent(!1),e.x=n.x,e.y=n.y,this.blockArea.addChild(e);var a=this.nowLevelData.widthNum*this.minBlockNum,i=this.node.width/a,c=this.node.width/this.nowLevelData.widthNum,s=t.cardDataObj.rolNum*i+c/2,u=c/this.blockMaxWidth;u*=this.scaleRate;var p=-(t.cardDataObj.rowNum*i+u*this.blockMaxHeight/2);e.stopAllActions(),cc.tween(e).to(.15,{x:s,y:p,scale:u}).call(function(){t.isChoosed=!1,cc.game.emit(l.EMITKEY.HIDEMASKLAYER,2)},this).start(),e.getComponent(r.default).updateBlockNodeData(t.cardDataObj,this.removeCardNode.bind(this),this.refreshIndex.bind(this)),this.addBlockDataObj(e,t.cardDataObj),this.refreshMask(),this.refreshIndex()},e.prototype.addBlockDataObj=function(t,e){this.nowLevelBlockObj[e.layerNum]?this.nowLevelBlockObj[e.layerNum][e.rowNum]?this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum]=t:(this.nowLevelBlockObj[e.layerNum][e.rowNum]={},this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum]=t):(this.nowLevelBlockObj[e.layerNum]={},this.nowLevelBlockObj[e.layerNum][e.rowNum]={},this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum]=t)},i([m(cc.Prefab)],e.prototype,"blockPrefab",void 0),i([m(cc.Node)],e.prototype,"blockArea",void 0),i([m(cc.Node)],e.prototype,"crushAreaNode",void 0),i([m(cc.Node)],e.prototype,"gameTopNode",void 0),i([m(cc.Node)],e.prototype,"moveOutArea",void 0),i([m(cc.Prefab)],e.prototype,"cookieGetParticle",void 0),i([m(cc.Node)],e.prototype,"crushAreaArgs",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../pre/main/blockPrefab":"blockPrefab","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../manager/GameManager":"GameManager","./crushArea":"crushArea"}],clothesPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"33fd5tSoKRCfKE6RQ1fb4nf","clothesPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/common/dataTs"),s=t("../../script/common/spine"),l=t("../../script/manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.titleBanner_1=null,e.lvLabel_1=null,e.titleLabel_1=null,e.titleBanner_2=null,e.titleLabel_2=null,e.titleBanner_3=null,e.lockNode=null,e.selectNode=null,e.catNode=null,e.clothId=0,e.clothData=null,e.isClicked=!1,e.catId=0,e.parentComp=null,e}return a(e,t),e.prototype.start=function(){this.node.on("touchend",this.dressCloth,this)},e.prototype.setClothNodeData=function(t,e,o,n){if(this.clothData=t,this.parentComp=e,c.default.getUserData(),this.isClicked=!1,this.titleBanner_1.active=!1,this.titleBanner_2.active=!1,this.titleBanner_3.active=!1,this.lockNode.active=!1,this.catNode.active=!1,this.selectNode.active=!1,this.clothId=t.clothesID,l.default.getInstance().collectionMark.catSkinNum==this.clothData.clothesID?(this.node.getChildByName("mark").active=!0,l.default.getInstance().collectionMark.catSkinNum=0):this.node.getChildByName("mark").active=!1,"level"==t.unlockType){var a=!1;for(var i in n)if(this.clothData.clothesID==n[i].clothesID){a=!0;break}if(a)for(var i in n)this.clothData.clothesID==n[i].clothesID&&(this.titleBanner_1.active=!0,this.isClicked=!0,this.titleLabel_1.string=t.name,this.lvLabel_1.string="Lv"+n[i].clothRank,this.catNode.active=!0,this.selectNode.active=n[i].isWear,this.setCatSpine(o,n[i].clothRank),0==this.clothData.skin?this.lvLabel_1.node.active=!1:this.lvLabel_1.node.active=!0,2==this.clothData.skin&&n[i].clothRank<3&&(this.titleBanner_1.active=!1,this.titleBanner_2.active=!0,this.titleLabel_2.string="\u5b8c\u6210\u6311\u6218\u89e3\u9501"));else this.titleBanner_2.active=!1,this.titleLabel_2.string=t.unlockNum+"\u5173\u89e3\u9501",this.lockNode.active=!0,this.clothData.skin<1e4&&(this.catNode.active=!0,this.titleBanner_1.active=!1,this.lockNode.active=!1,1==this.clothData.skin?(this.titleBanner_3.active=!0,this.setCatSpine(o,1)):2==this.clothData.skin?(this.titleBanner_2.active=!0,this.titleLabel_2.string="\u5b8c\u6210\u6311\u6218\u89e3\u9501",this.setCatSpine(o,0)):this.setCatSpine(o,1))}else t.unlockType},e.prototype.setCatSpine=function(t,e){var o=this;this.catId=t;var n="Model"+(this.catId<10?"0"+this.catId:this.catId+"");this.catNode.getComponent(s.default).loadNewSpine(n,function(){var t=o.clothId%1e3,n=t<10?"0"+t:t+"";o.clothData.skin<1e4&&o.catNode.getComponent(s.default).setNewSkin(n);var a="Skin/"+n+"_"+e;console.log(n+" "+a),o.catNode.getComponent(s.default).play(a,0)})},e.prototype.dressCloth=function(){r.default.addClickAudio(),this.isClicked?(console.log("\u9009\u62e9\u8863\u670d\uff1a",this.clothId),this.parentComp.dressCloth(this.clothId)):console.log("\u4e0d\u80fd\u88ab\u70b9\u51fb")},i([d(cc.Node)],e.prototype,"titleBanner_1",void 0),i([d(cc.Label)],e.prototype,"lvLabel_1",void 0),i([d(cc.Label)],e.prototype,"titleLabel_1",void 0),i([d(cc.Node)],e.prototype,"titleBanner_2",void 0),i([d(cc.Label)],e.prototype,"titleLabel_2",void 0),i([d(cc.Node)],e.prototype,"titleBanner_3",void 0),i([d(cc.Node)],e.prototype,"lockNode",void 0),i([d(cc.Node)],e.prototype,"selectNode",void 0),i([d(cc.Node)],e.prototype,"catNode",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/dataTs":"dataTs","../../script/common/spine":"spine","../../script/manager/GameManager":"GameManager"}],collectPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"0d875oEXn5LZ7yyzkAjxqlu","collectPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../itemSub/collectSubPrefab"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.collectSubPrefab=null,e.base_title_label=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setNodeData=function(t){this.nodeData=t;var e=this.nodeData.catArr.length;for(var o in this.node.height=130+e/3*305,this.base_title_label.string="- "+this.nodeData.name+" -",this.nodeData.catArr){var n=cc.instantiate(this.collectSubPrefab);n.getComponent(l.default).setNodeData(this.nodeData.catArr[o],this),this.content.addChild(n)}},e.prototype.refreshNode=function(t){this.nodeData=t;var e=this.content.children;for(var o in e)e[o].getComponent(l.default).setNodeData(this.nodeData.catArr[o],this)},i([s(cc.Node)],e.prototype,"content",void 0),i([s(cc.Prefab)],e.prototype,"collectSubPrefab",void 0),i([s(cc.Label)],e.prototype,"base_title_label",void 0),i([c],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../itemSub/collectSubPrefab":"collectSubPrefab"}],collectSubPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"57acahslq1PzajDPXaUCYWO","collectSubPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/common/spine"),s=t("../../script/common/dataTs"),l=t("../../script/manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgContent=null,e.tabLabel=null,e.imgTab=null,e.catNode=null,e.unlocking=null,e.imgLock=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.node,this.clickNodeAction.bind(this))},e.prototype.clickNodeAction=function(){r.default.addClickAudio()},e.prototype.setNodeData=function(t){var e=this;this.nodeData=t,this.tabLabel.string=this.nodeData.name;var o=s.default.getUserData().catClothesData["cat_"+e.nodeData.modelID],n=!1;for(var a in o)if(this.nodeData.clothesID==o[a].clothesID){n=!0;break}if(s.default.getUserData().playLevelId,n?(this.imgContent.active=!0,this.imgLock.active=!1):(this.imgContent.active=!1,this.imgLock.active=!0),!(this.nodeData.unlockNum>=1e4)){0==this.nodeData.skin?this.tabLabel.getComponent(cc.LabelOutline).color=(new cc.Color).fromHEX("#4482CE"):1==this.nodeData.skin?this.tabLabel.getComponent(cc.LabelOutline).color=(new cc.Color).fromHEX("#A648D7"):2==this.nodeData.skin&&(this.tabLabel.getComponent(cc.LabelOutline).color=(new cc.Color).fromHEX("#D5A618"));var i="rewardIcon/Tab"+(t.skin+1)+".png";r.default.changeSpriteFrame(this.imgTab,i);var u=this.nodeData.clothesID%1e3,p=this.nodeData.modelID,d="Model"+(p<10?"0"+p:p+"");if(!o)return e.imgContent.active=!1,void(e.imgLock.active=!0);this.catNode.getComponent(c.default).loadNewSpine(d,function(){var t=u<10?"0"+u:u+"";e.catNode.getComponent(c.default).setNewSkin(t);for(var n=0;n=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../common/dataTs"),u=t("../../../pre/item/collectPrefab"),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.collectPrefab=null,e.collectData=null,e.dataArray=[],e}return a(e,t),e.prototype.start=function(){this.parserData(),this.content.removeAllChildren();for(var t=0;t0&&this.refreshSubNode()},e.prototype.refreshSubNode=function(){this.parserData();var t=this.content.children;for(var e in t)t[e].getComponent(u.default).refreshNode(this.dataArray[e],this)},e.prototype.parserData=function(){var t=[];for(var e in this.collectData=l.default.gameConfigData.baseConfigData.catClothesData,this.collectData)for(var o in this.collectData[e])this.collectData[e][o].modelID<1e4&&t.push(this.collectData[e][o]);for(var n=0,a=0;an&&(n=c);for(a=0;a<=n;a++)this.dataArray[a]={name:"",catArr:[]};for(var i=[],r=0;r=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cookieTrailing=null,e.imageNode=null,e.labelNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),0==t?(this.imageNode.angle=0,this.labelNode.active=!1,this.cookieTrailing.active=!1,r.default.changeSpriteFrame(this.imageNode,"block/cookie/cookie_icon_fly.png")):1==t?(this.imageNode.angle=-12,this.labelNode.active=!0,this.labelNode.getComponent(cc.Label).string="x"+e,this.cookieTrailing.active=!1,r.default.changeSpriteFrame(this.imageNode,"block/cookie/cookie_icon_fly.png")):2==t&&(this.imageNode.angle=0,this.labelNode.active=!1,this.cookieTrailing.active=!1,r.default.changeSpriteFrame(this.imageNode,"rewardIcon/base_icon_ribbon.png"))},i([l(cc.Node)],e.prototype,"cookieTrailing",void 0),i([l(cc.Node)],e.prototype,"imageNode",void 0),i([l(cc.Node)],e.prototype,"labelNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],cookieRewardNode:[function(t,e,o){"use strict";cc._RF.push(e,"69fe22S909JKoELNPl5QSbH","cookieRewardNode");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imageNode=null,e.labelNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t){var e="rewardIcon/"+t.rewardType+".png",o=0;this.imageNode.y=0,"reward_fish"==t.rewardType?o=0:"prop_random"==t.rewardType?(o=60,this.imageNode.y=5):"prop_remove"==t.rewardType&&(e="rewardIcon/prop_remove.png",o=0,this.imageNode.y=15),this.imageNode.angle=o,r.default.changeSpriteFrame(this.imageNode,e),this.labelNode.getComponent(cc.Label).string=t.rewardCount+""},i([l(cc.Node)],e.prototype,"imageNode",void 0),i([l(cc.Node)],e.prototype,"labelNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],crushArea:[function(t,e,o){"use strict";cc._RF.push(e,"aa009UiZ8pDtasKgVM+bH6Y","crushArea");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=t("../common/native/audio"),s=t("../common/util"),l=t("../manager/GameManager"),u=t("./chessboard"),p=t("./moveOutArea"),d=cc._decorator,h=d.ccclass,f=d.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gametopUI=null,e.moveOutArea=null,e.chessboardNode=null,e.particlePrefab=null,e.rewardEmitter=null,e.rewardEmitterNode=null,e.ribbonBoxPrefab=null,e.ribbonBox=null,e.crushAreaArgs=null,e.dailySF=null,e.topicSF=null,e.crushArray=[],e.blockMaxWidth=120,e.newScale=.8,e.moveSpeed=2e3,e.cancelArray=[],e.failNumber=7,e.gameOverStatus=!1,e.particleNode1=null,e.particleNode2=null,e.particleNode3=null,e.parentComp=null,e}return a(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){},e.prototype.initCrushArea=function(t){this.node.removeAllChildren(),this.parentComp=t,this.particleNode1=null,this.particleNode2=null,this.particleNode3=null,this.rewardEmitterNode=null,this.ribbonBox=null,this.crushArray=[],this.cancelArray=[],this.gameOverStatus=!1,this.node.opacity=0,cc.tween(this.node).to(.4,{opacity:255}).start(),l.default.getInstance().gameType==r.GAMETYPE.GAMETOPIC?(this.getComponent(cc.Sprite).spriteFrame=this.topicSF,this.crushAreaArgs&&(this.crushAreaArgs.active=!1)):(this.getComponent(cc.Sprite).spriteFrame=this.dailySF,this.crushAreaArgs&&(this.crushAreaArgs.active=!0))},e.prototype.hideCrushArea=function(){cc.tween(this.node).to(.4,{opacity:0}).start()},e.prototype.addCrushAreaCardNode=function(t){var e=t.node.convertToWorldSpaceAR(cc.v2(0,0)),o=this.node.convertToNodeSpaceAR(e);t.node.removeFromParent(!1),t.node.x=o.x,t.node.y=o.y,t.isChoosed=!0,this.node.addChild(t.node),this.addNewBlockNode(t),this.getCrushBlockNum()>=7&&cc.game.emit(r.EMITKEY.SHOWMASKLAYER,5)},e.prototype.getCrushBlockNum=function(){for(var t=this.crushArray.length,e=0;e=e.failNumber){for(var t=!0,n=0;n=0;e--)if(this.crushArray[e].cardDataObj.type==t.cardDataObj.type)return e+1;return this.crushArray.length},e.prototype.moveOutBlock=function(){if(this.crushArray.length<1)return!1;this.node.setSiblingIndex(10),this.crushAreaArgs&&this.crushAreaArgs.setSiblingIndex(10),this.moveOutArea.setSiblingIndex(9),cc.game.emit(r.EMITKEY.SHOWMASKLAYER,1),this.cancelArray=[];for(var t=[],e=0;e=3));e++);return t.length<1&&cc.game.emit(r.EMITKEY.HIDEMASKLAYER,5),this.moveOutArea.getComponent(p.default).addThreeOutBlock(t),this.updateNewPosition(),!0},e.prototype.cancelOneStep=function(){if(this.cancelArray.length>0){cc.game.emit(r.EMITKEY.SHOWMASKLAYER,6);for(var t=this.cancelArray.pop(),e=0;e8)){var n=.5*(e+t),a=this.GetTangent(t),r=this.GetTangent(e);if(!(i.angle(a,r)<=.1&&0!=o)){this.recursiveSamples(t,n,o+1);var c=this.samples[this.samples.length-1].location,s=this.GetLocation(n);this.length+=i.distance(c,s),this.samples.push(this.createSample(this.Length,n,s)),this.recursiveSamples(n,e,o+1)}}},t.prototype.computeSamples=function(){this.samples.length=0,this.length=0,this.samples.push(this.createSample(0,0)),this.recursiveSamples(0,1,0);var t=this.samples[this.samples.length-1].location,e=this.GetLocation(1);this.length+=i.distance(t,e),this.samples.push(this.createSample(this.Length,1))},t.prototype.createSample=function(t,e,o){return o||(o=this.GetLocation(e)),new n.CurveSample(o,this.GetTangent(e),this.GetUp(e),this.GetScale(e),t,e,this)},t.prototype.GetSample=function(t){if(t<0||t>1)throw new Error("Time must be between 0 and 1 (was "+t+").");for(var e=this.samples[0],o=null,a=!1,i=0,r=this.samples;i=t){o=c,a=!0;break}e=c}if(!a)throw new Error("Can't find curve samples.");var s=o===e?0:(t-e.timeInCurve)/(o.timeInCurve-e.timeInCurve);return n.CurveSample.Lerp(e,o,s)},t.prototype.GetSampleAtDistance=function(t){if(t<0||t>this.Length)throw new Error("Distance must be positive and less than curve length. Length = "+this.Length+", given distance was "+t+".");for(var e=this.samples[0],o=null,a=!1,i=0,r=this.samples;i=t){o=c,a=!0;break}e=c}if(!a)throw new Error("Can't find curve sample.");var s=o===e?0:(t-e.distanceInCurve)/(o.distanceInCurve-e.distanceInCurve);return n.CurveSample.Lerp(e,o,s)},t.prototype.GetProjectionSample=function(){return console.assert(!1,"Not implement"),null},t}();o.CubicBezierCurve=c,cc._RF.pop()},{"./curve-sample":"curve-sample","./typed-event":"typed-event"}],"curve-sample":[function(t,e,o){"use strict";cc._RF.push(e,"fcdcepeqV5GO5ejTxbhKhyO","curve-sample"),Object.defineProperty(o,"__esModule",{value:!0}),o.CurveSample=void 0;var n=t("./mesh-vertex"),a=cc.Quat,i=cc.Vec2,r=cc.Vec3,c=t("./export-helper"),s=cc.misc,l=function(){function t(t,e,o,n,i,r,c){this.location=t,this.tangent=e,this.up=o,this.scale=n,this.distanceInCurve=i,this.timeInCurve=r,this.curve=c,this.rotation=new a}return Object.defineProperty(t.prototype,"Rotation",{get:function(){var t=Object.freeze(new a);if(this.rotation===t){var e=this.up;this.rotation=new a,a.fromViewUp(this.rotation,this.tangent,e)}return this.rotation},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return this.location.equals(t.location)&&this.tangent.equals(t.tangent)&&this.up.equals(t.up)&&this.scale.equals(t.scale)&&c.math.equals(this.distanceInCurve,t.distanceInCurve)&&c.math.equals(this.timeInCurve,t.timeInCurve)},t.Lerp=function(e,o,n){var a=new r;r.lerp(a,e.location,o.location,n);var c=new r;r.lerp(c,e.tangent,o.tangent,n).normalize();var l=new r;r.lerp(l,e.up,o.up,n);var u=new i;return i.lerp(u,e.scale,o.scale,n),new t(a,c,l,u,s.lerp(e.distanceInCurve,o.distanceInCurve,n),s.lerp(e.timeInCurve,o.timeInCurve,n),e.curve)},t.prototype.getBent=function(t){var e=new n.MeshVertex(t.position,t.normal,t.uv),o=new r(0,e.position.y*this.scale.y,e.position.z*this.scale.x);o.x=0;var i=a.fromEuler(new a,0,s.degreesToRadians(-90),0),c=a.multiply(new a,this.Rotation,i);return r.transformQuat(o,o,c),r.add(o,o,this.location),e},t}();o.CurveSample=l,cc._RF.pop()},{"./export-helper":"export-helper","./mesh-vertex":"mesh-vertex"}],"daily-challenge":[function(t,e,o){"use strict";cc._RF.push(e,"d96aesUCApI06hXg7ZujIsy","daily-challenge");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../common/CcJsFunc"),u=t("./calendar-item"),p=t("../../common/enumConfig"),d=t("../../manager/DateManager"),h=t("../../game/gameLayer"),f=t("../../common/dataTs"),m=t("../../game/gameUiLayer"),g=t("../../common/spine"),y=t("../../utils/uma/uma-sdk"),v=t("../../manager/GameManager"),b=t("../../manager/report-common"),_=t("../../../i18n/i18n"),N=t("../../../i18n/gd_language"),C=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gameLayer=null,e.mainLayer=null,e.baseContent=null,e.baseContentBg=null,e.scrollView=null,e.bottomMask=null,e.calendarItem=null,e.previousBtn=null,e.titleLabel=null,e.nextBtn=null,e.spineLevel1=null,e.spineLevel2=null,e.spineLevel3=null,e.progressBarOne=null,e.progressBarTwo=null,e.progressBarThree=null,e.catFootBegin=null,e.catFootThree=null,e.catFootTen=null,e.catFootThirty=null,e.content=null,e.bottomView=null,e.playBtn=null,e.playImg=null,e.playLabel=null,e.progressPoint=null,e.progressLabel=null,e.winLabel=null,e.userData=null,e.dataArray=[],e.curArray=[],e.year=null,e.month=null,e.day=null,e.catArr=[],e.clickTime=0,e.clickMiniTime=0,e.isNoWin=!1,e.beginButtonDuration=0,e}return a(e,t),e.prototype.onEnable=function(){this.catArr=[],this.catArr.push(this.spineLevel1),this.catArr.push(this.spineLevel2),this.catArr.push(this.spineLevel3),this.setupData()},e.prototype.update=function(t){this.beginButtonDuration+=t},e.prototype.start=function(){l.default.addbtnTouchStartScale(this.playBtn),l.default.addbtnTouchEndScale(this.playBtn,this.playBtnTouchEnd.bind(this)),l.default.addbtnTouchCancelScale(this.playBtn),l.default.addbtnTouchStartScale(this.previousBtn),l.default.addbtnTouchEndScale(this.previousBtn,this.previousBtnTouchEnd.bind(this)),l.default.addbtnTouchCancelScale(this.previousBtn),l.default.addbtnTouchOriginStartScale(this.nextBtn),l.default.addbtnTouchOriginEndScale(this.nextBtn,this.nextBtnTouchEnd.bind(this)),l.default.addbtnTouchOriginCancelScale(this.nextBtn),this.clickTime=(new Date).getTime(),this.clickMiniTime=1e3,cc.winSize.height<1334&&(this.node.scale=.8)},e.prototype.setupData=function(){this.year=d.default.getInstance().selDate.getFullYear(),this.month=d.default.getInstance().selDate.getMonth()+1,this.initData()},e.prototype.playBtnTouchEnd=function(){if(this.beginButtonDuration<=1)console.log("\u4e0d\u80fd\u8fde\u7eed\u70b9\u51fb");else{this.beginButtonDuration=0;var t=d.default.format(p.CALENDARNAMES[4],d.default.getInstance().selDate).split("-");if(!(t.length<3)){console.log(t[0]+"\u5e74"+t[1]+"\u6708"+t[2]+"\u65e5");var e=Number(t[2]),o=null;if(f.default.getUserData().playLevelId<=50){if(!(o=f.default.getGameConfigData().baseConfigData.dailyData.easyGame.simple))return void console.log("monthData sample\u914d\u7f6e\u8868\u65e0\u6570\u636e")}else{var n=d.default.format(p.CALENDARNAMES[5],d.default.getInstance().selDate);if(!(o=f.default.getGameConfigData().baseConfigData.dailyData.monthData[n]))return void console.log("monthData \u914d\u7f6e\u8868\u65e0\u6570\u636e")}console.log("monthData = "+JSON.stringify(o));var a=o.levelID+e-1;console.log("index = "+a+" day = "+e),0!=this.isNoWin?this.dailyBeginGame(o,a,e):cc.game.emit("showMainTips",_.default.instance.trans(N.GDLanguage.level_new_tomorrow))}}},e.prototype.dailyBeginGame=function(t,e,o){console.log("levelID = "+e);var n=this;n.userData=f.default.getUserData(),console.log("\u7528\u6237\u6570\u636e:",n.userData),f.default.getLevelByNumber(e,function(e){if(console.log("\u5173\u5361\u6570\u636e:",e),n.gameLayer.activeInHierarchy)console.log("\u5df2\u7ecf\u6253\u5f00 mainLayer 2");else if(e.length<1)cc.game.emit("showMainTips",_.default.instance.trans(N.GDLanguage.level_inadequate));else if(f.default.isHaveLove())if(d.default.getInstance().isOldDay(o))console.log("\u770b\u89c6\u9891###");else{if(n.gameLayer.activeInHierarchy)return void console.log("\u5df2\u7ecf\u6253\u5f00 mainLayer 2");n.showGameAction(t,e,o)}else console.log("\u7231\u5fc3\u4e0d\u8db3"),cc.game.emit("showMainTips",_.default.instance.trans(N.GDLanguage.life_inadequate)),cc.game.emit("showPop",{popName:"getLovePop",showPopData:{popCallbackCollect:null,getLoveTime:0}})})},e.prototype.showGameAction=function(t,e,o){var n=this;cc.game.emit(p.EMITKEY.SHOWTRANSITLAYER,function(a){n.gameLayer.activeInHierarchy?console.log("\u5df2\u7ecf\u6253\u5f00 daily"):(console.log("\u53ef\u4ee5\u6253\u5f00\u4e86 daily"),n.gameLayer.getComponent(h.default).initLevelLayer(e),n.gameLayer.getChildByName("gameUiLayer").getComponent(m.default).setTimeByLevel(t,o),n.node.active=!1,a(),v.default.getInstance().tabbarIsDaily=!1)})},e.prototype.previousBtnTouchEnd=function(){this.changeMonth("last"),this.initData(this.year,this.month)},e.prototype.nextBtnTouchEnd=function(){this.changeMonth("next"),this.initData(this.year,this.month)},e.prototype.changeMonth=function(t){var e=d.default.getInstance().selDate,o=d.default.getInstance().cutType;switch(t){case"last":var n=d.default.lastDate(e,o);d.default.getInstance().selDate=d.default.cloneDate(n);break;case"next":var a=d.default.nextDate(e,o);d.default.getInstance().selDate=d.default.cloneDate(a)}this.year=d.default.getInstance().selDate.getFullYear(),this.month=d.default.getInstance().selDate.getMonth()+1,this.day=d.default.getInstance().selDate.getDay(),this.initData(this.year,this.month),y.default.trackEvent("daily_month"),b.default.reportTACommon("daily_month",{}),b.default.reportTACommon("daily_click",{action:"\u5207\u6362\u6708\u4efd"})},e.prototype.initData=function(t,e){if(void 0===t&&(t=this.year),void 0===e&&(e=this.month),this.titleLabel.string="- "+l.default.getMonthShorthand(e-1)+"/"+t+" -",this.dataArray=[],this.content.removeAllChildren(),this.createLastMonth(t,e),this.createNowMonth(t,e),this.createNextMonth(t,e),cc.winSize.height,console.log(this.dataArray.length),v.default.getInstance().globalData.isFullScreen){this.bottomMask.active=!1;var o=104*Math.ceil(this.dataArray.length/7),n=o-416;this.scrollView.height=o,this.baseContent.height=980+n}else this.bottomMask.active=!0;this.showLastSelDate(),this.updatePlayState(),this.updateSubUI(),this.showActionFunc()},e.prototype.showLastSelDate=function(){if(this.curArray.length){for(var t=0,e=this.curArray;t=0&&(o=this.curArray[n],this.isNoWin=!o.getComponent(u.default).isWin(),!this.isNoWin);n--);if(this.isNoWin){o.getComponent(u.default).show(p.CALENDARITEM.ITEMSELE);var a=o.getComponent(u.default).getNodeData();if(a&&a.date){var i=a.date.split("-");if(i.length<3)return;var r=Number(i[0]),c=Number(i[1]),s=Number(i[2]);this.updatePlayBtn(c,s),d.default.getInstance().selDate=new Date(r,c-1,s)}}else console.log("\u8bf7\u7b49\u5f85\u660e\u5929\u6e38\u73a9\u65b0\u5173\u5361######")}},e.prototype.showActionFunc=function(){var t=Number(f.default.getGameConfigData().baseConfigData.dailyData.originMonth);console.log("originMonthNum = "+t);var e=Number(d.default.format(p.CALENDARNAMES[5],d.default.getInstance().nowDate));console.log("nowMonthNum = "+e);var o=Number(d.default.format(p.CALENDARNAMES[5],d.default.getInstance().selDate));console.log("selMonthNum = "+o),this.previousBtn.active=!(o<=t),this.nextBtn.active=!(o>=e)},e.prototype.updatePlayState=function(){var t=d.default.format(p.CALENDARNAMES[3],d.default.getInstance().selDate).split("-");if(!(t.length<2)){var e=Number(t[0]),o=Number(t[1]);this.updatePlayBtn(e,o)}},e.prototype.updatePlayBtn=function(t,e){d.default.getInstance().isOldDay(e)?this.playImg.active=!0:this.playImg.active=!1;var o="Play "+t+"/"+e;0==this.isNoWin&&(o="Tomorrow",this.playImg.active=!1),this.playLabel.getComponent(cc.Label).string=o},e.prototype.updateSubUI=function(){var t=d.default.format(p.CALENDARNAMES[4],d.default.getInstance().selDate).split("-");if(!(t.length<2)){var e=Number(t[0]),o=Number(t[1]),n=new Date(e,o,0).getDate();n<=0&&(n=30);var a=f.default.getUserData().dailyData,i=d.default.format(p.CALENDARNAMES[5],d.default.getInstance().selDate),r=f.default.getGameConfigData().baseConfigData.dailyData.monthData[i];if(r){if(console.log("monthData = "+JSON.stringify(r)),a&&(a[i]||(console.log("dailyData[monthKey] \u4e3a\u7a7a\uff0c\u521d\u59cb\u5316\u6570\u636e##### "),a[i]={},(l=f.default.getUserData()).dailyData=a,f.default.saveUserData(l))),console.log("dailyData ##### ",JSON.stringify(a),i),a&&a[i]){var c=0;for(var s in a[i])a[i][s]&&a[i][s].isWin&&c++;if(this.catFootThree.active=!1,this.catFootTen.active=!1,this.catFootThirty.active=!1,this.progressBarOne.progress=0,this.progressBarTwo.progress=0,this.progressBarThree.progress=0,this.progressPoint.active=!0,c>0){if(c<=3?(this.catFootThree.active=!(c<3),this.progressBarOne.progress=c/3,this.progressPoint.x=166/3*c-250):c<=10?(this.catFootThree.active=!0,this.catFootTen.active=!(c>3&&c<10),this.progressBarOne.progress=1,this.progressBarTwo.progress=(c-3)/7,this.progressPoint.x=16.6*(c-3)-250+192.5):(this.catFootThree.active=!0,this.catFootTen.active=!0,this.catFootThirty.active=!(c>20&&c=3&&(this.catArr[0].parent.getChildByName("bg-gray").active=!1,this.catArr[0].parent.getChildByName("bg-green").active=!0),c>=10&&(this.catArr[1].parent.getChildByName("bg-gray").active=!1,this.catArr[1].parent.getChildByName("bg-green").active=!0),c>=n&&(this.catArr[2].parent.getChildByName("bg-gray").active=!1,this.catArr[2].parent.getChildByName("bg-green").active=!0)}}else console.log("monthData \u914d\u7f6e\u8868\u65e0\u6570\u636e")}},e.prototype.createLastMonth=function(t,e,o,n){void 0===o&&(o=!0),void 0===n&&(n=255),e-=1;var a=new Date(t,e,0),i=a.getDate(),r=a.getDay();if(r<7)for(var c=r;c>0;c--){var s=cc.instantiate(this.calendarItem);s.parent=this.content,s.opacity=n,this.dataArray.push(s);var l=i-c,d=t+"-"+(e<10?"0"+e:e)+"-"+(l<10?"0"+l:l),h={day:l,type:p.CALENDARITEM.ITEMLAST,date:d};s.getComponent(u.default).setNodeData(h,this)}},e.prototype.createNowMonth=function(t,e,o,n){void 0===o&&(o=!0),void 0===n&&(n=255);var a=new Date(t,e,0).getDate();d.default.getInstance().isNowMonth(e-1),this.curArray=[];for(var i=function(a){var i=cc.instantiate(r.calendarItem);i.parent=r.content,i.opacity=n,r.dataArray.push(i);var c=!1,s=p.CALENDARITEM.ITEMFUTURE;d.default.getInstance().isNowDay(a)?(r.curArray.push(i),c=!0,s=p.CALENDARITEM.ITEMNOW):d.default.getInstance().isOldDay(a)?(r.curArray.push(i),c=!0,s=p.CALENDARITEM.ITEMOLD):d.default.getInstance().isFutureDay(a)&&(s=p.CALENDARITEM.ITEMFUTURE);var l=t+"-"+(e<10?"0"+e:e)+"-"+(a<10?"0"+a:a),h={day:a,type:s,date:l};i.getComponent(u.default).setNodeData(h,r),o&&c&&i.on(cc.Node.EventType.TOUCH_END,function(){var o=l.split("-");if(console.log(o),o.length>=3){var n=""+o[0]+o[1],r=""+o[0]+o[1]+o[2],c=f.default.getUserData().dailyData;if(c&&c[n]&&c[n][r]&&c[n][r].isWin)return void console.log("\u672c\u5173\u5df2\u5b8c\u6210")}y.default.trackEvent("daily_date",{otherDate:l}),b.default.reportTACommon("daily_date",{}),b.default.reportTACommon("daily_click",{action:"\u5207\u6362\u65e5\u671f"});for(var s=0,h=this.curArray;s11&&(e=11),e<=0&&(e=1),e},e.isUpgradeNum=function(t){return console.log("fail = "+t),10==t||20==t||60==t||100==t||140==t||180==t||260==t||340==t||500==t||800==t},e.todayIsWin=function(){var t=c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate).split("-");if(t.length>=3){var e=""+t[0]+t[1],o=""+t[0]+t[1]+t[2],n=i.default.getUserData().dailyData;if(n&&n[e]&&n[e][o]&&n[e][o].isWin)return 1;if(n&&n[e]&&n[e][o]&&!n[e][o].isWin)return 0}return-1},e.checkExpireData=function(t){-1==e.todayIsWin()&&(i.default.removeItem(t),console.log("\u672c\u5730\u7f13\u5b58\u8fc7\u671f\u6570\u636e ###### cacheName = ",t)),i.default.isPlatform(i.GDPlatform.web)&&i.default.removeItem(t)},e.getTAUserInfo=function(){e.checkExpireData(r.STORAGEKEY.TAUSERINFO);var t=s.default.getInstance().reportProperty,o=t.challenge_count,n=t.cancel_use+t.random_use+t.remove_use,a=t.resurrection_ad_frequency,c=t.resurrection_ad_frequency+t.cancel_ad+t.random_ad+t.remove_ad,l=0;s.default.blacksInfo.blockAllCount>0&&(l=s.default.blacksInfo.blockCurCount/s.default.blacksInfo.blockAllCount);var u=i.default.getItem(r.STORAGEKEY.TAUSERINFO);u||(u={change_num:0,prop_num:0,resurgence_num:0,ad_num:0,block_ratio:l}),u.change_num+=o,u.prop_num+=n,u.resurgence_num+=a,u.ad_num+=c,u.block_ratio=l.toFixed(2),i.default.setItem(r.STORAGEKEY.TAUSERINFO,u),u||(u={});var p="\u6bcf\u65e5\u6311\u6218";return s.default.getInstance().gameType==r.GAMETYPE.GAMEDAILY?p="\u6bcf\u65e5\u6311\u6218":s.default.getInstance().gameType==r.GAMETYPE.GAMETOPIC&&(p="\u8bdd\u9898\u6311\u6218"),u.game_type=p,u},e.getGameLevelData=function(){var t=this.gameLevelCacheName();return e.checkExpireData(t),i.default.getItem(t)},e.setGameLevelData=function(t){var e=this.gameLevelCacheName();i.default.setItem(e,t,30*this.cacheTime)},e.gameLevelCacheName=function(){return s.default.getInstance().gameType==r.GAMETYPE.GAMELEVEL?r.STORAGEKEY.GAMEDAILYLEVELDATA:s.default.getInstance().gameType==r.GAMETYPE.GAMEDAILY?r.STORAGEKEY.GAMEDAILYLEVELDATA:s.default.getInstance().gameType==r.GAMETYPE.GAMETOPIC?r.STORAGEKEY.GAMETOPICLEVELDATA:r.STORAGEKEY.GAMEDAILYLEVELDATA},e.getRankData=function(){return e.checkExpireData(r.STORAGEKEY.RANKDATA),i.default.getItem(r.STORAGEKEY.RANKDATA)},e.setRankData=function(t){i.default.setItem(r.STORAGEKEY.RANKDATA,t,10*this.cacheTime)},e.getBulletData=function(){return e.checkExpireData(r.STORAGEKEY.BULLETDATA),i.default.getItem(r.STORAGEKEY.BULLETDATA)},e.setBulletData=function(t){i.default.setItem(r.STORAGEKEY.BULLETDATA,t,60*this.cacheTime)},e.getStageData=function(){return e.checkExpireData(r.STORAGEKEY.STAGEDATA),i.default.getItem(r.STORAGEKEY.STAGEDATA)},e.setStageData=function(t){i.default.setItem(r.STORAGEKEY.STAGEDATA,t,30*this.cacheTime)},e.getMatchResultData=function(){var t=i.default.getItem(r.STORAGEKEY.TOPICMATCHRECORD);return t&&t[c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate)]?(console.log("\u4eca\u65e5\u5df2\u8c03\u7528\u8d5b\u51b5\u63a5\u53e3 ###### "),!0):(console.log("\u4eca\u65e5\u672a\u8c03\u7528\u8d5b\u51b5\u63a5\u53e3 ###### "),!1)},e.setMatchResultData=function(){var t=c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate),e=i.default.getItem(r.STORAGEKEY.TOPICMATCHRECORD);e||(e={}),e[t]=!0,i.default.setItem(r.STORAGEKEY.TOPICMATCHRECORD,e)},e.getPropData=function(){var t=i.default.getItem(r.STORAGEKEY.PROPGAMEDATA);return t&&c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate)==t.time||(t=this.defaultPropData()),t},e.setPropData=function(t){return t||(t=this.defaultPropData()),i.default.setItem(r.STORAGEKEY.PROPGAMEDATA,t),t},e.defaultPropData=function(){return{time:c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate),daily:{prop_remove:2,prop_cancel:2,prop_random:2},topic:{prop_remove:2,prop_cancel:2,prop_random:2}}},e.user={uid:0,levelNum:0,openId:"",zoneId:1,unionId:"",gender:0,token:"",avatar:"",nickName:"",agreement:!1,deviceId:"",note:"",like_count:0,skinName:"",skinId:101,inviteCode:"",serverName:"",serverId:"",channel:"",userId:""},e.rankUserInfo=null,e.region=null,e.cacheTime=60,e.topicModel=null,e.topicRankInfo=null,e.bulletsWin=[{content:"\u7ec8\u4e8e\u6392\u4e0a\u4e86",mid:1,type:0},{content:"\u8f7b\u677e\u901a\u8fc7~",mid:2,type:0},{content:"\u4eca\u5929\u592a\u7b80\u5355",mid:3,type:0},{content:"\u7f8a\u4e86\u4e2a\u7f8a",mid:4,type:0},{content:"\u96c4\u8d77\uff01",mid:5,type:1},{content:"\u52a0\u6cb9\uff01",mid:6,type:1},{content:"yyds",mid:7,type:1},{content:"666",mid:8,type:1},{content:"\u51b2\u9e2d",mid:9,type:1},{content:"\u51b2\u51b2\u51b2",mid:10,type:1},{content:"\u5389\u5bb3\u4e86",mid:11,type:1}],e.bulletsFail=[{content:"\u96c4\u8d77\uff01",mid:12,type:1},{content:"\u52a0\u6cb9\uff01",mid:13,type:1},{content:"yyds",mid:14,type:1},{content:"666",mid:15,type:1},{content:"\u51b2\u9e2d",mid:16,type:1},{content:"\u51b2\u51b2\u51b2",mid:17,type:1},{content:"\u5389\u5bb3\u4e86",mid:18,type:1},{content:"\u8fc7\u4e0d\u53bb\u554a\uff01",mid:19,type:0},{content:"\u4eca\u5929\u592a\u96be\u4e86",mid:20,type:0},{content:"\u96be\u54ed\u4e86",mid:21,type:0},{content:"\u8bd5\u4e86 {0} \u6b21\u4e86",mid:22,type:2}],e}(cc.Component);o.default=l,cc._RF.pop()},{"../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","./DateManager":"DateManager","./GameManager":"GameManager"}],"data-type":[function(t,e,o){"use strict";cc._RF.push(e,"8cbe9Sgf2lHObO7pL4MBQTS","data-type"),Object.defineProperty(o,"__esModule",{value:!0}),o.ENV=void 0,function(t){t.local="local",t.beta="beta",t.online="online",t.onlineWx="onlineWx",t.leiTing="leiTing",t.onlineOppo="onlineOppo",t.onlineVivo="onlineVivo"}(o.ENV||(o.ENV={})),cc._RF.pop()},{}],dataModel:[function(t,e,o){"use strict";cc._RF.push(e,"f787b1iWeJMv6XB6Y+Z4lEb","dataModel"),Object.defineProperty(o,"__esModule",{value:!0}),cc._RF.pop()},{}],dataTs:[function(t,e,o){"use strict";cc._RF.push(e,"2b52b5mP0hOv4ijR3rDmmai","dataTs"),Object.defineProperty(o,"__esModule",{value:!0}),o.GDPlatform=void 0;var n,a=t("../manager/GameManager"),i=t("../manager/report-common"),r=t("./CcJsFunc"),c=t("./enumConfig"),s=t("./native/native-bridge"),l=t("./native/native-def"),u=t("./sdk");(function(t){t[t.android=0]="android",t[t.ios=1]="ios",t[t.wx=2]="wx",t[t.tt=3]="tt",t[t.web=4]="web",t[t.oppo=5]="oppo",t[t.vivo=6]="vivo"})(n=o.GDPlatform||(o.GDPlatform={}));var p=function(){function t(){}return t.GetVedioID=function(){return u.default.isPlatform(u.Platform.wx)?this.WXVedioID:u.default.isPlatform(u.Platform.tt)?this.TTVedioID:u.default.isPlatform(u.Platform.android)?this.AndroidVedioID:u.default.isPlatform(u.Platform.oppo)?this.OppoVedioID:u.default.isPlatform(u.Platform.vivo)?this.VivoVedioID:""},t.getGameConfigData=function(){return this.gameConfigData},t.initData=function(e){var o=this,n=this;if(cc.sys.localStorage.getItem(this.localKeyName))r=this.getUserData(),console.log("[PUSH] \u7528\u6237\u6570\u636e ###### ",JSON.stringify(r));else{this.registerUserData();var a=this.getUserData().userID;if(s.default.callNative(l.NativeFun.publicParamsInfo,{userId:a}),i.default.reportTACommon("register",{}),s.default.deviceInfo){console.log("AF af_register\u6253\u70b9");var r=t.getUserData(),c={androidid:s.default.deviceInfo.androidId,chennal:"310001",gameCode:"59",userId:r.userID,type:3};s.default.leitingReport("af_register",c),console.log("AF af_character\u6253\u70b9");var u={androidid:s.default.deviceInfo.androidId,chennal:"310001",gameCode:"59",userId:r.userID,type:3,roleId:s.default.deviceInfo.gaid,serviceName:"\u6d77\u5916\u6d4b\u8bd5\u670d",serviceId:"1"};s.default.leitingReport("af_character",u)}}var p=2;this.loadJsonData("data/levelConfigData",function(t){o.gameConfigData.levelConfigData=t,0==--p&&(e(),n.adaptCacheData())}),this.loadJsonData("data/baseConfigData",function(t){o.gameConfigData.baseConfigData=t,0==--p&&(e(),n.adaptCacheData())})},t.registerUserData=function(){if(!cc.sys.localStorage.getItem(this.localKeyName)){this.gameUserLocalData=this.registerData,u.default.isPlatform(u.Platform.android)?s.default.loginInfo&&s.default.loginInfo.userId?this.gameUserLocalData.userData.userID=s.default.loginInfo.userId:this.gameUserLocalData.userData.userID=r.default.randomCharNum():u.default.isPlatform(u.Platform.tt)?this.gameUserLocalData.userData.userID="":u.default.isPlatform(u.Platform.wx)?this.gameUserLocalData.userData.userID="":u.default.isPlatform(u.Platform.web)?(this.gameUserLocalData.userData.userID="100001",this.gameUserLocalData.userData.token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTAwMjA0MDIsIm5iZiI6MTY1ODkxODIwMiwiaWF0IjoxNjU4OTE2NDAyLCJqdGkiOiJDTTpjYXRfbWF0Y2g6bHQxMjM0NTYiLCJvcGVuX2lkIjoiIiwidWlkIjoxMDAwMDEsImRlYnVnIjoiIiwibGFuZyI6IiJ9.NQZAWBLYtq6hBff9YjNcaI2Soa6Z5vwbIU7YnjP1KBQ"):u.default.isPlatform(u.Platform.oppo)?this.gameUserLocalData.userData.userID="":u.default.isPlatform(u.Platform.vivo)?this.gameUserLocalData.userData.userID="":this.gameUserLocalData.userData.userID=r.default.randomCharNum(),this.gameUserLocalData.userData.registerTime=Date.now()+"";var t=JSON.stringify(this.gameUserLocalData);cc.sys.localStorage.setItem(this.localKeyName,t),console.log("[PUSH] \u6ce8\u518c\u7528\u6237 ###### "+t),a.default.getInstance().register=!0}},t.removeUserData=function(){cc.sys.localStorage.getItem(this.localKeyName)&&(cc.sys.localStorage.clear(),console.log("\u79fb\u9664\u672c\u5730\u7f13\u5b58 ### "))},t.isLogin=function(){var e=t.getUserData().userID,o=t.getUserData().token;return!!(e&&e.length&&o&&o.length)},t.adaptCacheData=function(){console.log("\u9002\u914d\u8001\u7528\u6237\u6570\u636e ###### ");var e=this.getUserData(),o=t.getSprintRewardData();console.log("sprintRewardData ### ",JSON.stringify(o)),1==o.isGameEd&&t.resetSprintReward(o);var n=e.unlockHouseUserData;for(var a in n)for(var i in n[a]){var r=n[a][i];if(!r.fish){var c=this.gameConfigData.baseConfigData.unlockHouseDataArray;if(c)for(var s in c)for(var l in c[s]){var u=c[s][l];if(r.unlockID==u.unlockID){r.fish=u.fish;break}}}}this.saveUserData(e),this.removeOldCacheData(e)},t.removeOldCacheData=function(t){t||(t=this.getUserData()),t.userID&&""!=t.userID&&"1"!=t.userID||(this.removeUserData(),this.registerUserData())},t.saveUserData=function(t){this.gameUserLocalData.userData=t;var e=JSON.stringify(this.gameUserLocalData);cc.sys.localStorage.setItem(this.localKeyName,e)},t.getUserData=function(){var t=cc.sys.localStorage.getItem(this.localKeyName);return this.gameUserLocalData=JSON.parse(t),this.gameUserLocalData.userData},t.getPictureData=function(){var t=cc.sys.localStorage.getItem(this.localKeyName);return this.gameUserLocalData=JSON.parse(t),this.gameUserLocalData.pictureData},t.savePictureData=function(t){this.gameUserLocalData.pictureData=t;var e=JSON.stringify(this.gameUserLocalData);cc.sys.localStorage.setItem(this.localKeyName,e)},t.getUserSetupData=function(){var t=cc.sys.localStorage.getItem(this.localKeyName);return this.gameUserLocalData=JSON.parse(t),this.gameUserLocalData.setUpData},t.saveUserSetupData=function(t){this.gameUserLocalData.setUpData=t;var e=JSON.stringify(this.gameUserLocalData);cc.sys.localStorage.setItem(this.localKeyName,e)},t.updateFirendCount=function(t){console.log("count = ",t);var e={moonCount:t};u.default.rankScoreUpdate(c.ShownType.friendRank,JSON.stringify(e),c.RefreshType.add)},t.updateTodayCount=function(t,e){var o={moonCount:t,state:e};console.log("rankData = ",o),u.default.rankScoreUpdate(c.ShownType.todayRank,JSON.stringify(o),c.RefreshType.add)},t.getDailyWinCount=function(){var e=t.getUserData();if(e.dailyData){var o=0;for(var n in e.dailyData)for(var a in e.dailyData[n])e.dailyData[n][a]&&e.dailyData[n][a].isWin&&o++;return o}return 0},t.getDailyData=function(e,o){var n=t.getUserData();if(n.dailyData[e])return n.dailyData[e][o]},t.saveDailyData=function(e,o,n){var a=t.getUserData();a.dailyData[e]?a.dailyData[e][o]=n:(a.dailyData[e]={},a.dailyData[e][o]=n),t.saveUserData(a)},t.gameLevelWin=function(t,e){e||(console.log("\u83b7\u53d6\u521a\u5b8c\u6210\u5173\u5361\u7684\u5956\u52b1\u6570\u636e, \u968f\u673a\u83b7\u53d6\u586b\u5145 ###"),e=this.getRewardBoxData(this.gameUserLocalData.userData.playLevelId)),console.log("winRewardObj ### ",JSON.stringify(e));var o=Number(e.everLevelRewardObj.coin),n=Number(e.everLevelRewardObj.fish);a.default.getInstance().gameType==c.GAMETYPE.GAMELEVEL?(o=Number(o),n=Number(n),this.gameUserLocalData.userData.playLevelId++):a.default.getInstance().gameType==c.GAMETYPE.GAMEDAILY&&(o=2*Number(o),n=2*Number(n)),this.gameUserLocalData.userData.coin+=o,this.gameUserLocalData.userData.fish+=n;var r=this.gameUserLocalData.userData.coin,s=o;if(i.default.reportTACommon("coin_get",{item_id:0,item_name:"\u91d1\u5e01",change_num:s,num_before:r-s,num_after:r,action:"\u5173\u5361\u80dc\u5229\u5956\u52b1",reason:"\u5173\u5361\u80dc\u5229\u83b7\u5f97\u91d1\u5e01",gold_num:r}),a.default.getInstance().moneyDict.coin=o+=Number(a.default.getInstance().moneyDict.coin),a.default.getInstance().moneyDict.fish=n+=Number(a.default.getInstance().moneyDict.fish),console.log("moneyDict = "+JSON.stringify(a.default.getInstance().moneyDict)),e.levelNewNum==e.levelNumMax){console.log("\u6dfb\u52a0\u5b9d\u7bb1\u5956\u52b1");for(var l=0;l=5&&(o.fish-=5,i[r].clothRank+=1,this.saveUserData(o),!0)}else console.log("\u6682\u65e0\u89e3\u9501\u732b")},t.updateCatData=function(){var e=this.gameConfigData.baseConfigData.catClothesData,o=this.gameUserLocalData.userData.playLevelId;for(var n in e)for(var a in e[n])if("level"==e[n][a].unlockType&&o>e[n][a].unlockNum){var i=this.gameUserLocalData.userData.catClothesData,r=!1;for(var c in i[n])i[n][c].clothesID==e[n][a].clothesID&&(r=!0);if(!r){var s={clothesID:e[n][a].clothesID,clothRank:1,isWear:!1};i[n].push(s),t.saveUserData(this.gameUserLocalData.userData)}}},t.updateLoveTime=function(){if(0==this.gameUserLocalData.userData.loveGetTime)return 0;var t=this.gameConfigData.baseConfigData.loveNumMax,e=this.gameUserLocalData.userData.loveGetTime,o=6e4*this.gameConfigData.baseConfigData.getLoveTime,n=Number(Date.now())-e,a=Math.floor(n/o),i=0;return a>=1?(this.gameUserLocalData.userData.love+=a,this.gameUserLocalData.userData.love>=t?(this.gameUserLocalData.userData.love=t,this.gameUserLocalData.userData.loveGetTime=0):(this.gameUserLocalData.userData.loveGetTime+=a*o,i=o-(n-a*o)),this.saveUserData(this.gameUserLocalData.userData)):i=o-(n-a*o),i},t.addLoveToMax=function(){var t=this.gameConfigData.baseConfigData.loveNumMax;this.gameUserLocalData.userData.love=e&&(this.gameUserLocalData.userData.loveGetTime=0),this.gameUserLocalData.userData.love>=5&&(this.gameUserLocalData.userData.love=5),this.saveUserData(this.gameUserLocalData.userData)},t.subLoveCount=function(t){if(this.gameUserLocalData.userData.love(o=a.default.getInstance().gameType==c.GAMETYPE.GAMELEVEL?r.dailyLevel:a.default.getInstance().gameType==c.GAMETYPE.GAMEDAILY?r.dailyLevel:a.default.getInstance().gameType==c.GAMETYPE.GAMETOPIC?r.topicLevel:r.dailyLevel).length)return console.log("\u6ca1\u6709\u5173\u5361"),void e(i);var s=o[t-1];console.log("modelLevelIdArray => ",s);for(var l=s.length,u=0,p=0;p=l){for(var o=0;o=c&&(o.bgNum=c),o.brickNum>=s&&(o.brickNum=s),this.savePictureData(o),a.default.getInstance().collectionMark.tabbarCollection=!0,Number(n.wallpaper)>0&&(a.default.getInstance().collectionMark.bgNum=o.bgNum),Number(n.brick)>0&&(a.default.getInstance().collectionMark.brickNum=o.brickNum)}return n},t.getCollectionUnlockData=function(){for(var t=this.getUserData().playLevelId-1,e=this.gameConfigData.baseConfigData.rewardCollection,o={buildNewNum:1,buildNumMax:10,buildObj:null},n=null,a=0,i=0;ia[i]&&(e.levelNewNum=t-a[i],e.levelNumMax=a[i+1]-a[i]);return e},t.getClothesData=function(e,o){for(var n=t.getGameConfigData().baseConfigData.catClothesData["cat_"+e],a=0;a=1?(console.log("\u91cd\u7f6e\u5012\u8ba1\u65f6 = "+i),t.pastTime=Date.now(),this.resetSprintReward(t),a.default.getInstance().sprintMark=!1,cc.game.emit(c.EMITKEY.MAINUPDATEUI)):r=o-(n-i*o),r},t.resetSprintReward=function(t){a.default.getInstance().gameType==c.GAMETYPE.GAMELEVEL&&(t?console.log("\u6d3b\u52a8\u7ed3\u675f\u4e2d\u65ad\u8fde\u80dc ######"):(t=this.getSprintRewardData(),console.log("\u666e\u901a\u73a9\u6cd5\u4e2d\u65ad\u8fde\u80dc ######")),t.winNum=0,t.winBox=0,t.rewardProgress=0,t.isGameEd=0,this.setSprintRewardData(t))},t.getCookieRewardData=function(){if(cc.sys.localStorage.getItem(c.STORAGEKEY.COOKIECOLLECTIONKEY)){var t=cc.sys.localStorage.getItem(c.STORAGEKEY.COOKIECOLLECTIONKEY);return JSON.parse(t)}var e={cookieNum:0,pastTime:Date.now(),progress:0},o=JSON.stringify(e);return cc.sys.localStorage.setItem(c.STORAGEKEY.COOKIECOLLECTIONKEY,o),e},t.setCookieRewardData=function(t){var e=JSON.stringify(t);cc.sys.localStorage.setItem(c.STORAGEKEY.COOKIECOLLECTIONKEY,e)},t.updateCookieRewardTime=function(){var t=this.getCookieRewardData(),e=t.pastTime,o=1e3*this.gameConfigData.baseConfigData.cookieRewardTime,n=Number(Date.now())-e,a=Math.floor(n/o),i=0;return a>=1?(console.log("\u91cd\u7f6e\u5012\u8ba1\u65f6 = "+a),t.pastTime=Date.now(),t.cookieNum=0,t.progress=0,this.setCookieRewardData(t),cc.game.emit(c.EMITKEY.MAINUPDATEUI)):i=o-(n-a*o),i},t.setItem=function(t,e,o){(!o||o<=0)&&(o=-1);var n={data:e,time:Date.now(),expire:1e3*o},a=JSON.stringify(n);cc.sys.localStorage.setItem(t,a)},t.getItem=function(t){var e=cc.sys.localStorage.getItem(t);if(e){var o=JSON.parse(e);if(o&&o.time&&o.expire){if(!(o.expire>0&&Date.now()>o.time+o.expire))return o.data;localStorage.removeItem(t)}}},t.removeItem=function(t){cc.sys.localStorage.removeItem(t)},t.getSheepClothesData=function(){var e=cc.sys.localStorage.getItem(c.STORAGEKEY.SHEEPCLOTHESDATA),o=t.gameConfigData.baseConfigData;if(!e)return o&&o.sheepClothesData&&this.setSheepClothesData(o.sheepClothesData),console.log("\u672c\u5730\u6ca1\u6709\u7f8a\u76ae\u80a4\u6570\u636e\uff0c\u8fdb\u884c\u7f13\u5b58 ###### "),o.sheepClothesData;var n=JSON.parse(e);if(o.sheepClothesData.length>n.length)for(var a=0;a=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../game/chessboard"),c=t("../game/crushArea"),s=t("../game/moveOutArea"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.chessboard=null,e.crushArea=null,e.moveOutArea=null,e.uiLayer=null,e.levelDataArray=null,e.gameIsWin=!1,e.popCallbackCollect=null,e.userData=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.initLevelLayer=function(t){this.levelDataArray=t;var e=t[0];this.gameIsWin=!1,this.chessboard.getComponent(r.default).init(e,this),this.crushArea.getComponent(c.default).initCrushArea(this),this.moveOutArea.getComponent(s.default).initMoveOutArea(this),this.node.active=!0,this.popCallbackCollect={continueCallBack:this.playNextLevel.bind(this),returnMainCallBack:this.showMainLayer.bind(this),rebornGameCallBack:this.rebornGameFunc.bind(this),giveUpCallBack:this.giveUpFunc.bind(this),restartCallBack:this.restartNowLevel.bind(this)}},e.prototype.hideLayer=function(){this.node.active=!1},e.prototype.playNextLevel=function(){},e.prototype.restartNowLevel=function(){},e.prototype.showSetUpLayer=function(){},e.prototype.showMainLayer=function(){},e.prototype.gameWinFunc=function(){},e.prototype.gameOverFunc=function(){console.log("\u6e38\u620f\u5931\u8d25",this.levelDataArray);var t={popName:"failPop",showPopData:{popCallbackCollect:this.popCallbackCollect}};cc.game.emit("showPop",t)},e.prototype.giveUpFunc=function(){cc.game.emit("closeAllPop")},e.prototype.rebornGameFunc=function(){console.log("\u8fd9\u91cc\u6709\u4e2a\u770b\u89c6\u9891"),cc.game.emit("closeAllPop"),this.crushArea.getComponent(c.default).rebornGameFunc()},e.prototype.crushBlockNode=function(t){this.crushArea.getComponent("crushArea").addCrushAreaCardNode(t);var e=this.chessboard.getComponent(r.default).checkGameWin(),o=this.moveOutArea.getComponent(s.default).checkGameWin();e&&o&&(console.log("\u6e38\u620f\u80dc\u5229\uff01"),this.gameIsWin=!0)},e.prototype.crushAnimateCallback=function(){this.gameIsWin&&this.gameWinFunc()},i([p(cc.Node)],e.prototype,"mainLayer",void 0),i([p(cc.Node)],e.prototype,"chessboard",void 0),i([p(cc.Node)],e.prototype,"crushArea",void 0),i([p(cc.Node)],e.prototype,"moveOutArea",void 0),i([p(cc.Node)],e.prototype,"uiLayer",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../game/chessboard":"chessboard","../game/crushArea":"crushArea","../game/moveOutArea":"moveOutArea"}],editorGameUiLayer:[function(t,e,o){"use strict";cc._RF.push(e,"74ee14/EMlALpPmiwWxivjL","editorGameUiLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../game/chessboard"),s=t("../game/crushArea"),l=t("./editorGameLayer"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.removeBtn=null,e.cancelBtn=null,e.randomBtn=null,e.setUpBtn=null,e.moveOutArea=null,e.chessboardNode=null,e.crushArea=null,e.paddingHeight=70,e.userData=null,e.isMoving=!1,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchStartScale(this.removeBtn),r.default.addbtnTouchEndScale(this.removeBtn,this.removeEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.removeBtn),r.default.addbtnTouchStartScale(this.cancelBtn),r.default.addbtnTouchEndScale(this.cancelBtn,this.cancelEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.cancelBtn),r.default.addbtnTouchStartScale(this.randomBtn),r.default.addbtnTouchEndScale(this.randomBtn,this.randomEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.randomBtn),r.default.addbtnTouchStartScale(this.setUpBtn),r.default.addbtnTouchEndScale(this.setUpBtn,this.setUpEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.setUpBtn)},e.prototype.initGameUi=function(){this.isMoving=!1;var t=this.removeBtn.height+this.paddingHeight,e=-(cc.winSize.height/2+this.removeBtn.height/2);this.removeBtn.y=e,this.cancelBtn.y=e,this.randomBtn.y=e,cc.tween(this.removeBtn).by(.4,{y:t}).start(),cc.tween(this.cancelBtn).by(.4,{y:t}).start(),cc.tween(this.randomBtn).by(.4,{y:t}).start()},e.prototype.removeGameUiBtn=function(){var t=this;this.isMoving=!0,this.removeBtn.height,this.paddingHeight;var e=-(cc.winSize.height/2+this.removeBtn.height/2);cc.tween(this.removeBtn).to(.4,{y:e}).start(),cc.tween(this.cancelBtn).to(.4,{y:e}).start(),cc.tween(this.randomBtn).to(.4,{y:e}).call(function(){t.isMoving=!1},this).start()},e.prototype.setUpEndFunc=function(){this.node.parent.getComponent(l.default).hideLayer()},e.prototype.removeEndFunc=function(){this.crushArea.getComponent(s.default).moveOutBlock()},e.prototype.cancelEndFunc=function(){this.crushArea.getComponent(s.default).cancelOneStep()},e.prototype.randomEndFunc=function(){this.chessboardNode.getComponent(c.default).updateBlockArea()},i([d(cc.Node)],e.prototype,"removeBtn",void 0),i([d(cc.Node)],e.prototype,"cancelBtn",void 0),i([d(cc.Node)],e.prototype,"randomBtn",void 0),i([d(cc.Node)],e.prototype,"setUpBtn",void 0),i([d(cc.Node)],e.prototype,"moveOutArea",void 0),i([d(cc.Node)],e.prototype,"chessboardNode",void 0),i([d(cc.Node)],e.prototype,"crushArea",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../game/chessboard":"chessboard","../game/crushArea":"crushArea","./editorGameLayer":"editorGameLayer"}],editorPopCommon:[function(t,e,o){"use strict";cc._RF.push(e,"ff5d494wMpLzo5RKnYVG0uZ","editorPopCommon");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=(r.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.start=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.starFunc,this),this.node.on(cc.Node.EventType.TOUCH_END,this.endFunc,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.moveFunc,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.cancelFunc,this),this.node.on(cc.Node.EventType.MOUSE_DOWN,this.mouseDown,this),this.node.on(cc.Node.EventType.MOUSE_ENTER,this.mouseEnter,this),this.node.on(cc.Node.EventType.MOUSE_MOVE,this.mouseMove,this),this.node.on(cc.Node.EventType.MOUSE_LEAVE,this.mouseLeave,this)},e.prototype.starFunc=function(t){t.stopPropagation()},e.prototype.endFunc=function(t){t.stopPropagation()},e.prototype.moveFunc=function(t){t.stopPropagation()},e.prototype.cancelFunc=function(t){t.stopPropagation()},e.prototype.mouseDown=function(t){t.stopPropagation()},e.prototype.mouseEnter=function(t){t.stopPropagation()},e.prototype.mouseMove=function(t){t.stopPropagation()},e.prototype.mouseLeave=function(t){t.stopPropagation()},i([c],e)}(cc.Component));o.default=s,cc._RF.pop()},{}],editorTips:[function(t,e,o){"use strict";cc._RF.push(e,"fd10fv9y+ZEtaYplTuo+/L4","editorTips");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tipsLabel=null,e}return a(e,t),e.prototype.start=function(){cc.game.on("showTips",this.showTips,this)},e.prototype.showTips=function(t){this.tipsLabel.node.active=!0,this.tipsLabel.string=t+"",cc.tween(this.tipsLabel.node).delay(1.5).call(function(){this.tipsLabel.node.active=!1},this).start()},i([s(cc.Label)],e.prototype,"tipsLabel",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],enumConfig:[function(t,e,o){"use strict";cc._RF.push(e,"4c6b3ttKLVHnrBFJtUOvdja","enumConfig"),Object.defineProperty(o,"__esModule",{value:!0}),o.RefreshType=o.ShownType=o.MODULETYPE=o.LangEnum=o.STORAGEKEY=o.EMITKEY=o.GAMEBLOCK=o.GAMEOVER=o.WEEK=o.CALENDAR=o.DAYTYPE=o.CALENDARNAMES=o.CALENDARITEM=o.ROOMTYPE=o.MAINPAGE=o.GAMETYPE=o.GAMEENV=void 0,function(t){t[t.ENVDEVELOP=1]="ENVDEVELOP",t[t.ENVTRAIL=2]="ENVTRAIL",t[t.ENVRELEASE=3]="ENVRELEASE"}(o.GAMEENV||(o.GAMEENV={})),function(t){t[t.GAMEMAIN=0]="GAMEMAIN",t[t.GAMETOMB=1]="GAMETOMB",t[t.GAMELEVEL=2]="GAMELEVEL",t[t.GAMEDAILY=3]="GAMEDAILY",t[t.GAMETOPIC=4]="GAMETOPIC"}(o.GAMETYPE||(o.GAMETYPE={})),function(t){t[t.PAGERANK=0]="PAGERANK",t[t.PAGEHOUSE=1]="PAGEHOUSE",t[t.PAGEMAIN=2]="PAGEMAIN",t[t.PAGEDAILY=3]="PAGEDAILY",t[t.PAGECOLLECT=4]="PAGECOLLECT"}(o.MAINPAGE||(o.MAINPAGE={})),function(t){t[t.ROOMONE=1]="ROOMONE",t[t.ROOMTWO=2]="ROOMTWO",t[t.ROOMTHREE=3]="ROOMTHREE"}(o.ROOMTYPE||(o.ROOMTYPE={})),function(t){t[t.ITEMLAST=1]="ITEMLAST",t[t.ITEMOLD=2]="ITEMOLD",t[t.ITEMNOW=3]="ITEMNOW",t[t.ITEMFUTURE=4]="ITEMFUTURE",t[t.ITEMNEXT=5]="ITEMNEXT",t[t.ITEMNOR=6]="ITEMNOR",t[t.ITEMSELE=7]="ITEMSELE",t[t.ITEMSUC=8]="ITEMSUC"}(o.CALENDARITEM||(o.CALENDARITEM={})),o.CALENDARNAMES=["yyyy\u5e74","yyyy\u5e74mm\u6708","yyyy\u5e74mm\u6708dd\u65e5","m-d","yyyy-m-d","yyyymm","yyyymmdd","yyyy-mm-dd","yyyy-mm-dd hh:mm:ss","hh:mm:ss"],function(t){t[t.TODAY=0]="TODAY",t[t.YESTERDAY=1]="YESTERDAY",t[t.TOMORROW=2]="TOMORROW",t[t.NONE=3]="NONE"}(o.DAYTYPE||(o.DAYTYPE={})),function(t){t[t.YEAR=0]="YEAR",t[t.MONTH=1]="MONTH",t[t.DAY=2]="DAY",t[t.WEEK=3]="WEEK"}(o.CALENDAR||(o.CALENDAR={})),function(t){t[t.SUN=0]="SUN",t[t.MON=1]="MON",t[t.TUE=2]="TUE",t[t.WED=3]="WED",t[t.THU=4]="THU",t[t.FEI=5]="FEI",t[t.SAT=6]="SAT"}(o.WEEK||(o.WEEK={})),function(t){t[t.NONE=0]="NONE",t[t.LEVELWIN=1]="LEVELWIN",t[t.LEVELFAIL=2]="LEVELFAIL",t[t.DAILYWIN=3]="DAILYWIN",t[t.DAILYFAIL=4]="DAILYFAIL"}(o.GAMEOVER||(o.GAMEOVER={})),function(t){t[t.NONE=0]="NONE",t[t.BLOCKCOOKIE=1]="BLOCKCOOKIE",t[t.BLOCKGOLD=2]="BLOCKGOLD"}(o.GAMEBLOCK||(o.GAMEBLOCK={})),function(t){t.MAINUPDATEUI="MAINUPDATEUI",t.UPDATETABBARRECEIVE="UPDATETABBARRECEIVE",t.UPDATETABBARSEND="UPDATETABBARSEND",t.SHOWMASKLAYER="SHOWMASKLAYER",t.HIDEMASKLAYER="HIDEMASKLAYER",t.UPDATEPICTURE="UPDATEPICTURE",t.SHOWMAINTIPS="showMainTips",t.SHOWTRANSITLAYER="showTransitLayer",t.RESTARTNOWLEVEL="restartNowLevel",t.SHOWMAINLAYER="showMainLayer",t.SHOWPOP="showPop",t.CLOSEALLPOP="closeAllPop",t.UPDATEPOPDATA="UPDATEPOPDATA",t.TTSTARTRECORD="TTSTARTRECORD",t.TTSTOPRECORD="TTSTOPRECORD",t.TTSHARERECORD="TTSHARERECORD",t.UPDATERANKDATA="UPDATERANKDATA",t.SHOWUSERNODE="SHOWUSERNODE",t.USERINFOSUCCESS="USERINFOSUCCESS",t.RANKUSERINFOSUCCESS="RANKUSERINFOSUCCESS",t.BULLETSEND="BULLETSEND",t.BULLETSTATE="BULLETSTATE",t.GAMEOVERRESTART="GAMEOVERRESTART",t.GAMEOVERSUCCESS="GAMEOVERSUCCESS",t.BEGINGAME="BEGINGAME",t.SHOWMODULE="SHOWMODULE",t.TOPICACCOUNT="TOPICACCOUNT",t.TOPICRANKINFO="TOPICRANKINFO",t.TOPICPOSITION="TOPICPOSITION",t.CHANGESHEEPCLOTHES="CHANGESHEEPCLOTHES"}(o.EMITKEY||(o.EMITKEY={})),function(t){t.GAMEUSERLOCALDATA="gameUserLocalData",t.SPRINTREWARDKEY="SPRINTREWARDKEY",t.COOKIECOLLECTIONKEY="COOKIECOLLECTIONKEY",t.BULLETSWITCH="BULLETSWITCH",t.TAUSERINFO="TAUSERINFO",t.RANKDATA="RANKDATA",t.BULLETDATA="BULLETDATA",t.STAGEDATA="STAGEDATA",t.GAMEDAILYLEVELDATA="GAMEDAILYLEVELDATA",t.GAMETOPICLEVELDATA="GAMETOPICLEVELDATA",t.SHEEPCLOTHESDATA="SHEEPCLOTHESDATA",t.TOPICMATCHRECORD="TOPICMATCHRECORD",t.PROPGAMEDATA="PROPGAMEDATA",t.GAMELOADING="GAMELOADING"}(o.STORAGEKEY||(o.STORAGEKEY={})),function(t){t.zhCN="zh",t.enUS="en"}(o.LangEnum||(o.LangEnum={})),function(t){t[t.COMMON=0]="COMMON",t[t.TOPIC=1]="TOPIC"}(o.MODULETYPE||(o.MODULETYPE={})),function(t){t.friendRank="friendRank",t.todayRank="todayRank"}(o.ShownType||(o.ShownType={})),(o.RefreshType||(o.RefreshType={})).add="add",cc._RF.pop()},{}],"export-helper":[function(t,e,o){"use strict";cc._RF.push(e,"c00e4AjhHVJqoY4uheCWzQM","export-helper"),Object.defineProperty(o,"__esModule",{value:!0}),o.math=void 0;var n=cc.EPSILON,a=function(){function t(){}return t.approx=function(t,e,o){return o=o||n,Math.abs(t-e)<=o},t.lerp=function(t,e,o){return t+(e-t)*o},t.equals=function(t,e){return Math.abs(t-e)<=n*Math.max(1,Math.abs(t),Math.abs(e))},t}();o.math=a,cc._RF.pop()},{}],export:[function(t,e){"use strict";cc._RF.push(e,"aff89des1lECqfQBjTG1TrU","export"),cc._RF.pop()},{}],failPop:[function(t,e,o){"use strict";cc._RF.push(e,"015c33YCudGR46pDyw1Hejz","failPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/native/share"),d=t("../common/native/tt-sdk"),h=t("../common/sdk"),f=t("../common/spine"),m=t("../manager/GameManager"),g=t("../manager/report-common"),y=t("../../script/manager/data-manager"),v=t("../utils/uma/uma-sdk"),b=t("../api/api-sheep"),_=cc._decorator,N=_.ccclass,C=_.property,w=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.fainNode=null,e.descLabel=null,e.failNumLabel=null,e.restartNode=null,e.backNode=null,e.tombNode=null,e.tombBubble=null,e.tombDesc=null,e.tombParticle=null,e.rankNode=null,e.rankPreLabel=null,e.rankNumLabel=null,e.rankLastLabel=null,e.shareNode=null,e.shareBtn=null,e.noShareBtn=null,e.shareCloseBtn=null,e.bottomShareBtn=null,e.rebornGameCallBack=null,e.giveUpCallBack=null,e.failNodeNum=400,e.popCallbackCollect=null,e.userData=null,e.showPopData=null,e.rankUserData=null,e.type=0,e}return a(e,t),e.prototype.start=function(){cc.game.on(u.EMITKEY.GAMEOVERSUCCESS,this.requestUserData.bind(this)),this.popCallbackCollect={buyCallBack:this.buyCallBackFunc.bind(this),freeCallBack:this.freeCallBackFunc.bind(this),exitCallBack:this.exitCallBackFunc.bind(this)},s.default.addTargetTouchUpInside(this.restartNode,this.restartNodeFunc.bind(this)),s.default.addTargetTouchUpInside(this.backNode,this.backNodeFunc.bind(this)),s.default.addbtnTouchStartScale(this.shareBtn),s.default.addbtnTouchEndScale(this.shareBtn,this.shareBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.shareBtn),s.default.addbtnTouchStartScale(this.noShareBtn),s.default.addbtnTouchEndScale(this.noShareBtn,this.noShareBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.noShareBtn),s.default.addbtnTouchStartScale(this.shareCloseBtn),s.default.addbtnTouchEndScale(this.shareCloseBtn,this.shareCloseBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.shareCloseBtn),s.default.addTargetTouchUpInside(this.bottomShareBtn,this.bottomShareBtnFunc.bind(this))},e.prototype.restartNodeFunc=function(){cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL)},e.prototype.backNodeFunc=function(){cc.game.emit(u.EMITKEY.SHOWMAINLAYER)},e.prototype.bottomShareBtnFunc=function(){this.shareNode.active=!0,this.shareNode.stopAllActions(),cc.tween(this.shareNode).set({scale:0,opacity:0}).delay(1).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start()},e.prototype.shareBtnFunc=function(){var t=this;l.default.isPlatform(l.GDPlatform.tt)?d.default.shareTemplate(function(e){e&&(t.shareNode.active=!1,t.showButton())}):l.default.isPlatform(l.GDPlatform.wx)?p.default.shareMethod({success:function(){},fail:function(){},complete:function(){}}):this.node.active=!1},e.prototype.noShareBtnFunc=function(){this.shareNode.active=!1,this.showButton()},e.prototype.shareCloseBtnFunc=function(){this.shareNode.active=!1,this.showButton()},e.prototype.showFailPop=function(t){this.node.active=!0,this.showPopData=t,t.popCallbackCollect&&(this.rebornGameCallBack=t.popCallbackCollect.rebornGameCallBack,this.giveUpCallBack=t.popCallbackCollect.giveUpCallBack),this.restartNode.active=!1,this.backNode.active=!1,this.tombNode.active=!1,this.rankNode.active=!1,this.tombParticle.active=!1,this.shareNode.active=!1,this.bottomShareBtn.active=!1;var e=t.failType;this.failNumLabel.string="",console.log("failType = "+e),1==e?console.log("\u590d\u6d3b ###### "):2==e&&console.log("\u91cd\u65b0\u6311\u6218 ###### "),this.playShowAnimate()},e.prototype.requestUserData=function(){var t=this;if(this.failNumLabel.string="",m.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY)b.default.getUserRankInfo(function(e){if(0==e.err_code&&e.data&&e.data.user){t.rankUserData=e.data.user;var o=e.data.user.fail;o&&0!=o||(o=1),t.failNumLabel.string="\u4eca\u65e5\u5df2\u6311\u6218 "+o+" \u6b21"}});else if(m.default.getInstance().gameType==u.GAMETYPE.GAMETOPIC){var e=l.default.getUserData().userID;b.default.getTopicUserInfo(e,function(e){if(0==e.err_code&&e.data&&e.data.user){t.rankUserData=e.data.user;var o=e.data.user.fail;o&&0!=o||(o=1),t.failNumLabel.string="\u4eca\u65e5\u5df2\u6311\u6218 "+o+" \u6b21"}})}},e.prototype.getTeamName=function(){var t=y.default.topicModel.name.split("#");return t.length>=2?1==y.default.topicModel.info.type?t[0]:t[1]:""},e.prototype.exitCallBackFunc=function(){},e.prototype.buyCallBackFunc=function(t,e){if(console.log("type = "+t),this.userData=l.default.getUserData(),this.userData.coin>=e){if(this.userData.coin-=e,m.default.getInstance().reportProperty.resurrection_coin_cost+=e,m.default.getInstance().levelWinDict.coin+=e,l.default.saveUserData(this.userData),m.default.getInstance().coinNum+=30,this.showTipPop(t),4==t&&m.default.getInstance().gameType==u.GAMETYPE.GAMELEVEL){console.log("\u5e38\u89c4\u5173\u5361\u590d\u6d3b\u8d2d\u4e70");var o=e+"";v.default.trackEvent("game_life_buy",{coinNum:o,c_coinNum:Number(o)})}}else cc.game.emit("showMainTips",c.default.instance.trans(r.GDLanguage.coin_inadequate))},e.prototype.freeCallBackFunc=function(t){var e=this;this.type=t;var o=l.default.GetVedioID();h.default.watchAdVideo({id:o,success:function(){e.watchSuc(1)},fail:function(){console.log("\u5931\u8d25")},nofit:function(){e.shareTTAction()}})},e.prototype.watchSuc=function(t){if(this.showTipPop(),cc.game.emit(u.EMITKEY.CLOSEALLPOP),m.default.getInstance().reportProperty.resurrection_ad_frequency++,4==this.type){m.default.getInstance().sheepMark.resurgenceCount++,console.log("\u590d\u6d3b\u770b\u89c6\u9891");var e=y.default.getTAUserInfo();1==t?g.default.reportTACommon("game_life_ad",e):2==t&&g.default.reportTACommon("game_life_share",e)}},e.prototype.shareTTAction=function(){var t=this;if(h.default.isPlatform(h.Platform.wx)){var e=l.default.GetVedioID(),o=l.default.getUserData().openid;h.default.share(o,e,function(){t.shareCbMethod()},function(){cc.game.emit(u.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else if(h.default.isPlatform(h.Platform.tt)){var n={popName:"shareNodePop",showPopData:{type:2,shareCb:this.shareCbMethod.bind(this)}};cc.game.emit("showPop",n)}},e.prototype.shareCbMethod=function(){console.log("\u5206\u4eab\u6210\u529f ######"),this.watchSuc(2)},e.prototype.showTipPop=function(){this.rebornGameCallBack&&this.rebornGameCallBack(),cc.game.emit("showMainTips",c.default.instance.trans(r.GDLanguage.game_continue))},e.prototype.playShowAnimate=function(){var t=this;this.fainNode.y=0,cc.tween(this.fainNode).to(.8,{y:this.failNodeNum},{easing:cc.easing.cubicOut}).call(function(){},this).delay(.1).call(function(){t.showPopData&&2==t.showPopData.failType?t.showRestartNode():m.default.getInstance().sheepMark.resurgenceCount>=1?t.showRestartNode():t.showPropPop(4)}).start()},e.prototype.showRestartNode=function(){console.log("\u91cd\u65b0\u6311\u6218");var t=y.default.getTAUserInfo();g.default.reportTACommon("game_over",t),cc.game.emit(u.EMITKEY.GAMEOVERRESTART),this.tombNode.active=!0,this.rankUserData?this.showFailTomb(this.rankUserData.fail):this.showFailTomb(1)},e.prototype.setupDescMethods=function(t){var e=["12345\uff0c\u4e0a\u5c71\u6253\u8001\u864e\uff0c\u8981\u60f3\u8fc7\u6b64\u5173\uff0c\u5c31\u8981\u809d\u809d\u809d","\u4eba\u751f\u5f97\u610f\u987b\u5c3d\u6b22\uff0c\u4e0d\u8fc7\u6b64\u5173\u5fc3\u4e0d\u7518\uff01","\u6211\u53ea\u662f\u4e3a\u4e86\u5792\u575f\u5934\uff0c\u5e76\u4e0d\u662f\u8981\u8fc7\u5173\uff01","\u4e3a\u6211\u7701\u4e89\u5149\uff0c\u5fc5\u987b\u62ff\u4e0b","\u4ee5\u6211\u7684\u667a\u6167\u62ff\u4e0b\u5b83\uff0c\u5e94\u8be5\u4e0d\u6210\u95ee\u9898","\u5931\u8d25\u662f\u6210\u529f\u4e4b\u6bcd\uff0c\u7f8a\u513f\u5b50\u8fd8\u5728\u7b49\u7740\u4f60\uff01","\u4e0d\u591f\uff01\u8fd8\u4e0d\u591f\uff01\u6211\u8fd8\u80fd\u518d\u809d100\u56de\u5408","\u6211\u90fd\u6b7b\u8fd9\u4e48\u591a\u6b21\u5566\uff0c\u65f6\u95f4\u8fc7\u7684\u771f\u5feb\uff01","\u9769\u547d\u5c1a\u672a\u6210\u529f\uff0c\u540c\u5fd7\u4ecd\u9700\u52aa\u529b\uff01","\u5dee\u4e00\u70b9\u5c31\u8fc7\u4e86\uff0c\u4f60\u8bf4\u6c14\u4eba\u4e0d\uff01","\u4f60\u786e\u5b9a\u8fd9\u4e48\u6c14\u4eba\u7684\u6e38\u620f\uff0c\u4e0d\u53bb\u6c14\u6c14\u670b\u53cb\uff1f","\u53c8\u5931\u8d25\u4e86\uff0c\u592a\u96be\u4e86","\u53c8\u53c8\u53c8\u5931\u8d25\u4e86\uff0c\u518d\u8bd5\u6700\u540e\u4e00\u6b21","\u53c8\u53c8\u53c8\u53c8\u53c8\u5931\u8d25\u4e86\uff0c\u8981\u4e0d\u653e\u5f03\u5427","\u53c8\u53c8\u53c8\u53c8\u53c8\u53c8\u5931\u8d25\u4e86\uff0c\u8fc7\u4e0d\u53bb\u5c31\u4e0d\u7761\u89c9\u4e86","**\u7b56\u5212\u786e\u5b9a\u8fd9\u662f\u53ef\u4ee5\u8fc7\u7684\u4e48\uff1f","*************\u7b56\u5212\uff0c******\u6bcd\uff01","\u653e\u5f03\u5427\uff0c\u4f55\u82e6\u4e3a\u96be\u81ea\u5df1\u5462","\u4e2d\u56fd\u4eba\u4e0d\u6b3a\u8d1f\u4e2d\u56fd\u4eba\uff0c\u7b56\u5212\u4f60*****","\u6d3b\u7740\u4e0d\u597d\u4e48\uff0c\u975e\u5f97\u8981\u6c14\u6b7b\u81ea\u5df1\u4e48\uff1f","\u751f\u5f53\u4f5c\u7f8a\u6770\uff0c\u6b7b\u4ea6\u4e3a\u7891\u96c4\uff01","\u6ee1\u773c\u5192\u91d1\u661f\uff0c\u6211\u7891\u4eae\u6676\u6676\uff01","\u5f53\u4e0d\u4e86\u7f8a\uff0c\u6211\u4e5f\u8981\u505a\u6211\u670b\u53cb\u5708\u6700\u4eae\u7684\u7891\uff01\u8036\uff01","\u8fd8\u5dee\u4e00\u70b9\uff1f\u6211\u4fe1\u4f60\u4e2a\u9b3c\uff0c\u4f60\u4e2a\u7cdf\u8001\u5934\u5b50***\uff01","\u554a\uff01\u554a\uff01\u554a\uff01\u554a\uff01\u554a\uff01wwwwww\uff01","\u6ca1\u4e8b\uff0c\u4ed6\u4eec\u4e5f\u8fc7\u4e0d\u4e86\uff01","\u4f60\u7ed9\u6211\u7b49\u7740\uff0c\u6211\u8ba9\u6211\u4e03\u5927\u59d1\u516b\u5927\u59e8\u90fd\u6765\uff0c\u6211\u5c31\u4e0d\u4fe1\u4e86\uff01"],o=["\u65e2\u7136\u9009\u62e9\u4e86\uff0c\u5c31\u9700\u8981\u65e0\u6761\u4ef6\u7684\u8fc7\u5173","\u7f8a\u7f8a\u4e91\u68af\uff0c\u6211\u6765\u4e86\uff01","\u6211\u4e5f\u8981\u7f8a\uff5e\u7f8a\uff5e\u7f8a\uff5e","\u4e3a\u4e86\u9635\u8425\u800c\u6218\uff0c\u8d25\u800c\u4e0d\u9981(nei)\uff01","\u5373\u4f7f\u7f8a\u7fa4\u6ca1\u6709\u6211\uff0c\u57fa\u5730\u4e5f\u9700\u8981\u6211\u53bb\u5efa\u8bbe\uff01","\u4e00\u6b21\u5c31\u597d\uff0c\u8ba9\u6211\u5f53\u7f8a\u53bb\u4ee3\u8868\u4ee3\u8868\u5427\uff01","\u4e24\u519b\u5bf9\u5792\u5c31\u662f\u5e72\uff0c\u4e0d\u80fd\u6002\uff0ccome\uff5eon\uff5e\u5317\u9f3b\uff01","\u4e0d\u80fd\u6da8\u4e86\u5bf9\u9762\u6c14\u52bf\uff0c\u706d\u4e86\u81ea\u5df1\u5a01\u98ce\uff01","\u5bf9\u9762\u662f\u4e2a\u5c41\uff01\u518d\u6765\u4e00\u6b21\uff0c\u6211\u4e0d\u80fd\u5f53\u5c41\uff01","\u5f53\u7f8a\u6211\u4e0d\u884c\uff0c\u5632\u8bbd\u5bf9\u65b9\u6211\u884c\uff01","\u91cd\u5728\u53c2\u4e0e\uff0c\u8f93\u8d62\u4e0d\u91cd\u8981\uff0c\u4e48\uff1f\u4e0d\u80fd\u8f93\uff01","\u4e0d\u4e89\u9992\u5934\u84b8\u53e3\u6c14\uff0c\u5144\u5f1f\u4eec\u7b49\u7740\u6211\uff01","\u8bf4\u670d\u81ea\u5df1\u518d\u6765\u4e00\u6b21\uff0c\u8bf4\u670d\u5bf9\u9762\u653e\u5f03\uff01","\u6211\u611f\u89c9\u6211\u5df2\u7ecf\u5c3d\u529b\u4e86\uff0c\u5144\u5f1f\u4eec\u52a0\u6cb9\uff01","\u8fd9\u4e5f\u592a\u96be\u4e86\uff0c\u7f8a\u961f\u8fdb\u5165\u592a\u7a7a\uff0c\u5c31\u5dee\u6211\u4e86\uff01","\u7f8a\u7f8a\u8fd9\u4e48\u53ef\u7231\uff0c\u7b56\u5212\u662f\u4e2a*****x\uff01","\u5173\u5361\u597d\u96be\uff01\u7b56\u5212\u597d\u574f\uff01\u4f46\u662f\u6211\u597d\u559c\u6b22\u554a\uff01\u54c8\u54c8\uff5e","\u4e0d\u96be\u4e0d\u80fd\u51f8\u663e\u6211\u7684\u667a\u6167\uff0c\u518d\u6765\u4e00\u6b21\uff01","\u4e0d\u96be\u4e0d\u80fd\u51f8\u663e\u6211\u7684\u667a\u6167\uff0c\u518d\u6765\u4e00\u6b21\uff01","\u4e0d\u96be\u4e0d\u80fd\u51f8\u663e\u6211\u7684\u667a\u6167\uff0c\u518d\u6765\u4e00\u6b21\uff01"];if(1<=t&&t<=8){var n=1;return 1==t?n=s.default.randomNum(0,5):2==t?n=s.default.randomNum(2,8):3==t?n=s.default.randomNum(3,10):4==t?n=s.default.randomNum(4,12):5==t?n=s.default.randomNum(8,14):6==t?n=s.default.randomNum(10,16):7==t?n=s.default.randomNum(14,18):8==t?n=s.default.randomNum(15,20):9==t?n=s.default.randomNum(15,21):10==t?n=s.default.randomNum(15,22):11==t&&(n=s.default.randomNum(15,27)),m.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY?(n>=e.length&&(n=e.length-1),e[n]):m.default.getInstance().gameType==u.GAMETYPE.GAMETOPIC?(n>=o.length&&(n=o.length-1),o[n]):""}},e.prototype.showFailTomb=function(t){this.tombBubble.scale=0,cc.tween(this.tombBubble).to(.3,{scale:1},{easing:cc.easing.backOut}).start();var e=y.default.getDeadNum(t),o="Dead"+e;if(this.tombNode.getComponent(f.default).play(o,0),this.tombDesc.string=this.setupDescMethods(e),this.rankNode.active=!0,cc.tween(this.rankNode).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start(),this.rankPreLabel.string="",this.rankLastLabel.string="",this.rankNumLabel.string="",m.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY){this.rankPreLabel.string="\u60a8\u6240\u5728\u5730\u533a\u4f9d\u7136\u662f\u7b2c ",this.rankLastLabel.string=" \u540d";var n=m.default.getInstance().rankInfo.user.index;this.rankNumLabel.string=n+""}else m.default.getInstance().gameType==u.GAMETYPE.GAMETOPIC&&(this.rankPreLabel.string=this.getTeamName()+"\u7f8a\u961f\u5df2\u6709 ",this.rankLastLabel.string=" \u7f8a",y.default.topicRankInfo&&y.default.topicModel&&(1==y.default.topicModel.info.type?this.rankNumLabel.string=y.default.topicRankInfo.tomb?y.default.topicRankInfo.tomb.length+"":"0":this.rankNumLabel.string=y.default.topicRankInfo.taoist?y.default.topicRankInfo.taoist.length+"":"0"));y.default.isUpgradeNum(t+1)?(this.tombParticle.active=!0,this.tombParticle.getComponent(cc.ParticleSystem).resetSystem(),this.shareNode.active=!0,cc.tween(this.shareNode).set({scale:0,opacity:0}).delay(1).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start()):this.showButton()},e.prototype.showButton=function(){var t=this;this.restartNode.activeInHierarchy&&this.backNode.activeInHierarchy&&this.bottomShareBtn.activeInHierarchy?console.log("\u5df2\u5c55\u793ashow button"):(this.restartNode.scale=0,this.backNode.scale=0,this.bottomShareBtn.scale=0,this.restartNode.active=!0,this.backNode.active=!0,this.bottomShareBtn.active=!0,setTimeout(function(){cc.tween(t.restartNode).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start(),cc.tween(t.backNode).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start(),cc.tween(t.bottomShareBtn).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},1e3))},e.prototype.hideFailPop=function(){this.node.active=!1},e.prototype.continueFunc=function(){this.showPropPop(4)},e.prototype.giveUpFunc=function(){this.giveUpCallBack&&this.giveUpCallBack()},e.prototype.showPropPop=function(t){var e={popName:"getPropPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:t,coinNum:m.default.getInstance().coinNum}};cc.game.emit("showPop",e)},i([C(cc.Node)],e.prototype,"fainNode",void 0),i([C(cc.Label)],e.prototype,"descLabel",void 0),i([C(cc.Label)],e.prototype,"failNumLabel",void 0),i([C({type:cc.Node,tooltip:"\u91cd\u65b0\u6311\u6218"})],e.prototype,"restartNode",void 0),i([C({type:cc.Node,tooltip:"\u8fd4\u56de\u7f8a\u7fa4"})],e.prototype,"backNode",void 0),i([C({type:cc.Node,tooltip:"\u5893\u7891spine"})],e.prototype,"tombNode",void 0),i([C({type:cc.Node,tooltip:"\u5893\u7891\u6c14\u6ce1"})],e.prototype,"tombBubble",void 0),i([C({type:cc.Label,tooltip:"\u5893\u7891\u63cf\u8ff0"})],e.prototype,"tombDesc",void 0),i([C({type:cc.Node,tooltip:"\u5893\u7891\u7c92\u5b50"})],e.prototype,"tombParticle",void 0),i([C({type:cc.Node,tooltip:"\u6392\u540dbase"})],e.prototype,"rankNode",void 0),i([C({type:cc.Label,tooltip:"\u6392\u540d"})],e.prototype,"rankPreLabel",void 0),i([C({type:cc.Label,tooltip:"\u6392\u540d"})],e.prototype,"rankNumLabel",void 0),i([C({type:cc.Label,tooltip:"\u6392\u540d"})],e.prototype,"rankLastLabel",void 0),i([C(cc.Node)],e.prototype,"shareNode",void 0),i([C(cc.Node)],e.prototype,"shareBtn",void 0),i([C(cc.Node)],e.prototype,"noShareBtn",void 0),i([C(cc.Node)],e.prototype,"shareCloseBtn",void 0),i([C({type:cc.Node,tooltip:"\u5e95\u90e8\u5206\u4eab\u6309\u94ae"})],e.prototype,"bottomShareBtn",void 0),i([N],e)}(cc.Component);o.default=w,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../../script/manager/data-manager":"data-manager","../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/share":"share","../common/native/tt-sdk":"tt-sdk","../common/sdk":"sdk","../common/spine":"spine","../manager/GameManager":"GameManager","../manager/report-common":"report-common","../utils/uma/uma-sdk":"uma-sdk"}],"flying-item-pop-coin":[function(t,e,o){"use strict";cc._RF.push(e,"f8882Kqr8ZNno3Bla7FeEvc","flying-item-pop-coin");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.tipsFontLabel=null,e}return a(e,t),e.prototype.start=function(){this.popNode.active=!1,cc.game.on(r.EMITKEY.SHOWMAINTIPS,this.showTips,this)},e.prototype.showTips=function(t){var e=this;this.popNode.stopAllActions(),this.popNode.active=!0,this.tipsFontLabel.string=t+"",this.popNode.y=-100,cc.tween(this.popNode).set({opacity:255}).to(.3,{y:0}).delay(1).to(.3,{opacity:0}).call(function(){e.popNode.active=!1},this).start()},i([l(cc.Node)],e.prototype,"popNode",void 0),i([l(cc.Label)],e.prototype,"tipsFontLabel",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../common/enumConfig":"enumConfig"}],"game-top-ui":[function(t,e,o){"use strict";cc._RF.push(e,"011b2otLrtL36irPwLg72Hm","game-top-ui");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cookieNode=null,e.cookieImg=null,e.cookieNum=null,e.cookiePrefab=null,e.cookieTrailing=null,e.cookieCurCount=0,e.cookieAllCount=0,e.goldBlockCoinCount=0,e.ribbonBoxCount=0,e}return a(e,t),e.prototype.start=function(){},i([s(cc.Node)],e.prototype,"cookieNode",void 0),i([s(cc.Node)],e.prototype,"cookieImg",void 0),i([s(cc.Node)],e.prototype,"cookieNum",void 0),i([s(cc.Prefab)],e.prototype,"cookiePrefab",void 0),i([s(cc.Prefab)],e.prototype,"cookieTrailing",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],gameLayer:[function(t,e,o){"use strict";cc._RF.push(e,"4f0043pQOFO24XT2d3lGc3T","gameLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/native/audio"),l=t("../main/mainLayer"),u=t("./chessboard"),p=t("./crushArea"),d=t("./gameUiLayer"),h=t("./moveOutArea"),f=t("../common/spine"),m=t("../common/enumConfig"),g=t("../manager/GameManager"),y=t("../manager/DateManager"),v=t("../utils/uma/uma-sdk"),b=t("../../i18n/i18n"),_=t("../../i18n/gd_language"),N=t("../common/native/native-bridge"),C=t("../manager/report-common"),w=t("../manager/data-manager"),P=t("../api/api-sheep"),k=cc._decorator,S=k.ccclass,D=k.property,A=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.bgLayer=null,e.chessboard=null,e.crushArea=null,e.moveOutArea=null,e.uiLayer=null,e.gameTopUi=null,e.gameWin=null,e.gameNext=null,e.levelDataArray=null,e.gameIsWin=!1,e.popCallbackCollect=null,e.userData=null,e.playLevelNum=0,e.gameIsStop=!1,e.chessY=0,e.beginBGM=!1,e.timer=0,e.countdown=0,e}return a(e,t),e.prototype.onEnable=function(){cc.audioEngine.setMusicVolume(1),cc.game.setFrameRate(60),this.countdown=0,g.default.getInstance().playGameCount++;var t=y.default.format(m.CALENDARNAMES[6],new Date);g.default.getInstance().gameBeginDate=t},e.prototype.update=function(t){this.timer+=t,this.timer>=1&&0==this.gameIsStop&&(this.timer=0,this.countdown++)},e.prototype.start=function(){cc.game.on(m.EMITKEY.RESTARTNOWLEVEL,this.restartNowLevel,this),cc.game.on(m.EMITKEY.SHOWMAINLAYER,this.showMainLayer,this),cc.game.on(m.EMITKEY.GAMEOVERRESTART,this.gameOverRestartFunc,this),r.default.addbtnTouchStartScale(this.gameWin),r.default.addbtnTouchEndScale(this.gameWin,this.gameWinFunc.bind(this)),r.default.addbtnTouchCancelScale(this.gameWin),r.default.addbtnTouchStartScale(this.gameNext),r.default.addbtnTouchEndScale(this.gameNext,this.gameNextFunc.bind(this)),r.default.addbtnTouchCancelScale(this.gameNext),cc.sys.isBrowser?(this.gameWin.active=!0,this.gameNext.active=!0):(this.gameWin.active=!1,this.gameNext.active=!1)},e.prototype.onDisable=function(){this.chessY=0},e.prototype.adaptScreen=function(){var t=this;setTimeout(function(){g.default.getInstance().globalData.isFullScreen&&0==t.chessY&&t.chessboard.y>400&&(t.chessboard.y-=100,t.chessY=t.chessboard.y)},200),setTimeout(function(){t.onPointIsContains()},100),g.default.getInstance().gameType==m.GAMETYPE.GAMEDAILY?(this.bgLayer.color=new cc.Color(195,254,139),this.bgLayer.getChildByName("glassSP").getComponent(f.default).play("2Grass",0)):g.default.getInstance().gameType==m.GAMETYPE.GAMETOPIC&&(this.bgLayer.color=new cc.Color(65,167,143),this.bgLayer.getChildByName("glassSP").getComponent(f.default).play("2Grass2",0))},e.prototype.onPointIsContains=function(){this.chessboard.getBoundingBoxToWorld();for(var t=r.default.getWorldPosition(this.moveOutArea),e=this.chessboard.getBoundingBoxToWorld();e.contains(t);){if(this.chessboard.scale-=.05,this.chessboard.scale<.5){console.log("\u8d85\u51fa\u6700\u5c0fscale \u9000\u51fa ###### ");break}e=this.chessboard.getBoundingBoxToWorld(),console.log("\u6211\u5728\u8282\u70b9\u7684\u5185\u90e8 ###### ")}console.log("\u6211\u5728\u8282\u70b9\u7684\u5916\u90e8 ###### ",this.chessboard.scale)},e.prototype.gameNextFunc=function(){if(this.playLevelNum=3&&(t=Number(n[2]))}c.default.getLevelByID(t,function(t){if(t.length<1)return cc.game.emit("showMainTips",b.default.instance.trans(_.GDLanguage.level_inadequate)),void e.showMainLayer(m.GAMEOVER.NONE);cc.game.emit("closeAllPop"),e.initLevelLayer(t)})},e.prototype.playNumberfunc=function(){if(this.levelDataArray.length<1)this.showMainLayer(m.GAMEOVER.NONE);else{cc.game.emit("closeAllPop"),g.default.getInstance().gameType==m.GAMETYPE.GAMEDAILY?this.uiLayer.getComponent(d.default).recoverTime(1):g.default.getInstance().gameType==m.GAMETYPE.GAMETOPIC&&this.uiLayer.getComponent(d.default).recoverTime(1);var t=w.default.getGameLevelData();t?(console.log("\u83b7\u53d6\u5173\u5361\u7f13\u5b58\u6570\u636e ###### "),this.initLevelLayer(t)):this.initLevelLayer(this.levelDataArray)}},e.prototype.showSetUpLayer=function(){console.log("\u6253\u5f00\u8bbe\u7f6e\u9875\u9762");var t={popName:"setupPop",showPopData:{popCallbackCollect:this.popCallbackCollect,setupType:2}};cc.game.emit("showPop",t),this.gameIsStopFunc(!0)},e.prototype.showMainLayer=function(t){void 0===t&&(t=m.GAMEOVER.NONE),console.log("\u6253\u5f00\u4e3b\u9875\u9762 = "+t);var e=this;cc.game.emit(m.EMITKEY.SHOWTRANSITLAYER,function(o){console.log("\u53ef\u4ee5\u6253\u5f00\u4e86 gamelayer"),cc.game.emit("closeAllPop"),e.gameIsStopFunc(!0),e.mainLayer.getComponent(l.default).showMainLayer(t),e.node.active=!1,o()})},e.prototype.gameOverFunc=function(t){void 0===t&&(t=1),this.gameOverState(2),console.log("\u6e38\u620f\u5931\u8d25 failType = ",t);var e={popName:"failPop",showPopData:{popCallbackCollect:this.popCallbackCollect,failType:t}};cc.game.emit("showPop",e),this.gameIsStopFunc(!0)},e.prototype.gameOverState=function(t){g.default.getInstance().game_over=t,1==t&&this.reportData(t)},e.prototype.gameOverRestartFunc=function(){this.reportData(2)},e.prototype.reportData=function(t){var e=this,o=1;for(var n in g.default.getInstance().sheepMark){var a=g.default.getInstance().sheepMark[n];if(Number(a)>0){o=2;break}}for(var i=c.default.getSheepClothesData(),r=1,s=0;s=t){var e=c.default.getSprintRewardData();e.winNum+=1,e.rewardProgress<3?(e.rewardProgress+=1,3==e.rewardProgress&&(e.winBox+=1)):e.rewardProgress=1,e.isGameEd=0,c.default.setSprintRewardData(e);var o=[3,6,9,12,15,25,50,100];for(var n in o)if(e.winNum==o[n]){var a="richroad_level"+e.winNum,i=c.default.getUserData().playLevelId+"",r={levelNum:i,c_levelNum:Number(i)};v.default.trackEvent(a,r),console.log("\u8fde\u80dc ########",a,r);break}}this.userData=c.default.getUserData(),console.log("\u6e38\u620f\u83b7\u80dc\uff0c\u5173\u5361\u4e3a\uff1a",this.levelDataArray,this.userData.playLevelId);var s={af_level:this.userData.playLevelId};N.default.leitingReport("af_levels_achieved",s);var l=[10,20,30,40,50,60,70,80,90,100,120,150,200];for(var n in l)if(this.userData.playLevelId==l[n]){var u={af_level:this.userData.playLevelId};N.default.leitingReport("af_level"+this.userData.playLevelId,u),console.log("af_level"+this.userData.playLevelId);break}this.crushArea.getComponent(p.default).hideCrushArea(),this.uiLayer.getComponent(d.default).removeGameUiBtn();var h=c.default.getRewardBoxData(this.userData.playLevelId),f=this.userData.playLevelId>=5;c.default.gameLevelWin(f,h);var y=c.default.getCollectionUnlockData();console.log("unlockObj:",y);var b={popName:"winPop",showPopData:{popCallbackCollect:this.popCallbackCollect,winRewardObj:h,unlockObj:y,time:this.countdown}};cc.game.emit(m.EMITKEY.SHOWPOP,b),this.gameIsStopFunc(!0)}else g.default.getInstance().gameType==m.GAMETYPE.GAMEDAILY?(this.userData=c.default.getUserData(),h=c.default.getRewardBoxData(this.userData.playLevelId),c.default.gameLevelWin(!0,h),y=c.default.getCollectionUnlockData(),b={popName:"winPop",showPopData:{popCallbackCollect:this.popCallbackCollect,winRewardObj:h,unlockObj:y,time:this.countdown}},cc.game.emit(m.EMITKEY.SHOWPOP,b),this.crushArea.getComponent(p.default).hideCrushArea(),this.uiLayer.getComponent(d.default).removeGameUiBtn(),this.gameIsStopFunc(!0),this.updateTodayWin(!0)):g.default.getInstance().gameType==m.GAMETYPE.GAMETOPIC&&(b={popName:"winPop",showPopData:{popCallbackCollect:this.popCallbackCollect,time:this.countdown}},cc.game.emit(m.EMITKEY.SHOWPOP,b),this.crushArea.getComponent(p.default).hideCrushArea(),this.uiLayer.getComponent(d.default).removeGameUiBtn(),this.gameIsStopFunc(!0))},e.prototype.updateTodayWin=function(t){if(console.log("isWin = ",t),0!=this.checkIsTodayWin()){var e=y.default.format(m.CALENDARNAMES[5],new Date),o=y.default.format(m.CALENDARNAMES[6],new Date),n=c.default.getDailyData(e,o);n?n.isWin=t:n={dailyID:o,isWin:t,unLimitVideo:0,sheepNum:-1},c.default.saveDailyData(e,o,n)}else console.log("checkIsTodayWin update cache ######## false")},e.prototype.giveUpFunc=function(t){void 0===t&&(t=0),g.default.getInstance().gameType==m.GAMETYPE.GAMELEVEL&&(c.default.getSprintRewardData().winNum>0&&cc.game.emit("showPop",{popName:"sprintRewardPop",showPopData:{popCallbackCollect:null,popType:2}}),g.default.getInstance().cookieDict.cookieCurCount>0&&cc.game.emit("showPop",{popName:"loseCookiePop",showPopData:{popCallbackCollect:null,popType:0}}));var e={popName:"loseLovePop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:t}};cc.game.emit("showPop",e),this.gameIsStopFunc(!0)},e.prototype.rebornGameFunc=function(){console.log("\u8fd9\u91cc\u6709\u4e2a\u770b\u89c6\u9891"),cc.game.emit("closeAllPop"),this.gameIsStopFunc(!1),g.default.getInstance().gameType==m.GAMETYPE.GAMEDAILY&&this.uiLayer.getComponent(d.default).recoverTime(),this.crushArea.getComponent(p.default).rebornGameFunc()},e.prototype.crushBlockNode=function(t){this.crushArea.getComponent("crushArea").addCrushAreaCardNode(t);var e=this.chessboard.getComponent(u.default).checkGameWin(),o=this.moveOutArea.getComponent(h.default).checkGameWin();e&&o&&(console.log("\u6e38\u620f\u80dc\u5229\uff01"),this.gameIsWin=!0,this.gameIsStopFunc(!0))},e.prototype.crushAnimateCallback=function(){this.gameIsWin&&(this.playLevelNum=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/enumConfig"),l=t("../common/native/audio"),u=t("../common/sdk"),p=t("../manager/DateManager"),d=t("../manager/GameManager"),h=t("./chessboard"),f=t("./crushArea"),m=t("./gameLayer"),g=t("../../pre/item/prop-prefab"),y=t("../utils/uma/uma-sdk"),v=t("../manager/report-common"),b=t("../../i18n/i18n"),_=t("../../i18n/gd_language"),N=t("../manager/data-manager"),C=cc._decorator,w=C.ccclass,P=C.property,k=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.removeBtn=null,e.removeBg1=null,e.removeMask=null,e.removeNumLabel=null,e.removeVedio=null,e.cancelBtn=null,e.cancelBg1=null,e.cancelMask=null,e.cancelNumLabel=null,e.cancelVedio=null,e.randomBtn=null,e.randomBg1=null,e.randomMask=null,e.randomNumLabel=null,e.randomVedio=null,e.setUpBtn=null,e.moveOutArea=null,e.chessboardNode=null,e.crushArea=null,e.levelNode=null,e.levelNumLabel=null,e.stageOneNode=null,e.stageTwoNode=null,e.maskStage=null,e.propPrefab=null,e.paddingHeight=25,e.userData=null,e.isMoving=!1,e.timer=0,e.countdownOrogin=0,e.countdown=0,e.countdownAdd=60,e.gameIsStop=!1,e.popCallbackCollect=null,e.getPropType=0,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchStartScale(this.removeBtn),r.default.addbtnTouchEndScale(this.removeBtn,this.removeEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.removeBtn),r.default.addbtnTouchStartScale(this.cancelBtn),r.default.addbtnTouchEndScale(this.cancelBtn,this.cancelEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.cancelBtn),r.default.addbtnTouchStartScale(this.randomBtn),r.default.addbtnTouchEndScale(this.randomBtn,this.randomEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.randomBtn),r.default.addbtnTouchStartScale(this.setUpBtn),r.default.addbtnTouchEndScale(this.setUpBtn,this.setUpEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.setUpBtn),this.popCallbackCollect={buyCallBack:this.buyCallBackFunc.bind(this),freeCallBack:this.freeCallBackFunc.bind(this),exitCallBack:this.exitCallBackFunc.bind(this)}},e.prototype.exitCallBackFunc=function(){this.gameIsStopFunc(!1)},e.prototype.setTimeByLevel=function(t,e){var o=t.timeArray;if(e>o.length)cc.game.emit("showMainTips",b.default.instance.trans(_.GDLanguage.level_inadequate));else{var n=o[e-1];this.countdown=n,this.countdownOrogin=n,console.log("countdowm = "+n),this.updateTime(this.countdown)}},e.prototype.update=function(t){d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY&&0==this.gameIsStop&&(this.timer+=t,this.timer>=1&&(this.timer=0,this.countdown--,this.updateTime(this.countdown)))},e.prototype.updateTime=function(){},e.prototype.gameIsWin=function(){if(d.default.getInstance().gameType==s.GAMETYPE.GAMELEVEL){if(d.default.getInstance().levelWinDict.remove>0){var t=d.default.getInstance().levelWinDict.remove+"";y.default.trackEvent("game_finish_skill_1",{num:t,c_num:Number(t)})}if(d.default.getInstance().levelWinDict.cancel>0){var e=d.default.getInstance().levelWinDict.cancel+"";y.default.trackEvent("game_finish_skill_2",{num:e,c_num:Number(e)})}if(d.default.getInstance().levelWinDict.random>0){var o=d.default.getInstance().levelWinDict.random+"";y.default.trackEvent("game_finish_skill_3",{num:o,c_num:Number(o)})}}else{var n=this.countdown<=0?0:this.countdown,a=n+"";d.default.getInstance().reportProperty.dailyWin_time_remaining=n,y.default.trackEvent("daily_finishtime",{remainTime:a,c_remainTime:Number(a)})}},e.prototype.gameIsStopFunc=function(t){this.gameIsStop=t},e.prototype.recoverTime=function(t){void 0===t&&(t=0),this.countdown<=0&&(this.countdown=this.countdownAdd),1==t&&(this.countdown=this.countdownOrogin),this.updateTime(this.countdown)},e.prototype.initGameUi=function(t){for(var e in this.userData=c.default.getUserData(),this.userData.prop_cancel=0,this.userData.prop_random=0,this.userData.prop_remove=0,c.default.saveUserData(this.userData),d.default.getInstance().sheepMark)d.default.getInstance().sheepMark[e]=0;this.isMoving=!1;var o=this.removeBtn.height+this.paddingHeight,n=-(cc.winSize.height/2+this.removeBtn.height/2);this.removeBtn.y=n,this.cancelBtn.y=n,this.randomBtn.y=n,cc.tween(this.removeBtn).by(.4,{y:o}).start(),cc.tween(this.cancelBtn).by(.4,{y:o}).start(),cc.tween(this.randomBtn).by(.4,{y:o}).start(),this.setGameLayerUiData(),t.length>1?(this.stageTwoNode.active=!0,this.stageOneNode.active=!1):(this.stageTwoNode.active=!1,this.stageOneNode.active=!1)},e.prototype.setLevelStage=function(t){if(0==t?this.stageOneNode.active=!1:1==t&&(this.stageOneNode.active=!0),this.levelNode.active=!0,d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY){if(p.default.format(s.CALENDARNAMES[4],p.default.getInstance().selDate).split("-").length<3)return;this.levelNumLabel.string="\u6bcf\u65e5\u4e00\u5173"}else this.levelNode.active=!0},e.prototype.setGameLayerUiData=function(){this.userData=c.default.getUserData(),p.default.format(s.CALENDARNAMES[4],p.default.getInstance().selDate).split("-").length<3||(this.levelNumLabel.string="\u6bcf\u65e5\u4e00\u5173",this.userData.prop_remove>=1?(this.removeNumLabel.string=""+this.userData.prop_remove,this.removeNumLabel.node.active=!0,this.removeBg1.active=!0,this.removeVedio.active=!1,this.removeMask.active=!1):(this.removeNumLabel.node.active=!1,this.removeVedio.active=!0,d.default.getInstance().sheepMark.propRemoveCount>=1?(this.removeMask.active=!0,this.removeBg1.active=!1):(this.removeMask.active=!1,this.removeBg1.active=!0)),this.userData.prop_cancel>=1?(this.cancelNumLabel.string=""+this.userData.prop_cancel,this.cancelNumLabel.node.active=!0,this.cancelBg1.active=!0,this.cancelVedio.active=!1,this.cancelMask.active=!1):(this.cancelNumLabel.node.active=!1,this.cancelVedio.active=!0,d.default.getInstance().sheepMark.propCancelCount>=1?(this.cancelMask.active=!0,this.cancelBg1.active=!1):(this.cancelMask.active=!1,this.cancelBg1.active=!0)),this.userData.prop_random>=1?(this.randomNumLabel.string=""+this.userData.prop_random,this.randomNumLabel.node.active=!0,this.randomBg1.active=!0,this.randomVedio.active=!1,this.randomMask.active=!1):(this.randomNumLabel.node.active=!1,this.randomVedio.active=!0,d.default.getInstance().sheepMark.propRandomCount>=1?(this.randomMask.active=!0,this.randomBg1.active=!1):(this.randomMask.active=!1,this.randomBg1.active=!0)))},e.prototype.removeGameUiBtn=function(){var t=this;console.log("\u79fb\u9664\u6309\u94ae ###### "),this.isMoving=!0,this.removeBtn.height,this.paddingHeight;var e=-(cc.winSize.height/2+this.removeBtn.height);cc.tween(this.removeBtn).to(.4,{y:e}).start(),cc.tween(this.cancelBtn).to(.4,{y:e}).start(),cc.tween(this.randomBtn).to(.4,{y:e}).call(function(){t.isMoving=!1},this).start()},e.prototype.setUpEndFunc=function(){this.node.parent.getComponent(m.default).showSetUpLayer()},e.prototype.removeEndFunc=function(){if(!this.isMoving)if(this.removeMask.activeInHierarchy)cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u6bcf\u5173\u53ea\u80fd\u4f7f\u7528\u4e00\u6b21\u54e6");else if(this.userData.prop_remove>=1){if(this.crushArea.getComponent(f.default).moveOutBlock()){l.default.playAudioMusic("audio/sound/moveOut.mp3",!1),this.userData.prop_remove--,d.default.getInstance().reportProperty.remove_use++,d.default.getInstance().sheepMark.propRemoveCount++,0==d.default.getInstance().reportProperty.remove_ad&&console.log("\u4f7f\u7528\u521d\u59cb\u9053\u5177 ###### propRemove");var t=N.default.getTAUserInfo();t.item_name="\u79fb\u51fa\u9053\u5177",v.default.reportTACommon("prop_initial",t),c.default.saveUserData(this.userData),this.setGameLayerUiData(),d.default.getInstance().levelWinDict.remove+=1;var e=this.userData.prop_remove-1;e<0&&(e=0)}}else console.log("\u79fb\u51fa\u9053\u5177\u4e0d\u8db3"),this.showPropPop(1,60)},e.prototype.cancelEndFunc=function(){if(this.cancelMask.activeInHierarchy)cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u6bcf\u5173\u53ea\u80fd\u4f7f\u7528\u4e00\u6b21\u54e6");else if(this.userData.prop_cancel>=1){if(this.crushArea.getComponent(f.default).cancelOneStep()){l.default.playAudioMusic("audio/sound/moveOut.mp3",!1),this.userData.prop_cancel--,d.default.getInstance().reportProperty.cancel_use++,d.default.getInstance().sheepMark.propCancelCount++,0==d.default.getInstance().reportProperty.cancel_ad&&console.log("\u4f7f\u7528\u521d\u59cb\u9053\u5177 ###### propCancel");var t=N.default.getTAUserInfo();t.item_name="\u64a4\u9500\u9053\u5177",v.default.reportTACommon("prop_initial",t),c.default.saveUserData(this.userData),this.setGameLayerUiData(),d.default.getInstance().levelWinDict.cancel+=1;var e=this.userData.prop_cancel-1;e<0&&(e=0)}}else console.log("\u64a4\u9500\u9053\u5177\u4e0d\u8db3"),this.showPropPop(2,20)},e.prototype.randomEndFunc=function(){if(!this.isMoving)if(this.randomMask.activeInHierarchy)cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u6bcf\u5173\u53ea\u80fd\u4f7f\u7528\u4e00\u6b21\u54e6");else if(this.userData.prop_random>=1){var t=this.chessboardNode.getComponent(h.default).updateBlockArea();if(console.log("isOk ###### ",t),t){l.default.playAudioMusic("audio/sound/random.mp3",!1),this.userData.prop_random--,d.default.getInstance().reportProperty.random_use++,d.default.getInstance().sheepMark.propRandomCount++,0==d.default.getInstance().reportProperty.random_ad&&console.log("\u4f7f\u7528\u521d\u59cb\u9053\u5177 ###### propRandom");var e=N.default.getTAUserInfo();e.item_name="\u6d17\u724c\u9053\u5177",v.default.reportTACommon("prop_initial",e),c.default.saveUserData(this.userData),this.setGameLayerUiData(),d.default.getInstance().levelWinDict.random+=1;var o=this.userData.prop_random-1;o<0&&(o=0)}}else console.log("\u6d17\u724c\u9053\u5177\u4e0d\u8db3"),this.showPropPop(3,10)},e.prototype.buyCallBackFunc=function(t,e){if(console.log("coin = "+e),this.userData=c.default.getUserData(),this.userData.coin>=e){if(this.userData.coin-=e,d.default.getInstance().levelWinDict.coin+=e,this.showTipPop(t,1),d.default.getInstance().gameType==s.GAMETYPE.GAMELEVEL){var o=e+"";y.default.trackEvent("game_skill_buy",{coinNum:o,c_coinNum:Number(o)})}this.userData.coin}else cc.game.emit("showMainTips",b.default.instance.trans(_.GDLanguage.coin_inadequate))},e.prototype.freeCallBackFunc=function(t){var e=this;if(this.getPropType=t,console.log("type = "+t),u.default.isPlatform(u.Platform.wx)){var o=N.default.getPropData(),n=0;if(d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY?1==t?n=o.daily.prop_remove:2==t?n=o.daily.prop_cancel:3==t&&(n=o.daily.prop_random):d.default.getInstance().gameType==s.GAMETYPE.GAMETOPIC&&(1==t?n=o.topic.prop_remove:2==t?n=o.topic.prop_cancel:3==t&&(n=o.topic.prop_random)),n>0)return void e.shareTTAction(t);if("shareValue"==u.default.wxValue)return void e.shareTTAction(t)}var a=c.default.GetVedioID();u.default.watchAdVideo({id:a,success:function(){console.log("\u6210\u529f sdk"),cc.game.emit(s.EMITKEY.CLOSEALLPOP),e.showTipPop(t,2),d.default.getInstance().gameType==s.GAMETYPE.GAMELEVEL&&y.default.trackEvent("game_skill_ad")},fail:function(t){console.log("\u5931\u8d25 ###### = ",t),e.gameIsStopFunc(!1)},nofit:function(){e.shareTTAction(t)}})},e.prototype.shareTTAction=function(t){var e=this;if(u.default.isPlatform(u.Platform.wx)){var o=c.default.GetVedioID(),n=c.default.getUserData().openid;u.default.share(n,o,function(){e.shareCbMethod(),e.updateShareCount(t)},function(){cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else if(u.default.isPlatform(u.Platform.tt)){var a={popName:"shareNodePop",showPopData:{type:2,shareCb:this.shareCbMethod.bind(this)}};cc.game.emit("showPop",a)}},e.prototype.updateShareCount=function(t){var e=N.default.getPropData();d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY?1==t?e.daily.prop_remove--:2==t?e.daily.prop_cancel--:3==t&&e.daily.prop_random--:d.default.getInstance().gameType==s.GAMETYPE.GAMETOPIC&&(1==t?e.topic.prop_remove--:2==t?e.topic.prop_cancel--:3==t&&e.topic.prop_random--),N.default.setPropData(e)},e.prototype.shareCbMethod=function(){console.log("\u5206\u4eab\u6210\u529f ######"),cc.game.emit(s.EMITKEY.CLOSEALLPOP),this.showTipPop(this.getPropType,3)},e.prototype.showTipPop=function(t,e){var o="",n=null,a="";1==t?(o=b.default.instance.trans(_.GDLanguage.props_remove_claim),n=this.removeBtn,a="\u79fb\u51fa\u9053\u5177",this.userData.prop_remove=1,this.userData.prop_remove,1==e?d.default.getInstance().reportProperty.remove_buy++:2==e&&d.default.getInstance().reportProperty.remove_ad++):2==t?(o=b.default.instance.trans(_.GDLanguage.props_cancel_claim),n=this.cancelBtn,a="\u64a4\u9500\u9053\u5177",this.userData.prop_cancel=1,this.userData.prop_cancel,1==e?d.default.getInstance().reportProperty.cancel_buy++:2==e&&d.default.getInstance().reportProperty.cancel_ad++):3==t&&(o=b.default.instance.trans(_.GDLanguage.props_random_claim),n=this.randomBtn,a="\u6d17\u724c\u9053\u5177",this.userData.prop_random=1,this.userData.prop_random,1==e?d.default.getInstance().reportProperty.random_buy++:2==e&&d.default.getInstance().reportProperty.random_ad++);var i="\u6bcf\u65e5\u6311\u6218";d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY?i="\u6bcf\u65e5\u6311\u6218":d.default.getInstance().gameType==s.GAMETYPE.GAMETOPIC&&(i="\u8bdd\u9898\u6311\u6218"),2==e?v.default.reportTACommon("game_skill_ad",{item_name:a,game_type:i}):3==e&&v.default.reportTACommon("game_skill_share",{item_name:a,game_type:i}),c.default.saveUserData(this.userData),this.setGameLayerUiData(),cc.game.emit("showMainTips",o);var r=cc.instantiate(this.propPrefab);r.getComponent(g.default).showWithType(t,n,this.movePropFunc.bind(this)),this.node.addChild(r),this.node.setSiblingIndex(20)},e.prototype.movePropFunc=function(){this.gameIsStopFunc(!1)},e.prototype.showPropPop=function(t,e){this.gameIsStopFunc(!0);var o={popName:"getPropPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:t,coinNum:e}};cc.game.emit("showPop",o)},i([P(cc.Node)],e.prototype,"removeBtn",void 0),i([P(cc.Node)],e.prototype,"removeBg1",void 0),i([P(cc.Node)],e.prototype,"removeMask",void 0),i([P(cc.Label)],e.prototype,"removeNumLabel",void 0),i([P(cc.Node)],e.prototype,"removeVedio",void 0),i([P(cc.Node)],e.prototype,"cancelBtn",void 0),i([P(cc.Node)],e.prototype,"cancelBg1",void 0),i([P(cc.Node)],e.prototype,"cancelMask",void 0),i([P(cc.Label)],e.prototype,"cancelNumLabel",void 0),i([P(cc.Node)],e.prototype,"cancelVedio",void 0),i([P(cc.Node)],e.prototype,"randomBtn",void 0),i([P(cc.Node)],e.prototype,"randomBg1",void 0),i([P(cc.Node)],e.prototype,"randomMask",void 0),i([P(cc.Label)],e.prototype,"randomNumLabel",void 0),i([P(cc.Node)],e.prototype,"randomVedio",void 0),i([P(cc.Node)],e.prototype,"setUpBtn",void 0),i([P(cc.Node)],e.prototype,"moveOutArea",void 0),i([P(cc.Node)],e.prototype,"chessboardNode",void 0),i([P(cc.Node)],e.prototype,"crushArea",void 0),i([P(cc.Node)],e.prototype,"levelNode",void 0),i([P(cc.Label)],e.prototype,"levelNumLabel",void 0),i([P(cc.Node)],e.prototype,"stageOneNode",void 0),i([P(cc.Node)],e.prototype,"stageTwoNode",void 0),i([P(cc.Node)],e.prototype,"maskStage",void 0),i([P(cc.Prefab)],e.prototype,"propPrefab",void 0),i([w],e)}(cc.Component);o.default=k,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../../pre/item/prop-prefab":"prop-prefab","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/sdk":"sdk","../manager/DateManager":"DateManager","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common","../utils/uma/uma-sdk":"uma-sdk","./chessboard":"chessboard","./crushArea":"crushArea","./gameLayer":"gameLayer"}],gd_language:[function(t,e,o){"use strict";cc._RF.push(e,"82e75ge7rlLCb24BwrY9eZO","gd_language"),Object.defineProperty(o,"__esModule",{value:!0}),o.GDLanguage=void 0,function(t){t.main_screen="1",t.leaderboard="2",t.daily_challenge="3",t.collect="4",t.level_1="5",t.coin_more="6",t.claim_level="7",t.life_more="8",t.life_countdown="9",t.life_more_play="10",t.life_full="11",t.life_1="12",t.unlock_all="13",t.set_up="14",t.set_up_sound_effect="15",t.set_up_music="16",t.set_up_shock="17",t.set_up_contact_service="18",t.set_up_id="19",t.set_up_share="20",t.game_version="21",t.fully="22",t.upgrade_coin="23",t.coin_inadequate="24",t.upgrade="25",t.daily_play="26",t.daily_start="27",t.win_frequency="28",t.collect_title="29",t.wallpaper="30",t.wallpaper_dinner="31",t.wallpaper_lighthouse="32",t.wallpaper_lazy_time="33",t.wallpaper_waiting_alone="34",t.wallpaper_meteor_shower="35",t.wallpaper_quiet_night="36",t.wallpaper_road="37",t.wallpaper_snow="38",t.wallpaper_starry="39",t.wallpaper_commuter_road="40",t.wallpaper_moon="41",t.wallpaper_stay_tuned="42",t.block_bricks="43",t.block_remove="44",t.block_cancel="45",t.block_random="46",t.props_get="47",t.props_buy="48",t.props_free="49",t.chest_level_treasure="50",t.chest_journey="51",t.continue="52",t.pop_claim="53",t.playing_continue="54",t.version_view="55",t.not_enough_space="56",t.time_over="57",t.give_up="58",t.pop_sure="59",t.life_lose="60",t.props_remove_claim="61",t.draw_back="62",t.withdraw="63",t.put_recent="64",t.props_disrupt="65",t.shuffle_unused="66",t.revive_remove="67",t.challenge_unlocked_level="68",t.pop_restart="69",t.pop_quit="70",t.life_run_out="71",t.streak_award="72",t.streak_lose="73",t.challenge_pass="74",t.function_1="75",t.home_return="76",t.pop_player="77",t.life_more_2="78",t.full_1="79",t.pop_stacked="80",t.not_unlocked="81",t.level_new_tomorrow="82",t.level_inadequate="83",t.life_inadequate="84",t.video_see="85",t.map_over="86",t.props_remove_inadequate="87",t.props_cancel_inadequate="88",t.props_random_inadequate="89",t.props_random_claim="90",t.share_fail="91",t.coin_claim_play="92",t.life_full_play="93",t.sprint_level_3="94",t.game_continue="95",t.life_full_already="96",t.tomorrow_play="97",t.more_time="98",t.life_lose_ed="99",t.lose_cookies="100",t.resurrection="101",t.collect_cookie="102",t.ok_title="103",t.wallpaper_harbour="104",t.wallpaper_lamp="105",t.props_cancel_claim="106"}(o.GDLanguage||(o.GDLanguage={})),cc._RF.pop()},{}],getLovePop:[function(t,e,o){"use strict";cc._RF.push(e,"ed619JcknNAHJiwu50VgegD","getLovePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/util"),p=t("../utils/uma/uma-sdk"),d=cc._decorator,h=d.ccclass,f=d.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getLoveBtn=null,e.closeBtn=null,e.titleLabel=null,e.getLoveDescLabel=null,e.getLoveTimeLabel=null,e.descLabel=null,e.receiveLabel=null,e.popNode=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){s.default.addbtnTouchStartScale(this.getLoveBtn),s.default.addbtnTouchEndScale(this.getLoveBtn,this.getLoveFunc.bind(this)),s.default.addbtnTouchCancelScale(this.getLoveBtn),s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.hideGetLovePop.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),this.titleLabel.string=c.default.instance.trans(r.GDLanguage.life_more),this.getLoveDescLabel.string=c.default.instance.trans(r.GDLanguage.life_countdown),this.descLabel.string=c.default.instance.trans(r.GDLanguage.life_more_play),this.receiveLabel.string=c.default.instance.trans(r.GDLanguage.life_1)},e.prototype.showGetLovePop=function(t){this.node.active=!0,this.showPopData=t,console.log("\u83b7\u5f97\u7231\u5fc3\u5f39\u7a97",this.showPopData),cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var e=l.default.updateLoveTime();if(0==e)this.getLoveTimeLabel.string="play";else{var o=u.default.formatTime(e),n=o[2]<10?"0"+o[2]:o[2]+"",a=o[3]<10?"0"+o[3]:o[3]+"";this.getLoveTimeLabel.string=n+":"+a}},e.prototype.getLoveFunc=function(){},e.prototype.hideGetLovePop=function(){this.node.active=!1,p.default.trackEvent("life_refuse")},i([f(cc.Node)],e.prototype,"getLoveBtn",void 0),i([f(cc.Node)],e.prototype,"closeBtn",void 0),i([f(cc.Label)],e.prototype,"titleLabel",void 0),i([f(cc.Label)],e.prototype,"getLoveDescLabel",void 0),i([f(cc.Label)],e.prototype,"getLoveTimeLabel",void 0),i([f(cc.Label)],e.prototype,"descLabel",void 0),i([f(cc.Label)],e.prototype,"receiveLabel",void 0),i([f(cc.Node)],e.prototype,"popNode",void 0),i([h],e)}(cc.Component);o.default=m,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/util":"util","../utils/uma/uma-sdk":"uma-sdk"}],getPropPop:[function(t,e,o){"use strict";cc._RF.push(e,"5d202skrZlNSY1om5DswGw5","getPropPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/sdk"),d=t("../manager/data-manager"),h=t("../manager/GameManager"),f=t("../manager/report-common"),m=cc._decorator,g=m.ccclass,y=m.property,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.closeBtn=null,e.freePropBtn=null,e.popNode=null,e.titleLabel=null,e.descLabel=null,e.buyLabel=null,e.freeLabel=null,e.freeDescLabel=null,e.propImage=null,e.noBlockBtn=null,e.noWhiteBtn=null,e.beginBtn=null,e.freeBtnVideo=null,e.beginBtnVideo=null,e.timeNode=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){s.default.addbtnTouchEndScale(this.mask,this.maskBtnFunc.bind(this)),s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),s.default.addbtnTouchStartScale(this.noBlockBtn),s.default.addbtnTouchEndScale(this.noBlockBtn,this.noBlockBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.noBlockBtn),s.default.addbtnTouchStartScale(this.noWhiteBtn),s.default.addbtnTouchEndScale(this.noWhiteBtn,this.noWhiteBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.noWhiteBtn),s.default.addbtnTouchStartScale(this.freePropBtn),s.default.addbtnTouchEndScale(this.freePropBtn,this.freePropBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.freePropBtn),s.default.addbtnTouchStartScale(this.beginBtn),s.default.addbtnTouchEndScale(this.beginBtn,this.beginBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.beginBtn)},e.prototype.maskBtnFunc=function(){4!=this.showPopData.popType&&5!=this.showPopData.popType&&(this.node.active=!1)},e.prototype.closeBtnFunc=function(){this.node.active=!1,this.showPopData&&this.showPopData.popCallbackCollect&&this.showPopData.popCallbackCollect.exitCallBack()},e.prototype.noBlockBtnFunc=function(){this.node.active=!1,4==this.showPopData.popType?cc.game.emit("showPop",{popName:"failPop",showPopData:{popCallbackCollect:null,failType:2}}):5==this.showPopData.popType&&cc.game.emit(u.EMITKEY.SHOWMAINLAYER)},e.prototype.noWhiteBtnFunc=function(){this.node.active=!1,4!=this.showPopData.popType&&5!=this.showPopData.popType||cc.game.emit(u.EMITKEY.SHOWMAINLAYER)},e.prototype.freePropBtnFunc=function(){console.log("beginBtnFunc ### unLimitVideo = "+h.default.getInstance().unLimitVideo),4==this.showPopData.popType&&h.default.getInstance().sheepMark.resurgenceCount>=1?cc.game.emit(u.EMITKEY.SHOWMAINTIPS,"\u65e0\u590d\u6d3b\u673a\u4f1a"):(this.showPopData&&this.showPopData.popCallbackCollect&&this.showPopData.popCallbackCollect.freeCallBack(this.showPopData.popType),this.updateWxUI())},e.prototype.beginBtnFunc=function(){if(console.log("beginBtnFunc ### unLimitVideo = "+h.default.getInstance().unLimitVideo),h.default.getInstance().unLimitVideo)return cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL),f.default.reportTACommon("challenge_again",{}),void(this.node.active=!1);if(6==this.showPopData.popType)return this.showPopData&&this.showPopData.popCallbackCollect&&this.showPopData.popCallbackCollect.freeCallBack(this.showPopData.popType),void(this.node.active=!1);var t=this,e=l.default.GetVedioID();p.default.watchAdVideo({id:e,success:function(){cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL),f.default.reportTACommon("challenge_again",{}),t.node.active=!1},fail:function(){console.log("\u5931\u8d25")},nofit:function(){t.shareTTAction()}})},e.prototype.shareTTAction=function(){var t=this;if(p.default.isPlatform(p.Platform.wx)){var e=l.default.GetVedioID(),o=l.default.getUserData().openid;p.default.share(o,e,function(){t.shareCbMethod()},function(){cc.game.emit(u.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else if(p.default.isPlatform(p.Platform.tt)){var n={popName:"shareNodePop",showPopData:{type:2,shareCb:this.shareCbMethod.bind(this)}};cc.game.emit("showPop",n)}},e.prototype.shareCbMethod=function(){console.log("\u5206\u4eab\u6210\u529f ######"),cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL),f.default.reportTACommon("challenge_again_share",{}),this.node.active=!1},e.prototype.showGetPropPop=function(t){this.node.active=!0,this.showPopData=t,this.noBlockBtn.active=!1,this.noWhiteBtn.active=!0,this.closeBtn.active=!0,this.freePropBtn.active=!0,this.beginBtn.active=!1,this.beginBtnVideo.active=!0,this.noWhiteBtn.getChildByName("label").getComponent(cc.Label).string="\u4e0d,\u8c22\u8c22",cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var e=t.popType,o="",n="",a="Buy props";if(this.freeLabel.string="\u83b7\u5f97",this.updateWxUI(),1==e)o="rewardIcon/prop_remove.png",a="\u79fb\u51fa\u9053\u5177",n=c.default.instance.trans(r.GDLanguage.draw_back),(i=1-h.default.getInstance().sheepMark.propRemoveCount)<0&&(i=0),this.freeDescLabel.string="("+i+"/1)";else if(2==e)o="rewardIcon/prop_cancel.png",a="\u64a4\u56de\u9053\u5177",n=c.default.instance.trans(r.GDLanguage.put_recent),(i=1-h.default.getInstance().sheepMark.propCancelCount)<0&&(i=0),this.freeDescLabel.string="("+i+"/1)";else if(3==e)o="rewardIcon/prop_random.png",a="\u6d17\u724c\u9053\u5177",n=c.default.instance.trans(r.GDLanguage.shuffle_unused),(i=1-h.default.getInstance().sheepMark.propRandomCount)<0&&(i=0),this.freeDescLabel.string="("+i+"/1)";else if(4==e){var i;o="rewardIcon/prop_life_remove.png",a="\u590d\u6d3b\u5417?",n="\u590d\u6d3b\u5e76\u4f7f\u7528\u79fb\u51fa\u9053\u5177",this.noBlockBtn.active=!0,this.noWhiteBtn.active=!1,this.closeBtn.active=!1,this.freeLabel.string="\u590d\u6d3b",console.log(h.default.getInstance().sheepMark.resurgenceCount),(i=1-h.default.getInstance().sheepMark.resurgenceCount)<0&&(i=0),this.freeDescLabel.string="("+i+"/1)"}else 5==e?(a="\u518d\u6b21\u6311\u6218",this.closeBtn.active=!1,this.freeDescLabel.string="",this.freeLabel.string="\u91cd\u65b0\u6311\u6218",this.noWhiteBtn.getChildByName("label").getComponent(cc.Label).string="\u8fd4\u56de\u7f8a\u7fa4",n="\u89c2\u770b\u89c6\u9891\uff0c\u4ee5\u83b7\u5f971\u6b21\n\u989d\u5916\u7684\u6311\u6218\u673a\u4f1a\u3002",o="rewardIcon/prop_life_one.png",this.freePropBtn.active=!1,this.beginBtn.active=!0,h.default.getInstance().unLimitVideo?(this.beginBtnVideo.active=!1,n="\u5df2\u83b7\u5f97\u65e0\u9650\u6b21\u6570\u6311\u6218\n\u8d76\u7d27\u8bd5\u8bd5\u5427",o="rewardIcon/prop_nolimit.png"):this.beginBtnVideo.active=!0):6==e&&(a="\u518d\u6b21\u6311\u6218",this.freeDescLabel.string="",this.freeLabel.string="\u6311\u6218\u4e00\u6b21",this.noWhiteBtn.getChildByName("label").getComponent(cc.Label).string="\u4e0d,\u8c22\u8c22",n="\u89c2\u770b\u89c6\u9891\uff0c\u4ee5\u83b7\u5f971\u6b21\n\u989d\u5916\u7684\u6311\u6218\u673a\u4f1a\u3002",o="rewardIcon/prop_life_one.png",this.freePropBtn.active=!1,this.beginBtn.active=!0);s.default.changeSpriteFrame(this.propImage,o),this.descLabel.string=n,this.titleLabel.string=a},e.prototype.updateWxUI=function(){var t=this.showPopData.popType;if(l.default.isPlatform(l.GDPlatform.wx)){var e=d.default.getPropData();console.log("propData = ",e);var o=0;h.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY?1==t?o=e.daily.prop_remove:2==t?o=e.daily.prop_cancel:3==t&&(o=e.daily.prop_random):h.default.getInstance().gameType==u.GAMETYPE.GAMETOPIC&&(1==t?o=e.topic.prop_remove:2==t?o=e.topic.prop_cancel:3==t&&(o=e.topic.prop_random)),o>0?s.default.changeSpriteFrame(this.freeBtnVideo,"rewardIcon/reward_share_black.png"):"shareValue"==p.default.wxValue?s.default.changeSpriteFrame(this.freeBtnVideo,"rewardIcon/reward_share_black.png"):s.default.changeSpriteFrame(this.freeBtnVideo,"rewardIcon/reward_video_block.png"),d.default.setPropData(e)}},i([y(cc.Node)],e.prototype,"mask",void 0),i([y(cc.Node)],e.prototype,"closeBtn",void 0),i([y(cc.Node)],e.prototype,"freePropBtn",void 0),i([y(cc.Node)],e.prototype,"popNode",void 0),i([y(cc.Label)],e.prototype,"titleLabel",void 0),i([y(cc.Label)],e.prototype,"descLabel",void 0),i([y(cc.Label)],e.prototype,"buyLabel",void 0),i([y(cc.Label)],e.prototype,"freeLabel",void 0),i([y(cc.Label)],e.prototype,"freeDescLabel",void 0),i([y(cc.Node)],e.prototype,"propImage",void 0),i([y(cc.Node)],e.prototype,"noBlockBtn",void 0),i([y(cc.Node)],e.prototype,"noWhiteBtn",void 0),i([y(cc.Node)],e.prototype,"beginBtn",void 0),i([y(cc.Node)],e.prototype,"freeBtnVideo",void 0),i([y(cc.Node)],e.prototype,"beginBtnVideo",void 0),i([y(cc.Node)],e.prototype,"timeNode",void 0),i([g],e)}(cc.Component);o.default=v,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/sdk":"sdk","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common"}],giftLayerAnimate:[function(t,e,o){"use strict";cc._RF.push(e,"fb227UOAFRM+a9fREJ/Svyr","giftLayerAnimate");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../../pre/itemSub/brickSubPrefab"),l=t("../../pre/itemSub/wallpaperSubPrefab"),u=t("../../pre/main/rewardPrefab"),p=t("../common/CcJsFunc"),d=t("../common/dataTs"),h=t("../common/native/audio"),f=t("../common/spine"),m=cc._decorator,g=m.ccclass,y=m.property,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.lightBg=null,e.titleNode=null,e.gift1Node=null,e.gift2Node=null,e.getBtn=null,e.getBtnLabel=null,e.giftBg=null,e.rewardPrefab=null,e.brickSubPrefab=null,e.wallpaperSubPrefab=null,e.rewardNodeArray=[],e.rewardData=null,e.collectionItem=null,e.ribbonBoxData=null,e.btnCb=null,e.collectionCb=null,e.ribbonCb=null,e}return a(e,t),e.prototype.start=function(){p.default.addbtnTouchStartScale(this.getBtn),p.default.addbtnTouchEndScale(this.getBtn,this.btnEndFunc.bind(this)),p.default.addbtnTouchCancelScale(this.getBtn),this.getBtnLabel.string=c.default.instance.trans(r.GDLanguage.pop_claim)},e.prototype.showRewardLayer=function(t,e,o,n,a,i){if(this.rewardData=t,this.collectionItem=e,this.ribbonBoxData=o,this.node.active=!0,this.titleNode.active=!1,this.gift1Node.active=!1,this.giftBg.active=!1,this.lightBg.active=!1,this.getBtn.scale=0,this.rewardNodeArray=[],this.btnCb=n,this.collectionCb=a,this.ribbonCb=i,t){console.log("\u91d1\u5e01\u5956\u52b1",JSON.stringify(t));for(var r=0;r<2;r++)(g=cc.instantiate(this.rewardPrefab)).x=0,g.y=0,g.scale=0,g.getComponent(u.default).setRewardNode(this.rewardData[r]),this.rewardNodeArray.push(g),this.node.addChild(g);this.playGift1Anim()}else if(e){console.log("\u6536\u85cf\u5956\u52b1");var c=e.wallpaper,p=e.brick,h=d.default.getPictureData();if(c>0){var f=cc.instantiate(this.wallpaperSubPrefab);f.x=0,f.y=0,f.scale=0,f.getComponent(l.default).rewardNodeData(h.bgNum),this.rewardNodeArray.push(f),this.node.addChild(f)}if(p>0){var m=cc.instantiate(this.brickSubPrefab);m.x=0,m.y=0,m.scale=0,m.getComponent(s.default).rewardNodeData(h.brickNum),this.rewardNodeArray.push(m),this.node.addChild(m)}this.playGift2Anim()}else if(o){for(console.log("Ribbon\u5956\u52b1",JSON.stringify(o)),r=0;r0&&cc.tween(this.rewardNodeArray[0]).to(.1,{scale:1.4,y:200}).to(.1,{scale:1}).to(.1,{scale:1.2}).to(.1,{scale:1}).call(function(){t.playAnimationFloat(t.rewardNodeArray[0],10),cc.tween(t.getBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()}).start(),this.collectionItem.brick>0&&cc.tween(this.rewardNodeArray[0]).to(.1,{scale:1.4,y:200}).to(.1,{scale:1}).to(.1,{scale:1.2}).to(.1,{scale:1}).call(function(){t.playAnimationFloat(t.rewardNodeArray[0],10),cc.tween(t.getBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()}).start()},e.prototype.playRibbonAnimationNode=function(){var t=this;if(console.log(this.rewardNodeArray.length),this.rewardNodeArray.length>=4)for(var e=function(e){cc.tween(o.rewardNodeArray[e]).delay(.1).to(.1,{scale:1,x:e%2*240-120,y:250+-200*Math.floor(e/2)}).to(.1,{scale:.8}).to(.1,{scale:1}).to(.1,{scale:.8}).call(function(){t.playAnimationFloat(t.rewardNodeArray[e],10),cc.tween(t.getBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()}).start()},o=this,n=0;n=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../common/enumConfig"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainCultivateLayer=null,e.wardrobeLayer=null,e.touchStartPoint=null,e.pointLength=0,e.scaleCoef=.05*.05,e.touchNum=0,e.maxScale=1,e.moveBigScale=1.5,e.disLength=50,e.oldPosit=null,e.oldScale=1,e.changeClothes=null,e}return a(e,t),e.prototype.start=function(){this.node.on("touchstart",this.touchStartFunc,this),this.node.on("touchmove",this.touchMoveFunc,this),this.node.on("touchend",this.touchEndFunc,this),this.node.on("touchcancel",this.touchCancelFunc,this),this.changeClothes=this.wardrobeLayer.getChildByName("changeClothes")},e.prototype.moveWithRoomId=function(t){var e=this.node.width*this.node.scale/2-cc.winSize.width/2,o=0;t==l.ROOMTYPE.ROOMONE?o=0:t==l.ROOMTYPE.ROOMTWO?o=-e:t==l.ROOMTYPE.ROOMTHREE&&(o=e),cc.tween(this.node).to(.3,{x:o,y:0}).start()},e.prototype.toBigMiddle=function(t){this.oldPosit=this.node.position,this.oldScale=this.node.scale;var e=t.convertToWorldSpaceAR(cc.v2(0,0)),o=cc.winSize.width/2-e.x,n=cc.winSize.height/2-this.disLength-e.y,a=(this.node.x+o)*this.moveBigScale,i=(this.node.y+n)*this.moveBigScale;cc.tween(this.node).to(.3,{x:a,y:i,scale:this.moveBigScale},{easing:cc.easing.cubicOut}).start()},e.prototype.toMinDefault=function(){this.oldPosit&&cc.tween(this.node).to(.2,{x:this.oldPosit.x,y:this.oldPosit.y,scale:this.oldScale}).start(),this.oldPosit=null},e.prototype.touchStartFunc=function(t){var e=t.getLocation();this.touchStartPoint=e,this.pointLength=0,this.touchNum++},e.prototype.touchMoveFunc=function(t){if(this.changeClothes.activeInHierarchy)console.log("changeClothes \u5b58\u5728\u4e0d\u8d70\u6ed1\u52a8\u903b\u8f91");else if(1==t.getTouches().length)this.moveActionFunc(t.getLocation()),this.touchStartPoint=t.getLocation();else if(2==t.getTouches().length){this.touchStartPoint=t.getLocation();var e=t.getTouches()[0].getLocation(),o=t.getTouches()[1].getLocation();if(0==this.pointLength)this.pointLength=e.sub(o).mag();else{var n=e.sub(o).mag(),a=n-this.pointLength,i=Math.abs(a);0!=a&&i>1&&(this.scaleNode(a),this.pointLength=n)}}},e.prototype.touchEndFunc=function(){this.touchNum--,this.pointLength=0},e.prototype.touchCancelFunc=function(){this.touchNum--},e.prototype.scaleNode=function(t){var e=null;if(t>0){var o=this.maxScale;this.node.scaleo?o:e)}else{var n=1;this.node.x<0&&(n=-1);var a=this.node.width*this.node.scale/2;a1&&(e=(e=this.node.scale+this.scaleCoef*t)<1?1:e)}null!=e&&(this.node.scale=e)},e.prototype.moveActionFunc=function(t){var e=t.x-this.touchStartPoint.x,o=t.y-this.touchStartPoint.y;this.node.x=this.node.x+e,this.node.y=this.node.y+o;var n=this.node.width*this.node.scale/2-cc.winSize.width/2,a=this.node.height*this.node.scale/2-cc.winSize.height/2;this.node.x<-n&&(this.node.x=-n),this.node.x>n&&(this.node.x=n),this.node.y<-a&&(this.node.y=-a),this.node.y>a&&(this.node.y=a)},i([s(cc.Node)],e.prototype,"mainCultivateLayer",void 0),i([s(cc.Node)],e.prototype,"wardrobeLayer",void 0),i([c],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../common/enumConfig":"enumConfig"}],http:[function(t,e,o){"use strict";cc._RF.push(e,"0c9d6/yg2FJlZ/64VA6Vfe9","http");var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,n=arguments.length;o0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0&&(d.timeout=p),d.onreadystatechange=function(){if(4==d.readyState)if(d.status>=200&&d.status<400){var t={},n="";try{t=JSON.parse(d.responseText)}catch(a){n=a}""==n?e&&e(t):o&&o(n)}else o&&o("status: "+d.status)},d.open(r,s,!0),i&&d.setRequestHeader("Content-Type",i),d.send(l),d.ontimeout=function(){o&&o("request timeout"),console.log("%c>> %c\u8fde\u63a5\u8d85\u65f6 %c<<","color:red","color:purple","color:red")},d.onerror=function(t){console.warn("request error",t),o&&o(t)}}catch(h){console.warn("request err",h),o&&o(h)}},t.request=function(t){this.requestBeforeFunc&&(t=this.requestBeforeFunc(t)),t.header=t.header?n(n({},t.baseParams),t.header):t.baseParams,cc.sys.platform==cc.sys.WECHAT_GAME?this.wxRequest(t):this.h5Request(t)},t.requestSync=function(t){var e=this;return new Promise(function(o,a){var i=t.success,r=t.fail;try{e.request(n(n({},t),{success:function(t){i&&i(t),o(t)},fail:function(t){r&&r(t),a(t)}}))}catch(c){r&&r(c),a(c)}})},t.requestBeforeFunc=null,t}();o.default=s,cc._RF.pop()},{"query-string":3}],i18n:[function(t,e,o){"use strict";cc._RF.push(e,"1f5a5kEJdNJPatq/K4Gvl0i","i18n");var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},a=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]-1)this._langCode=t;else{var e=t.indexOf("_");if(e>0){var o=t.substring(0,e);l.indexOf(o)>-1&&(this._langCode=o)}else this._langCode=t}console.log("\u5b9e\u9645\u4f7f\u7528\u8bed\u8a00\u7801\uff1a",this._langCode),r.default.langCode=this._langCode,this._langMap={}},t.prototype.init=function(){return n(this,void 0,Promise,function(){var t=this;return a(this,function(){return this.getLanguageCode(),[2,new Promise(function(e){cc.assetManager.loadBundle(cc.resources.name,function(o,n){o||n.load("data/gd_language",cc.JsonAsset,function(o,a){if(!o){var i=a.json;for(var r in i){var c=i[r];t._langMap[r]=c[t.langCode]&&c[t.langCode].length>0?c[t.langCode]:c[t._landCodeDefault]}n.release("data/gd_language",cc.JsonAsset),e()}})})})]})})},t.prototype.trans=function(t){for(var e=[],o=1;o0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/dataTs"),c=t("../common/enumConfig"),s=t("../manager/DateManager"),l=t("../public/network-tool"),u=cc._decorator,p=u.ccclass,d=(u.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.start=function(){var t=s.default.format(c.CALENDARNAMES[8],new Date);console.log("monthKey = ",t)},e.prototype.insertAllMap=function(){var t=[];r.default.loadJsonData("data/map_ids",function(e){t=e,console.log("maps = "+e.length);for(var o=0;o",t.data.map_id);var e=t.data.map_id,o=t.data.map_data;l.default.setLevelMapData(e,o)}})})},i([p],e)}(cc.Component));o.default=d,cc._RF.pop()},{"../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../manager/DateManager":"DateManager","../public/network-tool":"network-tool"}],loadLayer:[function(t,e,o){"use strict";cc._RF.push(e,"4d645A+CV5DRYYMx0geEXPK","loadLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},c=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},s=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]this.progressAll&&(this.loadProgressBar.progress=1,this.loadNum>=this.loadOverNum&&!this.sceneLoadEd&&(console.log("PUSH=>\u52a0\u8f7d\u6210\u529f update"),this.getInfoMainScene()))},e.prototype.start=function(){if(cc.game.on(f.NativeEvent.LeitingGetDeviceInfo,this.leitingGetDeviceInfo,this),cc.game.on(f.NativeEvent.LeitingLoginInfo,this.onLeitingLoginInfo,this),cc.game.on(f.NativeEvent.LeitingLoginErr,this.onLeitingLoginErr,this),this.bgLayer.getChildByName("sp").getComponent(y.default).play("2Grass",0),this.isNeedLogin()){this.descNode.active=!0;var t=cc.sys.localStorage.getItem("gameloading");console.log("loading = ",t),t?(this.beginNode.active=!1,this.arrowBgBase.active=!1,this.userNodeBase.active=!1,this.loginStatusEd=!0):(this.beginNode.active=!0,this.arrowBgBase.active=!0,this.userNodeBase.active=!0)}else this.descNode.active=!1;b.default.getInstance().initData(),this.loadNum=0,this.loadMainScene(),m.default.init(),this.loadCfg(),v.default.instance.init(2048,2048,100),N.registerHeadImgLoader(),u.default.addbtnTouchOriginEndScale(this.userNode,this.userNodeFunc.bind(this)),u.default.addbtnTouchOriginEndScale(this.privacyNode,this.privacyNodeFunc.bind(this)),u.default.addbtnTouchOriginEndScale(this.chooseBg,this.chooseBgFunc.bind(this)),u.default.addbtnTouchOriginEndScale(this.beginNode,this.beginNodeFunc.bind(this)),this.tipsNode.active=!1},e.prototype.userNodeFunc=function(){console.log("\u7528\u6237\u534f\u8bae")},e.prototype.privacyNodeFunc=function(){console.log("\u9690\u79c1\u653f\u7b56")},e.prototype.chooseBgFunc=function(){this.chooseNode.active=!this.chooseNode.active,console.log("\u9009\u62e9 = ",this.chooseNode.activeInHierarchy)},e.prototype.beginNodeFunc=function(){var t=this;if(console.log("\u5f00\u59cb\u6e38\u620f = ",this.chooseNode.activeInHierarchy),!this.chooseNode.activeInHierarchy)return this.tipsNode.active=!0,void setTimeout(function(){t.tipsNode.active=!1},2e3);cc.sys.localStorage.setItem("gameloading","gameloading"),this.loginStatusEd=!0,this.loadCfg()},e.prototype.leitingGetDeviceInfo=function(){var t=p.default.getUserData();if(t&&t.userID&&t.userID.length>0&&d.default.callNative(h.NativeFun.publicParamsInfo,{userId:t.userID}),d.default.deviceInfo){var e={androidid:d.default.deviceInfo.androidId,chennal:"310001",gameCode:"59"};d.default.leitingReport("af_before_login",e)}},e.prototype.onLeitingLoginInfo=function(){this.loginStatusEd=!0,this.loadJson(),_.default.reportTACommon("login",{login_type:"\u6b63\u5e38\u767b\u5f55"}),d.default.loginInfo&&(d.default.loginInfo.userId,d.default.media);var t={};if(d.default.deviceInfo){var e=p.default.getUserData();t={androidid:d.default.deviceInfo.androidId,chennal:"310001",gameCode:"59",userId:e.userID,type:2,roldId:d.default.deviceInfo.gaid}}var o={};d.default.loginInfo&&(e=p.default.getUserData(),o={loginType:"1",chennal:d.default.loginInfo.channelNo,gameCode:"59",userId:e.userID,type:2,serviceName:"\u6d77\u5916\u6d4b\u8bd5\u670d",serviceId:"1",loginMode:"1",playLevelId:e.playLevelId});var n=i(i({},t),o);d.default.leitingReport("af_login",n)},e.prototype.onLeitingLoginErr=function(){this.loginStatusEd=!0,this.loadJson()},e.prototype.loadCfg=function(){return c(this,void 0,Promise,function(){return s(this,function(t){switch(t.label){case 0:return[4,l.default.instance.init()];case 1:return t.sent(),this.isNeedLogin()?this.loginStatusEd&&this.loadJson():this.loadJson(),[2]}})})},e.prototype.isNeedLogin=function(){return!!(g.default.isPlatform(g.Platform.android)||g.default.isPlatform(g.Platform.oppo)||g.default.isPlatform(g.Platform.vivo))},e.prototype.loadJson=function(){var t=this;p.default.initData(function(){console.log("JSON\u52a0\u8f7d\u5b8c\u6210");var e=p.default.getUserData();C.default.setUserid(e.userID);var o=p.default.getHourseUnlockData(),n=0;if(o.length){var a=o[o.length-1];for(var i in a)if(!a[i].unlock){n=a[i].unlockID;break}}for(var r in n||o.length,e.dailyData)for(var c in e.dailyData[r])e.dailyData[r][c].isWin;t.loadScene()}),_.default.initTA()},e.prototype.loadMainScene=function(){var t=this;cc.director.preloadScene("game",function(){},function(){console.log("PUSH=>\u4e3b\u573a\u666f\u52a0\u8f7d\u5b8c\u6210"),t.loadScene()})},e.prototype.loadScene=function(){this.loadNum+=1,console.log("PUSH=>",this.loadNum),this.loadNum>=this.loadOverNum&&this.progressCurrent>=this.progressAll&&!this.sceneLoadEd&&(console.log("PUSH=>loadScene\u52a0\u8f7d\u6210\u529f"),this.getInfoMainScene())},e.prototype.getInfoMainScene=function(){this.sceneLoadEd=!0,_.default.reportTACommon("app_start",{step:"\u542f\u52a8"}),cc.director.loadScene("game",function(){console.log("PUSH=>\u8fdb\u5165\u4e3b\u573a\u666f")})},r([k(cc.Node)],e.prototype,"bgLayer",void 0),r([k(cc.ProgressBar)],e.prototype,"loadProgressBar",void 0),r([k(cc.Node)],e.prototype,"descNode",void 0),r([k(cc.Node)],e.prototype,"userNode",void 0),r([k(cc.Node)],e.prototype,"privacyNode",void 0),r([k(cc.Node)],e.prototype,"chooseNode",void 0),r([k(cc.Node)],e.prototype,"chooseBg",void 0),r([k(cc.Node)],e.prototype,"beginNode",void 0),r([k(cc.Node)],e.prototype,"tipsNode",void 0),r([k(cc.Node)],e.prototype,"arrowBgBase",void 0),r([k(cc.Node)],e.prototype,"userNodeBase",void 0),r([P],e)}(cc.Component);o.default=S,cc._RF.pop()},{"../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/native/native-bridge":"native-bridge","../common/native/native-def":"native-def","../common/native/native-event":"native-event","../common/native/share":"share","../common/sdk":"sdk","../common/spine":"spine","../effect/player-head-atlas":"player-head-atlas","../manager/GameManager":"GameManager","../manager/report-common":"report-common","../tools/register-head-image":"register-head-image","../utils/uma/uma-sdk":"uma-sdk"}],loseCookiePop:[function(t,e,o){"use strict";cc._RF.push(e,"8756cpkvkBHlIyfdBoS6jSg","loseCookiePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.popNode=null,e.titleLabel=null,e.descLabel=null,e.numLabel=null,e.exitLabel=null,e.restartLabel=null,e.mainLabel=null,e.restartBtn=null,e.closeBtn=null,e.mainMenuBtn=null,e.exitBtn=null,e.heartNode=null,e.cookieNumLabel=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){cc.game.on("blowupHeartAnim",this.blowupHeartAnimFunc,this),s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.hideLoseLovePop.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),s.default.addbtnTouchStartScale(this.restartBtn),s.default.addbtnTouchEndScale(this.restartBtn,this.restartFunc.bind(this)),s.default.addbtnTouchCancelScale(this.restartBtn),s.default.addbtnTouchStartScale(this.mainMenuBtn),s.default.addbtnTouchEndScale(this.mainMenuBtn,this.returnMainMenuFunc.bind(this)),s.default.addbtnTouchCancelScale(this.mainMenuBtn),s.default.addbtnTouchStartScale(this.exitBtn),s.default.addbtnTouchEndScale(this.exitBtn,this.exitBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.exitBtn),this.setupFonts()},e.prototype.setupFonts=function(){this.titleLabel.string=c.default.instance.trans(r.GDLanguage.pop_sure),this.restartLabel.string=c.default.instance.trans(r.GDLanguage.pop_restart),this.exitLabel.string=c.default.instance.trans(r.GDLanguage.pop_quit),this.mainLabel.string=c.default.instance.trans(r.GDLanguage.main_screen),this.descLabel.string=c.default.instance.trans(r.GDLanguage.lose_cookies)},e.prototype.blowupHeartAnimFunc=function(t){0==t?this.node.active=!1:1==t&&cc.tween(this.heartNode).to(.2,{scale:1.2}).to(.1,{scale:1}).start()},e.prototype.showPop=function(t){this.node.active=!0,this.showPopData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.restartBtn.active=!1,this.mainMenuBtn.active=!1,this.exitBtn.active=!1,0==this.showPopData.popType?(this.restartBtn.active=!0,this.mainMenuBtn.active=!0,this.popNode.height=700):1==this.showPopData.popType&&(this.exitBtn.active=!0,this.popNode.height=600),this.cookieNumLabel.getComponent(cc.Label).string="x"+l.default.getInstance().cookieDict.cookieCurCount},e.prototype.hideLoseLovePop=function(){this.node.active=!1,cc.game.emit("blowupHeartAnim",0)},e.prototype.restartFunc=function(){this.exitBtnFunc()},e.prototype.returnMainMenuFunc=function(){this.exitBtnFunc()},e.prototype.exitBtnFunc=function(){this.node.active=!1,cc.game.emit("blowupHeartAnim",1)},i([d(cc.Node)],e.prototype,"mainLayer",void 0),i([d(cc.Node)],e.prototype,"popNode",void 0),i([d(cc.Label)],e.prototype,"titleLabel",void 0),i([d(cc.Label)],e.prototype,"descLabel",void 0),i([d(cc.Label)],e.prototype,"numLabel",void 0),i([d(cc.Label)],e.prototype,"exitLabel",void 0),i([d(cc.Label)],e.prototype,"restartLabel",void 0),i([d(cc.Label)],e.prototype,"mainLabel",void 0),i([d(cc.Node)],e.prototype,"restartBtn",void 0),i([d(cc.Node)],e.prototype,"closeBtn",void 0),i([d(cc.Node)],e.prototype,"mainMenuBtn",void 0),i([d(cc.Node)],e.prototype,"exitBtn",void 0),i([d(cc.Node)],e.prototype,"heartNode",void 0),i([d(cc.Node)],e.prototype,"cookieNumLabel",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../manager/GameManager":"GameManager"}],loseLovePop:[function(t,e,o){"use strict";cc._RF.push(e,"86deeGjM+dBbIIFyxI9LHFp","loseLovePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/enumConfig"),s=t("../manager/data-manager"),l=t("../manager/report-common"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.titleNode=null,e.titleLabel=null,e.descNode=null,e.closeBtn=null,e.giveupBtn=null,e.noGiveupBtn=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.mask,this.hideLoseLovePop.bind(this)),r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.hideLoseLovePop.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn),r.default.addbtnTouchStartScale(this.giveupBtn),r.default.addbtnTouchEndScale(this.giveupBtn,this.giveupBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.giveupBtn),r.default.addbtnTouchStartScale(this.noGiveupBtn),r.default.addbtnTouchEndScale(this.noGiveupBtn,this.noGiveupBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.noGiveupBtn)},e.prototype.showLoseLovePop=function(t){this.node.active=!0,this.showPopData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),0==this.showPopData.popType?(this.popNode.height=715,this.descNode.active=!0):1==this.showPopData.popType&&(this.popNode.height=601,this.descNode.active=!1)},e.prototype.hideLoseLovePop=function(){this.node.active=!1},e.prototype.giveupBtnFunc=function(){console.log("\u6253\u5f00\u4e3b\u9875\u9762"),cc.game.emit(c.EMITKEY.SHOWMAINLAYER);var t=s.default.getTAUserInfo();l.default.reportTACommon("game_give_up",t)},e.prototype.noGiveupBtnFunc=function(){this.node.active=!1},i([d(cc.Node)],e.prototype,"mask",void 0),i([d(cc.Node)],e.prototype,"popNode",void 0),i([d(cc.Node)],e.prototype,"titleNode",void 0),i([d(cc.Label)],e.prototype,"titleLabel",void 0),i([d(cc.Node)],e.prototype,"descNode",void 0),i([d(cc.Node)],e.prototype,"closeBtn",void 0),i([d(cc.Node)],e.prototype,"giveupBtn",void 0),i([d(cc.Node)],e.prototype,"noGiveupBtn",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/enumConfig":"enumConfig","../manager/data-manager":"data-manager","../manager/report-common":"report-common"}],"main-cookie-reward":[function(t,e,o){"use strict";cc._RF.push(e,"98ef1B9rVlIgINOcS1NN8Sh","main-cookie-reward");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../pre/main/cookiePrefab"),c=t("../../common/CcJsFunc"),s=t("../../common/dataTs"),l=t("../../common/enumConfig"),u=t("../../common/spine"),p=t("../../common/util"),d=t("../../manager/GameManager"),h=t("../../manager/report-common"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.clickBtn=null,e.cookieImg=null,e.progressBar=null,e.progressLabel=null,e.rewardImage=null,e.rewardNumLabel=null,e.clockSpine=null,e.timeLabel=null,e.cookiePrefab=null,e.startNode=null,e.updateTime=0,e.progressOld=0,e.progressNew=0,e.isUpdate=!1,e.rewardData=null,e.cookieNum=0,e.rewardCallback=null,e}return a(e,t),e.prototype.update=function(t){this.updateTime+=t,this.updateTime>=1&&(this.updateTime-=1,this.updateTimeNum()),this.isUpdate&&(this.progressOld+=15*t,this.progressOld0?this.timeLabel.string=o[0]+"d"+o[1]+"h":o[1]>0?this.timeLabel.string=o[1]+"h"+o[2]+"m":o[2]>0?this.timeLabel.string=o[2]+"m"+o[3]+"s":o[3]>0&&(this.timeLabel.string=o[2]+"m"+o[3]+"s")}}},e.prototype.start=function(){this.clockSpine.getComponent(u.default).play("5Clock1",0),this.updateSubViewFunc(),this.updateTimeNum()},e.prototype.updateSubViewFunc=function(){var t=s.default.gameConfigData.baseConfigData.cookieReward;console.log("cookieReward",JSON.stringify(t));var e=s.default.getCookieRewardData();console.log("cookieData",JSON.stringify(e)),console.log("cookieDict",JSON.stringify(d.default.getInstance().cookieDict)),this.progressNew=e.cookieNum,this.progressOld=e.cookieNum-d.default.getInstance().cookieDict.cookie,this.progressOld<0&&(this.progressOld=0);var o=e.progress;o>=3&&(o=0,e.progress=o,s.default.setCookieRewardData(e)),this.rewardData=t[o],console.log("rewardData",JSON.stringify(this.rewardData));var n=e.cookieNum;n>=this.rewardData.cookieNum&&(n=this.rewardData.cookieNum),this.progressLabel.string=n+"/"+this.rewardData.cookieNum,this.rewardNumLabel.string=this.rewardData.rewardCount+"",this.progressBar.progress=this.progressOld/this.rewardData.cookieNum;var a="rewardIcon/"+this.rewardData.rewardType+".png";c.default.changeSpriteFrame(this.rewardImage,a),d.default.getInstance().cookieDict.cookie=0,d.default.getInstance().cookieDict.cookieCurCount=0,console.log("\u6e05\u7a7acookieDict",d.default.getInstance().cookieDict),this.cookieNum=n},e.prototype.checkProgressFunc=function(){if(this.cookieNum>=this.rewardData.cookieNum){this.getRewardFunc();var t=s.default.getCookieRewardData();t.progress+=1,t.progress>3&&(t.progress=0),t.cookieNum>this.rewardData.cookieNum?(console.log("\u591a\u7684\u997c\u5e72\u8ba1\u5165\u4e0b\u4e00\u5956\u52b1",t.cookieNum-this.rewardData.cookieNum),t.cookieNum=t.cookieNum-this.rewardData.cookieNum,d.default.getInstance().cookieDict.cookie=t.cookieNum):t.cookieNum=0,s.default.setCookieRewardData(t),this.updateSubViewFunc(),this.isUpdate=!0}else cc.game.emit(l.EMITKEY.HIDEMASKLAYER)},e.prototype.callbackFunc=function(){console.log("\u5956\u52b1\u64ad\u653e\u6210\u529f ######"),cc.game.emit(l.EMITKEY.HIDEMASKLAYER),cc.game.emit(l.EMITKEY.MAINUPDATEUI)},e.prototype.rewardCallbackFunc=function(){this.rewardCallback&&this.rewardCallback()},e.prototype.getRewardFunc=function(){console.log("\u9886\u53d6\u5956\u52b1",JSON.stringify(this.rewardData));var t=s.default.getUserData(),e=this.rewardData.rewardType;if("reward_fish"==e)t.fish+=this.rewardData.rewardCount;else{t[e]+=this.rewardData.rewardCount;var o,n=0,a="";"prop_remove"==e?(n=1,a="\u79fb\u51fa\u9053\u5177"):"prop_cancel"==e?(n=2,a="\u64a4\u9500\u9053\u5177"):"prop_random"==e&&(n=3,a="\u6d17\u724c\u9053\u5177"),o=t[e],h.default.reportTACommon("item_get",{item_id:n,item_type:"\u6d88\u8017\u9053\u5177",item_name:a,change_num:1,num_before:o-1,num_after:o,action:"\u997c\u5e72\u6d3b\u52a8\u5f00\u542f\u5b9d\u7bb1",reason:"\u5b9d\u7bb1\u83b7\u5f97\u9053\u5177"})}s.default.saveUserData(t);var i={popName:"showRewardPop",showPopData:{popCallbackCollect:null,rewardData:this.rewardData,startNode:this.rewardImage,endNode:this.startNode,popType:1,callback:this.callbackFunc.bind(this),rewardCallback:this.rewardCallbackFunc.bind(this)}};cc.game.emit("showPop",i)},e.prototype.checkCookie=function(t,e){if(this.rewardCallback=e,console.log("cookieDict",d.default.getInstance().cookieDict),d.default.getInstance().cookieDict.cookie<=0)return console.log("cookie <= 0 ######"),void(t&&t());var o=this,n=c.default.getWorldPosition(this.startNode),a=c.default.getNodePosition(this.node,n),i=c.default.getWorldPosition(this.cookieImg),s=c.default.getNodePosition(this.node,i),u=cc.instantiate(this.cookiePrefab);this.node.addChild(u),u.getComponent(r.default).showData(1,d.default.getInstance().cookieDict.cookie),u.position=cc.v3(a),u.scale=0,cc.tween(u).to(.2,{scale:1.2}).to(.2,{scale:1}).delay(.2).to(.3,{position:cc.v3(a.x+10,a.y-10)}).to(.3,{position:cc.v3(a.x-12,a.y-12)}).to(.5,{position:cc.v3(s)}).call(function(){u.destroy(),cc.tween(o.cookieImg).to(.1,{scale:1.2}).to(.1,{scale:1}).call(function(){t&&t(),o.updateSubViewFunc(),cc.game.emit(l.EMITKEY.HIDEMASKLAYER),o.isUpdate=!0}).start()}).start()},i([g(cc.Node)],e.prototype,"clickBtn",void 0),i([g(cc.Node)],e.prototype,"cookieImg",void 0),i([g(cc.ProgressBar)],e.prototype,"progressBar",void 0),i([g(cc.Label)],e.prototype,"progressLabel",void 0),i([g(cc.Node)],e.prototype,"rewardImage",void 0),i([g(cc.Label)],e.prototype,"rewardNumLabel",void 0),i([g(cc.Node)],e.prototype,"clockSpine",void 0),i([g(cc.Label)],e.prototype,"timeLabel",void 0),i([g(cc.Prefab)],e.prototype,"cookiePrefab",void 0),i([g(cc.Node)],e.prototype,"startNode",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../../../pre/main/cookiePrefab":"cookiePrefab","../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/spine":"spine","../../common/util":"util","../../manager/GameManager":"GameManager","../../manager/report-common":"report-common"}],"main-rank":[function(t,e,o){"use strict";cc._RF.push(e,"9b6efOXGmVLpb6Xc/L4u6Jt","main-rank");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]\u83b7\u53d6\u7528\u6237\u4fe1\u606f\u6210\u529f = ",g.default.rankUserInfo),t.label=2;case 2:return console.log("PUSH=>\u8bf7\u6c42\u7f51\u7edc\u6570\u636e ######"),this.getStageInfo(),this.getRankInfo(),[2]}})})},e.prototype.orderby=function(t,e){if(t.length<=1)return t;for(var o=Math.floor(t.length/2),n=t.splice(o,1)[0],a=[],i=[],r=0,c=t;r0||o[i].fail_score\u821e\u53f0"),t.setInfoData(e)):(console.log("\u7f13\u5b58\u6570\u636e\u8fc7\u671f->\u821e\u53f0"),l.default.getStageInfoData(function(e){t.setInfoData(e),g.default.setStageData(e)}))},e.prototype.setInfoData=function(t){this.stageInfo=t.data,this.setStageInfo()},e.prototype.getRankInfo=function(){f.default.getInstance().game_over>0&&f.default.getInstance().playGameCount<2&&p.default.removeItem(d.STORAGEKEY.RANKDATA);var t=this,e=g.default.getRankData();e?(console.log("\u4f7f\u7528\u672c\u5730\u7f13\u5b58\u6570\u636e->\u6392\u884c\u699c\u6570\u636e"),t.setRankData(e)):(console.log("\u672c\u5730\u7f13\u5b58\u6570\u636e\u4e0d\u5b58\u5728\u6216\u5df2\u8fc7\u671f->\u6392\u884c\u699c\u6570\u636e"),l.default.getRankInfoData(function(e){t.setRankData(e),g.default.setRankData(e)}))},e.prototype.setRankData=function(t){this.setSubViewData(t.data.list),f.default.getInstance().rankInfo=t.data,this.mainUILayer.getComponent(y.default).showBottomRankNode(t.data.user)},e.prototype.setStageInfo=function(){var t=this.stageInfo;this.capSp.active=!1,this.sunglassesSp.active=!1,this.hairSp.active=!1,this.catNodeIcon.opacity=0,this.sunNodeIcon.opacity=0,this.hairNodeIcon.opacity=0,this.catNodeIconWoman.opacity=0,this.sunNodeIconWoman.opacity=0,this.hairNodeIconWoman.opacity=0,t.firstWin&&t.firstWin.nick_name&&t.firstWin.nick_name.length&&(this.capSp.active=!0,console.log("info.firstWin.gender = "+t.firstWin.gender),0==t.firstWin.gender?(this.catNodeIcon.opacity=255,u.default.setAvatar(this.catNodeIcon,t.firstWin.avatar)):(this.catNodeIconWoman.opacity=255,u.default.setAvatar(this.catNodeIconWoman,t.firstWin.avatar))),t.iqWin&&t.iqWin.nick_name&&t.iqWin.nick_name.length?(this.sunglassesSp.active=!0,this.sunglassesSp.getComponent(h.default).play("Stage1",0),console.log("info.iqWin.gender = "+t.iqWin.gender),0==t.iqWin.gender?(this.sunNodeIcon.opacity=255,u.default.setAvatar(this.sunNodeIcon,t.iqWin.avatar)):(this.sunNodeIconWoman.opacity=255,u.default.setAvatar(this.sunNodeIconWoman,t.iqWin.avatar))):(this.sunglassesSp.active=!0,this.sunglassesSp.getComponent(h.default).play("Stage0",0)),t.timeWin&&t.timeWin.nick_name&&t.timeWin.nick_name.length&&(this.hairSp.active=!0,console.log("info.firstWin.gender = "+t.firstWin.gender),0==t.timeWin.gender?(this.hairNodeIcon.opacity=255,u.default.setAvatar(this.hairNodeIcon,t.timeWin.avatar)):(this.hairNodeIconWoman.opacity=255,u.default.setAvatar(this.hairNodeIconWoman,t.timeWin.avatar)))},e.prototype.onDisable=function(){this.node.stopAllActions()},e.prototype.setSubViewData=function(t){var e=this;void 0===t&&(t=[]);var o=this,n=p.default.getUserData().userID,a=!1;for(var i in t)if((l=(_=t[i]).result)&&l.length){var r=JSON.parse(l);for(var c in r)if(r[c].uid==Number(n)){a=!0;break}}if(0==a){var s=g.default.rankUserInfo;if(s&&s.region&&s.region.length)for(var i in t){var l=(_=t[i]).result;if(s.region==_.name){if(l&&l.length){var u=[];(r=JSON.parse(l)).length>=36&&(r[18]=s);for(var h=0;h=0||(o=o.slice(0,o.length-1),o+=this.IsUpper(a)?a.toLowerCase():a.toUpperCase(),t.indexOf(o)>=0)))return!1}return!0},e.prototype.IsUpper=function(t){return t===t.toUpperCase()},i([P({type:cc.Node,tooltip:"mainUILayer"})],e.prototype,"mainUILayer",void 0),i([P({type:cc.Node,tooltip:"\u80cc\u666fspine"})],e.prototype,"bgSp",void 0),i([P({type:cc.Node,tooltip:"\u5e3d\u5b50\u7f8aspine"})],e.prototype,"capSp",void 0),i([P({type:cc.Node,tooltip:"\u58a8\u955c\u7f8aspine"})],e.prototype,"sunglassesSp",void 0),i([P({type:cc.Node,tooltip:"\u957f\u53d1\u7f8aspine"})],e.prototype,"hairSp",void 0),i([P({type:cc.Prefab,tooltip:"\u7f8a\u7fa4"})],e.prototype,"sheepFlock",void 0),i([P({type:cc.Node,tooltip:"\u5b9a\u4f4d\u6309\u94ae"})],e.prototype,"positionNode",void 0),i([P({type:cc.Node,tooltip:"\u5b9a\u4f4d\u6309\u94ae\u5934\u50cf"})],e.prototype,"positionNodeIcon",void 0),i([P({type:cc.Node,tooltip:"\u5b9a\u4f4d\u6309\u94ae\u56fe\u6807"})],e.prototype,"positionNodeCycle",void 0),i([P({type:cc.Node,tooltip:"\u8dd1\u9a6c\u706f"})],e.prototype,"scrollMsg",void 0),i([P({type:cc.Node,tooltip:"\u5934\u50cf"})],e.prototype,"iconNode",void 0),i([w],e)}(cc.Component);o.default=k,cc._RF.pop()},{"../api/ApiTool":"ApiTool","../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/spine":"spine","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common","../module/ScrollMsg":"ScrollMsg","../module/sheep-flock":"sheep-flock","./mainUiLayer":"mainUiLayer"}],"main-tabbar":[function(t,e,o){"use strict";cc._RF.push(e,"66a40jaUH5JALG1+2y2R2kp","main-tabbar");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../manager/GameManager"),d=t("../manager/report-common"),h=t("../utils/uma/uma-sdk"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainPage=null,e.pageMain=null,e.pageDaily=null,e.pageCollect=null,e.tabbarMain=null,e.tabbarDaily=null,e.tabbarCollect=null,e.pageContent=null,e.tabbarArr=[],e.updateTime=0,e}return a(e,t),e.prototype.update=function(t){this.updateTime+=t,this.updateTime},e.prototype.start=function(){cc.game.on(u.EMITKEY.MAINUPDATEUI,this.setMainLayerData,this),cc.game.on(u.EMITKEY.UPDATETABBARRECEIVE,this.updateTabbar,this),this.pageContent=this.mainPage.getChildByName("pageContent"),s.default.addbtnTouchEndScale(this.tabbarCollect,this.tabbarAction.bind(this,0)),s.default.addbtnTouchEndScale(this.tabbarMain,this.tabbarAction.bind(this,1)),s.default.addbtnTouchEndScale(this.tabbarDaily,this.tabbarAction.bind(this,2)),this.tabbarArr.push(this.tabbarCollect),this.tabbarArr.push(this.tabbarMain),this.tabbarArr.push(this.tabbarDaily),this.pageCollect.x=0,this.pageMain.x=750,this.pageDaily.x=1500,this.updateTabbar(1,!1),this.setMainLayerData(),this.setupFonts()},e.prototype.setupFonts=function(){var t=c.default.instance.trans(r.GDLanguage.collect);this.tabbarCollect.getChildByName("icon-label").getComponent(cc.Label).string=t;var e=c.default.instance.trans(r.GDLanguage.main_screen);this.tabbarMain.getChildByName("icon-label").getComponent(cc.Label).string=e;var o=c.default.instance.trans(r.GDLanguage.daily_challenge);this.tabbarDaily.getChildByName("icon-label").getComponent(cc.Label).string=o},e.prototype.onEnable=function(){this.setMainLayerData()},e.prototype.setMainLayerData=function(){var t=p.default.getInstance().collectionMark;0==t.bgNum&&0==t.brickNum&&(p.default.getInstance().collectionMark.tabbarCollection=!1),p.default.getInstance().collectionMark.tabbarCollection?this.tabbarCollect.getChildByName("icon-mark").active=!0:this.tabbarCollect.getChildByName("icon-mark").active=!1},e.prototype.tabbarAction=function(t){s.default.addClickAudio(),this.updateTabbar(t),t!=u.MAINPAGE.PAGEDAILY?p.default.getInstance().tabbarIsDaily&&(console.log("\u70b9\u51fb\u4e86\u6bcf\u65e5\u6311\u6218\uff0c\u6ca1\u73a9"),h.default.trackEvent("daily_return"),d.default.reportTACommon("daily_return",{})):p.default.getInstance().tabbarIsDaily=!0},e.prototype.updateTabbar=function(t,e){void 0===e&&(e=!0);var o=this;if(2==t&&l.default.getUserData().playLevelId<14)cc.game.emit("showPop",{popName:"nothingPop",showPopData:{popCallbackCollect:null,popType:3}});else{for(var n in p.default.getInstance().mainPage=t,this.tabbarArr){var a=this.tabbarArr[n];t==Number(n)?(a.getChildByName("bg-icon-nor").active=!1,a.getChildByName("bg-icon-sel").active=!0,a.getChildByName("icon-nor").active=!1,a.getChildByName("icon-sel").active=!0):(a.getChildByName("bg-icon-nor").active=!0,a.getChildByName("bg-icon-sel").active=!1,a.getChildByName("icon-nor").active=!0,a.getChildByName("icon-sel").active=!1)}var i=e?.3:0,r=0,c=null;switch(t){case 0:r=0,c=this.pageCollect;break;case 1:r=-750,c=this.pageMain;break;case 2:r=-1500,c=this.pageDaily}c&&(c.active=!0),this.pageContent.stopAllActions(),cc.tween(this.pageContent).to(i,{x:r}).call(function(){o.hideOtherNode(c)}).start(),cc.game.emit(u.EMITKEY.UPDATETABBARSEND,t),this.setMainLayerData()}},e.prototype.hideOtherNode=function(t){var e=this.mainPage.getChildByName("pageContent").children;for(var o in e)t&&t!=e[o]&&(e[o].active=!1)},i([g(cc.Node)],e.prototype,"mainPage",void 0),i([g(cc.Node)],e.prototype,"pageMain",void 0),i([g(cc.Node)],e.prototype,"pageDaily",void 0),i([g(cc.Node)],e.prototype,"pageCollect",void 0),i([g(cc.Node)],e.prototype,"tabbarMain",void 0),i([g(cc.Node)],e.prototype,"tabbarDaily",void 0),i([g(cc.Node)],e.prototype,"tabbarCollect",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../manager/GameManager":"GameManager","../manager/report-common":"report-common","../utils/uma/uma-sdk":"uma-sdk"}],mainCanvas:[function(t,e,o){"use strict";cc._RF.push(e,"53853D2Qg1AFKoc4UUFQ6nI","mainCanvas");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r,c,s=t("../common/enumConfig"),l=t("../common/native/audio"),u=t("../common/native/tt-sdk"),p=t("../common/sdk"),d=t("../manager/GameManager"),h=t("../manager/report-common"),f=cc._decorator,m=f.ccclass,g=f.property;(function(t){t[t.ready=0]="ready",t[t.recording=1]="recording",t[t.stop=2]="stop",t[t.pause=3]="pause"})(r||(r={})),function(t){t[t.RestartRecord=0]="RestartRecord",t[t.ShareMessage=1]="ShareMessage"}(c||(c={}));var y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.gameLayer=null,e.status=r.ready,e.recordFinishAction=c.RestartRecord,e.timer=0,e}return a(e,t),e.prototype.start=function(){var t=this;this.mainLayer.active=!0,this.gameLayer.active=!1,cc.game.on(s.EMITKEY.TTSTARTRECORD,this.beginRecordFunc,this),cc.game.on(s.EMITKEY.TTSTOPRECORD,this.stopRecordFunc,this),cc.game.on(s.EMITKEY.TTSHARERECORD,this.shareRecordFunc,this),this.ttRewardInit(),this.scheduleOnce(function(){t.beginRecord()},2),p.default.setOnShow(function(){console.log("on Show"),l.default.playBGM()}),p.default.setOnHide(function(){console.log("on Hide"),l.default.playBGM()})},e.prototype.beginRecordFunc=function(){this.status!=r.recording&&this.beginRecord()},e.prototype.stopRecordFunc=function(){this.stopRecord()},e.prototype.ttRewardInit=function(){if(cc.sys.platform==cc.sys.BYTEDANCE_GAME){var t=tt.getGameRecorderManager();t.onStart(this.recordStart.bind(this)),t.onStop(this.recordStop.bind(this)),t.onPause(this.recordPause.bind(this)),t.onResume(this.recordResume.bind(this))}},e.prototype.beginRecord=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(console.log("beginRecord ###### "),d.default.getInstance().videoDuration=0,u.default.recorderStart())},e.prototype.stopRecord=function(){u.default.recorderStop()},e.prototype.recordStart=function(){console.log("record start"),d.default.getInstance().videoDuration=0,this.status=r.recording,this.initStatus()},e.prototype.recordStop=function(t){console.log("record stop",t.videoPath),u.default.setVideoPath(t.videoPath),d.default.getInstance().videoPath=t.videoPath,this.status=r.stop,this.initStatus()},e.prototype.recordPause=function(){console.log("record pause"),this.status=r.pause,this.initStatus()},e.prototype.recordResume=function(){console.log("record resume"),this.status=r.recording,this.initStatus()},e.prototype.update=function(t){this.timer+=t,d.default.getInstance().bulletTime+=t,this.status==r.recording&&(d.default.getInstance().videoDuration+=t),this.timer>=1&&(this.timer=0,this.status==r.recording&&this.initStatus())},e.prototype.initStatus=function(){if(d.default.getInstance().videoDuration>=300){u.default.recorderStop();var t=this;this.scheduleOnce(function(){t.beginRecord()},2)}if(d.default.getInstance().videoDuration<1)switch(this.status){case r.ready:console.log("\u5f55\u5236 ###### ");break;case r.recording:console.log("\u5f55\u5236\u4e2d...... ###### ");break;case r.pause:console.log("\u6682\u505c\u5f55\u5236...... ###### ");break;case r.stop:console.log("\u5f55\u5236...... ###### ")}},e.prototype.recordBtnAction=function(){switch(console.log("video tip status:",this.status,r[this.status]),this.status){case r.ready:d.default.getInstance().videoDuration=0,u.default.recorderStart();break;case r.recording:u.default.recorderPause();break;case r.pause:u.default.recorderResume();break;case r.stop:u.default.recorderStart(),this.status=r.recording,d.default.getInstance().videoDuration=0}this.initStatus()},e.prototype.shareRecordFunc=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(h.default.reportTACommon("share_click",{}),d.default.getInstance().videoDuration<3?cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u5f55\u5c4f\u5c0f\u4e8e3s\uff0c\u65e0\u6cd5\u5206\u4eab"):(u.default.recorderStop(),this.showPop()))},e.prototype.showPop=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(console.log("\u6211\u8981\u70ab\u8000 = ",d.default.getInstance().videoPath),d.default.getInstance().videoPath&&0!=d.default.getInstance().videoPath.length?u.default.shareAppMessage({url:d.default.getInstance().videoPath,success:function(){u.default.recorderStart()},fail:function(){u.default.recorderStart()}}):u.default.recorderStart())},i([g(cc.Node)],e.prototype,"mainLayer",void 0),i([g(cc.Node)],e.prototype,"gameLayer",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/native/tt-sdk":"tt-sdk","../common/sdk":"sdk","../manager/GameManager":"GameManager","../manager/report-common":"report-common"}],mainCultivateLayer:[function(t,e,o){"use strict";cc._RF.push(e,"a504aoDOgxNhZMyOCq1oDJZ","mainCultivateLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/main/catClawPrefabs"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../common/native/audio"),p=t("../common/spine"),d=t("../manager/GameManager"),h=t("../utils/uma/uma-sdk"),f=t("./catNode"),m=t("./houseLayer"),g=t("./upgrade-tip"),y=t("./wardrobeLayer"),v=cc._decorator,b=v.ccclass,_=v.property,N=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainUILayer=null,e.wholeBuildHouse=null,e.wardrobeLayer=null,e.houseLayer=null,e.topUiLayer=null,e.particlePrefab=null,e.upgradeTip=null,e.clawPrefab=null,e.clawNode=null,e.catObj=null,e.upgradeArr=[],e.popCallbackCollect=null,e.isShowHouse=!1,e}return a(e,t),e.prototype.start=function(){window.xuxu=this,this.node.on("touchstart",this.touchStartFunc,this),this.node.on("touchend",this.hideWardrobelLayer,this),cc.game.on(l.EMITKEY.UPDATETABBARSEND,this.updateTabbar,this),this.initMainCultivateLayer(),this.popCallbackCollect={playGameCallBack:this.playGameFunc.bind(this)}},e.prototype.playGameFunc=function(){},e.prototype.updateTabbar=function(t){t==l.MAINPAGE.PAGEHOUSE?(this.showUpgrade(),this.isShowHouse=!0):this.hideUpgrade()},e.prototype.initMainCultivateLayer=function(){this.nextRoomIsUnloack(),this.clawNode=cc.instantiate(this.clawPrefab),this.wholeBuildHouse.addChild(this.clawNode),this.clawNode.active=!1},e.prototype.setClawNodeWithNode=function(t){if(cc.isValid(this.clawNode))if(t){var e=c.default.getWorldPosition(t),o=c.default.getNodePosition(this.wholeBuildHouse,e);this.clawNode.position=cc.v3(o.x,o.y,0),this.clawNode.getComponent(r.default).playClawAnimation()}else this.clawNode.active=!1;else console.log("\u732b\u722a\u5b50\u5df2\u91ca\u653e ###### ")},e.prototype.unlockNewHouse=function(){this.nextRoomIsUnloack(!0),cc.game.emit(l.EMITKEY.MAINUPDATEUI)},e.prototype.updateLayout=function(){this.catObj={};var t=s.default.getGameConfigData().baseConfigData.unlockHouseDataArray;for(var e in t)for(var o in t[e]){var n=t[e][o];this.setBuildStatus(n,!1,!1)}var a=s.default.getUserData().unlockHouseUserData;for(var e in a)for(var o in a[e])(n=a[e][o]).unlock?this.setBuildStatus(n,!0,!1):n.show&&this.addUpgradeTip(n)},e.prototype.addUpgradeTip=function(t){var e="house_"+t.house,o="room_"+t.room,n="mask_room_"+t.room,a="";"cat"==t.buildType?a=t.buildType:"build"==t.buildType?a=t.buildType+"_"+t.buildid:"skin"==t.buildType&&(a="cat");var i=this.wholeBuildHouse.getChildByName(e),r=i.getChildByName(o),c=i.getChildByName(n),s=r.getChildByName(a),u=s.getChildByName("lock"),p=(s.getChildByName("unLock"),u.getChildByName("lockImg"));c.active=!1;var h=cc.instantiate(this.upgradeTip),f=p.convertToWorldSpaceAR(cc.v2(0,0)),m=i.convertToNodeSpaceAR(f);h.x=m.x,h.y=m.y+p.height/2,"build"==t.buildType&&1==t.house&&1==t.room&&1==t.buildid&&(h.x+=50,h.y+=50),"build"==t.buildType&&3==t.house&&2==t.room&&2==t.buildid&&(h.y+=50),"skin"==t.buildType&&3==t.house&&2==t.room&&9==t.buildid&&(h.y-=50),"build"==t.buildType&&3==t.house&&3==t.room?1==t.buildid?h.x-=70:2==t.buildid?(h.x+=50,h.y+=50):3==t.buildid?h.x+=50:10==t.buildid&&(h.x-=50,h.y-=50):"skin"==t.buildType&&3==t.house&&3==t.room&&10==t.buildid&&(h.x-=50,h.y-=50),i.addChild(h),h.getComponent(g.default).showPoint(t,this,!0),this.upgradeArr.push(h),d.default.getInstance().mainPage!=l.MAINPAGE.PAGEHOUSE&&(h.active=!1)},e.prototype.clickUpgradePoint=function(t){for(var e in this.upgradeArr)this.upgradeArr[e].getComponent(g.default).showPoint();t.getComponent(g.default).showFish()},e.prototype.clickUpgradeFish=function(t,e){for(var o in console.log("houseData = "+JSON.stringify(t)),this.upgradeArr)this.upgradeArr[o].getComponent(g.default).showPoint();var n=s.default.getUserData(),a=n.unlockHouseUserData;if(n.fish>=t.fish){for(var i in a)for(var r in a[i])t.unlockID==a[i][r].unlockID&&(a[i][r].unlock=!0),a[i][r].show=!0;var c=!1;if(a.length){var u=a[a.length-1];for(var o in u)u[o].unlock||(c=!0)}if(n.fish-=t.fish,n.unlockHouseUserData=a,"cat"==t.buildType||"skin"==t.buildType){var p={clothesID:t.clothesID,clothRank:t.clothesID%1e3==0?3:1,isWear:t.clothesID%1e3==0},f=n.catClothesData,m="cat_"+t.buildid;f[m]?f[m].push(p):(console.log("userCldata clKey\u4e3a\u7a7a\uff0c\u9700\u8981\u521d\u59cb\u5316\u6570\u7ec4 ### "),f[m]=[],f[m].push(p)),d.default.getInstance().collectionMark.tabbarCollection=!0,"cat"==t.buildType?d.default.getInstance().collectionMark.catNum=t.clothesID:(d.default.getInstance().collectionMark.catNum=t.clothesID,d.default.getInstance().collectionMark.catSkinNum=t.clothesID)}s.default.saveUserData(n),e.getComponent(g.default).hide(),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,7),this.playFlyFishAnimation(t,e.node),c||(console.log("\u5237\u65b0\u89e3\u9501\u6c14\u6ce1"),this.updateLayout());var y=t.unlockID+"";h.default.trackEvent("house_unlock",{houseID:y}),cc.isValid(this.clawNode)&&(console.log("\u91ca\u653e\u732b\u722a\u5b50 ###### "),this.clawNode.destroy())}else{var v={popName:"nothingPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:0}};cc.game.emit("showPop",v)}},e.prototype.playFlyFishAnimation=function(t){var e="house_"+t.house,o="room_"+t.room,n="mask_room_"+t.room,a="";"cat"==t.buildType?a=t.buildType:"build"==t.buildType?a=t.buildType+"_"+t.buildid:"skin"==t.buildType&&(a="cat");var i=this.wholeBuildHouse.getChildByName(e),r=i.getChildByName(o),c=i.getChildByName(n),s=r.getChildByName(a),l=s.getChildByName("lock");s.getChildByName("unLock"),l.getChildByName("lockImg"),c.active=!1},e.prototype.flyUnlockFishFunc=function(t,e){this.removeFunc(this.upgradeArr,e),this.setBuildStatus(t,!0,!0),cc.game.emit(l.EMITKEY.MAINUPDATEUI)},e.prototype.indexOfFunc=function(t,e){for(var o=0;o-1&&t.splice(o,1)},e.prototype.nextRoomIsUnloack=function(t){void 0===t&&(t=!1);var e=s.default.getHourseUnlockData(t);e&&(console.log("unlockData ### = "+JSON.stringify(e)),0==this.upgradeArr.length&&(this.updateLayout(),e.length<=4?this.houseLayer.getComponent(m.default).moveWithRoomId(l.ROOMTYPE.ROOMONE):4=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../api/api-sheep"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/native/audio"),d=t("../common/sdk"),h=t("../game/gameLayer"),f=t("../manager/data-manager"),m=t("../manager/DateManager"),g=t("../manager/GameManager"),y=cc._decorator,v=y.ccclass,b=y.property,_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gameLayer=null,e.commonUIPrefab=null,e.commonUI=null,e.topicUIPrefab=null,e.topicUI=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(u.EMITKEY.BEGINGAME,this.beginGameFunc,this),cc.game.on(u.EMITKEY.SHOWMODULE,this.showModuleFunc,this),this.setupSubviews(),this.updateSubUI(),d.default.isPlatform(d.Platform.web)||this.preLoadVedio(),this.requestData()},e.prototype.requestData=function(){l.default.isLogin()&&this.requestMatchResult()},e.prototype.requestMatchResult=function(){if(!f.default.getMatchResultData()){f.default.setMatchResultData();var t=this;setTimeout(function(){s.default.getMatchResult(2,function(e){t.showMatch(e)})},1e3)}},e.prototype.showMatch=function(t){if(t&&t.data&&t.data.topic&&t.data.topic.id>0&&t.data.topic.info&&t.data.topic.info.uid>0){var e={popName:"topicLastWinPop",showPopData:t.data};cc.game.emit("showPop",e)}},e.prototype.onEnable=function(){this.updateSubUI()},e.prototype.beginGameFunc=function(){this.beginGame()},e.prototype.showModuleFunc=function(t){switch(void 0===t&&(t=u.MODULETYPE.COMMON),t){case u.MODULETYPE.COMMON:this.commonUI.active=!0,this.topicUI.active=!1;break;case u.MODULETYPE.TOPIC:this.commonUI.active=!1,this.topicUI.active=!0}},e.prototype.setupSubviews=function(){this.topicUI=cc.instantiate(this.topicUIPrefab),this.topicUI.active=!1,this.node.addChild(this.topicUI),this.commonUI=cc.instantiate(this.commonUIPrefab),this.commonUI.active=!0,this.node.addChild(this.commonUI)},e.prototype.updateSubUI=function(){this.node.active=!0,this.gameLayer.active=!1,this.playMainBgMusic(),cc.game.emit(u.EMITKEY.MAINUPDATEUI)},e.prototype.showMainLayer=function(t){void 0===t&&(t=u.GAMEOVER.NONE),cc.game.emit(u.EMITKEY.TTSTOPRECORD),cc.game.emit(u.EMITKEY.TTSTARTRECORD),console.log("\u56de\u5230\u4e3b\u9875\u9762 = "+t),this.node.active=!0,this.gameLayer.active=!1,this.updateRewardData(t),this.playMainBgMusic(),cc.game.emit(u.EMITKEY.MAINUPDATEUI),g.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY?cc.game.emit(u.EMITKEY.UPDATETABBARRECEIVE,2):cc.game.emit(u.EMITKEY.UPDATETABBARRECEIVE,1)},e.prototype.preLoadVedio=function(){var t=l.default.GetVedioID();d.default.preloadVideoAd(t,function(){console.log("\u9884\u52a0\u8f7d\u89c6\u9891\u6210\u529f")},function(){console.log("\u9884\u52a0\u8f7d\u89c6\u9891\u5931\u8d25")},function(){},!0)},e.prototype.updateRewardData=function(t){switch(t){case u.GAMEOVER.LEVELFAIL:g.default.getInstance().gameType==u.GAMETYPE.GAMELEVEL&&l.default.resetSprintReward()}},e.prototype.playMainBgMusic=function(){p.default.playBGM()},e.prototype.beginGame=function(){cc.game.emit(u.EMITKEY.TTSTARTRECORD);var t=this,e=0,o=m.default.format(u.CALENDARNAMES[4],new Date);if(o){var n=o.split("-");n.length>=3&&(e=Number(n[2]))}l.default.getLevelByID(e,function(o){console.log("\u5173\u5361\u6570\u636e:",e,o),t.gameLayer.activeInHierarchy?console.log("\u5df2\u7ecf\u6253\u5f00 mainLayer 1"):o.length<1?cc.game.emit("showMainTips",c.default.instance.trans(r.GDLanguage.level_inadequate)):(t.beginGameData(o),f.default.setGameLevelData(o))})},e.prototype.beginGameData=function(t){var e=this;cc.game.emit(u.EMITKEY.SHOWTRANSITLAYER,function(o){e.gameLayer.activeInHierarchy?console.log("\u5df2\u7ecf\u6253\u5f00 mainLayer 2"):(console.log("\u53ef\u4ee5\u6253\u5f00\u4e86 mainLayer"),e.gameLayer.getComponent(h.default).initLevelLayer(t),e.node.active=!1,o())})},i([b({type:cc.Node,tooltip:"\u6e38\u620f\u8282\u70b9"})],e.prototype,"gameLayer",void 0),i([b({type:cc.Prefab,tooltip:"common\u9875\u9762\u8282\u70b9"})],e.prototype,"commonUIPrefab",void 0),i([b({type:cc.Prefab,tooltip:"topic\u8282\u70b9"})],e.prototype,"topicUIPrefab",void 0),i([v],e)}(cc.Component);o.default=_,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../api/api-sheep":"api-sheep","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/sdk":"sdk","../game/gameLayer":"gameLayer","../manager/DateManager":"DateManager","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager"}],mainUiLayer:[function(t,e,o){"use strict";cc._RF.push(e,"4db0ejDPE9I06u2DuGNxPAb","mainUiLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=1&&(this.updateTime=0,this.updateTimeFunc())},e.prototype.updateTimeFunc=function(){var t=f.default.format(p.CALENDARNAMES[8],new Date).split(" ");if(!(t.length<2)){var e=t[1].split(":");if(!(e.length<3)){var o=3600*(24-Number(e[0])-1)+60*(60-Number(e[1])-1)+(60-Number(e[2]));if(this.timeNode.activeInHierarchy){var n=u.default.formatTime(1e3*o),a=(n[1]<10?"0"+n[1]:n[1])+":"+(n[2]<10?"0"+n[2]:n[2])+":"+(n[3]<10?"0"+n[3]:n[3])+" \u91cd\u7f6e";this.timeLabel.string=a}this.setMainLayerData()}}},e.prototype.onEnable=function(){this.topicBtn.getChildByName("tag_icon").active=!v.default.getMatchResultData(),h.default.getInstance().collectionMark.topicClothesNum>0?this.collectBtn.getChildByName("tag_icon").active=!0:this.collectBtn.getChildByName("tag_icon").active=!1},e.prototype.start=function(){cc.game.on(p.EMITKEY.MAINUPDATEUI,this.setMainLayerData,this),cc.game.on(p.EMITKEY.RANKUSERINFOSUCCESS,this.rankUserInfoFunc,this),cc.game.on(p.EMITKEY.BULLETSTATE,this.bulletStateFunc,this),this.bulletStateFunc(),s.default.addTargetTouchUpInside(this.setupBtn,this.setupTouchEnd.bind(this)),s.default.addTargetTouchUpInside(this.rankBtn,this.rankBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.ttRankBtn,this.rankBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.beginBtn,this.beginBtnEnd.bind(this)),s.default.addTargetTouchUpInside(this.focusBtn,this.focusBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.childBtn,this.childBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.deskBtn,this.deskBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.bulletBtn,this.bulletBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.collectBtn,this.collectBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.topicBtn,this.topicBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.friendBtn,this.friendBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.meBtn,this.meBtnFunc.bind(this)),l.default.isLogin()?(this.bulletBtn.active=!0,this.meBtn.active=!0):(this.bulletBtn.active=!1,this.meBtn.active=!1),this.childBtn.active=!1,this.deskBtn.active=!1,this.focusBtn.active=!1,y.default.isSupportFocusDouYin()&&(this.focusBtn.active=!0),this.setMainLayerData(),this.updateTimeFunc(),this.popCallbackCollect={freeCallBack:this.freeCallBackFunc.bind(this),exitCallBack:this.exitCallBackFunc.bind(this)},this.bottomRankNode.active=!1,this.requestData(),l.default.isPlatform(l.GDPlatform.wx)||l.default.isPlatform(l.GDPlatform.web)?(this.friendBtn.active=!0,this.rankBtn.active=!0):(this.friendBtn.active=!1,this.rankBtn.active=!1),l.default.isPlatform(l.GDPlatform.tt)||l.default.isPlatform(l.GDPlatform.oppo)||l.default.isPlatform(l.GDPlatform.vivo)?this.ttRankBtn.active=!0:this.ttRankBtn.active=!1},e.prototype.meBtnFunc=function(){console.log("\u4e2a\u4eba\u8d44\u6599"),cc.game.emit("showPop",{popName:"personalPop",showPopData:{}})},e.prototype.friendBtnFunc=function(){console.log("\u670b\u53cb\u5708"),cc.game.emit("showPop",{popName:"todayRankPop",showPopData:{}})},e.prototype.beginBtnEnd=function(){console.log("\u5f00\u59cb\u6e38\u620f"),this.beginTouchEnd(1)},e.prototype.topicBtnFunc=function(){console.log("\u4eca\u65e5\u8bdd\u9898"),this.beginTouchEnd(2)},e.prototype.collectBtnFunc=function(){console.log("\u6536\u85cf");var t={popName:"topicCollectPop",showPopData:{topicClothesNum:h.default.getInstance().collectionMark.topicClothesNum,changeClothesCb:this.changeClothesFunc.bind(this)}};cc.game.emit("showPop",t),this.collectBtn.getChildByName("tag_icon").active=!1,h.default.getInstance().collectionMark.topicClothesNum=0},e.prototype.changeClothesFunc=function(t){g.default.updateUserSkin(t,function(){}),setTimeout(function(){cc.game.emit(p.EMITKEY.CHANGESHEEPCLOTHES)},1e3)},e.prototype.bulletStateFunc=function(){var t=l.default.getItem(p.STORAGEKEY.BULLETSWITCH);if(!t)return console.log("bullet = "+t),void l.default.setItem(p.STORAGEKEY.BULLETSWITCH,1);this.bulletNode.opacity=1==t?255:0},e.prototype.rankUserInfoFunc=function(){l.default.isLogin()?(this.bulletBtn.active=!0,this.meBtn.active=!0):(this.bulletBtn.active=!1,this.meBtn.active=!1)},e.prototype.bulletBtnFunc=function(){h.default.getInstance().bulletTime<=0?cc.game.emit(p.EMITKEY.SHOWMAINTIPS,"\u4e00\u5206\u949f\u53ea\u80fd\u53d1\u4e00\u6761\u5f39\u5e55\u54e6~"):(console.log("\u53d1\u5f39\u5e55"),cc.game.emit("showPop",{popName:"bulletScreenPop",showPopData:{}}))},e.prototype.focusBtnFunc=function(){console.log("\u5173\u6ce8"),y.default.focusDouYin()},e.prototype.childBtnFunc=function(){console.log("\u8f6c\u8df3"),y.default.gameBox()},e.prototype.deskBtnFunc=function(){console.log("\u684c\u9762"),y.default.addShortcut()},e.prototype.requestData=function(){l.default.isLogin()&&g.default.requestUserInfo()},e.prototype.exitCallBackFunc=function(){},e.prototype.showBottomRankNode=function(t){t.index?(this.bottomRankNode.active=!0,this.bottomRankNode.getChildByName("rank").getComponent(cc.Label).string="\u7b2c"+t.index+"\u540d"):this.bottomRankNode.active=!1},e.prototype.freeCallBackFunc=function(){console.log("\u89c2\u770b\u5e7f\u544a ###### ");var t=this,e=l.default.GetVedioID();m.default.watchAdVideo({id:e,success:function(){console.log("\u6210\u529f sdk"),t.beginTouchCallbackFunc()},fail:function(){console.log("\u5931\u8d25")},nofit:function(){t.shareTTAction()}})},e.prototype.shareTTAction=function(){var t=this;if(m.default.isPlatform(m.Platform.wx)){var e=l.default.GetVedioID(),o=l.default.getUserData().openid;m.default.share(o,e,function(){t.shareCbMethod()},function(){cc.game.emit(p.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else if(m.default.isPlatform(m.Platform.tt)){var n={popName:"shareNodePop",showPopData:{type:2,shareCb:this.shareCbMethod.bind(this)}};cc.game.emit("showPop",n)}},e.prototype.shareCbMethod=function(){console.log("\u5206\u4eab\u6210\u529f ######"),this.beginTouchCallbackFunc()},e.prototype.rankBtnFunc=function(){console.log("\u6392\u884c\u699c"),cc.game.emit("showPop",{popName:"sheepRankPop",showPopData:{popCallbackCollect:null}})},e.prototype.setMainLayerData=function(){this.timeNode.active=!1;var t=v.default.todayIsWin();-1==t?this.levelNumLabel.string="\u52a0\u5165\u7f8a\u7fa4":0==t?this.levelNumLabel.string="\u518d\u6b21\u6311\u6218":1==t&&(this.levelNumLabel.string="\u5df2\u52a0\u5165\u7f8a\u7fa4",this.timeNode.active=!0)},e.prototype.setupTouchEnd=function(){console.log("\u6253\u5f00\u8bbe\u7f6e\u5f39\u7a97"),cc.game.emit("showPop",{popName:"setupPop",showPopData:{popCallbackCollect:null,setupType:1}})},e.prototype.beginTouchEnd=function(t){return r(this,void 0,Promise,function(){var e,o;return c(this,function(n){switch(n.label){case 0:return m.default.isPlatform(m.Platform.tt)?0!=l.default.isLogin()?[3,5]:[4,g.default.ttLogin()]:[3,6];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,g.default.getUserInfo()];case 3:return n.sent(),[3,5];case 4:return e=n.sent(),cc.warn("\u83b7\u53d6\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u53ef\u80fd\u7528\u6237\u62d2\u7edd\u6388\u6743",e),[3,5];case 5:return[3,17];case 6:return m.default.isPlatform(m.Platform.wx)?0!=l.default.isLogin()?[3,11]:[4,g.default.wxLogin()]:[3,12];case 7:n.sent(),n.label=8;case 8:return n.trys.push([8,10,,11]),[4,g.default.getWxUserInfo()];case 9:return n.sent(),[3,11];case 10:return o=n.sent(),cc.warn("\u83b7\u53d6\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u53ef\u80fd\u7528\u6237\u62d2\u7edd\u6388\u6743",o),[3,11];case 11:return[3,17];case 12:return m.default.isPlatform(m.Platform.oppo)?0!=l.default.isLogin()?[3,14]:[4,g.default.oppoLogin()]:[3,15];case 13:n.sent(),n.label=14;case 14:return[3,17];case 15:return m.default.isPlatform(m.Platform.vivo)?0!=l.default.isLogin()?[3,17]:[4,g.default.vivoLogin()]:[3,17];case 16:n.sent(),n.label=17;case 17:return console.log("\u767b\u5f55\u6210\u529f\uff0c\u6216\u8005\u5df2\u767b\u5f55 ###### "),1!=t?[3,18]:(this.beginGameStatus(),[3,20]);case 18:return 2!=t?[3,20]:[4,g.default.getTopicData(function(){})];case 19:n.sent(),d.default.reportTACommon("game_start",{type:"\u8bdd\u9898\u6311\u6218"}),v.default.topicModel&&v.default.topicModel.info&&0!=v.default.topicModel.info.type?this.enterTopicGame():(this.showChoosePop(0),console.log("\u52a0\u5165\u8bdd\u9898")),n.label=20;case 20:return[2]}})})},e.prototype.showChoosePop=function(t){var e={popName:"topicChoosePop",showPopData:{type:t,chooseCallback:this.chooseCallbackFunc.bind(this)}};cc.game.emit("showPop",e)},e.prototype.chooseCallbackFunc=function(){var t=this;this.enterTopicGame(),setTimeout(function(){t.showTeamPop()},1500)},e.prototype.enterTopicGame=function(){d.default.reportTACommon("topic_join_ad",{}),cc.game.emit(p.EMITKEY.SHOWTRANSITLAYER,function(){cc.game.emit(p.EMITKEY.SHOWMODULE,p.MODULETYPE.TOPIC)})},e.prototype.showTeamPop=function(){cc.game.emit("showPop",{popName:"topicJoinedPop",showPopData:{}})},e.prototype.beginGameStatus=function(){var t=v.default.todayIsWin();if(h.default.getInstance().todayState=t,console.log("state = ",t),d.default.reportTACommon("game_start",{type:"\u6bcf\u65e5\u6311\u6218"}),h.default.getInstance().unLimitVideo=!0,-1==t)this.gotoGame();else if(0==t)this.videoGotoGame();else if(1==t)return void cc.game.emit(p.EMITKEY.SHOWMAINTIPS,"\u6bcf\u65e5\u4e00\u5173,\u4eca\u5929\u5df2\u6311\u6218\u6210\u529f")},e.prototype.gotoGame=function(){var t={popName:"nothingPop",showPopData:{beginTouchCallback:this.beginTouchCallbackFunc.bind(this),popType:0}};cc.game.emit("showPop",t)},e.prototype.videoGotoGame=function(){var t=f.default.format(p.CALENDARNAMES[5],new Date),e=f.default.format(p.CALENDARNAMES[6],new Date),o=l.default.getDailyData(t,e),n=0;if(o&&o.unLimitVideo&&(n=o.unLimitVideo),n>=3||h.default.getInstance().unLimitVideo)h.default.getInstance().unLimitVideo=!0,this.beginTouchCallbackFunc(),console.log("\u514d\u5e7f\u544a ###### = "+n);else{h.default.getInstance().unLimitVideo=!1;var a={popName:"noLimitPop",showPopData:{playVideoFunc:this.playVideoFunc.bind(this),noPlayVideoFunc:this.noPlayVideoFunc.bind(this),videoCount:n}};cc.game.emit(p.EMITKEY.SHOWPOP,a),console.log("\u4e0d\u514d\u5e7f\u544a ###### = "+n)}},e.prototype.playVideoFunc=function(){console.log("\u89c2\u770b\u5e7f\u544a");var t=this,e=l.default.GetVedioID();m.default.watchAdVideo({id:e,success:function(){console.log("\u6210\u529f sdk");var e=f.default.format(p.CALENDARNAMES[5],new Date),o=f.default.format(p.CALENDARNAMES[6],new Date),n=l.default.getDailyData(e,o),a=1;n?(a=Number(n.unLimitVideo)+1,n.unLimitVideo=a,a>=3&&d.default.reportTACommon("unlimited_challenges_ad",{})):n={dailyID:o,isWin:!1,unLimitVideo:a,sheepNum:-1},l.default.saveDailyData(e,o,n),a>=3?(h.default.getInstance().unLimitVideo=!0,t.beginTouchCallbackFunc(),cc.game.emit(p.EMITKEY.CLOSEALLPOP)):t.videoGotoGame()},fail:function(){console.log("\u5931\u8d25")},nofit:function(){t.shareTTAction()}})},e.prototype.noPlayVideoFunc=function(){var t={popName:"getPropPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:6}};cc.game.emit(p.EMITKEY.SHOWPOP,t)},e.prototype.beginTouchCallbackFunc=function(){this.beginButtonDuration>=1?(this.beginButtonDuration=0,h.default.setGameType(p.GAMETYPE.GAMEDAILY),b.default.playBGM(),cc.game.emit(p.EMITKEY.BEGINGAME)):console.log("\u4e0d\u80fd\u8fde\u7eed\u70b9\u51fb")},i([C({type:cc.Node,tooltip:"\u5f00\u59cb\u6e38\u620f"})],e.prototype,"beginBtn",void 0),i([C(cc.Node)],e.prototype,"setupBtn",void 0),i([C({type:cc.Node,tooltip:"wx\u6392\u884c\u699c"})],e.prototype,"rankBtn",void 0),i([C({type:cc.Node,tooltip:"\u4e2a\u4eba\u8d44\u6599"})],e.prototype,"meBtn",void 0),i([C({type:cc.Node,tooltip:"\u5173\u6ce8\u6296\u97f3\u53f7"})],e.prototype,"focusBtn",void 0),i([C({type:cc.Node,tooltip:"\u6258\u513f\u6240"})],e.prototype,"childBtn",void 0),i([C({type:cc.Node,tooltip:"\u6dfb\u52a0\u5230\u684c\u9762"})],e.prototype,"deskBtn",void 0),i([C(cc.Node)],e.prototype,"timeNode",void 0),i([C(cc.Label)],e.prototype,"timeLabel",void 0),i([C(cc.Node)],e.prototype,"bottomRankNode",void 0),i([C(cc.Label)],e.prototype,"levelNumLabel",void 0),i([C({type:cc.Node,tooltip:"\u5f39\u5e55\u9875\u9762"})],e.prototype,"bulletNode",void 0),i([C({type:cc.Node,tooltip:"\u5f39\u5e55"})],e.prototype,"bulletBtn",void 0),i([C({type:cc.Node,tooltip:"\u6362\u88c5"})],e.prototype,"collectBtn",void 0),i([C({type:cc.Node,tooltip:"\u4eca\u65e5\u8bdd\u9898\u9875\u9762"})],e.prototype,"topicBtn",void 0),i([C({type:cc.Node,tooltip:"\u597d\u53cb\u6392\u884c\u699c"})],e.prototype,"friendBtn",void 0),i([C({type:cc.Node,tooltip:"tt\u6392\u884c\u699c"})],e.prototype,"ttRankBtn",void 0),i([N],e)}(cc.Component);o.default=w,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/native/tt-sdk":"tt-sdk","../common/sdk":"sdk","../common/util":"util","../manager/DateManager":"DateManager","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common"}],mapArea:[function(t,e,o){"use strict";cc._RF.push(e,"67f71SJOXZGlKQEcc+5J3rk","mapArea");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blackLine=null,e.widthNum=0,e.heightNum=0,e.minBlockNum=0,e}return a(e,t),e.prototype.start=function(){},e.prototype.refreshMap=function(t,e,o){this.widthNum=t,this.heightNum=e,this.minBlockNum=o,this.node.removeAllChildren();var n=this.widthNum*this.minBlockNum,a=this.heightNum*this.minBlockNum,i=this.node.width/n;this.node.height=i*a;for(var r=0;r<=n;r++){var c=r*i,s=0,l=0;l=r%(this.minBlockNum/2)==0?1:0,r%this.minBlockNum==0&&(l=2),this.addBlackLine(c,s,l,!0)}for(var u=0;u<=a;u++)c=0,s=-u*i,l=0,l=u%(this.minBlockNum/2)==0?1:0,u%this.minBlockNum==0&&(l=2),this.addBlackLine(c,s,l,!1)},e.prototype.addBlackLine=function(t,e,o,n){var a=cc.instantiate(this.blackLine);2==o?(a.height=6,a.opacity=50):1==o?(a.height=4,a.opacity=40):(a.height=2,a.opacity=20),n?(a.angle=-90,a.width=this.node.height):(a.angle=0,a.width=this.node.width),a.x=t,a.y=e,this.node.addChild(a)},i([s(cc.Prefab)],e.prototype,"blackLine",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],mapEditor:[function(t,e,o){"use strict";cc._RF.push(e,"d6b62YDoXJBjYP9NnAI8e6T","mapEditor");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/mapEditor/blockEditorPrefab"),c=t("../common/config"),s=t("../common/key-map"),l=t("./mapArea"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mapArea=null,e.blockArea=null,e.blockEditorNode=null,e.blockEditorPrefab=null,e.widthNum=0,e.heightNum=0,e.moveBlockType=0,e.moldType=1,e.levelID=0,e.blockNodeObj={},e.isDeleteBlock=!1,e.minBlockNum=8,e.blockMaxWidth=120,e.blockMaxHeight=135,e.moveMinBlockNum=1,e.newLevelDataObj=null,e}return a(e,t),e.prototype.start=function(){window.xuxu=this,cc.game.on("refreshMapSizeData",this.refreshMapSizeData,this),cc.game.on("setBlockTypeData",this.setBlockTypeData,this),cc.game.on("initLevelData",this.initLevelData,this),this.node.on(cc.Node.EventType.MOUSE_DOWN,this.mouseDown,this),this.node.on(cc.Node.EventType.MOUSE_ENTER,this.mouseEnter,this),this.node.on(cc.Node.EventType.MOUSE_MOVE,this.mouseMove,this),this.node.on(cc.Node.EventType.MOUSE_LEAVE,this.mouseLeave,this),s.default.onKeyDownWithMeta("a",this.changeMouseStatus.bind(this)),s.default.onKeyDownWithMeta("1",this.changeBlockVoid.bind(this)),s.default.onKeyDownWithMeta("2",this.changeBlockType.bind(this)),s.default.onKeyDownWithMeta("3",this.changeRandomBlockType.bind(this)),s.default.onKeyDownWithMeta("4",this.changeMoveMinBlockNum.bind(this)),s.default.onKeyDownWithMeta("z",this.changeMouseStatus.bind(this)),s.default.onKeyDownWithMeta("x",this.changeBlockVoid.bind(this)),s.default.onKeyDownWithMeta("c",this.changeRandomBlockType.bind(this)),s.default.onKeyDownWithMeta("v",this.changeMoveMinBlockNum.bind(this))},e.prototype.initLevelData=function(t){console.log("\u65b0\u5730\u56fe\u6570\u636e\uff1a",t),this.newLevelDataObj=t.newLevelData,this.levelID=this.newLevelDataObj.levelKey,this.setLevelMapData()},e.prototype.setBlockTypeData=function(t){if(!this.newLevelDataObj)return!1;this.newLevelDataObj.blockTypeData=t,console.log("\u8bbe\u7f6e\u5173\u5361\u56fe\u5757\u6570\u636e\uff1a",t)},e.prototype.refreshMapSizeData=function(t){if(!this.newLevelDataObj)return!1;this.newLevelDataObj.widthNum=t.width,this.newLevelDataObj.heightNum=t.height,this.setLevelMapData()},e.prototype.setLevelMapData=function(){this.initLevelAllBlock(),this.mapArea.getComponent(l.default).refreshMap(this.newLevelDataObj.widthNum,this.newLevelDataObj.heightNum,this.minBlockNum)},e.prototype.mouseDown=function(t){if(!this.newLevelDataObj||this.isDeleteBlock)return!1;var e=t.getLocation(),o=this.node.convertToNodeSpaceAR(e),n=this.getMouseBlockPoint(o),a=this.getMouseBlockArea(n);this.clickAddMapBlockNode(a),console.log("lineObj:",a.rolNum,a.rowNum)},e.prototype.mouseEnter=function(t){if(!this.newLevelDataObj||this.isDeleteBlock)return!1;this.blockEditorNode.active=!0;var e=t.getLocation(),o=this.node.convertToNodeSpaceAR(e);this.blockEditorNode.x=o.x,this.blockEditorNode.y=o.y;var n=this.node.width/this.newLevelDataObj.widthNum;this.blockEditorNode.scale=n/this.blockMaxWidth,this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType,this.moldType)},e.prototype.mouseMove=function(t){if(!this.newLevelDataObj||this.isDeleteBlock)return!1;var e=t.getLocation(),o=this.node.convertToNodeSpaceAR(e),n=this.getMouseBlockPoint(o);this.blockEditorNode.x=n.x,this.blockEditorNode.y=n.y},e.prototype.mouseLeave=function(){if(!this.newLevelDataObj||this.isDeleteBlock)return!1;this.blockEditorNode.active=!1},e.prototype.getMouseBlockArea=function(t){var e=this.newLevelDataObj.widthNum*this.minBlockNum,o=(this.heightNum,this.minBlockNum,this.node.width/e);return{rolNum:Math.floor(t.x/o),rowNum:Math.floor(Math.abs(t.y)/o)}},e.prototype.getMouseBlockPoint=function(t){var e=this.newLevelDataObj.widthNum*this.minBlockNum,o=(this.heightNum,this.minBlockNum,this.node.width/e*this.moveMinBlockNum),n=Math.floor(t.x/o)*o,a=-Math.floor(Math.abs(t.y)/o)*o;return cc.v2(n,a)},e.prototype.clickAddMapBlockNode=function(t){var e=this.getBlockLayerIndex(t),o={id:e+"-"+t.rolNum+"-"+t.rowNum,type:this.moveBlockType,rolNum:t.rolNum,rowNum:t.rowNum,layerNum:e,moldType:this.moldType,blockNode:null};this.newLevelDataObj.levelData[e]?this.newLevelDataObj.levelData[e].push(o):(this.newLevelDataObj.levelData[e]=[],this.newLevelDataObj.levelData[e].push(o)),console.log("\u6dfb\u52a0\u5b8c\u6570\u636e\uff1a",this.newLevelDataObj.levelData),this.addBlockEditorNode(t.rolNum,t.rowNum,e,this.moveBlockType,this.moldType)},e.prototype.initLevelAllBlock=function(){this.blockNodeObj={},this.blockArea.removeAllChildren();var t=this.newLevelDataObj.levelData;for(var e in t)for(var o in t[e])this.addBlockEditorNode(t[e][o].rolNum,t[e][o].rowNum,t[e][o].layerNum,t[e][o].type,t[e][o].moldType)},e.prototype.addBlockEditorNode=function(t,e,o,n,a){var i=cc.instantiate(this.blockEditorPrefab),c=this.newLevelDataObj.widthNum*this.minBlockNum,s=this.node.width/c,l=t*s,u=-e*s,p=this.node.width/this.newLevelDataObj.widthNum;i.scale=p/this.blockMaxWidth,i.x=l,i.y=u,i.getComponent(r.default).setBlockImgType(n,this.moldType),i.getComponent(r.default).setBlockLayerNum(t,e,o,a,this.deleteBlock.bind(this));var d=t+"-"+e+"-"+o;this.blockNodeObj[d]=i,this.blockArea.addChild(i),cc.game.emit("setBlockNum")},e.prototype.deleteBlock=function(t,e,o){if(this.isDeleteBlock){var n=t+"-"+e+"-"+o;this.blockNodeObj[n]&&(this.blockNodeObj[n].destroy(),delete this.blockNodeObj[n]);var a=this.newLevelDataObj.levelData;if(a[o])for(var i=0;ir&&u.rolNums&&u.rowNumo&&(o=u.layerNum+1)}return o},e.prototype.changeMoveMinBlockNum=function(){1==this.moveMinBlockNum?this.moveMinBlockNum=4:this.moveMinBlockNum=1},e.prototype.changeRandomBlockType=function(){this.moldType=2,this.moveBlockType=0,this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType,this.moldType)},e.prototype.changeBlockVoid=function(){this.moldType=1,this.moveBlockType=0,this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType,this.moldType)},e.prototype.changeBlockType=function(){this.moveBlockType++,this.moldType=1,this.moveBlockType>c.default.blockTypeConfig[c.default.blockTypeConfig.length-1]&&(this.moveBlockType=0),this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType,this.moldType)},e.prototype.changeMouseStatus=function(){if(console.log("command+a"),this.isDeleteBlock){console.log("this.isDeleteBlock",this.isDeleteBlock),this.isDeleteBlock=!1,this.blockEditorNode.active=!0;var t=this.node.width/this.newLevelDataObj.widthNum;this.blockEditorNode.scale=t/this.blockMaxWidth}else console.log("this.isDeleteBlock",this.isDeleteBlock),this.isDeleteBlock=!0,this.blockEditorNode.active=!1},i([d(cc.Node)],e.prototype,"mapArea",void 0),i([d(cc.Node)],e.prototype,"blockArea",void 0),i([d(cc.Node)],e.prototype,"blockEditorNode",void 0),i([d(cc.Prefab)],e.prototype,"blockEditorPrefab",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../pre/mapEditor/blockEditorPrefab":"blockEditorPrefab","../common/config":"config","../common/key-map":"key-map","./mapArea":"mapArea"}],maskLayer:[function(t,e,o){"use strict";cc._RF.push(e,"5fe07xHyi5IB5UwR8crAg1t","maskLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("./enumConfig"),c=cc._decorator,s=c.ccclass,l=(c.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.start=function(){this.node.active=!1,cc.game.on(r.EMITKEY.SHOWMASKLAYER,this.showMaskLayer,this),cc.game.on(r.EMITKEY.HIDEMASKLAYER,this.hideMaskLayer,this),this.node.on(cc.Node.EventType.TOUCH_START,this.starFunc,this),this.node.on(cc.Node.EventType.TOUCH_END,this.endFunc,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.moveFunc,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.cancelFunc,this)},e.prototype.showMaskLayer=function(){this.node.active=!0},e.prototype.hideMaskLayer=function(){this.node.active=!1},e.prototype.starFunc=function(t){t.stopPropagation()},e.prototype.endFunc=function(t){t.stopPropagation()},e.prototype.moveFunc=function(t){t.stopPropagation()},e.prototype.cancelFunc=function(t){t.stopPropagation()},i([s],e)}(cc.Component));o.default=l,cc._RF.pop()},{"./enumConfig":"enumConfig"}],mask:[function(t,e,o){"use strict";cc._RF.push(e,"29fbe5db7JFWJL2hqkjASq4","mask");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=(r.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.start=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.starFunc,this),this.node.on(cc.Node.EventType.TOUCH_END,this.endFunc,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.moveFunc,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.cancelFunc,this)},e.prototype.starFunc=function(t){t.stopPropagation()},e.prototype.endFunc=function(t){t.stopPropagation()},e.prototype.moveFunc=function(t){t.stopPropagation()},e.prototype.cancelFunc=function(t){t.stopPropagation()},i([c],e)}(cc.Component));o.default=s,cc._RF.pop()},{}],"mesh-vertex":[function(t,e,o){"use strict";cc._RF.push(e,"a29abOYIg9Li5/yGTvFnVbF","mesh-vertex"),Object.defineProperty(o,"__esModule",{value:!0}),o.MeshVertex=void 0;o.MeshVertex=function(t,e,o){this.position=t,this.normal=e,this.uv=o},cc._RF.pop()},{}],moveOutArea:[function(t,e,o){"use strict";cc._RF.push(e,"f88d3tXmpFFjbC+QpZh+Ueh","moveOutArea");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=t("./crushArea"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.crushAreaNode=null,e.crushAreaArgs=null,e.blockMaxWidth=120,e.parentComp=null,e.newScale=.8,e.newAddY=8,e.moveOutObj={1:[],2:[],3:[]},e}return a(e,t),e.prototype.start=function(){},e.prototype.initMoveOutArea=function(t){this.node.removeAllChildren(),this.parentComp=t,this.moveOutObj={1:[],2:[],3:[]}},e.prototype.addThreeOutBlock=function(t){for(var e=0;e0)return!1;return!0},e.prototype.updateBlockPosStatus=function(){for(var t in this.moveOutObj)for(var e=Number(t)*this.blockMaxWidth*this.newScale-this.blockMaxWidth*this.newScale/2,o=function(o){var a=n.moveOutObj[t][o],i=o*n.newAddY;o=7)){this.crushAreaNode.setSiblingIndex(10),this.crushAreaArgs.setSiblingIndex(10);var e=1;for(var o in this.moveOutObj)for(var n=0;n=0?console.log("\u7ebf\u4e0a\u73af\u5883\u505c\u6b62\u6d4b\u8bd5 ###### "):t.post({url:"/admin/game_map/upsert",data:{map_id:e,map_data:o},success:function(t){0==t.err_code?console.log("\u4fdd\u5b58\u5730\u56fe\uff1a",e,t):console.log("\u4fdd\u5b58\u5730\u56fe\u5931\u8d25:",e,t)}})},t.get=function(t){return a.default.get(n({host:this.host,baseParams:{}},t))},t.post=function(t){return a.default.post(n({host:this.host,baseParams:{}},t))},t.GETURL=function(t){return a.default.get(n({baseParams:{}},t))},t.POSTURL=function(t){return a.default.post(n({baseParams:{}},t))},t.GET=function(t,e,o){void 0===e&&(e={});var n="";Object.keys(e).forEach(function(t){n+=t+"="+encodeURIComponent(e[t])+"&"}),""!==n&&(t=t+"?"+(n=n.substr(0,n.lastIndexOf("&"))));var a=cc.loader.getXMLHttpRequest();a.open("GET",t,!0),a.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),a.onreadystatechange=function(){if(4===a.readyState){var t=a.responseText;a.status>=200&&a.status<300?(a.statusText,o(!0,t)):o(!1,t)}},a.timeout=this.TimeOut,a.send()},t.POST=function(t,e,o){void 0===e&&(e={});var n=cc.loader.getXMLHttpRequest(),a="";Object.keys(e).forEach(function(t){a+=t+"="+encodeURIComponent(e[t])+"&"}),""!==a&&(a=a.substr(0,a.lastIndexOf("&"))),n.open("POST",t,!0),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.onreadystatechange=function(){if(4===n.readyState){var t=n.responseText;n.status>=200&&n.status<300?(n.statusText,o(!0,t)):o(!1,t)}},n.send(a)},t.host=c.host,t.TimeOut=200,t}();o.default=s,cc._RF.pop()},{"../common/http":"http","./data-env":"data-env","./data-type":"data-type"}],newLevelPop:[function(t,e,o){"use strict";cc._RF.push(e,"da3caVMFQ5HlYmVp5lat/E1","newLevelPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../common/config"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputLevelNum=null,e.closeNode=null,e}return a(e,t),e.prototype.start=function(){this.closeNode.on(cc.Node.EventType.TOUCH_END,this.closeFunc,this)},e.prototype.showNewLevelPop=function(){this.node.active=!0,this.inputLevelNum.string=""},e.prototype.newLevelFunc=function(){var t=Number(this.inputLevelNum.string);t>0?(this.node.active=!1,this.emitNewLevel(t),console.log("\u8bbe\u7f6e\u5173\u5361\u6570",this.inputLevelNum.string)):console.log("error:\u4e66\u5199\u9519\u8bef")},e.prototype.emitNewLevel=function(t){var e=cc.instantiate(l.default.baseMapObj);e.levelKey=t;var o={newLevelData:e};cc.game.emit("initLevelData",o)},e.prototype.closeFunc=function(){this.node.active=!1},i([s({type:cc.EditBox,tooltip:"\u8f93\u5165\u5bf9\u5e94\u5173\u5361\u6570"})],e.prototype,"inputLevelNum",void 0),i([s(cc.Node)],e.prototype,"closeNode",void 0),i([c],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../common/config":"config"}],nextLevelPop:[function(t,e,o){"use strict";cc._RF.push(e,"b49fdZpjJtCJY67qY7JG6Ry","nextLevelPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.fainNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showPop=function(){var t=this;this.maskNode.opacity=0,this.node.active=!0,cc.tween(this.maskNode).to(0,{opacity:0}).to(.2,{opacity:178}).start();var e=cc.winSize.width;this.fainNode.x=e,this.fainNode.y=100,cc.tween(this.fainNode).to(1,{x:0,y:100},{easing:cc.easing.cubicOut}).delay(1).call(function(){cc.tween(t.maskNode).to(.8,{opacity:0}).start()}).to(1,{x:-e,y:100},{easing:cc.easing.quadOut}).call(function(){t.node.active=!1}).start()},i([s(cc.Node)],e.prototype,"maskNode",void 0),i([s(cc.Node)],e.prototype,"fainNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],noLimitPop:[function(t,e,o){"use strict";cc._RF.push(e,"86b2eck/b9Nv5kDApWcxh9L","noLimitPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/enumConfig"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.closeBtn=null,e.videoBtn=null,e.noVideoBtn=null,e.limitVideoLabel=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(c.EMITKEY.UPDATEPOPDATA,this.updatePopDataFunc,this),r.default.addbtnTouchEndScale(this.mask,this.closeBtnFunc.bind(this)),r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn),r.default.addbtnTouchStartScale(this.videoBtn),r.default.addbtnTouchEndScale(this.videoBtn,this.videoBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.videoBtn),r.default.addbtnTouchStartScale(this.noVideoBtn),r.default.addbtnTouchEndScale(this.noVideoBtn,this.noVideoBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.noVideoBtn)},e.prototype.updatePopDataFunc=function(){},e.prototype.closeBtnFunc=function(){this.node.active=!1,this.showPopData&&this.showPopData.noPlayVideoFunc&&this.showPopData.noPlayVideoFunc()},e.prototype.noVideoBtnFunc=function(){this.node.active=!1,this.showPopData&&this.showPopData.noPlayVideoFunc&&this.showPopData.noPlayVideoFunc()},e.prototype.videoBtnFunc=function(){this.node.active=!1,this.showPopData&&this.showPopData.playVideoFunc&&this.showPopData.playVideoFunc()},e.prototype.showNoLimitPop=function(t){this.node.active=!0,this.showPopData=t,this.limitVideoLabel.string=t.videoCount+"/3",cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start()},i([u(cc.Node)],e.prototype,"mask",void 0),i([u(cc.Node)],e.prototype,"popNode",void 0),i([u(cc.Node)],e.prototype,"closeBtn",void 0),i([u(cc.Node)],e.prototype,"videoBtn",void 0),i([u(cc.Node)],e.prototype,"noVideoBtn",void 0),i([u(cc.Label)],e.prototype,"limitVideoLabel",void 0),i([l],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/enumConfig":"enumConfig"}],nothingPop:[function(t,e,o){"use strict";cc._RF.push(e,"f9f03C5IqJPgrwEd50J+8g+","nothingPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/enumConfig"),s=t("../manager/DateManager"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.closeBtn=null,e.goBtn=null,e.titleLabel=null,e.descLabel=null,e.goLabel=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.mask,this.closeBtnFunc.bind(this)),r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn),r.default.addbtnTouchStartScale(this.goBtn),r.default.addbtnTouchEndScale(this.goBtn,this.goBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.goBtn)},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.goBtnFunc=function(){this.showPopData&&this.showPopData.beginTouchCallback&&this.showPopData.beginTouchCallback(),this.closeBtnFunc()},e.prototype.showNothingPop=function(t){this.node.active=!0,this.showPopData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var e=s.default.format(c.CALENDARNAMES[4],new Date);if(e){var o=e.split("-");o.length>=3&&(this.titleLabel.string=o[1]+"\u6708"+o[2]+"\u65e5")}},i([p(cc.Node)],e.prototype,"mask",void 0),i([p(cc.Node)],e.prototype,"popNode",void 0),i([p(cc.Node)],e.prototype,"closeBtn",void 0),i([p(cc.Node)],e.prototype,"goBtn",void 0),i([p(cc.Label)],e.prototype,"titleLabel",void 0),i([p(cc.Label)],e.prototype,"descLabel",void 0),i([p(cc.Label)],e.prototype,"goLabel",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/enumConfig":"enumConfig","../manager/DateManager":"DateManager"}],"page-house":[function(t,e,o){"use strict";cc._RF.push(e,"c7dfaR+FBhOv4WArlgOZb10","page-house");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/CcJsFunc"),c=t("../../common/dataTs"),s=t("../../common/enumConfig"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.showMain=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(s.EMITKEY.MAINUPDATEUI,this.updateSubUI,this),r.default.addbtnTouchStartScale(this.showMain),r.default.addbtnTouchEndScale(this.showMain,this.showMainFunc.bind(this)),r.default.addbtnTouchCancelScale(this.showMain),this.updateSubUI()},e.prototype.updateSubUI=function(){console.log("page-house MAINUPDATEUI"),1==c.default.currentHouseUnlockAll()?this.showMain.getChildByName("mark").active=!0:this.showMain.getChildByName("mark").active=!1},e.prototype.showMainFunc=function(){cc.game.emit(s.EMITKEY.UPDATETABBARRECEIVE,1)},i([p(cc.Node)],e.prototype,"showMain",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig"}],"page-main":[function(t,e,o){"use strict";cc._RF.push(e,"df8f95zulFCI6iyRCXBRejZ","page-main");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../i18n/gd_language"),c=t("../../../i18n/i18n"),s=t("../../common/CcJsFunc"),l=t("../../common/dataTs"),u=t("../../common/enumConfig"),p=t("../../common/sdk"),d=t("../../common/spine"),h=t("../../common/util"),f=t("../../manager/GameManager"),m=cc._decorator,g=m.ccclass,y=m.property,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.nextBtn=null,e.sprintReward=null,e.sprintWinLabel=null,e.sprintWinLabelShadow=null,e.sprintTimeLabel=null,e.cookieReward=null,e.updateTime=0,e.popCallbackCollect=null,e}return a(e,t),e.prototype.update=function(t){this.updateTime+=t,this.updateTime>=1&&(this.updateTime-=1,this.updateTimeNum())},e.prototype.updateTimeNum=function(){if(!(l.default.getUserData().playLevelId<3)){var t=l.default.updateSprintRewardTime();if(0==t)console.log("\u5df2\u6ee1"),this.sprintTimeLabel.string="End";else{var e=h.default.formatTime(t);e[0]>0?this.sprintTimeLabel.string=e[0]+"d "+e[1]+"h":e[1]>0?this.sprintTimeLabel.string=e[1]+"h "+e[2]+"m":e[2]>0?this.sprintTimeLabel.string=e[2]+"m "+e[3]+"s":e[3]>0&&(this.sprintTimeLabel.string=e[2]+"m "+e[3]+"s")}}},e.prototype.start=function(){cc.game.on(u.EMITKEY.MAINUPDATEUI,this.updateUiDataFunc,this),f.default.getInstance().gameEnv==u.GAMEENV.ENVRELEASE?(this.nextBtn.active=!1,cc.sys.isBrowser&&(this.nextBtn.active=!0),p.default.isPlatform(p.Platform.ios)&&(this.nextBtn.active=!0)):this.nextBtn.active=!0,s.default.addbtnTouchStartScale(this.nextBtn),s.default.addbtnTouchEndScale(this.nextBtn,this.nextBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.nextBtn),s.default.addbtnTouchStartScale(this.sprintReward),s.default.addbtnTouchEndScale(this.sprintReward,this.sprintRewardFunc.bind(this)),s.default.addbtnTouchCancelScale(this.sprintReward);var t=this.cookieReward.getChildByName("click-btn");s.default.addbtnTouchEndScale(t,this.cookieRewardFunc.bind(this)),this.updateTimeNum(),this.updateUiDataFunc(),this.popCallbackCollect={playGameCallBack:this.playGameCallBackFunc.bind(this)}},e.prototype.playGameCallBackFunc=function(){},e.prototype.cookieRewardFunc=function(){var t={popName:"nothingPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:4}};cc.game.emit("showPop",t)},e.prototype.updateUiDataFunc=function(){console.log("page-main MAINUPDATEUI");var t=l.default.getSprintRewardData();this.sprintWinLabel.string=t.winNum+"",this.sprintWinLabelShadow.string=t.winNum+"",this.sprintReward.getChildByName("mark").active=f.default.getInstance().sprintMark,this.sprintReward.getComponent(d.default).play("4Icon_RichRoad1",0,function(){console.log("4Icon_RichRoad1 ######")}),l.default.getUserData().playLevelId=e){var o=l.default.getSprintRewardData();o.winNum+=1,o.rewardProgress<3?(o.rewardProgress+=1,3==o.rewardProgress&&(o.winBox+=1)):o.rewardProgress=1,l.default.setSprintRewardData(o)}if(l.default.getSprintRewardData().rewardProgress>=3){var n=l.default.getSprintRewardData().winBox,a=l.default.getUserData(),i=n>5?5:n,r=12;i>1&&(r+=11*(i-1)),a.coin+=r,a.prop_remove+=1,l.default.saveUserData(a)}cc.game.emit(u.EMITKEY.MAINUPDATEUI)},e.prototype.sprintRewardFunc=function(){console.log("\u51b2\u523a\u5956\u52b1");var t=l.default.gameConfigData.baseConfigData.sprintRewardLevel;l.default.getUserData().playLevelId>=t?cc.game.emit("showPop",{popName:"sprintRewardPop",showPopData:{popCallbackCollect:null,popType:0}}):cc.game.emit("showMainTips",c.default.instance.trans(r.GDLanguage.challenge_unlocked_level,3))},i([y(cc.Node)],e.prototype,"mainLayer",void 0),i([y(cc.Node)],e.prototype,"nextBtn",void 0),i([y(cc.Node)],e.prototype,"sprintReward",void 0),i([y(cc.Label)],e.prototype,"sprintWinLabel",void 0),i([y(cc.Label)],e.prototype,"sprintWinLabelShadow",void 0),i([y(cc.Label)],e.prototype,"sprintTimeLabel",void 0),i([y(cc.Node)],e.prototype,"cookieReward",void 0),i([g],e)}(cc.Component);o.default=v,cc._RF.pop()},{"../../../i18n/gd_language":"gd_language","../../../i18n/i18n":"i18n","../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/sdk":"sdk","../../common/spine":"spine","../../common/util":"util","../../manager/GameManager":"GameManager"}],picturePop:[function(t,e,o){"use strict";cc._RF.push(e,"e955bv+WvlGDIiibEKuUWDZ","picturePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../common/CcJsFunc"),s=t("../manager/GameManager"),l=t("../../i18n/i18n"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.wallpaperBtn=null,e.brickBtn=null,e.wallpaperSv=null,e.brickSv=null,e.topUIBtnArr=[],e.contentSvArr=[],e}return a(e,t),e.prototype.hideRankPop=function(){this.node.active=!1},e.prototype.onLoad=function(){},e.prototype.onEnable=function(){this.updateMarkClot()},e.prototype.updateMarkClot=function(){var t=s.default.getInstance().collectionMark;this.wallpaperBtn.getChildByName("mark").active=t.bgNum>0,this.brickBtn.getChildByName("mark").active=t.brickNum>0},e.prototype.start=function(){c.default.addbtnTouchStartScale(this.wallpaperBtn),c.default.addbtnTouchEndScale(this.wallpaperBtn,this.topUIButtonAction.bind(this,"wallpaper",0)),c.default.addbtnTouchCancelScale(this.wallpaperBtn),c.default.addbtnTouchStartScale(this.brickBtn),c.default.addbtnTouchEndScale(this.brickBtn,this.topUIButtonAction.bind(this,"brick",1)),c.default.addbtnTouchCancelScale(this.brickBtn),this.setupSubNode(),this.wallpaperBtn.getChildByName("label").getComponent(cc.Label).string=l.default.instance.trans(r.GDLanguage.wallpaper),this.brickBtn.getChildByName("label").getComponent(cc.Label).string=l.default.instance.trans(r.GDLanguage.block_bricks)},e.prototype.setupSubNode=function(){for(var t=0;t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=t("../pop/bullet-screen-pop"),s=t("../pop/challengeSucPop"),l=t("../pop/failPop"),u=t("../pop/FriendRankPop"),p=t("../pop/getPropPop"),d=t("../pop/loseLovePop"),h=t("../pop/nextLevelPop"),f=t("../pop/noLimitPop"),m=t("../pop/nothingPop"),g=t("../pop/PersonalPop"),y=t("../pop/setupPop"),v=t("../pop/shareNodePop"),b=t("../pop/sheep-rank-pop"),_=t("../pop/show-daily-pop"),N=t("../pop/stagePop"),C=t("../pop/TodayRankPop"),w=t("../pop/topicChoosePop"),P=t("../pop/topicCollectPop"),k=t("../pop/topicJoinedPop"),S=t("../pop/topicLastWinPop"),D=t("../pop/topicNewPop"),A=t("../pop/winPop"),T=cc._decorator,O=T.ccclass,I=T.property,E=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.showDailyPrefab=null,e.showDailyPop=null,e.setupPopPrefab=null,e.setupPop=null,e.getPropPopPrefab=null,e.getPropPop=null,e.nothingPopPrefab=null,e.nothingPop=null,e.failPopPrefab=null,e.failPop=null,e.loseLovePopPrefab=null,e.loseLovePop=null,e.winPopPrefab=null,e.winPop=null,e.noLimitPopPrefab=null,e.noLimitPop=null,e.sheepRankPopPrefab=null,e.sheepRankPop=null,e.stagePopPrefab=null,e.stagePop=null,e.bulletScreenPopPrefab=null,e.bulletScreenPop=null,e.nextLevelPopPrefab=null,e.nextLevelPop=null,e.shareNodePopPrefab=null,e.shareNodePop=null,e.topicChoosePopPrefab=null,e.topicChoosePop=null,e.topicCollectPopPrefab=null,e.topicCollectPop=null,e.topicLastWinPopPrefab=null,e.topicLastWinPop=null,e.topicNewPopPrefab=null,e.topicNewPop=null,e.todayRankPopPrefab=null,e.todayRankPop=null,e.firendRankPopPrefab=null,e.firendRankPop=null,e.personalPopPrefab=null,e.personalPop=null,e.topicJoinedPopPrefab=null,e.topicJoinedPop=null,e.challengeSucPopPrefab=null,e.challengeSucPop=null,e.showPopArray=[],e}return a(e,t),e.prototype.start=function(){cc.game.on(r.EMITKEY.SHOWPOP,this.showPop,this),cc.game.on(r.EMITKEY.CLOSEALLPOP,this.closeAllPop,this),this.initPop(),this.closeAllPop()},e.prototype.initPop=function(){this.todayRankPop=this.ifHaveNode(this.todayRankPop,this.todayRankPopPrefab)},e.prototype.showPop=function(t){var e=t.popName,o=t.showPopData;"winPop"==e?(this.winPop=this.ifHaveNode(this.winPop,this.winPopPrefab),this.winPop.getComponent(A.default).showWinPop(o)):"failPop"==e?(this.failPop=this.ifHaveNode(this.failPop,this.failPopPrefab),this.failPop.getComponent(l.default).showFailPop(o)):"loseLovePop"==e?(this.loseLovePop=this.ifHaveNode(this.loseLovePop,this.loseLovePopPrefab),this.loseLovePop.getComponent(d.default).showLoseLovePop(o)):"setupPop"==e?(this.setupPop=this.ifHaveNode(this.setupPop,this.setupPopPrefab),this.setupPop.getComponent(y.default).showSetupPop(o)):"getPropPop"==e?(this.getPropPop=this.ifHaveNode(this.getPropPop,this.getPropPopPrefab),this.getPropPop.getComponent(p.default).showGetPropPop(o)):"nothingPop"==e?(this.nothingPop=this.ifHaveNode(this.nothingPop,this.nothingPopPrefab),this.nothingPop.getComponent(m.default).showNothingPop(o)):"showDailyPop"==e?(this.showDailyPop=this.ifHaveNode(this.showDailyPop,this.showDailyPrefab),this.showDailyPop.getComponent(_.default).showPop(o)):"noLimitPop"==e?(this.noLimitPop=this.ifHaveNode(this.noLimitPop,this.noLimitPopPrefab),this.noLimitPop.getComponent(f.default).showNoLimitPop(o)):"sheepRankPop"==e?(this.sheepRankPop=this.ifHaveNode(this.sheepRankPop,this.sheepRankPopPrefab),this.sheepRankPop.getComponent(b.default).sheepRankPop(o)):"stagePop"==e?(this.stagePop=this.ifHaveNode(this.stagePop,this.stagePopPrefab),this.stagePop.getComponent(N.default).showPop(o)):"bulletScreenPop"==e?(this.bulletScreenPop=this.ifHaveNode(this.bulletScreenPop,this.bulletScreenPopPrefab),this.bulletScreenPop.getComponent(c.default).showPop(o)):"nextLevelPop"==e?(this.nextLevelPop=this.ifHaveNode(this.nextLevelPop,this.nextLevelPopPrefab),this.nextLevelPop.getComponent(h.default).showPop(o)):"shareNodePop"==e?(this.shareNodePop=this.ifHaveNode(this.shareNodePop,this.shareNodePopPrefab),this.shareNodePop.getComponent(v.default).showPop(o)):"topicChoosePop"==e?(this.topicChoosePop=this.ifHaveNode(this.topicChoosePop,this.topicChoosePopPrefab),this.topicChoosePop.getComponent(w.default).showPop(o)):"topicCollectPop"==e?(this.topicCollectPop=this.ifHaveNode(this.topicCollectPop,this.topicCollectPopPrefab),this.topicCollectPop.getComponent(P.default).showPop(o)):"topicLastWinPop"==e?(this.topicLastWinPop=this.ifHaveNode(this.topicLastWinPop,this.topicLastWinPopPrefab),this.topicLastWinPop.getComponent(S.default).showPop(o)):"topicNewPop"==e?(this.topicNewPop=this.ifHaveNode(this.topicNewPop,this.topicNewPopPrefab),this.topicNewPop.getComponent(D.default).showPop(o)):"friendRankPop"==e?(this.firendRankPop=this.ifHaveNode(this.firendRankPop,this.firendRankPopPrefab),this.firendRankPop.getComponent(u.default).showPop(o)):"todayRankPop"==e?(this.todayRankPop=this.ifHaveNode(this.todayRankPop,this.todayRankPopPrefab),this.todayRankPop.getComponent(C.default).showPop(o)):"personalPop"==e?(this.personalPop=this.ifHaveNode(this.personalPop,this.personalPopPrefab),this.personalPop.getComponent(g.default).showPop(o)):"topicJoinedPop"==e?(this.topicJoinedPop=this.ifHaveNode(this.topicJoinedPop,this.topicJoinedPopPrefab),this.topicJoinedPop.getComponent(k.default).showPop(o)):"challengeSucPop"==e&&(this.challengeSucPop=this.ifHaveNode(this.challengeSucPop,this.challengeSucPopPrefab),this.challengeSucPop.getComponent(s.default).showPop(o))},e.prototype.ifHaveNode=function(t,e){return t||(t=cc.instantiate(e),this.node.addChild(t)),t.setSiblingIndex(-1),t},e.prototype.closeAllPop=function(){var t=this.node.children;for(var e in t){var o=t[e];o.setSiblingIndex(0),o.active=!1}},i([I({type:cc.Prefab,tooltip:"\u6bcf\u65e5\u6311\u6218\u83b7\u53d6\u793c\u5305"})],e.prototype,"showDailyPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u8bbe\u7f6e\u9875\u9762"})],e.prototype,"setupPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u83b7\u53d6\u9053\u5177\u9875\u9762"})],e.prototype,"getPropPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u4e00\u4e9b\u901a\u7528\u9875\u9762"})],e.prototype,"nothingPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u5931\u8d25\u9875\u9762"})],e.prototype,"failPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u653e\u5f03\u6311\u6218\u754c\u9762"})],e.prototype,"loseLovePopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u80dc\u5229\u754c\u9762"})],e.prototype,"winPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u65e0\u9650\u751f\u547d\u9875\u9762"})],e.prototype,"noLimitPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u6392\u884c\u5f39\u6846\u9875\u9762"})],e.prototype,"sheepRankPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u821e\u53f0\u5f39\u6846\u9875\u9762"})],e.prototype,"stagePopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u5f39\u5e55\u5f39\u6846\u9875\u9762"})],e.prototype,"bulletScreenPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u4e0b\u4e00\u7b49\u7ea7\u63d0\u793a"})],e.prototype,"nextLevelPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u5206\u4eab\u5f39\u6846"})],e.prototype,"shareNodePopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u9009\u62e9\u7f8a\u961f"})],e.prototype,"topicChoosePopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u6536\u85cf\u9875\u9762"})],e.prototype,"topicCollectPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u6628\u65e5\u83b7\u80dc\u9875\u9762"})],e.prototype,"topicLastWinPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u6628\u65e5\u83b7\u80dc\u9875\u9762\u5956\u52b1\u5f39\u6846"})],e.prototype,"topicNewPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u4eca\u65e5\u670b\u53cb\u5708"})],e.prototype,"todayRankPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u597d\u53cb\u6392\u884c\u699c"})],e.prototype,"firendRankPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u4e2a\u4eba\u8d44\u6599"})],e.prototype,"personalPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u961f\u4f0d\u5206\u914d\u5f39\u7a97"})],e.prototype,"topicJoinedPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"wx\u83b7\u80dc\u5f39\u6846"})],e.prototype,"challengeSucPopPrefab",void 0),i([O],e)}(cc.Component);o.default=E,cc._RF.pop()},{"../common/enumConfig":"enumConfig","../pop/FriendRankPop":"FriendRankPop","../pop/PersonalPop":"PersonalPop","../pop/TodayRankPop":"TodayRankPop","../pop/bullet-screen-pop":"bullet-screen-pop","../pop/challengeSucPop":"challengeSucPop","../pop/failPop":"failPop","../pop/getPropPop":"getPropPop","../pop/loseLovePop":"loseLovePop","../pop/nextLevelPop":"nextLevelPop","../pop/noLimitPop":"noLimitPop","../pop/nothingPop":"nothingPop","../pop/setupPop":"setupPop","../pop/shareNodePop":"shareNodePop","../pop/sheep-rank-pop":"sheep-rank-pop","../pop/show-daily-pop":"show-daily-pop","../pop/stagePop":"stagePop","../pop/topicChoosePop":"topicChoosePop","../pop/topicCollectPop":"topicCollectPop","../pop/topicJoinedPop":"topicJoinedPop","../pop/topicLastWinPop":"topicLastWinPop","../pop/topicNewPop":"topicNewPop","../pop/winPop":"winPop"}],"prop-prefab":[function(t,e,o){"use strict";cc._RF.push(e,"78621mmfFZP3p0KRuVUnueB","prop-prefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/common/native/audio"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.propImage=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showWithType=function(t,e,o){var n="",a=e.position;1==t?n="rewardIcon/prop_remove.png":2==t?n="rewardIcon/prop_cancel.png":3==t&&(n="rewardIcon/prop_random.png"),r.default.changeSpriteFrame(this.propImage,n);var i=this;cc.tween(this.node).to(.1,{scale:1.1}).to(.1,{scale:1}).to(.1,{scale:.9}).to(.1,{scale:.9}).to(.1,{angle:10}).to(.1,{angle:-10}).to(.1,{angle:10}).to(.1,{angle:-10}).to(.1,{angle:0}).to(.3,{position:a,scale:0}).call(function(){i.node.destroy(),cc.tween(e).to(.1,{scale:1.5}).to(.1,{scale:1}).start(),c.default.playAudioMusic("audio/sound/pop-fly-end.mp3",!1),o&&o()}).start()},i([u(cc.Node)],e.prototype,"propImage",void 0),i([l],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/native/audio":"audio"}],"register-head-image":[function(t,e,o){"use strict";function n(t,e,o){var n=new Image;function a(){n.removeEventListener("load",a),n.removeEventListener("error",i),o&&o(null,n)}function i(){n.removeEventListener("load",a),n.removeEventListener("error",i),o&&o(new Error(t))}return"file:"!==window.location.protocol&&(n.crossOrigin="anonymous"),n.addEventListener("load",a),n.addEventListener("error",i),n.src=t,n}cc._RF.push(e,"8f94axQML9NUKBkQZXk81kh","register-head-image"),Object.defineProperty(o,"__esModule",{value:!0}),o.registerHeadImgLoader=o.headImgExt=void 0,o.headImgExt=".head",o.registerHeadImgLoader=function(){cc.assetManager.downloader.register(o.headImgExt,function(t,e,o){o(null,t)}),cc.assetManager.parser.register(o.headImgExt,n),cc.assetManager.factory.register(o.headImgExt,function(t,e,o,n){var a=null,i=null;try{(a=new cc.Texture2D)._uuid=t,a._nativeUrl=t,a._nativeAsset=e}catch(r){i=r}n&&n(i,a)})},cc._RF.pop()},{}],"report-common":[function(t,e,o){"use strict";cc._RF.push(e,"cdaf1e/eKZNDKb4XXuwbreu","report-common");var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,n=arguments.length;o=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=100?80:t>=50?50:t>=30?30:t>=20?20:t>=10?10:5},i([d({type:l.CoinEmitter,tooltip:"\u53d1\u5c04\u5668 \u63a7\u5236\u8282\u70b9"})],e.prototype,"coinEmitter",void 0),i([d({type:[cc.Prefab],tooltip:"\u53d1\u5c04\u5668\u9884\u5236\u4f53"})],e.prototype,"prefabList",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"./CoinEmitter":"CoinEmitter"}],rewardPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"a121afwuuhFa6IKfrPvi+zw","rewardPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.icon=null,e.rewardNum=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setRewardNode=function(t){var e="rewardIcon/"+t.propType+".png";r.default.changeSpriteFrame(this.icon,e),this.rewardNum.string=""+t.num},i([l(cc.Node)],e.prototype,"icon",void 0),i([l(cc.Label)],e.prototype,"rewardNum",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],saveAsPop:[function(t,e,o){"use strict";cc._RF.push(e,"79458xlXgdFfJ/BI3F5BmEK","saveAsPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputLevelNum=null,e.closeNode=null,e}return a(e,t),e.prototype.start=function(){this.closeNode.on(cc.Node.EventType.TOUCH_END,this.closeFunc,this)},e.prototype.showSaveAsPop=function(){this.node.active=!0,this.inputLevelNum.string=""},e.prototype.selectLevelFunc=function(){var t=Number(this.inputLevelNum.string);t>0?(this.node.active=!1,this.emitSelectLevel(t),console.log("\u8bbe\u7f6e\u5173\u5361\u6570",this.inputLevelNum.string)):console.log("error:\u4e66\u5199\u9519\u8bef")},e.prototype.emitSelectLevel=function(t){cc.game.emit("saveAsNewMap",t)},e.prototype.closeFunc=function(){this.node.active=!1},i([s({type:cc.EditBox,tooltip:"\u8f93\u5165\u53e6\u5b58\u4e3a\u5173\u5361\u6570"})],e.prototype,"inputLevelNum",void 0),i([s(cc.Node)],e.prototype,"closeNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],sdk:[function(t,e,o){"use strict";cc._RF.push(e,"e267eKhDStMpaYZFC42eefy","sdk");var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,n=arguments.length;o0&&(a=n.getRangeAt(0)),document.body.appendChild(o),o.select(),o.selectionStart=0,o.selectionEnd=e.length;var s=!1;try{s=document.execCommand("copy")}catch(l){cc.warn("[sdk] copy to clipboard err",l)}document.body.removeChild(o),a&&(n.removeAllRanges(),n.addRange(a)),s?cc.log("h5 copy to clipboard success"):cc.log("h5 copy to clipboard failed")}},t.chooseImage=function(){this.isPlatform(i.wx)?cc.log("---wxChooseImage---"):cc.sys.platform==cc.sys.BYTEDANCE_GAME?cc.log("---ttChooseImage---"):cc.sys.isBrowser&&cc.log("---h5ChooseImage---")},t.preloadVideoAd=function(t,e,o,n,a){var r=this;void 0===a&&(a=!0),cc.log("[sdk] video ad",t);var c=t;if(console.log("cc.sys.os:",cc.sys.os),console.log("adID:",c),console.log("this.videoAdMap:",this.videoAdMap),""!=c){var s=null;if(this.videoAdMap[c]){if(!a)return console.log("[video ad] \u4f7f\u7528\u5df2\u6709\u56de\u8c03\u65b9\u6cd5"),this.videoAdMap[c];var l=this.videoAdMap[c],u=l.video,d=l.close,h=l.error;u.offClose(d),u.offError(h),s=u,console.log("[video ad] \u6e05\u7a7a\u56de\u8c03\u65b9\u6cd5")}else console.log("\u521b\u5efa\u5b9e\u529b"),this.isPlatform(i.wx)?s=wx.createRewardedVideoAd({adUnitId:c,multiton:!0}):this.isPlatform(i.tt)?s=tt.createRewardedVideoAd({adUnitId:c,multiton:!0}):this.isPlatform(i.oppo)?s=qg.createRewardedVideoAd({adUnitId:c}):this.isPlatform(i.vivo)&&(s=ad.createRewardedVideoAd({adUnitId:c}));var f=function(t){t&&t.isEnded||void 0===t?(console.log("\u6b63\u5e38\u64ad\u653e\u7ed3\u675f\uff0c\u53ef\u4ee5\u4e0b\u53d1\u6e38\u620f\u5956\u52b1 ++++"),e&&e(),r.isPlatform(i.wx)&&r.reportRewardBehavior(4,c,s)):(cc.game.emit("showMainTips","\u4e2d\u9014\u9000\u51fa\uff0c\u4e0d\u4e0b\u53d1\u6e38\u620f\u5956\u52b1"),console.log("\u64ad\u653e\u4e2d\u9014\u9000\u51fa\uff0c\u4e0d\u4e0b\u53d1\u6e38\u620f\u5956\u52b1 ----"),o&&o("quit","\u4e2d\u9014\u9000\u51fa"),r.isPlatform(i.wx)&&r.reportRewardBehavior(3,c,s)),p.default.playBGM(),r._canShowRewardedVideoAd=!0},m=function(t){1004==t.errCode||1005==t.errCode||1006==t.errCode?n&&n("no-fit","\u6ca1\u6709\u5408\u9002\u7684\u5e7f\u544a"):o&&o(t.errCode,t.errMsg),r.reportRewardBehavior(5,c,s),console.log("\u6ca1\u6709\u5408\u9002\u7684\u5e7f\u544a = ",t.errCode,t.errMsg),cc.game.emit("showMainTips","\u5e7f\u544a\u62c9\u53d6\u5931\u8d25",t.errCode),p.default.playBGM(),r._canShowRewardedVideoAd=!0};if(null!=s&&null!=s)return s.onClose(f),s.onError(m),this.isPlatform(i.wx)&&s.onLoad(function(t){t&&(1==t.shareValue?r.wxValue="shareValue":1==t.rewardValue?r.wxValue="rewardValue":r.wxValue=""),console.log("\u6fc0\u52b1\u89c6\u9891 \u5e7f\u544a\u52a0\u8f7d\u6210\u529f = ",t,"wxValue = ",r.wxValue)}),cc.log("[video ad] \u6ce8\u518c\u65b0\u7684\u56de\u8c03\u65b9\u6cd5"),this.videoAdMap[c]={video:s,close:f,error:m},this.videoAdMap[c]}},t.share=function(t,e,o,n){var a=this;this.isPlatform(i.wx)?h.default.shareMethod({success:function(){o&&o()},fail:function(){n&&n()},complete:function(){if(a.videoAdMap[e]){var o=a.videoAdMap[e].video;a.reportShareBehavior(t,e,o)}}}):o&&o()},t.createCanvas=function(){if(this.isPlatform(i.wx)){var t=canvas.toTempFilePathSync({x:0,y:0,width:cc.winSize.width,height:cc.winSize.height,destWidth:cc.winSize.width,destHeight:cc.winSize.height,fileType:"png",quality:"1.0"});this.wxSave(t)}else if(this.isPlatform(i.tt)){var e=canvas.toTempFilePathSync({x:0,y:0,width:cc.winSize.width,height:cc.winSize.height,destWidth:cc.winSize.width,destHeight:cc.winSize.height});tt.shareAppMessage({imageUrl:e})}},t.wxSave=function(t){wx.authorize({scope:"scope.writePhotosAlbum",success:function(){wx.saveImageToPhotosAlbum({filePath:t,success:function(){wx.showToast({title:"\u622a\u56fe\u5df2\u4fdd\u5b58\u81f3\u76f8\u518c,\u5feb\u5feb\u5206\u4eab\u5230\u670b\u53cb\u5708\u5427",icon:"none",image:"",duration:1500})},fail:function(){}})},fail:function(){var e={title:"\u5fae\u4fe1\u6388\u6743",content:"\u4fdd\u5b58\u5230\u76f8\u518c\u9700\u8981\u60a8\u7684\u6388\u6743\uff0c\u8bf7\u7ed9\u4e88\u6211\u4eec\u6388\u6743",showCancel:!0,canelColor:"#666",confirmText:"\u53bb\u6388\u6743",confirmColor:"#666",success:function(e){1==e.confirm&&wx.openSetting({success:function(){wx.saveImageToPhotosAlbum({filePath:t,success:function(){wx.showToast({title:"\u622a\u56fe\u5df2\u4fdd\u5b58\u81f3\u76f8\u518c,\u5feb\u5feb\u5206\u4eab\u5230\u670b\u53cb\u5708\u5427",icon:"none",image:"",duration:1500})},fail:function(){}})}})}};wx.showModal(e)}})},t.reportRewardBehavior=function(t,e,o){o.reportShareBehavior({operation:t,currentShow:0,strategy:1,adunit:e,scenelD:1,shareValue:0,rewardValue:1})},t.reportShareBehavior=function(t,e,o){o.reportShareBehavior({operation:6,inviteUser:t,strategy:1,adunit:e,scenelD:1,shareValue:1,rewardValue:0})},t.watchAdVideo=function(t){var e=this,o=t.id,n=t.tag,a=t.success,r=t.fail,c=t.nofit;if(0!=this._canShowRewardedVideoAd)if(cc.log("[sdk] watch ad video",n),cc.sys.isBrowser)a&&a();else{if(""!=o){if(this.isPlatform(i.android))l.default.showRewardVideoAd(o,a,r);else if(this.isPlatform(i.wx)){var s=this.preloadVideoAd(o,a,r,c,!0).video;s.show().then(function(){return s.show(),e.reportRewardBehavior(1,o,s),!0}).catch(function(t){if(console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u5931\u8d25",t),console.log("\u5e7f\u544a\u7ec4\u4ef6\u51fa\u73b0\u95ee\u9898",t),s.load().then(function(){console.log("\u624b\u52a8\u52a0\u8f7d\u6210\u529f"),s.show()}),"can't invoke load() while video-ad is showed"!=t.errMsg)return r&&r(t),!1;console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.")})}else if(this.isPlatform(i.tt)){console.log("[\u5b57\u8282sdk]");var u=this.preloadVideoAd(o,a,r,c,!0).video;u.show().then(function(){return console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u6210\u529f"),!0}).catch(function(t){if(console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u5931\u8d25",t),console.log("\u5e7f\u544a\u7ec4\u4ef6\u51fa\u73b0\u95ee\u9898",t),u.load().then(function(){console.log("\u624b\u52a8\u52a0\u8f7d\u6210\u529f"),u.show()}),"can't invoke load() while video-ad is showed"!=t.errMsg)return r&&r(t),!1;console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.")})}else if(this.isPlatform(i.oppo)){console.log("[oppo sdk]");var p=this.preloadVideoAd(o,a,r,c,!0).video;p.show().then(function(){return console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u6210\u529f"),!0}).catch(function(t){if(console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u5931\u8d25",t),console.log("\u5e7f\u544a\u7ec4\u4ef6\u51fa\u73b0\u95ee\u9898",t),p.load().then(function(){console.log("\u624b\u52a8\u52a0\u8f7d\u6210\u529f"),p.show()}),"can't invoke load() while video-ad is showed"!=t.errMsg)return r&&r(t),!1;console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.")})}else if(this.isPlatform(i.vivo)){console.log("[vivo sdk]");var d=this.preloadVideoAd(o,a,r,c,!0).video;d.show().then(function(){return console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u6210\u529f"),!0}).catch(function(t){if(console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u5931\u8d25",t),console.log("\u5e7f\u544a\u7ec4\u4ef6\u51fa\u73b0\u95ee\u9898",t),d.load().then(function(){console.log("\u624b\u52a8\u52a0\u8f7d\u6210\u529f"),d.show()}),"can't invoke load() while video-ad is showed"!=t.errMsg)return r&&r(t),!1;console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.")})}return!0}a&&a()}},t.showInterstitialAd=function(t){this.isPlatform(i.wx)?r.default.showInterstitialAd():cc.sys.platform==cc.sys.BYTEDANCE_GAME?c.default.showInterstitialAd():this.isPlatform(i.android)&&l.default.showInterstitialAd(t.tag)},t.showFullScreenAd=function(t){this.isPlatform(i.android)&&l.default.showFullScreenAd(t)},t.showBigImageAd=function(t){this.isPlatform(i.android)&&l.default.showBigImageAd(t)},t.hideBigImageAd=function(t){this.isPlatform(i.android)&&l.default.hideBigImageAd(t)},t.showBannerAd=function(){this.isPlatform(i.wx)?r.default.showBannerAd():cc.sys.platform==cc.sys.BYTEDANCE_GAME&&c.default.showBannerAd()},t.hideBannerAd=function(){this.isPlatform(i.wx)?r.default.hideBannerAd():cc.sys.platform==cc.sys.BYTEDANCE_GAME&&c.default.hideBannerAd()},t.showToast=function(t){this.isPlatform(i.wx)?r.default.showToast(t):(cc.sys.platform,cc.sys.BYTEDANCE_GAME)},t.getDeviceId=function(){return""},t.uploadFile=function(t){var e=this.host;cc.sys.platform==cc.sys.BYTEDANCE_GAME&&tt.uploadFile({url:e+t.url,filePath:t.file,name:"image_file",formData:t.data,success:t.success,fail:t.fail,complete:t.complete})},t.on=function(t,e,o){return cc.systemEvent.on(t,e,o)},t.once=function(t,e,o){return cc.systemEvent.once(t,e,o)},t.off=function(t,e,o){return cc.systemEvent.off(t,e,o)},t.targetOff=function(t){return cc.systemEvent.targetOff(t)},t.createAuthorizeBtn=function(t,e){var o=t.getBoundingBoxToWorld(),n=cc.view.getFrameSize(),a=cc.winSize,i=o.xMin/a.width*n.width,r=(a.height-o.yMax)/a.height*n.height,c=o.width/a.width*n.width,s=o.height/a.height*n.height,l=this.createUserInfoButton({type:"text",text:" ",style:{left:i,top:r,width:c,height:s,lineHeight:0,backgroundColor:"",color:"#ffffff",textAlign:"center",fontSize:16,borderRadius:4}});return l.onTap(function(t){t.iv||t.signature?e(!0):e(!1)}),l},t.rankScoreUpdate=function(t,e,o){this.isPlatform(i.wx)&&r.default.wxRankScoreUpdate(t,e,o)},t.rankScoreRemove=function(t){this.isPlatform(i.wx)&&r.default.wxRankScoreRemove(t)},t.showSubContext=function(t,e,o,n){this.isPlatform(i.wx)&&r.default.wxShowSubContext(t,e,o,n)},t.getAppVersion=function(){return""},t.isPlatform=function(t){switch(t){case i.android:return!(!cc.sys.isNative||cc.sys.os!=cc.sys.OS_ANDROID);case i.ios:return!(!cc.sys.isNative||cc.sys.os!=cc.sys.OS_IOS);case i.wx:return cc.sys.platform==cc.sys.WECHAT_GAME;case i.tt:return cc.sys.platform==cc.sys.BYTEDANCE_GAME;case i.oppo:return cc.sys.platform==cc.sys.OPPO_GAME;case i.vivo:return cc.sys.platform==cc.sys.VIVO_GAME;case i.web:return cc.sys.isBrowser}return!1},t.getPlatform=function(){return cc.sys.isNative&&cc.sys.os==cc.sys.OS_ANDROID?i.android:cc.sys.isNative&&cc.sys.os==cc.sys.OS_IOS?i.ios:cc.sys.platform==cc.sys.WECHAT_GAME?i.wx:i.web},t.createUserInfoButton=function(t){return wx.createUserInfoButton?wx.createUserInfoButton(t):(cc.log("[sdk] createUserInfoButton"),null)},t._shareNum=0,t._shareCount=0,t._canShowRewardedVideoAd=!0,t.host=f.host,t.wxValue="",t.videoAdMap={},t}();o.default=m,m.checkUpdateManager(),cc._RF.pop()},{"../public/data-env":"data-env","./enumConfig":"enumConfig","./http":"http","./native/android-sdk":"android-sdk","./native/audio":"audio","./native/share":"share","./native/tt-sdk":"tt-sdk","./native/wx-sdk":"wx-sdk"}],selectLevelPop:[function(t,e,o){"use strict";cc._RF.push(e,"20c37kr4K9IaaKo8NFkM2dj","selectLevelPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/dataTs"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputLevelNum=null,e.closeNode=null,e}return a(e,t),e.prototype.start=function(){this.closeNode.on(cc.Node.EventType.TOUCH_END,this.closeFunc,this)},e.prototype.showSelectLevelPop=function(){this.node.active=!0,this.inputLevelNum.string=""},e.prototype.selectLevelFunc=function(){var t=Number(this.inputLevelNum.string);t>0?(this.node.active=!1,this.emitSelectLevel(t),console.log("\u8bbe\u7f6e\u5173\u5361\u6570",this.inputLevelNum.string)):console.log("error:\u4e66\u5199\u9519\u8bef")},e.prototype.emitSelectLevel=function(t){r.default.getLevelMapData(t,function(t){if(console.log("data:",t),t){var e={newLevelData:t};cc.game.emit("initLevelData",e)}else console.log("error:\u627e\u4e0d\u5230\u5bf9\u5e94\u5173\u5361")})},e.prototype.closeFunc=function(){this.node.active=!1},i([l({type:cc.EditBox,tooltip:"\u8f93\u5165\u5bf9\u5e94\u5173\u5361\u6570"})],e.prototype,"inputLevelNum",void 0),i([l(cc.Node)],e.prototype,"closeNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../common/dataTs":"dataTs"}],setBloackNumPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"adc65qZJIVBEbnAGo5PKVIz","setBloackNumPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blockImg=null,e.typeID=null,e.inputBlockNum=null,e.blockType=0,e.parentCallbackFunc=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.initBlockNumNode=function(t,e,o){this.blockType=t,this.parentCallbackFunc=o;var n=e[t];n&&(this.inputBlockNum.string=""+n);var a="block/block_"+t+".png";r.default.changeSpriteFrame(this.blockImg,a)},e.prototype.setBlockNumFun=function(){var t=Number(this.inputBlockNum.string);this.parentCallbackFunc(this.blockType,t)},i([l(cc.Node)],e.prototype,"blockImg",void 0),i([l(cc.Label)],e.prototype,"typeID",void 0),i([l({type:cc.EditBox,tooltip:"\u5757\u7684\u4f7f\u7528\u7ec4\u6570"})],e.prototype,"inputBlockNum",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],setBlockNumPop:[function(t,e,o){"use strict";cc._RF.push(e,"223a5iixK9JDqi/hb6BvmvY","setBlockNumPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/mapEditor/setBloackNumPrefab"),c=t("../common/config"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.setBlockNumPrefab=null,e.closeNode=null,e.blockContent=null,e.groupNumLabel=null,e.blockTypeConfig=c.default.blockTypeConfig,e.blockDataObj={},e.newScale=.5,e.blockPreWidth=60,e.blockPreHeight=110,e.groupMax=0,e.hengNum=10,e}return a(e,t),e.prototype.start=function(){this.closeNode.on(cc.Node.EventType.TOUCH_END,this.closeFunc,this)},e.prototype.showSetBlockPop=function(t,e){for(var o in console.log("groupMax = ",t),this.node.active=!0,this.blockDataObj=e,this.groupMax=t,this.updateGroupNum(),this.blockContent.removeAllChildren(),this.blockTypeConfig)this.addSetBlockNumNode(o,this.blockTypeConfig[o],e);this.blockContent.height=(Math.ceil(this.blockTypeConfig.length/this.hengNum)+1)*this.blockPreHeight},e.prototype.addSetBlockNumNode=function(t,e,o){var n=cc.instantiate(this.setBlockNumPrefab),a=this.blockPreWidth/2+t%this.hengNum*(this.blockPreWidth+5)-this.blockContent.width/2,i=this.blockPreHeight/2+Math.floor(t/this.hengNum)*(this.blockPreHeight+40);n.x=a,n.y=-i,n.scale=this.newScale,n.getComponent(r.default).initBlockNumNode(e,o,this.chileSetBlockNum.bind(this)),this.blockContent.addChild(n)},e.prototype.chileSetBlockNum=function(t,e){e?this.blockDataObj[t]=e:delete this.blockDataObj[t],this.updateGroupNum()},e.prototype.updateGroupNum=function(){var t=0;for(var e in this.blockDataObj)t+=this.blockDataObj[e];this.groupNumLabel.string="\u7ec4\u6570\uff1a"+t+"/"+this.groupMax},e.prototype.closeFunc=function(){this.node.active=!1},e.prototype.confirmFunc=function(){var t=0;for(var e in this.blockDataObj)t+=this.blockDataObj[e];t==this.groupMax?(console.log("\u914d\u7f6e\u65e0\u8bef"),cc.game.emit("showTips","\u914d\u7f6e\u6210\u529f"),this.node.active=!1,cc.game.emit("setBlockTypeData",this.blockDataObj)):(console.log("\u914d\u7f6e\u6709\u9519"),cc.game.emit("showTips","\u914d\u7f6e\u6709\u9519"))},i([u(cc.Prefab)],e.prototype,"setBlockNumPrefab",void 0),i([u(cc.Node)],e.prototype,"closeNode",void 0),i([u(cc.Node)],e.prototype,"blockContent",void 0),i([u(cc.Label)],e.prototype,"groupNumLabel",void 0),i([l],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../../pre/mapEditor/setBloackNumPrefab":"setBloackNumPrefab","../common/config":"config"}],setupPop:[function(t,e,o){"use strict";cc._RF.push(e,"71b23kHj7xHS5zCkm73iIBG","setupPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/native/audio"),d=t("../common/native/wx-sdk"),h=t("../common/sdk"),f=t("../manager/GameManager"),m=t("../manager/report-common"),g=t("../utils/uma/uma-sdk"),y=cc._decorator,v=y.ccclass,b=y.property,_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.userIdLabel=null,e.titleLabel=null,e.soundLabel=null,e.musicLabel=null,e.shakeLabel=null,e.backLabel=null,e.closeBtn=null,e.returnMainBtn=null,e.shareBtn=null,e.shareVideo=null,e.shareLabel=null,e.effectBtn=null,e.effectBg=null,e.musicBtn=null,e.musicBg=null,e.shockBtn=null,e.shockBg=null,e.bulletBtn=null,e.bulletBg=null,e.whiteCycle=null,e.greenCycle=null,e.userNode=null,e.privacyNode=null,e.showPopData=null,e.setupData=null,e.whiteBtnX=27,e}return a(e,t),e.prototype.start=function(){this.effectBtn.on("touchend",this.setEffectFunc,this),this.musicBtn.on("touchend",this.setMusicFunc,this),this.shockBtn.on("touchend",this.setShockFunc,this),this.bulletBtn.on("touchend",this.setBulletFunc,this),s.default.addbtnTouchEndScale(this.mask,this.hideSetupPop.bind(this)),s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.hideSetupPop.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),s.default.addbtnTouchStartScale(this.returnMainBtn),s.default.addbtnTouchEndScale(this.returnMainBtn,this.returnMainFunc.bind(this)),s.default.addbtnTouchCancelScale(this.returnMainBtn),s.default.addbtnTouchStartScale(this.shareBtn),s.default.addbtnTouchEndScale(this.shareBtn,this.shareBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.shareBtn),s.default.addTargetTouchUpInside(this.userNode,this.userNodeFunc.bind(this)),s.default.addTargetTouchUpInside(this.privacyNode,this.privacyNodeFunc.bind(this)),this.setupFonts(),h.default.isPlatform(h.Platform.oppo)||h.default.isPlatform(h.Platform.vivo)?(this.userNode.active=!0,this.privacyNode.active=!0):(this.userNode.active=!1,this.privacyNode.active=!1)},e.prototype.userNodeFunc=function(){console.log("\u7528\u6237\u534f\u8bae"),cc.sys.openURL("https://www.52shenbian.com/yinsi/yinsi.html")},e.prototype.privacyNodeFunc=function(){console.log("\u9690\u79c1\u653f\u7b56"),cc.sys.openURL("https://www.52shenbian.com/yinsi/fuwu.html")},e.prototype.setupFonts=function(){this.titleLabel.string=c.default.instance.trans(r.GDLanguage.set_up),this.soundLabel.string=c.default.instance.trans(r.GDLanguage.set_up_sound_effect),this.musicLabel.string=c.default.instance.trans(r.GDLanguage.set_up_music),this.shakeLabel.string=c.default.instance.trans(r.GDLanguage.set_up_shock);var t=l.default.getItem(u.STORAGEKEY.BULLETSWITCH);console.log("bullet = "+t),-1==t?(this.bulletBg.stopAllActions(),cc.tween(this.bulletBg).to(.2,{opacity:0}).start()):(this.bulletBg.stopAllActions(),cc.tween(this.bulletBg).delay(.1).to(.2,{opacity:255}).start())},e.prototype.showSetupPop=function(t){this.node.active=!0,this.showPopData=t,this.returnMainBtn.active=!1,this.shareBtn.active=!1;var e=l.default.getUserData();e.userID.length?(this.userIdLabel.string="UID: "+e.userID,this.userIdLabel.node.active=!0):this.userIdLabel.node.active=!1,2==t.setupType?this.returnMainBtn.active=!0:1==t.setupType&&(this.shareBtn.active=!0,l.default.isPlatform(l.GDPlatform.wx)?(this.shareLabel.getComponent(cc.Label).string="\u5b98\u65b9\u5fae\u535a",s.default.changeSpriteFrame(this.shareVideo,"rewardIcon/reward_weibo_icon.png")):(l.default.isPlatform(l.GDPlatform.oppo)||l.default.isPlatform(l.GDPlatform.oppo))&&(this.shareBtn.active=!1)),cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.setSetupStatus()},e.prototype.hideSetupPop=function(){this.showPopData&&this.showPopData.popCallbackCollect&&this.showPopData.popCallbackCollect.resumeCallBack(),this.node.active=!1},e.prototype.setSetupStatus=function(){this.setupData=l.default.getUserSetupData(),1==this.setupData.effectStatus?this.effectBg.opacity=255:this.effectBg.opacity=0,1==this.setupData.musicStatus?this.musicBg.opacity=255:this.musicBg.opacity=0,1==this.setupData.shockStatus?this.shockBg.opacity=255:this.shockBg.opacity=0},e.prototype.setEffectFunc=function(){1==this.setupData.effectStatus?(this.effectBg.stopAllActions(),cc.tween(this.effectBg).to(.2,{opacity:0}).start()):(this.effectBg.stopAllActions(),cc.tween(this.effectBg).delay(.1).to(.2,{opacity:255}).start()),this.setupData.effectStatus=-this.setupData.effectStatus,l.default.saveUserSetupData(this.setupData),p.default.playBGM()},e.prototype.setMusicFunc=function(){1==this.setupData.musicStatus?(this.musicBg.stopAllActions(),cc.tween(this.musicBg).to(.2,{opacity:0}).start()):(this.musicBg.stopAllActions(),cc.tween(this.musicBg).delay(.1).to(.2,{opacity:255}).start()),this.setupData.musicStatus=-this.setupData.musicStatus,l.default.saveUserSetupData(this.setupData),p.default.playBGM(),1==this.setupData.musicStatus?p.default.playBGM():m.default.reportTACommon("music_close",{})},e.prototype.setShockFunc=function(){1==this.setupData.shockStatus?(this.shockBg.stopAllActions(),cc.tween(this.shockBg).to(.2,{opacity:0}).start()):(this.shockBg.stopAllActions(),cc.tween(this.shockBg).delay(.1).to(.2,{opacity:255}).start()),this.setupData.shockStatus=-this.setupData.shockStatus,l.default.saveUserSetupData(this.setupData)},e.prototype.setBulletFunc=function(){var t=l.default.getItem(u.STORAGEKEY.BULLETSWITCH);console.log("bullet = "+t),1==t?(this.bulletBg.stopAllActions(),cc.tween(this.bulletBg).to(.2,{opacity:0}).start()):(t=-1,this.bulletBg.stopAllActions(),cc.tween(this.bulletBg).delay(.1).to(.2,{opacity:255}).start()),t=-t,l.default.setItem(u.STORAGEKEY.BULLETSWITCH,t),cc.game.emit(u.EMITKEY.BULLETSTATE)},e.prototype.shareBtnFunc=function(){l.default.isPlatform(l.GDPlatform.tt)?cc.game.emit(u.EMITKEY.TTSHARERECORD):l.default.isPlatform(l.GDPlatform.wx)&&d.default.weiBoJump()},e.prototype.returnMainFunc=function(){if(f.default.getInstance().gameType==u.GAMETYPE.GAMELEVEL){if(l.default.getSprintRewardData().winNum>0){var t={popName:"sprintRewardPop",showPopData:{popCallbackCollect:null,popType:1}};cc.game.emit("showPop",t)}f.default.getInstance().cookieDict.cookieCurCount>0&&(t={popName:"loseCookiePop",showPopData:{popCallbackCollect:null,popType:1}},cc.game.emit("showPop",t))}var e=0==f.default.getInstance().sheepMark.resurgenceCount?0:1;console.log("\u5c55\u793a\u5931\u53bb\u7231\u5fc3\u5f39\u6846");var o={popName:"loseLovePop",showPopData:{popCallbackCollect:null,popType:e}};cc.game.emit("showPop",o),this.node.active=!1},e.prototype.contactFunc=function(){console.log("\u8054\u7cfb\u5ba2\u670d"),g.default.trackEvent("setting_service")},i([b(cc.Node)],e.prototype,"mask",void 0),i([b(cc.Node)],e.prototype,"popNode",void 0),i([b(cc.Label)],e.prototype,"userIdLabel",void 0),i([b(cc.Label)],e.prototype,"titleLabel",void 0),i([b(cc.Label)],e.prototype,"soundLabel",void 0),i([b(cc.Label)],e.prototype,"musicLabel",void 0),i([b(cc.Label)],e.prototype,"shakeLabel",void 0),i([b(cc.Label)],e.prototype,"backLabel",void 0),i([b(cc.Node)],e.prototype,"closeBtn",void 0),i([b(cc.Node)],e.prototype,"returnMainBtn",void 0),i([b(cc.Node)],e.prototype,"shareBtn",void 0),i([b(cc.Node)],e.prototype,"shareVideo",void 0),i([b(cc.Node)],e.prototype,"shareLabel",void 0),i([b(cc.Node)],e.prototype,"effectBtn",void 0),i([b(cc.Node)],e.prototype,"effectBg",void 0),i([b(cc.Node)],e.prototype,"musicBtn",void 0),i([b(cc.Node)],e.prototype,"musicBg",void 0),i([b(cc.Node)],e.prototype,"shockBtn",void 0),i([b(cc.Node)],e.prototype,"shockBg",void 0),i([b(cc.Node)],e.prototype,"bulletBtn",void 0),i([b(cc.Node)],e.prototype,"bulletBg",void 0),i([b(cc.SpriteFrame)],e.prototype,"whiteCycle",void 0),i([b(cc.SpriteFrame)],e.prototype,"greenCycle",void 0),i([b(cc.Node)],e.prototype,"userNode",void 0),i([b(cc.Node)],e.prototype,"privacyNode",void 0),i([v],e)}(cc.Component);o.default=_,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/native/wx-sdk":"wx-sdk","../common/sdk":"sdk","../manager/GameManager":"GameManager","../manager/report-common":"report-common","../utils/uma/uma-sdk":"uma-sdk"}],shareNodePop:[function(t,e,o){"use strict";cc._RF.push(e,"a0bd2kRDllJoo/euhMYhvFy","shareNodePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/enumConfig"),l=t("../common/native/share"),u=t("../common/native/tt-sdk"),p=cc._decorator,d=p.ccclass,h=p.property,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.shareNodeVideo=null,e.shareNodeUrl=null,e.closeVideoBtn=null,e.shareVideoBtn=null,e.exitVideoBtn=null,e.closeUrlBtn=null,e.shareUrlBtn=null,e.exitUrlBtn=null,e.popData=null,e}return a(e,t),e.prototype.start=function(){r.default.addTargetTouchUpInside(this.closeVideoBtn,this.closeVideoBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.shareVideoBtn,this.shareVideoBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.exitVideoBtn,this.exitVideoBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.closeUrlBtn,this.closeUrlBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.shareUrlBtn,this.shareUrlBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.exitUrlBtn,this.exitUrlBtnFunc.bind(this))},e.prototype.closeVideoBtnFunc=function(){this.node.active=!1},e.prototype.shareVideoBtnFunc=function(){cc.game.emit(s.EMITKEY.TTSHARERECORD)},e.prototype.exitVideoBtnFunc=function(){this.node.active=!1},e.prototype.closeUrlBtnFunc=function(){this.node.active=!1},e.prototype.shareUrlBtnFunc=function(){var t=this,e=this;c.default.isPlatform(c.GDPlatform.tt)?u.default.shareTemplate(function(o){console.log("shareTemplate = ",o),o&&(e.node.active=!1),t.popData&&t.popData.shareCb&&(e.popData.shareCb(o),e.node.active=!1)}):c.default.isPlatform(c.GDPlatform.wx)?l.default.shareMethod({success:function(){},fail:function(){},complete:function(){}}):this.node.active=!1},e.prototype.exitUrlBtnFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){this.popData=t,this.shareNodeVideo.active=!1,this.shareNodeUrl.active=!1,this.node.active=!0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),c.default.isPlatform(c.GDPlatform.tt)?1==t.type?this.shareNodeVideo.active=!0:2==t.type&&(this.shareNodeUrl.active=!0):(c.default.isPlatform(c.GDPlatform.wx),this.shareNodeUrl.active=!0)},i([h(cc.Node)],e.prototype,"popNode",void 0),i([h(cc.Node)],e.prototype,"shareNodeVideo",void 0),i([h(cc.Node)],e.prototype,"shareNodeUrl",void 0),i([h(cc.Node)],e.prototype,"closeVideoBtn",void 0),i([h(cc.Node)],e.prototype,"shareVideoBtn",void 0),i([h(cc.Node)],e.prototype,"exitVideoBtn",void 0),i([h(cc.Node)],e.prototype,"closeUrlBtn",void 0),i([h(cc.Node)],e.prototype,"shareUrlBtn",void 0),i([h(cc.Node)],e.prototype,"exitUrlBtn",void 0),i([d],e)}(cc.Component);o.default=f,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/share":"share","../common/native/tt-sdk":"tt-sdk"}],share:[function(t,e,o){"use strict";cc._RF.push(e,"cc74eL1jO5JXILJM8B5nOu3","share"),Object.defineProperty(o,"__esModule",{value:!0}),o.ShareType=void 0;var n=t("../sdk");(function(t){t.share="share",t.addFriend="addFriend",t.getReward="getReward"})(o.ShareType||(o.ShareType={}));var a=function(){function t(){}return t.init=function(){n.default.setOnShow(function(){}),n.default.setOnShow(function(){});var t=this.getShareParams(),e={title:t.title,imageUrl:t.imageUrl,query:"1"};n.default.setOnShareAppMessage(e)},t.getRewardShare=function(t){var e=this.getShareParams(),o={title:e.title,imageUrl:e.imageUrl,success:function(e){console.log("Share","success",e),e&&(t.success(),console.log("\u5206\u4eab\u6210\u529f"))},fail:function(e){console.log("Share","success",e),e&&(t.fail(),console.log("\u5206\u4eab\u5931\u8d25"))},query:"2",validate:!0};this.initiativeShare(o,!0)},t.shareMethod=function(t){var e=t.success,o=t.fail,n=t.complete,a=this.getShareParams();this.initiativeShare({title:a.title,imageUrl:a.imageUrl,success:function(t){console.log("\u5206\u4eab success = ",t),e&&e(t)},fail:function(t){console.log("\u5206\u4eab fail = ",t),o&&o(t)},complete:function(t){console.log("\u5206\u4eab complete = ",t),n&&n(t)},validate:!0},!0)},t.initiativeShare=function(t,e){if(n.default.isPlatform(n.Platform.web))return t.success&&t.success(!0),void(t.complete&&t.complete(!1));var o=!1,a=(new Date).getTime(),i=!0;1==t.validate?e?(console.log("\u5206\u4eab 111"),n.default.setOnShowOnce(function(){i?(o=(new Date).getTime()-a>=2500,console.log("\u5206\u4eab 222 result = ",o,"startTime = ",a),0==o?(t.fail&&t.fail(!0),t.complete&&t.complete(!1),console.log("\u5206\u4eab 333")):(a=(new Date).getTime(),console.log("\u5206\u4eab 444 result = ",o,"startTime = ",a),i=!1,t.success&&t.success(!0),t.complete&&t.complete(!0))):console.log("\u591a\u6b21\u8fdb\u5165\u540e\u53f0 ###### ")})):(console.log("\u5206\u4eab 555"),n.default.setOnShow(function(){0==(o=(new Date).getTime()-a>=2500)?(t.fail&&t.fail(!0),t.complete&&t.complete(!1)):(t.success&&t.success(!0),t.complete&&t.complete(!0))})):(t.success(!0),t.complete&&t.complete(!0));var r="";t.query&&(r=t.query),wx.shareAppMessage({title:t.title,imageUrl:t.imageUrl,query:r})},t.getShareParams=function(){var t=[{title:"\u6700\u65b0\u51fa\u7089\u5168\u56fd\u7701\u4efd\u667a\u529b\u6392\u884c\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_1.jpg"},{title:"\u5e26\u85aa\u4e0a\u5395\u6240\u7684\u65f6\u5019\u90fd\u5728\u73a9\u5565\uff1f",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_2.jpg"},{title:"\u636e\u8bf4\u901a\u5173\u7684\u90fd\u80fd\u8fbe\u5230\u7231\u56e0\u65af\u5766\u7684IQ\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_3.jpg"},{title:"\u6562\u4e0d\u6562\u7761\u89c9\u524d\u73a9\u8fd9\u4e2a\u6e38\u620f\uff1f",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_4.jpg"},{title:"\u4ec0\u4e48\u80fd\u963b\u6b62\u6211\u7761\u89c9\uff1f\u5c31\u662f\u8fd9\u5934\u7f8a\uff01\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_5.jpg"},{title:"\u667a\u529b\u4e0d\u591f\uff0c\u5c31\u4e0d\u8981\u6765\u6311\u6218\u8fd9\u4e2a\u6e38\u620f\u4e86\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_6.jpg"},{title:"\u6562\u4e0d\u6562\u6765\u6d4b\u7b97\u4e0b\u4f60\u7684\u667a\u5546\u591f\u4e0d\u591f\uff1f",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_7.jpg"},{title:"\u636e\u8bf4\u53ea\u67090.01%\u7684\u4eba\u53ef\u4ee5\u901a\u5173\uff01\u73bb\u7483\u5fc3\u52ff\u8fdb\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_8.jpg"}];return t[Math.floor(Math.random()*t.length)]},t.shareId=0,t.parsedId="",t}();o.default=a,cc._RF.pop()},{"../sdk":"sdk"}],"sheep-card":[function(t,e,o){"use strict";cc._RF.push(e,"a4c42prjHtESYEMJNr5MQAH","sheep-card");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.redbgNode=null,e.bluebgNode=null,e.graybgNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setupData=function(t){this.redbgNode.active=!1,this.bluebgNode.active=!1,this.graybgNode.active=!1;var e=null,o=!1;if(1==t.type?(this.redbgNode.active=!0,e=this.redbgNode,o=!0):2==t.type?(this.bluebgNode.active=!0,e=this.bluebgNode):3==t.type&&(this.graybgNode.active=!0,e=this.graybgNode),e){var n=e.getChildByName("num-label").getComponent(cc.Label),a=e.getChildByName("count-label").getComponent(cc.Label),i=e.getChildByName("name-label").getComponent(cc.Label);if(n.string="\u7b2c "+t.num+" \u540d",a.string=t.item.win_score+" \u7f8a",i.string=t.item.name+"\u7f8a\u961f",o){var r=e.getChildByName("flash_1"),c=e.getChildByName("flash_2");this.playAnimationFloat(r,255),this.playAnimationFloat(c,-255)}}},e.prototype.playAnimationFloat=function(t,e){var o=this;cc.tween(t).delay(.5).by(.1,{opacity:e}).call(function(){o.playAnimationFloat(t,-e)}).start()},i([s(cc.Node)],e.prototype,"redbgNode",void 0),i([s(cc.Node)],e.prototype,"bluebgNode",void 0),i([s(cc.Node)],e.prototype,"graybgNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],"sheep-flock-icon":[function(t,e,o){"use strict";cc._RF.push(e,"a441bXbKtZDx6Z6u1Z9IX7r","sheep-flock-icon");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.iconHeader=null,e.purpleNode=null,e.blueNode=null,e.regionNode=null,e.cityNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t){var e=this;t?(this.node.stopAllActions(),this.node.active=!0,cc.tween(this.node).delay(3).call(function(){e.node.active=!1},this).start(),0==t.gender?(this.purpleNode.active=!1,this.blueNode.active=!0):1==t.gender?(this.purpleNode.active=!1,this.blueNode.active=!0):(this.purpleNode.active=!0,this.blueNode.active=!1),t.nick_name?this.regionNode.getComponent(cc.Label).string=t.nick_name:this.regionNode.getComponent(cc.Label).string="",t.city?this.cityNode.getComponent(cc.Label).string=t.city:this.cityNode.getComponent(cc.Label).string="",r.default.setAvatar(this.iconHeader,t.avatar)):this.node.active=!1},i([l(cc.Node)],e.prototype,"iconHeader",void 0),i([l(cc.Node)],e.prototype,"purpleNode",void 0),i([l(cc.Node)],e.prototype,"blueNode",void 0),i([l(cc.Node)],e.prototype,"regionNode",void 0),i([l(cc.Node)],e.prototype,"cityNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],"sheep-flock":[function(t,e,o){"use strict";cc._RF.push(e,"9c2fby18nZLPpABsAs/z6CS","sheep-flock");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__spreadArrays||function(){for(var t=0,e=0,o=arguments.length;e0&&"null"!=t.item.result){this.node.addChild(this.sheepIconNode),this.sheepIconNode.zIndex=200,this.sheepIconNode.active=!1;var c=JSON.parse(t.item.result);r=this.bubbleSort(c);var u=s.default.getUserData().userID;for(var d in r)Number(u)==r[d].uid&&(this.userRankInfo=r[d])}var h=t.item.all_score;h>36&&(h=36),h<=0&&(h=0);for(var m=0;mn[c+1].state?(e=[n[c+1],n[c]],n[c]=e[0],n[c+1]=e[1]):n[c].state==n[c+1].state&&n[c].fail=t.length)){var o=cc.instantiate(this.sheepNode);this.node.addChild(o),this.sheepNodeArr.push(o);var n=0;e<6?(n=6,this.radius=100):e<18?(n=12,this.radius=200):(n=18,this.radius=300);var a=this.angle/180*Math.PI,i=this.radius*Math.cos(a),r=this.radius*Math.sin(a),l=0;e0)for(var b in this.clothesData)if(this.clothesData[b].clothesId==u.skin){h="sheep/"+this.clothesData[b].spName,f=this.clothesData[b].spSkin;break}1!=u.state&&(h="sheep/Dead1"),this.setUpSheepNode(o,h,u,f);var _=o.getChildByName("clickNode");_.on(cc.Node.EventType.TOUCH_END,function(){if(console.log(_.parent.getPosition().x,_.parent.getPosition().y),this.sheepIconNode){var o=t[e];this.sheepIconNode.x=_.parent.getPosition().x,this.sheepIconNode.y=_.parent.getPosition().y+20,this.sheepIconNode.getComponent(m.default).showData(o)}},this)}},e.prototype.setUpSheepNode=function(t,e,o,n){t.getChildByName("flashSp").opacity=0,t.getChildByName("sheepSp").getComponent(u.default).loadSpine(e,function(){var a="Jump2";"sheep/Dead1"==e?(o.fail||(o.fail=1),a="Dead"+h.default.getDeadNum(o.fail),t.getChildByName("sheepSp").getComponent(u.default).play(a,0)):(t.getChildByName("sheepSp").getComponent(u.default).setNewSkin(n),t.getChildByName("sheepSp").getComponent(u.default).play(a,0))})},i([v({type:cc.Node,tooltip:"\u7f8a"})],e.prototype,"sheepSp",void 0),i([v({type:cc.Node,tooltip:"\u540d\u6b21\u724c\u5b50"})],e.prototype,"sheepCard",void 0),i([v({type:cc.Node,tooltip:"\u5361\u7247"})],e.prototype,"sheepIcon",void 0),i([v({type:cc.Node,tooltip:"\u7537\u5934\u50cf"})],e.prototype,"manSheepHeader",void 0),i([v({type:cc.Node,tooltip:"\u5973\u5934\u50cf"})],e.prototype,"womanSheepheader",void 0),i([y],e)}(cc.Component);o.default=b,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/dataTs":"dataTs","../../script/common/enumConfig":"enumConfig","../../script/common/spine":"spine","../../script/manager/DateManager":"DateManager","../../script/manager/GameManager":"GameManager","../../script/manager/data-manager":"data-manager","./sheep-card":"sheep-card","./sheep-flock-icon":"sheep-flock-icon"}],"sheep-rank-pop":[function(t,e,o){"use strict";cc._RF.push(e,"4f1e6q1O4ZIM6jxip+/6cgl","sheep-rank-pop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../manager/GameManager"),l=t("./popSub/sheepRankItem"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.sheepRankItem=null,e.rankItem=null,e.contentView=null,e.closeBtn=null,e.bottomNode=null,e}return a(e,t),e.prototype.start=function(){c.default.addbtnTouchStartScale(this.closeBtn),c.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.closeBtn)},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.sheepRankPop=function(){this.node.active=!0,this.requestData()},e.prototype.requestData=function(){if(cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.rankItem||(this.rankItem=cc.instantiate(this.sheepRankItem)),this.contentView.removeAllChildren(),this.bottomNode.active=!1,s.default.getInstance().rankInfo)this.setSubViews(s.default.getInstance().rankInfo);else{var t=this;r.default.getRankInfoData(function(e){t.setSubViews(e.data)})}},e.prototype.setSubViews=function(t){for(var e=0;e=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgNode=null,e.labelNode=null,e.numNode=null,e.nameNode=null,e.countNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setupData=function(t){var e=t.index+1;this.numNode.getComponent(cc.Label).string=e+"",this.nameNode.getComponent(cc.Label).string=t.name,this.countNode.getComponent(cc.Label).string=t.win_score+"";var o=null,n=null,a=null,i=null,r=null,c=null,s=this.imgNode.children;for(var l in s){var u=s[l];"text-black"==u.name||"text-sheep-black"==u.name?u.active=!0:u.active=!1,"num-yellow"==u.name?o=u:"num-sliver"==u.name?n=u:"num-orange"==u.name?a=u:"num-blue"==u.name?i=u:"num-black"==u.name||("img-yellow"==u.name?r=u:"img-white"==u.name?c=u:u.name)}c.active=!0,1==e?(o.active=!0,r.active=!0,c.active=!1):2==e?n.active=!0:3==e?a.active=!0:i.active=!0},e.prototype.setBottomData=function(t){this.numNode.getComponent(cc.Label).string=t.index+"",this.nameNode.getComponent(cc.Label).string=t.item.name,this.countNode.getComponent(cc.Label).string=t.item.win_score+""},i([s(cc.Node)],e.prototype,"imgNode",void 0),i([s(cc.Node)],e.prototype,"labelNode",void 0),i([s(cc.Node)],e.prototype,"numNode",void 0),i([s(cc.Node)],e.prototype,"nameNode",void 0),i([s(cc.Node)],e.prototype,"countNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],"show-daily-pop":[function(t,e,o){"use strict";cc._RF.push(e,"3a139KaoTJPZKuR6HDW3cfD","show-daily-pop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../../pre/main/rewardPrefab"),l=t("../../script/common/CcJsFunc"),u=t("../../script/common/native/audio"),p=t("../../script/common/spine"),d=cc._decorator,h=d.ccclass,f=d.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.titleSpine=null,e.boxSpine=null,e.flashNode=null,e.receiveBtn=null,e.receiveLabel=null,e.rewardPrefab=null,e.popData=null,e.rewardNodeArray=[],e.rewardDataArray=[],e}return a(e,t),e.prototype.start=function(){l.default.addbtnTouchStartScale(this.receiveBtn),l.default.addbtnTouchEndScale(this.receiveBtn,this.receiveBtnFunc.bind(this)),l.default.addbtnTouchCancelScale(this.receiveBtn)},e.prototype.receiveBtnFunc=function(){this.node.active=!1,this.receiveBtn.stopAllActions();for(var t=0;t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../../pre/main/cookieRewardNode"),l=t("../../script/common/CcJsFunc"),u=t("../../script/common/enumConfig"),p=t("../../script/common/native/audio"),d=t("../../script/common/spine"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.cookieRewardLayer=null,e.cookieTitleSpine=null,e.cookieRewardNode=null,e.cookieFlashNode=null,e.cookieImageNode=null,e.cookieNumNode=null,e.cookieReceiveBtn=null,e.cookiePropEndNode=null,e.receiveLabel=null,e.popData=null,e}return a(e,t),e.prototype.start=function(){l.default.addbtnTouchStartScale(this.cookieReceiveBtn),l.default.addbtnTouchEndScale(this.cookieReceiveBtn,this.receiveBtnFunc.bind(this)),l.default.addbtnTouchCancelScale(this.cookieReceiveBtn),this.receiveLabel.string=c.default.instance.trans(r.GDLanguage.pop_claim)},e.prototype.receiveBtnFunc=function(){var t=this;this.maskNode.active=!1,this.cookieTitleSpine.active=!1,this.cookieFlashNode.active=!1,this.cookieReceiveBtn.active=!1;var e=this.cookiePropEndNode,o=l.default.getWorldPosition(e),n=l.default.getNodePosition(this.node,o);cc.tween(this.cookieRewardNode).to(.1,{angle:5}).to(.1,{angle:-5}).to(.1,{angle:5}).to(.1,{angle:-5}).to(.3,{position:cc.v3(n.x,n.y,0),scale:.3}).call(function(){t.node.active=!1,t.popData&&t.popData.rewardCallback&&t.popData.rewardCallback(),cc.tween(e).to(.2,{scale:1.2}).to(.2,{scale:1}).start()}).start()},e.prototype.showPop=function(t){this.popData=t,this.cookieRewardLayer.active=!1,1==t.popType&&(this.node.active=!0,this.maskNode.active=!0,this.cookieRewardLayer.active=!0,this.cookieRewardLayer.position=cc.v3(0,0,0),this.cookieRewardNode.scale=1,this.cookieTitleSpine.active=!0,this.cookieReceiveBtn.active=!0,this.showCookieRewardPopData(t.rewardData,t.startNode,t.endNode))},e.prototype.showCookieRewardPopData=function(t,e,o){console.log("\u9886\u53d6\u5956\u52b1",JSON.stringify(t));var n=this;n.cookieFlashNode.active=!1,p.default.playAudioMusic("audio/sound/Words1.mp3",!1),n.cookieTitleSpine.getComponent(d.default).play("Award1_Words1",1);var a=l.default.getWorldPosition(e),i=l.default.getNodePosition(this.node,a),r=l.default.getWorldPosition(o),c=l.default.getNodePosition(this.node,r);this.cookieRewardNode.getComponent(s.default).showData(t),this.cookieRewardNode.position=cc.v3(i),this.cookieReceiveBtn.scale=0,this.cookieRewardNode.scale=.5,cc.tween(this.cookieRewardNode).to(.3,{position:cc.v3(i.x+10,i.y-400),scale:.7}).to(.3,{position:cc.v3(i.x-100,i.y-500)}).to(.2,{position:cc.v3(c),scale:1}).call(function(){n.cookieFlashNode.active=!0,cc.tween(n.cookieFlashNode).by(5,{angle:360}).repeatForever().start(),cc.tween(n.cookieReceiveBtn).to(.3,{scale:1}).start(),n.popData&&n.popData.callback?n.popData.callback():cc.game.emit(u.EMITKEY.HIDEMASKLAYER)}).start()},i([m(cc.Node)],e.prototype,"maskNode",void 0),i([m(cc.Node)],e.prototype,"cookieRewardLayer",void 0),i([m(cc.Node)],e.prototype,"cookieTitleSpine",void 0),i([m(cc.Node)],e.prototype,"cookieRewardNode",void 0),i([m(cc.Node)],e.prototype,"cookieFlashNode",void 0),i([m(cc.Node)],e.prototype,"cookieImageNode",void 0),i([m(cc.Node)],e.prototype,"cookieNumNode",void 0),i([m(cc.Node)],e.prototype,"cookieReceiveBtn",void 0),i([m(cc.Node)],e.prototype,"cookiePropEndNode",void 0),i([m(cc.Label)],e.prototype,"receiveLabel",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../../pre/main/cookieRewardNode":"cookieRewardNode","../../script/common/CcJsFunc":"CcJsFunc","../../script/common/enumConfig":"enumConfig","../../script/common/native/audio":"audio","../../script/common/spine":"spine"}],"snake-ctrl-point":[function(t,e,o){"use strict";cc._RF.push(e,"97d1cS+taxBnYxM87Oc/vw1","snake-ctrl-point");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator.ccclass,c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.size=20,e.isDragging=!1,e.sprite=null,e.onEditStart=null,e.onEditEnd=null,e}return a(e,t),e.prototype.onLoad=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.onTouchStart,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.onTouchMove,this),this.node.on(cc.Node.EventType.TOUCH_END,this.onTouchEnd,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.onTouchEnd,this),this.node.addComponent(cc.BlockInputEvents)},e.prototype.start=function(){this.idle()},e.prototype.setEditCallback=function(t,e){this.onEditStart=t,this.onEditEnd=e},e.prototype.onTouchStart=function(){this.selected(),this.isDragging=!0,this.onEditStart&&this.onEditStart()},e.prototype.onTouchMove=function(t){if(0!=this.isDragging){var e=t.getDelta(),o=e.x,n=e.y;this.node.setPosition(this.node.position.x+o,this.node.position.y+n)}},e.prototype.onTouchEnd=function(){this.idle(),this.isDragging=!1,this.onEditEnd&&this.onEditEnd()},e.prototype.idle=function(){this.node.stopAllActions(),cc.tween(this.node).to(.1,{scale:1,opacity:255}).to(.5,{scale:1.01,opacity:200},{easing:cc.easing.backInOut}).union().repeatForever().start()},e.prototype.selected=function(){this.node.stopAllActions(),cc.tween(this.node).to(.1,{scale:1,opacity:255}).to(.5,{scale:1.4,opacity:100},{easing:cc.easing.backInOut}).union().repeatForever().start()},e.prototype.getSpriteFrameByColor=function(t){for(var e=new Uint8Array(16),o=0;o<2;o++)for(var n=0;n<2;n++)e[8*o+4*n]=t.r,e[8*o+4*n+1]=t.g,e[8*o+4*n+2]=t.b,e[8*o+4*n+3]=t.a;var a=new cc.Texture2D;return a.initWithData(e,cc.Texture2D.PixelFormat.RGBA8888,2,2),new cc.SpriteFrame(a)},i([r],e)}(cc.Component);o.default=c,cc._RF.pop()},{}],"snake-sprite-assembler":[function(t,e,o){"use strict";cc._RF.push(e,"f7fady81S5KDZYrZVIIiQPn","snake-sprite-assembler");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(o,"__esModule",{value:!0}),o.SplineSpriteAssembler=void 0;for(var i=t("../bezier/curve-sample"),r=cc.Vec3,c=t("../bezier/export-helper"),s=cc.Mat4,l=[],u=0;u<4;u++)l.push(new r);var p=[];for(u=0;u<4;u++)p.push({u:0,v:1});var d=new r,h=Math.floor(65535/4),f=new Array,m=new Array,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._renderData=null,e.verticesCount=0,e.indicesCount=0,e}return a(e,t),e.prototype.init=function(e){t.prototype.init.call(this,e),this._renderData=new cc.RenderData,this._renderData.init(this),this._renderData.createFlexData(0,4,6,this.getVfmt()),this._updateIndices()},e.prototype._updateIndices=function(){for(var t=this._renderData.iDatas[0],e=0,o=0,n=t.length;eh&&(console.warn("Spline("+t.name+")\u7684\u56db\u8fb9\u5f62\u6570\u91cf("+D+")\u8d85\u8fc7\u4e86\u5141\u8bb8\u7684\u6700\u5927\u503c("+h+"), \u81ea\u52a8\u622a\u65ad, Spline \u66f2\u7ebf\u4f1a\u663e\u793a\u4e0d\u5b8c\u6574"),f.length=h),this.verticesCount=4*D,this.indicesCount=6*D;var A=t.node.width,T=t.node.getWorldMatrix(new s),O=.5*A,I=this._renderData._flexBuffer;I.reserve(this.verticesCount,this.indicesCount)&&this._updateIndices(),I.used(this.verticesCount,this.indicesCount);var E=this._renderData.vDatas[0],L=this._renderData.uintVDatas[0],M=0,B=null===(e=t.spriteFrame)||void 0===e?void 0:e.uvSliced,R=m[m.length-1],F=R>n.height?1:n.height/R,j=R*F,x=j-u;x0?c.math.lerp(B[12].v,B[8].v,o/a):B[8].v;if(R=x)return 0==U&&(U=Math.floor((x-a)/g)*g+a),c.math.lerp(B[8].v,B[0].v,(o-U)/(j-U));var i=(o-a)/g%1;return i=e(i),c.math.lerp(B[8].v,B[4].v,i)},Y=function(t){return t<.001?1:t},J=function(t){return t>.9999?0:t},W=0,V=f.length-1;W>2,s=i._vData;n.length+c>s.length?s.set(n.subarray(0,s.length-c),c):s.set(n,c);for(var l=i._iData,u=r.vertexOffset,p=r.indiceOffset,d=0,h=a.length;d=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.spine=null,e._frameEventMap={},e._loop=!1,e._times=1,e._playingName="",e._playingNameQueue=[],e}return a(e,t),e.prototype.onLoad=function(){this.init()},e.prototype.init=function(){this.spine&&(this.spine.setCompleteListener(this.completeFunc.bind(this)),this.spine.setStartListener(this.startFunc.bind(this)),this.spine.setEventListener(this.frameEventFunc.bind(this)))},e.prototype.completeFunc=function(t){if(!this._loop)if(this._playingNameQueue.length>0){if(t.animation.name==this._playingNameQueue[this._playingNameQueue.length-1]){if(this._times--,0==this._times)return void(this._completeCb&&this._completeCb(t.animation.name));this.playQueue(this._playingNameQueue,this._times,this._completeCb)}}else{if(this._times--,0==this._times)return void(this._completeCb&&this._completeCb(t.animation.name));this.play(this._playingName,this._times,this._completeCb)}},e.prototype.startFunc=function(t){this._startCb&&this._startCb(t.animation.name)},e.prototype.frameEventFunc=function(t,e){this._frameEventMap[e.data.name]&&this._frameEventMap[e.data.name](e.data.name)},e.prototype.setCompleteCb=function(t){this._completeCb=t},e.prototype.setStartCb=function(t){this._startCb=t},e.prototype.setFrameEventCb=function(t,e){t?e?this._frameEventMap[t]=e:delete this._frameEventMap[t]:this._frameEventMap={}},e.prototype.setNewSkin=function(t){this.spine.setSkin(t)},e.prototype.play=function(t,e,o){void 0===e&&(e=1),cc.isValid(this)&&cc.isValid(this.node)&&(this.spine.clearTracks(),this.spine.setToSetupPose(),this._playingName=t,this._loop=0==e,this._times=e,this._completeCb=o,this._playingNameQueue.length=0,this.spine.setAnimation(0,this._playingName,this._loop))},e.prototype.playQueue=function(t,e,o){if(void 0===e&&(e=1),cc.isValid(this)&&cc.isValid(this.node)&&0!=t.length)if(this._completeCb=o,this.spine.clearTracks(),this.spine.setToSetupPose(),1==t.length)this.play(t[0],e);else{this._loop=0==e,this._times=e,this._playingNameQueue=t.concat(),this.spine.setAnimation(0,t[0],!1);for(var n=1;n=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0}),o.SplineSprite=o.SplineSpriteVert=void 0;var r=t("../bezier/spline"),c=t("../bezier/spline-node"),s=t("../snake-ctrl-point"),l=t("./snake-sprite-assembler"),u=(cc.Sprite,cc.Node),p=(cc.Node.EventType,cc.assetManager),d=(cc.Color,cc._decorator),h=d.ccclass,f=d.property,m=d.menu;o.SplineSpriteVert=function(t){this.vertices=t};var g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.showDebugInfo=!1,e.editMode=!1,e.mCtrlNodeRoot=null,e.mSplineDirty=!0,e.lockHeadAndTail=!0,e.mSpline=new r.Spline,e.curveSampleList=new Array,e.splineVerticesCache=null,e}return a(e,t),Object.defineProperty(e.prototype,"ShowDebugInfo",{get:function(){return this.showDebugInfo},enumerable:!1,configurable:!0}),e.prototype.setSplineDirty=function(){this.mSplineDirty=!0},e.prototype.onLoad=function(){var e;null===(e=t.prototype.onLoad)||void 0===e||e.call(this),this.initRootCtrlNode(),this.setSplineDirty(),this.mCtrlNodeRoot.active=!1},e.prototype.start=function(){var e;null===(e=t.prototype.start)||void 0===e||e.call(this)},e.prototype.onEnable=function(){t.prototype.onEnable.call(this)},e.prototype.setCtrlPosList=function(t){if(this.spriteFrame){try{this.mCtrlNodeRoot&&this.mCtrlNodeRoot.isValid&&(this.mCtrlNodeRoot.removeAllChildren(),this.mSpline.RemoveAllNode())}catch(i){cc.warn("setCtrlPosList err",i)}try{for(var e=0;e0){var t=this.mCtrlNodeRoot.children[0].children[0];return cc.v2(t.position.normalize())}return cc.v2()},e.prototype.lockHeadAndTailCtrlNode=function(t){this.lockHeadAndTail=t},e.prototype.setEditMode=function(t){if(this.editMode=t,this.mCtrlNodeRoot.active=t,t)for(var e=this.mCtrlNodeRoot.children.length,o=0;o0)for(var e=0;e1)throw new Error("Time must be between 0 and 1. Given time was "+t);return Math.floor(t*(this.curves.length-1))},t.prototype.RefreshCurves=function(){this.curves.length=0;for(var t=0;tthis.Length)throw new Error("Distance must be between 0 and spline length ("+this._length+"). Given distance was "+t);for(var e=0,o=this.curves;ea&&ta))return n.GetSampleAtDistance(t);t-=a}throw new Error("Something went wrong with GetSampleAtDistance.")},t.prototype.AddNode=function(t){if(this.nodes.push(t),1!==this.nodes.length){var e=this.nodes[this.nodes.length-2],o=new a.CubicBezierCurve(e,t);o.Changed.on(this.UpdateAfterCurveChanged),this.curves.push(o)}this.RaiseNodeListChanged(new l(new Array(t))),this.UpdateAfterCurveChanged(),this.updateLoopBinding()},t.prototype.InsertNode=function(t,e){if(0===t)throw new Error("Can't insert a node at index 0.");var o=this.nodes[t];this.nodes.splice(t,0,e),this.curves[t-1].ConnectEnd(e);var n=new a.CubicBezierCurve(e,o);n.Changed.on(this.UpdateAfterCurveChanged),this.curves.splice(t,0,n),this.RaiseNodeListChanged(new c([e],t)),this.UpdateAfterCurveChanged(),this.updateLoopBinding()},t.prototype.RemoveAllNode=function(){for(var t=0;t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../i18n/gd_language"),c=t("../../../i18n/i18n"),s=t("../../common/CcJsFunc"),l=t("../../common/dataTs"),u=t("../../common/native/audio"),p=t("../../common/spine"),d=t("../../manager/GameManager"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.spineBox=null,e.bgCoin=null,e.bgCoinLabel=null,e.bgProp=null,e.bgPropLabel=null,e.reveiceBtn=null,e.reveiceBtnLabel=null,e.spineProgress=null,e.particleNode=null,e.labelNode=null,e.lastLabel=null,e.callback=null,e}return a(e,t),e.prototype.start=function(){s.default.addbtnTouchStartScale(this.reveiceBtn),s.default.addbtnTouchEndScale(this.reveiceBtn,this.reveiceBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.reveiceBtn),this.reveiceBtnLabel.string=c.default.instance.trans(r.GDLanguage.pop_claim)},e.prototype.reveiceBtnFunc=function(){this.node.active=!1,l.default.getSprintRewardData().rewardProgress>=3&&this.callback&&this.callback()},e.prototype.showProgress=function(t){var e=this;this.spineBox.active=!1,this.bgCoin.active=!1,this.bgProp.active=!1,this.reveiceBtn.active=!1,this.node.active=!0,this.maskNode.opacity=0,this.maskNode.active=!0,this.callback=t,e.spineProgress.active=!1,e.particleNode.active=!1,console.log("\u51b2\u523a\u5956\u52b1 = "+JSON.stringify(l.default.getSprintRewardData()));var o=l.default.getSprintRewardData(),n=o.rewardProgress,a=o.winBox,i=o.winNum;if(n<=0&&(n=1),l.default.getSprintRewardData().rewardProgress>=3){var r=l.default.getUserData(),c=a>5?5:a,u=12;c>1&&(u+=11*(c-1)),r.coin+=u;var p=l.default.gameConfigData.baseConfigData.rewardBox[Math.floor(3*Math.random())];if(p&&p.length>=2){console.log(JSON.stringify(p));var d="rewardIcon/"+p[1].propType+".png";s.default.changeSpriteFrame(this.bgProp,d),"prop_remove"==p[1].propType?(r.prop_remove++,r.prop_remove):"prop_cancel"==p[1].propType?(r.prop_cancel++,r.prop_cancel):"prop_random"==p[1].propType&&(r.prop_random++,r.prop_random)}l.default.saveUserData(r),this.bgCoinLabel.string="x"+u}var h=a;i<=3&&(h=0);var f=3*h;n>=3&&a>0&&(f=3*(a-1));var m=this.labelNode.children;for(var g in m)f+=1,m[g].getComponent(cc.Label).string=f+"",g=3&&t.playBoxAnim(),t.spineProgress.getComponent(p.default).play(n,0,function(){})})},e.prototype.getSpineName=function(){var t=l.default.getSprintRewardData(),e=t.winBox,o=t.rewardProgress,n=e<=0?1:e+1;n=n>=5?5:n,o>=3&&n>1&&n<5&&(n-=1);var a="3RichRoad"+n+"_"+(o<=0?1:o>=3?3:o);return 0==o&&(a="3RichRoad0_0"),a},e.prototype.playBoxAnim=function(){d.default.getInstance().sprintMark=!0;var t=this;if(l.default.getSprintRewardData().rewardProgress<3)return this.maskNode.active=!1,void(this.callback&&this.callback());this.maskNode.opacity=220,t.spineBox.active=!0,this.spineBox.getComponent(p.default).setFrameEventCb("Open1",function(){u.default.playAudioMusic("audio/sound/Open1.mp3",!1)}),this.spineBox.getComponent(p.default).setFrameEventCb("Eff_Sheen1",function(){t.bgCoin.active=!0,t.bgProp.active=!0}),this.spineBox.getComponent(p.default).play("Ref1_Open4",1,function(){t.reveiceBtn.active=!0,cc.tween(t.reveiceBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()})},i([m(cc.Node)],e.prototype,"maskNode",void 0),i([m(cc.Node)],e.prototype,"spineBox",void 0),i([m(cc.Node)],e.prototype,"bgCoin",void 0),i([m(cc.Label)],e.prototype,"bgCoinLabel",void 0),i([m(cc.Node)],e.prototype,"bgProp",void 0),i([m(cc.Label)],e.prototype,"bgPropLabel",void 0),i([m(cc.Node)],e.prototype,"reveiceBtn",void 0),i([m(cc.Label)],e.prototype,"reveiceBtnLabel",void 0),i([m(cc.Node)],e.prototype,"spineProgress",void 0),i([m(cc.Node)],e.prototype,"particleNode",void 0),i([m(cc.Node)],e.prototype,"labelNode",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../../i18n/gd_language":"gd_language","../../../i18n/i18n":"i18n","../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/native/audio":"audio","../../common/spine":"spine","../../manager/GameManager":"GameManager"}],sprintRewardPop:[function(t,e,o){"use strict";cc._RF.push(e,"28f4dgUbolNKYJgMwFcV4Es","sprintRewardPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/spine"),d=t("../common/util"),h=t("../manager/GameManager"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.closeBtn=null,e.titleLabel=null,e.spineNode=null,e.timeSpineNode=null,e.descLabel=null,e.playBtn=null,e.timeLabel=null,e.exitBtn=null,e.resetBtn=null,e.mainBtn=null,e.playLabel=null,e.exitLabel=null,e.restartLabel=null,e.mainLabel=null,e.firstLabel=null,e.secondLabel=null,e.threeLabel=null,e.particleNode=null,e.showPopData=null,e.updateTime=0,e}return a(e,t),e.prototype.update=function(t){this.updateTime+=t,this.updateTime>=1&&(this.updateTime-=1,this.updateTimeNum())},e.prototype.updateTimeNum=function(){var t=l.default.updateSprintRewardTime();if(0==t)console.log("\u5df2\u6ee1"),this.timeLabel.string="End";else{var e=d.default.formatTime(t);e[0]>0?this.timeLabel.string=e[0]+"d"+e[1]+"h":e[1]>0?this.timeLabel.string=e[1]+"h"+e[2]+"m":e[2]>0?this.timeLabel.string=e[2]+"m"+e[3]+"s":e[3]>0&&(this.timeLabel.string=e[2]+"m"+e[3]+"s")}},e.prototype.start=function(){s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),s.default.addbtnTouchStartScale(this.playBtn),s.default.addbtnTouchEndScale(this.playBtn,this.playBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.playBtn),s.default.addbtnTouchStartScale(this.exitBtn),s.default.addbtnTouchEndScale(this.exitBtn,this.exitBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.exitBtn),s.default.addbtnTouchStartScale(this.resetBtn),s.default.addbtnTouchEndScale(this.resetBtn,this.resetBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.resetBtn),s.default.addbtnTouchStartScale(this.mainBtn),s.default.addbtnTouchEndScale(this.mainBtn,this.mainBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.mainBtn),this.updateTimeNum(),this.setupFonts()},e.prototype.setupFonts=function(){this.playLabel.string=c.default.instance.trans(r.GDLanguage.daily_start),this.restartLabel.string=c.default.instance.trans(r.GDLanguage.pop_restart),this.exitLabel.string=c.default.instance.trans(r.GDLanguage.pop_quit),this.mainLabel.string=c.default.instance.trans(r.GDLanguage.main_screen)},e.prototype.resetBtnFunc=function(){this.node.active=!1,this.exitBtnFunc()},e.prototype.mainBtnFunc=function(){this.exitBtnFunc()},e.prototype.exitBtnFunc=function(){this.node.active=!1,cc.game.emit("blowupHeartAnim",1)},e.prototype.closeBtnFunc=function(){this.node.active=!1,cc.game.emit("blowupHeartAnim",0)},e.prototype.playBtnFunc=function(){console.log("\u53bb\u73a9\u6e38\u620f"),this.node.active=!1},e.prototype.showPop=function(t){var e=this;this.node.active=!0,this.firstLabel.node.scale=1,this.secondLabel.node.scale=1,this.showPopData=t,this.playBtn.active=!1,this.mainBtn.active=!1,this.exitBtn.active=!1,this.resetBtn.active=!1;var o=this.node.getChildByName("mask");o.opacity=0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.titleLabel.string=c.default.instance.trans(r.GDLanguage.level_1,l.default.getUserData().playLevelId),this.timeSpineNode.getComponent(p.default).play("5Clock1",0);var n=l.default.getSprintRewardData();console.log("\u51b2\u523a\u5956\u52b1 = "+JSON.stringify(n));var a=n.winBox,i=n.rewardProgress,s=3*a;i>=3&&a>0?(s=3*(a-1),this.firstLabel.string=s+2+"",this.secondLabel.string=s+3+"",this.threeLabel.string=s+4+""):(this.firstLabel.string=s+1+"",this.secondLabel.string=s+2+"",this.threeLabel.string=s+3+""),this.firstLabel.node.active=!0,this.secondLabel.node.active=!0,this.threeLabel.node.active=!0,1==i||(2==i?e.firstLabel.node.active=!1:3==i&&(e.firstLabel.node.active=!1));var d={spineName:"2RichRoad0_0",standBy:!0};d=i<=0?this.getSpineNameWithStaydBy(!0):this.getSpineNameWithStaydBy(!h.default.getInstance().sprintMark);var f=c.default.instance.trans(r.GDLanguage.streak_award);0==this.showPopData.popType?(this.popNode.height=600,this.playBtn.active=!0,o.opacity=178):1==this.showPopData.popType?(this.popNode.height=600,this.exitBtn.active=!0,d=this.getSpineNameWithStaydBy(!0),f=c.default.instance.trans(r.GDLanguage.streak_lose)):2==this.showPopData.popType&&(this.popNode.height=700,this.resetBtn.active=!0,this.mainBtn.active=!0,d=this.getSpineNameWithStaydBy(!0),f=c.default.instance.trans(r.GDLanguage.streak_lose)),this.descLabel.string=f,this.spineNode.getComponent(p.default).setFrameEventCb("NoShow1",function(t){console.log("NoShow1 = "+t),e.updateProgressLabel(i)}),this.spineNode.getComponent(p.default).setFrameEventCb("Open2",function(t){console.log("Open2 = "+t),e.particleNode.getComponent(cc.ParticleSystem).resetSystem(),e.particleNode.getChildByName("Star0").getComponent(cc.ParticleSystem).resetSystem(),e.particleNode.getChildByName("Star1").getComponent(cc.ParticleSystem).resetSystem()});var m=d.spineName,g=d.standBy;console.log("spineDict",m,g),g?(e.updateProgressLabel(i),this.spineNode.getComponent(p.default).play(m,0,function(){})):this.spineNode.getComponent(p.default).play(m,1,function(){m+="_1",console.log("\u5f85\u673a "+m),e.spineNode.getComponent(p.default).play(m,0,function(){})}),h.default.getInstance().sprintMark=!1,0==this.showPopData.popType&&cc.game.emit(u.EMITKEY.MAINUPDATEUI)},e.prototype.updateProgressLabel=function(t){1==t?this.firstLabel.node.active=!1:2==t?this.secondLabel.node.active=!1:3==t&&(this.secondLabel.node.active=!1)},e.prototype.getSpineNameWithStaydBy=function(t){var e=l.default.getSprintRewardData(),o=e.winBox,n=e.rewardProgress,a=o<=0?1:o+1;a=a>=5?5:a,n>=3&&a>1&&a<=5&&(a-=1);var i=n<=0?1:n>=3?3:n,r="2RichRoad"+a+"_"+(t?i+"_1":i);return 0==n&&(r="2RichRoad0_0"),{spineName:r,standBy:t}},i([g(cc.Node)],e.prototype,"popNode",void 0),i([g(cc.Node)],e.prototype,"closeBtn",void 0),i([g(cc.Label)],e.prototype,"titleLabel",void 0),i([g(cc.Node)],e.prototype,"spineNode",void 0),i([g(cc.Node)],e.prototype,"timeSpineNode",void 0),i([g(cc.Label)],e.prototype,"descLabel",void 0),i([g(cc.Node)],e.prototype,"playBtn",void 0),i([g(cc.Label)],e.prototype,"timeLabel",void 0),i([g(cc.Node)],e.prototype,"exitBtn",void 0),i([g(cc.Node)],e.prototype,"resetBtn",void 0),i([g(cc.Node)],e.prototype,"mainBtn",void 0),i([g(cc.Label)],e.prototype,"playLabel",void 0),i([g(cc.Label)],e.prototype,"exitLabel",void 0),i([g(cc.Label)],e.prototype,"restartLabel",void 0),i([g(cc.Label)],e.prototype,"mainLabel",void 0),i([g(cc.Label)],e.prototype,"firstLabel",void 0),i([g(cc.Label)],e.prototype,"secondLabel",void 0),i([g(cc.Label)],e.prototype,"threeLabel",void 0),i([g(cc.Node)],e.prototype,"particleNode",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/spine":"spine","../common/util":"util","../manager/GameManager":"GameManager"}],stagePop:[function(t,e,o){"use strict";cc._RF.push(e,"7537cBSDCRLP5ZtoGd5R7fy","stagePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/spine"),s=t("../common/util"),l=t("../manager/DateManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.closeBtn=null,e.titleLabel=null,e.spNode=null,e.headerNode=null,e.manNode=null,e.womanNode=null,e.userName=null,e.userAddress=null,e.topTimeLabel=null,e.lTimeLabel=null,e.timeLabel=null,e.rTimeLabel=null,e.noKingNode=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.mask,this.closeBtnFunc.bind(this)),r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn)},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){var e=this;this.node.active=!0,this.showPopData=t;var o=t.idx;cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var n="",a="",i="",r="",s="",u="",p="default";1==o?(n="\u5168\u56fd\u9886\u5934\u7f8a",i="\u4e8e\u6628\u65e5",r="\u9996\u4e2a\u901a\u5173",s="sheep/Alpaca01",u="animation"):2==o?(n="\u673a\u667a\u7267\u7f8a\u72ac",a="\u4e8e\u6628\u65e5\u5728\u4e0d\u4f7f\u7528\u9053\u5177\u548c\u590d\u6d3b\u7684\u60c5",i="\u51b5\u4e0b\u4ec5\u7528",r="\u901a\u5173",s="sheep/DJ1",u="Jump2",p="00"):3==o&&(n="\u79cb\u540d\u5c71\u7f8a\u795e",i="\u4e8e\u6628\u65e5\u4ec5\u7528",r="\u901a\u5173",s="sheep/Alpaca02",u="animation"),this.spNode.getComponent(c.default).loadSpine(s,function(){e.spNode.getComponent(c.default).setNewSkin(p),e.spNode.getComponent(c.default).play(u,0)}),this.titleLabel.string=n,this.topTimeLabel.string=a,this.lTimeLabel.string=i,this.rTimeLabel.string=r;var d=this.showPopData.stageInfo;if(1==o&&d.firstWin&&d.firstWin.nick_name&&d.firstWin.nick_name.length){console.log(JSON.stringify(d.firstWin));var h=this.getTimeDate(d.firstWin.ts),f=l.default.getInstance().formatTs(d.firstWin.ts);this.timeLabel.string=f[3]+":"+f[4]+":"+f[5],this.updateInfo(d.firstWin)}this.noKingNode.active=!1,2==o&&d.iqWin&&d.iqWin.nick_name&&d.iqWin.nick_name.length?(console.log(JSON.stringify(d.iqWin)),h=this.getTimeDate(d.iqWin.time),this.timeLabel.string=h[1]+"\u5206"+h[2]+"\u79d2",this.updateInfo(d.iqWin)):2==o&&(this.noKingNode.active=!0,this.titleLabel.string="\u6700\u5f3a\u738b\u8005",console.log("\u6700\u5f3a\u738b\u8005")),3==o&&d.timeWin&&d.timeWin.nick_name&&d.timeWin.nick_name.length&&(console.log(JSON.stringify(d.timeWin)),h=this.getTimeDate(d.timeWin.time),this.timeLabel.string=h[1]+"\u5206"+h[2]+"\u79d2",this.updateInfo(d.timeWin))},e.prototype.updateInfo=function(t){r.default.setAvatar(this.headerNode,t.avatar),this.userName.getComponent(cc.Label).string=t.nick_name,this.userAddress.getComponent(cc.Label).string=t.city,0==t.gender?this.manNode.active=!0:this.manNode.active=!1},e.prototype.getTimeDate=function(t){var e=s.default.countdownTime(t);return[e[0]<10?"0"+e[0]:e[0]+"",e[1]<10?"0"+e[1]:e[1]+"",e[2]<10?"0"+e[2]:e[2]+""]},i([d(cc.Node)],e.prototype,"mask",void 0),i([d(cc.Node)],e.prototype,"popNode",void 0),i([d(cc.Node)],e.prototype,"closeBtn",void 0),i([d(cc.Label)],e.prototype,"titleLabel",void 0),i([d(cc.Node)],e.prototype,"spNode",void 0),i([d(cc.Node)],e.prototype,"headerNode",void 0),i([d(cc.Node)],e.prototype,"manNode",void 0),i([d(cc.Node)],e.prototype,"womanNode",void 0),i([d(cc.Label)],e.prototype,"userName",void 0),i([d(cc.Label)],e.prototype,"userAddress",void 0),i([d(cc.Label)],e.prototype,"topTimeLabel",void 0),i([d(cc.Label)],e.prototype,"lTimeLabel",void 0),i([d(cc.Label)],e.prototype,"timeLabel",void 0),i([d(cc.Label)],e.prototype,"rTimeLabel",void 0),i([d({type:cc.Node,tooltip:"\u6700\u5f3a\u738b\u8005"})],e.prototype,"noKingNode",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/spine":"spine","../common/util":"util","../manager/DateManager":"DateManager"}],"str-utils":[function(t,e,o){"use strict";cc._RF.push(e,"622d8ysQvVFXaRZmKMfNXEC","str-utils"),Object.defineProperty(o,"__esModule",{value:!0});var n=function(){function t(){}return t.formatStr=function(t){for(var e=[],o=1;o0)for(var n=0;n>6|192,63&r|128):String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128),null!==c&&(n>18&63,o=a>>12&63,n=a>>6&63,a&=63,u[s++]=i.charAt(e)+i.charAt(o)+i.charAt(n)+i.charAt(a),c=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/main/flying-item-pop-coin"),c=t("../activity/main/main-cookie-reward"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../manager/GameManager"),p=cc._decorator,d=p.ccclass,h=p.property,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.coinNumLabel=null,e.flyCoinNode=null,e.topCoinNode=null,e.cookieReward=null,e.moneyData=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(l.EMITKEY.MAINUPDATEUI,this.setMainLayerData,this),this.setMainLayerData()},e.prototype.setMainLayerData=function(){console.log("topUiLayer MAINUPDATEUI");var t=s.default.getUserData();u.default.getInstance().moneyDict,u.default.getInstance().cookieDict,this.coinNumLabel.string=t.coin+"",this.checkCoinOrFish()},e.prototype.getFlyTime=function(t,e,o){var n=o;return Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y))/t},e.prototype.updatenNumberAnim=function(t,e,o){var n={num:e},a=t.getComponent(cc.Label);a.string=n.num+"",console.log((o-e)/10);var i=o-e<10?.3:(o-e)/10*.3;i>1&&(i=1),cc.tween(n).to(i,{num:o},{progress:function(t,e,o,n){return a.string=Math.ceil(t+(e-t)*n)+"",t+(e-t)*n}}).start()},e.prototype.checkCoinOrFish=function(){console.log("checkCoinOrFish moneyDict",u.default.getInstance().moneyDict),console.log("checkCoinOrFish cookieDict",u.default.getInstance().cookieDict),this.moneyData=u.default.getInstance().moneyDict;var t=this.moneyData.coin,e=(this.moneyData.fish,u.default.getInstance().cookieDict.cookie),o=s.default.getUserData();this.coinNumLabel.string=o.coin-t+"",t>0?this.flyCoinFunc():e>0&&this.flyCookieFunc()},e.prototype.flyCoinFunc=function(){console.log("flyCoinFunc"),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,7);var t=this,e={firstCallBack:function(){console.log("\u91d1\u5e01\u5f00\u59cb\u98de\u884c");var e=u.default.getInstance().moneyDict.coin,o=s.default.getUserData();t.updatenNumberAnim(t.coinNumLabel.node,o.coin-e,o.coin)},callBack:function(){console.log("\u91d1\u5e01\u98de\u884c\u7ed3\u675f"),u.default.getInstance().moneyDict.coin=0,t.flyCoinNode.active=!1,cc.game.emit(l.EMITKEY.HIDEMASKLAYER,12),u.default.getInstance().cookieDict.cookie>0&&t.flyCookieFunc()}};this.flyCoinNode.active=!0,this.flyCoinNode.getComponent(r.default).flyTo(this.topCoinNode,e)},e.prototype.flyCookieFunc=function(){s.default.getUserData().playLevelId<17||(console.log("flyCookieFunc"),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,7),this.cookieReward.getComponent(c.default).checkCookie(function(){cc.game.emit(l.EMITKEY.HIDEMASKLAYER,12),console.log("\u83b7\u53d6\u997c\u5e72\u52a8\u753b\u5b8c\u6bd5 ###")}))},e.prototype.getWorldPosition=function(t){return t.convertToWorldSpaceAR(cc.v2(0,0))},e.prototype.getNodePosition=function(t,e){return t.convertToNodeSpaceAR(e)},i([h(cc.Label)],e.prototype,"coinNumLabel",void 0),i([h(cc.Node)],e.prototype,"flyCoinNode",void 0),i([h(cc.Node)],e.prototype,"topCoinNode",void 0),i([h(cc.Node)],e.prototype,"cookieReward",void 0),i([d],e)}(cc.Component);o.default=f,cc._RF.pop()},{"../../pre/main/flying-item-pop-coin":"flying-item-pop-coin","../activity/main/main-cookie-reward":"main-cookie-reward","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../manager/GameManager":"GameManager"}],"topic-card-node":[function(t,e,o){"use strict";cc._RF.push(e,"1be56R1zVlJqa9MONuCRdDg","topic-card-node");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.iconHeader=null,e.purpleNode=null,e.blueNode=null,e.nickNameNode=null,e.cityNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t){var e=this;t?(this.node.stopAllActions(),this.node.active=!0,cc.tween(this.node).delay(3).call(function(){e.node.active=!1},this).start(),t.gender?1==t.gender?(this.purpleNode.active=!1,this.blueNode.active=!0):2==t.gender?(this.purpleNode.active=!0,this.blueNode.active=!1):(this.purpleNode.active=!1,this.blueNode.active=!0):(this.purpleNode.active=!1,this.blueNode.active=!0),t.nick_name?this.nickNameNode.getComponent(cc.Label).string=t.nick_name:this.nickNameNode.getComponent(cc.Label).string="",t.city?this.cityNode.getComponent(cc.Label).string=t.city:this.cityNode.getComponent(cc.Label).string="",r.default.setAvatar(this.iconHeader,t.avatar)):this.node.active=!1},i([l(cc.Node)],e.prototype,"iconHeader",void 0),i([l(cc.Node)],e.prototype,"purpleNode",void 0),i([l(cc.Node)],e.prototype,"blueNode",void 0),i([l(cc.Node)],e.prototype,"nickNameNode",void 0),i([l(cc.Node)],e.prototype,"cityNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../../script/common/CcJsFunc":"CcJsFunc"}],"topic-header-node":[function(t,e,o){"use strict";cc._RF.push(e,"bf959UaKZ5L25ZRO1LSyISJ","topic-header-node");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../script/api/api-sheep"),c=t("../../../script/common/CcJsFunc"),s=t("../../../script/common/dataTs"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.manHeader=null,e.womanHeader=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t){var e=this;if(this.womanHeader.opacity=0,this.manHeader.opacity=255,t==s.default.getUserData().userID)r.default.getTopicUserInfo(t,function(t){0==t.err_code&&t.data&&t.data.user&&c.default.setAvatar(e.manHeader,t.data.user.avatar)});else{var o="localHeader/header_"+c.default.randomNum(1,200);c.default.changeSpriteFrame(this.manHeader,o)}},i([p(cc.Node)],e.prototype,"manHeader",void 0),i([p(cc.Node)],e.prototype,"womanHeader",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../../../script/api/api-sheep":"api-sheep","../../../script/common/CcJsFunc":"CcJsFunc","../../../script/common/dataTs":"dataTs"}],"topic-rank":[function(t,e,o){"use strict";cc._RF.push(e,"e59f1N9al1CCKpf6SOs72TQ","topic-rank");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=2&&(e=2);var o=this.userIdx>4?100*(this.userIdx-5):0;cc.tween(this.node).to(e,{y:this.contentY-o},{easing:cc.easing.cubicOut}).call(function(){if(t.scrollToPosition=!1,t.curSheepNode)if(1==h.default.getInstance().game_over)h.default.getInstance().game_over=0,t.curSheepNode.getComponent(m.default).playFlashAnimation();else{var e=t.curSheepNode.getComponent(m.default).getUserID();s.default.getTopicUserInfo(e,function(e){0==e.err_code&&e.data&&e.data.user&&t.showCardNode(t.curSheepNode.x,t.curSheepNode.y+150,e.data.user)})}},this).start()},e.prototype.onEnable=function(){this.requestData()},e.prototype.onDisable=function(){if(this.topicRankModel){var t={a_team_win:this.topicRankModel.tomb.length,b_team_win:this.topicRankModel.taoist.length,a_team_fail:this.topicRankModel.tomb_fail_member,b_team_fail:this.topicRankModel.taoist_fail_member};b.default.reportTACommon("topic_team",t)}},e.prototype.requestData=function(){return r(this,void 0,void 0,function(){var t;return c(this,function(e){switch(e.label){case 0:return t=this,h.default.getInstance().game_over>0?[4,s.default.getTopicData(function(){})]:[3,2];case 1:e.sent(),e.label=2;case 2:return[4,s.default.topicRankInfo(function(e){t.topicRankModel=e.data})];case 3:return e.sent(),d.default.topicModel&&d.default.topicModel.info&&0!=d.default.topicModel.info.type||s.default.getTopicData(function(){}),this.setupSubviews(),[2]}})})},e.prototype.setupSubviews=function(){var t=this,e=this;if(this.topicRankModel){var o=this.topicRankModel.tomb,n=this.topicRankModel.taoist;o||(o=[]),n||(n=[]);var a;a=o.length>=n.length?o.length:n.length;var i=(cc.winSize.height-cc.winSize.width)/2;if(this.node.height=cc.winSize.height+100*Math.floor(a/3),this.node.height<1.5*cc.winSize.height&&(this.node.height=1.5*cc.winSize.height),this.marginH=(this.node.height-cc.winSize.height)/2,this.node.y=this.marginH,this.contentY=this.node.y,console.log("\u6392\u884c\u699c\u9ad8\u5ea6 = ",this.node.height,i,this.marginH),this.setupSheep(o,n),this.tombDeadLabel.string=d.default.topicRankInfo.tomb_fail_member,this.taoistDeadLabel.string=d.default.topicRankInfo.taoist_fail_member,setTimeout(function(){if(t.tombScrollMsg&&t.toaistScrollMsg){var a="\u4eca\u65e5\u6311\u6218 "+(d.default.topicRankInfo.tomb_fail_member+o.length)+" \u7f8a\uff0c\u901a\u5173 "+o.length+" \u7f8a";e.tombScrollMsg.getComponent(f.default).showMsg({msg:a});var i="\u4eca\u65e5\u6311\u6218 "+(d.default.topicRankInfo.taoist_fail_member+n.length)+" \u7f8a\uff0c\u901a\u5173 "+n.length+" \u7f8a";e.toaistScrollMsg.getComponent(f.default).showMsg({msg:i})}},1e3),1==h.default.getInstance().game_over){var r=o.length>=500||n.length>=500?2:1;setTimeout(function(){t.scrollToPosition=!0,t.topicPositionFunc()},1e3*r)}}},e.prototype.setAnimationSub=function(t,e){this.BGSP.getComponent(p.default).play("Stage2",0),this.spotSP.getComponent(p.default).play("0Spotlight",0);var o;o=t.length>=e.length?"sheep/DJ1":"sheep/DJ2",1==d.default.topicModel.id?this.playDJAnimation(o,"The01","Jump2"):2==d.default.topicModel.id?this.playDJAnimation(o,"The02","Jump2"):3==d.default.topicModel.id?this.playDJAnimation(o,"The03","Jump2"):this.playDJAnimation(o,"00","Jump2");var n=d.default.getJudgeAnimation(d.default.topicModel.id,!0,!1);this.playTombAnimation(n.spName,n.anim);var a=d.default.getJudgeAnimation(d.default.topicModel.id,!1,!0);this.playTaoistAnimation(a.spName,a.anim)},e.prototype.playDJAnimation=function(t,e,o){var n=this;this.DJSP.zIndex=10,this.DJSP.getComponent(p.default).loadSpine(t,function(){n.DJSP.getComponent(p.default).setNewSkin(e),n.DJSP.getComponent(p.default).play(o,0)})},e.prototype.playTombAnimation=function(t,e){var o=this;this.tombSP.getComponent(p.default).loadSpine(t,function(){o.tombSP.getComponent(p.default).play(e,0)})},e.prototype.playTaoistAnimation=function(t,e){var o=this;this.toaistSP.getComponent(p.default).loadSpine(t,function(){o.toaistSP.getComponent(p.default).play(e,0)})},e.prototype.setupSheep=function(t,e){var o=this;for(var n in this.sheepArray)this.sheepArray[n].destroy();this.sheepArray=[],this.userID=u.default.getUserData().userID;for(var a=function(n){setTimeout(function(){o.createSheepNode(n,t,e,!0)},1*n)},i=0;i300)){var a=this,i=cc.instantiate(this.sheepNode);i.opacity=0,this.sheepNodeBase.addChild(i),this.sheepArray.push(i);var r=Math.floor(t/3),c=Math.floor(t%3),s=-this.marginH-cc.winSize.height/2+550+90*r,l=0,u=n?1:-1;l=r%2==0?-cc.winSize.width/2+100*c+100:-cc.winSize.width/2+100*c+80,l*=u,i.x=l,i.y=s,i.scaleX=n?1:-1,i.setSiblingIndex(3*r);var p;(p=n?e[t]:o[t])==this.userID&&(this.userIdx=r,this.curSheepNode=i,1==h.default.getInstance().game_over&&this.curSheepNode&&(this.curSheepNode.active=!1),console.log("\u627e\u5230\u4e86\u7528\u6237id ###### taoistData ",p,r)),i.getComponent(m.default).showData(p,n,function(t){a.showCardNode(i.x,i.y+150,t)});var d=cc.instantiate(this.headerNode);d.opacity=0,d.x=l,d.y=s,this.headerNodeBase.addChild(d),this.sheepArray.push(d),d.getComponent(g.default).showData(p)}},e.prototype.showCardNode=function(t,e,o){var n=this;this.cardNode.stopAllActions(),this.cardNode.x=t,this.cardNode.y=e,this.cardNode.getComponent(y.default).showData(o),cc.tween(this.cardNode).to(0,{opacity:255}).delay(2).call(function(){n.cardNode.opacity=0}).start()},e.prototype.moveActionFunc=function(t){this.node.height=this.marginH?this.node.y=this.marginH:this.node.y<=-this.marginH&&(this.node.y=-this.marginH),this.isMoving=!0)},e.prototype.moveActionEndFunc=function(){this.isMoving=!1},e.prototype.update=function(){(this.isMoving||this.scrollToPosition)&&this.showOrHide()},e.prototype.showOrHide=function(){for(var t=0;t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../script/api/api-sheep"),c=t("../../../script/common/CcJsFunc"),s=t("../../../script/common/dataTs"),l=t("../../../script/common/spine"),u=t("../../../script/manager/data-manager"),p=cc._decorator,d=p.ccclass,h=p.property,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.flashNode=null,e.sheepSp=null,e.clickNode=null,e.userID=0,e.clickCallback=null,e.userData=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.clickNode,this.clickNodeFunc.bind(this))},e.prototype.clickNodeFunc=function(){var t=this;this.userData?t.clickCallback&&t.clickCallback(this.userData):r.default.getTopicUserInfo(this.userID,function(e){0==e.err_code&&e.data&&e.data.user&&(t.userData=e.data.user,t.clickCallback&&t.clickCallback(e.data.user))})},e.prototype.getUserID=function(){return this.userID},e.prototype.playFlashAnimation=function(){var t=this;this.node.active=!0,this.sheepSp.getComponent(l.default).play("Drop1",1,function(){t.flashNode.active=!0,t.flashNode.getComponent(l.default).play("3Ray1",1,function(){t.flashNode.active=!1,s.default.isPlatform(s.GDPlatform.tt)&&t.showSharePop()}),t.sheepSp.getComponent(l.default).play("Jump3",0)})},e.prototype.showSharePop=function(){cc.game.emit("showPop",{popName:"shareNodePop",showPopData:{type:1}})},e.prototype.showData=function(t,e,o){if(this.userID=t,this.clickCallback=o,u.default.topicModel)if(e){var n=u.default.getTopicAnimation(u.default.topicModel.id,!0,!1);this.playTomb(n.spName,n.skin,"Jump3")}else n=u.default.getTopicAnimation(u.default.topicModel.id,!1,!0),this.playTaoist(n.spName,n.skin,"Jump3")},e.prototype.playTomb=function(t,e,o){var n=this;this.sheepSp.getComponent(l.default).loadSpine(t,function(){n.sheepSp.getComponent(l.default).setNewSkin(e),n.sheepSp.getComponent(l.default).play(o,0)})},e.prototype.playTaoist=function(t,e,o){var n=this;this.sheepSp.getComponent(l.default).loadSpine(t,function(){n.sheepSp.getComponent(l.default).setNewSkin(e),n.sheepSp.getComponent(l.default).play(o,0)})},i([h(cc.Node)],e.prototype,"flashNode",void 0),i([h(cc.Node)],e.prototype,"sheepSp",void 0),i([h(cc.Node)],e.prototype,"clickNode",void 0),i([d],e)}(cc.Component);o.default=f,cc._RF.pop()},{"../../../script/api/api-sheep":"api-sheep","../../../script/common/CcJsFunc":"CcJsFunc","../../../script/common/dataTs":"dataTs","../../../script/common/spine":"spine","../../../script/manager/data-manager":"data-manager"}],"topic-ui-layer":[function(t,e,o){"use strict";cc._RF.push(e,"41174iuu2NIQJJDkdlO9Oyh","topic-ui-layer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/CcJsFunc"),c=t("../../common/enumConfig"),s=t("../../common/native/audio"),l=t("../../common/util"),u=t("../../manager/data-manager"),p=t("../../manager/DateManager"),d=t("../../manager/GameManager"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pointBtn=null,e.settingBtn=null,e.backBtn=null,e.playBtn=null,e.locationBtn=null,e.timeNode=null,e.timeLabel=null,e.tombLabel=null,e.taoistLabel=null,e.tombNumLabel=null,e.taoistNumLabel=null,e.vsProgress=null,e.beginButtonDuration=0,e.updateTime=0,e}return a(e,t),e.prototype.start=function(){cc.game.on(c.EMITKEY.TOPICACCOUNT,this.topicAccountFunc,this),cc.game.on(c.EMITKEY.TOPICRANKINFO,this.topicRankInfoFunc,this),r.default.addTargetTouchUpInside(this.pointBtn,this.pointBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.settingBtn,this.settingBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.backBtn,this.backBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.playBtn,this.playBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.locationBtn,this.locationBtnFunc.bind(this)),this.updateTimeFunc()},e.prototype.onEnable=function(){this.topicAccountFunc(),this.topicRankInfoFunc()},e.prototype.topicAccountFunc=function(){if(console.log("TOPICACCOUNT \u901a\u77e5 = ",JSON.stringify(u.default.topicModel)),u.default.topicModel){this.timeNode.active=!1;var t=u.default.topicModel.name.split("#");t.length<2||(this.tombLabel.string=t[0],this.taoistLabel.string=t[1])}},e.prototype.topicRankInfoFunc=function(){if(console.log("TOPICRANKINFO \u901a\u77e5 ######"),u.default.topicRankInfo){var t=u.default.topicRankInfo.tomb,e=u.default.topicRankInfo.taoist;if(t||(t=[]),e||(e=[]),console.log("topicRankInfoFunc ",t.length,"---",e.length),this.tombNumLabel.string=t.length+"\u7f8a",this.taoistNumLabel.string=e.length+"\u7f8a",t.length==e.length?(this.tombLabel.fontSize=90,this.taoistLabel.fontSize=90):t.length>e.length?(this.tombLabel.fontSize=90,this.taoistLabel.fontSize=60):(this.tombLabel.fontSize=60,this.taoistLabel.fontSize=90),0==t.length&&0==e.length)this.vsProgress.fillStart=.5;else if(0==t.length)this.vsProgress.fillStart=0;else if(0==e.length)this.vsProgress.fillStart=1;else if(t.length>0&&e.length>0){var o=t.length/(t.length+e.length);this.vsProgress.fillStart=o}this.locationBtn.active=!1;var n=this.playBtn.getChildByName("label").getComponent(cc.Label),a=this.isWin();console.log("winNum ###### = ",a),1==a?(n.string="\u5df2\u52a0\u5165\u7f8a\u7fa4",this.timeNode.active=!0,this.locationBtn.active=!0):n.string=0==a?"\u518d\u6b21\u6311\u6218":"\u52a0\u5165\u7f8a\u7fa4"}},e.prototype.isWin=function(){if(u.default.topicModel&&u.default.topicModel.info){if(1==u.default.topicModel.info.state)return 1;if(2==u.default.topicModel.info.state)return 0}return-1},e.prototype.pointBtnFunc=function(){console.log("\u63d0\u793a"),this.showChoosePop(1)},e.prototype.settingBtnFunc=function(){console.log("\u8bbe\u7f6e"),cc.game.emit("showPop",{popName:"setupPop",showPopData:{}})},e.prototype.backBtnFunc=function(){console.log("\u8fd4\u56de"),cc.game.emit(c.EMITKEY.SHOWTRANSITLAYER,function(){cc.game.emit(c.EMITKEY.SHOWMODULE,c.MODULETYPE.COMMON)})},e.prototype.playBtnFunc=function(){console.log("\u5f00\u59cb\u6e38\u620f"),this.chooseCallbackFunc()},e.prototype.showChoosePop=function(t){var e={popName:"topicChoosePop",showPopData:{type:t,chooseCallback:this.chooseCallbackFunc.bind(this)}};cc.game.emit("showPop",e)},e.prototype.chooseCallbackFunc=function(){if(this.beginButtonDuration>=1){this.beginButtonDuration=0;var t=this.isWin();if(console.log("winNum ###### = ",t),1==t)return void cc.game.emit(c.EMITKEY.SHOWMAINTIPS,"\u6bcf\u65e5\u4e00\u5173\uff0c\u4eca\u5929\u5df2\u6311\u6218\u6210\u529f");d.default.setGameType(c.GAMETYPE.GAMETOPIC),s.default.playBGM(),cc.game.emit(c.EMITKEY.BEGINGAME)}else console.log("\u4e0d\u80fd\u8fde\u7eed\u70b9\u51fb")},e.prototype.locationBtnFunc=function(){console.log("\u5b9a\u4f4d"),cc.game.emit(c.EMITKEY.TOPICPOSITION)},e.prototype.update=function(t){this.beginButtonDuration+=t,this.updateTime+=t,this.updateTime>=1&&(this.updateTime=0,this.updateTimeFunc())},e.prototype.updateTimeFunc=function(){var t=p.default.format(c.CALENDARNAMES[8],new Date).split(" ");if(!(t.length<2)){var e=t[1].split(":");if(!(e.length<3)){var o=3600*(24-Number(e[0])-1)+60*(60-Number(e[1])-1)+(60-Number(e[2]));if(this.timeNode.activeInHierarchy){var n=l.default.formatTime(1e3*o),a=(n[1]<10?"0"+n[1]:n[1])+":"+(n[2]<10?"0"+n[2]:n[2])+":"+(n[3]<10?"0"+n[3]:n[3])+" \u91cd\u7f6e";this.timeLabel.string=a}}}},i([m({type:cc.Node,tooltip:"\u63d0\u793a"})],e.prototype,"pointBtn",void 0),i([m({type:cc.Node,tooltip:"\u8bbe\u7f6e"})],e.prototype,"settingBtn",void 0),i([m({type:cc.Node,tooltip:"\u8fd4\u56de"})],e.prototype,"backBtn",void 0),i([m({type:cc.Node,tooltip:"\u5f00\u59cb\u6e38\u620f"})],e.prototype,"playBtn",void 0),i([m({type:cc.Node,tooltip:"\u5b9a\u4f4d"})],e.prototype,"locationBtn",void 0),i([m({type:cc.Node,tooltip:"\u5012\u8ba1\u65f6"})],e.prototype,"timeNode",void 0),i([m({type:cc.Label,tooltip:"\u5012\u8ba1\u65f6"})],e.prototype,"timeLabel",void 0),i([m({type:cc.Label,tooltip:"\u50f5\u5c38"})],e.prototype,"tombLabel",void 0),i([m({type:cc.Label,tooltip:"\u9053\u58eb"})],e.prototype,"taoistLabel",void 0),i([m({type:cc.Label,tooltip:"\u50f5\u5c38\u6570\u91cf"})],e.prototype,"tombNumLabel",void 0),i([m({type:cc.Label,tooltip:"\u9053\u58eb\u6570\u91cf"})],e.prototype,"taoistNumLabel",void 0),i([m({type:cc.Sprite,tooltip:"vs\u8fdb\u5ea6"})],e.prototype,"vsProgress",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../common/CcJsFunc":"CcJsFunc","../../common/enumConfig":"enumConfig","../../common/native/audio":"audio","../../common/util":"util","../../manager/DateManager":"DateManager","../../manager/GameManager":"GameManager","../../manager/data-manager":"data-manager"}],"topic-ui":[function(t,e,o){"use strict";cc._RF.push(e,"8fa33VO+JBKg6ZJbHIXKnoL","topic-ui");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/dataTs"),c=t("../../common/enumConfig"),s=t("../../common/native/audio"),l=t("../../manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rankNode=null,e.uiLayer=null,e.beginBGM=!1,e}return a(e,t),e.prototype.onEnable=function(){l.default.setGameType(c.GAMETYPE.GAMETOMB),this.playGameBgMusic()},e.prototype.start=function(){},e.prototype.playGameBgMusic=function(){if(r.default.getUserSetupData().musicStatus<0)cc.audioEngine.stopAll();else if(0==this.beginBGM){var t=this;cc.loader.loadRes("audio/music/game_begin.mp3",function(e,o){var n=cc.audioEngine.playMusic(o,!1);cc.audioEngine.getCurrentTime(n),cc.audioEngine.getDuration(n),cc.audioEngine.setFinishCallback(n,function(){t.beginBGM=!0,console.log("\u64ad\u653e\u5b8c\u6210\u8fdb\u573a\u97f3\u4e50 ###### "),t.playBg()})})}else this.playBg()},e.prototype.playBg=function(){s.default.playBGM()},i([d({type:cc.Node,tooltip:"\u6392\u884c\u699c"})],e.prototype,"rankNode",void 0),i([d({type:cc.Node,tooltip:"UI"})],e.prototype,"uiLayer",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/native/audio":"audio","../../manager/GameManager":"GameManager"}],topicChoosePop:[function(t,e,o){"use strict";cc._RF.push(e,"db225EuZZ1H86t8bfP+ErU1","topicChoosePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../common/sdk"),p=t("../common/spine"),d=t("../common/util"),h=t("../manager/data-manager"),f=t("../manager/DateManager"),m=cc._decorator,g=m.ccclass,y=m.property,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.titleNode=null,e.closeBtn=null,e.yellowNode=null,e.redNode=null,e.yellowBtn=null,e.redBtn=null,e.timeNode=null,e.chooseBtn=null,e.chooseVideo=null,e.chooseLabel=null,e.noChooseBtn=null,e.giveupBtn=null,e.tombName=null,e.taoistName=null,e.tombSP=null,e.taoistSP=null,e.timeLabel=null,e.popData=null,e.topicType=0,e.updateTime=0,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.yellowNode,this.yellowNodeFunc.bind(this)),c.default.addTargetTouchUpInside(this.redNode,this.redNodeFunc.bind(this)),c.default.addTargetTouchUpInside(this.chooseBtn,this.chooseBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.giveupBtn,this.giveupBtnFunc.bind(this))},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.yellowNodeFunc=function(){this.topicType=1,console.log("topicType = ",this.topicType),this.popData&&1==this.popData.type||this.exchangeUI(!0)},e.prototype.redNodeFunc=function(){this.topicType=2,console.log("topicType = ",this.topicType),this.popData&&1==this.popData.type||this.exchangeUI(!1)},e.prototype.exchangeUI=function(t,e){if(void 0===e&&(e=!1),this.noChooseBtn.active=!1,h.default.topicModel&&h.default.topicModel.name){var o=h.default.topicModel.name.split("#");if(!(o.length<2))if(this.yellowBtn.active=!0,this.redBtn.active=!0,t){this.chooseLabel.string="\u52a0\u5165"+o[0]+"\u7f8a",this.yellowNode.getChildByName("choose").active=!0,this.redNode.getChildByName("choose").active=!1,this.yellowBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FBE547"),this.redBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FFFFFF"),this.redBtn.getChildByName("name").getComponent(cc.Label).string="\u9009\u62e9",this.redBtn.active=!e;var n=e?"\u5df2\u52a0\u5165":"\u5df2\u9009\u62e9";this.yellowBtn.getChildByName("name").getComponent(cc.Label).string=n}else this.chooseLabel.string="\u52a0\u5165"+o[1]+"\u7f8a",this.yellowNode.getChildByName("choose").active=!1,this.redNode.getChildByName("choose").active=!0,this.yellowBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FFFFFF"),this.redBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FBE547"),this.yellowBtn.getChildByName("name").getComponent(cc.Label).string="\u9009\u62e9",this.yellowBtn.active=!e,n=e?"\u5df2\u52a0\u5165":"\u5df2\u9009\u62e9",this.redBtn.getChildByName("name").getComponent(cc.Label).string=n}},e.prototype.chooseBtnFunc=function(){if(0==this.topicType){if(this.yellowBtn.stopAllActions(),this.redBtn.stopAllActions(),cc.tween(this.yellowBtn).to(.2,{scale:1.5}).to(.2,{scale:1}).start(),cc.tween(this.redBtn).to(.2,{scale:1.5}).to(.2,{scale:1}).start(),!h.default.topicModel)return void cc.game.emit(l.EMITKEY.SHOWMAINTIPS,"\u8bf7\u9009\u62e9\u4f60\u7684\u9635\u8425");h.default.topicModel.tombh.default.topicModel.taoist?this.topicType=2:this.topicType=c.default.randomNum(1,2)}if(1!=h.default.todayIsWin()){var t=this;if(u.default.isPlatform(u.Platform.wx)){var e=s.default.GetVedioID(),o=s.default.getUserData().openid;u.default.share(o,e,function(){t.addTopicMethod()},function(){cc.game.emit(l.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else u.default.watchAdVideo({id:s.default.GetVedioID(),success:function(){console.log("\u89c6\u9891\u64ad\u653e\u6210\u529f ###### "),t.addTopicMethod()},fail:function(){console.log("\u5931\u8d25")},nofit:function(){}})}else this.addTopicMethod()},e.prototype.addTopicMethod=function(){this.requestData(),this.node.active=!1,this.popData&&this.popData.chooseCallback&&this.popData.chooseCallback()},e.prototype.requestData=function(){var t={type:this.topicType};console.log("\u52a0\u5165\u8bdd\u9898\u53c2\u6570 = ",t),r.default.joinTopic(t,function(){console.log("\u52a0\u5165\u8bdd\u9898\u6210\u529f ######")})},e.prototype.giveupBtnFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){this.node.active=!0,this.popData=t,this.topicType=0,this.yellowBtn.active=!0,this.redBtn.active=!0;var e=h.default.todayIsWin();if(this.chooseVideo.active=1!=e,s.default.isPlatform(s.GDPlatform.wx)&&c.default.changeSpriteFrame(this.chooseVideo,"rewardIcon/reward_share_white.png"),h.default.topicModel&&h.default.topicModel.name){var o=h.default.topicModel.name.split("#");o.length>=2&&(this.tombName.string=o[0],this.taoistName.string=o[1]);var n=h.default.getTopicAnimation(h.default.topicModel.id,!0,!1);this.playTomb(n.spName,n.skin,"Jump1");var a=h.default.getTopicAnimation(h.default.topicModel.id,!1,!0);this.playTaoist(a.spName,a.skin,"Jump1")}this.yellowNode.getChildByName("choose").active=!1,this.redNode.getChildByName("choose").active=!1,this.yellowBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FFFFFF"),this.redBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FFFFFF"),this.noChooseBtn.active=!1,this.chooseLabel.string="\u52a0\u5165\u5bf9\u6297",cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),0==t.type?(this.chooseBtn.active=!0,this.giveupBtn.active=!0,this.yellowBtn.getChildByName("name").getComponent(cc.Label).string="\u9009\u62e9",this.redBtn.getChildByName("name").getComponent(cc.Label).string="\u9009\u62e9",this.titleNode.getComponent(cc.Label).string="\u9009\u62e9\u7f8a\u961f"):1==t.type&&(this.chooseBtn.active=!1,this.giveupBtn.active=!1,this.titleNode.getComponent(cc.Label).string="\u4eca\u65e5\u8bdd\u9898",h.default.topicModel&&h.default.topicModel.info&&(1==h.default.topicModel.info.type?this.exchangeUI(!0,!0):this.exchangeUI(!1,!0))),this.updateTimeFunc()},e.prototype.playTomb=function(t,e,o){var n=this;this.tombSP.getComponent(p.default).loadSpine(t,function(){n.tombSP.getComponent(p.default).setNewSkin(e),n.tombSP.getComponent(p.default).play(o,0)})},e.prototype.playTaoist=function(t,e,o){var n=this;this.taoistSP.getComponent(p.default).loadSpine(t,function(){n.taoistSP.getComponent(p.default).setNewSkin(e),n.taoistSP.getComponent(p.default).play(o,0)})},e.prototype.update=function(t){this.updateTime+=t,this.updateTime>=1&&(this.updateTime=0,this.updateTimeFunc())},e.prototype.updateTimeFunc=function(){var t=f.default.format(l.CALENDARNAMES[8],new Date).split(" ");if(!(t.length<2)){var e=t[1].split(":");if(!(e.length<3)){var o=3600*(24-Number(e[0])-1)+60*(60-Number(e[1])-1)+(60-Number(e[2]));if(this.timeNode.activeInHierarchy){var n=d.default.formatTime(1e3*o),a=(n[1]<10?"0"+n[1]:n[1])+" \u5c0f\u65f6 "+(n[2]<10?"0"+n[2]:n[2])+" \u5206 "+(n[3]<10?"0"+n[3]:n[3])+" \u79d2";this.timeLabel.string=a}}}},i([y({type:cc.Node,tooltip:"\u5f39\u6846"})],e.prototype,"popNode",void 0),i([y({type:cc.Node,tooltip:"\u6807\u9898"})],e.prototype,"titleNode",void 0),i([y({type:cc.Node,tooltip:"\u5173\u95ed\u6309\u94ae"})],e.prototype,"closeBtn",void 0),i([y({type:cc.Node,tooltip:"\u7f8abase"})],e.prototype,"yellowNode",void 0),i([y({type:cc.Node,tooltip:"\u7f8abase"})],e.prototype,"redNode",void 0),i([y({type:cc.Node,tooltip:"\u9009\u62e9"})],e.prototype,"yellowBtn",void 0),i([y({type:cc.Node,tooltip:"\u9009\u62e9"})],e.prototype,"redBtn",void 0),i([y({type:cc.Node,tooltip:"\u5269\u4f59\u65f6\u95f4"})],e.prototype,"timeNode",void 0),i([y({type:cc.Node,tooltip:"\u9009\u62e9"})],e.prototype,"chooseBtn",void 0),i([y({type:cc.Node,tooltip:"\u89c6\u9891"})],e.prototype,"chooseVideo",void 0),i([y({type:cc.Label,tooltip:"\u63cf\u8ff0"})],e.prototype,"chooseLabel",void 0),i([y({type:cc.Node,tooltip:"\u672a\u9009\u62e9"})],e.prototype,"noChooseBtn",void 0),i([y({type:cc.Node,tooltip:"\u653e\u5f03"})],e.prototype,"giveupBtn",void 0),i([y({type:cc.Label,tooltip:"\u9635\u8425\u540d\u5b57"})],e.prototype,"tombName",void 0),i([y({type:cc.Label,tooltip:"\u9635\u8425\u540d\u5b57"})],e.prototype,"taoistName",void 0),i([y({type:cc.Node,tooltip:"\u9635\u8425\u52a8\u753b"})],e.prototype,"tombSP",void 0),i([y({type:cc.Node,tooltip:"\u9635\u8425\u52a8\u753b"})],e.prototype,"taoistSP",void 0),i([y({type:cc.Label,tooltip:"\u5012\u8ba1\u65f6"})],e.prototype,"timeLabel",void 0),i([g],e)}(cc.Component);o.default=v,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/sdk":"sdk","../common/spine":"spine","../common/util":"util","../manager/DateManager":"DateManager","../manager/data-manager":"data-manager"}],topicCollectPop:[function(t,e,o){"use strict";cc._RF.push(e,"9626bbOFCpLgLU2U6ganUyA","topicCollectPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__spreadArrays||function(){for(var t=0,e=0,o=arguments.length;e0){for(var e in t)this.clothesId==t[e].clothesId?(t[e].dressing=!0,this.popData&&this.popData.changeClothesCb&&this.popData.changeClothesCb(this.clothesId)):t[e].dressing=!1;s.default.setSheepClothesData(t),this.setupSubViews(this.curIdx)}},e.prototype.subCloseBtnFunc=function(){this.subPop.active=!1},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.previousBtnFunc=function(){this.curIdx--,this.curIdx<1&&(this.curIdx=1),this.setupSubViews(this.curIdx)},e.prototype.sureBtnFunc=function(){this.node.active=!1},e.prototype.nextBtnFunc=function(){this.curIdx++,this.curIdx>this.allIdx&&(this.curIdx=this.allIdx),this.setupSubViews(this.curIdx)},e.prototype.showPop=function(t){this.node.active=!0,this.popData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.sheepCommonNode.active=!1,this.dressingNode.active=!1,this.subPop.active=!1,this.setupSubViews(this.curIdx)},e.prototype.setupSubViews=function(t){for(var e in t<1&&(t=1),this.dataArray)(a=this.dataArray[e]).destroy();for(var e in this.labelArray)(a=this.labelArray[e]).destroy();this.dataArray=[],this.labelArray=[];var o=s.default.getSheepClothesData();o=this.bubbleSort(o),o=this.bubbleIdSort(o),this.allIdx=Math.ceil(o.length/12),this.indexLabel.string=this.curIdx+" / "+this.allIdx;for(var n=0;n=12*(t-1)&&n<12*t){var a,i=o[n];(a=cc.instantiate(this.sheepCommonNode)).active=!0,this.sheepCommonBaseNode.addChild(a),this.dataArray.push(a);var r=cc.instantiate(this.dressingNode);r.active=!0,this.dressingBaseNode.addChild(r),this.labelArray.push(r),c.default.addbtnTouchEndScale(a,this.itemBtnFunc.bind(this,i)),this.updateItem(a,r,i)}},e.prototype.itemBtnFunc=function(t){var e=this;console.log(t),this.clothesId=t.clothesId,this.subPop.active=!0,cc.tween(this.subPop).set({scale:.8,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var o="sheep/"+t.spName;this.subSheep.getComponent(l.default).loadSpine(o,function(){e.subSheep.getComponent(l.default).setNewSkin(t.spSkin),t.unlock?e.subSheep.getComponent(l.default).play("Jump1",0):e.subSheep.getComponent(l.default).play("Unlock1",0)}),t.unlock?(this.luckBtn.active=!1,this.changeBtn.active=!0,this.titleLabel.string=t.name):(this.luckBtn.active=!0,this.changeBtn.active=!1,this.titleLabel.string="???"),this.contentTeam.string=this.getName(t.clothesId),this.contentDesc.string="\u5728\u8bdd\u9898\u6218 \u4e2d\uff0c\u52a0\u5165"+t.name+"\u9635\u8425\u5e76\u83b7\u80dc\u540e\u83b7\u5f97\u3002"},e.prototype.getName=function(t){return this.contentDesc.node.active=!0,this.contentTeam.node.active=!0,this.contentDefault.node.active=!1,8==t||9==t?"\u50f5\u5c38vs\u9053\u58eb":10==t||11==t?"\u72fc\u4ebavs\u5438\u8840\u9b3c":12==t||13==t?"\u9ed1\u7f8avs\u767d\u7f8a":41==t||42==t?"\u4e94\u4ec1vs\u83b2\u84c9":43==t||44==t?"\u5b66\u751fvs\u8001\u5e08":45==t||46==t?"\u5ae6\u5a25vs\u7389\u5154":47==t||48==t?"\u5b66\u7ae5vs\u592b\u5b50":(this.contentDesc.node.active=!1,this.contentTeam.node.active=!1,this.contentDefault.node.active=!0,this.contentDefault.string=1==t?"\u9ed8\u8ba4\u88c5\u626e\u3002\u6211\u53ea\u662f\u4e00\u53ea\u5b64\u72ec\u7684\u7f8e\u7f8a\u7f8a\u3002":"\u5e38\u89c4\u6a21\u5f0f\u901a\u5173\uff0c\u6216\u8bdd\u9898PK\u4e2d\u6240\u9009\u9635\u8425\u83b7\u80dc\u540e\u83b7\u5f97\u3002","")},e.prototype.bubbleSort=function(t){for(var e,o=r(t),n=0,a=o.length;no[i+1].clothesId&&(e=[o[i+1],o[i]],o[i]=e[0],o[i+1]=e[1]);return o},e.prototype.updateItem=function(t,e,o){var n=t.getChildByName("new"),a=t.getChildByName("SP"),i=t.getChildByName("choose");e.opacity=0,this.popData&&this.popData.topicClothesNum==o.clothesId?n.active=!0:n.active=!1;var r="sheep/"+o.spName;a.getComponent(l.default).loadSpine(r,function(){a.getComponent(l.default).setNewSkin(o.spSkin),o.unlock?o.dressing?(i.active=!0,e.opacity=255,a.getComponent(l.default).play("Jump1",0)):i.active=!1:(a.getComponent(l.default).play("Unlock1",0),i.active=!1)})},i([d(cc.Node)],e.prototype,"popNode",void 0),i([d(cc.Node)],e.prototype,"closeBtn",void 0),i([d(cc.Node)],e.prototype,"sheepCommonBaseNode",void 0),i([d(cc.Node)],e.prototype,"sheepCommonNode",void 0),i([d(cc.Node)],e.prototype,"dressingBaseNode",void 0),i([d(cc.Node)],e.prototype,"dressingNode",void 0),i([d(cc.Node)],e.prototype,"previousBtn",void 0),i([d(cc.Node)],e.prototype,"sureBtn",void 0),i([d(cc.Node)],e.prototype,"nextBtn",void 0),i([d(cc.Label)],e.prototype,"indexLabel",void 0),i([d(cc.Node)],e.prototype,"subPop",void 0),i([d(cc.Node)],e.prototype,"subSheep",void 0),i([d(cc.Label)],e.prototype,"titleLabel",void 0),i([d(cc.Label)],e.prototype,"contentDesc",void 0),i([d(cc.Label)],e.prototype,"contentTeam",void 0),i([d(cc.Label)],e.prototype,"contentDefault",void 0),i([d(cc.Node)],e.prototype,"luckBtn",void 0),i([d(cc.Node)],e.prototype,"changeBtn",void 0),i([d(cc.Node)],e.prototype,"subCloseBtn",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/spine":"spine"}],topicJoinedPop:[function(t,e,o){"use strict";cc._RF.push(e,"90ef543uIxHfKnKA811WqDS","topicJoinedPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/spine"),u=t("../manager/data-manager"),p=cc._decorator,d=p.ccclass,h=p.property,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.titleLabel=null,e.tombNode=null,e.taoistNode=null,e.tombLabel=null,e.taoistLabel=null,e.teamLabel=null,e.closeBtn=null,e.sureBtn=null,e.tombSP=null,e.taoistSP=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.sureBtn,this.sureBtnBtn.bind(this))},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.sureBtnBtn=function(){this.node.active=!1},e.prototype.showPop=function(){var t=this;this.node.active=!0,this.tombNode.active=!1,this.taoistNode.active=!1,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.updateUI(0);var e=u.default.getTopicAnimation(u.default.topicModel.id,!0,!1);this.playTomb(e.spName,e.skin,"Jump1");var o=u.default.getTopicAnimation(u.default.topicModel.id,!1,!0);this.playTaoist(o.spName,o.skin,"Jump1"),r.default.getTopicUserInfo(s.default.getUserData().userID,function(e){if(0==e.err_code&&e.data&&e.data.user){var o=e.data.user.type;1==o?t.tombNode.active=!0:2==o&&(t.taoistNode.active=!0),t.updateUI(o)}})},e.prototype.updateUI=function(t){var e=u.default.topicModel.name.split("#");e.length<2||(this.tombLabel.string=e[0]+"\u7f8a",this.taoistLabel.string=e[1]+"\u7f8a",this.teamLabel.string="",1==t?this.teamLabel.string=e[0]+"\u7f8a\u961f":2==t&&(this.teamLabel.string=e[1]+"\u7f8a\u961f"))},e.prototype.playTomb=function(t,e,o){var n=this;this.tombSP.getComponent(l.default).loadSpine(t,function(){n.tombSP.getComponent(l.default).setNewSkin(e),n.tombSP.getComponent(l.default).play(o,0)})},e.prototype.playTaoist=function(t,e,o){var n=this;this.taoistSP.getComponent(l.default).loadSpine(t,function(){n.taoistSP.getComponent(l.default).setNewSkin(e),n.taoistSP.getComponent(l.default).play(o,0)})},i([h(cc.Node)],e.prototype,"popNode",void 0),i([h(cc.Label)],e.prototype,"titleLabel",void 0),i([h(cc.Node)],e.prototype,"tombNode",void 0),i([h(cc.Node)],e.prototype,"taoistNode",void 0),i([h(cc.Label)],e.prototype,"tombLabel",void 0),i([h(cc.Label)],e.prototype,"taoistLabel",void 0),i([h(cc.Label)],e.prototype,"teamLabel",void 0),i([h(cc.Node)],e.prototype,"closeBtn",void 0),i([h(cc.Node)],e.prototype,"sureBtn",void 0),i([h(cc.Node)],e.prototype,"tombSP",void 0),i([h(cc.Node)],e.prototype,"taoistSP",void 0),i([d],e)}(cc.Component);o.default=f,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/spine":"spine","../manager/data-manager":"data-manager"}],topicLastWinPop:[function(t,e,o){"use strict";cc._RF.push(e,"74b18J+qNBMbqeSpfyEZqtg","topicLastWinPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/spine"),s=t("../manager/data-manager"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.closeBtn=null,e.tombSign=null,e.taoistSign=null,e.tombNode=null,e.taoistNode=null,e.nameLabel=null,e.tombLabel=null,e.taoistLabel=null,e.tombNumLabel=null,e.taoistNumLabel=null,e.bottomNumLabel=null,e.tombProgress=null,e.taoistProgress=null,e.tombSP=null,e.taoistSP=null,e.popData=null,e.teamIsWIn=!1,e}return a(e,t),e.prototype.start=function(){r.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this))},e.prototype.closeBtnFunc=function(){if(this.node.active=!1,this.teamIsWIn){var t={popName:"topicNewPop",showPopData:{type:1,data:this.popData}};cc.game.emit("showPop",t)}},e.prototype.showPop=function(t){this.node.active=!0,this.popData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),t&&this.setupData(t)},e.prototype.setupData=function(t){var e=t.tomb,o=t.taoist,n=t.tomb_fail_member,a=t.taoist_fail_member,i=e.length,r=o.length,c=t.topic.name.split("#"),l=i+r+n+a,u=i+r,p=0,d=0;i==r?this.nameLabel.string="\u8d5b\u51b5":i>r?(1==t.topic.info.type&&(this.teamIsWIn=!0),this.tombSign.active=!0,this.taoistSign.active=!1,this.nameLabel.string=c[0]+"\u7f8a\u961f\u83b7\u80dc\uff01"):(2==t.topic.info.type&&(this.teamIsWIn=!0),this.tombSign.active=!1,this.taoistSign.active=!0,this.nameLabel.string=c[1]+"\u7f8a\u961f\u83b7\u80dc\uff01"),0!=u&&(p=i/u*300,d=r/u*300),p<50&&(p=50),d<50&&(d=50),cc.tween(this.tombProgress).to(0,{height:50}).to(1.5,{height:p}).start(),cc.tween(this.taoistProgress).to(0,{height:50}).to(1.5,{height:d}).start(),this.tombNumLabel.string=i+"\u7f8a",this.taoistNumLabel.string=r+"\u7f8a",this.tombLabel.string=c[0]+"\u7f8a\u961f",this.taoistLabel.string=c[1]+"\u7f8a\u961f",this.bottomNumLabel.string=l+"",1==t.topic.info.type?(this.tombNode.active=!0,this.taoistNode.active=!1):(this.tombNode.active=!1,this.taoistNode.active=!0);var h=s.default.getTopicAnimation(t.topic.id,!0,!1);this.playTomb(h.spName,h.skin,"Jump3");var f=s.default.getTopicAnimation(t.topic.id,!1,!0);this.playTaoist(f.spName,f.skin,"Jump3")},e.prototype.playTomb=function(t,e,o){var n=this;this.tombSP.getComponent(c.default).loadSpine(t,function(){n.tombSP.getComponent(c.default).setNewSkin(e),n.tombSP.getComponent(c.default).play(o,0)})},e.prototype.playTaoist=function(t,e,o){var n=this;this.taoistSP.getComponent(c.default).loadSpine(t,function(){n.taoistSP.getComponent(c.default).setNewSkin(e),n.taoistSP.getComponent(c.default).play(o,0)})},i([p({type:cc.Node,tooltip:"\u5f39\u6846"})],e.prototype,"popNode",void 0),i([p({type:cc.Node,tooltip:"\u5173\u95ed\u6309\u94ae"})],e.prototype,"closeBtn",void 0),i([p(cc.Node)],e.prototype,"tombSign",void 0),i([p(cc.Node)],e.prototype,"taoistSign",void 0),i([p(cc.Node)],e.prototype,"tombNode",void 0),i([p(cc.Node)],e.prototype,"taoistNode",void 0),i([p({type:cc.Label,tooltip:"\u7f8a\u961f"})],e.prototype,"nameLabel",void 0),i([p({type:cc.Label,tooltip:"\u50f5\u5c38"})],e.prototype,"tombLabel",void 0),i([p({type:cc.Label,tooltip:"\u9053\u58eb"})],e.prototype,"taoistLabel",void 0),i([p({type:cc.Label,tooltip:"\u50f5\u5c38\u6570\u91cf"})],e.prototype,"tombNumLabel",void 0),i([p({type:cc.Label,tooltip:"\u9053\u58eb\u6570\u91cf"})],e.prototype,"taoistNumLabel",void 0),i([p({type:cc.Label,tooltip:"\u603b\u4eba\u6570"})],e.prototype,"bottomNumLabel",void 0),i([p(cc.Node)],e.prototype,"tombProgress",void 0),i([p(cc.Node)],e.prototype,"taoistProgress",void 0),i([p(cc.Node)],e.prototype,"tombSP",void 0),i([p(cc.Node)],e.prototype,"taoistSP",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/spine":"spine","../manager/data-manager":"data-manager"}],topicNewPop:[function(t,e,o){"use strict";cc._RF.push(e,"9383fTm8p9NuLEys6rFPQBI","topicNewPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/spine"),l=t("../manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.popNode=null,e.nameLabel=null,e.bgFlashSP=null,e.sheepSP=null,e.winLabel=null,e.descLabel=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.maskNode,this.maskNodeFunc.bind(this))},e.prototype.maskNodeFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){var e=this;this.node.active=!0,cc.tween(this.bgFlashSP).to(0,{scale:0}).to(.1,{scale:1}).call(function(){e.bgFlashSP.getComponent(s.default).loadSpine("sheep/UI",function(){e.bgFlashSP.getComponent(s.default).play("4Ray2",0)})}).start(),1==t.type?this.receiveSheepClothes():2==t.type&&this.showSheep(t.data)},e.prototype.showSheep=function(t){var e=this;cc.tween(this.sheepSP).to(0,{scale:0}).to(.2,{scale:1}).call(function(){e.sheepSP.getComponent(s.default).loadSpine("sheep/"+t.spName,function(){e.sheepSP.getComponent(s.default).setNewSkin(t.spSkin),e.sheepSP.getComponent(s.default).play("Jump1",0)})}).start(),this.nameLabel.string=t.name,this.winLabel.string="",this.descLabel.string=""},e.prototype.receiveSheepClothes=function(){var t=this,e=c.default.getSheepClothesData(),o=!1,n="skin_00",a="\u7f8a";e=r.default.shuffle(e);for(var i=0;i=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=t("../common/native/audio"),s=t("../common/spine"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sheepSp=null,e.playing=!1,e.animCallBack=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(r.EMITKEY.SHOWTRANSITLAYER,this.playTransitionLayerAnim,this)},e.prototype.playTransitionLayerAnim=function(t){if(!this.playing){var e=this;this.playing=!0,this.animCallBack=t,this.sheepSp.active=!0,c.default.playAudioMusic("audio/sound/transitFont.mp3",!1),this.sheepSp.getComponent(s.default).setFrameEventCb("Turnarounds",function(t){console.log("\u4e13\u573a\u52a8\u753b ### ",t),e.animCallBack(e.playAnimOpen.bind(e))}),this.sheepSp.getComponent(s.default).play("Interlude",1,function(){e.playing=!1,e.sheepSp.active=!1,console.log("\u4e13\u573a\u52a8\u753b end ###")})}},e.prototype.playAnimOpen=function(){console.log("\u8f6c\u573a\u52a8\u753b\u5207\u6362 ### ")},i([p(cc.Node)],e.prototype,"sheepSp",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/spine":"spine"}],"tt-sdk":[function(t,e,o){"use strict";cc._RF.push(e,"0d66ayRO/dGya2ZzHsK5JHr","tt-sdk"),Object.defineProperty(o,"__esModule",{value:!0});var n=function(){function t(){}return t.init=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&tt.showShareMenu({success:function(){console.log("[tt] \u5df2\u6210\u529f\u663e\u793a\u8f6c\u53d1\u6309\u94ae")},fail:function(t){console.log("[tt] showShareMenu \u8c03\u7528\u5931\u8d25",t.errMsg)},complete:function(){console.log("[tt] showShareMenu \u8c03\u7528\u5b8c\u6210")}})},t.vibrateShort=function(){tt.vibrateShort({})},t.vibrateLong=function(){tt.vibrateLong({})},t.login=function(){tt.login({success:function(t){console.log("[tt] \u767b\u5f55\u6210\u529f",t)},fail:function(t){console.log("[tt] \u767b\u5f55\u5931\u8d25",t)}})},t.checkSession=function(){tt.checkSession({success:function(){console.log("[tt] session \u672a\u8fc7\u671f")},fail:function(){console.log("[tt] session \u5df2\u8fc7\u671f\uff0c\u9700\u8981\u91cd\u65b0\u767b\u5f55"),this.login()}})},t.getSetting=function(){tt.checkSession({success:function(t){console.log("[tt] -------------getSetting \u83b7\u53d6\u7528\u6237\u5f53\u524d\u7684\u6388\u6743\u72b6\u6001\u6210\u529f-----------",t),t.errMsg},fail:function(t){console.log("[tt] -------------getSetting \u83b7\u53d6\u7528\u6237\u5f53\u524d\u7684\u6388\u6743\u72b6\u6001\u5931\u8d25-----------",t)}})},t.openSetting=function(){tt.openSetting({success:function(t){console.log("[tt] -------------openSetting success-----------",t)},complete:function(t){console.log("[tt] -------------openSetting complete-----------",t)},fail:function(t){console.log("[tt] -------------openSetting fail-----------",t)}})},t.authorize=function(){tt.authorize({scope:"scope.userInfo",success:function(t){console.log("[tt] authorize success",t)},complete:function(t){console.log("[tt] authorize complete",t)},fail:function(t){console.log("[tt] authorize fail",t)}})},t.recorderStart=function(){if(cc.sys.platform==cc.sys.BYTEDANCE_GAME)try{console.log("\u5f00\u59cb\u5f55\u5c4f ###### "),tt.getGameRecorderManager().start({duration:300})}catch(t){cc.warn(t)}},t.recorderStop=function(){if(cc.sys.platform==cc.sys.BYTEDANCE_GAME){console.log("\u5f55\u5c4f\u7ed3\u675fstop ###### ");try{tt.getGameRecorderManager().stop()}catch(t){cc.warn(t)}}},t.recorderPause=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(console.log("\u5f55\u5c4f\u7ed3\u675fpause ###### "),tt.getGameRecorderManager().pause())},t.recorderResume=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(console.log("\u5f55\u5c4f\u7ed3\u675fresume ###### "),tt.getGameRecorderManager().resume())},t.setVideoPath=function(t){this.videoPath=t},t.shareTemplate=function(t){cc.sys.platform==cc.sys.BYTEDANCE_GAME?tt.shareAppMessage({templateId:"gf33jlfc0h1k415a7o",query:"",success:function(){console.log("\u5206\u4eab\u6210\u529f"),t(!0)},fail:function(){console.log("\u5206\u4eab\u5931\u8d25"),t(!1)}}):t(!0)},t.shareAppMessage=function(t){var e=t.success,o=t.fail,n=t.url;console.log("[tt] [sdk][tt] share app message",n),n||(n=this.videoPath);try{tt.shareAppMessage({channel:"video",query:"",templateId:"",title:"\u7f8a\u4e86\u4e2a\u7f8a",desc:"\u770b\u770b\u5927\u5bb6\u90fd\u559c\u6b22\u4ec0\u4e48\u7f8a",extra:{videoPath:n,videoTopics:["\u7f8a\u4e86\u4e2a\u7f8a"]},success:function(){e&&e(),console.log("[tt] \u5206\u4eab\u89c6\u9891\u6210\u529f")},fail:function(t){o&&o(),console.log("[tt] \u5206\u4eab\u89c6\u9891\u5931\u8d25",t)}})}catch(a){cc.warn("share app message err",a)}},t.rewardVideoAd=function(t){var e=this;this.onRewardVideoAdSuccess=t.success,this.onRewardVideoAdFail=t.fail,this.rewardAd?this.rewardAd.show():(this.rewardAd=tt.createRewardedVideoAd({adUnitId:t.id}),this.rewardAd.onLoad(function(){e.rewardAd.show()}),this.rewardAd.onError(function(t){e.onRewardVideoAdFail&&e.onRewardVideoAdFail(),cc.warn("tt reward video ad error",t)}),this.rewardAd.onClose(function(t){t.isEnded&&e.onRewardVideoAdSuccess&&e.onRewardVideoAdSuccess(),e.onRewardVideoAdFail&&e.onRewardVideoAdFail()}))},t.setClipboardData=function(t){tt.setClipboardData({data:t,success:function(){tt.getClipboardData({success:function(t){console.log("tt get clipboard data:",t.data)}})}})},t.showBannerAd=function(t){var e=this;this.onRewardBannerAdSuccess=t.success,this.onRewardBannerAdFail=t.fail,this.bannerAd?this.bannerAd.show():(this.bannerAd=tt.createBannerAd({adUnitId:t.id,adIntervals:30,style:{left:0,top:cc.winSize.height,width:300}}),this.bannerAd.onLoad(function(){e.bannerAd.show()}),this.bannerAd.onError(function(t){e.onRewardBannerAdFail&&e.onRewardBannerAdFail(),cc.warn("tt reward video ad error",t)}))},t.hideBannerAd=function(){this.bannerAd&&this.bannerAd.hide()},t.showInterstitialAd=function(){},t.showRewardVideoAd=function(){},t.focusDouYin=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&tt.openAwemeUserProfile({success:function(t){console.log(t)}})},t.isSupportFocusDouYin=function(){if(cc.sys.platform!=cc.sys.BYTEDANCE_GAME)return!1;for(var t=tt.getSystemInfoSync(),e=t.system,o=t.SDKVersion,n=t.version,a=t.appName,i=(e.split(" "),n.split(".")),r=0;r-1&&t.listeners.splice(o,1)},this.emit=function(e){if(t.listeners.forEach(function(t){return t(e)}),t.listenersOncer.length>0){var o=t.listenersOncer;t.listenersOncer=[],o.forEach(function(t){return t(e)})}},this.pipe=function(e){return t.on(function(t){return e.emit(t)})}},cc._RF.pop()},{}],uiControler:[function(t,e,o){"use strict";cc._RF.push(e,"81349GiDV5P+4W7p0Ox2i/o","uiControler");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("./mapEditor"),c=t("./newLevelPop"),s=t("./selectLevelPop"),l=t("./setBlockNumPop"),u=t("../common/config"),p=t("../common/dataTs"),d=t("./editorGameLayer"),h=t("./saveAsPop"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mapEditorNode=null,e.setBlockNumPop=null,e.selectLevelPop=null,e.newLevelPop=null,e.saveAsPop=null,e.editorGameLayer=null,e.levelNumLabel=null,e.blockNumLabel=null,e}return a(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){cc.game.on("initLevelData",this.initLevelData,this),cc.game.on("setBlockNum",this.showBlockNum,this),cc.game.on("saveAsNewMap",this.saveAsNewMap,this)},e.prototype.selectLevelFun=function(){console.log("\u7f16\u8f91\u5173\u5361"),this.selectLevelPop.getComponent(s.default).showSelectLevelPop()},e.prototype.newLevelFun=function(){console.log("\u65b0\u5efa\u5173\u5361"),this.newLevelPop.getComponent(c.default).showNewLevelPop()},e.prototype.chooseMapSizeFun=function(t,e){cc.game.emit("refreshMapSizeData",u.default.mapType[e])},e.prototype.saveAsShowLayer=function(){console.log("\u53e6\u5b58\u4e3a\u5173\u5361"),this.saveAsPop.getComponent(h.default).showSaveAsPop()},e.prototype.saveLevelMapFun=function(){console.log("\u4fdd\u5b58\u5173\u5361");var t=this.mapEditorNode.getComponent(r.default).levelID,e=this.mapEditorNode.getComponent(r.default).newLevelDataObj;this.checkMapIsRight(e)?p.default.setLevelMapData(t,e):console.log("\u5173\u5361\u914d\u7f6e\u9519\u8bef")},e.prototype.checkMapIsRight=function(t){var e=0,o=0,n=t,a=n.levelData;for(var i in a)for(var r in a[i])0==a[i][r].type?e++:o++;if(console.log("blockNum:",e),console.log("blockTypeNum:",o),e%3!=0)return console.log("\u7a7a\u767d\u5757\u4e0d\u662f3\u7684\u500d\u6570"),cc.game.emit("showTips","\u7a7a\u767d\u5757\u4e0d\u662f3\u7684\u500d\u6570"),!1;if(o%3!=0)return console.log("\u7c7b\u578b\u5757\u4e0d\u662f3\u7684\u500d\u6570"),cc.game.emit("showTips","\u7c7b\u578b\u5757\u4e0d\u662f3\u7684\u500d\u6570"),!1;var c=n.blockTypeData,s=0;for(var i in c)s+=c[i];return console.log("typeNum:",s),s==e/3||(console.log("\u5757\u7c7b\u578b\u8bbe\u7f6e\u6570\u91cf\u9519\u8bef"),cc.game.emit("showTips","\u5757\u7c7b\u578b\u8bbe\u7f6e\u6570\u91cf\u9519\u8bef"),!1)},e.prototype.saveAsNewMap=function(t){var e=this.mapEditorNode.getComponent(r.default).newLevelDataObj;e.levelKey=t,p.default.setLevelMapData(t,e);var o={newLevelData:e};cc.game.emit("initLevelData",o)},e.prototype.setBlockTypeFun=function(){console.log("\u8bbe\u7f6e\u672c\u5173\u7684\u56fe\u5757\u7c7b\u578b\u6570\u91cf");var t=0,e=this.mapEditorNode.getComponent(r.default).newLevelDataObj,o=e.levelData;for(var n in o)for(var a in o[n])0==o[n][a].type&&t++;var i=e.blockTypeData;t%3==0?this.setBlockNumPop.getComponent(l.default).showSetBlockPop(t/3,i):(console.log("error:\u5757\u6570\u91cf\u4e0d\u80fd\u88ab\u6574\u9664"),cc.game.emit("showTips","error:\u5757\u6570\u91cf\u4e0d\u80fd\u88ab\u6574\u9664"),this.setBlockNumPop.getComponent(l.default).showSetBlockPop(0,i))},e.prototype.selectNewBlockTypeFun=function(){console.log("\u9009\u62e9\u5373\u5c06\u6446\u653e\u7684\u56fe\u5757\u7c7b\u578b")},e.prototype.testPlayFun=function(){console.log("\u8bd5\u73a9\u672c\u5173\u5361"),this.mapEditorNode.getComponent(r.default).levelID;var t=cc.instantiate(this.mapEditorNode.getComponent(r.default).newLevelDataObj);console.log("data:",t);var e=[t];this.editorGameLayer.getComponent(d.default).initLevelLayer(e)},e.prototype.backOffFun=function(){console.log("\u56de\u9000\u7ec4\u5757")},e.prototype.initLevelData=function(t){this.levelNumLabel.string="\u5f53\u524d\u5173\u5361ID\uff1a"+t.newLevelData.levelKey},e.prototype.showBlockNum=function(){if(!this.mapEditorNode.getComponent(r.default).newLevelDataObj)return!1;var t=this.getAllBlockNum();this.blockNumLabel.string=""+t},e.prototype.getAllBlockNum=function(){var t=0,e=this.mapEditorNode.getComponent(r.default).newLevelDataObj.levelData;for(var o in e)t+=e[o].length;return t},i([g(cc.Node)],e.prototype,"mapEditorNode",void 0),i([g(cc.Node)],e.prototype,"setBlockNumPop",void 0),i([g(cc.Node)],e.prototype,"selectLevelPop",void 0),i([g(cc.Node)],e.prototype,"newLevelPop",void 0),i([g(cc.Node)],e.prototype,"saveAsPop",void 0),i([g(cc.Node)],e.prototype,"editorGameLayer",void 0),i([g(cc.Label)],e.prototype,"levelNumLabel",void 0),i([g(cc.Label)],e.prototype,"blockNumLabel",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../common/config":"config","../common/dataTs":"dataTs","./editorGameLayer":"editorGameLayer","./mapEditor":"mapEditor","./newLevelPop":"newLevelPop","./saveAsPop":"saveAsPop","./selectLevelPop":"selectLevelPop","./setBlockNumPop":"setBlockNumPop"}],"uma-sdk":[function(t,e,o){"use strict";cc._RF.push(e,"31ca3gDt7FFSYn5bPlPkMAx","uma-sdk");var n=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var a=t("../../common/dataTs"),i=t("../../common/enumConfig"),r=t("../../common/sdk"),c=t("../../manager/DateManager"),s=cc._decorator,l=s.ccclass,u=(s.property,function(){function t(){}return t.setUserid=function(){r.default.isPlatform(r.Platform.wx)},t.trackEvent=function(t,e){void 0===e&&(e=null);var o=a.default.getUserData();e||(e={});var n=Number(a.default.getUserData().registerTime),s=c.default.format(i.CALENDARNAMES[6],new Date(n));e.time=s,e.c_time=Number(s),e.uid=o.userID;var l=JSON.stringify(e);e.data=l,r.default.isPlatform(r.Platform.wx)},n([l],t)}());o.default=u,cc._RF.pop()},{"../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/sdk":"sdk","../../manager/DateManager":"DateManager"}],"unlock-build-pop":[function(t,e,o){"use strict";cc._RF.push(e,"23d5cnrWYpLtbx08aY5sAOq","unlock-build-pop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/native/audio"),l=t("../common/spine"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainCultivateLayer=null,e.flightNode=null,e.spriteNode=null,e.spineTitle=null,e.spineAnim=null,e.receiveBtn=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchStartScale(this.receiveBtn,this.receiveBtnFunc.bind(this)),r.default.addbtnTouchEndScale(this.receiveBtn,this.receiveBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.receiveBtn,this.receiveBtnFunc.bind(this))},e.prototype.hideDefault=function(){this.flightNode.active=!1,this.spriteNode.active=!1,this.spineTitle.active=!1,this.spineAnim.active=!1,this.receiveBtn.active=!1},e.prototype.showGetRemoveProp=function(){this.node.active=!0,this.hideDefault(),this.playRemoveAnim()},e.prototype.playRemoveAnim=function(){var t=this,e=this;this.spineAnim.active=!0,this.spineAnim.getComponent(l.default).setFrameEventCb("Open1",function(){console.log("1"),s.default.playAudioMusic("audio/sound/Open2.mp3",!1)}),this.spineAnim.getComponent(l.default).setFrameEventCb("Eff_Sheen1",function(){e.spineTitle.active=!0,console.log("2"),s.default.playAudioMusic("audio/sound/Words2.mp3",!1),e.spineTitle.getComponent(l.default).play("Award1_Words1",1),t.spineAnim.getComponent(l.default).setFrameEventCb("Treasure1",function(){console.log("3"),e.flightNode.active=!0,t.spriteNode.active=!0,e.receiveBtn.active=!0,e.flightNode.scale=0,e.spriteNode.scale=0,e.receiveBtn.scale=0,cc.tween(e.flightNode).to(.3,{scale:.8}).call(function(){cc.tween(e.flightNode).by(5,{angle:360}).repeatForever().start()},e).start(),cc.tween(e.spriteNode).to(.1,{scale:1.4}).to(.1,{scale:1}).to(.1,{scale:1.2}).to(.1,{scale:1}).call(function(){cc.tween(e.receiveBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()}).start()})}),this.spineAnim.getComponent(l.default).play("Ref1_Open3",1,function(){console.log("4")});var o=c.default.getUserData();o.prop_remove+=2,c.default.saveUserData(o)},e.prototype.receiveBtnFunc=function(){this.node.active=!1},i([d(cc.Node)],e.prototype,"mainCultivateLayer",void 0),i([d(cc.Node)],e.prototype,"flightNode",void 0),i([d(cc.Node)],e.prototype,"spriteNode",void 0),i([d(cc.Node)],e.prototype,"spineTitle",void 0),i([d(cc.Node)],e.prototype,"spineAnim",void 0),i([d(cc.Node)],e.prototype,"receiveBtn",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/native/audio":"audio","../common/spine":"spine"}],"unlock-build":[function(t,e,o){"use strict";cc._RF.push(e,"b4509jR79lK778pfI4KU2y8","unlock-build");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/dataTs"),c=t("../common/native/audio"),s=t("../common/spine"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.catContent=null,e.unlockBuildBtn=null,e.lightBg=null,e.ribbonNode=null,e.catNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.playCatAnimation=function(t){void 0===t&&(t=1);var e=this;this.hideDefault(),this.catContent.active=!0,e.catContent.scale=1;var o=r.default.getGameConfigData().baseConfigData.catClothesData["cat_"+t];o&&o.length&&(e.ribbonNode.getComponent(cc.Label).string=o[0].name),this.unlockBuildBtn.active=!0,e.unlockBuildBtn.getComponent(s.default).setFrameEventCb("Cat1",function(){console.log("Cat1 frame ######"),c.default.playAudioMusic("audio/sound/Open2.mp3",!1),e.lightBg.active=!0,e.ribbonNode.active=!0,e.catNode.active=!0,cc.tween(e.lightBg).by(5,{angle:360}).repeatForever().start(),e.catContent.scale=0,cc.tween(e.catContent).to(.1,{scale:1.1}).to(.1,{scale:1}).start(),e.setCatSpine(t),cc.tween(e.catContent).delay(2).to(.2,{scale:1.2}).to(.3,{scale:0},{easing:cc.easing.cubicIn}).call(function(){e.node.active=!1}).start()}),this.unlockBuildBtn.getComponent(s.default).play("3UnlockCat1",1,function(){console.log("3UnlockCat1 \u64ad\u653e\u5b8c\u6210")})},e.prototype.setCatSpine=function(t){var e=this,o="Model"+(t<10?"0"+t:t+"");this.catNode.getComponent(s.default).loadNewSpine(o,function(){e.catNode.getComponent(s.default).setNewSkin("00"),e.catNode.getComponent(s.default).play("2_Action1",1,function(){e.catNode.getComponent(s.default).play("1_Standby1",0)})})},e.prototype.hideDefault=function(){this.unlockBuildBtn.active=!1,this.lightBg.active=!1,this.ribbonNode.active=!1,this.catNode.active=!1},i([p(cc.Node)],e.prototype,"catContent",void 0),i([p(cc.Node)],e.prototype,"unlockBuildBtn",void 0),i([p(cc.Node)],e.prototype,"lightBg",void 0),i([p(cc.Node)],e.prototype,"ribbonNode",void 0),i([p(cc.Node)],e.prototype,"catNode",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/dataTs":"dataTs","../common/native/audio":"audio","../common/spine":"spine"}],"upgrade-tip":[function(t,e,o){"use strict";cc._RF.push(e,"fc6e6B31jVAnbLpM0OJ9CQp","upgrade-tip");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("./mainCultivateLayer"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.iconFish=null,e.iconPoint=null,e.iconNode=null,e.fishNode=null,e.arrowNode=null,e.mainCultivateLayer=null,e.houseData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.iconPoint,this.iconPointEndFunc.bind(this)),r.default.addbtnTouchEndScale(this.iconFish,this.iconFishEndFunc.bind(this))},e.prototype.iconPointEndFunc=function(t){t.stopPropagation(),this.mainCultivateLayer&&this.mainCultivateLayer.getComponent(s.default).clickUpgradePoint(this)},e.prototype.iconFishEndFunc=function(t){t.stopPropagation(),this.mainCultivateLayer&&this.mainCultivateLayer.getComponent(s.default).clickUpgradeFish(this.houseData,this)},e.prototype.showPoint=function(t,e,o){void 0===t&&(t=this.houseData),void 0===e&&(e=this.mainCultivateLayer),void 0===o&&(o=!1),this.mainCultivateLayer=e,this.houseData=t,this.iconPoint.active=!0,this.iconFish.active=!1,this.fishNode.getComponent(cc.Label).string="x"+t.fish,c.default.getUserData().fish>=t.fish?this.arrowNode.active=!0:this.arrowNode.active=!1,o&&(this.iconPoint.scale=0,cc.tween(this.iconPoint).delay(.1).to(.5,{scale:1}).start());var n="rewardIcon/Unlock_Hammer.png";"cat"==t.buildType?(n="rewardIcon/Unlock_Cat.png",r.default.changeSpriteFrame(this.iconNode,n)):"skin"==t.buildType?(n="rewardIcon/Unlock_Clothing.png",r.default.changeSpriteFrame(this.iconNode,n)):1==t.buildid?(n="rewardIcon/Unlock_Brush.png",r.default.changeSpriteFrame(this.iconNode,n)):r.default.changeSpriteFrame(this.iconNode,n)},e.prototype.showFish=function(){console.log(JSON.stringify(this.houseData)),this.iconPoint.active=!1,this.iconFish.active=!0,this.iconFish.scale=0,cc.tween(this.iconFish).to(.3,{scale:1}).start()},e.prototype.show=function(){this.node.active=!0,this.iconPoint.active=!0,this.iconFish.active=!1,this.iconPoint.scale=0,cc.tween(this.iconPoint).delay(.1).to(.5,{scale:1}).start()},e.prototype.hide=function(){this.node.active=!1},i([p(cc.Node)],e.prototype,"iconFish",void 0),i([p(cc.Node)],e.prototype,"iconPoint",void 0),i([p(cc.Node)],e.prototype,"iconNode",void 0),i([p(cc.Node)],e.prototype,"fishNode",void 0),i([p(cc.Node)],e.prototype,"arrowNode",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","./mainCultivateLayer":"mainCultivateLayer"}],upgradePop:[function(t,e,o){"use strict";cc._RF.push(e,"56493C1WJVBQJG8pH7F9E9g","upgradePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/enumConfig"),l=t("../common/native/audio"),u=t("../common/spine"),p=t("../utils/uma/uma-sdk"),d=cc._decorator,h=d.ccclass,f=d.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.coinNum=null,e.catNode=null,e.closeBtn=null,e.upgradeBtn=null,e.popNode=null,e.catId=0,e.clothId=0,e.callBack=null,e.popCallbackCollect=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.hideUpgradePop.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn),r.default.addbtnTouchStartScale(this.upgradeBtn),r.default.addbtnTouchEndScale(this.upgradeBtn,this.upgradeFunc.bind(this)),r.default.addbtnTouchCancelScale(this.upgradeBtn),this.popCallbackCollect={playGameCallBack:this.playGameFunc.bind(this)}},e.prototype.playGameFunc=function(){},e.prototype.showUpgradePop=function(t,e){this.node.active=!0,this.catId=t,this.callBack=e,c.default.getGameConfigData().baseConfigData.catClothesData;for(var o=c.default.getUserData().catClothesData["cat_"+this.catId],n=0;n=o&&e>=n&&t<=o+a&&e<=n+i?1:0},pointLength:function(t,e){var o=e.x-t.x,n=e.y-t.y;return o*o+n*n},join:function(t,e){void 0===e&&(e=",");var o=[],n=0;for(var a in t)o[n]=t[a],n++;return o.join(e)},concat:function(){var t={};for(var e in arguments)for(var o in arguments[e])t[o]=arguments[e][o];return t},toArray:function(t,e){var o=[];if(e)for(var n in t)o.push(n,t[n]);else for(var n in t)o.push(t[n]);return o},valueArray:function(t,e){var o=[];for(var n in t)o.push(t[n][e]);return o},getObjectLen:function(t){var e=0;for(var o in t)e++;return e},formatTime:function(t){var e=[0,0,0,0,0];return e[4]=t%1e3,e[3]=Math.floor(t/1e3),e[3]>=60&&(e[2]=Math.floor(e[3]/60),e[3]=e[3]%60,e[2]>=60&&(e[1]=Math.floor(e[2]/60),e[2]=e[2]%60,e[1]>=24&&(e[0]=Math.floor(e[1]/24),e[1]=e[1]%24))),e},countdownTime:function(t){var e=[0,0,0];return e[0]=Math.floor(t/3600),e[1]=Math.floor(t%3600/60),e[2]=Math.floor(t%60),e},getTime:function(t,e,o){var n="",a="",i=new Date(t);switch(1==o?(n+=i.getFullYear()+"/",n+=this.fixLength(i.getMonth()+1,2)+"/",n+=this.fixLength(i.getDate(),2)):2==o?(n+=i.getFullYear()+"-",n+=this.fixLength(i.getMonth()+1,2)+"-",n+=this.fixLength(i.getDate(),2)):(n+=i.getFullYear()+"\u5e74",n+=this.fixLength(i.getMonth()+1,2)+"\u6708",n+=this.fixLength(i.getDate(),2)+"\u65e5"),a+=this.fixLength(i.getHours(),2)+":",a+=this.fixLength(i.getMinutes(),2)+":",a+=this.fixLength(i.getSeconds(),2),e){case 1:return n;case 2:return n+" "+a;default:return a}},rnd:function(t,e){return null==e&&(t=0),t+Math.floor(Math.random()*(e-t+1))},rndArray:function(t){for(var e=t.concat(),o=[];e.length>0;)o.push(e.splice(this.rnd(e.length-1),1)[0]);return o},inArray:function(t,e){for(var o in e)if(t==e[o])return o;return-1},countArray:function(t,e,o){var n=0;for(var a in t)e==t[a]&&n++;return o&&(n=t.length-n),n},fixLength:function(t,e,o,n){for(t+="",arguments.length<3&&(o=0),arguments.length<4&&(n="0");t.lengthe&&(t=0==o?t.slice(-e):t.slice(0,e)),t},fixNumber:function(t,e,o){var n=Math.pow(10,e);return Math[o]?Math[o](t*n)/n:Math.round(t*n)/n},formatNumber:function(t,e,o){if(!isNaN(t)&&(arguments.length<2&&(e=1),arguments.length<3&&(o=-1),o>-1&&(t=parseFloat(t).toFixed(o)),1==e)){var n=t.toString().split("."),a=n[0],i="";for(void 0!==n[1]&&(i="."+n[1]),n=[];a.length>3;)n.unshift(a.slice(-3)),a=a.slice(0,a.length-3);a.length>0&&n.unshift(a),t=n.join()+i}return t},fixValue:function(t,e,o,n){return t=Math[n]?Math[n](t):Math.round(t),null!=e&&to&&(t=o),t},isInt:function(t,e,o){var n=parseInt(t);return n==t?null!=e&&no?0:1:0},unsignInt:function(t,e){return t<=0?0:Math[e]?Math[e](t):Math.round(t)},getKey:function(t,e){for(var o in t)if(t[o]==e)return o},getGrid:function(t,e,o,n){for(var a=[],i=0;i255?e+=2:e++;return e},simpleSplit:function(t,e){var o=[];return-1==t.indexOf(e)?(o[0]=t,o[1]=""):(o[0]=t.slice(0,t.indexOf(e)),o[1]=t.slice(t.indexOf(e)+1)),o},getSum:function(t){var e=0;for(var o in t)e+=t[o];return e},getAverage:function(t){var e=0,o=0;for(var n in t)e+=t[n],o++;return e/o},parseToObject:function(t,e,o,n){n=n||".";var a=e.split(n),i=a.pop(),r=t;for(var c in a)r=r[a[c]];return null!=o&&(r[i]=o),r[i]},multicall:function(t,e){var o=e;switch(o.length){case 0:t();break;case 1:t(o[0]);break;case 2:t(o[0],o[1]);break;case 3:t(o[0],o[1],o[2]);break;case 4:t(o[0],o[1],o[2],o[3]);break;case 5:t(o[0],o[1],o[2],o[3],o[4]);break;case 6:t(o[0],o[1],o[2],o[3],o[4],o[5]);break;case 7:t(o[0],o[1],o[2],o[3],o[4],o[5],o[6]);break;case 8:t(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7]);break;case 9:t(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8]);break;case 10:t(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9])}},getPointAlpha:function(t,e,o){var n=window.document.createElement("canvas"),a=n.getContext("2d");return n.width=1,n.height=1,a.drawImage(t,e,o,1,1,0,0,1,1),a.getImageData(0,0,1,1).data[3]},ajax:function(t,e,o,n){e=e||"",n=n||"GET";var a=new window.XMLHttpRequest;a.onreadystatechange=function(){4==a.readyState&&200==a.status&&o(a.responseText)},a.open(n,t,!0),a.send(e)},getQueryString:function(t){var e=new RegExp("(^|&)"+t+"=([^&]*)(&|$)","i"),o=window.location.search.substr(1).match(e);return null!=o?unescape(o[2]):null},delayCallbackOnce:function(t,e){cc.director.getScheduler().schedule(t,this._defaultTimerTarget,0,0,e,!1)}};o.default=n,cc._RF.pop()},{}],wallpaperPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"5ccb7gpTcZNy6oxSxO1hXsJ","wallpaperPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../pre/itemSub/wallpaperSubPrefab"),u=t("../../script/common/dataTs"),p=t("../../script/common/enumConfig"),d=t("../../script/pop/popSub/wallpaperSv"),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.wallpaperSubPrefab=null,e.base_title_label=null,e.parentNode=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setNodeData=function(t,e){for(var o in this.parentNode=e,this.nodeData=t,u.default.langCode==p.LangEnum.zhCN&&"- Coming soon -"==this.nodeData.titleName?this.base_title_label.string="- \u656c\u8bf7\u671f\u5f85 -":this.base_title_label.string=this.nodeData.titleName,this.nodeData.bgArray){var n=cc.instantiate(this.wallpaperSubPrefab);n.getComponent(l.default).setNodeData(this.nodeData.bgArray[o],this),this.content.addChild(n)}},e.prototype.refreshNode=function(t,e){this.parentNode=e,this.nodeData=t;var o=this.content.children;for(var n in o)o[n].getComponent(l.default).setNodeData(this.nodeData.bgArray[n],this)},e.prototype.refreshSubNode=function(){this.parentNode.getComponent(d.default).refreshSubNode()},i([s(cc.Node)],e.prototype,"content",void 0),i([s(cc.Prefab)],e.prototype,"wallpaperSubPrefab",void 0),i([s(cc.Label)],e.prototype,"base_title_label",void 0),i([c],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../pre/itemSub/wallpaperSubPrefab":"wallpaperSubPrefab","../../script/common/dataTs":"dataTs","../../script/common/enumConfig":"enumConfig","../../script/pop/popSub/wallpaperSv":"wallpaperSv"}],wallpaperSubPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"f4535mVxXNAALqaewBHYpME","wallpaperSubPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../script/common/dataTs"),u=t("../../script/common/CcJsFunc"),p=t("../item/wallpaperPrefab"),d=t("../../script/manager/GameManager"),h=t("../../script/utils/uma/uma-sdk"),f=t("../../script/common/enumConfig"),m=t("../../script/manager/report-common"),g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgContent=null,e.imgLabel=null,e.imgBorder=null,e.imgLock=null,e.parentNode=null,e.userData=null,e.nodeData=null,e.levelNum=null,e.pictureData=null,e.isReward=!1,e}return a(e,t),e.prototype.start=function(){u.default.addbtnTouchEndScale(this.node,this.clickNodeAction.bind(this))},e.prototype.rewardNodeData=function(t,e){void 0===e&&(e=!0),this.isReward=e,this.imgLock.active=!1,this.imgContent.active=!0,this.imgBorder.active=!1;var o="pictureIcon/GameBgicon"+t+".png";u.default.changeSpriteFrame(this.imgContent,o),this.imgBorder.getChildByName("mark").active=!1,this.imgLabel.node.active=!1},e.prototype.setNodeData=function(t,e){this.isReward=!1,this.parentNode=e,this.nodeData=t,this.userData=l.default.getUserData(),this.levelNum=this.userData.playLevelId,this.pictureData=l.default.getPictureData(),l.default.langCode==f.LangEnum.zhCN?this.imgLabel.string=this.nodeData.name:this.imgLabel.string=this.nodeData.en_name;var o="pictureIcon/GameBgicon"+this.nodeData.bgID+".png";u.default.changeSpriteFrame(this.imgContent,o),this.levelNum>this.nodeData.unlockNum?(this.imgLock.active=!1,this.imgContent.active=!0,this.imgBorder.active=!1,this.pictureData.bgNum==this.nodeData.bgID?this.imgBorder.active=!0:this.imgBorder.active=!1):(this.imgLock.active=!0,this.imgContent.active=!1,this.imgBorder.active=!1),d.default.getInstance().collectionMark.bgNum==t.bgID?(this.imgBorder.getChildByName("mark").active=!0,d.default.getInstance().collectionMark.bgNum=0):this.imgBorder.getChildByName("mark").active=!1},e.prototype.clickNodeAction=function(){if(u.default.addClickAudio(),this.levelNum>=this.nodeData.unlockNum&&!this.isReward){this.pictureData.bgNum!=this.nodeData.bgID&&m.default.reportTACommon("collar_bg",{bg_before:this.pictureData.bgNum,bg_after:this.nodeData.bgID}),this.imgBorder.active=!0,this.pictureData.bgNum=this.nodeData.bgID,l.default.savePictureData(this.pictureData),this.parentNode.getComponent(p.default).refreshSubNode(),this.imgBorder.getChildByName("mark").active=!1;var t=this.nodeData.bgID+"";h.default.trackEvent("collar_bg",{ID:t,c_ID:Number(t)}),cc.game.emit(f.EMITKEY.UPDATEPICTURE)}},i([s(cc.Node)],e.prototype,"imgContent",void 0),i([s(cc.Label)],e.prototype,"imgLabel",void 0),i([s(cc.Node)],e.prototype,"imgBorder",void 0),i([s(cc.Node)],e.prototype,"imgLock",void 0),i([c],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/dataTs":"dataTs","../../script/common/enumConfig":"enumConfig","../../script/manager/GameManager":"GameManager","../../script/manager/report-common":"report-common","../../script/utils/uma/uma-sdk":"uma-sdk","../item/wallpaperPrefab":"wallpaperPrefab"}],wallpaperSv:[function(t,e,o){"use strict";cc._RF.push(e,"e1a4baQrCVBT5Hpjf/VGnTF","wallpaperSv");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/dataTs"),c=t("../../../pre/item/wallpaperPrefab"),s=t("../../../i18n/i18n"),l=t("../../../i18n/gd_language"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.wallpaperPrefab=null,e.dataArray=[],e.i18nArray=[],e}return a(e,t),e.prototype.start=function(){this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_commuter_road)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_starry)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lamp)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_harbour)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_snow)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_dinner)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_moon)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lazy_time)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_waiting_alone)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lighthouse)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_meteor_shower)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_harbour)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lamp)),this.content.removeAllChildren(),this.dataArray=r.default.gameConfigData.baseConfigData.bgData;var t=0;for(var e in this.dataArray)for(var o in this.dataArray[e].bgArray)t0&&this.refreshSubNode()},e.prototype.refreshSubNode=function(){var t=this.content.children;for(var e in t){var o=this.dataArray[e];t[e].getComponent(c.default).refreshNode(o,this)}},i([d(cc.Node)],e.prototype,"content",void 0),i([d(cc.Prefab)],e.prototype,"wallpaperPrefab",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../../i18n/gd_language":"gd_language","../../../i18n/i18n":"i18n","../../../pre/item/wallpaperPrefab":"wallpaperPrefab","../../common/dataTs":"dataTs"}],wardrobeLayer:[function(t,e,o){"use strict";cc._RF.push(e,"4448eEzJr1BMqSaSIx1uqZX","wardrobeLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/main/clothesPrefab"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../pop/upgradePop"),p=t("../utils/uma/uma-sdk"),d=t("./mainCultivateLayer"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainCultivateLayer=null,e.changeClothesNode=null,e.scrollContent=null,e.clothesPrefab=null,e.btnLayer=null,e.ribbonNode=null,e.ribbonLabel=null,e.rankBtn=null,e.levelLabel1=null,e.levelLabel2=null,e.upgradePop=null,e.challengeBtn=null,e.clothPadding=20,e.catId=0,e.clothNodeArray=[],e.cultivateComp=null,e.isShowing=!1,e}return a(e,t),e.prototype.start=function(){c.default.addbtnTouchStartScale(this.rankBtn),c.default.addbtnTouchEndScale(this.rankBtn,this.rankFunc.bind(this)),c.default.addbtnTouchCancelScale(this.rankBtn),c.default.addbtnTouchStartScale(this.challengeBtn),c.default.addbtnTouchEndScale(this.challengeBtn,this.challengeBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.challengeBtn)},e.prototype.showWardrobelLayer=function(t,e){var o=this;console.log("catId = ",t),this.isShowing||(this.isShowing=!0,this.cultivateComp=e,this.catId=t,this.scrollContent.removeAllChildren(),this.changeClothesNode.active=!0,this.changeClothesNode.y=-cc.winSize.height/2,this.initCatClothesNode(),cc.tween(this.changeClothesNode).by(.3,{y:350},{easing:cc.easing.cubicOut}).start(),this.cultivateComp.houseToBigMiddle(this.catId),cc.tween(this.changeClothesNode).delay(.3).call(function(){o.showBtnLayer(!0)},this).start())},e.prototype.hideWardrobelLayer=function(){var t=this;0!=this.catId&&(this.catId=0,this.isShowing=!1,this.changeClothesNode.stopAllActions(),cc.tween(this.changeClothesNode).to(.2,{y:-cc.winSize.height/2}).call(function(){t.changeClothesNode.active=!1},this).start(),this.hideBtnLayer())},e.prototype.showBtnLayer=function(t){this.btnLayer.active=!0;for(var e=s.default.getUserData().catClothesData["cat_"+this.catId],o=0;o=3?(this.rankBtn.active=!1,this.challengeBtn.active=!1):(2==n.skin?(this.challengeBtn.active=!0,this.rankBtn.active=!1):(this.challengeBtn.active=!1,this.rankBtn.active=!0),this.levelLabel1.string=e[o].clothRank+"",this.levelLabel2.string=e[o].clothRank+1+"")}t&&(cc.tween(this.ribbonNode).set({scale:0}).to(.3,{scale:1},{easing:cc.easing.backOut}).start(),cc.tween(this.rankBtn).set({scale:0}).delay(.15).to(.3,{scale:1},{easing:cc.easing.cubicOut}).start())},e.prototype.hideBtnLayer=function(){this.btnLayer.active=!1},e.prototype.rankFunc=function(t){t.stopPropagation(),cc.log("\u6253\u5f00\u5347\u7ea7\u5f39\u7a97"),this.upgradePop.getComponent(u.default).showUpgradePop(this.catId,this.popCallbackFunc.bind(this))},e.prototype.challengeBtnFunc=function(){this.hideWardrobelLayer(),this.mainCultivateLayer.getComponent(d.default).houseToMinDefault(),cc.game.emit(l.EMITKEY.UPDATETABBARRECEIVE,2)},e.prototype.popCallbackFunc=function(t){void 0===t&&(t=!1),this.cultivateComp.refreshCatCloth(this.catId,t,t),this.refreshClothSelect(),this.showBtnLayer(!1)},e.prototype.initCatClothesNode=function(){var t=s.default.getGameConfigData().baseConfigData.catClothesData,e=s.default.getUserData().catClothesData;console.log("baseConfig catClothesData = ",t),console.log("userData userClothesData = ",e),this.clothNodeArray=[];for(var o="cat_"+this.catId,n=t[o],a=0;a=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../common/spine"),p=t("../common/util"),d=t("../manager/data-manager"),h=t("../manager/DateManager"),f=t("../manager/GameManager"),m=t("../manager/report-common"),g=cc._decorator,y=g.ccclass,v=g.property,b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.titleNode=null,e.barefootNode=null,e.barefootTitle=null,e.barefootDesc=null,e.sheepSp=null,e.sheepFlagSp=null,e.winDescNode=null,e.backBtn=null,e.shareNode=null,e.shareBtn=null,e.noShareBtn=null,e.shareCloseBtn=null,e.timeNode=null,e.flashSp=null,e}return a(e,t),e.prototype.start=function(){c.default.addbtnTouchStartScale(this.backBtn),c.default.addbtnTouchEndScale(this.backBtn,this.backBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.backBtn),c.default.addbtnTouchStartScale(this.shareBtn),c.default.addbtnTouchEndScale(this.shareBtn,this.shareBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.shareBtn),c.default.addbtnTouchStartScale(this.noShareBtn),c.default.addbtnTouchEndScale(this.noShareBtn,this.noShareBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.noShareBtn),c.default.addbtnTouchStartScale(this.shareCloseBtn),c.default.addbtnTouchEndScale(this.shareCloseBtn,this.shareCloseBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.shareCloseBtn)},e.prototype.shareBtnFunc=function(){cc.game.emit(l.EMITKEY.TTSHARERECORD)},e.prototype.noShareBtnFunc=function(){this.shareNode.active=!1,this.showBackBtn()},e.prototype.shareCloseBtnFunc=function(){this.shareNode.active=!1,this.showBackBtn()},e.prototype.backBtnFunc=function(){cc.game.emit(l.EMITKEY.SHOWMAINLAYER)},e.prototype.showBackBtn=function(){cc.tween(this.backBtn).delay(.5).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},e.prototype.showWinPop=function(t){var e=this;this.node.active=!0,this.backBtn.scale=0,this.shareNode.scale=0;var o=d.default.getTAUserInfo();m.default.reportTACommon("game_finish",o),this.titleNode.getComponent(cc.Label).string=h.default.getDateString();var n=p.default.countdownTime(t.time),a=n[1]<10?"0"+n[1]:n[1]+"",i=n[2]<10?"0"+n[2]:n[2]+"";if(this.timeNode.getComponent(cc.Label).string="\u901a\u5173\u7528\u65f6"+a+"\u5206"+i+"\u79d2",f.default.getInstance().gameType==l.GAMETYPE.GAMEDAILY)this.barefootDesc.getComponent(cc.Label).string="\u52a0\u5165\u7f8a\u7fa4",r.default.getRankInfoData(function(t){d.default.setRankData(t),f.default.getInstance().rankInfo=t.data;var o=12;f.default.getInstance().rankInfo&&(o=f.default.getInstance().rankInfo.user.index);var n="\u60a8\u6240\u5728\u7684\u5730\u533a\u4e3a\u7b2c "+o+" \u540d";e.winDescNode.getComponent(cc.RichText).string=n});else if(f.default.getInstance().gameType==l.GAMETYPE.GAMETOPIC){this.barefootDesc.getComponent(cc.Label).string="\u52a0\u5165"+this.getTeamName();var c="";d.default.topicRankInfo&&d.default.topicModel&&(c=1==d.default.topicModel.info.type?d.default.topicRankInfo.tomb?d.default.topicRankInfo.tomb.length+"":"0":d.default.topicRankInfo.taoist?d.default.topicRankInfo.taoist.length+"":"0");var s=""+this.getTeamName()+"\u7f8a\u961f\u5df2\u6709 "+c+" \u7f8a";e.winDescNode.getComponent(cc.RichText).string=s}this.playBareFoot(),e.sheepSp.getComponent(u.default).play("Finish1",1,function(){e.sheepSp.getComponent(u.default).play("Finish2",0)}),e.flashSp.active=!1,cc.tween(e.sheepFlagSp).to(0,{scale:0}).delay(1).call(function(){e.playDescSp()}).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},e.prototype.playDescSp=function(){var t=this;if(f.default.getInstance().gameType==l.GAMETYPE.GAMEDAILY){var e=s.default.getSheepClothesData(),o=!1,n="sheep/Sheeps",a="skin_00",i=null;e=c.default.shuffle(e);for(var r=0;r=2?1==d.default.topicModel.info.type?t[0]:t[1]:""},e.prototype.showShareNode=function(){this.shareNode.active=!0,cc.tween(this.shareNode).delay(.5).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},e.prototype.playBareFoot=function(){var t=this;this.barefootNode.active=!0,cc.tween(this.barefootNode).to(0,{scale:0}).to(.1,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).call(function(){cc.tween(t.barefootTitle).to(.1,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).call(function(){cc.tween(t.barefootDesc).to(.1,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},t).start()},this).start()},i([v(cc.Node)],e.prototype,"titleNode",void 0),i([v(cc.Node)],e.prototype,"barefootNode",void 0),i([v(cc.Node)],e.prototype,"barefootTitle",void 0),i([v(cc.Node)],e.prototype,"barefootDesc",void 0),i([v(cc.Node)],e.prototype,"sheepSp",void 0),i([v(cc.Node)],e.prototype,"sheepFlagSp",void 0),i([v(cc.Node)],e.prototype,"winDescNode",void 0),i([v(cc.Node)],e.prototype,"backBtn",void 0),i([v(cc.Node)],e.prototype,"shareNode",void 0),i([v(cc.Node)],e.prototype,"shareBtn",void 0),i([v(cc.Node)],e.prototype,"noShareBtn",void 0),i([v(cc.Node)],e.prototype,"shareCloseBtn",void 0),i([v(cc.Node)],e.prototype,"timeNode",void 0),i([v({type:cc.Node,tooltip:"flash\u52a8\u753b"})],e.prototype,"flashSp",void 0),i([y],e)}(cc.Component);o.default=b,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/spine":"spine","../common/util":"util","../manager/DateManager":"DateManager","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common"}],"wx-sdk":[function(t,e,o){"use strict";cc._RF.push(e,"dbb360ys3xP25Wexckd5YGf","wx-sdk");var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},a=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]n.first||o.second>n.second||o.third>n.third)},t.isWxVersionLower=function(t){if(cc.sys.platform!=cc.sys.WECHAT_GAME&&cc.sys.platform!=cc.sys.WECHAT_GAME_SUB)return!0;var e=wx.getSystemInfoSync().SDKVersion,o=!1;return this.isVersionLower(e,t)&&(o=!0),cc.log("[sdk] is wx version lower",e,t,o),o},t.isWxVersionHigher=function(t){return!this.isWxVersionLower(t)},t.wxRankScoreUpdate=function(t,e,o){cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getOpenDataContext().postMessage({cmd:"update-"+t,type:o,score:e})},t.wxRankScoreRemove=function(t){cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getOpenDataContext().postMessage({cmd:"remove-"+t,score:0})},t.wxShowSubContext=function(t,e,o,n){cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getOpenDataContext().postMessage({cmd:"show-"+t,setData:e,w:o,h:n})},t.onShareAppMessage=function(t){wx.showShareMenu({withShareTicket:!0}),wx.onShareAppMessage(function(){return{title:t.title,imageUrl:t.imageUrl,query:t.query}}),wx.onShareTimeline(function(){return{title:"\u7f8a\u4e86\u4e2a\u7f8a",imageUrl:"",query:"a=1&b=2"}})},t.onShareAppMessageQuery=function(){return wx.getEnterOptionsSync().query},t.wxShare=function(t,e){if(cc.sys.platform==cc.sys.WECHAT_GAME){var o=cc.winSize;e||(e=canvas.toTempFilePathSync({destHeight:o.width/5*4})),wx.shareAppMessage({title:t,imageUrl:e})}},t.wxShareWithCallBack=function(t){if(t.tag,cc.sys.isBrowser)return t.success&&t.success("local"),void(t.complete&&t.complete("local"));if(cc.sys.platform!=cc.sys.WECHAT_GAME)return t.success&&t.success("local"),void(t.complete&&t.complete("local"));null==t.validate&&(t.validate=!0),this._beforeOnHideAction=1;var e=!1,o=!1,n=!1,a=function(e){o||(console.log("\u6784\u5efa success"),t.success&&t.success(e),o=!0)},r=function(e){t.complete&&t.complete(e)},c=Date.now();this.setOnShow(function(){Date.now()-c<1e3*i.SHARE_CALLBACK_TIME&&(e=!0)}),this.setOnShow(function(){return!(!e||o)&&(t.validate&&Date.now()-c<1e3*i.SHARE_CALLBACK_TIME?void(Math.random()-1&&this.onShowFunction.splice(e,1)},t.setOnShowOnce=function(t){t&&this.onShowOnceFunction.push(t)},t.setOffShowOnce=function(t){var e=this.onShowOnceFunction.indexOf(t);e>-1&&this.onShowOnceFunction.splice(e,1)},t.setOnHide=function(t){t&&this.onHideFunction.push(t)},t.setOffHide=function(t){var e=this.onHideFunction.indexOf(t);e>-1&&this.onHideFunction.splice(e,1)},t.setOnHideOnce=function(t){t&&this.onHideOnceFunction.push(t)},t.setOffHideOnce=function(t){var e=this.onHideOnceFunction.indexOf(t);e>-1&&this.onHideOnceFunction.splice(e,1)},t.getAppVersion=function(){if(cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getAccountInfoSync){var t=wx.getAccountInfoSync();return cc.log("[sdk] accountInfo:",t),t.miniProgram.version||""}return""},t.setClipboardData=function(t){wx.setClipboardData({data:t,success:function(){wx.getClipboardData({success:function(t){cc.log("wx get clipboard data:",t.data)}})}})},t.showToast=function(t){wx.showToast(t)},t.showBannerAd=function(){},t.hideBannerAd=function(){},t.showInterstitialAd=function(){},t.showRewardVideoAd=function(t,e,o){if(wx){var n=!1,a=wx.createRewardedVideoAd({adUnitId:t});a.onClose(function(t){0==n&&(n=!0,t&&t.isEnded||void 0===t?e():o(!1,"\u89c2\u770b\u5931\u8d25"))}),a.onError(function(t){0==n&&(n=!0,o(!1,t.errMsg))}),a.load().then(function(){a.show()}).catch(function(){o(!1,"\u5e7f\u544a\u62c9\u53d6\u5931\u8d25")})}else o(!1,"wx undefined")},t.onShowFunction=[],t.onHideFunction=[],t.onShowOnceFunction=[],t.onHideOnceFunction=[],t.gameIconAd=null,t.gameIconAdShown=!1,t}();o.default=r,r.init(),cc._RF.pop()},{"../sdk":"sdk"}]},{},["gd_language","i18n","BulletPrefab","brickPrefab","collectPrefab","prop-prefab","wallpaperPrefab","brickSubPrefab","collectSubPrefab","wallpaperSubPrefab","blockPrefab","catClawPrefabs","clothesPrefab","cookiePrefab","cookieRewardNode","flying-item-pop-coin","flying-item-pop-fish","rewardPrefab","blockEditorPrefab","setBloackNumPrefab","topic-card-node","topic-header-node","topic-sheep-node","PrivacyPolicy","calendar-item","daily-challenge","cat-house-progress","main-cookie-reward","topic-rank","topic-ui-layer","topic-ui","ApiTool","api-sheep","fontTipsLayer","transitionsLayer","CcJsFunc","ad","config","dataModel","dataTs","enumConfig","http","key-map","mask","maskLayer","android-sdk","audio","native-bridge","native-def","native-event","share","tt-sdk","wx-sdk","sdk","spine","util","CoinEmitter","CoinEmitterByTime","SpriteWithMask","SpriteWithMaskAssembler","cubic-bezier-curve","curve-sample","export-helper","export","mesh-vertex","spline-node","spline","typed-event","player-head-atlas","reward-emitter","snake-ctrl-point","snake-sprite-assembler","spline-sprite","chessboard","crushArea","game-top-ui","gameLayer","gameUiLayer","moveOutArea","loadCanvas","loadLayer","catNode","houseLayer","main-rank","main-tabbar","mainCanvas","mainCultivateLayer","mainLayer","mainUiLayer","page-house","page-main","topUiLayer","upgrade-tip","wardrobeLayer","DateManager","GameManager","PoolManager","data-manager","popManager","report-common","blockArea","editorGameLayer","editorGameUiLayer","editorPopCommon","editorTips","mapArea","mapEditor","newLevelPop","saveAsPop","selectLevelPop","setBlockNumPop","uiControler","ScrollMsg","bullet-screen","sheep-card","sheep-flock-icon","sheep-flock","FriendRankPop","PersonalPop","PrivacyUserPop","TodayRankPop","bullet-screen-pop","challengeSucPop","failPop","getLovePop","getPropPop","giftLayerAnimate","loseCookiePop","loseLovePop","nextLevelPop","noLimitPop","nothingPop","picturePop","brickSv","collectSv","sheepRankItem","sprintRewardBar","wallpaperSv","setupPop","shareNodePop","sheep-rank-pop","show-daily-pop","show-reward-pop","sprintRewardPop","stagePop","topicChoosePop","topicCollectPop","topicJoinedPop","topicLastWinPop","topicNewPop","unlock-build-pop","unlock-build","upgradePop","winPop","data-env","data-type","network-tool","thinkingdata.mg.cocoscreator.min","FriendSubContextView","TodaySubContextView","bullet-item","register-head-image","str-utils","uma-sdk"]); +window.__require=function t(e,o,n){function a(r,c){if(!o[r]){if(!e[r]){var s=r.split("/");if(s=s[s.length-1],!e[s]){var l="function"==typeof __require&&__require;if(!c&&l)return l(s,!0);if(i)return i(s,!0);throw new Error("Cannot find module '"+r+"'")}r=s}var u=o[r]={exports:{}};e[r][0].call(u.exports,function(t){return a(e[r][1][t]||t)},u,u.exports,t,e,o,n)}return o[r].exports}for(var i="function"==typeof __require&&__require,r=0;rnull==t,s=Symbol("encodeFragmentIdentifier");function l(t){switch(t.arrayFormat){case"index":return e=>(o,n)=>{const a=o.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?o:null===n?[...o,[d(e,t),"[",a,"]"].join("")]:[...o,[d(e,t),"[",d(a,t),"]=",d(n,t)].join("")]};case"bracket":return e=>(o,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?o:null===n?[...o,[d(e,t),"[]"].join("")]:[...o,[d(e,t),"[]=",d(n,t)].join("")];case"colon-list-separator":return e=>(o,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?o:null===n?[...o,[d(e,t),":list="].join("")]:[...o,[d(e,t),":list=",d(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e="bracket-separator"===t.arrayFormat?"[]=":"=";return o=>(n,a)=>void 0===a||t.skipNull&&null===a||t.skipEmptyString&&""===a?n:(a=null===a?"":a,0===n.length?[[d(o,t),e,d(a,t)].join("")]:[[n,d(a,t)].join(t.arrayFormatSeparator)])}default:return e=>(o,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?o:null===n?[...o,d(e,t)]:[...o,[d(e,t),"=",d(n,t)].join("")]}}function u(t){let e;switch(t.arrayFormat){case"index":return(t,o,n)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=o):n[t]=o};case"bracket":return(t,o,n)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=[o]:n[t]=o};case"colon-list-separator":return(t,o,n)=>{e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],o):n[t]=[o]:n[t]=o};case"comma":case"separator":return(e,o,n)=>{const a="string"==typeof o&&o.includes(t.arrayFormatSeparator),i="string"==typeof o&&!a&&h(o,t).includes(t.arrayFormatSeparator);o=i?h(o,t):o;const r=a||i?o.split(t.arrayFormatSeparator).map(e=>h(e,t)):null===o?o:h(o,t);n[e]=r};case"bracket-separator":return(e,o,n)=>{const a=/(\[\])$/.test(e);if(e=e.replace(/\[\]$/,""),!a)return void(n[e]=o?h(o,t):o);const i=null===o?[]:o.split(t.arrayFormatSeparator).map(e=>h(e,t));void 0!==n[e]?n[e]=[].concat(n[e],i):n[e]=i};default:return(t,e,o)=>{void 0!==o[t]?o[t]=[].concat(o[t],e):o[t]=e}}}function p(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function h(t,e){return e.decode?a(t):t}function f(t){return Array.isArray(t)?t.sort():"object"==typeof t?f(Object.keys(t)).sort((t,e)=>Number(t)-Number(e)).map(e=>t[e]):t}function m(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function g(t){let e="";const o=t.indexOf("#");return-1!==o&&(e=t.slice(o)),e}function y(t){const e=(t=m(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function v(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function b(t,e){p((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const o=u(e),n=Object.create(null);if("string"!=typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(const a of t.split("&")){if(""===a)continue;let[t,r]=i(e.decode?a.replace(/\+/g," "):a,"=");r=void 0===r?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?r:h(r,e),o(h(t,e),r,n)}for(const a of Object.keys(n)){const t=n[a];if("object"==typeof t&&null!==t)for(const o of Object.keys(t))t[o]=v(t[o],e);else n[a]=v(t,e)}return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((t,e)=>{const o=n[e];return Boolean(o)&&"object"==typeof o&&!Array.isArray(o)?t[e]=f(o):t[e]=o,t},Object.create(null))}o.extract=y,o.parse=b,o.stringify=(t,e)=>{if(!t)return"";p((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const o=o=>e.skipNull&&c(t[o])||e.skipEmptyString&&""===t[o],n=l(e),a={};for(const r of Object.keys(t))o(r)||(a[r]=t[r]);const i=Object.keys(a);return!1!==e.sort&&i.sort(e.sort),i.map(o=>{const a=t[o];return void 0===a?"":null===a?d(o,e):Array.isArray(a)?0===a.length&&"bracket-separator"===e.arrayFormat?d(o,e)+"[]":a.reduce(n(o),[]).join("&"):d(o,e)+"="+d(a,e)}).filter(t=>t.length>0).join("&")},o.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[o,n]=i(t,"#");return Object.assign({url:o.split("?")[0]||"",query:b(y(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:h(n,e)}:{})},o.stringifyUrl=(t,e)=>{e=Object.assign({encode:!0,strict:!0,[s]:!0},e);const n=m(t.url).split("?")[0]||"",a=o.extract(t.url),i=o.parse(a,{sort:!1}),r=Object.assign(i,t.query);let c=o.stringify(r,e);c&&(c=`?${c}`);let l=g(t.url);return t.fragmentIdentifier&&(l=`#${e[s]?d(t.fragmentIdentifier,e):t.fragmentIdentifier}`),`${n}${c}${l}`},o.pick=(t,e,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[s]:!1},n);const{url:a,query:i,fragmentIdentifier:c}=o.parseUrl(t,n);return o.stringifyUrl({url:a,query:r(i,e),fragmentIdentifier:c},n)},o.exclude=(t,e,n)=>{const a=Array.isArray(e)?t=>!e.includes(t):(t,o)=>!e(t,o);return o.pick(t,a,n)}},{"decode-uri-component":1,"filter-obj":2,"split-on-first":4,"strict-uri-encode":5}],4:[function(t,e){"use strict";e.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];const o=t.indexOf(e);return-1===o?[t]:[t.slice(0,o),t.slice(o+e.length)]}},{}],5:[function(t,e){"use strict";e.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)},{}],ApiTool:[function(t,e,o){"use strict";cc._RF.push(e,"b8fa1Acz1tD5ZSWCVi3x62F","ApiTool");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(o,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),Object.defineProperty(e,"instance",{get:function(){return this._instance||(this._instance=new e),this._instance},enumerable:!1,configurable:!0}),e._instance=null,e.avatar="",e.dailyAllNumber=0,e.dailywinNumber=0,e}(cc.Component);o.default=i,cc._RF.pop()},{}],BulletPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"36bd1+aRohPD6vyVZmmE1za","BulletPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/manager/data-manager"),s=t("../../script/tools/str-utils"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.speed=0,e.contentLabel=null,e.header=null,e.border=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setupData=function(t){if(t){var e=t.content;if(e||(e="\u96c4\u8d77"),t.region&&1==t.type)e=t.region+t.content;else if(2==t.type)if(c.default.rankUserInfo)(o=c.default.rankUserInfo.fail)&&0!=o||(o=1),e=s.default.formatStr(t.content,o);else{var o=r.default.randomNum(1,50);e=s.default.formatStr(t.content,o)}this.contentLabel.string=e,1==t.state?this.contentLabel.node.color=new cc.Color(255,246,0):this.contentLabel.node.color=new cc.Color(255,255,255),r.default.setAvatar(this.header,t.avatar),t.isSelf?this.border.active=!0:this.border.active=!1}},i([p({type:cc.Label,tooltip:"\u5185\u5bb9"})],e.prototype,"contentLabel",void 0),i([p({type:cc.Node,tooltip:"\u5934\u50cf"})],e.prototype,"header",void 0),i([p({type:cc.Node,tooltip:"\u8fb9\u6846"})],e.prototype,"border",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/manager/data-manager":"data-manager","../../script/tools/str-utils":"str-utils"}],CcJsFunc:[function(t,e,o){"use strict";cc._RF.push(e,"3f1d9y5Ey5CfqFDLJVTW6yo","CcJsFunc"),Object.defineProperty(o,"__esModule",{value:!0});var n=t("../effect/player-head-atlas"),a=t("./native/audio"),i=t("./sdk"),r=function(){function t(){}return t.shuffle=function(t){for(var e=t.length-1;e>=0;e--){var o=Math.floor(Math.random()*(e+1)),n=t[o];t[o]=t[e],t[e]=n}return t},t.addClickAudio=function(){a.default.playAudioMusic("audio/sound/clickBlock.mp3",!1),i.default.vibrateShort()},t.addbtnTouchStartScale=function(t,e){t.on("touchstart",function(){this.addClickAudio(),cc.tween(t).to(.1,{scale:.9}).start(),e&&e()},this)},t.addbtnTouchEndScale=function(t,e){t.on("touchend",function(o){cc.tween(t).to(.1,{scale:1}).start(),e&&(t.stopAllActions(),t.scale=1,e(o))},this)},t.addbtnTouchCancelScale=function(t,e){t.on("touchcancel",function(){cc.tween(t).to(.1,{scale:1}).start(),e&&e()},this)},t.addTargetTouchUpInside=function(t,e){t.on("touchstart",function(){this.addClickAudio(),cc.tween(t).to(.1,{scale:.9}).start()},this),t.on("touchcancel",function(){cc.tween(t).to(.1,{scale:1}).start()},this),t.on("touchend",function(o){cc.tween(t).to(.1,{scale:1}).start(),e&&(t.stopAllActions(),t.scale=1,e(o))},this)},t.addbtnTouchOriginStartScale=function(t,e){var o=.9,n=.9;t.scaleX<0&&(o=-o),t.scaleY<0&&(n=-n),t.on("touchstart",function(){this.addClickAudio(),cc.tween(t).to(.1,{scaleX:o,scaleY:n}).start(),e&&e()},this)},t.addbtnTouchOriginEndScale=function(t,e){var o=1,n=1;t.scaleX<0&&(o=-o),t.scaleY<0&&(n=-n),t.on("touchend",function(a){cc.tween(t).to(.1,{scaleX:o,scaleY:n}).start(),e&&(t.stopAllActions(),t.scaleX=o,t.scaleY=n,e(a))},this)},t.addbtnTouchOriginCancelScale=function(t,e){var o=1,n=1;t.scaleX<0&&(o=-o),t.scaleY<0&&(n=-n),t.on("touchcancel",function(){cc.tween(t).to(.1,{scaleX:o,scaleY:n}).start(),e&&e()},this)},t.setAnimation=function(t,e,o,n,a){var i=new cc.Node,r=(i.addComponent(cc.Sprite),i.addComponent(cc.Animation));return cc.loader.loadRes(t,cc.SpriteAtlas,function(t,i){if(e)for(var c=[],s=0;s=t.length?(o._loadResIndex=0,e()):o.loadResSpriteFrame(t,e)):cc.loader.loadRes(n,cc.SpriteFrame,function(a,i){a?cc.error("SpriteFrame\u52a0\u8f7d\u9519\u8bef, \u8282\u70b9\u540d: , url: "+n):(o._spriteFrameCache[n]=i,o._loadResIndex++,o._loadResIndex>=t.length?(o._loadResIndex=0,e()):o.loadResSpriteFrame(t,e))})},t.getUrlSpriteFrame=function(t){return this._spriteFrameCache[t]||!1},t.sliceURL=function(t){return/.+(?=\.png)/i.exec(t)[0].slice(10)},t.playFontAnimation=function(t,e,o,n){var a={num:e},i=t.getComponent(cc.Label);cc.tween(t).to(.05,{scale:1.3}).to(.05,{scale:1}).to(.05,{scale:1.3}).to(.05,{scale:1}).repeat(10).start(),i.string=a.num+"";var r=o-e<10?.3:(o-e)/10*.3;r>1&&(r=1),cc.tween(a).to(r,{num:o},{progress:function(t,e,o,a){return i.string=n?n+Math.ceil(t+(e-t)*a)+"":Math.ceil(t+(e-t)*a)+"",t+(e-t)*a}}).call(function(){t.stopAllActions(),t.scale=1}).start()},t.loadWxHeadImgSpriteFrame=function(t,e,o,n,a,i){var r=this;o=o||function(){},this._spriteFrameCache||(this._spriteFrameCache={});var c=t.getComponent(cc.Sprite);c.pp_url=e;var s=this._spriteFrameCache[e];if(s)return c.spriteFrame=s,void o();n&&(c.spriteFrame=null);var l={url:e};cc.loader.load(l,function(t,n){if(t)cc.error("SpriteFrame\u52a0\u8f7d\u9519\u8bef, \u8282\u70b9\u540d: "+c.node.name+", url: "+e);else{var a=new cc.SpriteFrame(n);i instanceof Array&&(a.insetTop=i[0]||0,a.insetBottom=i[1]||0,a.insetLeft=i[2]||0,a.insetRight=i[3]||0),r._spriteFrameCache[e]=a,c.pp_url===e&&(c.spriteFrame=a,o())}})},t.changeWXHeadImgSize=function(t,e){for(var o=t.split("/"),n="",a=0;a=e||t<0?"Jan":e[t]},t.ifHaveNode=function(t,e,o){return t||(t=cc.instantiate(e),o.addChild(t)),t},t.setAvatar=function(t,e,o){var a=this;if(t){var r=t.getComponent(cc.Sprite);if(!e||0==e.length){var c="rank/rank_icon_default.png";return i.default.isPlatform(i.Platform.wx)&&(c="rank/rank_icon_default_wx.png"),void cc.loader.loadRes(c,cc.SpriteFrame,function(t,e){t?console.log("avatar err = "+t):r.spriteFrame=e})}cc.assetManager.loadRemote(e,{ext:".head"},function(e,i){if(o){var c=n.default.instance;cc.isValid(a)&&cc.isValid(t)&&cc.isValid(r)&&(r.spriteFrame=new cc.SpriteFrame(i),o&&!cc.sys.isNative&&c.packToDynamicAtlas(o,r,r.spriteFrame))}else i.packable=!1,r.spriteFrame=new cc.SpriteFrame(i)})}else console.log("setAvatar node \u4e3a\u7a7a")},t.removeAvatar=function(t){t&&t.length&&n.default.instance.deleteInnerTextureByPath(t)},t.setAvatarHolder=function(t,e,o){if(t){var n=t.getComponent(cc.Sprite);if(!e||0==e.length){var a="rank/rank_icon_default.png";return i.default.isPlatform(i.Platform.wx)&&(a="rank/rank_icon_default_wx.png"),o&&(a=o),void cc.loader.loadRes(a,cc.SpriteFrame,function(t,e){t?console.log("avatar err = "+t):n.spriteFrame=e})}}else console.log("setAvatar node \u4e3a\u7a7a")},t}();o.default=r,cc._RF.pop()},{"../effect/player-head-atlas":"player-head-atlas","./native/audio":"audio","./sdk":"sdk"}],CoinEmitterByTime:[function(t,e,o){"use strict";cc._RF.push(e,"d2234O7oOZOV7MTLWcEx96i","CoinEmitterByTime");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("./CoinEmitter"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tickTime=0,e.countMinPerTick=0,e.countMaxPerTick=0,e._timePassed=0,e._timeTick=0,e._timeEnd=0,e}return a(e,t),e.prototype.fire=function(t,e,o){void 0===e&&(e=!1),this._timePassed=0,this._timeEnd=t,this._rndCur=0,this.newNode(e),this._cb=o},e.prototype.update=function(t){if(this._rndCur-a;){var s=o*(n+=.016666666666666666)*Math.sin(e)-this.G*n*n/2;i=s,c.push(s)}var l=new r.YPathCacheData(o,e,c);this._cachePaths.push(l),this._rndCur++}if(this._timePassed+=t,!(this._timePassed>=this._timeEnd)&&(this._timeTick+=t,this._timeTick>=this.tickTime)){this._timeTick=0;for(var u=this.randomInt(this.countMinPerTick,this.countMaxPerTick),p=0;p=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0}),o.CoinEmitter=o.YPathCacheData=void 0;var r=cc._decorator.ccclass,c=cc._decorator.property,s=cc._decorator.menu,l=function(t,e,o){this.v0=t,this.angle=e,this.path=o};o.YPathCacheData=l;var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.G=18e3,e.v0Min=11e3,e.v0Max=21e3,e.angleMin=20,e.angleMax=28,e.scaleStepMin=.065,e.scaleStepMax=.085,e.coinCount=50,e.xMoveStepMin=-18,e.xMoveStepMax=18,e.rotationStepMin=-1.3,e.rotationStepMax=1.3,e.bornOffsetXMin=1,e.bornOffsetXMax=-1,e.bornOffsetYMin=-10,e.bornOffsetYMax=0,e.bornScacle=.5,e.prefab=null,e._coinPool=new cc.NodePool,e._cachePaths=[],e._rndPathCount=100,e._rndCur=0,e._numFlying=0,e}return a(e,t),e.prototype.onLoad=function(){if(!(this._coinPool.size()>=70))for(var t=0;t<70;t++){var e=cc.instantiate(this.prefab);e&&this._coinPool.put(e)}},e.prototype.newNode=function(t){if(void 0===t&&(t=!1),t&&(this._coinPool.clear(),!(this._coinPool.size()>=70)))for(var e=0;e<70;e++){var o=cc.instantiate(this.prefab);o&&this._coinPool.put(o)}},e.prototype.fire=function(t,e,o){void 0===e&&(e=!1),console.log("push=>4"),this.newNode(e),t=t||this.coinCount,this._numFlying=t,this._cb=o;for(var n=0;n=this._rndPathCount)){for(var t=.017453293*this.randomInRange(this.angleMin,this.angleMax),e=this.randomInRange(this.v0Min,this.v0Max),o=0,n=2*cc.visibleRect.height,a=0,i=[];a>-n;){var r=e*(o+=.016666666666666666)*Math.sin(t)-this.G*o*o/2;a=r,i.push(r)}var c=new l(e,t,i);this._cachePaths.push(c),this._rndCur++}},e.prototype._resetNode=function(t){t.scale=0,t.angle=0,t.setPosition(0,0),t.stopAllActions(),this._coinPool.put(t),this._numFlying--,this._numFlying<=0&&this._cb&&this._cb()},e.prototype._runCoin=function(t){var e=this;t.getComponent(cc.Animation).play("",this.randomInRange(0,.7));var o=this.randomInArray(this._cachePaths).path;t.x=this.randomInRange(this.bornOffsetXMin,this.bornOffsetXMax),t.y=this.randomInRange(this.bornOffsetYMin,this.bornOffsetYMax);var n;n=t.x<=0?this.randomInRange(this.xMoveStepMin,0):this.randomInRange(0,this.xMoveStepMax);var a=this.randomInRange(this.rotationStepMin,this.rotationStepMax),i=this.randomInRange(this.scaleStepMin,this.scaleStepMax);t.scale=this.bornScacle;var r=0,c=function(){var s=o[r];r++,t.y=s,t.x+=n,t.scale+=i,t.angle+=a,r>=o.length&&(e._resetNode(t),e.unschedule(c))};this.schedule(c,1/60)},e.prototype.randomInRange=function(t,e){return t+(e-t)*Math.random()},e.prototype.randomInArray=function(t){return t[this.randomInt(0,t.length)]},e.prototype.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t},i([c({type:cc.Integer,tooltip:"\u91cd\u529b\u52a0\u901f\u5ea6"})],e.prototype,"G",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5c0f\u521d\u901f\u5ea6"})],e.prototype,"v0Min",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5927\u521d\u901f\u5ea6"})],e.prototype,"v0Max",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5c0f\u89d2\u5ea6"})],e.prototype,"angleMin",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5927\u89d2\u5ea6"})],e.prototype,"angleMax",void 0),i([c({type:cc.Float,tooltip:"\u6700\u5c0f\u6bcf\u5e27\u7f29\u653e\u589e\u52a0"})],e.prototype,"scaleStepMin",void 0),i([c({type:cc.Float,tooltip:"\u6700\u5927\u6bcf\u5e27\u7f29\u653e\u589e\u52a0"})],e.prototype,"scaleStepMax",void 0),i([c({type:cc.Integer,tooltip:"\u91d1\u5e01\u6570\u91cf"})],e.prototype,"coinCount",void 0),i([c({type:cc.Integer,tooltip:"x\u8f74\u6bcf\u5e27\u6700\u5c0f\u504f\u79fb"})],e.prototype,"xMoveStepMin",void 0),i([c({type:cc.Integer,tooltip:"x\u8f74\u6bcf\u5e27\u6700\u5927\u504f\u79fb"})],e.prototype,"xMoveStepMax",void 0),i([c(cc.Integer)],e.prototype,"rotationStepMin",void 0),i([c(cc.Integer)],e.prototype,"rotationStepMax",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5c0f\u521d\u59cbx\u504f\u79fb"})],e.prototype,"bornOffsetXMin",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5927\u521d\u59cbx\u504f\u79fb"})],e.prototype,"bornOffsetXMax",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5c0f\u521d\u59cby\u504f\u79fb"})],e.prototype,"bornOffsetYMin",void 0),i([c({type:cc.Integer,tooltip:"\u6700\u5927\u521d\u59cby\u504f\u79fb"})],e.prototype,"bornOffsetYMax",void 0),i([c({type:cc.Float,tooltip:"\u521d\u59cb\u7f29\u653e"})],e.prototype,"bornScacle",void 0),i([c(cc.Prefab)],e.prototype,"prefab",void 0),i([r,s("gameModules/common/CoinEmitter")],e)}(cc.Component);o.CoinEmitter=u,cc._RF.pop()},{}],DateManager:[function(t,e,o){"use strict";cc._RF.push(e,"5f103B5zARLaI+1jRcCObQr","DateManager"),Object.defineProperty(o,"__esModule",{value:!0});var n=cc._decorator,a=(n.ccclass,n.property,t("../common/enumConfig")),i=function(){function t(){this.cutType=a.CALENDAR.MONTH;var t=new Date,e=t.getFullYear(),o=t.getMonth(),n=t.getDate();this.nowDate=new Date(e,o,n),this.selDate=new Date(e,o,n)}return t.getInstance=function(){return this.instance||(this.instance=new t),this.instance},t.prototype.isNowMonth=function(t){return this.nowDate.getFullYear()===this.selDate.getFullYear()&&this.nowDate.getMonth()===t},t.prototype.isNowDay=function(t){if(this.nowDate.getFullYear()===this.selDate.getFullYear()&&this.nowDate.getMonth()===this.selDate.getMonth()){if(this.nowDate.getDate()===t)return!0}else if(this.selDate.getDate()==t)return!0;return!1},t.prototype.isOldDay=function(t){if(this.selDate.getFullYear()==this.nowDate.getFullYear()){if(this.nowDate.getMonth()==this.selDate.getMonth()){if(t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.closeBtn=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this))},e.prototype.closeBtnFunc=function(){this.node.active=!1,cc.game.emit("showPop",{popName:"todayRankPop",showPopData:{}})},e.prototype.showPop=function(){this.node.active=!0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),r.default.getPersonalInfo(function(t){if(t&&t.data){var e=t.data.daily_count;s.default.updateFirendCount(e)}})},i([p(cc.Node)],e.prototype,"popNode",void 0),i([p(cc.Node)],e.prototype,"closeBtn",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs"}],FriendSubContextView:[function(t,e,o){"use strict";cc._RF.push(e,"ea1df8KK9tCd5m1ulIYJEp0","FriendSubContextView");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]1334||cc.winSize.height/cc.winSize.width>2)&&(this.globalData.isFullScreen=!0),console.log("isFullScreen",this.globalData.isFullScreen)},t.setGameType=function(e){t.getInstance().gameType=e},t.blacksInfo={blockCurCount:0,blockAllCount:0},t}();o.default=i,cc._RF.pop()},{"../common/enumConfig":"enumConfig"}],PersonalPop:[function(t,e,o){"use strict";cc._RF.push(e,"23eb4oYlzpNJ74t7y6B9QZ/","PersonalPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/sdk"),u=t("../common/spine"),p=t("../common/util"),d=t("../manager/data-manager"),h=t("../manager/DateManager"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.nickName=null,e.registerLabel=null,e.dailyName=null,e.topicName=null,e.dailyCount=null,e.topicCount=null,e.idLabel=null,e.joinName=null,e.joinTime=null,e.failLabel=null,e.failCount=null,e.sheepNameLabel=null,e.spNode=null,e.headerImage=null,e.closeBtn=null,e.saveBtn=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.saveBtn,this.saveBtnFunc.bind(this)),l.default.isPlatform(l.Platform.wx)||l.default.isPlatform(l.Platform.tt)?this.saveBtn.active=!0:this.saveBtn.active=!1,this.saveBtn.active=!1},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.saveBtnFunc=function(){},e.prototype.showPop=function(){this.node.active=!0;var t=this;this.joinTime.node.active=!1,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),r.default.getPersonalInfo(function(e){e&&e.data&&t.setupSubviews(e.data)})},e.prototype.setupSubviews=function(t){if(this.nickName.string=t.nick_name||"",this.idLabel.string="ID:"+t.uid,t.register_time){var e=(f=h.default.getInstance().formatTs(t.register_time))[0]+"\u5e74"+f[1]+"\u6708"+f[2]+"\u65e5";this.registerLabel.string="\u4e8e"+e+"\u8bde\u751f\n\u8fc4\u4eca\u4e3a\u6b62\u6311\u6218 "+t.challenge+" \u6b21"}else this.registerLabel.string="";this.dailyCount.string=t.daily_count,this.topicCount.string=t.topic_count;var o="",n="",a="";if(1==t.today_state){o="sheep/Sheeps",n="skin_00",a="Jump2";for(var i=s.default.getSheepClothesData(),r=0;r=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0}),o.PoolManager=void 0;var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.prefab=[],e.prefabMap={},e.poolMap={},e}var o;return a(e,t),o=e,e.prototype.onLoad=function(){o.instance=this;for(var t=0;t0?o.active=!0:(o=cc.instantiate(this.prefab[e])).active=!0,o}console.log("\u9884\u5236\u4f53\u4e0d\u5b58\u5728\u6216\u672a\u52a0\u8f7d\uff08\u672a\u62d6\u62fd\uff09")},e.prototype.put=function(t){t.active=!1,this.poolMap[t.name+"Pool"].put(t)},i([s(cc.Prefab)],e.prototype,"prefab",void 0),o=i([c],e)}(cc.Component);o.PoolManager=l,cc._RF.pop()},{}],PrivacyPolicy:[function(t,e,o){"use strict";cc._RF.push(e,"83b1cbmnjRKCqtOVxg1KAz1","PrivacyPolicy");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.label=null,e.text="hello",e}return a(e,t),e.prototype.start=function(){},i([s(cc.Node)],e.prototype,"label",void 0),i([s],e.prototype,"text",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],PrivacyUserPop:[function(t,e,o){"use strict";cc._RF.push(e,"2a225F7jMhPWpqoKwvcsBGP","PrivacyUserPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.privacyNode=null,e.userNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.privacyCloseBtnFunc=function(){this.node.active=!1},e.prototype.userCloseBtnFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){this.node.active=!0,this.userNode.active=!1,this.privacyNode.active=!1,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),"user"==t.type?this.userNode.active=!0:this.privacyNode.active=!0},i([s(cc.Node)],e.prototype,"popNode",void 0),i([s(cc.Node)],e.prototype,"privacyNode",void 0),i([s(cc.Node)],e.prototype,"userNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],ScrollMsg:[function(t,e,o){"use strict";cc._RF.push(e,"0e6eb07gOpDPqlpg49sZaei","ScrollMsg");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r,c=cc._decorator,s=c.ccclass,l=c.property;(function(t){t[t.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",t[t.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT"})(r||(r={}));var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.label=null,e.maskNode=null,e.m_speed=100,e.m_xLeftEnd=0,e.m_xRightEnd=0,e.m_yPos=0,e.m_direction=r.LEFT_TO_RIGHT,e}return a(e,t),e.prototype.start=function(){},e.prototype.showMsg=function(t){this.label.string=t.msg,this.m_xRightEnd=this.node.x+this.maskNode.node.width*this.maskNode.node.anchorX,this.m_xLeftEnd=this.node.x-this.maskNode.node.width*this.maskNode.node.anchorX;var e,o=this.label.node.getContentSize();e=this.m_direction===r.LEFT_TO_RIGHT?this.m_xLeftEnd-o.width:this.m_xRightEnd,this.label.node.x=e,this.label.node.y=this.m_yPos},e.prototype.update=function(t){if(this.m_direction===r.LEFT_TO_RIGHT){var e=this.label.node.getContentSize();this.label.node.x>=this.m_xRightEnd&&(this.label.node.x=this.m_xLeftEnd-e.width),this.label.node.x+=this.m_speed*t}else e=this.label.node.getContentSize(),this.label.node.x<=this.m_xLeftEnd-e.width&&(this.label.node.x=this.m_xRightEnd),this.label.node.x-=this.m_speed*t},i([l(cc.Label)],e.prototype,"label",void 0),i([l(cc.Mask)],e.prototype,"maskNode",void 0),i([l({tooltip:"\u6bcf\u79d2\u79fb\u52a8\u591a\u5c11\u50cf\u7d20"})],e.prototype,"m_speed",void 0),i([l({tooltip:"\u6587\u5b57\u6eda\u52a8\u7684\u65b9\u5411\uff0c1\u662f\u4ece\u5de6\u5230\u53f3\uff0c2\u662f\u4ece\u53f3\u5230\u5de6"})],e.prototype,"m_direction",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{}],SpriteWithMaskAssembler:[function(t,e,o){"use strict";cc._RF.push(e,"6b309k9JDND+5aP2ebiAdxw","SpriteWithMaskAssembler");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(o,"__esModule",{value:!0}),o.getSpriteWithMaskAssembler=void 0,o.getSpriteWithMaskAssembler=function(){var t=cc.gfx;return new(function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return a(o,e),Object.defineProperty(o.prototype,"floatsPerVert",{get:function(){return 7},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"colorOffset",{get:function(){return 6},enumerable:!1,configurable:!0}),o.prototype.getVfmt=function(){return o.vfmtPosTowUvColor},o.prototype.getBuffer=function(){if(!o.meshBuffer){var t=cc.renderer._handle;t._SpriteWithMaskBuffer&&console.error("\u7adf\u7136\u5df2\u7ecf\u5b58\u5728 _SpriteWithMaskBuffer \u5bf9\u8c61\u4e86, \u8fd9\u53ef\u80fd\u662f\u4e2a\u4e25\u91cd\u7684 bug!"),o.meshBuffer=t.getBuffer("mesh",this.getVfmt())}return o.meshBuffer},o.prototype.updateRenderData=function(t){this.packToDynamicAtlas(t,t._spriteFrame),t._vertsDirty&&(this.updateUVs(t),this.updateVerts(t),t._vertsDirty=!1)},o.prototype.updateUVs=function(t){for(var e=t._spriteFrame.uv,n=this.uvOffset,a=this.floatsPerVert,i=this._renderData.vDatas[0],r=0;r<4;r++){var c=2*r,s=a*r+n;i[s]=e[c],i[s+1]=e[c+1],i[s+2]=o.uv2[c],i[s+3]=o.uv2[c+1]}},o.prototype.updateVerts=function(t){var e,o,n,a,i=t.node,r=i.width,c=i.height,s=i.anchorX*r,l=i.anchorY*c;if(t.trim)e=-s,o=-l,n=r-s,a=c-l;else{var u=t.spriteFrame,p=u._originalSize.width,d=u._originalSize.height,h=u._rect.width,f=u._rect.height,m=u._offset,g=r/p,y=c/d,v=m.x+(p-h)/2,b=m.x-(p-h)/2;e=v*g-s,o=(m.y+(d-f)/2)*y-l,n=r+b*g-s,a=c+(m.y-(d-f)/2)*y-l}var _=this._local;_[0]=e,_[1]=o,_[2]=n,_[3]=a,this.updateWorldVerts(t)},o.vfmtPosTowUvColor=new t.VertexFormat([{name:t.ATTR_POSITION,type:t.ATTR_TYPE_FLOAT32,num:2},{name:t.ATTR_UV0,type:t.ATTR_TYPE_FLOAT32,num:4},{name:t.ATTR_COLOR,type:t.ATTR_TYPE_UINT8,num:4,normalize:!0}]),o.uv2=[0,1,1,1,0,0,1,0],o}(cc.Assembler2D))},cc._RF.pop()},{}],SpriteWithMask:[function(t,e,o){"use strict";cc._RF.push(e,"16615oSi4lB+Y7u7Tdx2332","SpriteWithMask");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0}),o.SpriteWithMask=void 0;var r=t("./SpriteWithMaskAssembler"),c=cc._decorator,s=c.ccclass,l=(c.property,c.menu),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.onLoad=function(){var e;null===(e=t.prototype.onLoad)||void 0===e||e.call(this),this.type,cc.Sprite.Type.SIMPLE},e.prototype._resetAssembler=function(){this.setVertsDirty(),this._assembler=r.getSpriteWithMaskAssembler(),this._assembler.init(this)},i([s(),l("2D/SpriteWithMask")],e)}(cc.Sprite);o.SpriteWithMask=u,cc._RF.pop()},{"./SpriteWithMaskAssembler":"SpriteWithMaskAssembler"}],TodayRankPop:[function(t,e,o){"use strict";cc._RF.push(e,"3c9ecBLnyBEtad8HHAyJf0H","TodayRankPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.closeBtn=null,e.friendBtn=null,e.shareBtn=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.friendBtn,this.friendBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.shareBtn,this.shareBtnFunc.bind(this))},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.friendBtnFunc=function(){this.node.active=!1,console.log("\u597d\u53cb\u6392\u884c\u699c"),cc.game.emit("showPop",{popName:"friendRankPop",showPopData:{}})},e.prototype.shareBtnFunc=function(){console.log("\u5206\u4eab\u670b\u53cb\u5708")},e.prototype.showPop=function(){this.node.active=!0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),r.default.getUserRankInfo(function(t){if(0==t.err_code&&t.data&&t.data.user){var e=t.data.user.fail,o=t.data.user.state;1==o?s.default.updateTodayCount(o,"win"):s.default.updateTodayCount(e,"fail")}},function(){console.log("###### fail ######"),s.default.updateTodayCount(0,"fail")})},i([p(cc.Node)],e.prototype,"popNode",void 0),i([p(cc.Node)],e.prototype,"closeBtn",void 0),i([p(cc.Node)],e.prototype,"friendBtn",void 0),i([p(cc.Node)],e.prototype,"shareBtn",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs"}],TodaySubContextView:[function(t,e,o){"use strict";cc._RF.push(e,"6f5a44uIwZLR54OKfk5cZc9","TodaySubContextView");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=1063?qg.login().then(function(e){console.log(e),e.data.token?(console.log("\u5f53\u524d\u7528\u6237\u4fe1\u606f: "+JSON.stringify(e)),e.data&&l.default.post({url:"/sheep/v1/user/login_vivos",data:{token:e.data.token},success:function(e){if(t(),console.log("login_vivos res: ",JSON.stringify(e)),0==e.err_code&&e.data){console.log("res.data.uid: ",e.data.uid);var o=c.default.getUserData();o.userID=e.data.uid+"",o.openid=e.data.openid,o.token=e.data.token,c.default.saveUserData(o),u.default.user.uid=Number(o.userID),console.log("userData: ",o.userID)}},fail:function(){t()}})):t()},function(e){console.log("\u767b\u5f55\u5931\u8d25"+JSON.stringify(e)),t()}):t()})},e.requestUserInfo=function(){return i(this,void 0,Promise,function(){return r(this,function(){return[2,new Promise(function(t){l.default.get({url:"/sheep/v1/game/user_info",params:{uid:c.default.getUserData().userID},success:function(e){t(),console.log("user_info res: ",JSON.stringify(e)),0==e.err_code&&e.data&&(u.default.user.uid=e.data.uid,u.default.user.avatar=e.data.avatar,u.default.user.gender=e.data.gender,u.default.user.openId=e.data.openId,cc.game.emit(s.EMITKEY.USERINFOSUCCESS))},fail:function(){t()}})})]})})},e.requestRankUserInfo=function(){return i(this,void 0,Promise,function(){return r(this,function(){return[2,new Promise(function(t){l.default.get({url:"/sheep/v1/game/user_rank_info",params:{uid:c.default.getUserData().userID},success:function(e){t(),console.log("\u83b7\u53d6\u6392\u884c\u7528\u6237\u4fe1\u606f ### = ",JSON.stringify(e)),0==e.err_code&&e.data&&e.data.user&&(u.default.rankUserInfo=e.data.user,u.default.region=e.data.region,console.log("\u83b7\u53d6\u6392\u884c\u7528\u6237\u4fe1\u606f rankUserInfo ### = ",JSON.stringify(u.default.rankUserInfo)),cc.game.emit(s.EMITKEY.RANKUSERINFOSUCCESS))},fail:function(e){console.log("\u83b7\u53d6\u6392\u884c\u7528\u6237\u4fe1\u606f err = ",e),t()}})})]})})},e.getUserRankInfo=function(t,e){l.default.get({url:"/sheep/v1/game/user_rank_info",params:{uid:c.default.getUserData().userID},success:function(o){0==o.err_code?t&&t(o):(console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25"),e&&e())},fail:function(){e&&e()}})},e.getBulletData=function(t){l.default.get({url:"/sheep/v1/game/get_bullet",success:function(e){0==e.err_code?t&&t(e.data):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")}})},e.getRankInfoData=function(t){l.default.get({url:"/sheep/v1/game/rank_info",success:function(e){0==e.err_code?t&&t(e):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.getStageInfoData=function(t){l.default.get({url:"/sheep/v1/game/rank_stage_info",success:function(e){console.log("state_info result = "+JSON.stringify(e)),0==e.err_code?t&&t(e):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.gameOver=function(t,e){l.default.get({url:"/sheep/v1/game/game_over",params:t,success:function(t){console.log("game_over result = "+JSON.stringify(t)),0==t.err_code&&e&&e(t)}})},e.getTopicData=function(t){return i(this,void 0,Promise,function(){return r(this,function(){return[2,new Promise(function(e){l.default.get({url:"/sheep/v1/game/get_topic",params:{uid:c.default.getUserData().userID},success:function(o){e(),console.log("get_topic ### = ",JSON.stringify(o)),0==o.err_code&&(u.default.topicModel=o.data,t&&t(o),cc.game.emit(s.EMITKEY.TOPICACCOUNT))},fail:function(){e()}})})]})})},e.joinTopic=function(t,e){l.default.get({url:"/sheep/v1/game/topic_join",params:t,success:function(t){console.log("topic_join ### = ",JSON.stringify(t)),0==t.err_code&&e&&e(t)},fail:function(t){console.log("topic_join err = ",t)}})},e.topicGameOver=function(t,e){l.default.get({url:"/sheep/v1/game/topic_game_over",params:t,success:function(t){console.log("game_over result = "+JSON.stringify(t)),0==t.err_code&&e&&e(t)}})},e.topicRankInfo=function(t){return i(this,void 0,Promise,function(){return r(this,function(){return[2,new Promise(function(e){l.default.get({url:"/sheep/v1/game/topic_rank",params:{},success:function(o){e(),0==o.err_code&&(u.default.topicRankInfo=o.data,t&&t(o),cc.game.emit(s.EMITKEY.TOPICRANKINFO))},fail:function(){e()}})})]})})},e.getTopicUserInfo=function(t,e){l.default.get({url:"/sheep/v1/game/topic_user_info",params:{uid:t},success:function(t){0==t.err_code?e&&e(t):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.getMatchResult=function(t,e){l.default.get({url:"/sheep/v1/game/topic_match_info",params:{type:t,uid:c.default.getUserData().userID},success:function(t){0==t.err_code?e&&e(t):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.updateUserSkin=function(t,e){l.default.get({url:"/sheep/v1/game/update_user_skin",params:{skin:t},success:function(t){0==t.err_code?e&&e(t):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e.getPersonalInfo=function(t){l.default.get({url:"/sheep/v1/game/personal_info",params:{},success:function(e){0==e.err_code?t&&t(e):console.log("\u8bfb\u53d6\u6570\u636e\u5931\u8d25")},fail:function(){}})},e}(cc.Component);o.default=p,cc._RF.pop()},{"../../script/manager/data-manager":"data-manager","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/sdk":"sdk"}],audio:[function(t,e,o){"use strict";cc._RF.push(e,"3d3f9s4k+9DLLd0qVZ7eBqp","audio"),Object.defineProperty(o,"__esModule",{value:!0});var n=t("../../manager/GameManager"),a=t("../dataTs"),i=t("../enumConfig"),r=function(){function t(){}return t.updateAudioStatus=function(){this._playingMusicName&&this.playAudioMusic(this._playingMusicName,!0)},t.playBGM=function(){if(this.setupData=a.default.getUserSetupData(),console.log(this.setupData.musicStatus),this.setupData.musicStatus<0)cc.audioEngine.stopAll();else{var e="audio/music/game_cycle.mp3";n.default.getInstance().gameType==i.GAMETYPE.GAMEMAIN?e="audio/music/main_music.mp3":n.default.getInstance().gameType==i.GAMETYPE.GAMEDAILY?e="audio/music/game_cycle.mp3":n.default.getInstance().gameType==i.GAMETYPE.GAMETOMB?e="audio/music/game_cycle.mp3":n.default.getInstance().gameType==i.GAMETYPE.GAMETOPIC&&(e="audio/music/game_cycle.mp3"),console.log("\u97f3\u4e50 ###### = ",e),console.log("gameType ###### = ",n.default.getInstance().gameType),t.playAudioMusic(e,!0)}},t.playAudioMusic=function(t,e){this.setupData=a.default.getUserSetupData();var o=this,n=null;this._bgMusicClip||(this._bgMusicClip={}),this._audioClip||(this._audioClip={}),this._playingMusicName||(this._playingMusicName=""),this.setupData.musicStatus<0&&e?cc.audioEngine.stopAll():this.setupData.effectStatus<0&&!e||(e?(this._playingMusicName==t&&console.log("\u540c\u4e00\u4e2a\u97f3\u4e50"),cc.audioEngine.stopAll(),n=!!this._bgMusicClip&&this._bgMusicClip[t],this._playingMusicName=t):n=!!this._audioClip&&this._audioClip[t],n?e?cc.audioEngine.playMusic(n,e):cc.audioEngine.playEffect(n,!1):o.loadPlayAudioEngine(t,e,function(t){var n=null;e?o._playingMusicName==t&&(n=o._bgMusicClip[t],cc.audioEngine.playMusic(n,e)):(n=o._audioClip[t],cc.audioEngine.playEffect(n,!1))}))},t.resumeAllAudio=function(e){var o=this._playingMusicName,n=!!this._bgMusicClip&&this._bgMusicClip[o];n?(cc.audioEngine.stopAll(),cc.audioEngine.play(n,!0,1)):e&&t.playAudioMusic(e,!0)},t.loadPlayAudioEngine=function(t,e,o){o=o||function(){};var n=this;cc.loader.loadRes(t,function(a,i){a||(e?n._bgMusicClip[t]=i:n._audioClip[t]=i,o(t))})},t.audioLocalName="audioLocal",t._bgMusicClip={},t._playingMusicName="",t._audioClip={},t.setupData=null,t}();o.default=r,cc._RF.pop()},{"../../manager/GameManager":"GameManager","../dataTs":"dataTs","../enumConfig":"enumConfig"}],blockArea:[function(t,e,o){"use strict";cc._RF.push(e,"abca32Q32NKQIkl20gPemwL","blockArea");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blockEditorPrefab=null,e}return a(e,t),e.prototype.start=function(){},i([s(cc.Prefab)],e.prototype,"blockEditorPrefab",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],blockEditorPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"5c0a1NoiWZPf7dwBgQqTPdJ","blockEditorPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.layerNumber=null,e.blockImg=null,e.moldTypeText=null,e.rolNum=0,e.rowNum=0,e.layerIndex=0,e.moldType=0,e.deleteCallback=null,e}return a(e,t),e.prototype.start=function(){this.node.on(cc.Node.EventType.TOUCH_END,this.deleteBlock,this)},e.prototype.setBlockLayerNum=function(t,e,o,n,a){this.rolNum=t,this.rowNum=e,this.layerIndex=o,this.moldType=n,2==this.moldType?this.moldTypeText.active=!0:this.moldTypeText.active=!1,this.deleteCallback=a,this.layerNumber.node.active=!0,this.layerNumber.string=""+this.layerIndex},e.prototype.setBlockImgType=function(t,e){if(this.moldType=e,2==this.moldType?this.moldTypeText.active=!0:this.moldTypeText.active=!1,0==t)this.blockImg.active=!1;else{this.blockImg.active=!0;var o="block/block_"+t+".png";r.default.changeSpriteFrame(this.blockImg,o)}},e.prototype.deleteBlock=function(){this.deleteCallback&&this.deleteCallback(this.rolNum,this.rowNum,this.layerIndex)},i([l(cc.Label)],e.prototype,"layerNumber",void 0),i([l(cc.Node)],e.prototype,"blockImg",void 0),i([l(cc.Node)],e.prototype,"moldTypeText",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],blockPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"163e04v/WJMCIjkhalOEqNm","blockPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/common/enumConfig"),s=t("../../script/common/native/audio"),l=t("../../script/common/sdk"),u=t("../../script/common/util"),p=t("../../script/manager/data-manager"),d=t("../../script/manager/GameManager"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blockImgBg=null,e.blockImg=null,e.blackMaskNode=null,e.rollAreaNode=null,e.rollContent=null,e.rollBlockNode=null,e.isShowLight=!1,e.isChoosed=!1,e.cardDataObj=null,e.newScale=1,e.touchCallback=null,e.isRotating=!1,e.circleCenter=cc.v2(0,0),e.circleRadius=0,e.circleRadiusMax=250,e.circleRadiusMin=250,e.addCircleLength=3,e.subCircleLength=-10,e.nowMoveInTimes=0,e.moveInTimes=15,e.rotationTimes=80,e.radian=0,e.radianMin=0,e.radianAdd=0,e.addRadianOnce=0,e.rotateParentComp=null,e.rotateOldPosition=null,e.touchCancelCallback=null,e}return a(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){this.node.on("touchstart",this.touchStart,this),this.node.on("touchend",this.touchEnd,this),this.node.on("touchcancel",this.touchCancel,this)},e.prototype.addBlockNode=function(t,e,o){this.isChoosed=!0,this.isShowLight=!0,this.blackMaskNode.active=!1,this.cardDataObj=t,this.touchCallback=e,this.touchCancelCallback=o||function(){},this.newScale=this.node.scale;var n=this.getBlockName(this.cardDataObj.type);r.default.changeSpriteFrame(this.blockImg,n),2==this.cardDataObj.moldType&&(this.blockImg.active=!1)},e.prototype.getBlockName=function(t){var e="block/block_"+t+".png";return p.default.topicModel&&d.default.getInstance().gameType==c.GAMETYPE.GAMETOPIC&&(1==p.default.topicModel.id?e="block/zombie/block_"+t+".png":2==p.default.topicModel.id?e="block/werewolf/block_"+t+".png":3==p.default.topicModel.id?e="block/man/block_"+t+".png":4==p.default.topicModel.id?e="block/autumn/block_"+t+".png":5==p.default.topicModel.id?e="block/teacher/block_"+t+".png":6==p.default.topicModel.id?e="block/autumn/block_"+t+".png":7==p.default.topicModel.id&&(e="block/teacher/block_"+t+".png")),e},e.prototype.getType=function(){return this.cardDataObj.type},e.prototype.getCardObj=function(){var t=!0;return this.isShowLight&&!this.isChoosed||(t=!1),{cardDataObj:this.cardDataObj,isCanMove:t}},e.prototype.updateBlockNodeData=function(t,e,o){this.isChoosed=!0,this.isShowLight=!0,this.blackMaskNode.active=!1,this.cardDataObj=t,this.touchCallback=e,this.newScale=this.node.scale,this.touchCancelCallback=o||function(){}},e.prototype.touchStart=function(t){t.stopPropagation(),this.isShowLight&&!this.isChoosed&&(l.default.vibrateShort(),this.newScale=this.node.scale,cc.game.emit(c.EMITKEY.SHOWMASKLAYER,2),s.default.playAudioMusic("audio/sound/clickBlock.mp3",!1),cc.tween(this.node).to(.1,{scale:1.4*this.newScale}).start(),this.node.setSiblingIndex(1e4))},e.prototype.touchEnd=function(t){t.stopPropagation(),this.isShowLight&&!this.isChoosed&&(cc.game.emit(c.EMITKEY.HIDEMASKLAYER,1),this.touchCallback&&this.touchCallback(this))},e.prototype.touchCancel=function(t){t.stopPropagation(),this.isShowLight&&!this.isChoosed&&(cc.game.emit(c.EMITKEY.HIDEMASKLAYER,6),cc.tween(this.node).to(.1,{scale:this.newScale}).start(),this.touchCancelCallback&&this.touchCancelCallback())},e.prototype.playRandomBlockAnimate=function(){if(2==this.cardDataObj.moldType&&this.isShowLight){var t=this;s.default.playAudioMusic("audio/sound/blockRandom.mp3",!1);var e=this.cardDataObj.type;this.rollAreaNode.active=!0;for(var o=[],n=[],a=0;a<12;a++){var i=u.default.rnd(1,8);o.push(i)}o.push(e);var c=u.default.rnd(1,8);o.push(c);var l=.5*(12*this.rollBlockNode.height+200);this.rollContent.y=l,this.rollContent.scale=.5;for(var p=0;pthis.rotationTimes+this.moveInTimes)return this.unschedule(this.circleMove),void this.moveOldPosition();this.circleRadius0?n>=0?Math.atan(i):2*Math.PI-Math.atan(i):n>=0?Math.PI-Math.atan(i):Math.PI+Math.atan(i)}else a=n>0?Math.PI/2:-Math.PI/2;return 180*a/Math.PI},i([m(cc.Node)],e.prototype,"blockImgBg",void 0),i([m(cc.Node)],e.prototype,"blockImg",void 0),i([m(cc.Node)],e.prototype,"blackMaskNode",void 0),i([m(cc.Node)],e.prototype,"rollAreaNode",void 0),i([m(cc.Node)],e.prototype,"rollContent",void 0),i([m(cc.Node)],e.prototype,"rollBlockNode",void 0),i([m(cc.Node)],e.prototype,"isShowLight",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/enumConfig":"enumConfig","../../script/common/native/audio":"audio","../../script/common/sdk":"sdk","../../script/common/util":"util","../../script/manager/GameManager":"GameManager","../../script/manager/data-manager":"data-manager"}],brickPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"713faAfsa9BN4dPx/ixKnJX","brickPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../itemSub/brickSubPrefab"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.brickSubPrefab=null,e.base_title_label=null,e.parentNode=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setNodeData=function(t,e){for(var o in this.parentNode=e,this.nodeData=t,this.base_title_label.string="- "+this.nodeData.name+" -",this.nodeData.brickArr){var n=cc.instantiate(this.brickSubPrefab);n.getComponent(l.default).setNodeData(this.nodeData.brickArr[o],this),this.content.addChild(n)}},e.prototype.refreshNode=function(t,e){this.parentNode=e,this.nodeData=t;var o=this.content.children;for(var n in o)o[n].getComponent(l.default).setNodeData(this.nodeData.brickArr[n],this)},i([s(cc.Node)],e.prototype,"content",void 0),i([s(cc.Prefab)],e.prototype,"brickSubPrefab",void 0),i([s(cc.Label)],e.prototype,"base_title_label",void 0),i([c],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../itemSub/brickSubPrefab":"brickSubPrefab"}],brickSubPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"d9565mv5uxJ9q8a8EOWqngx","brickSubPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/manager/GameManager"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgContent=null,e.imgContentSub=null,e.imgLock=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.node,this.clickNodeAction.bind(this))},e.prototype.clickNodeAction=function(){r.default.addClickAudio()},e.prototype.rewardNodeData=function(t){this.imgLock.active=!1,this.imgContent.active=!0;var e="block/block_"+t+".png";r.default.changeSpriteFrame(this.imgContentSub,e),this.imgContent.getChildByName("mark").active=!1},e.prototype.setNodeData=function(t){this.nodeData=t;var e="block/block_"+t.itemId+".png";r.default.changeSpriteFrame(this.imgContentSub,e),1==t.unlock?(this.imgContent.active=!0,this.imgLock.active=!1):(this.imgContent.active=!1,this.imgLock.active=!0),c.default.getInstance().collectionMark.brickNum==t.itemId?(this.imgContent.getChildByName("mark").active=!0,c.default.getInstance().collectionMark.brickNum=0):this.imgContent.getChildByName("mark").active=!1},i([u(cc.Node)],e.prototype,"imgContent",void 0),i([u(cc.Node)],e.prototype,"imgContentSub",void 0),i([u(cc.Node)],e.prototype,"imgLock",void 0),i([l],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/manager/GameManager":"GameManager"}],brickSv:[function(t,e,o){"use strict";cc._RF.push(e,"0fd69rlRCBO6pXp78mPsOUw","brickSv");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../common/dataTs"),u=t("../../../pre/item/brickPrefab"),p=t("../../../i18n/i18n"),d=t("../../../i18n/gd_language"),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.brickPrefab=null,e.pictureData=null,e.dataArray=[],e}return a(e,t),e.prototype.start=function(){for(var t in this.content.removeAllChildren(),this.parserData(),this.dataArray){var e=cc.instantiate(this.brickPrefab);e.getComponent(u.default).setNodeData(this.dataArray[t],this),this.content.addChild(e)}},e.prototype.onEnable=function(){this.dataArray.length>0&&this.refreshSubNode()},e.prototype.parserData=function(){this.pictureData=l.default.getPictureData();var t=l.default.gameConfigData.baseConfigData.pictureData.brickMaxNum,e=this.pictureData.brickNum;e>=t&&(e=t);var o=[];this.dataArray=[];for(var n=0;ne-1?0:1;if(o.push({itemId:n+1,unlock:a}),o.length>=5||n==t-1){for(var i=5-o.length,r=0;r=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../../script/manager/data-manager"),s=t("../tools/str-utils"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.bgSprite=null,e.descNode=null,e.clickBtn=null,e.failSF=null,e.winSF=null,e.showData=null,e.callback=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.clickBtn,this.clickBtnFunc.bind(this))},e.prototype.clickBtnFunc=function(){if(this.callback){var t=this.showData.data;this.callback(t)}},e.prototype.showSubData=function(t,e){this.showData=t,this.callback=e;var o=t.data,n=o.content;if(c.default.region&&1==o.type)n=c.default.region+o.content;else if(2==o.type&&c.default.rankUserInfo){var a=c.default.rankUserInfo.fail;a&&0!=a||(a=1),n=s.default.formatStr(o.content,a)}this.descNode.getComponent(cc.Label).string=n,1==t.type?(this.bgSprite.spriteFrame=this.winSF,this.descNode.color=new cc.Color(0,0,0)):(this.bgSprite.spriteFrame=this.failSF,this.descNode.color=new cc.Color(255,255,255))},i([p(cc.Sprite)],e.prototype,"bgSprite",void 0),i([p(cc.Node)],e.prototype,"descNode",void 0),i([p(cc.Node)],e.prototype,"clickBtn",void 0),i([p(cc.SpriteFrame)],e.prototype,"failSF",void 0),i([p(cc.SpriteFrame)],e.prototype,"winSF",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../../script/manager/data-manager":"data-manager","../common/CcJsFunc":"CcJsFunc","../tools/str-utils":"str-utils"}],"bullet-screen-pop":[function(t,e,o){"use strict";cc._RF.push(e,"a8b16hoKXVDjrSvCkcW6JEW","bullet-screen-pop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/enumConfig"),l=t("../common/sdk"),u=t("../manager/GameManager"),p=t("../../script/manager/data-manager"),d=t("../sub/bullet-item"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.closeBtn=null,e.contentNode=null,e.buttleItemNode=null,e.bulletsWin=[],e.bulletsFail=[],e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.mask,this.maskFunc.bind(this)),r.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),this.buttleItemNode.active=!1},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.maskFunc=function(){this.node.active=!1},e.prototype.showPop=function(){this.node.active=!0,this.bulletsWin=p.default.bulletsWin,this.bulletsFail=p.default.bulletsFail,p.default.rankUserInfo&&1==p.default.rankUserInfo.state?this.setupSubviews(this.bulletsWin,1):this.setupSubviews(this.bulletsFail,2)},e.prototype.setupSubviews=function(t,e){var o=this;this.contentNode.removeAllChildren();for(var n=0;n=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/api/api-sheep"),c=t("../../script/common/CcJsFunc"),s=t("../../script/common/enumConfig"),l=t("../../script/manager/PoolManager"),u=t("../../script/manager/data-manager"),p=t("../../pre/effect/BulletPrefab"),d=cc._decorator,h=d.ccclass,f=(d.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.bulletsCurrent=[],e.bulletsArray=[],e.timer=0,e}return a(e,t),e.prototype.start=function(){cc.game.on(s.EMITKEY.RANKUSERINFOSUCCESS,this.rankUserInfoFunc,this),cc.game.on(s.EMITKEY.BULLETSEND,this.bulletSendFunc,this),this.schedule(this.requestBulletData,60,1e4,1)},e.prototype.bulletSendFunc=function(t){for(var e={},o=0;o\u5f39\u5e55"),this.setDataInfo(e)):(console.log("\u7f13\u5b58\u6570\u636e\u8fc7\u671f->\u5f39\u5e55"),r.default.getBulletData(function(e){e&&(t.setDataInfo(e),u.default.setBulletData(e))}))},e.prototype.setDataInfo=function(t){this.bulletsCurrent=t,this.showBullets()},e.prototype.spawnBullets=function(){for(var t=this,e=this,o=this.randomBullet(),n=0;n=3&&(this.timer=0,this.showBullets())},e.prototype.showBullets=function(){0!=this.bulletsArray.length&&4!=this.bulletsArray.length||(console.log("\u518d\u6b21\u521b\u5efa\u5f39\u5e55 ### "+this.bulletsArray.length),this.spawnBullets())},i([h],e)}(cc.Component));o.default=f,cc._RF.pop()},{"../../pre/effect/BulletPrefab":"BulletPrefab","../../script/api/api-sheep":"api-sheep","../../script/common/CcJsFunc":"CcJsFunc","../../script/common/enumConfig":"enumConfig","../../script/manager/PoolManager":"PoolManager","../../script/manager/data-manager":"data-manager"}],"calendar-item":[function(t,e,o){"use strict";cc._RF.push(e,"312273bidZPd4yxEMIojF1F","calendar-item");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../common/dataTs"),u=t("../../common/enumConfig"),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgEnd=null,e.imgStart=null,e.imgWin=null,e.descNode=null,e.nodeData=null,e.parentNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setNodeData=function(t){this.nodeData=t,this.descNode.getComponent(cc.Label).string=String(t.day),this.show(t.type)},e.prototype.getNodeData=function(){return this.nodeData},e.prototype.isWin=function(){var t=this.nodeData.date.split("-");if(t.length>=3){var e=""+t[0]+t[1],o=""+t[0]+t[1]+t[2],n=l.default.getUserData().dailyData,a=this.nodeData.type==u.CALENDARITEM.ITEMOLD||this.nodeData.type==u.CALENDARITEM.ITEMNOW;if(n&&n[e]&&n[e][o]&&n[e][o].isWin&&a)return!0}return!1},e.prototype.show=function(t){void 0===t&&(t=u.CALENDARITEM.ITEMFUTURE),this.showBackground(t),this.isWin()&&(this.imgEnd.active=!1,this.imgStart.active=!1,this.imgWin.active=!0,this.descNode.color=(new cc.Color).fromHEX("58BF3A"))},e.prototype.showBackground=function(t){switch(this.imgEnd.active=!1,this.imgStart.active=!1,this.imgWin.active=!1,this.descNode.active=!0,this.descNode.color=(new cc.Color).fromHEX("#661C1C"),t){case u.CALENDARITEM.ITEMLAST:this.descNode.active=!1;break;case u.CALENDARITEM.ITEMOLD:this.imgEnd.active=!0;break;case u.CALENDARITEM.ITEMNOW:this.imgEnd.active=!0,this.imgStart.active=!0,this.descNode.color=(new cc.Color).fromHEX("#FFFFFF");break;case u.CALENDARITEM.ITEMFUTURE:this.descNode.color=(new cc.Color).fromHEX("#BBADAD");break;case u.CALENDARITEM.ITEMNEXT:this.descNode.active=!1,this.descNode.color=(new cc.Color).fromHEX("#BBADAD");break;case u.CALENDARITEM.ITEMNOR:this.imgEnd.active=!0,this.imgStart.active=!1,this.imgWin.active=!1;break;case u.CALENDARITEM.ITEMSELE:this.imgEnd.active=!1,this.imgStart.active=!0,this.imgWin.active=!1,this.descNode.color=(new cc.Color).fromHEX("#FFFFFF");break;case u.CALENDARITEM.ITEMSUC:this.imgEnd.active=!1,this.imgStart.active=!1,this.imgWin.active=!0,this.descNode.color=(new cc.Color).fromHEX("58BF3A")}},i([s(cc.Node)],e.prototype,"imgEnd",void 0),i([s(cc.Node)],e.prototype,"imgStart",void 0),i([s(cc.Node)],e.prototype,"imgWin",void 0),i([s(cc.Node)],e.prototype,"descNode",void 0),i([c],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig"}],"cat-house-progress":[function(t,e,o){"use strict";cc._RF.push(e,"a832bZG8ctCkbykfAYO9amD","cat-house-progress");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/CcJsFunc"),c=t("../../common/dataTs"),s=t("../../common/enumConfig"),l=t("../../common/spine"),u=t("../../main/houseLayer"),p=t("../../main/mainCultivateLayer"),d=t("../../pop/unlock-build-pop"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainCultivateLayer=null,e.mainUILayer=null,e.houseLayer=null,e.progressMain=null,e.progressNode=null,e.receiveNode=null,e.newCatNode=null,e.titleLabel=null,e.progressBar=null,e.progressLabel=null,e.boxNode=null,e.boxMark=null,e.clawSpine=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(s.EMITKEY.MAINUPDATEUI,this.updateSubUI,this),cc.game.on(s.EMITKEY.UPDATETABBARSEND,this.updateTabbar,this),r.default.addbtnTouchStartScale(this.node),r.default.addbtnTouchEndScale(this.node,this.catProgressFunc.bind(this)),r.default.addbtnTouchCancelScale(this.node),this.updateSubUI()},e.prototype.updateSubUI=function(){var t=this;if(this.updateProgress(),1==c.default.currentHouseUnlockAll()&&(c.default.haveNewHouseUnlock()?this.boxMark.active=!0:this.boxMark.active=!1,"1"==cc.sys.localStorage.getItem("unlockNewHouse")?this.unlockNewHouseFunc():this.receiveBox()),this.clawSpine.active=!1,!cc.sys.localStorage.getItem("unlockClawCache")){var e=c.default.getUserData();e.fish>=2&&e.playLevelId<10&&(this.clawSpine.active=!0,this.clawSpine.getComponent(l.default).play("6Pa",0,function(){t.clawSpine.active=!1}),cc.sys.localStorage.setItem("unlockClawCache",1))}},e.prototype.updateTabbar=function(t){t==s.MAINPAGE.PAGEMAIN&&(this.clawSpine.active=!1)},e.prototype.catProgressFunc=function(){if("1"==cc.sys.localStorage.getItem("unlockNewHouse"))return c.default.haveNewHouseUnlock()?(this.mainCultivateLayer.getComponent(p.default).unlockNewHouse(),void cc.sys.localStorage.setItem("unlockNewHouse","0")):(console.log("\u623f\u5c4b\u5df2\u5168\u90e8\u89e3\u9501"),void cc.game.emit("showMainTips","Waiting for new houses to be built!"));if(1==c.default.currentHouseUnlockAll())return c.default.getHourseUnlockData(),this.mainUILayer.getChildByName("unlock-build-pop").getComponent(d.default).showGetRemoveProp(),this.unlockNewHouseFunc(),void cc.sys.localStorage.setItem("unlockNewHouse","1");cc.game.emit(s.EMITKEY.UPDATETABBARRECEIVE,1);var t=c.default.getHourseUnlockData();t&&(t.length<=4?this.houseLayer.getComponent(u.default).moveWithRoomId(s.ROOMTYPE.ROOMONE):4=e[e.length-1][0].fish),this.titleLabel.string="\u732b\u5c4b"+e.length;var o=e[e.length-1],n=0;for(var a in o)o[a].unlock&&n++;this.progressLabel.string=n+"/"+o.length,this.progressBar.getComponent(cc.Sprite).fillRange=n/o.length}else this.boxMark.active=!1},e.prototype.receiveBox=function(){this.progressNode.active=!1,this.newCatNode.active=!1,this.receiveNode.active=!0},e.prototype.unlockNewHouseFunc=function(){this.progressMain.active=!1,this.newCatNode.active=!0,c.default.haveNewHouseUnlock()?this.newCatNode.getComponent(cc.Label).string="\u89e3\u9501\u65b0\u623f\u5c4b":this.newCatNode.getComponent(cc.Label).string="\u5df2\u5168\u90e8\u89e3\u9501"},i([m(cc.Node)],e.prototype,"mainCultivateLayer",void 0),i([m(cc.Node)],e.prototype,"mainUILayer",void 0),i([m(cc.Node)],e.prototype,"houseLayer",void 0),i([m(cc.Node)],e.prototype,"progressMain",void 0),i([m(cc.Node)],e.prototype,"progressNode",void 0),i([m(cc.Node)],e.prototype,"receiveNode",void 0),i([m(cc.Node)],e.prototype,"newCatNode",void 0),i([m(cc.Label)],e.prototype,"titleLabel",void 0),i([m(cc.Node)],e.prototype,"progressBar",void 0),i([m(cc.Label)],e.prototype,"progressLabel",void 0),i([m(cc.Node)],e.prototype,"boxNode",void 0),i([m(cc.Node)],e.prototype,"boxMark",void 0),i([m(cc.Node)],e.prototype,"clawSpine",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/spine":"spine","../../main/houseLayer":"houseLayer","../../main/mainCultivateLayer":"mainCultivateLayer","../../pop/unlock-build-pop":"unlock-build-pop"}],catClawPrefabs:[function(t,e,o){"use strict";cc._RF.push(e,"d608do4PQpDxZoRa+u6of6d","catClawPrefabs");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/spine"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.catClaw=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.playClawAnimation=function(){var t=this;t.node.active=!0,this.node.scale=.8,this.catClaw.getComponent(r.default).play("6Pa",0,function(){t.node.active=!1})},i([l(cc.Node)],e.prototype,"catClaw",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/spine":"spine"}],catNode:[function(t,e,o){"use strict";cc._RF.push(e,"576facriHVLQ5wzTbqa6xlT","catNode");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/dataTs"),c=t("../common/spine"),s=cc._decorator,l=s.ccclass,u=(s.property,function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.catId=0,e.parentComp=null,e.touchStartPoint=null,e.touchEndPoint=null,e.distance=0,e.unlockClothingBg=null,e.unlockClothing=null,e}return a(e,t),e.prototype.start=function(){this.node.on("touchend",this.touchEndFunc,this),this.node.on("touchstart",this.touchStartFunc,this),this.node.on("touchmove",this.touchMoveFunc,this),this.node.on("touchcancel",this.touchCancelFunc,this);var t=this.node.parent;this.unlockClothingBg=t.getChildByName("unlockClothingBg"),this.unlockClothing=t.getChildByName("unlockClothing"),cc.tween(this.unlockClothingBg).by(10,{angle:360}).repeatForever().start()},e.prototype.setCatData=function(t,e){this.catId=t,this.parentComp=e,this.updateSkin()},e.prototype.playClothesAnimation=function(t){void 0===t&&(t=!1),this.unlockClothingBg.active=t,this.unlockClothing.active=t},e.prototype.updateSkin=function(t){void 0===t&&(t=!1);var e="cat_"+this.catId,o=r.default.getUserData().catClothesData[e];for(var n in o)1==o[n].isWear&&this.setCatSpine(o[n].clothesID,o[n].clothRank,t)},e.prototype.setCatSpine=function(t,e,o){void 0===o&&(o=!1);var n=this,a="Model"+(this.catId<10?"0"+this.catId:this.catId+"");this.node.getComponent(c.default).loadNewSpine(a,function(){var a=t%1e3,i=a<10?"0"+a:a+"";n.node.getComponent(c.default).setNewSkin(i),o?n.node.getComponent(c.default).play("2_SkinChange1",1,function(){n.node.getComponent(c.default).play("1_Standby1",0)}):n.node.getComponent(c.default).play("1_Standby1",0);var r=1;r=e<2?0:1;for(var s=["Collar2","Collar1"],l=0;l=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/ApiTool"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/spine"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.popNode=null,e.titleLabel=null,e.allLabel=null,e.numLabel=null,e.sheepSP=null,e.bgFlashSP=null,e.headerNode=null,e}return a(e,t),e.prototype.start=function(){c.default.addbtnTouchEndScale(this.maskNode,this.maskNodeFunc.bind(this))},e.prototype.maskNodeFunc=function(){this.node.active=!1},e.prototype.showPop=function(){var t=this;this.node.active=!0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),cc.tween(this.bgFlashSP).to(0,{scale:0}).to(.1,{scale:1}).call(function(){t.bgFlashSP.getComponent(l.default).loadSpine("sheep/UI",function(){t.bgFlashSP.getComponent(l.default).play("4Ray2",0)})}).start();for(var e="sheep/Sheeps",o="skin_00",n=s.default.getSheepClothesData(),a=0;a=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/main/blockPrefab"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../common/native/audio"),p=t("../manager/GameManager"),d=t("./crushArea"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blockPrefab=null,e.blockArea=null,e.crushAreaNode=null,e.gameTopNode=null,e.moveOutArea=null,e.cookieGetParticle=null,e.crushAreaArgs=null,e.levelID=0,e.nowLevelBlockObj={},e.parentComp=null,e.blockTypeArr=[],e.minBlockNum=8,e.blockMaxWidth=120,e.blockMaxHeight=135,e.cookieBlockType=0,e.scaleRate=1,e}return a(e,t),e.prototype.onLoad=function(){},e.prototype.onDestroy=function(){console.log("chessboard \u9000\u51fa\u7a0b\u5e8f ######")},e.prototype.start=function(){console.log("start ###")},e.prototype.onEnable=function(){console.log("onEnable ###")},e.prototype.init=function(t,e){this.node.scale=1,console.log("init ###### ",t.widthNum,t.heightNum,this.node.scale),this.parentComp=e,this.nowLevelData=t,this.blockArea.removeAllChildren(),this.levelID=t.levelID,this.createBlockTypeObj(),this.rewardBlockInit(t,!1),this.initBlockNodeLayer(!0),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,3),this.refreshIndex()},e.prototype.initNextLevelMap=function(t,e){this.node.scale=1,console.log("init ###### ",t.widthNum,t.heightNum,this.node.scale),this.parentComp=e,this.nowLevelData=t,this.blockArea.x=cc.winSize.width,this.blockArea.removeAllChildren(),this.createBlockTypeObj(),this.rewardBlockInit(t,!0),this.initBlockNodeLayer(!1),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,3),this.refreshIndex(),cc.tween(this.blockArea).to(1,{x:-360,y:0},{easing:cc.easing.quadOut}).call(function(){cc.game.emit(l.EMITKEY.HIDEMASKLAYER,11)},this).start()},e.prototype.rewardBlockInit=function(t,e){if(s.default.gameConfigData.baseConfigData){this.cookieBlockType=0;var o=s.default.getUserData().playLevelId,n=s.default.gameConfigData.baseConfigData.cookieRewardLevel;if(e&&o>=n&&o%2!=0){var a=this.getCookieLevelData();console.log("\u997c\u5e72\u7c7b\u578b\u4e3a",a.type);var i=s.default.getCookieRewardData();console.log("cookieData",JSON.stringify(i)),this.cookieBlockType=a.type}}},e.prototype.getCookieLevelData=function(){var t=this.blockTypeArr.concat(),e=this.sortAndGroup(t),o=c.default.shuffle(e);console.log("blockArr",t),console.log("randomArr",o);var n=[];30<=t.length&&t.length<=72&&n.push(3),36<=t.length&&t.length<=93&&n.push(6),60<=t.length&&t.length<=105&&n.push(9),54<=t.length&&t.length<=99&&n.push(12),69<=t.length&&t.length<=114&&n.push(15),114<=t.length&&t.length<=147&&n.push(21),console.log("countArr",n);var a=[];for(var i in n)for(var r in e)if(n[i]==e[r].length){a.push(n[i]);break}console.log("canArr",a);var s=a[Math.floor(Math.random()*a.length)];for(var l in console.log("count",s),o)if(s==o[l].length)return{count:s,type:o[l][0]};return{count:0,type:0}},e.prototype.sortAndGroup=function(t){var e,o=[];t.sort(function(t,e){return t-e});for(var n=0;n block ",this.blockTypeArr.length),this.blockTypeArr=c.default.shuffle(this.blockTypeArr),p.default.blacksInfo.blockCurCount=this.blockTypeArr.length,p.default.blacksInfo.blockAllCount=this.blockTypeArr.length,console.log("blockCurCount = "+p.default.blacksInfo.blockCurCount+" blockAllCount = "+p.default.blacksInfo.blockAllCount)},e.prototype.initBlockNodeLayer=function(t){p.default.getInstance().cookieDict.cookieCurCount=0;var e=this.nowLevelData.levelData;for(var o in e)for(var n in e[o])t?this.addBlockFunc(e[o][n],cc.winSize.height):this.addBlockFunc(e[o][n],0);t?this.playInitBlockAnimate():this.noPlayAnimate()},e.prototype.checkGameWin=function(){for(var t in this.nowLevelBlockObj)for(var e in this.nowLevelBlockObj[t])for(var o in this.nowLevelBlockObj[t][e])return!1;return!0},e.prototype.noPlayAnimate=function(){for(var t in this.nowLevelBlockObj)for(var e in this.nowLevelBlockObj[t])for(var o in this.nowLevelBlockObj[t][e]){var n=this.checkIsShow(t,Number(o),Number(e)),a=this.nowLevelBlockObj[t][e][o].getComponent(r.default),i=this.node.width/this.nowLevelData.widthNum/this.blockMaxWidth;i*=this.scaleRate,a.setStatus(n,i),a.isChoosed=!1,a.playRandomBlockAnimate()}},e.prototype.playInitBlockAnimate=function(){cc.tween(this.node).delay(.3).call(function(){u.default.playAudioMusic("audio/sound/levelInit.mp3",!1)}).start();var t=1e4,e=0,o=0;for(var n in this.nowLevelBlockObj)for(var a in this.nowLevelBlockObj[n])for(var i in this.nowLevelBlockObj[n][a])o++,Number(i)e&&(e=Number(a));var c=function(n){var a=function(a){var i=function(i){var c=.02*(Number(i)-t)+.02*(e-Number(a)),u=s.nowLevelBlockObj[n][a][i].getComponent(r.default);cc.tween(u.node).delay(c).by(.8,{y:-cc.winSize.height}).by(.1,{y:-5}).by(.1,{y:8}).by(.1,{y:-3}).call(function(){o--;var t=this.checkIsShow(n,Number(i),Number(a)),e=this.nowLevelBlockObj[n][a][i].getComponent(r.default),c=this.node.width/this.nowLevelData.widthNum/this.blockMaxWidth;c*=this.scaleRate,e.setStatus(t,c),e.isChoosed=!1,e.playRandomBlockAnimate(),0==o&&cc.game.emit(l.EMITKEY.HIDEMASKLAYER,3)},s).start()};for(var c in s.nowLevelBlockObj[n][a])i(c)};for(var i in s.nowLevelBlockObj[n])a(i)},s=this;for(var n in this.nowLevelBlockObj)c(n)},e.prototype.refreshIndex=function(){for(var t in this.nowLevelBlockObj)for(var e in this.nowLevelBlockObj[t])for(var o in this.nowLevelBlockObj[t][e])this.nowLevelBlockObj[t][e][o].setSiblingIndex(1e4)},e.prototype.refreshMask=function(){var t=0;for(var e in this.nowLevelBlockObj)for(var o in this.nowLevelBlockObj[e])for(var n in this.nowLevelBlockObj[e][o]){t++;var a=this.checkIsShow(e,Number(n),Number(o)),i=this.node.width/this.nowLevelData.widthNum/this.blockMaxWidth;i*=this.scaleRate,this.nowLevelBlockObj[e][o][n].getComponent(r.default).setStatus(a,i)}p.default.blacksInfo.blockCurCount=t},e.prototype.updateBlockArea=function(){var t=[];for(var e in cc.game.emit(l.EMITKEY.SHOWMASKLAYER,4),this.nowLevelBlockObj)for(var o in this.nowLevelBlockObj[e])for(var n in this.nowLevelBlockObj[e][o]){var a=this.nowLevelBlockObj[e][o][n].getComponent(r.default);t.push(a.cardDataObj.type)}if(!((t=c.default.shuffle(t)).length<1)){for(var e in this.nowLevelBlockObj)for(var o in this.nowLevelBlockObj[e])for(var n in this.nowLevelBlockObj[e][o]){a=this.nowLevelBlockObj[e][o][n].getComponent(r.default);var i=this.nowLevelData.widthNum*this.minBlockNum,s=this.node.width/i,u=this.node.width/this.nowLevelData.widthNum,p=a.cardDataObj.rolNum*s+u/2,d=u/this.blockMaxWidth;d*=this.scaleRate;var h=-(a.cardDataObj.rowNum*s+d*this.blockMaxHeight/2),f=cc.v3(p,h,0);a.beginRotate(this,t.pop(),f)}return!0}cc.game.emit(l.EMITKEY.HIDEMASKLAYER,4)},e.prototype.checkIsShow=function(t,e,o){var n=this.nowLevelBlockObj;for(var a in n)if(Number(a)>Number(t)){var i=e-this.minBlockNum,r=e+this.minBlockNum,c=o-this.minBlockNum,s=o+this.minBlockNum;for(var l in n[a])for(var u in n[a][l])if(Number(u)>i&&Number(u)c&&Number(l)=7)){this.crushAreaNode.setSiblingIndex(10),this.crushAreaArgs&&this.crushAreaArgs.setSiblingIndex(10);var e=t.cardDataObj;this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum]&&delete this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum],this.parentComp.crushBlockNode(t),t.comeParent="chessboard",this.refreshMask()}},e.prototype.addBlockFunc=function(t,e){var o=cc.instantiate(this.blockPrefab);this.blockArea.addChild(o);var n=this.nowLevelData.widthNum*this.minBlockNum,a=this.node.width/n,i=this.node.width/this.nowLevelData.widthNum,c=i/this.blockMaxWidth;c*=this.scaleRate,o.scale=c;var s=t.rolNum*a+i/2,l=-(t.rowNum*a+c*this.blockMaxHeight/2);if(o.x=s,o.y=l+e,0==t.type){var u=this.blockTypeArr.pop();t.type=u}this.cookieBlockType==t.type?t.cookie=1:t.cookie=0,t.cookieType=this.cookieBlockType,o.getComponent(r.default).addBlockNode(t,this.removeCardNode.bind(this),this.refreshIndex.bind(this)),this.addBlockDataObj(o,t)},e.prototype.cancelAddBlockFunc=function(t){t.node.setSiblingIndex(1e3);var e=t.node,o=e.convertToWorldSpaceAR(cc.v2(0,0)),n=this.blockArea.convertToNodeSpaceAR(o);e.removeFromParent(!1),e.x=n.x,e.y=n.y,this.blockArea.addChild(e);var a=this.nowLevelData.widthNum*this.minBlockNum,i=this.node.width/a,c=this.node.width/this.nowLevelData.widthNum,s=t.cardDataObj.rolNum*i+c/2,u=c/this.blockMaxWidth;u*=this.scaleRate;var p=-(t.cardDataObj.rowNum*i+u*this.blockMaxHeight/2);e.stopAllActions(),cc.tween(e).to(.15,{x:s,y:p,scale:u}).call(function(){t.isChoosed=!1,cc.game.emit(l.EMITKEY.HIDEMASKLAYER,2)},this).start(),e.getComponent(r.default).updateBlockNodeData(t.cardDataObj,this.removeCardNode.bind(this),this.refreshIndex.bind(this)),this.addBlockDataObj(e,t.cardDataObj),this.refreshMask(),this.refreshIndex()},e.prototype.addBlockDataObj=function(t,e){this.nowLevelBlockObj[e.layerNum]?this.nowLevelBlockObj[e.layerNum][e.rowNum]?this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum]=t:(this.nowLevelBlockObj[e.layerNum][e.rowNum]={},this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum]=t):(this.nowLevelBlockObj[e.layerNum]={},this.nowLevelBlockObj[e.layerNum][e.rowNum]={},this.nowLevelBlockObj[e.layerNum][e.rowNum][e.rolNum]=t)},i([m(cc.Prefab)],e.prototype,"blockPrefab",void 0),i([m(cc.Node)],e.prototype,"blockArea",void 0),i([m(cc.Node)],e.prototype,"crushAreaNode",void 0),i([m(cc.Node)],e.prototype,"gameTopNode",void 0),i([m(cc.Node)],e.prototype,"moveOutArea",void 0),i([m(cc.Prefab)],e.prototype,"cookieGetParticle",void 0),i([m(cc.Node)],e.prototype,"crushAreaArgs",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../pre/main/blockPrefab":"blockPrefab","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../manager/GameManager":"GameManager","./crushArea":"crushArea"}],clothesPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"33fd5tSoKRCfKE6RQ1fb4nf","clothesPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/common/dataTs"),s=t("../../script/common/spine"),l=t("../../script/manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.titleBanner_1=null,e.lvLabel_1=null,e.titleLabel_1=null,e.titleBanner_2=null,e.titleLabel_2=null,e.titleBanner_3=null,e.lockNode=null,e.selectNode=null,e.catNode=null,e.clothId=0,e.clothData=null,e.isClicked=!1,e.catId=0,e.parentComp=null,e}return a(e,t),e.prototype.start=function(){this.node.on("touchend",this.dressCloth,this)},e.prototype.setClothNodeData=function(t,e,o,n){if(this.clothData=t,this.parentComp=e,c.default.getUserData(),this.isClicked=!1,this.titleBanner_1.active=!1,this.titleBanner_2.active=!1,this.titleBanner_3.active=!1,this.lockNode.active=!1,this.catNode.active=!1,this.selectNode.active=!1,this.clothId=t.clothesID,l.default.getInstance().collectionMark.catSkinNum==this.clothData.clothesID?(this.node.getChildByName("mark").active=!0,l.default.getInstance().collectionMark.catSkinNum=0):this.node.getChildByName("mark").active=!1,"level"==t.unlockType){var a=!1;for(var i in n)if(this.clothData.clothesID==n[i].clothesID){a=!0;break}if(a)for(var i in n)this.clothData.clothesID==n[i].clothesID&&(this.titleBanner_1.active=!0,this.isClicked=!0,this.titleLabel_1.string=t.name,this.lvLabel_1.string="Lv"+n[i].clothRank,this.catNode.active=!0,this.selectNode.active=n[i].isWear,this.setCatSpine(o,n[i].clothRank),0==this.clothData.skin?this.lvLabel_1.node.active=!1:this.lvLabel_1.node.active=!0,2==this.clothData.skin&&n[i].clothRank<3&&(this.titleBanner_1.active=!1,this.titleBanner_2.active=!0,this.titleLabel_2.string="\u5b8c\u6210\u6311\u6218\u89e3\u9501"));else this.titleBanner_2.active=!1,this.titleLabel_2.string=t.unlockNum+"\u5173\u89e3\u9501",this.lockNode.active=!0,this.clothData.skin<1e4&&(this.catNode.active=!0,this.titleBanner_1.active=!1,this.lockNode.active=!1,1==this.clothData.skin?(this.titleBanner_3.active=!0,this.setCatSpine(o,1)):2==this.clothData.skin?(this.titleBanner_2.active=!0,this.titleLabel_2.string="\u5b8c\u6210\u6311\u6218\u89e3\u9501",this.setCatSpine(o,0)):this.setCatSpine(o,1))}else t.unlockType},e.prototype.setCatSpine=function(t,e){var o=this;this.catId=t;var n="Model"+(this.catId<10?"0"+this.catId:this.catId+"");this.catNode.getComponent(s.default).loadNewSpine(n,function(){var t=o.clothId%1e3,n=t<10?"0"+t:t+"";o.clothData.skin<1e4&&o.catNode.getComponent(s.default).setNewSkin(n);var a="Skin/"+n+"_"+e;console.log(n+" "+a),o.catNode.getComponent(s.default).play(a,0)})},e.prototype.dressCloth=function(){r.default.addClickAudio(),this.isClicked?(console.log("\u9009\u62e9\u8863\u670d\uff1a",this.clothId),this.parentComp.dressCloth(this.clothId)):console.log("\u4e0d\u80fd\u88ab\u70b9\u51fb")},i([d(cc.Node)],e.prototype,"titleBanner_1",void 0),i([d(cc.Label)],e.prototype,"lvLabel_1",void 0),i([d(cc.Label)],e.prototype,"titleLabel_1",void 0),i([d(cc.Node)],e.prototype,"titleBanner_2",void 0),i([d(cc.Label)],e.prototype,"titleLabel_2",void 0),i([d(cc.Node)],e.prototype,"titleBanner_3",void 0),i([d(cc.Node)],e.prototype,"lockNode",void 0),i([d(cc.Node)],e.prototype,"selectNode",void 0),i([d(cc.Node)],e.prototype,"catNode",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/dataTs":"dataTs","../../script/common/spine":"spine","../../script/manager/GameManager":"GameManager"}],collectPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"0d875oEXn5LZ7yyzkAjxqlu","collectPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../itemSub/collectSubPrefab"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.collectSubPrefab=null,e.base_title_label=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setNodeData=function(t){this.nodeData=t;var e=this.nodeData.catArr.length;for(var o in this.node.height=130+e/3*305,this.base_title_label.string="- "+this.nodeData.name+" -",this.nodeData.catArr){var n=cc.instantiate(this.collectSubPrefab);n.getComponent(l.default).setNodeData(this.nodeData.catArr[o],this),this.content.addChild(n)}},e.prototype.refreshNode=function(t){this.nodeData=t;var e=this.content.children;for(var o in e)e[o].getComponent(l.default).setNodeData(this.nodeData.catArr[o],this)},i([s(cc.Node)],e.prototype,"content",void 0),i([s(cc.Prefab)],e.prototype,"collectSubPrefab",void 0),i([s(cc.Label)],e.prototype,"base_title_label",void 0),i([c],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../itemSub/collectSubPrefab":"collectSubPrefab"}],collectSubPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"57acahslq1PzajDPXaUCYWO","collectSubPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/common/spine"),s=t("../../script/common/dataTs"),l=t("../../script/manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgContent=null,e.tabLabel=null,e.imgTab=null,e.catNode=null,e.unlocking=null,e.imgLock=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.node,this.clickNodeAction.bind(this))},e.prototype.clickNodeAction=function(){r.default.addClickAudio()},e.prototype.setNodeData=function(t){var e=this;this.nodeData=t,this.tabLabel.string=this.nodeData.name;var o=s.default.getUserData().catClothesData["cat_"+e.nodeData.modelID],n=!1;for(var a in o)if(this.nodeData.clothesID==o[a].clothesID){n=!0;break}if(s.default.getUserData().playLevelId,n?(this.imgContent.active=!0,this.imgLock.active=!1):(this.imgContent.active=!1,this.imgLock.active=!0),!(this.nodeData.unlockNum>=1e4)){0==this.nodeData.skin?this.tabLabel.getComponent(cc.LabelOutline).color=(new cc.Color).fromHEX("#4482CE"):1==this.nodeData.skin?this.tabLabel.getComponent(cc.LabelOutline).color=(new cc.Color).fromHEX("#A648D7"):2==this.nodeData.skin&&(this.tabLabel.getComponent(cc.LabelOutline).color=(new cc.Color).fromHEX("#D5A618"));var i="rewardIcon/Tab"+(t.skin+1)+".png";r.default.changeSpriteFrame(this.imgTab,i);var u=this.nodeData.clothesID%1e3,p=this.nodeData.modelID,d="Model"+(p<10?"0"+p:p+"");if(!o)return e.imgContent.active=!1,void(e.imgLock.active=!0);this.catNode.getComponent(c.default).loadNewSpine(d,function(){var t=u<10?"0"+u:u+"";e.catNode.getComponent(c.default).setNewSkin(t);for(var n=0;n=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../common/dataTs"),u=t("../../../pre/item/collectPrefab"),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.collectPrefab=null,e.collectData=null,e.dataArray=[],e}return a(e,t),e.prototype.start=function(){this.parserData(),this.content.removeAllChildren();for(var t=0;t0&&this.refreshSubNode()},e.prototype.refreshSubNode=function(){this.parserData();var t=this.content.children;for(var e in t)t[e].getComponent(u.default).refreshNode(this.dataArray[e],this)},e.prototype.parserData=function(){var t=[];for(var e in this.collectData=l.default.gameConfigData.baseConfigData.catClothesData,this.collectData)for(var o in this.collectData[e])this.collectData[e][o].modelID<1e4&&t.push(this.collectData[e][o]);for(var n=0,a=0;an&&(n=c);for(a=0;a<=n;a++)this.dataArray[a]={name:"",catArr:[]};for(var i=[],r=0;r=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cookieTrailing=null,e.imageNode=null,e.labelNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),0==t?(this.imageNode.angle=0,this.labelNode.active=!1,this.cookieTrailing.active=!1,r.default.changeSpriteFrame(this.imageNode,"block/cookie/cookie_icon_fly.png")):1==t?(this.imageNode.angle=-12,this.labelNode.active=!0,this.labelNode.getComponent(cc.Label).string="x"+e,this.cookieTrailing.active=!1,r.default.changeSpriteFrame(this.imageNode,"block/cookie/cookie_icon_fly.png")):2==t&&(this.imageNode.angle=0,this.labelNode.active=!1,this.cookieTrailing.active=!1,r.default.changeSpriteFrame(this.imageNode,"rewardIcon/base_icon_ribbon.png"))},i([l(cc.Node)],e.prototype,"cookieTrailing",void 0),i([l(cc.Node)],e.prototype,"imageNode",void 0),i([l(cc.Node)],e.prototype,"labelNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],cookieRewardNode:[function(t,e,o){"use strict";cc._RF.push(e,"69fe22S909JKoELNPl5QSbH","cookieRewardNode");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imageNode=null,e.labelNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t){var e="rewardIcon/"+t.rewardType+".png",o=0;this.imageNode.y=0,"reward_fish"==t.rewardType?o=0:"prop_random"==t.rewardType?(o=60,this.imageNode.y=5):"prop_remove"==t.rewardType&&(e="rewardIcon/prop_remove.png",o=0,this.imageNode.y=15),this.imageNode.angle=o,r.default.changeSpriteFrame(this.imageNode,e),this.labelNode.getComponent(cc.Label).string=t.rewardCount+""},i([l(cc.Node)],e.prototype,"imageNode",void 0),i([l(cc.Node)],e.prototype,"labelNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],crushArea:[function(t,e,o){"use strict";cc._RF.push(e,"aa009UiZ8pDtasKgVM+bH6Y","crushArea");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=t("../common/native/audio"),s=t("../common/util"),l=t("../manager/GameManager"),u=t("./chessboard"),p=t("./moveOutArea"),d=cc._decorator,h=d.ccclass,f=d.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gametopUI=null,e.moveOutArea=null,e.chessboardNode=null,e.particlePrefab=null,e.rewardEmitter=null,e.rewardEmitterNode=null,e.ribbonBoxPrefab=null,e.ribbonBox=null,e.crushAreaArgs=null,e.dailySF=null,e.topicSF=null,e.crushArray=[],e.blockMaxWidth=120,e.newScale=.8,e.moveSpeed=2e3,e.cancelArray=[],e.failNumber=7,e.gameOverStatus=!1,e.particleNode1=null,e.particleNode2=null,e.particleNode3=null,e.parentComp=null,e}return a(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){},e.prototype.initCrushArea=function(t){this.node.removeAllChildren(),this.parentComp=t,this.particleNode1=null,this.particleNode2=null,this.particleNode3=null,this.rewardEmitterNode=null,this.ribbonBox=null,this.crushArray=[],this.cancelArray=[],this.gameOverStatus=!1,this.node.opacity=0,cc.tween(this.node).to(.4,{opacity:255}).start(),l.default.getInstance().gameType==r.GAMETYPE.GAMETOPIC?(this.getComponent(cc.Sprite).spriteFrame=this.topicSF,this.crushAreaArgs&&(this.crushAreaArgs.active=!1)):(this.getComponent(cc.Sprite).spriteFrame=this.dailySF,this.crushAreaArgs&&(this.crushAreaArgs.active=!0))},e.prototype.hideCrushArea=function(){cc.tween(this.node).to(.4,{opacity:0}).start()},e.prototype.addCrushAreaCardNode=function(t){var e=t.node.convertToWorldSpaceAR(cc.v2(0,0)),o=this.node.convertToNodeSpaceAR(e);t.node.removeFromParent(!1),t.node.x=o.x,t.node.y=o.y,t.isChoosed=!0,this.node.addChild(t.node),this.addNewBlockNode(t),this.getCrushBlockNum()>=7&&cc.game.emit(r.EMITKEY.SHOWMASKLAYER,5)},e.prototype.getCrushBlockNum=function(){for(var t=this.crushArray.length,e=0;e=e.failNumber){for(var t=!0,n=0;n=0;e--)if(this.crushArray[e].cardDataObj.type==t.cardDataObj.type)return e+1;return this.crushArray.length},e.prototype.moveOutBlock=function(){if(this.crushArray.length<1)return!1;this.node.setSiblingIndex(10),this.crushAreaArgs&&this.crushAreaArgs.setSiblingIndex(10),this.moveOutArea.setSiblingIndex(9),cc.game.emit(r.EMITKEY.SHOWMASKLAYER,1),this.cancelArray=[];for(var t=[],e=0;e=3));e++);return t.length<1&&cc.game.emit(r.EMITKEY.HIDEMASKLAYER,5),this.moveOutArea.getComponent(p.default).addThreeOutBlock(t),this.updateNewPosition(),!0},e.prototype.cancelOneStep=function(){if(this.cancelArray.length>0){cc.game.emit(r.EMITKEY.SHOWMASKLAYER,6);for(var t=this.cancelArray.pop(),e=0;e8)){var n=.5*(e+t),a=this.GetTangent(t),r=this.GetTangent(e);if(!(i.angle(a,r)<=.1&&0!=o)){this.recursiveSamples(t,n,o+1);var c=this.samples[this.samples.length-1].location,s=this.GetLocation(n);this.length+=i.distance(c,s),this.samples.push(this.createSample(this.Length,n,s)),this.recursiveSamples(n,e,o+1)}}},t.prototype.computeSamples=function(){this.samples.length=0,this.length=0,this.samples.push(this.createSample(0,0)),this.recursiveSamples(0,1,0);var t=this.samples[this.samples.length-1].location,e=this.GetLocation(1);this.length+=i.distance(t,e),this.samples.push(this.createSample(this.Length,1))},t.prototype.createSample=function(t,e,o){return o||(o=this.GetLocation(e)),new n.CurveSample(o,this.GetTangent(e),this.GetUp(e),this.GetScale(e),t,e,this)},t.prototype.GetSample=function(t){if(t<0||t>1)throw new Error("Time must be between 0 and 1 (was "+t+").");for(var e=this.samples[0],o=null,a=!1,i=0,r=this.samples;i=t){o=c,a=!0;break}e=c}if(!a)throw new Error("Can't find curve samples.");var s=o===e?0:(t-e.timeInCurve)/(o.timeInCurve-e.timeInCurve);return n.CurveSample.Lerp(e,o,s)},t.prototype.GetSampleAtDistance=function(t){if(t<0||t>this.Length)throw new Error("Distance must be positive and less than curve length. Length = "+this.Length+", given distance was "+t+".");for(var e=this.samples[0],o=null,a=!1,i=0,r=this.samples;i=t){o=c,a=!0;break}e=c}if(!a)throw new Error("Can't find curve sample.");var s=o===e?0:(t-e.distanceInCurve)/(o.distanceInCurve-e.distanceInCurve);return n.CurveSample.Lerp(e,o,s)},t.prototype.GetProjectionSample=function(){return console.assert(!1,"Not implement"),null},t}();o.CubicBezierCurve=c,cc._RF.pop()},{"./curve-sample":"curve-sample","./typed-event":"typed-event"}],"curve-sample":[function(t,e,o){"use strict";cc._RF.push(e,"fcdcepeqV5GO5ejTxbhKhyO","curve-sample"),Object.defineProperty(o,"__esModule",{value:!0}),o.CurveSample=void 0;var n=t("./mesh-vertex"),a=cc.Quat,i=cc.Vec2,r=cc.Vec3,c=t("./export-helper"),s=cc.misc,l=function(){function t(t,e,o,n,i,r,c){this.location=t,this.tangent=e,this.up=o,this.scale=n,this.distanceInCurve=i,this.timeInCurve=r,this.curve=c,this.rotation=new a}return Object.defineProperty(t.prototype,"Rotation",{get:function(){var t=Object.freeze(new a);if(this.rotation===t){var e=this.up;this.rotation=new a,a.fromViewUp(this.rotation,this.tangent,e)}return this.rotation},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return this.location.equals(t.location)&&this.tangent.equals(t.tangent)&&this.up.equals(t.up)&&this.scale.equals(t.scale)&&c.math.equals(this.distanceInCurve,t.distanceInCurve)&&c.math.equals(this.timeInCurve,t.timeInCurve)},t.Lerp=function(e,o,n){var a=new r;r.lerp(a,e.location,o.location,n);var c=new r;r.lerp(c,e.tangent,o.tangent,n).normalize();var l=new r;r.lerp(l,e.up,o.up,n);var u=new i;return i.lerp(u,e.scale,o.scale,n),new t(a,c,l,u,s.lerp(e.distanceInCurve,o.distanceInCurve,n),s.lerp(e.timeInCurve,o.timeInCurve,n),e.curve)},t.prototype.getBent=function(t){var e=new n.MeshVertex(t.position,t.normal,t.uv),o=new r(0,e.position.y*this.scale.y,e.position.z*this.scale.x);o.x=0;var i=a.fromEuler(new a,0,s.degreesToRadians(-90),0),c=a.multiply(new a,this.Rotation,i);return r.transformQuat(o,o,c),r.add(o,o,this.location),e},t}();o.CurveSample=l,cc._RF.pop()},{"./export-helper":"export-helper","./mesh-vertex":"mesh-vertex"}],"daily-challenge":[function(t,e,o){"use strict";cc._RF.push(e,"d96aesUCApI06hXg7ZujIsy","daily-challenge");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../common/CcJsFunc"),u=t("./calendar-item"),p=t("../../common/enumConfig"),d=t("../../manager/DateManager"),h=t("../../game/gameLayer"),f=t("../../common/dataTs"),m=t("../../game/gameUiLayer"),g=t("../../common/spine"),y=t("../../utils/uma/uma-sdk"),v=t("../../manager/GameManager"),b=t("../../manager/report-common"),_=t("../../../i18n/i18n"),N=t("../../../i18n/gd_language"),C=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gameLayer=null,e.mainLayer=null,e.baseContent=null,e.baseContentBg=null,e.scrollView=null,e.bottomMask=null,e.calendarItem=null,e.previousBtn=null,e.titleLabel=null,e.nextBtn=null,e.spineLevel1=null,e.spineLevel2=null,e.spineLevel3=null,e.progressBarOne=null,e.progressBarTwo=null,e.progressBarThree=null,e.catFootBegin=null,e.catFootThree=null,e.catFootTen=null,e.catFootThirty=null,e.content=null,e.bottomView=null,e.playBtn=null,e.playImg=null,e.playLabel=null,e.progressPoint=null,e.progressLabel=null,e.winLabel=null,e.userData=null,e.dataArray=[],e.curArray=[],e.year=null,e.month=null,e.day=null,e.catArr=[],e.clickTime=0,e.clickMiniTime=0,e.isNoWin=!1,e.beginButtonDuration=0,e}return a(e,t),e.prototype.onEnable=function(){this.catArr=[],this.catArr.push(this.spineLevel1),this.catArr.push(this.spineLevel2),this.catArr.push(this.spineLevel3),this.setupData()},e.prototype.update=function(t){this.beginButtonDuration+=t},e.prototype.start=function(){l.default.addbtnTouchStartScale(this.playBtn),l.default.addbtnTouchEndScale(this.playBtn,this.playBtnTouchEnd.bind(this)),l.default.addbtnTouchCancelScale(this.playBtn),l.default.addbtnTouchStartScale(this.previousBtn),l.default.addbtnTouchEndScale(this.previousBtn,this.previousBtnTouchEnd.bind(this)),l.default.addbtnTouchCancelScale(this.previousBtn),l.default.addbtnTouchOriginStartScale(this.nextBtn),l.default.addbtnTouchOriginEndScale(this.nextBtn,this.nextBtnTouchEnd.bind(this)),l.default.addbtnTouchOriginCancelScale(this.nextBtn),this.clickTime=(new Date).getTime(),this.clickMiniTime=1e3,cc.winSize.height<1334&&(this.node.scale=.8)},e.prototype.setupData=function(){this.year=d.default.getInstance().selDate.getFullYear(),this.month=d.default.getInstance().selDate.getMonth()+1,this.initData()},e.prototype.playBtnTouchEnd=function(){if(this.beginButtonDuration<=1)console.log("\u4e0d\u80fd\u8fde\u7eed\u70b9\u51fb");else{this.beginButtonDuration=0;var t=d.default.format(p.CALENDARNAMES[4],d.default.getInstance().selDate).split("-");if(!(t.length<3)){console.log(t[0]+"\u5e74"+t[1]+"\u6708"+t[2]+"\u65e5");var e=Number(t[2]),o=null;if(f.default.getUserData().playLevelId<=50){if(!(o=f.default.getGameConfigData().baseConfigData.dailyData.easyGame.simple))return void console.log("monthData sample\u914d\u7f6e\u8868\u65e0\u6570\u636e")}else{var n=d.default.format(p.CALENDARNAMES[5],d.default.getInstance().selDate);if(!(o=f.default.getGameConfigData().baseConfigData.dailyData.monthData[n]))return void console.log("monthData \u914d\u7f6e\u8868\u65e0\u6570\u636e")}console.log("monthData = "+JSON.stringify(o));var a=o.levelID+e-1;console.log("index = "+a+" day = "+e),0!=this.isNoWin?this.dailyBeginGame(o,a,e):cc.game.emit("showMainTips",_.default.instance.trans(N.GDLanguage.level_new_tomorrow))}}},e.prototype.dailyBeginGame=function(t,e,o){console.log("levelID = "+e);var n=this;n.userData=f.default.getUserData(),console.log("\u7528\u6237\u6570\u636e:",n.userData),f.default.getLevelByNumber(e,function(e){if(console.log("\u5173\u5361\u6570\u636e:",e),n.gameLayer.activeInHierarchy)console.log("\u5df2\u7ecf\u6253\u5f00 mainLayer 2");else if(e.length<1)cc.game.emit("showMainTips",_.default.instance.trans(N.GDLanguage.level_inadequate));else if(f.default.isHaveLove())if(d.default.getInstance().isOldDay(o))console.log("\u770b\u89c6\u9891###");else{if(n.gameLayer.activeInHierarchy)return void console.log("\u5df2\u7ecf\u6253\u5f00 mainLayer 2");n.showGameAction(t,e,o)}else console.log("\u7231\u5fc3\u4e0d\u8db3"),cc.game.emit("showMainTips",_.default.instance.trans(N.GDLanguage.life_inadequate)),cc.game.emit("showPop",{popName:"getLovePop",showPopData:{popCallbackCollect:null,getLoveTime:0}})})},e.prototype.showGameAction=function(t,e,o){var n=this;cc.game.emit(p.EMITKEY.SHOWTRANSITLAYER,function(a){n.gameLayer.activeInHierarchy?console.log("\u5df2\u7ecf\u6253\u5f00 daily"):(console.log("\u53ef\u4ee5\u6253\u5f00\u4e86 daily"),n.gameLayer.getComponent(h.default).initLevelLayer(e),n.gameLayer.getChildByName("gameUiLayer").getComponent(m.default).setTimeByLevel(t,o),n.node.active=!1,a(),v.default.getInstance().tabbarIsDaily=!1)})},e.prototype.previousBtnTouchEnd=function(){this.changeMonth("last"),this.initData(this.year,this.month)},e.prototype.nextBtnTouchEnd=function(){this.changeMonth("next"),this.initData(this.year,this.month)},e.prototype.changeMonth=function(t){var e=d.default.getInstance().selDate,o=d.default.getInstance().cutType;switch(t){case"last":var n=d.default.lastDate(e,o);d.default.getInstance().selDate=d.default.cloneDate(n);break;case"next":var a=d.default.nextDate(e,o);d.default.getInstance().selDate=d.default.cloneDate(a)}this.year=d.default.getInstance().selDate.getFullYear(),this.month=d.default.getInstance().selDate.getMonth()+1,this.day=d.default.getInstance().selDate.getDay(),this.initData(this.year,this.month),y.default.trackEvent("daily_month"),b.default.reportTACommon("daily_month",{}),b.default.reportTACommon("daily_click",{action:"\u5207\u6362\u6708\u4efd"})},e.prototype.initData=function(t,e){if(void 0===t&&(t=this.year),void 0===e&&(e=this.month),this.titleLabel.string="- "+l.default.getMonthShorthand(e-1)+"/"+t+" -",this.dataArray=[],this.content.removeAllChildren(),this.createLastMonth(t,e),this.createNowMonth(t,e),this.createNextMonth(t,e),cc.winSize.height,console.log(this.dataArray.length),v.default.getInstance().globalData.isFullScreen){this.bottomMask.active=!1;var o=104*Math.ceil(this.dataArray.length/7),n=o-416;this.scrollView.height=o,this.baseContent.height=980+n}else this.bottomMask.active=!0;this.showLastSelDate(),this.updatePlayState(),this.updateSubUI(),this.showActionFunc()},e.prototype.showLastSelDate=function(){if(this.curArray.length){for(var t=0,e=this.curArray;t=0&&(o=this.curArray[n],this.isNoWin=!o.getComponent(u.default).isWin(),!this.isNoWin);n--);if(this.isNoWin){o.getComponent(u.default).show(p.CALENDARITEM.ITEMSELE);var a=o.getComponent(u.default).getNodeData();if(a&&a.date){var i=a.date.split("-");if(i.length<3)return;var r=Number(i[0]),c=Number(i[1]),s=Number(i[2]);this.updatePlayBtn(c,s),d.default.getInstance().selDate=new Date(r,c-1,s)}}else console.log("\u8bf7\u7b49\u5f85\u660e\u5929\u6e38\u73a9\u65b0\u5173\u5361######")}},e.prototype.showActionFunc=function(){var t=Number(f.default.getGameConfigData().baseConfigData.dailyData.originMonth);console.log("originMonthNum = "+t);var e=Number(d.default.format(p.CALENDARNAMES[5],d.default.getInstance().nowDate));console.log("nowMonthNum = "+e);var o=Number(d.default.format(p.CALENDARNAMES[5],d.default.getInstance().selDate));console.log("selMonthNum = "+o),this.previousBtn.active=!(o<=t),this.nextBtn.active=!(o>=e)},e.prototype.updatePlayState=function(){var t=d.default.format(p.CALENDARNAMES[3],d.default.getInstance().selDate).split("-");if(!(t.length<2)){var e=Number(t[0]),o=Number(t[1]);this.updatePlayBtn(e,o)}},e.prototype.updatePlayBtn=function(t,e){d.default.getInstance().isOldDay(e)?this.playImg.active=!0:this.playImg.active=!1;var o="Play "+t+"/"+e;0==this.isNoWin&&(o="Tomorrow",this.playImg.active=!1),this.playLabel.getComponent(cc.Label).string=o},e.prototype.updateSubUI=function(){var t=d.default.format(p.CALENDARNAMES[4],d.default.getInstance().selDate).split("-");if(!(t.length<2)){var e=Number(t[0]),o=Number(t[1]),n=new Date(e,o,0).getDate();n<=0&&(n=30);var a=f.default.getUserData().dailyData,i=d.default.format(p.CALENDARNAMES[5],d.default.getInstance().selDate),r=f.default.getGameConfigData().baseConfigData.dailyData.monthData[i];if(r){if(console.log("monthData = "+JSON.stringify(r)),a&&(a[i]||(console.log("dailyData[monthKey] \u4e3a\u7a7a\uff0c\u521d\u59cb\u5316\u6570\u636e##### "),a[i]={},(l=f.default.getUserData()).dailyData=a,f.default.saveUserData(l))),console.log("dailyData ##### ",JSON.stringify(a),i),a&&a[i]){var c=0;for(var s in a[i])a[i][s]&&a[i][s].isWin&&c++;if(this.catFootThree.active=!1,this.catFootTen.active=!1,this.catFootThirty.active=!1,this.progressBarOne.progress=0,this.progressBarTwo.progress=0,this.progressBarThree.progress=0,this.progressPoint.active=!0,c>0){if(c<=3?(this.catFootThree.active=!(c<3),this.progressBarOne.progress=c/3,this.progressPoint.x=166/3*c-250):c<=10?(this.catFootThree.active=!0,this.catFootTen.active=!(c>3&&c<10),this.progressBarOne.progress=1,this.progressBarTwo.progress=(c-3)/7,this.progressPoint.x=16.6*(c-3)-250+192.5):(this.catFootThree.active=!0,this.catFootTen.active=!0,this.catFootThirty.active=!(c>20&&c=3&&(this.catArr[0].parent.getChildByName("bg-gray").active=!1,this.catArr[0].parent.getChildByName("bg-green").active=!0),c>=10&&(this.catArr[1].parent.getChildByName("bg-gray").active=!1,this.catArr[1].parent.getChildByName("bg-green").active=!0),c>=n&&(this.catArr[2].parent.getChildByName("bg-gray").active=!1,this.catArr[2].parent.getChildByName("bg-green").active=!0)}}else console.log("monthData \u914d\u7f6e\u8868\u65e0\u6570\u636e")}},e.prototype.createLastMonth=function(t,e,o,n){void 0===o&&(o=!0),void 0===n&&(n=255),e-=1;var a=new Date(t,e,0),i=a.getDate(),r=a.getDay();if(r<7)for(var c=r;c>0;c--){var s=cc.instantiate(this.calendarItem);s.parent=this.content,s.opacity=n,this.dataArray.push(s);var l=i-c,d=t+"-"+(e<10?"0"+e:e)+"-"+(l<10?"0"+l:l),h={day:l,type:p.CALENDARITEM.ITEMLAST,date:d};s.getComponent(u.default).setNodeData(h,this)}},e.prototype.createNowMonth=function(t,e,o,n){void 0===o&&(o=!0),void 0===n&&(n=255);var a=new Date(t,e,0).getDate();d.default.getInstance().isNowMonth(e-1),this.curArray=[];for(var i=function(a){var i=cc.instantiate(r.calendarItem);i.parent=r.content,i.opacity=n,r.dataArray.push(i);var c=!1,s=p.CALENDARITEM.ITEMFUTURE;d.default.getInstance().isNowDay(a)?(r.curArray.push(i),c=!0,s=p.CALENDARITEM.ITEMNOW):d.default.getInstance().isOldDay(a)?(r.curArray.push(i),c=!0,s=p.CALENDARITEM.ITEMOLD):d.default.getInstance().isFutureDay(a)&&(s=p.CALENDARITEM.ITEMFUTURE);var l=t+"-"+(e<10?"0"+e:e)+"-"+(a<10?"0"+a:a),h={day:a,type:s,date:l};i.getComponent(u.default).setNodeData(h,r),o&&c&&i.on(cc.Node.EventType.TOUCH_END,function(){var o=l.split("-");if(console.log(o),o.length>=3){var n=""+o[0]+o[1],r=""+o[0]+o[1]+o[2],c=f.default.getUserData().dailyData;if(c&&c[n]&&c[n][r]&&c[n][r].isWin)return void console.log("\u672c\u5173\u5df2\u5b8c\u6210")}y.default.trackEvent("daily_date",{otherDate:l}),b.default.reportTACommon("daily_date",{}),b.default.reportTACommon("daily_click",{action:"\u5207\u6362\u65e5\u671f"});for(var s=0,h=this.curArray;s11&&(e=11),e<=0&&(e=1),e},e.isUpgradeNum=function(t){return console.log("fail = "+t),10==t||20==t||60==t||100==t||140==t||180==t||260==t||340==t||500==t||800==t},e.todayIsWin=function(){var t=c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate).split("-");if(t.length>=3){var e=""+t[0]+t[1],o=""+t[0]+t[1]+t[2],n=i.default.getUserData().dailyData;if(n&&n[e]&&n[e][o]&&n[e][o].isWin)return 1;if(n&&n[e]&&n[e][o]&&!n[e][o].isWin)return 0}return-1},e.checkExpireData=function(t){-1==e.todayIsWin()&&(i.default.removeItem(t),console.log("\u672c\u5730\u7f13\u5b58\u8fc7\u671f\u6570\u636e ###### cacheName = ",t)),i.default.isPlatform(i.GDPlatform.web)&&i.default.removeItem(t)},e.getTAUserInfo=function(){e.checkExpireData(r.STORAGEKEY.TAUSERINFO);var t=s.default.getInstance().reportProperty,o=t.challenge_count,n=t.cancel_use+t.random_use+t.remove_use,a=t.resurrection_ad_frequency,c=t.resurrection_ad_frequency+t.cancel_ad+t.random_ad+t.remove_ad,l=0;s.default.blacksInfo.blockAllCount>0&&(l=s.default.blacksInfo.blockCurCount/s.default.blacksInfo.blockAllCount);var u=i.default.getItem(r.STORAGEKEY.TAUSERINFO);u||(u={change_num:0,prop_num:0,resurgence_num:0,ad_num:0,block_ratio:l}),u.change_num+=o,u.prop_num+=n,u.resurgence_num+=a,u.ad_num+=c,u.block_ratio=l.toFixed(2),i.default.setItem(r.STORAGEKEY.TAUSERINFO,u),u||(u={});var p="\u6bcf\u65e5\u6311\u6218";return s.default.getInstance().gameType==r.GAMETYPE.GAMEDAILY?p="\u6bcf\u65e5\u6311\u6218":s.default.getInstance().gameType==r.GAMETYPE.GAMETOPIC&&(p="\u8bdd\u9898\u6311\u6218"),u.game_type=p,u},e.getGameLevelData=function(){var t=this.gameLevelCacheName();return e.checkExpireData(t),i.default.getItem(t)},e.setGameLevelData=function(t){var e=this.gameLevelCacheName();i.default.setItem(e,t,30*this.cacheTime)},e.gameLevelCacheName=function(){return s.default.getInstance().gameType==r.GAMETYPE.GAMELEVEL?r.STORAGEKEY.GAMEDAILYLEVELDATA:s.default.getInstance().gameType==r.GAMETYPE.GAMEDAILY?r.STORAGEKEY.GAMEDAILYLEVELDATA:s.default.getInstance().gameType==r.GAMETYPE.GAMETOPIC?r.STORAGEKEY.GAMETOPICLEVELDATA:r.STORAGEKEY.GAMEDAILYLEVELDATA},e.getRankData=function(){return e.checkExpireData(r.STORAGEKEY.RANKDATA),i.default.getItem(r.STORAGEKEY.RANKDATA)},e.setRankData=function(t){i.default.setItem(r.STORAGEKEY.RANKDATA,t,10*this.cacheTime)},e.getBulletData=function(){return e.checkExpireData(r.STORAGEKEY.BULLETDATA),i.default.getItem(r.STORAGEKEY.BULLETDATA)},e.setBulletData=function(t){i.default.setItem(r.STORAGEKEY.BULLETDATA,t,60*this.cacheTime)},e.getStageData=function(){return e.checkExpireData(r.STORAGEKEY.STAGEDATA),i.default.getItem(r.STORAGEKEY.STAGEDATA)},e.setStageData=function(t){i.default.setItem(r.STORAGEKEY.STAGEDATA,t,30*this.cacheTime)},e.getMatchResultData=function(){var t=i.default.getItem(r.STORAGEKEY.TOPICMATCHRECORD);return t&&t[c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate)]?(console.log("\u4eca\u65e5\u5df2\u8c03\u7528\u8d5b\u51b5\u63a5\u53e3 ###### "),!0):(console.log("\u4eca\u65e5\u672a\u8c03\u7528\u8d5b\u51b5\u63a5\u53e3 ###### "),!1)},e.setMatchResultData=function(){var t=c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate),e=i.default.getItem(r.STORAGEKEY.TOPICMATCHRECORD);e||(e={}),e[t]=!0,i.default.setItem(r.STORAGEKEY.TOPICMATCHRECORD,e)},e.getPropData=function(){var t=i.default.getItem(r.STORAGEKEY.PROPGAMEDATA);return t&&c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate)==t.time||(t=this.defaultPropData()),t},e.setPropData=function(t){return t||(t=this.defaultPropData()),i.default.setItem(r.STORAGEKEY.PROPGAMEDATA,t),t},e.defaultPropData=function(){return{time:c.default.format(r.CALENDARNAMES[7],c.default.getInstance().nowDate),daily:{prop_remove:2,prop_cancel:2,prop_random:2},topic:{prop_remove:2,prop_cancel:2,prop_random:2}}},e.user={uid:0,levelNum:0,openId:"",zoneId:1,unionId:"",gender:0,token:"",avatar:"",nickName:"",agreement:!1,deviceId:"",note:"",like_count:0,skinName:"",skinId:101,inviteCode:"",serverName:"",serverId:"",channel:"",userId:""},e.rankUserInfo=null,e.region=null,e.cacheTime=60,e.topicModel=null,e.topicRankInfo=null,e.bulletsWin=[{content:"\u7ec8\u4e8e\u6392\u4e0a\u4e86",mid:1,type:0},{content:"\u8f7b\u677e\u901a\u8fc7~",mid:2,type:0},{content:"\u4eca\u5929\u592a\u7b80\u5355",mid:3,type:0},{content:"\u7f8a\u4e86\u4e2a\u7f8a",mid:4,type:0},{content:"\u96c4\u8d77\uff01",mid:5,type:1},{content:"\u52a0\u6cb9\uff01",mid:6,type:1},{content:"yyds",mid:7,type:1},{content:"666",mid:8,type:1},{content:"\u51b2\u9e2d",mid:9,type:1},{content:"\u51b2\u51b2\u51b2",mid:10,type:1},{content:"\u5389\u5bb3\u4e86",mid:11,type:1}],e.bulletsFail=[{content:"\u96c4\u8d77\uff01",mid:12,type:1},{content:"\u52a0\u6cb9\uff01",mid:13,type:1},{content:"yyds",mid:14,type:1},{content:"666",mid:15,type:1},{content:"\u51b2\u9e2d",mid:16,type:1},{content:"\u51b2\u51b2\u51b2",mid:17,type:1},{content:"\u5389\u5bb3\u4e86",mid:18,type:1},{content:"\u8fc7\u4e0d\u53bb\u554a\uff01",mid:19,type:0},{content:"\u4eca\u5929\u592a\u96be\u4e86",mid:20,type:0},{content:"\u96be\u54ed\u4e86",mid:21,type:0},{content:"\u8bd5\u4e86 {0} \u6b21\u4e86",mid:22,type:2}],e}(cc.Component);o.default=l,cc._RF.pop()},{"../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","./DateManager":"DateManager","./GameManager":"GameManager"}],"data-type":[function(t,e,o){"use strict";cc._RF.push(e,"8cbe9Sgf2lHObO7pL4MBQTS","data-type"),Object.defineProperty(o,"__esModule",{value:!0}),o.ENV=void 0,function(t){t.local="local",t.beta="beta",t.online="online",t.onlineWx="onlineWx",t.leiTing="leiTing",t.onlineOppo="onlineOppo",t.onlineVivo="onlineVivo"}(o.ENV||(o.ENV={})),cc._RF.pop()},{}],dataModel:[function(t,e,o){"use strict";cc._RF.push(e,"f787b1iWeJMv6XB6Y+Z4lEb","dataModel"),Object.defineProperty(o,"__esModule",{value:!0}),cc._RF.pop()},{}],dataTs:[function(t,e,o){"use strict";cc._RF.push(e,"2b52b5mP0hOv4ijR3rDmmai","dataTs"),Object.defineProperty(o,"__esModule",{value:!0}),o.GDPlatform=void 0;var n,a=t("../manager/GameManager"),i=t("../manager/report-common"),r=t("./CcJsFunc"),c=t("./enumConfig"),s=t("./native/native-bridge"),l=t("./native/native-def"),u=t("./sdk");(function(t){t[t.android=0]="android",t[t.ios=1]="ios",t[t.wx=2]="wx",t[t.tt=3]="tt",t[t.web=4]="web",t[t.oppo=5]="oppo",t[t.vivo=6]="vivo"})(n=o.GDPlatform||(o.GDPlatform={}));var p=function(){function t(){}return t.GetVedioID=function(){return u.default.isPlatform(u.Platform.wx)?this.WXVedioID:u.default.isPlatform(u.Platform.tt)?this.TTVedioID:u.default.isPlatform(u.Platform.android)?this.AndroidVedioID:u.default.isPlatform(u.Platform.oppo)?this.OppoVedioID:u.default.isPlatform(u.Platform.vivo)?this.VivoVedioID:""},t.getGameConfigData=function(){return this.gameConfigData},t.initData=function(e){var o=this,n=this;if(cc.sys.localStorage.getItem(this.localKeyName))r=this.getUserData(),console.log("[PUSH] \u7528\u6237\u6570\u636e ###### ",JSON.stringify(r));else{this.registerUserData();var a=this.getUserData().userID;if(s.default.callNative(l.NativeFun.publicParamsInfo,{userId:a}),i.default.reportTACommon("register",{}),s.default.deviceInfo){console.log("AF af_register\u6253\u70b9");var r=t.getUserData(),c={androidid:s.default.deviceInfo.androidId,chennal:"310001",gameCode:"59",userId:r.userID,type:3};s.default.leitingReport("af_register",c),console.log("AF af_character\u6253\u70b9");var u={androidid:s.default.deviceInfo.androidId,chennal:"310001",gameCode:"59",userId:r.userID,type:3,roleId:s.default.deviceInfo.gaid,serviceName:"\u6d77\u5916\u6d4b\u8bd5\u670d",serviceId:"1"};s.default.leitingReport("af_character",u)}}var p=2;this.loadJsonData("data/levelConfigData",function(t){o.gameConfigData.levelConfigData=t,0==--p&&(e(),n.adaptCacheData())}),this.loadJsonData("data/baseConfigData",function(t){o.gameConfigData.baseConfigData=t,0==--p&&(e(),n.adaptCacheData())})},t.registerUserData=function(){if(!cc.sys.localStorage.getItem(this.localKeyName)){this.gameUserLocalData=this.registerData,u.default.isPlatform(u.Platform.android)?s.default.loginInfo&&s.default.loginInfo.userId?this.gameUserLocalData.userData.userID=s.default.loginInfo.userId:this.gameUserLocalData.userData.userID=r.default.randomCharNum():u.default.isPlatform(u.Platform.tt)?this.gameUserLocalData.userData.userID="":u.default.isPlatform(u.Platform.wx)?this.gameUserLocalData.userData.userID="":u.default.isPlatform(u.Platform.web)?(this.gameUserLocalData.userData.userID="100001",this.gameUserLocalData.userData.token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTAwMjA0MDIsIm5iZiI6MTY1ODkxODIwMiwiaWF0IjoxNjU4OTE2NDAyLCJqdGkiOiJDTTpjYXRfbWF0Y2g6bHQxMjM0NTYiLCJvcGVuX2lkIjoiIiwidWlkIjoxMDAwMDEsImRlYnVnIjoiIiwibGFuZyI6IiJ9.NQZAWBLYtq6hBff9YjNcaI2Soa6Z5vwbIU7YnjP1KBQ"):u.default.isPlatform(u.Platform.oppo)?this.gameUserLocalData.userData.userID="":u.default.isPlatform(u.Platform.vivo)?this.gameUserLocalData.userData.userID="":this.gameUserLocalData.userData.userID=r.default.randomCharNum(),this.gameUserLocalData.userData.registerTime=Date.now()+"";var t=JSON.stringify(this.gameUserLocalData);cc.sys.localStorage.setItem(this.localKeyName,t),console.log("[PUSH] \u6ce8\u518c\u7528\u6237 ###### "+t),a.default.getInstance().register=!0}},t.removeUserData=function(){cc.sys.localStorage.getItem(this.localKeyName)&&(cc.sys.localStorage.clear(),console.log("\u79fb\u9664\u672c\u5730\u7f13\u5b58 ### "))},t.isLogin=function(){var e=t.getUserData().userID,o=t.getUserData().token;return!!(e&&e.length&&o&&o.length)},t.adaptCacheData=function(){console.log("\u9002\u914d\u8001\u7528\u6237\u6570\u636e ###### ");var e=this.getUserData(),o=t.getSprintRewardData();console.log("sprintRewardData ### ",JSON.stringify(o)),1==o.isGameEd&&t.resetSprintReward(o);var n=e.unlockHouseUserData;for(var a in n)for(var i in n[a]){var r=n[a][i];if(!r.fish){var c=this.gameConfigData.baseConfigData.unlockHouseDataArray;if(c)for(var s in c)for(var l in c[s]){var u=c[s][l];if(r.unlockID==u.unlockID){r.fish=u.fish;break}}}}this.saveUserData(e),this.removeOldCacheData(e)},t.removeOldCacheData=function(t){t||(t=this.getUserData()),t.userID&&""!=t.userID&&"1"!=t.userID||(this.removeUserData(),this.registerUserData())},t.saveUserData=function(t){this.gameUserLocalData.userData=t;var e=JSON.stringify(this.gameUserLocalData);cc.sys.localStorage.setItem(this.localKeyName,e)},t.getUserData=function(){var t=cc.sys.localStorage.getItem(this.localKeyName);return this.gameUserLocalData=JSON.parse(t),this.gameUserLocalData.userData},t.getPictureData=function(){var t=cc.sys.localStorage.getItem(this.localKeyName);return this.gameUserLocalData=JSON.parse(t),this.gameUserLocalData.pictureData},t.savePictureData=function(t){this.gameUserLocalData.pictureData=t;var e=JSON.stringify(this.gameUserLocalData);cc.sys.localStorage.setItem(this.localKeyName,e)},t.getUserSetupData=function(){var t=cc.sys.localStorage.getItem(this.localKeyName);return this.gameUserLocalData=JSON.parse(t),this.gameUserLocalData.setUpData},t.saveUserSetupData=function(t){this.gameUserLocalData.setUpData=t;var e=JSON.stringify(this.gameUserLocalData);cc.sys.localStorage.setItem(this.localKeyName,e)},t.updateFirendCount=function(t){console.log("count = ",t);var e={moonCount:t};u.default.rankScoreUpdate(c.ShownType.friendRank,JSON.stringify(e),c.RefreshType.add)},t.updateTodayCount=function(t,e){var o={moonCount:t,state:e};console.log("rankData = ",o),u.default.rankScoreUpdate(c.ShownType.todayRank,JSON.stringify(o),c.RefreshType.add)},t.getDailyWinCount=function(){var e=t.getUserData();if(e.dailyData){var o=0;for(var n in e.dailyData)for(var a in e.dailyData[n])e.dailyData[n][a]&&e.dailyData[n][a].isWin&&o++;return o}return 0},t.getDailyData=function(e,o){var n=t.getUserData();if(n.dailyData[e])return n.dailyData[e][o]},t.saveDailyData=function(e,o,n){var a=t.getUserData();a.dailyData[e]?a.dailyData[e][o]=n:(a.dailyData[e]={},a.dailyData[e][o]=n),t.saveUserData(a)},t.gameLevelWin=function(t,e){e||(console.log("\u83b7\u53d6\u521a\u5b8c\u6210\u5173\u5361\u7684\u5956\u52b1\u6570\u636e, \u968f\u673a\u83b7\u53d6\u586b\u5145 ###"),e=this.getRewardBoxData(this.gameUserLocalData.userData.playLevelId)),console.log("winRewardObj ### ",JSON.stringify(e));var o=Number(e.everLevelRewardObj.coin),n=Number(e.everLevelRewardObj.fish);a.default.getInstance().gameType==c.GAMETYPE.GAMELEVEL?(o=Number(o),n=Number(n),this.gameUserLocalData.userData.playLevelId++):a.default.getInstance().gameType==c.GAMETYPE.GAMEDAILY&&(o=2*Number(o),n=2*Number(n)),this.gameUserLocalData.userData.coin+=o,this.gameUserLocalData.userData.fish+=n;var r=this.gameUserLocalData.userData.coin,s=o;if(i.default.reportTACommon("coin_get",{item_id:0,item_name:"\u91d1\u5e01",change_num:s,num_before:r-s,num_after:r,action:"\u5173\u5361\u80dc\u5229\u5956\u52b1",reason:"\u5173\u5361\u80dc\u5229\u83b7\u5f97\u91d1\u5e01",gold_num:r}),a.default.getInstance().moneyDict.coin=o+=Number(a.default.getInstance().moneyDict.coin),a.default.getInstance().moneyDict.fish=n+=Number(a.default.getInstance().moneyDict.fish),console.log("moneyDict = "+JSON.stringify(a.default.getInstance().moneyDict)),e.levelNewNum==e.levelNumMax){console.log("\u6dfb\u52a0\u5b9d\u7bb1\u5956\u52b1");for(var l=0;l=5&&(o.fish-=5,i[r].clothRank+=1,this.saveUserData(o),!0)}else console.log("\u6682\u65e0\u89e3\u9501\u732b")},t.updateCatData=function(){var e=this.gameConfigData.baseConfigData.catClothesData,o=this.gameUserLocalData.userData.playLevelId;for(var n in e)for(var a in e[n])if("level"==e[n][a].unlockType&&o>e[n][a].unlockNum){var i=this.gameUserLocalData.userData.catClothesData,r=!1;for(var c in i[n])i[n][c].clothesID==e[n][a].clothesID&&(r=!0);if(!r){var s={clothesID:e[n][a].clothesID,clothRank:1,isWear:!1};i[n].push(s),t.saveUserData(this.gameUserLocalData.userData)}}},t.updateLoveTime=function(){if(0==this.gameUserLocalData.userData.loveGetTime)return 0;var t=this.gameConfigData.baseConfigData.loveNumMax,e=this.gameUserLocalData.userData.loveGetTime,o=6e4*this.gameConfigData.baseConfigData.getLoveTime,n=Number(Date.now())-e,a=Math.floor(n/o),i=0;return a>=1?(this.gameUserLocalData.userData.love+=a,this.gameUserLocalData.userData.love>=t?(this.gameUserLocalData.userData.love=t,this.gameUserLocalData.userData.loveGetTime=0):(this.gameUserLocalData.userData.loveGetTime+=a*o,i=o-(n-a*o)),this.saveUserData(this.gameUserLocalData.userData)):i=o-(n-a*o),i},t.addLoveToMax=function(){var t=this.gameConfigData.baseConfigData.loveNumMax;this.gameUserLocalData.userData.love=e&&(this.gameUserLocalData.userData.loveGetTime=0),this.gameUserLocalData.userData.love>=5&&(this.gameUserLocalData.userData.love=5),this.saveUserData(this.gameUserLocalData.userData)},t.subLoveCount=function(t){if(this.gameUserLocalData.userData.love(o=a.default.getInstance().gameType==c.GAMETYPE.GAMELEVEL?r.dailyLevel:a.default.getInstance().gameType==c.GAMETYPE.GAMEDAILY?r.dailyLevel:a.default.getInstance().gameType==c.GAMETYPE.GAMETOPIC?r.topicLevel:r.dailyLevel).length)return console.log("\u6ca1\u6709\u5173\u5361"),void e(i);var s=o[t-1];console.log("modelLevelIdArray => ",s);for(var l=s.length,u=0,p=0;p=l){for(var o=0;o=c&&(o.bgNum=c),o.brickNum>=s&&(o.brickNum=s),this.savePictureData(o),a.default.getInstance().collectionMark.tabbarCollection=!0,Number(n.wallpaper)>0&&(a.default.getInstance().collectionMark.bgNum=o.bgNum),Number(n.brick)>0&&(a.default.getInstance().collectionMark.brickNum=o.brickNum)}return n},t.getCollectionUnlockData=function(){for(var t=this.getUserData().playLevelId-1,e=this.gameConfigData.baseConfigData.rewardCollection,o={buildNewNum:1,buildNumMax:10,buildObj:null},n=null,a=0,i=0;ia[i]&&(e.levelNewNum=t-a[i],e.levelNumMax=a[i+1]-a[i]);return e},t.getClothesData=function(e,o){for(var n=t.getGameConfigData().baseConfigData.catClothesData["cat_"+e],a=0;a=1?(console.log("\u91cd\u7f6e\u5012\u8ba1\u65f6 = "+i),t.pastTime=Date.now(),this.resetSprintReward(t),a.default.getInstance().sprintMark=!1,cc.game.emit(c.EMITKEY.MAINUPDATEUI)):r=o-(n-i*o),r},t.resetSprintReward=function(t){a.default.getInstance().gameType==c.GAMETYPE.GAMELEVEL&&(t?console.log("\u6d3b\u52a8\u7ed3\u675f\u4e2d\u65ad\u8fde\u80dc ######"):(t=this.getSprintRewardData(),console.log("\u666e\u901a\u73a9\u6cd5\u4e2d\u65ad\u8fde\u80dc ######")),t.winNum=0,t.winBox=0,t.rewardProgress=0,t.isGameEd=0,this.setSprintRewardData(t))},t.getCookieRewardData=function(){if(cc.sys.localStorage.getItem(c.STORAGEKEY.COOKIECOLLECTIONKEY)){var t=cc.sys.localStorage.getItem(c.STORAGEKEY.COOKIECOLLECTIONKEY);return JSON.parse(t)}var e={cookieNum:0,pastTime:Date.now(),progress:0},o=JSON.stringify(e);return cc.sys.localStorage.setItem(c.STORAGEKEY.COOKIECOLLECTIONKEY,o),e},t.setCookieRewardData=function(t){var e=JSON.stringify(t);cc.sys.localStorage.setItem(c.STORAGEKEY.COOKIECOLLECTIONKEY,e)},t.updateCookieRewardTime=function(){var t=this.getCookieRewardData(),e=t.pastTime,o=1e3*this.gameConfigData.baseConfigData.cookieRewardTime,n=Number(Date.now())-e,a=Math.floor(n/o),i=0;return a>=1?(console.log("\u91cd\u7f6e\u5012\u8ba1\u65f6 = "+a),t.pastTime=Date.now(),t.cookieNum=0,t.progress=0,this.setCookieRewardData(t),cc.game.emit(c.EMITKEY.MAINUPDATEUI)):i=o-(n-a*o),i},t.setItem=function(t,e,o){(!o||o<=0)&&(o=-1);var n={data:e,time:Date.now(),expire:1e3*o},a=JSON.stringify(n);cc.sys.localStorage.setItem(t,a)},t.getItem=function(t){var e=cc.sys.localStorage.getItem(t);if(e){var o=JSON.parse(e);if(o&&o.time&&o.expire){if(!(o.expire>0&&Date.now()>o.time+o.expire))return o.data;localStorage.removeItem(t)}}},t.removeItem=function(t){cc.sys.localStorage.removeItem(t)},t.getSheepClothesData=function(){var e=cc.sys.localStorage.getItem(c.STORAGEKEY.SHEEPCLOTHESDATA),o=t.gameConfigData.baseConfigData;if(!e)return o&&o.sheepClothesData&&this.setSheepClothesData(o.sheepClothesData),console.log("\u672c\u5730\u6ca1\u6709\u7f8a\u76ae\u80a4\u6570\u636e\uff0c\u8fdb\u884c\u7f13\u5b58 ###### "),o.sheepClothesData;var n=JSON.parse(e);if(o.sheepClothesData.length>n.length)for(var a=0;a=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../game/chessboard"),c=t("../game/crushArea"),s=t("../game/moveOutArea"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.chessboard=null,e.crushArea=null,e.moveOutArea=null,e.uiLayer=null,e.levelDataArray=null,e.gameIsWin=!1,e.popCallbackCollect=null,e.userData=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.initLevelLayer=function(t){this.levelDataArray=t;var e=t[0];this.gameIsWin=!1,this.chessboard.getComponent(r.default).init(e,this),this.crushArea.getComponent(c.default).initCrushArea(this),this.moveOutArea.getComponent(s.default).initMoveOutArea(this),this.node.active=!0,this.popCallbackCollect={continueCallBack:this.playNextLevel.bind(this),returnMainCallBack:this.showMainLayer.bind(this),rebornGameCallBack:this.rebornGameFunc.bind(this),giveUpCallBack:this.giveUpFunc.bind(this),restartCallBack:this.restartNowLevel.bind(this)}},e.prototype.hideLayer=function(){this.node.active=!1},e.prototype.playNextLevel=function(){},e.prototype.restartNowLevel=function(){},e.prototype.showSetUpLayer=function(){},e.prototype.showMainLayer=function(){},e.prototype.gameWinFunc=function(){},e.prototype.gameOverFunc=function(){console.log("\u6e38\u620f\u5931\u8d25",this.levelDataArray);var t={popName:"failPop",showPopData:{popCallbackCollect:this.popCallbackCollect}};cc.game.emit("showPop",t)},e.prototype.giveUpFunc=function(){cc.game.emit("closeAllPop")},e.prototype.rebornGameFunc=function(){console.log("\u8fd9\u91cc\u6709\u4e2a\u770b\u89c6\u9891"),cc.game.emit("closeAllPop"),this.crushArea.getComponent(c.default).rebornGameFunc()},e.prototype.crushBlockNode=function(t){this.crushArea.getComponent("crushArea").addCrushAreaCardNode(t);var e=this.chessboard.getComponent(r.default).checkGameWin(),o=this.moveOutArea.getComponent(s.default).checkGameWin();e&&o&&(console.log("\u6e38\u620f\u80dc\u5229\uff01"),this.gameIsWin=!0)},e.prototype.crushAnimateCallback=function(){this.gameIsWin&&this.gameWinFunc()},i([p(cc.Node)],e.prototype,"mainLayer",void 0),i([p(cc.Node)],e.prototype,"chessboard",void 0),i([p(cc.Node)],e.prototype,"crushArea",void 0),i([p(cc.Node)],e.prototype,"moveOutArea",void 0),i([p(cc.Node)],e.prototype,"uiLayer",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../game/chessboard":"chessboard","../game/crushArea":"crushArea","../game/moveOutArea":"moveOutArea"}],editorGameUiLayer:[function(t,e,o){"use strict";cc._RF.push(e,"74ee14/EMlALpPmiwWxivjL","editorGameUiLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../game/chessboard"),s=t("../game/crushArea"),l=t("./editorGameLayer"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.removeBtn=null,e.cancelBtn=null,e.randomBtn=null,e.setUpBtn=null,e.moveOutArea=null,e.chessboardNode=null,e.crushArea=null,e.paddingHeight=70,e.userData=null,e.isMoving=!1,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchStartScale(this.removeBtn),r.default.addbtnTouchEndScale(this.removeBtn,this.removeEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.removeBtn),r.default.addbtnTouchStartScale(this.cancelBtn),r.default.addbtnTouchEndScale(this.cancelBtn,this.cancelEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.cancelBtn),r.default.addbtnTouchStartScale(this.randomBtn),r.default.addbtnTouchEndScale(this.randomBtn,this.randomEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.randomBtn),r.default.addbtnTouchStartScale(this.setUpBtn),r.default.addbtnTouchEndScale(this.setUpBtn,this.setUpEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.setUpBtn)},e.prototype.initGameUi=function(){this.isMoving=!1;var t=this.removeBtn.height+this.paddingHeight,e=-(cc.winSize.height/2+this.removeBtn.height/2);this.removeBtn.y=e,this.cancelBtn.y=e,this.randomBtn.y=e,cc.tween(this.removeBtn).by(.4,{y:t}).start(),cc.tween(this.cancelBtn).by(.4,{y:t}).start(),cc.tween(this.randomBtn).by(.4,{y:t}).start()},e.prototype.removeGameUiBtn=function(){var t=this;this.isMoving=!0,this.removeBtn.height,this.paddingHeight;var e=-(cc.winSize.height/2+this.removeBtn.height/2);cc.tween(this.removeBtn).to(.4,{y:e}).start(),cc.tween(this.cancelBtn).to(.4,{y:e}).start(),cc.tween(this.randomBtn).to(.4,{y:e}).call(function(){t.isMoving=!1},this).start()},e.prototype.setUpEndFunc=function(){this.node.parent.getComponent(l.default).hideLayer()},e.prototype.removeEndFunc=function(){this.crushArea.getComponent(s.default).moveOutBlock()},e.prototype.cancelEndFunc=function(){this.crushArea.getComponent(s.default).cancelOneStep()},e.prototype.randomEndFunc=function(){this.chessboardNode.getComponent(c.default).updateBlockArea()},i([d(cc.Node)],e.prototype,"removeBtn",void 0),i([d(cc.Node)],e.prototype,"cancelBtn",void 0),i([d(cc.Node)],e.prototype,"randomBtn",void 0),i([d(cc.Node)],e.prototype,"setUpBtn",void 0),i([d(cc.Node)],e.prototype,"moveOutArea",void 0),i([d(cc.Node)],e.prototype,"chessboardNode",void 0),i([d(cc.Node)],e.prototype,"crushArea",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../game/chessboard":"chessboard","../game/crushArea":"crushArea","./editorGameLayer":"editorGameLayer"}],editorPopCommon:[function(t,e,o){"use strict";cc._RF.push(e,"ff5d494wMpLzo5RKnYVG0uZ","editorPopCommon");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=(r.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.start=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.starFunc,this),this.node.on(cc.Node.EventType.TOUCH_END,this.endFunc,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.moveFunc,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.cancelFunc,this),this.node.on(cc.Node.EventType.MOUSE_DOWN,this.mouseDown,this),this.node.on(cc.Node.EventType.MOUSE_ENTER,this.mouseEnter,this),this.node.on(cc.Node.EventType.MOUSE_MOVE,this.mouseMove,this),this.node.on(cc.Node.EventType.MOUSE_LEAVE,this.mouseLeave,this)},e.prototype.starFunc=function(t){t.stopPropagation()},e.prototype.endFunc=function(t){t.stopPropagation()},e.prototype.moveFunc=function(t){t.stopPropagation()},e.prototype.cancelFunc=function(t){t.stopPropagation()},e.prototype.mouseDown=function(t){t.stopPropagation()},e.prototype.mouseEnter=function(t){t.stopPropagation()},e.prototype.mouseMove=function(t){t.stopPropagation()},e.prototype.mouseLeave=function(t){t.stopPropagation()},i([c],e)}(cc.Component));o.default=s,cc._RF.pop()},{}],editorTips:[function(t,e,o){"use strict";cc._RF.push(e,"fd10fv9y+ZEtaYplTuo+/L4","editorTips");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tipsLabel=null,e}return a(e,t),e.prototype.start=function(){cc.game.on("showTips",this.showTips,this)},e.prototype.showTips=function(t){this.tipsLabel.node.active=!0,this.tipsLabel.string=t+"",cc.tween(this.tipsLabel.node).delay(1.5).call(function(){this.tipsLabel.node.active=!1},this).start()},i([s(cc.Label)],e.prototype,"tipsLabel",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],enumConfig:[function(t,e,o){"use strict";cc._RF.push(e,"4c6b3ttKLVHnrBFJtUOvdja","enumConfig"),Object.defineProperty(o,"__esModule",{value:!0}),o.RefreshType=o.ShownType=o.MODULETYPE=o.LangEnum=o.STORAGEKEY=o.EMITKEY=o.GAMEBLOCK=o.GAMEOVER=o.WEEK=o.CALENDAR=o.DAYTYPE=o.CALENDARNAMES=o.CALENDARITEM=o.ROOMTYPE=o.MAINPAGE=o.GAMETYPE=o.GAMEENV=void 0,function(t){t[t.ENVDEVELOP=1]="ENVDEVELOP",t[t.ENVTRAIL=2]="ENVTRAIL",t[t.ENVRELEASE=3]="ENVRELEASE"}(o.GAMEENV||(o.GAMEENV={})),function(t){t[t.GAMEMAIN=0]="GAMEMAIN",t[t.GAMETOMB=1]="GAMETOMB",t[t.GAMELEVEL=2]="GAMELEVEL",t[t.GAMEDAILY=3]="GAMEDAILY",t[t.GAMETOPIC=4]="GAMETOPIC"}(o.GAMETYPE||(o.GAMETYPE={})),function(t){t[t.PAGERANK=0]="PAGERANK",t[t.PAGEHOUSE=1]="PAGEHOUSE",t[t.PAGEMAIN=2]="PAGEMAIN",t[t.PAGEDAILY=3]="PAGEDAILY",t[t.PAGECOLLECT=4]="PAGECOLLECT"}(o.MAINPAGE||(o.MAINPAGE={})),function(t){t[t.ROOMONE=1]="ROOMONE",t[t.ROOMTWO=2]="ROOMTWO",t[t.ROOMTHREE=3]="ROOMTHREE"}(o.ROOMTYPE||(o.ROOMTYPE={})),function(t){t[t.ITEMLAST=1]="ITEMLAST",t[t.ITEMOLD=2]="ITEMOLD",t[t.ITEMNOW=3]="ITEMNOW",t[t.ITEMFUTURE=4]="ITEMFUTURE",t[t.ITEMNEXT=5]="ITEMNEXT",t[t.ITEMNOR=6]="ITEMNOR",t[t.ITEMSELE=7]="ITEMSELE",t[t.ITEMSUC=8]="ITEMSUC"}(o.CALENDARITEM||(o.CALENDARITEM={})),o.CALENDARNAMES=["yyyy\u5e74","yyyy\u5e74mm\u6708","yyyy\u5e74mm\u6708dd\u65e5","m-d","yyyy-m-d","yyyymm","yyyymmdd","yyyy-mm-dd","yyyy-mm-dd hh:mm:ss","hh:mm:ss"],function(t){t[t.TODAY=0]="TODAY",t[t.YESTERDAY=1]="YESTERDAY",t[t.TOMORROW=2]="TOMORROW",t[t.NONE=3]="NONE"}(o.DAYTYPE||(o.DAYTYPE={})),function(t){t[t.YEAR=0]="YEAR",t[t.MONTH=1]="MONTH",t[t.DAY=2]="DAY",t[t.WEEK=3]="WEEK"}(o.CALENDAR||(o.CALENDAR={})),function(t){t[t.SUN=0]="SUN",t[t.MON=1]="MON",t[t.TUE=2]="TUE",t[t.WED=3]="WED",t[t.THU=4]="THU",t[t.FEI=5]="FEI",t[t.SAT=6]="SAT"}(o.WEEK||(o.WEEK={})),function(t){t[t.NONE=0]="NONE",t[t.LEVELWIN=1]="LEVELWIN",t[t.LEVELFAIL=2]="LEVELFAIL",t[t.DAILYWIN=3]="DAILYWIN",t[t.DAILYFAIL=4]="DAILYFAIL"}(o.GAMEOVER||(o.GAMEOVER={})),function(t){t[t.NONE=0]="NONE",t[t.BLOCKCOOKIE=1]="BLOCKCOOKIE",t[t.BLOCKGOLD=2]="BLOCKGOLD"}(o.GAMEBLOCK||(o.GAMEBLOCK={})),function(t){t.MAINUPDATEUI="MAINUPDATEUI",t.UPDATETABBARRECEIVE="UPDATETABBARRECEIVE",t.UPDATETABBARSEND="UPDATETABBARSEND",t.SHOWMASKLAYER="SHOWMASKLAYER",t.HIDEMASKLAYER="HIDEMASKLAYER",t.UPDATEPICTURE="UPDATEPICTURE",t.SHOWMAINTIPS="showMainTips",t.SHOWTRANSITLAYER="showTransitLayer",t.RESTARTNOWLEVEL="restartNowLevel",t.SHOWMAINLAYER="showMainLayer",t.SHOWPOP="showPop",t.CLOSEALLPOP="closeAllPop",t.UPDATEPOPDATA="UPDATEPOPDATA",t.TTSTARTRECORD="TTSTARTRECORD",t.TTSTOPRECORD="TTSTOPRECORD",t.TTSHARERECORD="TTSHARERECORD",t.UPDATERANKDATA="UPDATERANKDATA",t.SHOWUSERNODE="SHOWUSERNODE",t.USERINFOSUCCESS="USERINFOSUCCESS",t.RANKUSERINFOSUCCESS="RANKUSERINFOSUCCESS",t.BULLETSEND="BULLETSEND",t.BULLETSTATE="BULLETSTATE",t.GAMEOVERRESTART="GAMEOVERRESTART",t.GAMEOVERSUCCESS="GAMEOVERSUCCESS",t.BEGINGAME="BEGINGAME",t.SHOWMODULE="SHOWMODULE",t.TOPICACCOUNT="TOPICACCOUNT",t.TOPICRANKINFO="TOPICRANKINFO",t.TOPICPOSITION="TOPICPOSITION",t.CHANGESHEEPCLOTHES="CHANGESHEEPCLOTHES"}(o.EMITKEY||(o.EMITKEY={})),function(t){t.GAMEUSERLOCALDATA="gameUserLocalData",t.SPRINTREWARDKEY="SPRINTREWARDKEY",t.COOKIECOLLECTIONKEY="COOKIECOLLECTIONKEY",t.BULLETSWITCH="BULLETSWITCH",t.TAUSERINFO="TAUSERINFO",t.RANKDATA="RANKDATA",t.BULLETDATA="BULLETDATA",t.STAGEDATA="STAGEDATA",t.GAMEDAILYLEVELDATA="GAMEDAILYLEVELDATA",t.GAMETOPICLEVELDATA="GAMETOPICLEVELDATA",t.SHEEPCLOTHESDATA="SHEEPCLOTHESDATA",t.TOPICMATCHRECORD="TOPICMATCHRECORD",t.PROPGAMEDATA="PROPGAMEDATA",t.GAMELOADING="GAMELOADING"}(o.STORAGEKEY||(o.STORAGEKEY={})),function(t){t.zhCN="zh",t.enUS="en"}(o.LangEnum||(o.LangEnum={})),function(t){t[t.COMMON=0]="COMMON",t[t.TOPIC=1]="TOPIC"}(o.MODULETYPE||(o.MODULETYPE={})),function(t){t.friendRank="friendRank",t.todayRank="todayRank"}(o.ShownType||(o.ShownType={})),(o.RefreshType||(o.RefreshType={})).add="add",cc._RF.pop()},{}],"export-helper":[function(t,e,o){"use strict";cc._RF.push(e,"c00e4AjhHVJqoY4uheCWzQM","export-helper"),Object.defineProperty(o,"__esModule",{value:!0}),o.math=void 0;var n=cc.EPSILON,a=function(){function t(){}return t.approx=function(t,e,o){return o=o||n,Math.abs(t-e)<=o},t.lerp=function(t,e,o){return t+(e-t)*o},t.equals=function(t,e){return Math.abs(t-e)<=n*Math.max(1,Math.abs(t),Math.abs(e))},t}();o.math=a,cc._RF.pop()},{}],export:[function(t,e){"use strict";cc._RF.push(e,"aff89des1lECqfQBjTG1TrU","export"),cc._RF.pop()},{}],failPop:[function(t,e,o){"use strict";cc._RF.push(e,"015c33YCudGR46pDyw1Hejz","failPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/native/share"),d=t("../common/native/tt-sdk"),h=t("../common/sdk"),f=t("../common/spine"),m=t("../manager/GameManager"),g=t("../manager/report-common"),y=t("../../script/manager/data-manager"),v=t("../utils/uma/uma-sdk"),b=t("../api/api-sheep"),_=cc._decorator,N=_.ccclass,C=_.property,w=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.fainNode=null,e.descLabel=null,e.failNumLabel=null,e.restartNode=null,e.backNode=null,e.tombNode=null,e.tombBubble=null,e.tombDesc=null,e.tombParticle=null,e.rankNode=null,e.rankPreLabel=null,e.rankNumLabel=null,e.rankLastLabel=null,e.shareNode=null,e.shareBtn=null,e.noShareBtn=null,e.shareCloseBtn=null,e.bottomShareBtn=null,e.rebornGameCallBack=null,e.giveUpCallBack=null,e.failNodeNum=400,e.popCallbackCollect=null,e.userData=null,e.showPopData=null,e.rankUserData=null,e.type=0,e}return a(e,t),e.prototype.start=function(){cc.game.on(u.EMITKEY.GAMEOVERSUCCESS,this.requestUserData.bind(this)),this.popCallbackCollect={buyCallBack:this.buyCallBackFunc.bind(this),freeCallBack:this.freeCallBackFunc.bind(this),exitCallBack:this.exitCallBackFunc.bind(this)},s.default.addTargetTouchUpInside(this.restartNode,this.restartNodeFunc.bind(this)),s.default.addTargetTouchUpInside(this.backNode,this.backNodeFunc.bind(this)),s.default.addbtnTouchStartScale(this.shareBtn),s.default.addbtnTouchEndScale(this.shareBtn,this.shareBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.shareBtn),s.default.addbtnTouchStartScale(this.noShareBtn),s.default.addbtnTouchEndScale(this.noShareBtn,this.noShareBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.noShareBtn),s.default.addbtnTouchStartScale(this.shareCloseBtn),s.default.addbtnTouchEndScale(this.shareCloseBtn,this.shareCloseBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.shareCloseBtn),s.default.addTargetTouchUpInside(this.bottomShareBtn,this.bottomShareBtnFunc.bind(this))},e.prototype.restartNodeFunc=function(){cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL)},e.prototype.backNodeFunc=function(){cc.game.emit(u.EMITKEY.SHOWMAINLAYER)},e.prototype.bottomShareBtnFunc=function(){this.shareNode.active=!0,this.shareNode.stopAllActions(),cc.tween(this.shareNode).set({scale:0,opacity:0}).delay(1).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start()},e.prototype.shareBtnFunc=function(){var t=this;l.default.isPlatform(l.GDPlatform.tt)?d.default.shareTemplate(function(e){e&&(t.shareNode.active=!1,t.showButton())}):l.default.isPlatform(l.GDPlatform.wx)?p.default.shareMethod({success:function(){},fail:function(){},complete:function(){}}):this.node.active=!1},e.prototype.noShareBtnFunc=function(){this.shareNode.active=!1,this.showButton()},e.prototype.shareCloseBtnFunc=function(){this.shareNode.active=!1,this.showButton()},e.prototype.showFailPop=function(t){this.node.active=!0,this.showPopData=t,t.popCallbackCollect&&(this.rebornGameCallBack=t.popCallbackCollect.rebornGameCallBack,this.giveUpCallBack=t.popCallbackCollect.giveUpCallBack),this.restartNode.active=!1,this.backNode.active=!1,this.tombNode.active=!1,this.rankNode.active=!1,this.tombParticle.active=!1,this.shareNode.active=!1,this.bottomShareBtn.active=!1;var e=t.failType;this.failNumLabel.string="",console.log("failType = "+e),1==e?console.log("\u590d\u6d3b ###### "):2==e&&console.log("\u91cd\u65b0\u6311\u6218 ###### "),this.playShowAnimate()},e.prototype.requestUserData=function(){var t=this;if(this.failNumLabel.string="",m.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY)b.default.getUserRankInfo(function(e){if(0==e.err_code&&e.data&&e.data.user){t.rankUserData=e.data.user;var o=e.data.user.fail;o&&0!=o||(o=1),t.failNumLabel.string="\u4eca\u65e5\u5df2\u6311\u6218 "+o+" \u6b21"}});else if(m.default.getInstance().gameType==u.GAMETYPE.GAMETOPIC){var e=l.default.getUserData().userID;b.default.getTopicUserInfo(e,function(e){if(0==e.err_code&&e.data&&e.data.user){t.rankUserData=e.data.user;var o=e.data.user.fail;o&&0!=o||(o=1),t.failNumLabel.string="\u4eca\u65e5\u5df2\u6311\u6218 "+o+" \u6b21"}})}},e.prototype.getTeamName=function(){var t=y.default.topicModel.name.split("#");return t.length>=2?1==y.default.topicModel.info.type?t[0]:t[1]:""},e.prototype.exitCallBackFunc=function(){},e.prototype.buyCallBackFunc=function(t,e){if(console.log("type = "+t),this.userData=l.default.getUserData(),this.userData.coin>=e){if(this.userData.coin-=e,m.default.getInstance().reportProperty.resurrection_coin_cost+=e,m.default.getInstance().levelWinDict.coin+=e,l.default.saveUserData(this.userData),m.default.getInstance().coinNum+=30,this.showTipPop(t),4==t&&m.default.getInstance().gameType==u.GAMETYPE.GAMELEVEL){console.log("\u5e38\u89c4\u5173\u5361\u590d\u6d3b\u8d2d\u4e70");var o=e+"";v.default.trackEvent("game_life_buy",{coinNum:o,c_coinNum:Number(o)})}}else cc.game.emit("showMainTips",c.default.instance.trans(r.GDLanguage.coin_inadequate))},e.prototype.freeCallBackFunc=function(t){var e=this;this.type=t;var o=l.default.GetVedioID();h.default.watchAdVideo({id:o,success:function(){e.watchSuc(1)},fail:function(){console.log("\u5931\u8d25")},nofit:function(){e.shareTTAction()}})},e.prototype.watchSuc=function(t){if(this.showTipPop(),cc.game.emit(u.EMITKEY.CLOSEALLPOP),m.default.getInstance().reportProperty.resurrection_ad_frequency++,4==this.type){m.default.getInstance().sheepMark.resurgenceCount++,console.log("\u590d\u6d3b\u770b\u89c6\u9891");var e=y.default.getTAUserInfo();1==t?g.default.reportTACommon("game_life_ad",e):2==t&&g.default.reportTACommon("game_life_share",e)}},e.prototype.shareTTAction=function(){var t=this;if(h.default.isPlatform(h.Platform.wx)){var e=l.default.GetVedioID(),o=l.default.getUserData().openid;h.default.share(o,e,function(){t.shareCbMethod()},function(){cc.game.emit(u.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else if(h.default.isPlatform(h.Platform.tt)){var n={popName:"shareNodePop",showPopData:{type:2,shareCb:this.shareCbMethod.bind(this)}};cc.game.emit("showPop",n)}},e.prototype.shareCbMethod=function(){console.log("\u5206\u4eab\u6210\u529f ######"),this.watchSuc(2)},e.prototype.showTipPop=function(){this.rebornGameCallBack&&this.rebornGameCallBack(),cc.game.emit("showMainTips",c.default.instance.trans(r.GDLanguage.game_continue))},e.prototype.playShowAnimate=function(){var t=this;this.fainNode.y=0,cc.tween(this.fainNode).to(.8,{y:this.failNodeNum},{easing:cc.easing.cubicOut}).call(function(){},this).delay(.1).call(function(){t.showPopData&&2==t.showPopData.failType?t.showRestartNode():m.default.getInstance().sheepMark.resurgenceCount>=1?t.showRestartNode():t.showPropPop(4)}).start()},e.prototype.showRestartNode=function(){console.log("\u91cd\u65b0\u6311\u6218");var t=y.default.getTAUserInfo();g.default.reportTACommon("game_over",t),cc.game.emit(u.EMITKEY.GAMEOVERRESTART),this.tombNode.active=!0,this.rankUserData?this.showFailTomb(this.rankUserData.fail):this.showFailTomb(1)},e.prototype.setupDescMethods=function(t){var e=["12345\uff0c\u4e0a\u5c71\u6253\u8001\u864e\uff0c\u8981\u60f3\u8fc7\u6b64\u5173\uff0c\u5c31\u8981\u809d\u809d\u809d","\u4eba\u751f\u5f97\u610f\u987b\u5c3d\u6b22\uff0c\u4e0d\u8fc7\u6b64\u5173\u5fc3\u4e0d\u7518\uff01","\u6211\u53ea\u662f\u4e3a\u4e86\u5792\u575f\u5934\uff0c\u5e76\u4e0d\u662f\u8981\u8fc7\u5173\uff01","\u4e3a\u6211\u7701\u4e89\u5149\uff0c\u5fc5\u987b\u62ff\u4e0b","\u4ee5\u6211\u7684\u667a\u6167\u62ff\u4e0b\u5b83\uff0c\u5e94\u8be5\u4e0d\u6210\u95ee\u9898","\u5931\u8d25\u662f\u6210\u529f\u4e4b\u6bcd\uff0c\u7f8a\u513f\u5b50\u8fd8\u5728\u7b49\u7740\u4f60\uff01","\u4e0d\u591f\uff01\u8fd8\u4e0d\u591f\uff01\u6211\u8fd8\u80fd\u518d\u809d100\u56de\u5408","\u6211\u90fd\u6b7b\u8fd9\u4e48\u591a\u6b21\u5566\uff0c\u65f6\u95f4\u8fc7\u7684\u771f\u5feb\uff01","\u9769\u547d\u5c1a\u672a\u6210\u529f\uff0c\u540c\u5fd7\u4ecd\u9700\u52aa\u529b\uff01","\u5dee\u4e00\u70b9\u5c31\u8fc7\u4e86\uff0c\u4f60\u8bf4\u6c14\u4eba\u4e0d\uff01","\u4f60\u786e\u5b9a\u8fd9\u4e48\u6c14\u4eba\u7684\u6e38\u620f\uff0c\u4e0d\u53bb\u6c14\u6c14\u670b\u53cb\uff1f","\u53c8\u5931\u8d25\u4e86\uff0c\u592a\u96be\u4e86","\u53c8\u53c8\u53c8\u5931\u8d25\u4e86\uff0c\u518d\u8bd5\u6700\u540e\u4e00\u6b21","\u53c8\u53c8\u53c8\u53c8\u53c8\u5931\u8d25\u4e86\uff0c\u8981\u4e0d\u653e\u5f03\u5427","\u53c8\u53c8\u53c8\u53c8\u53c8\u53c8\u5931\u8d25\u4e86\uff0c\u8fc7\u4e0d\u53bb\u5c31\u4e0d\u7761\u89c9\u4e86","**\u7b56\u5212\u786e\u5b9a\u8fd9\u662f\u53ef\u4ee5\u8fc7\u7684\u4e48\uff1f","*************\u7b56\u5212\uff0c******\u6bcd\uff01","\u653e\u5f03\u5427\uff0c\u4f55\u82e6\u4e3a\u96be\u81ea\u5df1\u5462","\u4e2d\u56fd\u4eba\u4e0d\u6b3a\u8d1f\u4e2d\u56fd\u4eba\uff0c\u7b56\u5212\u4f60*****","\u6d3b\u7740\u4e0d\u597d\u4e48\uff0c\u975e\u5f97\u8981\u6c14\u6b7b\u81ea\u5df1\u4e48\uff1f","\u751f\u5f53\u4f5c\u7f8a\u6770\uff0c\u6b7b\u4ea6\u4e3a\u7891\u96c4\uff01","\u6ee1\u773c\u5192\u91d1\u661f\uff0c\u6211\u7891\u4eae\u6676\u6676\uff01","\u5f53\u4e0d\u4e86\u7f8a\uff0c\u6211\u4e5f\u8981\u505a\u6211\u670b\u53cb\u5708\u6700\u4eae\u7684\u7891\uff01\u8036\uff01","\u8fd8\u5dee\u4e00\u70b9\uff1f\u6211\u4fe1\u4f60\u4e2a\u9b3c\uff0c\u4f60\u4e2a\u7cdf\u8001\u5934\u5b50***\uff01","\u554a\uff01\u554a\uff01\u554a\uff01\u554a\uff01\u554a\uff01wwwwww\uff01","\u6ca1\u4e8b\uff0c\u4ed6\u4eec\u4e5f\u8fc7\u4e0d\u4e86\uff01","\u4f60\u7ed9\u6211\u7b49\u7740\uff0c\u6211\u8ba9\u6211\u4e03\u5927\u59d1\u516b\u5927\u59e8\u90fd\u6765\uff0c\u6211\u5c31\u4e0d\u4fe1\u4e86\uff01"],o=["\u65e2\u7136\u9009\u62e9\u4e86\uff0c\u5c31\u9700\u8981\u65e0\u6761\u4ef6\u7684\u8fc7\u5173","\u7f8a\u7f8a\u4e91\u68af\uff0c\u6211\u6765\u4e86\uff01","\u6211\u4e5f\u8981\u7f8a\uff5e\u7f8a\uff5e\u7f8a\uff5e","\u4e3a\u4e86\u9635\u8425\u800c\u6218\uff0c\u8d25\u800c\u4e0d\u9981(nei)\uff01","\u5373\u4f7f\u7f8a\u7fa4\u6ca1\u6709\u6211\uff0c\u57fa\u5730\u4e5f\u9700\u8981\u6211\u53bb\u5efa\u8bbe\uff01","\u4e00\u6b21\u5c31\u597d\uff0c\u8ba9\u6211\u5f53\u7f8a\u53bb\u4ee3\u8868\u4ee3\u8868\u5427\uff01","\u4e24\u519b\u5bf9\u5792\u5c31\u662f\u5e72\uff0c\u4e0d\u80fd\u6002\uff0ccome\uff5eon\uff5e\u5317\u9f3b\uff01","\u4e0d\u80fd\u6da8\u4e86\u5bf9\u9762\u6c14\u52bf\uff0c\u706d\u4e86\u81ea\u5df1\u5a01\u98ce\uff01","\u5bf9\u9762\u662f\u4e2a\u5c41\uff01\u518d\u6765\u4e00\u6b21\uff0c\u6211\u4e0d\u80fd\u5f53\u5c41\uff01","\u5f53\u7f8a\u6211\u4e0d\u884c\uff0c\u5632\u8bbd\u5bf9\u65b9\u6211\u884c\uff01","\u91cd\u5728\u53c2\u4e0e\uff0c\u8f93\u8d62\u4e0d\u91cd\u8981\uff0c\u4e48\uff1f\u4e0d\u80fd\u8f93\uff01","\u4e0d\u4e89\u9992\u5934\u84b8\u53e3\u6c14\uff0c\u5144\u5f1f\u4eec\u7b49\u7740\u6211\uff01","\u8bf4\u670d\u81ea\u5df1\u518d\u6765\u4e00\u6b21\uff0c\u8bf4\u670d\u5bf9\u9762\u653e\u5f03\uff01","\u6211\u611f\u89c9\u6211\u5df2\u7ecf\u5c3d\u529b\u4e86\uff0c\u5144\u5f1f\u4eec\u52a0\u6cb9\uff01","\u8fd9\u4e5f\u592a\u96be\u4e86\uff0c\u7f8a\u961f\u8fdb\u5165\u592a\u7a7a\uff0c\u5c31\u5dee\u6211\u4e86\uff01","\u7f8a\u7f8a\u8fd9\u4e48\u53ef\u7231\uff0c\u7b56\u5212\u662f\u4e2a*****x\uff01","\u5173\u5361\u597d\u96be\uff01\u7b56\u5212\u597d\u574f\uff01\u4f46\u662f\u6211\u597d\u559c\u6b22\u554a\uff01\u54c8\u54c8\uff5e","\u4e0d\u96be\u4e0d\u80fd\u51f8\u663e\u6211\u7684\u667a\u6167\uff0c\u518d\u6765\u4e00\u6b21\uff01","\u4e0d\u96be\u4e0d\u80fd\u51f8\u663e\u6211\u7684\u667a\u6167\uff0c\u518d\u6765\u4e00\u6b21\uff01","\u4e0d\u96be\u4e0d\u80fd\u51f8\u663e\u6211\u7684\u667a\u6167\uff0c\u518d\u6765\u4e00\u6b21\uff01"];if(1<=t&&t<=8){var n=1;return 1==t?n=s.default.randomNum(0,5):2==t?n=s.default.randomNum(2,8):3==t?n=s.default.randomNum(3,10):4==t?n=s.default.randomNum(4,12):5==t?n=s.default.randomNum(8,14):6==t?n=s.default.randomNum(10,16):7==t?n=s.default.randomNum(14,18):8==t?n=s.default.randomNum(15,20):9==t?n=s.default.randomNum(15,21):10==t?n=s.default.randomNum(15,22):11==t&&(n=s.default.randomNum(15,27)),m.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY?(n>=e.length&&(n=e.length-1),e[n]):m.default.getInstance().gameType==u.GAMETYPE.GAMETOPIC?(n>=o.length&&(n=o.length-1),o[n]):""}},e.prototype.showFailTomb=function(t){this.tombBubble.scale=0,cc.tween(this.tombBubble).to(.3,{scale:1},{easing:cc.easing.backOut}).start();var e=y.default.getDeadNum(t),o="Dead"+e;if(this.tombNode.getComponent(f.default).play(o,0),this.tombDesc.string=this.setupDescMethods(e),this.rankNode.active=!0,cc.tween(this.rankNode).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start(),this.rankPreLabel.string="",this.rankLastLabel.string="",this.rankNumLabel.string="",m.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY){this.rankPreLabel.string="\u60a8\u6240\u5728\u5730\u533a\u4f9d\u7136\u662f\u7b2c ",this.rankLastLabel.string=" \u540d";var n=m.default.getInstance().rankInfo.user.index;this.rankNumLabel.string=n+""}else m.default.getInstance().gameType==u.GAMETYPE.GAMETOPIC&&(this.rankPreLabel.string=this.getTeamName()+"\u7f8a\u961f\u5df2\u6709 ",this.rankLastLabel.string=" \u7f8a",y.default.topicRankInfo&&y.default.topicModel&&(1==y.default.topicModel.info.type?this.rankNumLabel.string=y.default.topicRankInfo.tomb?y.default.topicRankInfo.tomb.length+"":"0":this.rankNumLabel.string=y.default.topicRankInfo.taoist?y.default.topicRankInfo.taoist.length+"":"0"));y.default.isUpgradeNum(t+1)?(this.tombParticle.active=!0,this.tombParticle.getComponent(cc.ParticleSystem).resetSystem(),this.shareNode.active=!0,cc.tween(this.shareNode).set({scale:0,opacity:0}).delay(1).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start()):this.showButton()},e.prototype.showButton=function(){var t=this;this.restartNode.activeInHierarchy&&this.backNode.activeInHierarchy&&this.bottomShareBtn.activeInHierarchy?console.log("\u5df2\u5c55\u793ashow button"):(this.restartNode.scale=0,this.backNode.scale=0,this.bottomShareBtn.scale=0,this.restartNode.active=!0,this.backNode.active=!0,this.bottomShareBtn.active=!0,setTimeout(function(){cc.tween(t.restartNode).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start(),cc.tween(t.backNode).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start(),cc.tween(t.bottomShareBtn).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},1e3))},e.prototype.hideFailPop=function(){this.node.active=!1},e.prototype.continueFunc=function(){this.showPropPop(4)},e.prototype.giveUpFunc=function(){this.giveUpCallBack&&this.giveUpCallBack()},e.prototype.showPropPop=function(t){var e={popName:"getPropPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:t,coinNum:m.default.getInstance().coinNum}};cc.game.emit("showPop",e)},i([C(cc.Node)],e.prototype,"fainNode",void 0),i([C(cc.Label)],e.prototype,"descLabel",void 0),i([C(cc.Label)],e.prototype,"failNumLabel",void 0),i([C({type:cc.Node,tooltip:"\u91cd\u65b0\u6311\u6218"})],e.prototype,"restartNode",void 0),i([C({type:cc.Node,tooltip:"\u8fd4\u56de\u7f8a\u7fa4"})],e.prototype,"backNode",void 0),i([C({type:cc.Node,tooltip:"\u5893\u7891spine"})],e.prototype,"tombNode",void 0),i([C({type:cc.Node,tooltip:"\u5893\u7891\u6c14\u6ce1"})],e.prototype,"tombBubble",void 0),i([C({type:cc.Label,tooltip:"\u5893\u7891\u63cf\u8ff0"})],e.prototype,"tombDesc",void 0),i([C({type:cc.Node,tooltip:"\u5893\u7891\u7c92\u5b50"})],e.prototype,"tombParticle",void 0),i([C({type:cc.Node,tooltip:"\u6392\u540dbase"})],e.prototype,"rankNode",void 0),i([C({type:cc.Label,tooltip:"\u6392\u540d"})],e.prototype,"rankPreLabel",void 0),i([C({type:cc.Label,tooltip:"\u6392\u540d"})],e.prototype,"rankNumLabel",void 0),i([C({type:cc.Label,tooltip:"\u6392\u540d"})],e.prototype,"rankLastLabel",void 0),i([C(cc.Node)],e.prototype,"shareNode",void 0),i([C(cc.Node)],e.prototype,"shareBtn",void 0),i([C(cc.Node)],e.prototype,"noShareBtn",void 0),i([C(cc.Node)],e.prototype,"shareCloseBtn",void 0),i([C({type:cc.Node,tooltip:"\u5e95\u90e8\u5206\u4eab\u6309\u94ae"})],e.prototype,"bottomShareBtn",void 0),i([N],e)}(cc.Component);o.default=w,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../../script/manager/data-manager":"data-manager","../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/share":"share","../common/native/tt-sdk":"tt-sdk","../common/sdk":"sdk","../common/spine":"spine","../manager/GameManager":"GameManager","../manager/report-common":"report-common","../utils/uma/uma-sdk":"uma-sdk"}],"flying-item-pop-coin":[function(t,e,o){"use strict";cc._RF.push(e,"f8882Kqr8ZNno3Bla7FeEvc","flying-item-pop-coin");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.tipsFontLabel=null,e}return a(e,t),e.prototype.start=function(){this.popNode.active=!1,cc.game.on(r.EMITKEY.SHOWMAINTIPS,this.showTips,this)},e.prototype.showTips=function(t){var e=this;this.popNode.stopAllActions(),this.popNode.active=!0,this.tipsFontLabel.string=t+"",this.popNode.y=-100,cc.tween(this.popNode).set({opacity:255}).to(.3,{y:0}).delay(1).to(.3,{opacity:0}).call(function(){e.popNode.active=!1},this).start()},i([l(cc.Node)],e.prototype,"popNode",void 0),i([l(cc.Label)],e.prototype,"tipsFontLabel",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../common/enumConfig":"enumConfig"}],"game-top-ui":[function(t,e,o){"use strict";cc._RF.push(e,"011b2otLrtL36irPwLg72Hm","game-top-ui");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cookieNode=null,e.cookieImg=null,e.cookieNum=null,e.cookiePrefab=null,e.cookieTrailing=null,e.cookieCurCount=0,e.cookieAllCount=0,e.goldBlockCoinCount=0,e.ribbonBoxCount=0,e}return a(e,t),e.prototype.start=function(){},i([s(cc.Node)],e.prototype,"cookieNode",void 0),i([s(cc.Node)],e.prototype,"cookieImg",void 0),i([s(cc.Node)],e.prototype,"cookieNum",void 0),i([s(cc.Prefab)],e.prototype,"cookiePrefab",void 0),i([s(cc.Prefab)],e.prototype,"cookieTrailing",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],gameLayer:[function(t,e,o){"use strict";cc._RF.push(e,"4f0043pQOFO24XT2d3lGc3T","gameLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/native/audio"),l=t("../main/mainLayer"),u=t("./chessboard"),p=t("./crushArea"),d=t("./gameUiLayer"),h=t("./moveOutArea"),f=t("../common/spine"),m=t("../common/enumConfig"),g=t("../manager/GameManager"),y=t("../manager/DateManager"),v=t("../utils/uma/uma-sdk"),b=t("../../i18n/i18n"),_=t("../../i18n/gd_language"),N=t("../common/native/native-bridge"),C=t("../manager/report-common"),w=t("../manager/data-manager"),P=t("../api/api-sheep"),k=cc._decorator,S=k.ccclass,D=k.property,A=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.bgLayer=null,e.chessboard=null,e.crushArea=null,e.moveOutArea=null,e.uiLayer=null,e.gameTopUi=null,e.gameWin=null,e.gameNext=null,e.levelDataArray=null,e.gameIsWin=!1,e.popCallbackCollect=null,e.userData=null,e.playLevelNum=0,e.gameIsStop=!1,e.chessY=0,e.beginBGM=!1,e.timer=0,e.countdown=0,e}return a(e,t),e.prototype.onEnable=function(){cc.audioEngine.setMusicVolume(1),cc.game.setFrameRate(60),this.countdown=0,g.default.getInstance().playGameCount++;var t=y.default.format(m.CALENDARNAMES[6],new Date);g.default.getInstance().gameBeginDate=t},e.prototype.update=function(t){this.timer+=t,this.timer>=1&&0==this.gameIsStop&&(this.timer=0,this.countdown++)},e.prototype.start=function(){cc.game.on(m.EMITKEY.RESTARTNOWLEVEL,this.restartNowLevel,this),cc.game.on(m.EMITKEY.SHOWMAINLAYER,this.showMainLayer,this),cc.game.on(m.EMITKEY.GAMEOVERRESTART,this.gameOverRestartFunc,this),r.default.addbtnTouchStartScale(this.gameWin),r.default.addbtnTouchEndScale(this.gameWin,this.gameWinFunc.bind(this)),r.default.addbtnTouchCancelScale(this.gameWin),r.default.addbtnTouchStartScale(this.gameNext),r.default.addbtnTouchEndScale(this.gameNext,this.gameNextFunc.bind(this)),r.default.addbtnTouchCancelScale(this.gameNext),cc.sys.isBrowser?(this.gameWin.active=!0,this.gameNext.active=!0):(this.gameWin.active=!1,this.gameNext.active=!1)},e.prototype.onDisable=function(){this.chessY=0},e.prototype.adaptScreen=function(){var t=this;setTimeout(function(){g.default.getInstance().globalData.isFullScreen&&0==t.chessY&&t.chessboard.y>400&&(t.chessboard.y-=100,t.chessY=t.chessboard.y)},200),setTimeout(function(){t.onPointIsContains()},100),g.default.getInstance().gameType==m.GAMETYPE.GAMEDAILY?(this.bgLayer.color=new cc.Color(195,254,139),this.bgLayer.getChildByName("glassSP").getComponent(f.default).play("2Grass",0)):g.default.getInstance().gameType==m.GAMETYPE.GAMETOPIC&&(this.bgLayer.color=new cc.Color(65,167,143),this.bgLayer.getChildByName("glassSP").getComponent(f.default).play("2Grass2",0))},e.prototype.onPointIsContains=function(){this.chessboard.getBoundingBoxToWorld();for(var t=r.default.getWorldPosition(this.moveOutArea),e=this.chessboard.getBoundingBoxToWorld();e.contains(t);){if(this.chessboard.scale-=.05,this.chessboard.scale<.5){console.log("\u8d85\u51fa\u6700\u5c0fscale \u9000\u51fa ###### ");break}e=this.chessboard.getBoundingBoxToWorld(),console.log("\u6211\u5728\u8282\u70b9\u7684\u5185\u90e8 ###### ")}console.log("\u6211\u5728\u8282\u70b9\u7684\u5916\u90e8 ###### ",this.chessboard.scale)},e.prototype.gameNextFunc=function(){if(this.playLevelNum=3&&(t=Number(n[2]))}c.default.getLevelByID(t,function(t){if(t.length<1)return cc.game.emit("showMainTips",b.default.instance.trans(_.GDLanguage.level_inadequate)),void e.showMainLayer(m.GAMEOVER.NONE);cc.game.emit("closeAllPop"),e.initLevelLayer(t)})},e.prototype.playNumberfunc=function(){if(this.levelDataArray.length<1)this.showMainLayer(m.GAMEOVER.NONE);else{cc.game.emit("closeAllPop"),g.default.getInstance().gameType==m.GAMETYPE.GAMEDAILY?this.uiLayer.getComponent(d.default).recoverTime(1):g.default.getInstance().gameType==m.GAMETYPE.GAMETOPIC&&this.uiLayer.getComponent(d.default).recoverTime(1);var t=w.default.getGameLevelData();t?(console.log("\u83b7\u53d6\u5173\u5361\u7f13\u5b58\u6570\u636e ###### "),this.initLevelLayer(t)):this.initLevelLayer(this.levelDataArray)}},e.prototype.showSetUpLayer=function(){console.log("\u6253\u5f00\u8bbe\u7f6e\u9875\u9762");var t={popName:"setupPop",showPopData:{popCallbackCollect:this.popCallbackCollect,setupType:2}};cc.game.emit("showPop",t),this.gameIsStopFunc(!0)},e.prototype.showMainLayer=function(t){void 0===t&&(t=m.GAMEOVER.NONE),console.log("\u6253\u5f00\u4e3b\u9875\u9762 = "+t);var e=this;cc.game.emit(m.EMITKEY.SHOWTRANSITLAYER,function(o){console.log("\u53ef\u4ee5\u6253\u5f00\u4e86 gamelayer"),cc.game.emit("closeAllPop"),e.gameIsStopFunc(!0),e.mainLayer.getComponent(l.default).showMainLayer(t),e.node.active=!1,o()})},e.prototype.gameOverFunc=function(t){void 0===t&&(t=1),this.gameOverState(2),console.log("\u6e38\u620f\u5931\u8d25 failType = ",t);var e={popName:"failPop",showPopData:{popCallbackCollect:this.popCallbackCollect,failType:t}};cc.game.emit("showPop",e),this.gameIsStopFunc(!0)},e.prototype.gameOverState=function(t){g.default.getInstance().game_over=t,1==t&&this.reportData(t)},e.prototype.gameOverRestartFunc=function(){this.reportData(2)},e.prototype.reportData=function(t){var e=this,o=1;for(var n in g.default.getInstance().sheepMark){var a=g.default.getInstance().sheepMark[n];if(Number(a)>0){o=2;break}}for(var i=c.default.getSheepClothesData(),r=1,s=0;s=t){var e=c.default.getSprintRewardData();e.winNum+=1,e.rewardProgress<3?(e.rewardProgress+=1,3==e.rewardProgress&&(e.winBox+=1)):e.rewardProgress=1,e.isGameEd=0,c.default.setSprintRewardData(e);var o=[3,6,9,12,15,25,50,100];for(var n in o)if(e.winNum==o[n]){var a="richroad_level"+e.winNum,i=c.default.getUserData().playLevelId+"",r={levelNum:i,c_levelNum:Number(i)};v.default.trackEvent(a,r),console.log("\u8fde\u80dc ########",a,r);break}}this.userData=c.default.getUserData(),console.log("\u6e38\u620f\u83b7\u80dc\uff0c\u5173\u5361\u4e3a\uff1a",this.levelDataArray,this.userData.playLevelId);var s={af_level:this.userData.playLevelId};N.default.leitingReport("af_levels_achieved",s);var l=[10,20,30,40,50,60,70,80,90,100,120,150,200];for(var n in l)if(this.userData.playLevelId==l[n]){var u={af_level:this.userData.playLevelId};N.default.leitingReport("af_level"+this.userData.playLevelId,u),console.log("af_level"+this.userData.playLevelId);break}this.crushArea.getComponent(p.default).hideCrushArea(),this.uiLayer.getComponent(d.default).removeGameUiBtn();var h=c.default.getRewardBoxData(this.userData.playLevelId),f=this.userData.playLevelId>=5;c.default.gameLevelWin(f,h);var y=c.default.getCollectionUnlockData();console.log("unlockObj:",y);var b={popName:"winPop",showPopData:{popCallbackCollect:this.popCallbackCollect,winRewardObj:h,unlockObj:y,time:this.countdown}};cc.game.emit(m.EMITKEY.SHOWPOP,b),this.gameIsStopFunc(!0)}else g.default.getInstance().gameType==m.GAMETYPE.GAMEDAILY?(this.userData=c.default.getUserData(),h=c.default.getRewardBoxData(this.userData.playLevelId),c.default.gameLevelWin(!0,h),y=c.default.getCollectionUnlockData(),b={popName:"winPop",showPopData:{popCallbackCollect:this.popCallbackCollect,winRewardObj:h,unlockObj:y,time:this.countdown}},cc.game.emit(m.EMITKEY.SHOWPOP,b),this.crushArea.getComponent(p.default).hideCrushArea(),this.uiLayer.getComponent(d.default).removeGameUiBtn(),this.gameIsStopFunc(!0),this.updateTodayWin(!0)):g.default.getInstance().gameType==m.GAMETYPE.GAMETOPIC&&(b={popName:"winPop",showPopData:{popCallbackCollect:this.popCallbackCollect,time:this.countdown}},cc.game.emit(m.EMITKEY.SHOWPOP,b),this.crushArea.getComponent(p.default).hideCrushArea(),this.uiLayer.getComponent(d.default).removeGameUiBtn(),this.gameIsStopFunc(!0))},e.prototype.updateTodayWin=function(t){if(console.log("isWin = ",t),0!=this.checkIsTodayWin()){var e=y.default.format(m.CALENDARNAMES[5],new Date),o=y.default.format(m.CALENDARNAMES[6],new Date),n=c.default.getDailyData(e,o);n?n.isWin=t:n={dailyID:o,isWin:t,unLimitVideo:0,sheepNum:-1},c.default.saveDailyData(e,o,n)}else console.log("checkIsTodayWin update cache ######## false")},e.prototype.giveUpFunc=function(t){void 0===t&&(t=0),g.default.getInstance().gameType==m.GAMETYPE.GAMELEVEL&&(c.default.getSprintRewardData().winNum>0&&cc.game.emit("showPop",{popName:"sprintRewardPop",showPopData:{popCallbackCollect:null,popType:2}}),g.default.getInstance().cookieDict.cookieCurCount>0&&cc.game.emit("showPop",{popName:"loseCookiePop",showPopData:{popCallbackCollect:null,popType:0}}));var e={popName:"loseLovePop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:t}};cc.game.emit("showPop",e),this.gameIsStopFunc(!0)},e.prototype.rebornGameFunc=function(){console.log("\u8fd9\u91cc\u6709\u4e2a\u770b\u89c6\u9891"),cc.game.emit("closeAllPop"),this.gameIsStopFunc(!1),g.default.getInstance().gameType==m.GAMETYPE.GAMEDAILY&&this.uiLayer.getComponent(d.default).recoverTime(),this.crushArea.getComponent(p.default).rebornGameFunc()},e.prototype.crushBlockNode=function(t){this.crushArea.getComponent("crushArea").addCrushAreaCardNode(t);var e=this.chessboard.getComponent(u.default).checkGameWin(),o=this.moveOutArea.getComponent(h.default).checkGameWin();e&&o&&(console.log("\u6e38\u620f\u80dc\u5229\uff01"),this.gameIsWin=!0,this.gameIsStopFunc(!0))},e.prototype.crushAnimateCallback=function(){this.gameIsWin&&(this.playLevelNum=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/enumConfig"),l=t("../common/native/audio"),u=t("../common/sdk"),p=t("../manager/DateManager"),d=t("../manager/GameManager"),h=t("./chessboard"),f=t("./crushArea"),m=t("./gameLayer"),g=t("../../pre/item/prop-prefab"),y=t("../utils/uma/uma-sdk"),v=t("../manager/report-common"),b=t("../../i18n/i18n"),_=t("../../i18n/gd_language"),N=t("../manager/data-manager"),C=cc._decorator,w=C.ccclass,P=C.property,k=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.removeBtn=null,e.removeBg1=null,e.removeMask=null,e.removeNumLabel=null,e.removeVedio=null,e.cancelBtn=null,e.cancelBg1=null,e.cancelMask=null,e.cancelNumLabel=null,e.cancelVedio=null,e.randomBtn=null,e.randomBg1=null,e.randomMask=null,e.randomNumLabel=null,e.randomVedio=null,e.setUpBtn=null,e.moveOutArea=null,e.chessboardNode=null,e.crushArea=null,e.levelNode=null,e.levelNumLabel=null,e.stageOneNode=null,e.stageTwoNode=null,e.maskStage=null,e.propPrefab=null,e.paddingHeight=25,e.userData=null,e.isMoving=!1,e.timer=0,e.countdownOrogin=0,e.countdown=0,e.countdownAdd=60,e.gameIsStop=!1,e.popCallbackCollect=null,e.getPropType=0,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchStartScale(this.removeBtn),r.default.addbtnTouchEndScale(this.removeBtn,this.removeEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.removeBtn),r.default.addbtnTouchStartScale(this.cancelBtn),r.default.addbtnTouchEndScale(this.cancelBtn,this.cancelEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.cancelBtn),r.default.addbtnTouchStartScale(this.randomBtn),r.default.addbtnTouchEndScale(this.randomBtn,this.randomEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.randomBtn),r.default.addbtnTouchStartScale(this.setUpBtn),r.default.addbtnTouchEndScale(this.setUpBtn,this.setUpEndFunc.bind(this)),r.default.addbtnTouchCancelScale(this.setUpBtn),this.popCallbackCollect={buyCallBack:this.buyCallBackFunc.bind(this),freeCallBack:this.freeCallBackFunc.bind(this),exitCallBack:this.exitCallBackFunc.bind(this)}},e.prototype.exitCallBackFunc=function(){this.gameIsStopFunc(!1)},e.prototype.setTimeByLevel=function(t,e){var o=t.timeArray;if(e>o.length)cc.game.emit("showMainTips",b.default.instance.trans(_.GDLanguage.level_inadequate));else{var n=o[e-1];this.countdown=n,this.countdownOrogin=n,console.log("countdowm = "+n),this.updateTime(this.countdown)}},e.prototype.update=function(t){d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY&&0==this.gameIsStop&&(this.timer+=t,this.timer>=1&&(this.timer=0,this.countdown--,this.updateTime(this.countdown)))},e.prototype.updateTime=function(){},e.prototype.gameIsWin=function(){if(d.default.getInstance().gameType==s.GAMETYPE.GAMELEVEL){if(d.default.getInstance().levelWinDict.remove>0){var t=d.default.getInstance().levelWinDict.remove+"";y.default.trackEvent("game_finish_skill_1",{num:t,c_num:Number(t)})}if(d.default.getInstance().levelWinDict.cancel>0){var e=d.default.getInstance().levelWinDict.cancel+"";y.default.trackEvent("game_finish_skill_2",{num:e,c_num:Number(e)})}if(d.default.getInstance().levelWinDict.random>0){var o=d.default.getInstance().levelWinDict.random+"";y.default.trackEvent("game_finish_skill_3",{num:o,c_num:Number(o)})}}else{var n=this.countdown<=0?0:this.countdown,a=n+"";d.default.getInstance().reportProperty.dailyWin_time_remaining=n,y.default.trackEvent("daily_finishtime",{remainTime:a,c_remainTime:Number(a)})}},e.prototype.gameIsStopFunc=function(t){this.gameIsStop=t},e.prototype.recoverTime=function(t){void 0===t&&(t=0),this.countdown<=0&&(this.countdown=this.countdownAdd),1==t&&(this.countdown=this.countdownOrogin),this.updateTime(this.countdown)},e.prototype.initGameUi=function(t){for(var e in this.userData=c.default.getUserData(),this.userData.prop_cancel=0,this.userData.prop_random=0,this.userData.prop_remove=0,c.default.saveUserData(this.userData),d.default.getInstance().sheepMark)d.default.getInstance().sheepMark[e]=0;this.isMoving=!1;var o=this.removeBtn.height+this.paddingHeight,n=-(cc.winSize.height/2+this.removeBtn.height/2);this.removeBtn.y=n,this.cancelBtn.y=n,this.randomBtn.y=n,cc.tween(this.removeBtn).by(.4,{y:o}).start(),cc.tween(this.cancelBtn).by(.4,{y:o}).start(),cc.tween(this.randomBtn).by(.4,{y:o}).start(),this.setGameLayerUiData(),t.length>1?(this.stageTwoNode.active=!0,this.stageOneNode.active=!1):(this.stageTwoNode.active=!1,this.stageOneNode.active=!1)},e.prototype.setLevelStage=function(t){if(0==t?this.stageOneNode.active=!1:1==t&&(this.stageOneNode.active=!0),this.levelNode.active=!0,d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY){if(p.default.format(s.CALENDARNAMES[4],p.default.getInstance().selDate).split("-").length<3)return;this.levelNumLabel.string="\u6bcf\u65e5\u4e00\u5173"}else this.levelNode.active=!0},e.prototype.setGameLayerUiData=function(){this.userData=c.default.getUserData(),p.default.format(s.CALENDARNAMES[4],p.default.getInstance().selDate).split("-").length<3||(this.levelNumLabel.string="\u6bcf\u65e5\u4e00\u5173",this.userData.prop_remove>=1?(this.removeNumLabel.string=""+this.userData.prop_remove,this.removeNumLabel.node.active=!0,this.removeBg1.active=!0,this.removeVedio.active=!1,this.removeMask.active=!1):(this.removeNumLabel.node.active=!1,this.removeVedio.active=!0,d.default.getInstance().sheepMark.propRemoveCount>=1?(this.removeMask.active=!0,this.removeBg1.active=!1):(this.removeMask.active=!1,this.removeBg1.active=!0)),this.userData.prop_cancel>=1?(this.cancelNumLabel.string=""+this.userData.prop_cancel,this.cancelNumLabel.node.active=!0,this.cancelBg1.active=!0,this.cancelVedio.active=!1,this.cancelMask.active=!1):(this.cancelNumLabel.node.active=!1,this.cancelVedio.active=!0,d.default.getInstance().sheepMark.propCancelCount>=1?(this.cancelMask.active=!0,this.cancelBg1.active=!1):(this.cancelMask.active=!1,this.cancelBg1.active=!0)),this.userData.prop_random>=1?(this.randomNumLabel.string=""+this.userData.prop_random,this.randomNumLabel.node.active=!0,this.randomBg1.active=!0,this.randomVedio.active=!1,this.randomMask.active=!1):(this.randomNumLabel.node.active=!1,this.randomVedio.active=!0,d.default.getInstance().sheepMark.propRandomCount>=1?(this.randomMask.active=!0,this.randomBg1.active=!1):(this.randomMask.active=!1,this.randomBg1.active=!0)))},e.prototype.removeGameUiBtn=function(){var t=this;console.log("\u79fb\u9664\u6309\u94ae ###### "),this.isMoving=!0,this.removeBtn.height,this.paddingHeight;var e=-(cc.winSize.height/2+this.removeBtn.height);cc.tween(this.removeBtn).to(.4,{y:e}).start(),cc.tween(this.cancelBtn).to(.4,{y:e}).start(),cc.tween(this.randomBtn).to(.4,{y:e}).call(function(){t.isMoving=!1},this).start()},e.prototype.setUpEndFunc=function(){this.node.parent.getComponent(m.default).showSetUpLayer()},e.prototype.removeEndFunc=function(){if(!this.isMoving)if(this.removeMask.activeInHierarchy)cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u6bcf\u5173\u53ea\u80fd\u4f7f\u7528\u4e00\u6b21\u54e6");else if(this.userData.prop_remove>=1){if(this.crushArea.getComponent(f.default).moveOutBlock()){l.default.playAudioMusic("audio/sound/moveOut.mp3",!1),this.userData.prop_remove--,d.default.getInstance().reportProperty.remove_use++,d.default.getInstance().sheepMark.propRemoveCount++,0==d.default.getInstance().reportProperty.remove_ad&&console.log("\u4f7f\u7528\u521d\u59cb\u9053\u5177 ###### propRemove");var t=N.default.getTAUserInfo();t.item_name="\u79fb\u51fa\u9053\u5177",v.default.reportTACommon("prop_initial",t),c.default.saveUserData(this.userData),this.setGameLayerUiData(),d.default.getInstance().levelWinDict.remove+=1;var e=this.userData.prop_remove-1;e<0&&(e=0)}}else console.log("\u79fb\u51fa\u9053\u5177\u4e0d\u8db3"),this.showPropPop(1,60)},e.prototype.cancelEndFunc=function(){if(this.cancelMask.activeInHierarchy)cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u6bcf\u5173\u53ea\u80fd\u4f7f\u7528\u4e00\u6b21\u54e6");else if(this.userData.prop_cancel>=1){if(this.crushArea.getComponent(f.default).cancelOneStep()){l.default.playAudioMusic("audio/sound/moveOut.mp3",!1),this.userData.prop_cancel--,d.default.getInstance().reportProperty.cancel_use++,d.default.getInstance().sheepMark.propCancelCount++,0==d.default.getInstance().reportProperty.cancel_ad&&console.log("\u4f7f\u7528\u521d\u59cb\u9053\u5177 ###### propCancel");var t=N.default.getTAUserInfo();t.item_name="\u64a4\u9500\u9053\u5177",v.default.reportTACommon("prop_initial",t),c.default.saveUserData(this.userData),this.setGameLayerUiData(),d.default.getInstance().levelWinDict.cancel+=1;var e=this.userData.prop_cancel-1;e<0&&(e=0)}}else console.log("\u64a4\u9500\u9053\u5177\u4e0d\u8db3"),this.showPropPop(2,20)},e.prototype.randomEndFunc=function(){if(!this.isMoving)if(this.randomMask.activeInHierarchy)cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u6bcf\u5173\u53ea\u80fd\u4f7f\u7528\u4e00\u6b21\u54e6");else if(this.userData.prop_random>=1){var t=this.chessboardNode.getComponent(h.default).updateBlockArea();if(console.log("isOk ###### ",t),t){l.default.playAudioMusic("audio/sound/random.mp3",!1),this.userData.prop_random--,d.default.getInstance().reportProperty.random_use++,d.default.getInstance().sheepMark.propRandomCount++,0==d.default.getInstance().reportProperty.random_ad&&console.log("\u4f7f\u7528\u521d\u59cb\u9053\u5177 ###### propRandom");var e=N.default.getTAUserInfo();e.item_name="\u6d17\u724c\u9053\u5177",v.default.reportTACommon("prop_initial",e),c.default.saveUserData(this.userData),this.setGameLayerUiData(),d.default.getInstance().levelWinDict.random+=1;var o=this.userData.prop_random-1;o<0&&(o=0)}}else console.log("\u6d17\u724c\u9053\u5177\u4e0d\u8db3"),this.showPropPop(3,10)},e.prototype.buyCallBackFunc=function(t,e){if(console.log("coin = "+e),this.userData=c.default.getUserData(),this.userData.coin>=e){if(this.userData.coin-=e,d.default.getInstance().levelWinDict.coin+=e,this.showTipPop(t,1),d.default.getInstance().gameType==s.GAMETYPE.GAMELEVEL){var o=e+"";y.default.trackEvent("game_skill_buy",{coinNum:o,c_coinNum:Number(o)})}this.userData.coin}else cc.game.emit("showMainTips",b.default.instance.trans(_.GDLanguage.coin_inadequate))},e.prototype.freeCallBackFunc=function(t){var e=this;if(this.getPropType=t,console.log("type = "+t),u.default.isPlatform(u.Platform.wx)){var o=N.default.getPropData(),n=0;if(d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY?1==t?n=o.daily.prop_remove:2==t?n=o.daily.prop_cancel:3==t&&(n=o.daily.prop_random):d.default.getInstance().gameType==s.GAMETYPE.GAMETOPIC&&(1==t?n=o.topic.prop_remove:2==t?n=o.topic.prop_cancel:3==t&&(n=o.topic.prop_random)),n>0)return void e.shareTTAction(t);if("shareValue"==u.default.wxValue)return void e.shareTTAction(t)}var a=c.default.GetVedioID();u.default.watchAdVideo({id:a,success:function(){console.log("\u6210\u529f sdk"),cc.game.emit(s.EMITKEY.CLOSEALLPOP),e.showTipPop(t,2),d.default.getInstance().gameType==s.GAMETYPE.GAMELEVEL&&y.default.trackEvent("game_skill_ad")},fail:function(t){console.log("\u5931\u8d25 ###### = ",t),e.gameIsStopFunc(!1)},nofit:function(){e.shareTTAction(t)}})},e.prototype.shareTTAction=function(t){var e=this;if(u.default.isPlatform(u.Platform.wx)){var o=c.default.GetVedioID(),n=c.default.getUserData().openid;u.default.share(n,o,function(){e.shareCbMethod(),e.updateShareCount(t)},function(){cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else if(u.default.isPlatform(u.Platform.tt)){var a={popName:"shareNodePop",showPopData:{type:2,shareCb:this.shareCbMethod.bind(this)}};cc.game.emit("showPop",a)}},e.prototype.updateShareCount=function(t){var e=N.default.getPropData();d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY?1==t?e.daily.prop_remove--:2==t?e.daily.prop_cancel--:3==t&&e.daily.prop_random--:d.default.getInstance().gameType==s.GAMETYPE.GAMETOPIC&&(1==t?e.topic.prop_remove--:2==t?e.topic.prop_cancel--:3==t&&e.topic.prop_random--),N.default.setPropData(e)},e.prototype.shareCbMethod=function(){console.log("\u5206\u4eab\u6210\u529f ######"),cc.game.emit(s.EMITKEY.CLOSEALLPOP),this.showTipPop(this.getPropType,3)},e.prototype.showTipPop=function(t,e){var o="",n=null,a="";1==t?(o=b.default.instance.trans(_.GDLanguage.props_remove_claim),n=this.removeBtn,a="\u79fb\u51fa\u9053\u5177",this.userData.prop_remove=100,this.userData.prop_remove,1==e?d.default.getInstance().reportProperty.remove_buy++:2==e&&d.default.getInstance().reportProperty.remove_ad++):2==t?(o=b.default.instance.trans(_.GDLanguage.props_cancel_claim),n=this.cancelBtn,a="\u64a4\u9500\u9053\u5177",this.userData.prop_cancel=100,this.userData.prop_cancel,1==e?d.default.getInstance().reportProperty.cancel_buy++:2==e&&d.default.getInstance().reportProperty.cancel_ad++):3==t&&(o=b.default.instance.trans(_.GDLanguage.props_random_claim),n=this.randomBtn,a="\u6d17\u724c\u9053\u5177",this.userData.prop_random=100,this.userData.prop_random,1==e?d.default.getInstance().reportProperty.random_buy++:2==e&&d.default.getInstance().reportProperty.random_ad++);var i="\u6bcf\u65e5\u6311\u6218";d.default.getInstance().gameType==s.GAMETYPE.GAMEDAILY?i="\u6bcf\u65e5\u6311\u6218":d.default.getInstance().gameType==s.GAMETYPE.GAMETOPIC&&(i="\u8bdd\u9898\u6311\u6218"),2==e?v.default.reportTACommon("game_skill_ad",{item_name:a,game_type:i}):3==e&&v.default.reportTACommon("game_skill_share",{item_name:a,game_type:i}),c.default.saveUserData(this.userData),this.setGameLayerUiData(),cc.game.emit("showMainTips",o);var r=cc.instantiate(this.propPrefab);r.getComponent(g.default).showWithType(t,n,this.movePropFunc.bind(this)),this.node.addChild(r),this.node.setSiblingIndex(20)},e.prototype.movePropFunc=function(){this.gameIsStopFunc(!1)},e.prototype.showPropPop=function(t,e){this.gameIsStopFunc(!0);var o={popName:"getPropPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:t,coinNum:e}};cc.game.emit("showPop",o)},i([P(cc.Node)],e.prototype,"removeBtn",void 0),i([P(cc.Node)],e.prototype,"removeBg1",void 0),i([P(cc.Node)],e.prototype,"removeMask",void 0),i([P(cc.Label)],e.prototype,"removeNumLabel",void 0),i([P(cc.Node)],e.prototype,"removeVedio",void 0),i([P(cc.Node)],e.prototype,"cancelBtn",void 0),i([P(cc.Node)],e.prototype,"cancelBg1",void 0),i([P(cc.Node)],e.prototype,"cancelMask",void 0),i([P(cc.Label)],e.prototype,"cancelNumLabel",void 0),i([P(cc.Node)],e.prototype,"cancelVedio",void 0),i([P(cc.Node)],e.prototype,"randomBtn",void 0),i([P(cc.Node)],e.prototype,"randomBg1",void 0),i([P(cc.Node)],e.prototype,"randomMask",void 0),i([P(cc.Label)],e.prototype,"randomNumLabel",void 0),i([P(cc.Node)],e.prototype,"randomVedio",void 0),i([P(cc.Node)],e.prototype,"setUpBtn",void 0),i([P(cc.Node)],e.prototype,"moveOutArea",void 0),i([P(cc.Node)],e.prototype,"chessboardNode",void 0),i([P(cc.Node)],e.prototype,"crushArea",void 0),i([P(cc.Node)],e.prototype,"levelNode",void 0),i([P(cc.Label)],e.prototype,"levelNumLabel",void 0),i([P(cc.Node)],e.prototype,"stageOneNode",void 0),i([P(cc.Node)],e.prototype,"stageTwoNode",void 0),i([P(cc.Node)],e.prototype,"maskStage",void 0),i([P(cc.Prefab)],e.prototype,"propPrefab",void 0),i([w],e)}(cc.Component);o.default=k,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../../pre/item/prop-prefab":"prop-prefab","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/sdk":"sdk","../manager/DateManager":"DateManager","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common","../utils/uma/uma-sdk":"uma-sdk","./chessboard":"chessboard","./crushArea":"crushArea","./gameLayer":"gameLayer"}],gd_language:[function(t,e,o){"use strict";cc._RF.push(e,"82e75ge7rlLCb24BwrY9eZO","gd_language"),Object.defineProperty(o,"__esModule",{value:!0}),o.GDLanguage=void 0,function(t){t.main_screen="1",t.leaderboard="2",t.daily_challenge="3",t.collect="4",t.level_1="5",t.coin_more="6",t.claim_level="7",t.life_more="8",t.life_countdown="9",t.life_more_play="10",t.life_full="11",t.life_1="12",t.unlock_all="13",t.set_up="14",t.set_up_sound_effect="15",t.set_up_music="16",t.set_up_shock="17",t.set_up_contact_service="18",t.set_up_id="19",t.set_up_share="20",t.game_version="21",t.fully="22",t.upgrade_coin="23",t.coin_inadequate="24",t.upgrade="25",t.daily_play="26",t.daily_start="27",t.win_frequency="28",t.collect_title="29",t.wallpaper="30",t.wallpaper_dinner="31",t.wallpaper_lighthouse="32",t.wallpaper_lazy_time="33",t.wallpaper_waiting_alone="34",t.wallpaper_meteor_shower="35",t.wallpaper_quiet_night="36",t.wallpaper_road="37",t.wallpaper_snow="38",t.wallpaper_starry="39",t.wallpaper_commuter_road="40",t.wallpaper_moon="41",t.wallpaper_stay_tuned="42",t.block_bricks="43",t.block_remove="44",t.block_cancel="45",t.block_random="46",t.props_get="47",t.props_buy="48",t.props_free="49",t.chest_level_treasure="50",t.chest_journey="51",t.continue="52",t.pop_claim="53",t.playing_continue="54",t.version_view="55",t.not_enough_space="56",t.time_over="57",t.give_up="58",t.pop_sure="59",t.life_lose="60",t.props_remove_claim="61",t.draw_back="62",t.withdraw="63",t.put_recent="64",t.props_disrupt="65",t.shuffle_unused="66",t.revive_remove="67",t.challenge_unlocked_level="68",t.pop_restart="69",t.pop_quit="70",t.life_run_out="71",t.streak_award="72",t.streak_lose="73",t.challenge_pass="74",t.function_1="75",t.home_return="76",t.pop_player="77",t.life_more_2="78",t.full_1="79",t.pop_stacked="80",t.not_unlocked="81",t.level_new_tomorrow="82",t.level_inadequate="83",t.life_inadequate="84",t.video_see="85",t.map_over="86",t.props_remove_inadequate="87",t.props_cancel_inadequate="88",t.props_random_inadequate="89",t.props_random_claim="90",t.share_fail="91",t.coin_claim_play="92",t.life_full_play="93",t.sprint_level_3="94",t.game_continue="95",t.life_full_already="96",t.tomorrow_play="97",t.more_time="98",t.life_lose_ed="99",t.lose_cookies="100",t.resurrection="101",t.collect_cookie="102",t.ok_title="103",t.wallpaper_harbour="104",t.wallpaper_lamp="105",t.props_cancel_claim="106"}(o.GDLanguage||(o.GDLanguage={})),cc._RF.pop()},{}],getLovePop:[function(t,e,o){"use strict";cc._RF.push(e,"ed619JcknNAHJiwu50VgegD","getLovePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/util"),p=t("../utils/uma/uma-sdk"),d=cc._decorator,h=d.ccclass,f=d.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getLoveBtn=null,e.closeBtn=null,e.titleLabel=null,e.getLoveDescLabel=null,e.getLoveTimeLabel=null,e.descLabel=null,e.receiveLabel=null,e.popNode=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){s.default.addbtnTouchStartScale(this.getLoveBtn),s.default.addbtnTouchEndScale(this.getLoveBtn,this.getLoveFunc.bind(this)),s.default.addbtnTouchCancelScale(this.getLoveBtn),s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.hideGetLovePop.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),this.titleLabel.string=c.default.instance.trans(r.GDLanguage.life_more),this.getLoveDescLabel.string=c.default.instance.trans(r.GDLanguage.life_countdown),this.descLabel.string=c.default.instance.trans(r.GDLanguage.life_more_play),this.receiveLabel.string=c.default.instance.trans(r.GDLanguage.life_1)},e.prototype.showGetLovePop=function(t){this.node.active=!0,this.showPopData=t,console.log("\u83b7\u5f97\u7231\u5fc3\u5f39\u7a97",this.showPopData),cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var e=l.default.updateLoveTime();if(0==e)this.getLoveTimeLabel.string="play";else{var o=u.default.formatTime(e),n=o[2]<10?"0"+o[2]:o[2]+"",a=o[3]<10?"0"+o[3]:o[3]+"";this.getLoveTimeLabel.string=n+":"+a}},e.prototype.getLoveFunc=function(){},e.prototype.hideGetLovePop=function(){this.node.active=!1,p.default.trackEvent("life_refuse")},i([f(cc.Node)],e.prototype,"getLoveBtn",void 0),i([f(cc.Node)],e.prototype,"closeBtn",void 0),i([f(cc.Label)],e.prototype,"titleLabel",void 0),i([f(cc.Label)],e.prototype,"getLoveDescLabel",void 0),i([f(cc.Label)],e.prototype,"getLoveTimeLabel",void 0),i([f(cc.Label)],e.prototype,"descLabel",void 0),i([f(cc.Label)],e.prototype,"receiveLabel",void 0),i([f(cc.Node)],e.prototype,"popNode",void 0),i([h],e)}(cc.Component);o.default=m,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/util":"util","../utils/uma/uma-sdk":"uma-sdk"}],getPropPop:[function(t,e,o){"use strict";cc._RF.push(e,"5d202skrZlNSY1om5DswGw5","getPropPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/sdk"),d=t("../manager/data-manager"),h=t("../manager/GameManager"),f=t("../manager/report-common"),m=cc._decorator,g=m.ccclass,y=m.property,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.closeBtn=null,e.freePropBtn=null,e.popNode=null,e.titleLabel=null,e.descLabel=null,e.buyLabel=null,e.freeLabel=null,e.freeDescLabel=null,e.propImage=null,e.noBlockBtn=null,e.noWhiteBtn=null,e.beginBtn=null,e.freeBtnVideo=null,e.beginBtnVideo=null,e.timeNode=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){s.default.addbtnTouchEndScale(this.mask,this.maskBtnFunc.bind(this)),s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),s.default.addbtnTouchStartScale(this.noBlockBtn),s.default.addbtnTouchEndScale(this.noBlockBtn,this.noBlockBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.noBlockBtn),s.default.addbtnTouchStartScale(this.noWhiteBtn),s.default.addbtnTouchEndScale(this.noWhiteBtn,this.noWhiteBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.noWhiteBtn),s.default.addbtnTouchStartScale(this.freePropBtn),s.default.addbtnTouchEndScale(this.freePropBtn,this.freePropBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.freePropBtn),s.default.addbtnTouchStartScale(this.beginBtn),s.default.addbtnTouchEndScale(this.beginBtn,this.beginBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.beginBtn)},e.prototype.maskBtnFunc=function(){4!=this.showPopData.popType&&5!=this.showPopData.popType&&(this.node.active=!1)},e.prototype.closeBtnFunc=function(){this.node.active=!1,this.showPopData&&this.showPopData.popCallbackCollect&&this.showPopData.popCallbackCollect.exitCallBack()},e.prototype.noBlockBtnFunc=function(){this.node.active=!1,4==this.showPopData.popType?cc.game.emit("showPop",{popName:"failPop",showPopData:{popCallbackCollect:null,failType:2}}):5==this.showPopData.popType&&cc.game.emit(u.EMITKEY.SHOWMAINLAYER)},e.prototype.noWhiteBtnFunc=function(){this.node.active=!1,4!=this.showPopData.popType&&5!=this.showPopData.popType||cc.game.emit(u.EMITKEY.SHOWMAINLAYER)},e.prototype.freePropBtnFunc=function(){console.log("beginBtnFunc ### unLimitVideo = "+h.default.getInstance().unLimitVideo),4==this.showPopData.popType&&h.default.getInstance().sheepMark.resurgenceCount>=1?cc.game.emit(u.EMITKEY.SHOWMAINTIPS,"\u65e0\u590d\u6d3b\u673a\u4f1a"):(this.showPopData&&this.showPopData.popCallbackCollect&&this.showPopData.popCallbackCollect.freeCallBack(this.showPopData.popType),this.updateWxUI())},e.prototype.beginBtnFunc=function(){if(console.log("beginBtnFunc ### unLimitVideo = "+h.default.getInstance().unLimitVideo),h.default.getInstance().unLimitVideo)return cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL),f.default.reportTACommon("challenge_again",{}),void(this.node.active=!1);if(6==this.showPopData.popType)return this.showPopData&&this.showPopData.popCallbackCollect&&this.showPopData.popCallbackCollect.freeCallBack(this.showPopData.popType),void(this.node.active=!1);var t=this,e=l.default.GetVedioID();p.default.watchAdVideo({id:e,success:function(){cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL),f.default.reportTACommon("challenge_again",{}),t.node.active=!1},fail:function(){console.log("\u5931\u8d25")},nofit:function(){t.shareTTAction()}})},e.prototype.shareTTAction=function(){var t=this;if(p.default.isPlatform(p.Platform.wx)){var e=l.default.GetVedioID(),o=l.default.getUserData().openid;p.default.share(o,e,function(){t.shareCbMethod()},function(){cc.game.emit(u.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else if(p.default.isPlatform(p.Platform.tt)){var n={popName:"shareNodePop",showPopData:{type:2,shareCb:this.shareCbMethod.bind(this)}};cc.game.emit("showPop",n)}},e.prototype.shareCbMethod=function(){console.log("\u5206\u4eab\u6210\u529f ######"),cc.game.emit(u.EMITKEY.RESTARTNOWLEVEL),f.default.reportTACommon("challenge_again_share",{}),this.node.active=!1},e.prototype.showGetPropPop=function(t){this.node.active=!0,this.showPopData=t,this.noBlockBtn.active=!1,this.noWhiteBtn.active=!0,this.closeBtn.active=!0,this.freePropBtn.active=!0,this.beginBtn.active=!1,this.beginBtnVideo.active=!0,this.noWhiteBtn.getChildByName("label").getComponent(cc.Label).string="\u4e0d,\u8c22\u8c22",cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var e=t.popType,o="",n="",a="Buy props";if(this.freeLabel.string="\u83b7\u5f97",this.updateWxUI(),1==e)o="rewardIcon/prop_remove.png",a="\u79fb\u51fa\u9053\u5177",n=c.default.instance.trans(r.GDLanguage.draw_back),(i=1-h.default.getInstance().sheepMark.propRemoveCount)<0&&(i=0),this.freeDescLabel.string="("+i+"/1)";else if(2==e)o="rewardIcon/prop_cancel.png",a="\u64a4\u56de\u9053\u5177",n=c.default.instance.trans(r.GDLanguage.put_recent),(i=1-h.default.getInstance().sheepMark.propCancelCount)<0&&(i=0),this.freeDescLabel.string="("+i+"/1)";else if(3==e)o="rewardIcon/prop_random.png",a="\u6d17\u724c\u9053\u5177",n=c.default.instance.trans(r.GDLanguage.shuffle_unused),(i=1-h.default.getInstance().sheepMark.propRandomCount)<0&&(i=0),this.freeDescLabel.string="("+i+"/1)";else if(4==e){var i;o="rewardIcon/prop_life_remove.png",a="\u590d\u6d3b\u5417?",n="\u590d\u6d3b\u5e76\u4f7f\u7528\u79fb\u51fa\u9053\u5177",this.noBlockBtn.active=!0,this.noWhiteBtn.active=!1,this.closeBtn.active=!1,this.freeLabel.string="\u590d\u6d3b",console.log(h.default.getInstance().sheepMark.resurgenceCount),(i=1-h.default.getInstance().sheepMark.resurgenceCount)<0&&(i=0),this.freeDescLabel.string="("+i+"/1)"}else 5==e?(a="\u518d\u6b21\u6311\u6218",this.closeBtn.active=!1,this.freeDescLabel.string="",this.freeLabel.string="\u91cd\u65b0\u6311\u6218",this.noWhiteBtn.getChildByName("label").getComponent(cc.Label).string="\u8fd4\u56de\u7f8a\u7fa4",n="\u89c2\u770b\u89c6\u9891\uff0c\u4ee5\u83b7\u5f971\u6b21\n\u989d\u5916\u7684\u6311\u6218\u673a\u4f1a\u3002",o="rewardIcon/prop_life_one.png",this.freePropBtn.active=!1,this.beginBtn.active=!0,h.default.getInstance().unLimitVideo?(this.beginBtnVideo.active=!1,n="\u5df2\u83b7\u5f97\u65e0\u9650\u6b21\u6570\u6311\u6218\n\u8d76\u7d27\u8bd5\u8bd5\u5427",o="rewardIcon/prop_nolimit.png"):this.beginBtnVideo.active=!0):6==e&&(a="\u518d\u6b21\u6311\u6218",this.freeDescLabel.string="",this.freeLabel.string="\u6311\u6218\u4e00\u6b21",this.noWhiteBtn.getChildByName("label").getComponent(cc.Label).string="\u4e0d,\u8c22\u8c22",n="\u89c2\u770b\u89c6\u9891\uff0c\u4ee5\u83b7\u5f971\u6b21\n\u989d\u5916\u7684\u6311\u6218\u673a\u4f1a\u3002",o="rewardIcon/prop_life_one.png",this.freePropBtn.active=!1,this.beginBtn.active=!0);s.default.changeSpriteFrame(this.propImage,o),this.descLabel.string=n,this.titleLabel.string=a},e.prototype.updateWxUI=function(){var t=this.showPopData.popType;if(l.default.isPlatform(l.GDPlatform.wx)){var e=d.default.getPropData();console.log("propData = ",e);var o=0;h.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY?1==t?o=e.daily.prop_remove:2==t?o=e.daily.prop_cancel:3==t&&(o=e.daily.prop_random):h.default.getInstance().gameType==u.GAMETYPE.GAMETOPIC&&(1==t?o=e.topic.prop_remove:2==t?o=e.topic.prop_cancel:3==t&&(o=e.topic.prop_random)),o>0?s.default.changeSpriteFrame(this.freeBtnVideo,"rewardIcon/reward_share_black.png"):"shareValue"==p.default.wxValue?s.default.changeSpriteFrame(this.freeBtnVideo,"rewardIcon/reward_share_black.png"):s.default.changeSpriteFrame(this.freeBtnVideo,"rewardIcon/reward_video_block.png"),d.default.setPropData(e)}},i([y(cc.Node)],e.prototype,"mask",void 0),i([y(cc.Node)],e.prototype,"closeBtn",void 0),i([y(cc.Node)],e.prototype,"freePropBtn",void 0),i([y(cc.Node)],e.prototype,"popNode",void 0),i([y(cc.Label)],e.prototype,"titleLabel",void 0),i([y(cc.Label)],e.prototype,"descLabel",void 0),i([y(cc.Label)],e.prototype,"buyLabel",void 0),i([y(cc.Label)],e.prototype,"freeLabel",void 0),i([y(cc.Label)],e.prototype,"freeDescLabel",void 0),i([y(cc.Node)],e.prototype,"propImage",void 0),i([y(cc.Node)],e.prototype,"noBlockBtn",void 0),i([y(cc.Node)],e.prototype,"noWhiteBtn",void 0),i([y(cc.Node)],e.prototype,"beginBtn",void 0),i([y(cc.Node)],e.prototype,"freeBtnVideo",void 0),i([y(cc.Node)],e.prototype,"beginBtnVideo",void 0),i([y(cc.Node)],e.prototype,"timeNode",void 0),i([g],e)}(cc.Component);o.default=v,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/sdk":"sdk","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common"}],giftLayerAnimate:[function(t,e,o){"use strict";cc._RF.push(e,"fb227UOAFRM+a9fREJ/Svyr","giftLayerAnimate");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../../pre/itemSub/brickSubPrefab"),l=t("../../pre/itemSub/wallpaperSubPrefab"),u=t("../../pre/main/rewardPrefab"),p=t("../common/CcJsFunc"),d=t("../common/dataTs"),h=t("../common/native/audio"),f=t("../common/spine"),m=cc._decorator,g=m.ccclass,y=m.property,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.lightBg=null,e.titleNode=null,e.gift1Node=null,e.gift2Node=null,e.getBtn=null,e.getBtnLabel=null,e.giftBg=null,e.rewardPrefab=null,e.brickSubPrefab=null,e.wallpaperSubPrefab=null,e.rewardNodeArray=[],e.rewardData=null,e.collectionItem=null,e.ribbonBoxData=null,e.btnCb=null,e.collectionCb=null,e.ribbonCb=null,e}return a(e,t),e.prototype.start=function(){p.default.addbtnTouchStartScale(this.getBtn),p.default.addbtnTouchEndScale(this.getBtn,this.btnEndFunc.bind(this)),p.default.addbtnTouchCancelScale(this.getBtn),this.getBtnLabel.string=c.default.instance.trans(r.GDLanguage.pop_claim)},e.prototype.showRewardLayer=function(t,e,o,n,a,i){if(this.rewardData=t,this.collectionItem=e,this.ribbonBoxData=o,this.node.active=!0,this.titleNode.active=!1,this.gift1Node.active=!1,this.giftBg.active=!1,this.lightBg.active=!1,this.getBtn.scale=0,this.rewardNodeArray=[],this.btnCb=n,this.collectionCb=a,this.ribbonCb=i,t){console.log("\u91d1\u5e01\u5956\u52b1",JSON.stringify(t));for(var r=0;r<2;r++)(g=cc.instantiate(this.rewardPrefab)).x=0,g.y=0,g.scale=0,g.getComponent(u.default).setRewardNode(this.rewardData[r]),this.rewardNodeArray.push(g),this.node.addChild(g);this.playGift1Anim()}else if(e){console.log("\u6536\u85cf\u5956\u52b1");var c=e.wallpaper,p=e.brick,h=d.default.getPictureData();if(c>0){var f=cc.instantiate(this.wallpaperSubPrefab);f.x=0,f.y=0,f.scale=0,f.getComponent(l.default).rewardNodeData(h.bgNum),this.rewardNodeArray.push(f),this.node.addChild(f)}if(p>0){var m=cc.instantiate(this.brickSubPrefab);m.x=0,m.y=0,m.scale=0,m.getComponent(s.default).rewardNodeData(h.brickNum),this.rewardNodeArray.push(m),this.node.addChild(m)}this.playGift2Anim()}else if(o){for(console.log("Ribbon\u5956\u52b1",JSON.stringify(o)),r=0;r0&&cc.tween(this.rewardNodeArray[0]).to(.1,{scale:1.4,y:200}).to(.1,{scale:1}).to(.1,{scale:1.2}).to(.1,{scale:1}).call(function(){t.playAnimationFloat(t.rewardNodeArray[0],10),cc.tween(t.getBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()}).start(),this.collectionItem.brick>0&&cc.tween(this.rewardNodeArray[0]).to(.1,{scale:1.4,y:200}).to(.1,{scale:1}).to(.1,{scale:1.2}).to(.1,{scale:1}).call(function(){t.playAnimationFloat(t.rewardNodeArray[0],10),cc.tween(t.getBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()}).start()},e.prototype.playRibbonAnimationNode=function(){var t=this;if(console.log(this.rewardNodeArray.length),this.rewardNodeArray.length>=4)for(var e=function(e){cc.tween(o.rewardNodeArray[e]).delay(.1).to(.1,{scale:1,x:e%2*240-120,y:250+-200*Math.floor(e/2)}).to(.1,{scale:.8}).to(.1,{scale:1}).to(.1,{scale:.8}).call(function(){t.playAnimationFloat(t.rewardNodeArray[e],10),cc.tween(t.getBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()}).start()},o=this,n=0;n=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../common/enumConfig"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainCultivateLayer=null,e.wardrobeLayer=null,e.touchStartPoint=null,e.pointLength=0,e.scaleCoef=.05*.05,e.touchNum=0,e.maxScale=1,e.moveBigScale=1.5,e.disLength=50,e.oldPosit=null,e.oldScale=1,e.changeClothes=null,e}return a(e,t),e.prototype.start=function(){this.node.on("touchstart",this.touchStartFunc,this),this.node.on("touchmove",this.touchMoveFunc,this),this.node.on("touchend",this.touchEndFunc,this),this.node.on("touchcancel",this.touchCancelFunc,this),this.changeClothes=this.wardrobeLayer.getChildByName("changeClothes")},e.prototype.moveWithRoomId=function(t){var e=this.node.width*this.node.scale/2-cc.winSize.width/2,o=0;t==l.ROOMTYPE.ROOMONE?o=0:t==l.ROOMTYPE.ROOMTWO?o=-e:t==l.ROOMTYPE.ROOMTHREE&&(o=e),cc.tween(this.node).to(.3,{x:o,y:0}).start()},e.prototype.toBigMiddle=function(t){this.oldPosit=this.node.position,this.oldScale=this.node.scale;var e=t.convertToWorldSpaceAR(cc.v2(0,0)),o=cc.winSize.width/2-e.x,n=cc.winSize.height/2-this.disLength-e.y,a=(this.node.x+o)*this.moveBigScale,i=(this.node.y+n)*this.moveBigScale;cc.tween(this.node).to(.3,{x:a,y:i,scale:this.moveBigScale},{easing:cc.easing.cubicOut}).start()},e.prototype.toMinDefault=function(){this.oldPosit&&cc.tween(this.node).to(.2,{x:this.oldPosit.x,y:this.oldPosit.y,scale:this.oldScale}).start(),this.oldPosit=null},e.prototype.touchStartFunc=function(t){var e=t.getLocation();this.touchStartPoint=e,this.pointLength=0,this.touchNum++},e.prototype.touchMoveFunc=function(t){if(this.changeClothes.activeInHierarchy)console.log("changeClothes \u5b58\u5728\u4e0d\u8d70\u6ed1\u52a8\u903b\u8f91");else if(1==t.getTouches().length)this.moveActionFunc(t.getLocation()),this.touchStartPoint=t.getLocation();else if(2==t.getTouches().length){this.touchStartPoint=t.getLocation();var e=t.getTouches()[0].getLocation(),o=t.getTouches()[1].getLocation();if(0==this.pointLength)this.pointLength=e.sub(o).mag();else{var n=e.sub(o).mag(),a=n-this.pointLength,i=Math.abs(a);0!=a&&i>1&&(this.scaleNode(a),this.pointLength=n)}}},e.prototype.touchEndFunc=function(){this.touchNum--,this.pointLength=0},e.prototype.touchCancelFunc=function(){this.touchNum--},e.prototype.scaleNode=function(t){var e=null;if(t>0){var o=this.maxScale;this.node.scaleo?o:e)}else{var n=1;this.node.x<0&&(n=-1);var a=this.node.width*this.node.scale/2;a1&&(e=(e=this.node.scale+this.scaleCoef*t)<1?1:e)}null!=e&&(this.node.scale=e)},e.prototype.moveActionFunc=function(t){var e=t.x-this.touchStartPoint.x,o=t.y-this.touchStartPoint.y;this.node.x=this.node.x+e,this.node.y=this.node.y+o;var n=this.node.width*this.node.scale/2-cc.winSize.width/2,a=this.node.height*this.node.scale/2-cc.winSize.height/2;this.node.x<-n&&(this.node.x=-n),this.node.x>n&&(this.node.x=n),this.node.y<-a&&(this.node.y=-a),this.node.y>a&&(this.node.y=a)},i([s(cc.Node)],e.prototype,"mainCultivateLayer",void 0),i([s(cc.Node)],e.prototype,"wardrobeLayer",void 0),i([c],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../common/enumConfig":"enumConfig"}],http:[function(t,e,o){"use strict";cc._RF.push(e,"0c9d6/yg2FJlZ/64VA6Vfe9","http");var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,n=arguments.length;o0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0&&(d.timeout=p),d.onreadystatechange=function(){if(4==d.readyState)if(d.status>=200&&d.status<400){var t={},n="";try{t=JSON.parse(d.responseText)}catch(a){n=a}""==n?e&&e(t):o&&o(n)}else o&&o("status: "+d.status)},d.open(r,s,!0),i&&d.setRequestHeader("Content-Type",i),d.send(l),d.ontimeout=function(){o&&o("request timeout"),console.log("%c>> %c\u8fde\u63a5\u8d85\u65f6 %c<<","color:red","color:purple","color:red")},d.onerror=function(t){console.warn("request error",t),o&&o(t)}}catch(h){console.warn("request err",h),o&&o(h)}},t.request=function(t){this.requestBeforeFunc&&(t=this.requestBeforeFunc(t)),t.header=t.header?n(n({},t.baseParams),t.header):t.baseParams,cc.sys.platform==cc.sys.WECHAT_GAME?this.wxRequest(t):this.h5Request(t)},t.requestSync=function(t){var e=this;return new Promise(function(o,a){var i=t.success,r=t.fail;try{e.request(n(n({},t),{success:function(t){i&&i(t),o(t)},fail:function(t){r&&r(t),a(t)}}))}catch(c){r&&r(c),a(c)}})},t.requestBeforeFunc=null,t}();o.default=s,cc._RF.pop()},{"query-string":3}],i18n:[function(t,e,o){"use strict";cc._RF.push(e,"1f5a5kEJdNJPatq/K4Gvl0i","i18n");var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},a=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]-1)this._langCode=t;else{var e=t.indexOf("_");if(e>0){var o=t.substring(0,e);l.indexOf(o)>-1&&(this._langCode=o)}else this._langCode=t}console.log("\u5b9e\u9645\u4f7f\u7528\u8bed\u8a00\u7801\uff1a",this._langCode),r.default.langCode=this._langCode,this._langMap={}},t.prototype.init=function(){return n(this,void 0,Promise,function(){var t=this;return a(this,function(){return this.getLanguageCode(),[2,new Promise(function(e){cc.assetManager.loadBundle(cc.resources.name,function(o,n){o||n.load("data/gd_language",cc.JsonAsset,function(o,a){if(!o){var i=a.json;for(var r in i){var c=i[r];t._langMap[r]=c[t.langCode]&&c[t.langCode].length>0?c[t.langCode]:c[t._landCodeDefault]}n.release("data/gd_language",cc.JsonAsset),e()}})})})]})})},t.prototype.trans=function(t){for(var e=[],o=1;o0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/dataTs"),c=t("../common/enumConfig"),s=t("../manager/DateManager"),l=t("../public/network-tool"),u=cc._decorator,p=u.ccclass,d=(u.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.start=function(){var t=s.default.format(c.CALENDARNAMES[8],new Date);console.log("monthKey = ",t)},e.prototype.insertAllMap=function(){var t=[];r.default.loadJsonData("data/map_ids",function(e){t=e,console.log("maps = "+e.length);for(var o=0;o",t.data.map_id);var e=t.data.map_id,o=t.data.map_data;l.default.setLevelMapData(e,o)}})})},i([p],e)}(cc.Component));o.default=d,cc._RF.pop()},{"../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../manager/DateManager":"DateManager","../public/network-tool":"network-tool"}],loadLayer:[function(t,e,o){"use strict";cc._RF.push(e,"4d645A+CV5DRYYMx0geEXPK","loadLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},c=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},s=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]this.progressAll&&(this.loadProgressBar.progress=1,this.loadNum>=this.loadOverNum&&!this.sceneLoadEd&&(console.log("PUSH=>\u52a0\u8f7d\u6210\u529f update"),this.getInfoMainScene()))},e.prototype.start=function(){if(cc.game.on(f.NativeEvent.LeitingGetDeviceInfo,this.leitingGetDeviceInfo,this),cc.game.on(f.NativeEvent.LeitingLoginInfo,this.onLeitingLoginInfo,this),cc.game.on(f.NativeEvent.LeitingLoginErr,this.onLeitingLoginErr,this),this.bgLayer.getChildByName("sp").getComponent(y.default).play("2Grass",0),this.isNeedLogin()){this.descNode.active=!0;var t=cc.sys.localStorage.getItem("gameloading");console.log("loading = ",t),t?(this.beginNode.active=!1,this.arrowBgBase.active=!1,this.userNodeBase.active=!1,this.loginStatusEd=!0):(this.beginNode.active=!0,this.arrowBgBase.active=!0,this.userNodeBase.active=!0)}else this.descNode.active=!1;b.default.getInstance().initData(),this.loadNum=0,this.loadMainScene(),m.default.init(),this.loadCfg(),v.default.instance.init(2048,2048,100),N.registerHeadImgLoader(),u.default.addbtnTouchOriginEndScale(this.userNode,this.userNodeFunc.bind(this)),u.default.addbtnTouchOriginEndScale(this.privacyNode,this.privacyNodeFunc.bind(this)),u.default.addbtnTouchOriginEndScale(this.chooseBg,this.chooseBgFunc.bind(this)),u.default.addbtnTouchOriginEndScale(this.beginNode,this.beginNodeFunc.bind(this)),this.tipsNode.active=!1},e.prototype.userNodeFunc=function(){console.log("\u7528\u6237\u534f\u8bae")},e.prototype.privacyNodeFunc=function(){console.log("\u9690\u79c1\u653f\u7b56")},e.prototype.chooseBgFunc=function(){this.chooseNode.active=!this.chooseNode.active,console.log("\u9009\u62e9 = ",this.chooseNode.activeInHierarchy)},e.prototype.beginNodeFunc=function(){var t=this;if(console.log("\u5f00\u59cb\u6e38\u620f = ",this.chooseNode.activeInHierarchy),!this.chooseNode.activeInHierarchy)return this.tipsNode.active=!0,void setTimeout(function(){t.tipsNode.active=!1},2e3);cc.sys.localStorage.setItem("gameloading","gameloading"),this.loginStatusEd=!0,this.loadCfg()},e.prototype.leitingGetDeviceInfo=function(){var t=p.default.getUserData();if(t&&t.userID&&t.userID.length>0&&d.default.callNative(h.NativeFun.publicParamsInfo,{userId:t.userID}),d.default.deviceInfo){var e={androidid:d.default.deviceInfo.androidId,chennal:"310001",gameCode:"59"};d.default.leitingReport("af_before_login",e)}},e.prototype.onLeitingLoginInfo=function(){this.loginStatusEd=!0,this.loadJson(),_.default.reportTACommon("login",{login_type:"\u6b63\u5e38\u767b\u5f55"}),d.default.loginInfo&&(d.default.loginInfo.userId,d.default.media);var t={};if(d.default.deviceInfo){var e=p.default.getUserData();t={androidid:d.default.deviceInfo.androidId,chennal:"310001",gameCode:"59",userId:e.userID,type:2,roldId:d.default.deviceInfo.gaid}}var o={};d.default.loginInfo&&(e=p.default.getUserData(),o={loginType:"1",chennal:d.default.loginInfo.channelNo,gameCode:"59",userId:e.userID,type:2,serviceName:"\u6d77\u5916\u6d4b\u8bd5\u670d",serviceId:"1",loginMode:"1",playLevelId:e.playLevelId});var n=i(i({},t),o);d.default.leitingReport("af_login",n)},e.prototype.onLeitingLoginErr=function(){this.loginStatusEd=!0,this.loadJson()},e.prototype.loadCfg=function(){return c(this,void 0,Promise,function(){return s(this,function(t){switch(t.label){case 0:return[4,l.default.instance.init()];case 1:return t.sent(),this.isNeedLogin()?this.loginStatusEd&&this.loadJson():this.loadJson(),[2]}})})},e.prototype.isNeedLogin=function(){return!!(g.default.isPlatform(g.Platform.android)||g.default.isPlatform(g.Platform.oppo)||g.default.isPlatform(g.Platform.vivo))},e.prototype.loadJson=function(){var t=this;p.default.initData(function(){console.log("JSON\u52a0\u8f7d\u5b8c\u6210");var e=p.default.getUserData();C.default.setUserid(e.userID);var o=p.default.getHourseUnlockData(),n=0;if(o.length){var a=o[o.length-1];for(var i in a)if(!a[i].unlock){n=a[i].unlockID;break}}for(var r in n||o.length,e.dailyData)for(var c in e.dailyData[r])e.dailyData[r][c].isWin;t.loadScene()}),_.default.initTA()},e.prototype.loadMainScene=function(){var t=this;cc.director.preloadScene("game",function(){},function(){console.log("PUSH=>\u4e3b\u573a\u666f\u52a0\u8f7d\u5b8c\u6210"),t.loadScene()})},e.prototype.loadScene=function(){this.loadNum+=1,console.log("PUSH=>",this.loadNum),this.loadNum>=this.loadOverNum&&this.progressCurrent>=this.progressAll&&!this.sceneLoadEd&&(console.log("PUSH=>loadScene\u52a0\u8f7d\u6210\u529f"),this.getInfoMainScene())},e.prototype.getInfoMainScene=function(){this.sceneLoadEd=!0,_.default.reportTACommon("app_start",{step:"\u542f\u52a8"}),cc.director.loadScene("game",function(){console.log("PUSH=>\u8fdb\u5165\u4e3b\u573a\u666f")})},r([k(cc.Node)],e.prototype,"bgLayer",void 0),r([k(cc.ProgressBar)],e.prototype,"loadProgressBar",void 0),r([k(cc.Node)],e.prototype,"descNode",void 0),r([k(cc.Node)],e.prototype,"userNode",void 0),r([k(cc.Node)],e.prototype,"privacyNode",void 0),r([k(cc.Node)],e.prototype,"chooseNode",void 0),r([k(cc.Node)],e.prototype,"chooseBg",void 0),r([k(cc.Node)],e.prototype,"beginNode",void 0),r([k(cc.Node)],e.prototype,"tipsNode",void 0),r([k(cc.Node)],e.prototype,"arrowBgBase",void 0),r([k(cc.Node)],e.prototype,"userNodeBase",void 0),r([P],e)}(cc.Component);o.default=S,cc._RF.pop()},{"../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/native/native-bridge":"native-bridge","../common/native/native-def":"native-def","../common/native/native-event":"native-event","../common/native/share":"share","../common/sdk":"sdk","../common/spine":"spine","../effect/player-head-atlas":"player-head-atlas","../manager/GameManager":"GameManager","../manager/report-common":"report-common","../tools/register-head-image":"register-head-image","../utils/uma/uma-sdk":"uma-sdk"}],loseCookiePop:[function(t,e,o){"use strict";cc._RF.push(e,"8756cpkvkBHlIyfdBoS6jSg","loseCookiePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.popNode=null,e.titleLabel=null,e.descLabel=null,e.numLabel=null,e.exitLabel=null,e.restartLabel=null,e.mainLabel=null,e.restartBtn=null,e.closeBtn=null,e.mainMenuBtn=null,e.exitBtn=null,e.heartNode=null,e.cookieNumLabel=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){cc.game.on("blowupHeartAnim",this.blowupHeartAnimFunc,this),s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.hideLoseLovePop.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),s.default.addbtnTouchStartScale(this.restartBtn),s.default.addbtnTouchEndScale(this.restartBtn,this.restartFunc.bind(this)),s.default.addbtnTouchCancelScale(this.restartBtn),s.default.addbtnTouchStartScale(this.mainMenuBtn),s.default.addbtnTouchEndScale(this.mainMenuBtn,this.returnMainMenuFunc.bind(this)),s.default.addbtnTouchCancelScale(this.mainMenuBtn),s.default.addbtnTouchStartScale(this.exitBtn),s.default.addbtnTouchEndScale(this.exitBtn,this.exitBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.exitBtn),this.setupFonts()},e.prototype.setupFonts=function(){this.titleLabel.string=c.default.instance.trans(r.GDLanguage.pop_sure),this.restartLabel.string=c.default.instance.trans(r.GDLanguage.pop_restart),this.exitLabel.string=c.default.instance.trans(r.GDLanguage.pop_quit),this.mainLabel.string=c.default.instance.trans(r.GDLanguage.main_screen),this.descLabel.string=c.default.instance.trans(r.GDLanguage.lose_cookies)},e.prototype.blowupHeartAnimFunc=function(t){0==t?this.node.active=!1:1==t&&cc.tween(this.heartNode).to(.2,{scale:1.2}).to(.1,{scale:1}).start()},e.prototype.showPop=function(t){this.node.active=!0,this.showPopData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.restartBtn.active=!1,this.mainMenuBtn.active=!1,this.exitBtn.active=!1,0==this.showPopData.popType?(this.restartBtn.active=!0,this.mainMenuBtn.active=!0,this.popNode.height=700):1==this.showPopData.popType&&(this.exitBtn.active=!0,this.popNode.height=600),this.cookieNumLabel.getComponent(cc.Label).string="x"+l.default.getInstance().cookieDict.cookieCurCount},e.prototype.hideLoseLovePop=function(){this.node.active=!1,cc.game.emit("blowupHeartAnim",0)},e.prototype.restartFunc=function(){this.exitBtnFunc()},e.prototype.returnMainMenuFunc=function(){this.exitBtnFunc()},e.prototype.exitBtnFunc=function(){this.node.active=!1,cc.game.emit("blowupHeartAnim",1)},i([d(cc.Node)],e.prototype,"mainLayer",void 0),i([d(cc.Node)],e.prototype,"popNode",void 0),i([d(cc.Label)],e.prototype,"titleLabel",void 0),i([d(cc.Label)],e.prototype,"descLabel",void 0),i([d(cc.Label)],e.prototype,"numLabel",void 0),i([d(cc.Label)],e.prototype,"exitLabel",void 0),i([d(cc.Label)],e.prototype,"restartLabel",void 0),i([d(cc.Label)],e.prototype,"mainLabel",void 0),i([d(cc.Node)],e.prototype,"restartBtn",void 0),i([d(cc.Node)],e.prototype,"closeBtn",void 0),i([d(cc.Node)],e.prototype,"mainMenuBtn",void 0),i([d(cc.Node)],e.prototype,"exitBtn",void 0),i([d(cc.Node)],e.prototype,"heartNode",void 0),i([d(cc.Node)],e.prototype,"cookieNumLabel",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../manager/GameManager":"GameManager"}],loseLovePop:[function(t,e,o){"use strict";cc._RF.push(e,"86deeGjM+dBbIIFyxI9LHFp","loseLovePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/enumConfig"),s=t("../manager/data-manager"),l=t("../manager/report-common"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.titleNode=null,e.titleLabel=null,e.descNode=null,e.closeBtn=null,e.giveupBtn=null,e.noGiveupBtn=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.mask,this.hideLoseLovePop.bind(this)),r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.hideLoseLovePop.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn),r.default.addbtnTouchStartScale(this.giveupBtn),r.default.addbtnTouchEndScale(this.giveupBtn,this.giveupBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.giveupBtn),r.default.addbtnTouchStartScale(this.noGiveupBtn),r.default.addbtnTouchEndScale(this.noGiveupBtn,this.noGiveupBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.noGiveupBtn)},e.prototype.showLoseLovePop=function(t){this.node.active=!0,this.showPopData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),0==this.showPopData.popType?(this.popNode.height=715,this.descNode.active=!0):1==this.showPopData.popType&&(this.popNode.height=601,this.descNode.active=!1)},e.prototype.hideLoseLovePop=function(){this.node.active=!1},e.prototype.giveupBtnFunc=function(){console.log("\u6253\u5f00\u4e3b\u9875\u9762"),cc.game.emit(c.EMITKEY.SHOWMAINLAYER);var t=s.default.getTAUserInfo();l.default.reportTACommon("game_give_up",t)},e.prototype.noGiveupBtnFunc=function(){this.node.active=!1},i([d(cc.Node)],e.prototype,"mask",void 0),i([d(cc.Node)],e.prototype,"popNode",void 0),i([d(cc.Node)],e.prototype,"titleNode",void 0),i([d(cc.Label)],e.prototype,"titleLabel",void 0),i([d(cc.Node)],e.prototype,"descNode",void 0),i([d(cc.Node)],e.prototype,"closeBtn",void 0),i([d(cc.Node)],e.prototype,"giveupBtn",void 0),i([d(cc.Node)],e.prototype,"noGiveupBtn",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/enumConfig":"enumConfig","../manager/data-manager":"data-manager","../manager/report-common":"report-common"}],"main-cookie-reward":[function(t,e,o){"use strict";cc._RF.push(e,"98ef1B9rVlIgINOcS1NN8Sh","main-cookie-reward");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../pre/main/cookiePrefab"),c=t("../../common/CcJsFunc"),s=t("../../common/dataTs"),l=t("../../common/enumConfig"),u=t("../../common/spine"),p=t("../../common/util"),d=t("../../manager/GameManager"),h=t("../../manager/report-common"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.clickBtn=null,e.cookieImg=null,e.progressBar=null,e.progressLabel=null,e.rewardImage=null,e.rewardNumLabel=null,e.clockSpine=null,e.timeLabel=null,e.cookiePrefab=null,e.startNode=null,e.updateTime=0,e.progressOld=0,e.progressNew=0,e.isUpdate=!1,e.rewardData=null,e.cookieNum=0,e.rewardCallback=null,e}return a(e,t),e.prototype.update=function(t){this.updateTime+=t,this.updateTime>=1&&(this.updateTime-=1,this.updateTimeNum()),this.isUpdate&&(this.progressOld+=15*t,this.progressOld0?this.timeLabel.string=o[0]+"d"+o[1]+"h":o[1]>0?this.timeLabel.string=o[1]+"h"+o[2]+"m":o[2]>0?this.timeLabel.string=o[2]+"m"+o[3]+"s":o[3]>0&&(this.timeLabel.string=o[2]+"m"+o[3]+"s")}}},e.prototype.start=function(){this.clockSpine.getComponent(u.default).play("5Clock1",0),this.updateSubViewFunc(),this.updateTimeNum()},e.prototype.updateSubViewFunc=function(){var t=s.default.gameConfigData.baseConfigData.cookieReward;console.log("cookieReward",JSON.stringify(t));var e=s.default.getCookieRewardData();console.log("cookieData",JSON.stringify(e)),console.log("cookieDict",JSON.stringify(d.default.getInstance().cookieDict)),this.progressNew=e.cookieNum,this.progressOld=e.cookieNum-d.default.getInstance().cookieDict.cookie,this.progressOld<0&&(this.progressOld=0);var o=e.progress;o>=3&&(o=0,e.progress=o,s.default.setCookieRewardData(e)),this.rewardData=t[o],console.log("rewardData",JSON.stringify(this.rewardData));var n=e.cookieNum;n>=this.rewardData.cookieNum&&(n=this.rewardData.cookieNum),this.progressLabel.string=n+"/"+this.rewardData.cookieNum,this.rewardNumLabel.string=this.rewardData.rewardCount+"",this.progressBar.progress=this.progressOld/this.rewardData.cookieNum;var a="rewardIcon/"+this.rewardData.rewardType+".png";c.default.changeSpriteFrame(this.rewardImage,a),d.default.getInstance().cookieDict.cookie=0,d.default.getInstance().cookieDict.cookieCurCount=0,console.log("\u6e05\u7a7acookieDict",d.default.getInstance().cookieDict),this.cookieNum=n},e.prototype.checkProgressFunc=function(){if(this.cookieNum>=this.rewardData.cookieNum){this.getRewardFunc();var t=s.default.getCookieRewardData();t.progress+=1,t.progress>3&&(t.progress=0),t.cookieNum>this.rewardData.cookieNum?(console.log("\u591a\u7684\u997c\u5e72\u8ba1\u5165\u4e0b\u4e00\u5956\u52b1",t.cookieNum-this.rewardData.cookieNum),t.cookieNum=t.cookieNum-this.rewardData.cookieNum,d.default.getInstance().cookieDict.cookie=t.cookieNum):t.cookieNum=0,s.default.setCookieRewardData(t),this.updateSubViewFunc(),this.isUpdate=!0}else cc.game.emit(l.EMITKEY.HIDEMASKLAYER)},e.prototype.callbackFunc=function(){console.log("\u5956\u52b1\u64ad\u653e\u6210\u529f ######"),cc.game.emit(l.EMITKEY.HIDEMASKLAYER),cc.game.emit(l.EMITKEY.MAINUPDATEUI)},e.prototype.rewardCallbackFunc=function(){this.rewardCallback&&this.rewardCallback()},e.prototype.getRewardFunc=function(){console.log("\u9886\u53d6\u5956\u52b1",JSON.stringify(this.rewardData));var t=s.default.getUserData(),e=this.rewardData.rewardType;if("reward_fish"==e)t.fish+=this.rewardData.rewardCount;else{t[e]+=this.rewardData.rewardCount;var o,n=0,a="";"prop_remove"==e?(n=1,a="\u79fb\u51fa\u9053\u5177"):"prop_cancel"==e?(n=2,a="\u64a4\u9500\u9053\u5177"):"prop_random"==e&&(n=3,a="\u6d17\u724c\u9053\u5177"),o=t[e],h.default.reportTACommon("item_get",{item_id:n,item_type:"\u6d88\u8017\u9053\u5177",item_name:a,change_num:1,num_before:o-1,num_after:o,action:"\u997c\u5e72\u6d3b\u52a8\u5f00\u542f\u5b9d\u7bb1",reason:"\u5b9d\u7bb1\u83b7\u5f97\u9053\u5177"})}s.default.saveUserData(t);var i={popName:"showRewardPop",showPopData:{popCallbackCollect:null,rewardData:this.rewardData,startNode:this.rewardImage,endNode:this.startNode,popType:1,callback:this.callbackFunc.bind(this),rewardCallback:this.rewardCallbackFunc.bind(this)}};cc.game.emit("showPop",i)},e.prototype.checkCookie=function(t,e){if(this.rewardCallback=e,console.log("cookieDict",d.default.getInstance().cookieDict),d.default.getInstance().cookieDict.cookie<=0)return console.log("cookie <= 0 ######"),void(t&&t());var o=this,n=c.default.getWorldPosition(this.startNode),a=c.default.getNodePosition(this.node,n),i=c.default.getWorldPosition(this.cookieImg),s=c.default.getNodePosition(this.node,i),u=cc.instantiate(this.cookiePrefab);this.node.addChild(u),u.getComponent(r.default).showData(1,d.default.getInstance().cookieDict.cookie),u.position=cc.v3(a),u.scale=0,cc.tween(u).to(.2,{scale:1.2}).to(.2,{scale:1}).delay(.2).to(.3,{position:cc.v3(a.x+10,a.y-10)}).to(.3,{position:cc.v3(a.x-12,a.y-12)}).to(.5,{position:cc.v3(s)}).call(function(){u.destroy(),cc.tween(o.cookieImg).to(.1,{scale:1.2}).to(.1,{scale:1}).call(function(){t&&t(),o.updateSubViewFunc(),cc.game.emit(l.EMITKEY.HIDEMASKLAYER),o.isUpdate=!0}).start()}).start()},i([g(cc.Node)],e.prototype,"clickBtn",void 0),i([g(cc.Node)],e.prototype,"cookieImg",void 0),i([g(cc.ProgressBar)],e.prototype,"progressBar",void 0),i([g(cc.Label)],e.prototype,"progressLabel",void 0),i([g(cc.Node)],e.prototype,"rewardImage",void 0),i([g(cc.Label)],e.prototype,"rewardNumLabel",void 0),i([g(cc.Node)],e.prototype,"clockSpine",void 0),i([g(cc.Label)],e.prototype,"timeLabel",void 0),i([g(cc.Prefab)],e.prototype,"cookiePrefab",void 0),i([g(cc.Node)],e.prototype,"startNode",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../../../pre/main/cookiePrefab":"cookiePrefab","../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/spine":"spine","../../common/util":"util","../../manager/GameManager":"GameManager","../../manager/report-common":"report-common"}],"main-rank":[function(t,e,o){"use strict";cc._RF.push(e,"9b6efOXGmVLpb6Xc/L4u6Jt","main-rank");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]\u83b7\u53d6\u7528\u6237\u4fe1\u606f\u6210\u529f = ",g.default.rankUserInfo),t.label=2;case 2:return console.log("PUSH=>\u8bf7\u6c42\u7f51\u7edc\u6570\u636e ######"),this.getStageInfo(),this.getRankInfo(),[2]}})})},e.prototype.orderby=function(t,e){if(t.length<=1)return t;for(var o=Math.floor(t.length/2),n=t.splice(o,1)[0],a=[],i=[],r=0,c=t;r0||o[i].fail_score\u821e\u53f0"),t.setInfoData(e)):(console.log("\u7f13\u5b58\u6570\u636e\u8fc7\u671f->\u821e\u53f0"),l.default.getStageInfoData(function(e){t.setInfoData(e),g.default.setStageData(e)}))},e.prototype.setInfoData=function(t){this.stageInfo=t.data,this.setStageInfo()},e.prototype.getRankInfo=function(){f.default.getInstance().game_over>0&&f.default.getInstance().playGameCount<2&&p.default.removeItem(d.STORAGEKEY.RANKDATA);var t=this,e=g.default.getRankData();e?(console.log("\u4f7f\u7528\u672c\u5730\u7f13\u5b58\u6570\u636e->\u6392\u884c\u699c\u6570\u636e"),t.setRankData(e)):(console.log("\u672c\u5730\u7f13\u5b58\u6570\u636e\u4e0d\u5b58\u5728\u6216\u5df2\u8fc7\u671f->\u6392\u884c\u699c\u6570\u636e"),l.default.getRankInfoData(function(e){t.setRankData(e),g.default.setRankData(e)}))},e.prototype.setRankData=function(t){this.setSubViewData(t.data.list),f.default.getInstance().rankInfo=t.data,this.mainUILayer.getComponent(y.default).showBottomRankNode(t.data.user)},e.prototype.setStageInfo=function(){var t=this.stageInfo;this.capSp.active=!1,this.sunglassesSp.active=!1,this.hairSp.active=!1,this.catNodeIcon.opacity=0,this.sunNodeIcon.opacity=0,this.hairNodeIcon.opacity=0,this.catNodeIconWoman.opacity=0,this.sunNodeIconWoman.opacity=0,this.hairNodeIconWoman.opacity=0,t.firstWin&&t.firstWin.nick_name&&t.firstWin.nick_name.length&&(this.capSp.active=!0,console.log("info.firstWin.gender = "+t.firstWin.gender),0==t.firstWin.gender?(this.catNodeIcon.opacity=255,u.default.setAvatar(this.catNodeIcon,t.firstWin.avatar)):(this.catNodeIconWoman.opacity=255,u.default.setAvatar(this.catNodeIconWoman,t.firstWin.avatar))),t.iqWin&&t.iqWin.nick_name&&t.iqWin.nick_name.length?(this.sunglassesSp.active=!0,this.sunglassesSp.getComponent(h.default).play("Stage1",0),console.log("info.iqWin.gender = "+t.iqWin.gender),0==t.iqWin.gender?(this.sunNodeIcon.opacity=255,u.default.setAvatar(this.sunNodeIcon,t.iqWin.avatar)):(this.sunNodeIconWoman.opacity=255,u.default.setAvatar(this.sunNodeIconWoman,t.iqWin.avatar))):(this.sunglassesSp.active=!0,this.sunglassesSp.getComponent(h.default).play("Stage0",0)),t.timeWin&&t.timeWin.nick_name&&t.timeWin.nick_name.length&&(this.hairSp.active=!0,console.log("info.firstWin.gender = "+t.firstWin.gender),0==t.timeWin.gender?(this.hairNodeIcon.opacity=255,u.default.setAvatar(this.hairNodeIcon,t.timeWin.avatar)):(this.hairNodeIconWoman.opacity=255,u.default.setAvatar(this.hairNodeIconWoman,t.timeWin.avatar)))},e.prototype.onDisable=function(){this.node.stopAllActions()},e.prototype.setSubViewData=function(t){var e=this;void 0===t&&(t=[]);var o=this,n=p.default.getUserData().userID,a=!1;for(var i in t)if((l=(_=t[i]).result)&&l.length){var r=JSON.parse(l);for(var c in r)if(r[c].uid==Number(n)){a=!0;break}}if(0==a){var s=g.default.rankUserInfo;if(s&&s.region&&s.region.length)for(var i in t){var l=(_=t[i]).result;if(s.region==_.name){if(l&&l.length){var u=[];(r=JSON.parse(l)).length>=36&&(r[18]=s);for(var h=0;h=0||(o=o.slice(0,o.length-1),o+=this.IsUpper(a)?a.toLowerCase():a.toUpperCase(),t.indexOf(o)>=0)))return!1}return!0},e.prototype.IsUpper=function(t){return t===t.toUpperCase()},i([P({type:cc.Node,tooltip:"mainUILayer"})],e.prototype,"mainUILayer",void 0),i([P({type:cc.Node,tooltip:"\u80cc\u666fspine"})],e.prototype,"bgSp",void 0),i([P({type:cc.Node,tooltip:"\u5e3d\u5b50\u7f8aspine"})],e.prototype,"capSp",void 0),i([P({type:cc.Node,tooltip:"\u58a8\u955c\u7f8aspine"})],e.prototype,"sunglassesSp",void 0),i([P({type:cc.Node,tooltip:"\u957f\u53d1\u7f8aspine"})],e.prototype,"hairSp",void 0),i([P({type:cc.Prefab,tooltip:"\u7f8a\u7fa4"})],e.prototype,"sheepFlock",void 0),i([P({type:cc.Node,tooltip:"\u5b9a\u4f4d\u6309\u94ae"})],e.prototype,"positionNode",void 0),i([P({type:cc.Node,tooltip:"\u5b9a\u4f4d\u6309\u94ae\u5934\u50cf"})],e.prototype,"positionNodeIcon",void 0),i([P({type:cc.Node,tooltip:"\u5b9a\u4f4d\u6309\u94ae\u56fe\u6807"})],e.prototype,"positionNodeCycle",void 0),i([P({type:cc.Node,tooltip:"\u8dd1\u9a6c\u706f"})],e.prototype,"scrollMsg",void 0),i([P({type:cc.Node,tooltip:"\u5934\u50cf"})],e.prototype,"iconNode",void 0),i([w],e)}(cc.Component);o.default=k,cc._RF.pop()},{"../api/ApiTool":"ApiTool","../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/spine":"spine","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common","../module/ScrollMsg":"ScrollMsg","../module/sheep-flock":"sheep-flock","./mainUiLayer":"mainUiLayer"}],"main-tabbar":[function(t,e,o){"use strict";cc._RF.push(e,"66a40jaUH5JALG1+2y2R2kp","main-tabbar");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../manager/GameManager"),d=t("../manager/report-common"),h=t("../utils/uma/uma-sdk"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainPage=null,e.pageMain=null,e.pageDaily=null,e.pageCollect=null,e.tabbarMain=null,e.tabbarDaily=null,e.tabbarCollect=null,e.pageContent=null,e.tabbarArr=[],e.updateTime=0,e}return a(e,t),e.prototype.update=function(t){this.updateTime+=t,this.updateTime},e.prototype.start=function(){cc.game.on(u.EMITKEY.MAINUPDATEUI,this.setMainLayerData,this),cc.game.on(u.EMITKEY.UPDATETABBARRECEIVE,this.updateTabbar,this),this.pageContent=this.mainPage.getChildByName("pageContent"),s.default.addbtnTouchEndScale(this.tabbarCollect,this.tabbarAction.bind(this,0)),s.default.addbtnTouchEndScale(this.tabbarMain,this.tabbarAction.bind(this,1)),s.default.addbtnTouchEndScale(this.tabbarDaily,this.tabbarAction.bind(this,2)),this.tabbarArr.push(this.tabbarCollect),this.tabbarArr.push(this.tabbarMain),this.tabbarArr.push(this.tabbarDaily),this.pageCollect.x=0,this.pageMain.x=750,this.pageDaily.x=1500,this.updateTabbar(1,!1),this.setMainLayerData(),this.setupFonts()},e.prototype.setupFonts=function(){var t=c.default.instance.trans(r.GDLanguage.collect);this.tabbarCollect.getChildByName("icon-label").getComponent(cc.Label).string=t;var e=c.default.instance.trans(r.GDLanguage.main_screen);this.tabbarMain.getChildByName("icon-label").getComponent(cc.Label).string=e;var o=c.default.instance.trans(r.GDLanguage.daily_challenge);this.tabbarDaily.getChildByName("icon-label").getComponent(cc.Label).string=o},e.prototype.onEnable=function(){this.setMainLayerData()},e.prototype.setMainLayerData=function(){var t=p.default.getInstance().collectionMark;0==t.bgNum&&0==t.brickNum&&(p.default.getInstance().collectionMark.tabbarCollection=!1),p.default.getInstance().collectionMark.tabbarCollection?this.tabbarCollect.getChildByName("icon-mark").active=!0:this.tabbarCollect.getChildByName("icon-mark").active=!1},e.prototype.tabbarAction=function(t){s.default.addClickAudio(),this.updateTabbar(t),t!=u.MAINPAGE.PAGEDAILY?p.default.getInstance().tabbarIsDaily&&(console.log("\u70b9\u51fb\u4e86\u6bcf\u65e5\u6311\u6218\uff0c\u6ca1\u73a9"),h.default.trackEvent("daily_return"),d.default.reportTACommon("daily_return",{})):p.default.getInstance().tabbarIsDaily=!0},e.prototype.updateTabbar=function(t,e){void 0===e&&(e=!0);var o=this;if(2==t&&l.default.getUserData().playLevelId<14)cc.game.emit("showPop",{popName:"nothingPop",showPopData:{popCallbackCollect:null,popType:3}});else{for(var n in p.default.getInstance().mainPage=t,this.tabbarArr){var a=this.tabbarArr[n];t==Number(n)?(a.getChildByName("bg-icon-nor").active=!1,a.getChildByName("bg-icon-sel").active=!0,a.getChildByName("icon-nor").active=!1,a.getChildByName("icon-sel").active=!0):(a.getChildByName("bg-icon-nor").active=!0,a.getChildByName("bg-icon-sel").active=!1,a.getChildByName("icon-nor").active=!0,a.getChildByName("icon-sel").active=!1)}var i=e?.3:0,r=0,c=null;switch(t){case 0:r=0,c=this.pageCollect;break;case 1:r=-750,c=this.pageMain;break;case 2:r=-1500,c=this.pageDaily}c&&(c.active=!0),this.pageContent.stopAllActions(),cc.tween(this.pageContent).to(i,{x:r}).call(function(){o.hideOtherNode(c)}).start(),cc.game.emit(u.EMITKEY.UPDATETABBARSEND,t),this.setMainLayerData()}},e.prototype.hideOtherNode=function(t){var e=this.mainPage.getChildByName("pageContent").children;for(var o in e)t&&t!=e[o]&&(e[o].active=!1)},i([g(cc.Node)],e.prototype,"mainPage",void 0),i([g(cc.Node)],e.prototype,"pageMain",void 0),i([g(cc.Node)],e.prototype,"pageDaily",void 0),i([g(cc.Node)],e.prototype,"pageCollect",void 0),i([g(cc.Node)],e.prototype,"tabbarMain",void 0),i([g(cc.Node)],e.prototype,"tabbarDaily",void 0),i([g(cc.Node)],e.prototype,"tabbarCollect",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../manager/GameManager":"GameManager","../manager/report-common":"report-common","../utils/uma/uma-sdk":"uma-sdk"}],mainCanvas:[function(t,e,o){"use strict";cc._RF.push(e,"53853D2Qg1AFKoc4UUFQ6nI","mainCanvas");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r,c,s=t("../common/enumConfig"),l=t("../common/native/audio"),u=t("../common/native/tt-sdk"),p=t("../common/sdk"),d=t("../manager/GameManager"),h=t("../manager/report-common"),f=cc._decorator,m=f.ccclass,g=f.property;(function(t){t[t.ready=0]="ready",t[t.recording=1]="recording",t[t.stop=2]="stop",t[t.pause=3]="pause"})(r||(r={})),function(t){t[t.RestartRecord=0]="RestartRecord",t[t.ShareMessage=1]="ShareMessage"}(c||(c={}));var y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.gameLayer=null,e.status=r.ready,e.recordFinishAction=c.RestartRecord,e.timer=0,e}return a(e,t),e.prototype.start=function(){var t=this;this.mainLayer.active=!0,this.gameLayer.active=!1,cc.game.on(s.EMITKEY.TTSTARTRECORD,this.beginRecordFunc,this),cc.game.on(s.EMITKEY.TTSTOPRECORD,this.stopRecordFunc,this),cc.game.on(s.EMITKEY.TTSHARERECORD,this.shareRecordFunc,this),this.ttRewardInit(),this.scheduleOnce(function(){t.beginRecord()},2),p.default.setOnShow(function(){console.log("on Show"),l.default.playBGM()}),p.default.setOnHide(function(){console.log("on Hide"),l.default.playBGM()})},e.prototype.beginRecordFunc=function(){this.status!=r.recording&&this.beginRecord()},e.prototype.stopRecordFunc=function(){this.stopRecord()},e.prototype.ttRewardInit=function(){if(cc.sys.platform==cc.sys.BYTEDANCE_GAME){var t=tt.getGameRecorderManager();t.onStart(this.recordStart.bind(this)),t.onStop(this.recordStop.bind(this)),t.onPause(this.recordPause.bind(this)),t.onResume(this.recordResume.bind(this))}},e.prototype.beginRecord=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(console.log("beginRecord ###### "),d.default.getInstance().videoDuration=0,u.default.recorderStart())},e.prototype.stopRecord=function(){u.default.recorderStop()},e.prototype.recordStart=function(){console.log("record start"),d.default.getInstance().videoDuration=0,this.status=r.recording,this.initStatus()},e.prototype.recordStop=function(t){console.log("record stop",t.videoPath),u.default.setVideoPath(t.videoPath),d.default.getInstance().videoPath=t.videoPath,this.status=r.stop,this.initStatus()},e.prototype.recordPause=function(){console.log("record pause"),this.status=r.pause,this.initStatus()},e.prototype.recordResume=function(){console.log("record resume"),this.status=r.recording,this.initStatus()},e.prototype.update=function(t){this.timer+=t,d.default.getInstance().bulletTime+=t,this.status==r.recording&&(d.default.getInstance().videoDuration+=t),this.timer>=1&&(this.timer=0,this.status==r.recording&&this.initStatus())},e.prototype.initStatus=function(){if(d.default.getInstance().videoDuration>=300){u.default.recorderStop();var t=this;this.scheduleOnce(function(){t.beginRecord()},2)}if(d.default.getInstance().videoDuration<1)switch(this.status){case r.ready:console.log("\u5f55\u5236 ###### ");break;case r.recording:console.log("\u5f55\u5236\u4e2d...... ###### ");break;case r.pause:console.log("\u6682\u505c\u5f55\u5236...... ###### ");break;case r.stop:console.log("\u5f55\u5236...... ###### ")}},e.prototype.recordBtnAction=function(){switch(console.log("video tip status:",this.status,r[this.status]),this.status){case r.ready:d.default.getInstance().videoDuration=0,u.default.recorderStart();break;case r.recording:u.default.recorderPause();break;case r.pause:u.default.recorderResume();break;case r.stop:u.default.recorderStart(),this.status=r.recording,d.default.getInstance().videoDuration=0}this.initStatus()},e.prototype.shareRecordFunc=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(h.default.reportTACommon("share_click",{}),d.default.getInstance().videoDuration<3?cc.game.emit(s.EMITKEY.SHOWMAINTIPS,"\u5f55\u5c4f\u5c0f\u4e8e3s\uff0c\u65e0\u6cd5\u5206\u4eab"):(u.default.recorderStop(),this.showPop()))},e.prototype.showPop=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(console.log("\u6211\u8981\u70ab\u8000 = ",d.default.getInstance().videoPath),d.default.getInstance().videoPath&&0!=d.default.getInstance().videoPath.length?u.default.shareAppMessage({url:d.default.getInstance().videoPath,success:function(){u.default.recorderStart()},fail:function(){u.default.recorderStart()}}):u.default.recorderStart())},i([g(cc.Node)],e.prototype,"mainLayer",void 0),i([g(cc.Node)],e.prototype,"gameLayer",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/native/tt-sdk":"tt-sdk","../common/sdk":"sdk","../manager/GameManager":"GameManager","../manager/report-common":"report-common"}],mainCultivateLayer:[function(t,e,o){"use strict";cc._RF.push(e,"a504aoDOgxNhZMyOCq1oDJZ","mainCultivateLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/main/catClawPrefabs"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../common/native/audio"),p=t("../common/spine"),d=t("../manager/GameManager"),h=t("../utils/uma/uma-sdk"),f=t("./catNode"),m=t("./houseLayer"),g=t("./upgrade-tip"),y=t("./wardrobeLayer"),v=cc._decorator,b=v.ccclass,_=v.property,N=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainUILayer=null,e.wholeBuildHouse=null,e.wardrobeLayer=null,e.houseLayer=null,e.topUiLayer=null,e.particlePrefab=null,e.upgradeTip=null,e.clawPrefab=null,e.clawNode=null,e.catObj=null,e.upgradeArr=[],e.popCallbackCollect=null,e.isShowHouse=!1,e}return a(e,t),e.prototype.start=function(){window.xuxu=this,this.node.on("touchstart",this.touchStartFunc,this),this.node.on("touchend",this.hideWardrobelLayer,this),cc.game.on(l.EMITKEY.UPDATETABBARSEND,this.updateTabbar,this),this.initMainCultivateLayer(),this.popCallbackCollect={playGameCallBack:this.playGameFunc.bind(this)}},e.prototype.playGameFunc=function(){},e.prototype.updateTabbar=function(t){t==l.MAINPAGE.PAGEHOUSE?(this.showUpgrade(),this.isShowHouse=!0):this.hideUpgrade()},e.prototype.initMainCultivateLayer=function(){this.nextRoomIsUnloack(),this.clawNode=cc.instantiate(this.clawPrefab),this.wholeBuildHouse.addChild(this.clawNode),this.clawNode.active=!1},e.prototype.setClawNodeWithNode=function(t){if(cc.isValid(this.clawNode))if(t){var e=c.default.getWorldPosition(t),o=c.default.getNodePosition(this.wholeBuildHouse,e);this.clawNode.position=cc.v3(o.x,o.y,0),this.clawNode.getComponent(r.default).playClawAnimation()}else this.clawNode.active=!1;else console.log("\u732b\u722a\u5b50\u5df2\u91ca\u653e ###### ")},e.prototype.unlockNewHouse=function(){this.nextRoomIsUnloack(!0),cc.game.emit(l.EMITKEY.MAINUPDATEUI)},e.prototype.updateLayout=function(){this.catObj={};var t=s.default.getGameConfigData().baseConfigData.unlockHouseDataArray;for(var e in t)for(var o in t[e]){var n=t[e][o];this.setBuildStatus(n,!1,!1)}var a=s.default.getUserData().unlockHouseUserData;for(var e in a)for(var o in a[e])(n=a[e][o]).unlock?this.setBuildStatus(n,!0,!1):n.show&&this.addUpgradeTip(n)},e.prototype.addUpgradeTip=function(t){var e="house_"+t.house,o="room_"+t.room,n="mask_room_"+t.room,a="";"cat"==t.buildType?a=t.buildType:"build"==t.buildType?a=t.buildType+"_"+t.buildid:"skin"==t.buildType&&(a="cat");var i=this.wholeBuildHouse.getChildByName(e),r=i.getChildByName(o),c=i.getChildByName(n),s=r.getChildByName(a),u=s.getChildByName("lock"),p=(s.getChildByName("unLock"),u.getChildByName("lockImg"));c.active=!1;var h=cc.instantiate(this.upgradeTip),f=p.convertToWorldSpaceAR(cc.v2(0,0)),m=i.convertToNodeSpaceAR(f);h.x=m.x,h.y=m.y+p.height/2,"build"==t.buildType&&1==t.house&&1==t.room&&1==t.buildid&&(h.x+=50,h.y+=50),"build"==t.buildType&&3==t.house&&2==t.room&&2==t.buildid&&(h.y+=50),"skin"==t.buildType&&3==t.house&&2==t.room&&9==t.buildid&&(h.y-=50),"build"==t.buildType&&3==t.house&&3==t.room?1==t.buildid?h.x-=70:2==t.buildid?(h.x+=50,h.y+=50):3==t.buildid?h.x+=50:10==t.buildid&&(h.x-=50,h.y-=50):"skin"==t.buildType&&3==t.house&&3==t.room&&10==t.buildid&&(h.x-=50,h.y-=50),i.addChild(h),h.getComponent(g.default).showPoint(t,this,!0),this.upgradeArr.push(h),d.default.getInstance().mainPage!=l.MAINPAGE.PAGEHOUSE&&(h.active=!1)},e.prototype.clickUpgradePoint=function(t){for(var e in this.upgradeArr)this.upgradeArr[e].getComponent(g.default).showPoint();t.getComponent(g.default).showFish()},e.prototype.clickUpgradeFish=function(t,e){for(var o in console.log("houseData = "+JSON.stringify(t)),this.upgradeArr)this.upgradeArr[o].getComponent(g.default).showPoint();var n=s.default.getUserData(),a=n.unlockHouseUserData;if(n.fish>=t.fish){for(var i in a)for(var r in a[i])t.unlockID==a[i][r].unlockID&&(a[i][r].unlock=!0),a[i][r].show=!0;var c=!1;if(a.length){var u=a[a.length-1];for(var o in u)u[o].unlock||(c=!0)}if(n.fish-=t.fish,n.unlockHouseUserData=a,"cat"==t.buildType||"skin"==t.buildType){var p={clothesID:t.clothesID,clothRank:t.clothesID%1e3==0?3:1,isWear:t.clothesID%1e3==0},f=n.catClothesData,m="cat_"+t.buildid;f[m]?f[m].push(p):(console.log("userCldata clKey\u4e3a\u7a7a\uff0c\u9700\u8981\u521d\u59cb\u5316\u6570\u7ec4 ### "),f[m]=[],f[m].push(p)),d.default.getInstance().collectionMark.tabbarCollection=!0,"cat"==t.buildType?d.default.getInstance().collectionMark.catNum=t.clothesID:(d.default.getInstance().collectionMark.catNum=t.clothesID,d.default.getInstance().collectionMark.catSkinNum=t.clothesID)}s.default.saveUserData(n),e.getComponent(g.default).hide(),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,7),this.playFlyFishAnimation(t,e.node),c||(console.log("\u5237\u65b0\u89e3\u9501\u6c14\u6ce1"),this.updateLayout());var y=t.unlockID+"";h.default.trackEvent("house_unlock",{houseID:y}),cc.isValid(this.clawNode)&&(console.log("\u91ca\u653e\u732b\u722a\u5b50 ###### "),this.clawNode.destroy())}else{var v={popName:"nothingPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:0}};cc.game.emit("showPop",v)}},e.prototype.playFlyFishAnimation=function(t){var e="house_"+t.house,o="room_"+t.room,n="mask_room_"+t.room,a="";"cat"==t.buildType?a=t.buildType:"build"==t.buildType?a=t.buildType+"_"+t.buildid:"skin"==t.buildType&&(a="cat");var i=this.wholeBuildHouse.getChildByName(e),r=i.getChildByName(o),c=i.getChildByName(n),s=r.getChildByName(a),l=s.getChildByName("lock");s.getChildByName("unLock"),l.getChildByName("lockImg"),c.active=!1},e.prototype.flyUnlockFishFunc=function(t,e){this.removeFunc(this.upgradeArr,e),this.setBuildStatus(t,!0,!0),cc.game.emit(l.EMITKEY.MAINUPDATEUI)},e.prototype.indexOfFunc=function(t,e){for(var o=0;o-1&&t.splice(o,1)},e.prototype.nextRoomIsUnloack=function(t){void 0===t&&(t=!1);var e=s.default.getHourseUnlockData(t);e&&(console.log("unlockData ### = "+JSON.stringify(e)),0==this.upgradeArr.length&&(this.updateLayout(),e.length<=4?this.houseLayer.getComponent(m.default).moveWithRoomId(l.ROOMTYPE.ROOMONE):4=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../api/api-sheep"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/native/audio"),d=t("../common/sdk"),h=t("../game/gameLayer"),f=t("../manager/data-manager"),m=t("../manager/DateManager"),g=t("../manager/GameManager"),y=cc._decorator,v=y.ccclass,b=y.property,_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.gameLayer=null,e.commonUIPrefab=null,e.commonUI=null,e.topicUIPrefab=null,e.topicUI=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(u.EMITKEY.BEGINGAME,this.beginGameFunc,this),cc.game.on(u.EMITKEY.SHOWMODULE,this.showModuleFunc,this),this.setupSubviews(),this.updateSubUI(),d.default.isPlatform(d.Platform.web)||this.preLoadVedio(),this.requestData()},e.prototype.requestData=function(){l.default.isLogin()&&this.requestMatchResult()},e.prototype.requestMatchResult=function(){if(!f.default.getMatchResultData()){f.default.setMatchResultData();var t=this;setTimeout(function(){s.default.getMatchResult(2,function(e){t.showMatch(e)})},1e3)}},e.prototype.showMatch=function(t){if(t&&t.data&&t.data.topic&&t.data.topic.id>0&&t.data.topic.info&&t.data.topic.info.uid>0){var e={popName:"topicLastWinPop",showPopData:t.data};cc.game.emit("showPop",e)}},e.prototype.onEnable=function(){this.updateSubUI()},e.prototype.beginGameFunc=function(){this.beginGame()},e.prototype.showModuleFunc=function(t){switch(void 0===t&&(t=u.MODULETYPE.COMMON),t){case u.MODULETYPE.COMMON:this.commonUI.active=!0,this.topicUI.active=!1;break;case u.MODULETYPE.TOPIC:this.commonUI.active=!1,this.topicUI.active=!0}},e.prototype.setupSubviews=function(){this.topicUI=cc.instantiate(this.topicUIPrefab),this.topicUI.active=!1,this.node.addChild(this.topicUI),this.commonUI=cc.instantiate(this.commonUIPrefab),this.commonUI.active=!0,this.node.addChild(this.commonUI)},e.prototype.updateSubUI=function(){this.node.active=!0,this.gameLayer.active=!1,this.playMainBgMusic(),cc.game.emit(u.EMITKEY.MAINUPDATEUI)},e.prototype.showMainLayer=function(t){void 0===t&&(t=u.GAMEOVER.NONE),cc.game.emit(u.EMITKEY.TTSTOPRECORD),cc.game.emit(u.EMITKEY.TTSTARTRECORD),console.log("\u56de\u5230\u4e3b\u9875\u9762 = "+t),this.node.active=!0,this.gameLayer.active=!1,this.updateRewardData(t),this.playMainBgMusic(),cc.game.emit(u.EMITKEY.MAINUPDATEUI),g.default.getInstance().gameType==u.GAMETYPE.GAMEDAILY?cc.game.emit(u.EMITKEY.UPDATETABBARRECEIVE,2):cc.game.emit(u.EMITKEY.UPDATETABBARRECEIVE,1)},e.prototype.preLoadVedio=function(){var t=l.default.GetVedioID();d.default.preloadVideoAd(t,function(){console.log("\u9884\u52a0\u8f7d\u89c6\u9891\u6210\u529f")},function(){console.log("\u9884\u52a0\u8f7d\u89c6\u9891\u5931\u8d25")},function(){},!0)},e.prototype.updateRewardData=function(t){switch(t){case u.GAMEOVER.LEVELFAIL:g.default.getInstance().gameType==u.GAMETYPE.GAMELEVEL&&l.default.resetSprintReward()}},e.prototype.playMainBgMusic=function(){p.default.playBGM()},e.prototype.beginGame=function(){cc.game.emit(u.EMITKEY.TTSTARTRECORD);var t=this,e=0,o=m.default.format(u.CALENDARNAMES[4],new Date);if(o){var n=o.split("-");n.length>=3&&(e=Number(n[2]))}l.default.getLevelByID(e,function(o){console.log("\u5173\u5361\u6570\u636e:",e,o),t.gameLayer.activeInHierarchy?console.log("\u5df2\u7ecf\u6253\u5f00 mainLayer 1"):o.length<1?cc.game.emit("showMainTips",c.default.instance.trans(r.GDLanguage.level_inadequate)):(t.beginGameData(o),f.default.setGameLevelData(o))})},e.prototype.beginGameData=function(t){var e=this;cc.game.emit(u.EMITKEY.SHOWTRANSITLAYER,function(o){e.gameLayer.activeInHierarchy?console.log("\u5df2\u7ecf\u6253\u5f00 mainLayer 2"):(console.log("\u53ef\u4ee5\u6253\u5f00\u4e86 mainLayer"),e.gameLayer.getComponent(h.default).initLevelLayer(t),e.node.active=!1,o())})},i([b({type:cc.Node,tooltip:"\u6e38\u620f\u8282\u70b9"})],e.prototype,"gameLayer",void 0),i([b({type:cc.Prefab,tooltip:"common\u9875\u9762\u8282\u70b9"})],e.prototype,"commonUIPrefab",void 0),i([b({type:cc.Prefab,tooltip:"topic\u8282\u70b9"})],e.prototype,"topicUIPrefab",void 0),i([v],e)}(cc.Component);o.default=_,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../api/api-sheep":"api-sheep","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/sdk":"sdk","../game/gameLayer":"gameLayer","../manager/DateManager":"DateManager","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager"}],mainUiLayer:[function(t,e,o){"use strict";cc._RF.push(e,"4db0ejDPE9I06u2DuGNxPAb","mainUiLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=1&&(this.updateTime=0,this.updateTimeFunc())},e.prototype.updateTimeFunc=function(){var t=f.default.format(p.CALENDARNAMES[8],new Date).split(" ");if(!(t.length<2)){var e=t[1].split(":");if(!(e.length<3)){var o=3600*(24-Number(e[0])-1)+60*(60-Number(e[1])-1)+(60-Number(e[2]));if(this.timeNode.activeInHierarchy){var n=u.default.formatTime(1e3*o),a=(n[1]<10?"0"+n[1]:n[1])+":"+(n[2]<10?"0"+n[2]:n[2])+":"+(n[3]<10?"0"+n[3]:n[3])+" \u91cd\u7f6e";this.timeLabel.string=a}this.setMainLayerData()}}},e.prototype.onEnable=function(){this.topicBtn.getChildByName("tag_icon").active=!v.default.getMatchResultData(),h.default.getInstance().collectionMark.topicClothesNum>0?this.collectBtn.getChildByName("tag_icon").active=!0:this.collectBtn.getChildByName("tag_icon").active=!1},e.prototype.start=function(){cc.game.on(p.EMITKEY.MAINUPDATEUI,this.setMainLayerData,this),cc.game.on(p.EMITKEY.RANKUSERINFOSUCCESS,this.rankUserInfoFunc,this),cc.game.on(p.EMITKEY.BULLETSTATE,this.bulletStateFunc,this),this.bulletStateFunc(),s.default.addTargetTouchUpInside(this.setupBtn,this.setupTouchEnd.bind(this)),s.default.addTargetTouchUpInside(this.rankBtn,this.rankBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.ttRankBtn,this.rankBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.beginBtn,this.beginBtnEnd.bind(this)),s.default.addTargetTouchUpInside(this.focusBtn,this.focusBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.childBtn,this.childBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.deskBtn,this.deskBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.bulletBtn,this.bulletBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.collectBtn,this.collectBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.topicBtn,this.topicBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.friendBtn,this.friendBtnFunc.bind(this)),s.default.addTargetTouchUpInside(this.meBtn,this.meBtnFunc.bind(this)),l.default.isLogin()?(this.bulletBtn.active=!0,this.meBtn.active=!0):(this.bulletBtn.active=!1,this.meBtn.active=!1),this.childBtn.active=!1,this.deskBtn.active=!1,this.focusBtn.active=!1,y.default.isSupportFocusDouYin()&&(this.focusBtn.active=!0),this.setMainLayerData(),this.updateTimeFunc(),this.popCallbackCollect={freeCallBack:this.freeCallBackFunc.bind(this),exitCallBack:this.exitCallBackFunc.bind(this)},this.bottomRankNode.active=!1,this.requestData(),l.default.isPlatform(l.GDPlatform.wx)||l.default.isPlatform(l.GDPlatform.web)?(this.friendBtn.active=!0,this.rankBtn.active=!0):(this.friendBtn.active=!1,this.rankBtn.active=!1),l.default.isPlatform(l.GDPlatform.tt)||l.default.isPlatform(l.GDPlatform.oppo)||l.default.isPlatform(l.GDPlatform.vivo)?this.ttRankBtn.active=!0:this.ttRankBtn.active=!1},e.prototype.meBtnFunc=function(){console.log("\u4e2a\u4eba\u8d44\u6599"),cc.game.emit("showPop",{popName:"personalPop",showPopData:{}})},e.prototype.friendBtnFunc=function(){console.log("\u670b\u53cb\u5708"),cc.game.emit("showPop",{popName:"todayRankPop",showPopData:{}})},e.prototype.beginBtnEnd=function(){console.log("\u5f00\u59cb\u6e38\u620f"),this.beginTouchEnd(1)},e.prototype.topicBtnFunc=function(){console.log("\u4eca\u65e5\u8bdd\u9898"),this.beginTouchEnd(2)},e.prototype.collectBtnFunc=function(){console.log("\u6536\u85cf");var t={popName:"topicCollectPop",showPopData:{topicClothesNum:h.default.getInstance().collectionMark.topicClothesNum,changeClothesCb:this.changeClothesFunc.bind(this)}};cc.game.emit("showPop",t),this.collectBtn.getChildByName("tag_icon").active=!1,h.default.getInstance().collectionMark.topicClothesNum=0},e.prototype.changeClothesFunc=function(t){g.default.updateUserSkin(t,function(){}),setTimeout(function(){cc.game.emit(p.EMITKEY.CHANGESHEEPCLOTHES)},1e3)},e.prototype.bulletStateFunc=function(){var t=l.default.getItem(p.STORAGEKEY.BULLETSWITCH);if(!t)return console.log("bullet = "+t),void l.default.setItem(p.STORAGEKEY.BULLETSWITCH,1);this.bulletNode.opacity=1==t?255:0},e.prototype.rankUserInfoFunc=function(){l.default.isLogin()?(this.bulletBtn.active=!0,this.meBtn.active=!0):(this.bulletBtn.active=!1,this.meBtn.active=!1)},e.prototype.bulletBtnFunc=function(){h.default.getInstance().bulletTime<=0?cc.game.emit(p.EMITKEY.SHOWMAINTIPS,"\u4e00\u5206\u949f\u53ea\u80fd\u53d1\u4e00\u6761\u5f39\u5e55\u54e6~"):(console.log("\u53d1\u5f39\u5e55"),cc.game.emit("showPop",{popName:"bulletScreenPop",showPopData:{}}))},e.prototype.focusBtnFunc=function(){console.log("\u5173\u6ce8"),y.default.focusDouYin()},e.prototype.childBtnFunc=function(){console.log("\u8f6c\u8df3"),y.default.gameBox()},e.prototype.deskBtnFunc=function(){console.log("\u684c\u9762"),y.default.addShortcut()},e.prototype.requestData=function(){l.default.isLogin()&&g.default.requestUserInfo()},e.prototype.exitCallBackFunc=function(){},e.prototype.showBottomRankNode=function(t){t.index?(this.bottomRankNode.active=!0,this.bottomRankNode.getChildByName("rank").getComponent(cc.Label).string="\u7b2c"+t.index+"\u540d"):this.bottomRankNode.active=!1},e.prototype.freeCallBackFunc=function(){console.log("\u89c2\u770b\u5e7f\u544a ###### ");var t=this,e=l.default.GetVedioID();m.default.watchAdVideo({id:e,success:function(){console.log("\u6210\u529f sdk"),t.beginTouchCallbackFunc()},fail:function(){console.log("\u5931\u8d25")},nofit:function(){t.shareTTAction()}})},e.prototype.shareTTAction=function(){var t=this;if(m.default.isPlatform(m.Platform.wx)){var e=l.default.GetVedioID(),o=l.default.getUserData().openid;m.default.share(o,e,function(){t.shareCbMethod()},function(){cc.game.emit(p.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else if(m.default.isPlatform(m.Platform.tt)){var n={popName:"shareNodePop",showPopData:{type:2,shareCb:this.shareCbMethod.bind(this)}};cc.game.emit("showPop",n)}},e.prototype.shareCbMethod=function(){console.log("\u5206\u4eab\u6210\u529f ######"),this.beginTouchCallbackFunc()},e.prototype.rankBtnFunc=function(){console.log("\u6392\u884c\u699c"),cc.game.emit("showPop",{popName:"sheepRankPop",showPopData:{popCallbackCollect:null}})},e.prototype.setMainLayerData=function(){this.timeNode.active=!1;var t=v.default.todayIsWin();-1==t?this.levelNumLabel.string="\u52a0\u5165\u7f8a\u7fa4":0==t?this.levelNumLabel.string="\u518d\u6b21\u6311\u6218":1==t&&(this.levelNumLabel.string="\u5df2\u52a0\u5165\u7f8a\u7fa4",this.timeNode.active=!0)},e.prototype.setupTouchEnd=function(){console.log("\u6253\u5f00\u8bbe\u7f6e\u5f39\u7a97"),cc.game.emit("showPop",{popName:"setupPop",showPopData:{popCallbackCollect:null,setupType:1}})},e.prototype.beginTouchEnd=function(t){return r(this,void 0,Promise,function(){var e,o;return c(this,function(n){switch(n.label){case 0:return m.default.isPlatform(m.Platform.tt)?0!=l.default.isLogin()?[3,5]:[4,g.default.ttLogin()]:[3,6];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,g.default.getUserInfo()];case 3:return n.sent(),[3,5];case 4:return e=n.sent(),cc.warn("\u83b7\u53d6\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u53ef\u80fd\u7528\u6237\u62d2\u7edd\u6388\u6743",e),[3,5];case 5:return[3,17];case 6:return m.default.isPlatform(m.Platform.wx)?0!=l.default.isLogin()?[3,11]:[4,g.default.wxLogin()]:[3,12];case 7:n.sent(),n.label=8;case 8:return n.trys.push([8,10,,11]),[4,g.default.getWxUserInfo()];case 9:return n.sent(),[3,11];case 10:return o=n.sent(),cc.warn("\u83b7\u53d6\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u53ef\u80fd\u7528\u6237\u62d2\u7edd\u6388\u6743",o),[3,11];case 11:return[3,17];case 12:return m.default.isPlatform(m.Platform.oppo)?0!=l.default.isLogin()?[3,14]:[4,g.default.oppoLogin()]:[3,15];case 13:n.sent(),n.label=14;case 14:return[3,17];case 15:return m.default.isPlatform(m.Platform.vivo)?0!=l.default.isLogin()?[3,17]:[4,g.default.vivoLogin()]:[3,17];case 16:n.sent(),n.label=17;case 17:return console.log("\u767b\u5f55\u6210\u529f\uff0c\u6216\u8005\u5df2\u767b\u5f55 ###### "),1!=t?[3,18]:(this.beginGameStatus(),[3,20]);case 18:return 2!=t?[3,20]:[4,g.default.getTopicData(function(){})];case 19:n.sent(),d.default.reportTACommon("game_start",{type:"\u8bdd\u9898\u6311\u6218"}),v.default.topicModel&&v.default.topicModel.info&&0!=v.default.topicModel.info.type?this.enterTopicGame():(this.showChoosePop(0),console.log("\u52a0\u5165\u8bdd\u9898")),n.label=20;case 20:return[2]}})})},e.prototype.showChoosePop=function(t){var e={popName:"topicChoosePop",showPopData:{type:t,chooseCallback:this.chooseCallbackFunc.bind(this)}};cc.game.emit("showPop",e)},e.prototype.chooseCallbackFunc=function(){var t=this;this.enterTopicGame(),setTimeout(function(){t.showTeamPop()},1500)},e.prototype.enterTopicGame=function(){d.default.reportTACommon("topic_join_ad",{}),cc.game.emit(p.EMITKEY.SHOWTRANSITLAYER,function(){cc.game.emit(p.EMITKEY.SHOWMODULE,p.MODULETYPE.TOPIC)})},e.prototype.showTeamPop=function(){cc.game.emit("showPop",{popName:"topicJoinedPop",showPopData:{}})},e.prototype.beginGameStatus=function(){var t=v.default.todayIsWin();if(h.default.getInstance().todayState=t,console.log("state = ",t),d.default.reportTACommon("game_start",{type:"\u6bcf\u65e5\u6311\u6218"}),h.default.getInstance().unLimitVideo=!0,-1==t)this.gotoGame();else if(0==t)this.videoGotoGame();else if(1==t)return void cc.game.emit(p.EMITKEY.SHOWMAINTIPS,"\u6bcf\u65e5\u4e00\u5173,\u4eca\u5929\u5df2\u6311\u6218\u6210\u529f")},e.prototype.gotoGame=function(){var t={popName:"nothingPop",showPopData:{beginTouchCallback:this.beginTouchCallbackFunc.bind(this),popType:0}};cc.game.emit("showPop",t)},e.prototype.videoGotoGame=function(){var t=f.default.format(p.CALENDARNAMES[5],new Date),e=f.default.format(p.CALENDARNAMES[6],new Date),o=l.default.getDailyData(t,e),n=0;if(o&&o.unLimitVideo&&(n=o.unLimitVideo),n>=3||h.default.getInstance().unLimitVideo)h.default.getInstance().unLimitVideo=!0,this.beginTouchCallbackFunc(),console.log("\u514d\u5e7f\u544a ###### = "+n);else{h.default.getInstance().unLimitVideo=!1;var a={popName:"noLimitPop",showPopData:{playVideoFunc:this.playVideoFunc.bind(this),noPlayVideoFunc:this.noPlayVideoFunc.bind(this),videoCount:n}};cc.game.emit(p.EMITKEY.SHOWPOP,a),console.log("\u4e0d\u514d\u5e7f\u544a ###### = "+n)}},e.prototype.playVideoFunc=function(){console.log("\u89c2\u770b\u5e7f\u544a");var t=this,e=l.default.GetVedioID();m.default.watchAdVideo({id:e,success:function(){console.log("\u6210\u529f sdk");var e=f.default.format(p.CALENDARNAMES[5],new Date),o=f.default.format(p.CALENDARNAMES[6],new Date),n=l.default.getDailyData(e,o),a=1;n?(a=Number(n.unLimitVideo)+1,n.unLimitVideo=a,a>=3&&d.default.reportTACommon("unlimited_challenges_ad",{})):n={dailyID:o,isWin:!1,unLimitVideo:a,sheepNum:-1},l.default.saveDailyData(e,o,n),a>=3?(h.default.getInstance().unLimitVideo=!0,t.beginTouchCallbackFunc(),cc.game.emit(p.EMITKEY.CLOSEALLPOP)):t.videoGotoGame()},fail:function(){console.log("\u5931\u8d25")},nofit:function(){t.shareTTAction()}})},e.prototype.noPlayVideoFunc=function(){var t={popName:"getPropPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:6}};cc.game.emit(p.EMITKEY.SHOWPOP,t)},e.prototype.beginTouchCallbackFunc=function(){this.beginButtonDuration>=1?(this.beginButtonDuration=0,h.default.setGameType(p.GAMETYPE.GAMEDAILY),b.default.playBGM(),cc.game.emit(p.EMITKEY.BEGINGAME)):console.log("\u4e0d\u80fd\u8fde\u7eed\u70b9\u51fb")},i([C({type:cc.Node,tooltip:"\u5f00\u59cb\u6e38\u620f"})],e.prototype,"beginBtn",void 0),i([C(cc.Node)],e.prototype,"setupBtn",void 0),i([C({type:cc.Node,tooltip:"wx\u6392\u884c\u699c"})],e.prototype,"rankBtn",void 0),i([C({type:cc.Node,tooltip:"\u4e2a\u4eba\u8d44\u6599"})],e.prototype,"meBtn",void 0),i([C({type:cc.Node,tooltip:"\u5173\u6ce8\u6296\u97f3\u53f7"})],e.prototype,"focusBtn",void 0),i([C({type:cc.Node,tooltip:"\u6258\u513f\u6240"})],e.prototype,"childBtn",void 0),i([C({type:cc.Node,tooltip:"\u6dfb\u52a0\u5230\u684c\u9762"})],e.prototype,"deskBtn",void 0),i([C(cc.Node)],e.prototype,"timeNode",void 0),i([C(cc.Label)],e.prototype,"timeLabel",void 0),i([C(cc.Node)],e.prototype,"bottomRankNode",void 0),i([C(cc.Label)],e.prototype,"levelNumLabel",void 0),i([C({type:cc.Node,tooltip:"\u5f39\u5e55\u9875\u9762"})],e.prototype,"bulletNode",void 0),i([C({type:cc.Node,tooltip:"\u5f39\u5e55"})],e.prototype,"bulletBtn",void 0),i([C({type:cc.Node,tooltip:"\u6362\u88c5"})],e.prototype,"collectBtn",void 0),i([C({type:cc.Node,tooltip:"\u4eca\u65e5\u8bdd\u9898\u9875\u9762"})],e.prototype,"topicBtn",void 0),i([C({type:cc.Node,tooltip:"\u597d\u53cb\u6392\u884c\u699c"})],e.prototype,"friendBtn",void 0),i([C({type:cc.Node,tooltip:"tt\u6392\u884c\u699c"})],e.prototype,"ttRankBtn",void 0),i([N],e)}(cc.Component);o.default=w,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/native/tt-sdk":"tt-sdk","../common/sdk":"sdk","../common/util":"util","../manager/DateManager":"DateManager","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common"}],mapArea:[function(t,e,o){"use strict";cc._RF.push(e,"67f71SJOXZGlKQEcc+5J3rk","mapArea");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blackLine=null,e.widthNum=0,e.heightNum=0,e.minBlockNum=0,e}return a(e,t),e.prototype.start=function(){},e.prototype.refreshMap=function(t,e,o){this.widthNum=t,this.heightNum=e,this.minBlockNum=o,this.node.removeAllChildren();var n=this.widthNum*this.minBlockNum,a=this.heightNum*this.minBlockNum,i=this.node.width/n;this.node.height=i*a;for(var r=0;r<=n;r++){var c=r*i,s=0,l=0;l=r%(this.minBlockNum/2)==0?1:0,r%this.minBlockNum==0&&(l=2),this.addBlackLine(c,s,l,!0)}for(var u=0;u<=a;u++)c=0,s=-u*i,l=0,l=u%(this.minBlockNum/2)==0?1:0,u%this.minBlockNum==0&&(l=2),this.addBlackLine(c,s,l,!1)},e.prototype.addBlackLine=function(t,e,o,n){var a=cc.instantiate(this.blackLine);2==o?(a.height=6,a.opacity=50):1==o?(a.height=4,a.opacity=40):(a.height=2,a.opacity=20),n?(a.angle=-90,a.width=this.node.height):(a.angle=0,a.width=this.node.width),a.x=t,a.y=e,this.node.addChild(a)},i([s(cc.Prefab)],e.prototype,"blackLine",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],mapEditor:[function(t,e,o){"use strict";cc._RF.push(e,"d6b62YDoXJBjYP9NnAI8e6T","mapEditor");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/mapEditor/blockEditorPrefab"),c=t("../common/config"),s=t("../common/key-map"),l=t("./mapArea"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mapArea=null,e.blockArea=null,e.blockEditorNode=null,e.blockEditorPrefab=null,e.widthNum=0,e.heightNum=0,e.moveBlockType=0,e.moldType=1,e.levelID=0,e.blockNodeObj={},e.isDeleteBlock=!1,e.minBlockNum=8,e.blockMaxWidth=120,e.blockMaxHeight=135,e.moveMinBlockNum=1,e.newLevelDataObj=null,e}return a(e,t),e.prototype.start=function(){window.xuxu=this,cc.game.on("refreshMapSizeData",this.refreshMapSizeData,this),cc.game.on("setBlockTypeData",this.setBlockTypeData,this),cc.game.on("initLevelData",this.initLevelData,this),this.node.on(cc.Node.EventType.MOUSE_DOWN,this.mouseDown,this),this.node.on(cc.Node.EventType.MOUSE_ENTER,this.mouseEnter,this),this.node.on(cc.Node.EventType.MOUSE_MOVE,this.mouseMove,this),this.node.on(cc.Node.EventType.MOUSE_LEAVE,this.mouseLeave,this),s.default.onKeyDownWithMeta("a",this.changeMouseStatus.bind(this)),s.default.onKeyDownWithMeta("1",this.changeBlockVoid.bind(this)),s.default.onKeyDownWithMeta("2",this.changeBlockType.bind(this)),s.default.onKeyDownWithMeta("3",this.changeRandomBlockType.bind(this)),s.default.onKeyDownWithMeta("4",this.changeMoveMinBlockNum.bind(this)),s.default.onKeyDownWithMeta("z",this.changeMouseStatus.bind(this)),s.default.onKeyDownWithMeta("x",this.changeBlockVoid.bind(this)),s.default.onKeyDownWithMeta("c",this.changeRandomBlockType.bind(this)),s.default.onKeyDownWithMeta("v",this.changeMoveMinBlockNum.bind(this))},e.prototype.initLevelData=function(t){console.log("\u65b0\u5730\u56fe\u6570\u636e\uff1a",t),this.newLevelDataObj=t.newLevelData,this.levelID=this.newLevelDataObj.levelKey,this.setLevelMapData()},e.prototype.setBlockTypeData=function(t){if(!this.newLevelDataObj)return!1;this.newLevelDataObj.blockTypeData=t,console.log("\u8bbe\u7f6e\u5173\u5361\u56fe\u5757\u6570\u636e\uff1a",t)},e.prototype.refreshMapSizeData=function(t){if(!this.newLevelDataObj)return!1;this.newLevelDataObj.widthNum=t.width,this.newLevelDataObj.heightNum=t.height,this.setLevelMapData()},e.prototype.setLevelMapData=function(){this.initLevelAllBlock(),this.mapArea.getComponent(l.default).refreshMap(this.newLevelDataObj.widthNum,this.newLevelDataObj.heightNum,this.minBlockNum)},e.prototype.mouseDown=function(t){if(!this.newLevelDataObj||this.isDeleteBlock)return!1;var e=t.getLocation(),o=this.node.convertToNodeSpaceAR(e),n=this.getMouseBlockPoint(o),a=this.getMouseBlockArea(n);this.clickAddMapBlockNode(a),console.log("lineObj:",a.rolNum,a.rowNum)},e.prototype.mouseEnter=function(t){if(!this.newLevelDataObj||this.isDeleteBlock)return!1;this.blockEditorNode.active=!0;var e=t.getLocation(),o=this.node.convertToNodeSpaceAR(e);this.blockEditorNode.x=o.x,this.blockEditorNode.y=o.y;var n=this.node.width/this.newLevelDataObj.widthNum;this.blockEditorNode.scale=n/this.blockMaxWidth,this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType,this.moldType)},e.prototype.mouseMove=function(t){if(!this.newLevelDataObj||this.isDeleteBlock)return!1;var e=t.getLocation(),o=this.node.convertToNodeSpaceAR(e),n=this.getMouseBlockPoint(o);this.blockEditorNode.x=n.x,this.blockEditorNode.y=n.y},e.prototype.mouseLeave=function(){if(!this.newLevelDataObj||this.isDeleteBlock)return!1;this.blockEditorNode.active=!1},e.prototype.getMouseBlockArea=function(t){var e=this.newLevelDataObj.widthNum*this.minBlockNum,o=(this.heightNum,this.minBlockNum,this.node.width/e);return{rolNum:Math.floor(t.x/o),rowNum:Math.floor(Math.abs(t.y)/o)}},e.prototype.getMouseBlockPoint=function(t){var e=this.newLevelDataObj.widthNum*this.minBlockNum,o=(this.heightNum,this.minBlockNum,this.node.width/e*this.moveMinBlockNum),n=Math.floor(t.x/o)*o,a=-Math.floor(Math.abs(t.y)/o)*o;return cc.v2(n,a)},e.prototype.clickAddMapBlockNode=function(t){var e=this.getBlockLayerIndex(t),o={id:e+"-"+t.rolNum+"-"+t.rowNum,type:this.moveBlockType,rolNum:t.rolNum,rowNum:t.rowNum,layerNum:e,moldType:this.moldType,blockNode:null};this.newLevelDataObj.levelData[e]?this.newLevelDataObj.levelData[e].push(o):(this.newLevelDataObj.levelData[e]=[],this.newLevelDataObj.levelData[e].push(o)),console.log("\u6dfb\u52a0\u5b8c\u6570\u636e\uff1a",this.newLevelDataObj.levelData),this.addBlockEditorNode(t.rolNum,t.rowNum,e,this.moveBlockType,this.moldType)},e.prototype.initLevelAllBlock=function(){this.blockNodeObj={},this.blockArea.removeAllChildren();var t=this.newLevelDataObj.levelData;for(var e in t)for(var o in t[e])this.addBlockEditorNode(t[e][o].rolNum,t[e][o].rowNum,t[e][o].layerNum,t[e][o].type,t[e][o].moldType)},e.prototype.addBlockEditorNode=function(t,e,o,n,a){var i=cc.instantiate(this.blockEditorPrefab),c=this.newLevelDataObj.widthNum*this.minBlockNum,s=this.node.width/c,l=t*s,u=-e*s,p=this.node.width/this.newLevelDataObj.widthNum;i.scale=p/this.blockMaxWidth,i.x=l,i.y=u,i.getComponent(r.default).setBlockImgType(n,this.moldType),i.getComponent(r.default).setBlockLayerNum(t,e,o,a,this.deleteBlock.bind(this));var d=t+"-"+e+"-"+o;this.blockNodeObj[d]=i,this.blockArea.addChild(i),cc.game.emit("setBlockNum")},e.prototype.deleteBlock=function(t,e,o){if(this.isDeleteBlock){var n=t+"-"+e+"-"+o;this.blockNodeObj[n]&&(this.blockNodeObj[n].destroy(),delete this.blockNodeObj[n]);var a=this.newLevelDataObj.levelData;if(a[o])for(var i=0;ir&&u.rolNums&&u.rowNumo&&(o=u.layerNum+1)}return o},e.prototype.changeMoveMinBlockNum=function(){1==this.moveMinBlockNum?this.moveMinBlockNum=4:this.moveMinBlockNum=1},e.prototype.changeRandomBlockType=function(){this.moldType=2,this.moveBlockType=0,this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType,this.moldType)},e.prototype.changeBlockVoid=function(){this.moldType=1,this.moveBlockType=0,this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType,this.moldType)},e.prototype.changeBlockType=function(){this.moveBlockType++,this.moldType=1,this.moveBlockType>c.default.blockTypeConfig[c.default.blockTypeConfig.length-1]&&(this.moveBlockType=0),this.blockEditorNode.getComponent(r.default).setBlockImgType(this.moveBlockType,this.moldType)},e.prototype.changeMouseStatus=function(){if(console.log("command+a"),this.isDeleteBlock){console.log("this.isDeleteBlock",this.isDeleteBlock),this.isDeleteBlock=!1,this.blockEditorNode.active=!0;var t=this.node.width/this.newLevelDataObj.widthNum;this.blockEditorNode.scale=t/this.blockMaxWidth}else console.log("this.isDeleteBlock",this.isDeleteBlock),this.isDeleteBlock=!0,this.blockEditorNode.active=!1},i([d(cc.Node)],e.prototype,"mapArea",void 0),i([d(cc.Node)],e.prototype,"blockArea",void 0),i([d(cc.Node)],e.prototype,"blockEditorNode",void 0),i([d(cc.Prefab)],e.prototype,"blockEditorPrefab",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../pre/mapEditor/blockEditorPrefab":"blockEditorPrefab","../common/config":"config","../common/key-map":"key-map","./mapArea":"mapArea"}],maskLayer:[function(t,e,o){"use strict";cc._RF.push(e,"5fe07xHyi5IB5UwR8crAg1t","maskLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("./enumConfig"),c=cc._decorator,s=c.ccclass,l=(c.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.start=function(){this.node.active=!1,cc.game.on(r.EMITKEY.SHOWMASKLAYER,this.showMaskLayer,this),cc.game.on(r.EMITKEY.HIDEMASKLAYER,this.hideMaskLayer,this),this.node.on(cc.Node.EventType.TOUCH_START,this.starFunc,this),this.node.on(cc.Node.EventType.TOUCH_END,this.endFunc,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.moveFunc,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.cancelFunc,this)},e.prototype.showMaskLayer=function(){this.node.active=!0},e.prototype.hideMaskLayer=function(){this.node.active=!1},e.prototype.starFunc=function(t){t.stopPropagation()},e.prototype.endFunc=function(t){t.stopPropagation()},e.prototype.moveFunc=function(t){t.stopPropagation()},e.prototype.cancelFunc=function(t){t.stopPropagation()},i([s],e)}(cc.Component));o.default=l,cc._RF.pop()},{"./enumConfig":"enumConfig"}],mask:[function(t,e,o){"use strict";cc._RF.push(e,"29fbe5db7JFWJL2hqkjASq4","mask");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=(r.property,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.start=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.starFunc,this),this.node.on(cc.Node.EventType.TOUCH_END,this.endFunc,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.moveFunc,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.cancelFunc,this)},e.prototype.starFunc=function(t){t.stopPropagation()},e.prototype.endFunc=function(t){t.stopPropagation()},e.prototype.moveFunc=function(t){t.stopPropagation()},e.prototype.cancelFunc=function(t){t.stopPropagation()},i([c],e)}(cc.Component));o.default=s,cc._RF.pop()},{}],"mesh-vertex":[function(t,e,o){"use strict";cc._RF.push(e,"a29abOYIg9Li5/yGTvFnVbF","mesh-vertex"),Object.defineProperty(o,"__esModule",{value:!0}),o.MeshVertex=void 0;o.MeshVertex=function(t,e,o){this.position=t,this.normal=e,this.uv=o},cc._RF.pop()},{}],moveOutArea:[function(t,e,o){"use strict";cc._RF.push(e,"f88d3tXmpFFjbC+QpZh+Ueh","moveOutArea");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=t("./crushArea"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.crushAreaNode=null,e.crushAreaArgs=null,e.blockMaxWidth=120,e.parentComp=null,e.newScale=.8,e.newAddY=8,e.moveOutObj={1:[],2:[],3:[]},e}return a(e,t),e.prototype.start=function(){},e.prototype.initMoveOutArea=function(t){this.node.removeAllChildren(),this.parentComp=t,this.moveOutObj={1:[],2:[],3:[]}},e.prototype.addThreeOutBlock=function(t){for(var e=0;e0)return!1;return!0},e.prototype.updateBlockPosStatus=function(){for(var t in this.moveOutObj)for(var e=Number(t)*this.blockMaxWidth*this.newScale-this.blockMaxWidth*this.newScale/2,o=function(o){var a=n.moveOutObj[t][o],i=o*n.newAddY;o=7)){this.crushAreaNode.setSiblingIndex(10),this.crushAreaArgs.setSiblingIndex(10);var e=1;for(var o in this.moveOutObj)for(var n=0;n=0?console.log("\u7ebf\u4e0a\u73af\u5883\u505c\u6b62\u6d4b\u8bd5 ###### "):t.post({url:"/admin/game_map/upsert",data:{map_id:e,map_data:o},success:function(t){0==t.err_code?console.log("\u4fdd\u5b58\u5730\u56fe\uff1a",e,t):console.log("\u4fdd\u5b58\u5730\u56fe\u5931\u8d25:",e,t)}})},t.get=function(t){return a.default.get(n({host:this.host,baseParams:{}},t))},t.post=function(t){return a.default.post(n({host:this.host,baseParams:{}},t))},t.GETURL=function(t){return a.default.get(n({baseParams:{}},t))},t.POSTURL=function(t){return a.default.post(n({baseParams:{}},t))},t.GET=function(t,e,o){void 0===e&&(e={});var n="";Object.keys(e).forEach(function(t){n+=t+"="+encodeURIComponent(e[t])+"&"}),""!==n&&(t=t+"?"+(n=n.substr(0,n.lastIndexOf("&"))));var a=cc.loader.getXMLHttpRequest();a.open("GET",t,!0),a.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),a.onreadystatechange=function(){if(4===a.readyState){var t=a.responseText;a.status>=200&&a.status<300?(a.statusText,o(!0,t)):o(!1,t)}},a.timeout=this.TimeOut,a.send()},t.POST=function(t,e,o){void 0===e&&(e={});var n=cc.loader.getXMLHttpRequest(),a="";Object.keys(e).forEach(function(t){a+=t+"="+encodeURIComponent(e[t])+"&"}),""!==a&&(a=a.substr(0,a.lastIndexOf("&"))),n.open("POST",t,!0),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.onreadystatechange=function(){if(4===n.readyState){var t=n.responseText;n.status>=200&&n.status<300?(n.statusText,o(!0,t)):o(!1,t)}},n.send(a)},t.host=c.host,t.TimeOut=200,t}();o.default=s,cc._RF.pop()},{"../common/http":"http","./data-env":"data-env","./data-type":"data-type"}],newLevelPop:[function(t,e,o){"use strict";cc._RF.push(e,"da3caVMFQ5HlYmVp5lat/E1","newLevelPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../common/config"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputLevelNum=null,e.closeNode=null,e}return a(e,t),e.prototype.start=function(){this.closeNode.on(cc.Node.EventType.TOUCH_END,this.closeFunc,this)},e.prototype.showNewLevelPop=function(){this.node.active=!0,this.inputLevelNum.string=""},e.prototype.newLevelFunc=function(){var t=Number(this.inputLevelNum.string);t>0?(this.node.active=!1,this.emitNewLevel(t),console.log("\u8bbe\u7f6e\u5173\u5361\u6570",this.inputLevelNum.string)):console.log("error:\u4e66\u5199\u9519\u8bef")},e.prototype.emitNewLevel=function(t){var e=cc.instantiate(l.default.baseMapObj);e.levelKey=t;var o={newLevelData:e};cc.game.emit("initLevelData",o)},e.prototype.closeFunc=function(){this.node.active=!1},i([s({type:cc.EditBox,tooltip:"\u8f93\u5165\u5bf9\u5e94\u5173\u5361\u6570"})],e.prototype,"inputLevelNum",void 0),i([s(cc.Node)],e.prototype,"closeNode",void 0),i([c],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../common/config":"config"}],nextLevelPop:[function(t,e,o){"use strict";cc._RF.push(e,"b49fdZpjJtCJY67qY7JG6Ry","nextLevelPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.fainNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showPop=function(){var t=this;this.maskNode.opacity=0,this.node.active=!0,cc.tween(this.maskNode).to(0,{opacity:0}).to(.2,{opacity:178}).start();var e=cc.winSize.width;this.fainNode.x=e,this.fainNode.y=100,cc.tween(this.fainNode).to(1,{x:0,y:100},{easing:cc.easing.cubicOut}).delay(1).call(function(){cc.tween(t.maskNode).to(.8,{opacity:0}).start()}).to(1,{x:-e,y:100},{easing:cc.easing.quadOut}).call(function(){t.node.active=!1}).start()},i([s(cc.Node)],e.prototype,"maskNode",void 0),i([s(cc.Node)],e.prototype,"fainNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],noLimitPop:[function(t,e,o){"use strict";cc._RF.push(e,"86b2eck/b9Nv5kDApWcxh9L","noLimitPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/enumConfig"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.closeBtn=null,e.videoBtn=null,e.noVideoBtn=null,e.limitVideoLabel=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(c.EMITKEY.UPDATEPOPDATA,this.updatePopDataFunc,this),r.default.addbtnTouchEndScale(this.mask,this.closeBtnFunc.bind(this)),r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn),r.default.addbtnTouchStartScale(this.videoBtn),r.default.addbtnTouchEndScale(this.videoBtn,this.videoBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.videoBtn),r.default.addbtnTouchStartScale(this.noVideoBtn),r.default.addbtnTouchEndScale(this.noVideoBtn,this.noVideoBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.noVideoBtn)},e.prototype.updatePopDataFunc=function(){},e.prototype.closeBtnFunc=function(){this.node.active=!1,this.showPopData&&this.showPopData.noPlayVideoFunc&&this.showPopData.noPlayVideoFunc()},e.prototype.noVideoBtnFunc=function(){this.node.active=!1,this.showPopData&&this.showPopData.noPlayVideoFunc&&this.showPopData.noPlayVideoFunc()},e.prototype.videoBtnFunc=function(){this.node.active=!1,this.showPopData&&this.showPopData.playVideoFunc&&this.showPopData.playVideoFunc()},e.prototype.showNoLimitPop=function(t){this.node.active=!0,this.showPopData=t,this.limitVideoLabel.string=t.videoCount+"/3",cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start()},i([u(cc.Node)],e.prototype,"mask",void 0),i([u(cc.Node)],e.prototype,"popNode",void 0),i([u(cc.Node)],e.prototype,"closeBtn",void 0),i([u(cc.Node)],e.prototype,"videoBtn",void 0),i([u(cc.Node)],e.prototype,"noVideoBtn",void 0),i([u(cc.Label)],e.prototype,"limitVideoLabel",void 0),i([l],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/enumConfig":"enumConfig"}],nothingPop:[function(t,e,o){"use strict";cc._RF.push(e,"f9f03C5IqJPgrwEd50J+8g+","nothingPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/enumConfig"),s=t("../manager/DateManager"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.closeBtn=null,e.goBtn=null,e.titleLabel=null,e.descLabel=null,e.goLabel=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.mask,this.closeBtnFunc.bind(this)),r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn),r.default.addbtnTouchStartScale(this.goBtn),r.default.addbtnTouchEndScale(this.goBtn,this.goBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.goBtn)},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.goBtnFunc=function(){this.showPopData&&this.showPopData.beginTouchCallback&&this.showPopData.beginTouchCallback(),this.closeBtnFunc()},e.prototype.showNothingPop=function(t){this.node.active=!0,this.showPopData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var e=s.default.format(c.CALENDARNAMES[4],new Date);if(e){var o=e.split("-");o.length>=3&&(this.titleLabel.string=o[1]+"\u6708"+o[2]+"\u65e5")}},i([p(cc.Node)],e.prototype,"mask",void 0),i([p(cc.Node)],e.prototype,"popNode",void 0),i([p(cc.Node)],e.prototype,"closeBtn",void 0),i([p(cc.Node)],e.prototype,"goBtn",void 0),i([p(cc.Label)],e.prototype,"titleLabel",void 0),i([p(cc.Label)],e.prototype,"descLabel",void 0),i([p(cc.Label)],e.prototype,"goLabel",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/enumConfig":"enumConfig","../manager/DateManager":"DateManager"}],"page-house":[function(t,e,o){"use strict";cc._RF.push(e,"c7dfaR+FBhOv4WArlgOZb10","page-house");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/CcJsFunc"),c=t("../../common/dataTs"),s=t("../../common/enumConfig"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.showMain=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(s.EMITKEY.MAINUPDATEUI,this.updateSubUI,this),r.default.addbtnTouchStartScale(this.showMain),r.default.addbtnTouchEndScale(this.showMain,this.showMainFunc.bind(this)),r.default.addbtnTouchCancelScale(this.showMain),this.updateSubUI()},e.prototype.updateSubUI=function(){console.log("page-house MAINUPDATEUI"),1==c.default.currentHouseUnlockAll()?this.showMain.getChildByName("mark").active=!0:this.showMain.getChildByName("mark").active=!1},e.prototype.showMainFunc=function(){cc.game.emit(s.EMITKEY.UPDATETABBARRECEIVE,1)},i([p(cc.Node)],e.prototype,"showMain",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig"}],"page-main":[function(t,e,o){"use strict";cc._RF.push(e,"df8f95zulFCI6iyRCXBRejZ","page-main");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../i18n/gd_language"),c=t("../../../i18n/i18n"),s=t("../../common/CcJsFunc"),l=t("../../common/dataTs"),u=t("../../common/enumConfig"),p=t("../../common/sdk"),d=t("../../common/spine"),h=t("../../common/util"),f=t("../../manager/GameManager"),m=cc._decorator,g=m.ccclass,y=m.property,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainLayer=null,e.nextBtn=null,e.sprintReward=null,e.sprintWinLabel=null,e.sprintWinLabelShadow=null,e.sprintTimeLabel=null,e.cookieReward=null,e.updateTime=0,e.popCallbackCollect=null,e}return a(e,t),e.prototype.update=function(t){this.updateTime+=t,this.updateTime>=1&&(this.updateTime-=1,this.updateTimeNum())},e.prototype.updateTimeNum=function(){if(!(l.default.getUserData().playLevelId<3)){var t=l.default.updateSprintRewardTime();if(0==t)console.log("\u5df2\u6ee1"),this.sprintTimeLabel.string="End";else{var e=h.default.formatTime(t);e[0]>0?this.sprintTimeLabel.string=e[0]+"d "+e[1]+"h":e[1]>0?this.sprintTimeLabel.string=e[1]+"h "+e[2]+"m":e[2]>0?this.sprintTimeLabel.string=e[2]+"m "+e[3]+"s":e[3]>0&&(this.sprintTimeLabel.string=e[2]+"m "+e[3]+"s")}}},e.prototype.start=function(){cc.game.on(u.EMITKEY.MAINUPDATEUI,this.updateUiDataFunc,this),f.default.getInstance().gameEnv==u.GAMEENV.ENVRELEASE?(this.nextBtn.active=!1,cc.sys.isBrowser&&(this.nextBtn.active=!0),p.default.isPlatform(p.Platform.ios)&&(this.nextBtn.active=!0)):this.nextBtn.active=!0,s.default.addbtnTouchStartScale(this.nextBtn),s.default.addbtnTouchEndScale(this.nextBtn,this.nextBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.nextBtn),s.default.addbtnTouchStartScale(this.sprintReward),s.default.addbtnTouchEndScale(this.sprintReward,this.sprintRewardFunc.bind(this)),s.default.addbtnTouchCancelScale(this.sprintReward);var t=this.cookieReward.getChildByName("click-btn");s.default.addbtnTouchEndScale(t,this.cookieRewardFunc.bind(this)),this.updateTimeNum(),this.updateUiDataFunc(),this.popCallbackCollect={playGameCallBack:this.playGameCallBackFunc.bind(this)}},e.prototype.playGameCallBackFunc=function(){},e.prototype.cookieRewardFunc=function(){var t={popName:"nothingPop",showPopData:{popCallbackCollect:this.popCallbackCollect,popType:4}};cc.game.emit("showPop",t)},e.prototype.updateUiDataFunc=function(){console.log("page-main MAINUPDATEUI");var t=l.default.getSprintRewardData();this.sprintWinLabel.string=t.winNum+"",this.sprintWinLabelShadow.string=t.winNum+"",this.sprintReward.getChildByName("mark").active=f.default.getInstance().sprintMark,this.sprintReward.getComponent(d.default).play("4Icon_RichRoad1",0,function(){console.log("4Icon_RichRoad1 ######")}),l.default.getUserData().playLevelId=e){var o=l.default.getSprintRewardData();o.winNum+=1,o.rewardProgress<3?(o.rewardProgress+=1,3==o.rewardProgress&&(o.winBox+=1)):o.rewardProgress=1,l.default.setSprintRewardData(o)}if(l.default.getSprintRewardData().rewardProgress>=3){var n=l.default.getSprintRewardData().winBox,a=l.default.getUserData(),i=n>5?5:n,r=12;i>1&&(r+=11*(i-1)),a.coin+=r,a.prop_remove+=1,l.default.saveUserData(a)}cc.game.emit(u.EMITKEY.MAINUPDATEUI)},e.prototype.sprintRewardFunc=function(){console.log("\u51b2\u523a\u5956\u52b1");var t=l.default.gameConfigData.baseConfigData.sprintRewardLevel;l.default.getUserData().playLevelId>=t?cc.game.emit("showPop",{popName:"sprintRewardPop",showPopData:{popCallbackCollect:null,popType:0}}):cc.game.emit("showMainTips",c.default.instance.trans(r.GDLanguage.challenge_unlocked_level,3))},i([y(cc.Node)],e.prototype,"mainLayer",void 0),i([y(cc.Node)],e.prototype,"nextBtn",void 0),i([y(cc.Node)],e.prototype,"sprintReward",void 0),i([y(cc.Label)],e.prototype,"sprintWinLabel",void 0),i([y(cc.Label)],e.prototype,"sprintWinLabelShadow",void 0),i([y(cc.Label)],e.prototype,"sprintTimeLabel",void 0),i([y(cc.Node)],e.prototype,"cookieReward",void 0),i([g],e)}(cc.Component);o.default=v,cc._RF.pop()},{"../../../i18n/gd_language":"gd_language","../../../i18n/i18n":"i18n","../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/sdk":"sdk","../../common/spine":"spine","../../common/util":"util","../../manager/GameManager":"GameManager"}],picturePop:[function(t,e,o){"use strict";cc._RF.push(e,"e955bv+WvlGDIiibEKuUWDZ","picturePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../common/CcJsFunc"),s=t("../manager/GameManager"),l=t("../../i18n/i18n"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.wallpaperBtn=null,e.brickBtn=null,e.wallpaperSv=null,e.brickSv=null,e.topUIBtnArr=[],e.contentSvArr=[],e}return a(e,t),e.prototype.hideRankPop=function(){this.node.active=!1},e.prototype.onLoad=function(){},e.prototype.onEnable=function(){this.updateMarkClot()},e.prototype.updateMarkClot=function(){var t=s.default.getInstance().collectionMark;this.wallpaperBtn.getChildByName("mark").active=t.bgNum>0,this.brickBtn.getChildByName("mark").active=t.brickNum>0},e.prototype.start=function(){c.default.addbtnTouchStartScale(this.wallpaperBtn),c.default.addbtnTouchEndScale(this.wallpaperBtn,this.topUIButtonAction.bind(this,"wallpaper",0)),c.default.addbtnTouchCancelScale(this.wallpaperBtn),c.default.addbtnTouchStartScale(this.brickBtn),c.default.addbtnTouchEndScale(this.brickBtn,this.topUIButtonAction.bind(this,"brick",1)),c.default.addbtnTouchCancelScale(this.brickBtn),this.setupSubNode(),this.wallpaperBtn.getChildByName("label").getComponent(cc.Label).string=l.default.instance.trans(r.GDLanguage.wallpaper),this.brickBtn.getChildByName("label").getComponent(cc.Label).string=l.default.instance.trans(r.GDLanguage.block_bricks)},e.prototype.setupSubNode=function(){for(var t=0;t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=t("../pop/bullet-screen-pop"),s=t("../pop/challengeSucPop"),l=t("../pop/failPop"),u=t("../pop/FriendRankPop"),p=t("../pop/getPropPop"),d=t("../pop/loseLovePop"),h=t("../pop/nextLevelPop"),f=t("../pop/noLimitPop"),m=t("../pop/nothingPop"),g=t("../pop/PersonalPop"),y=t("../pop/setupPop"),v=t("../pop/shareNodePop"),b=t("../pop/sheep-rank-pop"),_=t("../pop/show-daily-pop"),N=t("../pop/stagePop"),C=t("../pop/TodayRankPop"),w=t("../pop/topicChoosePop"),P=t("../pop/topicCollectPop"),k=t("../pop/topicJoinedPop"),S=t("../pop/topicLastWinPop"),D=t("../pop/topicNewPop"),A=t("../pop/winPop"),T=cc._decorator,O=T.ccclass,I=T.property,E=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.showDailyPrefab=null,e.showDailyPop=null,e.setupPopPrefab=null,e.setupPop=null,e.getPropPopPrefab=null,e.getPropPop=null,e.nothingPopPrefab=null,e.nothingPop=null,e.failPopPrefab=null,e.failPop=null,e.loseLovePopPrefab=null,e.loseLovePop=null,e.winPopPrefab=null,e.winPop=null,e.noLimitPopPrefab=null,e.noLimitPop=null,e.sheepRankPopPrefab=null,e.sheepRankPop=null,e.stagePopPrefab=null,e.stagePop=null,e.bulletScreenPopPrefab=null,e.bulletScreenPop=null,e.nextLevelPopPrefab=null,e.nextLevelPop=null,e.shareNodePopPrefab=null,e.shareNodePop=null,e.topicChoosePopPrefab=null,e.topicChoosePop=null,e.topicCollectPopPrefab=null,e.topicCollectPop=null,e.topicLastWinPopPrefab=null,e.topicLastWinPop=null,e.topicNewPopPrefab=null,e.topicNewPop=null,e.todayRankPopPrefab=null,e.todayRankPop=null,e.firendRankPopPrefab=null,e.firendRankPop=null,e.personalPopPrefab=null,e.personalPop=null,e.topicJoinedPopPrefab=null,e.topicJoinedPop=null,e.challengeSucPopPrefab=null,e.challengeSucPop=null,e.showPopArray=[],e}return a(e,t),e.prototype.start=function(){cc.game.on(r.EMITKEY.SHOWPOP,this.showPop,this),cc.game.on(r.EMITKEY.CLOSEALLPOP,this.closeAllPop,this),this.initPop(),this.closeAllPop()},e.prototype.initPop=function(){this.todayRankPop=this.ifHaveNode(this.todayRankPop,this.todayRankPopPrefab)},e.prototype.showPop=function(t){var e=t.popName,o=t.showPopData;"winPop"==e?(this.winPop=this.ifHaveNode(this.winPop,this.winPopPrefab),this.winPop.getComponent(A.default).showWinPop(o)):"failPop"==e?(this.failPop=this.ifHaveNode(this.failPop,this.failPopPrefab),this.failPop.getComponent(l.default).showFailPop(o)):"loseLovePop"==e?(this.loseLovePop=this.ifHaveNode(this.loseLovePop,this.loseLovePopPrefab),this.loseLovePop.getComponent(d.default).showLoseLovePop(o)):"setupPop"==e?(this.setupPop=this.ifHaveNode(this.setupPop,this.setupPopPrefab),this.setupPop.getComponent(y.default).showSetupPop(o)):"getPropPop"==e?(this.getPropPop=this.ifHaveNode(this.getPropPop,this.getPropPopPrefab),this.getPropPop.getComponent(p.default).showGetPropPop(o)):"nothingPop"==e?(this.nothingPop=this.ifHaveNode(this.nothingPop,this.nothingPopPrefab),this.nothingPop.getComponent(m.default).showNothingPop(o)):"showDailyPop"==e?(this.showDailyPop=this.ifHaveNode(this.showDailyPop,this.showDailyPrefab),this.showDailyPop.getComponent(_.default).showPop(o)):"noLimitPop"==e?(this.noLimitPop=this.ifHaveNode(this.noLimitPop,this.noLimitPopPrefab),this.noLimitPop.getComponent(f.default).showNoLimitPop(o)):"sheepRankPop"==e?(this.sheepRankPop=this.ifHaveNode(this.sheepRankPop,this.sheepRankPopPrefab),this.sheepRankPop.getComponent(b.default).sheepRankPop(o)):"stagePop"==e?(this.stagePop=this.ifHaveNode(this.stagePop,this.stagePopPrefab),this.stagePop.getComponent(N.default).showPop(o)):"bulletScreenPop"==e?(this.bulletScreenPop=this.ifHaveNode(this.bulletScreenPop,this.bulletScreenPopPrefab),this.bulletScreenPop.getComponent(c.default).showPop(o)):"nextLevelPop"==e?(this.nextLevelPop=this.ifHaveNode(this.nextLevelPop,this.nextLevelPopPrefab),this.nextLevelPop.getComponent(h.default).showPop(o)):"shareNodePop"==e?(this.shareNodePop=this.ifHaveNode(this.shareNodePop,this.shareNodePopPrefab),this.shareNodePop.getComponent(v.default).showPop(o)):"topicChoosePop"==e?(this.topicChoosePop=this.ifHaveNode(this.topicChoosePop,this.topicChoosePopPrefab),this.topicChoosePop.getComponent(w.default).showPop(o)):"topicCollectPop"==e?(this.topicCollectPop=this.ifHaveNode(this.topicCollectPop,this.topicCollectPopPrefab),this.topicCollectPop.getComponent(P.default).showPop(o)):"topicLastWinPop"==e?(this.topicLastWinPop=this.ifHaveNode(this.topicLastWinPop,this.topicLastWinPopPrefab),this.topicLastWinPop.getComponent(S.default).showPop(o)):"topicNewPop"==e?(this.topicNewPop=this.ifHaveNode(this.topicNewPop,this.topicNewPopPrefab),this.topicNewPop.getComponent(D.default).showPop(o)):"friendRankPop"==e?(this.firendRankPop=this.ifHaveNode(this.firendRankPop,this.firendRankPopPrefab),this.firendRankPop.getComponent(u.default).showPop(o)):"todayRankPop"==e?(this.todayRankPop=this.ifHaveNode(this.todayRankPop,this.todayRankPopPrefab),this.todayRankPop.getComponent(C.default).showPop(o)):"personalPop"==e?(this.personalPop=this.ifHaveNode(this.personalPop,this.personalPopPrefab),this.personalPop.getComponent(g.default).showPop(o)):"topicJoinedPop"==e?(this.topicJoinedPop=this.ifHaveNode(this.topicJoinedPop,this.topicJoinedPopPrefab),this.topicJoinedPop.getComponent(k.default).showPop(o)):"challengeSucPop"==e&&(this.challengeSucPop=this.ifHaveNode(this.challengeSucPop,this.challengeSucPopPrefab),this.challengeSucPop.getComponent(s.default).showPop(o))},e.prototype.ifHaveNode=function(t,e){return t||(t=cc.instantiate(e),this.node.addChild(t)),t.setSiblingIndex(-1),t},e.prototype.closeAllPop=function(){var t=this.node.children;for(var e in t){var o=t[e];o.setSiblingIndex(0),o.active=!1}},i([I({type:cc.Prefab,tooltip:"\u6bcf\u65e5\u6311\u6218\u83b7\u53d6\u793c\u5305"})],e.prototype,"showDailyPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u8bbe\u7f6e\u9875\u9762"})],e.prototype,"setupPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u83b7\u53d6\u9053\u5177\u9875\u9762"})],e.prototype,"getPropPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u4e00\u4e9b\u901a\u7528\u9875\u9762"})],e.prototype,"nothingPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u5931\u8d25\u9875\u9762"})],e.prototype,"failPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u653e\u5f03\u6311\u6218\u754c\u9762"})],e.prototype,"loseLovePopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u80dc\u5229\u754c\u9762"})],e.prototype,"winPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u65e0\u9650\u751f\u547d\u9875\u9762"})],e.prototype,"noLimitPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u6392\u884c\u5f39\u6846\u9875\u9762"})],e.prototype,"sheepRankPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u821e\u53f0\u5f39\u6846\u9875\u9762"})],e.prototype,"stagePopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u5f39\u5e55\u5f39\u6846\u9875\u9762"})],e.prototype,"bulletScreenPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u4e0b\u4e00\u7b49\u7ea7\u63d0\u793a"})],e.prototype,"nextLevelPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u5206\u4eab\u5f39\u6846"})],e.prototype,"shareNodePopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u9009\u62e9\u7f8a\u961f"})],e.prototype,"topicChoosePopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u6536\u85cf\u9875\u9762"})],e.prototype,"topicCollectPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u6628\u65e5\u83b7\u80dc\u9875\u9762"})],e.prototype,"topicLastWinPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u6628\u65e5\u83b7\u80dc\u9875\u9762\u5956\u52b1\u5f39\u6846"})],e.prototype,"topicNewPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u4eca\u65e5\u670b\u53cb\u5708"})],e.prototype,"todayRankPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u597d\u53cb\u6392\u884c\u699c"})],e.prototype,"firendRankPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u4e2a\u4eba\u8d44\u6599"})],e.prototype,"personalPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"\u961f\u4f0d\u5206\u914d\u5f39\u7a97"})],e.prototype,"topicJoinedPopPrefab",void 0),i([I({type:cc.Prefab,tooltip:"wx\u83b7\u80dc\u5f39\u6846"})],e.prototype,"challengeSucPopPrefab",void 0),i([O],e)}(cc.Component);o.default=E,cc._RF.pop()},{"../common/enumConfig":"enumConfig","../pop/FriendRankPop":"FriendRankPop","../pop/PersonalPop":"PersonalPop","../pop/TodayRankPop":"TodayRankPop","../pop/bullet-screen-pop":"bullet-screen-pop","../pop/challengeSucPop":"challengeSucPop","../pop/failPop":"failPop","../pop/getPropPop":"getPropPop","../pop/loseLovePop":"loseLovePop","../pop/nextLevelPop":"nextLevelPop","../pop/noLimitPop":"noLimitPop","../pop/nothingPop":"nothingPop","../pop/setupPop":"setupPop","../pop/shareNodePop":"shareNodePop","../pop/sheep-rank-pop":"sheep-rank-pop","../pop/show-daily-pop":"show-daily-pop","../pop/stagePop":"stagePop","../pop/topicChoosePop":"topicChoosePop","../pop/topicCollectPop":"topicCollectPop","../pop/topicJoinedPop":"topicJoinedPop","../pop/topicLastWinPop":"topicLastWinPop","../pop/topicNewPop":"topicNewPop","../pop/winPop":"winPop"}],"prop-prefab":[function(t,e,o){"use strict";cc._RF.push(e,"78621mmfFZP3p0KRuVUnueB","prop-prefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=t("../../script/common/native/audio"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.propImage=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showWithType=function(t,e,o){var n="",a=e.position;1==t?n="rewardIcon/prop_remove.png":2==t?n="rewardIcon/prop_cancel.png":3==t&&(n="rewardIcon/prop_random.png"),r.default.changeSpriteFrame(this.propImage,n);var i=this;cc.tween(this.node).to(.1,{scale:1.1}).to(.1,{scale:1}).to(.1,{scale:.9}).to(.1,{scale:.9}).to(.1,{angle:10}).to(.1,{angle:-10}).to(.1,{angle:10}).to(.1,{angle:-10}).to(.1,{angle:0}).to(.3,{position:a,scale:0}).call(function(){i.node.destroy(),cc.tween(e).to(.1,{scale:1.5}).to(.1,{scale:1}).start(),c.default.playAudioMusic("audio/sound/pop-fly-end.mp3",!1),o&&o()}).start()},i([u(cc.Node)],e.prototype,"propImage",void 0),i([l],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/native/audio":"audio"}],"register-head-image":[function(t,e,o){"use strict";function n(t,e,o){var n=new Image;function a(){n.removeEventListener("load",a),n.removeEventListener("error",i),o&&o(null,n)}function i(){n.removeEventListener("load",a),n.removeEventListener("error",i),o&&o(new Error(t))}return"file:"!==window.location.protocol&&(n.crossOrigin="anonymous"),n.addEventListener("load",a),n.addEventListener("error",i),n.src=t,n}cc._RF.push(e,"8f94axQML9NUKBkQZXk81kh","register-head-image"),Object.defineProperty(o,"__esModule",{value:!0}),o.registerHeadImgLoader=o.headImgExt=void 0,o.headImgExt=".head",o.registerHeadImgLoader=function(){cc.assetManager.downloader.register(o.headImgExt,function(t,e,o){o(null,t)}),cc.assetManager.parser.register(o.headImgExt,n),cc.assetManager.factory.register(o.headImgExt,function(t,e,o,n){var a=null,i=null;try{(a=new cc.Texture2D)._uuid=t,a._nativeUrl=t,a._nativeAsset=e}catch(r){i=r}n&&n(i,a)})},cc._RF.pop()},{}],"report-common":[function(t,e,o){"use strict";cc._RF.push(e,"cdaf1e/eKZNDKb4XXuwbreu","report-common");var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,n=arguments.length;o=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=100?80:t>=50?50:t>=30?30:t>=20?20:t>=10?10:5},i([d({type:l.CoinEmitter,tooltip:"\u53d1\u5c04\u5668 \u63a7\u5236\u8282\u70b9"})],e.prototype,"coinEmitter",void 0),i([d({type:[cc.Prefab],tooltip:"\u53d1\u5c04\u5668\u9884\u5236\u4f53"})],e.prototype,"prefabList",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"./CoinEmitter":"CoinEmitter"}],rewardPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"a121afwuuhFa6IKfrPvi+zw","rewardPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.icon=null,e.rewardNum=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setRewardNode=function(t){var e="rewardIcon/"+t.propType+".png";r.default.changeSpriteFrame(this.icon,e),this.rewardNum.string=""+t.num},i([l(cc.Node)],e.prototype,"icon",void 0),i([l(cc.Label)],e.prototype,"rewardNum",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],saveAsPop:[function(t,e,o){"use strict";cc._RF.push(e,"79458xlXgdFfJ/BI3F5BmEK","saveAsPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputLevelNum=null,e.closeNode=null,e}return a(e,t),e.prototype.start=function(){this.closeNode.on(cc.Node.EventType.TOUCH_END,this.closeFunc,this)},e.prototype.showSaveAsPop=function(){this.node.active=!0,this.inputLevelNum.string=""},e.prototype.selectLevelFunc=function(){var t=Number(this.inputLevelNum.string);t>0?(this.node.active=!1,this.emitSelectLevel(t),console.log("\u8bbe\u7f6e\u5173\u5361\u6570",this.inputLevelNum.string)):console.log("error:\u4e66\u5199\u9519\u8bef")},e.prototype.emitSelectLevel=function(t){cc.game.emit("saveAsNewMap",t)},e.prototype.closeFunc=function(){this.node.active=!1},i([s({type:cc.EditBox,tooltip:"\u8f93\u5165\u53e6\u5b58\u4e3a\u5173\u5361\u6570"})],e.prototype,"inputLevelNum",void 0),i([s(cc.Node)],e.prototype,"closeNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],sdk:[function(t,e,o){"use strict";cc._RF.push(e,"e267eKhDStMpaYZFC42eefy","sdk");var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,n=arguments.length;o0&&(a=n.getRangeAt(0)),document.body.appendChild(o),o.select(),o.selectionStart=0,o.selectionEnd=e.length;var s=!1;try{s=document.execCommand("copy")}catch(l){cc.warn("[sdk] copy to clipboard err",l)}document.body.removeChild(o),a&&(n.removeAllRanges(),n.addRange(a)),s?cc.log("h5 copy to clipboard success"):cc.log("h5 copy to clipboard failed")}},t.chooseImage=function(){this.isPlatform(i.wx)?cc.log("---wxChooseImage---"):cc.sys.platform==cc.sys.BYTEDANCE_GAME?cc.log("---ttChooseImage---"):cc.sys.isBrowser&&cc.log("---h5ChooseImage---")},t.preloadVideoAd=function(t,e,o,n,a){var r=this;void 0===a&&(a=!0),cc.log("[sdk] video ad",t);var c=t;if(console.log("cc.sys.os:",cc.sys.os),console.log("adID:",c),console.log("this.videoAdMap:",this.videoAdMap),""!=c){var s=null;if(this.videoAdMap[c]){if(!a)return console.log("[video ad] \u4f7f\u7528\u5df2\u6709\u56de\u8c03\u65b9\u6cd5"),this.videoAdMap[c];var l=this.videoAdMap[c],u=l.video,d=l.close,h=l.error;u.offClose(d),u.offError(h),s=u,console.log("[video ad] \u6e05\u7a7a\u56de\u8c03\u65b9\u6cd5")}else console.log("\u521b\u5efa\u5b9e\u529b"),this.isPlatform(i.wx)?s=wx.createRewardedVideoAd({adUnitId:c,multiton:!0}):this.isPlatform(i.tt)?s=tt.createRewardedVideoAd({adUnitId:c,multiton:!0}):this.isPlatform(i.oppo)?s=qg.createRewardedVideoAd({adUnitId:c}):this.isPlatform(i.vivo)&&(s=ad.createRewardedVideoAd({adUnitId:c}));var f=function(t){t&&t.isEnded||void 0===t?(console.log("\u6b63\u5e38\u64ad\u653e\u7ed3\u675f\uff0c\u53ef\u4ee5\u4e0b\u53d1\u6e38\u620f\u5956\u52b1 ++++"),e&&e(),r.isPlatform(i.wx)&&r.reportRewardBehavior(4,c,s)):(cc.game.emit("showMainTips","\u4e2d\u9014\u9000\u51fa\uff0c\u4e0d\u4e0b\u53d1\u6e38\u620f\u5956\u52b1"),console.log("\u64ad\u653e\u4e2d\u9014\u9000\u51fa\uff0c\u4e0d\u4e0b\u53d1\u6e38\u620f\u5956\u52b1 ----"),o&&o("quit","\u4e2d\u9014\u9000\u51fa"),r.isPlatform(i.wx)&&r.reportRewardBehavior(3,c,s)),p.default.playBGM(),r._canShowRewardedVideoAd=!0},m=function(t){1004==t.errCode||1005==t.errCode||1006==t.errCode?n&&n("no-fit","\u6ca1\u6709\u5408\u9002\u7684\u5e7f\u544a"):o&&o(t.errCode,t.errMsg),r.reportRewardBehavior(5,c,s),console.log("\u6ca1\u6709\u5408\u9002\u7684\u5e7f\u544a = ",t.errCode,t.errMsg),cc.game.emit("showMainTips","\u5e7f\u544a\u62c9\u53d6\u5931\u8d25",t.errCode),p.default.playBGM(),r._canShowRewardedVideoAd=!0};if(null!=s&&null!=s)return s.onClose(f),s.onError(m),this.isPlatform(i.wx)&&s.onLoad(function(t){t&&(1==t.shareValue?r.wxValue="shareValue":1==t.rewardValue?r.wxValue="rewardValue":r.wxValue=""),console.log("\u6fc0\u52b1\u89c6\u9891 \u5e7f\u544a\u52a0\u8f7d\u6210\u529f = ",t,"wxValue = ",r.wxValue)}),cc.log("[video ad] \u6ce8\u518c\u65b0\u7684\u56de\u8c03\u65b9\u6cd5"),this.videoAdMap[c]={video:s,close:f,error:m},this.videoAdMap[c]}},t.share=function(t,e,o,n){var a=this;this.isPlatform(i.wx)?h.default.shareMethod({success:function(){o&&o()},fail:function(){n&&n()},complete:function(){if(a.videoAdMap[e]){var o=a.videoAdMap[e].video;a.reportShareBehavior(t,e,o)}}}):o&&o()},t.createCanvas=function(){if(this.isPlatform(i.wx)){var t=canvas.toTempFilePathSync({x:0,y:0,width:cc.winSize.width,height:cc.winSize.height,destWidth:cc.winSize.width,destHeight:cc.winSize.height,fileType:"png",quality:"1.0"});this.wxSave(t)}else if(this.isPlatform(i.tt)){var e=canvas.toTempFilePathSync({x:0,y:0,width:cc.winSize.width,height:cc.winSize.height,destWidth:cc.winSize.width,destHeight:cc.winSize.height});tt.shareAppMessage({imageUrl:e})}},t.wxSave=function(t){wx.authorize({scope:"scope.writePhotosAlbum",success:function(){wx.saveImageToPhotosAlbum({filePath:t,success:function(){wx.showToast({title:"\u622a\u56fe\u5df2\u4fdd\u5b58\u81f3\u76f8\u518c,\u5feb\u5feb\u5206\u4eab\u5230\u670b\u53cb\u5708\u5427",icon:"none",image:"",duration:1500})},fail:function(){}})},fail:function(){var e={title:"\u5fae\u4fe1\u6388\u6743",content:"\u4fdd\u5b58\u5230\u76f8\u518c\u9700\u8981\u60a8\u7684\u6388\u6743\uff0c\u8bf7\u7ed9\u4e88\u6211\u4eec\u6388\u6743",showCancel:!0,canelColor:"#666",confirmText:"\u53bb\u6388\u6743",confirmColor:"#666",success:function(e){1==e.confirm&&wx.openSetting({success:function(){wx.saveImageToPhotosAlbum({filePath:t,success:function(){wx.showToast({title:"\u622a\u56fe\u5df2\u4fdd\u5b58\u81f3\u76f8\u518c,\u5feb\u5feb\u5206\u4eab\u5230\u670b\u53cb\u5708\u5427",icon:"none",image:"",duration:1500})},fail:function(){}})}})}};wx.showModal(e)}})},t.reportRewardBehavior=function(t,e,o){o.reportShareBehavior({operation:t,currentShow:0,strategy:1,adunit:e,scenelD:1,shareValue:0,rewardValue:1})},t.reportShareBehavior=function(t,e,o){o.reportShareBehavior({operation:6,inviteUser:t,strategy:1,adunit:e,scenelD:1,shareValue:1,rewardValue:0})},t.watchAdVideo=function(t){var e=this,o=t.id,n=t.tag,a=t.success,r=t.fail,c=t.nofit;if(0!=this._canShowRewardedVideoAd)if(cc.log("[sdk] watch ad video",n),cc.sys.isBrowser)a&&a();else{if(""!=o){if(this.isPlatform(i.android))l.default.showRewardVideoAd(o,a,r);else if(this.isPlatform(i.wx)){var s=this.preloadVideoAd(o,a,r,c,!0).video;s.show().then(function(){return s.show(),e.reportRewardBehavior(1,o,s),!0}).catch(function(t){if(console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u5931\u8d25",t),console.log("\u5e7f\u544a\u7ec4\u4ef6\u51fa\u73b0\u95ee\u9898",t),s.load().then(function(){console.log("\u624b\u52a8\u52a0\u8f7d\u6210\u529f"),s.show()}),"can't invoke load() while video-ad is showed"!=t.errMsg)return r&&r(t),!1;console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.")})}else if(this.isPlatform(i.tt)){console.log("[\u5b57\u8282sdk]");var u=this.preloadVideoAd(o,a,r,c,!0).video;u.show().then(function(){return console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u6210\u529f"),!0}).catch(function(t){if(console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u5931\u8d25",t),console.log("\u5e7f\u544a\u7ec4\u4ef6\u51fa\u73b0\u95ee\u9898",t),u.load().then(function(){console.log("\u624b\u52a8\u52a0\u8f7d\u6210\u529f"),u.show()}),"can't invoke load() while video-ad is showed"!=t.errMsg)return r&&r(t),!1;console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.")})}else if(this.isPlatform(i.oppo)){console.log("[oppo sdk]");var p=this.preloadVideoAd(o,a,r,c,!0).video;p.show().then(function(){return console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u6210\u529f"),!0}).catch(function(t){if(console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u5931\u8d25",t),console.log("\u5e7f\u544a\u7ec4\u4ef6\u51fa\u73b0\u95ee\u9898",t),p.load().then(function(){console.log("\u624b\u52a8\u52a0\u8f7d\u6210\u529f"),p.show()}),"can't invoke load() while video-ad is showed"!=t.errMsg)return r&&r(t),!1;console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.")})}else if(this.isPlatform(i.vivo)){console.log("[vivo sdk]");var d=this.preloadVideoAd(o,a,r,c,!0).video;d.show().then(function(){return console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u6210\u529f"),!0}).catch(function(t){if(console.log("[sdk] \u6fc0\u52b1\u89c6\u9891\u5e7f\u544a\u663e\u793a\u5931\u8d25",t),console.log("\u5e7f\u544a\u7ec4\u4ef6\u51fa\u73b0\u95ee\u9898",t),d.load().then(function(){console.log("\u624b\u52a8\u52a0\u8f7d\u6210\u529f"),d.show()}),"can't invoke load() while video-ad is showed"!=t.errMsg)return r&&r(t),!1;console.warn("[sdk] can't invoke load() while video-ad is showed, ignore operation.")})}return!0}a&&a()}},t.showInterstitialAd=function(t){this.isPlatform(i.wx)?r.default.showInterstitialAd():cc.sys.platform==cc.sys.BYTEDANCE_GAME?c.default.showInterstitialAd():this.isPlatform(i.android)&&l.default.showInterstitialAd(t.tag)},t.showFullScreenAd=function(t){this.isPlatform(i.android)&&l.default.showFullScreenAd(t)},t.showBigImageAd=function(t){this.isPlatform(i.android)&&l.default.showBigImageAd(t)},t.hideBigImageAd=function(t){this.isPlatform(i.android)&&l.default.hideBigImageAd(t)},t.showBannerAd=function(){this.isPlatform(i.wx)?r.default.showBannerAd():cc.sys.platform==cc.sys.BYTEDANCE_GAME&&c.default.showBannerAd()},t.hideBannerAd=function(){this.isPlatform(i.wx)?r.default.hideBannerAd():cc.sys.platform==cc.sys.BYTEDANCE_GAME&&c.default.hideBannerAd()},t.showToast=function(t){this.isPlatform(i.wx)?r.default.showToast(t):(cc.sys.platform,cc.sys.BYTEDANCE_GAME)},t.getDeviceId=function(){return""},t.uploadFile=function(t){var e=this.host;cc.sys.platform==cc.sys.BYTEDANCE_GAME&&tt.uploadFile({url:e+t.url,filePath:t.file,name:"image_file",formData:t.data,success:t.success,fail:t.fail,complete:t.complete})},t.on=function(t,e,o){return cc.systemEvent.on(t,e,o)},t.once=function(t,e,o){return cc.systemEvent.once(t,e,o)},t.off=function(t,e,o){return cc.systemEvent.off(t,e,o)},t.targetOff=function(t){return cc.systemEvent.targetOff(t)},t.createAuthorizeBtn=function(t,e){var o=t.getBoundingBoxToWorld(),n=cc.view.getFrameSize(),a=cc.winSize,i=o.xMin/a.width*n.width,r=(a.height-o.yMax)/a.height*n.height,c=o.width/a.width*n.width,s=o.height/a.height*n.height,l=this.createUserInfoButton({type:"text",text:" ",style:{left:i,top:r,width:c,height:s,lineHeight:0,backgroundColor:"",color:"#ffffff",textAlign:"center",fontSize:16,borderRadius:4}});return l.onTap(function(t){t.iv||t.signature?e(!0):e(!1)}),l},t.rankScoreUpdate=function(t,e,o){this.isPlatform(i.wx)&&r.default.wxRankScoreUpdate(t,e,o)},t.rankScoreRemove=function(t){this.isPlatform(i.wx)&&r.default.wxRankScoreRemove(t)},t.showSubContext=function(t,e,o,n){this.isPlatform(i.wx)&&r.default.wxShowSubContext(t,e,o,n)},t.getAppVersion=function(){return""},t.isPlatform=function(t){switch(t){case i.android:return!(!cc.sys.isNative||cc.sys.os!=cc.sys.OS_ANDROID);case i.ios:return!(!cc.sys.isNative||cc.sys.os!=cc.sys.OS_IOS);case i.wx:return cc.sys.platform==cc.sys.WECHAT_GAME;case i.tt:return cc.sys.platform==cc.sys.BYTEDANCE_GAME;case i.oppo:return cc.sys.platform==cc.sys.OPPO_GAME;case i.vivo:return cc.sys.platform==cc.sys.VIVO_GAME;case i.web:return cc.sys.isBrowser}return!1},t.getPlatform=function(){return cc.sys.isNative&&cc.sys.os==cc.sys.OS_ANDROID?i.android:cc.sys.isNative&&cc.sys.os==cc.sys.OS_IOS?i.ios:cc.sys.platform==cc.sys.WECHAT_GAME?i.wx:i.web},t.createUserInfoButton=function(t){return wx.createUserInfoButton?wx.createUserInfoButton(t):(cc.log("[sdk] createUserInfoButton"),null)},t._shareNum=0,t._shareCount=0,t._canShowRewardedVideoAd=!0,t.host=f.host,t.wxValue="",t.videoAdMap={},t}();o.default=m,m.checkUpdateManager(),cc._RF.pop()},{"../public/data-env":"data-env","./enumConfig":"enumConfig","./http":"http","./native/android-sdk":"android-sdk","./native/audio":"audio","./native/share":"share","./native/tt-sdk":"tt-sdk","./native/wx-sdk":"wx-sdk"}],selectLevelPop:[function(t,e,o){"use strict";cc._RF.push(e,"20c37kr4K9IaaKo8NFkM2dj","selectLevelPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/dataTs"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputLevelNum=null,e.closeNode=null,e}return a(e,t),e.prototype.start=function(){this.closeNode.on(cc.Node.EventType.TOUCH_END,this.closeFunc,this)},e.prototype.showSelectLevelPop=function(){this.node.active=!0,this.inputLevelNum.string=""},e.prototype.selectLevelFunc=function(){var t=Number(this.inputLevelNum.string);t>0?(this.node.active=!1,this.emitSelectLevel(t),console.log("\u8bbe\u7f6e\u5173\u5361\u6570",this.inputLevelNum.string)):console.log("error:\u4e66\u5199\u9519\u8bef")},e.prototype.emitSelectLevel=function(t){r.default.getLevelMapData(t,function(t){if(console.log("data:",t),t){var e={newLevelData:t};cc.game.emit("initLevelData",e)}else console.log("error:\u627e\u4e0d\u5230\u5bf9\u5e94\u5173\u5361")})},e.prototype.closeFunc=function(){this.node.active=!1},i([l({type:cc.EditBox,tooltip:"\u8f93\u5165\u5bf9\u5e94\u5173\u5361\u6570"})],e.prototype,"inputLevelNum",void 0),i([l(cc.Node)],e.prototype,"closeNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../common/dataTs":"dataTs"}],setBloackNumPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"adc65qZJIVBEbnAGo5PKVIz","setBloackNumPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.blockImg=null,e.typeID=null,e.inputBlockNum=null,e.blockType=0,e.parentCallbackFunc=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.initBlockNumNode=function(t,e,o){this.blockType=t,this.parentCallbackFunc=o;var n=e[t];n&&(this.inputBlockNum.string=""+n);var a="block/block_"+t+".png";r.default.changeSpriteFrame(this.blockImg,a)},e.prototype.setBlockNumFun=function(){var t=Number(this.inputBlockNum.string);this.parentCallbackFunc(this.blockType,t)},i([l(cc.Node)],e.prototype,"blockImg",void 0),i([l(cc.Label)],e.prototype,"typeID",void 0),i([l({type:cc.EditBox,tooltip:"\u5757\u7684\u4f7f\u7528\u7ec4\u6570"})],e.prototype,"inputBlockNum",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],setBlockNumPop:[function(t,e,o){"use strict";cc._RF.push(e,"223a5iixK9JDqi/hb6BvmvY","setBlockNumPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/mapEditor/setBloackNumPrefab"),c=t("../common/config"),s=cc._decorator,l=s.ccclass,u=s.property,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.setBlockNumPrefab=null,e.closeNode=null,e.blockContent=null,e.groupNumLabel=null,e.blockTypeConfig=c.default.blockTypeConfig,e.blockDataObj={},e.newScale=.5,e.blockPreWidth=60,e.blockPreHeight=110,e.groupMax=0,e.hengNum=10,e}return a(e,t),e.prototype.start=function(){this.closeNode.on(cc.Node.EventType.TOUCH_END,this.closeFunc,this)},e.prototype.showSetBlockPop=function(t,e){for(var o in console.log("groupMax = ",t),this.node.active=!0,this.blockDataObj=e,this.groupMax=t,this.updateGroupNum(),this.blockContent.removeAllChildren(),this.blockTypeConfig)this.addSetBlockNumNode(o,this.blockTypeConfig[o],e);this.blockContent.height=(Math.ceil(this.blockTypeConfig.length/this.hengNum)+1)*this.blockPreHeight},e.prototype.addSetBlockNumNode=function(t,e,o){var n=cc.instantiate(this.setBlockNumPrefab),a=this.blockPreWidth/2+t%this.hengNum*(this.blockPreWidth+5)-this.blockContent.width/2,i=this.blockPreHeight/2+Math.floor(t/this.hengNum)*(this.blockPreHeight+40);n.x=a,n.y=-i,n.scale=this.newScale,n.getComponent(r.default).initBlockNumNode(e,o,this.chileSetBlockNum.bind(this)),this.blockContent.addChild(n)},e.prototype.chileSetBlockNum=function(t,e){e?this.blockDataObj[t]=e:delete this.blockDataObj[t],this.updateGroupNum()},e.prototype.updateGroupNum=function(){var t=0;for(var e in this.blockDataObj)t+=this.blockDataObj[e];this.groupNumLabel.string="\u7ec4\u6570\uff1a"+t+"/"+this.groupMax},e.prototype.closeFunc=function(){this.node.active=!1},e.prototype.confirmFunc=function(){var t=0;for(var e in this.blockDataObj)t+=this.blockDataObj[e];t==this.groupMax?(console.log("\u914d\u7f6e\u65e0\u8bef"),cc.game.emit("showTips","\u914d\u7f6e\u6210\u529f"),this.node.active=!1,cc.game.emit("setBlockTypeData",this.blockDataObj)):(console.log("\u914d\u7f6e\u6709\u9519"),cc.game.emit("showTips","\u914d\u7f6e\u6709\u9519"))},i([u(cc.Prefab)],e.prototype,"setBlockNumPrefab",void 0),i([u(cc.Node)],e.prototype,"closeNode",void 0),i([u(cc.Node)],e.prototype,"blockContent",void 0),i([u(cc.Label)],e.prototype,"groupNumLabel",void 0),i([l],e)}(cc.Component);o.default=p,cc._RF.pop()},{"../../pre/mapEditor/setBloackNumPrefab":"setBloackNumPrefab","../common/config":"config"}],setupPop:[function(t,e,o){"use strict";cc._RF.push(e,"71b23kHj7xHS5zCkm73iIBG","setupPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/native/audio"),d=t("../common/native/wx-sdk"),h=t("../common/sdk"),f=t("../manager/GameManager"),m=t("../manager/report-common"),g=t("../utils/uma/uma-sdk"),y=cc._decorator,v=y.ccclass,b=y.property,_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.userIdLabel=null,e.titleLabel=null,e.soundLabel=null,e.musicLabel=null,e.shakeLabel=null,e.backLabel=null,e.closeBtn=null,e.returnMainBtn=null,e.shareBtn=null,e.shareVideo=null,e.shareLabel=null,e.effectBtn=null,e.effectBg=null,e.musicBtn=null,e.musicBg=null,e.shockBtn=null,e.shockBg=null,e.bulletBtn=null,e.bulletBg=null,e.whiteCycle=null,e.greenCycle=null,e.userNode=null,e.privacyNode=null,e.showPopData=null,e.setupData=null,e.whiteBtnX=27,e}return a(e,t),e.prototype.start=function(){this.effectBtn.on("touchend",this.setEffectFunc,this),this.musicBtn.on("touchend",this.setMusicFunc,this),this.shockBtn.on("touchend",this.setShockFunc,this),this.bulletBtn.on("touchend",this.setBulletFunc,this),s.default.addbtnTouchEndScale(this.mask,this.hideSetupPop.bind(this)),s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.hideSetupPop.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),s.default.addbtnTouchStartScale(this.returnMainBtn),s.default.addbtnTouchEndScale(this.returnMainBtn,this.returnMainFunc.bind(this)),s.default.addbtnTouchCancelScale(this.returnMainBtn),s.default.addbtnTouchStartScale(this.shareBtn),s.default.addbtnTouchEndScale(this.shareBtn,this.shareBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.shareBtn),s.default.addTargetTouchUpInside(this.userNode,this.userNodeFunc.bind(this)),s.default.addTargetTouchUpInside(this.privacyNode,this.privacyNodeFunc.bind(this)),this.setupFonts(),h.default.isPlatform(h.Platform.oppo)||h.default.isPlatform(h.Platform.vivo)?(this.userNode.active=!0,this.privacyNode.active=!0):(this.userNode.active=!1,this.privacyNode.active=!1)},e.prototype.userNodeFunc=function(){console.log("\u7528\u6237\u534f\u8bae"),cc.sys.openURL("https://www.52shenbian.com/yinsi/yinsi.html")},e.prototype.privacyNodeFunc=function(){console.log("\u9690\u79c1\u653f\u7b56"),cc.sys.openURL("https://www.52shenbian.com/yinsi/fuwu.html")},e.prototype.setupFonts=function(){this.titleLabel.string=c.default.instance.trans(r.GDLanguage.set_up),this.soundLabel.string=c.default.instance.trans(r.GDLanguage.set_up_sound_effect),this.musicLabel.string=c.default.instance.trans(r.GDLanguage.set_up_music),this.shakeLabel.string=c.default.instance.trans(r.GDLanguage.set_up_shock);var t=l.default.getItem(u.STORAGEKEY.BULLETSWITCH);console.log("bullet = "+t),-1==t?(this.bulletBg.stopAllActions(),cc.tween(this.bulletBg).to(.2,{opacity:0}).start()):(this.bulletBg.stopAllActions(),cc.tween(this.bulletBg).delay(.1).to(.2,{opacity:255}).start())},e.prototype.showSetupPop=function(t){this.node.active=!0,this.showPopData=t,this.returnMainBtn.active=!1,this.shareBtn.active=!1;var e=l.default.getUserData();e.userID.length?(this.userIdLabel.string="UID: "+e.userID,this.userIdLabel.node.active=!0):this.userIdLabel.node.active=!1,2==t.setupType?this.returnMainBtn.active=!0:1==t.setupType&&(this.shareBtn.active=!0,l.default.isPlatform(l.GDPlatform.wx)?(this.shareLabel.getComponent(cc.Label).string="\u5b98\u65b9\u5fae\u535a",s.default.changeSpriteFrame(this.shareVideo,"rewardIcon/reward_weibo_icon.png")):(l.default.isPlatform(l.GDPlatform.oppo)||l.default.isPlatform(l.GDPlatform.oppo))&&(this.shareBtn.active=!1)),cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.setSetupStatus()},e.prototype.hideSetupPop=function(){this.showPopData&&this.showPopData.popCallbackCollect&&this.showPopData.popCallbackCollect.resumeCallBack(),this.node.active=!1},e.prototype.setSetupStatus=function(){this.setupData=l.default.getUserSetupData(),1==this.setupData.effectStatus?this.effectBg.opacity=255:this.effectBg.opacity=0,1==this.setupData.musicStatus?this.musicBg.opacity=255:this.musicBg.opacity=0,1==this.setupData.shockStatus?this.shockBg.opacity=255:this.shockBg.opacity=0},e.prototype.setEffectFunc=function(){1==this.setupData.effectStatus?(this.effectBg.stopAllActions(),cc.tween(this.effectBg).to(.2,{opacity:0}).start()):(this.effectBg.stopAllActions(),cc.tween(this.effectBg).delay(.1).to(.2,{opacity:255}).start()),this.setupData.effectStatus=-this.setupData.effectStatus,l.default.saveUserSetupData(this.setupData),p.default.playBGM()},e.prototype.setMusicFunc=function(){1==this.setupData.musicStatus?(this.musicBg.stopAllActions(),cc.tween(this.musicBg).to(.2,{opacity:0}).start()):(this.musicBg.stopAllActions(),cc.tween(this.musicBg).delay(.1).to(.2,{opacity:255}).start()),this.setupData.musicStatus=-this.setupData.musicStatus,l.default.saveUserSetupData(this.setupData),p.default.playBGM(),1==this.setupData.musicStatus?p.default.playBGM():m.default.reportTACommon("music_close",{})},e.prototype.setShockFunc=function(){1==this.setupData.shockStatus?(this.shockBg.stopAllActions(),cc.tween(this.shockBg).to(.2,{opacity:0}).start()):(this.shockBg.stopAllActions(),cc.tween(this.shockBg).delay(.1).to(.2,{opacity:255}).start()),this.setupData.shockStatus=-this.setupData.shockStatus,l.default.saveUserSetupData(this.setupData)},e.prototype.setBulletFunc=function(){var t=l.default.getItem(u.STORAGEKEY.BULLETSWITCH);console.log("bullet = "+t),1==t?(this.bulletBg.stopAllActions(),cc.tween(this.bulletBg).to(.2,{opacity:0}).start()):(t=-1,this.bulletBg.stopAllActions(),cc.tween(this.bulletBg).delay(.1).to(.2,{opacity:255}).start()),t=-t,l.default.setItem(u.STORAGEKEY.BULLETSWITCH,t),cc.game.emit(u.EMITKEY.BULLETSTATE)},e.prototype.shareBtnFunc=function(){l.default.isPlatform(l.GDPlatform.tt)?cc.game.emit(u.EMITKEY.TTSHARERECORD):l.default.isPlatform(l.GDPlatform.wx)&&d.default.weiBoJump()},e.prototype.returnMainFunc=function(){if(f.default.getInstance().gameType==u.GAMETYPE.GAMELEVEL){if(l.default.getSprintRewardData().winNum>0){var t={popName:"sprintRewardPop",showPopData:{popCallbackCollect:null,popType:1}};cc.game.emit("showPop",t)}f.default.getInstance().cookieDict.cookieCurCount>0&&(t={popName:"loseCookiePop",showPopData:{popCallbackCollect:null,popType:1}},cc.game.emit("showPop",t))}var e=0==f.default.getInstance().sheepMark.resurgenceCount?0:1;console.log("\u5c55\u793a\u5931\u53bb\u7231\u5fc3\u5f39\u6846");var o={popName:"loseLovePop",showPopData:{popCallbackCollect:null,popType:e}};cc.game.emit("showPop",o),this.node.active=!1},e.prototype.contactFunc=function(){console.log("\u8054\u7cfb\u5ba2\u670d"),g.default.trackEvent("setting_service")},i([b(cc.Node)],e.prototype,"mask",void 0),i([b(cc.Node)],e.prototype,"popNode",void 0),i([b(cc.Label)],e.prototype,"userIdLabel",void 0),i([b(cc.Label)],e.prototype,"titleLabel",void 0),i([b(cc.Label)],e.prototype,"soundLabel",void 0),i([b(cc.Label)],e.prototype,"musicLabel",void 0),i([b(cc.Label)],e.prototype,"shakeLabel",void 0),i([b(cc.Label)],e.prototype,"backLabel",void 0),i([b(cc.Node)],e.prototype,"closeBtn",void 0),i([b(cc.Node)],e.prototype,"returnMainBtn",void 0),i([b(cc.Node)],e.prototype,"shareBtn",void 0),i([b(cc.Node)],e.prototype,"shareVideo",void 0),i([b(cc.Node)],e.prototype,"shareLabel",void 0),i([b(cc.Node)],e.prototype,"effectBtn",void 0),i([b(cc.Node)],e.prototype,"effectBg",void 0),i([b(cc.Node)],e.prototype,"musicBtn",void 0),i([b(cc.Node)],e.prototype,"musicBg",void 0),i([b(cc.Node)],e.prototype,"shockBtn",void 0),i([b(cc.Node)],e.prototype,"shockBg",void 0),i([b(cc.Node)],e.prototype,"bulletBtn",void 0),i([b(cc.Node)],e.prototype,"bulletBg",void 0),i([b(cc.SpriteFrame)],e.prototype,"whiteCycle",void 0),i([b(cc.SpriteFrame)],e.prototype,"greenCycle",void 0),i([b(cc.Node)],e.prototype,"userNode",void 0),i([b(cc.Node)],e.prototype,"privacyNode",void 0),i([v],e)}(cc.Component);o.default=_,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/native/wx-sdk":"wx-sdk","../common/sdk":"sdk","../manager/GameManager":"GameManager","../manager/report-common":"report-common","../utils/uma/uma-sdk":"uma-sdk"}],shareNodePop:[function(t,e,o){"use strict";cc._RF.push(e,"a0bd2kRDllJoo/euhMYhvFy","shareNodePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/enumConfig"),l=t("../common/native/share"),u=t("../common/native/tt-sdk"),p=cc._decorator,d=p.ccclass,h=p.property,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.shareNodeVideo=null,e.shareNodeUrl=null,e.closeVideoBtn=null,e.shareVideoBtn=null,e.exitVideoBtn=null,e.closeUrlBtn=null,e.shareUrlBtn=null,e.exitUrlBtn=null,e.popData=null,e}return a(e,t),e.prototype.start=function(){r.default.addTargetTouchUpInside(this.closeVideoBtn,this.closeVideoBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.shareVideoBtn,this.shareVideoBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.exitVideoBtn,this.exitVideoBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.closeUrlBtn,this.closeUrlBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.shareUrlBtn,this.shareUrlBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.exitUrlBtn,this.exitUrlBtnFunc.bind(this))},e.prototype.closeVideoBtnFunc=function(){this.node.active=!1},e.prototype.shareVideoBtnFunc=function(){cc.game.emit(s.EMITKEY.TTSHARERECORD)},e.prototype.exitVideoBtnFunc=function(){this.node.active=!1},e.prototype.closeUrlBtnFunc=function(){this.node.active=!1},e.prototype.shareUrlBtnFunc=function(){var t=this,e=this;c.default.isPlatform(c.GDPlatform.tt)?u.default.shareTemplate(function(o){console.log("shareTemplate = ",o),o&&(e.node.active=!1),t.popData&&t.popData.shareCb&&(e.popData.shareCb(o),e.node.active=!1)}):c.default.isPlatform(c.GDPlatform.wx)?l.default.shareMethod({success:function(){},fail:function(){},complete:function(){}}):this.node.active=!1},e.prototype.exitUrlBtnFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){this.popData=t,this.shareNodeVideo.active=!1,this.shareNodeUrl.active=!1,this.node.active=!0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),c.default.isPlatform(c.GDPlatform.tt)?1==t.type?this.shareNodeVideo.active=!0:2==t.type&&(this.shareNodeUrl.active=!0):(c.default.isPlatform(c.GDPlatform.wx),this.shareNodeUrl.active=!0)},i([h(cc.Node)],e.prototype,"popNode",void 0),i([h(cc.Node)],e.prototype,"shareNodeVideo",void 0),i([h(cc.Node)],e.prototype,"shareNodeUrl",void 0),i([h(cc.Node)],e.prototype,"closeVideoBtn",void 0),i([h(cc.Node)],e.prototype,"shareVideoBtn",void 0),i([h(cc.Node)],e.prototype,"exitVideoBtn",void 0),i([h(cc.Node)],e.prototype,"closeUrlBtn",void 0),i([h(cc.Node)],e.prototype,"shareUrlBtn",void 0),i([h(cc.Node)],e.prototype,"exitUrlBtn",void 0),i([d],e)}(cc.Component);o.default=f,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/native/share":"share","../common/native/tt-sdk":"tt-sdk"}],share:[function(t,e,o){"use strict";cc._RF.push(e,"cc74eL1jO5JXILJM8B5nOu3","share"),Object.defineProperty(o,"__esModule",{value:!0}),o.ShareType=void 0;var n=t("../sdk");(function(t){t.share="share",t.addFriend="addFriend",t.getReward="getReward"})(o.ShareType||(o.ShareType={}));var a=function(){function t(){}return t.init=function(){n.default.setOnShow(function(){}),n.default.setOnShow(function(){});var t=this.getShareParams(),e={title:t.title,imageUrl:t.imageUrl,query:"1"};n.default.setOnShareAppMessage(e)},t.getRewardShare=function(t){var e=this.getShareParams(),o={title:e.title,imageUrl:e.imageUrl,success:function(e){console.log("Share","success",e),e&&(t.success(),console.log("\u5206\u4eab\u6210\u529f"))},fail:function(e){console.log("Share","success",e),e&&(t.fail(),console.log("\u5206\u4eab\u5931\u8d25"))},query:"2",validate:!0};this.initiativeShare(o,!0)},t.shareMethod=function(t){var e=t.success,o=t.fail,n=t.complete,a=this.getShareParams();this.initiativeShare({title:a.title,imageUrl:a.imageUrl,success:function(t){console.log("\u5206\u4eab success = ",t),e&&e(t)},fail:function(t){console.log("\u5206\u4eab fail = ",t),o&&o(t)},complete:function(t){console.log("\u5206\u4eab complete = ",t),n&&n(t)},validate:!0},!0)},t.initiativeShare=function(t,e){if(n.default.isPlatform(n.Platform.web))return t.success&&t.success(!0),void(t.complete&&t.complete(!1));var o=!1,a=(new Date).getTime(),i=!0;1==t.validate?e?(console.log("\u5206\u4eab 111"),n.default.setOnShowOnce(function(){i?(o=(new Date).getTime()-a>=2500,console.log("\u5206\u4eab 222 result = ",o,"startTime = ",a),0==o?(t.fail&&t.fail(!0),t.complete&&t.complete(!1),console.log("\u5206\u4eab 333")):(a=(new Date).getTime(),console.log("\u5206\u4eab 444 result = ",o,"startTime = ",a),i=!1,t.success&&t.success(!0),t.complete&&t.complete(!0))):console.log("\u591a\u6b21\u8fdb\u5165\u540e\u53f0 ###### ")})):(console.log("\u5206\u4eab 555"),n.default.setOnShow(function(){0==(o=(new Date).getTime()-a>=2500)?(t.fail&&t.fail(!0),t.complete&&t.complete(!1)):(t.success&&t.success(!0),t.complete&&t.complete(!0))})):(t.success(!0),t.complete&&t.complete(!0));var r="";t.query&&(r=t.query),wx.shareAppMessage({title:t.title,imageUrl:t.imageUrl,query:r})},t.getShareParams=function(){var t=[{title:"\u6700\u65b0\u51fa\u7089\u5168\u56fd\u7701\u4efd\u667a\u529b\u6392\u884c\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_1.jpg"},{title:"\u5e26\u85aa\u4e0a\u5395\u6240\u7684\u65f6\u5019\u90fd\u5728\u73a9\u5565\uff1f",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_2.jpg"},{title:"\u636e\u8bf4\u901a\u5173\u7684\u90fd\u80fd\u8fbe\u5230\u7231\u56e0\u65af\u5766\u7684IQ\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_3.jpg"},{title:"\u6562\u4e0d\u6562\u7761\u89c9\u524d\u73a9\u8fd9\u4e2a\u6e38\u620f\uff1f",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_4.jpg"},{title:"\u4ec0\u4e48\u80fd\u963b\u6b62\u6211\u7761\u89c9\uff1f\u5c31\u662f\u8fd9\u5934\u7f8a\uff01\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_5.jpg"},{title:"\u667a\u529b\u4e0d\u591f\uff0c\u5c31\u4e0d\u8981\u6765\u6311\u6218\u8fd9\u4e2a\u6e38\u620f\u4e86\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_6.jpg"},{title:"\u6562\u4e0d\u6562\u6765\u6d4b\u7b97\u4e0b\u4f60\u7684\u667a\u5546\u591f\u4e0d\u591f\uff1f",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_7.jpg"},{title:"\u636e\u8bf4\u53ea\u67090.01%\u7684\u4eba\u53ef\u4ee5\u901a\u5173\uff01\u73bb\u7483\u5fc3\u52ff\u8fdb\uff01",imageUrl:"https://cat-match-static.easygame2021.com/images/wx_8.jpg"}];return t[Math.floor(Math.random()*t.length)]},t.shareId=0,t.parsedId="",t}();o.default=a,cc._RF.pop()},{"../sdk":"sdk"}],"sheep-card":[function(t,e,o){"use strict";cc._RF.push(e,"a4c42prjHtESYEMJNr5MQAH","sheep-card");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.redbgNode=null,e.bluebgNode=null,e.graybgNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setupData=function(t){this.redbgNode.active=!1,this.bluebgNode.active=!1,this.graybgNode.active=!1;var e=null,o=!1;if(1==t.type?(this.redbgNode.active=!0,e=this.redbgNode,o=!0):2==t.type?(this.bluebgNode.active=!0,e=this.bluebgNode):3==t.type&&(this.graybgNode.active=!0,e=this.graybgNode),e){var n=e.getChildByName("num-label").getComponent(cc.Label),a=e.getChildByName("count-label").getComponent(cc.Label),i=e.getChildByName("name-label").getComponent(cc.Label);if(n.string="\u7b2c "+t.num+" \u540d",a.string=t.item.win_score+" \u7f8a",i.string=t.item.name+"\u7f8a\u961f",o){var r=e.getChildByName("flash_1"),c=e.getChildByName("flash_2");this.playAnimationFloat(r,255),this.playAnimationFloat(c,-255)}}},e.prototype.playAnimationFloat=function(t,e){var o=this;cc.tween(t).delay(.5).by(.1,{opacity:e}).call(function(){o.playAnimationFloat(t,-e)}).start()},i([s(cc.Node)],e.prototype,"redbgNode",void 0),i([s(cc.Node)],e.prototype,"bluebgNode",void 0),i([s(cc.Node)],e.prototype,"graybgNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],"sheep-flock-icon":[function(t,e,o){"use strict";cc._RF.push(e,"a441bXbKtZDx6Z6u1Z9IX7r","sheep-flock-icon");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.iconHeader=null,e.purpleNode=null,e.blueNode=null,e.regionNode=null,e.cityNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t){var e=this;t?(this.node.stopAllActions(),this.node.active=!0,cc.tween(this.node).delay(3).call(function(){e.node.active=!1},this).start(),0==t.gender?(this.purpleNode.active=!1,this.blueNode.active=!0):1==t.gender?(this.purpleNode.active=!1,this.blueNode.active=!0):(this.purpleNode.active=!0,this.blueNode.active=!1),t.nick_name?this.regionNode.getComponent(cc.Label).string=t.nick_name:this.regionNode.getComponent(cc.Label).string="",t.city?this.cityNode.getComponent(cc.Label).string=t.city:this.cityNode.getComponent(cc.Label).string="",r.default.setAvatar(this.iconHeader,t.avatar)):this.node.active=!1},i([l(cc.Node)],e.prototype,"iconHeader",void 0),i([l(cc.Node)],e.prototype,"purpleNode",void 0),i([l(cc.Node)],e.prototype,"blueNode",void 0),i([l(cc.Node)],e.prototype,"regionNode",void 0),i([l(cc.Node)],e.prototype,"cityNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc"}],"sheep-flock":[function(t,e,o){"use strict";cc._RF.push(e,"9c2fby18nZLPpABsAs/z6CS","sheep-flock");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__spreadArrays||function(){for(var t=0,e=0,o=arguments.length;e0&&"null"!=t.item.result){this.node.addChild(this.sheepIconNode),this.sheepIconNode.zIndex=200,this.sheepIconNode.active=!1;var c=JSON.parse(t.item.result);r=this.bubbleSort(c);var u=s.default.getUserData().userID;for(var d in r)Number(u)==r[d].uid&&(this.userRankInfo=r[d])}var h=t.item.all_score;h>36&&(h=36),h<=0&&(h=0);for(var m=0;mn[c+1].state?(e=[n[c+1],n[c]],n[c]=e[0],n[c+1]=e[1]):n[c].state==n[c+1].state&&n[c].fail=t.length)){var o=cc.instantiate(this.sheepNode);this.node.addChild(o),this.sheepNodeArr.push(o);var n=0;e<6?(n=6,this.radius=100):e<18?(n=12,this.radius=200):(n=18,this.radius=300);var a=this.angle/180*Math.PI,i=this.radius*Math.cos(a),r=this.radius*Math.sin(a),l=0;e0)for(var b in this.clothesData)if(this.clothesData[b].clothesId==u.skin){h="sheep/"+this.clothesData[b].spName,f=this.clothesData[b].spSkin;break}1!=u.state&&(h="sheep/Dead1"),this.setUpSheepNode(o,h,u,f);var _=o.getChildByName("clickNode");_.on(cc.Node.EventType.TOUCH_END,function(){if(console.log(_.parent.getPosition().x,_.parent.getPosition().y),this.sheepIconNode){var o=t[e];this.sheepIconNode.x=_.parent.getPosition().x,this.sheepIconNode.y=_.parent.getPosition().y+20,this.sheepIconNode.getComponent(m.default).showData(o)}},this)}},e.prototype.setUpSheepNode=function(t,e,o,n){t.getChildByName("flashSp").opacity=0,t.getChildByName("sheepSp").getComponent(u.default).loadSpine(e,function(){var a="Jump2";"sheep/Dead1"==e?(o.fail||(o.fail=1),a="Dead"+h.default.getDeadNum(o.fail),t.getChildByName("sheepSp").getComponent(u.default).play(a,0)):(t.getChildByName("sheepSp").getComponent(u.default).setNewSkin(n),t.getChildByName("sheepSp").getComponent(u.default).play(a,0))})},i([v({type:cc.Node,tooltip:"\u7f8a"})],e.prototype,"sheepSp",void 0),i([v({type:cc.Node,tooltip:"\u540d\u6b21\u724c\u5b50"})],e.prototype,"sheepCard",void 0),i([v({type:cc.Node,tooltip:"\u5361\u7247"})],e.prototype,"sheepIcon",void 0),i([v({type:cc.Node,tooltip:"\u7537\u5934\u50cf"})],e.prototype,"manSheepHeader",void 0),i([v({type:cc.Node,tooltip:"\u5973\u5934\u50cf"})],e.prototype,"womanSheepheader",void 0),i([y],e)}(cc.Component);o.default=b,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/dataTs":"dataTs","../../script/common/enumConfig":"enumConfig","../../script/common/spine":"spine","../../script/manager/DateManager":"DateManager","../../script/manager/GameManager":"GameManager","../../script/manager/data-manager":"data-manager","./sheep-card":"sheep-card","./sheep-flock-icon":"sheep-flock-icon"}],"sheep-rank-pop":[function(t,e,o){"use strict";cc._RF.push(e,"4f1e6q1O4ZIM6jxip+/6cgl","sheep-rank-pop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../manager/GameManager"),l=t("./popSub/sheepRankItem"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.sheepRankItem=null,e.rankItem=null,e.contentView=null,e.closeBtn=null,e.bottomNode=null,e}return a(e,t),e.prototype.start=function(){c.default.addbtnTouchStartScale(this.closeBtn),c.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.closeBtn)},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.sheepRankPop=function(){this.node.active=!0,this.requestData()},e.prototype.requestData=function(){if(cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.rankItem||(this.rankItem=cc.instantiate(this.sheepRankItem)),this.contentView.removeAllChildren(),this.bottomNode.active=!1,s.default.getInstance().rankInfo)this.setSubViews(s.default.getInstance().rankInfo);else{var t=this;r.default.getRankInfoData(function(e){t.setSubViews(e.data)})}},e.prototype.setSubViews=function(t){for(var e=0;e=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgNode=null,e.labelNode=null,e.numNode=null,e.nameNode=null,e.countNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setupData=function(t){var e=t.index+1;this.numNode.getComponent(cc.Label).string=e+"",this.nameNode.getComponent(cc.Label).string=t.name,this.countNode.getComponent(cc.Label).string=t.win_score+"";var o=null,n=null,a=null,i=null,r=null,c=null,s=this.imgNode.children;for(var l in s){var u=s[l];"text-black"==u.name||"text-sheep-black"==u.name?u.active=!0:u.active=!1,"num-yellow"==u.name?o=u:"num-sliver"==u.name?n=u:"num-orange"==u.name?a=u:"num-blue"==u.name?i=u:"num-black"==u.name||("img-yellow"==u.name?r=u:"img-white"==u.name?c=u:u.name)}c.active=!0,1==e?(o.active=!0,r.active=!0,c.active=!1):2==e?n.active=!0:3==e?a.active=!0:i.active=!0},e.prototype.setBottomData=function(t){this.numNode.getComponent(cc.Label).string=t.index+"",this.nameNode.getComponent(cc.Label).string=t.item.name,this.countNode.getComponent(cc.Label).string=t.item.win_score+""},i([s(cc.Node)],e.prototype,"imgNode",void 0),i([s(cc.Node)],e.prototype,"labelNode",void 0),i([s(cc.Node)],e.prototype,"numNode",void 0),i([s(cc.Node)],e.prototype,"nameNode",void 0),i([s(cc.Node)],e.prototype,"countNode",void 0),i([c],e)}(cc.Component);o.default=l,cc._RF.pop()},{}],"show-daily-pop":[function(t,e,o){"use strict";cc._RF.push(e,"3a139KaoTJPZKuR6HDW3cfD","show-daily-pop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../../pre/main/rewardPrefab"),l=t("../../script/common/CcJsFunc"),u=t("../../script/common/native/audio"),p=t("../../script/common/spine"),d=cc._decorator,h=d.ccclass,f=d.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.titleSpine=null,e.boxSpine=null,e.flashNode=null,e.receiveBtn=null,e.receiveLabel=null,e.rewardPrefab=null,e.popData=null,e.rewardNodeArray=[],e.rewardDataArray=[],e}return a(e,t),e.prototype.start=function(){l.default.addbtnTouchStartScale(this.receiveBtn),l.default.addbtnTouchEndScale(this.receiveBtn,this.receiveBtnFunc.bind(this)),l.default.addbtnTouchCancelScale(this.receiveBtn)},e.prototype.receiveBtnFunc=function(){this.node.active=!1,this.receiveBtn.stopAllActions();for(var t=0;t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../../pre/main/cookieRewardNode"),l=t("../../script/common/CcJsFunc"),u=t("../../script/common/enumConfig"),p=t("../../script/common/native/audio"),d=t("../../script/common/spine"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.cookieRewardLayer=null,e.cookieTitleSpine=null,e.cookieRewardNode=null,e.cookieFlashNode=null,e.cookieImageNode=null,e.cookieNumNode=null,e.cookieReceiveBtn=null,e.cookiePropEndNode=null,e.receiveLabel=null,e.popData=null,e}return a(e,t),e.prototype.start=function(){l.default.addbtnTouchStartScale(this.cookieReceiveBtn),l.default.addbtnTouchEndScale(this.cookieReceiveBtn,this.receiveBtnFunc.bind(this)),l.default.addbtnTouchCancelScale(this.cookieReceiveBtn),this.receiveLabel.string=c.default.instance.trans(r.GDLanguage.pop_claim)},e.prototype.receiveBtnFunc=function(){var t=this;this.maskNode.active=!1,this.cookieTitleSpine.active=!1,this.cookieFlashNode.active=!1,this.cookieReceiveBtn.active=!1;var e=this.cookiePropEndNode,o=l.default.getWorldPosition(e),n=l.default.getNodePosition(this.node,o);cc.tween(this.cookieRewardNode).to(.1,{angle:5}).to(.1,{angle:-5}).to(.1,{angle:5}).to(.1,{angle:-5}).to(.3,{position:cc.v3(n.x,n.y,0),scale:.3}).call(function(){t.node.active=!1,t.popData&&t.popData.rewardCallback&&t.popData.rewardCallback(),cc.tween(e).to(.2,{scale:1.2}).to(.2,{scale:1}).start()}).start()},e.prototype.showPop=function(t){this.popData=t,this.cookieRewardLayer.active=!1,1==t.popType&&(this.node.active=!0,this.maskNode.active=!0,this.cookieRewardLayer.active=!0,this.cookieRewardLayer.position=cc.v3(0,0,0),this.cookieRewardNode.scale=1,this.cookieTitleSpine.active=!0,this.cookieReceiveBtn.active=!0,this.showCookieRewardPopData(t.rewardData,t.startNode,t.endNode))},e.prototype.showCookieRewardPopData=function(t,e,o){console.log("\u9886\u53d6\u5956\u52b1",JSON.stringify(t));var n=this;n.cookieFlashNode.active=!1,p.default.playAudioMusic("audio/sound/Words1.mp3",!1),n.cookieTitleSpine.getComponent(d.default).play("Award1_Words1",1);var a=l.default.getWorldPosition(e),i=l.default.getNodePosition(this.node,a),r=l.default.getWorldPosition(o),c=l.default.getNodePosition(this.node,r);this.cookieRewardNode.getComponent(s.default).showData(t),this.cookieRewardNode.position=cc.v3(i),this.cookieReceiveBtn.scale=0,this.cookieRewardNode.scale=.5,cc.tween(this.cookieRewardNode).to(.3,{position:cc.v3(i.x+10,i.y-400),scale:.7}).to(.3,{position:cc.v3(i.x-100,i.y-500)}).to(.2,{position:cc.v3(c),scale:1}).call(function(){n.cookieFlashNode.active=!0,cc.tween(n.cookieFlashNode).by(5,{angle:360}).repeatForever().start(),cc.tween(n.cookieReceiveBtn).to(.3,{scale:1}).start(),n.popData&&n.popData.callback?n.popData.callback():cc.game.emit(u.EMITKEY.HIDEMASKLAYER)}).start()},i([m(cc.Node)],e.prototype,"maskNode",void 0),i([m(cc.Node)],e.prototype,"cookieRewardLayer",void 0),i([m(cc.Node)],e.prototype,"cookieTitleSpine",void 0),i([m(cc.Node)],e.prototype,"cookieRewardNode",void 0),i([m(cc.Node)],e.prototype,"cookieFlashNode",void 0),i([m(cc.Node)],e.prototype,"cookieImageNode",void 0),i([m(cc.Node)],e.prototype,"cookieNumNode",void 0),i([m(cc.Node)],e.prototype,"cookieReceiveBtn",void 0),i([m(cc.Node)],e.prototype,"cookiePropEndNode",void 0),i([m(cc.Label)],e.prototype,"receiveLabel",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../../pre/main/cookieRewardNode":"cookieRewardNode","../../script/common/CcJsFunc":"CcJsFunc","../../script/common/enumConfig":"enumConfig","../../script/common/native/audio":"audio","../../script/common/spine":"spine"}],"snake-ctrl-point":[function(t,e,o){"use strict";cc._RF.push(e,"97d1cS+taxBnYxM87Oc/vw1","snake-ctrl-point");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator.ccclass,c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.size=20,e.isDragging=!1,e.sprite=null,e.onEditStart=null,e.onEditEnd=null,e}return a(e,t),e.prototype.onLoad=function(){this.node.on(cc.Node.EventType.TOUCH_START,this.onTouchStart,this),this.node.on(cc.Node.EventType.TOUCH_MOVE,this.onTouchMove,this),this.node.on(cc.Node.EventType.TOUCH_END,this.onTouchEnd,this),this.node.on(cc.Node.EventType.TOUCH_CANCEL,this.onTouchEnd,this),this.node.addComponent(cc.BlockInputEvents)},e.prototype.start=function(){this.idle()},e.prototype.setEditCallback=function(t,e){this.onEditStart=t,this.onEditEnd=e},e.prototype.onTouchStart=function(){this.selected(),this.isDragging=!0,this.onEditStart&&this.onEditStart()},e.prototype.onTouchMove=function(t){if(0!=this.isDragging){var e=t.getDelta(),o=e.x,n=e.y;this.node.setPosition(this.node.position.x+o,this.node.position.y+n)}},e.prototype.onTouchEnd=function(){this.idle(),this.isDragging=!1,this.onEditEnd&&this.onEditEnd()},e.prototype.idle=function(){this.node.stopAllActions(),cc.tween(this.node).to(.1,{scale:1,opacity:255}).to(.5,{scale:1.01,opacity:200},{easing:cc.easing.backInOut}).union().repeatForever().start()},e.prototype.selected=function(){this.node.stopAllActions(),cc.tween(this.node).to(.1,{scale:1,opacity:255}).to(.5,{scale:1.4,opacity:100},{easing:cc.easing.backInOut}).union().repeatForever().start()},e.prototype.getSpriteFrameByColor=function(t){for(var e=new Uint8Array(16),o=0;o<2;o++)for(var n=0;n<2;n++)e[8*o+4*n]=t.r,e[8*o+4*n+1]=t.g,e[8*o+4*n+2]=t.b,e[8*o+4*n+3]=t.a;var a=new cc.Texture2D;return a.initWithData(e,cc.Texture2D.PixelFormat.RGBA8888,2,2),new cc.SpriteFrame(a)},i([r],e)}(cc.Component);o.default=c,cc._RF.pop()},{}],"snake-sprite-assembler":[function(t,e,o){"use strict";cc._RF.push(e,"f7fady81S5KDZYrZVIIiQPn","snake-sprite-assembler");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(o,"__esModule",{value:!0}),o.SplineSpriteAssembler=void 0;for(var i=t("../bezier/curve-sample"),r=cc.Vec3,c=t("../bezier/export-helper"),s=cc.Mat4,l=[],u=0;u<4;u++)l.push(new r);var p=[];for(u=0;u<4;u++)p.push({u:0,v:1});var d=new r,h=Math.floor(65535/4),f=new Array,m=new Array,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._renderData=null,e.verticesCount=0,e.indicesCount=0,e}return a(e,t),e.prototype.init=function(e){t.prototype.init.call(this,e),this._renderData=new cc.RenderData,this._renderData.init(this),this._renderData.createFlexData(0,4,6,this.getVfmt()),this._updateIndices()},e.prototype._updateIndices=function(){for(var t=this._renderData.iDatas[0],e=0,o=0,n=t.length;eh&&(console.warn("Spline("+t.name+")\u7684\u56db\u8fb9\u5f62\u6570\u91cf("+D+")\u8d85\u8fc7\u4e86\u5141\u8bb8\u7684\u6700\u5927\u503c("+h+"), \u81ea\u52a8\u622a\u65ad, Spline \u66f2\u7ebf\u4f1a\u663e\u793a\u4e0d\u5b8c\u6574"),f.length=h),this.verticesCount=4*D,this.indicesCount=6*D;var A=t.node.width,T=t.node.getWorldMatrix(new s),O=.5*A,I=this._renderData._flexBuffer;I.reserve(this.verticesCount,this.indicesCount)&&this._updateIndices(),I.used(this.verticesCount,this.indicesCount);var E=this._renderData.vDatas[0],L=this._renderData.uintVDatas[0],M=0,B=null===(e=t.spriteFrame)||void 0===e?void 0:e.uvSliced,R=m[m.length-1],F=R>n.height?1:n.height/R,j=R*F,x=j-u;x0?c.math.lerp(B[12].v,B[8].v,o/a):B[8].v;if(R=x)return 0==U&&(U=Math.floor((x-a)/g)*g+a),c.math.lerp(B[8].v,B[0].v,(o-U)/(j-U));var i=(o-a)/g%1;return i=e(i),c.math.lerp(B[8].v,B[4].v,i)},Y=function(t){return t<.001?1:t},J=function(t){return t>.9999?0:t},W=0,V=f.length-1;W>2,s=i._vData;n.length+c>s.length?s.set(n.subarray(0,s.length-c),c):s.set(n,c);for(var l=i._iData,u=r.vertexOffset,p=r.indiceOffset,d=0,h=a.length;d=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.spine=null,e._frameEventMap={},e._loop=!1,e._times=1,e._playingName="",e._playingNameQueue=[],e}return a(e,t),e.prototype.onLoad=function(){this.init()},e.prototype.init=function(){this.spine&&(this.spine.setCompleteListener(this.completeFunc.bind(this)),this.spine.setStartListener(this.startFunc.bind(this)),this.spine.setEventListener(this.frameEventFunc.bind(this)))},e.prototype.completeFunc=function(t){if(!this._loop)if(this._playingNameQueue.length>0){if(t.animation.name==this._playingNameQueue[this._playingNameQueue.length-1]){if(this._times--,0==this._times)return void(this._completeCb&&this._completeCb(t.animation.name));this.playQueue(this._playingNameQueue,this._times,this._completeCb)}}else{if(this._times--,0==this._times)return void(this._completeCb&&this._completeCb(t.animation.name));this.play(this._playingName,this._times,this._completeCb)}},e.prototype.startFunc=function(t){this._startCb&&this._startCb(t.animation.name)},e.prototype.frameEventFunc=function(t,e){this._frameEventMap[e.data.name]&&this._frameEventMap[e.data.name](e.data.name)},e.prototype.setCompleteCb=function(t){this._completeCb=t},e.prototype.setStartCb=function(t){this._startCb=t},e.prototype.setFrameEventCb=function(t,e){t?e?this._frameEventMap[t]=e:delete this._frameEventMap[t]:this._frameEventMap={}},e.prototype.setNewSkin=function(t){this.spine.setSkin(t)},e.prototype.play=function(t,e,o){void 0===e&&(e=1),cc.isValid(this)&&cc.isValid(this.node)&&(this.spine.clearTracks(),this.spine.setToSetupPose(),this._playingName=t,this._loop=0==e,this._times=e,this._completeCb=o,this._playingNameQueue.length=0,this.spine.setAnimation(0,this._playingName,this._loop))},e.prototype.playQueue=function(t,e,o){if(void 0===e&&(e=1),cc.isValid(this)&&cc.isValid(this.node)&&0!=t.length)if(this._completeCb=o,this.spine.clearTracks(),this.spine.setToSetupPose(),1==t.length)this.play(t[0],e);else{this._loop=0==e,this._times=e,this._playingNameQueue=t.concat(),this.spine.setAnimation(0,t[0],!1);for(var n=1;n=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0}),o.SplineSprite=o.SplineSpriteVert=void 0;var r=t("../bezier/spline"),c=t("../bezier/spline-node"),s=t("../snake-ctrl-point"),l=t("./snake-sprite-assembler"),u=(cc.Sprite,cc.Node),p=(cc.Node.EventType,cc.assetManager),d=(cc.Color,cc._decorator),h=d.ccclass,f=d.property,m=d.menu;o.SplineSpriteVert=function(t){this.vertices=t};var g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.showDebugInfo=!1,e.editMode=!1,e.mCtrlNodeRoot=null,e.mSplineDirty=!0,e.lockHeadAndTail=!0,e.mSpline=new r.Spline,e.curveSampleList=new Array,e.splineVerticesCache=null,e}return a(e,t),Object.defineProperty(e.prototype,"ShowDebugInfo",{get:function(){return this.showDebugInfo},enumerable:!1,configurable:!0}),e.prototype.setSplineDirty=function(){this.mSplineDirty=!0},e.prototype.onLoad=function(){var e;null===(e=t.prototype.onLoad)||void 0===e||e.call(this),this.initRootCtrlNode(),this.setSplineDirty(),this.mCtrlNodeRoot.active=!1},e.prototype.start=function(){var e;null===(e=t.prototype.start)||void 0===e||e.call(this)},e.prototype.onEnable=function(){t.prototype.onEnable.call(this)},e.prototype.setCtrlPosList=function(t){if(this.spriteFrame){try{this.mCtrlNodeRoot&&this.mCtrlNodeRoot.isValid&&(this.mCtrlNodeRoot.removeAllChildren(),this.mSpline.RemoveAllNode())}catch(i){cc.warn("setCtrlPosList err",i)}try{for(var e=0;e0){var t=this.mCtrlNodeRoot.children[0].children[0];return cc.v2(t.position.normalize())}return cc.v2()},e.prototype.lockHeadAndTailCtrlNode=function(t){this.lockHeadAndTail=t},e.prototype.setEditMode=function(t){if(this.editMode=t,this.mCtrlNodeRoot.active=t,t)for(var e=this.mCtrlNodeRoot.children.length,o=0;o0)for(var e=0;e1)throw new Error("Time must be between 0 and 1. Given time was "+t);return Math.floor(t*(this.curves.length-1))},t.prototype.RefreshCurves=function(){this.curves.length=0;for(var t=0;tthis.Length)throw new Error("Distance must be between 0 and spline length ("+this._length+"). Given distance was "+t);for(var e=0,o=this.curves;ea&&ta))return n.GetSampleAtDistance(t);t-=a}throw new Error("Something went wrong with GetSampleAtDistance.")},t.prototype.AddNode=function(t){if(this.nodes.push(t),1!==this.nodes.length){var e=this.nodes[this.nodes.length-2],o=new a.CubicBezierCurve(e,t);o.Changed.on(this.UpdateAfterCurveChanged),this.curves.push(o)}this.RaiseNodeListChanged(new l(new Array(t))),this.UpdateAfterCurveChanged(),this.updateLoopBinding()},t.prototype.InsertNode=function(t,e){if(0===t)throw new Error("Can't insert a node at index 0.");var o=this.nodes[t];this.nodes.splice(t,0,e),this.curves[t-1].ConnectEnd(e);var n=new a.CubicBezierCurve(e,o);n.Changed.on(this.UpdateAfterCurveChanged),this.curves.splice(t,0,n),this.RaiseNodeListChanged(new c([e],t)),this.UpdateAfterCurveChanged(),this.updateLoopBinding()},t.prototype.RemoveAllNode=function(){for(var t=0;t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../i18n/gd_language"),c=t("../../../i18n/i18n"),s=t("../../common/CcJsFunc"),l=t("../../common/dataTs"),u=t("../../common/native/audio"),p=t("../../common/spine"),d=t("../../manager/GameManager"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.spineBox=null,e.bgCoin=null,e.bgCoinLabel=null,e.bgProp=null,e.bgPropLabel=null,e.reveiceBtn=null,e.reveiceBtnLabel=null,e.spineProgress=null,e.particleNode=null,e.labelNode=null,e.lastLabel=null,e.callback=null,e}return a(e,t),e.prototype.start=function(){s.default.addbtnTouchStartScale(this.reveiceBtn),s.default.addbtnTouchEndScale(this.reveiceBtn,this.reveiceBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.reveiceBtn),this.reveiceBtnLabel.string=c.default.instance.trans(r.GDLanguage.pop_claim)},e.prototype.reveiceBtnFunc=function(){this.node.active=!1,l.default.getSprintRewardData().rewardProgress>=3&&this.callback&&this.callback()},e.prototype.showProgress=function(t){var e=this;this.spineBox.active=!1,this.bgCoin.active=!1,this.bgProp.active=!1,this.reveiceBtn.active=!1,this.node.active=!0,this.maskNode.opacity=0,this.maskNode.active=!0,this.callback=t,e.spineProgress.active=!1,e.particleNode.active=!1,console.log("\u51b2\u523a\u5956\u52b1 = "+JSON.stringify(l.default.getSprintRewardData()));var o=l.default.getSprintRewardData(),n=o.rewardProgress,a=o.winBox,i=o.winNum;if(n<=0&&(n=1),l.default.getSprintRewardData().rewardProgress>=3){var r=l.default.getUserData(),c=a>5?5:a,u=12;c>1&&(u+=11*(c-1)),r.coin+=u;var p=l.default.gameConfigData.baseConfigData.rewardBox[Math.floor(3*Math.random())];if(p&&p.length>=2){console.log(JSON.stringify(p));var d="rewardIcon/"+p[1].propType+".png";s.default.changeSpriteFrame(this.bgProp,d),"prop_remove"==p[1].propType?(r.prop_remove++,r.prop_remove):"prop_cancel"==p[1].propType?(r.prop_cancel++,r.prop_cancel):"prop_random"==p[1].propType&&(r.prop_random++,r.prop_random)}l.default.saveUserData(r),this.bgCoinLabel.string="x"+u}var h=a;i<=3&&(h=0);var f=3*h;n>=3&&a>0&&(f=3*(a-1));var m=this.labelNode.children;for(var g in m)f+=1,m[g].getComponent(cc.Label).string=f+"",g=3&&t.playBoxAnim(),t.spineProgress.getComponent(p.default).play(n,0,function(){})})},e.prototype.getSpineName=function(){var t=l.default.getSprintRewardData(),e=t.winBox,o=t.rewardProgress,n=e<=0?1:e+1;n=n>=5?5:n,o>=3&&n>1&&n<5&&(n-=1);var a="3RichRoad"+n+"_"+(o<=0?1:o>=3?3:o);return 0==o&&(a="3RichRoad0_0"),a},e.prototype.playBoxAnim=function(){d.default.getInstance().sprintMark=!0;var t=this;if(l.default.getSprintRewardData().rewardProgress<3)return this.maskNode.active=!1,void(this.callback&&this.callback());this.maskNode.opacity=220,t.spineBox.active=!0,this.spineBox.getComponent(p.default).setFrameEventCb("Open1",function(){u.default.playAudioMusic("audio/sound/Open1.mp3",!1)}),this.spineBox.getComponent(p.default).setFrameEventCb("Eff_Sheen1",function(){t.bgCoin.active=!0,t.bgProp.active=!0}),this.spineBox.getComponent(p.default).play("Ref1_Open4",1,function(){t.reveiceBtn.active=!0,cc.tween(t.reveiceBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()})},i([m(cc.Node)],e.prototype,"maskNode",void 0),i([m(cc.Node)],e.prototype,"spineBox",void 0),i([m(cc.Node)],e.prototype,"bgCoin",void 0),i([m(cc.Label)],e.prototype,"bgCoinLabel",void 0),i([m(cc.Node)],e.prototype,"bgProp",void 0),i([m(cc.Label)],e.prototype,"bgPropLabel",void 0),i([m(cc.Node)],e.prototype,"reveiceBtn",void 0),i([m(cc.Label)],e.prototype,"reveiceBtnLabel",void 0),i([m(cc.Node)],e.prototype,"spineProgress",void 0),i([m(cc.Node)],e.prototype,"particleNode",void 0),i([m(cc.Node)],e.prototype,"labelNode",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../../i18n/gd_language":"gd_language","../../../i18n/i18n":"i18n","../../common/CcJsFunc":"CcJsFunc","../../common/dataTs":"dataTs","../../common/native/audio":"audio","../../common/spine":"spine","../../manager/GameManager":"GameManager"}],sprintRewardPop:[function(t,e,o){"use strict";cc._RF.push(e,"28f4dgUbolNKYJgMwFcV4Es","sprintRewardPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../i18n/gd_language"),c=t("../../i18n/i18n"),s=t("../common/CcJsFunc"),l=t("../common/dataTs"),u=t("../common/enumConfig"),p=t("../common/spine"),d=t("../common/util"),h=t("../manager/GameManager"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.closeBtn=null,e.titleLabel=null,e.spineNode=null,e.timeSpineNode=null,e.descLabel=null,e.playBtn=null,e.timeLabel=null,e.exitBtn=null,e.resetBtn=null,e.mainBtn=null,e.playLabel=null,e.exitLabel=null,e.restartLabel=null,e.mainLabel=null,e.firstLabel=null,e.secondLabel=null,e.threeLabel=null,e.particleNode=null,e.showPopData=null,e.updateTime=0,e}return a(e,t),e.prototype.update=function(t){this.updateTime+=t,this.updateTime>=1&&(this.updateTime-=1,this.updateTimeNum())},e.prototype.updateTimeNum=function(){var t=l.default.updateSprintRewardTime();if(0==t)console.log("\u5df2\u6ee1"),this.timeLabel.string="End";else{var e=d.default.formatTime(t);e[0]>0?this.timeLabel.string=e[0]+"d"+e[1]+"h":e[1]>0?this.timeLabel.string=e[1]+"h"+e[2]+"m":e[2]>0?this.timeLabel.string=e[2]+"m"+e[3]+"s":e[3]>0&&(this.timeLabel.string=e[2]+"m"+e[3]+"s")}},e.prototype.start=function(){s.default.addbtnTouchStartScale(this.closeBtn),s.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.closeBtn),s.default.addbtnTouchStartScale(this.playBtn),s.default.addbtnTouchEndScale(this.playBtn,this.playBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.playBtn),s.default.addbtnTouchStartScale(this.exitBtn),s.default.addbtnTouchEndScale(this.exitBtn,this.exitBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.exitBtn),s.default.addbtnTouchStartScale(this.resetBtn),s.default.addbtnTouchEndScale(this.resetBtn,this.resetBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.resetBtn),s.default.addbtnTouchStartScale(this.mainBtn),s.default.addbtnTouchEndScale(this.mainBtn,this.mainBtnFunc.bind(this)),s.default.addbtnTouchCancelScale(this.mainBtn),this.updateTimeNum(),this.setupFonts()},e.prototype.setupFonts=function(){this.playLabel.string=c.default.instance.trans(r.GDLanguage.daily_start),this.restartLabel.string=c.default.instance.trans(r.GDLanguage.pop_restart),this.exitLabel.string=c.default.instance.trans(r.GDLanguage.pop_quit),this.mainLabel.string=c.default.instance.trans(r.GDLanguage.main_screen)},e.prototype.resetBtnFunc=function(){this.node.active=!1,this.exitBtnFunc()},e.prototype.mainBtnFunc=function(){this.exitBtnFunc()},e.prototype.exitBtnFunc=function(){this.node.active=!1,cc.game.emit("blowupHeartAnim",1)},e.prototype.closeBtnFunc=function(){this.node.active=!1,cc.game.emit("blowupHeartAnim",0)},e.prototype.playBtnFunc=function(){console.log("\u53bb\u73a9\u6e38\u620f"),this.node.active=!1},e.prototype.showPop=function(t){var e=this;this.node.active=!0,this.firstLabel.node.scale=1,this.secondLabel.node.scale=1,this.showPopData=t,this.playBtn.active=!1,this.mainBtn.active=!1,this.exitBtn.active=!1,this.resetBtn.active=!1;var o=this.node.getChildByName("mask");o.opacity=0,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.titleLabel.string=c.default.instance.trans(r.GDLanguage.level_1,l.default.getUserData().playLevelId),this.timeSpineNode.getComponent(p.default).play("5Clock1",0);var n=l.default.getSprintRewardData();console.log("\u51b2\u523a\u5956\u52b1 = "+JSON.stringify(n));var a=n.winBox,i=n.rewardProgress,s=3*a;i>=3&&a>0?(s=3*(a-1),this.firstLabel.string=s+2+"",this.secondLabel.string=s+3+"",this.threeLabel.string=s+4+""):(this.firstLabel.string=s+1+"",this.secondLabel.string=s+2+"",this.threeLabel.string=s+3+""),this.firstLabel.node.active=!0,this.secondLabel.node.active=!0,this.threeLabel.node.active=!0,1==i||(2==i?e.firstLabel.node.active=!1:3==i&&(e.firstLabel.node.active=!1));var d={spineName:"2RichRoad0_0",standBy:!0};d=i<=0?this.getSpineNameWithStaydBy(!0):this.getSpineNameWithStaydBy(!h.default.getInstance().sprintMark);var f=c.default.instance.trans(r.GDLanguage.streak_award);0==this.showPopData.popType?(this.popNode.height=600,this.playBtn.active=!0,o.opacity=178):1==this.showPopData.popType?(this.popNode.height=600,this.exitBtn.active=!0,d=this.getSpineNameWithStaydBy(!0),f=c.default.instance.trans(r.GDLanguage.streak_lose)):2==this.showPopData.popType&&(this.popNode.height=700,this.resetBtn.active=!0,this.mainBtn.active=!0,d=this.getSpineNameWithStaydBy(!0),f=c.default.instance.trans(r.GDLanguage.streak_lose)),this.descLabel.string=f,this.spineNode.getComponent(p.default).setFrameEventCb("NoShow1",function(t){console.log("NoShow1 = "+t),e.updateProgressLabel(i)}),this.spineNode.getComponent(p.default).setFrameEventCb("Open2",function(t){console.log("Open2 = "+t),e.particleNode.getComponent(cc.ParticleSystem).resetSystem(),e.particleNode.getChildByName("Star0").getComponent(cc.ParticleSystem).resetSystem(),e.particleNode.getChildByName("Star1").getComponent(cc.ParticleSystem).resetSystem()});var m=d.spineName,g=d.standBy;console.log("spineDict",m,g),g?(e.updateProgressLabel(i),this.spineNode.getComponent(p.default).play(m,0,function(){})):this.spineNode.getComponent(p.default).play(m,1,function(){m+="_1",console.log("\u5f85\u673a "+m),e.spineNode.getComponent(p.default).play(m,0,function(){})}),h.default.getInstance().sprintMark=!1,0==this.showPopData.popType&&cc.game.emit(u.EMITKEY.MAINUPDATEUI)},e.prototype.updateProgressLabel=function(t){1==t?this.firstLabel.node.active=!1:2==t?this.secondLabel.node.active=!1:3==t&&(this.secondLabel.node.active=!1)},e.prototype.getSpineNameWithStaydBy=function(t){var e=l.default.getSprintRewardData(),o=e.winBox,n=e.rewardProgress,a=o<=0?1:o+1;a=a>=5?5:a,n>=3&&a>1&&a<=5&&(a-=1);var i=n<=0?1:n>=3?3:n,r="2RichRoad"+a+"_"+(t?i+"_1":i);return 0==n&&(r="2RichRoad0_0"),{spineName:r,standBy:t}},i([g(cc.Node)],e.prototype,"popNode",void 0),i([g(cc.Node)],e.prototype,"closeBtn",void 0),i([g(cc.Label)],e.prototype,"titleLabel",void 0),i([g(cc.Node)],e.prototype,"spineNode",void 0),i([g(cc.Node)],e.prototype,"timeSpineNode",void 0),i([g(cc.Label)],e.prototype,"descLabel",void 0),i([g(cc.Node)],e.prototype,"playBtn",void 0),i([g(cc.Label)],e.prototype,"timeLabel",void 0),i([g(cc.Node)],e.prototype,"exitBtn",void 0),i([g(cc.Node)],e.prototype,"resetBtn",void 0),i([g(cc.Node)],e.prototype,"mainBtn",void 0),i([g(cc.Label)],e.prototype,"playLabel",void 0),i([g(cc.Label)],e.prototype,"exitLabel",void 0),i([g(cc.Label)],e.prototype,"restartLabel",void 0),i([g(cc.Label)],e.prototype,"mainLabel",void 0),i([g(cc.Label)],e.prototype,"firstLabel",void 0),i([g(cc.Label)],e.prototype,"secondLabel",void 0),i([g(cc.Label)],e.prototype,"threeLabel",void 0),i([g(cc.Node)],e.prototype,"particleNode",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../../i18n/gd_language":"gd_language","../../i18n/i18n":"i18n","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/spine":"spine","../common/util":"util","../manager/GameManager":"GameManager"}],stagePop:[function(t,e,o){"use strict";cc._RF.push(e,"7537cBSDCRLP5ZtoGd5R7fy","stagePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/spine"),s=t("../common/util"),l=t("../manager/DateManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mask=null,e.popNode=null,e.closeBtn=null,e.titleLabel=null,e.spNode=null,e.headerNode=null,e.manNode=null,e.womanNode=null,e.userName=null,e.userAddress=null,e.topTimeLabel=null,e.lTimeLabel=null,e.timeLabel=null,e.rTimeLabel=null,e.noKingNode=null,e.showPopData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.mask,this.closeBtnFunc.bind(this)),r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.closeBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn)},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){var e=this;this.node.active=!0,this.showPopData=t;var o=t.idx;cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var n="",a="",i="",r="",s="",u="",p="default";1==o?(n="\u5168\u56fd\u9886\u5934\u7f8a",i="\u4e8e\u6628\u65e5",r="\u9996\u4e2a\u901a\u5173",s="sheep/Alpaca01",u="animation"):2==o?(n="\u673a\u667a\u7267\u7f8a\u72ac",a="\u4e8e\u6628\u65e5\u5728\u4e0d\u4f7f\u7528\u9053\u5177\u548c\u590d\u6d3b\u7684\u60c5",i="\u51b5\u4e0b\u4ec5\u7528",r="\u901a\u5173",s="sheep/DJ1",u="Jump2",p="00"):3==o&&(n="\u79cb\u540d\u5c71\u7f8a\u795e",i="\u4e8e\u6628\u65e5\u4ec5\u7528",r="\u901a\u5173",s="sheep/Alpaca02",u="animation"),this.spNode.getComponent(c.default).loadSpine(s,function(){e.spNode.getComponent(c.default).setNewSkin(p),e.spNode.getComponent(c.default).play(u,0)}),this.titleLabel.string=n,this.topTimeLabel.string=a,this.lTimeLabel.string=i,this.rTimeLabel.string=r;var d=this.showPopData.stageInfo;if(1==o&&d.firstWin&&d.firstWin.nick_name&&d.firstWin.nick_name.length){console.log(JSON.stringify(d.firstWin));var h=this.getTimeDate(d.firstWin.ts),f=l.default.getInstance().formatTs(d.firstWin.ts);this.timeLabel.string=f[3]+":"+f[4]+":"+f[5],this.updateInfo(d.firstWin)}this.noKingNode.active=!1,2==o&&d.iqWin&&d.iqWin.nick_name&&d.iqWin.nick_name.length?(console.log(JSON.stringify(d.iqWin)),h=this.getTimeDate(d.iqWin.time),this.timeLabel.string=h[1]+"\u5206"+h[2]+"\u79d2",this.updateInfo(d.iqWin)):2==o&&(this.noKingNode.active=!0,this.titleLabel.string="\u6700\u5f3a\u738b\u8005",console.log("\u6700\u5f3a\u738b\u8005")),3==o&&d.timeWin&&d.timeWin.nick_name&&d.timeWin.nick_name.length&&(console.log(JSON.stringify(d.timeWin)),h=this.getTimeDate(d.timeWin.time),this.timeLabel.string=h[1]+"\u5206"+h[2]+"\u79d2",this.updateInfo(d.timeWin))},e.prototype.updateInfo=function(t){r.default.setAvatar(this.headerNode,t.avatar),this.userName.getComponent(cc.Label).string=t.nick_name,this.userAddress.getComponent(cc.Label).string=t.city,0==t.gender?this.manNode.active=!0:this.manNode.active=!1},e.prototype.getTimeDate=function(t){var e=s.default.countdownTime(t);return[e[0]<10?"0"+e[0]:e[0]+"",e[1]<10?"0"+e[1]:e[1]+"",e[2]<10?"0"+e[2]:e[2]+""]},i([d(cc.Node)],e.prototype,"mask",void 0),i([d(cc.Node)],e.prototype,"popNode",void 0),i([d(cc.Node)],e.prototype,"closeBtn",void 0),i([d(cc.Label)],e.prototype,"titleLabel",void 0),i([d(cc.Node)],e.prototype,"spNode",void 0),i([d(cc.Node)],e.prototype,"headerNode",void 0),i([d(cc.Node)],e.prototype,"manNode",void 0),i([d(cc.Node)],e.prototype,"womanNode",void 0),i([d(cc.Label)],e.prototype,"userName",void 0),i([d(cc.Label)],e.prototype,"userAddress",void 0),i([d(cc.Label)],e.prototype,"topTimeLabel",void 0),i([d(cc.Label)],e.prototype,"lTimeLabel",void 0),i([d(cc.Label)],e.prototype,"timeLabel",void 0),i([d(cc.Label)],e.prototype,"rTimeLabel",void 0),i([d({type:cc.Node,tooltip:"\u6700\u5f3a\u738b\u8005"})],e.prototype,"noKingNode",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/spine":"spine","../common/util":"util","../manager/DateManager":"DateManager"}],"str-utils":[function(t,e,o){"use strict";cc._RF.push(e,"622d8ysQvVFXaRZmKMfNXEC","str-utils"),Object.defineProperty(o,"__esModule",{value:!0});var n=function(){function t(){}return t.formatStr=function(t){for(var e=[],o=1;o0)for(var n=0;n>6|192,63&r|128):String.fromCharCode(r>>12|224,r>>6&63|128,63&r|128),null!==c&&(n>18&63,o=a>>12&63,n=a>>6&63,a&=63,u[s++]=i.charAt(e)+i.charAt(o)+i.charAt(n)+i.charAt(a),c=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/main/flying-item-pop-coin"),c=t("../activity/main/main-cookie-reward"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../manager/GameManager"),p=cc._decorator,d=p.ccclass,h=p.property,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.coinNumLabel=null,e.flyCoinNode=null,e.topCoinNode=null,e.cookieReward=null,e.moneyData=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(l.EMITKEY.MAINUPDATEUI,this.setMainLayerData,this),this.setMainLayerData()},e.prototype.setMainLayerData=function(){console.log("topUiLayer MAINUPDATEUI");var t=s.default.getUserData();u.default.getInstance().moneyDict,u.default.getInstance().cookieDict,this.coinNumLabel.string=t.coin+"",this.checkCoinOrFish()},e.prototype.getFlyTime=function(t,e,o){var n=o;return Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y))/t},e.prototype.updatenNumberAnim=function(t,e,o){var n={num:e},a=t.getComponent(cc.Label);a.string=n.num+"",console.log((o-e)/10);var i=o-e<10?.3:(o-e)/10*.3;i>1&&(i=1),cc.tween(n).to(i,{num:o},{progress:function(t,e,o,n){return a.string=Math.ceil(t+(e-t)*n)+"",t+(e-t)*n}}).start()},e.prototype.checkCoinOrFish=function(){console.log("checkCoinOrFish moneyDict",u.default.getInstance().moneyDict),console.log("checkCoinOrFish cookieDict",u.default.getInstance().cookieDict),this.moneyData=u.default.getInstance().moneyDict;var t=this.moneyData.coin,e=(this.moneyData.fish,u.default.getInstance().cookieDict.cookie),o=s.default.getUserData();this.coinNumLabel.string=o.coin-t+"",t>0?this.flyCoinFunc():e>0&&this.flyCookieFunc()},e.prototype.flyCoinFunc=function(){console.log("flyCoinFunc"),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,7);var t=this,e={firstCallBack:function(){console.log("\u91d1\u5e01\u5f00\u59cb\u98de\u884c");var e=u.default.getInstance().moneyDict.coin,o=s.default.getUserData();t.updatenNumberAnim(t.coinNumLabel.node,o.coin-e,o.coin)},callBack:function(){console.log("\u91d1\u5e01\u98de\u884c\u7ed3\u675f"),u.default.getInstance().moneyDict.coin=0,t.flyCoinNode.active=!1,cc.game.emit(l.EMITKEY.HIDEMASKLAYER,12),u.default.getInstance().cookieDict.cookie>0&&t.flyCookieFunc()}};this.flyCoinNode.active=!0,this.flyCoinNode.getComponent(r.default).flyTo(this.topCoinNode,e)},e.prototype.flyCookieFunc=function(){s.default.getUserData().playLevelId<17||(console.log("flyCookieFunc"),cc.game.emit(l.EMITKEY.SHOWMASKLAYER,7),this.cookieReward.getComponent(c.default).checkCookie(function(){cc.game.emit(l.EMITKEY.HIDEMASKLAYER,12),console.log("\u83b7\u53d6\u997c\u5e72\u52a8\u753b\u5b8c\u6bd5 ###")}))},e.prototype.getWorldPosition=function(t){return t.convertToWorldSpaceAR(cc.v2(0,0))},e.prototype.getNodePosition=function(t,e){return t.convertToNodeSpaceAR(e)},i([h(cc.Label)],e.prototype,"coinNumLabel",void 0),i([h(cc.Node)],e.prototype,"flyCoinNode",void 0),i([h(cc.Node)],e.prototype,"topCoinNode",void 0),i([h(cc.Node)],e.prototype,"cookieReward",void 0),i([d],e)}(cc.Component);o.default=f,cc._RF.pop()},{"../../pre/main/flying-item-pop-coin":"flying-item-pop-coin","../activity/main/main-cookie-reward":"main-cookie-reward","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../manager/GameManager":"GameManager"}],"topic-card-node":[function(t,e,o){"use strict";cc._RF.push(e,"1be56R1zVlJqa9MONuCRdDg","topic-card-node");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../script/common/CcJsFunc"),c=cc._decorator,s=c.ccclass,l=c.property,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.iconHeader=null,e.purpleNode=null,e.blueNode=null,e.nickNameNode=null,e.cityNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t){var e=this;t?(this.node.stopAllActions(),this.node.active=!0,cc.tween(this.node).delay(3).call(function(){e.node.active=!1},this).start(),t.gender?1==t.gender?(this.purpleNode.active=!1,this.blueNode.active=!0):2==t.gender?(this.purpleNode.active=!0,this.blueNode.active=!1):(this.purpleNode.active=!1,this.blueNode.active=!0):(this.purpleNode.active=!1,this.blueNode.active=!0),t.nick_name?this.nickNameNode.getComponent(cc.Label).string=t.nick_name:this.nickNameNode.getComponent(cc.Label).string="",t.city?this.cityNode.getComponent(cc.Label).string=t.city:this.cityNode.getComponent(cc.Label).string="",r.default.setAvatar(this.iconHeader,t.avatar)):this.node.active=!1},i([l(cc.Node)],e.prototype,"iconHeader",void 0),i([l(cc.Node)],e.prototype,"purpleNode",void 0),i([l(cc.Node)],e.prototype,"blueNode",void 0),i([l(cc.Node)],e.prototype,"nickNameNode",void 0),i([l(cc.Node)],e.prototype,"cityNode",void 0),i([s],e)}(cc.Component);o.default=u,cc._RF.pop()},{"../../../script/common/CcJsFunc":"CcJsFunc"}],"topic-header-node":[function(t,e,o){"use strict";cc._RF.push(e,"bf959UaKZ5L25ZRO1LSyISJ","topic-header-node");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../script/api/api-sheep"),c=t("../../../script/common/CcJsFunc"),s=t("../../../script/common/dataTs"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.manHeader=null,e.womanHeader=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.showData=function(t){var e=this;if(this.womanHeader.opacity=0,this.manHeader.opacity=255,t==s.default.getUserData().userID)r.default.getTopicUserInfo(t,function(t){0==t.err_code&&t.data&&t.data.user&&c.default.setAvatar(e.manHeader,t.data.user.avatar)});else{var o="localHeader/header_"+c.default.randomNum(1,200);c.default.changeSpriteFrame(this.manHeader,o)}},i([p(cc.Node)],e.prototype,"manHeader",void 0),i([p(cc.Node)],e.prototype,"womanHeader",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../../../script/api/api-sheep":"api-sheep","../../../script/common/CcJsFunc":"CcJsFunc","../../../script/common/dataTs":"dataTs"}],"topic-rank":[function(t,e,o){"use strict";cc._RF.push(e,"e59f1N9al1CCKpf6SOs72TQ","topic-rank");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},c=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=2&&(e=2);var o=this.userIdx>4?100*(this.userIdx-5):0;cc.tween(this.node).to(e,{y:this.contentY-o},{easing:cc.easing.cubicOut}).call(function(){if(t.scrollToPosition=!1,t.curSheepNode)if(1==h.default.getInstance().game_over)h.default.getInstance().game_over=0,t.curSheepNode.getComponent(m.default).playFlashAnimation();else{var e=t.curSheepNode.getComponent(m.default).getUserID();s.default.getTopicUserInfo(e,function(e){0==e.err_code&&e.data&&e.data.user&&t.showCardNode(t.curSheepNode.x,t.curSheepNode.y+150,e.data.user)})}},this).start()},e.prototype.onEnable=function(){this.requestData()},e.prototype.onDisable=function(){if(this.topicRankModel){var t={a_team_win:this.topicRankModel.tomb.length,b_team_win:this.topicRankModel.taoist.length,a_team_fail:this.topicRankModel.tomb_fail_member,b_team_fail:this.topicRankModel.taoist_fail_member};b.default.reportTACommon("topic_team",t)}},e.prototype.requestData=function(){return r(this,void 0,void 0,function(){var t;return c(this,function(e){switch(e.label){case 0:return t=this,h.default.getInstance().game_over>0?[4,s.default.getTopicData(function(){})]:[3,2];case 1:e.sent(),e.label=2;case 2:return[4,s.default.topicRankInfo(function(e){t.topicRankModel=e.data})];case 3:return e.sent(),d.default.topicModel&&d.default.topicModel.info&&0!=d.default.topicModel.info.type||s.default.getTopicData(function(){}),this.setupSubviews(),[2]}})})},e.prototype.setupSubviews=function(){var t=this,e=this;if(this.topicRankModel){var o=this.topicRankModel.tomb,n=this.topicRankModel.taoist;o||(o=[]),n||(n=[]);var a;a=o.length>=n.length?o.length:n.length;var i=(cc.winSize.height-cc.winSize.width)/2;if(this.node.height=cc.winSize.height+100*Math.floor(a/3),this.node.height<1.5*cc.winSize.height&&(this.node.height=1.5*cc.winSize.height),this.marginH=(this.node.height-cc.winSize.height)/2,this.node.y=this.marginH,this.contentY=this.node.y,console.log("\u6392\u884c\u699c\u9ad8\u5ea6 = ",this.node.height,i,this.marginH),this.setupSheep(o,n),this.tombDeadLabel.string=d.default.topicRankInfo.tomb_fail_member,this.taoistDeadLabel.string=d.default.topicRankInfo.taoist_fail_member,setTimeout(function(){if(t.tombScrollMsg&&t.toaistScrollMsg){var a="\u4eca\u65e5\u6311\u6218 "+(d.default.topicRankInfo.tomb_fail_member+o.length)+" \u7f8a\uff0c\u901a\u5173 "+o.length+" \u7f8a";e.tombScrollMsg.getComponent(f.default).showMsg({msg:a});var i="\u4eca\u65e5\u6311\u6218 "+(d.default.topicRankInfo.taoist_fail_member+n.length)+" \u7f8a\uff0c\u901a\u5173 "+n.length+" \u7f8a";e.toaistScrollMsg.getComponent(f.default).showMsg({msg:i})}},1e3),1==h.default.getInstance().game_over){var r=o.length>=500||n.length>=500?2:1;setTimeout(function(){t.scrollToPosition=!0,t.topicPositionFunc()},1e3*r)}}},e.prototype.setAnimationSub=function(t,e){this.BGSP.getComponent(p.default).play("Stage2",0),this.spotSP.getComponent(p.default).play("0Spotlight",0);var o;o=t.length>=e.length?"sheep/DJ1":"sheep/DJ2",1==d.default.topicModel.id?this.playDJAnimation(o,"The01","Jump2"):2==d.default.topicModel.id?this.playDJAnimation(o,"The02","Jump2"):3==d.default.topicModel.id?this.playDJAnimation(o,"The03","Jump2"):this.playDJAnimation(o,"00","Jump2");var n=d.default.getJudgeAnimation(d.default.topicModel.id,!0,!1);this.playTombAnimation(n.spName,n.anim);var a=d.default.getJudgeAnimation(d.default.topicModel.id,!1,!0);this.playTaoistAnimation(a.spName,a.anim)},e.prototype.playDJAnimation=function(t,e,o){var n=this;this.DJSP.zIndex=10,this.DJSP.getComponent(p.default).loadSpine(t,function(){n.DJSP.getComponent(p.default).setNewSkin(e),n.DJSP.getComponent(p.default).play(o,0)})},e.prototype.playTombAnimation=function(t,e){var o=this;this.tombSP.getComponent(p.default).loadSpine(t,function(){o.tombSP.getComponent(p.default).play(e,0)})},e.prototype.playTaoistAnimation=function(t,e){var o=this;this.toaistSP.getComponent(p.default).loadSpine(t,function(){o.toaistSP.getComponent(p.default).play(e,0)})},e.prototype.setupSheep=function(t,e){var o=this;for(var n in this.sheepArray)this.sheepArray[n].destroy();this.sheepArray=[],this.userID=u.default.getUserData().userID;for(var a=function(n){setTimeout(function(){o.createSheepNode(n,t,e,!0)},1*n)},i=0;i300)){var a=this,i=cc.instantiate(this.sheepNode);i.opacity=0,this.sheepNodeBase.addChild(i),this.sheepArray.push(i);var r=Math.floor(t/3),c=Math.floor(t%3),s=-this.marginH-cc.winSize.height/2+550+90*r,l=0,u=n?1:-1;l=r%2==0?-cc.winSize.width/2+100*c+100:-cc.winSize.width/2+100*c+80,l*=u,i.x=l,i.y=s,i.scaleX=n?1:-1,i.setSiblingIndex(3*r);var p;(p=n?e[t]:o[t])==this.userID&&(this.userIdx=r,this.curSheepNode=i,1==h.default.getInstance().game_over&&this.curSheepNode&&(this.curSheepNode.active=!1),console.log("\u627e\u5230\u4e86\u7528\u6237id ###### taoistData ",p,r)),i.getComponent(m.default).showData(p,n,function(t){a.showCardNode(i.x,i.y+150,t)});var d=cc.instantiate(this.headerNode);d.opacity=0,d.x=l,d.y=s,this.headerNodeBase.addChild(d),this.sheepArray.push(d),d.getComponent(g.default).showData(p)}},e.prototype.showCardNode=function(t,e,o){var n=this;this.cardNode.stopAllActions(),this.cardNode.x=t,this.cardNode.y=e,this.cardNode.getComponent(y.default).showData(o),cc.tween(this.cardNode).to(0,{opacity:255}).delay(2).call(function(){n.cardNode.opacity=0}).start()},e.prototype.moveActionFunc=function(t){this.node.height=this.marginH?this.node.y=this.marginH:this.node.y<=-this.marginH&&(this.node.y=-this.marginH),this.isMoving=!0)},e.prototype.moveActionEndFunc=function(){this.isMoving=!1},e.prototype.update=function(){(this.isMoving||this.scrollToPosition)&&this.showOrHide()},e.prototype.showOrHide=function(){for(var t=0;t=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../../script/api/api-sheep"),c=t("../../../script/common/CcJsFunc"),s=t("../../../script/common/dataTs"),l=t("../../../script/common/spine"),u=t("../../../script/manager/data-manager"),p=cc._decorator,d=p.ccclass,h=p.property,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.flashNode=null,e.sheepSp=null,e.clickNode=null,e.userID=0,e.clickCallback=null,e.userData=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.clickNode,this.clickNodeFunc.bind(this))},e.prototype.clickNodeFunc=function(){var t=this;this.userData?t.clickCallback&&t.clickCallback(this.userData):r.default.getTopicUserInfo(this.userID,function(e){0==e.err_code&&e.data&&e.data.user&&(t.userData=e.data.user,t.clickCallback&&t.clickCallback(e.data.user))})},e.prototype.getUserID=function(){return this.userID},e.prototype.playFlashAnimation=function(){var t=this;this.node.active=!0,this.sheepSp.getComponent(l.default).play("Drop1",1,function(){t.flashNode.active=!0,t.flashNode.getComponent(l.default).play("3Ray1",1,function(){t.flashNode.active=!1,s.default.isPlatform(s.GDPlatform.tt)&&t.showSharePop()}),t.sheepSp.getComponent(l.default).play("Jump3",0)})},e.prototype.showSharePop=function(){cc.game.emit("showPop",{popName:"shareNodePop",showPopData:{type:1}})},e.prototype.showData=function(t,e,o){if(this.userID=t,this.clickCallback=o,u.default.topicModel)if(e){var n=u.default.getTopicAnimation(u.default.topicModel.id,!0,!1);this.playTomb(n.spName,n.skin,"Jump3")}else n=u.default.getTopicAnimation(u.default.topicModel.id,!1,!0),this.playTaoist(n.spName,n.skin,"Jump3")},e.prototype.playTomb=function(t,e,o){var n=this;this.sheepSp.getComponent(l.default).loadSpine(t,function(){n.sheepSp.getComponent(l.default).setNewSkin(e),n.sheepSp.getComponent(l.default).play(o,0)})},e.prototype.playTaoist=function(t,e,o){var n=this;this.sheepSp.getComponent(l.default).loadSpine(t,function(){n.sheepSp.getComponent(l.default).setNewSkin(e),n.sheepSp.getComponent(l.default).play(o,0)})},i([h(cc.Node)],e.prototype,"flashNode",void 0),i([h(cc.Node)],e.prototype,"sheepSp",void 0),i([h(cc.Node)],e.prototype,"clickNode",void 0),i([d],e)}(cc.Component);o.default=f,cc._RF.pop()},{"../../../script/api/api-sheep":"api-sheep","../../../script/common/CcJsFunc":"CcJsFunc","../../../script/common/dataTs":"dataTs","../../../script/common/spine":"spine","../../../script/manager/data-manager":"data-manager"}],"topic-ui-layer":[function(t,e,o){"use strict";cc._RF.push(e,"41174iuu2NIQJJDkdlO9Oyh","topic-ui-layer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/CcJsFunc"),c=t("../../common/enumConfig"),s=t("../../common/native/audio"),l=t("../../common/util"),u=t("../../manager/data-manager"),p=t("../../manager/DateManager"),d=t("../../manager/GameManager"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pointBtn=null,e.settingBtn=null,e.backBtn=null,e.playBtn=null,e.locationBtn=null,e.timeNode=null,e.timeLabel=null,e.tombLabel=null,e.taoistLabel=null,e.tombNumLabel=null,e.taoistNumLabel=null,e.vsProgress=null,e.beginButtonDuration=0,e.updateTime=0,e}return a(e,t),e.prototype.start=function(){cc.game.on(c.EMITKEY.TOPICACCOUNT,this.topicAccountFunc,this),cc.game.on(c.EMITKEY.TOPICRANKINFO,this.topicRankInfoFunc,this),r.default.addTargetTouchUpInside(this.pointBtn,this.pointBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.settingBtn,this.settingBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.backBtn,this.backBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.playBtn,this.playBtnFunc.bind(this)),r.default.addTargetTouchUpInside(this.locationBtn,this.locationBtnFunc.bind(this)),this.updateTimeFunc()},e.prototype.onEnable=function(){this.topicAccountFunc(),this.topicRankInfoFunc()},e.prototype.topicAccountFunc=function(){if(console.log("TOPICACCOUNT \u901a\u77e5 = ",JSON.stringify(u.default.topicModel)),u.default.topicModel){this.timeNode.active=!1;var t=u.default.topicModel.name.split("#");t.length<2||(this.tombLabel.string=t[0],this.taoistLabel.string=t[1])}},e.prototype.topicRankInfoFunc=function(){if(console.log("TOPICRANKINFO \u901a\u77e5 ######"),u.default.topicRankInfo){var t=u.default.topicRankInfo.tomb,e=u.default.topicRankInfo.taoist;if(t||(t=[]),e||(e=[]),console.log("topicRankInfoFunc ",t.length,"---",e.length),this.tombNumLabel.string=t.length+"\u7f8a",this.taoistNumLabel.string=e.length+"\u7f8a",t.length==e.length?(this.tombLabel.fontSize=90,this.taoistLabel.fontSize=90):t.length>e.length?(this.tombLabel.fontSize=90,this.taoistLabel.fontSize=60):(this.tombLabel.fontSize=60,this.taoistLabel.fontSize=90),0==t.length&&0==e.length)this.vsProgress.fillStart=.5;else if(0==t.length)this.vsProgress.fillStart=0;else if(0==e.length)this.vsProgress.fillStart=1;else if(t.length>0&&e.length>0){var o=t.length/(t.length+e.length);this.vsProgress.fillStart=o}this.locationBtn.active=!1;var n=this.playBtn.getChildByName("label").getComponent(cc.Label),a=this.isWin();console.log("winNum ###### = ",a),1==a?(n.string="\u5df2\u52a0\u5165\u7f8a\u7fa4",this.timeNode.active=!0,this.locationBtn.active=!0):n.string=0==a?"\u518d\u6b21\u6311\u6218":"\u52a0\u5165\u7f8a\u7fa4"}},e.prototype.isWin=function(){if(u.default.topicModel&&u.default.topicModel.info){if(1==u.default.topicModel.info.state)return 1;if(2==u.default.topicModel.info.state)return 0}return-1},e.prototype.pointBtnFunc=function(){console.log("\u63d0\u793a"),this.showChoosePop(1)},e.prototype.settingBtnFunc=function(){console.log("\u8bbe\u7f6e"),cc.game.emit("showPop",{popName:"setupPop",showPopData:{}})},e.prototype.backBtnFunc=function(){console.log("\u8fd4\u56de"),cc.game.emit(c.EMITKEY.SHOWTRANSITLAYER,function(){cc.game.emit(c.EMITKEY.SHOWMODULE,c.MODULETYPE.COMMON)})},e.prototype.playBtnFunc=function(){console.log("\u5f00\u59cb\u6e38\u620f"),this.chooseCallbackFunc()},e.prototype.showChoosePop=function(t){var e={popName:"topicChoosePop",showPopData:{type:t,chooseCallback:this.chooseCallbackFunc.bind(this)}};cc.game.emit("showPop",e)},e.prototype.chooseCallbackFunc=function(){if(this.beginButtonDuration>=1){this.beginButtonDuration=0;var t=this.isWin();if(console.log("winNum ###### = ",t),1==t)return void cc.game.emit(c.EMITKEY.SHOWMAINTIPS,"\u6bcf\u65e5\u4e00\u5173\uff0c\u4eca\u5929\u5df2\u6311\u6218\u6210\u529f");d.default.setGameType(c.GAMETYPE.GAMETOPIC),s.default.playBGM(),cc.game.emit(c.EMITKEY.BEGINGAME)}else console.log("\u4e0d\u80fd\u8fde\u7eed\u70b9\u51fb")},e.prototype.locationBtnFunc=function(){console.log("\u5b9a\u4f4d"),cc.game.emit(c.EMITKEY.TOPICPOSITION)},e.prototype.update=function(t){this.beginButtonDuration+=t,this.updateTime+=t,this.updateTime>=1&&(this.updateTime=0,this.updateTimeFunc())},e.prototype.updateTimeFunc=function(){var t=p.default.format(c.CALENDARNAMES[8],new Date).split(" ");if(!(t.length<2)){var e=t[1].split(":");if(!(e.length<3)){var o=3600*(24-Number(e[0])-1)+60*(60-Number(e[1])-1)+(60-Number(e[2]));if(this.timeNode.activeInHierarchy){var n=l.default.formatTime(1e3*o),a=(n[1]<10?"0"+n[1]:n[1])+":"+(n[2]<10?"0"+n[2]:n[2])+":"+(n[3]<10?"0"+n[3]:n[3])+" \u91cd\u7f6e";this.timeLabel.string=a}}}},i([m({type:cc.Node,tooltip:"\u63d0\u793a"})],e.prototype,"pointBtn",void 0),i([m({type:cc.Node,tooltip:"\u8bbe\u7f6e"})],e.prototype,"settingBtn",void 0),i([m({type:cc.Node,tooltip:"\u8fd4\u56de"})],e.prototype,"backBtn",void 0),i([m({type:cc.Node,tooltip:"\u5f00\u59cb\u6e38\u620f"})],e.prototype,"playBtn",void 0),i([m({type:cc.Node,tooltip:"\u5b9a\u4f4d"})],e.prototype,"locationBtn",void 0),i([m({type:cc.Node,tooltip:"\u5012\u8ba1\u65f6"})],e.prototype,"timeNode",void 0),i([m({type:cc.Label,tooltip:"\u5012\u8ba1\u65f6"})],e.prototype,"timeLabel",void 0),i([m({type:cc.Label,tooltip:"\u50f5\u5c38"})],e.prototype,"tombLabel",void 0),i([m({type:cc.Label,tooltip:"\u9053\u58eb"})],e.prototype,"taoistLabel",void 0),i([m({type:cc.Label,tooltip:"\u50f5\u5c38\u6570\u91cf"})],e.prototype,"tombNumLabel",void 0),i([m({type:cc.Label,tooltip:"\u9053\u58eb\u6570\u91cf"})],e.prototype,"taoistNumLabel",void 0),i([m({type:cc.Sprite,tooltip:"vs\u8fdb\u5ea6"})],e.prototype,"vsProgress",void 0),i([f],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../common/CcJsFunc":"CcJsFunc","../../common/enumConfig":"enumConfig","../../common/native/audio":"audio","../../common/util":"util","../../manager/DateManager":"DateManager","../../manager/GameManager":"GameManager","../../manager/data-manager":"data-manager"}],"topic-ui":[function(t,e,o){"use strict";cc._RF.push(e,"8fa33VO+JBKg6ZJbHIXKnoL","topic-ui");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/dataTs"),c=t("../../common/enumConfig"),s=t("../../common/native/audio"),l=t("../../manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rankNode=null,e.uiLayer=null,e.beginBGM=!1,e}return a(e,t),e.prototype.onEnable=function(){l.default.setGameType(c.GAMETYPE.GAMETOMB),this.playGameBgMusic()},e.prototype.start=function(){},e.prototype.playGameBgMusic=function(){if(r.default.getUserSetupData().musicStatus<0)cc.audioEngine.stopAll();else if(0==this.beginBGM){var t=this;cc.loader.loadRes("audio/music/game_begin.mp3",function(e,o){var n=cc.audioEngine.playMusic(o,!1);cc.audioEngine.getCurrentTime(n),cc.audioEngine.getDuration(n),cc.audioEngine.setFinishCallback(n,function(){t.beginBGM=!0,console.log("\u64ad\u653e\u5b8c\u6210\u8fdb\u573a\u97f3\u4e50 ###### "),t.playBg()})})}else this.playBg()},e.prototype.playBg=function(){s.default.playBGM()},i([d({type:cc.Node,tooltip:"\u6392\u884c\u699c"})],e.prototype,"rankNode",void 0),i([d({type:cc.Node,tooltip:"UI"})],e.prototype,"uiLayer",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/native/audio":"audio","../../manager/GameManager":"GameManager"}],topicChoosePop:[function(t,e,o){"use strict";cc._RF.push(e,"db225EuZZ1H86t8bfP+ErU1","topicChoosePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../common/sdk"),p=t("../common/spine"),d=t("../common/util"),h=t("../manager/data-manager"),f=t("../manager/DateManager"),m=cc._decorator,g=m.ccclass,y=m.property,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.titleNode=null,e.closeBtn=null,e.yellowNode=null,e.redNode=null,e.yellowBtn=null,e.redBtn=null,e.timeNode=null,e.chooseBtn=null,e.chooseVideo=null,e.chooseLabel=null,e.noChooseBtn=null,e.giveupBtn=null,e.tombName=null,e.taoistName=null,e.tombSP=null,e.taoistSP=null,e.timeLabel=null,e.popData=null,e.topicType=0,e.updateTime=0,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.yellowNode,this.yellowNodeFunc.bind(this)),c.default.addTargetTouchUpInside(this.redNode,this.redNodeFunc.bind(this)),c.default.addTargetTouchUpInside(this.chooseBtn,this.chooseBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.giveupBtn,this.giveupBtnFunc.bind(this))},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.yellowNodeFunc=function(){this.topicType=1,console.log("topicType = ",this.topicType),this.popData&&1==this.popData.type||this.exchangeUI(!0)},e.prototype.redNodeFunc=function(){this.topicType=2,console.log("topicType = ",this.topicType),this.popData&&1==this.popData.type||this.exchangeUI(!1)},e.prototype.exchangeUI=function(t,e){if(void 0===e&&(e=!1),this.noChooseBtn.active=!1,h.default.topicModel&&h.default.topicModel.name){var o=h.default.topicModel.name.split("#");if(!(o.length<2))if(this.yellowBtn.active=!0,this.redBtn.active=!0,t){this.chooseLabel.string="\u52a0\u5165"+o[0]+"\u7f8a",this.yellowNode.getChildByName("choose").active=!0,this.redNode.getChildByName("choose").active=!1,this.yellowBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FBE547"),this.redBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FFFFFF"),this.redBtn.getChildByName("name").getComponent(cc.Label).string="\u9009\u62e9",this.redBtn.active=!e;var n=e?"\u5df2\u52a0\u5165":"\u5df2\u9009\u62e9";this.yellowBtn.getChildByName("name").getComponent(cc.Label).string=n}else this.chooseLabel.string="\u52a0\u5165"+o[1]+"\u7f8a",this.yellowNode.getChildByName("choose").active=!1,this.redNode.getChildByName("choose").active=!0,this.yellowBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FFFFFF"),this.redBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FBE547"),this.yellowBtn.getChildByName("name").getComponent(cc.Label).string="\u9009\u62e9",this.yellowBtn.active=!e,n=e?"\u5df2\u52a0\u5165":"\u5df2\u9009\u62e9",this.redBtn.getChildByName("name").getComponent(cc.Label).string=n}},e.prototype.chooseBtnFunc=function(){if(0==this.topicType){if(this.yellowBtn.stopAllActions(),this.redBtn.stopAllActions(),cc.tween(this.yellowBtn).to(.2,{scale:1.5}).to(.2,{scale:1}).start(),cc.tween(this.redBtn).to(.2,{scale:1.5}).to(.2,{scale:1}).start(),!h.default.topicModel)return void cc.game.emit(l.EMITKEY.SHOWMAINTIPS,"\u8bf7\u9009\u62e9\u4f60\u7684\u9635\u8425");h.default.topicModel.tombh.default.topicModel.taoist?this.topicType=2:this.topicType=c.default.randomNum(1,2)}if(1!=h.default.todayIsWin()){var t=this;if(u.default.isPlatform(u.Platform.wx)){var e=s.default.GetVedioID(),o=s.default.getUserData().openid;u.default.share(o,e,function(){t.addTopicMethod()},function(){cc.game.emit(l.EMITKEY.SHOWMAINTIPS,"\u5206\u4eab\u5931\u8d25\uff0c\u8bf7\u5206\u4eab\u5fae\u4fe1\u7fa4\u4e0e\u597d\u53cbPK")})}else u.default.watchAdVideo({id:s.default.GetVedioID(),success:function(){console.log("\u89c6\u9891\u64ad\u653e\u6210\u529f ###### "),t.addTopicMethod()},fail:function(){console.log("\u5931\u8d25")},nofit:function(){}})}else this.addTopicMethod()},e.prototype.addTopicMethod=function(){this.requestData(),this.node.active=!1,this.popData&&this.popData.chooseCallback&&this.popData.chooseCallback()},e.prototype.requestData=function(){var t={type:this.topicType};console.log("\u52a0\u5165\u8bdd\u9898\u53c2\u6570 = ",t),r.default.joinTopic(t,function(){console.log("\u52a0\u5165\u8bdd\u9898\u6210\u529f ######")})},e.prototype.giveupBtnFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){this.node.active=!0,this.popData=t,this.topicType=0,this.yellowBtn.active=!0,this.redBtn.active=!0;var e=h.default.todayIsWin();if(this.chooseVideo.active=1!=e,s.default.isPlatform(s.GDPlatform.wx)&&c.default.changeSpriteFrame(this.chooseVideo,"rewardIcon/reward_share_white.png"),h.default.topicModel&&h.default.topicModel.name){var o=h.default.topicModel.name.split("#");o.length>=2&&(this.tombName.string=o[0],this.taoistName.string=o[1]);var n=h.default.getTopicAnimation(h.default.topicModel.id,!0,!1);this.playTomb(n.spName,n.skin,"Jump1");var a=h.default.getTopicAnimation(h.default.topicModel.id,!1,!0);this.playTaoist(a.spName,a.skin,"Jump1")}this.yellowNode.getChildByName("choose").active=!1,this.redNode.getChildByName("choose").active=!1,this.yellowBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FFFFFF"),this.redBtn.getChildByName("name").color=(new cc.Color).fromHEX("#FFFFFF"),this.noChooseBtn.active=!1,this.chooseLabel.string="\u52a0\u5165\u5bf9\u6297",cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),0==t.type?(this.chooseBtn.active=!0,this.giveupBtn.active=!0,this.yellowBtn.getChildByName("name").getComponent(cc.Label).string="\u9009\u62e9",this.redBtn.getChildByName("name").getComponent(cc.Label).string="\u9009\u62e9",this.titleNode.getComponent(cc.Label).string="\u9009\u62e9\u7f8a\u961f"):1==t.type&&(this.chooseBtn.active=!1,this.giveupBtn.active=!1,this.titleNode.getComponent(cc.Label).string="\u4eca\u65e5\u8bdd\u9898",h.default.topicModel&&h.default.topicModel.info&&(1==h.default.topicModel.info.type?this.exchangeUI(!0,!0):this.exchangeUI(!1,!0))),this.updateTimeFunc()},e.prototype.playTomb=function(t,e,o){var n=this;this.tombSP.getComponent(p.default).loadSpine(t,function(){n.tombSP.getComponent(p.default).setNewSkin(e),n.tombSP.getComponent(p.default).play(o,0)})},e.prototype.playTaoist=function(t,e,o){var n=this;this.taoistSP.getComponent(p.default).loadSpine(t,function(){n.taoistSP.getComponent(p.default).setNewSkin(e),n.taoistSP.getComponent(p.default).play(o,0)})},e.prototype.update=function(t){this.updateTime+=t,this.updateTime>=1&&(this.updateTime=0,this.updateTimeFunc())},e.prototype.updateTimeFunc=function(){var t=f.default.format(l.CALENDARNAMES[8],new Date).split(" ");if(!(t.length<2)){var e=t[1].split(":");if(!(e.length<3)){var o=3600*(24-Number(e[0])-1)+60*(60-Number(e[1])-1)+(60-Number(e[2]));if(this.timeNode.activeInHierarchy){var n=d.default.formatTime(1e3*o),a=(n[1]<10?"0"+n[1]:n[1])+" \u5c0f\u65f6 "+(n[2]<10?"0"+n[2]:n[2])+" \u5206 "+(n[3]<10?"0"+n[3]:n[3])+" \u79d2";this.timeLabel.string=a}}}},i([y({type:cc.Node,tooltip:"\u5f39\u6846"})],e.prototype,"popNode",void 0),i([y({type:cc.Node,tooltip:"\u6807\u9898"})],e.prototype,"titleNode",void 0),i([y({type:cc.Node,tooltip:"\u5173\u95ed\u6309\u94ae"})],e.prototype,"closeBtn",void 0),i([y({type:cc.Node,tooltip:"\u7f8abase"})],e.prototype,"yellowNode",void 0),i([y({type:cc.Node,tooltip:"\u7f8abase"})],e.prototype,"redNode",void 0),i([y({type:cc.Node,tooltip:"\u9009\u62e9"})],e.prototype,"yellowBtn",void 0),i([y({type:cc.Node,tooltip:"\u9009\u62e9"})],e.prototype,"redBtn",void 0),i([y({type:cc.Node,tooltip:"\u5269\u4f59\u65f6\u95f4"})],e.prototype,"timeNode",void 0),i([y({type:cc.Node,tooltip:"\u9009\u62e9"})],e.prototype,"chooseBtn",void 0),i([y({type:cc.Node,tooltip:"\u89c6\u9891"})],e.prototype,"chooseVideo",void 0),i([y({type:cc.Label,tooltip:"\u63cf\u8ff0"})],e.prototype,"chooseLabel",void 0),i([y({type:cc.Node,tooltip:"\u672a\u9009\u62e9"})],e.prototype,"noChooseBtn",void 0),i([y({type:cc.Node,tooltip:"\u653e\u5f03"})],e.prototype,"giveupBtn",void 0),i([y({type:cc.Label,tooltip:"\u9635\u8425\u540d\u5b57"})],e.prototype,"tombName",void 0),i([y({type:cc.Label,tooltip:"\u9635\u8425\u540d\u5b57"})],e.prototype,"taoistName",void 0),i([y({type:cc.Node,tooltip:"\u9635\u8425\u52a8\u753b"})],e.prototype,"tombSP",void 0),i([y({type:cc.Node,tooltip:"\u9635\u8425\u52a8\u753b"})],e.prototype,"taoistSP",void 0),i([y({type:cc.Label,tooltip:"\u5012\u8ba1\u65f6"})],e.prototype,"timeLabel",void 0),i([g],e)}(cc.Component);o.default=v,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/sdk":"sdk","../common/spine":"spine","../common/util":"util","../manager/DateManager":"DateManager","../manager/data-manager":"data-manager"}],topicCollectPop:[function(t,e,o){"use strict";cc._RF.push(e,"9626bbOFCpLgLU2U6ganUyA","topicCollectPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},r=this&&this.__spreadArrays||function(){for(var t=0,e=0,o=arguments.length;e0){for(var e in t)this.clothesId==t[e].clothesId?(t[e].dressing=!0,this.popData&&this.popData.changeClothesCb&&this.popData.changeClothesCb(this.clothesId)):t[e].dressing=!1;s.default.setSheepClothesData(t),this.setupSubViews(this.curIdx)}},e.prototype.subCloseBtnFunc=function(){this.subPop.active=!1},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.previousBtnFunc=function(){this.curIdx--,this.curIdx<1&&(this.curIdx=1),this.setupSubViews(this.curIdx)},e.prototype.sureBtnFunc=function(){this.node.active=!1},e.prototype.nextBtnFunc=function(){this.curIdx++,this.curIdx>this.allIdx&&(this.curIdx=this.allIdx),this.setupSubViews(this.curIdx)},e.prototype.showPop=function(t){this.node.active=!0,this.popData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.sheepCommonNode.active=!1,this.dressingNode.active=!1,this.subPop.active=!1,this.setupSubViews(this.curIdx)},e.prototype.setupSubViews=function(t){for(var e in t<1&&(t=1),this.dataArray)(a=this.dataArray[e]).destroy();for(var e in this.labelArray)(a=this.labelArray[e]).destroy();this.dataArray=[],this.labelArray=[];var o=s.default.getSheepClothesData();o=this.bubbleSort(o),o=this.bubbleIdSort(o),this.allIdx=Math.ceil(o.length/12),this.indexLabel.string=this.curIdx+" / "+this.allIdx;for(var n=0;n=12*(t-1)&&n<12*t){var a,i=o[n];(a=cc.instantiate(this.sheepCommonNode)).active=!0,this.sheepCommonBaseNode.addChild(a),this.dataArray.push(a);var r=cc.instantiate(this.dressingNode);r.active=!0,this.dressingBaseNode.addChild(r),this.labelArray.push(r),c.default.addbtnTouchEndScale(a,this.itemBtnFunc.bind(this,i)),this.updateItem(a,r,i)}},e.prototype.itemBtnFunc=function(t){var e=this;console.log(t),this.clothesId=t.clothesId,this.subPop.active=!0,cc.tween(this.subPop).set({scale:.8,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start();var o="sheep/"+t.spName;this.subSheep.getComponent(l.default).loadSpine(o,function(){e.subSheep.getComponent(l.default).setNewSkin(t.spSkin),t.unlock?e.subSheep.getComponent(l.default).play("Jump1",0):e.subSheep.getComponent(l.default).play("Unlock1",0)}),t.unlock?(this.luckBtn.active=!1,this.changeBtn.active=!0,this.titleLabel.string=t.name):(this.luckBtn.active=!0,this.changeBtn.active=!1,this.titleLabel.string="???"),this.contentTeam.string=this.getName(t.clothesId),this.contentDesc.string="\u5728\u8bdd\u9898\u6218 \u4e2d\uff0c\u52a0\u5165"+t.name+"\u9635\u8425\u5e76\u83b7\u80dc\u540e\u83b7\u5f97\u3002"},e.prototype.getName=function(t){return this.contentDesc.node.active=!0,this.contentTeam.node.active=!0,this.contentDefault.node.active=!1,8==t||9==t?"\u50f5\u5c38vs\u9053\u58eb":10==t||11==t?"\u72fc\u4ebavs\u5438\u8840\u9b3c":12==t||13==t?"\u9ed1\u7f8avs\u767d\u7f8a":41==t||42==t?"\u4e94\u4ec1vs\u83b2\u84c9":43==t||44==t?"\u5b66\u751fvs\u8001\u5e08":45==t||46==t?"\u5ae6\u5a25vs\u7389\u5154":47==t||48==t?"\u5b66\u7ae5vs\u592b\u5b50":(this.contentDesc.node.active=!1,this.contentTeam.node.active=!1,this.contentDefault.node.active=!0,this.contentDefault.string=1==t?"\u9ed8\u8ba4\u88c5\u626e\u3002\u6211\u53ea\u662f\u4e00\u53ea\u5b64\u72ec\u7684\u7f8e\u7f8a\u7f8a\u3002":"\u5e38\u89c4\u6a21\u5f0f\u901a\u5173\uff0c\u6216\u8bdd\u9898PK\u4e2d\u6240\u9009\u9635\u8425\u83b7\u80dc\u540e\u83b7\u5f97\u3002","")},e.prototype.bubbleSort=function(t){for(var e,o=r(t),n=0,a=o.length;no[i+1].clothesId&&(e=[o[i+1],o[i]],o[i]=e[0],o[i+1]=e[1]);return o},e.prototype.updateItem=function(t,e,o){var n=t.getChildByName("new"),a=t.getChildByName("SP"),i=t.getChildByName("choose");e.opacity=0,this.popData&&this.popData.topicClothesNum==o.clothesId?n.active=!0:n.active=!1;var r="sheep/"+o.spName;a.getComponent(l.default).loadSpine(r,function(){a.getComponent(l.default).setNewSkin(o.spSkin),o.unlock?o.dressing?(i.active=!0,e.opacity=255,a.getComponent(l.default).play("Jump1",0)):i.active=!1:(a.getComponent(l.default).play("Unlock1",0),i.active=!1)})},i([d(cc.Node)],e.prototype,"popNode",void 0),i([d(cc.Node)],e.prototype,"closeBtn",void 0),i([d(cc.Node)],e.prototype,"sheepCommonBaseNode",void 0),i([d(cc.Node)],e.prototype,"sheepCommonNode",void 0),i([d(cc.Node)],e.prototype,"dressingBaseNode",void 0),i([d(cc.Node)],e.prototype,"dressingNode",void 0),i([d(cc.Node)],e.prototype,"previousBtn",void 0),i([d(cc.Node)],e.prototype,"sureBtn",void 0),i([d(cc.Node)],e.prototype,"nextBtn",void 0),i([d(cc.Label)],e.prototype,"indexLabel",void 0),i([d(cc.Node)],e.prototype,"subPop",void 0),i([d(cc.Node)],e.prototype,"subSheep",void 0),i([d(cc.Label)],e.prototype,"titleLabel",void 0),i([d(cc.Label)],e.prototype,"contentDesc",void 0),i([d(cc.Label)],e.prototype,"contentTeam",void 0),i([d(cc.Label)],e.prototype,"contentDefault",void 0),i([d(cc.Node)],e.prototype,"luckBtn",void 0),i([d(cc.Node)],e.prototype,"changeBtn",void 0),i([d(cc.Node)],e.prototype,"subCloseBtn",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/spine":"spine"}],topicJoinedPop:[function(t,e,o){"use strict";cc._RF.push(e,"90ef543uIxHfKnKA811WqDS","topicJoinedPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/spine"),u=t("../manager/data-manager"),p=cc._decorator,d=p.ccclass,h=p.property,f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.titleLabel=null,e.tombNode=null,e.taoistNode=null,e.tombLabel=null,e.taoistLabel=null,e.teamLabel=null,e.closeBtn=null,e.sureBtn=null,e.tombSP=null,e.taoistSP=null,e}return a(e,t),e.prototype.start=function(){c.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this)),c.default.addTargetTouchUpInside(this.sureBtn,this.sureBtnBtn.bind(this))},e.prototype.closeBtnFunc=function(){this.node.active=!1},e.prototype.sureBtnBtn=function(){this.node.active=!1},e.prototype.showPop=function(){var t=this;this.node.active=!0,this.tombNode.active=!1,this.taoistNode.active=!1,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),this.updateUI(0);var e=u.default.getTopicAnimation(u.default.topicModel.id,!0,!1);this.playTomb(e.spName,e.skin,"Jump1");var o=u.default.getTopicAnimation(u.default.topicModel.id,!1,!0);this.playTaoist(o.spName,o.skin,"Jump1"),r.default.getTopicUserInfo(s.default.getUserData().userID,function(e){if(0==e.err_code&&e.data&&e.data.user){var o=e.data.user.type;1==o?t.tombNode.active=!0:2==o&&(t.taoistNode.active=!0),t.updateUI(o)}})},e.prototype.updateUI=function(t){var e=u.default.topicModel.name.split("#");e.length<2||(this.tombLabel.string=e[0]+"\u7f8a",this.taoistLabel.string=e[1]+"\u7f8a",this.teamLabel.string="",1==t?this.teamLabel.string=e[0]+"\u7f8a\u961f":2==t&&(this.teamLabel.string=e[1]+"\u7f8a\u961f"))},e.prototype.playTomb=function(t,e,o){var n=this;this.tombSP.getComponent(l.default).loadSpine(t,function(){n.tombSP.getComponent(l.default).setNewSkin(e),n.tombSP.getComponent(l.default).play(o,0)})},e.prototype.playTaoist=function(t,e,o){var n=this;this.taoistSP.getComponent(l.default).loadSpine(t,function(){n.taoistSP.getComponent(l.default).setNewSkin(e),n.taoistSP.getComponent(l.default).play(o,0)})},i([h(cc.Node)],e.prototype,"popNode",void 0),i([h(cc.Label)],e.prototype,"titleLabel",void 0),i([h(cc.Node)],e.prototype,"tombNode",void 0),i([h(cc.Node)],e.prototype,"taoistNode",void 0),i([h(cc.Label)],e.prototype,"tombLabel",void 0),i([h(cc.Label)],e.prototype,"taoistLabel",void 0),i([h(cc.Label)],e.prototype,"teamLabel",void 0),i([h(cc.Node)],e.prototype,"closeBtn",void 0),i([h(cc.Node)],e.prototype,"sureBtn",void 0),i([h(cc.Node)],e.prototype,"tombSP",void 0),i([h(cc.Node)],e.prototype,"taoistSP",void 0),i([d],e)}(cc.Component);o.default=f,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/spine":"spine","../manager/data-manager":"data-manager"}],topicLastWinPop:[function(t,e,o){"use strict";cc._RF.push(e,"74b18J+qNBMbqeSpfyEZqtg","topicLastWinPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/spine"),s=t("../manager/data-manager"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.popNode=null,e.closeBtn=null,e.tombSign=null,e.taoistSign=null,e.tombNode=null,e.taoistNode=null,e.nameLabel=null,e.tombLabel=null,e.taoistLabel=null,e.tombNumLabel=null,e.taoistNumLabel=null,e.bottomNumLabel=null,e.tombProgress=null,e.taoistProgress=null,e.tombSP=null,e.taoistSP=null,e.popData=null,e.teamIsWIn=!1,e}return a(e,t),e.prototype.start=function(){r.default.addTargetTouchUpInside(this.closeBtn,this.closeBtnFunc.bind(this))},e.prototype.closeBtnFunc=function(){if(this.node.active=!1,this.teamIsWIn){var t={popName:"topicNewPop",showPopData:{type:1,data:this.popData}};cc.game.emit("showPop",t)}},e.prototype.showPop=function(t){this.node.active=!0,this.popData=t,cc.tween(this.popNode).set({scale:0,opacity:0}).to(.2,{scale:1.1,opacity:255},{easing:cc.easing.quadOut}).to(.2,{scale:1}).start(),t&&this.setupData(t)},e.prototype.setupData=function(t){var e=t.tomb,o=t.taoist,n=t.tomb_fail_member,a=t.taoist_fail_member,i=e.length,r=o.length,c=t.topic.name.split("#"),l=i+r+n+a,u=i+r,p=0,d=0;i==r?this.nameLabel.string="\u8d5b\u51b5":i>r?(1==t.topic.info.type&&(this.teamIsWIn=!0),this.tombSign.active=!0,this.taoistSign.active=!1,this.nameLabel.string=c[0]+"\u7f8a\u961f\u83b7\u80dc\uff01"):(2==t.topic.info.type&&(this.teamIsWIn=!0),this.tombSign.active=!1,this.taoistSign.active=!0,this.nameLabel.string=c[1]+"\u7f8a\u961f\u83b7\u80dc\uff01"),0!=u&&(p=i/u*300,d=r/u*300),p<50&&(p=50),d<50&&(d=50),cc.tween(this.tombProgress).to(0,{height:50}).to(1.5,{height:p}).start(),cc.tween(this.taoistProgress).to(0,{height:50}).to(1.5,{height:d}).start(),this.tombNumLabel.string=i+"\u7f8a",this.taoistNumLabel.string=r+"\u7f8a",this.tombLabel.string=c[0]+"\u7f8a\u961f",this.taoistLabel.string=c[1]+"\u7f8a\u961f",this.bottomNumLabel.string=l+"",1==t.topic.info.type?(this.tombNode.active=!0,this.taoistNode.active=!1):(this.tombNode.active=!1,this.taoistNode.active=!0);var h=s.default.getTopicAnimation(t.topic.id,!0,!1);this.playTomb(h.spName,h.skin,"Jump3");var f=s.default.getTopicAnimation(t.topic.id,!1,!0);this.playTaoist(f.spName,f.skin,"Jump3")},e.prototype.playTomb=function(t,e,o){var n=this;this.tombSP.getComponent(c.default).loadSpine(t,function(){n.tombSP.getComponent(c.default).setNewSkin(e),n.tombSP.getComponent(c.default).play(o,0)})},e.prototype.playTaoist=function(t,e,o){var n=this;this.taoistSP.getComponent(c.default).loadSpine(t,function(){n.taoistSP.getComponent(c.default).setNewSkin(e),n.taoistSP.getComponent(c.default).play(o,0)})},i([p({type:cc.Node,tooltip:"\u5f39\u6846"})],e.prototype,"popNode",void 0),i([p({type:cc.Node,tooltip:"\u5173\u95ed\u6309\u94ae"})],e.prototype,"closeBtn",void 0),i([p(cc.Node)],e.prototype,"tombSign",void 0),i([p(cc.Node)],e.prototype,"taoistSign",void 0),i([p(cc.Node)],e.prototype,"tombNode",void 0),i([p(cc.Node)],e.prototype,"taoistNode",void 0),i([p({type:cc.Label,tooltip:"\u7f8a\u961f"})],e.prototype,"nameLabel",void 0),i([p({type:cc.Label,tooltip:"\u50f5\u5c38"})],e.prototype,"tombLabel",void 0),i([p({type:cc.Label,tooltip:"\u9053\u58eb"})],e.prototype,"taoistLabel",void 0),i([p({type:cc.Label,tooltip:"\u50f5\u5c38\u6570\u91cf"})],e.prototype,"tombNumLabel",void 0),i([p({type:cc.Label,tooltip:"\u9053\u58eb\u6570\u91cf"})],e.prototype,"taoistNumLabel",void 0),i([p({type:cc.Label,tooltip:"\u603b\u4eba\u6570"})],e.prototype,"bottomNumLabel",void 0),i([p(cc.Node)],e.prototype,"tombProgress",void 0),i([p(cc.Node)],e.prototype,"taoistProgress",void 0),i([p(cc.Node)],e.prototype,"tombSP",void 0),i([p(cc.Node)],e.prototype,"taoistSP",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/spine":"spine","../manager/data-manager":"data-manager"}],topicNewPop:[function(t,e,o){"use strict";cc._RF.push(e,"9383fTm8p9NuLEys6rFPQBI","topicNewPop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/spine"),l=t("../manager/GameManager"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskNode=null,e.popNode=null,e.nameLabel=null,e.bgFlashSP=null,e.sheepSP=null,e.winLabel=null,e.descLabel=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.maskNode,this.maskNodeFunc.bind(this))},e.prototype.maskNodeFunc=function(){this.node.active=!1},e.prototype.showPop=function(t){var e=this;this.node.active=!0,cc.tween(this.bgFlashSP).to(0,{scale:0}).to(.1,{scale:1}).call(function(){e.bgFlashSP.getComponent(s.default).loadSpine("sheep/UI",function(){e.bgFlashSP.getComponent(s.default).play("4Ray2",0)})}).start(),1==t.type?this.receiveSheepClothes():2==t.type&&this.showSheep(t.data)},e.prototype.showSheep=function(t){var e=this;cc.tween(this.sheepSP).to(0,{scale:0}).to(.2,{scale:1}).call(function(){e.sheepSP.getComponent(s.default).loadSpine("sheep/"+t.spName,function(){e.sheepSP.getComponent(s.default).setNewSkin(t.spSkin),e.sheepSP.getComponent(s.default).play("Jump1",0)})}).start(),this.nameLabel.string=t.name,this.winLabel.string="",this.descLabel.string=""},e.prototype.receiveSheepClothes=function(){var t=this,e=c.default.getSheepClothesData(),o=!1,n="skin_00",a="\u7f8a";e=r.default.shuffle(e);for(var i=0;i=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/enumConfig"),c=t("../common/native/audio"),s=t("../common/spine"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sheepSp=null,e.playing=!1,e.animCallBack=null,e}return a(e,t),e.prototype.start=function(){cc.game.on(r.EMITKEY.SHOWTRANSITLAYER,this.playTransitionLayerAnim,this)},e.prototype.playTransitionLayerAnim=function(t){if(!this.playing){var e=this;this.playing=!0,this.animCallBack=t,this.sheepSp.active=!0,c.default.playAudioMusic("audio/sound/transitFont.mp3",!1),this.sheepSp.getComponent(s.default).setFrameEventCb("Turnarounds",function(t){console.log("\u4e13\u573a\u52a8\u753b ### ",t),e.animCallBack(e.playAnimOpen.bind(e))}),this.sheepSp.getComponent(s.default).play("Interlude",1,function(){e.playing=!1,e.sheepSp.active=!1,console.log("\u4e13\u573a\u52a8\u753b end ###")})}},e.prototype.playAnimOpen=function(){console.log("\u8f6c\u573a\u52a8\u753b\u5207\u6362 ### ")},i([p(cc.Node)],e.prototype,"sheepSp",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/enumConfig":"enumConfig","../common/native/audio":"audio","../common/spine":"spine"}],"tt-sdk":[function(t,e,o){"use strict";cc._RF.push(e,"0d66ayRO/dGya2ZzHsK5JHr","tt-sdk"),Object.defineProperty(o,"__esModule",{value:!0});var n=function(){function t(){}return t.init=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&tt.showShareMenu({success:function(){console.log("[tt] \u5df2\u6210\u529f\u663e\u793a\u8f6c\u53d1\u6309\u94ae")},fail:function(t){console.log("[tt] showShareMenu \u8c03\u7528\u5931\u8d25",t.errMsg)},complete:function(){console.log("[tt] showShareMenu \u8c03\u7528\u5b8c\u6210")}})},t.vibrateShort=function(){tt.vibrateShort({})},t.vibrateLong=function(){tt.vibrateLong({})},t.login=function(){tt.login({success:function(t){console.log("[tt] \u767b\u5f55\u6210\u529f",t)},fail:function(t){console.log("[tt] \u767b\u5f55\u5931\u8d25",t)}})},t.checkSession=function(){tt.checkSession({success:function(){console.log("[tt] session \u672a\u8fc7\u671f")},fail:function(){console.log("[tt] session \u5df2\u8fc7\u671f\uff0c\u9700\u8981\u91cd\u65b0\u767b\u5f55"),this.login()}})},t.getSetting=function(){tt.checkSession({success:function(t){console.log("[tt] -------------getSetting \u83b7\u53d6\u7528\u6237\u5f53\u524d\u7684\u6388\u6743\u72b6\u6001\u6210\u529f-----------",t),t.errMsg},fail:function(t){console.log("[tt] -------------getSetting \u83b7\u53d6\u7528\u6237\u5f53\u524d\u7684\u6388\u6743\u72b6\u6001\u5931\u8d25-----------",t)}})},t.openSetting=function(){tt.openSetting({success:function(t){console.log("[tt] -------------openSetting success-----------",t)},complete:function(t){console.log("[tt] -------------openSetting complete-----------",t)},fail:function(t){console.log("[tt] -------------openSetting fail-----------",t)}})},t.authorize=function(){tt.authorize({scope:"scope.userInfo",success:function(t){console.log("[tt] authorize success",t)},complete:function(t){console.log("[tt] authorize complete",t)},fail:function(t){console.log("[tt] authorize fail",t)}})},t.recorderStart=function(){if(cc.sys.platform==cc.sys.BYTEDANCE_GAME)try{console.log("\u5f00\u59cb\u5f55\u5c4f ###### "),tt.getGameRecorderManager().start({duration:300})}catch(t){cc.warn(t)}},t.recorderStop=function(){if(cc.sys.platform==cc.sys.BYTEDANCE_GAME){console.log("\u5f55\u5c4f\u7ed3\u675fstop ###### ");try{tt.getGameRecorderManager().stop()}catch(t){cc.warn(t)}}},t.recorderPause=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(console.log("\u5f55\u5c4f\u7ed3\u675fpause ###### "),tt.getGameRecorderManager().pause())},t.recorderResume=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&(console.log("\u5f55\u5c4f\u7ed3\u675fresume ###### "),tt.getGameRecorderManager().resume())},t.setVideoPath=function(t){this.videoPath=t},t.shareTemplate=function(t){cc.sys.platform==cc.sys.BYTEDANCE_GAME?tt.shareAppMessage({templateId:"gf33jlfc0h1k415a7o",query:"",success:function(){console.log("\u5206\u4eab\u6210\u529f"),t(!0)},fail:function(){console.log("\u5206\u4eab\u5931\u8d25"),t(!1)}}):t(!0)},t.shareAppMessage=function(t){var e=t.success,o=t.fail,n=t.url;console.log("[tt] [sdk][tt] share app message",n),n||(n=this.videoPath);try{tt.shareAppMessage({channel:"video",query:"",templateId:"",title:"\u7f8a\u4e86\u4e2a\u7f8a",desc:"\u770b\u770b\u5927\u5bb6\u90fd\u559c\u6b22\u4ec0\u4e48\u7f8a",extra:{videoPath:n,videoTopics:["\u7f8a\u4e86\u4e2a\u7f8a"]},success:function(){e&&e(),console.log("[tt] \u5206\u4eab\u89c6\u9891\u6210\u529f")},fail:function(t){o&&o(),console.log("[tt] \u5206\u4eab\u89c6\u9891\u5931\u8d25",t)}})}catch(a){cc.warn("share app message err",a)}},t.rewardVideoAd=function(t){var e=this;this.onRewardVideoAdSuccess=t.success,this.onRewardVideoAdFail=t.fail,this.rewardAd?this.rewardAd.show():(this.rewardAd=tt.createRewardedVideoAd({adUnitId:t.id}),this.rewardAd.onLoad(function(){e.rewardAd.show()}),this.rewardAd.onError(function(t){e.onRewardVideoAdFail&&e.onRewardVideoAdFail(),cc.warn("tt reward video ad error",t)}),this.rewardAd.onClose(function(t){t.isEnded&&e.onRewardVideoAdSuccess&&e.onRewardVideoAdSuccess(),e.onRewardVideoAdFail&&e.onRewardVideoAdFail()}))},t.setClipboardData=function(t){tt.setClipboardData({data:t,success:function(){tt.getClipboardData({success:function(t){console.log("tt get clipboard data:",t.data)}})}})},t.showBannerAd=function(t){var e=this;this.onRewardBannerAdSuccess=t.success,this.onRewardBannerAdFail=t.fail,this.bannerAd?this.bannerAd.show():(this.bannerAd=tt.createBannerAd({adUnitId:t.id,adIntervals:30,style:{left:0,top:cc.winSize.height,width:300}}),this.bannerAd.onLoad(function(){e.bannerAd.show()}),this.bannerAd.onError(function(t){e.onRewardBannerAdFail&&e.onRewardBannerAdFail(),cc.warn("tt reward video ad error",t)}))},t.hideBannerAd=function(){this.bannerAd&&this.bannerAd.hide()},t.showInterstitialAd=function(){},t.showRewardVideoAd=function(){},t.focusDouYin=function(){cc.sys.platform==cc.sys.BYTEDANCE_GAME&&tt.openAwemeUserProfile({success:function(t){console.log(t)}})},t.isSupportFocusDouYin=function(){if(cc.sys.platform!=cc.sys.BYTEDANCE_GAME)return!1;for(var t=tt.getSystemInfoSync(),e=t.system,o=t.SDKVersion,n=t.version,a=t.appName,i=(e.split(" "),n.split(".")),r=0;r-1&&t.listeners.splice(o,1)},this.emit=function(e){if(t.listeners.forEach(function(t){return t(e)}),t.listenersOncer.length>0){var o=t.listenersOncer;t.listenersOncer=[],o.forEach(function(t){return t(e)})}},this.pipe=function(e){return t.on(function(t){return e.emit(t)})}},cc._RF.pop()},{}],uiControler:[function(t,e,o){"use strict";cc._RF.push(e,"81349GiDV5P+4W7p0Ox2i/o","uiControler");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("./mapEditor"),c=t("./newLevelPop"),s=t("./selectLevelPop"),l=t("./setBlockNumPop"),u=t("../common/config"),p=t("../common/dataTs"),d=t("./editorGameLayer"),h=t("./saveAsPop"),f=cc._decorator,m=f.ccclass,g=f.property,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mapEditorNode=null,e.setBlockNumPop=null,e.selectLevelPop=null,e.newLevelPop=null,e.saveAsPop=null,e.editorGameLayer=null,e.levelNumLabel=null,e.blockNumLabel=null,e}return a(e,t),e.prototype.onLoad=function(){},e.prototype.start=function(){cc.game.on("initLevelData",this.initLevelData,this),cc.game.on("setBlockNum",this.showBlockNum,this),cc.game.on("saveAsNewMap",this.saveAsNewMap,this)},e.prototype.selectLevelFun=function(){console.log("\u7f16\u8f91\u5173\u5361"),this.selectLevelPop.getComponent(s.default).showSelectLevelPop()},e.prototype.newLevelFun=function(){console.log("\u65b0\u5efa\u5173\u5361"),this.newLevelPop.getComponent(c.default).showNewLevelPop()},e.prototype.chooseMapSizeFun=function(t,e){cc.game.emit("refreshMapSizeData",u.default.mapType[e])},e.prototype.saveAsShowLayer=function(){console.log("\u53e6\u5b58\u4e3a\u5173\u5361"),this.saveAsPop.getComponent(h.default).showSaveAsPop()},e.prototype.saveLevelMapFun=function(){console.log("\u4fdd\u5b58\u5173\u5361");var t=this.mapEditorNode.getComponent(r.default).levelID,e=this.mapEditorNode.getComponent(r.default).newLevelDataObj;this.checkMapIsRight(e)?p.default.setLevelMapData(t,e):console.log("\u5173\u5361\u914d\u7f6e\u9519\u8bef")},e.prototype.checkMapIsRight=function(t){var e=0,o=0,n=t,a=n.levelData;for(var i in a)for(var r in a[i])0==a[i][r].type?e++:o++;if(console.log("blockNum:",e),console.log("blockTypeNum:",o),e%3!=0)return console.log("\u7a7a\u767d\u5757\u4e0d\u662f3\u7684\u500d\u6570"),cc.game.emit("showTips","\u7a7a\u767d\u5757\u4e0d\u662f3\u7684\u500d\u6570"),!1;if(o%3!=0)return console.log("\u7c7b\u578b\u5757\u4e0d\u662f3\u7684\u500d\u6570"),cc.game.emit("showTips","\u7c7b\u578b\u5757\u4e0d\u662f3\u7684\u500d\u6570"),!1;var c=n.blockTypeData,s=0;for(var i in c)s+=c[i];return console.log("typeNum:",s),s==e/3||(console.log("\u5757\u7c7b\u578b\u8bbe\u7f6e\u6570\u91cf\u9519\u8bef"),cc.game.emit("showTips","\u5757\u7c7b\u578b\u8bbe\u7f6e\u6570\u91cf\u9519\u8bef"),!1)},e.prototype.saveAsNewMap=function(t){var e=this.mapEditorNode.getComponent(r.default).newLevelDataObj;e.levelKey=t,p.default.setLevelMapData(t,e);var o={newLevelData:e};cc.game.emit("initLevelData",o)},e.prototype.setBlockTypeFun=function(){console.log("\u8bbe\u7f6e\u672c\u5173\u7684\u56fe\u5757\u7c7b\u578b\u6570\u91cf");var t=0,e=this.mapEditorNode.getComponent(r.default).newLevelDataObj,o=e.levelData;for(var n in o)for(var a in o[n])0==o[n][a].type&&t++;var i=e.blockTypeData;t%3==0?this.setBlockNumPop.getComponent(l.default).showSetBlockPop(t/3,i):(console.log("error:\u5757\u6570\u91cf\u4e0d\u80fd\u88ab\u6574\u9664"),cc.game.emit("showTips","error:\u5757\u6570\u91cf\u4e0d\u80fd\u88ab\u6574\u9664"),this.setBlockNumPop.getComponent(l.default).showSetBlockPop(0,i))},e.prototype.selectNewBlockTypeFun=function(){console.log("\u9009\u62e9\u5373\u5c06\u6446\u653e\u7684\u56fe\u5757\u7c7b\u578b")},e.prototype.testPlayFun=function(){console.log("\u8bd5\u73a9\u672c\u5173\u5361"),this.mapEditorNode.getComponent(r.default).levelID;var t=cc.instantiate(this.mapEditorNode.getComponent(r.default).newLevelDataObj);console.log("data:",t);var e=[t];this.editorGameLayer.getComponent(d.default).initLevelLayer(e)},e.prototype.backOffFun=function(){console.log("\u56de\u9000\u7ec4\u5757")},e.prototype.initLevelData=function(t){this.levelNumLabel.string="\u5f53\u524d\u5173\u5361ID\uff1a"+t.newLevelData.levelKey},e.prototype.showBlockNum=function(){if(!this.mapEditorNode.getComponent(r.default).newLevelDataObj)return!1;var t=this.getAllBlockNum();this.blockNumLabel.string=""+t},e.prototype.getAllBlockNum=function(){var t=0,e=this.mapEditorNode.getComponent(r.default).newLevelDataObj.levelData;for(var o in e)t+=e[o].length;return t},i([g(cc.Node)],e.prototype,"mapEditorNode",void 0),i([g(cc.Node)],e.prototype,"setBlockNumPop",void 0),i([g(cc.Node)],e.prototype,"selectLevelPop",void 0),i([g(cc.Node)],e.prototype,"newLevelPop",void 0),i([g(cc.Node)],e.prototype,"saveAsPop",void 0),i([g(cc.Node)],e.prototype,"editorGameLayer",void 0),i([g(cc.Label)],e.prototype,"levelNumLabel",void 0),i([g(cc.Label)],e.prototype,"blockNumLabel",void 0),i([m],e)}(cc.Component);o.default=y,cc._RF.pop()},{"../common/config":"config","../common/dataTs":"dataTs","./editorGameLayer":"editorGameLayer","./mapEditor":"mapEditor","./newLevelPop":"newLevelPop","./saveAsPop":"saveAsPop","./selectLevelPop":"selectLevelPop","./setBlockNumPop":"setBlockNumPop"}],"uma-sdk":[function(t,e,o){"use strict";cc._RF.push(e,"31ca3gDt7FFSYn5bPlPkMAx","uma-sdk");var n=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var a=t("../../common/dataTs"),i=t("../../common/enumConfig"),r=t("../../common/sdk"),c=t("../../manager/DateManager"),s=cc._decorator,l=s.ccclass,u=(s.property,function(){function t(){}return t.setUserid=function(){r.default.isPlatform(r.Platform.wx)},t.trackEvent=function(t,e){void 0===e&&(e=null);var o=a.default.getUserData();e||(e={});var n=Number(a.default.getUserData().registerTime),s=c.default.format(i.CALENDARNAMES[6],new Date(n));e.time=s,e.c_time=Number(s),e.uid=o.userID;var l=JSON.stringify(e);e.data=l,r.default.isPlatform(r.Platform.wx)},n([l],t)}());o.default=u,cc._RF.pop()},{"../../common/dataTs":"dataTs","../../common/enumConfig":"enumConfig","../../common/sdk":"sdk","../../manager/DateManager":"DateManager"}],"unlock-build-pop":[function(t,e,o){"use strict";cc._RF.push(e,"23d5cnrWYpLtbx08aY5sAOq","unlock-build-pop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/native/audio"),l=t("../common/spine"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainCultivateLayer=null,e.flightNode=null,e.spriteNode=null,e.spineTitle=null,e.spineAnim=null,e.receiveBtn=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchStartScale(this.receiveBtn,this.receiveBtnFunc.bind(this)),r.default.addbtnTouchEndScale(this.receiveBtn,this.receiveBtnFunc.bind(this)),r.default.addbtnTouchCancelScale(this.receiveBtn,this.receiveBtnFunc.bind(this))},e.prototype.hideDefault=function(){this.flightNode.active=!1,this.spriteNode.active=!1,this.spineTitle.active=!1,this.spineAnim.active=!1,this.receiveBtn.active=!1},e.prototype.showGetRemoveProp=function(){this.node.active=!0,this.hideDefault(),this.playRemoveAnim()},e.prototype.playRemoveAnim=function(){var t=this,e=this;this.spineAnim.active=!0,this.spineAnim.getComponent(l.default).setFrameEventCb("Open1",function(){console.log("1"),s.default.playAudioMusic("audio/sound/Open2.mp3",!1)}),this.spineAnim.getComponent(l.default).setFrameEventCb("Eff_Sheen1",function(){e.spineTitle.active=!0,console.log("2"),s.default.playAudioMusic("audio/sound/Words2.mp3",!1),e.spineTitle.getComponent(l.default).play("Award1_Words1",1),t.spineAnim.getComponent(l.default).setFrameEventCb("Treasure1",function(){console.log("3"),e.flightNode.active=!0,t.spriteNode.active=!0,e.receiveBtn.active=!0,e.flightNode.scale=0,e.spriteNode.scale=0,e.receiveBtn.scale=0,cc.tween(e.flightNode).to(.3,{scale:.8}).call(function(){cc.tween(e.flightNode).by(5,{angle:360}).repeatForever().start()},e).start(),cc.tween(e.spriteNode).to(.1,{scale:1.4}).to(.1,{scale:1}).to(.1,{scale:1.2}).to(.1,{scale:1}).call(function(){cc.tween(e.receiveBtn).to(.1,{scale:1.3}).to(.1,{scale:1}).start()}).start()})}),this.spineAnim.getComponent(l.default).play("Ref1_Open3",1,function(){console.log("4")});var o=c.default.getUserData();o.prop_remove+=2,c.default.saveUserData(o)},e.prototype.receiveBtnFunc=function(){this.node.active=!1},i([d(cc.Node)],e.prototype,"mainCultivateLayer",void 0),i([d(cc.Node)],e.prototype,"flightNode",void 0),i([d(cc.Node)],e.prototype,"spriteNode",void 0),i([d(cc.Node)],e.prototype,"spineTitle",void 0),i([d(cc.Node)],e.prototype,"spineAnim",void 0),i([d(cc.Node)],e.prototype,"receiveBtn",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/native/audio":"audio","../common/spine":"spine"}],"unlock-build":[function(t,e,o){"use strict";cc._RF.push(e,"b4509jR79lK778pfI4KU2y8","unlock-build");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/dataTs"),c=t("../common/native/audio"),s=t("../common/spine"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.catContent=null,e.unlockBuildBtn=null,e.lightBg=null,e.ribbonNode=null,e.catNode=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.playCatAnimation=function(t){void 0===t&&(t=1);var e=this;this.hideDefault(),this.catContent.active=!0,e.catContent.scale=1;var o=r.default.getGameConfigData().baseConfigData.catClothesData["cat_"+t];o&&o.length&&(e.ribbonNode.getComponent(cc.Label).string=o[0].name),this.unlockBuildBtn.active=!0,e.unlockBuildBtn.getComponent(s.default).setFrameEventCb("Cat1",function(){console.log("Cat1 frame ######"),c.default.playAudioMusic("audio/sound/Open2.mp3",!1),e.lightBg.active=!0,e.ribbonNode.active=!0,e.catNode.active=!0,cc.tween(e.lightBg).by(5,{angle:360}).repeatForever().start(),e.catContent.scale=0,cc.tween(e.catContent).to(.1,{scale:1.1}).to(.1,{scale:1}).start(),e.setCatSpine(t),cc.tween(e.catContent).delay(2).to(.2,{scale:1.2}).to(.3,{scale:0},{easing:cc.easing.cubicIn}).call(function(){e.node.active=!1}).start()}),this.unlockBuildBtn.getComponent(s.default).play("3UnlockCat1",1,function(){console.log("3UnlockCat1 \u64ad\u653e\u5b8c\u6210")})},e.prototype.setCatSpine=function(t){var e=this,o="Model"+(t<10?"0"+t:t+"");this.catNode.getComponent(s.default).loadNewSpine(o,function(){e.catNode.getComponent(s.default).setNewSkin("00"),e.catNode.getComponent(s.default).play("2_Action1",1,function(){e.catNode.getComponent(s.default).play("1_Standby1",0)})})},e.prototype.hideDefault=function(){this.unlockBuildBtn.active=!1,this.lightBg.active=!1,this.ribbonNode.active=!1,this.catNode.active=!1},i([p(cc.Node)],e.prototype,"catContent",void 0),i([p(cc.Node)],e.prototype,"unlockBuildBtn",void 0),i([p(cc.Node)],e.prototype,"lightBg",void 0),i([p(cc.Node)],e.prototype,"ribbonNode",void 0),i([p(cc.Node)],e.prototype,"catNode",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/dataTs":"dataTs","../common/native/audio":"audio","../common/spine":"spine"}],"upgrade-tip":[function(t,e,o){"use strict";cc._RF.push(e,"fc6e6B31jVAnbLpM0OJ9CQp","upgrade-tip");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("./mainCultivateLayer"),l=cc._decorator,u=l.ccclass,p=l.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.iconFish=null,e.iconPoint=null,e.iconNode=null,e.fishNode=null,e.arrowNode=null,e.mainCultivateLayer=null,e.houseData=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchEndScale(this.iconPoint,this.iconPointEndFunc.bind(this)),r.default.addbtnTouchEndScale(this.iconFish,this.iconFishEndFunc.bind(this))},e.prototype.iconPointEndFunc=function(t){t.stopPropagation(),this.mainCultivateLayer&&this.mainCultivateLayer.getComponent(s.default).clickUpgradePoint(this)},e.prototype.iconFishEndFunc=function(t){t.stopPropagation(),this.mainCultivateLayer&&this.mainCultivateLayer.getComponent(s.default).clickUpgradeFish(this.houseData,this)},e.prototype.showPoint=function(t,e,o){void 0===t&&(t=this.houseData),void 0===e&&(e=this.mainCultivateLayer),void 0===o&&(o=!1),this.mainCultivateLayer=e,this.houseData=t,this.iconPoint.active=!0,this.iconFish.active=!1,this.fishNode.getComponent(cc.Label).string="x"+t.fish,c.default.getUserData().fish>=t.fish?this.arrowNode.active=!0:this.arrowNode.active=!1,o&&(this.iconPoint.scale=0,cc.tween(this.iconPoint).delay(.1).to(.5,{scale:1}).start());var n="rewardIcon/Unlock_Hammer.png";"cat"==t.buildType?(n="rewardIcon/Unlock_Cat.png",r.default.changeSpriteFrame(this.iconNode,n)):"skin"==t.buildType?(n="rewardIcon/Unlock_Clothing.png",r.default.changeSpriteFrame(this.iconNode,n)):1==t.buildid?(n="rewardIcon/Unlock_Brush.png",r.default.changeSpriteFrame(this.iconNode,n)):r.default.changeSpriteFrame(this.iconNode,n)},e.prototype.showFish=function(){console.log(JSON.stringify(this.houseData)),this.iconPoint.active=!1,this.iconFish.active=!0,this.iconFish.scale=0,cc.tween(this.iconFish).to(.3,{scale:1}).start()},e.prototype.show=function(){this.node.active=!0,this.iconPoint.active=!0,this.iconFish.active=!1,this.iconPoint.scale=0,cc.tween(this.iconPoint).delay(.1).to(.5,{scale:1}).start()},e.prototype.hide=function(){this.node.active=!1},i([p(cc.Node)],e.prototype,"iconFish",void 0),i([p(cc.Node)],e.prototype,"iconPoint",void 0),i([p(cc.Node)],e.prototype,"iconNode",void 0),i([p(cc.Node)],e.prototype,"fishNode",void 0),i([p(cc.Node)],e.prototype,"arrowNode",void 0),i([u],e)}(cc.Component);o.default=d,cc._RF.pop()},{"../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","./mainCultivateLayer":"mainCultivateLayer"}],upgradePop:[function(t,e,o){"use strict";cc._RF.push(e,"56493C1WJVBQJG8pH7F9E9g","upgradePop");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../common/CcJsFunc"),c=t("../common/dataTs"),s=t("../common/enumConfig"),l=t("../common/native/audio"),u=t("../common/spine"),p=t("../utils/uma/uma-sdk"),d=cc._decorator,h=d.ccclass,f=d.property,m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.coinNum=null,e.catNode=null,e.closeBtn=null,e.upgradeBtn=null,e.popNode=null,e.catId=0,e.clothId=0,e.callBack=null,e.popCallbackCollect=null,e}return a(e,t),e.prototype.start=function(){r.default.addbtnTouchStartScale(this.closeBtn),r.default.addbtnTouchEndScale(this.closeBtn,this.hideUpgradePop.bind(this)),r.default.addbtnTouchCancelScale(this.closeBtn),r.default.addbtnTouchStartScale(this.upgradeBtn),r.default.addbtnTouchEndScale(this.upgradeBtn,this.upgradeFunc.bind(this)),r.default.addbtnTouchCancelScale(this.upgradeBtn),this.popCallbackCollect={playGameCallBack:this.playGameFunc.bind(this)}},e.prototype.playGameFunc=function(){},e.prototype.showUpgradePop=function(t,e){this.node.active=!0,this.catId=t,this.callBack=e,c.default.getGameConfigData().baseConfigData.catClothesData;for(var o=c.default.getUserData().catClothesData["cat_"+this.catId],n=0;n=o&&e>=n&&t<=o+a&&e<=n+i?1:0},pointLength:function(t,e){var o=e.x-t.x,n=e.y-t.y;return o*o+n*n},join:function(t,e){void 0===e&&(e=",");var o=[],n=0;for(var a in t)o[n]=t[a],n++;return o.join(e)},concat:function(){var t={};for(var e in arguments)for(var o in arguments[e])t[o]=arguments[e][o];return t},toArray:function(t,e){var o=[];if(e)for(var n in t)o.push(n,t[n]);else for(var n in t)o.push(t[n]);return o},valueArray:function(t,e){var o=[];for(var n in t)o.push(t[n][e]);return o},getObjectLen:function(t){var e=0;for(var o in t)e++;return e},formatTime:function(t){var e=[0,0,0,0,0];return e[4]=t%1e3,e[3]=Math.floor(t/1e3),e[3]>=60&&(e[2]=Math.floor(e[3]/60),e[3]=e[3]%60,e[2]>=60&&(e[1]=Math.floor(e[2]/60),e[2]=e[2]%60,e[1]>=24&&(e[0]=Math.floor(e[1]/24),e[1]=e[1]%24))),e},countdownTime:function(t){var e=[0,0,0];return e[0]=Math.floor(t/3600),e[1]=Math.floor(t%3600/60),e[2]=Math.floor(t%60),e},getTime:function(t,e,o){var n="",a="",i=new Date(t);switch(1==o?(n+=i.getFullYear()+"/",n+=this.fixLength(i.getMonth()+1,2)+"/",n+=this.fixLength(i.getDate(),2)):2==o?(n+=i.getFullYear()+"-",n+=this.fixLength(i.getMonth()+1,2)+"-",n+=this.fixLength(i.getDate(),2)):(n+=i.getFullYear()+"\u5e74",n+=this.fixLength(i.getMonth()+1,2)+"\u6708",n+=this.fixLength(i.getDate(),2)+"\u65e5"),a+=this.fixLength(i.getHours(),2)+":",a+=this.fixLength(i.getMinutes(),2)+":",a+=this.fixLength(i.getSeconds(),2),e){case 1:return n;case 2:return n+" "+a;default:return a}},rnd:function(t,e){return null==e&&(t=0),t+Math.floor(Math.random()*(e-t+1))},rndArray:function(t){for(var e=t.concat(),o=[];e.length>0;)o.push(e.splice(this.rnd(e.length-1),1)[0]);return o},inArray:function(t,e){for(var o in e)if(t==e[o])return o;return-1},countArray:function(t,e,o){var n=0;for(var a in t)e==t[a]&&n++;return o&&(n=t.length-n),n},fixLength:function(t,e,o,n){for(t+="",arguments.length<3&&(o=0),arguments.length<4&&(n="0");t.lengthe&&(t=0==o?t.slice(-e):t.slice(0,e)),t},fixNumber:function(t,e,o){var n=Math.pow(10,e);return Math[o]?Math[o](t*n)/n:Math.round(t*n)/n},formatNumber:function(t,e,o){if(!isNaN(t)&&(arguments.length<2&&(e=1),arguments.length<3&&(o=-1),o>-1&&(t=parseFloat(t).toFixed(o)),1==e)){var n=t.toString().split("."),a=n[0],i="";for(void 0!==n[1]&&(i="."+n[1]),n=[];a.length>3;)n.unshift(a.slice(-3)),a=a.slice(0,a.length-3);a.length>0&&n.unshift(a),t=n.join()+i}return t},fixValue:function(t,e,o,n){return t=Math[n]?Math[n](t):Math.round(t),null!=e&&to&&(t=o),t},isInt:function(t,e,o){var n=parseInt(t);return n==t?null!=e&&no?0:1:0},unsignInt:function(t,e){return t<=0?0:Math[e]?Math[e](t):Math.round(t)},getKey:function(t,e){for(var o in t)if(t[o]==e)return o},getGrid:function(t,e,o,n){for(var a=[],i=0;i255?e+=2:e++;return e},simpleSplit:function(t,e){var o=[];return-1==t.indexOf(e)?(o[0]=t,o[1]=""):(o[0]=t.slice(0,t.indexOf(e)),o[1]=t.slice(t.indexOf(e)+1)),o},getSum:function(t){var e=0;for(var o in t)e+=t[o];return e},getAverage:function(t){var e=0,o=0;for(var n in t)e+=t[n],o++;return e/o},parseToObject:function(t,e,o,n){n=n||".";var a=e.split(n),i=a.pop(),r=t;for(var c in a)r=r[a[c]];return null!=o&&(r[i]=o),r[i]},multicall:function(t,e){var o=e;switch(o.length){case 0:t();break;case 1:t(o[0]);break;case 2:t(o[0],o[1]);break;case 3:t(o[0],o[1],o[2]);break;case 4:t(o[0],o[1],o[2],o[3]);break;case 5:t(o[0],o[1],o[2],o[3],o[4]);break;case 6:t(o[0],o[1],o[2],o[3],o[4],o[5]);break;case 7:t(o[0],o[1],o[2],o[3],o[4],o[5],o[6]);break;case 8:t(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7]);break;case 9:t(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8]);break;case 10:t(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9])}},getPointAlpha:function(t,e,o){var n=window.document.createElement("canvas"),a=n.getContext("2d");return n.width=1,n.height=1,a.drawImage(t,e,o,1,1,0,0,1,1),a.getImageData(0,0,1,1).data[3]},ajax:function(t,e,o,n){e=e||"",n=n||"GET";var a=new window.XMLHttpRequest;a.onreadystatechange=function(){4==a.readyState&&200==a.status&&o(a.responseText)},a.open(n,t,!0),a.send(e)},getQueryString:function(t){var e=new RegExp("(^|&)"+t+"=([^&]*)(&|$)","i"),o=window.location.search.substr(1).match(e);return null!=o?unescape(o[2]):null},delayCallbackOnce:function(t,e){cc.director.getScheduler().schedule(t,this._defaultTimerTarget,0,0,e,!1)}};o.default=n,cc._RF.pop()},{}],wallpaperPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"5ccb7gpTcZNy6oxSxO1hXsJ","wallpaperPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../pre/itemSub/wallpaperSubPrefab"),u=t("../../script/common/dataTs"),p=t("../../script/common/enumConfig"),d=t("../../script/pop/popSub/wallpaperSv"),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.wallpaperSubPrefab=null,e.base_title_label=null,e.parentNode=null,e.nodeData=null,e}return a(e,t),e.prototype.start=function(){},e.prototype.setNodeData=function(t,e){for(var o in this.parentNode=e,this.nodeData=t,u.default.langCode==p.LangEnum.zhCN&&"- Coming soon -"==this.nodeData.titleName?this.base_title_label.string="- \u656c\u8bf7\u671f\u5f85 -":this.base_title_label.string=this.nodeData.titleName,this.nodeData.bgArray){var n=cc.instantiate(this.wallpaperSubPrefab);n.getComponent(l.default).setNodeData(this.nodeData.bgArray[o],this),this.content.addChild(n)}},e.prototype.refreshNode=function(t,e){this.parentNode=e,this.nodeData=t;var o=this.content.children;for(var n in o)o[n].getComponent(l.default).setNodeData(this.nodeData.bgArray[n],this)},e.prototype.refreshSubNode=function(){this.parentNode.getComponent(d.default).refreshSubNode()},i([s(cc.Node)],e.prototype,"content",void 0),i([s(cc.Prefab)],e.prototype,"wallpaperSubPrefab",void 0),i([s(cc.Label)],e.prototype,"base_title_label",void 0),i([c],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../pre/itemSub/wallpaperSubPrefab":"wallpaperSubPrefab","../../script/common/dataTs":"dataTs","../../script/common/enumConfig":"enumConfig","../../script/pop/popSub/wallpaperSv":"wallpaperSv"}],wallpaperSubPrefab:[function(t,e,o){"use strict";cc._RF.push(e,"f4535mVxXNAALqaewBHYpME","wallpaperSubPrefab");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=cc._decorator,c=r.ccclass,s=r.property,l=t("../../script/common/dataTs"),u=t("../../script/common/CcJsFunc"),p=t("../item/wallpaperPrefab"),d=t("../../script/manager/GameManager"),h=t("../../script/utils/uma/uma-sdk"),f=t("../../script/common/enumConfig"),m=t("../../script/manager/report-common"),g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.imgContent=null,e.imgLabel=null,e.imgBorder=null,e.imgLock=null,e.parentNode=null,e.userData=null,e.nodeData=null,e.levelNum=null,e.pictureData=null,e.isReward=!1,e}return a(e,t),e.prototype.start=function(){u.default.addbtnTouchEndScale(this.node,this.clickNodeAction.bind(this))},e.prototype.rewardNodeData=function(t,e){void 0===e&&(e=!0),this.isReward=e,this.imgLock.active=!1,this.imgContent.active=!0,this.imgBorder.active=!1;var o="pictureIcon/GameBgicon"+t+".png";u.default.changeSpriteFrame(this.imgContent,o),this.imgBorder.getChildByName("mark").active=!1,this.imgLabel.node.active=!1},e.prototype.setNodeData=function(t,e){this.isReward=!1,this.parentNode=e,this.nodeData=t,this.userData=l.default.getUserData(),this.levelNum=this.userData.playLevelId,this.pictureData=l.default.getPictureData(),l.default.langCode==f.LangEnum.zhCN?this.imgLabel.string=this.nodeData.name:this.imgLabel.string=this.nodeData.en_name;var o="pictureIcon/GameBgicon"+this.nodeData.bgID+".png";u.default.changeSpriteFrame(this.imgContent,o),this.levelNum>this.nodeData.unlockNum?(this.imgLock.active=!1,this.imgContent.active=!0,this.imgBorder.active=!1,this.pictureData.bgNum==this.nodeData.bgID?this.imgBorder.active=!0:this.imgBorder.active=!1):(this.imgLock.active=!0,this.imgContent.active=!1,this.imgBorder.active=!1),d.default.getInstance().collectionMark.bgNum==t.bgID?(this.imgBorder.getChildByName("mark").active=!0,d.default.getInstance().collectionMark.bgNum=0):this.imgBorder.getChildByName("mark").active=!1},e.prototype.clickNodeAction=function(){if(u.default.addClickAudio(),this.levelNum>=this.nodeData.unlockNum&&!this.isReward){this.pictureData.bgNum!=this.nodeData.bgID&&m.default.reportTACommon("collar_bg",{bg_before:this.pictureData.bgNum,bg_after:this.nodeData.bgID}),this.imgBorder.active=!0,this.pictureData.bgNum=this.nodeData.bgID,l.default.savePictureData(this.pictureData),this.parentNode.getComponent(p.default).refreshSubNode(),this.imgBorder.getChildByName("mark").active=!1;var t=this.nodeData.bgID+"";h.default.trackEvent("collar_bg",{ID:t,c_ID:Number(t)}),cc.game.emit(f.EMITKEY.UPDATEPICTURE)}},i([s(cc.Node)],e.prototype,"imgContent",void 0),i([s(cc.Label)],e.prototype,"imgLabel",void 0),i([s(cc.Node)],e.prototype,"imgBorder",void 0),i([s(cc.Node)],e.prototype,"imgLock",void 0),i([c],e)}(cc.Component);o.default=g,cc._RF.pop()},{"../../script/common/CcJsFunc":"CcJsFunc","../../script/common/dataTs":"dataTs","../../script/common/enumConfig":"enumConfig","../../script/manager/GameManager":"GameManager","../../script/manager/report-common":"report-common","../../script/utils/uma/uma-sdk":"uma-sdk","../item/wallpaperPrefab":"wallpaperPrefab"}],wallpaperSv:[function(t,e,o){"use strict";cc._RF.push(e,"e1a4baQrCVBT5Hpjf/VGnTF","wallpaperSv");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../common/dataTs"),c=t("../../../pre/item/wallpaperPrefab"),s=t("../../../i18n/i18n"),l=t("../../../i18n/gd_language"),u=cc._decorator,p=u.ccclass,d=u.property,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=null,e.wallpaperPrefab=null,e.dataArray=[],e.i18nArray=[],e}return a(e,t),e.prototype.start=function(){this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_commuter_road)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_starry)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lamp)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_harbour)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_snow)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_dinner)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_moon)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lazy_time)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_waiting_alone)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lighthouse)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_meteor_shower)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_harbour)),this.i18nArray.push(s.default.instance.trans(l.GDLanguage.wallpaper_lamp)),this.content.removeAllChildren(),this.dataArray=r.default.gameConfigData.baseConfigData.bgData;var t=0;for(var e in this.dataArray)for(var o in this.dataArray[e].bgArray)t0&&this.refreshSubNode()},e.prototype.refreshSubNode=function(){var t=this.content.children;for(var e in t){var o=this.dataArray[e];t[e].getComponent(c.default).refreshNode(o,this)}},i([d(cc.Node)],e.prototype,"content",void 0),i([d(cc.Prefab)],e.prototype,"wallpaperPrefab",void 0),i([p],e)}(cc.Component);o.default=h,cc._RF.pop()},{"../../../i18n/gd_language":"gd_language","../../../i18n/i18n":"i18n","../../../pre/item/wallpaperPrefab":"wallpaperPrefab","../../common/dataTs":"dataTs"}],wardrobeLayer:[function(t,e,o){"use strict";cc._RF.push(e,"4448eEzJr1BMqSaSIx1uqZX","wardrobeLayer");var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../../pre/main/clothesPrefab"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../pop/upgradePop"),p=t("../utils/uma/uma-sdk"),d=t("./mainCultivateLayer"),h=cc._decorator,f=h.ccclass,m=h.property,g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mainCultivateLayer=null,e.changeClothesNode=null,e.scrollContent=null,e.clothesPrefab=null,e.btnLayer=null,e.ribbonNode=null,e.ribbonLabel=null,e.rankBtn=null,e.levelLabel1=null,e.levelLabel2=null,e.upgradePop=null,e.challengeBtn=null,e.clothPadding=20,e.catId=0,e.clothNodeArray=[],e.cultivateComp=null,e.isShowing=!1,e}return a(e,t),e.prototype.start=function(){c.default.addbtnTouchStartScale(this.rankBtn),c.default.addbtnTouchEndScale(this.rankBtn,this.rankFunc.bind(this)),c.default.addbtnTouchCancelScale(this.rankBtn),c.default.addbtnTouchStartScale(this.challengeBtn),c.default.addbtnTouchEndScale(this.challengeBtn,this.challengeBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.challengeBtn)},e.prototype.showWardrobelLayer=function(t,e){var o=this;console.log("catId = ",t),this.isShowing||(this.isShowing=!0,this.cultivateComp=e,this.catId=t,this.scrollContent.removeAllChildren(),this.changeClothesNode.active=!0,this.changeClothesNode.y=-cc.winSize.height/2,this.initCatClothesNode(),cc.tween(this.changeClothesNode).by(.3,{y:350},{easing:cc.easing.cubicOut}).start(),this.cultivateComp.houseToBigMiddle(this.catId),cc.tween(this.changeClothesNode).delay(.3).call(function(){o.showBtnLayer(!0)},this).start())},e.prototype.hideWardrobelLayer=function(){var t=this;0!=this.catId&&(this.catId=0,this.isShowing=!1,this.changeClothesNode.stopAllActions(),cc.tween(this.changeClothesNode).to(.2,{y:-cc.winSize.height/2}).call(function(){t.changeClothesNode.active=!1},this).start(),this.hideBtnLayer())},e.prototype.showBtnLayer=function(t){this.btnLayer.active=!0;for(var e=s.default.getUserData().catClothesData["cat_"+this.catId],o=0;o=3?(this.rankBtn.active=!1,this.challengeBtn.active=!1):(2==n.skin?(this.challengeBtn.active=!0,this.rankBtn.active=!1):(this.challengeBtn.active=!1,this.rankBtn.active=!0),this.levelLabel1.string=e[o].clothRank+"",this.levelLabel2.string=e[o].clothRank+1+"")}t&&(cc.tween(this.ribbonNode).set({scale:0}).to(.3,{scale:1},{easing:cc.easing.backOut}).start(),cc.tween(this.rankBtn).set({scale:0}).delay(.15).to(.3,{scale:1},{easing:cc.easing.cubicOut}).start())},e.prototype.hideBtnLayer=function(){this.btnLayer.active=!1},e.prototype.rankFunc=function(t){t.stopPropagation(),cc.log("\u6253\u5f00\u5347\u7ea7\u5f39\u7a97"),this.upgradePop.getComponent(u.default).showUpgradePop(this.catId,this.popCallbackFunc.bind(this))},e.prototype.challengeBtnFunc=function(){this.hideWardrobelLayer(),this.mainCultivateLayer.getComponent(d.default).houseToMinDefault(),cc.game.emit(l.EMITKEY.UPDATETABBARRECEIVE,2)},e.prototype.popCallbackFunc=function(t){void 0===t&&(t=!1),this.cultivateComp.refreshCatCloth(this.catId,t,t),this.refreshClothSelect(),this.showBtnLayer(!1)},e.prototype.initCatClothesNode=function(){var t=s.default.getGameConfigData().baseConfigData.catClothesData,e=s.default.getUserData().catClothesData;console.log("baseConfig catClothesData = ",t),console.log("userData userClothesData = ",e),this.clothNodeArray=[];for(var o="cat_"+this.catId,n=t[o],a=0;a=0;c--)(a=t[c])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(o,"__esModule",{value:!0});var r=t("../api/api-sheep"),c=t("../common/CcJsFunc"),s=t("../common/dataTs"),l=t("../common/enumConfig"),u=t("../common/spine"),p=t("../common/util"),d=t("../manager/data-manager"),h=t("../manager/DateManager"),f=t("../manager/GameManager"),m=t("../manager/report-common"),g=cc._decorator,y=g.ccclass,v=g.property,b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.titleNode=null,e.barefootNode=null,e.barefootTitle=null,e.barefootDesc=null,e.sheepSp=null,e.sheepFlagSp=null,e.winDescNode=null,e.backBtn=null,e.shareNode=null,e.shareBtn=null,e.noShareBtn=null,e.shareCloseBtn=null,e.timeNode=null,e.flashSp=null,e}return a(e,t),e.prototype.start=function(){c.default.addbtnTouchStartScale(this.backBtn),c.default.addbtnTouchEndScale(this.backBtn,this.backBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.backBtn),c.default.addbtnTouchStartScale(this.shareBtn),c.default.addbtnTouchEndScale(this.shareBtn,this.shareBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.shareBtn),c.default.addbtnTouchStartScale(this.noShareBtn),c.default.addbtnTouchEndScale(this.noShareBtn,this.noShareBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.noShareBtn),c.default.addbtnTouchStartScale(this.shareCloseBtn),c.default.addbtnTouchEndScale(this.shareCloseBtn,this.shareCloseBtnFunc.bind(this)),c.default.addbtnTouchCancelScale(this.shareCloseBtn)},e.prototype.shareBtnFunc=function(){cc.game.emit(l.EMITKEY.TTSHARERECORD)},e.prototype.noShareBtnFunc=function(){this.shareNode.active=!1,this.showBackBtn()},e.prototype.shareCloseBtnFunc=function(){this.shareNode.active=!1,this.showBackBtn()},e.prototype.backBtnFunc=function(){cc.game.emit(l.EMITKEY.SHOWMAINLAYER)},e.prototype.showBackBtn=function(){cc.tween(this.backBtn).delay(.5).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},e.prototype.showWinPop=function(t){var e=this;this.node.active=!0,this.backBtn.scale=0,this.shareNode.scale=0;var o=d.default.getTAUserInfo();m.default.reportTACommon("game_finish",o),this.titleNode.getComponent(cc.Label).string=h.default.getDateString();var n=p.default.countdownTime(t.time),a=n[1]<10?"0"+n[1]:n[1]+"",i=n[2]<10?"0"+n[2]:n[2]+"";if(this.timeNode.getComponent(cc.Label).string="\u901a\u5173\u7528\u65f6"+a+"\u5206"+i+"\u79d2",f.default.getInstance().gameType==l.GAMETYPE.GAMEDAILY)this.barefootDesc.getComponent(cc.Label).string="\u52a0\u5165\u7f8a\u7fa4",r.default.getRankInfoData(function(t){d.default.setRankData(t),f.default.getInstance().rankInfo=t.data;var o=12;f.default.getInstance().rankInfo&&(o=f.default.getInstance().rankInfo.user.index);var n="\u60a8\u6240\u5728\u7684\u5730\u533a\u4e3a\u7b2c "+o+" \u540d";e.winDescNode.getComponent(cc.RichText).string=n});else if(f.default.getInstance().gameType==l.GAMETYPE.GAMETOPIC){this.barefootDesc.getComponent(cc.Label).string="\u52a0\u5165"+this.getTeamName();var c="";d.default.topicRankInfo&&d.default.topicModel&&(c=1==d.default.topicModel.info.type?d.default.topicRankInfo.tomb?d.default.topicRankInfo.tomb.length+"":"0":d.default.topicRankInfo.taoist?d.default.topicRankInfo.taoist.length+"":"0");var s=""+this.getTeamName()+"\u7f8a\u961f\u5df2\u6709 "+c+" \u7f8a";e.winDescNode.getComponent(cc.RichText).string=s}this.playBareFoot(),e.sheepSp.getComponent(u.default).play("Finish1",1,function(){e.sheepSp.getComponent(u.default).play("Finish2",0)}),e.flashSp.active=!1,cc.tween(e.sheepFlagSp).to(0,{scale:0}).delay(1).call(function(){e.playDescSp()}).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},e.prototype.playDescSp=function(){var t=this;if(f.default.getInstance().gameType==l.GAMETYPE.GAMEDAILY){var e=s.default.getSheepClothesData(),o=!1,n="sheep/Sheeps",a="skin_00",i=null;e=c.default.shuffle(e);for(var r=0;r=2?1==d.default.topicModel.info.type?t[0]:t[1]:""},e.prototype.showShareNode=function(){this.shareNode.active=!0,cc.tween(this.shareNode).delay(.5).to(.2,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},e.prototype.playBareFoot=function(){var t=this;this.barefootNode.active=!0,cc.tween(this.barefootNode).to(0,{scale:0}).to(.1,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).call(function(){cc.tween(t.barefootTitle).to(.1,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).call(function(){cc.tween(t.barefootDesc).to(.1,{scale:1.1}).to(.1,{scale:.9}).to(.1,{scale:1}).start()},t).start()},this).start()},i([v(cc.Node)],e.prototype,"titleNode",void 0),i([v(cc.Node)],e.prototype,"barefootNode",void 0),i([v(cc.Node)],e.prototype,"barefootTitle",void 0),i([v(cc.Node)],e.prototype,"barefootDesc",void 0),i([v(cc.Node)],e.prototype,"sheepSp",void 0),i([v(cc.Node)],e.prototype,"sheepFlagSp",void 0),i([v(cc.Node)],e.prototype,"winDescNode",void 0),i([v(cc.Node)],e.prototype,"backBtn",void 0),i([v(cc.Node)],e.prototype,"shareNode",void 0),i([v(cc.Node)],e.prototype,"shareBtn",void 0),i([v(cc.Node)],e.prototype,"noShareBtn",void 0),i([v(cc.Node)],e.prototype,"shareCloseBtn",void 0),i([v(cc.Node)],e.prototype,"timeNode",void 0),i([v({type:cc.Node,tooltip:"flash\u52a8\u753b"})],e.prototype,"flashSp",void 0),i([y],e)}(cc.Component);o.default=b,cc._RF.pop()},{"../api/api-sheep":"api-sheep","../common/CcJsFunc":"CcJsFunc","../common/dataTs":"dataTs","../common/enumConfig":"enumConfig","../common/spine":"spine","../common/util":"util","../manager/DateManager":"DateManager","../manager/GameManager":"GameManager","../manager/data-manager":"data-manager","../manager/report-common":"report-common"}],"wx-sdk":[function(t,e,o){"use strict";cc._RF.push(e,"dbb360ys3xP25Wexckd5YGf","wx-sdk");var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))(function(a,i){function r(t){try{s(n.next(t))}catch(e){i(e)}}function c(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof o?e:new o(function(t){t(e)})).then(r,c)}s((n=n.apply(t,e||[])).next())})},a=this&&this.__generator||function(t,e){var o,n,a,i,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return s([t,e])}}function s(i){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,n=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]n.first||o.second>n.second||o.third>n.third)},t.isWxVersionLower=function(t){if(cc.sys.platform!=cc.sys.WECHAT_GAME&&cc.sys.platform!=cc.sys.WECHAT_GAME_SUB)return!0;var e=wx.getSystemInfoSync().SDKVersion,o=!1;return this.isVersionLower(e,t)&&(o=!0),cc.log("[sdk] is wx version lower",e,t,o),o},t.isWxVersionHigher=function(t){return!this.isWxVersionLower(t)},t.wxRankScoreUpdate=function(t,e,o){cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getOpenDataContext().postMessage({cmd:"update-"+t,type:o,score:e})},t.wxRankScoreRemove=function(t){cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getOpenDataContext().postMessage({cmd:"remove-"+t,score:0})},t.wxShowSubContext=function(t,e,o,n){cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getOpenDataContext().postMessage({cmd:"show-"+t,setData:e,w:o,h:n})},t.onShareAppMessage=function(t){wx.showShareMenu({withShareTicket:!0}),wx.onShareAppMessage(function(){return{title:t.title,imageUrl:t.imageUrl,query:t.query}}),wx.onShareTimeline(function(){return{title:"\u7f8a\u4e86\u4e2a\u7f8a",imageUrl:"",query:"a=1&b=2"}})},t.onShareAppMessageQuery=function(){return wx.getEnterOptionsSync().query},t.wxShare=function(t,e){if(cc.sys.platform==cc.sys.WECHAT_GAME){var o=cc.winSize;e||(e=canvas.toTempFilePathSync({destHeight:o.width/5*4})),wx.shareAppMessage({title:t,imageUrl:e})}},t.wxShareWithCallBack=function(t){if(t.tag,cc.sys.isBrowser)return t.success&&t.success("local"),void(t.complete&&t.complete("local"));if(cc.sys.platform!=cc.sys.WECHAT_GAME)return t.success&&t.success("local"),void(t.complete&&t.complete("local"));null==t.validate&&(t.validate=!0),this._beforeOnHideAction=1;var e=!1,o=!1,n=!1,a=function(e){o||(console.log("\u6784\u5efa success"),t.success&&t.success(e),o=!0)},r=function(e){t.complete&&t.complete(e)},c=Date.now();this.setOnShow(function(){Date.now()-c<1e3*i.SHARE_CALLBACK_TIME&&(e=!0)}),this.setOnShow(function(){return!(!e||o)&&(t.validate&&Date.now()-c<1e3*i.SHARE_CALLBACK_TIME?void(Math.random()-1&&this.onShowFunction.splice(e,1)},t.setOnShowOnce=function(t){t&&this.onShowOnceFunction.push(t)},t.setOffShowOnce=function(t){var e=this.onShowOnceFunction.indexOf(t);e>-1&&this.onShowOnceFunction.splice(e,1)},t.setOnHide=function(t){t&&this.onHideFunction.push(t)},t.setOffHide=function(t){var e=this.onHideFunction.indexOf(t);e>-1&&this.onHideFunction.splice(e,1)},t.setOnHideOnce=function(t){t&&this.onHideOnceFunction.push(t)},t.setOffHideOnce=function(t){var e=this.onHideOnceFunction.indexOf(t);e>-1&&this.onHideOnceFunction.splice(e,1)},t.getAppVersion=function(){if(cc.sys.platform==cc.sys.WECHAT_GAME&&wx.getAccountInfoSync){var t=wx.getAccountInfoSync();return cc.log("[sdk] accountInfo:",t),t.miniProgram.version||""}return""},t.setClipboardData=function(t){wx.setClipboardData({data:t,success:function(){wx.getClipboardData({success:function(t){cc.log("wx get clipboard data:",t.data)}})}})},t.showToast=function(t){wx.showToast(t)},t.showBannerAd=function(){},t.hideBannerAd=function(){},t.showInterstitialAd=function(){},t.showRewardVideoAd=function(t,e,o){if(wx){var n=!1,a=wx.createRewardedVideoAd({adUnitId:t});a.onClose(function(t){0==n&&(n=!0,t&&t.isEnded||void 0===t?e():o(!1,"\u89c2\u770b\u5931\u8d25"))}),a.onError(function(t){0==n&&(n=!0,o(!1,t.errMsg))}),a.load().then(function(){a.show()}).catch(function(){o(!1,"\u5e7f\u544a\u62c9\u53d6\u5931\u8d25")})}else o(!1,"wx undefined")},t.onShowFunction=[],t.onHideFunction=[],t.onShowOnceFunction=[],t.onHideOnceFunction=[],t.gameIconAd=null,t.gameIconAdShown=!1,t}();o.default=r,r.init(),cc._RF.pop()},{"../sdk":"sdk"}]},{},["gd_language","i18n","BulletPrefab","brickPrefab","collectPrefab","prop-prefab","wallpaperPrefab","brickSubPrefab","collectSubPrefab","wallpaperSubPrefab","blockPrefab","catClawPrefabs","clothesPrefab","cookiePrefab","cookieRewardNode","flying-item-pop-coin","flying-item-pop-fish","rewardPrefab","blockEditorPrefab","setBloackNumPrefab","topic-card-node","topic-header-node","topic-sheep-node","PrivacyPolicy","calendar-item","daily-challenge","cat-house-progress","main-cookie-reward","topic-rank","topic-ui-layer","topic-ui","ApiTool","api-sheep","fontTipsLayer","transitionsLayer","CcJsFunc","ad","config","dataModel","dataTs","enumConfig","http","key-map","mask","maskLayer","android-sdk","audio","native-bridge","native-def","native-event","share","tt-sdk","wx-sdk","sdk","spine","util","CoinEmitter","CoinEmitterByTime","SpriteWithMask","SpriteWithMaskAssembler","cubic-bezier-curve","curve-sample","export-helper","export","mesh-vertex","spline-node","spline","typed-event","player-head-atlas","reward-emitter","snake-ctrl-point","snake-sprite-assembler","spline-sprite","chessboard","crushArea","game-top-ui","gameLayer","gameUiLayer","moveOutArea","loadCanvas","loadLayer","catNode","houseLayer","main-rank","main-tabbar","mainCanvas","mainCultivateLayer","mainLayer","mainUiLayer","page-house","page-main","topUiLayer","upgrade-tip","wardrobeLayer","DateManager","GameManager","PoolManager","data-manager","popManager","report-common","blockArea","editorGameLayer","editorGameUiLayer","editorPopCommon","editorTips","mapArea","mapEditor","newLevelPop","saveAsPop","selectLevelPop","setBlockNumPop","uiControler","ScrollMsg","bullet-screen","sheep-card","sheep-flock-icon","sheep-flock","FriendRankPop","PersonalPop","PrivacyUserPop","TodayRankPop","bullet-screen-pop","challengeSucPop","failPop","getLovePop","getPropPop","giftLayerAnimate","loseCookiePop","loseLovePop","nextLevelPop","noLimitPop","nothingPop","picturePop","brickSv","collectSv","sheepRankItem","sprintRewardBar","wallpaperSv","setupPop","shareNodePop","sheep-rank-pop","show-daily-pop","show-reward-pop","sprintRewardPop","stagePop","topicChoosePop","topicCollectPop","topicJoinedPop","topicLastWinPop","topicNewPop","unlock-build-pop","unlock-build","upgradePop","winPop","data-env","data-type","network-tool","thinkingdata.mg.cocoscreator.min","FriendSubContextView","TodaySubContextView","bullet-item","register-head-image","str-utils","uma-sdk"]);