
                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/__qc_index__.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}
require('./assets/Script/Block');
require('./assets/Script/Camera');
require('./assets/Script/GameData');
require('./assets/Script/GameManager');
require('./assets/Script/GameOver');
require('./assets/Script/GameScene');
require('./assets/Script/ListView/ItemRender');
require('./assets/Script/ListView/List');
require('./assets/Script/Load');
require('./assets/Script/Player');
require('./assets/Script/RankManager');
require('./assets/Script/crypto/HttpUtil');
require('./assets/Script/crypto/crypto-js.min');
require('./assets/Script/tool/AudioManager');
require('./assets/Script/tool/GameTool');
require('./assets/Script/tool/Notification');
require('./assets/Script/tool/Storage');
require('./assets/Script/tool/share');
require('./assets/migration/use_v2.1-2.2.1_cc.Toggle_event');

                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/ListView/ItemRender.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, 'ca0f9k0oBVDbpQC+OMNTF3m', 'ItemRender');
// Script/ListView/ItemRender.ts

"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var ItemRender = /** @class */ (function (_super) {
    __extends(ItemRender, _super);
    function ItemRender() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /**数据 */
        _this.data = null;
        /**索引 0表示第一项*/
        _this.itemIndex = 0;
        return _this;
    }
    /**数据改变时调用 */
    ItemRender.prototype.dataChanged = function () {
        if (this.data.name.length > 7) {
            this.data.name = this.data.name.substring(0, 7) + "...";
        }
        this.node.getChildByName("rankLab").getComponent(cc.Label).string = this.data.rank + "";
        this.node.getChildByName("nameLab").getComponent(cc.Label).string = this.data.name + "";
        this.node.getChildByName("totalLab").getComponent(cc.Label).string = this.data.total + "";
        this.node.getChildByName("rank").getChildByName("one").active = false;
        this.node.getChildByName("rank").getChildByName("two").active = false;
        this.node.getChildByName("rank").getChildByName("three").active = false;
        if (this.data.rank == 1) {
            this.node.getChildByName("rank").getChildByName("one").active = true;
            this.node.getChildByName("rankLab").active = false;
        }
        else if (this.data.rank == 2) {
            this.node.getChildByName("rank").getChildByName("two").active = true;
            this.node.getChildByName("rankLab").active = false;
        }
        else if (this.data.rank == 3) {
            this.node.getChildByName("rank").getChildByName("three").active = true;
            this.node.getChildByName("rankLab").active = false;
        }
        else {
            this.node.getChildByName("rankLab").active = true;
        }
        this.setPic();
    };
    ItemRender.prototype.setPic = function () {
        var _this = this;
        var url = this.data.pic;
        cc.assetManager.loadRemote(url, { ext: '.jpg' }, function (err, texture) {
            if (texture) {
                var sprite = _this.node.getChildByName("pic").getChildByName("pic").getComponent(cc.Sprite);
                sprite.spriteFrame = new cc.SpriteFrame(texture);
                // console.log("设置头像成功");
            }
            else {
                // console.log(err,texture)
            }
        });
    };
    ItemRender = __decorate([
        ccclass
    ], ItemRender);
    return ItemRender;
}(cc.Component));
exports.default = ItemRender;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 6684 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/GameManager.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, 'b26a49RCSFPT4C+F7xAd62t', 'GameManager');
// Script/GameManager.ts

"use strict";
// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var GameData_1 = require("./GameData");
var GameTool_1 = require("./tool/GameTool");
var Notification_1 = require("./tool/Notification");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var GameManager = /** @class */ (function (_super) {
    __extends(GameManager, _super);
    function GameManager() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.Camera = null;
        _this.topUI = null;
        _this.Player = null;
        _this.Ground = null;
        _this.Xin = null;
        _this.time = null;
        _this.GameOver = null;
        _this.Tip = null;
        _this.blockPrefab = [];
        return _this;
    }
    GameManager_1 = GameManager;
    // LIFE-CYCLE CALLBACKS:
    GameManager.prototype.onLoad = function () {
        // cc.game.setFrameRate(59.9);
        // 示例使用
        var manager = cc.director.getCollisionManager();
        manager.enabled = true;
        // manager.enabledDebugDraw = true;
        GameManager_1._instance = this;
        // GameData._instance.GM_INFO.probation = false;
        this.Air = [];
        this.Air2 = [];
    };
    GameManager.prototype.onEnable = function () {
        Notification_1.Notification.on("createBlock", this.createBlock, this);
        Notification_1.Notification.on("addScore", this.addScore, this);
        Notification_1.Notification.on("createCrackBlock", this.createCrackBlock, this);
        Notification_1.Notification.on("showGround", this.showGround, this);
        Notification_1.Notification.on("death", this.getDeath, this);
        Notification_1.Notification.on("jump", this.jump, this);
        Notification_1.Notification.on("setData", this.setData, this);
    };
    GameManager.prototype.onDestroy = function () {
        Notification_1.Notification.off("createBlock", this.createBlock);
        Notification_1.Notification.off("addScore", this.addScore);
        Notification_1.Notification.off("createCrackBlock", this.createCrackBlock);
        Notification_1.Notification.off("death", this.getDeath);
        Notification_1.Notification.off("jump", this.jump);
        Notification_1.Notification.off("showGround", this.showGround);
        Notification_1.Notification.off("setData", this.setData);
    };
    //根据是否全面屏，做独立适配方面
    GameManager.prototype.fit = function () {
        this.node.getChildByName("bg2").y = -2167.675;
        var jg = this.setFit();
        if (!jg) {
            this.node.getChildByName("bg2").y = -2100;
            this.topUI.y = 660;
        }
    };
    //判断全面屏
    GameManager.prototype.getSetScreenResolutionFlag = function () {
        var size = cc.winSize;
        var width = size.width;
        var height = size.height;
        if ((height / width) > (16.2 / 9))
            return false;
        return true;
    };
    //判断全面屏适配
    GameManager.prototype.setFit = function () {
        var flag = this.getSetScreenResolutionFlag();
        if (flag) {
        }
        else {
        }
        return flag;
    };
    GameManager.prototype.init = function () {
        this.drop = this.topUI.y - this.Camera.node.y;
        this.score = 0;
        this.oldSpeed = 10;
        this.guide = -1;
        this.begin = true;
        this.over = false;
        this.interfere = false;
        this.round = 0;
        this.level = 0;
        GameData_1.default._instance.GM_INFO.levelMax = 1;
        GameData_1.default._instance.GM_INFO.difficultyMax = 1;
        GameData_1.default._instance.GM_INFO.life = 3;
        this.blockArray = [];
        this.difficultyArray = 0;
        this.cameraMove = false;
        this.countTime = 180;
        this.topUI.getChildByName("xin1").active = true;
        this.topUI.getChildByName("xin2").active = true;
        this.topUI.getChildByName("xin3").active = true;
        this.topUI.getChildByName("star1").active = false;
        this.topUI.getChildByName("star2").active = false;
        this.topUI.getChildByName("star3").active = false;
        GameData_1.default._instance.LEVEL_init();
        this.schedule(this.updateCountDownTime, 1);
    };
    GameManager.prototype.start = function () {
        var _this = this;
        // this.node.on(cc.Node.EventType.TOUCH_START, this.jump, this);
        this.fit();
        this.init();
        // GameData._instance.GM_INFO.probation = false;
        if (GameData_1.default._instance.GM_INFO.probation) {
            this.Player.getComponent("Player").jumpPause = true;
            var tip = this.Tip.getChildByName("tip");
            this.tipShow(tip, -1, true);
        }
        else {
            this.node.getChildByName("Begin").opacity = 0;
            this.node.getChildByName("Begin").scale = 2;
            if (this.node.getChildByName("Begin")) {
                cc.tween(this.node.getChildByName("Begin"))
                    .to(0.5, { opacity: 255, scale: 1 })
                    .delay(0.5)
                    .to(0.5, { opacity: 0, scale: 0 })
                    .call(function () {
                    _this.startGame();
                })
                    .start();
            }
            else {
                setTimeout(function () {
                    _this.startGame();
                }, 1000);
            }
        }
    };
    //开启引导
    GameManager.prototype.startGuide = function (type, revive) {
        var _this = this;
        this.guide = type;
        console.log("startGuide", type);
        if (type == 0) {
            this.careteGuideBlock(1);
        }
        else if (type == 2) {
            var block = this.node.getChildByName("Block").children[this.node.getChildByName("Block").children.length - 1];
            cc.tween(block)
                .to(0.7, { x: 0 })
                .start();
            this.tipHide("tip2", 3, false);
        }
        else if (type == 3) {
            if (revive == true) {
                this.round += 1;
                this.careteGuideBlock(3);
            }
            else {
                var tip = this.Tip.getChildByName("tip3");
                this.tipShow(tip, type, false);
                setTimeout(function () {
                    _this.tipHide("tip3", null, false);
                    _this.round += 1;
                    _this.careteGuideBlock(3);
                }, 3000);
            }
        }
        else if (type == 4) {
            this.round += 1;
            this.careteGuideBlock(4);
        }
        else if (type == 5) {
            this.round += 1;
            this.careteGuideBlock(5);
        }
        else if (type == 6) {
            var block = this.node.getChildByName("Block").children[this.node.getChildByName("Block").children.length - 1];
            cc.tween(block)
                .to(0.7, { x: 0 })
                .start();
            this.tipHide("tip4", 7, revive);
        }
        else if (type == 7) {
            if (revive == true) {
                this.round += 1;
                this.careteGuideBlock(7);
            }
            else {
                var tip = this.Tip.getChildByName("tip5");
                this.tipShow(tip, type, false);
                setTimeout(function () {
                    _this.tipHide("tip5", null, revive);
                    _this.round += 1;
                    _this.careteGuideBlock(7);
                }, 2000);
            }
        }
        else if (type == 8) {
            this.round += 1;
            this.careteGuideBlock(8);
        }
        else if (type == 9) {
            this.Player.getComponent("Player").jumpPause = true;
            var tip_1 = this.Tip.getChildByName("tip6");
            setTimeout(function () {
                _this.tipShow(tip_1, type, false);
            }, 1000);
        }
    };
    GameManager.prototype.tipShow = function (tipName, type, showNext) {
        var _this = this;
        var tip = tipName;
        var left = this.Tip.getChildByName("left");
        var right = this.Tip.getChildByName("right");
        left.width = 0;
        right.width = 0;
        tip.opacity = 0;
        cc.tween(left)
            .to(0.25, { width: 348 })
            .start();
        cc.tween(right)
            .to(0.25, { width: 348 })
            .start();
        cc.tween(tip)
            .delay(0.15)
            .to(0.15, { opacity: 255 })
            .call(function () {
            _this.guide = type;
            if (type == 5)
                _this.guide = 6;
            if (type == 5 || type == 1)
                _this.Player.getComponent("Player").jumpPause = false;
        })
            .start();
        if (showNext == true) {
            this.Tip.getChildByName("btn_next").active = true;
            this.Tip.getChildByName("btn_jump").active = true;
            cc.tween(this.Tip.getChildByName("btn_next"))
                .delay(0.5)
                .to(0.2, { opacity: 255 })
                .start();
            cc.tween(this.Tip.getChildByName("btn_jump"))
                .delay(0.5)
                .to(0.2, { opacity: 255 })
                .start();
        }
        if (tip.name == "tip6") {
            this.Tip.getChildByName("btn_start").active = true;
            cc.tween(this.Tip.getChildByName("btn_start"))
                .delay(1)
                .to(0.2, { opacity: 255 })
                .start();
        }
    };
    //隐藏
    GameManager.prototype.tipHide = function (tipName, num, revive) {
        var _this = this;
        var tip = this.Tip.getChildByName(tipName);
        var left = this.Tip.getChildByName("left");
        var right = this.Tip.getChildByName("right");
        cc.tween(left)
            .delay(0.1)
            .to(0.25, { width: 0 })
            .start();
        cc.tween(right)
            .delay(0.1)
            .to(0.25, { width: 0 })
            .start();
        cc.tween(tip)
            .to(0.12, { opacity: 0 })
            .delay(1.5)
            .call(function () {
            if (tip.name != "tip3" && tipName != "tip5") {
                _this.Player.getComponent("Player").jumpPause = true;
            }
            if (num != null) {
                _this.startGuide(num, revive);
            }
        })
            .start();
    };
    GameManager.prototype.careteGuideBlock = function (type) {
        var _this = this;
        this.Ground.active = false;
        var tip = this.Tip.getChildByName("tip2");
        if (type == 5) {
            tip = this.Tip.getChildByName("tip4");
        }
        this.Player.getComponent("Player").jumpPause = true;
        var block = cc.instantiate(this.blockPrefab[13]);
        var height = this.Player.getComponent("Player").basicHeight + GameData_1.default._instance.GM_INFO.blockMin;
        if (type > 4) {
            height += block.height + GameData_1.default._instance.GM_INFO.blockMax;
            GameData_1.default._instance.CLICK_DATA.height = true;
        }
        block.setPosition(cc.v2(this.round % 2 == 0 ? 480 : -480, height));
        block.parent = this.node.getChildByName("Block");
        var num = 150;
        var time = 3;
        if (type == 1 || type == 5) {
            num = this.round % 2 == 0 ? num : -num;
        }
        else if (type == 3 || type == 4 || type == 7 || type == 8 || type == 9) {
            this.Player.getComponent("Player").jumpPause = false;
            num = -block.x;
            time = 7;
        }
        cc.tween(block)
            .to(time, { x: num })
            .call(function () {
            if (type == 1 || type == 5) {
                if (type == 1)
                    _this.Player.getComponent("Player").jumpPause = true;
                _this.tipShow(tip, type, false);
            }
        })
            .start();
    };
    GameManager.prototype.showGround = function (tempY) {
        var _this = this;
        setTimeout(function () {
            _this.Ground.active = true;
            _this.Ground.y = tempY;
        }, 500);
    };
    GameManager.prototype.guideStart = function () {
        this.tipHide("tip6", null, false);
        this.Tip.getChildByName("btn_next").active = false;
        this.Tip.getChildByName("btn_jump").active = false;
        this.Tip.getChildByName("btn_start").active = false;
        GameData_1.default._instance.GM_INFO.probation = false;
        this.destroyBlock(false);
        this.onDestroy();
        cc.director.loadScene("GameScene");
    };
    //下一步
    GameManager.prototype.guideNext = function () {
        if (this.guide == -1) {
            this.tipHide("tip", 0, false);
            this.Tip.getChildByName("btn_next").active = false;
            this.Tip.getChildByName("btn_jump").active = false;
            this.Tip.getChildByName("btn_start").active = false;
        }
    };
    //跳过
    GameManager.prototype.guideJump = function () {
        this.Tip.getChildByName("btn_next").active = false;
        this.Tip.getChildByName("btn_jump").active = false;
        this.Tip.getChildByName("btn_start").active = false;
        GameData_1.default._instance.GM_INFO.probation = false;
        this.destroyBlock(false);
        this.onDestroy();
        cc.director.loadScene("GameScene");
    };
    GameManager.prototype.jump = function () {
        this.Player.getComponent("Player").jump();
    };
    GameManager.prototype.startGame = function () {
        this.createBlock();
        // this.createAir();
    };
    GameManager.prototype.addScore = function (score) {
        var _this = this;
        GameData_1.default._instance.CLICK_DATA.getScore = parseInt(score);
        GameManager_1._instance.score += parseInt(score);
        GameData_1.default._instance.CLICK_DATA.totalScore = GameManager_1._instance.score;
        this.topUI.getChildByName("nandu").getComponent(cc.Label).string = GameManager_1._instance.score + "";
        var scale = GameManager_1._instance.score / GameData_1.default._instance.LEVEL_INFO.scoreMax;
        cc.tween(this.topUI.getChildByName("progress").getComponent(cc.Sprite))
            .to(0.5, { fillRange: scale })
            .call(function () {
            if (scale >= GameData_1.default._instance.LEVEL_INFO.star1 && !_this.topUI.getChildByName("star1").active) {
                _this.topUI.getChildByName("star1").active = true;
            }
            if (scale >= GameData_1.default._instance.LEVEL_INFO.star2 && !_this.topUI.getChildByName("star2").active) {
                _this.topUI.getChildByName("star2").active = true;
            }
            if (scale >= GameData_1.default._instance.LEVEL_INFO.star3 && !_this.topUI.getChildByName("star3").active) {
                _this.topUI.getChildByName("star3").active = true;
                // GameData._instance.scoreMax = 150000;
            }
        })
            .start();
    };
    GameManager.prototype.createBlock = function () {
        if (this.over == false && this.begin == true) {
            this.Ground.active = false;
            this.Player.getComponent("Player").jumpPause = false;
            var num = Math.floor(Math.random() * 12);
            if (this.round <= 10 && num == 5) {
                num = Math.floor(Math.random() * 6 + 6);
            }
            var block = cc.instantiate(this.blockPrefab[num]);
            var height = this.Player.getComponent("Player").basicHeight + GameData_1.default._instance.GM_INFO.blockMin;
            if (num > GameData_1.default._instance.GM_INFO.blockScale) {
                height += block.height + GameData_1.default._instance.GM_INFO.blockMax;
                GameData_1.default._instance.CLICK_DATA.height = true;
            }
            if (height >= 0 && this.cameraMove == false) {
                this.countHeight = this.Player.getComponent("Player").basicHeight - this.Camera.node.y;
                this.cameraMove = true;
            }
            block.setPosition(cc.v2(this.round % 2 == 0 ? 480 : -480, height));
            block.parent = this.node.getChildByName("Block");
            block.zIndex = 10;
            this.block = null;
            this.block = block;
            this.round += 1;
            this.level += 1;
            if (this.round > GameData_1.default._instance.GM_INFO.levelMax)
                GameData_1.default._instance.GM_INFO.levelMax = this.round;
            GameData_1.default._instance.CLICK_DATA.level = this.round;
            GameData_1.default._instance.CLICK_DATA.round = this.level;
            GameData_1.default._instance.LEVEL_INFO.layer += GameData_1.default._instance.LEVEL_INFO.layerAdd;
            if (GameData_1.default._instance.LEVEL_INFO.speed < 2)
                GameData_1.default._instance.LEVEL_INFO.speed += GameData_1.default._instance.LEVEL_INFO.addSpeed;
            if (GameData_1.default._instance.LEVEL_INFO.reduceSpeed <= 100)
                GameData_1.default._instance.LEVEL_INFO.reduceSpeed += GameData_1.default._instance.LEVEL_INFO.jiansu;
            if (this.round == GameData_1.default._instance.LEVEL_INFO.round1)
                GameData_1.default._instance.LEVEL_INFO.jiansu = 2;
            else if (this.round == GameData_1.default._instance.LEVEL_INFO.round2)
                GameData_1.default._instance.LEVEL_INFO.jiansu = 1;
            else if (this.round == GameData_1.default._instance.LEVEL_INFO.round3)
                GameData_1.default._instance.LEVEL_INFO.jiansu = 0.5;
        }
    };
    //产生空气
    GameManager.prototype.createAir = function () {
        for (var i = 0; i < 100; i++) {
            this.Ground.active = false;
            var num = Math.floor(Math.random() * 12);
            if (this.round <= 10 && num == 5) {
                num = Math.floor(Math.random() * 6 + 6);
            }
            var block = cc.instantiate(this.blockPrefab[num]);
            var height = this.Player.getComponent("Player").basicHeight + GameData_1.default._instance.GM_INFO.blockMin;
            if (num > GameData_1.default._instance.GM_INFO.blockScale) {
                height += block.height + GameData_1.default._instance.GM_INFO.blockMax;
                GameData_1.default._instance.CLICK_DATA.height = true;
            }
            block.setPosition(cc.v2(this.round % 2 == 0 ? 480 : -480, height));
            block.parent = this.node.getChildByName("Block");
            block.zIndex = 10;
            this.round += 1;
            this.level += 1;
            if (this.round > GameData_1.default._instance.GM_INFO.levelMax)
                GameData_1.default._instance.GM_INFO.levelMax = this.round;
            GameData_1.default._instance.CLICK_DATA.level = this.round;
            GameData_1.default._instance.CLICK_DATA.round = this.level;
            GameData_1.default._instance.LEVEL_INFO.layer += GameData_1.default._instance.LEVEL_INFO.layerAdd;
            GameData_1.default._instance.LEVEL_INFO.speed += GameData_1.default._instance.LEVEL_INFO.addSpeed;
            if (GameData_1.default._instance.LEVEL_INFO.reduceSpeed <= 80)
                GameData_1.default._instance.LEVEL_INFO.reduceSpeed += GameData_1.default._instance.LEVEL_INFO.jiansu;
            if (this.round == GameData_1.default._instance.LEVEL_INFO.round1)
                GameData_1.default._instance.LEVEL_INFO.jiansu = 2;
            else if (this.round == GameData_1.default._instance.LEVEL_INFO.round2)
                GameData_1.default._instance.LEVEL_INFO.jiansu = 1;
            else if (this.round == GameData_1.default._instance.LEVEL_INFO.round3)
                GameData_1.default._instance.LEVEL_INFO.jiansu = 0.5;
        }
    };
    GameManager.prototype.clearAir = function () {
        cc.director.loadScene("GameScene");
    };
    //虚假碎裂块
    GameManager.prototype.createCrackBlock = function () {
        this.interfere = true;
        GameData_1.default._instance.CLICK_DATA.fake = this.interfere;
        if (this.round > 1)
            this.destroyBlock(true);
        if (this.over == false && this.begin == true) {
            var block = cc.instantiate(this.blockPrefab[12]);
            var height = this.Player.getComponent("Player").basicHeight;
            if (GameData_1.default._instance.CLICK_DATA.height == true) {
                height += block.height / 2;
            }
            block.setPosition(cc.v2(this.round % 2 == 0 ? 480 : -480, height));
            block.parent = this.node.getChildByName("CrackBlock");
            block.zIndex = 1;
        }
    };
    GameManager.prototype.destroyBlock = function (type) {
        if (type == true) {
            if (this.node) {
                if (this.node.getChildByName("CrackBlock")) {
                    if (this.node.getChildByName("CrackBlock").children) {
                        var block2 = this.node.getChildByName("CrackBlock").children;
                        for (var i = 0; i < block2.length; i++) {
                            if (block2[i]) {
                                block2[i].getComponent("Block").hide();
                            }
                        }
                    }
                }
            }
        }
        else {
            var block = this.node.getChildByName("Block").children;
            for (var i = 0; i < block.length; i++) {
                if (block[i]) {
                    block[i].active = false;
                }
            }
        }
    };
    GameManager.prototype.xinAction = function () {
        var xin = this.topUI.getChildByName("xin1");
        if (GameData_1.default._instance.GM_INFO.life == 2)
            xin = this.topUI.getChildByName("xin3");
        else if (GameData_1.default._instance.GM_INFO.life == 1)
            xin = this.topUI.getChildByName("xin2");
        cc.tween(xin)
            .to(0.6, { scale: 1.6, opacity: 0 })
            .call(function () {
            xin.active = false;
        })
            .start();
    };
    //死亡
    GameManager.prototype.getDeath = function (data) {
        var _this = this;
        if (data == true) {
            this.destroyBlock(false);
            cc.tween(this.Player)
                .to(1, { y: -500 }, { easing: 'cubicIn' })
                .call(function () {
                _this.Player.getComponent("Player").init();
                // this.Player.getComponent("Player").jumpPause = true;
                if (_this.guide > 5) {
                    if (_this.guide == 6) {
                        _this.guide = 5;
                        _this.round = 2;
                        _this.startGuide(5, true);
                    }
                    else {
                        _this.round = 1;
                        _this.startGuide(6, true);
                    }
                }
                else {
                    _this.round = 0;
                    _this.startGuide(3, true);
                }
            })
                .delay(0.5)
                .call(function () {
            })
                .start();
        }
        else {
            if (GameData_1.default._instance.GM_INFO.life > 0) {
                GameData_1.default._instance.GM_INFO.life -= 1;
                this.getDevive(1);
            }
            else {
                GameData_1.default._instance.GM_INFO.life = -1;
                this.getDevive(3);
            }
        }
    };
    //复活
    GameManager.prototype.getDevive = function (time) {
        var _this = this;
        this.round = 0;
        GameData_1.default._instance.LEVEL_init();
        if (this.topUI.getChildByName("star3").active == true) {
            // GameData._instance.LEVEL_INFO.scoreMax = 150000;
        }
        this.interfere = false;
        GameData_1.default._instance.CLICK_DATA.fake = this.interfere;
        this.destroyBlock(false);
        var block2 = this.node.getChildByName("CrackBlock").children;
        for (var i = 0; i < block2.length; i++) {
            if (block2[i]) {
                block2[i].active = false;
            }
        }
        // this.blockArray = [];
        var actionTime = 1;
        if (this.Player.y > 500) {
            actionTime = (this.Player.y + 500) / 1000 * actionTime;
        }
        cc.tween(this.Player)
            .to(actionTime, { y: -500 }, { easing: 'cubicIn' })
            .call(function () {
            _this.Player.getComponent("Player").xinAction();
        })
            .delay(0.5)
            .call(function () {
            _this.xinAction();
            _this.Player.getComponent("Player").init();
            if (time > 1) {
                _this.Xin.parent.active = true;
                _this.Xin.getComponent(cc.Sprite).fillRange = 0;
                cc.tween(_this.Xin.getComponent(cc.Sprite))
                    .to(time, { fillRange: 1 })
                    .delay(0.3)
                    .call(function () {
                    _this.Xin.parent.active = false;
                })
                    .delay(0)
                    .call(function () {
                    _this.createBlock();
                })
                    .start();
            }
            else {
                setTimeout(function () {
                    _this.createBlock();
                }, (time + 0.5) * 1000);
            }
        })
            .start();
    };
    GameManager.prototype.setData = function () {
        GameData_1.default._instance.CLICK_DATA.timer = this.countTime;
        GameData_1.default._instance.CLICK_DATA.level = this.round;
        GameData_1.default._instance.CLICK_DATA.round = this.level;
        //CLICK_DATA 数据处理完毕后调用上传接口  上传接口内CLICK_DATA不做改变
        GameTool_1.GameTool.setGameData();
    };
    //获取matchId  用于上传每次点击数据里面记录id方便查询
    GameManager.prototype.getMatchId = function () {
        var matchId = cc.sys.localStorage.getItem("matchId");
        if (matchId == "undifend" || matchId == null) {
            matchId = this.setMatchId();
        }
        else {
            if (this.containsNanana(matchId) == true) {
                matchId = this.setMatchId();
            }
            else {
                var char = parseInt(matchId[10]);
                if (this.level == 1) {
                    char += 1;
                }
                matchId = matchId.slice(0, 10) + char + "";
                GameData_1.default._instance.GM_INFO.matchId = matchId;
                cc.sys.localStorage.setItem("matchId", matchId);
            }
        }
        return matchId;
    };
    //检测matchId 如果有缓存以前的nanana数据清除
    GameManager.prototype.containsNanana = function (str) {
        return /na/i.test(str);
    };
    //重新设置MatchId
    GameManager.prototype.setMatchId = function () {
        // 定义包含可用字符的字符集
        var characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
        // 创建一个数组以保存随机字符
        var uuidArray = [];
        // 循环10次 生成10位的UUID
        for (var i = 0; i < 10; i++) {
            // 生成随机索引，范围是字符集的长度
            var randomIndex = Math.floor(Math.random() * characters.length);
            // 从字符集中获取随机字符
            var randomChar = characters.charAt(randomIndex);
            // 将字符添加到数组中
            uuidArray.push(randomChar);
        }
        var data = uuidArray.join('') + 1 + "";
        cc.sys.localStorage.setItem("matchNumber", 1);
        cc.sys.localStorage.setItem("matchId", data);
        GameData_1.default._instance.GM_INFO.matchId = data;
        return data;
    };
    GameManager.prototype.updateCountDownTime = function () {
        var _this = this;
        if (this.countTime > 0 && !GameData_1.default._instance.GM_INFO.probation) {
            this.countTime -= 1;
            this.time.string = this.getTimeMargin(this.countTime);
            if (this.countTime < 5) {
                cc.tween(this.time.node)
                    .to(0.25, { scale: 1.5, color: cc.color(255, 0, 0) })
                    .to(0.25, { scale: 1, color: cc.color(255, 255, 255) })
                    .start();
            }
            if (this.countTime <= 0) {
                this.unschedule(this.updateCountDownTime);
                this.begin = false;
                this.over = true;
                this.overStop();
                this.setRank();
                setTimeout(function () {
                    _this.overOpen();
                }, 2000);
            }
        }
    };
    //停止所有动画
    GameManager.prototype.overStop = function () {
        if (this.Player.getComponent("Player").jumpAction)
            this.Player.getComponent("Player").jumpAction.stop();
        var block = this.node.getChildByName("Block").children;
        for (var i = 0; i < block.length; i++) {
            if (block[i]) {
                if (block[i].getComponent("Block").tween)
                    block[i].getComponent("Block").tween.stop();
            }
        }
        var block2 = this.node.getChildByName("CrackBlock").children;
        for (var i = 0; i < block2.length; i++) {
            if (block2[i]) {
                if (block2[i].getComponent("Block").tween)
                    block2[i].getComponent("Block").tween.stop();
            }
        }
    };
    GameManager.prototype.setRank = function () {
        GameData_1.default._instance.GM_INFO.score = this.score;
        GameTool_1.GameTool.setRank();
    };
    GameManager.prototype.overOpen = function () {
        this.Player.active = false;
        this.destroyBlock(false);
        this.destroyBlock(true);
        this.GameOver.active = true;
        this.GameOver.getChildByName("score").getComponent(cc.Label).string = this.score + "";
        this.GameOver.getChildByName("level").getComponent(cc.Label).string =
            GameData_1.default._instance.GM_INFO.levelMax + "";
        // this.GameOver.getChildByName("difficulty").getComponent(cc.Label).string = 
        // GameData._instance.GM_INFO.difficultyMax + "";
        var difficulty = parseInt(this.difficultyArray / this.level * 10 + "");
        // console.log("难度总数",this.difficultyArray,"次数",this.level,"最终",difficulty);
        this.GameOver.getChildByName("difficulty").getComponent(cc.Label).string =
            difficulty / 10 + "";
    };
    GameManager.prototype.backLoad = function () {
        this.destroyBlock(false);
        this.destroyBlock(true);
        this.onDestroy();
        cc.director.loadScene("LoadScene");
    };
    GameManager.prototype.again = function () {
        this.destroyBlock(false);
        this.destroyBlock(true);
        this.onDestroy();
        cc.director.loadScene("GameScene");
    };
    GameManager.prototype.openRank = function () {
        cc.director.loadScene("RankScene");
    };
    //时间格式转换
    GameManager.prototype.getTimeMargin = function (second) {
        var total = 0;
        total = second;
        var hour = 0;
        hour = parseInt((total / 3600) + ""); //计算整数小时数
        var afterHour = total - hour * 60 * 60; //取得算出小时数后剩余的秒数
        var min = parseInt((afterHour / 60) + ""); //计算整数分
        var m = "" + min;
        if (min < 10)
            m = "0" + min;
        var afterMin = total - hour * 60 * 60 - min * 60; //取得算出分后剩余的秒数
        var miao = afterMin + "";
        if (afterMin < 10)
            miao = "0" + afterMin;
        return m + ':' + miao;
    };
    GameManager.prototype.update = function (dt) {
        if (this.cameraMove == true && this.over == false) {
            this.Camera.node.y = this.Player.y - this.countHeight;
            if (this.Camera.node.y <= 0)
                this.Camera.node.y = 0;
            this.topUI.y = this.Camera.node.y + this.drop;
        }
    };
    var GameManager_1;
    __decorate([
        property(cc.Camera)
    ], GameManager.prototype, "Camera", void 0);
    __decorate([
        property(cc.Node)
    ], GameManager.prototype, "topUI", void 0);
    __decorate([
        property(cc.Node)
    ], GameManager.prototype, "Player", void 0);
    __decorate([
        property(cc.Node)
    ], GameManager.prototype, "Ground", void 0);
    __decorate([
        property(cc.Node)
    ], GameManager.prototype, "Xin", void 0);
    __decorate([
        property(cc.Label)
    ], GameManager.prototype, "time", void 0);
    __decorate([
        property(cc.Node)
    ], GameManager.prototype, "GameOver", void 0);
    __decorate([
        property(cc.Node)
    ], GameManager.prototype, "Tip", void 0);
    __decorate([
        property([cc.Prefab])
    ], GameManager.prototype, "blockPrefab", void 0);
    GameManager = GameManager_1 = __decorate([
        ccclass
    ], GameManager);
    return GameManager;
}(cc.Component));
exports.default = GameManager;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 84408 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/tool/GameTool.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, '35a73aTEIBAZoXKp/xutwzU', 'GameTool');
// Script/tool/GameTool.ts

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GameTool = void 0;
var GameData_1 = require("../GameData");
var HttpUtil_1 = require("../crypto/HttpUtil");
var Storage_1 = require("./Storage");
//最大工具类
var GameTool = {
    _startTime: 0,
    _endTime: 0,
    _totalTime: 0,
    getSeedRandom: function (min, max) {
        max = max || 1;
        min = min || 0;
        GameData_1.default._instance.GM_INFO.currSeed = (GameData_1.default._instance.GM_INFO.currSeed * 9301 + 49297) % 233280;
        var rnd = GameData_1.default._instance.GM_INFO.currSeed / 233280.0;
        var tmp = min + rnd * (max - min);
        return Math.floor(tmp);
    },
    //获取userId
    Authentication: function () {
        var name = "user_" + GameData_1.default._instance.GM_INFO.gameId;
        var data = JSON.parse(localStorage.getItem(name));
        if (data == "undifend" || data == null || data == "") {
            var url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href;
            window.location.href = url;
        }
        else {
            Storage_1.StorageMessage.setStorage(name, data);
            GameData_1.default._instance.GM_INFO.userId = parseInt(data.userId);
        }
    },
    //埋点上传
    setGameData: function () {
        //GAME_DATA 初始化 每次清零
        GameData_1.default._instance.GAME_DATA = [];
        GameData_1.default._instance.GAME_DATA.push(GameData_1.default._instance.CLICK_DATA);
        //GAME_DATA 赋值后 CLICK_DATA清零 
        GameData_1.default._instance.CLICK_init();
        var matchId = this.getMatchId(GameData_1.default._instance.GAME_DATA[0].round);
        var postData = {
            "matchId": matchId,
            "data": GameData_1.default._instance.GAME_DATA
        };
        // console.log("上传数据:",postData);
        HttpUtil_1.default.uploadUserLogData(postData, function () { });
    },
    setRank: function () {
        //GAME_DATA 初始化 每次清零
        var postData = {
            "type": 1,
            "round": "1",
            "score": GameData_1.default._instance.GM_INFO.score,
            "success": GameData_1.default._instance.GM_INFO.success
        };
        HttpUtil_1.default.rankData(1, function () { }, postData);
    },
    //获取matchId  用于上传每次点击数据里面记录id方便查询
    getMatchId: function (level) {
        var matchId = cc.sys.localStorage.getItem("matchId");
        if (matchId == "undifend" || matchId == null) {
            matchId = this.setMatchId();
        }
        else {
            if (this.containsNanana(matchId) == true) {
                matchId = this.setMatchId();
            }
            else {
                var char = parseInt(cc.sys.localStorage.getItem("matchNumber"));
                if (level == 1) {
                    char += 1;
                    cc.sys.localStorage.setItem("matchNumber", char);
                }
                matchId = matchId.slice(0, 10) + char + "";
                GameData_1.default._instance.GM_INFO.matchId = matchId;
                cc.sys.localStorage.setItem("matchId", matchId);
            }
        }
        return matchId;
    },
    //检测matchId 如果有缓存以前的nanana数据清除
    containsNanana: function (str) {
        return /na/i.test(str);
    },
    //重新设置MatchId
    setMatchId: function () {
        // 定义包含可用字符的字符集
        var characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
        // 创建一个数组以保存随机字符
        var uuidArray = [];
        // 循环10次 生成10位的UUID
        for (var i = 0; i < 10; i++) {
            // 生成随机索引，范围是字符集的长度
            var randomIndex = Math.floor(Math.random() * characters.length);
            // 从字符集中获取随机字符
            var randomChar = characters.charAt(randomIndex);
            // 将字符添加到数组中
            uuidArray.push(randomChar);
        }
        var data = uuidArray.join('') + 1 + "";
        cc.sys.localStorage.setItem("matchNumber", 1);
        cc.sys.localStorage.setItem("matchId", data);
        GameData_1.default._instance.GM_INFO.matchId = data;
        return data;
    },
    getSetScreenResolutionFlag: function () {
        var size = cc.winSize;
        var width = size.width;
        var height = size.height;
        if ((height / width) > (16.2 / 9))
            return false;
        return true;
    },
    //判断全面屏适配
    setFit: function (canvas) {
        var flag = GameTool.getSetScreenResolutionFlag();
        if (flag) {
            // console.log("不是全面屏");
        }
        else {
            // console.log("是全面屏");
        }
        return flag;
    },
    getTip: function () {
        var index = Math.floor(Math.random() * 4) + 1;
        switch (index) {
            case 1: {
                return "根据小球的位置，合理晃动手机，确保小球不掉出木板。";
            }
            case 2: {
                return "根据小球位置控制晃动幅度，过大或过小都不是个好选择。";
            }
            case 3: {
                return "不要被天上掉落的障碍吓到，有时候它反而会帮你保持平衡。";
            }
            case 4: {
                return "尝试着顶开掉落的障碍，是个很酷的玩法。";
            }
        }
    },
    beginTiming: function () {
        this._startTime = new Date().getTime();
    },
    endTiming: function () {
        this._endTime = new Date().getTime();
        // this._totalTime = endTime - this._startTime;
    },
    //如果是判断时常的游戏 调用此方法
    updateScoreTime: function () {
        var endTime = new Date().getTime();
        var tempTime = endTime - this._startTime;
        if (tempTime < 0 || tempTime > 500) {
            tempTime = Math.round(cc.director.getAnimationInterval() * 1000);
        }
        this._endTime += tempTime / 1000;
        this._totalTime = this._endTime.toFixed(2);
        GameData_1.default._instance.GM_INFO.currScore = this._totalTime;
        this._startTime = endTime;
    },
    //倒计时调用此方法
    countDown: function () {
        this._endTime = new Date().getTime();
        this._totalTime = Math.floor((this._endTime - this._startTime) / 1000);
        GameData_1.default._instance.GM_INFO.remainingTime = GameData_1.default._instance.GM_INFO.totalTime - this._totalTime;
    },
    getGameInfo: function (node) {
        var jg = false;
        return jg;
    },
    //根据服务器数据重置所需要所有数据
    reset: function () {
        // console.log("本地数据丢失,重新启动游戏");
        cc.director.loadScene('LoadScene');
    },
    setGameInfo: function (pd) {
    },
    //输入秒,返回需要展示时间格式
    getTimeMargin: function (second) {
        var total = second;
        var hour = Math.floor(total / (60 * 60)); //计算整数小时数
        var afterHour = total - hour * 60 * 60; //取得算出小时数后剩余的秒数
        var min = Math.floor(afterHour / 60); //计算整数分
        var afterMin = total - hour * 60 * 60 - min * 60; //取得算出分后剩余的秒数
        return '剩余:' + hour + ':' + min + ':' + afterMin;
    },
    getTimeMargin2: function (second) {
        var total = second;
        var min = null;
        var afterMin = null;
        var hour = Math.floor(total / (60 * 60)); //计算整数小时数
        var afterHour = total - hour * 60 * 60; //取得算出小时数后剩余的秒数
        min = Math.floor(afterHour / 60); //计算整数分
        if (min < 10)
            min = "0" + min;
        afterMin = total - hour * 60 * 60 - min * 60; //取得算出分后剩余的秒数
        if (afterMin < 10)
            afterMin = "0" + afterMin;
        return '剩余:' + min + ':' + afterMin;
    },
    //将时间转换为59:23
    getTime: function (time) {
        var label = "";
        var number_1 = null;
        var number_2 = null;
        number_1 = Math.floor(time / 60);
        number_2 = time - number_1 * 60;
        if (number_1 < 10) {
            number_1 = "0" + number_1;
        }
        if (number_2 < 10) {
            number_2 = "0" + number_2;
        }
        label = number_1 + ":" + number_2;
        return label;
    },
    //number 为传进来的数值,type为最多显示几位数
    getNumber: function (number, type) {
        // console.log(type,"需要转换的数字为:",number);
        var count = 1000;
        var place = type - 3;
        if (number > Math.pow(count, 8) * Math.pow(10, place)) {
            if (number / Math.pow(count, 8) < 100)
                number = Math.floor(number / Math.pow(count, 8) * 10) / 10 + "S";
            else
                number = Math.floor(number / Math.pow(count, 8)) + "S";
        }
        else if (number > Math.pow(count, 7) * Math.pow(10, place)) {
            if (number / Math.pow(count, 7) < 100)
                number = Math.floor(number / Math.pow(count, 7) * 10) / 10 + "s";
            else
                number = Math.floor(number / Math.pow(count, 7)) + "s";
        }
        else if (number > Math.pow(count, 6) * Math.pow(10, place)) {
            if (number / Math.pow(count, 6) < 100)
                number = Math.floor(number / Math.pow(count, 6) * 10) / 10 + "Q";
            else
                number = Math.floor(number / Math.pow(count, 6)) + "Q";
        }
        else if (number > Math.pow(count, 5) * Math.pow(10, place)) {
            if (number / Math.pow(count, 5) < 100)
                number = Math.floor(number / Math.pow(count, 5) * 10) / 10 + "q";
            else
                number = Math.floor(number / Math.pow(count, 5)) + "q";
        }
        else if (number > Math.pow(count, 4) * Math.pow(10, place)) {
            if (number / Math.pow(count, 4) < 100)
                number = Math.floor(number / Math.pow(count, 4) * 10) / 10 + "t";
            else
                number = Math.floor(number / Math.pow(count, 4)) + "t";
        }
        else if (number > Math.pow(count, 3) * Math.pow(10, place)) {
            if (number / Math.pow(count, 3) < 100)
                number = Math.floor(number / Math.pow(count, 3) * 10) / 10 + "b";
            else
                number = Math.floor(number / Math.pow(count, 3)) + "b";
        }
        else if (number > Math.pow(count, 2) * Math.pow(10, place)) {
            if (number / Math.pow(count, 2) < 100)
                number = Math.floor(number / Math.pow(count, 2) * 10) / 10 + "m";
            else
                number = Math.floor(number / Math.pow(count, 2)) + "m";
        }
        else if (number > Math.pow(count, 1) * Math.pow(10, place)) {
            if (number / Math.pow(count, 1) < 100) {
                number = Math.floor(number / Math.pow(count, 1) * 10) / 10 + "k";
            }
            else
                number = Math.floor(number / Math.pow(count, 1)) + "k";
        }
        else {
            number = Math.floor(number / Math.pow(count, 0)) + "";
        }
        // console.log("结果为"+type+"位数",number);
        return number;
    },
    begainTiming: function () {
        this._startTime = new Date().getTime();
    },
    endTiming2: function () {
        var endTime = new Date().getTime();
        this._endTime = endTime;
        this._totalTime = endTime - this._startTime;
    },
    getScoreTime: function () {
        var endTime = new Date().getTime();
        var tempTime = endTime - this._startTime;
        if (tempTime < 0 || tempTime > 500) {
            tempTime = Math.round(cc.director.getAnimationInterval() * 1000);
        }
        GameData_1.default._instance.GM_INFO.currScore += tempTime;
        this._startTime = endTime;
    },
    getFormatTime: function (time) {
        var date = new Date();
        date.setTime(time);
        var ms = date.getMilliseconds();
        // let msString = date.getMilliseconds();
        var msString = null;
        var secondString = null;
        var minString = null;
        msString = Math.floor(ms / 10) % 100;
        secondString = date.getSeconds();
        minString = date.getMinutes();
        if (msString < 10) {
            msString = "0" + msString;
        }
        if (secondString < 10) {
            secondString = "0" + secondString;
        }
        secondString = secondString + ":";
        if (minString < 10) {
            minString = "0" + minString;
        }
        minString = minString + ":";
        return minString + secondString + msString;
    },
    pushLister: function () {
    },
    removeAllLister: function () {
    },
};
exports.GameTool = GameTool;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 34188 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/GameOver.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, '53de0OgdaRLNq9UFqvuJI/u', 'GameOver');
// Script/GameOver.ts

