<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">window.__require = function e(n, a, t) {
    function c(i, l) {
        if (!a[i]) {
            if (!n[i]) {
                var s = i.split("/");
                if (s = s[s.length - 1], !n[s]) {
                    var r = "function" == typeof __require &amp;&amp; __require;
                    if (!l &amp;&amp; r) return r(s, !0);
                    if (o) return o(s, !0);
                    throw new Error("Cannot find module '" + i + "'")
                }
                i = s
            }
            var f = a[i] = {
                exports: {}
            };
            n[i][0].call(f.exports, function (e) {
                return c(n[i][1][e] || e)
            }, f, f.exports, e, n, a, t)
        }
        return a[i].exports
    }
    for (var o = "function" == typeof __require &amp;&amp; __require, i = 0; i &lt; t.length; i++) c(t[i]);
    return c
}({
    Character: [function (e, n, a) {
        "use strict";
        cc._RF.push(n, "67e58xWHfpF7740/yFKZBWa", "Character");
        var t, c = this &amp;&amp; this.__extends || (t = function (e, n) {
            return (t = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (e, n) {
                    e.__proto__ = n
                } || function (e, n) {
                    for (var a in n) n.hasOwnProperty(a) &amp;&amp; (e[a] = n[a])
                })(e, n)
        }, function (e, n) {
            function a() {
                this.constructor = e
            }
            t(e, n), e.prototype = null === n ? Object.create(n) : (a.prototype = n.prototype, new a)
        }),
            o = this &amp;&amp; this.__decorate || function (e, n, a, t) {
                var c, o = arguments.length,
                    i = o &lt; 3 ? n : null === t ? t = Object.getOwnPropertyDescriptor(n, a) : t;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) i = Reflect.decorate(e, n, a, t);
                else
                    for (var l = e.length - 1; l &gt;= 0; l--)(c = e[l]) &amp;&amp; (i = (o &lt; 3 ? c(i) : o &gt; 3 ? c(n, a, i) : c(n, a)) || i);
                return o &gt; 3 &amp;&amp; i &amp;&amp; Object.defineProperty(n, a, i), i
            };
        Object.defineProperty(a, "__esModule", {
            value: !0
        });
        var i = cc._decorator,
            l = i.ccclass,
            s = (i.property, function (e) {
                function n() {
                    var n = null !== e &amp;&amp; e.apply(this, arguments) || this;
                    return n.CharacterObject = null, n.idleAnimationList = [], n.isPlayIdleAnim = !1, n
                }
                return c(n, e), n.prototype.onLoad = function () {
                    this.CharacterObject = this.getComponent(dragonBones.ArmatureDisplay), this.CharacterObject.addEventListener(dragonBones.EventObject.COMPLETE, this.onFinished, this)
                }, n.prototype.start = function () { }, n.prototype.getCharacterPngSize = function () {
                    return cc.size(this.getTextureWidth(this.CharacterObject), this.getTextureHeight(this.CharacterObject))
                }, n.prototype.getCanvasSize = function (e) {
                    return cc.size(this.getTextureWidth(e), this.getTextureHeight(e))
                }, n.prototype.changeTexture = function (e, n) {
                    null == n ? console.log("spriteframe null in chnage texture") : this.CharacterObject.armature().getSlot(e)._displayData.texture.spriteFrame.setTexture(n.getTexture())
                }, n.prototype.getTextureWidth = function () {
                    return this.CharacterObject.dragonAtlasAsset.texture.width
                }, n.prototype.getTextureHeight = function () {
                    return this.CharacterObject.dragonAtlasAsset.texture.height
                }, n.prototype.getRegion = function (e) {
                    return this.CharacterObject.armature().getSlot(e)._displayData.texture.region
                }, n.prototype.PrintAllAnimationsName = function () {
                    for (var e = this.CharacterObject.getAnimationNames(this.CharacterObject.armatureName), n = 0; n &lt; e.length; n++) console.log(e[n])
                }, n.prototype.PrintAllSlotsName = function () {
                    this.CharacterObject.armature().getSlots().forEach(function (e) {
                        console.log(e.name)
                    })
                }, n.prototype.PlayAnimation = function (e, n) {
                    this.CharacterObject.playAnimation(e, n)
                }, n.prototype.HideSlot = function (e) {
                    var n = this.CharacterObject.armature();
                    n.getSlots().forEach(function (a) {
                        a.name == e &amp;&amp; (n.getSlot(e).offset.scaleX = 0, n.getSlot(e).opacity = 0, n.getSlot(e).active = !1, n.getSlot(e).visible = !1, n.getSlot(e).invalidUpdate())
                    })
                }, n.prototype.ShowSlot = function (e) {
                    var n = this.CharacterObject.armature();
                    n.getSlots().forEach(function (a) {
                        a.name == e &amp;&amp; (n.getSlot(e).offset.scaleX = 1, n.getSlot(e).invalidUpdate())
                    })
                }, n.prototype.isSlotExist = function (e) {
                    return this.CharacterObject.armature().getSlots().forEach(function (n) {
                        if (n.name == e) return !0
                    }), !1
                }, n.prototype.getTotalAnimationCount = function () {
                    var e = this.CharacterObject.getAnimationNames(this.CharacterObject.armatureName);
                    return parseInt(e.length.toString())
                }, n.prototype.getAnimationList = function () {
                    for (var e = [], n = this.CharacterObject.getAnimationNames(this.CharacterObject.armatureName), a = 0; a &lt; n.length; a++) e.push(n[a]);
                    return e
                }, n.prototype.setIdleAnimationList = function (e) {
                    this.idleAnimationList.splice(0, this.idleAnimationList.length);
                    for (var n = 0; n &lt; e.length; n++) this.idleAnimationList.push(e[n])
                }, n.prototype.playIdleAnimation = function () {
                    this.isPlayIdleAnim = !0, this.CharacterObject.playAnimation(this.idleAnimationList[this.getRandomInt(0, this.idleAnimationList.length - 1)], 1)
                }, n.prototype.stopPlayIdleAnimation = function () {
                    this.isPlayIdleAnim = !1
                }, n.prototype.onFinished = function () {
                    this.isPlayIdleAnim &amp;&amp; this.CharacterObject.playAnimation(this.idleAnimationList[this.getRandomInt(0, this.idleAnimationList.length - 1)], 1)
                }, n.prototype.getRandomInt = function (e, n) {
                    return e = Math.ceil(e), n = Math.floor(n) + 1, Math.floor(Math.random() * (n - e)) + e
                }, o([l], n)
            }(cc.Component));
        a.default = s, cc._RF.pop()
    }, {}],
    Drawing: [function (e, n, a) {
        "use strict";
        cc._RF.push(n, "ce5e9Mso6NGrJeRLBTfazPU", "Drawing");
        var t, c = this &amp;&amp; this.__extends || (t = function (e, n) {
            return (t = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (e, n) {
                    e.__proto__ = n
                } || function (e, n) {
                    for (var a in n) n.hasOwnProperty(a) &amp;&amp; (e[a] = n[a])
                })(e, n)
        }, function (e, n) {
            function a() {
                this.constructor = e
            }
            t(e, n), e.prototype = null === n ? Object.create(n) : (a.prototype = n.prototype, new a)
        }),
            o = this &amp;&amp; this.__decorate || function (e, n, a, t) {
                var c, o = arguments.length,
                    i = o &lt; 3 ? n : null === t ? t = Object.getOwnPropertyDescriptor(n, a) : t;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) i = Reflect.decorate(e, n, a, t);
                else
                    for (var l = e.length - 1; l &gt;= 0; l--)(c = e[l]) &amp;&amp; (i = (o &lt; 3 ? c(i) : o &gt; 3 ? c(n, a, i) : c(n, a)) || i);
                return o &gt; 3 &amp;&amp; i &amp;&amp; Object.defineProperty(n, a, i), i
            };
        Object.defineProperty(a, "__esModule", {
            value: !0
        });
        var i = cc._decorator,
            l = i.ccclass,
            s = (i.property, function (e) {
                function n() {
                    var n = null !== e &amp;&amp; e.apply(this, arguments) || this;
                    return n.UserImage = null, n.UserTexture = null, n.UserCanvas = null, n.UserSpriteFrame = null, n.UserContext = null, n.UserImgData = null, n.DrawNode = null, n.CanvasWidth = 800, n.CanvasHeight = 504, n.BrushContent = 40, n.MultiColorCode = [], n.DrawingType = 0, n.ColorCode = [], n.SelectedColorCode = null, n.BrushData = [], n.Brush = [], n.BrushContext = [], n.BrushCanvas = [], n.NewBrush = null, n.isMultiColorOn = !1, n.isIncrease = !0, n.MultiCounter = 0, n.isChange = !1, n.TextureData = null, n
                }
                return c(n, e), n.prototype.onLoadUser = function (e) {
                    this.DrawNode = e, this.CanvasWidth = this.DrawNode.width, this.CanvasHeight = this.DrawNode.height, this.InitColor(), this.SelectedColorCode = this.ColorCode[0], this.UserSpriteFrame = new cc.SpriteFrame, this.UserTexture = new cc.Texture2D, this.Brush[0] = new Image, this.Brush[1] = new Image, this.NewBrush = new Image, this.UserCanvas = document.createElement("canvas"), this.UserContext = this.UserCanvas.getContext("2d"), this.UserCanvas.width = this.CanvasWidth, this.UserCanvas.height = this.CanvasHeight
                }, n.prototype.setErase = function (e) {
                    this.UserContext.globalCompositeOperation = e ? "destination-out" : "source-over"
                }, n.prototype.getMultiColor = function () {
                    return this.isIncrease ? (this.MultiCounter += 2, this.MultiColorCode.length &lt;= this.MultiCounter &amp;&amp; (this.MultiCounter = this.MultiColorCode.length - 1, this.isIncrease = !1)) : (this.MultiCounter -= 2, this.MultiCounter &lt;= 0 &amp;&amp; (this.MultiCounter = 0, this.isIncrease = !0)), this.MultiColorCode[this.MultiCounter]
                }, n.prototype.LoadBrush = function (e, n) {
                    this.BrushCanvas[n] = document.createElement("canvas"), this.BrushContext[n] = this.BrushCanvas[n].getContext("2d"), this.BrushCanvas[n].width = e.node.getContentSize().width, this.BrushCanvas[n].height = e.node.getContentSize().height;
                    var a = new Image,
                        t = this,
                        c = !1;
                    a.onload = function () {
                        if (c || (c = !0, t.BrushContext[n].drawImage(a, 0, 0), t.BrushData[n] = t.BrushContext[n].getImageData(0, 0, t.BrushCanvas[n].width, t.BrushCanvas[n].height), t.ChangeBrushColor(t.ColorCode[1], 0)), t.NewBrush = a, t.isChange) {
                            var e = t.getMultiColor();
                            t.ChangeBrushColor(e, 0)
                        }
                    }, a.src = e.spriteFrame.getTexture().nativeUrl
                }, n.prototype.ChangeBrushColor = function (e, n) {
                    if (0 == n) {
                        for (var a = this.BrushData[0].data, t = 0; t &lt; a.length; t += 4) a[t + 3] &gt; 0 &amp;&amp; (a[t] = e.r, a[t + 1] = e.g, a[t + 2] = e.b, a[t + 3] = a[t + 3]);
                        this.BrushContext[0].putImageData(this.BrushData[0], 0, 0), this.Brush[0].src = this.BrushCanvas[0].toDataURL()
                    } else {
                        for (a = this.BrushData[1].data, t = 0; t &lt; a.length; t += 4) a[t + 3] &gt; 0 &amp;&amp; (a[t] = e.r, a[t + 1] = e.g, a[t + 2] = e.b, a[t + 3] = a[t + 3]);
                        this.BrushContext[1].putImageData(this.BrushData[1], 0, 0), this.Brush[1].src = this.BrushCanvas[1].toDataURL()
                    }
                }, n.prototype.ChangeColor = function (e) {
                    this.isMultiColorOn = 0 == e, this.isChange = !1, this.SelectedColorCode = this.ColorCode[e], this.ChangeBrushColor(this.SelectedColorCode, 0)
                }, n.prototype.clearPicture = function () {
                    this.UserContext.clearRect(0, 0, this.UserCanvas.width, this.UserCanvas.height), this.UserTexture.initWithData(this.UserContext.getImageData(0, 0, this.CanvasWidth, this.CanvasHeight), cc.Texture2D.PixelFormat.RGBA8888, this.CanvasWidth, this.CanvasHeight), this.UserSpriteFrame.setTexture(this.UserTexture), this.DrawNode.getComponent(cc.Sprite).spriteFrame = this.UserSpriteFrame
                }, n.prototype.getRandomInt = function (e, n) {
                    return e = Math.ceil(e), n = Math.floor(n + 1), Math.floor(Math.random() * (n - e)) + e
                }, n.prototype.setTexture = function (e) {
                    this.UserTexture.initWithData(e, cc.Texture2D.PixelFormat.RGBA8888, this.CanvasWidth, this.CanvasHeight), this.UserSpriteFrame.setTexture(this.UserTexture), this.DrawNode.getComponent(cc.Sprite).spriteFrame = this.UserSpriteFrame
                }, n.prototype.ChangeDrawNode = function (e) {
                    this.DrawNode = e, this.CanvasWidth = this.DrawNode.width, this.CanvasHeight = this.DrawNode.height, this.UserSpriteFrame = new cc.SpriteFrame, this.UserTexture = new cc.Texture2D, this.UserCanvas.width = this.CanvasWidth, this.UserCanvas.height = this.CanvasHeight, this.UserContext.clearRect(0, 0, this.UserCanvas.width, this.UserCanvas.height)
                }, n.prototype.BeganCalled = function () {
                    if (this.isMultiColorOn) {
                        var e = this.getMultiColor();
                        this.isChange = !0, this.ChangeBrushColor(e, 0)
                    }
                }, n.prototype.EndCalled = function () {
                    this.isChange = !1
                }, n.prototype.TouchMove = function (e, n) {
                    var a = e.getLocation(),
                        t = e.getPreviousLocation();
                    a.x = a.x - n.x, t.x = t.x - n.x, a.y = a.y - n.y, t.y = t.y - n.y;
                    var c = this.DrawNode.convertToNodeSpaceAR(a),
                        o = this.DrawNode.getContentSize();
                    a = cc.v2(c.x + o.width / 2, o.height - (c.y + o.height / 2));
                    var i = this.DrawNode.convertToNodeSpaceAR(t);
                    t = cc.v2(i.x + o.width / 2, o.height - (i.y + o.height / 2));
                    var l = this.distanceBetween2Points(a, t),
                        s = this.angleBetween2Points(a, t);
                    0 == this.DrawNode.getNumberOfRunningActions() &amp;&amp; this.isMultiColorOn &amp;&amp; (this.ChangeBrushColor(this.getMultiColor(), 0), this.DrawNode.runAction(cc.delayTime(.1)));
                    for (var r, f = 0, d = 0; d &lt; l || 0 == d; d += 3) {
                        r = a.x + Math.sin(s) * d, f = a.y + Math.cos(s) * d;
                        var u = r - this.BrushContent / 2,
                            p = f - this.BrushContent / 2;
                        this.UserContext.drawImage(this.Brush[0], u, p, this.BrushContent, this.BrushContent)
                    }
                    this.UserTexture.initWithData(this.UserContext.getImageData(0, 0, this.CanvasWidth, this.CanvasHeight), cc.Texture2D.PixelFormat.RGBA8888, this.CanvasWidth, this.CanvasHeight), this.UserSpriteFrame.setTexture(this.UserTexture), this.DrawNode.getComponent(cc.Sprite).spriteFrame = this.UserSpriteFrame
                }, n.prototype.getangle = function (e, n, a, t) {
                    return Math.atan2(t - n, a - e)
                }, n.prototype.distanceBetween2Points = function (e, n) {
                    var a = n.x - e.x,
                        t = n.y - e.y;
                    return Math.sqrt(Math.pow(a, 2) + Math.pow(t, 2))
                }, n.prototype.angleBetween2Points = function (e, n) {
                    var a = n.x - e.x,
                        t = n.y - e.y;
                    return Math.atan2(a, t)
                }, n.prototype.InitColor = function () {
                    this.ColorCode.push(cc.color(0, 0, 0, 0)), this.ColorCode.push(cc.color(255, 75, 74, 255)), this.ColorCode.push(cc.color(255, 204, 0, 255)), this.ColorCode.push(cc.color(140, 243, 40, 255)), this.ColorCode.push(cc.color(3, 252, 255, 255)), this.ColorCode.push(cc.color(161, 114, 255, 255)), this.DefineColorRange(cc.color(218, 61, 230, 255), cc.color(38, 246, 243, 255)), this.DefineColorRange(cc.color(38, 246, 243, 255), cc.color(239, 238, 42, 255)), this.DefineColorRange(cc.color(239, 238, 42, 255), cc.color(238, 77, 10, 255))
                }, n.prototype.DefineColorRange = function (e, n) {
                    for (var a = e, t = n, c = (t.r - a.r) / 50, o = (t.b - a.b) / 50, i = (t.g - a.g) / 50, l = a, s = 0, r = 0, f = 0, d = 0; d &lt; 50; d++) l = cc.color(a.r + s, a.g + f, a.b + r, 255), s += c, f += i, r += o, this.MultiColorCode.push(l)
                }, n.prototype.VerifyPicture = function () {
                    if (null == this.TextureData) return !1;
                    for (var e = this.UserContext.getImageData(0, 0, this.UserCanvas.width, this.UserCanvas.height).data, n = 0, a = 0, t = 0; t &lt; this.TextureData.length; t += 4) this.TextureData[t + 3] &gt; 0 &amp;&amp; (n++, e[t + 3] &gt; 0 &amp;&amp; a++);
                    return a &gt; .98 * n
                }, n.prototype.LoadVerifyTexture = function (e) {
                    var n = document.createElement("canvas"),
                        a = n.getContext("2d");
                    n.width = e.node.getContentSize().width, n.height = e.node.getContentSize().height;
                    var t = new Image,
                        c = this,
                        o = !1;
                    t.onload = function () {
                        o || (o = !0, a.drawImage(t, 0, 0), c.TextureData = a.getImageData(0, 0, n.width, n.height).data)
                    }, t.src = e.spriteFrame.getTexture().nativeUrl
                }, o([l], n)
            }(cc.Component));
        a.default = s, cc._RF.pop()
    }, {}],
    MainScene: [function (e, n, a) {
        "use strict";
        cc._RF.push(n, "bc1231MKE9BY5WGxYSm6RBs", "MainScene");
        var t, c = this &amp;&amp; this.__extends || (t = function (e, n) {
            return (t = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (e, n) {
                    e.__proto__ = n
                } || function (e, n) {
                    for (var a in n) n.hasOwnProperty(a) &amp;&amp; (e[a] = n[a])
                })(e, n)
        }, function (e, n) {
            function a() {
                this.constructor = e
            }
            t(e, n), e.prototype = null === n ? Object.create(n) : (a.prototype = n.prototype, new a)
        }),
            o = this &amp;&amp; this.__decorate || function (e, n, a, t) {
                var c, o = arguments.length,
                    i = o &lt; 3 ? n : null === t ? t = Object.getOwnPropertyDescriptor(n, a) : t;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) i = Reflect.decorate(e, n, a, t);
                else
                    for (var l = e.length - 1; l &gt;= 0; l--)(c = e[l]) &amp;&amp; (i = (o &lt; 3 ? c(i) : o &gt; 3 ? c(n, a, i) : c(n, a)) || i);
                return o &gt; 3 &amp;&amp; i &amp;&amp; Object.defineProperty(n, a, i), i
            };
        Object.defineProperty(a, "__esModule", {
            value: !0
        });
        var i = e("./Promotion"),
            l = cc._decorator,
            s = l.ccclass,
            r = (l.property, function (e) {
                function n() {
                    var n = null !== e &amp;&amp; e.apply(this, arguments) || this;
                    return n.musicElement = null, n
                }
                var a;
                return c(n, e), a = n, n.prototype.onLoad = function () {
                    cc.debug.setDisplayStats(!1), cc.director.preloadScene("Map")
                }, n.prototype.start = function () {
                    a.self = this, 0 == cc.audioEngine.getMusicVolume() ? (cc.find("Canvas/SoundOn").active = !1, cc.find("Canvas/SoundOff").active = !0) : (cc.find("Canvas/SoundOn").active = !0, cc.find("Canvas/SoundOff").active = !1)
                }, n.prototype.getRandomInt = function (e, n) {
                    return e = Math.ceil(e), n = Math.floor(n) + 1, Math.floor(Math.random() * (n - e)) + e
                }, n.prototype.playBTNClicked = function (e) {
                    this.PlaySound("TapSound"), e.target.getComponent(cc.Button).interactable = !1, i.default.self.requestAds(), this.node.runAction(cc.sequence(cc.delayTime(.3), cc.callFunc(function () {
                        cc.director.loadScene("Map")
                    }, this)))
                }, n.prototype.onSoundOffBtnClick = function () {
                    this.PlaySound("TapSound"), cc.find("Canvas/SoundOn").active = !0, cc.find("Canvas/SoundOff").active = !1, cc.audioEngine.setMusicVolume(1), cc.audioEngine.setEffectsVolume(1), document.getElementById("bgsound") &amp;&amp; document.getElementById("bgsound").play()
                }, n.prototype.onSoundOnBtnClick = function () {
                    this.PlaySound("TapSound"), cc.find("Canvas/SoundOn").active = !1, cc.find("Canvas/SoundOff").active = !0, cc.audioEngine.setMusicVolume(0), cc.audioEngine.setEffectsVolume(0), document.getElementById("bgsound") &amp;&amp; document.getElementById("bgsound").pause()
                }, n.prototype.PlaySound = function (e) {
                    cc.find("Canvas/SoundNode/" + e) &amp;&amp; cc.find("Canvas/SoundNode/" + e).getComponent(cc.AudioSource).play()
                }, n.self = null, a = o([s], n)
            }(cc.Component));
        a.default = r, cc._RF.pop()
    }, {
        "./Promotion": "Promotion"
    }],
    Map: [function (e, n, a) {
        "use strict";
        cc._RF.push(n, "a5f37U6K0VFzJAHAaUk9Eqk", "Map");
        var t, c = this &amp;&amp; this.__extends || (t = function (e, n) {
            return (t = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (e, n) {
                    e.__proto__ = n
                } || function (e, n) {
                    for (var a in n) n.hasOwnProperty(a) &amp;&amp; (e[a] = n[a])
                })(e, n)
        }, function (e, n) {
            function a() {
                this.constructor = e
            }
            t(e, n), e.prototype = null === n ? Object.create(n) : (a.prototype = n.prototype, new a)
        }),
            o = this &amp;&amp; this.__decorate || function (e, n, a, t) {
                var c, o = arguments.length,
                    i = o &lt; 3 ? n : null === t ? t = Object.getOwnPropertyDescriptor(n, a) : t;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) i = Reflect.decorate(e, n, a, t);
                else
                    for (var l = e.length - 1; l &gt;= 0; l--)(c = e[l]) &amp;&amp; (i = (o &lt; 3 ? c(i) : o &gt; 3 ? c(n, a, i) : c(n, a)) || i);
                return o &gt; 3 &amp;&amp; i &amp;&amp; Object.defineProperty(n, a, i), i
            };
        Object.defineProperty(a, "__esModule", {
            value: !0
        });
        var i, l, s = e("./Character"),
            r = e("./Drawing"),
            f = e("./Promotion"),
            d = cc._decorator,
            u = d.ccclass;
        d.property,
            function (e) {
                e[e.RIGHT = 1] = "RIGHT", e[e.LEFT = 2] = "LEFT", e[e.TOP = 3] = "TOP", e[e.BOTTOM = 4] = "BOTTOM", e[e.RIGHTTOP = 5] = "RIGHTTOP", e[e.RIGHTBOTTOM = 6] = "RIGHTBOTTOM", e[e.LEFTTOP = 7] = "LEFTTOP", e[e.LEFTBOTTOM = 8] = "LEFTBOTTOM"
            }(i || (i = {})),
            function (e) {
                e[e.GIFTBOX = 0] = "GIFTBOX", e[e.CLOUD = 1] = "CLOUD", e[e.DRYER = 2] = "DRYER", e[e.JUG = 3] = "JUG", e[e.BALLOON = 4] = "BALLOON", e[e.BALLOON2 = 5] = "BALLOON2", e[e.STAR = 6] = "STAR"
            }(l || (l = {}));
        var p = function (e) {
            function n() {
                var n = null !== e &amp;&amp; e.apply(this, arguments) || this;
                return n.isDrawingEnable = !1, n.CurrentStep = 0, n.ParentDrawNode = null, n.DrawingNodes = [], n.StepNodes = [], n.ColorNodes = [], n.DrawingObj = null, n.Pen = null, n.AllDrawingNode = [], n.SelectedDrawing = null, n.ColorCode = [], n.WatchAdFor = -1, n.Direction = 1, n.MoveSpeed = 1, n.MovePixel = 10, n.isMapMove = !1, n.isValidForMove = !1, n.location = null, n.locationCanvas = null, n.WhichLevel = 1, n.WhichLevelSub = 1, n.Balloon = null, n.ChildSheep = null, n.MomSheep = null, n.Panda = null, n.PandaSkel = null, n.ChildSheepPOS = null, n.L2Balloon = null, n.L2BalloonTop = null, n.L2Hamster2 = null, n.L2HamsterComplete = null, n.L2Jug = null, n.L2Dryer = null, n.MoveIndex = -1, n.PickPOS = null, n.L3Sun = null, n.L3Cloud = null, n.FullMap = null, n.L2Hamster = null, n.MagicPanda = null, n.SantaOnMap = null, n.GiftBox1 = null, n.GiftBox2 = null, n
            }
            var a;
            return c(n, e), a = n, n.prototype.onLoad = function () {
                if (a.self = this, null == sessionStorage.getItem("Level")) sessionStorage.setItem("Level", "1");
                else {
                    var e = parseInt(sessionStorage.getItem("Level"));
                    e++, sessionStorage.setItem("Level", e.toString())
                }
                a.self.WhichLevel = parseInt(sessionStorage.getItem("Level"));
                for (var n = 5; n &lt;= 6; n++) null == sessionStorage.getItem("ColorWatchAd" + n) &amp;&amp; sessionStorage.setItem("ColorWatchAd" + n, "false"), "true" == sessionStorage.getItem("ColorWatchAd" + n) &amp;&amp; (cc.find("Canvas/Drawing/Panel/" + n).getChildByName("WatchAd").active = !1);
                this.InitAction(), this.ColorCode.push(cc.color(255, 75, 74, 255)), this.ColorCode.push(cc.color(255, 204, 0, 255)), this.ColorCode.push(cc.color(140, 243, 40, 255)), this.ColorCode.push(cc.color(3, 252, 255, 255)), this.ColorCode.push(cc.color(161, 114, 255, 255)), this.SelectedDrawing = l.STAR, this.ParentDrawNode = this.AllDrawingNode[this.SelectedDrawing], this.ParentDrawNode.active = !0, this.Pen = cc.find("Canvas/Drawing/Pen"), this.ParentDrawNode.children.forEach(function (e) {
                    a.self.StepNodes.push(e), a.self.StepNodes.length &gt; 1 ? e.active = !1 : e.active = !0;
                    var n = e.getChildByName("Color");
                    e.getChildByName("Mask").getComponent(cc.Mask).spriteFrame = n.getComponent(cc.Sprite).spriteFrame;
                    var t = e.getChildByName("Mask").getChildByName("Drawing");
                    t.setContentSize(n.getContentSize()), e.getChildByName("Mask").setContentSize(t.getContentSize()), t.setPosition(cc.Vec3.ZERO), a.self.DrawingNodes.push(t), a.self.ColorNodes.push(n)
                }), this.DrawingObj = new r.default, this.DrawingObj.onLoadUser(a.self.DrawingNodes[this.CurrentStep]), this.DrawingObj.LoadBrush(cc.find("Canvas/Loader/songeBrush").getComponent(cc.Sprite), 0), this.DrawingObj.LoadVerifyTexture(a.self.ColorNodes[this.CurrentStep].getComponent(cc.Sprite)), this.ColorSelectionEffect("1")
            }, n.prototype.start = function () {
                this.node.on(cc.Node.EventType.TOUCH_START, this.TouchBegan), this.node.on(cc.Node.EventType.TOUCH_MOVE, this.TouchMove), this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.TouchEnded), this.node.on(cc.Node.EventType.TOUCH_END, this.TouchEnded), a.self.ChildSheep = cc.find("Canvas/main/Level1/babysheep_ske"), a.self.MomSheep = cc.find("Canvas/main/Level1/momgoat_ske"), a.self.Panda = cc.find("Canvas/Panda"), a.self.PandaSkel = cc.find("Canvas/Panda/Panda_ske"), a.self.L2Hamster = cc.find("Canvas/main/Level2/hamster_ske"), a.self.L2Hamster2 = cc.find("Canvas/StarView/hamster_ske"), a.self.L2HamsterComplete = cc.find("Canvas/main/Level2/Complete/hamster_ske"), a.self.L3Sun = cc.find("Canvas/Santa1/Sun"), a.self.L3Cloud = cc.find("Canvas/Santa1/Cloud"), a.self.FullMap = cc.find("Canvas/main"), a.self.MagicPanda = cc.find("Canvas/Mask/Panda/Panda_ske"), a.self.L2Balloon = cc.find("Canvas/StarView/HotAirBalloonn"), a.self.L2BalloonTop = cc.find("Canvas/StarView/HotAirBalloonnUp"), a.self.L2Jug = cc.find("Canvas/StarCleaning/Jug"), a.self.SantaOnMap = cc.find("Canvas/main/Level3/santa_ske"), a.self.GiftBox1 = cc.find("Canvas/Santa1/Gift/L3GiftBox1"), a.self.GiftBox2 = cc.find("Canvas/Santa1/Gift/L3GiftBox2"), a.self.L2Dryer = cc.find("Canvas/StarDry/HairDryerColor"), cc.find("Canvas/StarView/complete").zIndex = 10, cc.find("Canvas/StarView/Heart2").zIndex = 5, cc.find("Canvas/main/Level1").getComponent(cc.Animation).play("L1Soundwave"), a.self.ChildSheepPOS = cc.v2(5243, -887), this.setIdleAnimations(), a.self.WhichLevel = 1, this.startView()
            }, n.prototype.startView = function () {
                a.self.FullMap.setPosition(cc.v2(-10, -526)), a.self.Panda.setPosition(cc.v2(-54, -15)), a.self.Panda.active = !1, this.node.runAction(cc.sequence(cc.delayTime(1), cc.callFunc(function () {
                    cc.find("Canvas/main/1/door").getComponent(cc.Animation).play("DoorOpen"), a.self.playaudio("DoorOpen")
                }), cc.delayTime(.5), cc.callFunc(function () {
                    a.self.Panda.active = !0, a.self.Panda.getComponent(cc.Animation).play("PandaEntry")
                }), cc.delayTime(1.2), cc.callFunc(function () {
                    a.self.FullMap.runAction(cc.moveTo(1, cc.v2(0, 0))), a.self.playaudio("PandaEntryExp"), a.self.Panda.runAction(cc.sequence(cc.jumpTo(1.5, cc.v2(103, -124), 20, 1), cc.callFunc(function () {
                        cc.find("Canvas/Panda/PandaGlowParticle").active = !0, a.self.playaudio("i m little mua"), a.self.PandaSkel.getComponent(s.default).PlayAnimation("talk", -1)
                    }), cc.delayTime(6.5), cc.callFunc(function () {
                        a.self.PandaSkel.getComponent(s.default).playIdleAnimation(), a.self.showNextIndication()
                    })))
                })))
            }, n.prototype.setIdleAnimations = function () {
                cc.find("Canvas/StarView").active = !0, cc.find("Canvas/main/Level2/Complete").active = !0;
                var e = [];
                e.push("cry"), a.self.ChildSheep.getComponent(s.default).setIdleAnimationList(e), a.self.ChildSheep.getComponent(s.default).playIdleAnimation(), e.splice(0, e.length), e.push("sad1"), e.push("sad2"), e.push("lookinsidepit"), a.self.MomSheep.getComponent(s.default).setIdleAnimationList(e), a.self.MomSheep.getComponent(s.default).playIdleAnimation(), e.splice(0, e.length), e.push("fly"), a.self.Panda.getChildByName("Panda_ske").getComponent(s.default).setIdleAnimationList(e), a.self.Panda.getChildByName("Panda_ske").getComponent(s.default).playIdleAnimation(), a.self.MagicPanda.getComponent(s.default).setIdleAnimationList(e), a.self.MagicPanda.getComponent(s.default).playIdleAnimation(), e.splice(0, e.length), e.push("idle"), a.self.L2Hamster.getComponent(s.default).setIdleAnimationList(e), a.self.L2Hamster.getComponent(s.default).playIdleAnimation(), a.self.L2Hamster2.getComponent(s.default).setIdleAnimationList(e), a.self.L2Hamster2.getComponent(s.default).playIdleAnimation(), a.self.SantaOnMap.getComponent(s.default).setIdleAnimationList(e), a.self.SantaOnMap.getComponent(s.default).playIdleAnimation(), e.splice(0, e.length), e.push("idle2"), a.self.L2HamsterComplete.getComponent(s.default).setIdleAnimationList(e), a.self.L2HamsterComplete.getComponent(s.default).playIdleAnimation(), cc.find("Canvas/StarView").active = !1, cc.find("Canvas/main/Level2/Complete").active = !1
            }, n.prototype.TouchBegan = function (e) {
                if (a.self.location = e.getLocation(), a.self.locationCanvas = a.self.node.convertToNodeSpaceAR(a.self.location), a.self.isDrawingEnable) a.self.DrawingObj.BeganCalled(), a.self.playaudio("drawingSound", !0), cc.find("Canvas/Drawing/Pen/PenParticle").active = !0;
                else if (a.self.isValidForMove) a.self.location.x &gt;= a.self.Panda.getBoundingBoxToWorld().x ? a.self.location.y &gt; a.self.Panda.getBoundingBoxToWorld().y ? a.self.Direction = i.RIGHTTOP : a.self.location.y &lt; a.self.Panda.getBoundingBoxToWorld().y ? a.self.Direction = i.RIGHTBOTTOM : a.self.Direction = i.RIGHT : a.self.location.x &lt; a.self.Panda.getBoundingBoxToWorld().x &amp;&amp; (a.self.location.y &gt; a.self.Panda.getBoundingBoxToWorld().y ? a.self.Direction = i.LEFTTOP : a.self.location.y &lt; a.self.Panda.getBoundingBoxToWorld().y ? a.self.Direction = i.LEFTBOTTOM : a.self.Direction = i.LEFT), a.self.hideNextIndication(), a.self.CharMove();
                else if (1 == a.self.WhichLevel) {
                    if (254 == a.self.ChildSheep.opacity &amp;&amp; a.self.ChildSheep.getBoundingBoxToWorld().contains(a.self.location)) {
                        a.self.hideHInt(), a.self.ChildSheep.stopAllActions(), a.self.ChildSheep.opacity = 253;
                        var n = 10 * a.self.distanceBetween2Points(a.self.ChildSheep.position, cc.v2(a.self.ChildSheep.position.x, -138)) / 751;
                        a.self.ChildSheep.runAction(cc.sequence(cc.moveTo(n, cc.v2(a.self.ChildSheep.position.x, -148)), cc.callFunc(function () {
                            cc.find("Canvas/main/Level1").getComponent(cc.Animation).stop(), cc.find("Canvas/main/Level1/SoundWave1").active = !1, cc.find("Canvas/main/Level1/SoundWave2").active = !1, cc.find("Canvas/main/Level1/SoundWave3").active = !1, cc.find("Canvas/main/Level1/top_leyer").zIndex = 1, cc.find("Canvas/main/Level1/top").zIndex = 1, a.self.MomSheep.zIndex = 1, a.self.ChildSheep.stopAllActions(), a.self.ChildSheep.opacity = 250, a.self.ChildSheep.runAction(cc.sequence(cc.spawn(cc.jumpTo(.5, cc.v2(5538, -200), 60, 1), cc.scaleTo(.5, .3)), cc.delayTime(2), cc.spawn(cc.scaleTo(.5, -.3, .3), cc.jumpTo(.5, cc.v2(5511, -63), 50, 1)))), a.self.MomSheep.stopAllActions(), a.self.MomSheep.runAction(cc.sequence(cc.delayTime(.5), cc.callFunc(function () {
                                a.self.MomSheep.getComponent(s.default).PlayAnimation("happy", -1), a.self.ChildSheep.getComponent(s.default).PlayAnimation("happy", -1), cc.find("Canvas/main/Level1/SheepCompleteParticle1").getComponent(cc.ParticleSystem).resetSystem(), cc.find("Canvas/main/Level1/SheepCompleteParticle2").getComponent(cc.ParticleSystem).resetSystem(), a.self.playaudio("SheepcmpParticle"), a.self.playaudio("SheepHappy")
                            }), cc.delayTime(2), cc.callFunc(function () {
                                cc.find("Canvas/main/Level1/SheepCompleteParticle1").getComponent(cc.ParticleSystem).stopSystem(), cc.find("Canvas/main/Level1/SheepCompleteParticle2").getComponent(cc.ParticleSystem).stopSystem()
                            }), cc.delayTime(.5), cc.callFunc(function () {
                                a.self.playaudio("Sheep thank u mua")
                            }), cc.delayTime(1.5), cc.callFunc(function () {
                                a.self.playaudio("Panda CU2"), a.self.PandaSkel.getComponent(s.default).PlayAnimation("talk", -1)
                            }), cc.delayTime(1), cc.callFunc(function () {
                                a.self.PandaSkel.getComponent(s.default).playIdleAnimation(), a.self.MomSheep.runAction(cc.sequence(cc.spawn(cc.scaleTo(.2, -.5, .5), cc.jumpBy(.2, cc.v2(0, 0), 10, 1)), cc.moveBy(1, cc.v2(500, 0)), cc.hide(), cc.callFunc(function () {
                                    sessionStorage.setItem("Level", "2"), a.self.WhichLevel = 2, a.self.showNextIndication()
                                }))), a.self.ChildSheep.runAction(cc.sequence(cc.spawn(cc.scaleTo(.2, .3, .3), cc.jumpBy(.2, cc.v2(0, 0), 50, 1)), cc.moveBy(1, cc.v2(500, 0)), cc.hide()))
                            }))), cc.v3(a.self.FullMap.runAction(cc.moveTo(.1, cc.v2(a.self.FullMap.x, 0)))), a.self.Balloon.stopAllActions(), a.self.Balloon.runAction(cc.moveBy(10, cc.v2(100, 5e3)))
                        })))
                    }
                } else if (2 == a.self.WhichLevel)
                    if (1 == a.self.WhichLevelSub) {
                        if (254 == a.self.L2Hamster2.opacity &amp;&amp; a.self.L2Hamster2.getBoundingBoxToWorld().contains(a.self.location)) a.self.L2Hamster2.stopAllActions(), a.self.L2Hamster2.opacity = 253, a.self.L2Hamster2.zIndex = 3, a.self.PickPOS = a.self.L2Hamster2.position, a.self.L2Hamster2.setPosition(a.self.locationCanvas), a.self.hideHInt();
                        else if (250 == a.self.L2Hamster2.opacity) {
                            for (var t = function (e) {
                                if (255 == cc.find("Canvas/StarView/Star" + e).opacity &amp;&amp; cc.find("Canvas/StarView/Star" + e).getBoundingBoxToWorld().contains(a.self.location)) return a.self.L2Hamster2.opacity = 251, cc.find("Canvas/StarView/Star" + e).opacity = 254, a.self.L2Hamster2.getComponent(s.default).PlayAnimation("rope", 1), e &gt; 4 ? a.self.L2Hamster2.setScale(-.3, .3) : a.self.L2Hamster2.setScale(.3, .3), a.self.node.runAction(cc.sequence(cc.delayTime(.8), cc.callFunc(function () {
                                    a.self.playaudio("RopeThrow"), cc.find("Canvas/StarView").getComponent(cc.Animation).play("CatchStar" + e)
                                }), cc.delayTime(2), cc.callFunc(function () {
                                    cc.find("Canvas/StarView/Heart2").getComponent(cc.ParticleSystem).resetSystem(), a.self.L2Hamster2.getComponent(s.default).PlayAnimation("happy", 1), a.self.playaudio("HamsterHapy"), a.self.playaudio("starParticle"), a.self.L2Hamster2.opacity = 250, a.self.checkStarComplete()
                                }))), "break"
                            }, c = 1; c &lt;= 8 &amp;&amp; "break" !== t(c); c++);
                            if (250 == a.self.L2Hamster2.opacity)
                                for (c = 1; c &lt;= 2; c++)
                                    if (cc.find("Canvas/StarView/stone-" + c).getBoundingBoxToWorld().contains(a.self.location)) {
                                        a.self.L2Hamster2.opacity = 251, cc.find("Canvas/StarView").getComponent(cc.Animation).play("CatchStone" + c), a.self.node.runAction(cc.sequence(cc.delayTime(3), cc.callFunc(function () {
                                            a.self.L2Hamster2.opacity = 250, a.self.checkStarComplete()
                                        })));
                                        break
                                    }
                        }
                    } else if (2 == a.self.WhichLevelSub) {
                        if (254 == cc.find("Canvas/StarCleaning/water").opacity &amp;&amp; cc.find("Canvas/StarCleaning/water").getBoundingBoxToWorld().contains(a.self.location)) cc.find("Canvas/StarCleaning/water").opacity = 253, cc.find("Canvas/StarCleaning/arrow").stopAllActions(), cc.find("Canvas/StarCleaning/arrow").active = !1;
                        else if (254 == cc.find("Canvas/StarCleaning/L2FlowerRope1").opacity || 254 == cc.find("Canvas/StarCleaning/L2FlowerRope2").opacity)
                            for (c = 1; c &lt;= 6; c++)
                                if (254 == cc.find("Canvas/StarCleaning/Star" + c).opacity &amp;&amp; cc.find("Canvas/StarCleaning/Star" + c).getBoundingBoxToWorld().contains(a.self.location) &amp;&amp; -1 == a.self.MoveIndex &amp;&amp; 0 == cc.find("Canvas/StarCleaning/Star" + c).getNumberOfRunningActions()) {
                                    a.self.playaudio("TapSound"), a.self.MoveIndex = c, a.self.PickPOS = cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).position, cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).getChildByName("Star" + a.self.MoveIndex).setPosition(cc.v3(0, -38, 0)), cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).zIndex = 10, cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).position = cc.v3(a.self.locationCanvas.x, a.self.locationCanvas.y, 0);
                                    break
                                }
                    } else 3 == a.self.WhichLevelSub &amp;&amp; a.self.L2Dryer &amp;&amp; a.self.L2Dryer.getBoundingBoxToWorld().contains(a.self.location) &amp;&amp; 255 == a.self.L2Dryer.opacity &amp;&amp; 0 == a.self.L2Dryer.getNumberOfRunningActions() &amp;&amp; (a.self.L2Dryer.opacity = 254, a.self.L2Dryer.setPosition(cc.v3(a.self.locationCanvas.x, a.self.locationCanvas.y, 0)), cc.find("Canvas/StarDry/DryerParticle").getComponent(cc.ParticleSystem).resetSystem(), cc.find("Canvas/StarDry/DryerParticle").setPosition(cc.v3(a.self.locationCanvas.x - 50, a.self.locationCanvas.y + 10, 0)), a.self.playaudio("HaiDryerOn", !0));
                else if (3 == a.self.WhichLevel)
                    if (1 == a.self.WhichLevelSub) cc.find("Canvas/Santa1").children.forEach(function (e) {
                        0 == cc.find("Canvas/Santa1/L3ToysTree").getNumberOfRunningActions() &amp;&amp; "SunChildRun" == e.name &amp;&amp; e.getBoundingBoxToWorld().contains(a.self.location) &amp;&amp; 255 == e.opacity &amp;&amp; (a.self.playaudio("TapSound"), a.self.hideHInt(), e.stopAllActions(), e.opacity = 254, cc.find("Canvas/Santa1/L3ToysTree").runAction(cc.delayTime(1)), e.runAction(cc.sequence(cc.jumpTo(.5, cc.v2(5, -220), 30, 1), cc.hide(), cc.place(cc.v2(1e3, 1e3)), cc.callFunc(function () {
                            a.self.playaudio("Treeparticle"), a.self.playaudio("starParticle"), e.opacity = 253, cc.find("Canvas/Santa1/TreeGrowStar1").getComponent(cc.ParticleSystem).resetSystem();
                            var n = cc.find("Canvas/Santa1/L3ToysTree").scale;
                            cc.find("Canvas/Santa1/L3ToysTreeSH").setScale(n), cc.find("Canvas/Santa1/L3ToysTreeSH").runAction(cc.sequence(cc.spawn(cc.scaleTo(.5, n + .2), cc.fadeTo(.5, 150)), cc.spawn(cc.scaleTo(.5, n), cc.fadeTo(.5, 0)))), cc.find("Canvas/Santa1/L3ToysTree").runAction(cc.sequence(cc.scaleTo(.5, n + .1), cc.scaleTo(.3, n + .058).easing(cc.easeBackIn()), cc.callFunc(function () {
                                cc.find("Canvas/Santa1/L3ToysTree").scale &gt;= .6 &amp;&amp; 254 != a.self.L3Sun.opacity &amp;&amp; (a.self.L3Sun.opacity = 254, a.self.L3Sun.getComponent(cc.Animation).play("SunOnFire"), a.self.fireSunChild(), a.self.L3Sun.runAction(cc.sequence(cc.delayTime(2), cc.callFunc(function () {
                                    a.self.L3Sun.getComponent(cc.Animation).stop(), a.self.L3Sun.runAction(cc.moveBy(.3, cc.v2(800, 0)))
                                }))))
                            }))), a.self.checkAllSunChildDone()
                        }))))
                    });
                    else if (2 == a.self.WhichLevelSub) a.self.L3Cloud.getBoundingBoxToWorld().contains(a.self.location) &amp;&amp; 255 == a.self.L3Cloud.opacity &amp;&amp; (a.self.hideHInt(), a.self.L3Cloud.stopAllActions(), a.self.L3Cloud.opacity = 254, a.self.L3Cloud.setPosition(cc.v3(a.self.locationCanvas.x, a.self.locationCanvas.y, 0)), a.self.L3Cloud.getChildByName("CloudRAIN").getComponent(cc.ParticleSystem).resetSystem(), a.self.playaudio("Rain", !0));
                    else if (3 == a.self.WhichLevelSub &amp;&amp; 254 == a.self.GiftBox1.opacity)
                        for (c = 1; c &lt;= 5; c++)
                            if (254 == cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + c).opacity &amp;&amp; cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + c).getBoundingBoxToWorld().contains(a.self.location)) {
                                a.self.hideHInt(), a.self.MoveIndex = c, a.self.playaudio("GiftPick"), cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + c).opacity = 253, cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + c).zIndex = 10, cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + a.self.MoveIndex).setPosition(cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + a.self.MoveIndex).parent.convertToNodeSpaceAR(cc.v3(a.self.location.x, a.self.location.y, 0)));
                                break
                            }
            }, n.prototype.TouchMove = function (e) {
                if (a.self.location = e.getLocation(), a.self.locationCanvas = a.self.node.convertToNodeSpaceAR(a.self.location), a.self.isDrawingEnable) a.self.DrawingObj.TouchMove(e, cc.v2(70, 50)), a.self.Pen.position = cc.v3(a.self.locationCanvas, 0);
                else if (a.self.isValidForMove) a.self.location.x &gt; 400 &amp;&amp; a.self.location.x &gt;= e.getPreviousLocation().x ? a.self.location.y &gt;= e.getPreviousLocation().y &amp;&amp; a.self.location.y &gt; 302 ? a.self.Direction = i.RIGHTTOP : a.self.location.y &lt;= e.getPreviousLocation().y &amp;&amp; a.self.location.y &lt; 202 ? a.self.Direction = i.RIGHTBOTTOM : a.self.Direction = i.RIGHT : a.self.location.x &lt; e.getPreviousLocation().x &amp;&amp; (a.self.location.y &gt;= e.getPreviousLocation().y &amp;&amp; a.self.location.y &gt; 302 ? a.self.Direction = i.LEFTTOP : a.self.location.y &lt;= e.getPreviousLocation().y &amp;&amp; a.self.location.y &lt; 202 ? a.self.Direction = i.LEFTBOTTOM : a.self.Direction = i.LEFT);
                else if (2 == a.self.WhichLevel) {
                    if (1 == a.self.WhichLevelSub) 253 == a.self.L2Hamster2.opacity &amp;&amp; (a.self.L2Hamster2.setPosition(a.self.locationCanvas), a.self.L2Hamster2.getBoundingBoxToWorld().intersects(a.self.L2BalloonTop.getBoundingBoxToWorld()) &amp;&amp; (a.self.L2Hamster2.stopAllActions(), a.self.L2Hamster2.opacity = 250, a.self.L2Hamster2.zIndex = 1, a.self.L2Balloon.runAction(cc.sequence(cc.delayTime(.2), cc.scaleTo(.1, .85).easing(cc.easeBackIn()), cc.scaleTo(.1, .9).easing(cc.easeBackOut()))), a.self.L2Hamster2.runAction(cc.sequence(cc.spawn(cc.jumpTo(.3, cc.v2(-55, -153), 20, 1), cc.scaleTo(.3, .3)), cc.delayTime(1), cc.callFunc(function () {
                        var e = [];
                        e.splice(0, e.length), e.push("idle2"), a.self.L2Hamster.getComponent(s.default).setIdleAnimationList(e), a.self.L2Hamster.getComponent(s.default).playIdleAnimation(), a.self.L2Hamster2.getComponent(s.default).setIdleAnimationList(e), a.self.L2Hamster2.getComponent(s.default).playIdleAnimation(), a.self.L2Hamster2.getComponent(s.default).PlayAnimation("happy", 1), a.self.playaudio("HamsterHapy"), a.self.node.runAction(cc.sequence(cc.delayTime(1), cc.callFunc(function () {
                            a.self.L2Balloon.runAction(cc.moveBy(5, cc.v2(65, 280))), a.self.L2BalloonTop.runAction(cc.moveBy(5, cc.v2(65, 280))), a.self.L2Hamster2.runAction(cc.sequence(cc.moveBy(5, cc.v2(65, 280)), cc.callFunc(function () {
                                for (var e = 1; e &lt;= 8; e++) cc.find("Canvas/StarView/Star" + e).zIndex = 3;
                                for (cc.find("Canvas/StarView/stone-1").zIndex = 3, cc.find("Canvas/StarView/stone-2").zIndex = 3, e = 1; e &lt;= 3; e++) cc.find("Canvas/StarView/CatchRope" + e).zIndex = 3;
                                a.self.playaudio("wow thr a so many star"), a.self.L2Hamster2.getComponent(s.default).PlayAnimation("talk", -1)
                            }), cc.delayTime(4.5), cc.callFunc(function () {
                                a.self.L2Hamster2.getComponent(s.default).playIdleAnimation(), a.self.playaudio("tap to collect star")
                            }))), cc.find("Canvas/StarView/BG").runAction(cc.moveBy(5, cc.v2(0, -965)));
                            for (var e = 1; e &lt;= 8; e++) cc.find("Canvas/StarView/Star" + e).runAction(cc.moveBy(5, cc.v2(0, -990)));
                            cc.find("Canvas/StarView/stone-1").runAction(cc.moveBy(5, cc.v2(0, -990))), cc.find("Canvas/StarView/stone-2").runAction(cc.moveBy(5, cc.v2(0, -990)))
                        })))
                    })))));
                    else if (2 == a.self.WhichLevelSub) {
                        if (253 == cc.find("Canvas/StarCleaning/water").opacity) {
                            for (var n = 1; n &lt;= 6; n++)
                                if (254 != cc.find("Canvas/StarCleaning/Star" + n).opacity &amp;&amp; cc.find("Canvas/StarCleaning/Star" + n).getBoundingBoxToWorld().contains(a.self.location)) {
                                    cc.find("Canvas/StarCleaning/Star" + n).opacity = 254, cc.find("Canvas/StarCleaning/Star" + n + "/Star" + n).getComponent(s.default).HideSlot("body_front");
                                    break
                                }
                            var t = !1;
                            for (n = 1; n &lt;= 6; n++)
                                if (254 != cc.find("Canvas/StarCleaning/Star" + n).opacity) {
                                    t = !0;
                                    break
                                }
                            t || (a.self.playaudio("clean star r sparkling"), cc.find("Canvas/StarCleaning/GlitterOnce").getComponent(cc.ParticleSystem).resetSystem(), cc.find("Canvas/StarCleaning/water").opacity = 252, cc.find("Canvas/StarCleaning/L2FlowerRope1").runAction(cc.sequence(cc.delayTime(3), cc.moveTo(.5, cc.v2(0, 205)).easing(cc.easeBackOut()), cc.callFunc(function () {
                                a.self.playaudio("let star swing to"), cc.find("Canvas/StarCleaning/L2FlowerRope1").opacity = 254
                            }))))
                        } else if (254 == cc.find("Canvas/StarCleaning/L2FlowerRope1").opacity) {
                            if (-1 != a.self.MoveIndex) {
                                for (cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).position = cc.v3(a.self.locationCanvas.x, a.self.locationCanvas.y, 0), n = 1; n &lt;= 3; n++)
                                    if (255 == cc.find("Canvas/StarCleaning/L2FlowerRope1/L2FlowerSwing" + n).opacity &amp;&amp; cc.find("Canvas/StarCleaning/L2FlowerRope1/L2FlowerSwing" + n).getBoundingBoxToWorld().intersects(cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).getBoundingBoxToWorld())) {
                                        a.self.playaudio("Hanging star"), cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).active = !1, cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).opacity = 252, cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).setPosition(cc.v3(10001, 1e4, 0)), cc.find("Canvas/StarCleaning/L2FlowerRope1/L2FlowerSwing" + n).opacity = 254, cc.find("Canvas/StarCleaning/L2FlowerRope1/L2FlowerSwing" + n).getChildByName("Star").active = !0, cc.find("Canvas/StarCleaning/L2FlowerRope1/L2FlowerSwing" + n).getChildByName("Star").getComponent(s.default).HideSlot("body_front"), cc.find("Canvas/StarCleaning/L2FlowerRope1/L2FlowerSwing" + n).getChildByName("waterOnStar").active = !0, cc.find("Canvas/StarCleaning/L2FlowerRope1/L2FlowerSwing" + n).getChildByName("GlitterSmall").getComponent(cc.ParticleSystem).resetSystem(), cc.find("Canvas/StarCleaning/L2FlowerRope1/L2FlowerSwing" + n).getComponent(cc.Animation).play("StarSwing"), a.self.MoveIndex = -1;
                                        break
                                    }
                                for (t = !1, n = 1; n &lt;= 3; n++)
                                    if (254 != cc.find("Canvas/StarCleaning/L2FlowerRope1/L2FlowerSwing" + n).opacity) {
                                        t = !0;
                                        break
                                    }
                                t || (cc.find("Canvas/StarCleaning/L2FlowerRope1").opacity = 253, cc.find("Canvas/StarCleaning/L2FlowerRope1").runAction(cc.moveTo(.5, cc.v2(0, 450)).easing(cc.easeBackIn())), cc.find("Canvas/StarCleaning/L2FlowerRope2").opacity = 254, cc.find("Canvas/StarCleaning/L2FlowerRope2").runAction(cc.moveTo(.5, cc.v2(0, 205)).easing(cc.easeBackOut())))
                            }
                        } else if (254 == cc.find("Canvas/StarCleaning/L2FlowerRope2").opacity &amp;&amp; -1 != a.self.MoveIndex) {
                            for (cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).position = cc.v3(a.self.locationCanvas.x, a.self.locationCanvas.y, 0), n = 1; n &lt;= 3; n++)
                                if (255 == cc.find("Canvas/StarCleaning/L2FlowerRope2/L2FlowerSwing" + n).opacity &amp;&amp; cc.find("Canvas/StarCleaning/L2FlowerRope2/L2FlowerSwing" + n).getBoundingBoxToWorld().intersects(cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).getBoundingBoxToWorld())) {
                                    a.self.playaudio("Hanging star"), cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).active = !1, cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).opacity = 252, cc.find("Canvas/StarCleaning/Star" + a.self.MoveIndex).setPosition(cc.v3(10001, 1e4, 0)), cc.find("Canvas/StarCleaning/L2FlowerRope2/L2FlowerSwing" + n).opacity = 254, cc.find("Canvas/StarCleaning/L2FlowerRope2/L2FlowerSwing" + n).getChildByName("Star").active = !0, cc.find("Canvas/StarCleaning/L2FlowerRope2/L2FlowerSwing" + n).getChildByName("Star").getComponent(s.default).HideSlot("body_front"), cc.find("Canvas/StarCleaning/L2FlowerRope2/L2FlowerSwing" + n).getChildByName("waterOnStar").active = !0, cc.find("Canvas/StarCleaning/L2FlowerRope2/L2FlowerSwing" + n).getChildByName("GlitterSmall").getComponent(cc.ParticleSystem).resetSystem(), cc.find("Canvas/StarCleaning/L2FlowerRope2/L2FlowerSwing" + n).getComponent(cc.Animation).play("StarSwing"), a.self.MoveIndex = -1;
                                    break
                                }
                            for (t = !1, n = 1; n &lt;= 3; n++)
                                if (254 != cc.find("Canvas/StarCleaning/L2FlowerRope2/L2FlowerSwing" + n).opacity) {
                                    t = !0;
                                    break
                                }
                            t || (cc.find("Canvas/StarCleaning/L2FlowerRope2").opacity = 253, cc.find("Canvas/StarCleaning/L2FlowerRope2").runAction(cc.sequence(cc.moveTo(.5, cc.v2(0, 450)).easing(cc.easeBackIn()), cc.callFunc(function () {
                                a.self.showStarDryView()
                            }))))
                        }
                    } else if (3 == a.self.WhichLevelSub &amp;&amp; 254 == a.self.L2Dryer.opacity)
                        for (a.self.L2Dryer.setPosition(cc.v3(a.self.locationCanvas.x, a.self.locationCanvas.y, 0)), cc.find("Canvas/StarDry/DryerParticle").setPosition(cc.v3(a.self.locationCanvas.x - 50, a.self.locationCanvas.y + 10, 0)), n = 1; n &lt;= 3; n++) cc.find("Canvas/StarDry/DryerParticle").getBoundingBoxToWorld().intersects(cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).getBoundingBoxToWorld()) &amp;&amp; 253 != cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).opacity &amp;&amp; (cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).getChildByName("waterOnStar").opacity -= 5, cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).getChildByName("waterOnStar").opacity &lt; 20 &amp;&amp; (cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).getChildByName("waterOnStar").opacity = 0, cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).opacity = 253, cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).getComponent(cc.Animation).play("StarSwingIdle"), cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).getChildByName("GlitterSmall").getComponent(cc.ParticleSystem).resetSystem(), cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).getChildByName("Heart").getComponent(cc.ParticleSystem).resetSystem(), cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).getChildByName("Star").getComponent(s.default).PlayAnimation("happy", -1), a.self.stopAudio("StarDryer"), a.self.playaudio("StarHappy"), a.self.checkAllStarDry())), cc.find("Canvas/StarDry/DryerParticle").getBoundingBoxToWorld().intersects(cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).getBoundingBoxToWorld()) &amp;&amp; 253 != cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).opacity &amp;&amp; (cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).getChildByName("waterOnStar").opacity -= 5, cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).getChildByName("waterOnStar").opacity &lt; 20 &amp;&amp; (cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).getChildByName("waterOnStar").opacity = 0, cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).opacity = 253, cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).getComponent(cc.Animation).play("StarSwingIdle"), cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).getChildByName("GlitterSmall").getComponent(cc.ParticleSystem).resetSystem(), cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).getChildByName("Heart").getComponent(cc.ParticleSystem).resetSystem(), cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).getChildByName("Star").getComponent(s.default).PlayAnimation("happy", -1), a.self.stopAudio("StarDryer"), a.self.playaudio("StarHappy"), a.self.checkAllStarDry())), cc.find("Canvas/StarDry/DryerParticle").getBoundingBoxToWorld().intersects(cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).getBoundingBoxToWorld()) &amp;&amp; 255 == cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).opacity ? (cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).opacity = 254, cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).getComponent(cc.Animation).play("StarSwingDryer"), a.self.playaudio("StarDryer", !0)) : cc.find("Canvas/StarDry/DryerParticle").getBoundingBoxToWorld().intersects(cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).getBoundingBoxToWorld()) || 254 != cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).opacity || (cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).opacity = 255, cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).getComponent(cc.Animation).play("StarSwingIdle"), a.self.stopAudio("StarDryer")), cc.find("Canvas/StarDry/DryerParticle").getBoundingBoxToWorld().intersects(cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).getBoundingBoxToWorld()) &amp;&amp; 255 == cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).opacity ? (cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).opacity = 254, cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).getComponent(cc.Animation).play("StarSwingDryer"), a.self.playaudio("StarDryer", !0)) : cc.find("Canvas/StarDry/DryerParticle").getBoundingBoxToWorld().intersects(cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).getBoundingBoxToWorld()) || 254 != cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).opacity || (cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).opacity = 255, cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).getComponent(cc.Animation).play("StarSwingIdle"), a.self.stopAudio("StarDryer"))
                } else if (3 == a.self.WhichLevel)
                    if (2 == a.self.WhichLevelSub) {
                        if (254 == a.self.L3Cloud.opacity) {
                            if (a.self.L3Cloud.setPosition(cc.v3(a.self.locationCanvas.x, a.self.locationCanvas.y, 0)), 255 == a.self.L3Cloud.getChildByName("CloudRAIN").opacity)
                                for (n = 1; n &lt;= 5; n++)
                                    if (cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + n).getBoundingBoxToWorld().intersects(a.self.L3Cloud.getChildByName("CloudRAIN").getBoundingBoxToWorld()) &amp;&amp; 255 == cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + n).opacity) {
                                        a.self.L3Cloud.getChildByName("CloudRAIN").opacity = 254, a.self.L3Cloud.getChildByName("CloudRAIN").runAction(cc.fadeIn(1)), a.self.playaudio("ToyPop"), cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + n).active = !0, cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + n).opacity = 254, cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + n).runAction(cc.sequence(cc.scaleTo(.3, 1.1), cc.scaleTo(.3, 1).easing(cc.easeBounceIn())));
                                        break
                                    }
                            for (t = !1, n = 1; n &lt;= 5; n++)
                                if (255 == cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + n).opacity) {
                                    t = !0;
                                    break
                                }
                            t || (cc.find("Canvas/Santa1/GlitterOnce").getComponent(cc.ParticleSystem).resetSystem(), a.self.stopAudio("Rain"), a.self.playaudio("RainDone"), a.self.L3Cloud.stopAllActions(), a.self.L3Cloud.opacity = 253, a.self.L3Cloud.runAction(cc.sequence(cc.moveBy(.5, cc.v2(1e3, 0)), cc.callFunc(function () {
                                a.self.startGiftView()
                            }))))
                        }
                    } else 3 == a.self.WhichLevelSub &amp;&amp; -1 != a.self.MoveIndex &amp;&amp; cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + a.self.MoveIndex).setPosition(cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + a.self.MoveIndex).parent.convertToNodeSpaceAR(cc.v3(a.self.location.x, a.self.location.y, 0)))
            }, n.prototype.TouchEnded = function (e) {
                if (a.self.location = e.getLocation(), a.self.locationCanvas = a.self.node.convertToNodeSpaceAR(a.self.location), a.self.isDrawingEnable) {
                    if (a.self.DrawingObj.EndCalled(), a.self.stopAudio("drawingSound"), cc.find("Canvas/Drawing/Pen/PenParticle").active = !1, a.self.DrawingObj.VerifyPicture())
                        if (a.self.CurrentStep++, a.self.DrawingNodes[a.self.CurrentStep]) a.self.playaudio("pic part change"), a.self.DrawingObj.ChangeDrawNode(a.self.DrawingNodes[a.self.CurrentStep]), a.self.StepNodes[a.self.CurrentStep].active = !0, a.self.StepNodes[a.self.CurrentStep].runAction(cc.fadeIn(.3)), a.self.DrawingObj.LoadVerifyTexture(a.self.ColorNodes[a.self.CurrentStep].getComponent(cc.Sprite));
                        else {
                            switch (a.self.getRandomInt(1, 3)) {
                                case 1:
                                    a.self.playaudio("fantastic work");
                                    break;
                                case 2:
                                    a.self.playaudio("well done");
                                    break;
                                case 3:
                                    a.self.playaudio("wow thats amazing")
                            }
                            if (2 == a.self.WhichLevel || 3 == a.self.WhichLevel ? a.self.ParentDrawNode.children.forEach(function (e) {
                                e.getChildByName("White").active = !1
                            }) : a.self.ParentDrawNode.children.forEach(function (e) {
                                e.getChildByName("White").color = a.self.ColorCode[a.self.getRandomInt(0, 4)]
                            }), 1 == a.self.WhichLevel) a.self.Balloon = cc.instantiate(a.self.ParentDrawNode), a.self.Balloon.setAnchorPoint(cc.v2(.5, 0)), a.self.Balloon.setPosition(cc.v2(a.self.ChildSheep.position.x + 20, a.self.ChildSheep.position.y + 90)), a.self.Balloon.setScale(.35), a.self.ChildSheep.parent.addChild(a.self.Balloon), a.self.ChildSheep.zIndex = 2, a.self.ChildSheep.getComponent(s.default).PlayAnimation("balloon", -1), cc.find("Canvas/main/Level1/top_leyer").zIndex = 3, cc.find("Canvas/main/Level1/top").zIndex = 3, a.self.MomSheep.zIndex = 4, a.self.Balloon.runAction(cc.repeatForever(cc.sequence(cc.spawn(cc.scaleTo(1, .37).easing(cc.easeSineInOut()), cc.rotateTo(1, -3).easing(cc.easeSineInOut())), cc.spawn(cc.scaleTo(1.02, .35).easing(cc.easeSineInOut()), cc.rotateTo(1, 3).easing(cc.easeSineInOut()))))), a.self.showHInt("HintSheep1"), a.self.ChildSheep.opacity = 254, a.self.closeDrawing();
                            else if (2 == a.self.WhichLevel &amp;&amp; 1 == a.self.WhichLevelSub) {
                                var n = cc.instantiate(a.self.ParentDrawNode);
                                n.setPosition(cc.v2(43, 232)), a.self.L2Balloon.addChild(n), a.self.L2Balloon.active = !0, a.self.L2Balloon.runAction(cc.sequence(cc.jumpTo(.5, cc.v2(-50, -202), 20, 1).easing(cc.easeBackOut()), cc.delayTime(2), cc.callFunc(function () {
                                    a.self.playaudio("ltl hamsater want to ge in"), a.self.showHInt("HintHamster1"), a.self.L2Hamster2.opacity = 254
                                })));
                                var t = cc.instantiate(a.self.ParentDrawNode.getChildByName("Step9"));
                                t.setPosition(cc.v2(0, 42)), a.self.L2BalloonTop.addChild(t), a.self.L2BalloonTop.zIndex = 2, a.self.L2BalloonTop.active = !0, a.self.L2BalloonTop.runAction(cc.jumpTo(.5, cc.v2(-46, -202), 20, 1).easing(cc.easeBackOut())), a.self.closeDrawing()
                            } else if (2 == a.self.WhichLevel &amp;&amp; 2 == a.self.WhichLevelSub) {
                                var c = cc.instantiate(a.self.ParentDrawNode);
                                a.self.L2Jug.getChildByName("Jug").addChild(c), a.self.L2Jug.active = !0, a.self.L2Jug.runAction(cc.jumpTo(.5, cc.v2(254, -40), 20, 1)), a.self.node.runAction(cc.sequence(cc.delayTime(1), cc.callFunc(function () {
                                    cc.find("Canvas/StarCleaning/Waterfall").active = !0, a.self.playaudio("waterPour"), cc.find("Canvas/StarCleaning").getComponent(cc.Animation).play("L2JugWaterPour");
                                    for (var e = 1; e &lt;= 6; e++) cc.find("Canvas/StarCleaning/Star" + e).runAction(cc.sequence(cc.delayTime(2.5), cc.moveBy(1, cc.v2(0, 50)))), cc.find("Canvas/StarCleaning/Star" + e).getChildByName("Star" + e).runAction(cc.sequence(cc.delayTime(2.5), cc.moveBy(1, cc.v2(0, -50))))
                                }), cc.delayTime(3), cc.callFunc(function () {
                                    a.self.playaudio("remove the stins from the star"), a.self.WhichLevelSub = 2, cc.find("Canvas/StarCleaning/water").opacity = 254, cc.find("Canvas/StarCleaning/arrow").active = !0, cc.find("Canvas/StarCleaning/arrow").runAction(cc.repeatForever(cc.rotateBy(1, 30)))
                                }))), a.self.closeDrawing()
                            } else if (2 == a.self.WhichLevel &amp;&amp; 3 == a.self.WhichLevelSub) {
                                var o = cc.instantiate(a.self.ParentDrawNode);
                                o.setScale(.5), a.self.L2Dryer.addChild(o), a.self.L2Dryer.runAction(cc.jumpTo(.5, cc.v2(300, 40), 20, 1)), a.self.node.runAction(cc.sequence(cc.delayTime(2), cc.callFunc(function () {
                                    a.self.playaudio("blow dry the star with")
                                }))), a.self.closeDrawing()
                            } else if (3 == a.self.WhichLevel &amp;&amp; 1 == a.self.WhichLevelSub) {
                                var i = cc.instantiate(a.self.ParentDrawNode);
                                i.setPosition(cc.v2(23, -2)), i.setScale(.5), i.getChildByName("Step1").active = !1, a.self.L3Sun.getChildByName("L3Sun1").addChild(i);
                                var l = cc.instantiate(a.self.ParentDrawNode.getChildByName("Step1"));
                                l.setPosition(cc.v2(0, 0)), l.setScale(.5), a.self.L3Sun.getChildByName("L3Sun2").addChild(l), a.self.L3Sun.runAction(cc.jumpTo(.5, cc.v2(241, 20), 20, 1)), a.self.closeDrawing(), a.self.node.runAction(cc.sequence(cc.delayTime(.5), cc.callFunc(function () {
                                    a.self.L3Sun.getComponent(cc.Animation).play("SunIdle")
                                }), cc.delayTime(1), cc.callFunc(function () {
                                    a.self.playaudio("the sun"), a.self.L3Sun.getComponent(cc.Animation).play("SunOnFire"), a.self.fireSunChild()
                                }), cc.delayTime(3), cc.callFunc(function () {
                                    a.self.playaudio("tap to help the chrs"), a.self.L3Sun.getComponent(cc.Animation).stop(), a.self.L3Sun.runAction(cc.moveBy(.3, cc.v2(800, 0)))
                                })))
                            } else if (3 == a.self.WhichLevel &amp;&amp; 2 == a.self.WhichLevelSub) {
                                var r = cc.instantiate(a.self.ParentDrawNode);
                                r.setPosition(cc.v2(6, 0)), r.setScale(.55), r.getChildByName("Step2").active = !1, a.self.L3Cloud.getChildByName("L3Cloud").addChild(r);
                                var f = cc.instantiate(a.self.ParentDrawNode);
                                f.setPosition(cc.v2(-13, 0)), f.setScale(.54), f.getChildByName("Step1").active = !1, a.self.L3Cloud.getChildByName("L3Cloud2").addChild(f), a.self.L3Cloud.runAction(cc.sequence(cc.jumpTo(.5, cc.v2(263, 82), 20, 1), cc.delayTime(1), cc.callFunc(function () {
                                    a.self.showHInt("HintSanta2"), a.self.playaudio("let water the")
                                }))), a.self.closeDrawing()
                            } else if (3 == a.self.WhichLevel &amp;&amp; 3 == a.self.WhichLevelSub) {
                                cc.find("Canvas/Santa1/Gift").active = !0;
                                var d = cc.instantiate(a.self.ParentDrawNode);
                                d.setScale(.5), d.setPosition(cc.v2(35, 37)), d.children.forEach(function (e) {
                                    "Step1" != e.name &amp;&amp; (e.active = !1)
                                }), a.self.GiftBox1.addChild(d);
                                var u = cc.instantiate(a.self.ParentDrawNode);
                                u.setScale(.5), u.setPosition(cc.v2(35, -27)), u.getChildByName("Step1").active = !1, a.self.GiftBox2.addChild(u), a.self.GiftBox2.runAction(cc.jumpTo(.5, cc.v2(-249, -136), 20, 1)), a.self.GiftBox1.runAction(cc.sequence(cc.jumpTo(.5, cc.v2(-249, -202), 20, 1), cc.callFunc(function () {
                                    a.self.showHInt("HintSanta3"), a.self.GiftBox1.opacity = 254, a.self.GiftBox2.runAction(cc.spawn(cc.scaleTo(.5, .8), cc.jumpTo(.5, cc.v2(-312, -216), 50, 1), cc.rotateBy(.5, 360)))
                                }))), a.self.closeDrawing()
                            }
                        }
                } else {
                    if (a.self.isValidForMove &amp;&amp; (a.self.isMapMove = !1, a.self.showNextIndication()), 1 == a.self.WhichLevel &amp;&amp; 253 == a.self.ChildSheep.opacity) {
                        a.self.ChildSheep.opacity = 254, a.self.ChildSheep.stopAllActions();
                        var p = -138 - a.self.ChildSheep.position.y;
                        p &lt; 0 &amp;&amp; (p *= -1);
                        var h = 3755 / p;
                        a.self.ChildSheep.runAction(cc.moveTo(h, a.self.ChildSheepPOS))
                    }
                    if (2 == a.self.WhichLevel)
                        if (1 == a.self.WhichLevelSub) 253 == a.self.L2Hamster2.opacity &amp;&amp; (a.self.L2Hamster2.stopAllActions(), a.self.L2Hamster2.opacity = 252, a.self.L2Hamster2.runAction(cc.sequence(cc.jumpTo(.3, cc.v2(a.self.PickPOS.x, a.self.PickPOS.y), 20, 1), cc.callFunc(function () {
                            a.self.L2Hamster2.opacity = 254, a.self.L2Hamster2.zIndex = 1
                        }))));
                        else if (2 == a.self.WhichLevelSub) {
                            if (253 == cc.find("Canvas/StarCleaning/water").opacity) cc.find("Canvas/StarCleaning/water").opacity = 254, cc.find("Canvas/StarCleaning/arrow").active = !0, cc.find("Canvas/StarCleaning/arrow").runAction(cc.repeatForever(cc.rotateBy(1, 30)));
                            else if ((254 == cc.find("Canvas/StarCleaning/L2FlowerRope1").opacity || 254 == cc.find("Canvas/StarCleaning/L2FlowerRope2").opacity) &amp;&amp; -1 != a.self.MoveIndex) {
                                var C = a.self.MoveIndex;
                                cc.find("Canvas/StarCleaning/Star" + C).runAction(cc.sequence(cc.jumpTo(.3, cc.v2(a.self.PickPOS.x, a.self.PickPOS.y), 10, 1), cc.callFunc(function () {
                                    cc.find("Canvas/StarCleaning/Star" + C).zIndex = 1, cc.find("Canvas/StarCleaning/Star" + C).getChildByName("Star" + C).setPosition(cc.v3(0, -82, 0))
                                }))), a.self.MoveIndex = -1
                            }
                        } else if (3 == a.self.WhichLevelSub &amp;&amp; 254 == a.self.L2Dryer.opacity) {
                            a.self.L2Dryer.opacity = 255, a.self.stopAudio("HaiDryerOn"), a.self.stopAudio("StarDryer"), cc.find("Canvas/StarDry/DryerParticle").getComponent(cc.ParticleSystem).stopSystem(), a.self.L2Dryer.runAction(cc.jumpTo(.3, cc.v2(300, 40), 10, 1));
                            for (var y = 1; y &lt;= 3; y++) cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + y).getComponent(cc.Animation).play("StarSwingIdle"), cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + y).getComponent(cc.Animation).play("StarSwingIdle")
                        }
                    if (3 == a.self.WhichLevel)
                        if (2 == a.self.WhichLevelSub) 254 == a.self.L3Cloud.opacity &amp;&amp; (a.self.L3Cloud.opacity = 255, a.self.L3Cloud.getChildByName("CloudRAIN").getComponent(cc.ParticleSystem).stopSystem(), a.self.stopAudio("Rain"));
                        else if (3 == a.self.WhichLevelSub &amp;&amp; -1 != a.self.MoveIndex) {
                            var m = a.self.MoveIndex;
                            a.self.MoveIndex = -1, a.self.playaudio("GiftThrow"), cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + m).stopAllActions(), cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + m).zIndex = 5, a.self.GiftBox1.zIndex = 6, a.self.GiftBox2.zIndex = 7, cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + m).runAction(cc.sequence(cc.moveTo(.3, cc.v2(-156, 133)), cc.jumpTo(.3, cc.v2(-264, 50), 30, 1), cc.callFunc(function () {
                                a.self.playaudio("Hanging star"), a.self.GiftBox1.stopAllActions(), a.self.GiftBox1.runAction(cc.sequence(cc.scaleTo(.2, 1.1, .9), cc.scaleTo(.1, .9, 1), cc.scaleTo(.1, 1, 1))), cc.find("Canvas/Santa1/Gift/Star").getComponent(cc.ParticleSystem).resetSystem(), cc.find("Canvas/Santa1/Gift/GlitterOnce").getComponent(cc.ParticleSystem).resetSystem();
                                for (var e = !1, n = 1; n &lt;= 5; n++)
                                    if (253 != cc.find("Canvas/Santa1/L3ToysTree/L3Toys" + n).opacity) {
                                        e = !0;
                                        break
                                    }
                                e || a.self.GiftBox2.runAction(cc.sequence(cc.spawn(cc.scaleTo(.5, 1), cc.jumpTo(.5, cc.v2(-249, -136), 50, 1), cc.rotateBy(.5, 360)), cc.callFunc(function () {
                                    a.self.showSantaFlyView()
                                })))
                            })))
                        }
                }
            }, n.prototype.showNextIndication = function () {
                a.self.isValidForMove = !0, cc.find("Canvas/NextInd/GlitterSmall").active = !0, cc.find("Canvas/NextInd").stopAllActions(), cc.find("Canvas/NextInd").runAction(cc.repeatForever(cc.sequence(cc.scaleTo(.5, 1.1), cc.scaleTo(.5, 1)))), cc.find("Canvas/PandaMoveHInt").stopAllActions(), cc.find("Canvas/PandaMoveHInt").setPosition(cc.v2(a.self.Panda.position.x, a.self.Panda.position.y - 50)), cc.find("Canvas/PandaMoveHInt").active = !0, cc.find("Canvas/PandaMoveHInt").runAction(cc.repeatForever(cc.sequence(cc.moveBy(1, cc.v2(150, 0)), cc.delayTime(.2), cc.moveBy(0, cc.v2(-150, 0)))))
            }, n.prototype.hideNextIndication = function () {
                cc.find("Canvas/NextInd/GlitterSmall").active = !1, cc.find("Canvas/NextInd").stopAllActions(), cc.find("Canvas/NextInd").setScale(0), cc.find("Canvas/PandaMoveHInt").stopAllActions(), cc.find("Canvas/PandaMoveHInt").setPosition(cc.v2(1e4, 0)), cc.find("Canvas/PandaMoveHInt").active = !1
            }, n.prototype.CharMove = function () {
                a.self.Panda.position.x &gt; a.self.locationCanvas.x ? a.self.Panda.setScale(-1, 1) : a.self.Panda.setScale(1, 1);
                var e = a.self.Panda.position.sub(cc.v3(a.self.locationCanvas.x, a.self.locationCanvas.y, 0)),
                    n = 1;
                (n = e.x &gt; e.y ? e.x / 900 : e.y / 900) &lt; 0 &amp;&amp; (n *= -1), a.self.Panda.runAction(cc.sequence(cc.moveTo(n, a.self.locationCanvas), cc.callFunc(function () {
                    a.self.Panda.setScale(1, 1), a.self.isMapMove = !0
                })))
            }, n.prototype.checkLevelReach = function () {
                1 == a.self.WhichLevel ? a.self.FullMap.position.x &lt;= -4800 &amp;&amp; (a.self.isValidForMove = !1, a.self.isMapMove = !1, a.self.FullMap.runAction(cc.moveTo(.5, cc.v2(-5250, 0))), a.self.Panda.runAction(cc.moveTo(.5, cc.v2(-295, 15))), a.self.hideNextIndication(), a.self.PandaSkel.getComponent(s.default).PlayAnimation("confuse", 1), this.node.runAction(cc.sequence(cc.delayTime(2), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("someneedhelp")
                }), cc.delayTime(2), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).playIdleAnimation(), a.self.Panda.runAction(cc.moveTo(.5, cc.v2(-250, -15))), a.self.playaudio("shep help"), a.self.MomSheep.getComponent(s.default).PlayAnimation("sad_talk", -1)
                }), cc.delayTime(2), cc.callFunc(function () {
                    cc.find("Canvas/main/Level1/L1_HelpSymbol").active = !1, a.self.MomSheep.getComponent(s.default).playIdleAnimation(), a.self.PandaSkel.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("mummy sheep wht")
                }), cc.delayTime(3), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).playIdleAnimation(), a.self.MomSheep.getComponent(s.default).PlayAnimation("sad_talk", -1), a.self.playaudio("my baby fallen")
                }), cc.delayTime(5.5), cc.callFunc(function () {
                    a.self.MomSheep.getComponent(s.default).playIdleAnimation(), a.self.PandaSkel.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("dont wry i wl check it")
                }), cc.delayTime(2.5), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).playIdleAnimation(), a.self.ChildSheep.setPosition(a.self.ChildSheepPOS), a.self.FullMap.runAction(cc.moveTo(1, cc.v2(-5250, 750))), a.self.Panda.runAction(cc.moveTo(1, cc.v2(-293, 62))), a.self.node.runAction(cc.sequence(cc.delayTime(.3), cc.callFunc(function () {
                        a.self.playaudio("SheepbabyCry")
                    })))
                }), cc.delayTime(1.5), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("we need to lift")
                }), cc.delayTime(3), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).PlayAnimation("newAnimation", 1), a.self.playaudio("mgic brush comes to help")
                }), cc.delayTime(3), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).playIdleAnimation(), a.self.SelectedDrawing = l.BALLOON2, a.self.openDrawing()
                })))) : 2 == a.self.WhichLevel ? a.self.FullMap.position.x &lt;= -9900 &amp;&amp; (a.self.isValidForMove = !1, a.self.isMapMove = !1, a.self.FullMap.runAction(cc.moveTo(.5, cc.v2(-10700, 0))), a.self.Panda.runAction(cc.moveTo(.5, cc.v2(-295, 15))), a.self.hideNextIndication(), a.self.PandaSkel.getComponent(s.default).PlayAnimation("confuse", 1), this.node.runAction(cc.sequence(cc.delayTime(2), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("someneedhelp")
                }), cc.delayTime(2), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).playIdleAnimation(), a.self.Panda.runAction(cc.moveTo(.5, cc.v2(-250, -15))), cc.find("Canvas/main/Level2/L1_HelpSymbol").active = !1
                }), cc.delayTime(1), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("littl Hamter you look")
                }), cc.delayTime(3), cc.callFunc(function () {
                    cc.find("Canvas/main/Level2/L2Thinking").runAction(cc.scaleTo(.2, 1).easing(cc.easeBackOut())), a.self.PandaSkel.getComponent(s.default).playIdleAnimation(), a.self.L2Hamster.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("i want ro make star")
                }), cc.delayTime(5.5), cc.callFunc(function () {
                    a.self.L2Hamster.getComponent(s.default).playIdleAnimation(), a.self.PandaSkel.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("no problm i wl help u")
                }), cc.delayTime(2.2), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).playIdleAnimation(), a.self.showStarView()
                })))) : 3 == a.self.WhichLevel &amp;&amp; a.self.FullMap.position.x &lt;= -16200 &amp;&amp; (a.self.isValidForMove = !1, a.self.isMapMove = !1, a.self.FullMap.runAction(cc.moveTo(.5, cc.v2(-17e3, 0))), a.self.Panda.runAction(cc.moveTo(.5, cc.v2(-295, 15))), a.self.hideNextIndication(), a.self.PandaSkel.getComponent(s.default).PlayAnimation("confuse", 1), this.node.runAction(cc.sequence(cc.delayTime(2), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("someneedhelp")
                }), cc.delayTime(2), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("Do u need help santa")
                }), cc.delayTime(2), cc.callFunc(function () {
                    cc.find("Canvas/main/Level3/santa-pop-up").runAction(cc.repeatForever(cc.sequence(cc.scaleTo(1, 1.1), cc.scaleTo(1, 1)))), a.self.PandaSkel.getComponent(s.default).playIdleAnimation(), a.self.SantaOnMap.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("oh no, christmas coming")
                }), cc.delayTime(7), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).PlayAnimation("talk", -1), a.self.SantaOnMap.getComponent(s.default).playIdleAnimation(), a.self.playaudio("dnt wry santa")
                }), cc.delayTime(3), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).playIdleAnimation(), a.self.showSantaView1()
                }))))
            }, n.prototype.update = function () {
                if (a.self.isValidForMove &amp;&amp; a.self.isMapMove) {
                    var e = cc.v3(a.self.locationCanvas.x, a.self.locationCanvas.y, 0);
                    if (e.y &lt; -162 &amp;&amp; (e.y = -162), e.y &gt; 162 &amp;&amp; (e.y = 162), e.x &lt; -300 &amp;&amp; (e.x = -300), e.x &gt; 200 &amp;&amp; (e.x = 200), a.self.Panda.position.x &lt; a.self.locationCanvas.x ? a.self.Panda.setScale(1, 1) : a.self.Panda.position.x &gt; a.self.locationCanvas.x &amp;&amp; a.self.Panda.setScale(-1, 1), a.self.Panda.position = e, a.self.location.x &gt; 400) {
                        if (a.self.Direction == i.RIGHTTOP) (n = cc.v3(a.self.FullMap.position.x - a.self.MovePixel, a.self.FullMap.position.y - a.self.MovePixel, 0)).y &lt; -526 &amp;&amp; (n.y = -526), n.x &lt; -19200 &amp;&amp; (n.x = -19200), a.self.FullMap.position = n;
                        else if (a.self.Direction == i.RIGHTBOTTOM) (n = cc.v3(a.self.FullMap.position.x - a.self.MovePixel, a.self.FullMap.position.y + a.self.MovePixel, 0)).y &gt; 0 &amp;&amp; (n.y = 0), n.x &lt; -19200 &amp;&amp; (n.x = -19200), a.self.FullMap.position = n;
                        else if (a.self.Direction == i.RIGHT) {
                            var n;
                            (n = cc.v3(a.self.FullMap.position.x - a.self.MovePixel, a.self.FullMap.position.y, 0)).x &lt; -19200 &amp;&amp; (n.x = -19200), a.self.FullMap.position = n
                        }
                    } else if (a.self.Direction == i.LEFTTOP) {
                        var t = a.self.FullMap.position.y - a.self.MovePixel;
                        t &lt; -526 &amp;&amp; (t = -526), a.self.FullMap.position = cc.v3(a.self.FullMap.position.x, t, 0)
                    } else if (a.self.Direction == i.LEFTBOTTOM) {
                        var c = a.self.FullMap.position.y + a.self.MovePixel;
                        c &gt; 0 &amp;&amp; (c = 0), a.self.FullMap.position = cc.v3(a.self.FullMap.position.x, c, 0)
                    }
                    a.self.FullMap.position.x &lt; -2250 &amp;&amp; 255 == cc.find("Canvas/main/1/top/Music").opacity &amp;&amp; (cc.find("Canvas/main/1/top/Music").opacity = 254, a.self.playaudio("MusicMashrum", !0)), a.self.FullMap.position.x &lt; -3500 &amp;&amp; 254 == cc.find("Canvas/main/1/top/Music").opacity &amp;&amp; (cc.find("Canvas/main/1/top/Music").opacity = 253, a.self.stopAudio("MusicMashrum")), a.self.FullMap.position.x &lt; -7500 &amp;&amp; 255 == cc.find("Canvas/main/2/top/Music").opacity &amp;&amp; (cc.find("Canvas/main/2/top/Music").opacity = 254, a.self.playaudio("MusicMashrum", !0)), a.self.FullMap.position.x &lt; -8500 &amp;&amp; 254 == cc.find("Canvas/main/2/top/Music").opacity &amp;&amp; (cc.find("Canvas/main/2/top/Music").opacity = 253, a.self.stopAudio("MusicMashrum")), a.self.FullMap.position.x &lt; -13500 &amp;&amp; 255 == cc.find("Canvas/main/3/frog").opacity &amp;&amp; (cc.find("Canvas/main/3/frog").opacity = 254, cc.find("Canvas/main/3/frog").runAction(cc.repeatForever(cc.sequence(cc.delayTime(.5), cc.callFunc(function () {
                        a.self.playaudio("Frog1")
                    }), cc.delayTime(.5), cc.callFunc(function () {
                        a.self.playaudio("Frog2")
                    }), cc.delayTime(.5), cc.callFunc(function () {
                        a.self.playaudio("Frog3")
                    }))))), a.self.FullMap.position.x &lt; -14200 &amp;&amp; 254 == cc.find("Canvas/main/3/frog").opacity &amp;&amp; (cc.find("Canvas/main/3/frog").opacity = 253, cc.find("Canvas/main/3/frog").stopAllActions()), a.self.checkLevelReach()
                }
                if (254 == a.self.ChildSheep.opacity || 253 == a.self.ChildSheep.opacity) {
                    a.self.Balloon.setPosition(cc.v2(a.self.ChildSheep.position.x + 20, a.self.ChildSheep.position.y + 120));
                    var o = a.self.distanceBetween2Points(cc.v2(a.self.ChildSheepPOS.x, -184), a.self.ChildSheep.position);
                    a.self.FullMap.setPosition(cc.v2(-5250, o))
                }
            }, n.prototype.distanceBetween2Points = function (e, n) {
                var a = n.x - e.x,
                    t = n.y - e.y;
                return Math.sqrt(Math.pow(a, 2) + Math.pow(t, 2))
            }, n.prototype.getRandomInt = function (e, n) {
                return e = Math.ceil(e), n = Math.floor(n) + 1, Math.floor(Math.random() * (n - e)) + e
            }, n.prototype.doneAction = function () {
                f.default.self.requestAds(), this.node.runAction(cc.sequence(cc.delayTime(.6), cc.callFunc(function () {
                    cc.director.loadScene("LevelScene")
                })))
            }, n.prototype.playaudio = function (e, n) {
                void 0 === n &amp;&amp; (n = !1), cc.find("Canvas/SoundNode/" + e).getComponent(cc.AudioSource).loop = n, cc.find("Canvas/SoundNode/" + e).getComponent(cc.AudioSource).play()
            }, n.prototype.stopAudio = function (e) {
                cc.find("Canvas/SoundNode/" + e).getComponent(cc.AudioSource).loop = !1, cc.find("Canvas/SoundNode/" + e).getComponent(cc.AudioSource).stop()
            }, n.prototype.showMagicPanda = function () {
                a.self.playaudio("PandaComeFromMagic"), cc.find("Canvas/Mask/Panda").setPosition(cc.v2(-209, -371)), cc.find("Canvas").getComponent(cc.Animation).play("Magic2")
            }, n.prototype.showStarView = function () {
                a.self.isValidForMove = !1, a.self.isMapMove = !1, a.self.hideNextIndication(), f.default.self.requestAds(), a.self.node.runAction(cc.sequence(cc.delayTime(.5), cc.callFunc(function () {
                    cc.find("Canvas/StarView").opacity = 0, cc.find("Canvas/StarView").active = !0, cc.find("Canvas/StarView").runAction(cc.fadeIn(.3))
                }), cc.delayTime(1), cc.callFunc(function () {
                    cc.find("Canvas/main/Level2/hamster_ske").active = !1, cc.find("Canvas/main/Level2/L2Thinking").active = !1, a.self.L2Hamster2.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("stars are high in the sky")
                }), cc.delayTime(7.5), cc.callFunc(function () {
                    a.self.L2Hamster2.getComponent(s.default).playIdleAnimation(), a.self.showMagicPanda()
                }), cc.delayTime(2), cc.callFunc(function () {
                    a.self.MagicPanda.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("i hv got an idea to help u")
                }), cc.delayTime(4), cc.callFunc(function () {
                    a.self.MagicPanda.getComponent(s.default).PlayAnimation("newAnimation", 1), a.self.playaudio("mgic brush comes to help")
                }), cc.delayTime(2), cc.callFunc(function () {
                    a.self.SelectedDrawing = l.BALLOON, a.self.openDrawing()
                }), cc.delayTime(1), cc.callFunc(function () {
                    a.self.MagicPanda.active = !1
                })))
            }, n.prototype.checkStarComplete = function () {
                for (var e = !0, n = 1; n &lt;= 8; n++)
                    if (255 == cc.find("Canvas/StarView/Star" + n).opacity) {
                        e = !1;
                        break
                    }
                e &amp;&amp; (a.self.L2Hamster2.opacity = 249, cc.find("Canvas/StarView/complete").active = !0, cc.find("Canvas/StarView/complete").getComponent(cc.Animation).play("StarComplete"), a.self.playaudio("SheepcmpParticle"), a.self.node.runAction(cc.sequence(cc.delayTime(2), cc.callFunc(function () {
                    a.self.showStarCleanView()
                }))))
            }, n.prototype.showStarCleanView = function () {
                a.self.isValidForMove = !1, a.self.isMapMove = !1, a.self.hideNextIndication(), a.self.WhichLevelSub = 2, f.default.self.requestAds(), a.self.node.runAction(cc.sequence(cc.delayTime(.5), cc.callFunc(function () {
                    a.self.playaudio("clean the star with water"), cc.find("Canvas/StarCleaning").active = !0
                }), cc.delayTime(.5), cc.callFunc(function () {
                    for (var e = 1; e &lt;= 6; e++) cc.find("Canvas/StarCleaning/Star" + e).setPosition(cc.v3(cc.find("Canvas/StarCleaning/Star" + e).position.x, cc.find("Canvas/StarCleaning/Star" + e).position.y + 200, 0)), cc.find("Canvas/StarCleaning/Star" + e).runAction(cc.sequence(cc.delayTime(.1 * e), cc.fadeIn(.1), cc.jumpBy(.5, cc.v2(0, -200), 20, 1)))
                }), cc.delayTime(2), cc.callFunc(function () {
                    a.self.showMagicPanda()
                }), cc.delayTime(2), cc.callFunc(function () {
                    a.self.MagicPanda.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("draw a cadle")
                }), cc.delayTime(2.5), cc.callFunc(function () {
                    a.self.MagicPanda.getComponent(s.default).PlayAnimation("newAnimation", 1), a.self.playaudio("mgic brush comes to help")
                }), cc.delayTime(2.5), cc.callFunc(function () {
                    a.self.MagicPanda.getComponent(s.default).playIdleAnimation(), a.self.SelectedDrawing = l.JUG, a.self.openDrawing(), a.self.MagicPanda.active = !1
                })))
            }, n.prototype.showStarDryView = function () {
                a.self.WhichLevelSub = 3, a.self.isValidForMove = !1, a.self.isMapMove = !1, a.self.hideNextIndication(), f.default.self.requestAds(), a.self.node.runAction(cc.sequence(cc.delayTime(.5), cc.callFunc(function () {
                    cc.find("Canvas/StarDry").active = !0, cc.find("Canvas/StarCleaning").active = !1;
                    for (var e = 1; e &lt;= 3; e++) cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + e + "/Star").getComponent(s.default).HideSlot("body_front"), cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + e + "/Star").getComponent(s.default).HideSlot("body_front")
                }), cc.delayTime(.5), cc.callFunc(function () {
                    a.self.playaudio("the stars r dripping");
                    for (var e = 1; e &lt;= 3; e++) cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + e).getComponent(cc.Animation).play("StarSwingIdle"), cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + e).getComponent(cc.Animation).play("StarSwingIdle")
                }), cc.delayTime(4), cc.callFunc(function () {
                    a.self.showMagicPanda()
                }), cc.delayTime(3), cc.callFunc(function () {
                    a.self.playaudio("use a hair dryer"), a.self.MagicPanda.getComponent(s.default).PlayAnimation("talk", -1)
                }), cc.delayTime(4), cc.callFunc(function () {
                    a.self.MagicPanda.getComponent(s.default).PlayAnimation("newAnimation", 1), a.self.playaudio("mgic brush comes to help")
                }), cc.delayTime(2), cc.callFunc(function () {
                    a.self.MagicPanda.getComponent(s.default).playIdleAnimation(), a.self.SelectedDrawing = l.DRYER, a.self.openDrawing(), a.self.node.runAction(cc.sequence(cc.delayTime(1), cc.callFunc(function () {
                        a.self.MagicPanda.active = !1
                    })))
                })))
            }, n.prototype.checkAllStarDry = function () {
                for (var e = !1, n = 1; n &lt;= 3; n++)
                    if (0 != cc.find("Canvas/StarDry/L2FlowerRope2/L2FlowerSwing" + n).getChildByName("waterOnStar").opacity || 0 != cc.find("Canvas/StarDry/L2FlowerRope1/L2FlowerSwing" + n).getChildByName("waterOnStar").opacity) {
                        e = !0;
                        break
                    }
                e || (a.self.stopAudio("HaiDryerOn"), a.self.unschedule(a.self.showMapAfterStarView), a.self.scheduleOnce(a.self.showMapAfterStarView, 1))
            }, n.prototype.showMapAfterStarView = function () {
                f.default.self.requestAds(), a.self.node.runAction(cc.sequence(cc.delayTime(.2), cc.callFunc(function () {
                    cc.find("Canvas/StarView").active = !1, cc.find("Canvas/StarDry").active = !1;
                    for (var e = 1; e &lt;= 6; e++) cc.find("Canvas/main/Level2/Complete/Star" + e).getComponent(s.default).HideSlot("body_front");
                    cc.find("Canvas/main/Level2/hamster_ske").active = !1, cc.find("Canvas/main/Level2/L2Thinking").active = !1, cc.find("Canvas/main/Level2/L1_HelpSymbol").active = !1, cc.find("Canvas/main/Level2/Complete").active = !0, a.self.L2HamsterComplete.getComponent(s.default).PlayAnimation("happy", 1), a.self.playaudio("StarHappy"), a.self.playaudio("starParticle"), cc.find("Canvas/main/Level2/Complete/GlitterOnce").getComponent(cc.ParticleSystem).resetSystem()
                }), cc.delayTime(1.5), cc.callFunc(function () {
                    a.self.playaudio("the star light a ready"), a.self.L2HamsterComplete.getComponent(s.default).PlayAnimation("talk", -1)
                }), cc.delayTime(5), cc.callFunc(function () {
                    a.self.playaudio("muamua thank u")
                }), cc.delayTime(6.5), cc.callFunc(function () {
                    a.self.L2HamsterComplete.getComponent(s.default).playIdleAnimation(), a.self.PandaSkel.getComponent(s.default).PlayAnimation("talk", -1), a.self.playaudio("haha u r wlcm")
                }), cc.delayTime(2.2), cc.callFunc(function () {
                    a.self.playaudio("Star C u")
                }), cc.delayTime(1), cc.callFunc(function () {
                    a.self.PandaSkel.getComponent(s.default).playIdleAnimation(), a.self.Panda.runAction(cc.moveBy(1, cc.v2(350, -100)))
                }), cc.delayTime(1), cc.callFunc(function () {
                    sessionStorage.setItem("Level", "3"), a.self.WhichLevel = 3, a.self.WhichLevelSub = 1, a.self.showNextIndication()
                })))
            }, n.prototype.showSantaView1 = function () {
                a.self.isValidForMove = !1, a.self.isMapMove = !1, a.self.hideNextIndication(), cc.find("Canvas/Santa1").active = !0, cc.find("Canvas/Santa1").opacity = 0, f.default.self.requestAds(), cc.find("Canvas/Santa1").runAction(cc.sequence(cc.delayTime(.5), cc.fadeIn(1))), a.self.node.runAction(cc.sequence(cc.delayTime(1.5), cc.callFunc(function () {
                    cc.find("Canvas/main/Level3/santa-pop-up").stopAllActions(), cc.find("Canvas/main/Level3/santa-pop-up").active = !1, a.self.playaudio("the christmas tree is still")
                }), cc.delayTime(6), cc.callFunc(function () {
                    a.self.showMagicPanda()
                }), cc.delayTime(2), cc.callFunc(function () {
                    a.self.playaudio("let me draw a big sun"), a.self.MagicPanda.getComponent(s.default).PlayAnimation("talk", -1)
                }), cc.delayTime(2.5), cc.callFunc(function () {
                    a.self.MagicPanda.getComponent(s.default).PlayAnimation("newAnimation", 1), a.self.playaudio("mgic brush comes to help")
                }), cc.delayTime(2.5), cc.callFunc(function () {
                    a.self.MagicPanda.getComponent(s.default).playIdleAnimation(), a.self.SelectedDrawing = l.STAR, a.self.openDrawing(), a.self.MagicPanda.active = !1
                })))
            }, n.prototype.fireSunChild = function () {
                cc.find("Canvas/Santa1/Sun").zIndex = 2;
                var e = [];
                e.push(cc.v3(6, -23, 0)), e.push(cc.v3(-122, -48, 0)), e.push(cc.v3(128, -47, 0)), e.push(cc.v3(-117, -138, 0)), e.push(cc.v3(-72, -194, 0)), e.push(cc.v3(113, -178, 0));
                for (var n = function (n) {
                    var t = cc.instantiate(cc.find("Canvas/Santa1/SunChild"));
                    t.position = cc.v3(253, -21, 0), t.name = "SunChildRun", cc.find("Canvas/Santa1").addChild(t), t.runAction(cc.sequence(cc.delayTime(.1 * n), cc.jumpTo(1, e[n - 1], 50, 1), cc.callFunc(function () {
                        1 == n &amp;&amp; 255 == cc.find("Canvas/Santa1/BG").opacity ? (cc.find("Canvas/Santa1/BG").opacity = 254, a.self.showHInt("HintSanta1")) : t.runAction(cc.repeatForever(cc.sequence(cc.delayTime(a.self.getRandomInt(2, 5)), cc.jumpTo(.5, cc.v2(a.self.getRandomInt(-50, 50), a.self.getRandomInt(-50, -200)), 20, 1), cc.jumpTo(.5, e[n - 1], 50, 1))))
                    })))
                }, t = 1; t &lt;= 6; t++) n(t)
            }, n.prototype.checkAllSunChildDone = function () {
                var e = !1,
                    n = 0;
                cc.find("Canvas/Santa1").children.forEach(function (a) {
                    "SunChildRun" == a.name &amp;&amp; (n++, 253 != a.opacity &amp;&amp; (e = !0))
                }), !e &amp;&amp; n &gt;= 12 &amp;&amp; (cc.find("Canvas/Santa1/GlitterOnce").getComponent(cc.ParticleSystem).resetSystem(), a.self.node.runAction(cc.sequence(cc.delayTime(2), cc.callFunc(function () {
                    a.self.playaudio("the chrsms tree also")
                }), cc.delayTime(4), cc.callFunc(function () {
                    a.self.showMagicPanda()
                }), cc.delayTime(3), cc.callFunc(function () {
                    a.self.playaudio("draw a ltl cloud"), a.self.MagicPanda.getComponent(s.default).PlayAnimation("talk", -1)
                }), cc.delayTime(3.5), cc.callFunc(function () {
                    a.self.MagicPanda.getComponent(s.default).PlayAnimation("newAnimation", 1), a.self.playaudio("mgic brush comes to help")
                }), cc.delayTime(2), cc.callFunc(function () {
                    a.self.MagicPanda.getComponent(s.default).playIdleAnimation(), a.self.SelectedDrawing = l.CLOUD, a.self.WhichLevelSub = 2, a.self.openDrawing(), a.self.MagicPanda.active = !1
                }))))
            }, n.prototype.startGiftView = function () {
                a.self.isValidForMove = !1, a.self.isMapMove = !1, a.self.hideNextIndication(), cc.find("Canvas/Santa1").runAction(cc.spawn(cc.scaleTo(.5, 1.6), cc.moveTo(.5, cc.v2(126, 116)))), a.self.node.runAction(cc.sequence(cc.delayTime(1), cc.callFunc(function () {
                    a.self.playaudio("wow the gift have grown")
                }), cc.delayTime(5), cc.callFunc(function () {
                    a.self.showMagicPanda()
                }), cc.delayTime(3), cc.callFunc(function () {
                    a.self.playaudio("let me draw a gift box"), a.self.MagicPanda.getComponent(s.default).PlayAnimation("talk", -1)
                }), cc.delayTime(2.5), cc.callFunc(function () {
                    a.self.MagicPanda.getComponent(s.default).PlayAnimation("newAnimation", 1), a.self.playaudio("mgic brush comes to help")
                }), cc.delayTime(2), cc.callFunc(function () {
                    a.self.WhichLevelSub = 3, a.self.SelectedDrawing = l.GIFTBOX, a.self.openDrawing(), a.self.MagicPanda.active = !1
                })))
            }, n.prototype.showSantaFlyView = function () {
                f.default.self.requestAds(), 255 == cc.find("Canvas/Santa1/SantaFly").opacity &amp;&amp; (cc.find("Canvas/Santa1/SantaFly").opacity = 254, a.self.node.runAction(cc.sequence(cc.delayTime(.2), cc.callFunc(function () {
                    cc.find("Canvas/Santa1").setScale(1), cc.find("Canvas/Santa1").setPosition(cc.v2(0, 0)), cc.find("Canvas/Santa1/SantaFly").active = !0
                }), cc.delayTime(1), cc.callFunc(function () {
                    a.self.playaudio("santaFly"), cc.find("Canvas/Santa1/SantaFly").getComponent(cc.Animation).play()
                }), cc.delayTime(3), cc.callFunc(function () {
                    cc.find("Canvas/Santa1/SantaFly/SantaBike/rendeer_ske").getComponent(s.default).PlayAnimation("run", 2), cc.find("Canvas/btn_takeright").active = !0, cc.find("Canvas/btn_takeright").runAction(cc.repeatForever(cc.sequence(cc.scaleTo(.5, 1.1), cc.scaleTo(.5, 1))))
                }))))
            }, n.prototype.showHInt = function (e) {
                cc.find("Canvas/Hint").getComponent(cc.Animation).play(e)
            }, n.prototype.hideHInt = function () {
                cc.find("Canvas/Hint").getComponent(cc.Animation).stop(), cc.find("Canvas/Hint").setPosition(cc.v2(1e4, 1))
            }, n.prototype.openDrawing = function () {
                this.AllDrawingNode.forEach(function (e) {
                    e.active = !1
                }), this.CurrentStep = 0, this.ParentDrawNode = this.AllDrawingNode[this.SelectedDrawing], this.ParentDrawNode.active = !0, a.self.DrawingNodes.splice(0, a.self.DrawingNodes.length), a.self.ColorNodes.splice(0, a.self.ColorNodes.length), a.self.StepNodes.splice(0, a.self.StepNodes.length), this.ParentDrawNode.children.forEach(function (e) {
                    a.self.StepNodes.push(e), a.self.StepNodes.length &gt; 1 ? e.active = !1 : e.active = !0;
                    var n = e.getChildByName("Color");
                    e.getChildByName("Mask").getComponent(cc.Mask).spriteFrame = n.getComponent(cc.Sprite).spriteFrame;
                    var t = e.getChildByName("Mask").getChildByName("Drawing");
                    t.setContentSize(n.getContentSize()), e.getChildByName("Mask").setContentSize(t.getContentSize()), t.setPosition(cc.Vec3.ZERO), a.self.DrawingNodes.push(t), a.self.ColorNodes.push(n)
                }), a.self.DrawingObj.ChangeDrawNode(a.self.DrawingNodes[a.self.CurrentStep]), a.self.DrawingObj.LoadVerifyTexture(a.self.ColorNodes[a.self.CurrentStep].getComponent(cc.Sprite)), this.ColorSelectionEffect("1"), cc.find("Canvas/Drawing").setScale(0), cc.find("Canvas/Drawing").active = !0, cc.find("Canvas/Drawing/Pen").setPosition(cc.v2(1600, -165)), f.default.self.requestAds(), cc.find("Canvas/Drawing").runAction(cc.sequence(cc.delayTime(.5), cc.scaleTo(.5, 1), cc.callFunc(function () {
                    switch (a.self.SelectedDrawing) {
                        case l.BALLOON2:
                            a.self.playaudio("balloon");
                            break;
                        case l.BALLOON:
                            a.self.playaudio("air balloon");
                            break;
                        case l.JUG:
                            a.self.playaudio("cadle");
                            break;
                        case l.DRYER:
                            a.self.playaudio("hair dryer");
                            break;
                        case l.CLOUD:
                            a.self.playaudio("Cloud");
                            break;
                        case l.GIFTBOX:
                            a.self.playaudio("GiftBox");
                            break;
                        case l.STAR:
                            a.self.playaudio("Sun")
                    }
                }), cc.delayTime(1.5), cc.callFunc(function () {
                    a.self.playaudio("dear frnd can drawing")
                }), cc.delayTime(2), cc.callFunc(function () {
                    cc.find("Canvas/Drawing/Pen").runAction(cc.sequence(cc.moveTo(.5, cc.v2(156, -165)), cc.callFunc(function () {
                        a.self.isDrawingEnable = !0
                    })))
                })))
            }, n.prototype.closeDrawing = function () {
                f.default.self.requestAds(), cc.find("Canvas/Drawing").active = !1, this.isDrawingEnable = !1
            }, n.prototype.ColorAction = function (e) {
                var n = parseInt(e.target.name);
                n &gt;= 5 ? "true" == sessionStorage.getItem("ColorWatchAd" + n) ? (this.ColorSelectionEffect(e.target.name), this.DrawingObj.ChangeColor(parseInt(e.target.name) - 1)) : (this.WatchAdFor = n, f.default.self.requestRewardAds()) : (this.ColorSelectionEffect(e.target.name), this.DrawingObj.ChangeColor(parseInt(e.target.name) - 1))
            }, n.prototype.ColorSelectionEffect = function (e) {
                cc.find("Canvas/Drawing/Panel").children.forEach(function (e) {
                    e.children[0].active = !1, e.getComponent(cc.Button).interactable = !0
                });
                var n = cc.find("Canvas/Drawing/Panel/" + e);
                n.getComponent(cc.Button).interactable = !1, n.children[0].active = !0, 1 == parseInt(e) ? this.DrawingObj.isMultiColorOn = !0 : 2 == parseInt(e) ? a.self.playaudio("red") : 3 == parseInt(e) ? a.self.playaudio("yellow") : 4 == parseInt(e) ? a.self.playaudio("green") : 5 == parseInt(e) ? a.self.playaudio("blue") : 6 == parseInt(e) &amp;&amp; a.self.playaudio("purple")
            }, n.prototype.InitAction = function () {
                this.AllDrawingNode[l.GIFTBOX] = cc.find("Canvas/Drawing/GiftBox"), this.AllDrawingNode[l.CLOUD] = cc.find("Canvas/Drawing/Cloud"), this.AllDrawingNode[l.DRYER] = cc.find("Canvas/Drawing/Dryer"), this.AllDrawingNode[l.JUG] = cc.find("Canvas/Drawing/Jug"), this.AllDrawingNode[l.BALLOON] = cc.find("Canvas/Drawing/Balloon"), this.AllDrawingNode[l.BALLOON2] = cc.find("Canvas/Drawing/Balloon2"), this.AllDrawingNode[l.STAR] = cc.find("Canvas/Drawing/Star"), this.AllDrawingNode.forEach(function (e) {
                    e.active = !1
                })
            }, n.prototype.DoneBTN = function () {
                a.self.playaudio("TapSound"), cc.find("Canvas/logo").active = !1, cc.find("Canvas/more").active = !1, cc.find("Canvas/btn_takeright").active = !1, cc.find("Canvas/promotion").setPosition(cc.v2(0, 0))
            }, n.prototype.ShowRewardFailPouup = function () {
                cc.find("Canvas/RewardFailP").active = !0
            }, n.prototype.RewardFailCloseBTN = function () {
                a.self.playaudio("TapSound"), cc.find("Canvas/RewardFailP").active = !1
            }, a = o([u], n)
        }(cc.Component);
        a.default = p, cc._RF.pop()
    }, {
        "./Character": "Character",
        "./Drawing": "Drawing",
        "./Promotion": "Promotion"
    }],
    Promotion: [function (e, n, a) {
        "use strict";
        cc._RF.push(n, "7cd78MqVEVMNIYZBnI41Va4", "Promotion");
        var t, c = this &amp;&amp; this.__extends || (t = function (e, n) {
            return (t = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (e, n) {
                    e.__proto__ = n
                } || function (e, n) {
                    for (var a in n) n.hasOwnProperty(a) &amp;&amp; (e[a] = n[a])
                })(e, n)
        }, function (e, n) {
            function a() {
                this.constructor = e
            }
            t(e, n), e.prototype = null === n ? Object.create(n) : (a.prototype = n.prototype, new a)
        }),
            o = this &amp;&amp; this.__decorate || function (e, n, a, t) {
                var c, o = arguments.length,
                    i = o &lt; 3 ? n : null === t ? t = Object.getOwnPropertyDescriptor(n, a) : t;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) i = Reflect.decorate(e, n, a, t);
                else
                    for (var l = e.length - 1; l &gt;= 0; l--)(c = e[l]) &amp;&amp; (i = (o &lt; 3 ? c(i) : o &gt; 3 ? c(n, a, i) : c(n, a)) || i);
                return o &gt; 3 &amp;&amp; i &amp;&amp; Object.defineProperty(n, a, i), i
            };
        Object.defineProperty(a, "__esModule", {
            value: !0
        });
        var i = cc._decorator,
            l = i.ccclass,
            s = (i.property, e("./Map")),
            r = function (e) {
                function n() {
                    var n = null !== e &amp;&amp; e.apply(this, arguments) || this;
                    return n.isAdRunnning = !1, n.isSwitchTab = !1, n
                }
                var a;
                return c(n, e), a = n, n.prototype.start = function () {
                    a.self = this;
                    var e = this;
                    "promoBack" == e.node.name &amp;&amp; this.setPromoThumb();
                    var n = "game";
                    "MainScene" == cc.director.getScene().name &amp;&amp; (n = "mainscreen"), this.node.on(cc.Node.EventType.TOUCH_START, function () {
                        "promoBack" == e.node.name ? 255 == e.node.parent.opacity &amp;&amp; window.adsGameCon.moreGame() : cc.find("Canvas/promotion") &amp;&amp; 255 == cc.find("Canvas/promotion").opacity &amp;&amp; 0 == cc.find("Canvas/promotion").position.x &amp;&amp; 0 == cc.find("Canvas/promotion").position.y ? window.adsGameCon.moreGame() : window.adsGameCon.moreGame()
                    }), cc.game.on(cc.game.EVENT_SHOW, this.gameResume, !1), cc.game.on(cc.game.EVENT_HIDE, this.gamePause, !1), this.node.on("onRewardAdSuccess", function () {
                        sessionStorage.setItem("ColorWatchAd" + s.default.self.WatchAdFor, "true"), cc.find("Canvas/Drawing/Panel/" + s.default.self.WatchAdFor).getChildByName("WatchAd").active = !1, s.default.self.WatchAdFor = -1
                    })
                }, n.prototype.playSound = function (e) {
                    cc.loader.loadRes(e, cc.AudioClip, function (e, n) {
                        cc.audioEngine.playEffect(n, !1)
                    })
                }, n.prototype.onReplayClick = function (e) {
                    e.target.getComponent(cc.Button).interactable = !1, a.self.requestAds(), cc.sys.localStorage.setItem("SelectedView", "1");
                    for (var n = 0; n &lt; 7; n++) sessionStorage.setItem("ColorWatchAd" + n, "false");
                    a.self.node.runAction(cc.sequence(cc.delayTime(.6), cc.callFunc(function () {
                        cc.director.loadScene("Map")
                    })))
                }, n.prototype.setPromoThumb = function () {

                }, n.prototype.requestAds = function () {
                    window.adsGameCon.showAd({
                        beforeShowAd: () =&gt; {
                            a.self.isAdRunnning = !0, a.self.MuteSound(), cc.game.pause()
                        },
                        afterShowAd: () =&gt; {
                            a.self.onAdComplete()
                        }
                    })
                }, n.prototype.requestRewardAds = function () {
                    window.adsGameCon.showAdOfEvent({
                        beforeShowAd: () =&gt; {
                            a.self.isAdRunnning = !0, a.self.MuteSound(), cc.game.pause()
                        },
                        afterShowAd: () =&gt; {
                            a.self.onAdComplete()
                            a.self.node.dispatchEvent(new cc.Event("onRewardAdSuccess", !0))
                        }
                    })

                }, n.prototype.gameResume = function () {
                    console.log("Resume Game"), a.self.isSwitchTab = !1, a.self.isAdRunnning ? (cc.game.pause(), a.self.MuteSound()) : (cc.game.resume(), a.self.StartSound())
                }, n.prototype.gamePause = function () {
                    console.log("Pause Game"), cc.game.pause(), a.self.isSwitchTab = !0, a.self.MuteSound()
                }, n.prototype.MuteSound = function () {
                    document.getElementById("bgsound") &amp;&amp; (document.getElementById("bgsound").muted = !0), cc.find("Canvas/SoundNode") &amp;&amp; cc.find("Canvas/SoundNode").children.forEach(function (e) {
                        e.getComponent(cc.AudioSource) &amp;&amp; (e.getComponent(cc.AudioSource).mute = !0)
                    })
                }, n.prototype.StartSound = function () {
                    a.self.isSwitchTab || (document.getElementById("bgsound") &amp;&amp; (document.getElementById("bgsound").muted = !1), cc.find("Canvas/SoundNode") &amp;&amp; cc.find("Canvas/SoundNode").children.forEach(function (e) {
                        e.getComponent(cc.AudioSource) &amp;&amp; e.getComponent(cc.AudioSource).mute &amp;&amp; (e.getComponent(cc.AudioSource).mute = !1)
                    }))
                }, n.prototype.onAdComplete = function () {
                    a.self.isAdRunnning = !1, 0 == a.self.isSwitchTab &amp;&amp; a.self.gameResume(), console.log("onSuccessCallback")
                }, n.getRandomInt = function (e, n) {
                    return e = Math.ceil(e), n = Math.floor(n) + 1, Math.floor(Math.random() * (n - e)) + e
                }, n.getRandomArbitrary = function (e, n) {
                    return Math.random() * (n - e) + e
                }, n.setFrame = function (e, n) {
                    e &amp;&amp; n &amp;&amp; (e.getComponent(cc.Sprite).spriteFrame = n.getComponent(cc.Sprite).spriteFrame)
                }, n.self = null, a = o([l], n)
            }(cc.Component);
        a.default = r, cc._RF.pop()
    }, {
        "./Map": "Map"
    }],
    Splash: [function (e, n, a) {
        "use strict";
        cc._RF.push(n, "c6bf7WCiyhLBp1EjaRYWXtR", "Splash");
        var t, c = this &amp;&amp; this.__extends || (t = function (e, n) {
            return (t = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (e, n) {
                    e.__proto__ = n
                } || function (e, n) {
                    for (var a in n) n.hasOwnProperty(a) &amp;&amp; (e[a] = n[a])
                })(e, n)
        }, function (e, n) {
            function a() {
                this.constructor = e
            }
            t(e, n), e.prototype = null === n ? Object.create(n) : (a.prototype = n.prototype, new a)
        }),
            o = this &amp;&amp; this.__decorate || function (e, n, a, t) {
                var c, o = arguments.length,
                    i = o &lt; 3 ? n : null === t ? t = Object.getOwnPropertyDescriptor(n, a) : t;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) i = Reflect.decorate(e, n, a, t);
                else
                    for (var l = e.length - 1; l &gt;= 0; l--)(c = e[l]) &amp;&amp; (i = (o &lt; 3 ? c(i) : o &gt; 3 ? c(n, a, i) : c(n, a)) || i);
                return o &gt; 3 &amp;&amp; i &amp;&amp; Object.defineProperty(n, a, i), i
            };
        Object.defineProperty(a, "__esModule", {
            value: !0
        });
        var i = cc._decorator,
            l = i.ccclass,
            s = i.property,
            r = function (e) {
                function n() {
                    var n = null !== e &amp;&amp; e.apply(this, arguments) || this;
                    return n.bgsoundElement = null, n.isPortrait = !0, n.logo = null, n
                }
                var a;
                return c(n, e), a = n, n.prototype.onLoad = function () {
                    cc.debug.setDisplayStats(!1), a.self = this, this.bgsoundElement = document.createElement("AUDIO"), this.bgsoundElement.id = "bgsound", this.bgsoundElement.loop = !0, this.bgsoundElement.setAttribute("src", cc.find("Canvas/music").getComponent(cc.AudioSource).clip.url)
                }, n.prototype.start = function () {
                    cc.director.preloadScene("Map");
                    var e = this;
                    cc.view.on("canvas-resize", function () {
                        e.updateLogo(cc.view.getFrameSize())
                    }), this.updateLogo(cc.view.getFrameSize())
                }, n.prototype.updateLogo = function (e) {
                    cc.sys.isMobile ? this.isPortrait ? e.width &lt; e.height ? (console.log("landscape"), this.logo.scale = 1, this.logo.position = cc.v3(0, 0, 0)) : (console.log("portrait"), this.logo.scale = 1.7, this.logo.position = cc.v3(0, 70, 0)) : e.width &gt; e.height ? (console.log("landscape"), this.logo.scale = 1, this.logo.position = cc.v3(0, 0, 0)) : (console.log("portrait"), this.logo.scale = 1.7, this.logo.position = cc.v3(0, 70, 0)) : (this.logo.scale = .65, this.logo.position = cc.v3(0, 0, 0)), console.log(this.logo.scale)
                }, n.prototype.PlayAction = function (e) {
                    document.body.appendChild(this.bgsoundElement);
                    var n = e.target;
                    n &amp;&amp; (n.getComponent(cc.Button).interactable = !1), document.getElementById("bgsound") &amp;&amp; document.getElementById("bgsound").play(), cc.director.loadScene("MainScene")
                }, n.prototype.OpenUrl = function () {
                    window.adsGameCon.moreGame();
                }, n.prototype.PlaySound = function (e) {
                    cc.find("Canvas/SoundNode/" + e) &amp;&amp; cc.find("Canvas/SoundNode/" + e).getComponent(cc.AudioSource).play()
                }, n.self = null, o([s], n.prototype, "isPortrait", void 0), o([s(cc.Node)], n.prototype, "logo", void 0), a = o([l], n)
            }(cc.Component);
        a.default = r, cc._RF.pop()
    }, {}]
}, {}, ["Character", "Drawing", "MainScene", "Map", "Promotion", "Splash"]);
initAdsGame("GameCanvas","aotagefzki0v1z8btrbsonxghcrn2pbp");</pre></body></html>