<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">window.__require = function t(e, o, i) {
    function n(r, c) {
        if (!o[r]) {
            if (!e[r]) {
                var s = r.split("/");
                if (s = s[s.length - 1], !e[s]) {
                    var l = "function" == typeof __require &amp;&amp; __require;
                    if (!c &amp;&amp; l) return l(s, !0);
                    if (a) return a(s, !0);
                    throw new Error("Cannot find module '" + r + "'")
                }
                r = s
            }
            var h = o[r] = {
                exports: {}
            };
            e[r][0].call(h.exports, function (t) {
                return n(e[r][1][t] || t)
            }, h, h.exports, t, e, o, i)
        }
        return o[r].exports
    }
    for (var a = "function" == typeof __require &amp;&amp; __require, r = 0; r &lt; i.length; r++) n(i[r]);
    return n
}({
    AdManager: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "ac37fS7uu9NlLwL6Lj5VLtW", "AdManager");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var s = t("../Helper/CocosHelper"),
            l = t("../Helper/SessionStorageHelper"),
            h = cc._decorator,
            d = h.ccclass,
            p = (h.property, function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.isSwitchTab = !1, e
                }
                var o;
                return n(e, t), o = e, e.getInstance = function () {
                    return o.instance || (o.instance = new o), o.instance
                }, e.prototype.requestAds = function () {
                    var t = this;
                    window.adsGameCon.showAd({
                        beforeShowAd: () =&gt; {
                            o.isAdRunnning = !0, t.MuteSound(), cc.game.pause()
                        },
                        afterShowAd: () =&gt; {
                            t.onAdComplete()
                        }
                    })
                }, e.prototype.isAdRunningOrNot = function () {
                    return o.isAdRunnning
                }, e.prototype.requestRewardAds = function (t) {
                    return r(this, void 0, void 0, function () {
                        var e = this;
                        return c(this, function () {
                            return [2, new Promise(function (i) {
                                    var n = e;
                                    window.adsGameCon.showAdOfEvent({
                                        beforeShowAd: () =&gt; {
                                            o.isAdRunnning = !0, n.MuteSound(), cc.game.pause()
                                        },
                                        afterShowAd: () =&gt; {
                                            n.onAdComplete()
                                            if (t) {
                                                var e = t.name;
                                                l.default.getInstace().setItem(e, "true"), o.AdString.push(e), t.removeFromParent()
                                            }
                                            i(!0)
                                        }
                                    })
                            })]
                        })
                    })
                }, e.prototype.onAdComplete = function () {
                    o.isAdRunnning = !1, 0 == o.getInstance().isSwitchTab &amp;&amp; s.default.getInstance().gameResume()
                }, e.prototype.MuteSound = function () {
                    cc.audioEngine.pauseMusic(), cc.audioEngine.pauseAllEffects()
                }, e.prototype.StartSound = function () {
                    o.getInstance().isSwitchTab || (cc.audioEngine.resumeMusic(), cc.audioEngine.resumeAllEffects())
                }, e.isAdRunnning = !1, e.AdString = [], o = a([d], e)
            }(cc.Component));
        o.default = p, cc._RF.pop()
    }, {
        "../Helper/CocosHelper": "CocosHelper",
        "../Helper/SessionStorageHelper": "SessionStorageHelper"
    }],
    AudioManager: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "01e24rMIL5Iw7+Axy3d/ibd", "AudioManager");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var r = t("../Promotion/AdManager"),
            c = t("./CocosHelper"),
            s = cc._decorator.ccclass,
            l = function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.audioClipList = new Map, e.audioPlayingList = [], e.VocalPlayingList = [], e.isMute = !1, e.volume = 1, e
                }
                var o;
                return n(e, t), o = e, e.getInstance = function () {
                    return o.instance || (o.instance = new o, o.instance.init()), o.instance
                }, e.prototype.init = function () {
                    this.schedule(this.garbageCollector, 30, 1 / 0, 0);
                    var t = this;
                    cc.loader.loadResDir("Sound", function (e, o) {
                        for (var i = 0; i &lt; o.length; i++) o[i] instanceof cc.AudioClip &amp;&amp; t.add(o[i].name, o[i]);
                        console.log("Loaded All Sounds")
                    })
                }, e.prototype.add = function (t, e) {
                    this.audioClipList.has(t) || this.audioClipList.set(t, e)
                }, e.prototype.addAll = function (t) {
                    for (var e = "", o = 0, i = t; o &lt; i.length; o++) {
                        var n = i[o];
                        e = n.name, this.audioClipList.has(e) || this.audioClipList.set(e, n)
                    }
                }, e.prototype.get = function (t) {
                    var e = this.audioClipList.get(t);
                    if (e) return e
                }, e.prototype.remove = function (t) {
                    this.audioClipList.get(t) &amp;&amp; this.audioClipList.delete(t)
                }, e.prototype.removeAll = function () {
                    this.stopAll(), this.audioClipList.clear()
                }, e.prototype.play = function (t, e, o) {
                    if (void 0 === e &amp;&amp; (e = !1), void 0 === o &amp;&amp; (o = this.volume), !this.isMute &amp;&amp; 0 != cc.audioEngine.getEffectsVolume()) {
                        var i = this.audioClipList.get(t);
                        if (e &amp;&amp; this.stop(t), i) {
                            var n = cc.audioEngine.play(i, e, cc.audioEngine.getEffectsVolume()),
                                a = {
                                    audioId: n,
                                    audioName: t,
                                    audioVolume: 1
                                };
                            return this.audioPlayingList.push(a), cc.audioEngine.getDuration(n)
                        }
                    }
                }, e.prototype.playVocal = function (t) {
                    if (!this.isMute &amp;&amp; 0 != cc.audioEngine.getEffectsVolume()) {
                        var e = this.audioClipList.get(t);
                        if (this.stop(t), e) {
                            var o = cc.audioEngine.play(e, !1, cc.audioEngine.getEffectsVolume()),
                                i = {
                                    audioId: o,
                                    audioName: t,
                                    audioVolume: 1
                                };
                            return this.VocalPlayingList.push(i), cc.audioEngine.getDuration(o)
                        }
                    }
                }, e.prototype.playMusic = function (t, e) {
                    void 0 === e &amp;&amp; (e = !1);
                    var o = this.audioClipList.get(t);
                    o &amp;&amp; (cc.audioEngine.playMusic(o, e), (c.default.getInstance().isSwitchTab || r.default.getInstance().isAdRunningOrNot()) &amp;&amp; cc.audioEngine.pauseMusic())
                }, e.prototype.stop = function (t) {
                    for (var e = -1, o = "", i = 0, n = this.audioPlayingList; i &lt; n.length; i++) {
                        var a = n[i];
                        e = a.audioId, o = a.audioName, t.includes(o) &amp;&amp; cc.audioEngine.stop(e)
                    }
                }, e.prototype.stopAllVocal = function (t) {
                    for (var e = -1, o = "", i = 0, n = this.VocalPlayingList; i &lt; n.length; i++) {
                        var a = n[i];
                        e = a.audioId, o = a.audioName, t.includes(o) &amp;&amp; cc.audioEngine.stop(e)
                    }
                }, e.prototype.stopAll = function () {
                    cc.audioEngine.stopAllEffects(), this.audioPlayingList = []
                }, e.prototype.pause = function (t) {
                    for (var e = -1, o = 0, i = this.audioPlayingList; o &lt; i.length; o++) {
                        var n = i[o];
                        if (e = n.audioId, n.audioName === t &amp;&amp; cc.audioEngine.getState(e) === cc.audioEngine.AudioState.PLAYING) {
                            cc.audioEngine.pause(e);
                            break
                        }
                    }
                }, e.prototype.isPlaying = function (t) {
                    for (var e = -1, o = 0, i = this.audioPlayingList; o &lt; i.length; o++) {
                        var n = i[o];
                        if (e = n.audioId, n.audioName === t &amp;&amp; cc.audioEngine.getState(e) === cc.audioEngine.AudioState.PLAYING) return !0
                    }
                    return !1
                }, e.prototype.pauseAll = function () {
                    cc.audioEngine.pauseAll()
                }, e.prototype.resume = function (t) {
                    for (var e = -1, o = 0, i = this.audioPlayingList; o &lt; i.length; o++) {
                        var n = i[o];
                        if (e = n.audioId, n.audioName === t &amp;&amp; cc.audioEngine.getState(e) === cc.audioEngine.AudioState.PAUSED) {
                            cc.audioEngine.resume(e);
                            break
                        }
                    }
                }, e.prototype.isPause = function (t) {
                    for (var e = -1, o = 0, i = this.audioPlayingList; o &lt; i.length; o++) {
                        var n = i[o];
                        if (e = n.audioId, n.audioName === t &amp;&amp; cc.audioEngine.getState(e) === cc.audioEngine.AudioState.PAUSED) return !0
                    }
                    return !1
                }, e.prototype.resumeAll = function () {
                    cc.audioEngine.resumeAll()
                }, e.prototype.setVolume = function (t, e) {
                    for (var o = -1, i = 0, n = this.audioPlayingList; i &lt; n.length; i++) {
                        var a = n[i];
                        if (o = a.audioId, a.audioName === t) {
                            cc.audioEngine.setVolume(o, e), a.audioVolume = e;
                            break
                        }
                    }
                }, e.prototype.setAllVolume = function (t) {
                    for (var e = -1, o = 0, i = this.audioPlayingList; o &lt; i.length; o++) {
                        var n = i[o];
                        e = n.audioId, cc.audioEngine.setVolume(e, t), n.audioVolume = t
                    }
                }, e.prototype.mute = function () {
                    this.setAllMute(0), this.isMute = !0
                }, e.prototype.unMute = function () {
                    this.setAllMute(1), this.isMute = !1
                }, e.prototype.setAllMute = function (t) {
                    for (var e = -1, o = 0, i = this.audioPlayingList; o &lt; i.length; o++) e = i[o].audioId, cc.audioEngine.setVolume(e, t)
                }, e.prototype.garbageCollector = function () {
                    for (var t = null, e = this.audioPlayingList.length - 1; e &gt;= 0; e--) switch (t = this.audioPlayingList[e], cc.audioEngine.getState(t.audioId)) {
                        case cc.audioEngine.AudioState.STOPPED:
                        case cc.audioEngine.AudioState.ERROR:
                            this.audioPlayingList.splice(e, 1)
                    }
                }, o = a([s], e)
            }(cc.Component);
        o.default = l, cc._RF.pop()
    }, {
        "../Promotion/AdManager": "AdManager",
        "./CocosHelper": "CocosHelper"
    }],
    "BathRoomStarting ": [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "b939cfNo1hHtLjWCwI1jY/N", "BathRoomStarting ");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var r = t("../../../../Scripts/Helper/AudioManager"),
            c = cc._decorator,
            s = c.ccclass,
            l = (c.property, function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.Girl = null, e
                }
                return n(e, t), e.prototype.onLoad = function () {
                    cc.game.on("StartStory", this.StartView, this), this.Girl = cc.find("SafeArea/Girl", this.node), r.default.getInstance().add("ohmybathroom", cc.find("SafeArea/Sound/ohmybathroom", this.node).getComponent(cc.AudioSource).clip)
                }, e.prototype.start = function () { }, e.prototype.StartView = function () {
                    var t = this;
                    this.node.children[0].active = !0, this.Girl.getComponent(cc.Animation).playAdditive("GardenStarting"), this.Girl.getComponent(cc.Animation).playAdditive("GardenStartingEye");
                    var e = r.default.getInstance().play("ohmybathroom");
                    cc.tween(this.node).delay(e).call(function () {
                        cc.find("SafeArea/NextButton", t.node).active = !0, t.Girl.getComponent(cc.Animation).stop("GardenStarting")
                    }).start()
                }, e.prototype.NextButton = function (t) {
                    var e = t.target;
                    r.default.getInstance().play("click"), e.getComponent(cc.Button).interactable = !1, this.node.children[0].active = !1, cc.game.emit("StartView")
                }, a([s], e)
            }(cc.Component));
        o.default = l, cc._RF.pop()
    }, {
        "../../../../Scripts/Helper/AudioManager": "AudioManager"
    }],
    BathRoom: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "11fddJCcdpNWLsbxlPG5ZD2", "BathRoom");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var s = t("../../../Scripts/Helper/AudioManager"),
            l = t("../../../Scripts/Helper/HelperTools"),
            h = t("../../../Scripts/Helper/ToolMoveMaster"),
            d = t("../../../Scripts/Promotion/AdManager"),
            p = cc._decorator,
            u = p.ccclass,
            f = p.property,
            y = function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.DustbinDirt = null, e.Dustbin = null, e.Tool5Dirt = null, e.Tool6Dirt = null, e.Tool7Dirt = null, e.Tool8Dirt = null, e.PlayareaTools = [], e.Btns = [], e.Hand = null, e
                }
                return n(e, t), e.prototype.onLoad = function () {
                    cc.find("Canvas/dustbin1/dustbin2").zIndex = 5, s.default.getInstance()
                }, e.prototype.start = function () {
                    return r(this, void 0, void 0, function () {
                        return c(this, function (t) {
                            switch (t.label) {
                                case 0:
                                    return cc.game.on("UpdateItems", this.UpdateItems, this), cc.game.on("StartView", this.StartView, this), this.Btns.forEach(function (t) {
                                        t.interactable = !1, t.node.getChildByName("Hand") &amp;&amp; (t.node.getChildByName("Hand").active = !1)
                                    }), [4, l.Delay(.3)];
                                case 1:
                                    return t.sent(), cc.game.emit("StartStory"), [2]
                            }
                        })
                    })
                }, e.prototype.StartView = function () {
                    this.ShowHandHint(this.DustbinDirt.children[0].position, this.Dustbin.position.addSelf(cc.v3(0, 40)), 1)
                }, e.prototype.BeganAction = function (t, e) {
                    if (0 == e) this.HideHint(), s.default.getInstance().play("click");
                    else if (1 == e) this.HideHint(), s.default.getInstance().play("click");
                    else if (5 == e) {
                        s.default.getInstance().play("click");
                        for (var o = 0; o &lt; this.Tool5Dirt.childrenCount; o++)
                            if (this.Tool5Dirt.children[o].opacity &gt;= 2) {
                                this.ShowArrow(this.Tool5Dirt.children[o].position);
                                break
                            }
                    } else if (6 == e) {
                        for (s.default.getInstance().play("click"), o = 0; o &lt; this.Tool6Dirt.childrenCount; o++)
                            if (this.Tool6Dirt.children[o].opacity &gt;= 2) {
                                this.ShowArrow(this.Tool6Dirt.children[o].position);
                                break
                            }
                    } else if (7 == e) {
                        for (o = 0; o &lt; this.Tool7Dirt.childrenCount; o++)
                            if (this.Tool7Dirt.children[o].opacity &gt;= 2) {
                                this.ShowArrow(this.Tool7Dirt.children[o].position);
                                break
                            }
                    } else if (8 == e) {
                        for (o = 0; o &lt; this.Tool8Dirt.childrenCount; o++)
                            if (255 != this.Tool8Dirt.children[o].children[0].opacity) {
                                this.ShowArrow(this.Tool8Dirt.children[o].position);
                                break
                            }
                    } else if (9 == e)
                        for (o = 0; o &lt; this.Tool8Dirt.childrenCount; o++)
                            if (this.Tool8Dirt.children[o].opacity &gt;= 2) {
                                this.ShowArrow(this.Tool8Dirt.children[o].position);
                                break
                            }
                }, e.prototype.MoveAction = function (t, e, o, i) {
                    var n = this;
                    5 == e ? this.Tool5Dirt.children.forEach(function (t) {
                        if (t.opacity &gt;= 2 &amp;&amp; t.getBoundingBoxToWorld().intersects(i.children[0].getBoundingBoxToWorld()) &amp;&amp; (t.opacity -= 2, 0 == s.default.getInstance().isPlaying("comb") &amp;&amp; s.default.getInstance().play("comb"), t.opacity &lt;= 50)) {
                            t.opacity = 0, n.HideArrow(), n.addParticle(t.position);
                            for (var e = 0; e &lt; n.Tool5Dirt.childrenCount; e++)
                                if (n.Tool5Dirt.children[e].opacity &gt;= 2) {
                                    n.ShowArrow(n.Tool5Dirt.children[e].position);
                                    break
                                }
                        }
                    }) : 6 == e ? this.Tool6Dirt.children.forEach(function (t) {
                        if (t.opacity &gt;= 2 &amp;&amp; t.getBoundingBoxToWorld().intersects(i.children[0].getBoundingBoxToWorld()) &amp;&amp; (t.opacity -= 2, 0 == s.default.getInstance().isPlaying("mop") &amp;&amp; s.default.getInstance().play("mop"), t.opacity &lt;= 50)) {
                            t.opacity = 0, n.HideArrow(), n.addParticle(t.position);
                            for (var e = 0; e &lt; n.Tool6Dirt.childrenCount; e++)
                                if (n.Tool6Dirt.children[e].opacity &gt;= 2) {
                                    n.ShowArrow(n.Tool6Dirt.children[e].position);
                                    break
                                }
                        }
                    }) : 7 == e ? this.Tool7Dirt.children.forEach(function (t) {
                        if (t.opacity &gt;= 2 &amp;&amp; t.getBoundingBoxToWorld().intersects(i.children[0].getBoundingBoxToWorld()) &amp;&amp; (t.opacity -= 2, 0 == s.default.getInstance().isPlaying("comb") &amp;&amp; s.default.getInstance().play("comb"), t.opacity &lt;= 50)) {
                            t.opacity = 0, n.HideArrow(), n.addParticle(t.position);
                            for (var e = 0; e &lt; n.Tool7Dirt.childrenCount; e++)
                                if (n.Tool7Dirt.children[e].opacity &gt;= 2) {
                                    n.ShowArrow(n.Tool7Dirt.children[e].position);
                                    break
                                }
                        }
                    }) : 8 == e ? this.Tool8Dirt.children.forEach(function (t) {
                        if (t.children[0].opacity &lt; 250 &amp;&amp; t.getBoundingBoxToWorld().intersects(i.children[0].getBoundingBoxToWorld()) &amp;&amp; (t.children[0].opacity += 5, t.children[0].opacity &gt;= 200)) {
                            t.children[0].opacity = 255, n.HideArrow(), s.default.getInstance().play("Sprey"), n.addParticle(t.position);
                            for (var e = 0; e &lt; n.Tool8Dirt.childrenCount; e++)
                                if (255 != n.Tool8Dirt.children[e].children[0].opacity) {
                                    n.ShowArrow(n.Tool8Dirt.children[e].position);
                                    break
                                }
                        }
                    }) : 9 == e &amp;&amp; this.Tool8Dirt.children.forEach(function (t) {
                        if (t.opacity &gt;= 2 &amp;&amp; t.getBoundingBoxToWorld().intersects(i.children[0].getBoundingBoxToWorld()) &amp;&amp; (t.opacity -= 2, t.opacity &lt;= 50)) {
                            t.opacity = 0, n.HideArrow(), 0 == s.default.getInstance().isPlaying("towel") &amp;&amp; s.default.getInstance().play("towel"), n.addParticle(t.position);
                            for (var e = 0; e &lt; n.Tool8Dirt.childrenCount; e++)
                                if (n.Tool8Dirt.children[e].opacity &gt;= 2) {
                                    n.ShowArrow(n.Tool8Dirt.children[e].position);
                                    break
                                }
                        }
                    })
                }, e.prototype.EndAction = function (t, e) {
                    if (0 == e || 1 == e) 0 == this.DustbinDirt.children[0].getComponent(h.default).ToolID ? this.ShowHandHint(this.DustbinDirt.children[0].position, this.Dustbin.position.addSelf(cc.v3(0, 40)), 1) : this.ShowHandHint(this.DustbinDirt.children[0].position, cc.find("Canvas/BTV_Panel_Bathroom").position, 1);
                    else if (5 == e) {
                        this.HideArrow();
                        var o = !0;
                        s.default.getInstance().stop("comb"), this.Tool5Dirt.children.forEach(function (t) {
                            t.opacity &gt; 0 &amp;&amp; (o = !1)
                        }), o &amp;&amp; (cc.tween(t).by(.5, {
                            position: cc.v3(-500, 0, 0)
                        }).set({
                            active: !1
                        }).start(), cc.tween(this.PlayareaTools[2]).delay(.2).to(.5, {
                            position: cc.v3(-332, -117, 0)
                        }).start(), this.PlayareaTools[2].getComponent(h.default).UpdatePosition(cc.v3(-332, -117, 0)))
                    } else if (6 == e) {
                        var i = !0;
                        s.default.getInstance().stop("mop"), this.HideArrow(), this.Tool6Dirt.children.forEach(function (t) {
                            t.opacity &gt; 0 &amp;&amp; (i = !1)
                        }), i &amp;&amp; (cc.tween(t).by(.5, {
                            position: cc.v3(-500, 0, 0)
                        }).set({
                            active: !1
                        }).start(), cc.tween(this.PlayareaTools[1]).delay(.2).to(.5, {
                            position: cc.v3(-332, -117, 0)
                        }).start(), this.PlayareaTools[1].getComponent(h.default).UpdatePosition(cc.v3(-332, -117, 0)))
                    } else if (7 == e) {
                        var n = !0;
                        s.default.getInstance().stop("comb"), this.HideArrow(), this.Tool7Dirt.children.forEach(function (t) {
                            t.opacity &gt; 0 &amp;&amp; (n = !1)
                        }), n &amp;&amp; (cc.tween(t).by(.5, {
                            position: cc.v3(-500, 0, 0)
                        }).set({
                            active: !1
                        }).start(), cc.tween(this.PlayareaTools[3]).delay(.2).to(.5, {
                            position: cc.v3(-332, -117, 0)
                        }).start(), this.PlayareaTools[3].getComponent(h.default).UpdatePosition(cc.v3(-332, -117, 0)))
                    } else if (8 == e) {
                        var a = !0;
                        s.default.getInstance().stop("Sprey"), this.HideArrow(), this.Tool8Dirt.children.forEach(function (t) {
                            255 != t.children[0].opacity &amp;&amp; (a = !1)
                        }), a &amp;&amp; (cc.tween(t).by(.5, {
                            position: cc.v3(-500, 0, 0)
                        }).set({
                            active: !1
                        }).start(), cc.tween(this.PlayareaTools[4]).delay(.2).to(.5, {
                            position: cc.v3(-332, -117, 0)
                        }).start(), this.PlayareaTools[4].getComponent(h.default).UpdatePosition(cc.v3(-332, -117, 0)))
                    } else if (9 == e) {
                        s.default.getInstance().stop("towel");
                        var r = !0;
                        this.HideArrow(), this.Tool8Dirt.children.forEach(function (t) {
                            t.opacity &gt; 0 &amp;&amp; (r = !1)
                        }), r &amp;&amp; (cc.tween(t).by(.5, {
                            position: cc.v3(-500, 0, 0)
                        }).set({
                            active: !1
                        }).start(), this.Btns.forEach(function (t) {
                            t.interactable = !0, t.node.getChildByName("Hand") &amp;&amp; (t.node.getChildByName("Hand").active = !0)
                        }))
                    }
                }, e.prototype.FixedAction = function (t, e, o, i) {
                    var n = this;
                    if (0 == e) {
                        i.active = !0;
                        var a = this.Dustbin.convertToNodeSpaceAR(cc.v3(o));
                        i.parent = this.Dustbin, i.position = a, cc.tween(i).to(.3, {
                            position: cc.v3(0, 100)
                        }).to(.5, {
                            position: cc.v3(0, 0)
                        }).call(function () {
                            s.default.getInstance().play("dustbin")
                        }).removeSelf().call(function () {
                            0 == n.DustbinDirt.childrenCount ? (cc.tween(n.Dustbin).by(.2, {
                                position: cc.v3(-300, 0, 0)
                            }).start(), cc.tween(n.PlayareaTools[0]).delay(.2).to(.5, {
                                position: cc.v3(-332, -117, 0)
                            }).start(), n.PlayareaTools[0].getComponent(h.default).UpdatePosition(cc.v3(-332, -117, 0))) : 0 == n.DustbinDirt.children[0].getComponent(h.default).ToolID ? n.ShowHandHint(n.DustbinDirt.children[0].position, n.Dustbin.position.addSelf(cc.v3(0, 40)), 1) : n.ShowHandHint(n.DustbinDirt.children[0].position, cc.find("Canvas/BTV_Panel_Bathroom").position, 1)
                        }).start()
                    } else 1 == e &amp;&amp; (s.default.getInstance().play("Pick and Drop"), t.removeFromParent(), 0 == this.DustbinDirt.childrenCount ? (cc.tween(this.Dustbin).by(.2, {
                        position: cc.v3(-300, 0, 0)
                    }).start(), s.default.getInstance().play("Entry Exit Sfx"), cc.tween(this.PlayareaTools[0]).delay(.2).to(.5, {
                        position: cc.v3(-332, -117, 0)
                    }).start(), this.PlayareaTools[0].getComponent(h.default).UpdatePosition(cc.v3(-332, -117, 0))) : 0 == this.DustbinDirt.children[0].getComponent(h.default).ToolID ? this.ShowHandHint(this.DustbinDirt.children[0].position, this.Dustbin.position.addSelf(cc.v3(0, 40)), 1) : this.ShowHandHint(this.DustbinDirt.children[0].position, cc.find("Canvas/BTV_Panel_Bathroom").position, 1))
                }, e.prototype.UpdateItems = function (t) {
                    0 == t ? cc.find("Canvas/BTV_Wall_Break_view").active = !1 : 1 == t ? (cc.find("Canvas/BTV_Mirror_Break_view/BTV_Mirror_Done").parent.getComponent(cc.Sprite).spriteFrame = cc.find("Canvas/BTV_Mirror_Break_view/BTV_Mirror_Done").getComponent(cc.Sprite).spriteFrame, cc.find("Canvas/BTV_Mirror_Break_view/BTV_Mirror_Done").opacity = 254) : 2 == t ? cc.find("Canvas/BTV_Toilet_view/BTV_Toilet_Dirt").active = !1 : 3 == t ? cc.find("Canvas/BTV_Basin_view/BTV_waterSink").active = !1 : 4 == t &amp;&amp; (cc.find("Canvas/BTV_Floor_Problem_view").active = !1), 0 == cc.find("Canvas/BTV_Wall_Break_view").active &amp;&amp; 254 == cc.find("Canvas/BTV_Mirror_Break_view/BTV_Mirror_Done").opacity &amp;&amp; 0 == cc.find("Canvas/BTV_Toilet_view/BTV_Toilet_Dirt").active &amp;&amp; 0 == cc.find("Canvas/BTV_Basin_view/BTV_waterSink").active &amp;&amp; 0 == cc.find("Canvas/BTV_Floor_Problem_view").active &amp;&amp; (cc.find("Canvas/Next").active = !0)
                }, e.prototype.addParticle = function (t) {
                    var e = cc.instantiate(cc.find("ToolComplete", this.node));
                    this.node.addChild(e), e.active = !0, e.position = t, s.default.getInstance().play("PARTICLE")
                }, e.prototype.OpenView = function (t) {
                    var e = t.target;
                    s.default.getInstance().play("Pick and Drop"), e.removeComponent(cc.Button), e.getChildByName("Hand") &amp;&amp; (e.getChildByName("Hand").active = !1), "BTV_Toilet_view" == e.name ? cc.find("Canvas/ToiletCleaning/SafeArea").active = !0 : "BTV_Wall_Break_view" == e.name ? cc.find("Canvas/WallRepairing/SafeArea").active = !0 : "BTV_Mirror_Break_view" == e.name ? cc.find("Canvas/MirrorRepairing/SafeArea").active = !0 : "BTV_Basin_view" == e.name ? cc.find("Canvas/WashBesinCleaning/SafeArea").active = !0 : "BTV_Floor_Problem_view" == e.name &amp;&amp; (cc.find("Canvas/TilesRepairing/SafeArea").active = !0)
                }, e.prototype.ShowHandHint = function (t, e, o, i) {
                    void 0 === o &amp;&amp; (o = 0), void 0 === i &amp;&amp; (i = !0), this.Hand.active = !0, this.Hand.opacity = 0;
                    var n = cc.v3(t.x + e.x / 2, t.y + e.y / 2 + 300),
                        a = cc.tween(this.Hand).delay(o).set({
                            position: t,
                            opacity: 255
                        }).bezierTo(2, cc.v2(t), cc.v2(n), cc.v2(e)).set({
                            opacity: 0
                        });
                    i ? cc.tween(this.Hand).repeatForever(a).start() : a.start()
                }, e.prototype.HideHint = function () {
                    cc.Tween.stopAllByTarget(this.Hand), this.Hand.active = !1
                }, e.prototype.ShowArrow = function (t) {
                    cc.find("Canvas/Arrow").active = !0, cc.find("Canvas/Arrow").position = cc.v3(t.x, t.y + 20)
                }, e.prototype.HideArrow = function () {
                    cc.find("Canvas/Arrow").active = !1
                }, e.prototype.NextAction = function (t) {
                    return r(this, void 0, void 0, function () {
                        return c(this, function (e) {
                            switch (e.label) {
                                case 0:
                                    return t.target.active = !1, s.default.getInstance().play("Pick and Drop"), d.default.getInstance().requestAds(), [4, l.Delay(.3)];
                                case 1:
                                    return e.sent(), cc.director.loadScene("LevelScene"), [2]
                            }
                        })
                    })
                }, a([f(cc.Node)], e.prototype, "DustbinDirt", void 0), a([f(cc.Node)], e.prototype, "Dustbin", void 0), a([f(cc.Node)], e.prototype, "Tool5Dirt", void 0), a([f(cc.Node)], e.prototype, "Tool6Dirt", void 0), a([f(cc.Node)], e.prototype, "Tool7Dirt", void 0), a([f(cc.Node)], e.prototype, "Tool8Dirt", void 0), a([f([cc.Node])], e.prototype, "PlayareaTools", void 0), a([f([cc.Button])], e.prototype, "Btns", void 0), a([f(cc.Node)], e.prototype, "Hand", void 0), a([u], e)
            }(cc.Component);
        o.default = y, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager",
        "../../../Scripts/Helper/HelperTools": "HelperTools",
        "../../../Scripts/Helper/ToolMoveMaster": "ToolMoveMaster",
        "../../../Scripts/Promotion/AdManager": "AdManager"
    }],
    BathStory: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "12a98nkU3FDwKm/oQ2m4GbS", "BathStory");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var r = cc._decorator,
            c = r.ccclass,
            s = (r.property, function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.isStartInit = !1, e
                }
                return n(e, t), e.prototype.onLoad = function () {
                    cc.game.on("Story.StartView", this.StartView, this)
                }, e.prototype.start = function () { }, e.prototype.StartView = function (t) {
                    this.isStartInit = t, this.node.children[0].active = !0, this.node.getComponent(cc.Animation).play(), t ? (cc.find("SafeArea/Start/Start", this.node).active = !0, cc.find("SafeArea/Start/End", this.node).active = !1) : (cc.find("SafeArea/Start/Start", this.node).active = !1, cc.find("SafeArea/Start/End", this.node).active = !0)
                }, e.prototype.CloseView = function () {
                    this.isStartInit ? this.node.children[0].active = !1 : cc.director.loadScene("LevelScene")
                }, a([c], e)
            }(cc.Component));
        o.default = s, cc._RF.pop()
    }, {}],
    BedRoomStarting: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "a04b03x+05JWosUlrvIN3Yv", "BedRoomStarting");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var r = t("../../../../Scripts/Helper/AudioManager"),
            c = cc._decorator,
            s = c.ccclass,
            l = (c.property, function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.Girl = null, e
                }
                return n(e, t), e.prototype.onLoad = function () {
                    cc.game.on("StartStory", this.StartView, this), this.Girl = cc.find("SafeArea/Girl", this.node), r.default.getInstance().add("ohthisbedroom", cc.find("SafeArea/Sound/ohthisbedroom", this.node).getComponent(cc.AudioSource).clip)
                }, e.prototype.start = function () { }, e.prototype.StartView = function () {
                    var t = this;
                    this.node.children[0].active = !0, this.Girl.getComponent(cc.Animation).playAdditive("GardenStarting"), this.Girl.getComponent(cc.Animation).playAdditive("GardenStartingEye");
                    var e = r.default.getInstance().play("ohthisbedroom");
                    cc.tween(this.node).delay(e).call(function () {
                        cc.find("SafeArea/NextButton", t.node).active = !0, t.Girl.getComponent(cc.Animation).stop("GardenStarting")
                    }).start()
                }, e.prototype.NextButton = function (t) {
                    var e = t.target;
                    r.default.getInstance().play("click"), e.getComponent(cc.Button).interactable = !1, this.node.children[0].active = !1, cc.game.emit("StartView")
                }, a([s], e)
            }(cc.Component));
        o.default = l, cc._RF.pop()
    }, {
        "../../../../Scripts/Helper/AudioManager": "AudioManager"
    }],
    BedRoom: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "831d2jYEsNJPpvLh8pPnNSd", "BedRoom");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        }), o.Tool_Type = void 0;
        var s, l = t("../../../Scripts/Helper/AudioManager"),
            h = t("../../../Scripts/Helper/HelperTools"),
            d = t("../../../Scripts/Promotion/AdManager"),
            p = cc._decorator,
            u = p.ccclass,
            f = p.property;
        (function (t) {
            t[t.MOP = 1] = "MOP", t[t.DUSTER_BRUSH = 2] = "DUSTER_BRUSH", t[t.BROOM = 3] = "BROOM", t[t.WATER_SPRAY = 4] = "WATER_SPRAY", t[t.TOWEL = 5] = "TOWEL", t[t.DUSTBIN = 6] = "DUSTBIN", t[t.DRAG_AND_PLACE = 7] = "DRAG_AND_PLACE"
        })(s = o.Tool_Type || (o.Tool_Type = {}));
        var y = function (t) {
            function e() {
                var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                return e.dustBinObject = null, e.dustBin = null, e.toyDestObject = null, e.toySourceObject = null, e.cleaningToolNode = null, e.moveItem = null, e.canMoveTool = !1, e.toolType = 0, e.toolIndex = 0, e.toolStartPos = cc.Vec2.ZERO, e.mopDirtNode = null, e.spiderDirtNode = null, e.broomDirtNode = null, e.waterSprayNode = null, e.mirrorDirtNode = null, e.tapAndAdjustNode = null, e.toolPositions = [], e.arrow = null, e.hintNode = null, e.hand = null, e.isLastToolDone = !1, e
            }
            return n(e, t), e.prototype.onLoad = function () {
                l.default.getInstance()
            }, e.prototype.start = function () {
                return r(this, void 0, void 0, function () {
                    return c(this, function (t) {
                        switch (t.label) {
                            case 0:
                                return this.initPropertyNodes(), this.registerEvents(), cc.game.on("StartView", this.StartView, this), [4, h.Delay(.3)];
                            case 1:
                                return t.sent(), cc.game.emit("StartStory"), [2]
                        }
                    })
                })
            }, e.prototype.StartView = function () {
                this.addHandHint()
            }, e.prototype.hideHandHint = function () {
                cc.Tween.stopAllByTarget(this.hand), this.hand.setPosition(cc.v3(-5e3, 5e3, 500))
            }, e.prototype.addHandHint = function () {
                if (this.isDustBinItemsCollected())
                    if (this.unschedule(this.addHandHint), cc.Tween.stopAllByTarget(this.hand), 254 == this.tapAndAdjustNode.children[0].opacity) {
                        var t = cc.tween(this.hand).to(.5, {
                            scale: 1.2
                        }).to(.5, {
                            scale: 1
                        });
                        cc.tween(this.hand).set({
                            position: cc.v3(118, 2, 0)
                        }).repeat(2e3, t).start()
                    } else 254 == this.tapAndAdjustNode.children[1].opacity &amp;&amp; (t = cc.tween(this.hand).to(.5, {
                        scale: 1.2
                    }).to(.5, {
                        scale: 1
                    }), cc.tween(this.hand).set({
                        position: cc.v3(150, 202, 0)
                    }).repeat(2e3, t).start());
                else {
                    this.unschedule(this.addHandHint);
                    for (var e = 0; e &lt; this.dustBinObject.childrenCount; e++) {
                        var o = this.dustBinObject.children[e];
                        if (o.scale &gt; 0) {
                            var i = this.node.convertToNodeSpaceAR(o.parent.convertToWorldSpaceAR(o.getPosition())),
                                n = this.node.convertToNodeSpaceAR(this.dustBin.parent.convertToWorldSpaceAR(this.dustBin.getPosition())),
                                a = cc.v3(i.x + n.x / 2, i.y + n.y / 2 + 300);
                            cc.Tween.stopAllByTarget(this.hand), cc.tween(this.hand).repeatForever(cc.tween().set({
                                position: cc.v3(i.x, i.y, 0)
                            }).bezierTo(2, cc.v2(i), cc.v2(a), cc.v2(n)).delay(.2)).start();
                            break
                        }
                    }
                }
            }, e.prototype.initPropertyNodes = function () {
                this.mopDirtNode = cc.find("Canvas/BedroomSetup/BGDirtWater"), this.spiderDirtNode = cc.find("Canvas/BedroomSetup/Spider"), this.broomDirtNode = cc.find("Canvas/BedroomSetup/BgDirtTool"), this.waterSprayNode = cc.find("Canvas/BedroomSetup/MirrorWater"), this.mirrorDirtNode = cc.find("Canvas/BedroomSetup/MirrorDirt"), this.tapAndAdjustNode = cc.find("Canvas/BedroomSetup/PictureTouch"), this.arrow = cc.find("Canvas/BedroomSetup/arrow"), this.hintNode = cc.find("Canvas/HIntNode");
                for (var t = 1; t &lt;= 5; t++) {
                    var e = this.cleaningToolNode.getChildByName(t.toFixed());
                    this.toolPositions.push(e.getPosition())
                }
                this.hand = cc.find("Canvas/Hand")
            }, e.prototype.addHint = function (t) {
                switch (this.hintNode.children.forEach(function (t) {
                    t.children.forEach(function (t) {
                        t.active = !1
                    })
                }), t) {
                    case s.DUSTBIN:
                        var e = cc.instantiate(this.arrow);
                        e.setPosition(cc.v2(0, 0)), e.parent = cc.find("Canvas/BedroomSetup/DustTool/dustbin2");
                        break;
                    case s.MOP:
                        for (var o = 0; o &lt; this.mopDirtNode.childrenCount; o++) this.mopDirtNode.children[o].opacity &gt; 0 &amp;&amp; (this.hintNode.getChildByName(t.toString()).children[o].active = !0);
                        break;
                    case s.DUSTER_BRUSH:
                        for (o = 0; o &lt; this.spiderDirtNode.childrenCount; o++) this.spiderDirtNode.children[o].opacity &gt; 0 &amp;&amp; (this.hintNode.getChildByName(t.toString()).children[o].active = !0);
                        break;
                    case s.BROOM:
                        for (o = 0; o &lt; this.broomDirtNode.childrenCount; o++) this.broomDirtNode.children[o].opacity &gt; 0 &amp;&amp; (this.hintNode.getChildByName(t.toString()).children[o].active = !0);
                        break;
                    case s.WATER_SPRAY:
                        for (o = 0; o &lt; this.waterSprayNode.childrenCount; o++) this.waterSprayNode.children[o].opacity &lt; 255 &amp;&amp; (this.hintNode.getChildByName(t.toString()).children[o].active = !0);
                        break;
                    case s.TOWEL:
                        for (o = 0; o &lt; this.waterSprayNode.childrenCount; o++) this.waterSprayNode.children[o].opacity &gt; 0 &amp;&amp; (this.hintNode.getChildByName(t.toString()).children[o].active = !0);
                        break;
                    case s.DRAG_AND_PLACE:
                }
            }, e.prototype.registerEvents = function () {
                this.node.on(cc.Node.EventType.TOUCH_START, this.touchStarted, this), this.node.on(cc.Node.EventType.TOUCH_MOVE, this.touchMoved, this), this.node.on(cc.Node.EventType.TOUCH_END, this.touchEnded, this), this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.touchEnded, this)
            }, e.prototype.touchStarted = function (t) {
                var e = this;
                switch (this.unschedule(this.addHandHint), this.hideHandHint(), this.toolType) {
                    case s.MOP:
                    case s.DUSTER_BRUSH:
                    case s.BROOM:
                    case s.WATER_SPRAY:
                    case s.TOWEL:
                        var o = this.cleaningToolNode.getChildByName(this.toolType.toString());
                        o.active &amp;&amp; this.cleaningToolNode.getChildByName(this.toolType.toString()).getBoundingBoxToWorld().contains(t.getLocation()) &amp;&amp; (this.canMoveTool = !0, l.default.getInstance().play("click"), this.moveItem = cc.instantiate(o), this.moveItem.parent = cc.find("Canvas"), this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), o.active = !1, this.hideHand(!1, this.toolType), this.addHint(this.toolType)), this.canMoveTool &amp;&amp; this.toolType == s.WATER_SPRAY &amp;&amp; (this.moveItem.getComponent(cc.Animation).play(), cc.tween(this.moveItem).repeatForever(cc.tween().delay(.73).call(function () {
                            e.moveItem.getChildByName("cleaningSpray").getComponent(cc.ParticleSystem).resetSystem()
                        })).start());
                        break;
                    default:
                        for (var i = 0; i &lt; this.dustBinObject.childrenCount; i++)
                            if ((n = this.dustBinObject.children[i]).getBoundingBoxToWorld().contains(t.getLocation())) {
                                this.canMoveTool = !0, this.setToolType(s.DUSTBIN), this.toolIndex = i, this.moveItem.getComponent(cc.Sprite).spriteFrame = n.getComponent(cc.Sprite).spriteFrame, n.active = !1, this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), this.addHint(this.toolType), l.default.getInstance().play("click");
                                break
                            }
                        for (i = 0; i &lt; this.toySourceObject.childrenCount; i++) {
                            var n = this.toySourceObject.children[i];
                            if (!this.canMoveTool &amp;&amp; n.getBoundingBoxToWorld().contains(t.getLocation())) {
                                this.canMoveTool = !0, this.setToolType(s.DRAG_AND_PLACE), this.toolIndex = i, this.moveItem.getComponent(cc.Sprite).spriteFrame = n.getComponent(cc.Sprite).spriteFrame, n.active = !1, this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), this.moveItem.scale = 1.5, l.default.getInstance().play("click"), this.moveItem.angle = this.toyDestObject.children[i].angle, this.toyDestObject.children[i].active = !0;
                                break
                            }
                        }
                }
                if (!this.canMoveTool) {
                    for (i = 0; i &lt; this.tapAndAdjustNode.childrenCount; i++) 254 == (n = this.tapAndAdjustNode.children[i]).opacity &amp;&amp; n.getBoundingBoxToWorld().contains(t.getLocation()) &amp;&amp; (n.opacity = 255, this.addToolParticle(n, 0), n.getComponent(cc.Animation).play(), l.default.getInstance().play("click"));
                    255 == this.tapAndAdjustNode.children[0].opacity &amp;&amp; 255 == this.tapAndAdjustNode.children[1].opacity &amp;&amp; this.isLastToolDone &amp;&amp; (cc.find("Canvas/Next").active = !0, cc.find("Canvas/BoardComplete").active = !0, l.default.getInstance().play("PARTICLE"))
                }
            }, e.prototype.touchMoved = function (t) {
                var e = this;
                if (this.canMoveTool) switch (this.toolType) {
                    case s.DUSTBIN:
                        if (this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), this.moveItem.getBoundingBoxToWorld().containsRect(this.dustBin.getChildByName("collider").getBoundingBoxToWorld())) {
                            this.canMoveTool = !1, this.moveItem.setPosition(45454, 45454);
                            var o = this.dustBinObject.children[this.toolIndex];
                            o.active = !0, cc.find("Canvas/BedroomSetup/DustTool/dustbin2").getChildByName("arrow").removeFromParent();
                            var i = o.getComponent(cc.Animation).play("InDustbin").duration;
                            cc.tween(o).delay(.8 * i).call(function () {
                                l.default.getInstance().play("dustbin")
                            }).delay(.2 * i).call(function () {
                                e.addToolParticle(cc.find("Canvas/BedroomSetup/DustTool/dustbin2"), 0)
                            }).set({
                                scale: 0
                            }).call(function () {
                                e.canStartMainTools() &amp;&amp; (e.setToolType(s.MOP), e.showHand(!0, s.MOP))
                            }).start()
                        }
                        break;
                    case s.DRAG_AND_PLACE:
                        this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), this.moveItem.getBoundingBoxToWorld().containsRect(this.toyDestObject.children[this.toolIndex].getBoundingBoxToWorld()) &amp;&amp; (this.canMoveTool = !1, this.toyDestObject.children[this.toolIndex].opacity = 255, this.toySourceObject.children[this.toolIndex].scale = 0, this.addToolParticle(this.toyDestObject.children[this.toolIndex], 0), this.moveItem.setPosition(45454, 45454), this.canStartMainTools() &amp;&amp; (this.setToolType(s.MOP), this.showHand(!0, s.MOP)));
                        break;
                    case s.MOP:
                        this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation()));
                        for (var n = 0; n &lt; this.mopDirtNode.childrenCount; n++) {
                            var a = this.mopDirtNode.children[n];
                            this.moveItem.getChildByName("intersect").getBoundingBoxToWorld().intersects(a.getBoundingBoxToWorld()) &amp;&amp; (a.opacity &gt; 10 ? (this.playSound("mop"), a.opacity = a.opacity - 5) : a.opacity &gt; 0 &amp;&amp; (a.opacity = 0, this.addToolParticle(a, 0), this.hintNode.getChildByName(this.toolType.toString()).children[n].active = !1))
                        }
                        break;
                    case s.DUSTER_BRUSH:
                        for (this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), n = 0; n &lt; this.spiderDirtNode.childrenCount; n++)(a = this.spiderDirtNode.children[n]).getBoundingBoxToWorld().intersects(this.moveItem.getChildByName("intersect").getBoundingBoxToWorld()) &amp;&amp; (a.opacity &gt; 10 ? (this.playSound("duster"), a.opacity = a.opacity - 2) : a.opacity &gt; 0 &amp;&amp; (a.opacity = 0, this.hintNode.getChildByName(this.toolType.toString()).children[n].active = !1, this.addToolParticle(a, 0)));
                        break;
                    case s.BROOM:
                        for (this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), n = 0; n &lt; this.broomDirtNode.childrenCount; n++)(a = this.broomDirtNode.children[n]).getBoundingBoxToWorld().containsRect(this.moveItem.getChildByName("intersect").getBoundingBoxToWorld()) &amp;&amp; (a.opacity &gt; 10 ? (a.opacity = a.opacity - 5, this.playSound("broom")) : a.opacity &gt; 0 &amp;&amp; (a.opacity = 0, this.hintNode.getChildByName(this.toolType.toString()).children[n].active = !1, this.addToolParticle(a, 0)));
                        break;
                    case s.WATER_SPRAY:
                        for (this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), n = 0; n &lt; this.waterSprayNode.childrenCount; n++)(r = this.waterSprayNode.children[n]).getBoundingBoxToWorld().intersects(this.moveItem.getChildByName("intersect").getBoundingBoxToWorld()) &amp;&amp; (r.opacity &lt; 245 ? (r.opacity = r.opacity + 5, this.playSound("Sprey")) : r.opacity &lt; 255 &amp;&amp; (r.opacity = 255, this.hintNode.getChildByName(this.toolType.toString()).children[n].active = !1, this.addToolParticle(r, 0)));
                        break;
                    case s.TOWEL:
                        for (this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), n = 0; n &lt; this.waterSprayNode.childrenCount; n++) {
                            var r = this.waterSprayNode.children[n];
                            a = this.mirrorDirtNode.children[n], r.getBoundingBoxToWorld().intersects(this.moveItem.getBoundingBoxToWorld()) &amp;&amp; (r.opacity &gt; 10 ? (r.opacity = r.opacity - 5, this.playSound("towel")) : r.opacity &gt; 0 &amp;&amp; (r.opacity = 0, this.hintNode.getChildByName(this.toolType.toString()).children[n].active = !1, this.addToolParticle(r, 0)), a.opacity = r.opacity)
                        }
                }
            }, e.prototype.touchEnded = function () {
                var t = this;
                if (this.schedule(this.addHandHint, 5), this.canMoveTool) switch (this.toolType) {
                    case s.DUSTBIN:
                        this.canMoveTool = !1, this.dustBinObject.children[this.toolIndex].active = !0, this.moveItem.setPosition(45454, 45454), cc.find("Canvas/BedroomSetup/DustTool/dustbin2").getChildByName("arrow").removeFromParent();
                        break;
                    case s.DRAG_AND_PLACE:
                        this.canMoveTool = !1, this.moveItem.setPosition(45454, 45454), this.toySourceObject.children[this.toolIndex].active = !0, this.moveItem.scale = 1, this.moveItem.angle = 0, this.toyDestObject.children[this.toolIndex].active = !1;
                        break;
                    case s.MOP:
                        this.showHand(!1, s.MOP), this.canMoveTool = !1;
                        var e = this.node.convertToNodeSpaceAR(this.getToolByType(this.toolType).parent.convertToWorldSpaceAR(this.toolPositions[this.toolType - 1]));
                        cc.Tween.stopAllByTarget(this.moveItem), cc.tween(this.moveItem).to(.5, {
                            position: cc.v3(e.x + 150, e.y, 0)
                        }).set({
                            position: cc.v3(21546, 4564)
                        }).call(function () {
                            for (var e = 0; e &lt; t.mopDirtNode.childrenCount; e++)
                                if (t.mopDirtNode.children[e].opacity &gt; 0) return;
                            t.setToolType(s.DUSTER_BRUSH), t.hideHand(!0, s.MOP), cc.tween(t.node).delay(.5).call(function () {
                                t.showHand(!0, s.DUSTER_BRUSH)
                            }).start()
                        }).start(), this.hintNode.getChildByName(this.toolType.toString()).children.forEach(function (t) {
                            t.active = !1
                        });
                        break;
                    case s.DUSTER_BRUSH:
                        this.showHand(!1, s.DUSTER_BRUSH), this.canMoveTool = !1, e = this.node.convertToNodeSpaceAR(this.getToolByType(this.toolType).parent.convertToWorldSpaceAR(this.toolPositions[this.toolType - 1])), cc.Tween.stopAllByTarget(this.moveItem), cc.tween(this.moveItem).to(.5, {
                            position: cc.v3(e.x + 150, e.y, 0)
                        }).set({
                            position: cc.v3(21546, 4564)
                        }).call(function () {
                            for (var e = 0; e &lt; t.spiderDirtNode.childrenCount; e++)
                                if (t.spiderDirtNode.children[e].opacity &gt; 0) return;
                            t.setToolType(s.BROOM), t.hideHand(!0, s.DUSTER_BRUSH), cc.tween(t.node).delay(.5).call(function () {
                                t.showHand(!0, s.BROOM)
                            }).start()
                        }).start(), this.hintNode.getChildByName(this.toolType.toString()).children.forEach(function (t) {
                            t.active = !1
                        });
                        break;
                    case s.BROOM:
                        this.showHand(!1, s.BROOM), this.canMoveTool = !1, e = this.node.convertToNodeSpaceAR(this.getToolByType(this.toolType).parent.convertToWorldSpaceAR(this.toolPositions[this.toolType - 1])), cc.Tween.stopAllByTarget(this.moveItem), cc.tween(this.moveItem).to(.5, {
                            position: cc.v3(e.x + 150, e.y, 0)
                        }).set({
                            position: cc.v3(21546, 4564)
                        }).call(function () {
                            for (var e = 0; e &lt; t.broomDirtNode.childrenCount; e++)
                                if (t.broomDirtNode.children[e].opacity &gt; 0) return;
                            t.setToolType(s.WATER_SPRAY), t.hideHand(!0, s.BROOM), cc.tween(t.node).delay(.5).call(function () {
                                t.showHand(!0, s.WATER_SPRAY)
                            }).start()
                        }).start(), this.hintNode.getChildByName(this.toolType.toString()).children.forEach(function (t) {
                            t.active = !1
                        });
                        break;
                    case s.WATER_SPRAY:
                        this.showHand(!1, s.WATER_SPRAY), this.canMoveTool = !1, e = this.node.convertToNodeSpaceAR(this.getToolByType(this.toolType).parent.convertToWorldSpaceAR(this.toolPositions[this.toolType - 1])), cc.Tween.stopAllByTarget(this.moveItem), cc.tween(this.moveItem).to(.5, {
                            position: cc.v3(e.x + 150, e.y, 0)
                        }).set({
                            position: cc.v3(21546, 4564)
                        }).call(function () {
                            for (var e = 0; e &lt; t.waterSprayNode.childrenCount; e++)
                                if (t.waterSprayNode.children[e].opacity &lt; 255) return;
                            t.setToolType(s.TOWEL), t.hideHand(!0, s.WATER_SPRAY), cc.tween(t.node).delay(.5).call(function () {
                                t.showHand(!0, s.TOWEL)
                            }).start()
                        }).start(), this.hintNode.getChildByName(this.toolType.toString()).children.forEach(function (t) {
                            t.active = !1
                        });
                        break;
                    case s.TOWEL:
                        this.showHand(!1, s.TOWEL), this.canMoveTool = !1, e = this.node.convertToNodeSpaceAR(this.getToolByType(this.toolType).parent.convertToWorldSpaceAR(this.toolPositions[this.toolType - 1])), cc.Tween.stopAllByTarget(this.moveItem), cc.tween(this.moveItem).to(.5, {
                            position: cc.v3(e.x + 150, e.y, 0)
                        }).set({
                            position: cc.v3(21546, 4564)
                        }).call(function () {
                            for (var e = 0; e &lt; t.waterSprayNode.childrenCount; e++)
                                if (t.waterSprayNode.children[e].opacity &gt; 0) return;
                            t.isLastToolDone = !0, t.hideHand(!0, s.TOWEL), t.isDustBinItemsCollected() &amp;&amp; t.checkDragAndPlaceItemStatus() &amp;&amp; 255 == t.tapAndAdjustNode.children[0].opacity &amp;&amp; 255 == t.tapAndAdjustNode.children[1].opacity &amp;&amp; (cc.find("Canvas/Next").active = !0, cc.find("Canvas/BoardComplete").active = !0, l.default.getInstance().play("PARTICLE"))
                        }).start(), this.hintNode.getChildByName(this.toolType.toString()).children.forEach(function (t) {
                            t.active = !1
                        })
                }
            }, e.prototype.getToolByType = function (t) {
                return this.cleaningToolNode.getChildByName(t.toString())
            }, e.prototype.playSound = function (t) {
                l.default.getInstance().isPlaying(t) || l.default.getInstance().play(t)
            }, e.prototype.canStartMainTools = function () {
                return !(!this.isDustBinItemsCollected() || !this.checkDragAndPlaceItemStatus() || (cc.tween(cc.find("Canvas/BedroomSetup/DustTool")).by(.5, {
                    position: cc.v3(-150, 0, 0)
                }).start(), 0))
            }, e.prototype.isDustBinItemsCollected = function () {
                for (var t = 0; t &lt; this.dustBinObject.childrenCount; t++)
                    if (0 != this.dustBinObject.children[t].scale) return !1;
                return !0
            }, e.prototype.addToolParticle = function (t, e) {
                var o = this,
                    i = this.node.convertToNodeSpaceAR(t.parent.convertToWorldSpaceAR(t.getPosition())),
                    n = cc.instantiate(cc.find("Canvas/ToolComplete"));
                n.setPosition(i), cc.tween(n).delay(e).call(function () {
                    n.getComponent(cc.ParticleSystem).autoRemoveOnFinish = !0, n.parent = o.node, n.getComponent(cc.ParticleSystem).resetSystem(), l.default.getInstance().play("PARTICLE")
                }).start()
            }, e.prototype.checkDragAndPlaceItemStatus = function () {
                for (var t = 0; t &lt; this.toyDestObject.childrenCount; t++)
                    if (255 != this.toyDestObject.children[t].opacity) return !1;
                return !0
            }, e.prototype.showHand = function (t, e) {
                var o = this;
                if (t) this.cleaningToolNode.children.forEach(function (t) {
                    t.active = !1
                }), this.cleaningToolNode.getChildByName("new_Hand").active = !0, this.cleaningToolNode.getChildByName(e.toString()).active = !0, this.cleaningToolNode.getComponent(cc.Animation).play("HandEntry");
                else {
                    var i = this.cleaningToolNode.getComponent(cc.Animation).play("HandEntry").duration;
                    cc.tween(this.cleaningToolNode).delay(i).call(function () {
                        o.cleaningToolNode.getChildByName(e.toString()).active = !0
                    }).start()
                }
            }, e.prototype.hideHand = function (t, e) {
                var o = this;
                if (t) {
                    var i = this.cleaningToolNode.getComponent(cc.Animation).play("HandExit").duration;
                    cc.tween(this.cleaningToolNode).delay(i).call(function () {
                        o.cleaningToolNode.children.forEach(function (t) {
                            t.active = !1
                        })
                    }).start()
                } else this.cleaningToolNode.getComponent(cc.Animation).play("HandExit").duration, this.cleaningToolNode.getChildByName(e.toString()).active = !1
            }, e.prototype.setToolType = function (t) {
                this.toolType = t
            }, e.prototype.NextAction = function (t) {
                return r(this, void 0, void 0, function () {
                    return c(this, function (e) {
                        switch (e.label) {
                            case 0:
                                return t.target.active = !1, l.default.getInstance().play("Pick and Drop"), d.default.getInstance().requestAds(), [4, h.Delay(.3)];
                            case 1:
                                return e.sent(), cc.director.loadScene("LevelScene"), [2]
                        }
                    })
                })
            }, a([f(cc.Node)], e.prototype, "dustBinObject", void 0), a([f(cc.Node)], e.prototype, "dustBin", void 0), a([f(cc.Node)], e.prototype, "toyDestObject", void 0), a([f(cc.Node)], e.prototype, "toySourceObject", void 0), a([f(cc.Node)], e.prototype, "cleaningToolNode", void 0), a([f(cc.Node)], e.prototype, "moveItem", void 0), a([u], e)
        }(cc.Component);
        o.default = y, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager",
        "../../../Scripts/Helper/HelperTools": "HelperTools",
        "../../../Scripts/Promotion/AdManager": "AdManager"
    }],
    CanvasManager: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "824d41Si+hEBYdhvFNgPqtb", "CanvasManager");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var r = t("./UserDrawing"),
            c = cc._decorator,
            s = c.ccclass,
            l = (c.property, function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.canvasdata = null, e.PatternData = [], e.DefaultData = null, e.CanvasWidth = 0, e.CanvasHeight = 0, e.IsEraseData = !1, e.userDrawingObj = null, e.filterdata = null, e.DefaultImage = null, e.OriginalData = null, e.SelectedPatternData = null, e.sframe = null, e.texture = null, e.defaulturl = null, e.TextureUserCanvas = null, e.TextureUserContext = null, e.DefaultTextureUserCanvas = null, e.DefaultTextureUserContext = null, e.isDefault = !1, e
                }
                return n(e, t), e.prototype.initWithData = function (t, e) {
                    this.CanvasWidth = t.width, this.CanvasHeight = t.height;
                    var o = document.createElement("canvas"),
                        i = o.getContext("2d");
                    o.width = this.CanvasWidth, o.height = this.CanvasHeight, this.canvasdata = {
                        UserCanvas: o,
                        UserContext: i,
                        DrawNode: t,
                        CanvasWidth: this.CanvasWidth,
                        CanvasHeight: this.CanvasHeight,
                        ID: 0
                    }, this.userDrawingObj = e, this.DefaultImage = new Image, this.sframe = new cc.SpriteFrame, this.texture = new cc.Texture2D, this.TextureUserCanvas = document.createElement("canvas"), this.TextureUserContext = o.getContext("2d"), this.DefaultTextureUserCanvas = document.createElement("canvas"), this.DefaultTextureUserContext = o.getContext("2d")
                }, e.prototype.UpdateTexture = function () {
                    var t = this.getCanvasData();
                    this.texture.initWithData(this.OriginalData, cc.Texture2D.PixelFormat.RGBA8888, this.CanvasWidth, this.CanvasHeight), this.sframe.setTexture(this.texture), t.DrawNode.getComponent(cc.Sprite).spriteFrame = this.sframe
                }, e.prototype.setImageData = function (t) {
                    this.getCanvasData().UserContext.putImageData(t, 0, 0), this.UpdateTexture()
                }, e.prototype.setEraseOn = function (t) {
                    this.IsEraseData = t
                }, e.prototype.getImageData = function () {
                    var t = this.getCanvasData();
                    return null == t ? null : t.UserContext.getImageData(0, 0, t.CanvasWidth, t.CanvasHeight)
                }, e.prototype.getCanvasData = function () {
                    return this.canvasdata
                }, e.prototype.resetTexture = function () {
                    this.OriginalData = this.DefaultData, this.UpdateTexture(), this.userDrawingObj.SceneType != r.SCENE_TYPE.DRAWING &amp;&amp; this.userDrawingObj.UpdateFloodFillData(this.getPatternDataUsingIndex(0))
                }, e.prototype.clearPicture = function () {
                    for (var t = this.OriginalData, e = (t.width, t.data), o = 0; o &lt; e.length; o += 4) e[o + 0] = 0, e[o + 1] = 0, e[o + 2] = 0, e[o + 3] = 0;
                    this.UpdateTexture()
                }, e.prototype.FillTexture = function (t) {
                    for (var e = this.getPatternDataUsingIndex(t), o = this.OriginalData, i = (o.width, o.data), n = 0; n &lt; i.length; n += 4) i[n + 0] = e.data[n], i[n + 1] = e.data[n + 1], i[n + 2] = e.data[n + 2], i[n + 3] = e.data[n + 3];
                    this.UpdateTexture()
                }, e.prototype.LoadTexture = function (t, e, o) {
                    var i = this,
                        n = new Image;
                    n.onload = function () {
                        i.TextureUserContext.clearRect(0, 0, i.CanvasWidth, i.CanvasHeight);
                        var t = n.width,
                            a = n.height;
                        if (o &amp;&amp; (t = i.CanvasWidth, a = i.CanvasHeight), i.TextureUserCanvas.width = t, i.TextureUserCanvas.height = a, 0 == e &amp;&amp; (i.DefaultTextureUserCanvas.width = t, i.DefaultTextureUserCanvas.height = a), o) {
                            var c = i.TextureUserContext.createPattern(n, "repeat");
                            i.TextureUserContext.rect(0, 0, i.TextureUserCanvas.width, i.TextureUserCanvas.height), i.TextureUserContext.fillStyle = c, i.TextureUserContext.fill()
                        } else i.TextureUserContext.drawImage(n, t / 2 - n.width / 2, a / 2 - n.height / 2), 0 == e &amp;&amp; i.DefaultTextureUserContext.drawImage(n, t / 2 - n.width / 2, a / 2 - n.height / 2);
                        if (0 == e)
                            if (i.DefaultImage = n, i.isDefault = !0, i.userDrawingObj.SceneType === r.SCENE_TYPE.FILL || i.userDrawingObj.SceneType === r.SCENE_TYPE.FILL_AND_DRAWING) {
                                var s = i.filterData(i.TextureUserContext.getImageData(0, 0, t, a));
                                i.PatternData.push({
                                    PatternData: s,
                                    ID: e
                                }), i.userDrawingObj.initFloodFill(s), i.OriginalData = s, i.setImageData(s), i.DefaultTextureUserContext.putImageData(i.OriginalData, 0, 0), i.DefaultData = i.DefaultTextureUserContext.getImageData(0, 0, t, a)
                            } else s = i.TextureUserContext.getImageData(0, 0, t, a), i.PatternData.push({
                                PatternData: s,
                                ID: e
                            }), i.OriginalData = s, i.setImageData(s), i.userDrawingObj.initFloodFill(s), i.DefaultTextureUserContext.putImageData(i.OriginalData, 0, 0), i.DefaultData = i.DefaultTextureUserContext.getImageData(0, 0, t, a);
                        else i.PatternData.push({
                            PatternData: i.TextureUserContext.getImageData(0, 0, t, a),
                            ID: e
                        })
                    }, n.src = t, 0 == e &amp;&amp; (this.defaulturl = t)
                }, e.prototype.LoadEmptyTexture = function (t) {
                    this.isDefault = !1, this.TextureUserContext.clearRect(0, 0, this.CanvasWidth, this.CanvasHeight);
                    var e = this.CanvasWidth,
                        o = this.CanvasHeight;
                    this.TextureUserCanvas.width = e, this.TextureUserCanvas.height = o, this.DefaultTextureUserCanvas.width = e, this.DefaultTextureUserCanvas.height = o;
                    var i = this.TextureUserContext.getImageData(0, 0, e, o);
                    this.PatternData.push({
                        PatternData: i,
                        ID: t
                    }), this.OriginalData = i;
                    for (var n = 0; n &lt; this.OriginalData.data.length; n += 4) this.OriginalData.data[n] = 0, this.OriginalData.data[n + 1] = 0, this.OriginalData.data[n + 2] = 0, this.OriginalData.data[n + 3] = 0;
                    this.setImageData(i), this.userDrawingObj.initFloodFill(i), this.DefaultTextureUserContext.putImageData(this.OriginalData, 0, 0), this.DefaultData = this.DefaultTextureUserContext.getImageData(0, 0, e, o)
                }, e.prototype.filterData = function (t) {
                    if (this.userDrawingObj.SceneType === r.SCENE_TYPE.FILL || this.userDrawingObj.SceneType === r.SCENE_TYPE.FILL_AND_DRAWING) {
                        for (var e = t, o = (e.width, e.data), i = 0; i &lt; o.length; i += 4) o[i] &lt; 80 &amp;&amp; o[i + 1] &lt; 80 &amp;&amp; o[i + 2] &lt; 80 ? (o[i + 0] = 0, o[i + 1] = 0, o[i + 2] = 0, o[i + 3] = 255) : (o[i + 0] = 255, o[i + 1] = 255, o[i + 2] = 255, o[i + 3] = 255);
                        return e
                    }
                    return t
                }, e.prototype.getPatternData = function () {
                    return this.SelectedPatternData
                }, e.prototype.setPatternData = function (t) {
                    if (null == this.PatternData) return null;
                    for (var e = 0; e &lt; this.PatternData.length; e++)
                        if (this.PatternData[e].ID == t) return this.SelectedPatternData = this.PatternData[e].PatternData
                }, e.prototype.getPatternDataUsingIndex = function (t) {
                    if (null == this.PatternData) return null;
                    for (var e = 0; e &lt; this.PatternData.length; e++)
                        if (this.PatternData[e].ID == t) return this.PatternData[e].PatternData;
                    return null
                }, e.prototype.UpdatePatternDrawingFloodFill = function (t, e) {
                    null == this.SelectedPatternData &amp;&amp; (this.SelectedPatternData = this.getPatternDataUsingIndex(t));
                    for (var o = this.OriginalData, i = o.width, n = o.data, a = 0; a &lt; e.length; a++) {
                        var c = 4 * (e[a].y * i + e[a].x);
                        n[c] = this.SelectedPatternData.data[c], n[c + 1] = this.SelectedPatternData.data[c + 1], n[c + 2] = this.SelectedPatternData.data[c + 2], n[c + 3] = this.SelectedPatternData.data[c + 3]
                    }
                    this.setImageData(this.OriginalData), this.userDrawingObj.SceneType != r.SCENE_TYPE.DRAWING &amp;&amp; this.userDrawingObj.UpdateFloodFillData(this.OriginalData)
                }, e.prototype.UpdatePatternDrawingUsingPosition = function (t, e, o, i, n, a) {
                    if (null == this.SelectedPatternData &amp;&amp; (this.SelectedPatternData = this.getPatternDataUsingIndex(t)), 0 != this.IsEraseData || null != this.SelectedPatternData) {
                        var c = this.OriginalData,
                            s = c.width,
                            l = c.data,
                            h = this.userDrawingObj.SceneType != r.SCENE_TYPE.DRAWING;
                        if (!h || null != this.DefaultData) {
                            var d = this.SelectedPatternData.data.length;
                            if (!(o &gt; n || i &gt; a)) {
                                for (var p = o; p &lt; n; p++)
                                    for (var u = i; u &lt; a; u++) {
                                        var f = 4 * (u * s + p);
                                        h &amp;&amp; this.DefaultData.data[f] &lt; 20 &amp;&amp; this.DefaultData.data[f + 1] &lt; 20 &amp;&amp; this.DefaultData.data[f + 2] &lt; 20 || e.data &amp;&amp; e.data[f + 3] &amp;&amp; e.data[f + 3] &gt; 0 &amp;&amp; (this.IsEraseData ? this.userDrawingObj.DrawingType === r.DRAWING_TYPE.FILL ? (l[f] = 255, l[f + 1] = 255, l[f + 2] = 255, l[f + 3] = 255) : (l[f] = 255, l[f + 1] = 255, l[f + 2] = 255, l[f + 3] = 0) : this.SelectedPatternData &amp;&amp; d &gt; f + 3 &amp;&amp; (l[f] = this.SelectedPatternData.data[f], l[f + 1] = this.SelectedPatternData.data[f + 1], l[f + 2] = this.SelectedPatternData.data[f + 2], l[f + 3] = this.SelectedPatternData.data[f + 3]))
                                    }
                                this.UpdateTexture()
                            }
                        }
                    }
                }, e.prototype.updateFloodFill = function () {
                    this.userDrawingObj.SceneType != r.SCENE_TYPE.DRAWING ? this.userDrawingObj.UpdateFloodFillData(this.OriginalData) : this.userDrawingObj.UpdateFloodFillData(this.DefaultData)
                }, e.prototype.getDrawingPixels = function () {
                    var t = 0;
                    if (this.isDefault) {
                        if (null == (o = this.TextureUserContext.getImageData(0, 0, this.CanvasWidth, this.CanvasHeight))) return 1;
                        for (var e = 0; e &lt; o.data.length; e += 4) o.data[e + 3] &amp;&amp; o.data[e + 3] &gt; 0 &amp;&amp; t++
                    } else {
                        var o;
                        if (null == (o = this.OriginalData)) return 1;
                        for (e = 0; e &lt; o.data.length; e += 4) o.data[e + 3] &amp;&amp; o.data[e + 3] &gt; 0 &amp;&amp; t++
                    }
                    return t
                }, e.prototype.getTotalPixels = function (t) {
                    var e = 0,
                        o = this.getPatternDataUsingIndex(t);
                    if (null == o) return 1;
                    for (var i = 0; i &lt; o.data.length; i += 4) o.data[i + 3] &amp;&amp; o.data[i + 3] &gt; 0 &amp;&amp; e++;
                    return e
                }, e.prototype.getDrawingPercentage = function (t) {
                    void 0 === t &amp;&amp; (t = 1);
                    var e = this.getTotalPixels(t),
                        o = this.getDrawingPixels();
                    return this.isDefault ? e / o * 100 : o / e * 100
                }, a([s], e)
            }(cc.Component));
        o.default = l, cc._RF.pop()
    }, {
        "./UserDrawing": "UserDrawing"
    }],
    CocosHelper: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "7f9c3QfZo5Cbp1EblnOZWF3", "CocosHelper");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        }), o.getRegionDragon = o.getTextureHeightDragon = o.getTextureWidthDragon = o.getTextureSizeDragon = o.getTextureSize = o.getRegion = o.PrintAllRegion = o.ShowSlotSpine = o.HideSlotSpine = o.PrintAllSlotSpine = o.getAnimationDuration = o.getAnimationList = o.getSlot = o.PrintAllSlot = o.ShowSlot = o.HideSlot = o.shuffleArray = o.getRandomFloat = o.getRandomNumber = o.Padding = void 0;
        var s = t("../Promotion/AdManager"),
            l = cc._decorator,
            h = l.ccclass,
            d = (l.property, function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.prefab = [], e.isSwitchTab = !1, e.ItemIndex = [], e.isLevelDone = [!1, !1, !1, !1, !1], e.LoadedTexture = [], e.Canvas = null, e.Context = null, e.tempUserTexture = null, e
                }
                var o;
                return n(e, t), o = e, e.getInstance = function () {
                    return o.instance || (o.instance = new o, o.instance.registerEvent()), o.instance
                }, e.prototype.registerEvent = function () {
                    cc.game.on(cc.game.EVENT_SHOW, o.instance.gameResume, o.instance), cc.game.on(cc.game.EVENT_HIDE, o.instance.gamePause, o.instance), this.Canvas = document.createElement("canvas"), this.Context = this.Canvas.getContext("2d"), this.tempUserTexture = new cc.Texture2D
                }, e.prototype.reShuffleArray = function () {
                    p(this.ItemIndex)
                }, e.prototype.gameResume = function () {
                    s.default.getInstance().isSwitchTab = !1, s.default.getInstance().isAdRunningOrNot() ? (cc.game.pause(), s.default.getInstance().MuteSound()) : (cc.game.resume(), s.default.getInstance().StartSound())
                }, e.prototype.gamePause = function () {
                    cc.game.pause(), s.default.getInstance().isSwitchTab = !0, s.default.getInstance().MuteSound(), console.log("Game Pause")
                }, e.prototype.initSDK = function () { }, e.prototype.loadPromotion = function () {
                    var t = this,
                        e = this;
                    return new Promise(function (o, i) {
                        0 == t.prefab.length ? cc.loader.loadResDir("/Prefab", function (t, n) {
                            if (t) i(!1);
                            else {
                                if (0 == e.prefab.length)
                                    for (var a = 0, r = n; a &lt; r.length; a++) {
                                        var c = r[a];
                                        e.prefab.push(c)
                                    }
                                o(!0)
                            }
                        }) : o(!0)
                    })
                }, e.prototype.addLogo = function (t, e) {
                    return r(this, void 0, void 0, function () {
                        var o, i, n, a, r;
                        return c(this, function (c) {
                            switch (c.label) {
                                case 0:
                                    return 0 != (o = this).prefab.length ? [3, 2] : [4, this.loadPromotion()];
                                case 1:
                                    c.sent(), c.label = 2;
                                case 2:
                                    for (i = 0, n = o.prefab; i &lt; n.length; i++)
                                        if ("logo" == (a = n[i]).name) {
                                            r = cc.instantiate(a), t.addChild(r), r.position = e;
                                            break
                                        }
                                    return [2]
                            }
                        })
                    })
                }, e.prototype.addMore = function (t, e) {
                    return r(this, void 0, void 0, function () {
                        var o, i, n, a, r;
                        return c(this, function (c) {
                            switch (c.label) {
                                case 0:
                                    return 0 != (o = this).prefab.length ? [3, 2] : [4, this.loadPromotion()];
                                case 1:
                                    c.sent(), c.label = 2;
                                case 2:
                                    for (i = 0, n = o.prefab; i &lt; n.length; i++)
                                        if ("more" == (a = n[i]).name) {
                                            r = cc.instantiate(a), t.addChild(r), r.position = e;
                                            break
                                        }
                                    return [2]
                            }
                        })
                    })
                }, e.prototype.addPromotion = function (t) {
                    return r(this, void 0, void 0, function () {
                        var e, o, i, n, a;
                        return c(this, function (r) {
                            switch (r.label) {
                                case 0:
                                    return 0 != (e = this).prefab.length ? [3, 2] : [4, this.loadPromotion()];
                                case 1:
                                    r.sent(), r.label = 2;
                                case 2:
                                    for (o = 0, i = e.prefab; o &lt; i.length; o++)
                                        if ("promotion" == (n = i[o]).name) {
                                            a = cc.instantiate(n), t.addChild(a), a.position = cc.v3(56565, 56565, 5656565);
                                            break
                                        }
                                    return [2]
                            }
                        })
                    })
                }, e.prototype.ShowPromotion = function (t) {
                    t.getChildByName("promotion") &amp;&amp; (t.getChildByName("promotion").position = cc.Vec3.ZERO, t.getChildByName("more") &amp;&amp; (t.getChildByName("more").active = !1, console.log("more hide")), t.getChildByName("logo") &amp;&amp; (t.getChildByName("logo").active = !1))
                }, e.prototype.ShowRewardFailedPopup = function () {
                    if (console.log("ShowRewardFailedPopup"), cc.find("Canvas/RewardFailPopup")) cc.game.emit("RewarFailed.Open");
                    else
                        for (var t = 0, e = this.prefab; t &lt; e.length; t++) {
                            var o = e[t];
                            if ("RewardFailPopup" == o.name) {
                                var i = cc.instantiate(o);
                                cc.find("Canvas").addChild(i), i.position = cc.Vec3.ZERO, i.active = !0;
                                break
                            }
                        }
                }, e.prototype.LoadTexture = function (t, e, o, i) {
                    return r(this, void 0, void 0, function () {
                        var n, a, s = this;
                        return c(this, function () {
                            return i &amp;&amp; (this.Canvas.width = e.width, this.Canvas.height = e.height, n = new Image, a = y(t, o), n.onload = function () {
                                return r(s, void 0, void 0, function () {
                                    return c(this, function () {
                                        return this.Context.clearRect(0, 0, e.width, e.height), this.Context.drawImage(n, a.x, a.y), this.tempUserTexture = new cc.Texture2D, this.tempUserTexture.initWithElement(this.Canvas), this.LoadedTexture.push({
                                            key: i,
                                            value: this.tempUserTexture
                                        }), [2]
                                    })
                                })
                            }, n.src = i), [2]
                        })
                    })
                }, e.prototype.UpdateTexture = function (t, e, o, i) {
                    this.Canvas.width = e.width, this.Canvas.height = e.height;
                    var n = y(t, o);
                    return this.Context.clearRect(0, 0, e.width, e.height), this.Context.putImageData(i, n.x, n.y), this.tempUserTexture = new cc.Texture2D, this.tempUserTexture.initWithElement(this.Canvas), this.tempUserTexture
                }, e.prototype.LoadTextureAsync = function (t, e, o) {
                    return r(this, void 0, void 0, function () {
                        var i;
                        return c(this, function (n) {
                            switch (n.label) {
                                case 0:
                                    console.time("start"), i = 0, n.label = 1;
                                case 1:
                                    return i &lt; o.length ? null != this.getTexture(o[i].value) ? [3, 3] : [4, this.LoadTexture(t, e, o[i].slotname, o[i].value)] : [3, 4];
                                case 2:
                                    n.sent(), n.label = 3;
                                case 3:
                                    return i++, [3, 1];
                                case 4:
                                    return console.timeEnd("start"), console.log("Load All"), [2]
                            }
                        })
                    })
                }, e.prototype.getTexture = function (t) {
                    for (var e = 0; e &lt; this.LoadedTexture.length; e++)
                        if (this.LoadedTexture[e].key == t) return this.LoadedTexture[e].value;
                    return null
                }, e.prototype.loadTexture = function (t, e, o) {
                    return r(this, void 0, void 0, function () {
                        return c(this, function (i) {
                            switch (i.label) {
                                case 0:
                                    return null != this.getTexture(o.value) ? [3, 2] : [4, this.LoadTexture(t, e, o.slotname, o.value)];
                                case 1:
                                    i.sent(), i.label = 2;
                                case 2:
                                    return [2]
                            }
                        })
                    })
                }, o = a([h], e)
            }(cc.Component));

        function p(t) {
            for (var e = t.length - 1; e &gt; 0; e--) {
                var o = Math.floor(Math.random() * (e + 1)),
                    i = t[e];
                t[e] = t[o], t[o] = i
            }
        }

        function u(t) {
            return t.dragonAtlasAsset.texture.width
        }

        function f(t) {
            return t.dragonAtlasAsset.texture.height
        }

        function y(t, e) {
            return t.armature().getSlot(e)._displayData.texture.region
        }
        o.default = d, o.Padding = function (t, e) {
            for (; t.length != e;) t = "0" + t;
            return t
        }, o.getRandomNumber = function (t, e) {
            return Math.floor(Math.random() * (e - t + 1)) + t
        }, o.getRandomFloat = function (t, e) {
            return Math.random() * (e - t) + t
        }, o.shuffleArray = p, o.HideSlot = function (t, e) {
            var o = t.armature();
            o.getSlots().forEach(function (t) {
                t.name == e &amp;&amp; (o.getSlot(e).offset.scaleX = 0, o.getSlot(e).invalidUpdate())
            })
        }, o.ShowSlot = function (t, e) {
            var o = t.armature();
            o.getSlots().forEach(function (t) {
                t.name == e &amp;&amp; (o.getSlot(e).offset.scaleX = 1, o.getSlot(e).invalidUpdate())
            })
        }, o.PrintAllSlot = function (t) {
            t.armature().getSlots().forEach(function (t) {
                console.log(t.name)
            })
        }, o.getSlot = function (t) {
            return t.armature().getSlot(name)
        }, o.getAnimationList = function (t) {
            for (var e = [], o = t.getAnimationNames(t.armatureName), i = 0; i &lt; o.length; i++) e.push(o[i]);
            return e
        }, o.getAnimationDuration = function (t, e) {
            var o = 0;
            if (t.armature().animation.animations[e] &amp;&amp; (o = t.armature().animation.animations[e].duration), o) return o
        }, o.PrintAllSlotSpine = function (t) {
            t.skeletonData.skeletonJson.slots.forEach(function (t) {
                console.log(t.name)
            })
        }, o.HideSlotSpine = function (t, e) {
            var o = t.findSlot(e);
            o &amp;&amp; (o.color = cc.color(o.color.r, o.color.g, o.color.b, 0))
        }, o.ShowSlotSpine = function (t, e) {
            var o = t.findSlot(e);
            o &amp;&amp; (o.color = cc.color(o.color.r, o.color.g, o.color.b, 1))
        }, o.PrintAllRegion = function (t) {
            t.skeletonData._atlasCache.regions.forEach(function (t) {
                console.log(t.name)
            })
        }, o.getRegion = function (t, e) {
            var o = null;
            return t.skeletonData._atlasCache.regions.forEach(function (t) {
                t.name == e &amp;&amp; (o = cc.rect(t.x, t.y, t.width, t.height))
            }), o
        }, o.getTextureSize = function (t) {
            return cc.size(t.skeletonData.textures[0].width, t.skeletonData.textures[0].height)
        }, o.getTextureSizeDragon = function (t) {
            return cc.size(u(t), f(t))
        }, o.getTextureWidthDragon = u, o.getTextureHeightDragon = f, o.getRegionDragon = y, cc._RF.pop()
    }, {
        "../Promotion/AdManager": "AdManager"
    }],
    DesignScene: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "a678269WWpB3o17gi2eATEs", "DesignScene");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var s = t("../../../Scripts/Helper/AudioManager"),
            l = t("../../../Scripts/Helper/HelperTools"),
            h = t("../../../Scripts/Promotion/AdManager"),
            d = cc._decorator,
            p = d.ccclass,
            u = (d.property, function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.MainPanel = null, e.SubPanel = [], e.SubScroll = [], e.MainScroll = null, e
                }
                return n(e, t), e.prototype.onLoad = function () {
                    this.indata()
                }, e.prototype.start = function () {
                    var t = this;
                    cc.tween(this.MainPanel).delay(1).call(function () {
                        cc.tween(t.MainPanel).to(.5, {
                            position: cc.Vec3.ZERO
                        }).start(), t.ButtonAction()
                    }).start()
                }, e.prototype.MainPanelAction = function (t) {
                    switch (s.default.getInstance().play("click"), t.target.name) {
                        case "Panel1":
                            cc.tween(this.MainPanel).to(.5, {
                                position: cc.v3(-300, 0, 0)
                            }).start(), cc.tween(this.SubPanel[1]).to(.5, {
                                position: cc.Vec3.ZERO
                            }).start();
                            break;
                        case "Panel2":
                            cc.tween(this.MainPanel).to(.5, {
                                position: cc.v3(-300, 0, 0)
                            }).start(), cc.tween(this.SubPanel[2]).to(.5, {
                                position: cc.Vec3.ZERO
                            }).start();
                            break;
                        case "Panel3":
                            cc.tween(this.MainPanel).to(.5, {
                                position: cc.v3(-300, 0, 0)
                            }).start(), cc.tween(this.SubPanel[3]).to(.5, {
                                position: cc.Vec3.ZERO
                            }).start()
                    }
                }, e.prototype.SubPanelAction = function (t) {
                    return r(this, void 0, void 0, function () {
                        var e, o, i, n;
                        return c(this, function (a) {
                            switch (a.label) {
                                case 0:
                                    for (s.default.getInstance().play("click"), e = 1; e &lt; 4; e++) cc.find("Canvas/MainNode/GateButtonNode/SubPanel" + e).children.forEach(function (t) {
                                        "Close" != t.name &amp;&amp; "Selected" != t.name &amp;&amp; (t.getComponent(cc.Button).interactable = !0)
                                    });
                                    o = 1, a.label = 1;
                                case 1:
                                    return o &lt; 4 ? (i = !1, t.target.parent.name != "SubPanel" + o ? [3, 4] : 2 != o ? [3, 3] : t.target.childrenCount &gt; 0 ? [4, h.default.getInstance().requestRewardAds(t.target.children[0])] : [3, 3]) : [3, 5];
                                case 2:
                                    if (!a.sent()) return [2];
                                    a.label = 3;
                                case 3:
                                    "Close" == t.target.name ? (cc.tween(this.SubPanel[o]).to(.5, {
                                        position: cc.v3(-300, 0, 0)
                                    }).start(), cc.tween(this.MainPanel).to(.5, {
                                        position: cc.Vec3.ZERO
                                    }).start()) : (t.target.getComponent(cc.Button).interactable = !1, n = cc.find("Canvas/MainNode/Loader/SidePanel" + o + "/" + t.target.name).getComponent(cc.Sprite).spriteFrame, cc.find("Canvas/MainNode/FullGateNode/Item" + o).active = !0, 1 == o || 3 == o ? cc.find("Canvas/ParticleTool2").children.forEach(function (t) {
                                        t.active = !0, s.default.getInstance().play("completion"), t.getComponent(cc.ParticleSystem).resetSystem()
                                    }) : this.ShowParticle(cc.find("Canvas/MainNode/FullGateNode/Item2")), cc.find("Canvas/MainNode/FullGateNode/Item" + o).opacity = 254, cc.find("Canvas/MainNode/FullGateNode/Item" + o).getComponent(cc.Sprite).spriteFrame = n, cc.find("Canvas/MainNode/GateButtonNode/SubPanel" + o + "/Selected").active = !0, cc.find("Canvas/MainNode/GateButtonNode/SubPanel" + o + "/Selected").position = t.target.position, 254 == cc.find("Canvas/MainNode/FullGateNode/Item1").opacity &amp;&amp; 254 == cc.find("Canvas/MainNode/FullGateNode/Item2").opacity &amp;&amp; 254 == cc.find("Canvas/MainNode/FullGateNode/Item3").opacity &amp;&amp; (i = !0), 1 == i &amp;&amp; (cc.find("Canvas/MainNode/Done").active = !0)), a.label = 4;
                                case 4:
                                    return o++, [3, 1];
                                case 5:
                                    return [2]
                            }
                        })
                    })
                }, e.prototype.DoneAction = function (t) {
                    var e = this;
                    s.default.getInstance().play("click"), s.default.getInstance().play("level_complete"), t.target.active = !1;
                    for (var o = 1; o &lt; 4; o++) cc.tween(this.SubPanel[o]).to(.5, {
                        position: cc.v3(-300, 0, 0)
                    }).start();
                    cc.find("Canvas/Particle").active = !0, cc.find("Canvas/Particle").getComponent(cc.ParticleSystem).resetSystem(), cc.tween(this.MainPanel).to(.5, {
                        position: cc.v3(-300, 0, 0)
                    }).start(), cc.tween(this.node).delay(1).call(function () {
                        cc.find("Canvas/HorseDecoration").active = !0, cc.tween(e.MainScroll).to(.5, {
                            position: cc.Vec3.ZERO
                        }).start(), s.default.getInstance().play("Horse")
                    }).start()
                }, e.prototype.MainScrollAction = function (t) {
                    s.default.getInstance().play("click");
                    for (var e = 1; e &lt; 6; e++) switch (t.target.name) {
                        case "Main" + e:
                            cc.tween(this.MainScroll).to(.5, {
                                position: cc.v3(-300, 0, 0)
                            }).start(), cc.tween(this.SubScroll[e]).to(.5, {
                                position: cc.v3(-335, 0, 0)
                            }).start()
                    }
                }, e.prototype.SubScrollAction = function (t) {
                    return r(this, void 0, void 0, function () {
                        var e, o, i, n;
                        return c(this, function (a) {
                            switch (a.label) {
                                case 0:
                                    for (s.default.getInstance().play("click"), e = 1; e &lt; 6; e++) cc.find("Canvas/HorseDecoration/AllButtonNode/SubPanel" + e + "/view/content").children.forEach(function (t) {
                                        "Select" != t.name &amp;&amp; (t.getComponent(cc.Button).interactable = !0)
                                    });
                                    o = !1, i = 1, a.label = 1;
                                case 1:
                                    return i &lt; 6 ? t.target.parent.parent.parent.name != "SubPanel" + i ? [3, 4] : 2 != i &amp;&amp; 3 != i ? [3, 3] : t.target.childrenCount &gt; 0 ? [4, h.default.getInstance().requestRewardAds(t.target.children[0])] : [3, 3] : [3, 5];
                                case 2:
                                    if (!a.sent()) return [2];
                                    a.label = 3;
                                case 3:
                                    t.target.getComponent(cc.Button).interactable = !1, n = cc.find("Canvas/HorseDecoration/Loader/Panel" + i + "/" + t.target.name).getComponent(cc.Sprite).spriteFrame, cc.find("Canvas/HorseDecoration/Decoration/Item" + i).active = !0, this.ShowParticle(cc.find("Canvas/HorseDecoration/Decoration/Item" + i)), cc.find("Canvas/HorseDecoration/Decoration/Item" + i).getComponent(cc.Sprite).spriteFrame = n, cc.find("Canvas/HorseDecoration/AllButtonNode/SubPanel" + i + "/view/content/Select").active = !0, cc.find("Canvas/HorseDecoration/AllButtonNode/SubPanel" + i + "/view/content/Select").position = t.target.position, 0 != cc.find("Canvas/HorseDecoration/Decoration/Item1").active &amp;&amp; 0 != cc.find("Canvas/HorseDecoration/Decoration/Item2").active &amp;&amp; 0 != cc.find("Canvas/HorseDecoration/Decoration/Item3").active &amp;&amp; 0 != cc.find("Canvas/HorseDecoration/Decoration/Item4").active &amp;&amp; 0 != cc.find("Canvas/HorseDecoration/Decoration/Item5").active &amp;&amp; (o = !0), a.label = 4;
                                case 4:
                                    return i++, [3, 1];
                                case 5:
                                    return 1 == o &amp;&amp; (cc.find("Canvas/HorseDecoration/Complete").active = !0), [2]
                            }
                        })
                    })
                }, e.prototype.ScrollViewUpAndDown = function (t) {
                    s.default.getInstance().play("click");
                    var e = t.target;
                    console.log(e.name), "Down" == e.name &amp;&amp; (e.parent.getComponent(cc.ScrollView).scrollToBottom(0), e.parent.getChildByName("Up").active = !0, e.active = !1), "Up" == e.name &amp;&amp; (e.parent.getComponent(cc.ScrollView).scrollToTop(0), e.parent.getChildByName("Down").active = !0, e.active = !1), "Close" == e.name &amp;&amp; (cc.tween(e.parent).to(.5, {
                        position: cc.v3(-600, 0, 0)
                    }).start(), cc.tween(this.MainScroll).to(.5, {
                        position: cc.Vec3.ZERO
                    }).start())
                }, e.prototype.CompleteAction = function (t) {
                    return r(this, void 0, void 0, function () {
                        var e;
                        return c(this, function (o) {
                            switch (o.label) {
                                case 0:
                                    for (t.target, s.default.getInstance().play("click"), s.default.getInstance().play("level_complete"), t.target.active = !1, e = 1; e &lt; 6; e++) cc.tween(this.SubScroll[e]).to(.5, {
                                        position: cc.v3(-600, 0, 0)
                                    }).start();
                                    return cc.tween(this.MainScroll).to(.5, {
                                        position: cc.v3(-300, 0, 0)
                                    }).start(), cc.find("Canvas/Particle").getComponent(cc.ParticleSystem).resetSystem(), h.default.getInstance().requestAds(), [4, l.DelayForScene(.3)];
                                case 1:
                                    return o.sent(), cc.director.loadScene("LevelScene"), [2]
                            }
                        })
                    })
                }, e.prototype.ShowParticle = function (t, e) {
                    void 0 === e &amp;&amp; (e = cc.v3());
                    var o = cc.find("Canvas/ParticleToolComplete");
                    o.position = cc.v3(t.x + e.x, t.y + e.y, t.z + e.z), o.active = !0, s.default.getInstance().play("completion"), o.getComponent(cc.ParticleSystem).resetSystem()
                }, e.prototype.ButtonAction = function () {
                    cc.tween(cc.find("Canvas/MainNode/Done")).sequence(cc.tween(cc.find("Canvas/MainNode/Done")).to(.5, {
                        scale: .8
                    }).start(), cc.tween(cc.find("Canvas/MainNode/Done")).to(.5, {
                        scale: 1
                    }).start()).union().repeatForever().start(), cc.tween(cc.find("Canvas/HorseDecoration/Complete")).sequence(cc.tween(cc.find("Canvas/HorseDecoration/Complete")).to(.5, {
                        scale: .8
                    }).start(), cc.tween(cc.find("Canvas/HorseDecoration/Complete")).to(.5, {
                        scale: .85
                    }).start()).union().repeatForever().start()
                }, e.prototype.indata = function () {
                    this.MainPanel = cc.find("Canvas/MainNode/GateMainButtonNode"), this.MainScroll = cc.find("Canvas/HorseDecoration/MainPanel"), this.SubPanel[1] = cc.find("Canvas/MainNode/GateButtonNode/SubPanel1"), this.SubPanel[2] = cc.find("Canvas/MainNode/GateButtonNode/SubPanel2"), this.SubPanel[3] = cc.find("Canvas/MainNode/GateButtonNode/SubPanel3"), this.SubScroll[1] = cc.find("Canvas/HorseDecoration/AllButtonNode/SubPanel1"), this.SubScroll[2] = cc.find("Canvas/HorseDecoration/AllButtonNode/SubPanel2"), this.SubScroll[3] = cc.find("Canvas/HorseDecoration/AllButtonNode/SubPanel3"), this.SubScroll[4] = cc.find("Canvas/HorseDecoration/AllButtonNode/SubPanel4"), this.SubScroll[5] = cc.find("Canvas/HorseDecoration/AllButtonNode/SubPanel5");
                    for (var t = 1; t &lt; 4; t++) cc.find("Canvas/MainNode/GateButtonNode/SubPanel" + t).children.forEach(function (t) {
                        if ("Selected" != t.name) {
                            t.addComponent(cc.Button);
                            var e = new cc.Component.EventHandler;
                            e.target = cc.find("Canvas"), e.component = "DesignScene", e.handler = "SubPanelAction", e.customEventData = "";
                            var o = t.getComponent(cc.Button);
                            o.clickEvents.push(e), o.transition = cc.Button.Transition.SCALE, o.zoomScale = 1.1
                        }
                    });
                    for (t = 1; t &lt; 6; t++) cc.find("Canvas/HorseDecoration/AllButtonNode/SubPanel" + t + "/view/content").children.forEach(function (t) {
                        if ("Select" != t.name) {
                            t.addComponent(cc.Button);
                            var e = new cc.Component.EventHandler;
                            e.target = cc.find("Canvas"), e.component = "DesignScene", e.handler = "SubScrollAction", e.customEventData = "";
                            var o = t.getComponent(cc.Button);
                            o.clickEvents.push(e), o.transition = cc.Button.Transition.SCALE, o.zoomScale = 1.1
                        }
                    });
                    for (t = 1; t &lt; 6; t++) cc.find("Canvas/HorseDecoration/AllButtonNode/SubPanel" + t).children.forEach(function (t) {
                        if ("scrollBar" != t.name &amp;&amp; "view" != t.name) {
                            t.addComponent(cc.Button);
                            var e = new cc.Component.EventHandler;
                            e.target = cc.find("Canvas"), e.component = "DesignScene", e.handler = "ScrollViewUpAndDown", e.customEventData = "";
                            var o = t.getComponent(cc.Button);
                            o.clickEvents.push(e), o.transition = cc.Button.Transition.SCALE, o.zoomScale = 1.1
                        }
                    })
                }, e.prototype.RewardCallback = function (t) {
                    var e = t.parent;
                    if ("SubPanel2" == e.parent.name) {
                        var o = !1,
                            i = e.parent.name,
                            n = Number(i.charAt(i.length - 1));
                        e.getComponent(cc.Button).interactable = !1;
                        var a = cc.find("Canvas/MainNode/Loader/SidePanel" + n + "/" + e.name).getComponent(cc.Sprite).spriteFrame;
                        cc.find("Canvas/MainNode/FullGateNode/Item" + n).active = !0, 1 == n || 3 == n ? cc.find("Canvas/ParticleTool2").children.forEach(function (t) {
                            t.active = !0, s.default.getInstance().play("completion"), t.getComponent(cc.ParticleSystem).resetSystem()
                        }) : this.ShowParticle(cc.find("Canvas/MainNode/FullGateNode/Item2")), cc.find("Canvas/MainNode/FullGateNode/Item" + n).opacity = 254, cc.find("Canvas/MainNode/FullGateNode/Item" + n).getComponent(cc.Sprite).spriteFrame = a, cc.find("Canvas/MainNode/GateButtonNode/SubPanel" + n + "/Selected").active = !0, cc.find("Canvas/MainNode/GateButtonNode/SubPanel" + n + "/Selected").position = e.position, 254 == cc.find("Canvas/MainNode/FullGateNode/Item1").opacity &amp;&amp; 254 == cc.find("Canvas/MainNode/FullGateNode/Item2").opacity &amp;&amp; 254 == cc.find("Canvas/MainNode/FullGateNode/Item3").opacity &amp;&amp; (o = !0), 1 == o &amp;&amp; (cc.find("Canvas/MainNode/Done").active = !0)
                    }
                    "AllButtonNode" == e.parent.parent.parent.parent.name &amp;&amp; (i = e.parent.parent.parent.name, n = Number(i.charAt(i.length - 1)), o = !1, e.getComponent(cc.Button).interactable = !1, a = cc.find("Canvas/HorseDecoration/Loader/Panel" + n + "/" + e.name).getComponent(cc.Sprite).spriteFrame, cc.find("Canvas/HorseDecoration/Decoration/Item" + n).active = !0, this.ShowParticle(cc.find("Canvas/HorseDecoration/Decoration/Item" + n)), cc.find("Canvas/HorseDecoration/Decoration/Item" + n).getComponent(cc.Sprite).spriteFrame = a, cc.find("Canvas/HorseDecoration/AllButtonNode/SubPanel" + n + "/view/content/Select").active = !0, cc.find("Canvas/HorseDecoration/AllButtonNode/SubPanel" + n + "/view/content/Select").position = e.position, 0 != cc.find("Canvas/HorseDecoration/Decoration/Item1").active &amp;&amp; 0 != cc.find("Canvas/HorseDecoration/Decoration/Item2").active &amp;&amp; 0 != cc.find("Canvas/HorseDecoration/Decoration/Item3").active &amp;&amp; 0 != cc.find("Canvas/HorseDecoration/Decoration/Item4").active &amp;&amp; 0 != cc.find("Canvas/HorseDecoration/Decoration/Item5").active &amp;&amp; (o = !0), 1 == o &amp;&amp; (cc.find("Canvas/HorseDecoration/Complete").active = !0))
                }, a([p], e)
            }(cc.Component));
        o.default = u, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager",
        "../../../Scripts/Helper/HelperTools": "HelperTools",
        "../../../Scripts/Promotion/AdManager": "AdManager"
    }],
    FloodFill: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "21697Hu31lOfrYox3z04ZVQ", "FloodFill"), Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var i = t("./colorUtils"),
            n = function () {
                function t(t, e) {
                    this.collectModifiedPixels = !1, this.modifiedPixelsCount = 0, this.modifiedPixels = new Set, this.isEnabledPattern = !1, this._tolerance = 0, this._queue = [], this.modifiedPixelsIndex = [], this.imageData = t, this.PatternimageData = e, this.isSameColor = i.isSameColor, this.setColorAtPixel = i.setColorAtPixel, this.getColorAtPixel = i.getColorAtPixel
                }
                return t.prototype.fill = function (t, e, o, i) {
                    this._newColor = t, this._replacedColor = this.getColorAtPixel(this.imageData, e, o), this._replacedColor.r &lt; 10 &amp;&amp; this._replacedColor.g &lt; 10 &amp;&amp; this._replacedColor.b &lt; 10 || (this._tolerance = i, this.isSameColor(this._replacedColor, this._newColor, this._tolerance) || (this.modifiedPixelsIndex.splice(0, this.modifiedPixelsIndex.length), this.addToQueue([e, e, o, -1]), this.fillQueue()))
                }, t.prototype.addToQueue = function (t) {
                    this._queue.push(t)
                }, t.prototype.popFromQueue = function () {
                    return this._queue.length ? this._queue.pop() : null
                }, t.prototype.isValidTarget = function (t) {
                    if (null !== t) {
                        var e = this.getColorAtPixel(this.imageData, t.x, t.y);
                        return this.isSameColor(this._replacedColor, e, this._tolerance)
                    }
                }, t.prototype.fillLineAt = function (t, e) {
                    if (!this.isValidTarget({
                        x: t,
                        y: e
                    })) return [-1, -1];
                    this.setPixelColor(this._newColor, {
                        x: t,
                        y: e
                    });
                    for (var o = t, i = t, n = this.getPixelNeighbour("left", o, e); n &amp;&amp; this.isValidTarget(n);) this.setPixelColor(this._newColor, n), o = n.x, n = this.getPixelNeighbour("left", o, e);
                    for (n = this.getPixelNeighbour("right", i, e); n &amp;&amp; this.isValidTarget(n);) this.setPixelColor(this._newColor, n), i = n.x, n = this.getPixelNeighbour("right", i, e);
                    return [o, i]
                }, t.prototype.fillQueue = function () {
                    for (var t = this.popFromQueue(); t;) {
                        for (var e = t[0], o = t[1], i = t[2], n = t[3], a = e; - 1 !== a &amp;&amp; a &lt;= o;) {
                            var r = this.fillLineAt(a, i),
                                c = r[0],
                                s = r[1]; - 1 !== c &amp;&amp; (c &gt;= e &amp;&amp; s &lt;= o &amp;&amp; -1 !== n ? (n &lt; i &amp;&amp; i + 1 &lt; this.imageData.height &amp;&amp; this.addToQueue([c, s, i + 1, i]), n &gt; i &amp;&amp; i &gt; 0 &amp;&amp; this.addToQueue([c, s, i - 1, i])) : (i &gt; 0 &amp;&amp; this.addToQueue([c, s, i - 1, i]), i + 1 &lt; this.imageData.height &amp;&amp; this.addToQueue([c, s, i + 1, i]))), -1 === s &amp;&amp; a &lt;= o ? a += 1 : a = s + 1
                        }
                        t = this.popFromQueue()
                    }
                }, t.prototype.setPixelColor = function (t, e) {
                    this.setColorAtPixel(this.imageData, this.PatternimageData, this.isEnabledPattern, t, e.x, e.y), this.modifiedPixelsIndex.push(cc.v2(e.x, e.y)), this.modifiedPixelsCount++, this.collectModifiedPixels &amp;&amp; this.modifiedPixels.add(e.x + "|" + e.y)
                }, t.prototype.getPixelNeighbour = function (t, e, o) {
                    var i;
                    switch (e |= 0, o |= 0, t) {
                        case "right":
                            i = {
                                x: e + 1 | 0,
                                y: o
                            };
                            break;
                        case "left":
                            i = {
                                x: e - 1 | 0,
                                y: o
                            }
                    }
                    return i.x &gt;= 0 &amp;&amp; i.x &lt; this.imageData.width ? i : null
                }, t
            }();
        o.default = n, cc._RF.pop()
    }, {
        "./colorUtils": "colorUtils"
    }],
    GardenStarting: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "e7cdchSXYBM34AFcETRRhk3", "GardenStarting");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var r = t("../../../../Scripts/Helper/AudioManager"),
            c = cc._decorator,
            s = c.ccclass,
            l = (c.property, function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.Girl = null, e
                }
                return n(e, t), e.prototype.onLoad = function () {
                    cc.game.on("StartStory", this.StartView, this), this.Girl = cc.find("SafeArea/Girl", this.node), r.default.getInstance().add("ohgarden", cc.find("SafeArea/Sound/ohgarden", this.node).getComponent(cc.AudioSource).clip)
                }, e.prototype.start = function () { }, e.prototype.StartView = function () {
                    var t = this;
                    this.node.children[0].active = !0, this.Girl.getComponent(cc.Animation).playAdditive("GardenStarting"), this.Girl.getComponent(cc.Animation).playAdditive("GardenStartingEye");
                    var e = r.default.getInstance().play("ohgarden");
                    cc.tween(this.node).delay(e).call(function () {
                        cc.find("SafeArea/NextButton", t.node).active = !0, t.Girl.getComponent(cc.Animation).stop("GardenStarting")
                    }).start()
                }, e.prototype.NextButton = function (t) {
                    var e = t.target;
                    r.default.getInstance().play("click"), e.getComponent(cc.Button).interactable = !1, this.node.children[0].active = !1, cc.game.emit("StartView")
                }, a([s], e)
            }(cc.Component));
        o.default = l, cc._RF.pop()
    }, {
        "../../../../Scripts/Helper/AudioManager": "AudioManager"
    }],
    Garden: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "941c8lDAMtOxbVDFsGwzxGx", "Garden");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        }), o.Tool_Type = void 0;
        var s, l = t("../../../Scripts/Helper/AudioManager"),
            h = t("../../../Scripts/Helper/HelperTools"),
            d = t("../../../Scripts/Promotion/AdManager"),
            p = cc._decorator,
            u = p.ccclass,
            f = p.property;
        (function (t) {
            t[t.MOP = 1] = "MOP", t[t.DUSTER_BRUSH = 2] = "DUSTER_BRUSH", t[t.BROOM = 3] = "BROOM", t[t.WATER_SPRAY = 4] = "WATER_SPRAY", t[t.TOWEL = 5] = "TOWEL", t[t.SCISSOR = 6] = "SCISSOR", t[t.FLOWER = 7] = "FLOWER", t[t.DUSTBIN = 8] = "DUSTBIN", t[t.JIGSAW = 9] = "JIGSAW"
        })(s = o.Tool_Type || (o.Tool_Type = {}));
        var y = function (t) {
            function e() {
                var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                return e.dustBinObject = null, e.dustBin = null, e.cleaningToolNode = null, e.moveItem = null, e.canMoveTool = !1, e.toolType = 0, e.toolIndex = 0, e.toolStartPos = cc.Vec2.ZERO, e.mopDirtNode = null, e.spiderDirtNode = null, e.broomDirtNode = null, e.waterSprayNode = null, e.mirrorDirtNode = null, e.flowerNode = null, e.scissorNode = null, e.brokenBench = null, e.benchPopup = null, e.toolPositions = [], e.arrow = null, e.hintNode = null, e.hand = null, e.isBenchCompleted = !1, e
            }
            return n(e, t), e.prototype.onLoad = function () {
                l.default.getInstance()
            }, e.prototype.start = function () {
                return r(this, void 0, void 0, function () {
                    return c(this, function (t) {
                        switch (t.label) {
                            case 0:
                                return this.initPropertyNodes(), this.registerEvents(), cc.game.on("StartView", this.StartView, this), [4, h.Delay(.3)];
                            case 1:
                                return t.sent(), cc.game.emit("StartStory"), [2]
                        }
                    })
                })
            }, e.prototype.StartView = function () {
                this.schedule(this.addHandHint, 5)
            }, e.prototype.initPropertyNodes = function () {
                this.mopDirtNode = cc.find("Canvas/CleaningArea/Garden_Dirt"), this.spiderDirtNode = cc.find("Canvas/CleaningArea/SpiderDirt"), this.broomDirtNode = cc.find("Canvas/CleaningArea/G_road"), this.waterSprayNode = cc.find("Canvas/CleaningArea/Water"), this.mirrorDirtNode = cc.find("Canvas/CleaningArea/StatueDirt"), this.flowerNode = cc.find("Canvas/CleaningArea/G_flower"), this.scissorNode = cc.find("Canvas/CleaningArea/G_roadTree"), this.arrow = cc.find("Canvas/CleaningArea/arrow"), this.hintNode = cc.find("Canvas/HIntNode"), this.brokenBench = cc.find("Canvas/CleaningArea/G_benches/GV_benchBroken"), this.benchPopup = cc.find("Canvas/JigsawPopup"), this.hand = cc.find("Canvas/Hand");
                for (var t = 1; t &lt;= 7; t++) {
                    var e = this.cleaningToolNode.getChildByName(t.toFixed());
                    this.toolPositions.push(e.getPosition())
                }
            }, e.prototype.addHint = function (t) {
                switch (this.hintNode.children.forEach(function (t) {
                    t.children.forEach(function (t) {
                        t.active = !1
                    })
                }), t) {
                    case s.DUSTBIN:
                        var e = cc.instantiate(this.arrow);
                        e.setPosition(cc.v2(13, 66)), e.parent = cc.find("Canvas/CleaningArea/Main_Dustbin/dustbin2");
                        break;
                    case s.MOP:
                        for (var o = 0; o &lt; this.mopDirtNode.childrenCount; o++) this.mopDirtNode.children[o].opacity &gt; 0 &amp;&amp; (this.hintNode.getChildByName(t.toString()).children[o].active = !0);
                        break;
                    case s.DUSTER_BRUSH:
                        for (o = 0; o &lt; this.spiderDirtNode.childrenCount; o++) this.spiderDirtNode.children[o].opacity &gt; 0 &amp;&amp; (this.hintNode.getChildByName(t.toString()).children[o].active = !0);
                        break;
                    case s.BROOM:
                        for (o = 0; o &lt; this.broomDirtNode.childrenCount; o++) this.broomDirtNode.children[o].opacity &gt; 0 &amp;&amp; (this.hintNode.getChildByName(t.toString()).children[o].active = !0);
                        break;
                    case s.WATER_SPRAY:
                        for (o = 0; o &lt; this.waterSprayNode.childrenCount; o++) this.waterSprayNode.children[o].opacity &lt; 255 &amp;&amp; (this.hintNode.getChildByName(t.toString()).children[o].active = !0);
                        break;
                    case s.TOWEL:
                        for (o = 0; o &lt; this.waterSprayNode.childrenCount; o++) this.waterSprayNode.children[o].opacity &gt; 0 &amp;&amp; (this.hintNode.getChildByName(t.toString()).children[o].active = !0);
                        break;
                    case s.SCISSOR:
                        for (o = 0; o &lt; this.scissorNode.childrenCount; o++) this.scissorNode.children[o].opacity &gt; 0 &amp;&amp; (this.hintNode.getChildByName(t.toString()).children[o].active = !0);
                        break;
                    case s.FLOWER:
                        for (console.log("Tool_Type.FLOWER"), o = 0; o &lt; this.flowerNode.childrenCount; o++) 0 == this.flowerNode.children[o].opacity &amp;&amp; (this.hintNode.getChildByName(t.toString()).children[o].active = !0)
                }
            }, e.prototype.addHandHint = function () {
                if (!this.isDustBinItemsCollected()) {
                    this.unschedule(this.addHandHint);
                    for (var t = 0; t &lt; this.dustBinObject.childrenCount; t++) {
                        var e = this.dustBinObject.children[t];
                        if (e.scale &gt; 0) {
                            var o = this.node.convertToNodeSpaceAR(e.parent.convertToWorldSpaceAR(e.getPosition())),
                                i = this.node.convertToNodeSpaceAR(this.dustBin.parent.convertToWorldSpaceAR(this.dustBin.getPosition())),
                                n = cc.v3(o.x + i.x / 2, o.y + i.y / 2 + 300);
                            cc.tween(this.hand).repeat(1e4, cc.tween().set({
                                position: cc.v3(o.x, o.y, 0)
                            }).bezierTo(2, cc.v2(o), cc.v2(n), cc.v2(i)).delay(.2)).start();
                            break
                        }
                    }
                }
            }, e.prototype.hideHandHint = function () {
                cc.Tween.stopAllByTarget(this.hand), this.hand.setPosition(cc.v3(-5e3, 5e3, 500))
            }, e.prototype.registerEvents = function () {
                this.node.on(cc.Node.EventType.TOUCH_START, this.touchStarted, this), this.node.on(cc.Node.EventType.TOUCH_MOVE, this.touchMoved, this), this.node.on(cc.Node.EventType.TOUCH_END, this.touchEnded, this), this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.touchEnded, this), cc.game.on("BenchFixed", this.BenchFixed, this)
            }, e.prototype.BenchFixed = function () {
                var t = this;
                this.brokenBench.getComponent(cc.Button).interactable = !1, cc.find("Canvas/JigsawPopup/Safearea/Transparent").opacity = 0, cc.tween(this.benchPopup).set({
                    opacity: 254
                }).delay(1).to(.5, {
                    scale: 0
                }, {
                    easing: "backIn"
                }).delay(.5).call(function () {
                    t.brokenBench.removeComponent(cc.Sprite), t.brokenBench.getChildByName("finalBench").active = !0, t.addToolParticle(t.brokenBench, 0), t.isBenchCompleted = !0, cc.find("Canvas/Next").active = !0, cc.find("Canvas/BoardComplete").active = !0, l.default.getInstance().play("PARTICLE")
                }).start()
            }, e.prototype.touchStarted = function (t) {
                var e = this;
                switch (this.unschedule(this.addHandHint), this.hideHandHint(), this.toolType) {
                    case s.MOP:
                    case s.DUSTER_BRUSH:
                    case s.BROOM:
                    case s.WATER_SPRAY:
                    case s.TOWEL:
                    case s.SCISSOR:
                    case s.FLOWER:
                        var o = this.cleaningToolNode.getChildByName(this.toolType.toString());
                        o.active &amp;&amp; this.cleaningToolNode.getChildByName(this.toolType.toString()).getBoundingBoxToWorld().contains(t.getLocation()) &amp;&amp; (l.default.getInstance().play("click"), this.canMoveTool = !0, this.moveItem = cc.instantiate(o), this.moveItem.parent = cc.find("Canvas"), this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), o.active = !1, this.hideHand(!1, this.toolType), this.addHint(this.toolType)), this.canMoveTool &amp;&amp; this.toolType == s.WATER_SPRAY &amp;&amp; (this.moveItem.getComponent(cc.Animation).play(), cc.tween(this.moveItem).repeat(1e4, cc.tween().delay(.73).call(function () {
                            e.moveItem.getChildByName("cleaningSpray").getComponent(cc.ParticleSystem).resetSystem()
                        })).start()), this.canMoveTool &amp;&amp; this.toolType == s.SCISSOR &amp;&amp; (this.moveItem.angle = -90, this.moveItem.getComponent(cc.Animation).play("Scissor"), l.default.getInstance().play("click")), this.canMoveTool &amp;&amp; this.toolType == s.FLOWER &amp;&amp; (l.default.getInstance().play("pouring_water", !0), this.moveItem.getComponentInChildren(cc.ParticleSystem).resetSystem(), l.default.getInstance().play("click"));
                        break;
                    default:
                        for (var i = 0; i &lt; this.dustBinObject.childrenCount; i++) {
                            var n = this.dustBinObject.children[i];
                            if (n.getBoundingBoxToWorld().contains(t.getLocation())) {
                                this.canMoveTool = !0, this.setToolType(s.DUSTBIN), this.toolIndex = i, this.moveItem.getComponent(cc.Sprite).spriteFrame = n.getComponent(cc.Sprite).spriteFrame, n.active = !1, this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), this.addHint(this.toolType), l.default.getInstance().play("click");
                                break
                            }
                        }
                }
            }, e.prototype.touchMoved = function (t) {
                var e = this;
                if (this.canMoveTool) switch (this.toolType) {
                    case s.DUSTBIN:
                        if (this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), this.moveItem.getBoundingBoxToWorld().intersects(this.dustBin.getChildByName("collider").getBoundingBoxToWorld())) {
                            this.canMoveTool = !1, this.moveItem.setPosition(45454, 45454);
                            var o = this.dustBinObject.children[this.toolIndex];
                            o.active = !0, cc.find("Canvas/CleaningArea/Main_Dustbin/dustbin2").getChildByName("arrow").removeFromParent();
                            var i = o.getComponent(cc.Animation).play("InDustbin").duration;
                            cc.tween(o).delay(.8 * i).call(function () {
                                l.default.getInstance().play("dustbin")
                            }).delay(.2 * i).call(function () {
                                e.addToolParticle(cc.find("Canvas/CleaningArea/Main_Dustbin/dustbin2"), 0)
                            }).set({
                                scale: 0
                            }).call(function () {
                                if (e.isDustBinItemsCollected()) {
                                    e.setToolType(s.MOP), e.showHand(!0, s.MOP);
                                    var t = cc.find("Canvas/CleaningArea/Main_Dustbin/dustbin1"),
                                        o = cc.find("Canvas/CleaningArea/Main_Dustbin/dustbin2");
                                    cc.tween(t).by(.5, {
                                        position: cc.v3(-500, 0)
                                    }).start(), cc.tween(o).by(.5, {
                                        position: cc.v3(-500, 0)
                                    }).start()
                                }
                            }).start()
                        }
                        break;
                    case s.MOP:
                        this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation()));
                        for (var n = 0; n &lt; this.mopDirtNode.childrenCount; n++) {
                            var a = this.mopDirtNode.children[n];
                            this.moveItem.getChildByName("intersect").getBoundingBoxToWorld().intersects(a.getBoundingBoxToWorld()) &amp;&amp; (a.opacity &gt;= 30 ? (this.playSound("mop"), a.opacity = a.opacity - 5) : a.opacity &gt; 0 &amp;&amp; (a.opacity = 0, this.addToolParticle(a, 0), this.hintNode.getChildByName(this.toolType.toString()).children[n].active = !1))
                        }
                        break;
                    case s.DUSTER_BRUSH:
                        for (this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), n = 0; n &lt; this.spiderDirtNode.childrenCount; n++)(a = this.spiderDirtNode.children[n]).getBoundingBoxToWorld().containsRect(this.moveItem.getChildByName("intersect").getBoundingBoxToWorld()) &amp;&amp; (a.opacity &gt; 30 ? (this.playSound("duster"), a.opacity = a.opacity - 5) : a.opacity &gt; 0 &amp;&amp; (a.opacity = 0, this.hintNode.getChildByName(this.toolType.toString()).children[n].active = !1, this.addToolParticle(a, 0)));
                        break;
                    case s.BROOM:
                        for (this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), n = 0; n &lt; this.broomDirtNode.childrenCount; n++)(a = this.broomDirtNode.children[n]).getBoundingBoxToWorld().containsRect(this.moveItem.getChildByName("intersect").getBoundingBoxToWorld()) &amp;&amp; (a.opacity &gt; 30 ? (a.opacity = a.opacity - 5, this.playSound("broom")) : a.opacity &gt; 0 &amp;&amp; (a.opacity = 0, this.hintNode.getChildByName(this.toolType.toString()).children[n].active = !1, this.addToolParticle(a, 0)));
                        break;
                    case s.WATER_SPRAY:
                        for (this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), n = 0; n &lt; this.waterSprayNode.childrenCount; n++)(r = this.waterSprayNode.children[n]).getBoundingBoxToWorld().intersects(this.moveItem.getChildByName("intersect").getBoundingBoxToWorld()) &amp;&amp; (r.opacity &lt; 245 ? (r.opacity = r.opacity + 5, this.playSound("Sprey")) : r.opacity &lt; 255 &amp;&amp; (r.opacity = 255, this.hintNode.getChildByName(this.toolType.toString()).children[n].active = !1, this.addToolParticle(r, 0)));
                        break;
                    case s.TOWEL:
                        for (this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), n = 0; n &lt; this.waterSprayNode.childrenCount; n++) {
                            var r = this.waterSprayNode.children[n];
                            a = this.mirrorDirtNode.children[n], r.getBoundingBoxToWorld().intersects(this.moveItem.getBoundingBoxToWorld()) &amp;&amp; (r.opacity &gt; 30 ? (r.opacity = r.opacity - 5, this.playSound("towel")) : r.opacity &gt; 0 &amp;&amp; (r.opacity = 0, this.hintNode.getChildByName(this.toolType.toString()).children[n].active = !1, this.addToolParticle(r, 0)), a.opacity = r.opacity)
                        }
                        break;
                    case s.SCISSOR:
                        for (this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), n = 0; n &lt; this.scissorNode.childrenCount; n++) {
                            var c = this.scissorNode.children[n];
                            c.getBoundingBoxToWorld().containsRect(this.moveItem.getChildByName("intersect").getBoundingBoxToWorld()) &amp;&amp; (c.opacity &gt; 30 ? (c.opacity = c.opacity - 5, this.playSound("cut")) : c.opacity &gt; 0 &amp;&amp; (c.opacity = 0, this.hintNode.getChildByName(this.toolType.toString()).children[n].active = !1, this.addToolParticle(c, 0)))
                        }
                        break;
                    case s.FLOWER:
                        for (this.moveItem.setPosition(this.node.convertToNodeSpaceAR(t.getLocation())), n = 0; n &lt; this.flowerNode.childrenCount; n++) {
                            var h = this.flowerNode.children[n];
                            h.getBoundingBoxToWorld().intersects(this.moveItem.getChildByName("intersect").getBoundingBoxToWorld()) &amp;&amp; 0 == h.getNumberOfRunningActions() &amp;&amp; 0 == h.opacity &amp;&amp; (cc.tween(h).set({
                                opacity: 255,
                                scale: 0
                            }).to(1, {
                                scale: 1
                            }).start(), this.hintNode.getChildByName(this.toolType.toString()).children[n].active = !1, this.addToolParticle(h, 0))
                        }
                }
            }, e.prototype.touchEnded = function () {
                var t = this;
                if (this.schedule(this.addHandHint, 5), this.canMoveTool) switch (this.toolType) {
                    case s.DUSTBIN:
                        this.canMoveTool = !1, this.dustBinObject.children[this.toolIndex].active = !0, this.moveItem.setPosition(45454, 45454), cc.find("Canvas/CleaningArea/Main_Dustbin/dustbin2").getChildByName("arrow").removeFromParent();
                        break;
                    case s.MOP:
                        this.showHand(!1, s.MOP), this.canMoveTool = !1;
                        var e = this.node.convertToNodeSpaceAR(this.getToolByType(this.toolType).parent.convertToWorldSpaceAR(this.toolPositions[this.toolType - 1]));
                        cc.Tween.stopAllByTarget(this.moveItem), cc.tween(this.moveItem).to(.5, {
                            position: cc.v3(e.x + 150, e.y, 0)
                        }).set({
                            position: cc.v3(21546, 4564)
                        }).call(function () {
                            for (var e = 0; e &lt; t.mopDirtNode.childrenCount; e++)
                                if (t.mopDirtNode.children[e].opacity &gt; 0) return;
                            t.setToolType(s.DUSTER_BRUSH), t.hideHand(!0, s.MOP), cc.tween(t.node).delay(.5).call(function () {
                                t.showHand(!0, s.DUSTER_BRUSH)
                            }).start()
                        }).start(), this.hintNode.getChildByName(this.toolType.toString()).children.forEach(function (t) {
                            t.active = !1
                        });
                        break;
                    case s.DUSTER_BRUSH:
                        this.showHand(!1, s.DUSTER_BRUSH), this.canMoveTool = !1, e = this.node.convertToNodeSpaceAR(this.getToolByType(this.toolType).parent.convertToWorldSpaceAR(this.toolPositions[this.toolType - 1])), cc.Tween.stopAllByTarget(this.moveItem), cc.tween(this.moveItem).to(.5, {
                            position: cc.v3(e.x + 150, e.y, 0)
                        }).set({
                            position: cc.v3(21546, 4564)
                        }).call(function () {
                            for (var e = 0; e &lt; t.spiderDirtNode.childrenCount; e++)
                                if (t.spiderDirtNode.children[e].opacity &gt; 0) return;
                            t.setToolType(s.BROOM), t.hideHand(!0, s.DUSTER_BRUSH), cc.tween(t.node).delay(.5).call(function () {
                                t.showHand(!0, s.BROOM)
                            }).start()
                        }).start(), this.hintNode.getChildByName(this.toolType.toString()).children.forEach(function (t) {
                            t.active = !1
                        });
                        break;
                    case s.BROOM:
                        this.showHand(!1, s.BROOM), this.canMoveTool = !1, e = this.node.convertToNodeSpaceAR(this.getToolByType(this.toolType).parent.convertToWorldSpaceAR(this.toolPositions[this.toolType - 1])), cc.Tween.stopAllByTarget(this.moveItem), cc.tween(this.moveItem).to(.5, {
                            position: cc.v3(e.x + 150, e.y, 0)
                        }).set({
                            position: cc.v3(21546, 4564)
                        }).call(function () {
                            for (var e = 0; e &lt; t.broomDirtNode.childrenCount; e++)
                                if (t.broomDirtNode.children[e].opacity &gt; 0) return;
                            t.setToolType(s.WATER_SPRAY), t.hideHand(!0, s.BROOM), cc.tween(t.node).delay(.5).call(function () {
                                t.showHand(!0, s.WATER_SPRAY)
                            }).start()
                        }).start(), this.hintNode.getChildByName(this.toolType.toString()).children.forEach(function (t) {
                            t.active = !1
                        });
                        break;
                    case s.WATER_SPRAY:
                        this.showHand(!1, s.WATER_SPRAY), this.canMoveTool = !1, e = this.node.convertToNodeSpaceAR(this.getToolByType(this.toolType).parent.convertToWorldSpaceAR(this.toolPositions[this.toolType - 1])), cc.Tween.stopAllByTarget(this.moveItem), cc.tween(this.moveItem).to(.5, {
                            position: cc.v3(e.x + 150, e.y, 0)
                        }).set({
                            position: cc.v3(21546, 4564)
                        }).call(function () {
                            for (var e = 0; e &lt; t.waterSprayNode.childrenCount; e++)
                                if (t.waterSprayNode.children[e].opacity &lt; 255) return;
                            t.setToolType(s.TOWEL), t.hideHand(!0, s.WATER_SPRAY), cc.tween(t.node).delay(.5).call(function () {
                                t.showHand(!0, s.TOWEL)
                            }).start()
                        }).start(), this.hintNode.getChildByName(this.toolType.toString()).children.forEach(function (t) {
                            t.active = !1
                        });
                        break;
                    case s.TOWEL:
                        this.showHand(!1, s.TOWEL), this.canMoveTool = !1, e = this.node.convertToNodeSpaceAR(this.getToolByType(this.toolType).parent.convertToWorldSpaceAR(this.toolPositions[this.toolType - 1])), cc.Tween.stopAllByTarget(this.moveItem), cc.tween(this.moveItem).to(.5, {
                            position: cc.v3(e.x + 150, e.y, 0)
                        }).set({
                            position: cc.v3(21546, 4564)
                        }).call(function () {
                            for (var e = 0; e &lt; t.waterSprayNode.childrenCount; e++)
                                if (t.waterSprayNode.children[e].opacity &gt; 0) return;
                            t.setToolType(s.SCISSOR), t.hideHand(!0, s.TOWEL), cc.tween(t.node).delay(.5).call(function () {
                                t.showHand(!0, s.SCISSOR)
                            }).start()
                        }).start(), this.hintNode.getChildByName(this.toolType.toString()).children.forEach(function (t) {
                            t.active = !1
                        });
                        break;
                    case s.SCISSOR:
                        this.showHand(!1, s.SCISSOR), this.canMoveTool = !1, e = this.node.convertToNodeSpaceAR(this.getToolByType(this.toolType).parent.convertToWorldSpaceAR(this.toolPositions[this.toolType - 1])), cc.Tween.stopAllByTarget(this.moveItem), this.moveItem.getComponent(cc.Animation).stop(), cc.tween(this.moveItem).to(.5, {
                            position: cc.v3(e.x + 150, e.y, 0)
                        }).set({
                            position: cc.v3(21546, 4564)
                        }).call(function () {
                            for (var e = 0; e &lt; t.scissorNode.childrenCount; e++)
                                if (t.scissorNode.children[e].opacity &gt; 0) return;
                            t.setToolType(s.FLOWER), t.hideHand(!0, s.SCISSOR), cc.tween(t.node).delay(.5).call(function () {
                                t.showHand(!0, s.FLOWER)
                            }).start()
                        }).start(), this.hintNode.getChildByName(this.toolType.toString()).children.forEach(function (t) {
                            t.active = !1
                        });
                        break;
                    case s.FLOWER:
                        this.showHand(!1, s.FLOWER), this.canMoveTool = !1, e = this.node.convertToNodeSpaceAR(this.getToolByType(this.toolType).parent.convertToWorldSpaceAR(this.toolPositions[this.toolType - 1])), cc.Tween.stopAllByTarget(this.moveItem), this.moveItem.getComponentInChildren(cc.ParticleSystem).stopSystem(), cc.tween(this.moveItem).to(.5, {
                            position: cc.v3(e.x + 150, e.y, 0)
                        }).set({
                            position: cc.v3(21546, 4564)
                        }).call(function () {
                            l.default.getInstance().stop("pouring_water");
                            for (var e = 0; e &lt; t.flowerNode.childrenCount; e++)
                                if (0 == t.flowerNode.children[e].opacity) return;
                            t.hideHand(!0, s.FLOWER), t.brokenBench.getComponent(cc.Button).interactable = !0, t.unschedule(t.addHandHint), cc.tween(t.hand).set({
                                position: cc.v3(65, -23, 0)
                            }).repeat(1e4, cc.tween().to(.5, {
                                scale: 1.2
                            }).to(.5, {
                                scale: 1
                            })).start()
                        }).start(), this.hintNode.getChildByName(this.toolType.toString()).children.forEach(function (t) {
                            t.active = !1
                        })
                }
            }, e.prototype.playSound = function (t) {
                l.default.getInstance().isPlaying(t) || l.default.getInstance().play(t)
            }, e.prototype.getToolByType = function (t) {
                return this.cleaningToolNode.getChildByName(t.toString())
            }, e.prototype.isDustBinItemsCollected = function () {
                for (var t = 0; t &lt; this.dustBinObject.childrenCount; t++)
                    if (0 != this.dustBinObject.children[t].scale) return !1;
                return !0
            }, e.prototype.addToolParticle = function (t, e) {
                var o = this,
                    i = this.node.convertToNodeSpaceAR(t.parent.convertToWorldSpaceAR(t.getPosition())),
                    n = cc.instantiate(cc.find("Canvas/ToolComplete"));
                n.setPosition(i), cc.tween(n).delay(e).call(function () {
                    n.getComponent(cc.ParticleSystem).autoRemoveOnFinish = !0, n.parent = o.node, n.getComponent(cc.ParticleSystem).resetSystem(), l.default.getInstance().play("PARTICLE")
                }).start()
            }, e.prototype.showHand = function (t, e) {
                var o = this;
                if (t) this.cleaningToolNode.children.forEach(function (t) {
                    t.active = !1
                }), this.cleaningToolNode.getChildByName("new_Hand").active = !0, this.cleaningToolNode.getChildByName(e.toString()).active = !0, this.cleaningToolNode.getComponent(cc.Animation).play("HandEntry");
                else {
                    var i = this.cleaningToolNode.getComponent(cc.Animation).play("HandEntry").duration;
                    cc.tween(this.cleaningToolNode).delay(i).call(function () {
                        o.cleaningToolNode.getChildByName(e.toString()).active = !0
                    }).start()
                }
            }, e.prototype.hideHand = function (t, e) {
                var o = this;
                if (t) {
                    var i = this.cleaningToolNode.getComponent(cc.Animation).play("HandExit").duration;
                    cc.tween(this.cleaningToolNode).delay(i).call(function () {
                        o.cleaningToolNode.children.forEach(function (t) {
                            t.active = !1
                        })
                    }).start()
                } else this.cleaningToolNode.getComponent(cc.Animation).play("HandExit").duration, this.cleaningToolNode.getChildByName(e.toString()).active = !1
            }, e.prototype.setToolType = function (t) {
                this.toolType = t
            }, e.prototype.onBenchClicked = function () {
                this.isDustBinItemsCollected() &amp;&amp; 255 == this.benchPopup.opacity &amp;&amp; (this.hideHandHint(), cc.tween(this.benchPopup).to(.5, {
                    scale: 1
                }, {
                    easing: "backOut"
                }).call(function () {
                    cc.find("Canvas/JigsawPopup/Safearea/Transparent").opacity = 255
                }).start())
            }, e.prototype.NextAction = function (t) {
                return r(this, void 0, void 0, function () {
                    return c(this, function (e) {
                        switch (e.label) {
                            case 0:
                                return t.target.active = !1, l.default.getInstance().play("Pick and Drop"), d.default.getInstance().requestAds(), [4, h.Delay(.3)];
                            case 1:
                                return e.sent(), cc.director.loadScene("LevelScene"), [2]
                        }
                    })
                })
            }, a([f(cc.Node)], e.prototype, "dustBinObject", void 0), a([f(cc.Node)], e.prototype, "dustBin", void 0), a([f(cc.Node)], e.prototype, "cleaningToolNode", void 0), a([f(cc.Node)], e.prototype, "moveItem", void 0), a([u], e)
        }(cc.Component);
        o.default = y, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager",
        "../../../Scripts/Helper/HelperTools": "HelperTools",
        "../../../Scripts/Promotion/AdManager": "AdManager"
    }],
    GlobalData: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "82929FpEGVM56dm/V97rnol", "GlobalData"), Object.defineProperty(o, "__esModule", {
            value: !0
        }), o.GlobalData = void 0, o.GlobalData = {
            data: {
                flags: {
                    isViewDone: [!1, !1, !1, !1],
                    isCompleteParticle: [!1, !1, !1, !1]
                }
            }
        }, cc._RF.pop()
    }, {}],
    HelperTools: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "13812UirHdE9JGkYgNum3bN", "HelperTools");
        var i = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
            return new (o || (o = Promise))(function (n, a) {
                function r(t) {
                    try {
                        s(i.next(t))
                    } catch (e) {
                        a(e)
                    }
                }

                function c(t) {
                    try {
                        s(i.throw(t))
                    } catch (e) {
                        a(e)
                    }
                }

                function s(t) {
                    var e;
                    t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                        t(e)
                    })).then(r, c)
                }
                s((i = i.apply(t, e || [])).next())
            })
        },
            n = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        }), o.addButtonEvent = o.switchTexture = o.ScrollAction = o.distanceBetween2Points = o.animateProgressTo = o.NumberArray = o.RegisterDeviceFullScreen = o.RequestDeviceFullScreen = o.GetURLParameter = o.StringFormat = o.UItools = o.RoundDown = o.RoundUp = o.BeautifyNumber = o.Pad = o.Shuffle = o.SkippableDelay = o.DelayForScene = o.Delay = o.AsyncTask = o.GetRandomFloat = o.GetRandomInterger = void 0;
        var a = t("../Promotion/AdManager");

        function r(t) {
            return void 0 === t &amp;&amp; (t = 1), i(this, void 0, void 0, function () {
                var e, o = this;
                return n(this, function () {
                    return e = !1, cc.tween(cc.director.getScene()).delay(t).call(function () {
                        e = !0
                    }).start(), [2, new Promise(function (r) {
                        setTimeout(function () {
                            return i(o, void 0, void 0, function () {
                                return n(this, function (t) {
                                    switch (t.label) {
                                        case 0:
                                            return a.default.getInstance().isAdRunningOrNot() || a.default.getInstance().isSwitchTab || 0 == e ? [4, c(1)] : [3, 2];
                                        case 1:
                                            return t.sent(), [3, 0];
                                        case 2:
                                            return r(), [2]
                                    }
                                })
                            })
                        }, 1e3 * t)
                    })]
                })
            })
        }

        function c(t) {
            return void 0 === t &amp;&amp; (t = 1), i(this, void 0, void 0, function () {
                return n(this, function () {
                    return [2, new Promise(function (e) {
                        setTimeout(function () {
                            e()
                        }, 1e3 * t)
                    })]
                })
            })
        }

        function s() {
            cc.view.enableAutoFullScreen(!0)
        }
        o.GetRandomInterger = function (t, e) {
            return Math.floor(Math.random() * (e - t + 1)) + t
        }, o.GetRandomFloat = function (t, e) {
            return Math.random() * (e - t) + t
        }, o.AsyncTask = function (t) {
            return i(this, void 0, void 0, function () {
                return n(this, function () {
                    return [2, new Promise(function (e) {
                        t(e)
                    })]
                })
            })
        }, o.Delay = r, o.DelayForScene = c, o.SkippableDelay = function (t, e) {
            return void 0 === t &amp;&amp; (t = 1), i(this, void 0, void 0, function () {
                var o = this;
                return n(this, function () {
                    return t &lt;= 0 ? [2] : [2, new Promise(function (c) {
                        setTimeout(function () {
                            return i(o, void 0, void 0, function () {
                                return n(this, function (t) {
                                    switch (t.label) {
                                        case 0:
                                            return a.default.getInstance().isAdRunningOrNot() || a.default.getInstance().isSwitchTab ? [4, r(1)] : [3, 2];
                                        case 1:
                                            return t.sent(), [3, 0];
                                        case 2:
                                            return c(), [2]
                                    }
                                })
                            })
                        }, 1e3 * t), e &amp;&amp; cc.game.on(e, function () {
                            c()
                        })
                    })]
                })
            })
        }, o.Shuffle = function (t) {
            if (null == t) return t;
            for (var e, o, i = t.length; 0 !== i;) o = Math.floor(Math.random() * i), e = t[i -= 1], t[i] = t[o], t[o] = e;
            return t
        }, o.Pad = function (t, e) {
            var o = "000000000" + t;
            return o.substr(o.length - e)
        }, o.BeautifyNumber = function (t, e) {
            return 0 === t ? t.toFixed(e) : Number.isInteger(t) ? t.toFixed(0) : e ? t.toFixed(e) : t.toString()
        }, o.RoundUp = function (t, e) {
            void 0 === e &amp;&amp; (e = 2);
            var o = Math.pow(10, e);
            return Math.ceil(t * o) / o
        }, o.RoundDown = function (t, e) {
            void 0 === e &amp;&amp; (e = 2);
            var o = Math.pow(10, e);
            return Math.floor(t * o) / o
        }, o.UItools = {
            ChangeButtonSpriteFrame: function (t, e, o) {
                t.normalSprite = e.getSpriteFrame(o.normalSprite), t.pressedSprite = e.getSpriteFrame(o.pressedSprite), t.hoverSprite = e.getSpriteFrame(o.hoverSprite), t.disabledSprite = e.getSpriteFrame(o.disabledSprite)
            }
        }, o.StringFormat = function (t) {
            for (var e = [], o = 1; o &lt; arguments.length; o++) e[o - 1] = arguments[o];
            return t.replace(/{(\d+)}/g, function (t, o) {
                return e[o] || ""
            })
        }, o.GetURLParameter = function (t) {
            var e, o, i = new RegExp("[?|&amp;]" + t + "=([^&amp;;]+?)(&amp;|#|;|$)").exec(location.search);
            return i &amp;&amp; (e = (i || [, ""])[1].replace(/\+/g, "%20"), o = decodeURIComponent(e)), o || null
        }, o.RequestDeviceFullScreen = s, o.RegisterDeviceFullScreen = function () {
            cc.sys.isMobile &amp;&amp; document.getElementById("GameCanvas").addEventListener("touchend", function () {
                s()
            }, !1)
        }, o.NumberArray = function (t, e, o, i) {
            var n, a = [],
                r = !1;
            if ((o || i) &amp;&amp; (r = !0, o || (o = ""), i || (i = "")), e &lt; t)
                for (n = t; n &gt;= e; n--) r ? a.push(o + n.toString() + i) : a.push(n);
            else
                for (n = t; n &lt;= e; n++) r ? a.push(o + n.toString() + i) : a.push(n);
            return a
        }, o.animateProgressTo = function (t, e, o) {
            void 0 === o &amp;&amp; (o = 1);
            var i = 0;
            cc.tween(t).to(o, {
                fillRange: e
            }, {
                progress: function (e, o, n, a) {
                    return i = cc.misc.lerp(e, o, a), t.fillRange = i, i
                }
            }).start()
        }, o.distanceBetween2Points = function (t, e) {
            var o = e.x - t.x,
                i = e.y - t.y;
            return Math.sqrt(Math.pow(o, 2) + Math.pow(i, 2))
        }, o.ScrollAction = function (t) {
            t.scrollToBottom(0, !1), cc.tween(t).delay(.2).call(function () {
                t.scrollToTop(2, !1)
            }).start()
        }, o.switchTexture = function (t, e) {
            t.getComponent(cc.Sprite).spriteFrame = e.getComponent(cc.Sprite).spriteFrame
        }, o.addButtonEvent = function (t, e, o, i, n) {
            void 0 === n &amp;&amp; (n = !0), t.addComponent(cc.Button);
            var a = new cc.Component.EventHandler;
            a.target = e, a.component = o, a.handler = i, a.customEventData = "";
            var r = t.getComponent(cc.Button);
            r.clickEvents.push(a), r.transition = cc.Button.Transition.SCALE, r.enableAutoGrayEffect = n
        }, cc._RF.pop()
    }, {
        "../Promotion/AdManager": "AdManager"
    }],
    HorseBackground: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "57912XgSjVJMZic6mMtnzfY", "HorseBackground");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        }), o.TOOLID = void 0;
        var s, l = t("../../../Scripts/Helper/AudioManager"),
            h = t("../../../Scripts/Helper/HelperTools"),
            d = t("../../../Scripts/Promotion/AdManager"),
            p = cc._decorator,
            u = p.ccclass;
        p.property,
            function (t) {
                t[t.DistOne = 0] = "DistOne", t[t.Dirty = 1] = "Dirty", t[t.BGrass = 2] = "BGrass", t[t.Spider = 3] = "Spider", t[t.Broom = 4] = "Broom", t[t.Spray = 5] = "Spray", t[t.Bursh = 6] = "Bursh", t[t.Towel = 7] = "Towel", t[t.Grass = 8] = "Grass"
            }(s = o.TOOLID || (o.TOOLID = {}));
        var f = function (t) {
            function e() {
                var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                return e.AllDirt = [], e.PickIndex = -1, e.DamyDirt = null, e.count = 0, e.Dirty = [], e.MainIndex = -1, e.BadGrass = [], e.LeftHand = null, e.Spider = [], e.SpiderTool = null, e.ArroSpider = null, e.Broom = null, e.BroomDirt = [], e.Spraytool = null, e.Bubble = [], e.DirtBrush = [], e.TowelTool = null, e.GrassBag = null, e.GGrass = [], e.isToolCompleted = [], e
            }
            return n(e, t), e.prototype.onLoad = function () {
                cc.director.preloadScene("DesignScene"), l.default.getInstance();
                for (var t = 0; t &lt;= 8; t++) this.isToolCompleted[t] = !1;
                cc.find("Canvas/MainNode/Tools/SC_BadGrassRemove/intersecttool").getComponent(cc.ParticleSystem).stopSystem(), cc.find("Canvas/MainNode/Tools/Broom/SC_TraceItems_15").getComponent(cc.ParticleSystem).stopSystem(), cc.find("Canvas/MainNode/Tools/Bursh/Bubble").getComponent(cc.ParticleSystem).stopSystem(), cc.find("Canvas/MainNode/Tools/SC_GoodGrassBag/GGreshPartical").getComponent(cc.ParticleSystem).stopSystem()
            }, e.prototype.start = function () {
                this.cacheImages(), this.registerEvents(), this.scheduleOnce(this.showLeafHint, 3)
            }, e.prototype.registerEvents = function () {
                this.node.on(cc.Node.EventType.TOUCH_START, this.TouchStart, this), this.node.on(cc.Node.EventType.TOUCH_MOVE, this.TouchMove, this), this.node.on(cc.Node.EventType.TOUCH_END, this.TouchEnd, this), this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.TouchEnd, this)
            }, e.prototype.cacheImages = function () {
                for (var t = 1; t &lt;= 24; t++) this.AllDirt.push(cc.find("Canvas/MainNode/Dustbin/Dirt/SC_TraceItems_" + t));
                for (this.DamyDirt = cc.find("Canvas/MainNode/SC_TraceItems_15"), this.Gresshint = cc.find("Canvas/MainNode/Tools/common_handIndication"), t = 1; t &lt;= 6; t++) this.Dirty.push(cc.find("Canvas/MainNode/Dustbin/Poo/SC_Poo" + t));
                for (this.DirtyPartical = cc.find("Canvas/DirtyPartical"), t = 0; t &lt; 4; t++) {
                    var e = cc.instantiate(this.DirtyPartical);
                    e.position = cc.v3(0, 0, 0), e.active = !0, this.Dirty[t].addChild(e)
                }
                for (this.RigthHand = cc.find("Canvas/MainNode/Tools/RigthHand"), this.DustPan = cc.find("Canvas/MainNode/Tools/DHP_poo_dust_bin_tool"), this.DamyPoor = cc.find("Canvas/MainNode/Tools/DHP_poo_dust_bin_tool/SC_Poo"), t = 1; t &lt;= 5; t++) this.BadGrass.push(cc.find("Canvas/MainNode/BadGrass/SC_BadGrass_" + t)), this.BroomDirt.push(cc.find("Canvas/MainNode/BroomDirt/SC_BroomDirt_" + t));
                for (this.GrassTool = cc.find("Canvas/MainNode/Tools/SC_BadGrassRemove"), this.LeftHand = cc.find("Canvas/MainNode/Tools/new_Hand"), t = 1; t &lt;= 7; t++) this.Spider.push(cc.find("Canvas/MainNode/Spider/RC_spider" + t));
                for (this.SpiderTool = cc.find("Canvas/MainNode/Tools/RC_mainTools2"), this.ArroSpider = cc.find("Canvas/MainNode/Tools/arrow"), this.Broom = cc.find("Canvas/MainNode/Tools/Broom"), this.Spraytool = cc.find("Canvas/MainNode/Tools/RC_mainTools4"), this.BubblePartical = cc.find("Canvas/MainNode/Tools/RC_mainTools4/water"), t = 1; t &lt;= 12; t++) this.Bubble.push(cc.find("Canvas/MainNode/SprayBubble/SC_SprayBubble_" + t)), this.DirtBrush.push(cc.find("Canvas/MainNode/SpongePart/SC_SpongePart_" + t));
                for (this.BurshTool = cc.find("Canvas/MainNode/Tools/Bursh"), this.TowelTool = cc.find("Canvas/MainNode/Tools/towelTool"), this.GrassBag = cc.find("Canvas/MainNode/Tools/SC_GoodGrassBag"), t = 1; t &lt;= 6; t++) this.GGrass.push(cc.find("Canvas/MainNode/GoodGrerss/SC_GoodGrass_" + t));
                this.BGPartical = cc.find("Canvas/BGPartical"), this.Binhint = cc.find("Canvas/MainNode/binhint")
            }, e.prototype.TouchStart = function (t) {
                var e = t.getLocation();
                if (0 != this.isToolCompleted[s.DistOne]) 0 != this.isToolCompleted[s.Dirty] ? 0 != this.isToolCompleted[s.BGrass] ? 0 != this.isToolCompleted[s.Spider] ? 0 != this.isToolCompleted[s.Broom] ? 0 != this.isToolCompleted[s.Spray] ? 0 != this.isToolCompleted[s.Bursh] ? 0 != this.isToolCompleted[s.Towel] ? 0 != this.isToolCompleted[s.Grass] || this.GrassBag.getBoundingBoxToWorld().contains(e) &amp;&amp; 255 == this.GrassBag.opacity &amp;&amp; 0 == this.GrassBag.getNumberOfRunningActions() &amp;&amp; (l.default.getInstance().play("click"), this.PickPos = this.GrassBag.position, this.HintOff(), this.GrassBag.opacity = 254, this.BrushAngal = this.GrassBag.angle, this.GrassBag.angle = 90) : this.TowelTool.getBoundingBoxToWorld().contains(e) &amp;&amp; 255 == this.TowelTool.opacity &amp;&amp; 0 == this.TowelTool.getNumberOfRunningActions() &amp;&amp; (this.PickPos = this.TowelTool.position, this.TowelTool.opacity = 254, l.default.getInstance().play("click")) : this.BurshTool.getBoundingBoxToWorld().contains(e) &amp;&amp; 255 == this.BurshTool.opacity &amp;&amp; 0 == this.BurshTool.getNumberOfRunningActions() &amp;&amp; (this.PickPos = this.BurshTool.position, this.BurshTool.opacity = 254, this.BrushAngal = this.BurshTool.angle, this.BurshTool.angle = 0, l.default.getInstance().play("click")) : this.Spraytool &amp;&amp; this.Spraytool.getBoundingBoxToWorld().contains(e) &amp;&amp; 255 == this.Spraytool.opacity &amp;&amp; 0 == this.Spraytool.getNumberOfRunningActions() &amp;&amp; (this.PickPos = this.Spraytool.position, this.Spraytool.opacity = 254, this.BubblePartical.active = !0, this.BubblePartical.opacity = 255, this.spreypartical(this.count), this.LeftHand.active = !1, l.default.getInstance().play("click"), l.default.getInstance().play("Sprey", !0)) : this.Broom &amp;&amp; this.Broom.getBoundingBoxToWorld().contains(e) &amp;&amp; 255 == this.Broom.opacity &amp;&amp; 0 == this.Broom.getNumberOfRunningActions() &amp;&amp; (this.PickPos = this.Broom.position, this.Broom.opacity = 254, this.HintOff(), l.default.getInstance().play("click")) : this.SpiderTool &amp;&amp; this.SpiderTool.getBoundingBoxToWorld().contains(e) &amp;&amp; 255 == this.SpiderTool.opacity &amp;&amp; 0 == this.SpiderTool.getNumberOfRunningActions() &amp;&amp; (l.default.getInstance().play("click"), this.unschedule(this.ReStartHint), this.PickPos = this.SpiderTool.position, this.SpiderTool.opacity = 254, this.LeftHand.active = !1) : this.GrassTool &amp;&amp; this.GrassTool.getBoundingBoxToWorld().contains(e) &amp;&amp; 255 == this.GrassTool.opacity &amp;&amp; 0 == this.GrassTool.getNumberOfRunningActions() &amp;&amp; (this.PickPos = this.GrassTool.position, this.GrassTool.opacity = 254, this.HintOff(), l.default.getInstance().play("click")) : this.DustPan &amp;&amp; this.DustPan.getBoundingBoxToWorld().contains(e) &amp;&amp; 255 == this.DustPan.opacity &amp;&amp; 255 == this.DamyPoor.opacity &amp;&amp; 0 == this.DustPan.getNumberOfRunningActions() &amp;&amp; (this.PickPos = this.DustPan.position, this.DamyPoor.opacity = 254, this.DustPan.opacity = 254, l.default.getInstance().play("click"));
                else
                    for (var o = 0; o &lt; this.AllDirt.length; o++)
                        if (255 == this.AllDirt[o].opacity &amp;&amp; 255 == this.DamyDirt.opacity &amp;&amp; this.AllDirt[o].getBoundingBoxToWorld().contains(e) &amp;&amp; 0 == this.AllDirt[o].getNumberOfRunningActions()) {
                            this.PickPos = this.AllDirt[o].position, this.DamyDirt.position = this.PickPos, this.PickIndex = o, l.default.getInstance().play("click"), this.hideHand(), this.DamyDirt.getComponent(cc.Sprite).spriteFrame = this.AllDirt[this.PickIndex].getComponent(cc.Sprite).spriteFrame, this.AllDirt[o].zIndex = 10, this.AllDirt[o].active = !1, this.DamyDirt.active = !0, this.AllDirt[o].opacity = 254, this.DamyDirt.opacity = 254;
                            break
                        }
            }, e.prototype.TouchMove = function (t) {
                var e = this,
                    o = t.getLocation(),
                    i = this.node.convertToNodeSpaceAR(o);
                if (0 == this.isToolCompleted[s.DistOne]) - 1 != this.PickIndex &amp;&amp; 254 == this.AllDirt[this.PickIndex].opacity &amp;&amp; 254 == this.DamyDirt.opacity &amp;&amp; (this.DamyDirt.position = cc.v3(i));
                else if (0 == this.isToolCompleted[s.Dirty]) {
                    if (this.DustPan &amp;&amp; 254 == this.DustPan.opacity) {
                        this.DustPan.position = cc.v3(i), this.RigthHand.active = !1;
                        for (var n = function (t) {
                            var o = cc.find("Canvas/MainNode/Tools/DHP_poo_dust_bin_tool/intersect");
                            if (a.Dirty[t].active &amp;&amp; a.DustPan &amp;&amp; a.Dirty[t].getBoundingBoxToWorld().intersects(o.getBoundingBoxToWorld())) {
                                var i = cc.find("Canvas/MainNode/hintparent");
                                i.children[t].active = !1, a.unschedule(a.ReStartDirtyHint), a.Binhint.active = !0, a.Binhint.getComponent(cc.Animation).play("BinHintAnimation"), i.active = !1, -1 == a.MainIndex &amp;&amp; (a.MainIndex = t, t &lt; 4 &amp;&amp; (a.NewParetical = cc.instantiate(a.DirtyPartical), a.NewParetical.active = !0, a.NewParetical.getComponent(cc.ParticleSystem).resetSystem(), a.DamyPoor.addChild(a.NewParetical)), a.DamyPoor.active = !0, a.DamyPoor.position = cc.v3(-23, -23, 0), a.Dirty[t].active = !1)
                            }
                            if (a.DamyPoor.active &amp;&amp; -1 != a.MainIndex &amp;&amp; 0 == a.DamyPoor.getNumberOfRunningActions()) {
                                var n = cc.find("Canvas/MainNode/Dustbin/dustbin2"),
                                    r = cc.find("Canvas/MainNode/Dustbin/dustbin1"),
                                    c = a.MainIndex;
                                a.DamyPoor.getBoundingBoxToWorld().intersects(n.getBoundingBoxToWorld()) &amp;&amp; (a.DustPan.opacity = 253, a.Binhint.active = !1, cc.tween(a.DustPan).to(.5, {
                                    position: cc.v3(-265, -50, 0)
                                }).to(.3, {
                                    angle: 20
                                }).start(), cc.tween(a.DamyPoor).delay(.5).to(.3, {
                                    angle: -20
                                }).to(.3, {
                                    position: cc.v3(-35, 20, 0),
                                    scale: 1.5
                                }).call(function () {
                                    var t = e.DamyPoor.parent.convertToWorldSpaceAR(e.DamyPoor.position),
                                        o = cc.find("Canvas/MainNode/Dustbin/Poo"),
                                        i = cc.find("Canvas/MainNode/Dustbin/DHP_poo_dust_bin_tool");
                                    i.position = e.DustPan.position, i.angle = 20, i.active = !0;
                                    var a = o.convertToNodeSpaceAR(t);
                                    e.Dirty[c].active = !0, e.DustPan.active = !1, e.DamyPoor.active = !1, e.DamyPoor.scale = 1, cc.tween(e.Dirty[c]).set({
                                        position: a,
                                        scale: 1.5
                                    }).by(.5, {
                                        position: cc.v3(-10, -120, 0)
                                    }).delay(.3).call(function () {
                                        l.default.getInstance().play("dustbin"), e.BGParticalAdd(n.position), e.Dirty[c].active = !1, e.scheduleOnce(e.ReStartDirtyHint, 4), i.active = !1, e.DustPanTool(), e.NewParetical &amp;&amp; 1 == e.NewParetical.active &amp;&amp; (e.NewParetical.getComponent(cc.ParticleSystem).stopSystem(), e.NewParetical.active = !1), e.count++, e.MainIndex = -1, e.count == e.Dirty.length &amp;&amp; (e.count = 0, e.Gresshint.getComponent(cc.Animation).play("HintHandAnim"), e.scheduleOnce(e.HintAll, 4), e.RigthHand.active = !1, e.DustPan.active = !1, cc.tween(r).by(.5, {
                                            position: cc.v3(-250, 0, 0)
                                        }).start(), cc.tween(n).by(.5, {
                                            position: cc.v3(-250, 0, 0)
                                        }).delay(.5).call(function () {
                                            cc.tween(e.GrassTool).set({
                                                position: cc.v3(-455, 10, 0)
                                            }).to(.5, {
                                                position: cc.v3(-350, 10, 0)
                                            }).start(), cc.tween(e.LeftHand).set({
                                                position: cc.v3(-505, -5, 0)
                                            }).to(.5, {
                                                position: cc.v3(-400, -5, 0)
                                            }).start()
                                        }).start(), e.isToolCompleted[s.Dirty] = !0)
                                    }).removeSelf().start()
                                }).start())
                            }
                        }, a = this, r = 0; r &lt; this.Dirty.length; r++) n(r)
                    }
                } else {
                    if (0 == this.isToolCompleted[s.BGrass]) {
                        if (this.GrassTool &amp;&amp; 254 == this.GrassTool.opacity) {
                            this.GrassTool.position = cc.v3(i), this.LeftHand.active = !1;
                            var c = cc.find("Canvas/MainNode/Tools/SC_BadGrassRemove/intersecttool"),
                                h = !1;
                            for (r = 0; r &lt; this.BadGrass.length; r++) this.BadGrass[r].active &amp;&amp; this.GrassTool &amp;&amp; this.BadGrass[r].getBoundingBoxToWorld().intersects(c.getBoundingBoxToWorld()) &amp;&amp; (c.getComponent(cc.ParticleSystem).stopped &amp;&amp; c.getComponent(cc.ParticleSystem).resetSystem(), l.default.getInstance().isPlaying("broom") || l.default.getInstance().play("broom"), h = !0, this.BadGrass[r].opacity &gt;= 55 &amp;&amp; (this.BadGrass[r].opacity -= 5, 50 == this.BadGrass[r].opacity &amp;&amp; (this.BadGrass[r].opacity = 0, this.BadGrass[r].opacity = 0, this.BadGrass[r].active, this.BGParticalAdd(this.BadGrass[r].position), this.count++, this.count == this.BadGrass.length &amp;&amp; (this.count = 0, l.default.getInstance().stop("broom"), this.isToolCompleted[s.BGrass] = !0, cc.tween(this.SpiderTool).set({
                                position: cc.v3(-450, 35, 0)
                            }).to(.5, {
                                position: cc.v3(-315, 35, 0)
                            }).start(), this.LeftHand.active = !0, cc.tween(this.LeftHand).set({
                                position: cc.v3(-535, -5, 0)
                            }).to(.5, {
                                position: cc.v3(-400, -5, 0)
                            }).start(), this.HintArrow(), this.GrassTool.opacity = 253, this.GrassTool.active = !1))));
                            h || c.getComponent(cc.ParticleSystem).stopSystem()
                        }
                        return
                    }
                    if (0 == this.isToolCompleted[s.Spider]) {
                        var d = cc.find("Canvas/MainNode/Tools/RC_mainTools2/Spiderintesect"),
                            p = cc.find("Canvas/MainNode/ArrowPArent");
                        if (this.SpiderTool &amp;&amp; 254 == this.SpiderTool.opacity) {
                            this.SpiderTool.position = cc.v3(i);
                            for (var u = 0; u &lt; this.Spider.length; u++) this.Spider[u] &amp;&amp; this.SpiderTool &amp;&amp; this.Spider[u].getBoundingBoxToWorld().intersects(d.getBoundingBoxToWorld()) &amp;&amp; (p.children[u].active = !1, this.Spider[u] &amp;&amp; this.Spider[u].opacity &gt;= 55 &amp;&amp; (l.default.getInstance().isPlaying("comb") || l.default.getInstance().play("comb"), this.Spider[u].opacity -= 5, 50 == this.Spider[u].opacity &amp;&amp; (this.Spider[u].opacity = 0, this.Spider[u].active = !1, this.BGParticalAdd(this.Spider[u].position), this.count++, this.count == this.Spider.length &amp;&amp; (this.count = 0, l.default.getInstance().stop("comb"), this.scheduleOnce(this.HintAll, 4), this.isToolCompleted[s.Spider] = !0, this.SpiderTool.active = !1, cc.tween(this.Broom).set({
                                position: cc.v3(-490, -5, 0)
                            }).to(.5, {
                                position: cc.v3(-355, -5, 0)
                            }).start(), this.LeftHand.active = !0, cc.tween(this.LeftHand).set({
                                position: cc.v3(-535, -5, 0)
                            }).to(.5, {
                                position: cc.v3(-400, -5, 0)
                            }).start()))))
                        }
                    } else if (0 == this.isToolCompleted[s.Broom]) {
                        if (this.Broom &amp;&amp; 254 == this.Broom.opacity) {
                            this.Broom.position = cc.v3(i), this.LeftHand.active = !1, h = !1;
                            var f = cc.find("Canvas/MainNode/Tools/Broom/SC_TraceItems_15");
                            for (r = 0; r &lt; this.BroomDirt.length; r++) this.BroomDirt[r].active &amp;&amp; f &amp;&amp; this.BroomDirt[r].getBoundingBoxToWorld().intersects(f.getBoundingBoxToWorld()) &amp;&amp; this.BroomDirt[r].opacity &gt;= 55 &amp;&amp; (this.BroomDirt[r].opacity -= 5, l.default.getInstance().isPlaying("broom") || l.default.getInstance().play("broom"), f.getComponent(cc.ParticleSystem).stopped &amp;&amp; f.getComponent(cc.ParticleSystem).resetSystem(), h = !0, 50 == this.BroomDirt[r].opacity &amp;&amp; (this.BroomDirt[r].opacity = 0, this.BroomDirt[r].active, this.BGParticalAdd(this.BroomDirt[r].position), this.count++, this.count == this.BroomDirt.length &amp;&amp; (this.count = -1, l.default.getInstance().stop("broom"), this.isToolCompleted[s.Broom] = !0, cc.tween(this.Spraytool).set({
                                position: cc.v3(-475, -5)
                            }).to(.5, {
                                position: cc.v3(-340, -5, 0)
                            }).start(), this.LeftHand.active = !0, cc.tween(this.LeftHand).set({
                                position: cc.v3(-535, -5, 0)
                            }).to(.5, {
                                position: cc.v3(-400, -5, 0)
                            }).start(), this.Broom.opacity = 253, this.Broom.active = !1)));
                            h || f.getComponent(cc.ParticleSystem).stopSystem()
                        }
                    } else if (0 == this.isToolCompleted[s.Spray]) {
                        if (this.Spraytool.opacity &amp;&amp; 254 == this.Spraytool.opacity)
                            for (this.Spraytool.position = cc.v3(i), r = 0; r &lt; this.Bubble.length; r++) this.BubblePartical &amp;&amp; this.Bubble &amp;&amp; this.Bubble[r].getBoundingBoxToWorld().intersects(this.BubblePartical.getBoundingBoxToWorld()) &amp;&amp; this.Bubble[r].opacity &lt;= 195 &amp;&amp; (this.Bubble[r].opacity += 5, 200 == this.Bubble[r].opacity &amp;&amp; (this.Bubble[r].opacity = 255, this.BGParticalAdd(this.Bubble[r].position), this.count++, this.count == this.Bubble.length &amp;&amp; (this.count = 0, l.default.getInstance().stop("Sprey"), this.Spraytool.active = !1, this.isToolCompleted[s.Spray] = !0, cc.tween(this.BurshTool).set({
                                position: cc.v3(-460, -15)
                            }).to(.5, {
                                position: cc.v3(-325, -15, 0)
                            }).start(), this.LeftHand.active = !0, cc.tween(this.LeftHand).set({
                                position: cc.v3(-535, -5, 0)
                            }).to(.5, {
                                position: cc.v3(-400, -5, 0)
                            }).start())))
                    } else if (0 == this.isToolCompleted[s.Bursh]) {
                        if (254 == this.BurshTool.opacity) {
                            this.BurshTool.position = cc.v3(i), this.LeftHand.active = !1;
                            var y = cc.find("Canvas/MainNode/Tools/Bursh/Bubble");
                            for (h = !1, r = 0; r &lt; this.DirtBrush.length; r++)
                                if (this.DirtBrush &amp;&amp; this.BurshTool &amp;&amp; this.DirtBrush[r].getBoundingBoxToWorld().intersects(this.BurshTool.getBoundingBoxToWorld()) &amp;&amp; this.DirtBrush[r].opacity &lt;= 195) {
                                    this.DirtBrush[r].opacity += 5;
                                    var v = cc.find("Canvas/MainNode/GateDoorDirt");
                                    l.default.getInstance().isPlaying("duster") || l.default.getInstance().play("duster"), h = !0, y.getComponent(cc.ParticleSystem).stopped &amp;&amp; y.getComponent(cc.ParticleSystem).resetSystem(), 200 == this.DirtBrush[r].opacity &amp;&amp; (this.DirtBrush[r].opacity = 255, this.BGParticalAdd(this.DirtBrush[r].position), this.count++, this.count == this.DirtBrush.length &amp;&amp; (cc.tween(v).to(2, {
                                        opacity: 0
                                    }).start(), this.count = 0, l.default.getInstance().stop("duster"), this.BurshTool.angle = 0, this.isToolCompleted[s.Bursh] = !0, this.BurshTool.active = !1, this.BurshTool.opacity = 253, cc.tween(this.TowelTool).set({
                                        position: cc.v3(-485, -5)
                                    }).to(.5, {
                                        position: cc.v3(-350, -5, 0)
                                    }).start(), this.LeftHand.active = !0, cc.tween(this.LeftHand).set({
                                        position: cc.v3(-535, -5, 0)
                                    }).to(.5, {
                                        position: cc.v3(-400, -5, 0)
                                    }).start()))
                                }
                            h || y.getComponent(cc.ParticleSystem).stopSystem()
                        }
                    } else if (0 == this.isToolCompleted[s.Towel]) {
                        if (254 == this.TowelTool.opacity)
                            for (this.TowelTool.position = cc.v3(i), this.LeftHand.active = !1, r = 0; r &lt; this.DirtBrush.length; r++) this.DirtBrush[r] &amp;&amp; this.TowelTool &amp;&amp; this.DirtBrush[r].getBoundingBoxToWorld().intersects(this.TowelTool.getBoundingBoxToWorld()) &amp;&amp; (this.DirtBrush[r].opacity &gt;= 55 || this.Bubble[r].opacity &gt;= 55) &amp;&amp; (this.DirtBrush[r].opacity -= 5, this.Bubble[r].opacity -= 5, l.default.getInstance().isPlaying("towel") || l.default.getInstance().play("towel"), 50 == this.DirtBrush[r].opacity &amp;&amp; (this.DirtBrush[r].opacity = 0, this.BGParticalAdd(this.DirtBrush[r].position), this.Bubble[r].opacity = 0, this.count++, this.count == this.DirtBrush.length &amp;&amp; (this.count = 0, this.scheduleOnce(this.HintAll, 4), l.default.getInstance().stop("towel"), this.TowelTool.active = !1, cc.tween(this.GrassBag).set({
                                position: cc.v3(-480, -5)
                            }).to(.5, {
                                position: cc.v3(-345, -5, 0)
                            }).start(), this.LeftHand.active = !0, cc.tween(this.LeftHand).set({
                                position: cc.v3(-535, -5, 0)
                            }).to(.5, {
                                position: cc.v3(-400, -5, 0)
                            }).start(), this.isToolCompleted[s.Towel] = !0)))
                    } else if (0 == this.isToolCompleted[s.Grass] &amp;&amp; 254 == this.GrassBag.opacity) {
                        this.GrassBag.position = cc.v3(i), this.LeftHand.active = !1, h = !1;
                        var g = cc.find("Canvas/MainNode/Tools/SC_GoodGrassBag/GGreshPartical");
                        for (r = 0; r &lt; this.GGrass.length; r++) this.GGrass &amp;&amp; this.GrassBag &amp;&amp; this.GGrass[r].getBoundingBoxToWorld().intersects(this.GrassBag.getBoundingBoxToWorld()) &amp;&amp; this.GGrass[r].opacity &lt;= 195 &amp;&amp; (this.GGrass[r].opacity += 5, h = !0, l.default.getInstance().isPlaying("mop") || l.default.getInstance().play("mop"), g.getComponent(cc.ParticleSystem).stopped &amp;&amp; g.getComponent(cc.ParticleSystem).resetSystem(), 200 == this.GGrass[r].opacity &amp;&amp; (this.GGrass[r].opacity, this.BGParticalAdd(this.GGrass[r].position), this.count++, this.count == this.GGrass.length &amp;&amp; (this.count = 0, this.isToolCompleted[s.Grass] = !0, cc.find("Canvas/MainNode/GateDoorDirt").active = !1, this.GrassBag.active = !1, this.GrassBag.opacity = 253, cc.find("Canvas/Next").active = !0)));
                        h || g.getComponent(cc.ParticleSystem).stopSystem()
                    }
                }
            }, e.prototype.TouchEnd = function () {
                var t = this;
                if (l.default.getInstance().stop("mop"), l.default.getInstance().stop("towel"), l.default.getInstance().stop("duster"), l.default.getInstance().stop("Sprey"), l.default.getInstance().stop("broom"), l.default.getInstance().stop("comb"), 0 != this.isToolCompleted[s.DistOne]) {
                    if (0 != this.isToolCompleted[s.Dirty]) 0 != this.isToolCompleted[s.BGrass] ? 0 != this.isToolCompleted[s.Spider] ? 0 != this.isToolCompleted[s.Broom] ? 0 != this.isToolCompleted[s.Spray] ? 0 != this.isToolCompleted[s.Bursh] ? 0 != this.isToolCompleted[s.Towel] ? 0 != this.isToolCompleted[s.Grass] || 254 == this.GrassBag.opacity &amp;&amp; (this.GrassBag.opacity = 255, cc.find("Canvas/MainNode/Tools/SC_GoodGrassBag/GGreshPartical").getComponent(cc.ParticleSystem).stopSystem(), cc.tween(this.GrassBag).to(.3, {
                        position: cc.v3(this.PickPos),
                        angle: this.BrushAngal
                    }).start(), this.scheduleOnce(this.HintAll, 2), this.LeftHand.active = !0, cc.tween(this.LeftHand).set({
                        position: cc.v3(-505, -5, 0)
                    }).to(.3, {
                        position: cc.v3(-400, -5, 0)
                    }).start()) : 254 == this.TowelTool.opacity &amp;&amp; (this.TowelTool.opacity = 255, cc.tween(this.TowelTool).to(.3, {
                        position: cc.v3(this.PickPos)
                    }).start(), this.LeftHand.active = !0, cc.tween(this.LeftHand).set({
                        position: cc.v3(-505, -5, 0)
                    }).to(.3, {
                        position: cc.v3(-400, -5, 0)
                    }).start()) : 254 == this.BurshTool.opacity &amp;&amp; (this.BurshTool.opacity = 255, cc.find("Canvas/MainNode/Tools/Bursh/Bubble").getComponent(cc.ParticleSystem).stopSystem(), cc.tween(this.BurshTool).to(.3, {
                        position: cc.v3(this.PickPos),
                        angle: this.BrushAngal
                    }).start(), this.LeftHand.active = !0, cc.tween(this.LeftHand).set({
                        position: cc.v3(-505, -5, 0)
                    }).to(.3, {
                        position: cc.v3(-400, -5, 0)
                    }).start()) : 254 == this.Spraytool.opacity &amp;&amp; this.PickPos &amp;&amp; (this.Spraytool.opacity = 255, cc.tween(this.Spraytool).to(.3, {
                        position: this.PickPos
                    }).start(), this.LeftHand.active = !0, cc.tween(this.LeftHand).set({
                        position: cc.v3(-505, -5, 0)
                    }).to(.3, {
                        position: cc.v3(-400, -5, 0)
                    }).start(), l.default.getInstance().stop("Sprey"), this.BubblePartical.opacity = 0) : this.Broom &amp;&amp; 254 == this.Broom.opacity &amp;&amp; (this.Broom.opacity = 255, cc.find("Canvas/MainNode/Tools/Broom/SC_TraceItems_15").getComponent(cc.ParticleSystem).stopSystem(), this.scheduleOnce(this.HintAll, 2), cc.tween(this.Broom).to(.3, {
                        position: this.PickPos
                    }).start(), 1 == this.Broom.active ? (this.LeftHand.active = !0, cc.tween(this.LeftHand).set({
                        position: cc.v3(-505, -5, 0)
                    }).to(.3, {
                        position: cc.v3(-400, -5, 0)
                    }).start()) : this.Broom.opacity = 253) : this.SpiderTool &amp;&amp; 254 == this.SpiderTool.opacity &amp;&amp; (this.SpiderTool.opacity = 255, cc.tween(this.SpiderTool).to(.3, {
                        position: this.PickPos
                    }).start(), 1 == this.SpiderTool.active ? (this.LeftHand.active = !0, cc.tween(this.LeftHand).set({
                        position: cc.v3(-505, -5, 0)
                    }).to(.3, {
                        position: cc.v3(-400, -5, 0)
                    }).start(), this.scheduleOnce(this.ReStartHint, 4)) : this.SpiderTool.opacity = 253) : this.GrassTool &amp;&amp; 254 == this.GrassTool.opacity &amp;&amp; (this.GrassTool.opacity = 255, this.scheduleOnce(this.HintAll, 2), cc.find("Canvas/MainNode/Tools/SC_BadGrassRemove/intersecttool").getComponent(cc.ParticleSystem).stopSystem(), cc.tween(this.GrassTool).to(.3, {
                        position: this.PickPos
                    }).start(), 1 == this.GrassTool.active ? (this.LeftHand.active = !0, cc.tween(this.LeftHand).set({
                        position: cc.v3(-505, -5, 0)
                    }).to(.3, {
                        position: cc.v3(-400, -5, 0)
                    }).start()) : this.GrassTool.opacity = 253);
                    else if (this.DustPan &amp;&amp; 254 == this.DustPan.opacity) {
                        var e = cc.find("Canvas/MainNode/Dustbin/dustbin2"); - 1 != this.MainIndex &amp;&amp; 0 == this.DamyPoor.getNumberOfRunningActions() ? (this.MainIndex, this.DamyPoor.getBoundingBoxToWorld().intersects(e.getBoundingBoxToWorld()) ? this.MainIndex = -1 : (this.DustPan.opacity = 255, this.DamyPoor.opacity = 255, this.DustPanTool())) : (this.DustPan.opacity = 255, this.DamyPoor.opacity = 255, this.DustPanTool())
                    }
                } else if (-1 != this.PickIndex &amp;&amp; 0 == this.DamyDirt.getNumberOfRunningActions()) {
                    var o = this.PickIndex;
                    this.PickIndex = -1, this.PickPos;
                    var i = cc.find("Canvas/MainNode/Dustbin/dustbin2");
                    i.getBoundingBoxToWorld().intersects(this.DamyDirt.getBoundingBoxToWorld()) ? (this.AllDirt[o].opacity = 250, cc.tween(this.DamyDirt).to(.5, {
                        position: cc.v3(-313, -50, 0)
                    }).call(function () {
                        t.DamyDirt.active = !1, t.DamyDirt.opacity = 255, t.AllDirt[o].active = !0, t.AllDirt[o].position = cc.v3(-313, -50, 0), cc.tween(t.AllDirt[o]).set({
                            position: cc.v3(-313, -50, 0)
                        }).by(.5, {
                            position: cc.v3(0, -100, 0)
                        }).call(function () {
                            l.default.getInstance().play("dustbin"), t.scheduleOnce(t.showLeafHint, 2), t.BGParticalAdd(i.position)
                        }).removeSelf().start()
                    }).start(), this.count++, this.count == this.AllDirt.length &amp;&amp; (this.count = 0, this.DirtyHint(), this.isToolCompleted[s.DistOne] = !0, cc.tween(this.RigthHand).set({
                        position: cc.v3(555, -135, 0)
                    }).to(.5, {
                        position: cc.v3(400, -135, 0)
                    }).start(), cc.tween(this.DustPan).set({
                        position: cc.v3(460, -175, 0)
                    }).to(.5, {
                        position: cc.v3(305, -175, 0)
                    }).start())) : (this.AllDirt[o].position = this.DamyDirt.position, this.AllDirt[o].opacity = 255, this.DamyDirt.opacity = 255, this.DamyDirt.active = !1, this.AllDirt[o].active = !0, this.scheduleOnce(this.showLeafHint, 2), cc.tween(this.AllDirt[o]).to(.3, {
                        position: this.PickPos
                    }).call(function () {
                        t.AllDirt[o].zIndex = 1
                    }).start())
                }
            }, e.prototype.BGParticalAdd = function (t) {
                this.BGPartical.active = !0, this.BGPartical.position = t, this.BGPartical.getComponent(cc.ParticleSystem).resetSystem(), l.default.getInstance().play("PARTICLE")
            }, e.prototype.DustPanTool = function () {
                var t = this;
                this.DustPan.active = !0, cc.tween(this.DustPan).to(.3, {
                    position: this.PickPos,
                    angle: 0
                }).delay(.1).call(function () {
                    t.DustPan.opacity = 255, t.DamyPoor.opacity = 255
                }).start(), this.RigthHand.active = !0, cc.tween(this.RigthHand).set({
                    position: cc.v3(555, -135, 0)
                }).to(.3, {
                    position: cc.v3(400, -135, 0)
                }).start()
            }, e.prototype.ReStartHint = function () {
                for (var t = cc.find("Canvas/MainNode/ArrowPArent"), e = 0; e &lt; this.Spider.length; e++) 1 == this.Spider[e].active &amp;&amp; (t.children[e].active = !0)
            }, e.prototype.HintArrow = function () {
                for (var t = cc.find("Canvas/MainNode/Tools/arrow"), e = cc.find("Canvas/MainNode/ArrowPArent"), o = 0; o &lt; this.Spider.length; o++)
                    if (1 == this.Spider[o].active) {
                        var i = cc.instantiate(t);
                        this.node.convertToNodeSpaceAR(this.Spider[o].position), i.setPosition(this.Spider[o].position), i.active = !0, cc.tween(i).repeatForever(cc.tween(i).by(.5, {
                            position: cc.v3(10, 10, 0),
                            scale: -.2
                        }).by(.5, {
                            position: cc.v3(-10, -10, 0),
                            scale: .2
                        })).start(), e.addChild(i)
                    }
            }, e.prototype.spreypartical = function (t) {
                var e = this;
                if (-1 == t) {
                    this.count = 0;
                    var o = cc.tween(this.BubblePartical).delay(.4).call(function () {
                        e.BubblePartical.getComponent(cc.ParticleSystem).resetSystem()
                    });
                    cc.tween(this.BubblePartical).repeatForever(o).start()
                }
            }, e.prototype.showLeafHint = function () {
                for (var t = 0; t &lt; this.AllDirt.length; t++)
                    if (255 == this.AllDirt[t].opacity) {
                        this.ShowHHand(this.AllDirt[t].position);
                        break
                    }
            }, e.prototype.ShowHHand = function (t) {
                var e = cc.find("Canvas/MainNode/Tools/common_handIndication");
                e.active = !0, e.opacity = 0, cc.tween(e).repeatForever(cc.tween(e).set({
                    position: cc.v3(t)
                }).to(.2, {
                    opacity: 255
                }).to(1, {
                    position: cc.v3(-320, -172, 0)
                }).to(.2, {
                    opacity: 0
                })).start()
            }, e.prototype.DirtyHint = function () {
                for (var t = cc.find("Canvas/MainNode/Tools/BinArrow"), e = cc.find("Canvas/MainNode/hintparent"), o = 0; o &lt; this.Dirty.length; o++)
                    if (1 == this.Dirty[o].active) {
                        var i = cc.instantiate(t);
                        i.active = !0, i.setPosition(this.Dirty[o].position), cc.tween(i).repeatForever(cc.tween(i).by(.5, {
                            position: cc.v3(10, 10, 0),
                            scale: -.2
                        }).by(.5, {
                            position: cc.v3(-10, -10, 0),
                            scale: .2
                        })).start(), e.addChild(i)
                    }
            }, e.prototype.ReStartDirtyHint = function () {
                for (var t = cc.find("Canvas/MainNode/hintparent"), e = 0; e &lt; this.Dirty.length; e++) 1 == this.Dirty[e].active &amp;&amp; (t.children[e].active = !0, t.active = !0)
            }, e.prototype.HintAll = function () {
                this.Gresshint.position = cc.v3(-500, 170, 0), this.Gresshint.active = !0, this.Gresshint.opacity = 255, this.Gresshint.getComponent(cc.Animation).play("HintHandAnim")
            }, e.prototype.HintOff = function () {
                this.unschedule(this.HintAll), this.Gresshint.active = !1, this.Gresshint.getComponent(cc.Animation).stop("HintHandAnim")
            }, e.prototype.hideHand = function () {
                this.unschedule(this.showLeafHint);
                var t = cc.find("Canvas/MainNode/Tools/common_handIndication");
                t.active = !1, cc.Tween.stopAllByTarget(t)
            }, e.prototype.NextAction = function (t) {
                return r(this, void 0, void 0, function () {
                    return c(this, function (e) {
                        switch (e.label) {
                            case 0:
                                return t.target.active = !1, l.default.getInstance().play("Pick and Drop"), d.default.getInstance().requestAds(), [4, h.Delay(.3)];
                            case 1:
                                return e.sent(), cc.director.loadScene("DesignScene"), [2]
                        }
                    })
                })
            }, a([u], e)
        }(cc.Component);
        o.default = f, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager",
        "../../../Scripts/Helper/HelperTools": "HelperTools",
        "../../../Scripts/Promotion/AdManager": "AdManager"
    }],
    HorseStarting: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "e9665Etzv5BLp2CSO60Qeij", "HorseStarting");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var r = t("../../../../Scripts/Helper/AudioManager"),
            c = cc._decorator,
            s = c.ccclass,
            l = (c.property, function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.Girl = null, e
                }
                return n(e, t), e.prototype.onLoad = function () {
                    cc.game.on("StartStory", this.StartView, this), this.Girl = cc.find("SafeArea/Girl", this.node), r.default.getInstance().add("HCStoryStarVocal1", cc.find("SafeArea/Sound/HCStoryStarVocal1", this.node).getComponent(cc.AudioSource).clip), r.default.getInstance().add("HCStoryStarVocal2", cc.find("SafeArea/Sound/HCStoryStarVocal2", this.node).getComponent(cc.AudioSource).clip)
                }, e.prototype.start = function () { }, e.prototype.StartView = function () {
                    var t = this;
                    this.node.children[0].active = !0, this.Girl.getComponent(cc.Animation).playAdditive("GardenStarting"), this.Girl.getComponent(cc.Animation).playAdditive("GardenStartingEye");
                    var e = r.default.getInstance().play("HCStoryStarVocal1"),
                        o = r.default.getInstance().play("HCStoryStarVocal2");
                    r.default.getInstance().stop("HCStoryStarVocal2"), cc.tween(this.node).delay(e).call(function () {
                        r.default.getInstance().play("HCStoryStarVocal2")
                    }).delay(o).call(function () {
                        cc.find("SafeArea/NextButton", t.node).active = !0, t.Girl.getComponent(cc.Animation).stop("GardenStarting")
                    }).start()
                }, e.prototype.NextButton = function (t) {
                    var e = t.target;
                    r.default.getInstance().play("click"), e.getComponent(cc.Button).interactable = !1, this.node.children[0].active = !1, cc.game.emit("StartView")
                }, a([s], e)
            }(cc.Component));
        o.default = l, cc._RF.pop()
    }, {
        "../../../../Scripts/Helper/AudioManager": "AudioManager"
    }],
    Horse: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "5bbcd7iJdFEN7RzRSnNU6qn", "Horse");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        }), o.TOOLID = void 0;
        var s, l = t("../../../Scripts/Helper/AudioManager"),
            h = t("../../../Scripts/Helper/HelperTools"),
            d = t("../../../Scripts/Promotion/AdManager"),
            p = cc._decorator,
            u = p.ccclass,
            f = p.property;
        (function (t) {
            t[t.NONE = -1] = "NONE", t[t.DustBin = 0] = "DustBin", t[t.BRUSH = 1] = "BRUSH", t[t.SHOWER = 2] = "SHOWER", t[t.SOAP = 3] = "SOAP", t[t.SHOWER2 = 4] = "SHOWER2", t[t.TOWEL = 5] = "TOWEL", t[t.Hair_REm = 6] = "Hair_REm"
        })(s = o.TOOLID || (o.TOOLID = {}));
        var y = function (t) {
            function e() {
                var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                return e.AllDirtBin = null, e.WaterParticale = null, e.HairPartical = null, e.DirtABC = [], e.Water = [], e.DirtBrush = [], e.Bubbles = [], e.Hair = [], e.pickPOS = null, e.pipePOS = null, e.BubblePos = null, e.pickIndex = -1, e.count = 0, e.Bcount = 0, e.Showercount = 0, e.Soapcount = 0, e.S2Count = 0, e.Towelcount = 0, e.Haircount = 0, e.isToolCompleted = [], e.selectedTool = s.NONE, e
            }
            return n(e, t), e.prototype.onLoad = function () {
                this.cacheImages(), this.registerEvents(), this.WaterParticale.active = !1, this.HairPartical.active = !1;
                for (var t = 0; t &lt; 10; t++) this.isToolCompleted[t] = !1;
                l.default.getInstance()
            }, e.prototype.start = function () {
                return r(this, void 0, void 0, function () {
                    return c(this, function (t) {
                        switch (t.label) {
                            case 0:
                                return cc.director.preloadScene("HorseBackground"), cc.game.on("StartView", this.StartView, this), [4, h.Delay(.3)];
                            case 1:
                                return t.sent(), cc.game.emit("StartStory"), [2]
                        }
                    })
                })
            }, e.prototype.StartView = function () {
                this.scheduleOnce(this.showLeafHint, 1)
            }, e.prototype.registerEvents = function () {
                this.node.on(cc.Node.EventType.TOUCH_START, this.TouchStart, this), this.node.on(cc.Node.EventType.TOUCH_MOVE, this.TouchMove, this), this.node.on(cc.Node.EventType.TOUCH_END, this.TouchEnd, this), this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.TouchEnd, this)
            }, e.prototype.cacheImages = function () {
                for (var t = 1; t &lt;= 9; t++) this.DirtABC.push(cc.find("Canvas/Dustbin/Traceltems/SC_TraceItems_" + t)), this.DirtBrush.push(cc.find("Canvas/HorseDirtLayer/Layer-" + t));
                for (t = 1; t &lt;= 19; t++) this.Water.push(cc.find("Canvas/SingleWater/singleWaterDrop" + t)), cc.find("SingleWater/singleWaterDrop" + t, this.node).getComponent(cc.Animation).getAnimationState("Drop").speed = this.getRandomInt(.5, 1);
                for (t = 1; t &lt;= 11; t++) this.Bubbles.push(cc.find("Canvas/Bubblesnode/HorseCleaning_Bubble_" + t));
                for (var e = 1; e &lt;= 3; e++) this.Hair.push(cc.find("Canvas/Hair_REm/HC_Comb_Hair_Rem_" + e));
                this.LeftHend = cc.find("Canvas/HandTools/new_Hand"), this.Brush = cc.find("Canvas/HandTools/HC_PanelTool_sponge_Dirt"), this.RightHand = cc.find("Canvas/HandTools/RaigthHand"), this.Btool = cc.find("Canvas/HandTools/HC_PanelTool_Soap"), this.Towel = cc.find("Canvas/HandTools/towelTool"), this.HairRake = cc.find("Canvas/HandTools/HC_PanelTool_Comb"), this.Pipe = cc.find("Canvas/HandTools/Car_washing_pipe"), this.HairPartical = cc.find("Canvas/HandTools/HC_PanelTool_Comb/hair"), this.particalStar = cc.find("Canvas/Dustbin/dustbin2/particalStar"), this.HintNode = cc.find("Canvas/New Node/common_handIndication"), this.HandAnim = cc.find("Canvas/HandTools"), this.CompletToolPartical = cc.find("Canvas/CompletTool")
            }, e.prototype.TouchStart = function (t) {
                var e = t.getLocation();
                0 != this.isToolCompleted[s.DustBin] ? 0 != this.isToolCompleted[s.BRUSH] ? 0 != this.isToolCompleted[s.SHOWER] ? 0 != this.isToolCompleted[s.SOAP] ? 0 != this.isToolCompleted[s.TOWEL] ? 0 != this.isToolCompleted[s.Hair_REm] || this.HairRake &amp;&amp; this.HairRake.getBoundingBoxToWorld().contains(e) &amp;&amp; 255 == this.HairRake.opacity &amp;&amp; 0 == this.HairRake.getNumberOfRunningActions() &amp;&amp; (l.default.getInstance().play("click"), this.HintOff(), this.unschedule(this.ReStartDirtyHint), this.HandAnim.getComponent(cc.Animation).stop("HireAnimation"), this.HairRPos = this.HairRake.position, this.HairRake.opacity = 254) : this.TStart_Towel(e) : this.TStart_Bubble(e) : this.TStart_Water(e) : this.TStart_Brush(e) : this.TStart_DirtAbc(e)
            }, e.prototype.TouchMove = function (t) {
                var e = this,
                    o = t.getLocation(),
                    i = this.node.convertToNodeSpaceAR(o);
                if (0 == this.isToolCompleted[s.DustBin]) {
                    if (-1 != this.pickIndex) {
                        var n = cc.find("Canvas/moveItem");
                        254 == this.DirtABC[this.pickIndex].opacity &amp;&amp; 254 == n.opacity &amp;&amp; (n.position = cc.v3(i))
                    }
                } else {
                    if (0 == this.isToolCompleted[s.BRUSH]) return void this.TMove_Brush(i);
                    if (0 == this.isToolCompleted[s.SHOWER]) return void this.TMove_Water(i);
                    if (0 == this.isToolCompleted[s.SOAP]) return void this.TMove_Bubble(i);
                    if (0 == this.isToolCompleted[s.TOWEL]) return void this.TMove_Towel(i);
                    if (0 == this.isToolCompleted[s.Hair_REm]) {
                        if (this.HairRake &amp;&amp; 254 == this.HairRake.opacity) {
                            this.HairRake.position = cc.v3(i), this.LeftHend.active = !1;
                            for (var a = 0; a &lt; this.Hair.length; a++) this.Hair[a].active &amp;&amp; this.HairRake &amp;&amp; this.Hair[a].getBoundingBoxToWorld().intersects(this.HairRake.getBoundingBoxToWorld()) &amp;&amp; (this.HairPartical.active = !0, cc.find("Canvas/EamtyNode").children[a].active = !1, this.Hair[a].opacity &gt;= 2.5 &amp;&amp; (this.Hair[a].opacity -= 2.5, l.default.getInstance().isPlaying("comb") || l.default.getInstance().play("comb"), 0 == this.HairPartical.getNumberOfRunningActions() &amp;&amp; cc.tween(this.HairPartical).call(function () {
                                e.HairPartical.getComponent(cc.ParticleSystem).stopped &amp;&amp; e.HairPartical.getComponent(cc.ParticleSystem).resetSystem()
                            }).start(), 50 == this.Hair[a].opacity &amp;&amp; (this.unschedule(this.ReStartDirtyHint), this.Hair[a].active, this.Haircount++, this.Haircount == this.Hair.length &amp;&amp; (this.isToolCompleted[s.Hair_REm] = !0, this.CompletToolPartical.getComponent(cc.ParticleSystem).resetSystem(), l.default.getInstance().play("PARTICLE"), this.HairRake.opacity = 253, this.HairRake.active = !1, this.LeftHend.active = !1, cc.find("Canvas/Next").active = !0))))
                        }
                        return
                    }
                }
            }, e.prototype.TouchEnd = function () {
                0 != this.isToolCompleted[s.DustBin] ? 0 != this.isToolCompleted[s.BRUSH] ? 0 != this.isToolCompleted[s.SHOWER] ? 0 != this.isToolCompleted[s.SOAP] ? 0 != this.isToolCompleted[s.TOWEL] ? 0 != this.isToolCompleted[s.Hair_REm] || this.HairRake &amp;&amp; 254 == this.HairRake.opacity &amp;&amp; (this.HairRake.opacity = 255, this.HandAnim.getComponent(cc.Animation).play("HireAnimation"), this.scheduleOnce(this.HintAll, 4), this.HairPartical.getComponent(cc.ParticleSystem).stopSystem(), cc.tween(this.HairRake).to(1, {
                    position: this.HairRPos
                }).start(), 1 == this.HairRake.active ? (this.scheduleOnce(this.ReStartDirtyHint, 4), this.LeftHend.active = !0, cc.tween(this.LeftHend).set({
                    position: cc.v3(-657, -100, 0)
                }).to(.5, {
                    position: cc.v3(-400, -100, 0)
                }).start()) : (this.HairRake.opacity = 253, cc.find("Canvas/Next").active = !0)) : this.TEnd_Towel() : this.TEnd_Bubble() : this.TEnd_Water() : this.TEnd_Brush() : this.TEnd_Bin()
            }, e.prototype.TStart_DirtAbc = function (t) {
                for (var e = cc.find("Canvas/moveItem"), o = 0; o &lt; this.DirtABC.length; o++)
                    if (255 == this.DirtABC[o].opacity &amp;&amp; 255 == e.opacity &amp;&amp; this.DirtABC[o].getBoundingBoxToWorld().contains(t) &amp;&amp; 0 == this.DirtABC[o].getNumberOfRunningActions()) {
                        l.default.getInstance().play("click"), this.DirtABC[o].zIndex = 1, this.pickPOS = this.DirtABC[o].position, e.position = this.pickPOS, this.pickIndex = o, e.getComponent(cc.Sprite).spriteFrame = this.DirtABC[this.pickIndex].getComponent(cc.Sprite).spriteFrame, this.DirtABC[o].active = !1, e.active = !0, this.DirtABC[o].opacity = 254, e.opacity = 254, this.hideHand();
                        break
                    }
            }, e.prototype.TEnd_Bin = function () {
                var t = this;
                if (-1 != this.pickIndex &amp;&amp; 0 == cc.find("Canvas/moveItem").getNumberOfRunningActions()) {
                    var e = this.pickIndex;
                    this.pickIndex = -1;
                    var o = cc.find("Canvas/moveItem");
                    if (this.pickPOS, cc.find("Canvas/Dustbin/dustbin1").getBoundingBoxToWorld().intersects(o.getBoundingBoxToWorld())) {
                        if (this.DirtABC[e].opacity = 250, o.opacity = 250, cc.tween(o).to(.5, {
                            position: cc.v3(-320, -30, 0)
                        }).call(function () {
                            o.active = !1, o.opacity = 255, t.DirtABC[e].active = !0, t.DirtABC[e].position = cc.v3(-320, -30, 0)
                        }).start(), cc.tween(this.DirtABC[e]).set({
                            position: cc.v3(-320, -30, 0)
                        }).by(1, {
                            position: cc.v3(0, -100, 0)
                        }).call(function () {
                            l.default.getInstance().play("dustbin"), t.scheduleOnce(t.showLeafHint, 2), t.particalStar.active = !0, t.particalStar.getComponent(cc.ParticleSystem).resetSystem(), l.default.getInstance().play("PARTICLE")
                        }).removeSelf().start(), this.count++, this.count == this.DirtABC.length) {
                            this.count = 0;
                            var i = cc.find("Canvas/Dustbin");
                            this.isToolCompleted[s.DustBin] = !0, cc.tween(i).delay(2).to(2, {
                                position: cc.v3(-500, 0, 0)
                            }).call(function () {
                                i.active = !1, t.Hand_Tool()
                            }).start()
                        }
                    } else this.DirtABC[e].position = o.position, this.DirtABC[e].opacity = 255, this.scheduleOnce(this.showLeafHint, 2), o.opacity = 255, o.active = !1, this.DirtABC[e].active = !0, cc.tween(this.DirtABC[e]).to(.3, {
                        position: this.pickPOS
                    }).call(function () { }).start()
                }
            }, e.prototype.TStart_Brush = function (t) {
                this.Brush.getBoundingBoxToWorld().contains(t) &amp;&amp; 255 == this.Brush.opacity &amp;&amp; 0 == this.Brush.getNumberOfRunningActions() &amp;&amp; (this.pickPOS = this.Brush.position, l.default.getInstance().play("click"), this.HandAnim.getComponent(cc.Animation).stop("BrushAnimation"), this.HintOff(), this.Brush.opacity = 254, this.BrushAngal = this.Brush.angle, this.Brush.angle = 0)
            }, e.prototype.TMove_Brush = function (t) {
                var e = cc.find("Canvas/HandTools/HC_PanelTool_sponge_Dirt/broomDust");
                if (254 == this.Brush.opacity) {
                    this.Brush.position = cc.v3(t), this.LeftHend.active = !1;
                    for (var o = 0; o &lt; this.DirtBrush.length; o++) this.DirtBrush &amp;&amp; this.Brush &amp;&amp; this.DirtBrush[o].getBoundingBoxToWorld().intersects(this.Brush.getBoundingBoxToWorld()) &amp;&amp; this.DirtBrush[o].opacity &gt;= 2.5 &amp;&amp; (this.DirtBrush[o].opacity -= 2.5, l.default.getInstance().isPlaying("brush rub") || l.default.getInstance().play("brush rub"), e.active = !0, 0 == this.HairPartical.getNumberOfRunningActions() &amp;&amp; cc.tween(this.HairPartical).call(function () {
                        e.getComponent(cc.ParticleSystem).stopped &amp;&amp; e.getComponent(cc.ParticleSystem).resetSystem()
                    }).start(), 50 == this.DirtBrush[o].opacity &amp;&amp; (this.DirtBrush[o].opacity = 0, this.Bcount++, this.Bcount == this.DirtBrush.length &amp;&amp; (l.default.getInstance().stop("brush rub"), this.Brush.opacity = 253, this.Brush.active = !1, this.LeftHend.active = !1, this.isToolCompleted[s.BRUSH] = !0, this.CompletToolPartical.active = !0, this.CompletToolPartical.getComponent(cc.ParticleSystem).resetSystem(), l.default.getInstance().play("PARTICLE"), this.PipeHand()))), this.DirtBrush[o].opacity
                }
            }, e.prototype.TEnd_Brush = function () {
                254 == this.Brush.opacity &amp;&amp; (this.Brush.opacity = 255, l.default.getInstance().stop("brush rub"), this.HandAnim.getComponent(cc.Animation).play("BrushAnimation"), cc.tween(this.Brush).to(.3, {
                    position: cc.v3(this.pickPOS),
                    angle: this.BrushAngal
                }).start(), this.scheduleOnce(this.HintAll, 2), console.log(this.isToolCompleted[s.BRUSH]), 0 == this.isToolCompleted[s.BRUSH] ? (this.LeftHend.active = !0, cc.tween(this.LeftHend).set({
                    position: cc.v3(-657, -100, 0)
                }).to(.3, {
                    position: cc.v3(-400, -100, 0)
                }).start()) : this.Brush.opacity = 253)
            }, e.prototype.TStart_Water = function (t) {
                null == this.isToolCompleted[s.BRUSH] &amp;&amp; this.Pipe &amp;&amp; this.Pipe.getBoundingBoxToWorld().contains(t) &amp;&amp; 255 == this.Pipe.opacity &amp;&amp; 0 == this.Pipe.getNumberOfRunningActions() &amp;&amp; (l.default.getInstance().play("click"), l.default.getInstance().play("Fill Water", !0), this.HandAnim.getComponent(cc.Animation).stop("pipeanimation"), this.HintOff(), this.pipePOS = this.Pipe.position, this.Pipe.opacity = 254, this.WaterParticale.active = !0, this.WaterParticale.getComponent(cc.ParticleSystem).resetSystem(), this.RightHand.active = !1)
            }, e.prototype.TMove_Water = function (t) {
                if (this.Pipe.opacity &amp;&amp; 254 == this.Pipe.opacity) {
                    this.Pipe.position = cc.v3(t);
                    for (var e = 0; e &lt; this.Water.length; e++) this.WaterParticale &amp;&amp; this.Water &amp;&amp; this.Water[e].getBoundingBoxToWorld().intersects(this.WaterParticale.getBoundingBoxToWorld()) &amp;&amp; this.Water[e].opacity &lt;= 195 &amp;&amp; (this.Water[e].opacity += 5, 200 == this.Water[e].opacity &amp;&amp; (this.Water[e].opacity = 255, this.Showercount++, console.log(this.Water.length), this.Showercount == this.Water.length &amp;&amp; (l.default.getInstance().stop("Fill Water"), cc.tween(this.Pipe).set({
                        position: cc.v3(513, -65, 0)
                    }).start(), cc.tween(this.RightHand).set({
                        position: cc.v3(600, -70, 0)
                    }).start(), this.WaterParticale.getComponent(cc.ParticleSystem).stopSystem(), this.Brush.opacity = 250, this.CompletToolPartical.getComponent(cc.ParticleSystem).resetSystem(), l.default.getInstance().play("PARTICLE"), this.Hand_Tool(), this.isToolCompleted[s.SHOWER] = !0)));
                    if (253 == this.Btool.opacity)
                        for (e = 0; e &lt; this.Bubbles.length; e++) this.Bubbles[e].active &amp;&amp; this.WaterParticale &amp;&amp; this.Bubbles[e].getBoundingBoxToWorld().intersects(this.WaterParticale.getBoundingBoxToWorld()) &amp;&amp; this.Bubbles[e].opacity &gt;= 2.5 &amp;&amp; (this.Bubbles[e].opacity -= 2.5, 10 == this.Bubbles[e].opacity &amp;&amp; (this.Bubbles[e].opacity = 0, this.Bubbles[e].active = !1, this.count++, this.count == this.Bubbles.length &amp;&amp; (l.default.getInstance().stop("Fill Water"), this.WaterParticale.getComponent(cc.ParticleSystem).stopSystem(), this.RightHand.active = !1, this.Pipe.active = !1, this.isToolCompleted[s.SHOWER] = !0, this.CompletToolPartical.getComponent(cc.ParticleSystem).resetSystem(), l.default.getInstance().play("PARTICLE"), this.Towel_Tool())))
                }
            }, e.prototype.TEnd_Water = function () {
                254 == this.Pipe.opacity &amp;&amp; this.pipePOS &amp;&amp; (l.default.getInstance().stop("Fill Water"), this.Pipe.opacity = 255, cc.tween(this.Pipe).to(.3, {
                    position: cc.v3(313, -65, 0)
                }).start(), this.HandAnim.getComponent(cc.Animation).play("pipeanimation"), this.scheduleOnce(this.HintAll, 2), 0 == this.isToolCompleted[s.SHOWER] &amp;&amp; (this.RightHand.active = !0, cc.tween(this.RightHand).set({
                    position: cc.v3(600, -70, 0)
                }).to(.3, {
                    position: cc.v3(400, -70, 0)
                }).start(), this.WaterParticale.getComponent(cc.ParticleSystem).stopSystem()))
            }, e.prototype.TStart_Bubble = function (t) {
                this.Btool.getBoundingBoxToWorld().contains(t) &amp;&amp; 255 == this.Btool.opacity &amp;&amp; 0 == this.Btool.getNumberOfRunningActions() &amp;&amp; (this.BubblePos = this.Btool.position, this.HintOff(), this.HandAnim.getComponent(cc.Animation).stop("Bubblesanimation"), this.Btool.opacity = 254, l.default.getInstance().play("click"), this.LeftHend.active = !1)
            }, e.prototype.TMove_Bubble = function (t) {
                if (254 == this.Btool.opacity) {
                    this.Btool.position = cc.v3(t);
                    for (var e = 0; e &lt; this.Bubbles.length; e++) this.Bubbles[e] &amp;&amp; this.Btool &amp;&amp; this.Bubbles[e].getBoundingBoxToWorld().intersects(this.Btool.getBoundingBoxToWorld()) &amp;&amp; this.Bubbles[e].opacity &lt;= 252.5 &amp;&amp; (this.Bubbles[e].opacity += 2.5, l.default.getInstance().isPlaying("brush rub") || l.default.getInstance().play("brush rub"), 200 == this.Bubbles[e].opacity &amp;&amp; (this.Bubbles[e].opacity = 255, this.Soapcount++, this.Soapcount == this.Bubbles.length &amp;&amp; (l.default.getInstance().stop("brush rub"), this.isToolCompleted[s.SHOWER] = !1, this.isToolCompleted[s.SOAP] = !0, this.Btool.active = !1, cc.find("Canvas/WashDirt").active = !1, this.Btool.opacity = 253, this.LeftHend.active = !1, this.CompletToolPartical.getComponent(cc.ParticleSystem).resetSystem(), l.default.getInstance().play("PARTICLE"), this.BubbleHand(), this.Pipe.opacity = 255)))
                }
            }, e.prototype.TEnd_Bubble = function () {
                254 == this.Btool.opacity &amp;&amp; this.BubblePos &amp;&amp; (l.default.getInstance().stop("brush rub"), this.Btool.opacity = 255, this.HandAnim.getComponent(cc.Animation).play("Bubblesanimation"), cc.tween(this.Btool).to(.3, {
                    position: cc.v3(this.BubblePos)
                }).start(), this.scheduleOnce(this.HintAll, 4), 0 == this.isToolCompleted[s.SOAP] ? (this.LeftHend.active = !0, cc.tween(this.LeftHend).set({
                    position: cc.v3(-657, -100, 0)
                }).to(.3, {
                    position: cc.v3(-400, -100, 0)
                }).start()) : this.Btool.opacity = 253)
            }, e.prototype.TStart_Towel = function (t) {
                this.Towel.getBoundingBoxToWorld().contains(t) &amp;&amp; 255 == this.Towel.opacity &amp;&amp; 0 == this.Towel.getNumberOfRunningActions() &amp;&amp; (this.Towelpos = this.Towel.position, this.HintOff(), this.HandAnim.getComponent(cc.Animation).stop("TowelAnimation"), this.Towel.opacity = 254, l.default.getInstance().play("click"))
            }, e.prototype.TMove_Towel = function (t) {
                if (254 == this.Towel.opacity) {
                    this.Towel.position = cc.v3(t), this.LeftHend.active = !1;
                    for (var e = 0; e &lt; this.Water.length; e++) this.Water[e] &amp;&amp; this.Towel &amp;&amp; this.Water[e].getBoundingBoxToWorld().intersects(this.Towel.getBoundingBoxToWorld()) &amp;&amp; this.Water[e].opacity &gt;= 55 &amp;&amp; (this.Water[e].opacity -= 5, l.default.getInstance().isPlaying("towel") || l.default.getInstance().play("towel"), 50 == this.Water[e].opacity &amp;&amp; (this.Water[e].opacity = 0, this.Towelcount++, this.Towelcount == this.Water.length - 8 &amp;&amp; (this.Towelcount, this.Water.length), console.log(this.Water.length), this.Towelcount == this.Water.length &amp;&amp; (l.default.getInstance().stop("towel"), this.DirtyHint(), cc.find("Canvas/SingleWater").active = !1, this.Pipe.active = !1, this.Towel.active = !1, this.LeftHend.active = !1, this.isToolCompleted[s.TOWEL] = !0, this.CompletToolPartical.getComponent(cc.ParticleSystem).resetSystem(), l.default.getInstance().play("PARTICLE"), this.Towel_Tool())))
                }
            }, e.prototype.TEnd_Towel = function () {
                254 == this.Towel.opacity &amp;&amp; (l.default.getInstance().stop("towel"), this.Towel.opacity = 255, cc.tween(this.Towel).to(.3, {
                    position: cc.v3(this.Towelpos)
                }).start(), this.HandAnim.getComponent(cc.Animation).play("TowelAnimation"), this.scheduleOnce(this.HintAll, 4), 1 == this.Towel.active &amp;&amp; (this.LeftHend.active = !0, cc.tween(this.LeftHend).set({
                    position: cc.v3(-657, -102, 0)
                }).to(.3, {
                    position: cc.v3(-400, -100, 0)
                }).start()))
            }, e.prototype.showLeafHint = function () {
                for (var t = 0; t &lt; this.DirtABC.length; t++)
                    if (255 == this.DirtABC[t].opacity) {
                        this.ShowHHand(this.DirtABC[t].position);
                        break
                    }
            }, e.prototype.ShowHHand = function (t) {
                var e = cc.find("Canvas/New Node/common_handIndication");
                e.active = !0, e.opacity = 0, cc.tween(e).repeatForever(cc.tween(e).set({
                    position: cc.v3(t)
                }).to(.2, {
                    opacity: 255
                }).to(1, {
                    position: cc.v3(-319, -144, 0)
                }).to(.2, {
                    opacity: 0
                })).start()
            }, e.prototype.hideHand = function () {
                this.unschedule(this.showLeafHint);
                var t = cc.find("Canvas/New Node/common_handIndication");
                t.opacity = 255, t.active = !1, cc.Tween.stopAllByTarget(t)
            }, e.prototype.PipeHand = function () {
                var t = this;
                1 == this.isToolCompleted[s.BRUSH] &amp;&amp; this.Pipe &amp;&amp; (this.isToolCompleted[s.BRUSH] = null, this.RightHand.active = !0, cc.tween(this.RightHand).delay(.5).set({
                    position: cc.v3(600, -70, 0)
                }).call(function () { }).to(1, {
                    position: cc.v3(400, -70, 0)
                }).start(), this.Pipe.active = !0, cc.tween(this.Pipe).delay(.5).set({
                    position: cc.v3(513, -65, 0)
                }).call(function () { }).to(1, {
                    position: cc.v3(313, -65, 0)
                }).call(function () {
                    t.HandAnim.getComponent(cc.Animation).play("pipeanimation"), t.scheduleOnce(t.HintAll, 4)
                }).start())
            }, e.prototype.BubbleHand = function () {
                var t = this;
                1 == this.isToolCompleted[s.SOAP] &amp;&amp; (this.RightHand.active = !0, cc.tween(this.RightHand).delay(.5).set({
                    position: cc.v3(600, -70, 0)
                }).call(function () { }).to(1, {
                    position: cc.v3(400, -70, 0)
                }).start(), this.Pipe.active = !0, cc.tween(this.Pipe).delay(.5).set({
                    position: cc.v3(513, -65, 0)
                }).to(1, {
                    position: cc.v3(313, -65, 0)
                }).call(function () {
                    t.HandAnim.getComponent(cc.Animation).play("pipeanimation"), t.scheduleOnce(t.HintAll, 4)
                }).start())
            }, e.prototype.Hand_Tool = function () {
                var t = this;
                1 == this.isToolCompleted[s.DustBin] &amp;&amp; (this.isToolCompleted[s.DustBin] = null, cc.tween(this.Brush).to(1, {
                    position: cc.v3(-280, -100, 0)
                }).start(), this.HendPos = this.LeftHend.position, cc.tween(this.LeftHend).to(1, {
                    position: cc.v3(-400, -100, 0)
                }).call(function () {
                    t.HandAnim.getComponent(cc.Animation).play("BrushAnimation"), t.scheduleOnce(t.HintAll, 4)
                }).start()), this.Showercount == this.Water.length &amp;&amp; (this.isToolCompleted[s.SHOWER] = null, console.log("nathi aavtu"), this.LeftHend.active = !0, cc.tween(this.LeftHend).set({
                    position: cc.v3(-657, -102, 0)
                }).to(1, {
                    position: cc.v3(-400, -100, 0)
                }).start(), cc.tween(this.Btool).to(1, {
                    position: cc.v3(-280, -90, 0)
                }).call(function () {
                    t.HandAnim.getComponent(cc.Animation).play("Bubblesanimation")
                }).start(), this.scheduleOnce(this.HintAll, 4))
            }, e.prototype.HintAll = function () {
                this.node.getComponent(cc.Animation).playAdditive("HintAnimation")
            }, e.prototype.HintOff = function () {
                this.unschedule(this.HintAll), this.HintNode.active = !1, this.node.getComponent(cc.Animation).stop("HintAnimation")
            }, e.prototype.Towel_Tool = function () {
                1 == this.isToolCompleted[s.SHOWER] &amp;&amp; (cc.find("Canvas/Bubblesnode").active = !1, this.Pipe.active = !1, this.LeftHend.active = !0, cc.tween(this.LeftHend).set({
                    position: cc.v3(-657, -102, 0)
                }).to(1, {
                    position: cc.v3(-400, -100, 0)
                }).start(), cc.tween(this.Towel).set({
                    position: cc.v3(-553, -90, 0)
                }).to(1, {
                    position: cc.v3(-295, -90, 0)
                }).start(), this.scheduleOnce(this.HintAll, 4), this.HandAnim.getComponent(cc.Animation).play("TowelAnimation")), 1 == this.isToolCompleted[s.TOWEL] &amp;&amp; (this.isToolCompleted[s.TOWEL] = null, this.LeftHend.active = !0, cc.Tween.stopAllByTarget(this.LeftHend), cc.tween(this.LeftHend).set({
                    position: cc.v3(-657, -102, 0)
                }).to(1, {
                    position: cc.v3(-400, -100, 0)
                }).delay(2).start(), cc.tween(this.HairRake).set({
                    position: cc.v3(-553, -90, 0)
                }).to(1, {
                    position: cc.v3(-295, -90, 0)
                }).start(), this.HandAnim.getComponent(cc.Animation).play("HireAnimation"), this.scheduleOnce(this.HintAll, 4))
            }, e.prototype.DirtyHint = function () {
                for (var t = cc.find("Canvas/HandTools/arrow"), e = cc.find("Canvas/EamtyNode"), o = 0; o &lt; this.Hair.length; o++)
                    if (1 == this.Hair[o].active) {
                        var i = cc.instantiate(t);
                        i.active = !0, i.setPosition(this.Hair[o].position), cc.tween(i).repeatForever(cc.tween(i).by(.5, {
                            position: cc.v3(10, 10, 0),
                            scale: -.2
                        }).by(.5, {
                            position: cc.v3(-10, -10, 0),
                            scale: .2
                        })).start(), e.addChild(i)
                    }
            }, e.prototype.ReStartDirtyHint = function () {
                for (var t = cc.find("Canvas/EamtyNode"), e = 0; e &lt; this.Hair.length; e++) 1 == this.Hair[e].active &amp;&amp; (t.children[e].active = !0, t.active = !0)
            }, e.prototype.getRandomInt = function (t, e) {
                return Math.floor(Math.random() * (e - t + 1)) + t
            }, e.prototype.NextAction = function (t) {
                return r(this, void 0, void 0, function () {
                    return c(this, function (e) {
                        switch (e.label) {
                            case 0:
                                return t.target.active = !1, l.default.getInstance().play("Pick and Drop"), d.default.getInstance().requestAds(), [4, h.Delay(.3)];
                            case 1:
                                return e.sent(), cc.director.loadScene("HorseBackground"), [2]
                        }
                    })
                })
            }, e.prototype.update = function () { }, a([f(cc.Node)], e.prototype, "AllDirtBin", void 0), a([f(cc.Node)], e.prototype, "WaterParticale", void 0), a([u], e)
        }(cc.Component);
        o.default = y, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager",
        "../../../Scripts/Helper/HelperTools": "HelperTools",
        "../../../Scripts/Promotion/AdManager": "AdManager"
    }],
    JigsawPopup: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "e37989yvBlMrrUdJZz1iaBv", "JigsawPopup");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var r = t("../../../Scripts/Helper/AudioManager"),
            c = cc._decorator,
            s = c.ccclass,
            l = c.property,
            h = function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.panelPartsNode = null, e.usePartsNode = null, e.canMove = !1, e.moveIndex = 0, e.panelPartsScale = .57, e.toolPostion = cc.Vec3.ZERO, e
                }
                return n(e, t), e.prototype.start = function () {
                    this.registerEvents()
                }, e.prototype.registerEvents = function () {
                    this.node.on(cc.Node.EventType.TOUCH_START, this.touchStarted, this), this.node.on(cc.Node.EventType.TOUCH_MOVE, this.touchMoved, this), this.node.on(cc.Node.EventType.TOUCH_END, this.touchEnded, this), this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.touchEnded, this)
                }, e.prototype.touchStarted = function (t) {
                    for (var e = 0; e &lt; this.panelPartsNode.children.length; e++) {
                        var o = this.panelPartsNode.children[e];
                        if (o.getBoundingBoxToWorld().contains(t.getLocation())) {
                            this.usePartsNode.children[e].opacity = 150, this.canMove = !0, this.moveIndex = e, this.toolPostion = o.position, o.setPosition(o.parent.convertToNodeSpaceAR(t.getLocation())), o.scale = 1;
                            break
                        }
                    }
                }, e.prototype.touchMoved = function (t) {
                    if (this.canMove) {
                        var e = this.panelPartsNode.children[this.moveIndex],
                            o = this.usePartsNode.children[this.moveIndex];
                        if (e.setPosition(e.parent.convertToNodeSpaceAR(t.getLocation())), o.getBoundingBoxToWorld().containsRect(e.getChildByName("intersect").getBoundingBoxToWorld())) {
                            this.canMove = !1, e.scale = 0, o.opacity = 255, this.addToolParticle(o, 0), r.default.getInstance().play("Poo Pick");
                            for (var i = 0; i &lt; this.panelPartsNode.children.length; i++)
                                if (0 != this.panelPartsNode.children[i].scale) return;
                            cc.game.emit("BenchFixed")
                        }
                    }
                }, e.prototype.touchEnded = function () {
                    if (this.canMove) {
                        this.canMove = !1;
                        var t = this.panelPartsNode.children[this.moveIndex];
                        this.usePartsNode.children[this.moveIndex].opacity = 0, t.position = this.toolPostion, t.scale = this.panelPartsScale
                    }
                }, e.prototype.addToolParticle = function (t, e) {
                    var o = this,
                        i = this.node.convertToNodeSpaceAR(t.parent.convertToWorldSpaceAR(t.getPosition())),
                        n = cc.instantiate(cc.find("ToolComplete", this.node));
                    n.setPosition(i), cc.tween(n).delay(e).call(function () {
                        r.default.getInstance().play("PARTICLE"), n.getComponent(cc.ParticleSystem).autoRemoveOnFinish = !0, n.parent = o.node, n.getComponent(cc.ParticleSystem).resetSystem()
                    }).start()
                }, a([l(cc.Node)], e.prototype, "panelPartsNode", void 0), a([l(cc.Node)], e.prototype, "usePartsNode", void 0), a([s], e)
            }(cc.Component);
        o.default = h, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager"
    }],
    LevelScene: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "68b83reBItK27RFm3Oq3tph", "LevelScene");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var s = t("../../../Scripts/Helper/AudioManager"),
            l = t("../../../Scripts/Helper/GlobalData"),
            h = t("../../../Scripts/Helper/HelperTools"),
            d = t("../../../Scripts/Promotion/AdManager"),
            p = cc._decorator,
            u = p.ccclass,
            f = (p.property, function (t) {
                function e() {
                    return null !== t &amp;&amp; t.apply(this, arguments) || this
                }
                return n(e, t), e.prototype.onLoad = function () {
                    0 == l.GlobalData.data.flags.isViewDone[0] ? cc.director.preloadScene("Bedroomscene") : (cc.find("Canvas/beddirty").active = !1, cc.find("Canvas/Btns/BedDirty").removeComponent(cc.Button), l.GlobalData.data.flags.isCompleteParticle[0] = !0, cc.find("Canvas/Btns/BedDirty/LevelDone").active = !1), 0 == l.GlobalData.data.flags.isViewDone[1] ? cc.director.preloadScene("BathRoom") : (cc.find("Canvas/bathdirty").active = !1, cc.find("Canvas/Btns/BathDirty").removeComponent(cc.Button), cc.find("Canvas/Btns/BathDirty/LevelDone").active = !1), 0 == l.GlobalData.data.flags.isViewDone[2] ? cc.director.preloadScene("Garden") : (cc.find("Canvas/garden").active = !1, cc.find("Canvas/Btns/BoardDirty").removeComponent(cc.Button), cc.find("Canvas/Btns/BoardDirty/LevelDone").active = !1), 0 == l.GlobalData.data.flags.isViewDone[3] ? cc.director.preloadScene("Horse") : (cc.find("Canvas/horsedirty").active = !1, cc.find("Canvas/Btns/HorseButton").removeComponent(cc.Button), cc.find("Canvas/Btns/HorseButton/LevelDone").active = !1)
                }, e.prototype.start = function () {
                    for (var t = 0, e = 0; e &lt; 4; e++) l.GlobalData.data.flags.isViewDone[e] &amp;&amp; t++;
                    t &gt;= 2 &amp;&amp; (cc.find("Canvas/Done").active = !0)
                }, e.prototype.SelectScene = function (t) {
                    return r(this, void 0, void 0, function () {
                        var e;
                        return c(this, function (o) {
                            switch (o.label) {
                                case 0:
                                    switch ((e = t.target).name) {
                                        case "BedDirty":
                                            return [3, 1];
                                        case "BathDirty":
                                            return [3, 3];
                                        case "BoardDirty":
                                            return [3, 5];
                                        case "HorseButton":
                                            return [3, 7]
                                    }
                                    return [3, 9];
                                case 1:
                                    return s.default.getInstance().play("click"), e.children[0].active = !0, d.default.getInstance().requestAds(), [4, h.DelayForScene(.3)];
                                case 2:
                                    return o.sent(), l.GlobalData.data.flags.isViewDone[0] = !0, cc.director.loadScene("Bedroomscene"), [3, 9];
                                case 3:
                                    return s.default.getInstance().play("click"), e.children[0].active = !0, d.default.getInstance().requestAds(), [4, h.DelayForScene(.3)];
                                case 4:
                                    return o.sent(), l.GlobalData.data.flags.isViewDone[1] = !0, cc.director.loadScene("BathRoom"), [3, 9];
                                case 5:
                                    return s.default.getInstance().play("click"), e.children[0].active = !0, d.default.getInstance().requestAds(), [4, h.DelayForScene(.3)];
                                case 6:
                                    return o.sent(), l.GlobalData.data.flags.isViewDone[2] = !0, cc.director.loadScene("Garden"), [3, 9];
                                case 7:
                                    return s.default.getInstance().play("click"), e.children[0].active = !0, d.default.getInstance().requestAds(), [4, h.DelayForScene(.3)];
                                case 8:
                                    return o.sent(), l.GlobalData.data.flags.isViewDone[3] = !0, cc.director.loadScene("Horse"), [3, 9];
                                case 9:
                                    return [2]
                            }
                        })
                    })
                }, e.prototype.DoneAction = function (t) {
                    return r(this, void 0, void 0, function () {
                        return c(this, function (e) {
                            switch (e.label) {
                                case 0:
                                    return s.default.getInstance().play("click"), t.target.active = !1, d.default.getInstance().requestAds(), [4, h.DelayForScene(.3)];
                                case 1:
                                    return e.sent(), cc.find("Canvas/promotion").position = cc.Vec3.ZERO, cc.find("Canvas/more").active = !1, cc.find("Canvas/logo").active = !1, [2]
                            }
                        })
                    })
                }, a([u], e)
            }(cc.Component));
        o.default = f, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager",
        "../../../Scripts/Helper/GlobalData": "GlobalData",
        "../../../Scripts/Helper/HelperTools": "HelperTools",
        "../../../Scripts/Promotion/AdManager": "AdManager"
    }],
    MainScene: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "6735aUO49xBdqxe0tPPD0uC", "MainScene");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var s = t("../../../Scripts/Helper/AudioManager"),
            l = t("../../../Scripts/Helper/HelperTools"),
            h = cc._decorator,
            d = h.ccclass,
            p = (h.property, function (t) {
                function e() {
                    return null !== t &amp;&amp; t.apply(this, arguments) || this
                }
                return n(e, t), e.prototype.onLoad = function () {
                    cc.director.preloadScene("LevelScene"), s.default.getInstance().add("bgsound", cc.find("Canvas/bgsound").getComponent(cc.AudioSource).clip)
                }, e.prototype.start = function () {
                    s.default.getInstance().playMusic("bgsound", !0)
                }, e.prototype.PlayButton = function (t) {
                    return r(this, void 0, void 0, function () {
                        var e;
                        return c(this, function (o) {
                            switch (o.label) {
                                case 0:
                                    return e = t.target, s.default.getInstance().play("Pick and Drop"), e.getComponent(cc.Button).interactable = !1, [4, l.DelayForScene(.3)];
                                case 1:
                                    return o.sent(), cc.director.loadScene("LevelScene"), [2]
                            }
                        })
                    })
                }, e.prototype.SoundAction = function (t) {
                    var e = t.target;
                    s.default.getInstance().play("click"), 0 == cc.audioEngine.getEffectsVolume() ? (cc.audioEngine.setEffectsVolume(1), cc.audioEngine.setMusicVolume(1), e.children[0].active = !1) : (cc.audioEngine.setEffectsVolume(0), cc.audioEngine.setMusicVolume(0), e.children[0].active = !0)
                }, a([d], e)
            }(cc.Component));
        o.default = p, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager",
        "../../../Scripts/Helper/HelperTools": "HelperTools"
    }],
    MirrorRepairing: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "794dcBULLNP4aJbhLoi1A6m", "MirrorRepairing");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var s = t("../../../Scripts/Helper/AudioManager"),
            l = t("../../../Scripts/Helper/HelperTools"),
            h = t("../../../Scripts/Helper/ToolMoveMaster"),
            d = cc._decorator,
            p = d.ccclass,
            u = d.property,
            f = function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.TilesThumb = null, e.Tools = [], e.ViewCompleteParticle = null, e.Mirror = null, e
                }
                return n(e, t), e.prototype.onLoad = function () {
                    this.Tools[0].position = cc.v3(524, -57)
                }, e.prototype.start = function () {
                    cc.tween(this.Tools[0]).to(.5, {
                        position: cc.v3(330, -57)
                    }).start()
                }, e.prototype.BeganAction = function () {
                    s.default.getInstance().play("Pick and Drop")
                }, e.prototype.MoveAction = function (t, e, o, i) {
                    2 == e &amp;&amp; this.Mirror.opacity &lt;= 250 &amp;&amp; this.Mirror.getBoundingBoxToWorld().intersects(i.getChildByName("intersect").getBoundingBoxToWorld()) &amp;&amp; (this.Mirror.opacity += 2, this.Mirror.opacity &gt; 250 &amp;&amp; (this.Mirror.opacity = 255))
                }, e.prototype.EndAction = function (t, e) {
                    return r(this, void 0, void 0, function () {
                        return c(this, function (o) {
                            switch (o.label) {
                                case 0:
                                    return 1 != e ? [3, 1] : (t.getComponent(h.default).isToolDone() &amp;&amp; (t.getComponent(h.default).ToolDoneAction(), cc.tween(this.Tools[1]).by(.5, {
                                        position: cc.v3(800, 0)
                                    }).start(), cc.tween(this.Tools[2]).delay(.3).to(.5, {
                                        position: cc.v3(360, -32)
                                    }).start(), cc.find("SafeArea/BoardComplete", this.node).active = !0, cc.find("SafeArea/BoardComplete", this.node).getComponent(cc.ParticleSystem).resetSystem(), s.default.getInstance().play("PARTICLE")), [3, 3]);
                                case 1:
                                    return 2 != e ? [3, 3] : 255 != this.Mirror.opacity ? [3, 3] : (t.getComponent(h.default).isTouchActive = !1, cc.tween(this.Tools[2]).by(.5, {
                                        position: cc.v3(800, 0)
                                    }).start(), this.ViewCompleteParticle.active = !0, s.default.getInstance().play("PARTICLE"), [4, l.Delay(2)]);
                                case 2:
                                    o.sent(), cc.game.emit("UpdateItems", 1), this.node.children[0].active = !1, o.label = 3;
                                case 3:
                                    return [2]
                            }
                        })
                    })
                }, e.prototype.FixedAction = function (t, e, o, i) {
                    if (0 == e) {
                        this.addParticle(i.position);
                        var n = !0,
                            a = t.parent;
                        a.children.forEach(function (e) {
                            n &amp;&amp; 0 == e.active &amp;&amp; (n = !1, e.position = t.position, e.active = !0)
                        }), t.removeFromParent(), 0 == a.childrenCount &amp;&amp; (cc.tween(this.Tools[0]).by(.5, {
                            position: cc.v3(314, 0)
                        }).start(), cc.tween(this.Tools[1]).delay(.3).to(.5, {
                            position: cc.v3(360, -32)
                        }).start(), console.log("done"))
                    }
                }, e.prototype.addParticle = function (t) {
                    var e = cc.instantiate(cc.find("SafeArea/ToolComplete", this.node));
                    this.node.addChild(e), e.active = !0, e.position = t, s.default.getInstance().play("PARTICLE")
                }, a([u(cc.Node)], e.prototype, "TilesThumb", void 0), a([u([cc.Node])], e.prototype, "Tools", void 0), a([u(cc.Node)], e.prototype, "ViewCompleteParticle", void 0), a([u(cc.Node)], e.prototype, "Mirror", void 0), a([p], e)
            }(cc.Component);
        o.default = f, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager",
        "../../../Scripts/Helper/HelperTools": "HelperTools",
        "../../../Scripts/Helper/ToolMoveMaster": "ToolMoveMaster"
    }],
    Particle: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "f2820dZv1xMgqv7z/2AH2HS", "Particle");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var r = cc._decorator,
            c = r.ccclass,
            s = r.property,
            l = function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.particle = null, e
                }
                return n(e, t), e.prototype.start = function () { }, e.prototype.reset = function () {
                    this.particle.resetSystem()
                }, a([s(cc.ParticleSystem)], e.prototype, "particle", void 0), a([c], e)
            }(cc.Component);
        o.default = l, cc._RF.pop()
    }, {}],
    Promotion: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "c363esmtuVBDJcSkzRVx80v", "Promotion");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var s = t("../Helper/AudioManager"),
            l = t("../Helper/CocosHelper"),
            h = t("../Helper/GlobalData"),
            d = t("../Helper/HelperTools"),
            p = t("../Helper/SessionStorageHelper"),
            u = t("./AdManager"),
            f = cc._decorator,
            y = f.ccclass,
            v = (f.property, function (t) {
                function e() {
                    return null !== t &amp;&amp; t.apply(this, arguments) || this
                }
                var o;
                return n(e, t), o = e, e.prototype.start = function () {
                    o.self = this;
                    var t = this;
                    "promoBack" == t.node.name &amp;&amp; this.setPromoThumb();
                    var e = "game";
                    "MainScene" == cc.director.getScene().name &amp;&amp; (e = "mainscreen"), this.node.on(cc.Node.EventType.TOUCH_START, function () {
                       "promoBack" == t.node.name ? 255 == t.node.parent.opacity &amp;&amp; window.adsGameCon.moreGame(): t.node.parent &amp;&amp; "promotion" == t.node.parent.name ?window.adsGameCon.moreGame() : window.adsGameCon.moreGame()
                    }, this)
                }, e.prototype.setPromoThumb = function () {
                   
                }, e.prototype.onReplayClick = function (t) {
                    return r(this, void 0, void 0, function () {
                        var e;
                        return c(this, function (o) {
                            switch (o.label) {
                                case 0:
                                    for (s.default.getInstance().play("Tap"), t.target.getComponent(cc.Button).interactable = !1, p.default.getInstace().removeAllKeys(), e = 0; e &lt; 5; e++) h.GlobalData.data.flags.isViewDone[e] = !1, h.GlobalData.data.flags.isCompleteParticle[e] = !1;
                                    return u.default.getInstance().requestAds(), [4, d.Delay(.3)];
                                case 1:
                                    return o.sent(), cc.director.loadScene("LevelScene"), [2]
                            }
                        })
                    })
                }, e.self = null, o = a([y], e)
            }(cc.Component));
        o.default = v, cc._RF.pop()
    }, {
        "../Helper/AudioManager": "AudioManager",
        "../Helper/CocosHelper": "CocosHelper",
        "../Helper/GlobalData": "GlobalData",
        "../Helper/HelperTools": "HelperTools",
        "../Helper/SessionStorageHelper": "SessionStorageHelper",
        "./AdManager": "AdManager"
    }],
    RewardFailed: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "de049FllctHALvm/i+bzPTu", "RewardFailed");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var r = t("../Helper/AudioManager"),
            c = cc._decorator,
            s = c.ccclass,
            l = (c.property, function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.safeArea = null, e
                }
                return n(e, t), e.prototype.onLoad = function () { }, e.prototype.start = function () {
                    cc.game.on("RewarFailed.Open", this.OpenRewardFailed, this), cc.game.on("RewarFailed.Close", this.CloseRewardFailed, this), this.safeArea = this.node.children[0], cc.find("Failclose", this.safeArea).on(cc.Node.EventType.TOUCH_START, this.rewardCloseAction, this)
                }, e.prototype.rewardCloseAction = function () {
                    r.default.getInstance().play("button_common"), this.CloseRewardFailed()
                }, e.prototype.OpenRewardFailed = function () {
                    this.safeArea.active = !0
                }, e.prototype.CloseRewardFailed = function () {
                    this.safeArea &amp;&amp; (this.safeArea.active = !1)
                }, a([s], e)
            }(cc.Component));
        o.default = l, cc._RF.pop()
    }, {
        "../Helper/AudioManager": "AudioManager"
    }],
    SessionStorageHelper: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "53cd3d1si5Lmoi+9Wy1x3L/", "SessionStorageHelper");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var r = cc._decorator,
            c = r.ccclass,
            s = (r.property, function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.Items = [], e
                }
                var o;
                return n(e, t), o = e, e.getInstace = function () {
                    return null == o.instance &amp;&amp; (o.instance = new o), o.instance
                }, e.prototype.setItem = function (t, e) {
                    for (var o = !1, i = 0; i &lt; this.Items.length; i++)
                        if (this.Items[i].Key == t) {
                            o = !0, this.Items[i].Value = e;
                            break
                        }
                    0 == o &amp;&amp; this.Items.push({
                        Key: t,
                        Value: e
                    })
                }, e.prototype.getItem = function (t) {
                    for (var e = 0; e &lt; this.Items.length; e++)
                        if (this.Items[e].Key == t) return this.Items[e].Value
                }, e.prototype.removeItem = function (t) {
                    for (var e = 0; e &lt; this.Items.length; e++)
                        if (this.Items[e].Key == t) {
                            this.Items.splice(e, 1);
                            break
                        }
                }, e.prototype.removeAllKeys = function () {
                    this.Items.splice(0, this.Items.length)
                }, e.instance = null, o = a([c], e)
            }(cc.Component));
        o.default = s, cc._RF.pop()
    }, {}],
    StickerHelper: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "c925carNNdLFZxFGVOWfWHN", "StickerHelper");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var r = t("./CocosHelper"),
            c = cc._decorator,
            s = c.ccclass,
            l = (c.property, function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.canMove = !1, e.selectedSticker = null, e.StickerTag = 0, e
                }
                return n(e, t), e.prototype.onLoad = function () { }, e.prototype.start = function () { }, e.prototype.DisableEvents = function () {
                    this.node.off(cc.Node.EventType.TOUCH_START), this.node.off(cc.Node.EventType.TOUCH_MOVE), this.node.off(cc.Node.EventType.TOUCH_CANCEL), this.node.off(cc.Node.EventType.TOUCH_END)
                }, e.prototype.EnableEvents = function () {
                    this.node.on(cc.Node.EventType.TOUCH_START, this.TouchBegan, this), this.node.on(cc.Node.EventType.TOUCH_MOVE, this.TouchMove, this), this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.TouchEnded, this), this.node.on(cc.Node.EventType.TOUCH_END, this.TouchEnded, this)
                }, e.prototype.TouchBegan = function (t) {
                    for (var e = t.getLocation(), o = (cc.v3(this.node.convertToNodeSpaceAR(e)), this.StickerTag); o &gt;= 0; o--)
                        if (this.selectedSticker = this.node.children[o], this.selectedSticker &amp;&amp; this.selectedSticker.getBoundingBoxToWorld().contains(e)) {
                            this.canMove = !0, this.node.zIndex = 1, this.node.opacity = 254, this.selectedSticker.zIndex = 1;
                            break
                        }
                }, e.prototype.TouchMove = function (t) {
                    var e = t.getLocation(),
                        o = cc.v3(this.node.convertToNodeSpaceAR(e));
                    this.canMove &amp;&amp; this.selectedSticker &amp;&amp; (this.selectedSticker.position = o)
                }, e.prototype.TouchEnded = function (t) {
                    var e = t.getLocation();
                    this.node.convertToNodeSpaceAR(e), this.canMove &amp;&amp; (this.node.opacity = 255, this.canMove = !1, this.selectedSticker &amp;&amp; (this.selectedSticker.zIndex = 0, this.selectedSticker.name = (++this.StickerTag).toString())), this.node.zIndex = 0
                }, e.prototype.addSticker = function (t) {
                    this.node.children.forEach(function (t) {
                        t.zIndex = 0
                    });
                    var e = t,
                        o = cc.instantiate(e);
                    o.removeComponent(cc.Button), this.node.addChild(o), o.position = cc.v3(r.getRandomNumber(-350, 350), r.getRandomNumber(-350, 350)), o.opacity = 0, cc.tween(o).to(.3, {
                        opacity: 255
                    }).start(), o.name = (++this.StickerTag).toString(), o.zIndex = 1
                }, e.prototype.removeAll = function () {
                    this.node.removeAllChildren(), this.selectedSticker = null, this.StickerTag = 0
                }, e.prototype.update = function () { }, a([s], e)
            }(cc.Component));
        o.default = l, cc._RF.pop()
    }, {
        "./CocosHelper": "CocosHelper"
    }],
    TilesRepairing: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "b761e2xFqpP2LqZHfdSbQci", "TilesRepairing");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var s = t("../../../Scripts/Helper/AudioManager"),
            l = t("../../../Scripts/Helper/HelperTools"),
            h = t("../../../Scripts/Helper/ToolMoveMaster"),
            d = cc._decorator,
            p = d.ccclass,
            u = d.property,
            f = function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.Tools = [], e.ViewCompleteParticle = null, e.Hints = [], e
                }
                return n(e, t), e.prototype.onLoad = function () { }, e.prototype.start = function () { }, e.prototype.UpdateHint = function (t) {
                    var e = this;
                    if (0 == t) {
                        this.Hints[0].children.forEach(function (t) {
                            t.active = !1
                        });
                        var o = 0;
                        this.Tools[0].children.forEach(function (t) {
                            return r(e, void 0, void 0, function () {
                                return c(this, function () {
                                    return t.scale &gt; 0 &amp;&amp; (this.Hints[0].children[o].position = t.position, this.Hints[0].children[o].active = !0, o++), [2]
                                })
                            })
                        })
                    }
                }, e.prototype.BeganAction = function (t, e) {
                    if (s.default.getInstance().play("Pick and Drop"), 0 == e) this.UpdateHint(0);
                    else if (3 == e) {
                        this.Hints[0].children.forEach(function (t) {
                            t.active = !1
                        }), this.Hints[0].children[0].active = !0;
                        var o = t.getComponent(h.default).destinationNode;
                        this.Hints[0].children[0].position = this.node.convertToNodeSpaceAR(o.parent.convertToWorldSpaceAR(o.position))
                    }
                }, e.prototype.MoveAction = function (t, e, o, i) {
                    return r(this, void 0, void 0, function () {
                        var o = this;
                        return c(this, function () {
                            return 0 == e &amp;&amp; this.Tools[0].children.forEach(function (e) {
                                return r(o, void 0, void 0, function () {
                                    var o, n = this;
                                    return c(this, function (a) {
                                        switch (a.label) {
                                            case 0:
                                                return e.scale &gt; 0 &amp;&amp; e.getBoundingBoxToWorld().intersects(i.getChildByName("intersect").getBoundingBoxToWorld()) ? (t.getComponent(h.default).resetComponent(), t.active = !1, t.getComponent(h.default).UpdatePosition(e.position.addSelf(cc.v3(0, 100))), t.position = e.position.addSelf(cc.v3(0, 100)), this.Tools[1].position = e.position, this.Tools[1].active = !0, cc.tween(e).to(.9, {
                                                    scale: 0
                                                }).start(), this.Hints[0].children.forEach(function (t) {
                                                    t.active = !1
                                                }), s.default.getInstance().play("Floor_view_drill", !0), [4, l.Delay(.9)]) : [3, 2];
                                            case 1:
                                                a.sent(), s.default.getInstance().stop("Floor_view_drill"), t.active = !0, this.Tools[1].active = !1, o = !0, this.Tools[0].children.forEach(function (t) {
                                                    return r(n, void 0, void 0, function () {
                                                        return c(this, function () {
                                                            return 0 != t.scale &amp;&amp; (o = !1), [2]
                                                        })
                                                    })
                                                }), o &amp;&amp; (this.addParticle(cc.v3(0, -50, 0)), cc.tween(t).by(.5, {
                                                    position: cc.v3(800, 0, 0)
                                                }).start(), cc.tween(this.Tools[2]).to(.5, {
                                                    position: cc.v3(318, -138, 0)
                                                }).start(), this.Tools[2].getComponent(h.default).UpdatePosition(cc.v3(318, -138, 0))), a.label = 2;
                                            case 2:
                                                return [2]
                                        }
                                    })
                                })
                            }), [2]
                        })
                    })
                }, e.prototype.EndAction = function (t, e) {
                    return r(this, void 0, void 0, function () {
                        return c(this, function () {
                            return 1 == e ? t.getComponent(h.default).isToolDone() &amp;&amp; (t.getComponent(h.default).ToolDoneAction(), cc.tween(t).by(.5, {
                                position: cc.v3(800, 0, 0)
                            }).start(), this.addParticle(cc.v3(0, -50, 0)), cc.tween(this.Tools[3]).to(.5, {
                                position: cc.v3(353, -27, 0)
                            }).start()) : 3 == e &amp;&amp; this.Hints[0].children.forEach(function (t) {
                                t.active = !1
                            }), [2]
                        })
                    })
                }, e.prototype.FixedAction = function (t, e, o, i) {
                    return r(this, void 0, void 0, function () {
                        var o, n, a;
                        return c(this, function (r) {
                            switch (r.label) {
                                case 0:
                                    return 0 != e ? [3, 3] : (t.getComponent(h.default).destinationNode.color = cc.Color.WHITE, t.getComponent(h.default).destinationNode.opacity = 255, this.addParticle(i.position), o = !0, t.getComponent(h.default).destinationNode.parent.children.forEach(function (t) {
                                        t.opacity &lt; 250 &amp;&amp; (o = !1)
                                    }), o ? (this.ViewCompleteParticle.active = !0, [4, l.Delay(2)]) : [3, 2]);
                                case 1:
                                    r.sent(), cc.game.emit("UpdateItems", 3), this.node.children[0].active = !1, r.label = 2;
                                case 2:
                                    return [3, 6];
                                case 3:
                                    return 3 != e ? [3, 6] : (n = t.parent, this.Hints[0].children.forEach(function (t) {
                                        t.active = !1
                                    }), this.addParticle(cc.v3(t.getComponent(h.default).destinationNode.position)), t.removeFromParent(), 0 != n.childrenCount ? [3, 5] : (this.addParticle(cc.v3(0, -50, 0)), cc.find("Canvas/TilesRepairing/SafeArea/Floor_repair_view_Bg_After_Done").active = !0, cc.tween(this.Tools[3]).by(.5, {
                                        position: cc.v3(800, 0, 0)
                                    }).start(), this.ViewCompleteParticle.active = !0, s.default.getInstance().play("PARTICLE"), [4, l.Delay(2)]));
                                case 4:
                                    return r.sent(), cc.game.emit("UpdateItems", 4), this.node.children[0].active = !1, [3, 6];
                                case 5:
                                    for (a = 0; a &lt; n.childrenCount; a++)
                                        if (0 == n.children[a].active) {
                                            n.children[a].active = !0;
                                            break
                                        }
                                    r.label = 6;
                                case 6:
                                    return [2]
                            }
                        })
                    })
                }, e.prototype.addParticle = function (t) {
                    var e = cc.instantiate(cc.find("SafeArea/ToolComplete", this.node));
                    this.node.addChild(e), e.active = !0, e.position = t, s.default.getInstance().play("PARTICLE")
                }, a([u([cc.Node])], e.prototype, "Tools", void 0), a([u(cc.Node)], e.prototype, "ViewCompleteParticle", void 0), a([u([cc.Node])], e.prototype, "Hints", void 0), a([p], e)
            }(cc.Component);
        o.default = f, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager",
        "../../../Scripts/Helper/HelperTools": "HelperTools",
        "../../../Scripts/Helper/ToolMoveMaster": "ToolMoveMaster"
    }],
    ToiletCleaning: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "ab5a9245G1KuoZtk5zUVJRH", "ToiletCleaning");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var s = t("../../../Scripts/Helper/AudioManager"),
            l = t("../../../Scripts/Helper/HelperTools"),
            h = t("../../../Scripts/Helper/ToolMoveMaster"),
            d = t("../../../Scripts/Helper/UserDrawing"),
            p = cc._decorator,
            u = p.ccclass,
            f = p.property,
            y = function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.Germs = null, e.Tools = [], e.ViewCompleteParticle = null, e
                }
                return n(e, t), e.prototype.onLoad = function () { }, e.prototype.start = function () { }, e.prototype.BeganAction = function (t, e) {
                    var o = this;
                    if (0 == e) {
                        t.getComponent(h.default).isTouchActive = !1;
                        var i = t.parent;
                        s.default.getInstance().play("Monster 3"), cc.tween(t).to(.3, {
                            scale: 0
                        }, {
                            easing: cc.easing.elasticInOut
                        }).removeSelf().call(function () {
                            0 == i.childrenCount &amp;&amp; (console.log("done"), cc.tween(o.Tools[0]).to(.5, {
                                position: cc.v3(345, -26)
                            }).start(), o.Tools[0].getComponent(h.default).UpdatePosition(cc.v3(345, -26)))
                        }).start()
                    } else 3 == e &amp;&amp; (cc.find("Canvas/ToiletCleaning/SafeArea/BgToilet/HarpicLiquid").getComponent(d.default).setEraseOn(!0), cc.find("Canvas/ToiletCleaning/SafeArea/BgToilet/HarpicLiquid").getComponent(d.default).setDrawingOffset(50, 10))
                }, e.prototype.MoveAction = function () { }, e.prototype.EndAction = function (t, e) {
                    return r(this, void 0, void 0, function () {
                        var o;
                        return c(this, function (i) {
                            switch (i.label) {
                                case 0:
                                    return 1 != e ? [3, 1] : (t.getComponent(h.default).isToolDone() &amp;&amp; (t.getComponent(h.default).ToolDoneAction(), cc.tween(this.Tools[0]).by(.5, {
                                        position: cc.v3(800, 0)
                                    }).start(), cc.tween(this.Tools[1]).delay(.3).to(.5, {
                                        position: cc.v3(310, -167)
                                    }).start(), this.Tools[1].getComponent(h.default).UpdatePosition(cc.v3(310, -167)), cc.find("SafeArea/BoardComplete", this.node).active = !0, s.default.getInstance().play("PARTICLE"), cc.find("SafeArea/BoardComplete", this.node).getComponent(cc.ParticleSystem).resetSystem()), [3, 5]);
                                case 1:
                                    return 2 != e ? [3, 2] : (t.getComponent(h.default).isToolDone() &amp;&amp; (t.getComponent(h.default).ToolDoneAction(), cc.tween(this.Tools[1]).by(.5, {
                                        position: cc.v3(800, 0)
                                    }).start(), cc.tween(this.Tools[2]).delay(.3).to(.5, {
                                        position: cc.v3(313, -66)
                                    }).start(), this.Tools[2].getComponent(h.default).UpdatePosition(cc.v3(313, -66)), cc.find("SafeArea/BoardComplete", this.node).active = !0, s.default.getInstance().play("PARTICLE"), cc.find("SafeArea/BoardComplete", this.node).getComponent(cc.ParticleSystem).resetSystem()), [3, 5]);
                                case 2:
                                    return 3 != e ? [3, 5] : t.getComponent(h.default).isToolDone() ? (t.getComponent(h.default).ToolDoneAction(), cc.tween(this.Tools[2]).by(.5, {
                                        position: cc.v3(800, 0)
                                    }).start(), s.default.getInstance().play("Toilet Flush"), o = cc.find("Canvas/ToiletCleaning/SafeArea/BgToilet/dirty-water").getComponent(cc.Animation).play().duration, [4, l.Delay(o)]) : [3, 5];
                                case 3:
                                    return i.sent(), s.default.getInstance().stop("Toilet Flush"), this.ViewCompleteParticle.active = !0, s.default.getInstance().play("PARTICLE"), [4, l.Delay(2)];
                                case 4:
                                    i.sent(), cc.game.emit("UpdateItems", 2), this.node.children[0].active = !1, i.label = 5;
                                case 5:
                                    return [2]
                            }
                        })
                    })
                }, e.prototype.FixedAction = function (t, e, o, i) {
                    if (0 == e) {
                        this.addParticle(i.position);
                        var n = !0;
                        t.parent.children.forEach(function (t) {
                            t.active &amp;&amp; (n = !1)
                        }), n &amp;&amp; (cc.tween(this.Tools[0]).to(.5, {
                            position: cc.v3(314, -192)
                        }).start(), this.Tools[0].getComponent(h.default).UpdatePosition(cc.v3(314, -192)), console.log("done"))
                    }
                }, e.prototype.addParticle = function (t) {
                    var e = cc.instantiate(cc.find("SafeArea/ToolComplete", this.node));
                    this.node.addChild(e), e.active = !0, e.position = t, s.default.getInstance().play("PARTICLE")
                }, a([f(cc.Node)], e.prototype, "Germs", void 0), a([f([cc.Node])], e.prototype, "Tools", void 0), a([f(cc.Node)], e.prototype, "ViewCompleteParticle", void 0), a([u], e)
            }(cc.Component);
        o.default = y, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager",
        "../../../Scripts/Helper/HelperTools": "HelperTools",
        "../../../Scripts/Helper/ToolMoveMaster": "ToolMoveMaster",
        "../../../Scripts/Helper/UserDrawing": "UserDrawing"
    }],
    ToolMoveMaster: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "0c396lhNe1MmoAVPVZlMw1M", "ToolMoveMaster");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var r = t("./AudioManager"),
            c = t("./UserDrawing"),
            s = cc._decorator,
            l = s.ccclass,
            h = s.property,
            d = (cc.Enum({
                Began: 1,
                Move: 2,
                End: 3,
                onFixed: 4
            }), function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.isTouchActive = !0, e.ToolEndMoveTime = .1, e.ToolID = 0, e.MoveItem = null, e.destinationNode = null, e.drawing = [], e.BeganAction = null, e.MoveAction = null, e.EndAction = null, e.OnFixedAction = null, e.Hint = [], e.SoundName = "", e.SoundStartOnClick = !0, e.isPositionChanged = !1, e.initPosition = null, e.MoveinitPosition = null, e.DefaultinitPosition = null, e.DestinitPosition = null, e.TapinitPosition = null, e.isTapObject = !1, e.isExitTool = !1, e.isPlaySound = !1, e.isEventOn = !0, e
                }
                return n(e, t), e.prototype.onLoad = function () {
                    this.initPosition = this.node.position, this.DefaultinitPosition = this.node.position, this.MoveItem &amp;&amp; (this.MoveinitPosition = this.MoveItem.position), this.destinationNode &amp;&amp; (this.DestinitPosition = this.destinationNode.position), this.registerEvents()
                }, e.prototype.UpdatePosition = function (t) {
                    this.initPosition = t, this.DefaultinitPosition = t, this.MoveItem &amp;&amp; (this.MoveinitPosition = this.MoveItem.position), this.destinationNode &amp;&amp; (this.DestinitPosition = this.destinationNode.position)
                }, e.prototype.start = function () { }, e.prototype.registerEvents = function () {
                    this.isEventOn = !0, this.node.on(cc.Node.EventType.TOUCH_START, this.TouchStart, this), this.node.on(cc.Node.EventType.TOUCH_MOVE, this.TouchMove, this), this.node.on(cc.Node.EventType.TOUCH_END, this.TouchEnd, this), this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.TouchEnd, this)
                }, e.prototype.DisableEvents = function () {
                    this.isEventOn = !1, this.node.off(cc.Node.EventType.TOUCH_START), this.node.off(cc.Node.EventType.TOUCH_MOVE), this.node.off(cc.Node.EventType.TOUCH_END), this.node.off(cc.Node.EventType.TOUCH_CANCEL)
                }, e.prototype.TouchStart = function (t) {
                    if (this.isTouchActive &amp;&amp; this.node.active &amp;&amp; 255 == this.node.opacity) {
                        if (this.isPositionChanged = !0, this.node.zIndex = 1, this.isTapObject = !0, this.SoundStartOnClick &amp;&amp; this.SoundName &amp;&amp; this.SoundName.length &gt; 0 &amp;&amp; r.default.getInstance().play(this.SoundName, !0), this.drawing)
                            for (var e = 0; e &lt; this.drawing.length; e++) this.drawing[e].setActiveDrawing(!0);
                        if (this.MoveItem &amp;&amp; (this.node.opacity = 0, this.MoveItem.opacity = 255, this.MoveItem.active = !0, this.MoveItem.position = cc.v3(this.MoveItem.parent.convertToNodeSpaceAR(t.getLocation())), 0 == this.MoveItem.getNumberOfRunningActions() &amp;&amp; (this.TapinitPosition = this.MoveItem.position)), cc.Tween.stopAllByTarget(this.node), this.Hint)
                            for (e = 0; e &lt; this.Hint.length; e++) this.Hint[e].active = !0;
                        this.BeganAction &amp;&amp; this.BeganAction.emit([this.node, this.ToolID, t.getLocation(), this.MoveItem])
                    }
                }, e.prototype.TouchMove = function (t, e) {
                    if (0 != this.isTapObject &amp;&amp; null != this.MoveItem &amp;&amp; this.isTouchActive) {
                        if (this.MoveItem.position = cc.v3(this.MoveItem.parent.convertToNodeSpaceAR(t.getLocation())), this.destinationNode &amp;&amp; this.destinationNode.getBoundingBoxToWorld().contains(t.getLocation())) {
                            if (this.destinationNode.active = !0, this.MoveItem.active = !1, this.isTapObject = !1, this.isTouchActive = !1, this.Hint)
                                for (var o = 0; o &lt; this.Hint.length; o++) this.Hint[o].active = !1;
                            return void (this.OnFixedAction &amp;&amp; this.OnFixedAction.emit([this.node, this.ToolID, t.getLocation(), this.MoveItem]))
                        }
                        this.MoveAction &amp;&amp; this.MoveAction.emit([this.node, this.ToolID, t.getLocation(), this.MoveItem]);
                        var i = !1;
                        if (this.drawing)
                            for (o = 0; o &lt; this.drawing.length; o++) this.drawing[o].touchMove(t, e), this.drawing[o].DrawNode.getBoundingBoxToWorld().intersects(this.MoveItem.getBoundingBoxToWorld()) &amp;&amp; (i = !0);
                        0 == this.SoundStartOnClick &amp;&amp; (i &amp;&amp; 0 == this.isPlaySound ? (this.isPlaySound = !0, r.default.getInstance().play(this.SoundName, !0)) : 0 == i &amp;&amp; this.isPlaySound &amp;&amp; (this.isPlaySound = !1, r.default.getInstance().stop(this.SoundName)))
                    }
                }, e.prototype.TouchEnd = function (t) {
                    var e = this;
                    if (0 != this.isTapObject &amp;&amp; null != this.MoveItem) {
                        if (this.drawing)
                            for (var o = 0; o &lt; this.drawing.length; o++) this.drawing[o].setActiveDrawing(!1);
                        if (this.SoundName &amp;&amp; this.SoundName.length &gt; 0 &amp;&amp; r.default.getInstance().stop(this.SoundName), this.Hint)
                            for (o = 0; o &lt; this.Hint.length; o++) this.Hint[o].active = !1;
                        if (this.isTapObject = !1, this.isTouchActive &amp;&amp; this.isPositionChanged) {
                            this.isPositionChanged = !1;
                            var i = this;
                            cc.tween(this.MoveItem).to(this.ToolEndMoveTime, {
                                position: this.TapinitPosition
                            }).call(function () {
                                i.node.zIndex = 0, i.MoveItem.active = !1, i.MoveItem.position = e.MoveinitPosition, i.node.active = !0, i.node.opacity = 255, e.node.uuid == e.MoveItem.uuid &amp;&amp; (i.node.active = !0, i.node.position = e.initPosition), e.EndAction &amp;&amp; e.EndAction.emit([e.node, e.ToolID, t.getLocation(), e.MoveItem])
                            }).start()
                        }
                    }
                }, e.prototype.UpdateOffset = function (t) {
                    if (this.drawing)
                        for (var e = 0; e &lt; this.drawing.length; e++) this.drawing[e].setDrawingOffset(t.width, t.height)
                }, e.prototype.UpdateBrushSize = function (t) {
                    if (this.drawing)
                        for (var e = 0; e &lt; this.drawing.length; e++) this.drawing[e].setBrushSize(t)
                }, e.prototype.setEraseOn = function (t) {
                    if (this.drawing)
                        for (var e = 0; e &lt; this.drawing.length; e++) this.drawing[e].setEraseOn(t)
                }, e.prototype.resetComponent = function () {
                    this.MoveItem &amp;&amp; (this.MoveItem.active = !1), this.isTapObject = !1, this.node.opacity = 255, this.node.active = !0, this.node.position = this.DefaultinitPosition, this.MoveItem &amp;&amp; (this.MoveItem.position = this.MoveinitPosition), this.isTouchActive = !0
                }, e.prototype.setActive = function (t) {
                    this.node.opacity = t ? 255 : 254
                }, e.prototype.ToolDoneAction = function () {
                    if (this.drawing.length &gt; 0)
                        for (var t = 0; t &lt; this.drawing.length; t++) this.drawing[t].isErase ? this.drawing[t].clearPicture() : this.drawing[t].FillFullTexture()
                }, e.prototype.resetTexture = function () {
                    if (this.drawing.length &gt; 0)
                        for (var t = 0; t &lt; this.drawing.length; t++) this.drawing[t].resetPicture()
                }, e.prototype.isToolDone = function () {
                    if (this.drawing.length &gt; 0) {
                        for (var t = !0, e = 0; e &lt; this.drawing.length; e++)
                            if (0 == this.drawing[e].isToolDone()) {
                                t = !1;
                                break
                            }
                        return t
                    }
                    return !1
                }, e.prototype.HideParticle = function () {
                    if (this.drawing.length &gt; 0)
                        for (var t = 0; t &lt; this.drawing.length; t++) this.drawing[t].HideParticle()
                }, e.prototype.update = function () {
                    this.isTouchActive ? 0 == this.isEventOn &amp;&amp; this.registerEvents() : this.isEventOn &amp;&amp; this.DisableEvents()
                }, a([h()], e.prototype, "isTouchActive", void 0), a([h()], e.prototype, "ToolEndMoveTime", void 0), a([h()], e.prototype, "ToolID", void 0), a([h(cc.Node)], e.prototype, "MoveItem", void 0), a([h(cc.Node)], e.prototype, "destinationNode", void 0), a([h([c.default])], e.prototype, "drawing", void 0), a([h(cc.Component.EventHandler)], e.prototype, "BeganAction", void 0), a([h(cc.Component.EventHandler)], e.prototype, "MoveAction", void 0), a([h(cc.Component.EventHandler)], e.prototype, "EndAction", void 0), a([h(cc.Component.EventHandler)], e.prototype, "OnFixedAction", void 0), a([h([cc.Node])], e.prototype, "Hint", void 0), a([h(cc.String)], e.prototype, "SoundName", void 0), a([h(cc.Boolean)], e.prototype, "SoundStartOnClick", void 0), a([l], e)
            }(cc.Component));
        o.default = d, cc._RF.pop()
    }, {
        "./AudioManager": "AudioManager",
        "./UserDrawing": "UserDrawing"
    }],
    UserDrawing: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "7423cdpXoxPF6EiCt9QdLYC", "UserDrawing");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        }), o.SCENE_TYPE = o.DRAWING_TYPE = void 0;
        var r, c, s = t("../FloodFill/FloodFill"),
            l = t("./AudioManager"),
            h = t("./CanvasManager"),
            d = t("./CocosHelper"),
            p = t("./SessionStorageHelper"),
            u = cc._decorator,
            f = u.ccclass,
            y = u.property;
        (function (t) {
            t[t.NONE = 0] = "NONE", t[t.DRAWING = 1] = "DRAWING", t[t.FILL = 2] = "FILL"
        })(r = o.DRAWING_TYPE || (o.DRAWING_TYPE = {})),
            function (t) {
                t[t.FILL = 1] = "FILL", t[t.DRAWING = 2] = "DRAWING", t[t.FILL_AND_DRAWING = 3] = "FILL_AND_DRAWING"
            }(c = o.SCENE_TYPE || (o.SCENE_TYPE = {}));
        var v = function (t) {
            function e() {
                var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                return e.isActiveDrawing = !0, e.brush = null, e.brushsize = 30, e.isErase = !1, e.isRepeatPattern = !1, e.DrawingOffset = cc.v2(0, 0), e.DrawingTexture = [], e.DefaultTexture = null, e.OutLines = [], e.selectedPattern = 0, e.DrawingType = r.DRAWING, e.SceneType = c.DRAWING, e.DrawingPercentage = 90, e.ErasePercentage = 10, e.Particle = null, e.floodfillcolor = null, e.BeganPoint = cc.Vec3.ZERO, e.startx = 0, e.starty = 0, e.imageData = null, e.Maxx = 0, e.Maxy = 0, e.Minx = 1e3, e.Miny = 1e3, e.DefaultTextureIndex = 0, e.TextureSize = cc.Size.ZERO, e.SelectedColorID = 0, e.CanvasManagerObj = null, e
            }
            return n(e, t), e.prototype.onLoad = function () {
                this.init(), this.TextureSize = this.node.getContentSize(), this.DrawNode = this.node, this.CanvasManagerObj = new h.default, this.CanvasManagerObj.initWithData(this.node, this);
                for (var t = 0; t &lt; this.OutLines.length; t++) this.OutLines[t].active = !1;
                if (this.SceneType == c.FILL) {
                    var e = this.DefaultTextureIndex;
                    this.DefaultTextureIndex = Number(p.default.getInstace().getItem("SelectedPicture")), this.DefaultTexture || (this.DefaultTextureIndex = e)
                }
                for (this.DefaultTexture instanceof cc.SpriteFrame ? (this.CanvasManagerObj.LoadTexture(this.DefaultTexture.getTexture().nativeUrl, 0, this.isRepeatPattern), this.node.getComponent(cc.Sprite).spriteFrame = this.DefaultTexture, this.OutLines[this.DefaultTextureIndex] &amp;&amp; (this.OutLines[this.DefaultTextureIndex].active = !0)) : this.CanvasManagerObj.LoadEmptyTexture(0), t = 0; t &lt; this.DrawingTexture.length; t++) this.CanvasManagerObj.LoadTexture(this.DrawingTexture[t].getTexture().nativeUrl, t + 1, this.isRepeatPattern);
                this.setEraseOn(this.isErase)
            }, e.prototype.start = function () {
                this.setActiveDrawing(this.isActiveDrawing), this.setPatternIndex(this.selectedPattern)
            }, e.prototype.init = function () {
                this.DrawNode = this.node, this.UserCanvas = document.createElement("canvas"), this.UserContext = this.UserCanvas.getContext("2d"), this.UserCanvas.width = this.node.width, this.UserCanvas.height = this.node.height, this.CanvasWidth = this.node.width, this.CanvasHeight = this.node.height, this.UserContext.clearRect(0, 0, this.CanvasWidth, this.CanvasHeight), this.BrushImage = new Image, this.BrushImage.onload = function () { }, this.BrushImage.src = this.brush.getTexture().nativeUrl
            }, e.prototype.initFloodFill = function (t) {
                this.floodfillcolor = new s.default(t, null)
            }, e.prototype.UpdateFloodFillData = function (t) {
                this.floodfillcolor &amp;&amp; (this.floodfillcolor.imageData = t)
            }, e.prototype.UpdateMinMax = function (t) {
                this.startx = Math.floor(t.x), this.starty = Math.floor(t.y), this.Minx &gt; this.startx &amp;&amp; (this.Minx = this.startx), this.Maxx &lt; this.startx + this.brushsize &amp;&amp; (this.Maxx = this.startx + this.brushsize), this.Miny &gt; this.starty &amp;&amp; (this.Miny = this.starty), this.Maxy &lt; this.starty + this.brushsize &amp;&amp; (this.Maxy = this.starty + this.brushsize)
            }, e.prototype.touchStart = function (t) {
                var e = t.getLocation();
                if (this.BeganPoint = cc.v3(e), this.DrawingType != r.FILL) {
                    var o = t.getPreviousLocation();
                    e.x = e.x - this.DrawingOffset.x, o.x = o.x - this.DrawingOffset.x, e.y = e.y - this.DrawingOffset.y, o.y = o.y - this.DrawingOffset.y;
                    var i = this.DrawNode.convertToNodeSpaceAR(e),
                        n = this.DrawNode.getContentSize();
                    e = cc.v2(i.x + n.width / 2, n.height - (i.y + n.height / 2));
                    var a = this.DrawNode.convertToNodeSpaceAR(o);
                    o = cc.v2(a.x + n.width / 2, n.height - (a.y + n.height / 2));
                    var c = cc.v2(e.x - this.brushsize / 2, e.y - this.brushsize / 2);
                    0 == this.brushsize ? this.UserContext.drawImage(this.BrushImage, c.x, c.y) : this.UserContext.drawImage(this.BrushImage, c.x, c.y, this.brushsize, this.brushsize), this.UpdateMinMax(c), this.imageData = this.getImageData(), this.imageData &amp;&amp; this.CanvasManagerObj.UpdatePatternDrawingUsingPosition(this.selectedPattern, this.imageData, this.Minx, this.Miny, this.Maxx, this.Maxy), this.UserContext.clearRect(0, 0, this.CanvasWidth, this.CanvasHeight), this.Minx = this.Maxx, this.Miny = this.Maxy, this.Maxx = 0, this.Maxy = 0
                }
            }, e.prototype.touchMove = function (t) {
                if (this.DrawingType != r.FILL) {
                    var e = t.getLocation(),
                        o = t.getPreviousLocation();
                    e.x = e.x - this.DrawingOffset.x, o.x = o.x - this.DrawingOffset.x, e.y = e.y - this.DrawingOffset.y, o.y = o.y - this.DrawingOffset.y;
                    var i = this.DrawNode.convertToNodeSpaceAR(e),
                        n = this.DrawNode.getContentSize();
                    e = cc.v2(i.x + n.width / 2, n.height - (i.y + n.height / 2));
                    var a = this.DrawNode.convertToNodeSpaceAR(o);
                    o = cc.v2(a.x + n.width / 2, n.height - (a.y + n.height / 2));
                    for (var c = Math.sqrt(Math.pow(o.x - e.x, 2) + Math.pow(o.y - e.y, 2)), s = 0; s &lt; c; s += 10) {
                        var l = o.x - e.x,
                            h = o.y - e.y,
                            d = s / c,
                            p = cc.v2(e.x + l * d, e.y + h * d);
                        p = cc.v2(p.x - this.brushsize / 2, p.y - this.brushsize / 2), 0 == this.brushsize ? this.UserContext.drawImage(this.BrushImage, p.x, p.y) : this.UserContext.drawImage(this.BrushImage, p.x, p.y, this.brushsize, this.brushsize), this.UpdateMinMax(p)
                    }
                    if (this.Particle) {
                        var u = this.Particle.parent.convertToNodeSpaceAR(t.getLocation());
                        this.Particle.position = cc.v3(u.x - this.DrawingOffset.x, u.y - this.DrawingOffset.y)
                    }
                    this.imageData = this.getImageData(), this.CanvasManagerObj.UpdatePatternDrawingUsingPosition(this.selectedPattern, this.imageData, this.Minx, this.Miny, this.Maxx, this.Maxy), this.UserContext.clearRect(0, 0, this.CanvasWidth, this.CanvasHeight), this.Minx = this.CanvasWidth, this.Miny = this.CanvasHeight, this.Maxx = 0, this.Maxy = 0
                }
            }, e.prototype.TouchEnd = function (t) {
                if (this.Minx = this.CanvasWidth, this.Miny = this.CanvasHeight, this.Maxx = 0, this.Maxy = 0, this.Particle &amp;&amp; (this.Particle.position = cc.v3(454545, 454544)), this.SceneType != c.DRAWING &amp;&amp; this.CanvasManagerObj.updateFloodFill(), this.DrawingType == r.FILL &amp;&amp; !(Math.abs(this.BeganPoint.x - t.getLocationX()) &gt; 10 || Math.abs(this.BeganPoint.y - t.getLocationY()) &gt; 10)) {
                    var e = this.DrawNode.convertToNodeSpaceAR(t.getLocation()),
                        o = this.DrawNode.getContentSize();
                    e = cc.v2(e.x + o.width / 2, o.height - (e.y + o.height / 2)), this.FillPointAt(Math.floor(e.x), Math.floor(e.y), cc.color(d.getRandomNumber(20, 255), d.getRandomNumber(20, 255), d.getRandomNumber(20, 255)))
                }
            }, e.prototype.FillPointAt = function (t, e, o) {
                t &lt; 0 || e &lt; 0 || t &gt;= this.DrawNode.width || e &gt;= this.DrawNode.height || this.floodfillcolor &amp;&amp; (this.floodfillcolor.isEnabledPattern = !1, this.floodfillcolor.fill(o, t, e, 0), this.floodfillcolor.modifiedPixelsIndex.length &gt; 0 &amp;&amp; (l.default.getInstance().play("Color Fill in Game_Play"), this.CanvasManagerObj.UpdatePatternDrawingFloodFill(this.selectedPattern, this.floodfillcolor.modifiedPixelsIndex)))
            }, e.prototype.setActiveDrawing = function (t) {
                this.isActiveDrawing = t, this.isActiveDrawing ? (this.node.on(cc.Node.EventType.TOUCH_MOVE, this.touchMove, this), this.node.on(cc.Node.EventType.TOUCH_START, this.touchStart, this), this.node.on(cc.Node.EventType.TOUCH_END, this.TouchEnd, this), this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.TouchEnd, this)) : (this.node.off(cc.Node.EventType.TOUCH_MOVE), this.node.off(cc.Node.EventType.TOUCH_START), this.node.off(cc.Node.EventType.TOUCH_END), this.node.off(cc.Node.EventType.TOUCH_CANCEL))
            }, e.prototype.HideParticle = function () {
                this.Particle &amp;&amp; (this.Particle.position = cc.v3(454545, 454544))
            }, e.prototype.clearPicture = function () {
                this.CanvasManagerObj.clearPicture()
            }, e.prototype.FillFullTexture = function () {
                this.CanvasManagerObj.FillTexture(this.selectedPattern)
            }, e.prototype.resetPicture = function () {
                this.CanvasManagerObj.resetTexture()
            }, e.prototype.setDrawingOffset = function (t, e) {
                this.DrawingOffset = cc.v2(t, e)
            }, e.prototype.getImageData = function () {
                return this.UserContext.getImageData(0, 0, this.CanvasWidth, this.CanvasHeight)
            }, e.prototype.setBrushSize = function (t) {
                this.brushsize = t
            }, e.prototype.setEraseOn = function (t) {
                this.CanvasManagerObj.setEraseOn(t), this.isErase = t
            }, e.prototype.setPatternIndex = function (t) {
                t &gt; this.DrawingTexture.length ? alert("Index must spriteframe Range") : (this.selectedPattern = t, this.CanvasManagerObj.setPatternData(this.selectedPattern))
            }, e.prototype.getDrawingPercentage = function () {
                return this.CanvasManagerObj.getDrawingPercentage(this.selectedPattern)
            }, e.prototype.isToolDone = function () {
                var t = this.getDrawingPercentage();
                if (this.isErase) {
                    if (t &lt;= this.ErasePercentage) return !0
                } else if (t &gt;= this.DrawingPercentage) return !0;
                return !1
            }, e.prototype.update = function () { }, a([y()], e.prototype, "isActiveDrawing", void 0), a([y(cc.SpriteFrame)], e.prototype, "brush", void 0), a([y()], e.prototype, "brushsize", void 0), a([y()], e.prototype, "isErase", void 0), a([y()], e.prototype, "isRepeatPattern", void 0), a([y(cc.Vec2)], e.prototype, "DrawingOffset", void 0), a([y([cc.SpriteFrame])], e.prototype, "DrawingTexture", void 0), a([y(cc.SpriteFrame)], e.prototype, "DefaultTexture", void 0), a([y([cc.Node])], e.prototype, "OutLines", void 0), a([y()], e.prototype, "selectedPattern", void 0), a([y({
                type: cc.Enum(r)
            })], e.prototype, "DrawingType", void 0), a([y({
                type: cc.Enum(c)
            })], e.prototype, "SceneType", void 0), a([y()], e.prototype, "DrawingPercentage", void 0), a([y()], e.prototype, "ErasePercentage", void 0), a([y(cc.Node)], e.prototype, "Particle", void 0), a([f], e)
        }(cc.Component);
        o.default = v, cc._RF.pop()
    }, {
        "../FloodFill/FloodFill": "FloodFill",
        "./AudioManager": "AudioManager",
        "./CanvasManager": "CanvasManager",
        "./CocosHelper": "CocosHelper",
        "./SessionStorageHelper": "SessionStorageHelper"
    }],
    WallRepairing: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "68ec3HCObhDWZvJ4+1vDN8/", "WallRepairing");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var s = t("../../../Scripts/Helper/AudioManager"),
            l = t("../../../Scripts/Helper/HelperTools"),
            h = t("../../../Scripts/Helper/ToolMoveMaster"),
            d = cc._decorator,
            p = d.ccclass,
            u = d.property,
            f = function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.TilesThumb = null, e.Tools = [], e.ViewCompleteParticle = null, e
                }
                return n(e, t), e.prototype.onLoad = function () {
                    this.Tools[0].position = cc.v3(524, -187), this.Tools[1].position = cc.v3(524, -167)
                }, e.prototype.start = function () {
                    this.TilesEntry()
                }, e.prototype.TilesEntry = function () {
                    cc.tween(this.TilesThumb).to(.5, {
                        position: cc.v3(0, 0, 0)
                    }, {
                        easing: cc.easing.backOut
                    }).start()
                }, e.prototype.BeganAction = function (t, e) {
                    0 != e &amp;&amp; 1 != e &amp;&amp; 2 != e || s.default.getInstance().play("click")
                }, e.prototype.MoveAction = function () { }, e.prototype.EndAction = function (t, e) {
                    return r(this, void 0, void 0, function () {
                        return c(this, function (o) {
                            switch (o.label) {
                                case 0:
                                    return 1 != e ? [3, 1] : (t.getComponent(h.default).isToolDone() &amp;&amp; (t.getComponent(h.default).ToolDoneAction(), cc.tween(this.Tools[0]).by(.5, {
                                        position: cc.v3(800, 0)
                                    }).start(), cc.tween(this.Tools[1]).delay(.3).to(.5, {
                                        position: cc.v3(310, -167)
                                    }).start(), this.Tools[1].getComponent(h.default).UpdatePosition(cc.v3(310, -167)), cc.find("SafeArea/BoardComplete", this.node).active = !0, cc.find("SafeArea/BoardComplete", this.node).getComponent(cc.ParticleSystem).resetSystem(), s.default.getInstance().play("PARTICLE")), [3, 3]);
                                case 1:
                                    return 2 != e ? [3, 3] : t.getComponent(h.default).isToolDone() ? (t.getComponent(h.default).ToolDoneAction(), cc.tween(this.Tools[1]).by(.5, {
                                        position: cc.v3(800, 0)
                                    }).start(), this.ViewCompleteParticle.active = !0, s.default.getInstance().play("PARTICLE"), [4, l.Delay(2)]) : [3, 3];
                                case 2:
                                    o.sent(), cc.game.emit("UpdateItems", 0), this.node.children[0].active = !1, o.label = 3;
                                case 3:
                                    return [2]
                            }
                        })
                    })
                }, e.prototype.FixedAction = function (t, e, o, i) {
                    if (0 == e) {
                        this.addParticle(i.position);
                        var n = !0;
                        s.default.getInstance().play("Pick and Drop"), t.parent.children.forEach(function (t) {
                            t.active &amp;&amp; (n = !1)
                        }), n &amp;&amp; (cc.tween(this.Tools[0]).to(.5, {
                            position: cc.v3(314, -192)
                        }).start(), this.Tools[0].getComponent(h.default).UpdatePosition(cc.v3(314, -192)), console.log("done"))
                    }
                }, e.prototype.addParticle = function (t) {
                    var e = cc.instantiate(cc.find("SafeArea/ToolComplete", this.node));
                    this.node.addChild(e), e.active = !0, e.position = t, s.default.getInstance().play("PARTICLE")
                }, a([u(cc.Node)], e.prototype, "TilesThumb", void 0), a([u([cc.Node])], e.prototype, "Tools", void 0), a([u(cc.Node)], e.prototype, "ViewCompleteParticle", void 0), a([p], e)
            }(cc.Component);
        o.default = f, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager",
        "../../../Scripts/Helper/HelperTools": "HelperTools",
        "../../../Scripts/Helper/ToolMoveMaster": "ToolMoveMaster"
    }],
    WashBesinCleaning: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "fad77ADiNdPXJbeZqdcSEgM", "WashBesinCleaning");
        var i, n = this &amp;&amp; this.__extends || (i = function (t, e) {
            return (i = Object.setPrototypeOf || {
                __proto__: []
            }
                instanceof Array &amp;&amp; function (t, e) {
                    t.__proto__ = e
                } || function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &amp;&amp; (t[o] = e[o])
                })(t, e)
        }, function (t, e) {
            function o() {
                this.constructor = t
            }
            i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
        }),
            a = this &amp;&amp; this.__decorate || function (t, e, o, i) {
                var n, a = arguments.length,
                    r = a &lt; 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
                if ("object" == typeof Reflect &amp;&amp; "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
                else
                    for (var c = t.length - 1; c &gt;= 0; c--)(n = t[c]) &amp;&amp; (r = (a &lt; 3 ? n(r) : a &gt; 3 ? n(e, o, r) : n(e, o)) || r);
                return a &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(e, o, r), r
            },
            r = this &amp;&amp; this.__awaiter || function (t, e, o, i) {
                return new (o || (o = Promise))(function (n, a) {
                    function r(t) {
                        try {
                            s(i.next(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function c(t) {
                        try {
                            s(i.throw(t))
                        } catch (e) {
                            a(e)
                        }
                    }

                    function s(t) {
                        var e;
                        t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
                            t(e)
                        })).then(r, c)
                    }
                    s((i = i.apply(t, e || [])).next())
                })
            },
            c = this &amp;&amp; this.__generator || function (t, e) {
                var o, i, n, a, r = {
                    label: 0,
                    sent: function () {
                        if (1 &amp; n[0]) throw n[1];
                        return n[1]
                    },
                    trys: [],
                    ops: []
                };
                return a = {
                    next: c(0),
                    throw: c(1),
                    return: c(2)
                }, "function" == typeof Symbol &amp;&amp; (a[Symbol.iterator] = function () {
                    return this
                }), a;

                function c(t) {
                    return function (e) {
                        return s([t, e])
                    }
                }

                function s(a) {
                    if (o) throw new TypeError("Generator is already executing.");
                    for (; r;) try {
                        if (o = 1, i &amp;&amp; (n = 2 &amp; a[0] ? i.return : a[0] ? i.throw || ((n = i.return) &amp;&amp; n.call(i), 0) : i.next) &amp;&amp; !(n = n.call(i, a[1])).done) return n;
                        switch (i = 0, n &amp;&amp; (a = [2 &amp; a[0], n.value]), a[0]) {
                            case 0:
                            case 1:
                                n = a;
                                break;
                            case 4:
                                return r.label++, {
                                    value: a[1],
                                    done: !1
                                };
                            case 5:
                                r.label++, i = a[1], a = [0];
                                continue;
                            case 7:
                                a = r.ops.pop(), r.trys.pop();
                                continue;
                            default:
                                if (!(n = (n = r.trys).length &gt; 0 &amp;&amp; n[n.length - 1]) &amp;&amp; (6 === a[0] || 2 === a[0])) {
                                    r = 0;
                                    continue
                                }
                                if (3 === a[0] &amp;&amp; (!n || a[1] &gt; n[0] &amp;&amp; a[1] &lt; n[3])) {
                                    r.label = a[1];
                                    break
                                }
                                if (6 === a[0] &amp;&amp; r.label &lt; n[1]) {
                                    r.label = n[1], n = a;
                                    break
                                }
                                if (n &amp;&amp; r.label &lt; n[2]) {
                                    r.label = n[2], r.ops.push(a);
                                    break
                                }
                                n[2] &amp;&amp; r.ops.pop(), r.trys.pop();
                                continue
                        }
                        a = e.call(t, r)
                    } catch (c) {
                        a = [6, c], i = 0
                    } finally {
                            o = n = 0
                        }
                    if (5 &amp; a[0]) throw a[1];
                    return {
                        value: a[0] ? a[1] : void 0,
                        done: !0
                    }
                }
            };
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var s = t("../../../Scripts/Helper/AudioManager"),
            l = t("../../../Scripts/Helper/HelperTools"),
            h = t("../../../Scripts/Helper/ToolMoveMaster"),
            d = cc._decorator,
            p = d.ccclass,
            u = d.property,
            f = function (t) {
                function e() {
                    var e = null !== t &amp;&amp; t.apply(this, arguments) || this;
                    return e.TilesThumb = null, e.Tools = [], e.ViewCompleteParticle = null, e
                }
                return n(e, t), e.prototype.onLoad = function () { }, e.prototype.start = function () { }, e.prototype.BeganAction = function () {
                    s.default.getInstance().play("Pick and Drop")
                }, e.prototype.MoveAction = function () { }, e.prototype.EndAction = function () {
                    return r(this, void 0, void 0, function () {
                        return c(this, function () {
                            return [2]
                        })
                    })
                }, e.prototype.FixedAction = function (t, e, o, i) {
                    return r(this, void 0, void 0, function () {
                        var o;
                        return c(this, function (n) {
                            switch (n.label) {
                                case 0:
                                    return 0 != e ? [3, 2] : (t.getComponent(h.default).destinationNode.color = cc.Color.WHITE, t.getComponent(h.default).destinationNode.opacity = 255, this.addParticle(i.position), o = !0, t.getComponent(h.default).destinationNode.parent.children.forEach(function (t) {
                                        t.opacity &lt; 250 &amp;&amp; (o = !1)
                                    }), o ? (this.ViewCompleteParticle.active = !0, s.default.getInstance().play("PARTICLE"), [4, l.Delay(2)]) : [3, 2]);
                                case 1:
                                    n.sent(), cc.game.emit("UpdateItems", 3), this.node.children[0].active = !1, n.label = 2;
                                case 2:
                                    return [2]
                            }
                        })
                    })
                }, e.prototype.addParticle = function (t) {
                    var e = cc.instantiate(cc.find("SafeArea/ToolComplete", this.node));
                    this.node.addChild(e), e.active = !0, e.position = t, s.default.getInstance().play("PARTICLE")
                }, a([u(cc.Node)], e.prototype, "TilesThumb", void 0), a([u([cc.Node])], e.prototype, "Tools", void 0), a([u(cc.Node)], e.prototype, "ViewCompleteParticle", void 0), a([p], e)
            }(cc.Component);
        o.default = f, cc._RF.pop()
    }, {
        "../../../Scripts/Helper/AudioManager": "AudioManager",
        "../../../Scripts/Helper/HelperTools": "HelperTools",
        "../../../Scripts/Helper/ToolMoveMaster": "ToolMoveMaster"
    }],
    colorUtils: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "4b109XahIhBcoA+LxKbA2kV", "colorUtils"), Object.defineProperty(o, "__esModule", {
            value: !0
        }), o.isSameColor = o.setColorAtPixel = o.getColorAtPixel = void 0, o.getColorAtPixel = function (t, e, o) {
            var i = t.width,
                n = t.data,
                a = 4 * (o * i + e);
            if (void 0 === n[a + 3]) throw new Error("Invalid pixel coordinates: x=" + e + "; y=" + o);
            return cc.color(n[a], n[a + 1], n[a + 2], n[a + 3])
        }, o.setColorAtPixel = function (t, e, o, i, n, a) {
            var r = t.width,
                c = t.data,
                s = 4 * (a * r + n);
            c[s + 3], c[s + 0] = 255 &amp; i.r, c[s + 1] = 255 &amp; i.g, c[s + 2] = 255 &amp; i.b, c[s + 3] = 255 &amp; i.a, e &amp;&amp; (o ? (e.data[s + 0] = 255 &amp; i.r, e.data[s + 1] = 255 &amp; i.g, e.data[s + 2] = 255 &amp; i.b, e.data[s + 3] = 255 &amp; i.a) : (e.data[s + 0] = 0, e.data[s + 1] = 0, e.data[s + 2] = 0, e.data[s + 3] = 0))
        }, o.isSameColor = function (t, e, o) {
            return void 0 === o &amp;&amp; (o = 0), !(Math.abs(t.r - e.r) &gt; o || Math.abs(t.g - e.g) &gt; o || Math.abs(t.b - e.b) &gt; o || Math.abs(t.a - e.a) &gt; o)
        }, cc._RF.pop()
    }, {}],
    floodindex: [function (t, e, o) {
        "use strict";
        cc._RF.push(e, "590adKl+eFM06PQVg6fojU9", "floodindex"), Object.defineProperty(o, "__esModule", {
            value: !0
        }), o.getColorAtPixel = o.setColorAtPixel = o.isSameColor = void 0;
        var i = t("./FloodFill"),
            n = t("./colorUtils");
        Object.defineProperty(o, "isSameColor", {
            enumerable: !0,
            get: function () {
                return n.isSameColor
            }
        }), Object.defineProperty(o, "setColorAtPixel", {
            enumerable: !0,
            get: function () {
                return n.setColorAtPixel
            }
        }), Object.defineProperty(o, "getColorAtPixel", {
            enumerable: !0,
            get: function () {
                return n.getColorAtPixel
            }
        }), o.default = i.default, cc._RF.pop()
    }, {
        "./FloodFill": "FloodFill",
        "./colorUtils": "colorUtils"
    }]
}, {}, ["BathRoom", "BathStory", "MirrorRepairing", "Particle", "TilesRepairing", "ToiletCleaning", "WallRepairing", "WashBesinCleaning", "BedRoom", "Garden", "JigsawPopup", "DesignScene", "Horse", "HorseBackground", "LevelScene", "MainScene", "BathRoomStarting ", "BedRoomStarting", "GardenStarting", "HorseStarting", "FloodFill", "colorUtils", "floodindex", "AudioManager", "CanvasManager", "CocosHelper", "GlobalData", "HelperTools", "SessionStorageHelper", "StickerHelper", "ToolMoveMaster", "UserDrawing", "AdManager", "Promotion", "RewardFailed"]);
initAdsGame("GameCanvas","3g021t180qiucr2p6131tdnf2j5rzt48");</pre></body></html>