"use strict";
// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.label = null;
        _this.text = 'hello';
        return _this;
        // update (dt) {}
    }
    // LIFE-CYCLE CALLBACKS:
    // onLoad () {}
    NewClass.prototype.start = function () {
    };
    NewClass.prototype.reStart = function () {
        cc.director.loadScene("GameScene");
    };
    __decorate([
        property(cc.Label)
    ], NewClass.prototype, "label", void 0);
    __decorate([
        property
    ], NewClass.prototype, "text", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxHYW1lT3Zlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsb0JBQW9CO0FBQ3BCLHdFQUF3RTtBQUN4RSxtQkFBbUI7QUFDbkIsa0ZBQWtGO0FBQ2xGLDhCQUE4QjtBQUM5QixrRkFBa0Y7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUU1RSxJQUFBLEtBQXNCLEVBQUUsQ0FBQyxVQUFVLEVBQWxDLE9BQU8sYUFBQSxFQUFFLFFBQVEsY0FBaUIsQ0FBQztBQUcxQztJQUFzQyw0QkFBWTtJQUFsRDtRQUFBLHFFQXFCQztRQWxCRyxXQUFLLEdBQWEsSUFBSSxDQUFDO1FBR3ZCLFVBQUksR0FBVyxPQUFPLENBQUM7O1FBY3ZCLGlCQUFpQjtJQUNyQixDQUFDO0lBYkcsd0JBQXdCO0lBRXhCLGVBQWU7SUFFZix3QkFBSyxHQUFMO0lBRUEsQ0FBQztJQUVELDBCQUFPLEdBQVA7UUFDSSxFQUFFLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUN2QyxDQUFDO0lBZkQ7UUFEQyxRQUFRLENBQUMsRUFBRSxDQUFDLEtBQUssQ0FBQzsyQ0FDSTtJQUd2QjtRQURDLFFBQVE7MENBQ2M7SUFOTixRQUFRO1FBRDVCLE9BQU87T0FDYSxRQUFRLENBcUI1QjtJQUFELGVBQUM7Q0FyQkQsQUFxQkMsQ0FyQnFDLEVBQUUsQ0FBQyxTQUFTLEdBcUJqRDtrQkFyQm9CLFFBQVEiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6Ii8iLCJzb3VyY2VzQ29udGVudCI6WyIvLyBMZWFybiBUeXBlU2NyaXB0OlxyXG4vLyAgLSBodHRwczovL2RvY3MuY29jb3MuY29tL2NyZWF0b3IvbWFudWFsL2VuL3NjcmlwdGluZy90eXBlc2NyaXB0Lmh0bWxcclxuLy8gTGVhcm4gQXR0cmlidXRlOlxyXG4vLyAgLSBodHRwczovL2RvY3MuY29jb3MuY29tL2NyZWF0b3IvbWFudWFsL2VuL3NjcmlwdGluZy9yZWZlcmVuY2UvYXR0cmlidXRlcy5odG1sXHJcbi8vIExlYXJuIGxpZmUtY3ljbGUgY2FsbGJhY2tzOlxyXG4vLyAgLSBodHRwczovL2RvY3MuY29jb3MuY29tL2NyZWF0b3IvbWFudWFsL2VuL3NjcmlwdGluZy9saWZlLWN5Y2xlLWNhbGxiYWNrcy5odG1sXHJcblxyXG5jb25zdCB7Y2NjbGFzcywgcHJvcGVydHl9ID0gY2MuX2RlY29yYXRvcjtcclxuXHJcbkBjY2NsYXNzXHJcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIE5ld0NsYXNzIGV4dGVuZHMgY2MuQ29tcG9uZW50IHtcclxuXHJcbiAgICBAcHJvcGVydHkoY2MuTGFiZWwpXHJcbiAgICBsYWJlbDogY2MuTGFiZWwgPSBudWxsO1xyXG5cclxuICAgIEBwcm9wZXJ0eVxyXG4gICAgdGV4dDogc3RyaW5nID0gJ2hlbGxvJztcclxuXHJcbiAgICAvLyBMSUZFLUNZQ0xFIENBTExCQUNLUzpcclxuXHJcbiAgICAvLyBvbkxvYWQgKCkge31cclxuXHJcbiAgICBzdGFydCAoKSB7XHJcblxyXG4gICAgfVxyXG5cclxuICAgIHJlU3RhcnQoKXtcclxuICAgICAgICBjYy5kaXJlY3Rvci5sb2FkU2NlbmUoXCJHYW1lU2NlbmVcIik7XHJcbiAgICB9XHJcblxyXG4gICAgLy8gdXBkYXRlIChkdCkge31cclxufVxyXG4iXX0=
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/crypto/HttpUtil.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, '9ed319W0ElIkJ/97wj9KJh8', 'HttpUtil');
// Script/crypto/HttpUtil.ts

"use strict";
// import CryptoJS from "crypto-js";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var GameData_1 = require("../GameData");
var CryptoJS = require("./crypto-js.min.js"); //引用AES源码js
// import axios from 'axios'
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var HttpUtil = /** @class */ (function (_super) {
    __extends(HttpUtil, _super);
    function HttpUtil() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    HttpUtil_1 = HttpUtil;
    HttpUtil.getShareInfo = function (shareUrl) {
        return __awaiter(this, void 0, Promise, function () {
            var time, url;
            return __generator(this, function (_a) {
                console.log("设置分享链接:", shareUrl);
                time = Math.floor((new Date().getTime()) / 1000);
                url = HttpUtil_1.apiSign("/api/share/cfg?gameId=" + config.gameId + "&time=" + time + "&url=" + shareUrl, {});
                return [2 /*return*/, this.httpPost(url, null, null)];
            });
        });
    };
    //排行榜type2为获取，type1为上传
    HttpUtil.rankData = function (type, callback, data) {
        return __awaiter(this, void 0, Promise, function () {
            var time, url;
            return __generator(this, function (_a) {
                data.gameId = GameData_1.default._instance.GM_INFO.gameId;
                data.userId = GameData_1.default._instance.GM_INFO.userId;
                time = Math.floor((new Date().getTime()) / 1000);
                url = HttpUtil_1.apiSign("/api/get/rank/data?gameId=" + config.gameId + "&dataType=" + type + "&time=" + time, data);
                this.httpPost(url, data, callback);
                return [2 /*return*/];
            });
        });
    };
    HttpUtil.uploadUserLogData = function (data, callback) {
        return __awaiter(this, void 0, Promise, function () {
            var url;
            return __generator(this, function (_a) {
                data.gameId = GameData_1.default._instance.GM_INFO.gameId;
                data.userId = GameData_1.default._instance.GM_INFO.userId;
                url = '/log/collect/data';
                this.httpPost(url, data, callback);
                return [2 /*return*/];
            });
        });
    };
    //暂时用不到
    HttpUtil.getUserRecord = function (data, callback) {
        return __awaiter(this, void 0, Promise, function () {
            var time, url;
            return __generator(this, function (_a) {
                data.gameId = GameData_1.default._instance.GM_INFO.gameId;
                data.userId = GameData_1.default._instance.GM_INFO.userId;
                time = Math.floor((new Date().getTime()) / 1000);
                url = HttpUtil_1.apiSign("/api/get/user/data?gameId=" + config.gameId + "&time=" + time, data);
                this.httpPost(url, data, callback);
                return [2 /*return*/];
            });
        });
    };
    HttpUtil.httpPost = function (url, data, callBack) {
        if (data) {
            data.gameId = GameData_1.default._instance.GM_INFO.gameId;
            data.userId = GameData_1.default._instance.GM_INFO.userId;
        }
        var urlData = "https://api.sparkus.cn" + url;
        // console.log("params:",JSON.stringify(data));
        var xhr = new XMLHttpRequest();
        xhr.open('POST', urlData);
        xhr.setRequestHeader('Content-Type', 'application/json');
        xhr.onreadystatechange = function () {
            if (xhr.readyState == 4 && xhr.status == 200) {
                var data = xhr.responseText;
                if (!data) {
                    console.log("初始化失败");
                    return;
                }
                console.log(data);
                var json = JSON.parse(data);
                console.log('http success:' + json);
                if (callBack)
                    callBack(json);
            }
            else {
                //  var json = JSON.parse(data);
                // console.log('http fail:' + url);
                if (callBack)
                    callBack(json);
            }
        };
        xhr.send(JSON.stringify(data));
    };
    HttpUtil.httpGet = function (url, callBack) {
        var urlData = "https://api.sparkus.cn" + url;
        console.log(urlData);
        var xhr = new XMLHttpRequest();
        xhr.open('GET', urlData);
        xhr.setRequestHeader('Content-Type', 'text/plain');
        xhr.onreadystatechange = function () {
            if (xhr.readyState == 4 && xhr.status == 200) {
                var data = xhr.responseText;
                if (data) {
                    var json = JSON.parse(data);
                    console.info('http success:' + json);
                    if (callBack)
                        callBack(json);
                }
                else {
                    if (callBack)
                        callBack(json);
                }
            }
            else {
                console.info('http fail:' + url);
                if (callBack)
                    callBack(null);
                ;
            }
        };
        xhr.send();
    };
    /**
   *
   * @param url {string} 接口地址
   * @param params {object} 需要加密的参数对象
   */
    HttpUtil.apiSign = function (url, params) {
        if (params === void 0) { params = {}; }
        var convertUrl = url.trim();
        if (convertUrl.indexOf('?') === -1) {
            convertUrl += '?';
        }
        // 传入参数转换拼接字符串
        var postStr = getQueryString(params);
        var signedStr = genSignStr(convertUrl, postStr);
        var encryptStr = "sign=" + signedStr;
        var encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey);
        encryptSignStr = encodeURIComponent(encryptSignStr);
        return urlencode(convertUrl) + "&_p=" + encryptSignStr;
    };
    var HttpUtil_1;
    HttpUtil = HttpUtil_1 = __decorate([
        ccclass
    ], HttpUtil);
    return HttpUtil;
}(cc.Component));
exports.default = HttpUtil;
function responseHandler(response) {
    return response.data;
}
// 响应拦截器
// Rq.interceptors.response.use(responseHandler)
var config = {
    gameId: "100001",
    secretKey: "zDLsruVI",
    EK: "hui231%1"
};
var Crypoto = /** @class */ (function () {
    function Crypoto() {
        // 加密的向明值，自己根据项目实际情况定，需要跟后端开发保持一致
        this.keyHex = this.getHetKey();
    }
    Crypoto.prototype.getHetKey = function () {
        return CryptoJS.enc.Utf8.parse(config.EK);
    };
    /** DES加密 */
    Crypoto.prototype.encryptByDES = function (message, secret) {
        if (!message) {
            return message;
        }
        var key = secret ? CryptoJS.enc.Utf8.parse(secret) : this.keyHex;
        var encrypted = CryptoJS.DES.encrypt(message, key, {
            mode: CryptoJS.mode.ECB,
            padding: CryptoJS.pad.Pkcs7
        });
        return encrypted.toString();
    };
    /** DES解密 */
    Crypoto.prototype.decryptByDES = function (message, secret) {
        var key = secret ? CryptoJS.enc.Utf8.parse(secret) : this.keyHex;
        var decrypted = CryptoJS.DES.decrypt({
            ciphertext: CryptoJS.enc.Base64.parse(message)
        }, key, {
            mode: CryptoJS.mode.ECB,
            padding: CryptoJS.pad.Pkcs7
        });
        return decrypted.toString(CryptoJS.enc.Utf8);
    };
    /** hmacSHA256加密 */
    Crypoto.prototype.hmacSha256 = function (message, secret) {
        var keyHex = secret ? CryptoJS.enc.Utf8.parse(secret) : this.keyHex;
        var hash = CryptoJS.HmacSHA256(message, keyHex);
        return hash.toString();
    };
    /** hmacSHA256验证 */
    Crypoto.prototype.verifyHmacSha256 = function (message, signature) {
        var hash = CryptoJS.HmacSHA256(message, this.keyHex);
        return hash.toString() === signature;
    };
    /** CBC加密 */
    Crypoto.prototype.encryptCBC = function (word) {
        if (!word) {
            return word;
        }
        var srcs = CryptoJS.enc.Utf8.parse(word);
        var encrypted = CryptoJS.AES.encrypt(srcs, this.keyHex, {
            iv: this.keyHex,
            mode: CryptoJS.mode.CBC,
            padding: CryptoJS.pad.ZeroPadding
        });
        return encrypted.toString();
    };
    /** CBC解密 */
    Crypoto.prototype.decryptCBC = function (word) {
        if (!word) {
            return word;
        }
        var encryptedHexStr = CryptoJS.enc.Hex.parse(word);
        var srcs = CryptoJS.enc.Base64.stringify(encryptedHexStr);
        var decrypt = CryptoJS.AES.decrypt(srcs, this.keyHex, {
            iv: this.keyHex,
            mode: CryptoJS.mode.CBC,
            padding: CryptoJS.pad.ZeroPadding
        });
        var decryptedStr = decrypt.toString(CryptoJS.enc.Utf8);
        return decryptedStr.toString();
    };
    return Crypoto;
}());
var fxCry = new Crypoto();
function isEmpty(data) {
    return data === "" || data === null || data === undefined || data.length === 0 || JSON.stringify(data) == "{}";
}
function getQueryString(obj) {
    // 首先对对象的键进行排序并过滤空值
    var sortedKeys = Object.keys(obj).sort();
    var sortedObj = {};
    for (var i = 0; i < sortedKeys.length; i++) {
        if (isEmpty(obj[sortedKeys[i]])) {
            continue;
        }
        sortedObj[sortedKeys[i]] = obj[sortedKeys[i]];
    }
    // 然后将排序后的对象转换为查询字符串
    var params = [];
    for (var key in sortedObj) {
        params.push(encodeURIComponent(key) + "=" + encodeURIComponent(sortedObj[key]));
    }
    return params.join('&');
}
/**
 * 组装签名字符串
 * @param string url: 请求地址
 * @param string postStr: post参数的a=1&b=2
 * @returns
 */
function genSignStr(url, postStr) {
    var lessUrl = url.replace('?', '');
    lessUrl = lessUrl + "&" + postStr;
    return encodeURIComponent(fxCry.hmacSha256(lessUrl));
}
// 对参数进行统一urlencode
function urlencode(url) {
    var _a = url.split("?", 2), baseUrl = _a[0], queryString = _a[1];
    var params = new URLSearchParams(queryString);
    return baseUrl + "?" + params.toString();
}

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 22820 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/GameData.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, 'f2f0bI5PsVI+o18xF6G+KVa', 'GameData');
// Script/GameData.ts

"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var GameData = /** @class */ (function (_super) {
    __extends(GameData, _super);
    function GameData() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    GameData_1 = GameData;
    // 0.15 0.37 0.8  获得三个星星  -2167.675  -2054  两个尺寸的屏幕的补偿值
    GameData.prototype.onLoad = function () {
        if (GameData_1._instance == null) {
            GameData_1._instance = this;
            // cc.game.addPersistRootNode(this.node);
            this.AudioManager = this.node.getComponent('BallAudioManager');
        }
        else {
            this.node.destroy();
            return;
        }
    };
    GameData.prototype.start = function () {
        //GAME_DATA 废弃了，暂时不删除以防后面修改回 一整局传一次
        this.GAME_DATA = [];
        this.GM_INFO_init(); //GM_INFO存储 一些游戏数据，这些数据至少是当局内不会重置清零的
        this.LEVEL_init(); //每局游戏内游戏参数，可复活清零或者重玩清零
        this.BLOCK_INFO_init(); //每个游戏不同，此游戏为跳板参数
        this.CLICK_init(); //埋点数据,用于上传重要数据
    };
    GameData.prototype.GM_INFO_init = function () {
        this.GM_INFO = {
            // isEnd: false,
            mean_Time: 0,
            total: 0,
            currSeed: 203213,
            gameId: '100001',
            userId: "",
            guide: true,
            url: "https://dev.api.sparkus.cn",
            custom: 0,
            //从这开始
            jumpUpTime: 0.5,
            jumpDownTime: 0.4,
            jumpHeight: 150,
            blockMin: 30,
            blockMax: -10,
            blockScale: 5,
            distanceMin: 100,
            distanceMax: 110,
            life: 3,
            levelMax: 1,
            difficultyMax: 1,
            score: 0,
            success: true,
            probation: true //试用期
        };
    };
    GameData.prototype.CLICK_init = function () {
        GameData_1._instance.CLICK_DATA =
            {
                type: 1,
                level: 0,
                block: 0,
                percent: 0,
                getScore: 0,
                totalScore: 0,
                difficulty: 0,
                height: false,
                combo: 0,
                accuracy: 0,
                jumps: 0,
                timer: 0,
                fake: false,
                fakeSpeed: 0,
                speed: 0,
                round: 0,
            };
    };
    GameData.prototype.LEVEL_init = function () {
        this.LEVEL_INFO =
            {
                speed: 1,
                addSpeed: 0.015,
                reduceSpeed: 0,
                jiansu: 3,
                round1: 10,
                round2: 20,
                round3: 30,
                doubleSuccess: 3,
                fastSpeed: 3.5,
                slowSpeed: 4.5,
                doubleHit: 1,
                doubleAdd: 0.05,
                doubleMax: 2,
                layer: 100,
                layerAdd: 2,
                star1: 0.2,
                star2: 0.4,
                star3: 0.8,
                scoreMax: 120000,
                levelMax: 1,
                difficultyMax: 1 //最高难度系数
            };
    };
    GameData.prototype.BLOCK_INFO_init = function () {
        this.BLOCK_INFO = [
            {
                name: "block1",
                speed: 8,
                thickness: false,
            },
            {
                name: "block2",
                speed: 9,
                thickness: false,
            },
            {
                name: "block3",
                speed: 8,
                thickness: false,
            },
            {
                name: "block4",
                speed: 9,
                thickness: false,
            },
            {
                name: "block5",
                speed: 8,
                thickness: false,
            },
            {
                name: "block6",
                speed: 8,
                thickness: false,
            },
            {
                name: "block7",
                speed: 10,
                thickness: true,
            },
            {
                name: "block8",
                speed: 10,
                thickness: true,
            },
            {
                name: "block9",
                speed: 10,
                thickness: true,
            },
            {
                name: "block10",
                speed: 10,
                thickness: true,
            },
            {
                name: "block11",
                speed: 10,
                thickness: true,
            },
            {
                name: "block12",
                speed: 10,
                thickness: true,
            },
            {
                name: "block0",
                speed: 14,
                thickness: false,
            },
        ];
    };
    var GameData_1;
    GameData = GameData_1 = __decorate([
        ccclass
    ], GameData);
    return GameData;
}(cc.Component));
exports.default = GameData;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 18840 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, '7a231Rz0d9LBYYgY3bDYlLB', 'use_v2.1-2.2.1_cc.Toggle_event');
// migration/use_v2.1-2.2.1_cc.Toggle_event.js

"use strict";

/*
 * This script is automatically generated by Cocos Creator and is only used for projects compatible with the v2.1.0 ～ 2.2.1 version.
 * You do not need to manually add this script in any other project.
 * If you don't use cc.Toggle in your project, you can delete this script directly.
 * If your project is hosted in VCS such as git, submit this script together.
 *
 * 此脚本由 Cocos Creator 自动生成，仅用于兼容 v2.1.0 ~ 2.2.1 版本的工程，
 * 你无需在任何其它项目中手动添加此脚本。
 * 如果你的项目中没用到 Toggle，可直接删除该脚本。
 * 如果你的项目有托管于 git 等版本库，请将此脚本一并上传。
 */
if (cc.Toggle) {
  // Whether to trigger 'toggle' and 'checkEvents' events when modifying 'toggle.isChecked' in the code
  // 在代码中修改 'toggle.isChecked' 时是否触发 'toggle' 与 'checkEvents' 事件
  cc.Toggle._triggerEventInScript_isChecked = true;
}

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcbWlncmF0aW9uXFx1c2VfdjIuMS0yLjIuMV9jYy5Ub2dnbGVfZXZlbnQuanMiXSwibmFtZXMiOlsiY2MiLCJUb2dnbGUiLCJfdHJpZ2dlckV2ZW50SW5TY3JpcHRfaXNDaGVja2VkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQSxJQUFJQSxFQUFFLENBQUNDLE1BQVAsRUFBZTtBQUNYO0FBQ0E7QUFDQUQsRUFBQUEsRUFBRSxDQUFDQyxNQUFILENBQVVDLCtCQUFWLEdBQTRDLElBQTVDO0FBQ0giLCJzb3VyY2VSb290IjoiLyIsInNvdXJjZXNDb250ZW50IjpbIi8qXHJcbiAqIFRoaXMgc2NyaXB0IGlzIGF1dG9tYXRpY2FsbHkgZ2VuZXJhdGVkIGJ5IENvY29zIENyZWF0b3IgYW5kIGlzIG9ubHkgdXNlZCBmb3IgcHJvamVjdHMgY29tcGF0aWJsZSB3aXRoIHRoZSB2Mi4xLjAg772eIDIuMi4xIHZlcnNpb24uXHJcbiAqIFlvdSBkbyBub3QgbmVlZCB0byBtYW51YWxseSBhZGQgdGhpcyBzY3JpcHQgaW4gYW55IG90aGVyIHByb2plY3QuXHJcbiAqIElmIHlvdSBkb24ndCB1c2UgY2MuVG9nZ2xlIGluIHlvdXIgcHJvamVjdCwgeW91IGNhbiBkZWxldGUgdGhpcyBzY3JpcHQgZGlyZWN0bHkuXHJcbiAqIElmIHlvdXIgcHJvamVjdCBpcyBob3N0ZWQgaW4gVkNTIHN1Y2ggYXMgZ2l0LCBzdWJtaXQgdGhpcyBzY3JpcHQgdG9nZXRoZXIuXHJcbiAqXHJcbiAqIOatpOiEmuacrOeUsSBDb2NvcyBDcmVhdG9yIOiHquWKqOeUn+aIkO+8jOS7heeUqOS6juWFvOWuuSB2Mi4xLjAgfiAyLjIuMSDniYjmnKznmoTlt6XnqIvvvIxcclxuICog5L2g5peg6ZyA5Zyo5Lu75L2V5YW25a6D6aG555uu5Lit5omL5Yqo5re75Yqg5q2k6ISa5pys44CCXHJcbiAqIOWmguaenOS9oOeahOmhueebruS4reayoeeUqOWIsCBUb2dnbGXvvIzlj6/nm7TmjqXliKDpmaTor6XohJrmnKzjgIJcclxuICog5aaC5p6c5L2g55qE6aG555uu5pyJ5omY566h5LqOIGdpdCDnrYnniYjmnKzlupPvvIzor7flsIbmraTohJrmnKzkuIDlubbkuIrkvKDjgIJcclxuICovXHJcblxyXG5pZiAoY2MuVG9nZ2xlKSB7XHJcbiAgICAvLyBXaGV0aGVyIHRvIHRyaWdnZXIgJ3RvZ2dsZScgYW5kICdjaGVja0V2ZW50cycgZXZlbnRzIHdoZW4gbW9kaWZ5aW5nICd0b2dnbGUuaXNDaGVja2VkJyBpbiB0aGUgY29kZVxyXG4gICAgLy8g5Zyo5Luj56CB5Lit5L+u5pS5ICd0b2dnbGUuaXNDaGVja2VkJyDml7bmmK/lkKbop6blj5EgJ3RvZ2dsZScg5LiOICdjaGVja0V2ZW50cycg5LqL5Lu2XHJcbiAgICBjYy5Ub2dnbGUuX3RyaWdnZXJFdmVudEluU2NyaXB0X2lzQ2hlY2tlZCA9IHRydWU7XHJcbn1cclxuIl19
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/Load.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, '08fd79IH4NDy6e43JUK4PUm', 'Load');
// Script/Load.ts

"use strict";
// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var GameData_1 = require("./GameData");
var AudioManager_1 = require("./tool/AudioManager");
var GameTool_1 = require("./tool/GameTool");
var share_1 = require("./tool/share");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.label = null;
        _this.text = 'hello';
        return _this;
        // update (dt) {}
    }
    // onLoad () {}
    NewClass.prototype.start = function () {
        GameTool_1.GameTool.Authentication();
        share_1.WeChat.setShare(location.href);
    };
    NewClass.prototype.click = function () {
        AudioManager_1.default._instance.playMusicGame();
        if (GameData_1.default._instance.GM_INFO.probation) {
            cc.director.loadScene("GuideScene");
        }
        else {
            cc.director.loadScene("GameScene");
        }
    };
    NewClass.prototype.openRank = function () {
        AudioManager_1.default._instance.playMusicGame();
        cc.director.loadScene("RankScene");
    };
    __decorate([
        property(cc.Label)
    ], NewClass.prototype, "label", void 0);
    __decorate([
        property
    ], NewClass.prototype, "text", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxMb2FkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxvQkFBb0I7QUFDcEIsd0VBQXdFO0FBQ3hFLG1CQUFtQjtBQUNuQixrRkFBa0Y7QUFDbEYsOEJBQThCO0FBQzlCLGtGQUFrRjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRWxGLHVDQUFrQztBQUNsQyxvREFBK0M7QUFDL0MsNENBQTJDO0FBRTNDLHNDQUFzQztBQUVoQyxJQUFBLEtBQXNCLEVBQUUsQ0FBQyxVQUFVLEVBQWxDLE9BQU8sYUFBQSxFQUFFLFFBQVEsY0FBaUIsQ0FBQztBQUcxQztJQUFzQyw0QkFBWTtJQUFsRDtRQUFBLHFFQWdDQztRQTdCRyxXQUFLLEdBQWEsSUFBSSxDQUFDO1FBR3ZCLFVBQUksR0FBVyxPQUFPLENBQUM7O1FBeUJ2QixpQkFBaUI7SUFDckIsQ0FBQztJQXhCRyxlQUFlO0lBRWYsd0JBQUssR0FBTDtRQUNJLG1CQUFRLENBQUMsY0FBYyxFQUFFLENBQUM7UUFDMUIsY0FBTSxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDbkMsQ0FBQztJQUVELHdCQUFLLEdBQUw7UUFDSSxzQkFBWSxDQUFDLFNBQVMsQ0FBQyxhQUFhLEVBQUUsQ0FBQztRQUN2QyxJQUFHLGtCQUFRLENBQUMsU0FBUyxDQUFDLE9BQU8sQ0FBQyxTQUFTLEVBQUM7WUFDcEMsRUFBRSxDQUFDLFFBQVEsQ0FBQyxTQUFTLENBQUMsWUFBWSxDQUFDLENBQUM7U0FDdkM7YUFDRztZQUNBLEVBQUUsQ0FBQyxRQUFRLENBQUMsU0FBUyxDQUFDLFdBQVcsQ0FBQyxDQUFDO1NBQ3RDO0lBQ0wsQ0FBQztJQUlELDJCQUFRLEdBQVI7UUFDSSxzQkFBWSxDQUFDLFNBQVMsQ0FBQyxhQUFhLEVBQUUsQ0FBQztRQUN2QyxFQUFFLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUN2QyxDQUFDO0lBM0JEO1FBREMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxLQUFLLENBQUM7MkNBQ0k7SUFHdkI7UUFEQyxRQUFROzBDQUNjO0lBTk4sUUFBUTtRQUQ1QixPQUFPO09BQ2EsUUFBUSxDQWdDNUI7SUFBRCxlQUFDO0NBaENELEFBZ0NDLENBaENxQyxFQUFFLENBQUMsU0FBUyxHQWdDakQ7a0JBaENvQixRQUFRIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIvIiwic291cmNlc0NvbnRlbnQiOlsiLy8gTGVhcm4gVHlwZVNjcmlwdDpcclxuLy8gIC0gaHR0cHM6Ly9kb2NzLmNvY29zLmNvbS9jcmVhdG9yL21hbnVhbC9lbi9zY3JpcHRpbmcvdHlwZXNjcmlwdC5odG1sXHJcbi8vIExlYXJuIEF0dHJpYnV0ZTpcclxuLy8gIC0gaHR0cHM6Ly9kb2NzLmNvY29zLmNvbS9jcmVhdG9yL21hbnVhbC9lbi9zY3JpcHRpbmcvcmVmZXJlbmNlL2F0dHJpYnV0ZXMuaHRtbFxyXG4vLyBMZWFybiBsaWZlLWN5Y2xlIGNhbGxiYWNrczpcclxuLy8gIC0gaHR0cHM6Ly9kb2NzLmNvY29zLmNvbS9jcmVhdG9yL21hbnVhbC9lbi9zY3JpcHRpbmcvbGlmZS1jeWNsZS1jYWxsYmFja3MuaHRtbFxyXG5cclxuaW1wb3J0IEdhbWVEYXRhIGZyb20gXCIuL0dhbWVEYXRhXCI7XHJcbmltcG9ydCBBdWRpb01hbmFnZXIgZnJvbSBcIi4vdG9vbC9BdWRpb01hbmFnZXJcIjtcclxuaW1wb3J0IHsgR2FtZVRvb2wgfSBmcm9tIFwiLi90b29sL0dhbWVUb29sXCI7XHJcbmltcG9ydCB7IFN0b3JhZ2VNZXNzYWdlIH0gZnJvbSBcIi4vdG9vbC9TdG9yYWdlXCI7XHJcbmltcG9ydCB7IFdlQ2hhdCB9IGZyb20gXCIuL3Rvb2wvc2hhcmVcIjtcclxuXHJcbmNvbnN0IHtjY2NsYXNzLCBwcm9wZXJ0eX0gPSBjYy5fZGVjb3JhdG9yO1xyXG5cclxuQGNjY2xhc3NcclxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgTmV3Q2xhc3MgZXh0ZW5kcyBjYy5Db21wb25lbnQge1xyXG5cclxuICAgIEBwcm9wZXJ0eShjYy5MYWJlbClcclxuICAgIGxhYmVsOiBjYy5MYWJlbCA9IG51bGw7XHJcblxyXG4gICAgQHByb3BlcnR5XHJcbiAgICB0ZXh0OiBzdHJpbmcgPSAnaGVsbG8nO1xyXG5cclxuICAgIC8vIG9uTG9hZCAoKSB7fVxyXG5cclxuICAgIHN0YXJ0ICgpIHtcclxuICAgICAgICBHYW1lVG9vbC5BdXRoZW50aWNhdGlvbigpO1xyXG4gICAgICAgIFdlQ2hhdC5zZXRTaGFyZShsb2NhdGlvbi5ocmVmKTtcclxuICAgIH1cclxuXHJcbiAgICBjbGljaygpe1xyXG4gICAgICAgIEF1ZGlvTWFuYWdlci5faW5zdGFuY2UucGxheU11c2ljR2FtZSgpO1xyXG4gICAgICAgIGlmKEdhbWVEYXRhLl9pbnN0YW5jZS5HTV9JTkZPLnByb2JhdGlvbil7XHJcbiAgICAgICAgICAgIGNjLmRpcmVjdG9yLmxvYWRTY2VuZShcIkd1aWRlU2NlbmVcIik7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2V7XHJcbiAgICAgICAgICAgIGNjLmRpcmVjdG9yLmxvYWRTY2VuZShcIkdhbWVTY2VuZVwiKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG5cclxuXHJcbiAgICBvcGVuUmFuaygpe1xyXG4gICAgICAgIEF1ZGlvTWFuYWdlci5faW5zdGFuY2UucGxheU11c2ljR2FtZSgpO1xyXG4gICAgICAgIGNjLmRpcmVjdG9yLmxvYWRTY2VuZShcIlJhbmtTY2VuZVwiKTtcclxuICAgIH1cclxuICAgIC8vIHVwZGF0ZSAoZHQpIHt9XHJcbn1cclxuIl19
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/ListView/List.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, 'd5421HgLShFKIjj5f18m1mi', 'List');
// Script/ListView/List.ts

"use strict";
// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.StartAxisType = exports.ListType = void 0;
var ItemRender_1 = require("./ItemRender");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
/**列表排列方式 */
var ListType;
(function (ListType) {
    /**水平排列 */
    ListType[ListType["Horizontal"] = 1] = "Horizontal";
    /**垂直排列 */
    ListType[ListType["Vertical"] = 2] = "Vertical";
    /**网格排列 */
    ListType[ListType["Grid"] = 3] = "Grid";
})(ListType = exports.ListType || (exports.ListType = {}));
/**网格布局中的方向 */
var StartAxisType;
(function (StartAxisType) {
    /**水平排列 */
    StartAxisType[StartAxisType["Horizontal"] = 1] = "Horizontal";
    /**垂直排列 */
    StartAxisType[StartAxisType["Vertical"] = 2] = "Vertical";
})(StartAxisType = exports.StartAxisType || (exports.StartAxisType = {}));
/**
 * 列表
 * 根据cocos_example的listView改动而来
 * @author chenkai 2020.7.8
 * @example
 *  1.创建cocos的ScrollView组件，添加List，设置List属性即可
 *
 */
var List = /** @class */ (function (_super) {
    __extends(List, _super);
    function List() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        //==================== 属性面板 =========================
        /**列表选项 */
        _this.itemRender = null;
        /**排列方式 */
        _this.type = ListType.Vertical;
        /**网格布局中的方向 */
        _this.startAxis = StartAxisType.Horizontal;
        /**列表项之间X间隔 */
        _this.spaceX = 0;
        /**列表项之间Y间隔 */
        _this.spaceY = 0;
        /**上间距 */
        _this.padding_top = 0;
        /**下间距 */
        _this.padding_buttom = 0;
        /**左间距 */
        _this.padding_left = 0;
        _this._padding = 0;
        /**右间距 */
        _this.padding_right = 0;
        //====================== 滚动容器 ===============================
        /**列表滚动容器 */
        _this.scrollView = null;
        /**scrollView的内容容器 */
        _this.content = null;
        //======================== 列表项 ===========================
        /**列表项数据 */
        _this.itemDataList = [];
        /**应创建的实例数量 */
        _this.spawnCount = 0;
        /**存放列表项实例的数组 */
        _this.itemList = [];
        /**item的高度 */
        _this.itemHeight = 0;
        /**item的宽度 */
        _this.itemWidth = 0;
        /**存放不再使用中的列表项 */
        _this.itemPool = [];
        //======================= 计算参数 ==========================
        /**距离scrollView中心点的距离，超过这个距离的item会被重置，一般设置为 scrollVIew.height/2 + item.heigt/2 + space，因为这个距离item正好超出scrollView显示范围 */
        _this.halfScrollView = 0;
        /**上一次content的X值，用于和现在content的X值比较，得出是向左还是向右滚动 */
        _this.lastContentPosX = 0;
        /**上一次content的Y值，用于和现在content的Y值比较，得出是向上还是向下滚动 */
        _this.lastContentPosY = 0;
        /**网格行数 */
        _this.gridRow = 0;
        /**网格列数 */
        _this.gridCol = 0;
        /**刷新时间，单位s */
        _this.updateTimer = 0;
        /**刷新间隔，单位s */
        _this.updateInterval = 0.1;
        /**是否滚动容器 */
        _this.bScrolling = false;
        /**刷新的函数 */
        _this.updateFun = function () { };
        return _this;
    }
    List.prototype.onLoad = function () {
        this.itemHeight = this.itemRender.height;
        this.itemWidth = this.itemRender.width;
        this.scrollView = this.node.getComponent(cc.ScrollView);
        this.content = this.scrollView.content;
        this.content.anchorX = 0;
        this.content.anchorY = 1;
        this.content.removeAllChildren();
        this.scrollView.node.on("scrolling", this.onScrolling, this);
    };
    /**
     * 列表数据 (列表数据复制使用，如果列表数据改变，则需要重新设置一遍数据)
     * @param itemDataList item数据列表
     */
    List.prototype.setData = function (itemDataList) {
        this.itemDataList = itemDataList.slice();
        this.updateContent();
    };
    /**计算列表的各项参数 */
    List.prototype.countListParam = function () {
        var dataLen = this.itemDataList.length;
        if (this.type == ListType.Vertical) {
            this.scrollView.horizontal = false;
            this.scrollView.vertical = true;
            this.content.width = this.content.parent.width;
            this.content.height = dataLen * this.itemHeight + (dataLen - 1) * this.spaceY + this.padding_top + this.padding_buttom;
            this.spawnCount = Math.round(this.scrollView.node.height / (this.itemHeight + this.spaceY)) + 5; //计算创建的item实例数量，比当前scrollView容器能放下的item数量再加上2个
            this.halfScrollView = this.scrollView.node.height / 2 + this.itemHeight / 2 + this.spaceY; //计算bufferZone，item的显示范围
            this.updateFun = this.updateV;
        }
        else if (this.type == ListType.Horizontal) {
            this.scrollView.horizontal = true;
            this.scrollView.vertical = false;
            this.content.width = dataLen * this.itemWidth + (dataLen - 1) * this.spaceX + this.padding_left + this.padding_right;
            this.content.height = this.content.parent.height;
            this.spawnCount = Math.round(this.scrollView.node.width / (this.itemWidth + this.spaceX)) + 2;
            this.halfScrollView = this.scrollView.node.width / 2 + this.itemWidth / 2 + this.spaceX;
            this.updateFun = this.udpateH;
        }
        else if (this.type == ListType.Grid) {
            if (this.startAxis == StartAxisType.Vertical) {
                this.scrollView.horizontal = false;
                this.scrollView.vertical = true;
                this.content.width = this.content.parent.width;
                //如果left和right间隔过大，导致放不下一个item，则left和right都设置为0，相当于不生效
                if (this.padding_left + this.padding_right + this.itemWidth + this.spaceX > this.content.width) {
                    this.padding_left = 0;
                    this.padding_right = 0;
                    console.error("padding_left或padding_right过大");
                }
                this.gridCol = Math.floor((this.content.width - this.padding_left - this.padding_right) / (this.itemWidth + this.spaceX));
                this.gridRow = Math.ceil(dataLen / this.gridCol);
                this.content.height = this.gridRow * this.itemHeight + (this.gridRow - 1) * this.spaceY + this.padding_top + this.padding_buttom;
                this.spawnCount = Math.round(this.scrollView.node.height / (this.itemHeight + this.spaceY)) * this.gridCol + this.gridCol * 2;
                this.halfScrollView = this.scrollView.node.height / 2 + this.itemHeight / 2 + this.spaceY;
                this.updateFun = this.updateGrid_V;
            }
            else if (this.startAxis == StartAxisType.Horizontal) {
                this.scrollView.horizontal = true;
                this.scrollView.vertical = false;
                //计算高间隔
                this.content.height = this.content.parent.height;
                //如果left和right间隔过大，导致放不下一个item，则left和right都设置为0，相当于不生效
                if (this.padding_top + this.padding_buttom + this.itemHeight + this.spaceY > this.content.height) {
                    this.padding_top = 0;
                    this.padding_buttom = 0;
                    console.error("padding_top或padding_buttom过大");
                }
                this.gridRow = Math.floor((this.content.height - this.padding_top - this.padding_buttom) / (this.itemHeight + this.spaceY));
                this.gridCol = Math.ceil(dataLen / this.gridRow);
                this.content.width = this.gridCol * this.itemWidth + (this.gridCol - 1) * this.spaceX + this.padding_left + this.padding_right;
                this.spawnCount = Math.round(this.scrollView.node.width / (this.itemWidth + this.spaceX)) * this.gridRow + this.gridRow * 2;
                this.halfScrollView = this.scrollView.node.width / 2 + this.itemWidth / 2 + this.spaceX;
                this.updateFun = this.updateGrid_H;
            }
        }
    };
    /**
     * 创建列表
     * @param startIndex 起始显示的数据索引 0表示第一项
     * @param offset     scrollView偏移量
     */
    List.prototype.createList = function (startIndex, offset) {
        //当需要显示的数据长度 > 虚拟列表长度， 删除最末尾几个数据时，列表需要重置位置到scrollView最底端
        if (this.itemDataList.length > this.spawnCount && (startIndex + this.spawnCount - 1) >= this.itemDataList.length) {
            startIndex = this.itemDataList.length - this.spawnCount;
            offset = this.scrollView.getMaxScrollOffset();
            //当需要显示的数据长度 <= 虚拟列表长度， 隐藏多余的虚拟列表项 
        }
        else if (this.itemDataList.length <= this.spawnCount) {
            startIndex = 0;
        }
        for (var i = 0; i < this.spawnCount; i++) {
            var item = void 0;
            //需要显示的数据索引在数据范围内，则item实例显示出来
            if (i + startIndex < this.itemDataList.length) {
                if (this.itemList[i] == null) {
                    item = this.getItem();
                    this.itemList.push(item);
                    item.parent = this.content;
                }
                else {
                    item = this.itemList[i];
                }
                //需要显示的数据索引超过了数据范围，则item实例隐藏起来
            }
            else {
                //item实例数量 > 需要显示的数据量
                if (this.itemList.length > (this.itemDataList.length - startIndex)) {
                    item = this.itemList.pop();
                    item.removeFromParent();
                    this.itemPool.push(item);
                }
                continue;
            }
            var itemRender = item.getComponent(ItemRender_1.default);
            itemRender.itemIndex = i + startIndex;
            itemRender.data = this.itemDataList[i + startIndex];
            itemRender.dataChanged();
            if (this.type == ListType.Vertical) {
                //因为content的锚点X是0，所以item的x值是content.with/2表示居中，锚点Y是1，所以item的y值从content顶部向下是0到负无穷。所以item.y= -item.height/2时，是在content的顶部。
                item.setPosition(this.content.width / 2, -item.height * (0.5 + i + startIndex) - this.spaceY * (i + startIndex) - this.padding_top);
            }
            else if (this.type == ListType.Horizontal) {
                item.setPosition(item.width * (0.5 + i + startIndex) + this.spaceX * (i + startIndex) + this.padding_left, -this.content.height / 2);
            }
            else if (this.type == ListType.Grid) {
                if (this.startAxis == StartAxisType.Vertical) {
                    var row = Math.floor((i + startIndex) / this.gridCol);
                    var col = (i + startIndex) % this.gridCol;
                    item.setPosition(item.width * (0.5 + col) + this.spaceX * col + this.padding_left, -item.height * (0.5 + row) - this.spaceY * row - this.padding_top);
                    item.opacity = 255;
                }
                else if (this.startAxis == StartAxisType.Horizontal) {
                    var row = (i + startIndex) % this.gridRow;
                    var col = Math.floor((i + startIndex) / this.gridRow);
                    item.setPosition(item.width * (0.5 + col) + this.spaceX * col + this.padding_left, -item.height * (0.5 + row) - this.spaceY * row - this.padding_top);
                    item.opacity = 255;
                }
            }
        }
        this.scrollView.scrollToOffset(offset);
    };
    /**获取一个列表项 */
    List.prototype.getItem = function () {
        if (this.itemPool.length == 0) {
            return cc.instantiate(this.itemRender);
        }
        else {
            return this.itemPool.pop();
        }
    };
    List.prototype.update = function (dt) {
        if (this.bScrolling == false) {
            return;
        }
        this.updateTimer += dt;
        if (this.updateTimer < this.updateInterval) {
            return;
        }
        this.updateTimer = 0;
        this.bScrolling = false;
        this.updateFun();
    };
    List.prototype.onScrolling = function () {
        this.bScrolling = true;
    };
    /**垂直排列 */
    List.prototype.updateV = function () {
        var items = this.itemList;
        var item;
        var bufferZone = this.halfScrollView;
        var isUp = this.scrollView.content.y > this.lastContentPosY;
        var offset = (this.itemHeight + this.spaceY) * items.length;
        for (var i = 0; i < items.length; i++) {
            item = items[i];
            var viewPos = this.getPositionInView(item);
            if (isUp) {
                //item上滑时，超出了scrollView上边界，将item移动到下方复用，item移动到下方的位置必须不超过content的下边界
                if (viewPos.y > bufferZone && item.y - offset - this.padding_buttom > -this.content.height) {
                    var itemRender = item.getComponent(ItemRender_1.default);
                    var itemIndex = itemRender.itemIndex + items.length;
                    itemRender.itemIndex = itemIndex;
                    itemRender.data = this.itemDataList[itemIndex];
                    itemRender.dataChanged();
                    item.y = item.y - offset;
                }
            }
            else {
                //item下滑时，超出了scrollView下边界，将item移动到上方复用，item移动到上方的位置必须不超过content的上边界
                if (viewPos.y < -bufferZone && item.y + offset + this.padding_top < 0) {
                    var itemRender = item.getComponent(ItemRender_1.default);
                    var itemIndex = itemRender.itemIndex - items.length;
                    itemRender.itemIndex = itemIndex;
                    itemRender.data = this.itemDataList[itemIndex];
                    itemRender.dataChanged();
                    item.y = item.y + offset;
                }
            }
        }
        this.lastContentPosY = this.scrollView.content.y;
    };
    /**水平排列 */
    List.prototype.udpateH = function () {
        var items = this.itemList;
        var item;
        var bufferZone = this.halfScrollView;
        var isRight = this.scrollView.content.x > this.lastContentPosX;
        var offset = (this.itemWidth + this.spaceX) * items.length;
        for (var i = 0; i < items.length; i++) {
            item = items[i];
            var viewPos = this.getPositionInView(item);
            if (isRight) {
                //item右滑时，超出了scrollView右边界，将item移动到左方复用，item移动到左方的位置必须不超过content的左边界
                if (viewPos.x > bufferZone && item.x - offset - this.padding_left > 0) {
                    var itemRender = item.getComponent(ItemRender_1.default);
                    var itemIndex = itemRender.itemIndex - items.length;
                    itemRender.itemIndex = itemIndex;
                    itemRender.data = this.itemDataList[itemIndex];
                    itemRender.dataChanged();
                    item.x = item.x - offset;
                }
            }
            else {
                //item左滑时，超出了scrollView左边界，将item移动到右方复用，item移动到右方的位置必须不超过content的右边界
                if (viewPos.x < -bufferZone && item.x + offset + this.padding_right < this.content.width) {
                    var itemRender = item.getComponent(ItemRender_1.default);
                    var itemIndex = itemRender.itemIndex + items.length;
                    itemRender.itemIndex = itemIndex;
                    itemRender.data = this.itemDataList[itemIndex];
                    itemRender.dataChanged();
                    item.x = item.x + offset;
                }
            }
        }
        this.lastContentPosX = this.scrollView.content.x;
    };
    /**网格垂直排列 */
    List.prototype.updateGrid_V = function () {
        var items = this.itemList;
        var item;
        var bufferZone = this.halfScrollView;
        var isUp = this.scrollView.content.y > this.lastContentPosY;
        var offset = (this.itemHeight + this.spaceY) * (this.spawnCount / this.gridCol);
        for (var i = 0; i < items.length; i++) {
            item = items[i];
            var viewPos = this.getPositionInView(item);
            if (isUp) {
                //item上滑时，超出了scrollView上边界，将item移动到下方复用，item移动到下方的位置必须不超过content的下边界
                if (viewPos.y > bufferZone && item.y - offset - this.padding_buttom > -this.content.height) {
                    var itemRender = item.getComponent(ItemRender_1.default);
                    var itemIndex = itemRender.itemIndex + (this.spawnCount / this.gridCol) * this.gridCol;
                    if (this.itemDataList[itemIndex] != null) {
                        item.y = item.y - offset;
                        itemRender.itemIndex = itemIndex;
                        itemRender.data = this.itemDataList[itemIndex];
                        itemRender.dataChanged();
                        item.opacity = 255;
                    }
                    else {
                        item.y = item.y - offset;
                        itemRender.itemIndex = itemIndex;
                        item.opacity = 0;
                    }
                }
            }
            else { //item下滑时，超出了scrollView下边界，将item移动到上方复用，item移动到上方的位置必须不超过content的上边界
                if (viewPos.y < -bufferZone && item.y + offset + this.padding_top < 0) {
                    var itemRender = item.getComponent(ItemRender_1.default);
                    var itemIndex = itemRender.itemIndex - (this.spawnCount / this.gridCol) * this.gridCol;
                    if (this.itemDataList[itemIndex] != null) {
                        item.y = item.y + offset;
                        itemRender.itemIndex = itemIndex;
                        itemRender.data = this.itemDataList[itemIndex];
                        itemRender.dataChanged();
                        item.opacity = 255;
                    }
                    else {
                        item.y = item.y + offset;
                        itemRender.itemIndex = itemIndex;
                        item.opacity = 0;
                    }
                }
            }
        }
        this.lastContentPosY = this.scrollView.content.y;
    };
    /**网格水平排列 */
    List.prototype.updateGrid_H = function () {
        var items = this.itemList;
        var item;
        var bufferZone = this.halfScrollView;
        var isRight = this.scrollView.content.x > this.lastContentPosX;
        var offset = (this.itemWidth + this.spaceX) * (this.spawnCount / this.gridRow);
        for (var i = 0; i < items.length; i++) {
            item = items[i];
            var viewPos = this.getPositionInView(item);
            if (isRight) {
                //item右滑时，超出了scrollView右边界，将item移动到左方复用，item移动到左方的位置必须不超过content的左边界
                if (viewPos.x > bufferZone && item.x - offset - this.padding_left > 0) {
                    var itemRender = item.getComponent(ItemRender_1.default);
                    var itemIndex = itemRender.itemIndex - (this.spawnCount / this.gridRow) * this.gridRow;
                    if (this.itemDataList[itemIndex] != null) {
                        item.x = item.x - offset;
                        itemRender.itemIndex = itemIndex;
                        itemRender.data = this.itemDataList[itemIndex];
                        itemRender.dataChanged();
                        item.opacity = 255;
                    }
                    else {
                        item.x = item.x - offset;
                        itemRender.itemIndex = itemIndex;
                        item.opacity = 0;
                    }
                }
            }
            else {
                //item左滑时，超出了scrollView左边界，将item移动到右方复用，item移动到右方的位置必须不超过content的右边界
                if (viewPos.x < -bufferZone && item.x + offset + this.padding_right < this.content.width) {
                    var itemRender = item.getComponent(ItemRender_1.default);
                    var itemIndex = itemRender.itemIndex + (this.spawnCount / this.gridRow) * this.gridRow;
                    if (this.itemDataList[itemIndex] != null) {
                        item.x = item.x + offset;
                        itemRender.itemIndex = itemIndex;
                        itemRender.data = this.itemDataList[itemIndex];
                        itemRender.dataChanged();
                        item.opacity = 255;
                    }
                    else {
                        item.x = item.x + offset;
                        itemRender.itemIndex = itemIndex;
                        item.opacity = 0;
                    }
                }
            }
        }
        this.lastContentPosX = this.scrollView.content.x;
    };
    /**获取item在scrollView的局部坐标 */
    List.prototype.getPositionInView = function (item) {
        var worldPos = item.parent.convertToWorldSpaceAR(item.position);
        var viewPos = this.scrollView.node.convertToNodeSpaceAR(worldPos);
        return viewPos;
    };
    /**获取列表数据 */
    List.prototype.getListData = function () {
        return this.itemDataList;
    };
    /**
     * 增加一项数据到列表的末尾
     * @param data 数据
     */
    List.prototype.addItem = function (data) {
        this.itemDataList.push(data);
        this.updateContent();
    };
    /**
     * 增加一项数据到列表指定位置
     * @param index   位置，0表示第1项
     * @param data  数据
     */
    List.prototype.addItemAt = function (index, data) {
        if (this.itemDataList[index] != null || this.itemDataList.length == index) {
            this.itemDataList.splice(index, 1, data);
            this.updateContent();
        }
    };
    /**
     * 删除一项数据
     * @param index 删除项的位置 ,0表示第1项
     */
    List.prototype.deleteItem = function (index) {
        if (this.itemDataList[index] != null) {
            this.itemDataList.splice(index, 1);
            this.updateContent();
        }
    };
    /**
     * 改变一项数据
     * @param index   位置,0表示第1项
     * @param data  替换的数据
     */
    List.prototype.changeItem = function (index, data) {
        if (this.itemDataList[index] != null) {
            this.itemDataList[index] = data;
            this.updateContent();
        }
    };
    /**获取第一个Item的位置 */
    List.prototype.updateContent = function () {
        //显示列表实例为0个
        if (this.itemList.length == 0) {
            this.countListParam();
            this.createList(0, new cc.Vec2(0, 0));
            //显示列表的实例不为0个，则需要重新排列item实例数组
        }
        else {
            if (this.type == ListType.Vertical) {
                this.itemList.sort(function (a, b) {
                    return b.y - a.y;
                });
            }
            else if (this.type == ListType.Horizontal) {
                this.itemList.sort(function (a, b) {
                    return a.x - b.x;
                });
            }
            else if (this.type == ListType.Grid) {
                if (this.startAxis == StartAxisType.Vertical) {
                    this.itemList.sort(function (a, b) {
                        return a.x - b.x;
                    });
                    this.itemList.sort(function (a, b) {
                        return b.y - a.y;
                    });
                }
                else if (this.startAxis == StartAxisType.Horizontal) {
                    this.itemList.sort(function (a, b) {
                        return b.y - a.y;
                    });
                    this.itemList.sort(function (a, b) {
                        return a.x - b.x;
                    });
                }
            }
            this.countListParam();
            //获取第一个item实例需要显示的数据索引
            var startIndex = this.itemList[0].getComponent(ItemRender_1.default).itemIndex;
            if (this.type == ListType.Grid && this.startAxis == StartAxisType.Vertical) {
                startIndex += (startIndex + this.spawnCount) % this.gridCol;
            }
            else if (this.type == ListType.Grid && this.startAxis == StartAxisType.Horizontal) {
                startIndex += (startIndex + this.spawnCount) % this.gridRow;
            }
            //getScrollOffset()和scrollToOffset()的x值是相反的
            var offset = this.scrollView.getScrollOffset();
            offset.x = -offset.x;
            this.createList(startIndex, offset);
        }
    };
    /**销毁 */
    List.prototype.onDestroy = function () {
        //清理列表项
        var len = this.itemList.length;
        for (var i = 0; i < len; i++) {
            if (cc.isValid(this.itemList[i], true)) {
                this.itemList[i].destroy();
            }
        }
        this.itemList.length = 0;
        //清理对象池
        len = this.itemPool.length;
        for (var i = 0; i < len; i++) {
            if (cc.isValid(this.itemPool[i], true)) {
                this.itemPool[i].destroy();
            }
        }
        this.itemPool.length = 0;
        //清理列表数据
        this.itemDataList.length = 0;
    };
    __decorate([
        property({ type: cc.Node, tooltip: "列表项" })
    ], List.prototype, "itemRender", void 0);
    __decorate([
        property({ type: cc.Enum(ListType), tooltip: "排列方式" })
    ], List.prototype, "type", void 0);
    __decorate([
        property({ type: cc.Enum(StartAxisType), tooltip: "网格布局中的方向", visible: function () { return this.type == ListType.Grid; } })
    ], List.prototype, "startAxis", void 0);
    __decorate([
        property({ type: cc.Integer, tooltip: "列表项X间隔", visible: function () { return (this.type == ListType.Horizontal || this.type == ListType.Grid); } })
    ], List.prototype, "spaceX", void 0);
    __decorate([
        property({ type: cc.Integer, tooltip: "列表项Y间隔", visible: function () { return this.type == ListType.Vertical || this.type == ListType.Grid; } })
    ], List.prototype, "spaceY", void 0);
    __decorate([
        property({ type: cc.Integer, tooltip: "上间距", visible: function () { return (this.type == ListType.Vertical || this.type == ListType.Grid); } })
    ], List.prototype, "padding_top", void 0);
    __decorate([
        property({ type: cc.Integer, tooltip: "下间距", visible: function () { return (this.type == ListType.Vertical || this.type == ListType.Grid); } })
    ], List.prototype, "padding_buttom", void 0);
    __decorate([
        property({ type: cc.Integer, tooltip: "左间距", visible: function () { return (this.type == ListType.Horizontal || this.type == ListType.Grid); } })
    ], List.prototype, "padding_left", void 0);
    __decorate([
        property(cc.Integer)
    ], List.prototype, "_padding", void 0);
    __decorate([
        property({ type: cc.Integer, tooltip: "右间距", visible: function () { return (this.type == ListType.Horizontal || this.type == ListType.Grid); } })
    ], List.prototype, "padding_right", void 0);
    List = __decorate([
        ccclass
    ], List);
    return List;
}(cc.Component));
exports.default = List;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 68808 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/GameScene.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, 'd14c5oIAFtGepa7XMccAMNQ', 'GameScene');
// Script/GameScene.ts

"use strict";
// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.label = null;
        _this.text = 'hello';
        return _this;
        // update (dt) {}
    }
    // LIFE-CYCLE CALLBACKS:
    // onLoad () {}
    NewClass.prototype.start = function () {
    };
    __decorate([
        property(cc.Label)
    ], NewClass.prototype, "label", void 0);
    __decorate([
        property
    ], NewClass.prototype, "text", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxHYW1lU2NlbmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLG9CQUFvQjtBQUNwQix3RUFBd0U7QUFDeEUsbUJBQW1CO0FBQ25CLGtGQUFrRjtBQUNsRiw4QkFBOEI7QUFDOUIsa0ZBQWtGOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFNUUsSUFBQSxLQUFzQixFQUFFLENBQUMsVUFBVSxFQUFsQyxPQUFPLGFBQUEsRUFBRSxRQUFRLGNBQWlCLENBQUM7QUFHMUM7SUFBc0MsNEJBQVk7SUFBbEQ7UUFBQSxxRUFpQkM7UUFkRyxXQUFLLEdBQWEsSUFBSSxDQUFDO1FBR3ZCLFVBQUksR0FBVyxPQUFPLENBQUM7O1FBVXZCLGlCQUFpQjtJQUNyQixDQUFDO0lBVEcsd0JBQXdCO0lBRXhCLGVBQWU7SUFFZix3QkFBSyxHQUFMO0lBRUEsQ0FBQztJQVhEO1FBREMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxLQUFLLENBQUM7MkNBQ0k7SUFHdkI7UUFEQyxRQUFROzBDQUNjO0lBTk4sUUFBUTtRQUQ1QixPQUFPO09BQ2EsUUFBUSxDQWlCNUI7SUFBRCxlQUFDO0NBakJELEFBaUJDLENBakJxQyxFQUFFLENBQUMsU0FBUyxHQWlCakQ7a0JBakJvQixRQUFRIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIvIiwic291cmNlc0NvbnRlbnQiOlsiLy8gTGVhcm4gVHlwZVNjcmlwdDpcclxuLy8gIC0gaHR0cHM6Ly9kb2NzLmNvY29zLmNvbS9jcmVhdG9yL21hbnVhbC9lbi9zY3JpcHRpbmcvdHlwZXNjcmlwdC5odG1sXHJcbi8vIExlYXJuIEF0dHJpYnV0ZTpcclxuLy8gIC0gaHR0cHM6Ly9kb2NzLmNvY29zLmNvbS9jcmVhdG9yL21hbnVhbC9lbi9zY3JpcHRpbmcvcmVmZXJlbmNlL2F0dHJpYnV0ZXMuaHRtbFxyXG4vLyBMZWFybiBsaWZlLWN5Y2xlIGNhbGxiYWNrczpcclxuLy8gIC0gaHR0cHM6Ly9kb2NzLmNvY29zLmNvbS9jcmVhdG9yL21hbnVhbC9lbi9zY3JpcHRpbmcvbGlmZS1jeWNsZS1jYWxsYmFja3MuaHRtbFxyXG5cclxuY29uc3Qge2NjY2xhc3MsIHByb3BlcnR5fSA9IGNjLl9kZWNvcmF0b3I7XHJcblxyXG5AY2NjbGFzc1xyXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBOZXdDbGFzcyBleHRlbmRzIGNjLkNvbXBvbmVudCB7XHJcblxyXG4gICAgQHByb3BlcnR5KGNjLkxhYmVsKVxyXG4gICAgbGFiZWw6IGNjLkxhYmVsID0gbnVsbDtcclxuXHJcbiAgICBAcHJvcGVydHlcclxuICAgIHRleHQ6IHN0cmluZyA9ICdoZWxsbyc7XHJcblxyXG4gICAgLy8gTElGRS1DWUNMRSBDQUxMQkFDS1M6XHJcblxyXG4gICAgLy8gb25Mb2FkICgpIHt9XHJcblxyXG4gICAgc3RhcnQgKCkge1xyXG5cclxuICAgIH1cclxuXHJcbiAgICAvLyB1cGRhdGUgKGR0KSB7fVxyXG59XHJcbiJdfQ==
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/Block.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, '2bf4dXY+rJG37abLKiCEh7s', 'Block');
// Script/Block.ts

"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var GameData_1 = require("./GameData");
var GameManager_1 = require("./GameManager");
var Notification_1 = require("./tool/Notification");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.label = null;
        _this.text = 'hello';
        return _this;
    }
    // LIFE-CYCLE CALLBACKS:
    NewClass.prototype.onLoad = function () {
        this.node.getComponent(cc.PolygonCollider).enabled = true;
        this.speed = 10;
        this.num = 0;
        this.move = false;
        if (this.node.name.length > 6) {
            this.num = parseInt(this.node.name.substring(5, 7));
        }
        else
            this.num = parseInt(this.node.name.substring(5, 6));
        this.speed = GameData_1.default._instance.BLOCK_INFO[this.num - 1].speed;
        this.init();
    };
    NewClass.prototype.start = function () {
    };
    NewClass.prototype.init = function () {
        var _this = this;
        var speedTemp = this.speed;
        this.getSpeed();
        if (this.num > GameData_1.default._instance.GM_INFO.blockScale) {
            if (this.speed < GameData_1.default._instance.LEVEL_INFO.slowSpeed)
                this.speed = GameData_1.default._instance.LEVEL_INFO.slowSpeed;
        }
        else {
            if (this.speed < GameData_1.default._instance.LEVEL_INFO.fastSpeed)
                this.speed = GameData_1.default._instance.LEVEL_INFO.fastSpeed;
        }
        if (this.speed > speedTemp)
            this.speed = speedTemp;
        if (this.num != 13 && !GameData_1.default._instance.GM_INFO.probation) {
            GameData_1.default._instance.CLICK_DATA.block = this.num;
            GameData_1.default._instance.CLICK_DATA.speed = this.speed;
            this.getDifficulty();
            GameManager_1.default._instance.Air2.push(this.speed);
            if (GameManager_1.default._instance.Air2.length > 99) {
                console.log("被限制后", GameManager_1.default._instance.Air2);
            }
        }
        else {
            if (GameManager_1.default._instance.block) {
                var random = parseInt(Math.random() * 3 + "") + 1;
                this.speed = GameManager_1.default._instance.block.getComponent("Block").speed + random;
            }
            this.node.getComponent(cc.PolygonCollider).enabled = false;
            this.node.getComponent(cc.BoxCollider).enabled = false;
            GameData_1.default._instance.CLICK_DATA.fakeSpeed = this.speed;
        }
        this.move = true;
        this.tween =
            cc.tween(this.node)
                .to(this.speed, { x: -this.node.x })
                .call(function () {
                _this.move = false;
            })
                .start();
    };
    NewClass.prototype.getSpeed = function () {
        //先加范围  厚的
        var reduceSpeed = GameData_1.default._instance.LEVEL_INFO.reduceSpeed;
        if (reduceSpeed > 35)
            reduceSpeed = 35;
        reduceSpeed = parseInt(Math.random() * reduceSpeed + "");
        var random = Math.random() * 10;
        var max = 1;
        if (GameData_1.default._instance.LEVEL_INFO.speed < 1.3)
            max = 9;
        else if (GameData_1.default._instance.LEVEL_INFO.speed < 1.5)
            max = 7;
        else if (GameData_1.default._instance.LEVEL_INFO.speed < 1.8)
            max = 5;
        else if (GameData_1.default._instance.LEVEL_INFO.speed < 2)
            max = 3;
        if (random > max)
            reduceSpeed = -reduceSpeed;
        //先乘以系数
        this.speed = this.speed / GameData_1.default._instance.LEVEL_INFO.speed;
        this.speed = parseInt(this.speed * 10 / 10 + "");
        //后减去随机值 
        reduceSpeed = parseInt(reduceSpeed * 10 / 10 + "");
        this.speed = this.speed - reduceSpeed / 10;
        if (this.num != 13) {
            GameManager_1.default._instance.Air.push(this.speed);
            if (GameManager_1.default._instance.Air.length == 99) {
                console.log("初始数据", GameManager_1.default._instance.Air);
            }
        }
    };
    NewClass.prototype.getDifficulty = function () {
        var difficulty1 = 0;
        var sudu = Math.abs(this.speed - GameManager_1.default._instance.oldSpeed);
        difficulty1 = (sudu / 10 + 1) * (11 - this.speed);
        if (difficulty1 <= 1)
            difficulty1 = 1;
        else if (difficulty1 >= 7)
            difficulty1 = 7;
        var difficulty2 = 0;
        if (this.node.width < 180)
            difficulty2 = 0;
        else if (this.node.width < 199)
            difficulty2 = 0.5;
        else
            difficulty2 = 1;
        var difficulty3 = 0;
        if (GameManager_1.default._instance.interfere == true) {
            difficulty3 = 1;
        }
        var difficulty4 = 0;
        if (this.num > 6) {
            difficulty4 = 1;
        }
        GameManager_1.default._instance.oldSpeed = this.speed;
        this.difficulty = 0;
        this.difficulty = difficulty1 + difficulty2 + difficulty3 + difficulty4;
        this.difficulty = parseInt(this.difficulty * 10 + "");
        GameData_1.default._instance.CLICK_DATA.difficulty = this.difficulty / 10;
        GameManager_1.default._instance.difficultyArray += GameData_1.default._instance.CLICK_DATA.difficulty;
        if (GameData_1.default._instance.CLICK_DATA.difficulty > GameData_1.default._instance.GM_INFO.difficultyMax)
            GameData_1.default._instance.GM_INFO.difficultyMax = GameData_1.default._instance.CLICK_DATA.difficulty;
    };
    NewClass.prototype.setScore = function (fen) {
        var score = 0;
        var difficulty = this.difficulty / 10;
        var layer = GameData_1.default._instance.LEVEL_INFO.layer;
        var doubleHit = GameData_1.default._instance.LEVEL_INFO.doubleHit;
        score = parseInt(fen * difficulty * layer * doubleHit + "");
        Notification_1.Notification.emit("addScore", score);
    };
    NewClass.prototype.hide = function () {
        var _this = this;
        cc.tween(this.node)
            .to(0.2, { opacity: 0 })
            .call(function () {
            _this.node.active = false;
            _this.node.removeFromParent();
            _this.node = null;
        })
            .start();
    };
    NewClass.prototype.onCollisionEnter = function (other, self) {
        if (GameManager_1.default._instance) {
            if (GameManager_1.default._instance.over == true) {
                return;
            }
        }
        if (other.node.name == "Player") {
            var max = self.name.length;
            var ColliderName = other.name.substring(6, max);
            if (this.move == true) {
                if (this.tween) {
                    this.tween.stop();
                }
            }
        }
    };
    NewClass.prototype.update = function (dt) {
    };
    __decorate([
        property(cc.Label)
    ], NewClass.prototype, "label", void 0);
    __decorate([
        property
    ], NewClass.prototype, "text", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 17792 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/Player.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, '7fd74nqW4BCN6aFalN5nmyL', 'Player');
// Script/Player.ts

"use strict";
// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var GameData_1 = require("./GameData");
var GameManager_1 = require("./GameManager");
var AudioManager_1 = require("./tool/AudioManager");
var Notification_1 = require("./tool/Notification");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
0;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.add = null;
        _this.plist = null;
        return _this;
    }
    // LIFE-CYCLE CALLBACKS:
    // onLoad () {}
    NewClass.prototype.start = function () {
        this.init();
    };
    NewClass.prototype.init = function () {
        this.jumpState = 0;
        this.jumpHeight = this.node.y;
        this.basicHeight = this.node.y;
        this.up = true;
        this.double = false;
        this.death = false;
        this.jumpAction = null;
        this.block = null;
        this.interfere = false;
        this.jumpPause = true;
    };
    //跳动
    NewClass.prototype.jump = function () {
        var _this = this;
        if (this.jumpState < 2) {
            if (this.jumpState == 0) {
                if (this.death == false) {
                    this.node.getChildByName("sp").getComponent(sp.Skeleton).setAnimation(1, "jump", false);
                }
            }
            else if (this.jumpState == 1 || this.node.y > (this.jumpHeight + GameData_1.default._instance.GM_INFO.jumpHeight - 5)) {
                if (this.death == false) {
                    if (GameManager_1.default._instance.guide > 0 && GameManager_1.default._instance.guide < 3) {
                        return;
                    }
                    this.node.getChildByName("sp").getComponent(sp.Skeleton).setAnimation(1, "jump", false);
                }
            }
            setTimeout(function () {
                if (_this.jumpState == 0) {
                    if (_this.jumpPause == true) {
                        return;
                    }
                    if (_this.block) {
                        if (_this.block.name != "block13") {
                            _this.block.getComponent("Block").hide();
                        }
                        else {
                            _this.block.active = false;
                            _this.jumpPause = true;
                        }
                        _this.block = null;
                    }
                    if (GameManager_1.default._instance.guide == 1) {
                        GameManager_1.default._instance.guide = 2;
                        GameManager_1.default._instance.startGuide(2, false);
                    }
                    GameData_1.default._instance.CLICK_DATA.jumps = 1;
                    AudioManager_1.default._instance.playJump();
                    // this.basicHeight = this.node.y;
                    _this.jumpState += 1;
                    _this.up = true;
                    Notification_1.Notification.emit("showGround", _this.node.y);
                    _this.jumpAction = cc.tween(_this.node)
                        .to(GameData_1.default._instance.GM_INFO.jumpUpTime, { position: cc.v3(0, _this.jumpHeight + GameData_1.default._instance.GM_INFO.jumpHeight, 0) }, { easing: 'quadOut' })
                        .call(function () {
                        _this.up = false;
                        _this.jumpState = -1;
                        var temp = _this.node.y - _this.jumpHeight;
                    })
                        .to(GameData_1.default._instance.GM_INFO.jumpDownTime, { position: cc.v3(0, _this.jumpHeight, 0) }, { easing: 'cubicIn' })
                        .call(function () {
                        _this.jumpHeight = _this.node.y;
                        _this.jumpState = -1;
                        _this.up = true;
                    })
                        .start();
                }
                else if (_this.jumpState == 1 || _this.node.y > (_this.jumpHeight + GameData_1.default._instance.GM_INFO.jumpHeight - 15)) {
                    if (GameManager_1.default._instance.guide > 0 && GameManager_1.default._instance.guide < 3) {
                        return;
                    }
                    if (GameManager_1.default._instance.guide == 6) {
                        _this.jumpPause = true;
                        GameManager_1.default._instance.startGuide(6, false);
                    }
                    if (_this.jumpAction)
                        _this.jumpAction.stop();
                    AudioManager_1.default._instance.playJump();
                    GameData_1.default._instance.CLICK_DATA.jumps = 2;
                    _this.jumpState = 2;
                    _this.up = true;
                    _this.jumpAction = cc.tween(_this.node)
                        .to(GameData_1.default._instance.GM_INFO.jumpUpTime, { position: cc.v3(0, _this.node.y + GameData_1.default._instance.GM_INFO.jumpHeight, 0) }, { easing: 'quadOut' })
                        .call(function () {
                        _this.up = false;
                    })
                        .to(GameData_1.default._instance.GM_INFO.jumpDownTime * 1.5, { position: cc.v3(0, _this.jumpHeight, 0) }, { easing: 'cubicIn' })
                        .call(function () {
                        _this.jumpState = -1;
                        _this.jumpHeight = _this.node.y;
                        _this.up = true;
                    })
                        .start();
                }
            }, 100);
        }
    };
    NewClass.prototype.onCollisionEnter = function (other, self) {
        if (GameManager_1.default._instance) {
            if (GameManager_1.default._instance.over == true) {
                return;
            }
        }
        var max = other.name.length;
        var num = 6;
        if (other.node.name != "Ground") {
            if (GameManager_1.default._instance.guide == -1) {
                if (other.node.getComponent("Block").num > 9)
                    num = 7;
            }
            else {
                num = 7;
            }
        }
        var ColliderName = other.name.substring(num, max);
        //获取碰撞体名字
        if (ColliderName == "<PolygonCollider>") {
            if (this.node.y <= other.node.y && this.up == true && this.death == false) {
                if (this.jumpAction)
                    this.jumpAction.stop();
                this.jumpState = -1;
                AudioManager_1.default._instance.playGround();
                console.log("死亡1");
                this.gameDeath();
            }
            else if (other.node.name == "Ground" && this.death == false) {
                // if(this.jumpAction)this.jumpAction.stop();
                this.jumpState = -1;
                console.log("死亡2");
                this.gameDeath();
            }
            else {
                // console.log("没碰到边缘",this.up,this.node.y,other.node.y,this.jumpState,this.up);
            }
        }
        if (ColliderName == "<BoxCollider>") {
            if (this.death == true) {
                console.log("已经死亡");
                return;
            }
            //
            var portrait = Math.abs(this.node.y - other.node.y);
            var width = other.node.width / 2;
            var pos = Math.abs(this.node.x - other.node.x);
            var distance = pos / width;
            // console.log("我的位置:",this.node.x,"块的位置:",other.node.x,"块的宽度:",width,"百分比:",distance);
            if (this.up == true) {
                console.log("死亡4");
                AudioManager_1.default._instance.playGround();
                this.gameDeath();
            }
            else {
                if (distance * 100 < GameData_1.default._instance.GM_INFO.distanceMin && this.jumpState != 0) {
                    // console.log("成功1");
                    // console.log("百分比:",distance*100+"%");
                    this.success(other, distance * 100);
                }
                else {
                    if (portrait >= 20 || distance * 100 > GameData_1.default._instance.GM_INFO.distanceMax) {
                        console.log("死亡3", "落差:", portrait, "状态:", this.up);
                        AudioManager_1.default._instance.playGround();
                        this.gameDeath();
                    }
                    else {
                        // console.log("成功2");
                        console.log("百分比:", distance * 100 + "%");
                        this.success(other, distance * 100);
                    }
                }
            }
        }
    };
    NewClass.prototype.success = function (other, distance) {
        this.jumpPause = true;
        if (GameManager_1.default._instance.guide != -1) {
            this.basicHeight = this.node.y;
            other.node.stopAllActions();
            if (GameManager_1.default._instance.guide == 3 || GameManager_1.default._instance.guide == 4) {
                GameManager_1.default._instance.startGuide(4, false);
                if (GameManager_1.default._instance.guide == 4) {
                    GameManager_1.default._instance.guide = 5;
                }
            }
            else if (GameManager_1.default._instance.guide == 5) {
                this.jumpPause = true;
                var tip = GameManager_1.default._instance.Tip.getChildByName("good");
                cc.tween(tip)
                    .to(0.3, { opacity: 255, scale: 1 })
                    .delay(0.5)
                    .to(0.2, { opacity: 0 })
                    .call(function () {
                    GameManager_1.default._instance.startGuide(5, false);
                })
                    .start();
            }
            else if (GameManager_1.default._instance.guide == 7) {
                GameManager_1.default._instance.startGuide(8, false);
            }
            else if (GameManager_1.default._instance.guide == 8) {
                this.jumpPause = true;
                var tip = GameManager_1.default._instance.Tip.getChildByName("perfet");
                cc.tween(tip)
                    .to(0.3, { opacity: 255, scale: 1 })
                    .delay(0.5)
                    .to(0.2, { opacity: 0 })
                    .call(function () {
                    GameManager_1.default._instance.startGuide(9, false);
                })
                    .start();
            }
        }
        var percent = parseInt(distance * 10 + "") / 10;
        GameData_1.default._instance.CLICK_DATA.percent = percent;
        if (GameManager_1.default._instance)
            GameManager_1.default._instance.destroyBlock(true);
        this.add.active = true;
        this.add.opacity = 0;
        var number = 1;
        if (distance <= 10)
            number = 3;
        else if (distance <= 20)
            number = 2;
        GameData_1.default._instance.CLICK_DATA.accuracy = number;
        this.add.getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.plist.getSpriteFrames()[number];
        this.add.getChildByName("jia").getComponent(cc.Sprite).spriteFrame = this.plist.getSpriteFrames()[number + 3];
        this.addAction();
        this.node.getChildByName("guang").active = true;
        this.node.getChildByName("guang").getComponent(sp.Skeleton).setAnimation(0, "double_1", false);
        if (this.jumpAction)
            this.jumpAction.stop();
        if (this.death == false) {
            this.node.getChildByName("sp").getComponent(sp.Skeleton).setAnimation(1, "jump", false);
        }
        this.basicHeight = this.node.y;
        if (number > 1) {
            AudioManager_1.default._instance.playPz();
            if (this.double == false) {
                this.double = true;
                GameData_1.default._instance.LEVEL_INFO.doubleHit = 1.05;
            }
            else {
                GameData_1.default._instance.LEVEL_INFO.doubleHit += GameData_1.default._instance.LEVEL_INFO.doubleAdd;
            }
            var combo = (GameData_1.default._instance.LEVEL_INFO.doubleHit - 1) * (1 / 0.05);
            GameData_1.default._instance.CLICK_DATA.combo = parseInt(combo + "");
        }
        else {
            AudioManager_1.default._instance.playLuo();
            this.double = false;
            GameData_1.default._instance.CLICK_DATA.combo = 0;
        }
        this.block = other.node;
        if (this.block.name != "block13") {
            this.block.getComponent("Block").setScore(number);
            Notification_1.Notification.emit("setData", null);
        }
        setTimeout(function () {
            if (GameManager_1.default._instance.guide == -1) {
                Notification_1.Notification.emit("createBlock", null);
                if (GameData_1.default._instance.LEVEL_INFO.doubleSuccess == 0) {
                    setTimeout(function () {
                        Notification_1.Notification.emit("createCrackBlock", null);
                    }, 100);
                }
            }
        }, 10);
        if (number > 1 && GameData_1.default._instance.LEVEL_INFO.doubleSuccess != 0) {
            GameData_1.default._instance.LEVEL_INFO.doubleSuccess -= 1;
        }
        else {
            if (GameData_1.default._instance.LEVEL_INFO.doubleSuccess != 0 && GameData_1.default._instance.LEVEL_INFO.doubleSuccess < 3) {
                GameData_1.default._instance.LEVEL_INFO.doubleSuccess = 3;
            }
        }
        if (GameData_1.default._instance.LEVEL_INFO.doubleSuccess == 0) {
        }
        else {
            GameManager_1.default._instance.interfere = false;
            GameData_1.default._instance.CLICK_DATA.fake = GameManager_1.default._instance.interfere;
        }
        this.jumpState = 0;
        this.up = true;
        this.node.y = other.node.y - 3 + other.node.height / 2;
        this.jumpHeight = this.node.y;
    };
    NewClass.prototype.gameDeath = function () {
        // console.log("条失败");
        this.jumpPause = true;
        if (!GameData_1.default._instance.GM_INFO.probation) {
            GameData_1.default._instance.CLICK_DATA.combo = 0;
            GameData_1.default._instance.CLICK_DATA.accuracy = 0;
            GameData_1.default._instance.CLICK_DATA.percent = -1;
            Notification_1.Notification.emit("setData", null);
            this.double = false;
            GameData_1.default._instance.LEVEL_INFO.doubleSuccess = 3;
            this.death = true;
            if (this.jumpAction)
                this.jumpAction.stop();
            this.jumpState = -1;
            Notification_1.Notification.emit("death", false);
        }
        else {
            this.death = true;
            if (GameManager_1.default._instance.guide == 6) {
                GameManager_1.default._instance.tipHide("tip4", null);
            }
            if (this.jumpAction)
                this.jumpAction.stop();
            this.jumpState = -1;
            Notification_1.Notification.emit("death", true);
        }
    };
    NewClass.prototype.xinAction = function () {
        if (GameData_1.default._instance.GM_INFO.life >= 0) {
            var xin = this.node.getChildByName("xin");
            xin.y = 120;
            cc.tween(xin)
                .to(0.2, { opacity: 255, y: xin.y + 50 })
                .delay(0.5)
                .to(0.3, { opacity: 0, y: xin.y + 100 })
                .call(function () {
            })
                .start();
        }
    };
    NewClass.prototype.addAction = function () {
        var _this = this;
        this.add.y = 120;
        cc.tween(this.add)
            .to(0.2, { opacity: 255, y: this.add.y + 50 })
            .delay(0.5)
            .to(0.3, { opacity: 0, y: this.add.y + 100 })
            .call(function () {
            _this.add.active = false;
        })
            .start();
    };
    NewClass.prototype.update = function (dt) {
        // if(this.death == true && this.node.y > -500 && GameManager._instance.over == false){
        //     // this.node.y -= 3;
        //     // if(this.node.y <= -500){
        //     //     this.node.y = -500;
        //     // } 
        // }
    };
    __decorate([
        property(cc.Node)
    ], NewClass.prototype, "add", void 0);
    __decorate([
        property(cc.SpriteAtlas)
    ], NewClass.prototype, "plist", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 41200 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/RankManager.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, '9c7ccNc8VlJ9Jy7qfTPoy0E', 'RankManager');
// Script/RankManager.ts

"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var GameData_1 = require("./GameData");
var List_1 = require("./ListView/List");
var HttpUtil_1 = require("./crypto/HttpUtil");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
//排行榜
var RankManager = /** @class */ (function (_super) {
    __extends(RankManager, _super);
    function RankManager() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.Player = null;
        _this.selfNode = null;
        _this.phone = null;
        return _this;
    }
    RankManager.prototype.onLoad = function () {
        this.init();
    };
    //初始化数据
    RankManager.prototype.init = function () {
        this.rankList = cc.find("ScrollView", this.node).getComponent(List_1.default);
        this.Player.getChildByName("rank").active = false;
        this.listData = [];
        this.selfData = null;
        this.rankNumber = 100;
        this.rankTotal = 100;
        this.selfNode.opacity = 0;
    };
    RankManager.prototype.start = function () {
        this.Player.active = false;
        this.getRank();
    };
    //调用获取排行榜接口
    RankManager.prototype.getRank = function () {
        var postData = {
            "page": 1,
            "pageSize": 100
        };
        //回调进getRankData
        HttpUtil_1.default.rankData(2, this.getRankData.bind(this), postData);
    };
    //实际设置排行数据
    RankManager.prototype.getRankData = function (data) {
        if (data) {
            // console.log(data);
            this.listData = data.data.list;
            this.selfData = data.data.info;
            var rankData = [];
            var self = false;
            for (var i = 0; i <= this.listData.length - 1; i++) {
                rankData.push({ rank: (i + 1), name: this.listData[i].nickName, total: this.listData[i].score, pic: this.listData[i].pic });
                if (GameData_1.default._instance.GM_INFO.userId == this.listData[i].userId) {
                    self = true;
                    this.rankNumber = i;
                    this.selfNode.getChildByName("rankLab").getComponent(cc.Label).string = (i + 1) + "";
                }
                if (i == (this.listData.length - 1) && self == false) {
                    this.rankNumber = 101;
                    //如果列表大于99显示99+ 否则显示未排名
                    if (this.listData.length >= 99)
                        this.selfNode.getChildByName("rankLab").getComponent(cc.Label).string = "99+";
                    else
                        this.selfNode.getChildByName("rankLab").getComponent(cc.Label).string = "未排名";
                }
            }
            //如果排行榜列表没有人
            if (this.listData.length == 0)
                this.selfNode.getChildByName("rankLab").getComponent(cc.Label).string = "未排名";
            this.rankList.setData(rankData);
            if (this.selfData.nickName.length > 6) {
                this.selfData.nickName = this.selfData.nickName.substring(0, 6) + "...";
            }
            this.selfNode.getChildByName("nameLab").getComponent(cc.Label).string = this.selfData.nickName;
            //如果没有排行分数信息
            if (this.selfData.score) {
                this.selfNode.getChildByName("totalLab").getComponent(cc.Label).string = this.selfData.score;
            }
            this.setPic(this.selfData.pic);
            if (this.selfNode.getChildByName("rankLab").getComponent(cc.Label).string == "1") {
                this.selfNode.getChildByName("rank").getChildByName("one").active = true;
            }
            else if (this.selfNode.getChildByName("rankLab").getComponent(cc.Label).string == "2") {
                this.selfNode.getChildByName("rank").getChildByName("two").active = true;
            }
            else if (this.selfNode.getChildByName("rankLab").getComponent(cc.Label).string == "3") {
                this.selfNode.getChildByName("rank").getChildByName("three").active = true;
            }
            else {
                // this.selfNode.getChildByName("four").active = true;
            }
            this.selfNode.opacity = 255;
            if (this.selfData.score == 0)
                this.selfNode.opacity = 0;
        }
    };
    //返回按钮
    RankManager.prototype.backClick = function () {
        cc.director.loadScene("LoadScene");
    };
    //最上方用户动画
    RankManager.prototype.playerAction = function () {
        var _this = this;
        //-254 377  210 453
        this.Player.getChildByName("rank").active = false;
        var time = 1;
        this.tween = cc.tween(this.Player)
            .to(2, { position: cc.v3(210, 485, 0) })
            .call(function () {
            _this.Player.getChildByName("rank").active = true;
            _this.Player.getChildByName("rank").getChildByName("number")
                .getComponent(cc.Label).string = parseInt(time * 100 + "") + "%";
        })
            .start();
        if (this.listData.length > 0) {
            if (this.listData.length >= 99) {
                if (this.rankNumber >= 99) {
                    time = this.getRankRandom();
                }
                else
                    time = (this.listData.length - this.rankNumber) / this.listData.length;
            }
            else {
                if (this.rankNumber > 99) {
                    time = 0;
                }
                else
                    time = (this.listData.length - this.rankNumber) / this.listData.length;
            }
        }
        else {
            time = 0;
        }
        setTimeout(function () {
            if (_this.tween)
                _this.tween.stop();
            if (_this.Player) {
                _this.Player.getChildByName("rank").active = true;
                _this.Player.getChildByName("rank").getChildByName("number")
                    .getComponent(cc.Label).string = parseInt(time * 100 + "") + "%";
            }
        }, time * 2000);
    };
    RankManager.prototype.getRankRandom = function () {
        var time = (Math.random() * 49 + 1) / 100;
        var matchId = cc.sys.localStorage.getItem("matchNumber");
        if (matchId == null || matchId == undefined) {
            time = 0;
        }
        return time;
    };
    //设置头像
    RankManager.prototype.setPic = function (pic) {
        var _this = this;
        this.phone.node.parent.getChildByName("icon").active = false;
        this.phone.node.active = false;
        this.Player.active = true;
        this.Player.opacity = 0;
        this.Player.getChildByName("mask").getChildByName("icon").active = false;
        this.Player.getChildByName("mask").getChildByName("phone").active = false;
        fetch(pic)
            .then(function (response) {
            return response.headers.get('Content-Length');
        })
            .then(function (errNo) {
            if (errNo == "5093") {
                _this.phone.node.parent.getChildByName("icon").active = true;
                _this.Player.getChildByName("mask").getChildByName("icon").active = true;
            }
        })
            .catch(function (error) {
            console.error('Error fetching X-Info:', error);
        });
        var self = this;
        cc.assetManager.loadRemote(pic, { ext: '.png' }, function (err, texture) {
            self.Player.opacity = 255;
            if (texture) {
                self.phone.node.active = true;
                self.phone.spriteFrame = new cc.SpriteFrame(texture);
                self.Player.getChildByName("mask").getChildByName("icon").active = false;
                self.Player.getChildByName("mask").getChildByName("phone").active = true;
                self.Player.getChildByName("mask").getChildByName("phone").getComponent(cc.Sprite)
                    .spriteFrame = new cc.SpriteFrame(texture);
                setTimeout(function () {
                    self.playerAction();
                }, 500);
            }
            else {
                self.Player.getChildByName("mask").getChildByName("icon").active = true;
                setTimeout(function () {
                    self.playerAction();
                }, 500);
            }
        });
    };
    __decorate([
        property(cc.Node) //用户上方头像
    ], RankManager.prototype, "Player", void 0);
    __decorate([
        property(cc.Node) //用户最下方个人信息
    ], RankManager.prototype, "selfNode", void 0);
    __decorate([
        property(cc.Sprite) //用户头像换图
    ], RankManager.prototype, "phone", void 0);
    RankManager = __decorate([
        ccclass
    ], RankManager);
    return RankManager;
}(cc.Component));
exports.default = RankManager;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 22484 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/tool/AudioManager.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, '7574f5PdlZP4Kt9dxMgkIPZ', 'AudioManager');
// Script/tool/AudioManager.ts

"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var AudioManager = /** @class */ (function (_super) {
    __extends(AudioManager, _super);
    function AudioManager() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        //背景音乐
        _this.audioGameBgm0 = null;
        //跳跃
        _this.jump = null;
        //落地上
        _this.luodi = null;
        //碰撞
        _this.pz = null;
        //落方块上
        _this.luodui = null;
        return _this;
    }
    AudioManager_1 = AudioManager;
    AudioManager.prototype.ctor = function () {
        this.mAudioMap = {};
        /**
         * 默认音量大小
         * @type {number}
         */
        this.bgMusicVolume = 0.1;
        this.effectMusicVolume = 1;
        this.mMusicSwitch = 1;
        this.mEffectSwitch = 1;
    };
    AudioManager.prototype.play = function (audioSource, loop, callback, isBgMusic) {
        if (isBgMusic && !this.mMusicSwitch)
            return;
        if (!isBgMusic && !this.mEffectSwitch)
            return;
        var volume = isBgMusic ? this.bgMusicVolume : this.effectMusicVolume;
        if (cc.sys.isBrowser) {
            if (audioSource == this.brickSound) {
                volume = 0.1;
            }
            volume = 1;
            var context = cc.audioEngine.play(audioSource, loop, volume);
            if (callback) {
                cc.audioEngine.setFinishCallback(context, function () {
                    callback.call(this);
                }.bind(this));
            }
            // cc.wwx.OutPut.log('play audio effect isBrowser: ' + context.src);
            this.mAudioMap[audioSource] = context;
            return audioSource;
        }
        else {
            return audioSource;
        }
    };
    AudioManager.prototype.save = function () {
        // cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Music_Volume, this.mMusicSwitch);
        // cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Effect_Volume, this.mEffectSwitch);
    };
    AudioManager.prototype.onLoad = function () {
        if (AudioManager_1._instance == null) {
            AudioManager_1._instance = this;
            cc.game.addPersistRootNode(this.node);
        }
        else {
            this.node.destroy();
            return;
        }
        this.reward = false;
        this.finish = false;
        this.rewardCount = 0;
        this.ctor();
        this.preload();
    };
    AudioManager.prototype.preload = function () {
        if (!(cc.sys.platform === cc.sys.WECHAT_GAME)) {
            return;
        }
        var musics = [
            this.audioGameBgm0,
        ];
        musics.forEach(function (path) {
            // var musicPath = wxDownloader.REMOTE_SERVER_ROOT + path;
            // if (musicPath != wxDownloader.REMOTE_SERVER_ROOT && musicPath.endsWith('.mp3')) {
            //     cc.loader.load(musicPath, function(err, remoteUrl) {
            //         if (err) {
            //             cc.error(err.message || err);
            //             return;
            //         }
            //     });
            // }
        });
    };
    AudioManager.prototype.getAudioMusicSwitch = function () {
        return this.mMusicSwitch;
    };
    AudioManager.prototype.getAudioEffectSwitch = function () {
        return this.mEffectSwitch;
    };
    AudioManager.prototype.trunAudioSound = function (on) {
        this.switchMusic(on);
        this.switchEffect(on);
    };
    AudioManager.prototype.switchMusic = function (on) {
        if (this.mMusicSwitch != (on ? 1 : 0)) {
            this.mMusicSwitch = 1 - this.mMusicSwitch;
            // this.save();
        }
        if (on) {
            this.playMusicGame();
        }
        else {
            this.stopMusic();
        }
    };
    AudioManager.prototype.switchEffect = function (on) {
        if (this.mEffectSwitch != (on ? 1 : 0)) {
            this.mEffectSwitch = 1 - this.mEffectSwitch;
            // this.save();
        }
    };
    AudioManager.prototype.onHide = function () {
        cc.audioEngine.pauseAll();
        // if (CC_JSB) {
        // } else {
        //     for (var key in this.mAudioMap) {
        //         if (key === this.mMusicKey) {
        //             this.mAudioMap[key].pause();
        //         } else {
        //             this.mAudioMap[key].stop();
        //         }
        //     }
        // }
    };
    AudioManager.prototype.onShow = function () {
        cc.audioEngine.resumeAll();
        // if (CC_JSB) {
        // } else {
        //     if (!this.mMusicSwitch) return;
        //     var context = this.mAudioMap[this.mMusicKey];
        //     if (context) {
        //         context.play();
        //     }
        // }
    };
    AudioManager.prototype.playMusic = function (key, callback, loop) {
        loop = typeof loop == 'undefined' || loop ? true : false;
        this.stopMusic();
        this.mMusicKey = this.play(key, loop, callback, true);
    };
    /**
     * 游戏背景音乐
     */
    AudioManager.prototype.playMusicGame = function () {
        this.playMusic(this.audioGameBgm0, {}, true);
    };
    /**
     * 停止背景音乐播放
     */
    AudioManager.prototype.stopMusic = function () {
        // cc.wwx.OutPut.log('stopMusic audio effect wx: ' + this.mMusicKey);
        var context = this.mAudioMap[this.mMusicKey];
        if (typeof (context) != 'undefined') {
            if (cc.sys.isBrowser) {
                cc.audioEngine.stop(context);
            }
            else {
                context.stop();
            }
            cc.audioEngine.stop(context);
        }
    };
    // 炸弹、火箭爆炸音效
    AudioManager.prototype.playJump = function () {
        return this.play(this.jump, false, null, this.mEffectSwitch);
    };
    //激光音效
    AudioManager.prototype.playLuo = function () {
        return this.play(this.luodui, false, null, this.mEffectSwitch);
    };
    //技能音效
    AudioManager.prototype.playGround = function () {
        return this.play(this.luodi, false, null, this.mEffectSwitch);
    };
    //技能音效
    AudioManager.prototype.playPz = function () {
        return this.play(this.pz, false, null, this.mEffectSwitch);
    };
    /*
     * 游戏开始音效
     *
     */
    AudioManager.prototype.playGameStart = function () {
    };
    /*
     * 失败的游戏结束
     */
    AudioManager.prototype.playGameOver = function () {
    };
    /*
      * 成功的游戏结束
      */
    AudioManager.prototype.playGameResultFailed = function () {
    };
    /*
  * 成功的游戏结束
  */
    AudioManager.prototype.playGameResultSuccess = function () {
    };
    /**
     * 报警的音效
     */
    AudioManager.prototype.playWarning = function () {
    };
    /*
     * 方块碰撞的声音
     */
    AudioManager.prototype.playBrick = function () {
        // return this.play(this.brickSound,false);
    };
    //方块破碎的声音
    AudioManager.prototype.brickBoom = function () {
    };
    /**
     * 按钮
     */
    AudioManager.prototype.playAudioButton = function () {
    };
    AudioManager.prototype.playRandomMatch = function () {
        this.playMusic(this.audioGameBgm0, {}, true);
    };
    AudioManager.prototype.playMatchFoundSound = function () {
        this.stopMusic();
        // return this.play(this.matchFoundSound, false);
    };
    var AudioManager_1;
    __decorate([
        property(cc.AudioClip)
    ], AudioManager.prototype, "audioGameBgm0", void 0);
    __decorate([
        property(cc.AudioClip)
    ], AudioManager.prototype, "jump", void 0);
    __decorate([
        property(cc.AudioClip)
    ], AudioManager.prototype, "luodi", void 0);
    __decorate([
        property(cc.AudioClip)
    ], AudioManager.prototype, "pz", void 0);
    __decorate([
        property(cc.AudioClip)
    ], AudioManager.prototype, "luodui", void 0);
    AudioManager = AudioManager_1 = __decorate([
        ccclass
    ], AudioManager);
    return AudioManager;
}(cc.Component));
exports.default = AudioManager;
;
// export { AudioManager };

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 16628 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/Camera.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, 'ba5152SuShBF7Gc5uHiGsp0', 'Camera');
// Script/Camera.ts

"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
var GameData_1 = require("./GameData");
var GameManager_1 = require("./GameManager");
var Notification_1 = require("./tool/Notification");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.label = null;
        _this.text = 'hello';
        return _this;
        // update (dt) {}
    }
    // LIFE-CYCLE CALLBACKS:
    // onLoad () {}
    NewClass.prototype.start = function () {
        this.node.on(cc.Node.EventType.TOUCH_START, this.jump, this);
    };
    NewClass.prototype.jump = function () {
        if (GameManager_1.default._instance) {
            if (GameManager_1.default._instance.over == false && GameManager_1.default._instance.begin == true) {
                Notification_1.Notification.emit("jump", null);
            }
        }
        else if (GameData_1.default._instance.GM_INFO.probation == true) {
            Notification_1.Notification.emit("jump", null);
        }
    };
    __decorate([
        property(cc.Label)
    ], NewClass.prototype, "label", void 0);
    __decorate([
        property
    ], NewClass.prototype, "text", void 0);
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxDYW1lcmEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsb0JBQW9CO0FBQ3BCLHdFQUF3RTtBQUN4RSxtQkFBbUI7QUFDbkIsa0ZBQWtGO0FBQ2xGLDhCQUE4QjtBQUM5QixrRkFBa0Y7QUFDbEYsdUNBQWtDO0FBQ2xDLDZDQUF3QztBQUN4QyxvREFBbUQ7QUFDN0MsSUFBQSxLQUFzQixFQUFFLENBQUMsVUFBVSxFQUFsQyxPQUFPLGFBQUEsRUFBRSxRQUFRLGNBQWlCLENBQUM7QUFHMUM7SUFBc0MsNEJBQVk7SUFBbEQ7UUFBQSxxRUE4QkM7UUEzQkcsV0FBSyxHQUFhLElBQUksQ0FBQztRQUd2QixVQUFJLEdBQVcsT0FBTyxDQUFDOztRQXVCdkIsaUJBQWlCO0lBQ3JCLENBQUM7SUF0Qkcsd0JBQXdCO0lBRXhCLGVBQWU7SUFFZix3QkFBSyxHQUFMO1FBQ0ksSUFBSSxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsV0FBVyxFQUFFLElBQUksQ0FBQyxJQUFJLEVBQUUsSUFBSSxDQUFDLENBQUM7SUFDakUsQ0FBQztJQUVELHVCQUFJLEdBQUo7UUFDSSxJQUFHLHFCQUFXLENBQUMsU0FBUyxFQUFDO1lBQ3JCLElBQUcscUJBQVcsQ0FBQyxTQUFTLENBQUMsSUFBSSxJQUFJLEtBQUssSUFBSSxxQkFBVyxDQUFDLFNBQVMsQ0FBQyxLQUFLLElBQUksSUFBSSxFQUFDO2dCQUMxRSwyQkFBWSxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUMsSUFBSSxDQUFDLENBQUM7YUFDbEM7U0FDSjthQUNJLElBQUcsa0JBQVEsQ0FBQyxTQUFTLENBQUMsT0FBTyxDQUFDLFNBQVMsSUFBSSxJQUFJLEVBQUM7WUFDakQsMkJBQVksQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFDLElBQUksQ0FBQyxDQUFDO1NBQ2xDO0lBRUwsQ0FBQztJQXZCRDtRQURDLFFBQVEsQ0FBQyxFQUFFLENBQUMsS0FBSyxDQUFDOzJDQUNJO0lBR3ZCO1FBREMsUUFBUTswQ0FDYztJQU5OLFFBQVE7UUFENUIsT0FBTztPQUNhLFFBQVEsQ0E4QjVCO0lBQUQsZUFBQztDQTlCRCxBQThCQyxDQTlCcUMsRUFBRSxDQUFDLFNBQVMsR0E4QmpEO2tCQTlCb0IsUUFBUSIsImZpbGUiOiIiLCJzb3VyY2VSb290IjoiLyIsInNvdXJjZXNDb250ZW50IjpbIi8vIExlYXJuIFR5cGVTY3JpcHQ6XHJcbi8vICAtIGh0dHBzOi8vZG9jcy5jb2Nvcy5jb20vY3JlYXRvci9tYW51YWwvZW4vc2NyaXB0aW5nL3R5cGVzY3JpcHQuaHRtbFxyXG4vLyBMZWFybiBBdHRyaWJ1dGU6XHJcbi8vICAtIGh0dHBzOi8vZG9jcy5jb2Nvcy5jb20vY3JlYXRvci9tYW51YWwvZW4vc2NyaXB0aW5nL3JlZmVyZW5jZS9hdHRyaWJ1dGVzLmh0bWxcclxuLy8gTGVhcm4gbGlmZS1jeWNsZSBjYWxsYmFja3M6XHJcbi8vICAtIGh0dHBzOi8vZG9jcy5jb2Nvcy5jb20vY3JlYXRvci9tYW51YWwvZW4vc2NyaXB0aW5nL2xpZmUtY3ljbGUtY2FsbGJhY2tzLmh0bWxcclxuaW1wb3J0IEdhbWVEYXRhIGZyb20gJy4vR2FtZURhdGEnO1xyXG5pbXBvcnQgR2FtZU1hbmFnZXIgZnJvbSAnLi9HYW1lTWFuYWdlcic7XHJcbmltcG9ydCB7IE5vdGlmaWNhdGlvbiB9IGZyb20gJy4vdG9vbC9Ob3RpZmljYXRpb24nO1xyXG5jb25zdCB7Y2NjbGFzcywgcHJvcGVydHl9ID0gY2MuX2RlY29yYXRvcjtcclxuXHJcbkBjY2NsYXNzXHJcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIE5ld0NsYXNzIGV4dGVuZHMgY2MuQ29tcG9uZW50IHtcclxuXHJcbiAgICBAcHJvcGVydHkoY2MuTGFiZWwpXHJcbiAgICBsYWJlbDogY2MuTGFiZWwgPSBudWxsO1xyXG5cclxuICAgIEBwcm9wZXJ0eVxyXG4gICAgdGV4dDogc3RyaW5nID0gJ2hlbGxvJztcclxuXHJcbiAgICAvLyBMSUZFLUNZQ0xFIENBTExCQUNLUzpcclxuXHJcbiAgICAvLyBvbkxvYWQgKCkge31cclxuXHJcbiAgICBzdGFydCAoKSB7XHJcbiAgICAgICAgdGhpcy5ub2RlLm9uKGNjLk5vZGUuRXZlbnRUeXBlLlRPVUNIX1NUQVJULCB0aGlzLmp1bXAsIHRoaXMpO1xyXG4gICAgfVxyXG5cclxuICAgIGp1bXAoKXtcclxuICAgICAgICBpZihHYW1lTWFuYWdlci5faW5zdGFuY2Upe1xyXG4gICAgICAgICAgICBpZihHYW1lTWFuYWdlci5faW5zdGFuY2Uub3ZlciA9PSBmYWxzZSAmJiBHYW1lTWFuYWdlci5faW5zdGFuY2UuYmVnaW4gPT0gdHJ1ZSl7XHJcbiAgICAgICAgICAgICAgICBOb3RpZmljYXRpb24uZW1pdChcImp1bXBcIixudWxsKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIGlmKEdhbWVEYXRhLl9pbnN0YW5jZS5HTV9JTkZPLnByb2JhdGlvbiA9PSB0cnVlKXtcclxuICAgICAgICAgICAgTm90aWZpY2F0aW9uLmVtaXQoXCJqdW1wXCIsbnVsbCk7XHJcbiAgICAgICAgfVxyXG4gICBcclxuICAgIH1cclxuXHJcblxyXG4gICAgLy8gdXBkYXRlIChkdCkge31cclxufVxyXG4iXX0=
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/tool/Notification.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, 'bc645/UI1FCCZN1kaSNle9o', 'Notification');
// Script/tool/Notification.ts

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Notification = void 0;
//全局通知
var Notification = {
    _eventMap: [],
    on: function (masgId, callback, target) {
        if (this._eventMap[masgId] === undefined) {
            this._eventMap[masgId] = [];
        }
        this._eventMap[masgId].push({ callback: callback, target: target });
    },
    emit: function (masgId, parameter) {
        var array = this._eventMap[masgId];
        if (array === undefined)
            return;
        for (var i = 0; i < array.length; i++) {
            var element = array[i];
            if (element)
                element.callback.call(element.target, parameter);
        }
    },
    off: function (masgId, callback) {
        var array = this._eventMap[masgId];
        if (array === undefined)
            return;
        for (var i = 0; i < array.length; i++) {
            var element = array[i];
            if (element && element.callback === callback) {
                array[i] = undefined;
                break;
            }
        }
    },
    offMasgId: function (masgId) {
        this._eventMap[masgId] = undefined;
    },
    removeAllMsg: function () {
        for (var k in this._eventMap) {
            if (this._eventMap[k]) {
                this.offMasgId(k);
            }
        }
    }
};
exports.Notification = Notification;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFx0b29sXFxOb3RpZmljYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsTUFBTTtBQUNOLElBQUksWUFBWSxHQUFHO0lBQ2YsU0FBUyxFQUFFLEVBQUU7SUFDYixFQUFFLEVBQUUsVUFBVSxNQUFNLEVBQUUsUUFBUSxFQUFFLE1BQU07UUFDbEMsSUFBSSxJQUFJLENBQUMsU0FBUyxDQUFDLE1BQU0sQ0FBQyxLQUFLLFNBQVMsRUFBRTtZQUN0QyxJQUFJLENBQUMsU0FBUyxDQUFDLE1BQU0sQ0FBQyxHQUFHLEVBQUUsQ0FBQztTQUMvQjtRQUNELElBQUksQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFDLENBQUMsSUFBSSxDQUFDLEVBQUUsUUFBUSxFQUFFLFFBQVEsRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLENBQUMsQ0FBQztJQUN4RSxDQUFDO0lBRUQsSUFBSSxFQUFFLFVBQVUsTUFBTSxFQUFFLFNBQVM7UUFDN0IsSUFBSSxLQUFLLEdBQUcsSUFBSSxDQUFDLFNBQVMsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUNuQyxJQUFJLEtBQUssS0FBSyxTQUFTO1lBQUUsT0FBTztRQUVoQyxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsS0FBSyxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRTtZQUNuQyxJQUFJLE9BQU8sR0FBRyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUM7WUFDdkIsSUFBSSxPQUFPO2dCQUFFLE9BQU8sQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxNQUFNLEVBQUUsU0FBUyxDQUFDLENBQUM7U0FDakU7SUFDTCxDQUFDO0lBRUQsR0FBRyxFQUFFLFVBQVUsTUFBTSxFQUFFLFFBQVE7UUFDM0IsSUFBSSxLQUFLLEdBQUcsSUFBSSxDQUFDLFNBQVMsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUNuQyxJQUFJLEtBQUssS0FBSyxTQUFTO1lBQUUsT0FBTztRQUNoQyxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsS0FBSyxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRTtZQUNuQyxJQUFJLE9BQU8sR0FBRyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUM7WUFDdkIsSUFBSSxPQUFPLElBQUksT0FBTyxDQUFDLFFBQVEsS0FBSyxRQUFRLEVBQUU7Z0JBQzFDLEtBQUssQ0FBQyxDQUFDLENBQUMsR0FBRyxTQUFTLENBQUM7Z0JBQ3JCLE1BQU07YUFDVDtTQUNKO0lBQ0wsQ0FBQztJQUVELFNBQVMsRUFBRSxVQUFVLE1BQU07UUFDdkIsSUFBSSxDQUFDLFNBQVMsQ0FBQyxNQUFNLENBQUMsR0FBRyxTQUFTLENBQUM7SUFDdkMsQ0FBQztJQUVELFlBQVksRUFBRTtRQUNWLEtBQUssSUFBSSxDQUFDLElBQUksSUFBSSxDQUFDLFNBQVMsRUFBRTtZQUMxQixJQUFJLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLEVBQUU7Z0JBQ25CLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUM7YUFDckI7U0FDSjtJQUNMLENBQUM7Q0FDSixDQUFDO0FBRU8sb0NBQVkiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6Ii8iLCJzb3VyY2VzQ29udGVudCI6WyIvL+WFqOWxgOmAmuefpVxudmFyIE5vdGlmaWNhdGlvbiA9IHtcbiAgICBfZXZlbnRNYXA6IFtdLFxuICAgIG9uOiBmdW5jdGlvbiAobWFzZ0lkLCBjYWxsYmFjaywgdGFyZ2V0KSB7XG4gICAgICAgIGlmICh0aGlzLl9ldmVudE1hcFttYXNnSWRdID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHRoaXMuX2V2ZW50TWFwW21hc2dJZF0gPSBbXTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLl9ldmVudE1hcFttYXNnSWRdLnB1c2goeyBjYWxsYmFjazogY2FsbGJhY2ssIHRhcmdldDogdGFyZ2V0IH0pO1xuICAgIH0sXG5cbiAgICBlbWl0OiBmdW5jdGlvbiAobWFzZ0lkLCBwYXJhbWV0ZXIpIHtcbiAgICAgICAgbGV0IGFycmF5ID0gdGhpcy5fZXZlbnRNYXBbbWFzZ0lkXTtcbiAgICAgICAgaWYgKGFycmF5ID09PSB1bmRlZmluZWQpIHJldHVybjtcblxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFycmF5Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBsZXQgZWxlbWVudCA9IGFycmF5W2ldO1xuICAgICAgICAgICAgaWYgKGVsZW1lbnQpIGVsZW1lbnQuY2FsbGJhY2suY2FsbChlbGVtZW50LnRhcmdldCwgcGFyYW1ldGVyKTtcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICBvZmY6IGZ1bmN0aW9uIChtYXNnSWQsIGNhbGxiYWNrKSB7XG4gICAgICAgIGxldCBhcnJheSA9IHRoaXMuX2V2ZW50TWFwW21hc2dJZF07XG4gICAgICAgIGlmIChhcnJheSA9PT0gdW5kZWZpbmVkKSByZXR1cm47XG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyYXkubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGxldCBlbGVtZW50ID0gYXJyYXlbaV07XG4gICAgICAgICAgICBpZiAoZWxlbWVudCAmJiBlbGVtZW50LmNhbGxiYWNrID09PSBjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgIGFycmF5W2ldID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSxcblxuICAgIG9mZk1hc2dJZDogZnVuY3Rpb24gKG1hc2dJZCkge1xuICAgICAgICB0aGlzLl9ldmVudE1hcFttYXNnSWRdID0gdW5kZWZpbmVkO1xuICAgIH0sXG5cbiAgICByZW1vdmVBbGxNc2c6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgZm9yIChsZXQgayBpbiB0aGlzLl9ldmVudE1hcCkge1xuICAgICAgICAgICAgaWYgKHRoaXMuX2V2ZW50TWFwW2tdKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5vZmZNYXNnSWQoayk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG59O1xuXG5leHBvcnQgeyBOb3RpZmljYXRpb24gfTsiXX0=
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/tool/Storage.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, 'e4f51plCa5CE6sxRV+Bx5GJ', 'Storage');
// Script/tool/Storage.ts

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StorageMessage = void 0;
//缓存浏览器数据
var StorageMessage = {
    getStorage: function (key) {
        var result = null;
        if (cc.sys.localStorage.getItem(key)) {
            var result = cc.sys.localStorage.getItem(key);
        }
        if (result) {
            result = JSON.parse(result);
        }
        return result;
    },
    setStorage: function (key, value) {
        //主动拉起分享接口
        var temp = JSON.stringify(value);
        cc.sys.localStorage.setItem(key, temp);
    },
    removeStorage: function (key) {
        //主动删除消息接口
        if (cc.sys.localStorage.getItem(key)) {
            cc.sys.localStorage.removeItem(key);
        }
    },
};
exports.StorageMessage = StorageMessage;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFx0b29sXFxTdG9yYWdlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLFNBQVM7QUFDVCxJQUFJLGNBQWMsR0FBRztJQUNqQixVQUFVLEVBQUcsVUFBUyxHQUFHO1FBQ3JCLElBQUksTUFBTSxHQUFHLElBQUksQ0FBQztRQUNsQixJQUFHLEVBQUUsQ0FBQyxHQUFHLENBQUMsWUFBWSxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFBQztZQUNsQyxJQUFJLE1BQU0sR0FBRyxFQUFFLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLENBQUM7U0FDL0M7UUFFRCxJQUFHLE1BQU0sRUFBQztZQUNSLE1BQU0sR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxDQUFDO1NBQzdCO1FBQ0QsT0FBTyxNQUFNLENBQUM7SUFDbEIsQ0FBQztJQUNELFVBQVUsRUFBRyxVQUFTLEdBQUcsRUFBQyxLQUFLO1FBQzNCLFVBQVU7UUFDVixJQUFJLElBQUksR0FBRyxJQUFJLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ2pDLEVBQUUsQ0FBQyxHQUFHLENBQUMsWUFBWSxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsSUFBSSxDQUFDLENBQUE7SUFDMUMsQ0FBQztJQUNELGFBQWEsRUFBRyxVQUFTLEdBQUc7UUFDMUIsVUFBVTtRQUNWLElBQUcsRUFBRSxDQUFDLEdBQUcsQ0FBQyxZQUFZLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxFQUFDO1lBQ2xDLEVBQUUsQ0FBQyxHQUFHLENBQUMsWUFBWSxDQUFDLFVBQVUsQ0FBQyxHQUFHLENBQUMsQ0FBQTtTQUNwQztJQUNILENBQUM7Q0FDSixDQUFDO0FBRU8sd0NBQWMiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6Ii8iLCJzb3VyY2VzQ29udGVudCI6WyIvL+e8k+WtmOa1j+iniOWZqOaVsOaNrlxudmFyIFN0b3JhZ2VNZXNzYWdlID0ge1xuICAgIGdldFN0b3JhZ2UgOiBmdW5jdGlvbihrZXkpe1xuICAgICAgICB2YXIgcmVzdWx0ID0gbnVsbDtcbiAgICAgICAgaWYoY2Muc3lzLmxvY2FsU3RvcmFnZS5nZXRJdGVtKGtleSkpe1xuICAgICAgICAgIHZhciByZXN1bHQgPSBjYy5zeXMubG9jYWxTdG9yYWdlLmdldEl0ZW0oa2V5KTtcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgaWYocmVzdWx0KXtcbiAgICAgICAgICByZXN1bHQgPSBKU09OLnBhcnNlKHJlc3VsdCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9LFxuICAgIHNldFN0b3JhZ2UgOiBmdW5jdGlvbihrZXksdmFsdWUpe1xuICAgICAgICAvL+S4u+WKqOaLiei1t+WIhuS6q+aOpeWPo1xuICAgICAgICB2YXIgdGVtcCA9IEpTT04uc3RyaW5naWZ5KHZhbHVlKTtcbiAgICAgICAgY2Muc3lzLmxvY2FsU3RvcmFnZS5zZXRJdGVtKGtleSwgdGVtcClcbiAgICB9LFxuICAgIHJlbW92ZVN0b3JhZ2UgOiBmdW5jdGlvbihrZXkpe1xuICAgICAgLy/kuLvliqjliKDpmaTmtojmga/mjqXlj6NcbiAgICAgIGlmKGNjLnN5cy5sb2NhbFN0b3JhZ2UuZ2V0SXRlbShrZXkpKXtcbiAgICAgICAgY2Muc3lzLmxvY2FsU3RvcmFnZS5yZW1vdmVJdGVtKGtleSlcbiAgICAgIH1cbiAgICB9LFxufTtcblxuZXhwb3J0IHsgU3RvcmFnZU1lc3NhZ2UgfTsiXX0=
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/crypto/crypto-js.min.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, 'e64e1qXyT9CV6s0gDQdj/ed', 'crypto-js.min');
// Script/crypto/crypto-js.min.js

"use strict";

!function (t, r) {
  "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r();
}(void 0, function () {
  var t = t || function (t, r) {
    var e = Object.create || function () {
      function t() {}

      return function (r) {
        var e;
        return t.prototype = r, e = new t(), t.prototype = null, e;
      };
    }(),
        i = {},
        n = i.lib = {},
        o = n.Base = function () {
      return {
        extend: function extend(t) {
          var r = e(this);
          return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () {
            r.$super.init.apply(this, arguments);
          }), r.init.prototype = r, r.$super = this, r;
        },
        create: function create() {
          var t = this.extend();
          return t.init.apply(t, arguments), t;
        },
        init: function init() {},
        mixIn: function mixIn(t) {
          for (var r in t) {
            t.hasOwnProperty(r) && (this[r] = t[r]);
          }

          t.hasOwnProperty("toString") && (this.toString = t.toString);
        },
        clone: function clone() {
          return this.init.prototype.extend(this);
        }
      };
    }(),
        s = n.WordArray = o.extend({
      init: function init(t, e) {
        t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length;
      },
      toString: function toString(t) {
        return (t || c).stringify(this);
      },
      concat: function concat(t) {
        var r = this.words,
            e = t.words,
            i = this.sigBytes,
            n = t.sigBytes;
        if (this.clamp(), i % 4) for (var o = 0; o < n; o++) {
          var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255;
          r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8;
        } else for (var o = 0; o < n; o += 4) {
          r[i + o >>> 2] = e[o >>> 2];
        }
        return this.sigBytes += n, this;
      },
      clamp: function clamp() {
        var r = this.words,
            e = this.sigBytes;
        r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4);
      },
      clone: function clone() {
        var t = o.clone.call(this);
        return t.words = this.words.slice(0), t;
      },
      random: function random(r) {
        for (var e, i = [], n = function n(r) {
          var r = r,
              e = 987654321,
              i = 4294967295;
          return function () {
            e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i;
            var n = (e << 16) + r & i;
            return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1);
          };
        }, o = 0; o < r; o += 4) {
          var a = n(4294967296 * (e || t.random()));
          e = 987654071 * a(), i.push(4294967296 * a() | 0);
        }

        return new s.init(i, r);
      }
    }),
        a = i.enc = {},
        c = a.Hex = {
      stringify: function stringify(t) {
        for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) {
          var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255;
          i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16));
        }

        return i.join("");
      },
      parse: function parse(t) {
        for (var r = t.length, e = [], i = 0; i < r; i += 2) {
          e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4;
        }

        return new s.init(e, r / 2);
      }
    },
        h = a.Latin1 = {
      stringify: function stringify(t) {
        for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) {
          var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255;
          i.push(String.fromCharCode(o));
        }

        return i.join("");
      },
      parse: function parse(t) {
        for (var r = t.length, e = [], i = 0; i < r; i++) {
          e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8;
        }

        return new s.init(e, r);
      }
    },
        l = a.Utf8 = {
      stringify: function stringify(t) {
        try {
          return decodeURIComponent(escape(h.stringify(t)));
        } catch (t) {
          throw new Error("Malformed UTF-8 data");
        }
      },
      parse: function parse(t) {
        return h.parse(unescape(encodeURIComponent(t)));
      }
    },
        f = n.BufferedBlockAlgorithm = o.extend({
      reset: function reset() {
        this._data = new s.init(), this._nDataBytes = 0;
      },
      _append: function _append(t) {
        "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes;
      },
      _process: function _process(r) {
        var e = this._data,
            i = e.words,
            n = e.sigBytes,
            o = this.blockSize,
            a = 4 * o,
            c = n / a;
        c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0);
        var h = c * o,
            l = t.min(4 * h, n);

        if (h) {
          for (var f = 0; f < h; f += o) {
            this._doProcessBlock(i, f);
          }

          var u = i.splice(0, h);
          e.sigBytes -= l;
        }

        return new s.init(u, l);
      },
      clone: function clone() {
        var t = o.clone.call(this);
        return t._data = this._data.clone(), t;
      },
      _minBufferSize: 0
    }),
        u = (n.Hasher = f.extend({
      cfg: o.extend(),
      init: function init(t) {
        this.cfg = this.cfg.extend(t), this.reset();
      },
      reset: function reset() {
        f.reset.call(this), this._doReset();
      },
      update: function update(t) {
        return this._append(t), this._process(), this;
      },
      finalize: function finalize(t) {
        t && this._append(t);

        var r = this._doFinalize();

        return r;
      },
      blockSize: 16,
      _createHelper: function _createHelper(t) {
        return function (r, e) {
          return new t.init(e).finalize(r);
        };
      },
      _createHmacHelper: function _createHmacHelper(t) {
        return function (r, e) {
          return new u.HMAC.init(t, e).finalize(r);
        };
      }
    }), i.algo = {});

    return i;
  }(Math);

  return function () {
    function r(t, r, e) {
      for (var i = [], o = 0, s = 0; s < r; s++) {
        if (s % 4) {
          var a = e[t.charCodeAt(s - 1)] << s % 4 * 2,
              c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2;
          i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++;
        }
      }

      return n.create(i, o);
    }

    var e = t,
        i = e.lib,
        n = i.WordArray,
        o = e.enc;
    o.Base64 = {
      stringify: function stringify(t) {
        var r = t.words,
            e = t.sigBytes,
            i = this._map;
        t.clamp();

        for (var n = [], o = 0; o < e; o += 3) {
          for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++) {
            n.push(i.charAt(h >>> 6 * (3 - l) & 63));
          }
        }

        var f = i.charAt(64);
        if (f) for (; n.length % 4;) {
          n.push(f);
        }
        return n.join("");
      },
      parse: function parse(t) {
        var e = t.length,
            i = this._map,
            n = this._reverseMap;

        if (!n) {
          n = this._reverseMap = [];

          for (var o = 0; o < i.length; o++) {
            n[i.charCodeAt(o)] = o;
          }
        }

        var s = i.charAt(64);

        if (s) {
          var a = t.indexOf(s);
          a !== -1 && (e = a);
        }

        return r(t, e, n);
      },
      _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
    };
  }(), function (r) {
    function e(t, r, e, i, n, o, s) {
      var a = t + (r & e | ~r & i) + n + s;
      return (a << o | a >>> 32 - o) + r;
    }

    function i(t, r, e, i, n, o, s) {
      var a = t + (r & i | e & ~i) + n + s;
      return (a << o | a >>> 32 - o) + r;
    }

    function n(t, r, e, i, n, o, s) {
      var a = t + (r ^ e ^ i) + n + s;
      return (a << o | a >>> 32 - o) + r;
    }

    function o(t, r, e, i, n, o, s) {
      var a = t + (e ^ (r | ~i)) + n + s;
      return (a << o | a >>> 32 - o) + r;
    }

    var s = t,
        a = s.lib,
        c = a.WordArray,
        h = a.Hasher,
        l = s.algo,
        f = [];
    !function () {
      for (var t = 0; t < 64; t++) {
        f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0;
      }
    }();
    var u = l.MD5 = h.extend({
      _doReset: function _doReset() {
        this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]);
      },
      _doProcessBlock: function _doProcessBlock(t, r) {
        for (var s = 0; s < 16; s++) {
          var a = r + s,
              c = t[a];
          t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8);
        }

        var h = this._hash.words,
            l = t[r + 0],
            u = t[r + 1],
            d = t[r + 2],
            v = t[r + 3],
            p = t[r + 4],
            _ = t[r + 5],
            y = t[r + 6],
            g = t[r + 7],
            B = t[r + 8],
            w = t[r + 9],
            k = t[r + 10],
            S = t[r + 11],
            m = t[r + 12],
            x = t[r + 13],
            b = t[r + 14],
            H = t[r + 15],
            z = h[0],
            A = h[1],
            C = h[2],
            D = h[3];
        z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0;
      },
      _doFinalize: function _doFinalize() {
        var t = this._data,
            e = t.words,
            i = 8 * this._nDataBytes,
            n = 8 * t.sigBytes;
        e[n >>> 5] |= 128 << 24 - n % 32;
        var o = r.floor(i / 4294967296),
            s = i;
        e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process();

        for (var a = this._hash, c = a.words, h = 0; h < 4; h++) {
          var l = c[h];
          c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8);
        }

        return a;
      },
      clone: function clone() {
        var t = h.clone.call(this);
        return t._hash = this._hash.clone(), t;
      }
    });
    s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u);
  }(Math), function () {
    var r = t,
        e = r.lib,
        i = e.WordArray,
        n = e.Hasher,
        o = r.algo,
        s = [],
        a = o.SHA1 = n.extend({
      _doReset: function _doReset() {
        this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
      },
      _doProcessBlock: function _doProcessBlock(t, r) {
        for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) {
          if (h < 16) s[h] = 0 | t[r + h];else {
            var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16];
            s[h] = l << 1 | l >>> 31;
          }
          var f = (i << 5 | i >>> 27) + c + s[h];
          f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f;
        }

        e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0;
      },
      _doFinalize: function _doFinalize() {
        var t = this._data,
            r = t.words,
            e = 8 * this._nDataBytes,
            i = 8 * t.sigBytes;
        return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash;
      },
      clone: function clone() {
        var t = n.clone.call(this);
        return t._hash = this._hash.clone(), t;
      }
    });
    r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a);
  }(), function (r) {
    var e = t,
        i = e.lib,
        n = i.WordArray,
        o = i.Hasher,
        s = e.algo,
        a = [],
        c = [];
    !function () {
      function t(t) {
        for (var e = r.sqrt(t), i = 2; i <= e; i++) {
          if (!(t % i)) return !1;
        }

        return !0;
      }

      function e(t) {
        return 4294967296 * (t - (0 | t)) | 0;
      }

      for (var i = 2, n = 0; n < 64;) {
        t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++;
      }
    }();
    var h = [],
        l = s.SHA256 = o.extend({
      _doReset: function _doReset() {
        this._hash = new n.init(a.slice(0));
      },
      _doProcessBlock: function _doProcessBlock(t, r) {
        for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) {
          if (d < 16) h[d] = 0 | t[r + d];else {
            var v = h[d - 15],
                p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3,
                _ = h[d - 2],
                y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10;
            h[d] = p + h[d - 7] + y + h[d - 16];
          }
          var g = a & l ^ ~a & f,
              B = i & n ^ i & o ^ n & o,
              w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22),
              k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25),
              S = u + k + g + c[d] + h[d],
              m = w + B;
          u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0;
        }

        e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0;
      },
      _doFinalize: function _doFinalize() {
        var t = this._data,
            e = t.words,
            i = 8 * this._nDataBytes,
            n = 8 * t.sigBytes;
        return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash;
      },
      clone: function clone() {
        var t = o.clone.call(this);
        return t._hash = this._hash.clone(), t;
      }
    });
    e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l);
  }(Math), function () {
    function r(t) {
      return t << 8 & 4278255360 | t >>> 8 & 16711935;
    }

    var e = t,
        i = e.lib,
        n = i.WordArray,
        o = e.enc;
    o.Utf16 = o.Utf16BE = {
      stringify: function stringify(t) {
        for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) {
          var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535;
          i.push(String.fromCharCode(o));
        }

        return i.join("");
      },
      parse: function parse(t) {
        for (var r = t.length, e = [], i = 0; i < r; i++) {
          e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16;
        }

        return n.create(e, 2 * r);
      }
    };
    o.Utf16LE = {
      stringify: function stringify(t) {
        for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) {
          var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535);
          n.push(String.fromCharCode(s));
        }

        return n.join("");
      },
      parse: function parse(t) {
        for (var e = t.length, i = [], o = 0; o < e; o++) {
          i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16);
        }

        return n.create(i, 2 * e);
      }
    };
  }(), function () {
    if ("function" == typeof ArrayBuffer) {
      var r = t,
          e = r.lib,
          i = e.WordArray,
          n = i.init,
          o = i.init = function (t) {
        if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) {
          for (var r = t.byteLength, e = [], i = 0; i < r; i++) {
            e[i >>> 2] |= t[i] << 24 - i % 4 * 8;
          }

          n.call(this, e, r);
        } else n.apply(this, arguments);
      };

      o.prototype = i;
    }
  }(), function (r) {
    function e(t, r, e) {
      return t ^ r ^ e;
    }

    function i(t, r, e) {
      return t & r | ~t & e;
    }

    function n(t, r, e) {
      return (t | ~r) ^ e;
    }

    function o(t, r, e) {
      return t & e | r & ~e;
    }

    function s(t, r, e) {
      return t ^ (r | ~e);
    }

    function a(t, r) {
      return t << r | t >>> 32 - r;
    }

    var c = t,
        h = c.lib,
        l = h.WordArray,
        f = h.Hasher,
        u = c.algo,
        d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]),
        v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]),
        p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]),
        _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]),
        y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]),
        g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]),
        B = u.RIPEMD160 = f.extend({
      _doReset: function _doReset() {
        this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
      },
      _doProcessBlock: function _doProcessBlock(t, r) {
        for (var c = 0; c < 16; c++) {
          var h = r + c,
              l = t[h];
          t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8);
        }

        var f,
            u,
            B,
            w,
            k,
            S,
            m,
            x,
            b,
            H,
            z = this._hash.words,
            A = y.words,
            C = g.words,
            D = d.words,
            R = v.words,
            E = p.words,
            M = _.words;
        S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4];

        for (var F, c = 0; c < 80; c += 1) {
          F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F;
        }

        F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F;
      },
      _doFinalize: function _doFinalize() {
        var t = this._data,
            r = t.words,
            e = 8 * this._nDataBytes,
            i = 8 * t.sigBytes;
        r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process();

        for (var n = this._hash, o = n.words, s = 0; s < 5; s++) {
          var a = o[s];
          o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8);
        }

        return n;
      },
      clone: function clone() {
        var t = f.clone.call(this);
        return t._hash = this._hash.clone(), t;
      }
    });

    c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B);
  }(Math), function () {
    var r = t,
        e = r.lib,
        i = e.Base,
        n = r.enc,
        o = n.Utf8,
        s = r.algo;
    s.HMAC = i.extend({
      init: function init(t, r) {
        t = this._hasher = new t.init(), "string" == typeof r && (r = o.parse(r));
        var e = t.blockSize,
            i = 4 * e;
        r.sigBytes > i && (r = t.finalize(r)), r.clamp();

        for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++) {
          a[h] ^= 1549556828, c[h] ^= 909522486;
        }

        n.sigBytes = s.sigBytes = i, this.reset();
      },
      reset: function reset() {
        var t = this._hasher;
        t.reset(), t.update(this._iKey);
      },
      update: function update(t) {
        return this._hasher.update(t), this;
      },
      finalize: function finalize(t) {
        var r = this._hasher,
            e = r.finalize(t);
        r.reset();
        var i = r.finalize(this._oKey.clone().concat(e));
        return i;
      }
    });
  }(), function () {
    var r = t,
        e = r.lib,
        i = e.Base,
        n = e.WordArray,
        o = r.algo,
        s = o.SHA1,
        a = o.HMAC,
        c = o.PBKDF2 = i.extend({
      cfg: i.extend({
        keySize: 4,
        hasher: s,
        iterations: 1
      }),
      init: function init(t) {
        this.cfg = this.cfg.extend(t);
      },
      compute: function compute(t, r) {
        for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) {
          var u = i.update(r).finalize(s);
          i.reset();

          for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) {
            p = i.finalize(p), i.reset();

            for (var y = p.words, g = 0; g < v; g++) {
              d[g] ^= y[g];
            }
          }

          o.concat(u), h[0]++;
        }

        return o.sigBytes = 4 * l, o;
      }
    });

    r.PBKDF2 = function (t, r, e) {
      return c.create(e).compute(t, r);
    };
  }(), function () {
    var r = t,
        e = r.lib,
        i = e.Base,
        n = e.WordArray,
        o = r.algo,
        s = o.MD5,
        a = o.EvpKDF = i.extend({
      cfg: i.extend({
        keySize: 4,
        hasher: s,
        iterations: 1
      }),
      init: function init(t) {
        this.cfg = this.cfg.extend(t);
      },
      compute: function compute(t, r) {
        for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) {
          h && i.update(h);
          var h = i.update(t).finalize(r);
          i.reset();

          for (var l = 1; l < c; l++) {
            h = i.finalize(h), i.reset();
          }

          o.concat(h);
        }

        return o.sigBytes = 4 * a, o;
      }
    });

    r.EvpKDF = function (t, r, e) {
      return a.create(e).compute(t, r);
    };
  }(), function () {
    var r = t,
        e = r.lib,
        i = e.WordArray,
        n = r.algo,
        o = n.SHA256,
        s = n.SHA224 = o.extend({
      _doReset: function _doReset() {
        this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]);
      },
      _doFinalize: function _doFinalize() {
        var t = o._doFinalize.call(this);

        return t.sigBytes -= 4, t;
      }
    });
    r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s);
  }(), function (r) {
    var e = t,
        i = e.lib,
        n = i.Base,
        o = i.WordArray,
        s = e.x64 = {};
    s.Word = n.extend({
      init: function init(t, r) {
        this.high = t, this.low = r;
      }
    }), s.WordArray = n.extend({
      init: function init(t, e) {
        t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length;
      },
      toX32: function toX32() {
        for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) {
          var n = t[i];
          e.push(n.high), e.push(n.low);
        }

        return o.create(e, this.sigBytes);
      },
      clone: function clone() {
        for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++) {
          r[i] = r[i].clone();
        }

        return t;
      }
    });
  }(), function (r) {
    var e = t,
        i = e.lib,
        n = i.WordArray,
        o = i.Hasher,
        s = e.x64,
        a = s.Word,
        c = e.algo,
        h = [],
        l = [],
        f = [];
    !function () {
      for (var t = 1, r = 0, e = 0; e < 24; e++) {
        h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64;
        var i = r % 5,
            n = (2 * t + 3 * r) % 5;
        t = i, r = n;
      }

      for (var t = 0; t < 5; t++) {
        for (var r = 0; r < 5; r++) {
          l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5;
        }
      }

      for (var o = 1, s = 0; s < 24; s++) {
        for (var c = 0, u = 0, d = 0; d < 7; d++) {
          if (1 & o) {
            var v = (1 << d) - 1;
            v < 32 ? u ^= 1 << v : c ^= 1 << v - 32;
          }

          128 & o ? o = o << 1 ^ 113 : o <<= 1;
        }

        f[s] = a.create(c, u);
      }
    }();
    var u = [];
    !function () {
      for (var t = 0; t < 25; t++) {
        u[t] = a.create();
      }
    }();
    var d = c.SHA3 = o.extend({
      cfg: o.cfg.extend({
        outputLength: 512
      }),
      _doReset: function _doReset() {
        for (var t = this._state = [], r = 0; r < 25; r++) {
          t[r] = new a.init();
        }

        this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
      },
      _doProcessBlock: function _doProcessBlock(t, r) {
        for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) {
          var o = t[r + 2 * n],
              s = t[r + 2 * n + 1];
          o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8);
          var a = e[n];
          a.high ^= s, a.low ^= o;
        }

        for (var c = 0; c < 24; c++) {
          for (var d = 0; d < 5; d++) {
            for (var v = 0, p = 0, _ = 0; _ < 5; _++) {
              var a = e[d + 5 * _];
              v ^= a.high, p ^= a.low;
            }

            var y = u[d];
            y.high = v, y.low = p;
          }

          for (var d = 0; d < 5; d++) {
            for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) {
              var a = e[d + 5 * _];
              a.high ^= v, a.low ^= p;
            }
          }

          for (var S = 1; S < 25; S++) {
            var a = e[S],
                m = a.high,
                x = a.low,
                b = h[S];
            if (b < 32) var v = m << b | x >>> 32 - b,
                p = x << b | m >>> 32 - b;else var v = x << b - 32 | m >>> 64 - b,
                p = m << b - 32 | x >>> 64 - b;
            var H = u[l[S]];
            H.high = v, H.low = p;
          }

          var z = u[0],
              A = e[0];
          z.high = A.high, z.low = A.low;

          for (var d = 0; d < 5; d++) {
            for (var _ = 0; _ < 5; _++) {
              var S = d + 5 * _,
                  a = e[S],
                  C = u[S],
                  D = u[(d + 1) % 5 + 5 * _],
                  R = u[(d + 2) % 5 + 5 * _];
              a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low;
            }
          }

          var a = e[0],
              E = f[c];
          a.high ^= E.high, a.low ^= E.low;
        }
      },
      _doFinalize: function _doFinalize() {
        var t = this._data,
            e = t.words,
            i = (8 * this._nDataBytes, 8 * t.sigBytes),
            o = 32 * this.blockSize;
        e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process();

        for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) {
          var f = s[l],
              u = f.high,
              d = f.low;
          u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u);
        }

        return new n.init(h, a);
      },
      clone: function clone() {
        for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++) {
          r[e] = r[e].clone();
        }

        return t;
      }
    });
    e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d);
  }(Math), function () {
    function r() {
      return s.create.apply(s, arguments);
    }

    var e = t,
        i = e.lib,
        n = i.Hasher,
        o = e.x64,
        s = o.Word,
        a = o.WordArray,
        c = e.algo,
        h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)],
        l = [];
    !function () {
      for (var t = 0; t < 80; t++) {
        l[t] = r();
      }
    }();
    var f = c.SHA512 = n.extend({
      _doReset: function _doReset() {
        this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]);
      },
      _doProcessBlock: function _doProcessBlock(t, r) {
        for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) {
          var Z = l[T];
          if (T < 16) var q = Z.high = 0 | t[r + 2 * T],
              G = Z.low = 0 | t[r + 2 * T + 1];else {
            var J = l[T - 15],
                $ = J.high,
                Q = J.low,
                V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7,
                Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25),
                tt = l[T - 2],
                rt = tt.high,
                et = tt.low,
                it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6,
                nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26),
                ot = l[T - 7],
                st = ot.high,
                at = ot.low,
                ct = l[T - 16],
                ht = ct.high,
                lt = ct.low,
                G = Y + at,
                q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0),
                G = G + nt,
                q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0),
                G = G + lt,
                q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0);
            Z.high = q, Z.low = G;
          }

          var ft = O & I ^ ~O & X,
              ut = U & K ^ ~U & L,
              dt = C & R ^ C & M ^ R & M,
              vt = D & E ^ D & F ^ E & F,
              pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7),
              _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7),
              yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9),
              gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9),
              Bt = h[T],
              wt = Bt.high,
              kt = Bt.low,
              St = N + gt,
              mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0),
              St = St + ut,
              mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0),
              St = St + kt,
              mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0),
              St = St + G,
              mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0),
              xt = _t + vt,
              bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0);

          j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0;
        }

        v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0);
      },
      _doFinalize: function _doFinalize() {
        var t = this._data,
            r = t.words,
            e = 8 * this._nDataBytes,
            i = 8 * t.sigBytes;
        r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process();

        var n = this._hash.toX32();

        return n;
      },
      clone: function clone() {
        var t = n.clone.call(this);
        return t._hash = this._hash.clone(), t;
      },
      blockSize: 32
    });
    e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f);
  }(), function () {
    var r = t,
        e = r.x64,
        i = e.Word,
        n = e.WordArray,
        o = r.algo,
        s = o.SHA512,
        a = o.SHA384 = s.extend({
      _doReset: function _doReset() {
        this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]);
      },
      _doFinalize: function _doFinalize() {
        var t = s._doFinalize.call(this);

        return t.sigBytes -= 16, t;
      }
    });
    r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a);
  }(), t.lib.Cipher || function (r) {
    var e = t,
        i = e.lib,
        n = i.Base,
        o = i.WordArray,
        s = i.BufferedBlockAlgorithm,
        a = e.enc,
        c = (a.Utf8, a.Base64),
        h = e.algo,
        l = h.EvpKDF,
        f = i.Cipher = s.extend({
      cfg: n.extend(),
      createEncryptor: function createEncryptor(t, r) {
        return this.create(this._ENC_XFORM_MODE, t, r);
      },
      createDecryptor: function createDecryptor(t, r) {
        return this.create(this._DEC_XFORM_MODE, t, r);
      },
      init: function init(t, r, e) {
        this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset();
      },
      reset: function reset() {
        s.reset.call(this), this._doReset();
      },
      process: function process(t) {
        return this._append(t), this._process();
      },
      finalize: function finalize(t) {
        t && this._append(t);

        var r = this._doFinalize();

        return r;
      },
      keySize: 4,
      ivSize: 4,
      _ENC_XFORM_MODE: 1,
      _DEC_XFORM_MODE: 2,
      _createHelper: function () {
        function t(t) {
          return "string" == typeof t ? m : w;
        }

        return function (r) {
          return {
            encrypt: function encrypt(e, i, n) {
              return t(i).encrypt(r, e, i, n);
            },
            decrypt: function decrypt(e, i, n) {
              return t(i).decrypt(r, e, i, n);
            }
          };
        };
      }()
    }),
        u = (i.StreamCipher = f.extend({
      _doFinalize: function _doFinalize() {
        var t = this._process(!0);

        return t;
      },
      blockSize: 1
    }), e.mode = {}),
        d = i.BlockCipherMode = n.extend({
      createEncryptor: function createEncryptor(t, r) {
        return this.Encryptor.create(t, r);
      },
      createDecryptor: function createDecryptor(t, r) {
        return this.Decryptor.create(t, r);
      },
      init: function init(t, r) {
        this._cipher = t, this._iv = r;
      }
    }),
        v = u.CBC = function () {
      function t(t, e, i) {
        var n = this._iv;

        if (n) {
          var o = n;
          this._iv = r;
        } else var o = this._prevBlock;

        for (var s = 0; s < i; s++) {
          t[e + s] ^= o[s];
        }
      }

      var e = d.extend();
      return e.Encryptor = e.extend({
        processBlock: function processBlock(r, e) {
          var i = this._cipher,
              n = i.blockSize;
          t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n);
        }
      }), e.Decryptor = e.extend({
        processBlock: function processBlock(r, e) {
          var i = this._cipher,
              n = i.blockSize,
              o = r.slice(e, e + n);
          i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o;
        }
      }), e;
    }(),
        p = e.pad = {},
        _ = p.Pkcs7 = {
      pad: function pad(t, r) {
        for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4) {
          s.push(n);
        }

        var c = o.create(s, i);
        t.concat(c);
      },
      unpad: function unpad(t) {
        var r = 255 & t.words[t.sigBytes - 1 >>> 2];
        t.sigBytes -= r;
      }
    },
        y = (i.BlockCipher = f.extend({
      cfg: f.cfg.extend({
        mode: v,
        padding: _
      }),
      reset: function reset() {
        f.reset.call(this);
        var t = this.cfg,
            r = t.iv,
            e = t.mode;
        if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor;else {
          var i = e.createDecryptor;
          this._minBufferSize = 1;
        }
        this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i);
      },
      _doProcessBlock: function _doProcessBlock(t, r) {
        this._mode.processBlock(t, r);
      },
      _doFinalize: function _doFinalize() {
        var t = this.cfg.padding;

        if (this._xformMode == this._ENC_XFORM_MODE) {
          t.pad(this._data, this.blockSize);

          var r = this._process(!0);
        } else {
          var r = this._process(!0);

          t.unpad(r);
        }

        return r;
      },
      blockSize: 4
    }), i.CipherParams = n.extend({
      init: function init(t) {
        this.mixIn(t);
      },
      toString: function toString(t) {
        return (t || this.formatter).stringify(this);
      }
    })),
        g = e.format = {},
        B = g.OpenSSL = {
      stringify: function stringify(t) {
        var r = t.ciphertext,
            e = t.salt;
        if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r);else var i = r;
        return i.toString(c);
      },
      parse: function parse(t) {
        var r = c.parse(t),
            e = r.words;

        if (1398893684 == e[0] && 1701076831 == e[1]) {
          var i = o.create(e.slice(2, 4));
          e.splice(0, 4), r.sigBytes -= 16;
        }

        return y.create({
          ciphertext: r,
          salt: i
        });
      }
    },
        w = i.SerializableCipher = n.extend({
      cfg: n.extend({
        format: B
      }),
      encrypt: function encrypt(t, r, e, i) {
        i = this.cfg.extend(i);
        var n = t.createEncryptor(e, i),
            o = n.finalize(r),
            s = n.cfg;
        return y.create({
          ciphertext: o,
          key: e,
          iv: s.iv,
          algorithm: t,
          mode: s.mode,
          padding: s.padding,
          blockSize: t.blockSize,
          formatter: i.format
        });
      },
      decrypt: function decrypt(t, r, e, i) {
        i = this.cfg.extend(i), r = this._parse(r, i.format);
        var n = t.createDecryptor(e, i).finalize(r.ciphertext);
        return n;
      },
      _parse: function _parse(t, r) {
        return "string" == typeof t ? r.parse(t, this) : t;
      }
    }),
        k = e.kdf = {},
        S = k.OpenSSL = {
      execute: function execute(t, r, e, i) {
        i || (i = o.random(8));
        var n = l.create({
          keySize: r + e
        }).compute(t, i),
            s = o.create(n.words.slice(r), 4 * e);
        return n.sigBytes = 4 * r, y.create({
          key: n,
          iv: s,
          salt: i
        });
      }
    },
        m = i.PasswordBasedCipher = w.extend({
      cfg: w.cfg.extend({
        kdf: S
      }),
      encrypt: function encrypt(t, r, e, i) {
        i = this.cfg.extend(i);
        var n = i.kdf.execute(e, t.keySize, t.ivSize);
        i.iv = n.iv;
        var o = w.encrypt.call(this, t, r, n.key, i);
        return o.mixIn(n), o;
      },
      decrypt: function decrypt(t, r, e, i) {
        i = this.cfg.extend(i), r = this._parse(r, i.format);
        var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt);
        i.iv = n.iv;
        var o = w.decrypt.call(this, t, r, n.key, i);
        return o;
      }
    });
  }(), t.mode.CFB = function () {
    function r(t, r, e, i) {
      var n = this._iv;

      if (n) {
        var o = n.slice(0);
        this._iv = void 0;
      } else var o = this._prevBlock;

      i.encryptBlock(o, 0);

      for (var s = 0; s < e; s++) {
        t[r + s] ^= o[s];
      }
    }

    var e = t.lib.BlockCipherMode.extend();
    return e.Encryptor = e.extend({
      processBlock: function processBlock(t, e) {
        var i = this._cipher,
            n = i.blockSize;
        r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n);
      }
    }), e.Decryptor = e.extend({
      processBlock: function processBlock(t, e) {
        var i = this._cipher,
            n = i.blockSize,
            o = t.slice(e, e + n);
        r.call(this, t, e, n, i), this._prevBlock = o;
      }
    }), e;
  }(), t.mode.ECB = function () {
    var r = t.lib.BlockCipherMode.extend();
    return r.Encryptor = r.extend({
      processBlock: function processBlock(t, r) {
        this._cipher.encryptBlock(t, r);
      }
    }), r.Decryptor = r.extend({
      processBlock: function processBlock(t, r) {
        this._cipher.decryptBlock(t, r);
      }
    }), r;
  }(), t.pad.AnsiX923 = {
    pad: function pad(t, r) {
      var e = t.sigBytes,
          i = 4 * r,
          n = i - e % i,
          o = e + n - 1;
      t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n;
    },
    unpad: function unpad(t) {
      var r = 255 & t.words[t.sigBytes - 1 >>> 2];
      t.sigBytes -= r;
    }
  }, t.pad.Iso10126 = {
    pad: function pad(r, e) {
      var i = 4 * e,
          n = i - r.sigBytes % i;
      r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1));
    },
    unpad: function unpad(t) {
      var r = 255 & t.words[t.sigBytes - 1 >>> 2];
      t.sigBytes -= r;
    }
  }, t.pad.Iso97971 = {
    pad: function pad(r, e) {
      r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e);
    },
    unpad: function unpad(r) {
      t.pad.ZeroPadding.unpad(r), r.sigBytes--;
    }
  }, t.mode.OFB = function () {
    var r = t.lib.BlockCipherMode.extend(),
        e = r.Encryptor = r.extend({
      processBlock: function processBlock(t, r) {
        var e = this._cipher,
            i = e.blockSize,
            n = this._iv,
            o = this._keystream;
        n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0);

        for (var s = 0; s < i; s++) {
          t[r + s] ^= o[s];
        }
      }
    });
    return r.Decryptor = e, r;
  }(), t.pad.NoPadding = {
    pad: function pad() {},
    unpad: function unpad() {}
  }, function (r) {
    var e = t,
        i = e.lib,
        n = i.CipherParams,
        o = e.enc,
        s = o.Hex,
        a = e.format;
    a.Hex = {
      stringify: function stringify(t) {
        return t.ciphertext.toString(s);
      },
      parse: function parse(t) {
        var r = s.parse(t);
        return n.create({
          ciphertext: r
        });
      }
    };
  }(), function () {
    var r = t,
        e = r.lib,
        i = e.BlockCipher,
        n = r.algo,
        o = [],
        s = [],
        a = [],
        c = [],
        h = [],
        l = [],
        f = [],
        u = [],
        d = [],
        v = [];
    !function () {
      for (var t = [], r = 0; r < 256; r++) {
        r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283;
      }

      for (var e = 0, i = 0, r = 0; r < 256; r++) {
        var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4;
        n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e;
        var p = t[e],
            _ = t[p],
            y = t[_],
            g = 257 * t[n] ^ 16843008 * n;
        a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g;
        var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e;
        f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1;
      }
    }();

    var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54],
        _ = n.AES = i.extend({
      _doReset: function _doReset() {
        if (!this._nRounds || this._keyPriorReset !== this._key) {
          for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++) {
            if (a < e) s[a] = r[a];else {
              var c = s[a - 1];
              a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c;
            }
          }

          for (var h = this._invKeySchedule = [], l = 0; l < n; l++) {
            var a = n - l;
            if (l % 4) var c = s[a];else var c = s[a - 4];
            l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]];
          }
        }
      },
      encryptBlock: function encryptBlock(t, r) {
        this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o);
      },
      decryptBlock: function decryptBlock(t, r) {
        var e = t[r + 1];
        t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s);
        var e = t[r + 1];
        t[r + 1] = t[r + 3], t[r + 3] = e;
      },
      _doCryptBlock: function _doCryptBlock(t, r, e, i, n, o, s, a) {
        for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) {
          var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++],
              _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++],
              y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++],
              g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++];

          h = p, l = _, f = y, u = g;
        }

        var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++],
            _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++],
            y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++],
            g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++];

        t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g;
      },
      keySize: 8
    });

    r.AES = i._createHelper(_);
  }(), function () {
    function r(t, r) {
      var e = (this._lBlock >>> t ^ this._rBlock) & r;
      this._rBlock ^= e, this._lBlock ^= e << t;
    }

    function e(t, r) {
      var e = (this._rBlock >>> t ^ this._lBlock) & r;
      this._lBlock ^= e, this._rBlock ^= e << t;
    }

    var i = t,
        n = i.lib,
        o = n.WordArray,
        s = n.BlockCipher,
        a = i.algo,
        c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4],
        h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32],
        l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28],
        f = [{
      0: 8421888,
      268435456: 32768,
      536870912: 8421378,
      805306368: 2,
      1073741824: 512,
      1342177280: 8421890,
      1610612736: 8389122,
      1879048192: 8388608,
      2147483648: 514,
      2415919104: 8389120,
      2684354560: 33280,
      2952790016: 8421376,
      3221225472: 32770,
      3489660928: 8388610,
      3758096384: 0,
      4026531840: 33282,
      134217728: 0,
      402653184: 8421890,
      671088640: 33282,
      939524096: 32768,
      1207959552: 8421888,
      1476395008: 512,
      1744830464: 8421378,
      2013265920: 2,
      2281701376: 8389120,
      2550136832: 33280,
      2818572288: 8421376,
      3087007744: 8389122,
      3355443200: 8388610,
      3623878656: 32770,
      3892314112: 514,
      4160749568: 8388608,
      1: 32768,
      268435457: 2,
      536870913: 8421888,
      805306369: 8388608,
      1073741825: 8421378,
      1342177281: 33280,
      1610612737: 512,
      1879048193: 8389122,
      2147483649: 8421890,
      2415919105: 8421376,
      2684354561: 8388610,
      2952790017: 33282,
      3221225473: 514,
      3489660929: 8389120,
      3758096385: 32770,
      4026531841: 0,
      134217729: 8421890,
      402653185: 8421376,
      671088641: 8388608,
      939524097: 512,
      1207959553: 32768,
      1476395009: 8388610,
      1744830465: 2,
      2013265921: 33282,
      2281701377: 32770,
      2550136833: 8389122,
      2818572289: 514,
      3087007745: 8421888,
      3355443201: 8389120,
      3623878657: 0,
      3892314113: 33280,
      4160749569: 8421378
    }, {
      0: 1074282512,
      16777216: 16384,
      33554432: 524288,
      50331648: 1074266128,
      67108864: 1073741840,
      83886080: 1074282496,
      100663296: 1073758208,
      117440512: 16,
      134217728: 540672,
      150994944: 1073758224,
      167772160: 1073741824,
      184549376: 540688,
      201326592: 524304,
      218103808: 0,
      234881024: 16400,
      251658240: 1074266112,
      8388608: 1073758208,
      25165824: 540688,
      41943040: 16,
      58720256: 1073758224,
      75497472: 1074282512,
      92274688: 1073741824,
      109051904: 524288,
      125829120: 1074266128,
      142606336: 524304,
      159383552: 0,
      176160768: 16384,
      192937984: 1074266112,
      209715200: 1073741840,
      226492416: 540672,
      243269632: 1074282496,
      260046848: 16400,
      268435456: 0,
      285212672: 1074266128,
      301989888: 1073758224,
      318767104: 1074282496,
      335544320: 1074266112,
      352321536: 16,
      369098752: 540688,
      385875968: 16384,
      402653184: 16400,
      419430400: 524288,
      436207616: 524304,
      452984832: 1073741840,
      469762048: 540672,
      486539264: 1073758208,
      503316480: 1073741824,
      520093696: 1074282512,
      276824064: 540688,
      293601280: 524288,
      310378496: 1074266112,
      327155712: 16384,
      343932928: 1073758208,
      360710144: 1074282512,
      377487360: 16,
      394264576: 1073741824,
      411041792: 1074282496,
      427819008: 1073741840,
      444596224: 1073758224,
      461373440: 524304,
      478150656: 0,
      494927872: 16400,
      511705088: 1074266128,
      528482304: 540672
    }, {
      0: 260,
      1048576: 0,
      2097152: 67109120,
      3145728: 65796,
      4194304: 65540,
      5242880: 67108868,
      6291456: 67174660,
      7340032: 67174400,
      8388608: 67108864,
      9437184: 67174656,
      10485760: 65792,
      11534336: 67174404,
      12582912: 67109124,
      13631488: 65536,
      14680064: 4,
      15728640: 256,
      524288: 67174656,
      1572864: 67174404,
      2621440: 0,
      3670016: 67109120,
      4718592: 67108868,
      5767168: 65536,
      6815744: 65540,
      7864320: 260,
      8912896: 4,
      9961472: 256,
      11010048: 67174400,
      12058624: 65796,
      13107200: 65792,
      14155776: 67109124,
      15204352: 67174660,
      16252928: 67108864,
      16777216: 67174656,
      17825792: 65540,
      18874368: 65536,
      19922944: 67109120,
      20971520: 256,
      22020096: 67174660,
      23068672: 67108868,
      24117248: 0,
      25165824: 67109124,
      26214400: 67108864,
      27262976: 4,
      28311552: 65792,
      29360128: 67174400,
      30408704: 260,
      31457280: 65796,
      32505856: 67174404,
      17301504: 67108864,
      18350080: 260,
      19398656: 67174656,
      20447232: 0,
      21495808: 65540,
      22544384: 67109120,
      23592960: 256,
      24641536: 67174404,
      25690112: 65536,
      26738688: 67174660,
      27787264: 65796,
      28835840: 67108868,
      29884416: 67109124,
      30932992: 67174400,
      31981568: 4,
      33030144: 65792
    }, {
      0: 2151682048,
      65536: 2147487808,
      131072: 4198464,
      196608: 2151677952,
      262144: 0,
      327680: 4198400,
      393216: 2147483712,
      458752: 4194368,
      524288: 2147483648,
      589824: 4194304,
      655360: 64,
      720896: 2147487744,
      786432: 2151678016,
      851968: 4160,
      917504: 4096,
      983040: 2151682112,
      32768: 2147487808,
      98304: 64,
      163840: 2151678016,
      229376: 2147487744,
      294912: 4198400,
      360448: 2151682112,
      425984: 0,
      491520: 2151677952,
      557056: 4096,
      622592: 2151682048,
      688128: 4194304,
      753664: 4160,
      819200: 2147483648,
      884736: 4194368,
      950272: 4198464,
      1015808: 2147483712,
      1048576: 4194368,
      1114112: 4198400,
      1179648: 2147483712,
      1245184: 0,
      1310720: 4160,
      1376256: 2151678016,
      1441792: 2151682048,
      1507328: 2147487808,
      1572864: 2151682112,
      1638400: 2147483648,
      1703936: 2151677952,
      1769472: 4198464,
      1835008: 2147487744,
      1900544: 4194304,
      1966080: 64,
      2031616: 4096,
      1081344: 2151677952,
      1146880: 2151682112,
      1212416: 0,
      1277952: 4198400,
      1343488: 4194368,
      1409024: 2147483648,
      1474560: 2147487808,
      1540096: 64,
      1605632: 2147483712,
      1671168: 4096,
      1736704: 2147487744,
      1802240: 2151678016,
      1867776: 4160,
      1933312: 2151682048,
      1998848: 4194304,
      2064384: 4198464
    }, {
      0: 128,
      4096: 17039360,
      8192: 262144,
      12288: 536870912,
      16384: 537133184,
      20480: 16777344,
      24576: 553648256,
      28672: 262272,
      32768: 16777216,
      36864: 537133056,
      40960: 536871040,
      45056: 553910400,
      49152: 553910272,
      53248: 0,
      57344: 17039488,
      61440: 553648128,
      2048: 17039488,
      6144: 553648256,
      10240: 128,
      14336: 17039360,
      18432: 262144,
      22528: 537133184,
      26624: 553910272,
      30720: 536870912,
      34816: 537133056,
      38912: 0,
      43008: 553910400,
      47104: 16777344,
      51200: 536871040,
      55296: 553648128,
      59392: 16777216,
      63488: 262272,
      65536: 262144,
      69632: 128,
      73728: 536870912,
      77824: 553648256,
      81920: 16777344,
      86016: 553910272,
      90112: 537133184,
      94208: 16777216,
      98304: 553910400,
      102400: 553648128,
      106496: 17039360,
      110592: 537133056,
      114688: 262272,
      118784: 536871040,
      122880: 0,
      126976: 17039488,
      67584: 553648256,
      71680: 16777216,
      75776: 17039360,
      79872: 537133184,
      83968: 536870912,
      88064: 17039488,
      92160: 128,
      96256: 553910272,
      100352: 262272,
      104448: 553910400,
      108544: 0,
      112640: 553648128,
      116736: 16777344,
      120832: 262144,
      124928: 537133056,
      129024: 536871040
    }, {
      0: 268435464,
      256: 8192,
      512: 270532608,
      768: 270540808,
      1024: 268443648,
      1280: 2097152,
      1536: 2097160,
      1792: 268435456,
      2048: 0,
      2304: 268443656,
      2560: 2105344,
      2816: 8,
      3072: 270532616,
      3328: 2105352,
      3584: 8200,
      3840: 270540800,
      128: 270532608,
      384: 270540808,
      640: 8,
      896: 2097152,
      1152: 2105352,
      1408: 268435464,
      1664: 268443648,
      1920: 8200,
      2176: 2097160,
      2432: 8192,
      2688: 268443656,
      2944: 270532616,
      3200: 0,
      3456: 270540800,
      3712: 2105344,
      3968: 268435456,
      4096: 268443648,
      4352: 270532616,
      4608: 270540808,
      4864: 8200,
      5120: 2097152,
      5376: 268435456,
      5632: 268435464,
      5888: 2105344,
      6144: 2105352,
      6400: 0,
      6656: 8,
      6912: 270532608,
      7168: 8192,
      7424: 268443656,
      7680: 270540800,
      7936: 2097160,
      4224: 8,
      4480: 2105344,
      4736: 2097152,
      4992: 268435464,
      5248: 268443648,
      5504: 8200,
      5760: 270540808,
      6016: 270532608,
      6272: 270540800,
      6528: 270532616,
      6784: 8192,
      7040: 2105352,
      7296: 2097160,
      7552: 0,
      7808: 268435456,
      8064: 268443656
    }, {
      0: 1048576,
      16: 33555457,
      32: 1024,
      48: 1049601,
      64: 34604033,
      80: 0,
      96: 1,
      112: 34603009,
      128: 33555456,
      144: 1048577,
      160: 33554433,
      176: 34604032,
      192: 34603008,
      208: 1025,
      224: 1049600,
      240: 33554432,
      8: 34603009,
      24: 0,
      40: 33555457,
      56: 34604032,
      72: 1048576,
      88: 33554433,
      104: 33554432,
      120: 1025,
      136: 1049601,
      152: 33555456,
      168: 34603008,
      184: 1048577,
      200: 1024,
      216: 34604033,
      232: 1,
      248: 1049600,
      256: 33554432,
      272: 1048576,
      288: 33555457,
      304: 34603009,
      320: 1048577,
      336: 33555456,
      352: 34604032,
      368: 1049601,
      384: 1025,
      400: 34604033,
      416: 1049600,
      432: 1,
      448: 0,
      464: 34603008,
      480: 33554433,
      496: 1024,
      264: 1049600,
      280: 33555457,
      296: 34603009,
      312: 1,
      328: 33554432,
      344: 1048576,
      360: 1025,
      376: 34604032,
      392: 33554433,
      408: 34603008,
      424: 0,
      440: 34604033,
      456: 1049601,
      472: 1024,
      488: 33555456,
      504: 1048577
    }, {
      0: 134219808,
      1: 131072,
      2: 134217728,
      3: 32,
      4: 131104,
      5: 134350880,
      6: 134350848,
      7: 2048,
      8: 134348800,
      9: 134219776,
      10: 133120,
      11: 134348832,
      12: 2080,
      13: 0,
      14: 134217760,
      15: 133152,
      2147483648: 2048,
      2147483649: 134350880,
      2147483650: 134219808,
      2147483651: 134217728,
      2147483652: 134348800,
      2147483653: 133120,
      2147483654: 133152,
      2147483655: 32,
      2147483656: 134217760,
      2147483657: 2080,
      2147483658: 131104,
      2147483659: 134350848,
      2147483660: 0,
      2147483661: 134348832,
      2147483662: 134219776,
      2147483663: 131072,
      16: 133152,
      17: 134350848,
      18: 32,
      19: 2048,
      20: 134219776,
      21: 134217760,
      22: 134348832,
      23: 131072,
      24: 0,
      25: 131104,
      26: 134348800,
      27: 134219808,
      28: 134350880,
      29: 133120,
      30: 2080,
      31: 134217728,
      2147483664: 131072,
      2147483665: 2048,
      2147483666: 134348832,
      2147483667: 133152,
      2147483668: 32,
      2147483669: 134348800,
      2147483670: 134217728,
      2147483671: 134219808,
      2147483672: 134350880,
      2147483673: 134217760,
      2147483674: 134219776,
      2147483675: 0,
      2147483676: 133120,
      2147483677: 2080,
      2147483678: 131104,
      2147483679: 134350848
    }],
        u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679],
        d = a.DES = s.extend({
      _doReset: function _doReset() {
        for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) {
          var n = c[i] - 1;
          e[i] = r[n >>> 5] >>> 31 - n % 32 & 1;
        }

        for (var o = this._subKeys = [], s = 0; s < 16; s++) {
          for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++) {
            a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6;
          }

          a[0] = a[0] << 1 | a[0] >>> 31;

          for (var i = 1; i < 7; i++) {
            a[i] = a[i] >>> 4 * (i - 1) + 3;
          }

          a[7] = a[7] << 5 | a[7] >>> 27;
        }

        for (var u = this._invSubKeys = [], i = 0; i < 16; i++) {
          u[i] = o[15 - i];
        }
      },
      encryptBlock: function encryptBlock(t, r) {
        this._doCryptBlock(t, r, this._subKeys);
      },
      decryptBlock: function decryptBlock(t, r) {
        this._doCryptBlock(t, r, this._invSubKeys);
      },
      _doCryptBlock: function _doCryptBlock(t, i, n) {
        this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765);

        for (var o = 0; o < 16; o++) {
          for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++) {
            h |= f[l][((c ^ s[l]) & u[l]) >>> 0];
          }

          this._lBlock = c, this._rBlock = a ^ h;
        }

        var d = this._lBlock;
        this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock;
      },
      keySize: 2,
      ivSize: 2,
      blockSize: 2
    });
    i.DES = s._createHelper(d);
    var v = a.TripleDES = s.extend({
      _doReset: function _doReset() {
        var t = this._key,
            r = t.words;
        this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6)));
      },
      encryptBlock: function encryptBlock(t, r) {
        this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r);
      },
      decryptBlock: function decryptBlock(t, r) {
        this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r);
      },
      keySize: 6,
      ivSize: 2,
      blockSize: 2
    });
    i.TripleDES = s._createHelper(v);
  }(), function () {
    function r() {
      for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) {
        r = (r + 1) % 256, e = (e + t[r]) % 256;
        var o = t[r];
        t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n;
      }

      return this._i = r, this._j = e, i;
    }

    var e = t,
        i = e.lib,
        n = i.StreamCipher,
        o = e.algo,
        s = o.RC4 = n.extend({
      _doReset: function _doReset() {
        for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++) {
          i[n] = n;
        }

        for (var n = 0, o = 0; n < 256; n++) {
          var s = n % e,
              a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255;
          o = (o + i[n] + a) % 256;
          var c = i[n];
          i[n] = i[o], i[o] = c;
        }

        this._i = this._j = 0;
      },
      _doProcessBlock: function _doProcessBlock(t, e) {
        t[e] ^= r.call(this);
      },
      keySize: 8,
      ivSize: 0
    });
    e.RC4 = n._createHelper(s);
    var a = o.RC4Drop = s.extend({
      cfg: s.cfg.extend({
        drop: 192
      }),
      _doReset: function _doReset() {
        s._doReset.call(this);

        for (var t = this.cfg.drop; t > 0; t--) {
          r.call(this);
        }
      }
    });
    e.RC4Drop = n._createHelper(a);
  }(), t.mode.CTRGladman = function () {
    function r(t) {
      if (255 === (t >> 24 & 255)) {
        var r = t >> 16 & 255,
            e = t >> 8 & 255,
            i = 255 & t;
        255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i;
      } else t += 1 << 24;

      return t;
    }

    function e(t) {
      return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t;
    }

    var i = t.lib.BlockCipherMode.extend(),
        n = i.Encryptor = i.extend({
      processBlock: function processBlock(t, r) {
        var i = this._cipher,
            n = i.blockSize,
            o = this._iv,
            s = this._counter;
        o && (s = this._counter = o.slice(0), this._iv = void 0), e(s);
        var a = s.slice(0);
        i.encryptBlock(a, 0);

        for (var c = 0; c < n; c++) {
          t[r + c] ^= a[c];
        }
      }
    });
    return i.Decryptor = n, i;
  }(), function () {
    function r() {
      for (var t = this._X, r = this._C, e = 0; e < 8; e++) {
        a[e] = r[e];
      }

      r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0;

      for (var e = 0; e < 8; e++) {
        var i = t[e] + r[e],
            n = 65535 & i,
            o = i >>> 16,
            s = ((n * n >>> 17) + n * o >>> 15) + o * o,
            h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0);
        c[e] = s ^ h;
      }

      t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0;
    }

    var e = t,
        i = e.lib,
        n = i.StreamCipher,
        o = e.algo,
        s = [],
        a = [],
        c = [],
        h = o.Rabbit = n.extend({
      _doReset: function _doReset() {
        for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++) {
          t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8);
        }

        var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16],
            o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]];
        this._b = 0;

        for (var i = 0; i < 4; i++) {
          r.call(this);
        }

        for (var i = 0; i < 8; i++) {
          o[i] ^= n[i + 4 & 7];
        }

        if (e) {
          var s = e.words,
              a = s[0],
              c = s[1],
              h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8),
              l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8),
              f = h >>> 16 | 4294901760 & l,
              u = l << 16 | 65535 & h;
          o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u;

          for (var i = 0; i < 4; i++) {
            r.call(this);
          }
        }
      },
      _doProcessBlock: function _doProcessBlock(t, e) {
        var i = this._X;
        r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16;

        for (var n = 0; n < 4; n++) {
          s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n];
        }
      },
      blockSize: 4,
      ivSize: 2
    });
    e.Rabbit = n._createHelper(h);
  }(), t.mode.CTR = function () {
    var r = t.lib.BlockCipherMode.extend(),
        e = r.Encryptor = r.extend({
      processBlock: function processBlock(t, r) {
        var e = this._cipher,
            i = e.blockSize,
            n = this._iv,
            o = this._counter;
        n && (o = this._counter = n.slice(0), this._iv = void 0);
        var s = o.slice(0);
        e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0;

        for (var a = 0; a < i; a++) {
          t[r + a] ^= s[a];
        }
      }
    });
    return r.Decryptor = e, r;
  }(), function () {
    function r() {
      for (var t = this._X, r = this._C, e = 0; e < 8; e++) {
        a[e] = r[e];
      }

      r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0;

      for (var e = 0; e < 8; e++) {
        var i = t[e] + r[e],
            n = 65535 & i,
            o = i >>> 16,
            s = ((n * n >>> 17) + n * o >>> 15) + o * o,
            h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0);
        c[e] = s ^ h;
      }

      t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0;
    }

    var e = t,
        i = e.lib,
        n = i.StreamCipher,
        o = e.algo,
        s = [],
        a = [],
        c = [],
        h = o.RabbitLegacy = n.extend({
      _doReset: function _doReset() {
        var t = this._key.words,
            e = this.cfg.iv,
            i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16],
            n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]];
        this._b = 0;

        for (var o = 0; o < 4; o++) {
          r.call(this);
        }

        for (var o = 0; o < 8; o++) {
          n[o] ^= i[o + 4 & 7];
        }

        if (e) {
          var s = e.words,
              a = s[0],
              c = s[1],
              h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8),
              l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8),
              f = h >>> 16 | 4294901760 & l,
              u = l << 16 | 65535 & h;
          n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u;

          for (var o = 0; o < 4; o++) {
            r.call(this);
          }
        }
      },
      _doProcessBlock: function _doProcessBlock(t, e) {
        var i = this._X;
        r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16;

        for (var n = 0; n < 4; n++) {
          s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n];
        }
      },
      blockSize: 4,
      ivSize: 2
    });
    e.RabbitLegacy = n._createHelper(h);
  }(), t.pad.ZeroPadding = {
    pad: function pad(t, r) {
      var e = 4 * r;
      t.clamp(), t.sigBytes += e - (t.sigBytes % e || e);
    },
    unpad: function unpad(t) {
      for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);) {
        e--;
      }

      t.sigBytes = e + 1;
    }
  }, t;
}); //# sourceMappingURL=crypto-js.min.js.map

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 252516 characters]
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/tool/share.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, '850e92SXJVD2rcZ5BirDc9b', 'share');
// Script/tool/share.ts

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.WeChat = void 0;
var HttpUtil_1 = require("../crypto/HttpUtil");
var GameData_1 = require("../GameData");
var shareConfig = {
    gameId: "100001",
    shareLine: "zDLsruVI",
    EK: "hui231%1"
};
// 微信操作类
var WeChat = /** @class */ (function () {
    function WeChat() {
    }
    WeChat.setShare = function (url) {
        var urlTemp = this.removeQueryParams(url);
        shareConfig.shareLine = urlTemp;
        WeChat.getSignature(url);
    };
    WeChat.getResult = function (res) {
        if (res) {
            var data = res.data;
            wx.config({
                debug: false,
                appId: data.appId,
                timestamp: data.timestamp,
                nonceStr: data.nonceStr,
                signature: data.signature,
                jsApiList: ['onMenuShareTimeline', 'updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage']
            });
            wx.checkJsApi({
                jsApiList: ['updateAppMessageShareData'],
                success: function (res) {
                    console.log("检查api", res);
                    // 以键值对的形式返回，可用的api值true，不可用为false
                    // 如：{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
                }
            });
            setTimeout(function () {
                WeChat.changeShare();
            }, 100);
            setTimeout(function () {
                WeChat.changeShare();
            }, 200);
        }
    };
    WeChat.changeShare = function () {
        wx.ready(function () {
            wx.updateAppMessageShareData({
                title: '手眼协调练习',
                desc: '脑雾导致你的手眼协调变慢和估测不准吗？',
                link: shareConfig.shareLine,
                imgUrl: 'https://static.sparkus.cn/public/flyup.jpg',
                success: function () {
                    // 设置成功
                    console.log("分享好友成功回调");
                }
            });
            wx.updateTimelineShareData({
                title: '手眼协调练习',
                link: shareConfig.shareLine,
                imgUrl: 'https://static.sparkus.cn/public/flyup.jpg',
                success: function () {
                    // 设置成功
                    console.log("分享朋友圈成功回调");
                }
            });
        });
    };
    WeChat.getSignature = function (url) {
        return new Promise(function (resolve) {
            WeChat.getShareInfo((encodeURIComponent(url)), WeChat.getResult);
        });
    };
    WeChat.getShareInfo = function (shareUrl, callback) {
        return __awaiter(this, void 0, Promise, function () {
            var time, url;
            return __generator(this, function (_a) {
                time = Math.floor((new Date().getTime()) / 1000);
                url = HttpUtil_1.default.apiSign("/api/share/cfg?gameId=" + GameData_1.default._instance.GM_INFO.gameId + "&time=" + time + "&url=" + shareUrl, {});
                return [2 /*return*/, HttpUtil_1.default.httpGet(url, callback)];
            });
        });
    };
    WeChat.containsNanana = function (str) {
        return /test/i.test(str);
    };
    WeChat.removeQueryParams = function (url) {
        return url.replace(/\?.*$/, '');
    };
    return WeChat;
}());
exports.WeChat = WeChat;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 8148 characters]
//------QC-SOURCE-SPLIT------
