<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">!function () {
    function _typeof(t) {
        return (_typeof = "function" == typeof Symbol &amp;&amp; "symbol" == typeof Symbol.iterator ? function (t) {
            return typeof t;
        } : function (t) {
            return t &amp;&amp; "function" == typeof Symbol &amp;&amp; t.constructor === Symbol &amp;&amp; t !== Symbol.prototype ? "symbol" : typeof t;
        })(t);
    }

    function _get(t, e, i) {
        return (_get = "undefined" != typeof Reflect &amp;&amp; Reflect.get ? Reflect.get : function (t, e, i) {
            var n = _superPropBase(t, e);
            if (n) {
                var r = Object.getOwnPropertyDescriptor(n, e);
                return r.get ? r.get.call(i) : r.value;
            }
        })(t, e, i || t);
    }

    function _superPropBase(t, e) {
        for (; !Object.prototype.hasOwnProperty.call(t, e) &amp;&amp; null !== (t = _getPrototypeOf(t)););
        return t;
    }

    function _inherits(t, e) {
        if ("function" != typeof e &amp;&amp; null !== e) throw new TypeError("Super expression must either be null or a function");
        t.prototype = Object.create(e &amp;&amp; e.prototype, {
            constructor: {
                value: t,
                writable: !0,
                configurable: !0
            }
        }), e &amp;&amp; _setPrototypeOf(t, e);
    }

    function _setPrototypeOf(t, e) {
        return (_setPrototypeOf = Object.setPrototypeOf || function (t, e) {
            return t.__proto__ = e, t;
        })(t, e);
    }

    function _createSuper(t) {
        var e = _isNativeReflectConstruct();
        return function () {
            var i, n = _getPrototypeOf(t);
            if (e) {
                var r = _getPrototypeOf(this).constructor;
                i = Reflect.construct(n, arguments, r);
            } else i = n.apply(this, arguments);
            return _possibleConstructorReturn(this, i);
        };
    }

    function _possibleConstructorReturn(t, e) {
        return !e || "object" !== _typeof(e) &amp;&amp; "function" != typeof e ? _assertThisInitialized(t) : e;
    }

    function _assertThisInitialized(t) {
        if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        return t;
    }

    function _isNativeReflectConstruct() {
        if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
        if (Reflect.construct.sham) return !1;
        if ("function" == typeof Proxy) return !0;
        try {
            return Date.prototype.toString.call(Reflect.construct(Date, [], function () { })),
                !0;
        } catch (t) {
            return !1;
        }
    }

    function _getPrototypeOf(t) {
        return (_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function (t) {
            return t.__proto__ || Object.getPrototypeOf(t);
        })(t);
    }

    function _defineProperties(t, e) {
        for (var i = 0; i &lt; e.length; i++) {
            var n = e[i];
            n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n &amp;&amp; (n.writable = !0),
                Object.defineProperty(t, n.key, n);
        }
    }

    function _createClass(t, e, i) {
        return e &amp;&amp; _defineProperties(t.prototype, e), i &amp;&amp; _defineProperties(t, i), t;
    }

    function _classCallCheck(t, e) {
        if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
    }

    window.Laya = function (t) {
        var e = function t() {
            _classCallCheck(this, t);
        };
        e.animationInterval = 50, e.isAntialias = !1, e.isAlpha = !1, e.premultipliedAlpha = !0,
            e.isStencil = !0, e.preserveDrawingBuffer = !1, e.webGL2D_MeshAllocMaxMem = !0,
            e.is2DPixelArtGame = !1, e.useWebGL2 = !0, e.allowGPUInstanceDynamicBatch = !0,
            e.useRetinalCanvas = !1, window.Config = e;
        var i = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "regClass",
                value: function (e) {
                    t.__classMap[e.name] = e;
                }
            }]), t;
        }();
        i.Laya = null, i.Timer = null, i.WorkerLoader = null, i.Dragging = null, i.GraphicsBounds = null,
            i.Sprite = null, i.TextRender = null, i.TextAtlas = null, i.timer = null, i.systemTimer = null,
            i.startTimer = null, i.updateTimer = null, i.lateTimer = null, i.physicsTimer = null,
            i.stage = null, i.Loader = null, i.loader = null, i.TTFLoader = null, i.SoundManager = null,
            i.WebAudioSound = null, i.AudioSound = null, i.ShaderCompile = null, i.ClassUtils = null,
            i.SceneUtils = null, i.Context = null, i.Render = null, i.MouseManager = null, i.Text = null,
            i.Browser = null, i.WebGL = null, i.Pool = null, i.Utils = null, i.Graphics = null,
            i.Submit = null, i.Stage = null, i.Resource = null, i.__classMap = {};
        var n = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "getPoolBySign",
                value: function (e) {
                    return t._poolDic[e] || (t._poolDic[e] = []);
                }
            }, {
                key: "clearBySign",
                value: function (e) {
                    t._poolDic[e] &amp;&amp; (t._poolDic[e].length = 0);
                }
            }, {
                key: "recover",
                value: function (e, i) {
                    i[t.POOLSIGN] || (i[t.POOLSIGN] = !0, t.getPoolBySign(e).push(i));
                }
            }, {
                key: "recoverByClass",
                value: function (e) {
                    if (e) {
                        var i = e.__className || e.constructor._$gid;
                        i &amp;&amp; t.recover(i, e);
                    }
                }
            }, {
                key: "_getClassSign",
                value: function (e) {
                    var i = e.__className || e._$gid;
                    return i || (e._$gid = i = t._CLSID + "", t._CLSID++), i;
                }
            }, {
                key: "createByClass",
                value: function (e) {
                    return t.getItemByClass(t._getClassSign(e), e);
                }
            }, {
                key: "getItemByClass",
                value: function (e, i) {
                    if (!t._poolDic[e]) return new i();
                    var n = t.getPoolBySign(e);
                    if (n.length) {
                        var r = n.pop();
                        r[t.POOLSIGN] = !1;
                    } else r = new i();
                    return r;
                }
            }, {
                key: "getItemByCreateFun",
                value: function (e, i) {
                    var n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, r = t.getPoolBySign(e), s = r.length ? r.pop() : i.call(n);
                    return s[t.POOLSIGN] = !1, s;
                }
            }, {
                key: "getItem",
                value: function (e) {
                    var i = t.getPoolBySign(e), n = i.length ? i.pop() : null;
                    return n &amp;&amp; (n[t.POOLSIGN] = !1), n;
                }
            }]), t;
        }();
        n._CLSID = 0, n.POOLSIGN = "__InPool", n._poolDic = {};
        var r = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    n.recover("AlphaCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t.alpha(this.alpha);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e) {
                    var i = n.getItemByClass("AlphaCmd", t);
                    return i.alpha = e, i;
                }
            }]), t;
        }();
        r.ID = "Alpha";
        var s = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.fillColor = null, this.lineColor = null, n.recover("DrawCircleCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t._drawCircle(this.x + e, this.y + i, this.radius, this.fillColor, this.lineColor, this.lineWidth, this.vid);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a, o, l) {
                    var h = n.getItemByClass("DrawCircleCmd", t);
                    return h.x = e, h.y = i, h.radius = r, h.fillColor = s, h.lineColor = a, h.lineWidth = o,
                        h.vid = l, h;
                }
            }]), t;
        }();
        s.ID = "DrawCircle";
        var a = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.points = null, this.lineColor = null, n.recover("DrawCurvesCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    this.points &amp;&amp; t.drawCurves(this.x + e, this.y + i, this.points, this.lineColor, this.lineWidth);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a) {
                    var o = n.getItemByClass("DrawCurvesCmd", t);
                    return o.x = e, o.y = i, o.points = r, o.lineColor = s, o.lineWidth = a, o;
                }
            }]), t;
        }();
        a.ID = "DrawCurves";
        var o = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.texture &amp;&amp; this.texture._removeReference(), this.texture = null, n.recover("DrawImageCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    this.texture &amp;&amp; t.drawTexture(this.texture, this.x + e, this.y + i, this.width, this.height);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a) {
                    var o = n.getItemByClass("DrawImageCmd", t);
                    return o.texture = e, e._addReference(), o.x = i, o.y = r, o.width = s, o.height = a,
                        o;
                }
            }]), t;
        }();
        o.ID = "DrawImage";
        var l = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    n.recover("DrawLineCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t._drawLine(e, i, this.fromX, this.fromY, this.toX, this.toY, this.lineColor, this.lineWidth, this.vid);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a, o, l) {
                    var h = n.getItemByClass("DrawLineCmd", t);
                    return h.fromX = e, h.fromY = i, h.toX = r, h.toY = s, h.lineColor = a, h.lineWidth = o,
                        h.vid = l, h;
                }
            }]), t;
        }();
        l.ID = "DrawLine";
        var h = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.points = null, this.lineColor = null, n.recover("DrawLinesCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    this.points &amp;&amp; t._drawLines(this.x + e, this.y + i, this.points, this.lineColor, this.lineWidth, this.vid);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a, o) {
                    var l = n.getItemByClass("DrawLinesCmd", t);
                    return l.x = e, l.y = i, l.points = r, l.lineColor = s, l.lineWidth = a, l.vid = o,
                        l;
                }
            }]), t;
        }();
        h.ID = "DrawLines";
        var u = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.paths = null, this.brush = null, this.pen = null, n.recover("DrawPathCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    this.paths &amp;&amp; t._drawPath(this.x + e, this.y + i, this.paths, this.brush, this.pen);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a) {
                    var o = n.getItemByClass("DrawPathCmd", t);
                    return o.x = e, o.y = i, o.paths = r, o.brush = s, o.pen = a, o;
                }
            }]), t;
        }();
        u.ID = "DrawPath";
        var c = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.fillColor = null, this.lineColor = null, n.recover("DrawPieCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t._drawPie(this.x + e, this.y + i, this.radius, this._startAngle, this._endAngle, this.fillColor, this.lineColor, this.lineWidth, this.vid);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }, {
                key: "startAngle",
                get: function () {
                    return 180 * this._startAngle / Math.PI;
                },
                set: function (t) {
                    this._startAngle = t * Math.PI / 180;
                }
            }, {
                key: "endAngle",
                get: function () {
                    return 180 * this._endAngle / Math.PI;
                },
                set: function (t) {
                    this._endAngle = t * Math.PI / 180;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a, o, l, h, u) {
                    var c = n.getItemByClass("DrawPieCmd", t);
                    return c.x = e, c.y = i, c.radius = r, c._startAngle = s, c._endAngle = a, c.fillColor = o,
                        c.lineColor = l, c.lineWidth = h, c.vid = u, c;
                }
            }]), t;
        }();
        c.ID = "DrawPie";
        var _ = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.points = null, this.fillColor = null, this.lineColor = null, n.recover("DrawPolyCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    this.points &amp;&amp; t._drawPoly(this.x + e, this.y + i, this.points, this.fillColor, this.lineColor, this.lineWidth, this.isConvexPolygon, this.vid);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a, o, l, h) {
                    var u = n.getItemByClass("DrawPolyCmd", t);
                    return u.x = e, u.y = i, u.points = r, u.fillColor = s, u.lineColor = a, u.lineWidth = o,
                        u.isConvexPolygon = l, u.vid = h, u;
                }
            }]), t;
        }();
        _.ID = "DrawPoly";
        var d = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.fillColor = null, this.lineColor = null, n.recover("DrawRectCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t.drawRect(this.x + e, this.y + i, this.width, this.height, this.fillColor, this.lineColor, this.lineWidth);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a, o, l) {
                    var h = n.getItemByClass("DrawRectCmd", t);
                    return h.x = e, h.y = i, h.width = r, h.height = s, h.fillColor = a, h.lineColor = o,
                        h.lineWidth = l, h;
                }
            }]), t;
        }();
        d.ID = "DrawRect";
        var f = function () {
            function t() {
                var e = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 1, i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0, r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 1, s = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0, a = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 0, o = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : 0;
                if (_classCallCheck(this, t), this._bTransform = !1, null != t._createFun) return t._createFun(e, i, n, r, s, a, o);
                this.a = e, this.b = i, this.c = n, this.d = r, this.tx = s, this.ty = a, this._checkTransform();
            }
            return _createClass(t, [{
                key: "identity",
                value: function () {
                    return this.a = this.d = 1, this.b = this.tx = this.ty = this.c = 0, this._bTransform = !1,
                        this;
                }
            }, {
                key: "_checkTransform",
                value: function () {
                    return this._bTransform = 1 !== this.a || 0 !== this.b || 0 !== this.c || 1 !== this.d;
                }
            }, {
                key: "setTranslate",
                value: function (t, e) {
                    return this.tx = t, this.ty = e, this;
                }
            }, {
                key: "translate",
                value: function (t, e) {
                    return this.tx += t, this.ty += e, this;
                }
            }, {
                key: "scale",
                value: function (t, e) {
                    return this.a *= t, this.d *= e, this.c *= t, this.b *= e, this.tx *= t, this.ty *= e,
                        this._bTransform = !0, this;
                }
            }, {
                key: "rotate",
                value: function (t) {
                    var e = Math.cos(t), i = Math.sin(t), n = this.a, r = this.c, s = this.tx;
                    return this.a = n * e - this.b * i, this.b = n * i + this.b * e, this.c = r * e - this.d * i,
                        this.d = r * i + this.d * e, this.tx = s * e - this.ty * i, this.ty = s * i + this.ty * e,
                        this._bTransform = !0, this;
                }
            }, {
                key: "skew",
                value: function (t, e) {
                    var i = Math.tan(t), n = Math.tan(e), r = this.a, s = this.b;
                    return this.a += n * this.c, this.b += n * this.d, this.c += i * r, this.d += i * s,
                        this;
                }
            }, {
                key: "invertTransformPoint",
                value: function (t) {
                    var e = this.a, i = this.b, n = this.c, r = this.d, s = this.tx, a = e * r - i * n, o = r / a, l = -i / a, h = -n / a, u = e / a, c = (n * this.ty - r * s) / a, _ = -(e * this.ty - i * s) / a;
                    return t.setTo(o * t.x + h * t.y + c, l * t.x + u * t.y + _);
                }
            }, {
                key: "transformPoint",
                value: function (t) {
                    return t.setTo(this.a * t.x + this.c * t.y + this.tx, this.b * t.x + this.d * t.y + this.ty);
                }
            }, {
                key: "transformPointN",
                value: function (t) {
                    return t.setTo(this.a * t.x + this.c * t.y, this.b * t.x + this.d * t.y);
                }
            }, {
                key: "getScaleX",
                value: function () {
                    return 0 === this.b ? this.a : Math.sqrt(this.a * this.a + this.b * this.b);
                }
            }, {
                key: "getScaleY",
                value: function () {
                    return 0 === this.c ? this.d : Math.sqrt(this.c * this.c + this.d * this.d);
                }
            }, {
                key: "invert",
                value: function () {
                    var t = this.a, e = this.b, i = this.c, n = this.d, r = this.tx, s = t * n - e * i;
                    return this.a = n / s, this.b = -e / s, this.c = -i / s, this.d = t / s, this.tx = (i * this.ty - n * r) / s,
                        this.ty = -(t * this.ty - e * r) / s, this;
                }
            }, {
                key: "setTo",
                value: function (t, e, i, n, r, s) {
                    return this.a = t, this.b = e, this.c = i, this.d = n, this.tx = r, this.ty = s,
                        this;
                }
            }, {
                key: "concat",
                value: function (t) {
                    var e = this.a, i = this.c, n = this.tx;
                    return this.a = e * t.a + this.b * t.c, this.b = e * t.b + this.b * t.d, this.c = i * t.a + this.d * t.c,
                        this.d = i * t.b + this.d * t.d, this.tx = n * t.a + this.ty * t.c + t.tx, this.ty = n * t.b + this.ty * t.d + t.ty,
                        this;
                }
            }, {
                key: "scaleEx",
                value: function (t, e) {
                    var i = this.a, n = this.b, r = this.c, s = this.d;
                    0 !== n || 0 !== r ? (this.a = t * i, this.b = t * n, this.c = e * r, this.d = e * s) : (this.a = t * i,
                        this.b = 0 * s, this.c = 0 * i, this.d = e * s), this._bTransform = !0;
                }
            }, {
                key: "rotateEx",
                value: function (t) {
                    var e = Math.cos(t), i = Math.sin(t), n = this.a, r = this.b, s = this.c, a = this.d;
                    0 !== r || 0 !== s ? (this.a = e * n + i * s, this.b = e * r + i * a, this.c = -i * n + e * s,
                        this.d = -i * r + e * a) : (this.a = e * n, this.b = i * a, this.c = -i * n, this.d = e * a),
                        this._bTransform = !0;
                }
            }, {
                key: "clone",
                value: function () {
                    var e = t.create();
                    return e.a = this.a, e.b = this.b, e.c = this.c, e.d = this.d, e.tx = this.tx, e.ty = this.ty,
                        e._bTransform = this._bTransform, e;
                }
            }, {
                key: "copyTo",
                value: function (t) {
                    return t.a = this.a, t.b = this.b, t.c = this.c, t.d = this.d, t.tx = this.tx, t.ty = this.ty,
                        t._bTransform = this._bTransform, t;
                }
            }, {
                key: "toString",
                value: function () {
                    return this.a + "," + this.b + "," + this.c + "," + this.d + "," + this.tx + "," + this.ty;
                }
            }, {
                key: "destroy",
                value: function () {
                    this.recover();
                }
            }, {
                key: "recover",
                value: function () {
                    n.recover("Matrix", this.identity());
                }
            }], [{
                key: "mul",
                value: function (t, e, i) {
                    var n = t.a, r = t.b, s = t.c, a = t.d, o = t.tx, l = t.ty, h = e.a, u = e.b, c = e.c, _ = e.d, d = e.tx, f = e.ty;
                    return 0 !== u || 0 !== c ? (i.a = n * h + r * c, i.b = n * u + r * _, i.c = s * h + a * c,
                        i.d = s * u + a * _, i.tx = h * o + c * l + d, i.ty = u * o + _ * l + f) : (i.a = n * h,
                            i.b = r * _, i.c = s * h, i.d = a * _, i.tx = h * o + d, i.ty = _ * l + f), i;
                }
            }, {
                key: "mul16",
                value: function (t, e, i) {
                    var n = t.a, r = t.b, s = t.c, a = t.d, o = t.tx, l = t.ty, h = e.a, u = e.b, c = e.c, _ = e.d, d = e.tx, f = e.ty;
                    return 0 !== u || 0 !== c ? (i[0] = n * h + r * c, i[1] = n * u + r * _, i[4] = s * h + a * c,
                        i[5] = s * u + a * _, i[12] = h * o + c * l + d, i[13] = u * o + _ * l + f) : (i[0] = n * h,
                            i[1] = r * _, i[4] = s * h, i[5] = a * _, i[12] = h * o + d, i[13] = _ * l + f),
                        i;
                }
            }, {
                key: "create",
                value: function () {
                    return n.getItemByClass("Matrix", t);
                }
            }]), t;
        }();
        f.EMPTY = new f(), f.TEMP = new f(), f._createFun = null;
        var v = function () {
            function t() {
                var e = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0;
                _classCallCheck(this, t), this.x = e, this.y = i;
            }
            return _createClass(t, [{
                key: "setTo",
                value: function (t, e) {
                    return this.x = t, this.y = e, this;
                }
            }, {
                key: "reset",
                value: function () {
                    return this.x = this.y = 0, this;
                }
            }, {
                key: "recover",
                value: function () {
                    n.recover("Point", this.reset());
                }
            }, {
                key: "distance",
                value: function (t, e) {
                    return Math.sqrt((this.x - t) * (this.x - t) + (this.y - e) * (this.y - e));
                }
            }, {
                key: "toString",
                value: function () {
                    return this.x + "," + this.y;
                }
            }, {
                key: "normalize",
                value: function () {
                    var t = Math.sqrt(this.x * this.x + this.y * this.y);
                    if (t &gt; 0) {
                        var e = 1 / t;
                        this.x *= e, this.y *= e;
                    }
                }
            }, {
                key: "copy",
                value: function (t) {
                    return this.setTo(t.x, t.y);
                }
            }], [{
                key: "create",
                value: function () {
                    return n.getItemByClass("Point", t);
                }
            }]), t;
        }();
        v.TEMP = new v(), v.EMPTY = new v();
        var p = function () {
            function t() {
                var e = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0, r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 0;
                _classCallCheck(this, t), this.x = e, this.y = i, this.width = n, this.height = r;
            }
            return _createClass(t, [{
                key: "setTo",
                value: function (t, e, i, n) {
                    return this.x = t, this.y = e, this.width = i, this.height = n, this;
                }
            }, {
                key: "reset",
                value: function () {
                    return this.x = this.y = this.width = this.height = 0, this;
                }
            }, {
                key: "recover",
                value: function () {
                    this != t.TEMP &amp;&amp; this != t.EMPTY ? n.recover("Rectangle", this.reset()) : console.log("recover Temp or Empty:", this);
                }
            }, {
                key: "copyFrom",
                value: function (t) {
                    return this.x = t.x, this.y = t.y, this.width = t.width, this.height = t.height,
                        this;
                }
            }, {
                key: "contains",
                value: function (t, e) {
                    return !(this.width &lt;= 0 || this.height &lt;= 0) &amp;&amp; (t &gt;= this.x &amp;&amp; t &lt; this.right &amp;&amp; e &gt;= this.y &amp;&amp; e &lt; this.bottom);
                }
            }, {
                key: "intersects",
                value: function (t) {
                    return !(t.x &gt; this.x + this.width || t.x + t.width &lt; this.x || t.y &gt; this.y + this.height || t.y + t.height &lt; this.y);
                }
            }, {
                key: "intersection",
                value: function (e) {
                    var i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    return this.intersects(e) ? (i || (i = new t()), i.x = Math.max(this.x, e.x), i.y = Math.max(this.y, e.y),
                        i.width = Math.min(this.right, e.right) - i.x, i.height = Math.min(this.bottom, e.bottom) - i.y,
                        i) : null;
                }
            }, {
                key: "union",
                value: function (e) {
                    var i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    return i || (i = new t()), this.clone(i), e.width &lt;= 0 || e.height &lt;= 0 ? i : (i.addPoint(e.x, e.y),
                        i.addPoint(e.right, e.bottom), this);
                }
            }, {
                key: "clone",
                value: function () {
                    var e = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null;
                    return e || (e = new t()), e.x = this.x, e.y = this.y, e.width = this.width, e.height = this.height,
                        e;
                }
            }, {
                key: "toString",
                value: function () {
                    return this.x + "," + this.y + "," + this.width + "," + this.height;
                }
            }, {
                key: "equals",
                value: function (t) {
                    return !(!t || t.x !== this.x || t.y !== this.y || t.width !== this.width || t.height !== this.height);
                }
            }, {
                key: "addPoint",
                value: function (t, e) {
                    return this.x &gt; t &amp;&amp; (this.width += this.x - t, this.x = t), this.y &gt; e &amp;&amp; (this.height += this.y - e,
                        this.y = e), this.width &lt; t - this.x &amp;&amp; (this.width = t - this.x), this.height &lt; e - this.y &amp;&amp; (this.height = e - this.y),
                        this;
                }
            }, {
                key: "_getBoundPoints",
                value: function () {
                    var e = t._temB;
                    return e.length = 0, 0 == this.width || 0 == this.height || e.push(this.x, this.y, this.x + this.width, this.y, this.x, this.y + this.height, this.x + this.width, this.y + this.height),
                        e;
                }
            }, {
                key: "isEmpty",
                value: function () {
                    return this.width &lt;= 0 || this.height &lt;= 0;
                }
            }, {
                key: "right",
                get: function () {
                    return this.x + this.width;
                }
            }, {
                key: "bottom",
                get: function () {
                    return this.y + this.height;
                }
            }], [{
                key: "create",
                value: function () {
                    return n.getItemByClass("Rectangle", t);
                }
            }, {
                key: "_getBoundPointS",
                value: function (e, i, n, r) {
                    var s = t._temA;
                    return s.length = 0, 0 == n || 0 == r || s.push(e, i, e + n, i, e, i + r, e + n, i + r),
                        s;
                }
            }, {
                key: "_getWrapRec",
                value: function (e) {
                    var i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    if (!e || e.length &lt; 1) return i ? i.setTo(0, 0, 0, 0) : t.TEMP.setTo(0, 0, 0, 0);
                    i = i || t.create();
                    var n, r, s, a, o, l = e.length, h = v.TEMP;
                    for (s = o = -(r = a = 99999), n = 0; n &lt; l; n += 2) h.x = e[n], h.y = e[n + 1],
                        r = r &lt; h.x ? r : h.x, a = a &lt; h.y ? a : h.y, s = s &gt; h.x ? s : h.x, o = o &gt; h.y ? o : h.y;
                    return i.setTo(r, a, s - r, o - a);
                }
            }]), t;
        }();
        p.EMPTY = new p(), p.TEMP = new p(), p._temB = [], p._temA = [];
        var y = function t() {
            _classCallCheck(this, t);
        };
        y.ARRAY_BUFFER_TYPE_DATA = 0, y.ARRAY_BUFFER_TYPE_CMD = 1, y.ARRAY_BUFFER_REF_REFERENCE = 0,
            y.ARRAY_BUFFER_REF_COPY = 1, y.UPLOAD_SHADER_UNIFORM_TYPE_ID = 0, y.UPLOAD_SHADER_UNIFORM_TYPE_DATA = 1;
        var g = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "__init__",
                value: function () {
                    var e = y.instance;
                    t._depthFunc = e.LESS, t._blendEquation = e.FUNC_ADD, t._blendEquationRGB = e.FUNC_ADD,
                        t._blendEquationAlpha = e.FUNC_ADD, t._sFactor = e.ONE, t._dFactor = e.ZERO, t._sFactorAlpha = e.ONE,
                        t._dFactorAlpha = e.ZERO, t._activedTextureID = e.TEXTURE0, t._glTextureIDs = [e.TEXTURE0, e.TEXTURE1, e.TEXTURE2, e.TEXTURE3, e.TEXTURE4, e.TEXTURE5, e.TEXTURE6, e.TEXTURE7];
                }
            }, {
                key: "useProgram",
                value: function (e, i) {
                    return t._useProgram !== i &amp;&amp; (e.useProgram(i), t._useProgram = i, !0);
                }
            }, {
                key: "setDepthTest",
                value: function (e, i) {
                    i !== t._depthTest &amp;&amp; (t._depthTest = i, i ? e.enable(e.DEPTH_TEST) : e.disable(e.DEPTH_TEST));
                }
            }, {
                key: "setDepthMask",
                value: function (e, i) {
                    i !== t._depthMask &amp;&amp; (t._depthMask = i, e.depthMask(i));
                }
            }, {
                key: "setDepthFunc",
                value: function (e, i) {
                    i !== t._depthFunc &amp;&amp; (t._depthFunc = i, e.depthFunc(i));
                }
            }, {
                key: "setBlend",
                value: function (e, i) {
                    i !== t._blend &amp;&amp; (t._blend = i, i ? e.enable(e.BLEND) : e.disable(e.BLEND));
                }
            }, {
                key: "setBlendEquation",
                value: function (e, i) {
                    i !== t._blendEquation &amp;&amp; (t._blendEquation = i, t._blendEquationRGB = t._blendEquationAlpha = null,
                        e.blendEquation(i));
                }
            }, {
                key: "setBlendEquationSeparate",
                value: function (e, i, n) {
                    i === t._blendEquationRGB &amp;&amp; n === t._blendEquationAlpha || (t._blendEquationRGB = i,
                        t._blendEquationAlpha = n, t._blendEquation = null, e.blendEquationSeparate(i, n));
                }
            }, {
                key: "setBlendFunc",
                value: function (e, i, n) {
                    var r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] &amp;&amp; arguments[3];
                    (r || i !== t._sFactor || n !== t._dFactor) &amp;&amp; (t._sFactor = i, t._dFactor = n,
                        t._sFactorRGB = null, t._dFactorRGB = null, t._sFactorAlpha = null, t._dFactorAlpha = null,
                        e.blendFunc(i, n));
                }
            }, {
                key: "setBlendFuncSeperate",
                value: function (e, i, n, r, s) {
                    i === t._sFactorRGB &amp;&amp; n === t._dFactorRGB &amp;&amp; r === t._sFactorAlpha &amp;&amp; s === t._dFactorAlpha || (t._sFactorRGB = i,
                        t._dFactorRGB = n, t._sFactorAlpha = r, t._dFactorAlpha = s, t._sFactor = null,
                        t._dFactor = null, e.blendFuncSeparate(i, n, r, s));
                }
            }, {
                key: "setCullFace",
                value: function (e, i) {
                    i !== t._cullFace &amp;&amp; (t._cullFace = i, i ? e.enable(e.CULL_FACE) : e.disable(e.CULL_FACE));
                }
            }, {
                key: "setFrontFace",
                value: function (e, i) {
                    i !== t._frontFace &amp;&amp; (t._frontFace = i, e.frontFace(i));
                }
            }, {
                key: "activeTexture",
                value: function (e, i) {
                    t._activedTextureID !== i &amp;&amp; (e.activeTexture(i), t._activedTextureID = i);
                }
            }, {
                key: "bindTexture",
                value: function (e, i, n) {
                    t._activeTextures[t._activedTextureID - e.TEXTURE0] !== n &amp;&amp; (e.bindTexture(i, n),
                        t._activeTextures[t._activedTextureID - e.TEXTURE0] = n);
                }
            }, {
                key: "__init_native",
                value: function () {
                    if (i.Render.supportWebGLPlusRendering) {
                        var e = t;
                        e.activeTexture = e.activeTextureForNative, e.bindTexture = e.bindTextureForNative;
                    }
                }
            }, {
                key: "useProgramForNative",
                value: function (t, e) {
                    return t.useProgram(e), !0;
                }
            }, {
                key: "setDepthTestForNative",
                value: function (t, e) {
                    e ? t.enable(t.DEPTH_TEST) : t.disable(t.DEPTH_TEST);
                }
            }, {
                key: "setDepthMaskForNative",
                value: function (t, e) {
                    t.depthMask(e);
                }
            }, {
                key: "setDepthFuncForNative",
                value: function (t, e) {
                    t.depthFunc(e);
                }
            }, {
                key: "setBlendForNative",
                value: function (t, e) {
                    e ? t.enable(t.BLEND) : t.disable(t.BLEND);
                }
            }, {
                key: "setBlendFuncForNative",
                value: function (t, e, i) {
                    t.blendFunc(e, i);
                }
            }, {
                key: "setCullFaceForNative",
                value: function (t, e) {
                    e ? t.enable(t.CULL_FACE) : t.disable(t.CULL_FACE);
                }
            }, {
                key: "setFrontFaceForNative",
                value: function (t, e) {
                    t.frontFace(e);
                }
            }, {
                key: "activeTextureForNative",
                value: function (t, e) {
                    t.activeTexture(e);
                }
            }, {
                key: "bindTextureForNative",
                value: function (t, e, i) {
                    t.bindTexture(e, i);
                }
            }, {
                key: "bindVertexArrayForNative",
                value: function (t, e) {
                    t.bindVertexArray(e);
                }
            }]), t;
        }();
        g._activeTextures = new Array(8), g._useProgram = null, g._depthTest = !0, g._depthMask = !0,
            g._blend = !1, g._cullFace = !1, g.mainContext = null;
        var m = function () {
            function t() {
                var e = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null, i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] &amp;&amp; arguments[3];
                _classCallCheck(this, t), this.once = !1, this._id = 0, this.setTo(e, i, n, r);
            }
            return _createClass(t, [{
                key: "setTo",
                value: function (e, i, n) {
                    var r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] &amp;&amp; arguments[3];
                    return this._id = t._gid++, this.caller = e, this.method = i, this.args = n, this.once = r,
                        this;
                }
            }, {
                key: "run",
                value: function () {
                    if (null == this.method) return null;
                    var t = this._id, e = this.method.apply(this.caller, this.args);
                    return this._id === t &amp;&amp; this.once &amp;&amp; this.recover(), e;
                }
            }, {
                key: "runWith",
                value: function (t) {
                    if (null == this.method) return null;
                    var e = this._id;
                    if (null == t) var i = this.method.apply(this.caller, this.args); else i = this.args || t.unshift ? this.args ? this.method.apply(this.caller, this.args.concat(t)) : this.method.apply(this.caller, t) : this.method.call(this.caller, t);
                    return this._id === e &amp;&amp; this.once &amp;&amp; this.recover(), i;
                }
            }, {
                key: "clear",
                value: function () {
                    return this.caller = null, this.method = null, this.args = null, this;
                }
            }, {
                key: "recover",
                value: function () {
                    this._id &gt; 0 &amp;&amp; (this._id = 0, t._pool.push(this.clear()));
                }
            }], [{
                key: "create",
                value: function (e, i) {
                    var n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, r = !(arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3]) || arguments[3];
                    return t._pool.length ? t._pool.pop().setTo(e, i, n, r) : new t(e, i, n, r);
                }
            }]), t;
        }();
        m._pool = [], m._gid = 1;
        var T = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "hasListener",
                value: function (t) {
                    return !!(this._events &amp;&amp; this._events[t]);
                }
            }, {
                key: "event",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    if (!this._events || !this._events[t]) return !1;
                    var i = this._events[t];
                    if (i.run) i.once &amp;&amp; delete this._events[t], null != e ? i.runWith(e) : i.run(); else {
                        for (var n = 0, r = i.length; n &lt; r; n++) {
                            var s = i[n];
                            s &amp;&amp; (null != e ? s.runWith(e) : s.run()), s &amp;&amp; !s.once || (i.splice(n, 1), n--,
                                r--);
                        }
                        0 === i.length &amp;&amp; this._events &amp;&amp; delete this._events[t];
                    }
                    return !0;
                }
            }, {
                key: "on",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null;
                    return this._createListener(t, e, i, n, !1);
                }
            }, {
                key: "once",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null;
                    return this._createListener(t, e, i, n, !0);
                }
            }, {
                key: "_createListener",
                value: function (t, e, i, n, r) {
                    var s = !(arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5]) || arguments[5];
                    s &amp;&amp; this.off(t, e, i, r);
                    var a = k.create(e || this, i, n, r);
                    this._events || (this._events = {});
                    var o = this._events;
                    return o[t] ? o[t].run ? o[t] = [o[t], a] : o[t].push(a) : o[t] = a, this;
                }
            }, {
                key: "off",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] &amp;&amp; arguments[3];
                    if (!this._events || !this._events[t]) return this;
                    var r = this._events[t];
                    if (null != r) if (r.run) e &amp;&amp; r.caller !== e || null != i &amp;&amp; r.method !== i || n &amp;&amp; !r.once || (delete this._events[t],
                        r.recover()); else {
                        for (var s = 0, a = 0, o = r.length; a &lt; o; a++) {
                            var l = r[a];
                            l ? !l || e &amp;&amp; l.caller !== e || null != i &amp;&amp; l.method !== i || n &amp;&amp; !l.once || (s++,
                                r[a] = null, l.recover()) : s++;
                        }
                        s === o &amp;&amp; delete this._events[t];
                    }
                    return this;
                }
            }, {
                key: "offAll",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null, e = this._events;
                    if (!e) return this;
                    if (t) this._recoverHandlers(e[t]), delete e[t]; else {
                        for (var i in e) this._recoverHandlers(e[i]);
                        this._events = null;
                    }
                    return this;
                }
            }, {
                key: "offAllCaller",
                value: function (t) {
                    if (t &amp;&amp; this._events) for (var e in this._events) this.off(e, t, null);
                    return this;
                }
            }, {
                key: "_recoverHandlers",
                value: function (t) {
                    if (t) if (t.run) t.recover(); else for (var e = t.length - 1; e &gt; -1; e--) t[e] &amp;&amp; (t[e].recover(),
                        t[e] = null);
                }
            }, {
                key: "isMouseEvent",
                value: function (e) {
                    return t.MOUSE_EVENTS[e] || !1;
                }
            }]), t;
        }();
        T.MOUSE_EVENTS = {
            rightmousedown: !0,
            rightmouseup: !0,
            rightclick: !0,
            mousedown: !0,
            mouseup: !0,
            mousemove: !0,
            mouseover: !0,
            mouseout: !0,
            click: !0,
            doubleclick: !0
        };
        var k = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i(t, n, r, s) {
                return _classCallCheck(this, i), e.call(this, t, n, r, s);
            }
            return _createClass(i, [{
                key: "recover",
                value: function () {
                    this._id &gt; 0 &amp;&amp; (this._id = 0, i._pool.push(this.clear()));
                }
            }], [{
                key: "create",
                value: function (t, e) {
                    var n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, r = !(arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3]) || arguments[3];
                    return i._pool.length ? i._pool.pop().setTo(t, e, n, r) : new i(t, e, n, r);
                }
            }]), i;
        }(m);
        k._pool = [];
        var x = function () {
            function t(e) {
                _classCallCheck(this, t), this._url = t.formatURL(e), this._path = t.getPath(e);
            }
            return _createClass(t, [{
                key: "url",
                get: function () {
                    return this._url;
                }
            }, {
                key: "path",
                get: function () {
                    return this._path;
                }
            }], [{
                key: "formatURL",
                value: function (e) {
                    if (!e) return "null path";
                    if (e.indexOf(":") &gt; 0) return e;
                    if (null != t.customFormat &amp;&amp; (e = t.customFormat(e)), e.indexOf(":") &gt; 0) return e;
                    var i = e.charAt(0);
                    if ("." === i) return t._formatRelativePath(t._basePath + e);
                    if ("~" === i) return t.rootPath + e.substring(1);
                    if ("d" === i) {
                        if (0 === e.indexOf("data:image")) return e;
                    } else if ("/" === i) return e;
                    return t._basePath + e;
                }
            }, {
                key: "_formatRelativePath",
                value: function (t) {
                    for (var e = t.split("/"), i = 0, n = e.length; i &lt; n; i++) ".." == e[i] &amp;&amp; (e.splice(i - 1, 2),
                        i -= 2);
                    return e.join("/");
                }
            }, {
                key: "getPath",
                value: function (t) {
                    var e = t.lastIndexOf("/");
                    return e &gt; 0 ? t.substr(0, e + 1) : "";
                }
            }, {
                key: "getFileName",
                value: function (t) {
                    var e = t.lastIndexOf("/");
                    return e &gt; 0 ? t.substr(e + 1) : t;
                }
            }, {
                key: "getAdptedFilePath",
                value: function (e) {
                    if (!t.exportSceneToJson || !e) return e;
                    var i, n, r;
                    for (n = t._adpteTypeList.length, i = 0; i &lt; n; i++) r = t._adpteTypeList[i], e = e.replace(r[0], r[1]);
                    return e;
                }
            }, {
                key: "basePath",
                set: function (e) {
                    t._basePath = i.Laya._getUrlPath(), t._basePath = t.formatURL(e);
                },
                get: function () {
                    return t._basePath;
                }
            }]), t;
        }();
        x.version = {}, x.exportSceneToJson = !1, x._basePath = "", x.rootPath = "", x.customFormat = function (t) {
            var e = x.version[t];
            return !window.conch &amp;&amp; e &amp;&amp; (t += "?v=" + e), t;
        }, x._adpteTypeList = [[".scene3d", ".json"], [".scene", ".json"], [".taa", ".json"], [".prefab", ".json"]];
        var C = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                var t;
                return _classCallCheck(this, n), (t = e.call(this))._id = 0, t._url = null, t._cpuMemory = 0,
                    t._gpuMemory = 0, t._destroyed = !1, t._referenceCount = 0, t.lock = !1, t.name = null,
                    t._id = ++n._uniqueIDCounter, t._destroyed = !1, t._referenceCount = 0, n._idResourcesMap[t.id] = _assertThisInitialized(t),
                    t.lock = !1, t;
            }
            return _createClass(n, [{
                key: "_setCPUMemory",
                value: function (t) {
                    var e = t - this._cpuMemory;
                    this._cpuMemory = t, n._addCPUMemory(e);
                }
            }, {
                key: "_setGPUMemory",
                value: function (t) {
                    var e = t - this._gpuMemory;
                    this._gpuMemory = t, n._addGPUMemory(e);
                }
            }, {
                key: "_setCreateURL",
                value: function (t) {
                    var e;
                    (t = x.formatURL(t), this._url !== t) &amp;&amp; (this._url &amp;&amp; ((e = n._urlResourcesMap[this._url]).splice(e.indexOf(this), 1),
                        0 === e.length &amp;&amp; delete n._urlResourcesMap[this._url]), t &amp;&amp; ((e = n._urlResourcesMap[t]) || (n._urlResourcesMap[t] = e = []),
                            e.push(this)), this._url = t);
                }
            }, {
                key: "_addReference",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 1;
                    this._referenceCount += t;
                }
            }, {
                key: "_removeReference",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 1;
                    this._referenceCount -= t;
                }
            }, {
                key: "_clearReference",
                value: function () {
                    this._referenceCount = 0;
                }
            }, {
                key: "_recoverResource",
                value: function () { }
            }, {
                key: "_disposeResource",
                value: function () { }
            }, {
                key: "_activeResource",
                value: function () { }
            }, {
                key: "destroy",
                value: function () {
                    var t;
                    this._destroyed || (this._destroyed = !0, this.lock = !1, this._disposeResource(),
                        delete n._idResourcesMap[this.id], this._url &amp;&amp; ((t = n._urlResourcesMap[this._url]) &amp;&amp; (t.splice(t.indexOf(this), 1),
                            0 === t.length &amp;&amp; delete n._urlResourcesMap[this._url]), i.Loader.loadedMap[this._url] == this &amp;&amp; delete i.Loader.loadedMap[this._url]));
                }
            }, {
                key: "id",
                get: function () {
                    return this._id;
                }
            }, {
                key: "url",
                get: function () {
                    return this._url;
                }
            }, {
                key: "cpuMemory",
                get: function () {
                    return this._cpuMemory;
                }
            }, {
                key: "gpuMemory",
                get: function () {
                    return this._gpuMemory;
                }
            }, {
                key: "destroyed",
                get: function () {
                    return this._destroyed;
                }
            }, {
                key: "referenceCount",
                get: function () {
                    return this._referenceCount;
                }
            }], [{
                key: "_addCPUMemory",
                value: function (t) {
                    n._cpuMemory += t;
                }
            }, {
                key: "_addGPUMemory",
                value: function (t) {
                    n._gpuMemory += t;
                }
            }, {
                key: "_addMemory",
                value: function (t, e) {
                    n._cpuMemory += t, n._gpuMemory += e;
                }
            }, {
                key: "getResourceByID",
                value: function (t) {
                    return n._idResourcesMap[t];
                }
            }, {
                key: "getResourceByURL",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0;
                    return n._urlResourcesMap[t][e];
                }
            }, {
                key: "destroyUnusedResources",
                value: function () {
                    for (var t in n._idResourcesMap) {
                        var e = n._idResourcesMap[t];
                        e.lock || 0 !== e._referenceCount || e.destroy();
                    }
                }
            }, {
                key: "cpuMemory",
                get: function () {
                    return n._cpuMemory;
                }
            }, {
                key: "gpuMemory",
                get: function () {
                    return n._gpuMemory;
                }
            }]), n;
        }(T);
        C._uniqueIDCounter = 0, C._idResourcesMap = {}, C._urlResourcesMap = {}, C._cpuMemory = 0,
            C._gpuMemory = 0;
        var E, b, w, R = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.call(this))._width = -1, t._height = -1,
                    t;
            }
            return _createClass(i, [{
                key: "width",
                get: function () {
                    return this._width;
                },
                set: function (t) {
                    this._width = t;
                }
            }, {
                key: "height",
                get: function () {
                    return this._height;
                },
                set: function (t) {
                    this._height = t;
                }
            }]), _createClass(i, [{
                key: "_getSource",
                value: function () {
                    throw "Bitmap: must override it.";
                }
            }]), i;
        }(C);
        (E = t.FilterMode || (t.FilterMode = {}))[E.Point = 0] = "Point", E[E.Bilinear = 1] = "Bilinear",
            E[E.Trilinear = 2] = "Trilinear", (b = t.TextureFormat || (t.TextureFormat = {}))[b.R8G8B8 = 0] = "R8G8B8",
            b[b.R8G8B8A8 = 1] = "R8G8B8A8", b[b.R5G6B5 = 16] = "R5G6B5", b[b.Alpha8 = 2] = "Alpha8",
            b[b.DXT1 = 3] = "DXT1", b[b.DXT5 = 4] = "DXT5", b[b.ETC1RGB = 5] = "ETC1RGB", b[b.PVRTCRGB_2BPPV = 9] = "PVRTCRGB_2BPPV",
            b[b.PVRTCRGBA_2BPPV = 10] = "PVRTCRGBA_2BPPV", b[b.PVRTCRGB_4BPPV = 11] = "PVRTCRGB_4BPPV",
            b[b.PVRTCRGBA_4BPPV = 12] = "PVRTCRGBA_4BPPV", b[b.R32G32B32A32 = 15] = "R32G32B32A32",
            (w = t.WarpMode || (t.WarpMode = {}))[w.Repeat = 0] = "Repeat", w[w.Clamp = 1] = "Clamp";
        var A = function (e) {
            _inherits(n, e);
            var i = _createSuper(n);
            function n(e, r) {
                var s;
                return _classCallCheck(this, n), (s = i.call(this))._wrapModeU = t.WarpMode.Repeat,
                    s._wrapModeV = t.WarpMode.Repeat, s._filterMode = t.FilterMode.Bilinear, s._readyed = !1,
                    s._width = -1, s._height = -1, s._format = e, s._mipmap = r, s._anisoLevel = 1,
                    s._glTexture = y.instance.createTexture(), s;
            }
            return _createClass(n, [{
                key: "_getFormatByteCount",
                value: function () {
                    switch (this._format) {
                        case t.TextureFormat.R8G8B8:
                            return 3;

                        case t.TextureFormat.R8G8B8A8:
                            return 4;

                        case t.TextureFormat.R5G6B5:
                        case t.TextureFormat.Alpha8:
                            return 1;

                        case t.TextureFormat.R32G32B32A32:
                            return 4;

                        default:
                            throw "Texture2D: unknown format.";
                    }
                }
            }, {
                key: "_isPot",
                value: function (t) {
                    return 0 == (t &amp; t - 1);
                }
            }, {
                key: "_getGLFormat",
                value: function () {
                    var e, i = y.instance, n = y.layaGPUInstance;
                    switch (this._format) {
                        case t.TextureFormat.R8G8B8:
                        case t.TextureFormat.R5G6B5:
                            e = i.RGB;
                            break;

                        case t.TextureFormat.R8G8B8A8:
                            e = i.RGBA;
                            break;

                        case t.TextureFormat.Alpha8:
                            e = i.ALPHA;
                            break;

                        case t.TextureFormat.R32G32B32A32:
                            e = i.RGBA;
                            break;

                        case t.TextureFormat.DXT1:
                            if (!n._compressedTextureS3tc) throw "BaseTexture: not support DXT1 format.";
                            e = n._compressedTextureS3tc.COMPRESSED_RGB_S3TC_DXT1_EXT;
                            break;

                        case t.TextureFormat.DXT5:
                            if (!n._compressedTextureS3tc) throw "BaseTexture: not support DXT5 format.";
                            e = n._compressedTextureS3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT;
                            break;

                        case t.TextureFormat.ETC1RGB:
                            if (!n._compressedTextureEtc1) throw "BaseTexture: not support ETC1RGB format.";
                            e = n._compressedTextureEtc1.COMPRESSED_RGB_ETC1_WEBGL;
                            break;

                        case t.TextureFormat.PVRTCRGB_2BPPV:
                            if (!n._compressedTexturePvrtc) throw "BaseTexture: not support PVRTCRGB_2BPPV format.";
                            e = n._compressedTexturePvrtc.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;
                            break;

                        case t.TextureFormat.PVRTCRGBA_2BPPV:
                            if (!n._compressedTexturePvrtc) throw "BaseTexture: not support PVRTCRGBA_2BPPV format.";
                            e = n._compressedTexturePvrtc.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;
                            break;

                        case t.TextureFormat.PVRTCRGB_4BPPV:
                            if (!n._compressedTexturePvrtc) throw "BaseTexture: not support PVRTCRGB_4BPPV format.";
                            e = n._compressedTexturePvrtc.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
                            break;

                        case t.TextureFormat.PVRTCRGBA_4BPPV:
                            if (!n._compressedTexturePvrtc) throw "BaseTexture: not support PVRTCRGBA_4BPPV format.";
                            e = n._compressedTexturePvrtc.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
                            break;

                        default:
                            throw "BaseTexture: unknown texture format.";
                    }
                    return e;
                }
            }, {
                key: "_setFilterMode",
                value: function (e) {
                    var i = y.instance;
                    switch (g.bindTexture(i, this._glTextureType, this._glTexture), e) {
                        case t.FilterMode.Point:
                            this._mipmap ? i.texParameteri(this._glTextureType, i.TEXTURE_MIN_FILTER, i.NEAREST_MIPMAP_NEAREST) : i.texParameteri(this._glTextureType, i.TEXTURE_MIN_FILTER, i.NEAREST),
                                i.texParameteri(this._glTextureType, i.TEXTURE_MAG_FILTER, i.NEAREST);
                            break;

                        case t.FilterMode.Bilinear:
                            this._mipmap ? i.texParameteri(this._glTextureType, i.TEXTURE_MIN_FILTER, i.LINEAR_MIPMAP_NEAREST) : i.texParameteri(this._glTextureType, i.TEXTURE_MIN_FILTER, i.LINEAR),
                                i.texParameteri(this._glTextureType, i.TEXTURE_MAG_FILTER, i.LINEAR);
                            break;

                        case t.FilterMode.Trilinear:
                            this._mipmap ? i.texParameteri(this._glTextureType, i.TEXTURE_MIN_FILTER, i.LINEAR_MIPMAP_LINEAR) : i.texParameteri(this._glTextureType, i.TEXTURE_MIN_FILTER, i.LINEAR),
                                i.texParameteri(this._glTextureType, i.TEXTURE_MAG_FILTER, i.LINEAR);
                            break;

                        default:
                            throw new Error("BaseTexture:unknown filterMode value.");
                    }
                }
            }, {
                key: "_setWarpMode",
                value: function (e, i) {
                    var n = y.instance;
                    if (g.bindTexture(n, this._glTextureType, this._glTexture), this._isPot(this._width) &amp;&amp; this._isPot(this._height)) switch (i) {
                        case t.WarpMode.Repeat:
                            n.texParameteri(this._glTextureType, e, n.REPEAT);
                            break;

                        case t.WarpMode.Clamp:
                            n.texParameteri(this._glTextureType, e, n.CLAMP_TO_EDGE);
                    } else n.texParameteri(this._glTextureType, e, n.CLAMP_TO_EDGE);
                }
            }, {
                key: "_setAnisotropy",
                value: function (t) {
                    var e = y.layaGPUInstance._extTextureFilterAnisotropic;
                    if (e) {
                        t = Math.max(t, 1);
                        var i = y.instance;
                        g.bindTexture(i, this._glTextureType, this._glTexture), t = Math.min(i.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT), t),
                            i.texParameterf(this._glTextureType, e.TEXTURE_MAX_ANISOTROPY_EXT, t);
                    }
                }
            }, {
                key: "_disposeResource",
                value: function () {
                    this._glTexture &amp;&amp; (y.instance.deleteTexture(this._glTexture), this._glTexture = null,
                        this._setGPUMemory(0));
                }
            }, {
                key: "_getSource",
                value: function () {
                    return this._readyed ? this._glTexture : null;
                }
            }, {
                key: "generateMipmap",
                value: function () {
                    this._isPot(this.width) &amp;&amp; this._isPot(this.height) &amp;&amp; y.instance.generateMipmap(this._glTextureType);
                }
            }, {
                key: "mipmap",
                get: function () {
                    return this._mipmap;
                }
            }, {
                key: "format",
                get: function () {
                    return this._format;
                }
            }, {
                key: "wrapModeU",
                get: function () {
                    return this._wrapModeU;
                },
                set: function (t) {
                    this._wrapModeU !== t &amp;&amp; (this._wrapModeU = t, -1 !== this._width &amp;&amp; this._setWarpMode(y.instance.TEXTURE_WRAP_S, t));
                }
            }, {
                key: "wrapModeV",
                get: function () {
                    return this._wrapModeV;
                },
                set: function (t) {
                    this._wrapModeV !== t &amp;&amp; (this._wrapModeV = t, -1 !== this._height &amp;&amp; this._setWarpMode(y.instance.TEXTURE_WRAP_T, t));
                }
            }, {
                key: "filterMode",
                get: function () {
                    return this._filterMode;
                },
                set: function (t) {
                    t !== this._filterMode &amp;&amp; (this._filterMode = t, -1 !== this._width &amp;&amp; -1 !== this._height &amp;&amp; this._setFilterMode(t));
                }
            }, {
                key: "anisoLevel",
                get: function () {
                    return this._anisoLevel;
                },
                set: function (t) {
                    t !== this._anisoLevel &amp;&amp; (this._anisoLevel = Math.max(1, Math.min(16, t)), -1 !== this._width &amp;&amp; -1 !== this._height &amp;&amp; this._setAnisotropy(t));
                }
            }, {
                key: "mipmapCount",
                get: function () {
                    return this._mipmapCount;
                }
            }, {
                key: "defaulteTexture",
                get: function () {
                    throw "BaseTexture:must override it.";
                }
            }]), n;
        }(R);
        A._rgbmRange = 5, A.FORMAT_R8G8B8 = 0, A.FORMAT_R8G8B8A8 = 1, A.FORMAT_ALPHA8 = 2,
            A.FORMAT_DXT1 = 3, A.FORMAT_DXT5 = 4, A.FORMAT_ETC1RGB = 5, A.FORMAT_PVRTCRGB_2BPPV = 9,
            A.FORMAT_PVRTCRGBA_2BPPV = 10, A.FORMAT_PVRTCRGB_4BPPV = 11, A.FORMAT_PVRTCRGBA_4BPPV = 12,
            A.RENDERTEXTURE_FORMAT_RGBA_HALF_FLOAT = 14, A.FORMAT_R32G32B32A32 = 15, A.FORMAT_DEPTH_16 = 0,
            A.FORMAT_STENCIL_8 = 1, A.FORMAT_DEPTHSTENCIL_16_8 = 2, A.FORMAT_DEPTHSTENCIL_NONE = 3,
            A.FILTERMODE_POINT = 0, A.FILTERMODE_BILINEAR = 1, A.FILTERMODE_TRILINEAR = 2, A.WARPMODE_REPEAT = 0,
            A.WARPMODE_CLAMP = 1;
        var S = function (e) {
            _inherits(r, e);
            var n = _createSuper(r);
            function r() {
                var e, i = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, s = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, a = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : t.TextureFormat.R8G8B8A8, o = !(arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3]) || arguments[3], l = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] &amp;&amp; arguments[4];
                _classCallCheck(this, r), e = n.call(this, a, o);
                var h = y.instance;
                e._glTextureType = h.TEXTURE_2D, e._width = i, e._height = s, e._canRead = l, e._setWarpMode(h.TEXTURE_WRAP_S, e._wrapModeU),
                    e._setWarpMode(h.TEXTURE_WRAP_T, e._wrapModeV), e._setFilterMode(e._filterMode),
                    e._setAnisotropy(e._anisoLevel);
                var u = e._gpuCompressFormat();
                if (o) {
                    var c = Math.max(Math.ceil(Math.log2(i)) + 1, Math.ceil(Math.log2(s)) + 1);
                    if (!u) for (var _ = 0; _ &lt; c; _++) e._setPixels(null, _, Math.max(i &gt;&gt; _, 1), Math.max(s &gt;&gt; _, 1));
                    e._mipmapCount = c, e._setGPUMemory(i * s * 4 * (1 + 1 / 3));
                } else u || e._setPixels(null, 0, i, s), e._mipmapCount = 1, e._setGPUMemory(i * s * 4);
                return e;
            }
            return _createClass(r, [{
                key: "_gpuCompressFormat",
                value: function () {
                    return this._format == t.TextureFormat.DXT1 || this._format == t.TextureFormat.DXT5 || this._format == t.TextureFormat.ETC1RGB || this._format == t.TextureFormat.PVRTCRGB_2BPPV || this._format == t.TextureFormat.PVRTCRGBA_2BPPV || this._format == t.TextureFormat.PVRTCRGB_4BPPV || this._format == t.TextureFormat.PVRTCRGBA_4BPPV;
                }
            }, {
                key: "_setPixels",
                value: function (e, i, n, r) {
                    var s = y.instance, a = this._glTextureType, o = this._getGLFormat();
                    switch (g.bindTexture(s, a, this._glTexture), this.format) {
                        case t.TextureFormat.R8G8B8:
                            s.pixelStorei(s.UNPACK_ALIGNMENT, 1), s.texImage2D(a, i, o, n, r, 0, o, s.UNSIGNED_BYTE, e),
                                s.pixelStorei(s.UNPACK_ALIGNMENT, 4);
                            break;

                        case t.TextureFormat.R5G6B5:
                            s.pixelStorei(s.UNPACK_ALIGNMENT, 2), s.texImage2D(a, i, o, n, r, 0, o, s.UNSIGNED_SHORT_5_6_5, e),
                                s.pixelStorei(s.UNPACK_ALIGNMENT, 4);
                            break;

                        case t.TextureFormat.R32G32B32A32:
                            y.layaGPUInstance._isWebGL2 ? s.texImage2D(a, i, s.RGBA32F, n, r, 0, o, s.FLOAT, e) : s.texImage2D(a, i, s.RGBA, n, r, 0, o, s.FLOAT, e);
                            break;

                        default:
                            s.texImage2D(a, i, o, n, r, 0, o, s.UNSIGNED_BYTE, e);
                    }
                }
            }, {
                key: "_calcualatesCompressedDataSize",
                value: function (e, i, n) {
                    switch (e) {
                        case t.TextureFormat.DXT1:
                        case t.TextureFormat.ETC1RGB:
                            return (i + 3 &gt;&gt; 2) * (n + 3 &gt;&gt; 2) * 8;

                        case t.TextureFormat.DXT5:
                            return (i + 3 &gt;&gt; 2) * (n + 3 &gt;&gt; 2) * 16;

                        case t.TextureFormat.PVRTCRGB_4BPPV:
                        case t.TextureFormat.PVRTCRGBA_4BPPV:
                            return Math.floor((Math.max(i, 8) * Math.max(n, 8) * 4 + 7) / 8);

                        case t.TextureFormat.PVRTCRGB_2BPPV:
                        case t.TextureFormat.PVRTCRGBA_2BPPV:
                            return Math.floor((Math.max(i, 16) * Math.max(n, 8) * 2 + 7) / 8);

                        default:
                            return 0;
                    }
                }
            }, {
                key: "_pharseDDS",
                value: function (e) {
                    var i = new Int32Array(e, 0, 31);
                    if (542327876 != i[0]) throw "Invalid magic number in DDS header";
                    if (!(4 &amp; i[20])) throw "Unsupported format, must contain a FourCC code";
                    var n = i[21];
                    switch (this._format) {
                        case t.TextureFormat.DXT1:
                            if (827611204 !== n) throw "the FourCC code is not same with texture format.";
                            break;

                        case t.TextureFormat.DXT5:
                            if (894720068 !== n) throw "the FourCC code is not same with texture format.";
                            break;

                        default:
                            throw "unknown texture format.";
                    }
                    var r = 1;
                    if (131072 &amp; i[2]) {
                        if (r = Math.max(1, i[7]), !this._mipmap) throw "the mipmap is not same with Texture2D.";
                    } else if (this._mipmap) throw "the mipmap is not same with Texture2D.";
                    var s = i[4], a = i[3];
                    this._width = s, this._height = a;
                    var o = i[1] + 4;
                    this._upLoadCompressedTexImage2D(e, s, a, r, o, 0);
                }
            }, {
                key: "_pharseKTX",
                value: function (e) {
                    var i = new Uint8Array(e, 0, 12);
                    if (171 != i[0] || 75 != i[1] || 84 != i[2] || 88 != i[3] || 32 != i[4] || 49 != i[5] || 49 != i[6] || 187 != i[7] || 13 != i[8] || 10 != i[9] || 26 != i[10] || 10 != i[11]) throw "Invalid fileIdentifier in KTX header";
                    var n = new Int32Array(i.buffer, i.length, 13);
                    switch (n[4]) {
                        case y.layaGPUInstance._compressedTextureEtc1.COMPRESSED_RGB_ETC1_WEBGL:
                            this._format = t.TextureFormat.ETC1RGB;
                            break;

                        default:
                            throw "unknown texture format.";
                    }
                    var r = n[11], s = n[6], a = n[7];
                    this._width = s, this._height = a;
                    var o = 64 + n[12];
                    this._upLoadCompressedTexImage2D(e, s, a, r, o, 4);
                }
            }, {
                key: "_pharsePVR",
                value: function (e) {
                    var i = new Int32Array(e, 0, 13);
                    if (55727696 != i[0]) throw "Invalid magic number in PVR header";
                    switch (i[2]) {
                        case 0:
                            this._format = t.TextureFormat.PVRTCRGB_2BPPV;
                            break;

                        case 2:
                            this._format = t.TextureFormat.PVRTCRGB_4BPPV;
                            break;

                        case 1:
                            this._format = t.TextureFormat.PVRTCRGBA_2BPPV;
                            break;

                        case 3:
                            this._format = t.TextureFormat.PVRTCRGBA_4BPPV;
                            break;

                        default:
                            throw "Texture2D:unknown PVR format.";
                    }
                    var n = i[11], r = i[7], s = i[6];
                    this._width = r, this._height = s;
                    var a = i[12] + 52;
                    this._upLoadCompressedTexImage2D(e, r, s, n, a, 0);
                }
            }, {
                key: "_upLoadCompressedTexImage2D",
                value: function (t, e, i, n, r, s) {
                    var a = y.instance, o = this._glTextureType;
                    g.bindTexture(a, o, this._glTexture);
                    for (var l = this._getGLFormat(), h = r, u = 0; u &lt; n; u++) {
                        h += s;
                        var c = this._calcualatesCompressedDataSize(this._format, e, i), _ = new Uint8Array(t, h, c);
                        a.compressedTexImage2D(o, u, l, e, i, 0, _), e = Math.max(e &gt;&gt; 1, 1), i = Math.max(i &gt;&gt; 1, 1),
                            h += c;
                    }
                    var d = h;
                    this._setGPUMemory(d), this._readyed = !0, this._activeResource();
                }
            }, {
                key: "loadImageSource",
                value: function (e) {
                    var n = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1], r = y.instance, s = e.width, a = e.height;
                    this._width = s, this._height = a, this._isPot(s) &amp;&amp; this._isPot(a) || (this._mipmap = !1),
                        this._setWarpMode(r.TEXTURE_WRAP_S, this._wrapModeU), this._setWarpMode(r.TEXTURE_WRAP_T, this._wrapModeV),
                        this._setFilterMode(this._filterMode), g.bindTexture(r, this._glTextureType, this._glTexture);
                    var o = this._getGLFormat();
                    i.Render.isConchApp ? (e.setPremultiplyAlpha &amp;&amp; e.setPremultiplyAlpha(n), r.texImage2D(this._glTextureType, 0, r.RGBA, r.RGBA, r.UNSIGNED_BYTE, e)) : (n &amp;&amp; r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0),
                        this.format == t.TextureFormat.R5G6B5 ? r.texImage2D(this._glTextureType, 0, r.RGB, r.RGB, r.UNSIGNED_SHORT_5_6_5, e) : r.texImage2D(this._glTextureType, 0, o, o, r.UNSIGNED_BYTE, e),
                        n &amp;&amp; r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1)), this._mipmap ? (r.generateMipmap(this._glTextureType),
                            this._setGPUMemory(s * a * 4 * (1 + 1 / 3))) : this._setGPUMemory(s * a * 4), this._canRead &amp;&amp; (i.Render.isConchApp ? this._pixels = new Uint8Array(e._nativeObj.getImageData(0, 0, s, a)) : (i.Browser.canvas.size(s, a),
                                i.Browser.canvas.clear(), i.Browser.context.drawImage(e, 0, 0, s, a), this._pixels = new Uint8Array(i.Browser.context.getImageData(0, 0, s, a).data.buffer))),
                        this._readyed = !0, this._activeResource();
                }
            }, {
                key: "setPixels",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0;
                    if (this._gpuCompressFormat()) throw "Texture2D:the format is GPU compression format.";
                    if (!t) throw "Texture2D:pixels can't be null.";
                    var i = Math.max(this._width &gt;&gt; e, 1), n = Math.max(this._height &gt;&gt; e, 1), r = i * n * this._getFormatByteCount();
                    if (t.length &lt; r) throw "Texture2D:pixels length should at least " + r + ".";
                    this._setPixels(t, e, i, n), this._canRead &amp;&amp; (this._pixels = t), this._readyed = !0,
                        this._activeResource();
                }
            }, {
                key: "setSubPixels",
                value: function (e, i, n, r, s) {
                    var a = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 0;
                    if (this._gpuCompressFormat()) throw "Texture2D:the format is GPU compression format.";
                    if (!s) throw "Texture2D:pixels can't be null.";
                    var o = y.instance, l = this._glTextureType;
                    g.bindTexture(o, l, this._glTexture);
                    var h = this._getGLFormat();
                    switch (this.format) {
                        case t.TextureFormat.R8G8B8:
                            o.pixelStorei(o.UNPACK_ALIGNMENT, 1), o.texSubImage2D(l, a, e, i, n, r, h, o.UNSIGNED_BYTE, s),
                                o.pixelStorei(o.UNPACK_ALIGNMENT, 4);
                            break;

                        case t.TextureFormat.R5G6B5:
                            o.pixelStorei(o.UNPACK_ALIGNMENT, 2), o.texSubImage2D(l, a, e, i, n, r, h, o.UNSIGNED_SHORT_5_6_5, s),
                                o.pixelStorei(o.UNPACK_ALIGNMENT, 4);
                            break;

                        case t.TextureFormat.R32G32B32A32:
                            o.texSubImage2D(l, a, e, i, n, r, h, o.FLOAT, s);
                            break;

                        default:
                            o.texSubImage2D(l, a, e, i, n, r, h, o.UNSIGNED_BYTE, s);
                    }
                    this._readyed = !0, this._activeResource();
                }
            }, {
                key: "setCompressData",
                value: function (e) {
                    switch (this._format) {
                        case t.TextureFormat.DXT1:
                        case t.TextureFormat.DXT5:
                            this._pharseDDS(e);
                            break;

                        case t.TextureFormat.ETC1RGB:
                            this._pharseKTX(e);
                            break;

                        case t.TextureFormat.PVRTCRGB_2BPPV:
                        case t.TextureFormat.PVRTCRGBA_2BPPV:
                        case t.TextureFormat.PVRTCRGB_4BPPV:
                        case t.TextureFormat.PVRTCRGBA_4BPPV:
                            this._pharsePVR(e);
                            break;

                        default:
                            throw "Texture2D:unkonwn format.";
                    }
                }
            }, {
                key: "getPixels",
                value: function () {
                    if (this._canRead) return this._pixels;
                    throw new Error("Texture2D: must set texture canRead is true.");
                }
            }, {
                key: "defaulteTexture",
                get: function () {
                    return r.grayTexture;
                }
            }], [{
                key: "__init__",
                value: function () {
                    var e = new Uint8Array(3);
                    e[0] = 128, e[1] = 128, e[2] = 128, r.grayTexture = new r(1, 1, t.TextureFormat.R8G8B8, !1, !1),
                        r.grayTexture.setPixels(e), r.grayTexture.lock = !0, e[0] = 255, e[1] = 255, e[2] = 255,
                        r.whiteTexture = new r(1, 1, t.TextureFormat.R8G8B8, !1, !1), r.whiteTexture.setPixels(e),
                        r.whiteTexture.lock = !0, e[0] = 0, e[1] = 0, e[2] = 0, r.blackTexture = new r(1, 1, t.TextureFormat.R8G8B8, !1, !1),
                        r.blackTexture.setPixels(e), r.blackTexture.lock = !0;
                }
            }, {
                key: "_parse",
                value: function (e) {
                    var i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, s = n ? new r(n[0], n[1], n[2], n[3], n[4]) : new r(0, 0);
                    switch (i &amp;&amp; (s.wrapModeU = i.wrapModeU, s.wrapModeV = i.wrapModeV, s.filterMode = i.filterMode,
                        s.anisoLevel = i.anisoLevel), s._format) {
                        case t.TextureFormat.R8G8B8:
                        case t.TextureFormat.R8G8B8A8:
                            s.loadImageSource(e);
                            break;

                        case t.TextureFormat.DXT1:
                        case t.TextureFormat.DXT5:
                        case t.TextureFormat.ETC1RGB:
                        case t.TextureFormat.PVRTCRGB_2BPPV:
                        case t.TextureFormat.PVRTCRGBA_2BPPV:
                        case t.TextureFormat.PVRTCRGB_4BPPV:
                        case t.TextureFormat.PVRTCRGBA_4BPPV:
                            s.setCompressData(e);
                            break;

                        default:
                            throw "Texture2D:unkonwn format.";
                    }
                    return s;
                }
            }, {
                key: "load",
                value: function (t, e) {
                    i.loader.create(t, e, null, i.Loader.TEXTURE2D);
                }
            }]), r;
        }(A);
        S.TEXTURE2D = "TEXTURE2D", S.grayTexture = null, S.whiteTexture = null, S.blackTexture = null;
        var M, I, P = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                return _classCallCheck(this, i), e.call(this);
            }
            return i;
        }(C), L = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "mat2MatArray",
                value: function (e, i) {
                    var n = e, r = i;
                    return r[0] = n.a, r[1] = n.b, r[2] = t.EMPTYMAT4_ARRAY[2], r[3] = t.EMPTYMAT4_ARRAY[3],
                        r[4] = n.c, r[5] = n.d, r[6] = t.EMPTYMAT4_ARRAY[6], r[7] = t.EMPTYMAT4_ARRAY[7],
                        r[8] = t.EMPTYMAT4_ARRAY[8], r[9] = t.EMPTYMAT4_ARRAY[9], r[10] = t.EMPTYMAT4_ARRAY[10],
                        r[11] = t.EMPTYMAT4_ARRAY[11], r[12] = n.tx, r[13] = n.ty, r[14] = t.EMPTYMAT4_ARRAY[14],
                        r[15] = t.EMPTYMAT4_ARRAY[15], i;
                }
            }, {
                key: "restoreTempArray",
                value: function () {
                    t.TEMPMAT4_ARRAY[0] = 1, t.TEMPMAT4_ARRAY[1] = 0, t.TEMPMAT4_ARRAY[4] = 0, t.TEMPMAT4_ARRAY[5] = 1,
                        t.TEMPMAT4_ARRAY[12] = 0, t.TEMPMAT4_ARRAY[13] = 0;
                }
            }, {
                key: "clear",
                value: function () {
                    t.worldScissorTest = !1, t.worldAlpha = 1;
                }
            }]), t;
        }();
        L._MAXSIZE = 99999999, L.EMPTYMAT4_ARRAY = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
            L.TEMPMAT4_ARRAY = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], L.worldMatrix4 = L.TEMPMAT4_ARRAY,
            L.worldMatrix = new f(), L.matWVP = null, L.worldAlpha = 1, L.worldScissorTest = !1,
            L.width = 0, L.height = 0, (M = t.RenderTextureFormat || (t.RenderTextureFormat = {}))[M.R8G8B8 = 0] = "R8G8B8",
            M[M.R8G8B8A8 = 1] = "R8G8B8A8", M[M.Alpha8 = 2] = "Alpha8", M[M.R16G16B16A16 = 14] = "R16G16B16A16",
            M[M.Depth = 15] = "Depth", M[M.ShadowMap = 16] = "ShadowMap", (I = t.RenderTextureDepthFormat || (t.RenderTextureDepthFormat = {}))[I.DEPTH_16 = 0] = "DEPTH_16",
            I[I.STENCIL_8 = 1] = "STENCIL_8", I[I.DEPTHSTENCIL_24_8 = 2] = "DEPTHSTENCIL_24_8",
            I[I.DEPTHSTENCIL_NONE = 3] = "DEPTHSTENCIL_NONE", I[I.DEPTHSTENCIL_16_8 = 2] = "DEPTHSTENCIL_16_8";
        var D = function (e) {
            _inherits(r, e);
            var n = _createSuper(r);
            function r(e, i) {
                var s, a = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : t.RenderTextureFormat.R8G8B8, o = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : t.RenderTextureDepthFormat.DEPTH_16;
                return _classCallCheck(this, r), (s = n.call(this, a, !1))._mgrKey = 0, s._glTextureType = y.instance.TEXTURE_2D,
                    s._width = e, s._height = i, s._depthStencilFormat = o, s._create(e, i), s.lock = !0,
                    s;
            }
            return _createClass(r, [{
                key: "getIsReady",
                value: function () {
                    return !0;
                }
            }, {
                key: "_create",
                value: function (e, i) {
                    var n = y.instance;
                    this._frameBuffer = n.createFramebuffer(), g.bindTexture(n, this._glTextureType, this._glTexture);
                    var r = this._getGLFormat();
                    if (n.texImage2D(this._glTextureType, 0, r, e, i, 0, r, n.UNSIGNED_BYTE, null),
                        this._setGPUMemory(e * i * 4), n.bindFramebuffer(n.FRAMEBUFFER, this._frameBuffer),
                        n.framebufferTexture2D(n.FRAMEBUFFER, n.COLOR_ATTACHMENT0, n.TEXTURE_2D, this._glTexture, 0),
                        this._depthStencilFormat !== t.RenderTextureDepthFormat.DEPTHSTENCIL_NONE) switch (this._depthStencilBuffer = n.createRenderbuffer(),
                        n.bindRenderbuffer(n.RENDERBUFFER, this._depthStencilBuffer), this._depthStencilFormat) {
                            case t.RenderTextureDepthFormat.DEPTH_16:
                                n.renderbufferStorage(n.RENDERBUFFER, n.DEPTH_COMPONENT16, e, i), n.framebufferRenderbuffer(n.FRAMEBUFFER, n.DEPTH_ATTACHMENT, n.RENDERBUFFER, this._depthStencilBuffer);
                                break;

                            case t.RenderTextureDepthFormat.STENCIL_8:
                                n.renderbufferStorage(n.RENDERBUFFER, n.STENCIL_INDEX8, e, i), n.framebufferRenderbuffer(n.FRAMEBUFFER, n.STENCIL_ATTACHMENT, n.RENDERBUFFER, this._depthStencilBuffer);
                                break;

                            case t.RenderTextureDepthFormat.DEPTHSTENCIL_24_8:
                                n.renderbufferStorage(n.RENDERBUFFER, n.DEPTH_STENCIL, e, i), n.framebufferRenderbuffer(n.FRAMEBUFFER, n.DEPTH_STENCIL_ATTACHMENT, n.RENDERBUFFER, this._depthStencilBuffer);
                        }
                    n.bindFramebuffer(n.FRAMEBUFFER, null), n.bindRenderbuffer(n.RENDERBUFFER, null),
                        this._setWarpMode(n.TEXTURE_WRAP_S, this._wrapModeU), this._setWarpMode(n.TEXTURE_WRAP_T, this._wrapModeV),
                        this._setFilterMode(this._filterMode), this._setAnisotropy(this._anisoLevel), this._readyed = !0,
                        this._activeResource();
                }
            }, {
                key: "generateMipmap",
                value: function () {
                    this._isPot(this.width) &amp;&amp; this._isPot(this.height) ? (this._mipmap = !0, y.instance.generateMipmap(this._glTextureType),
                        this._setFilterMode(this._filterMode), this._setGPUMemory(this.width * this.height * 4 * (1 + 1 / 3))) : (this._mipmap = !1,
                            this._setGPUMemory(this.width * this.height * 4));
                }
            }, {
                key: "start",
                value: function () {
                    var t = y.instance;
                    y.instance.bindFramebuffer(t.FRAMEBUFFER, this._frameBuffer), this._lastRT = r._currentActive,
                        r._currentActive = this, this._readyed = !0, t.viewport(0, 0, this._width, this._height),
                        this._lastWidth = L.width, this._lastHeight = L.height, L.width = this._width, L.height = this._height,
                        P.activeShader = null;
                }
            }, {
                key: "end",
                value: function () {
                    var t = y.instance;
                    t.bindFramebuffer(t.FRAMEBUFFER, null), r._currentActive = null, this._readyed = !0;
                }
            }, {
                key: "restore",
                value: function () {
                    var t = y.instance;
                    this._lastRT != r._currentActive &amp;&amp; (y.instance.bindFramebuffer(t.FRAMEBUFFER, this._lastRT ? this._lastRT._frameBuffer : null),
                        r._currentActive = this._lastRT), this._readyed = !0, t.viewport(0, 0, this._lastWidth, this._lastHeight),
                        L.width = this._lastWidth, L.height = this._lastHeight, P.activeShader = null;
                }
            }, {
                key: "clear",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0, n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 1, r = y.instance;
                    r.clearColor(t, e, i, n);
                    var s = r.COLOR_BUFFER_BIT;
                    switch (this._depthStencilFormat) {
                        case r.DEPTH_COMPONENT16:
                            s |= r.DEPTH_BUFFER_BIT;
                            break;

                        case r.STENCIL_INDEX8:
                            s |= r.STENCIL_BUFFER_BIT;
                            break;

                        case r.DEPTH_STENCIL:
                            s |= r.DEPTH_BUFFER_BIT, s |= r.STENCIL_BUFFER_BIT;
                    }
                    r.clear(s);
                }
            }, {
                key: "getData",
                value: function (t, e, n, r) {
                    if (i.Render.isConchApp &amp;&amp; 2 == window.conchConfig.threadMode) throw "native 2 thread mode use getDataAsync";
                    var s = y.instance;
                    if (s.bindFramebuffer(s.FRAMEBUFFER, this._frameBuffer), !(s.checkFramebufferStatus(s.FRAMEBUFFER) === s.FRAMEBUFFER_COMPLETE)) return s.bindFramebuffer(s.FRAMEBUFFER, null),
                        null;
                    var a = new Uint8Array(this._width * this._height * 4), o = this._getGLFormat();
                    return s.readPixels(t, e, n, r, o, s.UNSIGNED_BYTE, a), s.bindFramebuffer(s.FRAMEBUFFER, null),
                        a;
                }
            }, {
                key: "getDataAsync",
                value: function (t, e, i, n, r) {
                    var s = y.instance;
                    s.bindFramebuffer(s.FRAMEBUFFER, this._frameBuffer), s.readPixelsAsync(t, e, i, n, s.RGBA, s.UNSIGNED_BYTE, function (t) {
                        r(new Uint8Array(t));
                    }), s.bindFramebuffer(s.FRAMEBUFFER, null);
                }
            }, {
                key: "recycle",
                value: function () { }
            }, {
                key: "_disposeResource",
                value: function () {
                    if (this._frameBuffer) {
                        var t = y.instance;
                        t.deleteTexture(this._glTexture), t.deleteFramebuffer(this._frameBuffer), t.deleteRenderbuffer(this._depthStencilBuffer),
                            this._glTexture = null, this._frameBuffer = null, this._depthStencilBuffer = null,
                            this._setGPUMemory(0);
                    }
                }
            }, {
                key: "depthStencilFormat",
                get: function () {
                    return this._depthStencilFormat;
                }
            }, {
                key: "defaulteTexture",
                get: function () {
                    return S.grayTexture;
                }
            }, {
                key: "sourceWidth",
                get: function () {
                    return this._width;
                }
            }, {
                key: "sourceHeight",
                get: function () {
                    return this._height;
                }
            }, {
                key: "offsetX",
                get: function () {
                    return 0;
                }
            }, {
                key: "offsetY",
                get: function () {
                    return 0;
                }
            }], [{
                key: "pushRT",
                value: function () {
                    r.rtStack.push({
                        rt: r._currentActive,
                        w: L.width,
                        h: L.height
                    });
                }
            }, {
                key: "popRT",
                value: function () {
                    var t = y.instance, e = r.rtStack.pop();
                    e &amp;&amp; (r._currentActive != e.rt &amp;&amp; (y.instance.bindFramebuffer(t.FRAMEBUFFER, e.rt ? e.rt._frameBuffer : null),
                        r._currentActive = e.rt), t.viewport(0, 0, e.w, e.h), L.width = e.w, L.height = e.h);
                }
            }, {
                key: "currentActive",
                get: function () {
                    return r._currentActive;
                }
            }]), r;
        }(A);
        D.rtStack = [], D.defuv = [0, 0, 1, 0, 1, 1, 0, 1], D.flipyuv = [0, 1, 1, 1, 1, 0, 0, 0];
        var O = function () {
            function e() {
                _classCallCheck(this, e);
            }
            return _createClass(e, null, [{
                key: "getRT",
                value: function (e, i) {
                    return i |= 0, (e |= 0) &gt;= 1e4 &amp;&amp; console.error("getRT error! w too big"), new D(e, i, t.RenderTextureFormat.R8G8B8A8, -1);
                }
            }, {
                key: "releaseRT",
                value: function (t) {
                    t.destroy();
                }
            }]), e;
        }();
        O.dict = {};
        var B = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "_init_",
                value: function (e) {
                    t.fns = [t.BlendNormal, t.BlendAdd, t.BlendMultiply, t.BlendScreen, t.BlendOverlay, t.BlendLight, t.BlendMask, t.BlendDestinationOut],
                        t.targetFns = [t.BlendNormalTarget, t.BlendAddTarget, t.BlendMultiplyTarget, t.BlendScreenTarget, t.BlendOverlayTarget, t.BlendLightTarget, t.BlendMask, t.BlendDestinationOut];
                }
            }, {
                key: "BlendNormal",
                value: function (t) {
                    g.setBlendFunc(t, t.ONE, t.ONE_MINUS_SRC_ALPHA, !0);
                }
            }, {
                key: "BlendAdd",
                value: function (t) {
                    g.setBlendFunc(t, t.ONE, t.DST_ALPHA, !0);
                }
            }, {
                key: "BlendMultiply",
                value: function (t) {
                    g.setBlendFunc(t, t.DST_COLOR, t.ONE_MINUS_SRC_ALPHA, !0);
                }
            }, {
                key: "BlendScreen",
                value: function (t) {
                    g.setBlendFunc(t, t.ONE, t.ONE, !0);
                }
            }, {
                key: "BlendOverlay",
                value: function (t) {
                    g.setBlendFunc(t, t.ONE, t.ONE_MINUS_SRC_COLOR, !0);
                }
            }, {
                key: "BlendLight",
                value: function (t) {
                    g.setBlendFunc(t, t.ONE, t.ONE, !0);
                }
            }, {
                key: "BlendNormalTarget",
                value: function (t) {
                    g.setBlendFunc(t, t.ONE, t.ONE_MINUS_SRC_ALPHA, !0);
                }
            }, {
                key: "BlendAddTarget",
                value: function (t) {
                    g.setBlendFunc(t, t.ONE, t.DST_ALPHA, !0);
                }
            }, {
                key: "BlendMultiplyTarget",
                value: function (t) {
                    g.setBlendFunc(t, t.DST_COLOR, t.ONE_MINUS_SRC_ALPHA, !0);
                }
            }, {
                key: "BlendScreenTarget",
                value: function (t) {
                    g.setBlendFunc(t, t.ONE, t.ONE, !0);
                }
            }, {
                key: "BlendOverlayTarget",
                value: function (t) {
                    g.setBlendFunc(t, t.ONE, t.ONE_MINUS_SRC_COLOR, !0);
                }
            }, {
                key: "BlendLightTarget",
                value: function (t) {
                    g.setBlendFunc(t, t.ONE, t.ONE, !0);
                }
            }, {
                key: "BlendMask",
                value: function (t) {
                    g.setBlendFunc(t, t.ZERO, t.SRC_ALPHA, !0);
                }
            }, {
                key: "BlendDestinationOut",
                value: function (t) {
                    g.setBlendFunc(t, t.ZERO, t.ZERO, !0);
                }
            }]), t;
        }();
        B.activeBlendFunction = null, B.NAMES = ["normal", "add", "multiply", "screen", "overlay", "light", "mask", "destination-out"],
            B.TOINT = {
                normal: 0,
                add: 1,
                multiply: 2,
                screen: 3,
                overlay: 4,
                light: 5,
                mask: 6,
                "destination-out": 7,
                lighter: 1
            }, B.NORMAL = "normal", B.ADD = "add", B.MULTIPLY = "multiply", B.SCREEN = "screen",
            B.OVERLAY = "overlay", B.LIGHT = "light", B.MASK = "mask", B.DESTINATIONOUT = "destination-out",
            B.LIGHTER = "lighter", B.fns = [], B.targetFns = [];
        var F = function () {
            function t(e, i, n) {
                _classCallCheck(this, t), this._value = 0, this._name2int = e, this._int2name = i,
                    this._int2nameMap = n;
            }
            return _createClass(t, [{
                key: "add",
                value: function (t) {
                    return this._value |= "string" == typeof t ? this._name2int[t] : t, this._value;
                }
            }, {
                key: "addInt",
                value: function (t) {
                    return this._value |= t, this._value;
                }
            }, {
                key: "remove",
                value: function (t) {
                    return this._value &amp;= "string" == typeof t ? ~this._name2int[t] : ~t, this._value;
                }
            }, {
                key: "isDefine",
                value: function (t) {
                    return (this._value &amp; t) === t;
                }
            }, {
                key: "getValue",
                value: function () {
                    return this._value;
                }
            }, {
                key: "setValue",
                value: function (t) {
                    this._value = t;
                }
            }, {
                key: "toNameDic",
                value: function () {
                    var e = this._int2nameMap[this._value];
                    return e || t._toText(this._value, this._int2name, this._int2nameMap);
                }
            }], [{
                key: "_reg",
                value: function (t, e, i, n) {
                    i[t] = e, n[e] = t;
                }
            }, {
                key: "_toText",
                value: function (t, e, i) {
                    var n = i[t];
                    if (n) return n;
                    for (var r = {}, s = 1, a = 0; a &lt; 32 &amp;&amp; !((s = 1 &lt;&lt; a) &gt; t); a++) if (t &amp; s) {
                        var o = e[s];
                        o &amp;&amp; (r[o] = "");
                    }
                    return i[t] = r, r;
                }
            }, {
                key: "_toInt",
                value: function (t, e) {
                    for (var i = t.split("."), n = 0, r = 0, s = i.length; r &lt; s; r++) {
                        var a = e[i[r]];
                        if (!a) throw new Error("Defines to int err:" + t + "/" + i[r]);
                        n |= a;
                    }
                    return n;
                }
            }]), t;
        }(), N = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                return _classCallCheck(this, i), e.call(this, i.__name2int, i.__int2name, i.__int2nameMap);
            }
            return _createClass(i, null, [{
                key: "__init__",
                value: function () {
                    i.reg("TEXTURE2D", i.TEXTURE2D), i.reg("PRIMITIVE", i.PRIMITIVE), i.reg("GLOW_FILTER", i.FILTERGLOW),
                        i.reg("BLUR_FILTER", i.FILTERBLUR), i.reg("COLOR_FILTER", i.FILTERCOLOR), i.reg("COLOR_ADD", i.COLORADD),
                        i.reg("WORLDMAT", i.WORLDMAT), i.reg("FILLTEXTURE", i.FILLTEXTURE), i.reg("MVP3D", i.MVP3D);
                }
            }, {
                key: "reg",
                value: function (t, e) {
                    this._reg(t, e, i.__name2int, i.__int2name);
                }
            }, {
                key: "toText",
                value: function (t, e, i) {
                    return this._toText(t, e, i);
                }
            }, {
                key: "toInt",
                value: function (t) {
                    return this._toInt(t, i.__name2int);
                }
            }]), i;
        }(F);
        N.TEXTURE2D = 1, N.PRIMITIVE = 4, N.FILTERGLOW = 8, N.FILTERBLUR = 16, N.FILTERCOLOR = 32,
            N.COLORADD = 64, N.WORLDMAT = 128, N.FILLTEXTURE = 256, N.SKINMESH = 512, N.MVP3D = 2048,
            N.NOOPTMASK = N.FILTERGLOW | N.FILTERBLUR | N.FILTERCOLOR | N.FILLTEXTURE, N.__name2int = {},
            N.__int2name = [], N.__int2nameMap = [];
        var U = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "show",
                value: function () {
                    var e = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0;
                    t._StatRender.show(e, i);
                }
            }, {
                key: "enable",
                value: function () {
                    t._StatRender.enable();
                }
            }, {
                key: "hide",
                value: function () {
                    t._StatRender.hide();
                }
            }, {
                key: "clear",
                value: function () {
                    t.trianglesFaces = t.renderBatches = t.savedRenderBatches = t.shaderCall = t.spriteRenderUseCacheCount = t.frustumCulling = t.octreeNodeCulling = t.canvasNormal = t.canvasBitmap = t.canvasReCache = 0;
                }
            }, {
                key: "onclick",
                set: function (e) {
                    t._StatRender.set_onclick(e);
                }
            }]), t;
        }();
        U.FPS = 0, U.loopCount = 0, U.shaderCall = 0, U.renderBatches = 0, U.savedRenderBatches = 0,
            U.trianglesFaces = 0, U.spriteCount = 0, U.spriteRenderUseCacheCount = 0, U.frustumCulling = 0,
            U.octreeNodeCulling = 0, U.canvasNormal = 0, U.canvasBitmap = 0, U.canvasReCache = 0,
            U.renderSlow = !1, U._fpsData = [], U._timer = 0, U._count = 0, U._StatRender = null;
        var G = function () {
            function t() {
                _classCallCheck(this, t), this._strsToID = {}, this._idToStrs = [], this._length = 0;
            }
            return _createClass(t, [{
                key: "add",
                value: function (t) {
                    var e = this._strsToID[t];
                    return null != e ? e : (this._idToStrs[this._length] = t, this._strsToID[t] = this._length++);
                }
            }, {
                key: "getID",
                value: function (t) {
                    var e = this._strsToID[t];
                    return null == e ? -1 : e;
                }
            }, {
                key: "getName",
                value: function (t) {
                    var e = this._idToStrs[t];
                    return null == e ? void 0 : e;
                }
            }]), t;
        }(), W = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n(t, i) {
                var r, s = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, a = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, o = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null;
                if (_classCallCheck(this, n), (r = e.call(this))._attribInfo = null, r.customCompile = !1,
                    r._curActTexIndex = 0, r.tag = {}, r._program = null, r._params = null, r._paramsMap = {},
                    !t || !i) throw "Shader Error";
                return r._attribInfo = o, r._id = ++n._count, r._vs = t, r._ps = i, r._nameMap = a || {},
                    null != s &amp;&amp; (n.sharders[s] = _assertThisInitialized(r)), r.recreateResource(),
                    r.lock = !0, r;
            }
            return _createClass(n, [{
                key: "recreateResource",
                value: function () {
                    this._compile(), this._setGPUMemory(0);
                }
            }, {
                key: "_disposeResource",
                value: function () {
                    g.mainContext.deleteShader(this._vshader), g.mainContext.deleteShader(this._pshader),
                        g.mainContext.deleteProgram(this._program), this._vshader = this._pshader = this._program = null,
                        this._params = null, this._paramsMap = {}, this._setGPUMemory(0), this._curActTexIndex = 0;
                }
            }, {
                key: "_compile",
                value: function () {
                    if (this._vs &amp;&amp; this._ps &amp;&amp; !this._params) {
                        var t;
                        this._reCompile = !0, this._params = [], this.customCompile &amp;&amp; (t = i.ShaderCompile.preGetParams(this._vs, this._ps));
                        var e, r, s, a = g.mainContext;
                        this._program = a.createProgram(), this._vshader = n._createShader(a, this._vs, a.VERTEX_SHADER),
                            this._pshader = n._createShader(a, this._ps, a.FRAGMENT_SHADER), a.attachShader(this._program, this._vshader),
                            a.attachShader(this._program, this._pshader);
                        var o = this._attribInfo ? this._attribInfo.length : 0;
                        for (r = 0; r &lt; o; r += 2) a.bindAttribLocation(this._program, this._attribInfo[r + 1], this._attribInfo[r]);
                        if (a.linkProgram(this._program), !this.customCompile &amp;&amp; !a.getProgramParameter(this._program, a.LINK_STATUS)) throw a.getProgramInfoLog(this._program);
                        var l = this.customCompile ? t.uniforms.length : a.getProgramParameter(this._program, a.ACTIVE_UNIFORMS);
                        for (r = 0; r &lt; l; r++) {
                            var h = this.customCompile ? t.uniforms[r] : a.getActiveUniform(this._program, r);
                            (e = {
                                vartype: "uniform",
                                glfun: null,
                                ivartype: 1,
                                location: a.getUniformLocation(this._program, h.name),
                                name: h.name,
                                type: h.type,
                                isArray: !1,
                                isSame: !1,
                                preValue: null,
                                indexOfParams: 0
                            }).name.indexOf("[0]") &gt; 0 &amp;&amp; (e.name = e.name.substr(0, e.name.length - 3), e.isArray = !0,
                                e.location = a.getUniformLocation(this._program, e.name)), this._params.push(e);
                        }
                        for (r = 0, s = this._params.length; r &lt; s; r++) switch ((e = this._params[r]).indexOfParams = r,
                            e.index = 1, e.value = [e.location, null], e.codename = e.name, e.name = this._nameMap[e.codename] ? this._nameMap[e.codename] : e.codename,
                            this._paramsMap[e.name] = e, e._this = this, e.uploadedValue = [], e.type) {
                                case a.INT:
                                    e.fun = e.isArray ? this._uniform1iv : this._uniform1i;
                                    break;

                                case a.FLOAT:
                                    e.fun = e.isArray ? this._uniform1fv : this._uniform1f;
                                    break;

                                case a.FLOAT_VEC2:
                                    e.fun = e.isArray ? this._uniform_vec2v : this._uniform_vec2;
                                    break;

                                case a.FLOAT_VEC3:
                                    e.fun = e.isArray ? this._uniform_vec3v : this._uniform_vec3;
                                    break;

                                case a.FLOAT_VEC4:
                                    e.fun = e.isArray ? this._uniform_vec4v : this._uniform_vec4;
                                    break;

                                case a.SAMPLER_2D:
                                    e.fun = this._uniform_sampler2D;
                                    break;

                                case a.SAMPLER_CUBE:
                                    e.fun = this._uniform_samplerCube;
                                    break;

                                case a.FLOAT_MAT4:
                                    e.glfun = a.uniformMatrix4fv, e.fun = this._uniformMatrix4fv;
                                    break;

                                case a.BOOL:
                                    e.fun = this._uniform1i;
                                    break;

                                case a.FLOAT_MAT2:
                                case a.FLOAT_MAT3:
                                default:
                                    throw new Error("compile shader err!");
                            }
                    }
                }
            }, {
                key: "getUniform",
                value: function (t) {
                    return this._paramsMap[t];
                }
            }, {
                key: "_uniform1f",
                value: function (t, e) {
                    var i = t.uploadedValue;
                    return i[0] !== e ? (g.mainContext.uniform1f(t.location, i[0] = e), 1) : 0;
                }
            }, {
                key: "_uniform1fv",
                value: function (t, e) {
                    if (e.length &lt; 4) {
                        var i = t.uploadedValue;
                        return i[0] !== e[0] || i[1] !== e[1] || i[2] !== e[2] || i[3] !== e[3] ? (g.mainContext.uniform1fv(t.location, e),
                            i[0] = e[0], i[1] = e[1], i[2] = e[2], i[3] = e[3], 1) : 0;
                    }
                    return g.mainContext.uniform1fv(t.location, e), 1;
                }
            }, {
                key: "_uniform_vec2",
                value: function (t, e) {
                    var i = t.uploadedValue;
                    return i[0] !== e[0] || i[1] !== e[1] ? (g.mainContext.uniform2f(t.location, i[0] = e[0], i[1] = e[1]),
                        1) : 0;
                }
            }, {
                key: "_uniform_vec2v",
                value: function (t, e) {
                    if (e.length &lt; 2) {
                        var i = t.uploadedValue;
                        return i[0] !== e[0] || i[1] !== e[1] || i[2] !== e[2] || i[3] !== e[3] ? (g.mainContext.uniform2fv(t.location, e),
                            i[0] = e[0], i[1] = e[1], i[2] = e[2], i[3] = e[3], 1) : 0;
                    }
                    return g.mainContext.uniform2fv(t.location, e), 1;
                }
            }, {
                key: "_uniform_vec3",
                value: function (t, e) {
                    var i = t.uploadedValue;
                    return i[0] !== e[0] || i[1] !== e[1] || i[2] !== e[2] ? (g.mainContext.uniform3f(t.location, i[0] = e[0], i[1] = e[1], i[2] = e[2]),
                        1) : 0;
                }
            }, {
                key: "_uniform_vec3v",
                value: function (t, e) {
                    return g.mainContext.uniform3fv(t.location, e), 1;
                }
            }, {
                key: "_uniform_vec4",
                value: function (t, e) {
                    var i = t.uploadedValue;
                    return i[0] !== e[0] || i[1] !== e[1] || i[2] !== e[2] || i[3] !== e[3] ? (g.mainContext.uniform4f(t.location, i[0] = e[0], i[1] = e[1], i[2] = e[2], i[3] = e[3]),
                        1) : 0;
                }
            }, {
                key: "_uniform_vec4v",
                value: function (t, e) {
                    return g.mainContext.uniform4fv(t.location, e), 1;
                }
            }, {
                key: "_uniformMatrix2fv",
                value: function (t, e) {
                    return g.mainContext.uniformMatrix2fv(t.location, !1, e), 1;
                }
            }, {
                key: "_uniformMatrix3fv",
                value: function (t, e) {
                    return g.mainContext.uniformMatrix3fv(t.location, !1, e), 1;
                }
            }, {
                key: "_uniformMatrix4fv",
                value: function (t, e) {
                    return g.mainContext.uniformMatrix4fv(t.location, !1, e), 1;
                }
            }, {
                key: "_uniform1i",
                value: function (t, e) {
                    var i = t.uploadedValue;
                    return i[0] !== e ? (g.mainContext.uniform1i(t.location, i[0] = e), 1) : 0;
                }
            }, {
                key: "_uniform1iv",
                value: function (t, e) {
                    return g.mainContext.uniform1iv(t.location, e), 1;
                }
            }, {
                key: "_uniform_ivec2",
                value: function (t, e) {
                    var i = t.uploadedValue;
                    return i[0] !== e[0] || i[1] !== e[1] ? (g.mainContext.uniform2i(t.location, i[0] = e[0], i[1] = e[1]),
                        1) : 0;
                }
            }, {
                key: "_uniform_ivec2v",
                value: function (t, e) {
                    return g.mainContext.uniform2iv(t.location, e), 1;
                }
            }, {
                key: "_uniform_vec3i",
                value: function (t, e) {
                    var i = t.uploadedValue;
                    return i[0] !== e[0] || i[1] !== e[1] || i[2] !== e[2] ? (g.mainContext.uniform3i(t.location, i[0] = e[0], i[1] = e[1], i[2] = e[2]),
                        1) : 0;
                }
            }, {
                key: "_uniform_vec3vi",
                value: function (t, e) {
                    return g.mainContext.uniform3iv(t.location, e), 1;
                }
            }, {
                key: "_uniform_vec4i",
                value: function (t, e) {
                    var i = t.uploadedValue;
                    return i[0] !== e[0] || i[1] !== e[1] || i[2] !== e[2] || i[3] !== e[3] ? (g.mainContext.uniform4i(t.location, i[0] = e[0], i[1] = e[1], i[2] = e[2], i[3] = e[3]),
                        1) : 0;
                }
            }, {
                key: "_uniform_vec4vi",
                value: function (t, e) {
                    return g.mainContext.uniform4iv(t.location, e), 1;
                }
            }, {
                key: "_uniform_sampler2D",
                value: function (t, e) {
                    var i = g.mainContext, n = t.uploadedValue;
                    return null == n[0] ? (n[0] = this._curActTexIndex, i.uniform1i(t.location, this._curActTexIndex),
                        g.activeTexture(i, i.TEXTURE0 + this._curActTexIndex), g.bindTexture(i, i.TEXTURE_2D, e),
                        this._curActTexIndex++, 1) : (g.activeTexture(i, i.TEXTURE0 + n[0]), g.bindTexture(i, i.TEXTURE_2D, e),
                            0);
                }
            }, {
                key: "_uniform_samplerCube",
                value: function (t, e) {
                    var i = g.mainContext, n = t.uploadedValue;
                    return null == n[0] ? (n[0] = this._curActTexIndex, i.uniform1i(t.location, this._curActTexIndex),
                        g.activeTexture(i, i.TEXTURE0 + this._curActTexIndex), g.bindTexture(i, i.TEXTURE_CUBE_MAP, e),
                        this._curActTexIndex++, 1) : (g.activeTexture(i, i.TEXTURE0 + n[0]), g.bindTexture(i, i.TEXTURE_CUBE_MAP, e),
                            0);
                }
            }, {
                key: "_noSetValue",
                value: function (t) {
                    console.log("no....:" + t.name);
                }
            }, {
                key: "uploadOne",
                value: function (t, e) {
                    g.useProgram(g.mainContext, this._program);
                    var i = this._paramsMap[t];
                    i.fun.call(this, i, e);
                }
            }, {
                key: "uploadTexture2D",
                value: function (t) {
                    var e = g;
                    e._activeTextures[0] !== t &amp;&amp; (e.bindTexture(g.mainContext, y.instance.TEXTURE_2D, t),
                        e._activeTextures[0] = t);
                }
            }, {
                key: "upload",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    P.activeShader = P.bindShader = this;
                    var i = g.mainContext;
                    g.useProgram(i, this._program), this._reCompile ? (e = this._params, this._reCompile = !1) : e = e || this._params;
                    for (var n, r, s = e.length, a = 0, o = 0; o &lt; s; o++) null !== (r = t[(n = e[o]).name]) &amp;&amp; (a += n.fun.call(this, n, r));
                    U.shaderCall += a;
                }
            }, {
                key: "uploadArray",
                value: function (t, e, i) {
                    P.activeShader = this, P.bindShader = this, g.useProgram(g.mainContext, this._program);
                    this._params;
                    for (var n, r, s = 0, a = e - 2; a &gt;= 0; a -= 2) (r = this._paramsMap[t[a]]) &amp;&amp; null != (n = t[a + 1]) &amp;&amp; (i &amp;&amp; i[r.name] &amp;&amp; i[r.name].bind(),
                        s += r.fun.call(this, r, n));
                    U.shaderCall += s;
                }
            }, {
                key: "getParams",
                value: function () {
                    return this._params;
                }
            }, {
                key: "setAttributesLocation",
                value: function (t) {
                    this._attribInfo = t;
                }
            }], [{
                key: "getShader",
                value: function (t) {
                    return n.sharders[t];
                }
            }, {
                key: "create",
                value: function (t, e) {
                    var i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, s = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null;
                    return new n(t, e, i, r, s);
                }
            }, {
                key: "withCompile",
                value: function (t, e, i, r) {
                    if (i &amp;&amp; n.sharders[i]) return n.sharders[i];
                    var s = n._preCompileShader[n.SHADERNAME2ID * t];
                    if (!s) throw new Error("withCompile shader err!" + t);
                    return s.createShader(e, i, r, null);
                }
            }, {
                key: "withCompile2D",
                value: function (t, e, i, r, s) {
                    var a = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : null;
                    if (r &amp;&amp; n.sharders[r]) return n.sharders[r];
                    var o = n._preCompileShader[n.SHADERNAME2ID * t + e];
                    if (!o) throw new Error("withCompile shader err!" + t + " " + e);
                    return o.createShader(i, r, s, a);
                }
            }, {
                key: "addInclude",
                value: function (t, e) {
                    i.ShaderCompile.addInclude(t, e);
                }
            }, {
                key: "preCompile",
                value: function (t, e, r, s) {
                    var a = n.SHADERNAME2ID * t;
                    n._preCompileShader[a] = new i.ShaderCompile(e, r, s);
                }
            }, {
                key: "preCompile2D",
                value: function (t, e, r, s, a) {
                    var o = n.SHADERNAME2ID * t + e;
                    n._preCompileShader[o] = new i.ShaderCompile(r, s, a);
                }
            }, {
                key: "_createShader",
                value: function (t, e, i) {
                    var n = t.createShader(i);
                    return t.shaderSource(n, e), t.compileShader(n), t.getShaderParameter(n, t.COMPILE_STATUS) ? n : (console.log(t.getShaderInfoLog(n)),
                        null);
                }
            }]), n;
        }(P);
        W._count = 0, W._preCompileShader = {}, W.SHADERNAME2ID = 2e-4, W.nameKey = new G(),
            W.sharders = new Array(32);
        var Y = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i(t, n) {
                var r, s = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, a = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, o = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null;
                return _classCallCheck(this, i), (r = e.call(this, t, n, s, a, o))._params2dQuick2 = null,
                    r._shaderValueWidth = 0, r._shaderValueHeight = 0, r;
            }
            return _createClass(i, [{
                key: "_disposeResource",
                value: function () {
                    _get(_getPrototypeOf(i.prototype), "_disposeResource", this).call(this), this._params2dQuick2 = null;
                }
            }, {
                key: "upload2dQuick2",
                value: function (t) {
                    this.upload(t, this._params2dQuick2 || this._make2dQuick2());
                }
            }, {
                key: "_make2dQuick2",
                value: function () {
                    if (!this._params2dQuick2) {
                        this._params2dQuick2 = [];
                        for (var t, e = this._params, i = 0, n = e.length; i &lt; n; i++) "size" !== (t = e[i]).name &amp;&amp; this._params2dQuick2.push(t);
                    }
                    return this._params2dQuick2;
                }
            }], [{
                key: "create",
                value: function (t, e) {
                    var n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, s = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null;
                    return new i(t, e, n, r, s);
                }
            }]), i;
        }(W), V = function () {
            function t(e, n) {
                _classCallCheck(this, t), this.defines = new N(), this.size = [0, 0], this.alpha = 1,
                    this.ALPHA = 1, this.subID = 0, this.ref = 1, this._cacheID = 0, this.clipMatDir = [i.Context._MAXSIZE, 0, 0, i.Context._MAXSIZE],
                    this.clipMatPos = [0, 0], this.clipOff = [0, 0], this.mainID = e, this.subID = n,
                    this.textureHost = null, this.texture = null, this.color = null, this.colorAdd = null,
                    this.u_mmat2 = null, this._cacheID = e | n, this._inClassCache = t._cache[this._cacheID],
                    e &gt; 0 &amp;&amp; !this._inClassCache &amp;&amp; (this._inClassCache = t._cache[this._cacheID] = [],
                        this._inClassCache._length = 0), this.clear();
            }
            return _createClass(t, [{
                key: "setValue",
                value: function (t) { }
            }, {
                key: "_ShaderWithCompile",
                value: function () {
                    return W.withCompile2D(0, this.mainID, this.defines.toNameDic(), this.mainID | this.defines._value, Y.create, this._attribLocation);
                }
            }, {
                key: "upload",
                value: function () {
                    var t = L;
                    L.worldMatrix4 === L.TEMPMAT4_ARRAY || this.defines.addInt(N.WORLDMAT), this.mmat = t.worldMatrix4,
                        L.matWVP &amp;&amp; (this.defines.addInt(N.MVP3D), this.u_MvpMatrix = L.matWVP.elements);
                    var e = W.sharders[this.mainID | this.defines._value] || this._ShaderWithCompile();
                    e._shaderValueWidth !== t.width || e._shaderValueHeight !== t.height ? (this.size[0] = t.width,
                        this.size[1] = t.height, e._shaderValueWidth = t.width, e._shaderValueHeight = t.height,
                        e.upload(this, null)) : e.upload(this, e._params2dQuick2 || e._make2dQuick2());
                }
            }, {
                key: "setFilters",
                value: function (t) {
                    if (this.filters = t, t) for (var e, i = t.length, n = 0; n &lt; i; n++) (e = t[n]) &amp;&amp; (this.defines.add(e.type),
                        e.action.setValue(this));
                }
            }, {
                key: "clear",
                value: function () {
                    this.defines._value = this.subID, this.clipOff[0] = 0;
                }
            }, {
                key: "release",
                value: function () {
                    --this.ref &lt; 1 &amp;&amp; (this._inClassCache &amp;&amp; (this._inClassCache[this._inClassCache._length++] = this),
                        this.clear(), this.filters = null, this.ref = 1, this.clipOff[0] = 0);
                }
            }], [{
                key: "_initone",
                value: function (e, i) {
                    t._typeClass[e] = i, t._cache[e] = [], t._cache[e]._length = 0;
                }
            }, {
                key: "__init__",
                value: function () { }
            }, {
                key: "create",
                value: function (e, i) {
                    var n = t._cache[e | i];
                    return n._length ? n[--n._length] : new t._typeClass[e | i](i);
                }
            }]), t;
        }();
        V._cache = [], V._typeClass = [], V.TEMPMAT4_ARRAY = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
        var X = function () {
            function t() {
                _classCallCheck(this, t), this.clear();
            }
            return _createClass(t, [{
                key: "clear",
                value: function () {
                    this.submitType = -1, this.blendShader = this.other = 0;
                }
            }, {
                key: "copyFrom",
                value: function (t) {
                    this.other = t.other, this.blendShader = t.blendShader, this.submitType = t.submitType;
                }
            }, {
                key: "copyFrom2",
                value: function (t, e, i) {
                    this.other = i, this.submitType = e;
                }
            }, {
                key: "equal3_2",
                value: function (t, e, i) {
                    return this.submitType === e &amp;&amp; this.other === i &amp;&amp; this.blendShader === t.blendShader;
                }
            }, {
                key: "equal4_2",
                value: function (t, e, i) {
                    return this.submitType === e &amp;&amp; this.other === i &amp;&amp; this.blendShader === t.blendShader;
                }
            }, {
                key: "equal_3",
                value: function (t) {
                    return this.submitType === t.submitType &amp;&amp; this.blendShader === t.blendShader;
                }
            }, {
                key: "equal",
                value: function (t) {
                    return this.other === t.other &amp;&amp; this.submitType === t.submitType &amp;&amp; this.blendShader === t.blendShader;
                }
            }]), t;
        }(), H = function () {
            function t() {
                _classCallCheck(this, t), this._ref = 1, this._key = new X();
            }
            return _createClass(t, [{
                key: "renderSubmit",
                value: function () {
                    return this.fun.apply(this._this, this.args), 1;
                }
            }, {
                key: "getRenderType",
                value: function () {
                    return 0;
                }
            }, {
                key: "releaseRender",
                value: function () {
                    if (--this._ref &lt; 1) {
                        var e = t.POOL;
                        e[e._length++] = this;
                    }
                }
            }], [{
                key: "create",
                value: function (e, i, n) {
                    var r = t.POOL._length ? t.POOL[--t.POOL._length] : new t();
                    return r.fun = i, r.args = e, r._this = n, r._ref = 1, r._key.clear(), r;
                }
            }]), t;
        }();
        H.POOL = [], H.POOL._length = 0;
        var z = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "type",
                get: function () {
                    return -1;
                }
            }]), t;
        }();
        z.BLUR = 16, z.COLOR = 32, z.GLOW = 8, z._filter = function (t, e, i, n) {
            var r = e, s = this._next;
            if (s) {
                var a = t.filters, o = a.length;
                if (1 == o &amp;&amp; a[0].type == z.COLOR) return e.save(), e.setColorFilter(a[0]), s._fun.call(s, t, e, i, n),
                    void e.restore();
                var l, h = V.create(N.TEXTURE2D, 0), u = v.TEMP, c = r._curMat, _ = f.create();
                c.copyTo(_);
                var d = 0, y = 0, g = null, m = t._cacheStyle.filterCache || null;
                if (m &amp;&amp; 0 == t.getRepaint()) {
                    if ((t._cacheStyle.hasGlowFilter || !1) &amp;&amp; (d = 50, y = 25), (l = t.getBounds()).width &lt;= 0 || l.height &lt;= 0) return;
                    l.width += d, l.height += d, u.x = l.x * _.a + l.y * _.c, u.y = l.y * _.d + l.x * _.b,
                        l.x = u.x, l.y = u.y, u.x = l.width * _.a + l.height * _.c, u.y = l.height * _.d + l.width * _.b,
                        l.width = u.x, l.height = u.y;
                } else {
                    t._isHaveGlowFilter() &amp;&amp; (d = 50, y = 25), (l = new p()).copyFrom(t.getSelfBounds()),
                        l.x += t.x, l.y += t.y, l.x -= t.pivotX + 4, l.y -= t.pivotY + 4;
                    var T = l.x, k = l.y;
                    if (l.width += d + 8, l.height += d + 8, u.x = l.x * _.a + l.y * _.c, u.y = l.y * _.d + l.x * _.b,
                        l.x = u.x, l.y = u.y, u.x = l.width * _.a + l.height * _.c, u.y = l.height * _.d + l.width * _.b,
                        l.width = u.x, l.height = u.y, l.width &lt;= 0 || l.height &lt;= 0) return;
                    m &amp;&amp; O.releaseRT(m), g = O.getRT(l.width, l.height);
                    var x = m = O.getRT(l.width, l.height);
                    t._getCacheStyle().filterCache = m, r.pushRT(), r.useRT(g);
                    var C = t.x - T + y, E = t.y - k + y;
                    s._fun.call(s, t, e, C, E), r.useRT(x);
                    for (var b = 0; b &lt; o; b++) {
                        0 != b &amp;&amp; (r.useRT(g), r.drawTarget(x, 0, 0, l.width, l.height, f.TEMP.identity(), h, null, B.TOINT.overlay),
                            r.useRT(x));
                        var w = a[b];
                        switch (w.type) {
                            case z.BLUR:
                            case z.GLOW:
                                w._glRender &amp;&amp; w._glRender.render(g, e, l.width, l.height, w);
                                break;

                            case z.COLOR:
                                r.setColorFilter(w), r.drawTarget(g, 0, 0, l.width, l.height, f.EMPTY.identity(), V.create(N.TEXTURE2D, 0)),
                                    r.setColorFilter(null);
                        }
                    }
                    r.popRT();
                }
                if (i = i - y - t.x, n = n - y - t.y, u.setTo(i, n), _.transformPoint(u), i = u.x + l.x,
                    n = u.y + l.y, r._drawRenderTexture(m, i, n, l.width, l.height, f.TEMP.identity(), 1, D.defuv),
                    g) {
                    var R = H.create([g], function (t) {
                        t.destroy();
                    }, this);
                    g = null, e.addRenderObject(R);
                }
                _.destroy();
            }
        };
        var K = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "toRadian",
                value: function (e) {
                    return e * t._pi2;
                }
            }, {
                key: "toAngle",
                value: function (e) {
                    return e * t._pi;
                }
            }, {
                key: "toHexColor",
                value: function (t) {
                    if (t &lt; 0 || isNaN(t)) return null;
                    for (var e = t.toString(16); e.length &lt; 6;) e = "0" + e;
                    return "#" + e;
                }
            }, {
                key: "getGID",
                value: function () {
                    return t._gid++;
                }
            }, {
                key: "concatArray",
                value: function (t, e) {
                    if (!e) return t;
                    if (!t) return e;
                    var i, n = e.length;
                    for (i = 0; i &lt; n; i++) t.push(e[i]);
                    return t;
                }
            }, {
                key: "clearArray",
                value: function (t) {
                    return t ? (t.length = 0, t) : t;
                }
            }, {
                key: "copyArray",
                value: function (t, e) {
                    if (t || (t = []), !e) return t;
                    t.length = e.length;
                    var i, n = e.length;
                    for (i = 0; i &lt; n; i++) t[i] = e[i];
                    return t;
                }
            }, {
                key: "getGlobalRecByPoints",
                value: function (t, e, i, n, r) {
                    var s, a;
                    s = v.create().setTo(e, i), s = t.localToGlobal(s), a = v.create().setTo(n, r),
                        a = t.localToGlobal(a);
                    var o = p._getWrapRec([s.x, s.y, a.x, a.y]);
                    return s.recover(), a.recover(), o;
                }
            }, {
                key: "getGlobalPosAndScale",
                value: function (e) {
                    return t.getGlobalRecByPoints(e, 0, 0, 1, 1);
                }
            }, {
                key: "bind",
                value: function (t, e) {
                    return t.bind(e);
                }
            }, {
                key: "updateOrder",
                value: function (t) {
                    if (!t || t.length &lt; 2) return !1;
                    for (var e, i, n, r = 1, s = t.length; r &lt; s;) {
                        for (n = t[e = r], i = t[e]._zOrder; --e &gt; -1 &amp;&amp; t[e]._zOrder &gt; i;) t[e + 1] = t[e];
                        t[e + 1] = n, r++;
                    }
                    return !0;
                }
            }, {
                key: "transPointList",
                value: function (t, e, i) {
                    var n, r = t.length;
                    for (n = 0; n &lt; r; n += 2) t[n] += e, t[n + 1] += i;
                }
            }, {
                key: "parseInt",
                value: function (t) {
                    function e(e) {
                        return t.apply(this, arguments);
                    }
                    return e.toString = function () {
                        return t.toString();
                    }, e;
                }(function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, i = parseInt(t, e);
                    return isNaN(i) ? 0 : i;
                })
            }, {
                key: "getFileExtension",
                value: function (e) {
                    t._extReg.lastIndex = e.lastIndexOf(".");
                    var i = t._extReg.exec(e);
                    return i &amp;&amp; i.length &gt; 1 ? i[1].toLowerCase() : null;
                }
            }, {
                key: "getTransformRelativeToWindow",
                value: function (e, i, n) {
                    var r = t.gStage, s = t.getGlobalPosAndScale(e), a = r._canvasTransform.clone(), o = a.tx, l = a.ty;
                    a.rotate(-Math.PI / 180 * r.canvasDegree), a.scale(r.clientScaleX, r.clientScaleY);
                    var h, u, c, _, d = r.canvasDegree % 180 != 0;
                    return d ? (h = n + s.y, u = i + s.x, h *= a.d, u *= a.a, 90 == r.canvasDegree ? (h = o - h,
                        u += l) : (h += o, u = l - u)) : (h = i + s.x, u = n + s.y, h *= a.a, u *= a.d,
                            h += o, u += l), u += r._safariOffsetY, d ? (c = a.d * s.height, _ = a.a * s.width) : (c = a.a * s.width,
                                _ = a.d * s.height), {
                        x: h,
                        y: u,
                        scaleX: c,
                        scaleY: _
                    };
                }
            }, {
                key: "fitDOMElementInArea",
                value: function (e, i, n, r, s, a) {
                    e._fitLayaAirInitialized || (e._fitLayaAirInitialized = !0, e.style.transformOrigin = e.style.webKittransformOrigin = "left top",
                        e.style.position = "absolute");
                    var o = t.getTransformRelativeToWindow(i, n, r);
                    e.style.transform = e.style.webkitTransform = "scale(" + o.scaleX + "," + o.scaleY + ") rotate(" + t.gStage.canvasDegree + "deg)",
                        e.style.width = s + "px", e.style.height = a + "px", e.style.left = o.x + "px",
                        e.style.top = o.y + "px";
                }
            }, {
                key: "isOkTextureList",
                value: function (t) {
                    if (!t) return !1;
                    var e, i, n = t.length;
                    for (e = 0; e &lt; n; e++) if (!(i = t[e]) || !i._getSource()) return !1;
                    return !0;
                }
            }, {
                key: "isOKCmdList",
                value: function (t) {
                    if (!t) return !1;
                    var e, i = t.length;
                    for (e = 0; e &lt; i; e++) t[e];
                    return !0;
                }
            }, {
                key: "getQueryString",
                value: function (t) {
                    if (i.Browser.onMiniGame) return null;
                    if (!window.location || !window.location.search) return null;
                    var e = new RegExp("(^|&amp;)" + t + "=([^&amp;]*)(&amp;|$)"), n = window.location.search.substr(1).match(e);
                    return null != n ? unescape(n[2]) : null;
                }
            }]), t;
        }();
        K.gStage = null, K._gid = 1, K._pi = 180 / Math.PI, K._pi2 = Math.PI / 180, K._extReg = /\.(\w+)\??/g,
            K.parseXMLFromString = function (t) {
                var e;
                if (t = t.replace(/&gt;\s+&lt;/g, "&gt;&lt;"), (e = new DOMParser().parseFromString(t, "text/xml")).firstChild.textContent.indexOf("This page contains the following errors") &gt; -1) throw new Error(e.firstChild.firstChild.textContent);
                return e;
            };
        var j = function () {
            function t(e) {
                if (_classCallCheck(this, t), this.arrColor = [], null == e) return this.strColor = "#00000000",
                    this.numColor = 0, void (this.arrColor = [0, 0, 0, 0]);
                var i, n, r;
                if ("string" == typeof e) if (e.indexOf("rgba(") &gt;= 0 || e.indexOf("rgb(") &gt;= 0) {
                    var s, a, o = e;
                    for (s = o.indexOf("("), a = o.indexOf(")"), o = o.substring(s + 1, a), this.arrColor = o.split(","),
                        n = this.arrColor.length, i = 0; i &lt; n; i++) this.arrColor[i] = parseFloat(this.arrColor[i]),
                            i &lt; 3 &amp;&amp; (this.arrColor[i] = Math.round(this.arrColor[i]));
                    r = 4 == this.arrColor.length ? 256 * (256 * (256 * this.arrColor[0] + this.arrColor[1]) + this.arrColor[2]) + Math.round(255 * this.arrColor[3]) : 256 * (256 * this.arrColor[0] + this.arrColor[1]) + this.arrColor[2],
                        this.strColor = e;
                } else {
                    if (this.strColor = e, "#" === e.charAt(0) &amp;&amp; (e = e.substr(1)), 3 === (n = e.length) || 4 === n) {
                        var l = "";
                        for (i = 0; i &lt; n; i++) l += e[i] + e[i];
                        e = l;
                    }
                    r = parseInt(e, 16);
                } else r = e, this.strColor = K.toHexColor(r);
                this.strColor.indexOf("rgba") &gt;= 0 || 9 === this.strColor.length ? (this.arrColor = [((4278190080 &amp; r) &gt;&gt;&gt; 24) / 255, ((16711680 &amp; r) &gt;&gt; 16) / 255, ((65280 &amp; r) &gt;&gt; 8) / 255, (255 &amp; r) / 255],
                    this.numColor = (4278190080 &amp; r) &gt;&gt;&gt; 24 | (16711680 &amp; r) &gt;&gt; 8 | (65280 &amp; r) &lt;&lt; 8 | (255 &amp; r) &lt;&lt; 24) : (this.arrColor = [((16711680 &amp; r) &gt;&gt; 16) / 255, ((65280 &amp; r) &gt;&gt; 8) / 255, (255 &amp; r) / 255, 1],
                        this.numColor = 4278190080 | (16711680 &amp; r) &gt;&gt; 16 | 65280 &amp; r | (255 &amp; r) &lt;&lt; 16),
                    this.arrColor.__id = ++t._COLODID;
            }
            return _createClass(t, null, [{
                key: "_initDefault",
                value: function () {
                    for (var e in t._DEFAULT = {}, t._COLOR_MAP) t._SAVE[e] = t._DEFAULT[e] = new t(t._COLOR_MAP[e]);
                    return t._DEFAULT;
                }
            }, {
                key: "_initSaveMap",
                value: function () {
                    for (var e in t._SAVE_SIZE = 0, t._SAVE = {}, t._DEFAULT) t._SAVE[e] = t._DEFAULT[e];
                }
            }, {
                key: "create",
                value: function (e) {
                    var i = e + "", n = t._SAVE[i];
                    return null != n ? n : (t._SAVE_SIZE &lt; 1e3 &amp;&amp; t._initSaveMap(), t._SAVE[i] = new t(e));
                }
            }]), t;
        }();
        j._SAVE = {}, j._SAVE_SIZE = 0, j._COLOR_MAP = {
            purple: "#800080",
            orange: "#ffa500",
            white: "#FFFFFF",
            red: "#FF0000",
            green: "#00FF00",
            blue: "#0000FF",
            black: "#000000",
            yellow: "#FFFF00",
            gray: "#808080"
        }, j._DEFAULT = j._initDefault(), j._COLODID = 1;
        var q = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t, n = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null;
                return _classCallCheck(this, i), t = e.call(this), n || (n = t._copyMatrix(i.IDENTITY_MATRIX)),
                    t._mat = new Float32Array(16), t._alpha = new Float32Array(4), t.setByMatrix(n),
                    t;
            }
            return _createClass(i, [{
                key: "gray",
                value: function () {
                    return this.setByMatrix(i.GRAY_MATRIX);
                }
            }, {
                key: "color",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0, n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 1;
                    return this.setByMatrix([1, 0, 0, 0, t, 0, 1, 0, 0, e, 0, 0, 1, 0, i, 0, 0, 0, 1, n]);
                }
            }, {
                key: "setColor",
                value: function (t) {
                    var e = j.create(t).arrColor, i = [0, 0, 0, 0, 256 * e[0], 0, 0, 0, 0, 256 * e[1], 0, 0, 0, 0, 256 * e[2], 0, 0, 0, 1, 0];
                    return this.setByMatrix(i);
                }
            }, {
                key: "setByMatrix",
                value: function (t) {
                    this._matrix != t &amp;&amp; this._copyMatrix(t);
                    for (var e = 0, i = 0, n = 0; n &lt; 20; n++) n % 5 != 4 ? this._mat[e++] = t[n] : this._alpha[i++] = t[n];
                    return this;
                }
            }, {
                key: "adjustColor",
                value: function (t, e, i, n) {
                    return this.adjustHue(n), this.adjustContrast(e), this.adjustBrightness(t), this.adjustSaturation(i),
                        this;
                }
            }, {
                key: "adjustBrightness",
                value: function (t) {
                    return 0 == (t = this._clampValue(t, 100)) || isNaN(t) ? this : this._multiplyMatrix([1, 0, 0, 0, t, 0, 1, 0, 0, t, 0, 0, 1, 0, t, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]);
                }
            }, {
                key: "adjustContrast",
                value: function (t) {
                    if (0 == (t = this._clampValue(t, 100)) || isNaN(t)) return this;
                    var e, n = (e = t &lt; 0 ? 127 + t / 100 * 127 : 127 * (e = 0 == (e = t % 1) ? i.DELTA_INDEX[t] : i.DELTA_INDEX[t &lt;&lt; 0] * (1 - e) + i.DELTA_INDEX[1 + (t &lt;&lt; 0)] * e) + 127) / 127, r = .5 * (127 - e);
                    return this._multiplyMatrix([n, 0, 0, 0, r, 0, n, 0, 0, r, 0, 0, n, 0, r, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]);
                }
            }, {
                key: "adjustSaturation",
                value: function (t) {
                    if (0 == (t = this._clampValue(t, 100)) || isNaN(t)) return this;
                    var e = 1 + (t &gt; 0 ? 3 * t / 100 : t / 100), i = 1 - e, n = .3086 * i, r = .6094 * i, s = .082 * i;
                    return this._multiplyMatrix([n + e, r, s, 0, 0, n, r + e, s, 0, 0, n, r, s + e, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]);
                }
            }, {
                key: "adjustHue",
                value: function (t) {
                    if (0 == (t = this._clampValue(t, 180) / 180 * Math.PI) || isNaN(t)) return this;
                    var e = Math.cos(t), i = Math.sin(t), n = .213, r = .715, s = .072;
                    return this._multiplyMatrix([n + e * (1 - n) + i * -n, r + e * -r + i * -r, s + e * -s + i * (1 - s), 0, 0, n + e * -n + .143 * i, r + e * (1 - r) + .14 * i, s + e * -s + -.283 * i, 0, 0, n + e * -n + -.787 * i, r + e * -r + i * r, s + e * (1 - s) + i * s, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]);
                }
            }, {
                key: "reset",
                value: function () {
                    return this.setByMatrix(this._copyMatrix(i.IDENTITY_MATRIX));
                }
            }, {
                key: "_multiplyMatrix",
                value: function (t) {
                    var e = [];
                    this._matrix = this._fixMatrix(this._matrix);
                    for (var i = 0; i &lt; 5; i++) {
                        for (var n = 0; n &lt; 5; n++) e[n] = this._matrix[n + 5 * i];
                        for (n = 0; n &lt; 5; n++) {
                            for (var r = 0, s = 0; s &lt; 5; s++) r += t[n + 5 * s] * e[s];
                            this._matrix[n + 5 * i] = r;
                        }
                    }
                    return this.setByMatrix(this._matrix);
                }
            }, {
                key: "_clampValue",
                value: function (t, e) {
                    return Math.min(e, Math.max(-e, t));
                }
            }, {
                key: "_fixMatrix",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null;
                    return null == t ? i.IDENTITY_MATRIX : (t.length &lt; i.LENGTH ? t = t.slice(0, t.length).concat(i.IDENTITY_MATRIX.slice(t.length, i.LENGTH)) : t.length &gt; i.LENGTH &amp;&amp; (t = t.slice(0, i.LENGTH)),
                        t);
                }
            }, {
                key: "_copyMatrix",
                value: function (t) {
                    var e = i.LENGTH;
                    this._matrix || (this._matrix = []);
                    for (var n = 0; n &lt; e; n++) this._matrix[n] = t[n];
                    return this._matrix;
                }
            }, {
                key: "type",
                get: function () {
                    return z.COLOR;
                }
            }]), i;
        }(z);
        q.DELTA_INDEX = [0, .01, .02, .04, .05, .06, .07, .08, .1, .11, .12, .14, .15, .16, .17, .18, .2, .21, .22, .24, .25, .27, .28, .3, .32, .34, .36, .38, .4, .42, .44, .46, .48, .5, .53, .56, .59, .62, .65, .68, .71, .74, .77, .8, .83, .86, .89, .92, .95, .98, 1, 1.06, 1.12, 1.18, 1.24, 1.3, 1.36, 1.42, 1.48, 1.54, 1.6, 1.66, 1.72, 1.78, 1.84, 1.9, 1.96, 2, 2.12, 2.25, 2.37, 2.5, 2.62, 2.75, 2.87, 3, 3.2, 3.4, 3.6, 3.8, 4, 4.3, 4.7, 4.9, 5, 5.5, 6, 6.5, 6.8, 7, 7.3, 7.5, 7.8, 8, 8.4, 8.7, 9, 9.4, 9.6, 9.8, 10],
            q.GRAY_MATRIX = [.3086, .6094, .082, 0, 0, .3086, .6094, .082, 0, 0, .3086, .6094, .082, 0, 0, 0, 0, 0, 1, 0],
            q.IDENTITY_MATRIX = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1],
            q.LENGTH = 25;
        var Q = function () {
            function t() {
                _classCallCheck(this, t), this.colorFlt = null, this.uv = null;
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.texture &amp;&amp; this.texture._removeReference(), this.texture = null, this.matrix = null,
                        n.recover("DrawTextureCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    this.texture &amp;&amp; t.drawTextureWithTransform(this.texture, this.x, this.y, this.width, this.height, this.matrix, e, i, this.alpha, this.blendMode, this.colorFlt, this.uv);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a, o, l, h, u, c) {
                    var _ = n.getItemByClass("DrawTextureCmd", t);
                    return _.texture = e, e._addReference(), _.x = i, _.y = r, _.width = s, _.height = a,
                        _.matrix = o, _.alpha = l, _.color = h, _.blendMode = u, _.uv = null == c ? null : c,
                        h &amp;&amp; (_.colorFlt = new q(), _.colorFlt.setColor(h)), _;
                }
            }]), t;
        }();
        Q.ID = "DrawTexture";
        var Z = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.texture = null, this.offset = null, this.other = null, n.recover("FillTextureCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t.fillTexture(this.texture, this.x + e, this.y + i, this.width, this.height, this.type, this.offset, this.other);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a, o, l, h) {
                    var u = n.getItemByClass("FillTextureCmd", t);
                    return u.texture = e, u.x = i, u.y = r, u.width = s, u.height = a, u.type = o, u.offset = l,
                        u.other = h, u;
                }
            }]), t;
        }();
        Z.ID = "FillTexture";
        var $ = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    n.recover("RestoreCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t.restore();
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function () {
                    return n.getItemByClass("RestoreCmd", t);
                }
            }]), t;
        }();
        $.ID = "Restore";
        var J = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    n.recover("RotateCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t._rotate(this.angle, this.pivotX + e, this.pivotY + i);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r) {
                    var s = n.getItemByClass("RotateCmd", t);
                    return s.angle = e, s.pivotX = i, s.pivotY = r, s;
                }
            }]), t;
        }();
        J.ID = "Rotate";
        var tt = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    n.recover("ScaleCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t._scale(this.scaleX, this.scaleY, this.pivotX + e, this.pivotY + i);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s) {
                    var a = n.getItemByClass("ScaleCmd", t);
                    return a.scaleX = e, a.scaleY = i, a.pivotX = r, a.pivotY = s, a;
                }
            }]), t;
        }();
        tt.ID = "Scale";
        var et = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.matrix = null, n.recover("TransformCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t._transform(this.matrix, this.pivotX + e, this.pivotY + i);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r) {
                    var s = n.getItemByClass("TransformCmd", t);
                    return s.matrix = e, s.pivotX = i, s.pivotY = r, s;
                }
            }]), t;
        }();
        et.ID = "Transform";
        var it = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    n.recover("TranslateCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t.translate(this.tx, this.ty);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i) {
                    var r = n.getItemByClass("TranslateCmd", t);
                    return r.tx = e, r.ty = i, r;
                }
            }]), t;
        }();
        it.ID = "Translate";
        var nt = function () {
            function t() {
                _classCallCheck(this, t), this._controlPoints = [new v(), new v(), new v()], this._calFun = this.getPoint2;
            }
            return _createClass(t, [{
                key: "_switchPoint",
                value: function (t, e) {
                    var i = this._controlPoints.shift();
                    i.setTo(t, e), this._controlPoints.push(i);
                }
            }, {
                key: "getPoint2",
                value: function (t, e) {
                    var i = this._controlPoints[0], n = this._controlPoints[1], r = this._controlPoints[2], s = Math.pow(1 - t, 2) * i.x + 2 * t * (1 - t) * n.x + Math.pow(t, 2) * r.x, a = Math.pow(1 - t, 2) * i.y + 2 * t * (1 - t) * n.y + Math.pow(t, 2) * r.y;
                    e.push(s, a);
                }
            }, {
                key: "getPoint3",
                value: function (t, e) {
                    var i = this._controlPoints[0], n = this._controlPoints[1], r = this._controlPoints[2], s = this._controlPoints[3], a = Math.pow(1 - t, 3) * i.x + 3 * n.x * t * (1 - t) * (1 - t) + 3 * r.x * t * t * (1 - t) + s.x * Math.pow(t, 3), o = Math.pow(1 - t, 3) * i.y + 3 * n.y * t * (1 - t) * (1 - t) + 3 * r.y * t * t * (1 - t) + s.y * Math.pow(t, 3);
                    e.push(a, o);
                }
            }, {
                key: "insertPoints",
                value: function (t, e) {
                    var i, n;
                    for (n = 1 / (t = t &gt; 0 ? t : 5), i = 0; i &lt;= 1; i += n) this._calFun(i, e);
                }
            }, {
                key: "getBezierPoints",
                value: function (t) {
                    var e, i, n = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 5, r = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 2;
                    if ((i = t.length) &lt; 2 * (r + 1)) return [];
                    var s = [];
                    switch (r) {
                        case 2:
                            this._calFun = this.getPoint2;
                            break;

                        case 3:
                            this._calFun = this.getPoint3;
                            break;

                        default:
                            return [];
                    }
                    for (; this._controlPoints.length &lt;= r;) this._controlPoints.push(v.create());
                    for (e = 0; e &lt; 2 * r; e += 2) this._switchPoint(t[e], t[e + 1]);
                    for (e = 2 * r; e &lt; i; e += 2) this._switchPoint(t[e], t[e + 1]), e / 2 % r == 0 &amp;&amp; this.insertPoints(n, s);
                    return s;
                }
            }]), t;
        }();
        nt.I = new nt();
        var rt = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "multiply",
                value: function (t, e, i) {
                    return (t.x - i.x) * (e.y - i.y) - (e.x - i.x) * (t.y - i.y);
                }
            }, {
                key: "dis",
                value: function (t, e) {
                    return (t.x - e.x) * (t.x - e.x) + (t.y - e.y) * (t.y - e.y);
                }
            }, {
                key: "_getPoints",
                value: function (e) {
                    var i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1], n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null;
                    for (t._mPointList || (t._mPointList = []); t._mPointList.length &lt; e;) t._mPointList.push(new v());
                    return n || (n = []), n.length = 0, i ? t.getFrom(n, t._mPointList, e) : t.getFromR(n, t._mPointList, e),
                        n;
                }
            }, {
                key: "getFrom",
                value: function (t, e, i) {
                    var n;
                    for (n = 0; n &lt; i; n++) t.push(e[n]);
                    return t;
                }
            }, {
                key: "getFromR",
                value: function (t, e, i) {
                    var n;
                    for (n = 0; n &lt; i; n++) t.push(e.pop());
                    return t;
                }
            }, {
                key: "pListToPointList",
                value: function (e) {
                    var i, n = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1], r = e.length / 2, s = t._getPoints(r, n, t._tempPointList);
                    for (i = 0; i &lt; r; i++) s[i].setTo(e[i + i], e[i + i + 1]);
                    return s;
                }
            }, {
                key: "pointListToPlist",
                value: function (e) {
                    var i, n, r = e.length, s = t._temPList;
                    for (s.length = 0, i = 0; i &lt; r; i++) n = e[i], s.push(n.x, n.y);
                    return s;
                }
            }, {
                key: "scanPList",
                value: function (e) {
                    return K.copyArray(e, t.pointListToPlist(t.scan(t.pListToPointList(e, !0))));
                }
            }, {
                key: "scan",
                value: function (e) {
                    var i, n, r, s, a, o = 0, l = e.length, h = {};
                    for ((s = t._temArr).length = 0, i = (l = e.length) - 1; i &gt;= 0; i--) (a = (r = e[i]).x + "_" + r.y) in h || (h[a] = !0,
                        s.push(r));
                    for (l = s.length, K.copyArray(e, s), i = 1; i &lt; l; i++) (e[i].y &lt; e[o].y || e[i].y == e[o].y &amp;&amp; e[i].x &lt; e[o].x) &amp;&amp; (o = i);
                    for (r = e[0], e[0] = e[o], e[o] = r, i = 1; i &lt; l - 1; i++) {
                        for (o = i, n = i + 1; n &lt; l; n++) (t.multiply(e[n], e[o], e[0]) &gt; 0 || 0 == t.multiply(e[n], e[o], e[0]) &amp;&amp; t.dis(e[0], e[n]) &lt; t.dis(e[0], e[o])) &amp;&amp; (o = n);
                        r = e[i], e[i] = e[o], e[o] = r;
                    }
                    if ((s = t._temArr).length = 0, e.length &lt; 3) return K.copyArray(s, e);
                    for (s.push(e[0], e[1], e[2]), i = 3; i &lt; l; i++) {
                        for (; s.length &gt;= 2 &amp;&amp; t.multiply(e[i], s[s.length - 1], s[s.length - 2]) &gt;= 0;) s.pop();
                        e[i] &amp;&amp; s.push(e[i]);
                    }
                    return s;
                }
            }]), t;
        }();
        rt._tempPointList = [], rt._temPList = [], rt._temArr = [];
        var st = function () {
            function t(e) {
                _classCallCheck(this, t), this.setValue(e);
            }
            return _createClass(t, [{
                key: "setValue",
                value: function (t) {
                    this._color = t ? t instanceof j ? t : j.create(t) : j.create("#000000");
                }
            }, {
                key: "reset",
                value: function () {
                    this._color = j.create("#000000");
                }
            }, {
                key: "toInt",
                value: function () {
                    return this._color.numColor;
                }
            }, {
                key: "equal",
                value: function (t) {
                    return "string" == typeof t ? this._color.strColor === t : t instanceof j &amp;&amp; this._color.numColor === t.numColor;
                }
            }, {
                key: "toColorStr",
                value: function () {
                    return this._color.strColor;
                }
            }], [{
                key: "create",
                value: function (e) {
                    if (e) {
                        var i = e instanceof j ? e : j.create(e);
                        return i._drawStyle || (i._drawStyle = new t(e));
                    }
                    return t.DEFAULT;
                }
            }]), t;
        }();
        st.DEFAULT = new st("#000000");
        var at = function () {
            function t() {
                _classCallCheck(this, t), this._lastOriX = 0, this._lastOriY = 0, this.paths = [],
                    this._curPath = null;
            }
            return _createClass(t, [{
                key: "beginPath",
                value: function (t) {
                    this.paths.length = 1, this._curPath = this.paths[0] = new ot(), this._curPath.convex = t;
                }
            }, {
                key: "closePath",
                value: function () {
                    this._curPath.loop = !0;
                }
            }, {
                key: "newPath",
                value: function () {
                    this._curPath = new ot(), this.paths.push(this._curPath);
                }
            }, {
                key: "addPoint",
                value: function (t, e) {
                    this._curPath.path.push(t, e);
                }
            }, {
                key: "push",
                value: function (t, e) {
                    this._curPath ? this._curPath.path.length &gt; 0 &amp;&amp; (this._curPath = new ot(), this.paths.push(this._curPath)) : (this._curPath = new ot(),
                        this.paths.push(this._curPath));
                    var i = this._curPath;
                    i.path = t.slice(), i.convex = e;
                }
            }, {
                key: "reset",
                value: function () {
                    this.paths.length = 0;
                }
            }]), t;
        }(), ot = function t() {
            _classCallCheck(this, t), this.path = [], this.loop = !1, this.convex = !1;
        }, lt = function () {
            function t() {
                var e = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : t.TYPE_2D;
                _classCallCheck(this, t), this.clipInfoID = -1, this._mesh = null, this._blendFn = null,
                    this._id = 0, this._renderType = 0, this._parent = null, this._key = new X(), this._startIdx = 0,
                    this._numEle = 0, this._ref = 1, this.shaderValue = null, this._renderType = e,
                    this._id = ++t.ID;
            }
            return _createClass(t, [{
                key: "getID",
                value: function () {
                    return this._id;
                }
            }, {
                key: "getRenderType",
                value: function () {
                    return this._renderType;
                }
            }, {
                key: "toString",
                value: function () {
                    return "ibindex:" + this._startIdx + " num:" + this._numEle + " key=" + this._key;
                }
            }, {
                key: "renderSubmit",
                value: function () {
                    return 1;
                }
            }, {
                key: "releaseRender",
                value: function () { }
            }], [{
                key: "__init__",
                value: function () {
                    var e = t.RENDERBASE = new t(-1);
                    e.shaderValue = new V(0, 0), e.shaderValue.ALPHA = 1, e._ref = 4294967295;
                }
            }]), t;
        }();
        lt.TYPE_2D = 1e4, lt.TYPE_CANVAS = 10003, lt.TYPE_CMDSETRT = 10004, lt.TYPE_CUSTOM = 10005,
            lt.TYPE_BLURRT = 10006, lt.TYPE_CMDDESTORYPRERT = 10007, lt.TYPE_DISABLESTENCIL = 10008,
            lt.TYPE_OTHERIBVB = 10009, lt.TYPE_PRIMITIVE = 10010, lt.TYPE_RT = 10011, lt.TYPE_BLUR_RT = 10012,
            lt.TYPE_TARGET = 10013, lt.TYPE_CHANGE_VALUE = 10014, lt.TYPE_SHAPE = 10015, lt.TYPE_TEXTURE = 10016,
            lt.TYPE_FILLTEXTURE = 10017, lt.KEY_ONCE = -1, lt.KEY_FILLRECT = 1, lt.KEY_DRAWTEXTURE = 2,
            lt.KEY_VG = 3, lt.KEY_TRIANGLES = 4, lt.ID = 1, lt.preRender = null;
        var ht = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "isSaveMark",
                value: function () {
                    return !1;
                }
            }, {
                key: "restore",
                value: function (e) {
                    this._dataObj[this._valueName] = this._value, t.POOL[t.POOL._length++] = this, this._newSubmit &amp;&amp; (e._curSubmit = lt.RENDERBASE);
                }
            }], [{
                key: "_createArray",
                value: function () {
                    var t = [];
                    return t._length = 0, t;
                }
            }, {
                key: "_init",
                value: function () {
                    var e = t._namemap = {};
                    return e[t.TYPE_ALPHA] = "ALPHA", e[t.TYPE_FILESTYLE] = "fillStyle", e[t.TYPE_FONT] = "font",
                        e[t.TYPE_LINEWIDTH] = "lineWidth", e[t.TYPE_STROKESTYLE] = "strokeStyle", e[t.TYPE_ENABLEMERGE] = "_mergeID",
                        e[t.TYPE_MARK] = e[t.TYPE_TRANSFORM] = e[t.TYPE_TRANSLATE] = [], e[t.TYPE_TEXTBASELINE] = "textBaseline",
                        e[t.TYPE_TEXTALIGN] = "textAlign", e[t.TYPE_GLOBALCOMPOSITEOPERATION] = "_nBlendType",
                        e[t.TYPE_SHADER] = "shader", e[t.TYPE_FILTERS] = "filters", e[t.TYPE_COLORFILTER] = "_colorFiler",
                        e;
                }
            }, {
                key: "save",
                value: function (e, i, n, r) {
                    if ((e._saveMark._saveuse &amp; i) !== i) {
                        e._saveMark._saveuse |= i;
                        var s = t.POOL, a = s._length &gt; 0 ? s[--s._length] : new t();
                        a._value = n[a._valueName = t._namemap[i]], a._dataObj = n, a._newSubmit = r;
                        var o = e._save;
                        o[o._length++] = a;
                    }
                }
            }]), t;
        }();
        ht.TYPE_ALPHA = 1, ht.TYPE_FILESTYLE = 2, ht.TYPE_FONT = 8, ht.TYPE_LINEWIDTH = 256,
            ht.TYPE_STROKESTYLE = 512, ht.TYPE_MARK = 1024, ht.TYPE_TRANSFORM = 2048, ht.TYPE_TRANSLATE = 4096,
            ht.TYPE_ENABLEMERGE = 8192, ht.TYPE_TEXTBASELINE = 16384, ht.TYPE_TEXTALIGN = 32768,
            ht.TYPE_GLOBALCOMPOSITEOPERATION = 65536, ht.TYPE_CLIPRECT = 131072, ht.TYPE_CLIPRECT_STENCIL = 262144,
            ht.TYPE_IBVB = 524288, ht.TYPE_SHADER = 1048576, ht.TYPE_FILTERS = 2097152, ht.TYPE_FILTERS_TYPE = 4194304,
            ht.TYPE_COLORFILTER = 8388608, ht.POOL = ht._createArray(), ht._namemap = ht._init();
        var ut = function () {
            function t() {
                _classCallCheck(this, t), this._globalClipMatrix = new f(), this._clipInfoID = -1,
                    this._clipRect = new p(), this.incache = !1;
            }
            return _createClass(t, [{
                key: "isSaveMark",
                value: function () {
                    return !1;
                }
            }, {
                key: "restore",
                value: function (e) {
                    this._globalClipMatrix.copyTo(e._globalClipMatrix), this._clipRect.clone(e._clipRect),
                        e._clipInfoID = this._clipInfoID, t.POOL[t.POOL._length++] = this, e._clipInCache = this.incache;
                }
            }], [{
                key: "save",
                value: function (e) {
                    if ((e._saveMark._saveuse &amp; ht.TYPE_CLIPRECT) != ht.TYPE_CLIPRECT) {
                        e._saveMark._saveuse |= ht.TYPE_CLIPRECT;
                        var i = t.POOL, n = i._length &gt; 0 ? i[--i._length] : new t();
                        e._globalClipMatrix.copyTo(n._globalClipMatrix), e._clipRect.clone(n._clipRect),
                            n._clipInfoID = e._clipInfoID, n.incache = e._clipInCache;
                        var r = e._save;
                        r[r._length++] = n;
                    }
                }
            }]), t;
        }();
        ut.POOL = ht._createArray();
        var ct = function () {
            function t() {
                _classCallCheck(this, t), this._saveuse = 0;
            }
            return _createClass(t, [{
                key: "isSaveMark",
                value: function () {
                    return !0;
                }
            }, {
                key: "restore",
                value: function (e) {
                    e._saveMark = this._preSaveMark, t.POOL[t.POOL._length++] = this;
                }
            }], [{
                key: "Create",
                value: function (e) {
                    var i = t.POOL, n = i._length &gt; 0 ? i[--i._length] : new t();
                    return n._saveuse = 0, n._preSaveMark = e._saveMark, e._saveMark = n, n;
                }
            }]), t;
        }();
        ct.POOL = ht._createArray();
        var _t = function () {
            function t() {
                _classCallCheck(this, t), this._matrix = new f();
            }
            return _createClass(t, [{
                key: "isSaveMark",
                value: function () {
                    return !1;
                }
            }, {
                key: "restore",
                value: function (e) {
                    e._curMat = this._savematrix, t.POOL[t.POOL._length++] = this;
                }
            }], [{
                key: "save",
                value: function (e) {
                    var i = e._saveMark;
                    if ((i._saveuse &amp; ht.TYPE_TRANSFORM) !== ht.TYPE_TRANSFORM) {
                        i._saveuse |= ht.TYPE_TRANSFORM;
                        var n = t.POOL, r = n._length &gt; 0 ? n[--n._length] : new t();
                        r._savematrix = e._curMat, e._curMat = e._curMat.copyTo(r._matrix);
                        var s = e._save;
                        s[s._length++] = r;
                    }
                }
            }]), t;
        }();
        _t.POOL = ht._createArray();
        var dt = function () {
            function t() {
                _classCallCheck(this, t), this._mat = new f();
            }
            return _createClass(t, [{
                key: "isSaveMark",
                value: function () {
                    return !1;
                }
            }, {
                key: "restore",
                value: function (e) {
                    this._mat.copyTo(e._curMat), t.POOL[t.POOL._length++] = this;
                }
            }], [{
                key: "save",
                value: function (e) {
                    var i = t.POOL, n = i._length &gt; 0 ? i[--i._length] : new t();
                    e._curMat.copyTo(n._mat);
                    var r = e._save;
                    r[r._length++] = n;
                }
            }]), t;
        }();
        dt.POOL = ht._createArray();
        var ft = function () {
            function t() {
                _classCallCheck(this, t), this._nativeVertexArrayObject = y.layaGPUInstance.createVertexArray();
            }
            return _createClass(t, [{
                key: "bind",
                value: function () {
                    t._curBindedBufferState !== this &amp;&amp; (y.layaGPUInstance.bindVertexArray(this._nativeVertexArrayObject),
                        t._curBindedBufferState = this);
                }
            }, {
                key: "unBind",
                value: function () {
                    if (t._curBindedBufferState !== this) throw "BufferState: must call bind() function first.";
                    y.layaGPUInstance.bindVertexArray(null), t._curBindedBufferState = null;
                }
            }, {
                key: "destroy",
                value: function () {
                    y.layaGPUInstance.deleteVertexArray(this._nativeVertexArrayObject);
                }
            }, {
                key: "bindForNative",
                value: function () {
                    y.instance.bindVertexArray(this._nativeVertexArrayObject), t._curBindedBufferState = this;
                }
            }, {
                key: "unBindForNative",
                value: function () {
                    y.instance.bindVertexArray(null), t._curBindedBufferState = null;
                }
            }]), t;
        }(), vt = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                return _classCallCheck(this, i), e.call(this);
            }
            return i;
        }(ft), pt = function () {
            function t() {
                _classCallCheck(this, t), this._byteLength = 0, this._glBuffer = y.instance.createBuffer();
            }
            return _createClass(t, [{
                key: "_bindForVAO",
                value: function () { }
            }, {
                key: "bind",
                value: function () {
                    return !1;
                }
            }, {
                key: "destroy",
                value: function () {
                    this._glBuffer &amp;&amp; (y.instance.deleteBuffer(this._glBuffer), this._glBuffer = null);
                }
            }, {
                key: "bufferUsage",
                get: function () {
                    return this._bufferUsage;
                }
            }]), t;
        }(), yt = function t() {
            _classCallCheck(this, t);
        };
        yt.loopStTm = 0, yt.loopCount = 0;
        var gt = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.call(this))._maxsize = 0, t._upload = !0,
                    t._uploadSize = 0, t._bufferSize = 0, t._u8Array = null, t;
            }
            return _createClass(i, [{
                key: "setByteLength",
                value: function (t) {
                    this._byteLength !== t &amp;&amp; (t &lt;= this._bufferSize || this._resizeBuffer(2 * t + 256, !0),
                        this._byteLength = t);
                }
            }, {
                key: "needSize",
                value: function (t) {
                    var e = this._byteLength;
                    if (t) {
                        var i = this._byteLength + t;
                        i &lt;= this._bufferSize || this._resizeBuffer(i &lt;&lt; 1, !0), this._byteLength = i;
                    }
                    return e;
                }
            }, {
                key: "_bufferData",
                value: function () {
                    this._maxsize = Math.max(this._maxsize, this._byteLength), yt.loopCount % 30 == 0 &amp;&amp; (this._buffer.byteLength &gt; this._maxsize + 64 &amp;&amp; (this._buffer = this._buffer.slice(0, this._maxsize + 64),
                        this._bufferSize = this._buffer.byteLength, this._checkArrayUse()), this._maxsize = this._byteLength),
                        this._uploadSize &lt; this._buffer.byteLength &amp;&amp; (this._uploadSize = this._buffer.byteLength,
                            y.instance.bufferData(this._bufferType, this._uploadSize, this._bufferUsage)), y.instance.bufferSubData(this._bufferType, 0, new Uint8Array(this._buffer, 0, this._byteLength));
                }
            }, {
                key: "_bufferSubData",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0;
                    if (this._maxsize = Math.max(this._maxsize, this._byteLength), yt.loopCount % 30 == 0 &amp;&amp; (this._buffer.byteLength &gt; this._maxsize + 64 &amp;&amp; (this._buffer = this._buffer.slice(0, this._maxsize + 64),
                        this._bufferSize = this._buffer.byteLength, this._checkArrayUse()), this._maxsize = this._byteLength),
                        this._uploadSize &lt; this._buffer.byteLength &amp;&amp; (this._uploadSize = this._buffer.byteLength,
                            y.instance.bufferData(this._bufferType, this._uploadSize, this._bufferUsage)), e || i) {
                        var n = this._buffer.slice(e, i);
                        y.instance.bufferSubData(this._bufferType, t, n);
                    } else y.instance.bufferSubData(this._bufferType, t, this._buffer);
                }
            }, {
                key: "_checkArrayUse",
                value: function () { }
            }, {
                key: "_bind_uploadForVAO",
                value: function () {
                    return !!this._upload &amp;&amp; (this._upload = !1, this._bindForVAO(), this._bufferData(),
                        !0);
                }
            }, {
                key: "_bind_upload",
                value: function () {
                    return !!this._upload &amp;&amp; (this._upload = !1, this.bind(), this._bufferData(), !0);
                }
            }, {
                key: "_bind_subUpload",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0;
                    return !!this._upload &amp;&amp; (this._upload = !1, this.bind(), this._bufferSubData(t, e, i),
                        !0);
                }
            }, {
                key: "_resizeBuffer",
                value: function (t, e) {
                    var i = this._buffer;
                    if (t &lt;= i.byteLength) return this;
                    var n = this._u8Array;
                    if (e &amp;&amp; i &amp;&amp; i.byteLength &gt; 0) {
                        var r = new ArrayBuffer(t), s = n &amp;&amp; n.buffer == i ? n : new Uint8Array(i);
                        (n = this._u8Array = new Uint8Array(r)).set(s, 0), i = this._buffer = r;
                    } else i = this._buffer = new ArrayBuffer(t), this._u8Array = null;
                    return this._checkArrayUse(), this._upload = !0, this._bufferSize = i.byteLength,
                        this;
                }
            }, {
                key: "append",
                value: function (t) {
                    var e, i;
                    this._upload = !0, e = t.byteLength, t instanceof Uint8Array ? (this._resizeBuffer(this._byteLength + e, !0),
                        i = new Uint8Array(this._buffer, this._byteLength)) : t instanceof Uint16Array ? (this._resizeBuffer(this._byteLength + e, !0),
                            i = new Uint16Array(this._buffer, this._byteLength)) : t instanceof Float32Array &amp;&amp; (this._resizeBuffer(this._byteLength + e, !0),
                                i = new Float32Array(this._buffer, this._byteLength)), i.set(t, 0), this._byteLength += e,
                        this._checkArrayUse();
                }
            }, {
                key: "appendU16Array",
                value: function (t, e) {
                    this._resizeBuffer(this._byteLength + 2 * e, !0);
                    var i = new Uint16Array(this._buffer, this._byteLength, e);
                    if (6 == e) i[0] = t[0], i[1] = t[1], i[2] = t[2], i[3] = t[3], i[4] = t[4], i[5] = t[5]; else if (e &gt;= 100) i.set(new Uint16Array(t.buffer, 0, e)); else for (var n = 0; n &lt; e; n++) i[n] = t[n];
                    this._byteLength += 2 * e, this._checkArrayUse();
                }
            }, {
                key: "appendEx",
                value: function (t, e) {
                    var i;
                    this._upload = !0, i = t.byteLength, this._resizeBuffer(this._byteLength + i, !0),
                        new e(this._buffer, this._byteLength).set(t, 0), this._byteLength += i, this._checkArrayUse();
                }
            }, {
                key: "appendEx2",
                value: function (t, e, i) {
                    var n, r, s, a = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 1;
                    for (this._upload = !0, n = i * a, this._resizeBuffer(this._byteLength + n, !0),
                        r = new e(this._buffer, this._byteLength), s = 0; s &lt; i; s++) r[s] = t[s];
                    this._byteLength += n, this._checkArrayUse();
                }
            }, {
                key: "getBuffer",
                value: function () {
                    return this._buffer;
                }
            }, {
                key: "setNeedUpload",
                value: function () {
                    this._upload = !0;
                }
            }, {
                key: "getNeedUpload",
                value: function () {
                    return this._upload;
                }
            }, {
                key: "upload",
                value: function () {
                    var t = y.instance, e = this._bind_upload();
                    return t.bindBuffer(this._bufferType, null), this._bufferType == t.ARRAY_BUFFER &amp;&amp; (pt._bindedVertexBuffer = null),
                        this._bufferType == t.ELEMENT_ARRAY_BUFFER &amp;&amp; (pt._bindedIndexBuffer = null), P.activeShader = null,
                        e;
                }
            }, {
                key: "subUpload",
                value: function () {
                    var t = y.instance, e = this._bind_subUpload();
                    return t.bindBuffer(this._bufferType, null), this._bufferType == t.ARRAY_BUFFER &amp;&amp; (pt._bindedVertexBuffer = null),
                        this._bufferType == t.ELEMENT_ARRAY_BUFFER &amp;&amp; (pt._bindedIndexBuffer = null), P.activeShader = null,
                        e;
                }
            }, {
                key: "_disposeResource",
                value: function () {
                    this._upload = !0, this._uploadSize = 0;
                }
            }, {
                key: "clear",
                value: function () {
                    this._byteLength = 0, this._upload = !0;
                }
            }, {
                key: "bufferLength",
                get: function () {
                    return this._buffer.byteLength;
                }
            }, {
                key: "byteLength",
                set: function (t) {
                    this.setByteLength(t);
                }
            }], [{
                key: "__int__",
                value: function (t) { }
            }]), i;
        }(pt);
        gt.FLOAT32 = 4, gt.SHORT = 2;
        var mt = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t, n = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 35044;
                return _classCallCheck(this, i), (t = e.call(this))._bufferUsage = n, t._bufferType = y.instance.ELEMENT_ARRAY_BUFFER,
                    t._buffer = new ArrayBuffer(8), t;
            }
            return _createClass(i, [{
                key: "_checkArrayUse",
                value: function () {
                    this._uint16Array &amp;&amp; (this._uint16Array = new Uint16Array(this._buffer));
                }
            }, {
                key: "getUint16Array",
                value: function () {
                    return this._uint16Array || (this._uint16Array = new Uint16Array(this._buffer));
                }
            }, {
                key: "_bindForVAO",
                value: function () {
                    var t = y.instance;
                    t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, this._glBuffer);
                }
            }, {
                key: "bind",
                value: function () {
                    if (pt._bindedIndexBuffer !== this._glBuffer) {
                        var t = y.instance;
                        return t.bindBuffer(t.ELEMENT_ARRAY_BUFFER, this._glBuffer), pt._bindedIndexBuffer = this._glBuffer,
                            !0;
                    }
                    return !1;
                }
            }, {
                key: "destory",
                value: function () {
                    this._uint16Array = null, this._buffer = null;
                }
            }, {
                key: "disposeResource",
                value: function () {
                    this._disposeResource();
                }
            }]), i;
        }(gt);
        mt.create = function () {
            var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 35044;
            return new mt(t);
        };
        var Tt = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i(t, n) {
                var r;
                return _classCallCheck(this, i), (r = e.call(this))._vertexStride = t, r._bufferUsage = n,
                    r._bufferType = y.instance.ARRAY_BUFFER, r._buffer = new ArrayBuffer(8), r._floatArray32 = new Float32Array(r._buffer),
                    r._uint32Array = new Uint32Array(r._buffer), r;
            }
            return _createClass(i, [{
                key: "getFloat32Array",
                value: function () {
                    return this._floatArray32;
                }
            }, {
                key: "appendArray",
                value: function (t) {
                    var e = this._byteLength &gt;&gt; 2;
                    this.setByteLength(this._byteLength + 4 * t.length), this.getFloat32Array().set(t, e),
                        this._upload = !0;
                }
            }, {
                key: "_checkArrayUse",
                value: function () {
                    this._floatArray32 &amp;&amp; (this._floatArray32 = new Float32Array(this._buffer)), this._uint32Array &amp;&amp; (this._uint32Array = new Uint32Array(this._buffer));
                }
            }, {
                key: "deleteBuffer",
                value: function () {
                    _get(_getPrototypeOf(i.prototype), "_disposeResource", this).call(this);
                }
            }, {
                key: "_bindForVAO",
                value: function () {
                    var t = y.instance;
                    t.bindBuffer(t.ARRAY_BUFFER, this._glBuffer);
                }
            }, {
                key: "bind",
                value: function () {
                    if (pt._bindedVertexBuffer !== this._glBuffer) {
                        var t = y.instance;
                        return t.bindBuffer(t.ARRAY_BUFFER, this._glBuffer), pt._bindedVertexBuffer = this._glBuffer,
                            !0;
                    }
                    return !1;
                }
            }, {
                key: "destroy",
                value: function () {
                    _get(_getPrototypeOf(i.prototype), "destroy", this).call(this), this._byteLength = 0,
                        this._upload = !0, this._buffer = null, this._floatArray32 = null;
                }
            }, {
                key: "vertexStride",
                get: function () {
                    return this._vertexStride;
                }
            }]), i;
        }(gt);
        Tt.create = function (t) {
            var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 35048;
            return new Tt(t, e);
        };
        var kt = function () {
            function t(i, n, r) {
                _classCallCheck(this, t), this._stride = 0, this.vertNum = 0, this.indexNum = 0,
                    this._applied = !1, this._quadNum = 0, this.canReuse = !1, this._stride = i, this._vb = new Tt(i, y.instance.DYNAMIC_DRAW),
                    n ? this._vb._resizeBuffer(n, !1) : e.webGL2D_MeshAllocMaxMem &amp;&amp; this._vb._resizeBuffer(65536 * i, !1),
                    this._ib = new mt(), r &amp;&amp; this._ib._resizeBuffer(r, !1);
            }
            return _createClass(t, [{
                key: "cloneWithNewVB",
                value: function () {
                    var e = new t(this._stride, 0, 0);
                    return e._ib = this._ib, e._quadNum = this._quadNum, e._attribInfo = this._attribInfo,
                        e;
                }
            }, {
                key: "cloneWithNewVBIB",
                value: function () {
                    var e = new t(this._stride, 0, 0);
                    return e._attribInfo = this._attribInfo, e;
                }
            }, {
                key: "getVBW",
                value: function () {
                    return this._vb.setNeedUpload(), this._vb;
                }
            }, {
                key: "getVBR",
                value: function () {
                    return this._vb;
                }
            }, {
                key: "getIBR",
                value: function () {
                    return this._ib;
                }
            }, {
                key: "getIBW",
                value: function () {
                    return this._ib.setNeedUpload(), this._ib;
                }
            }, {
                key: "createQuadIB",
                value: function (t) {
                    this._quadNum = t, this._ib._resizeBuffer(6 * t * 2, !1), this._ib.byteLength = this._ib.bufferLength;
                    for (var e = this._ib.getUint16Array(), i = 0, n = 0, r = 0; r &lt; t; r++) e[i++] = n,
                        e[i++] = n + 2, e[i++] = n + 1, e[i++] = n, e[i++] = n + 3, e[i++] = n + 2, n += 4;
                    this._ib.setNeedUpload();
                }
            }, {
                key: "setAttributes",
                value: function (t) {
                    if (this._attribInfo = t, this._attribInfo.length % 3 != 0) throw "Mesh2D setAttributes error!";
                }
            }, {
                key: "configVAO",
                value: function (t) {
                    if (!this._applied) {
                        this._applied = !0, this._vao || (this._vao = new vt()), this._vao.bind(), this._vb._bindForVAO(),
                            this._ib.setNeedUpload(), this._ib._bind_uploadForVAO();
                        for (var e = this._attribInfo.length / 3, i = 0, n = 0; n &lt; e; n++) {
                            var r = this._attribInfo[i + 1], s = this._attribInfo[i], a = this._attribInfo[i + 2];
                            t.enableVertexAttribArray(n), t.vertexAttribPointer(n, r, s, !1, this._stride, a),
                                i += 3;
                        }
                        this._vao.unBind();
                    }
                }
            }, {
                key: "useMesh",
                value: function (t) {
                    this._applied || this.configVAO(t), this._vao.bind(), this._vb.bind(), this._ib._bind_upload() || this._ib.bind(),
                        this._vb._bind_upload() || this._vb.bind();
                }
            }, {
                key: "getEleNum",
                value: function () {
                    return this._ib.getBuffer().byteLength / 2;
                }
            }, {
                key: "releaseMesh",
                value: function () { }
            }, {
                key: "destroy",
                value: function () { }
            }, {
                key: "clearVB",
                value: function () {
                    this._vb.clear();
                }
            }]), t;
        }();
        kt._gvaoid = 0;
        var xt = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.call(this, i.const_stride, 4, 4)).canReuse = !0,
                    t.setAttributes(i._fixattriInfo), i._fixib ? (t._ib = i._fixib, t._quadNum = i._maxIB) : (t.createQuadIB(i._maxIB),
                        i._fixib = t._ib), t;
            }
            return _createClass(i, [{
                key: "releaseMesh",
                value: function () {
                    this._vb.setByteLength(0), this.vertNum = 0, this.indexNum = 0, i._POOL.push(this);
                }
            }, {
                key: "destroy",
                value: function () {
                    this._vb.destroy(), this._vb.deleteBuffer();
                }
            }, {
                key: "addQuad",
                value: function (t, e, n, r) {
                    var s = this._vb, a = s._byteLength &gt;&gt; 2;
                    s.setByteLength(a + i.const_stride &lt;&lt; 2);
                    var o = s._floatArray32 || s.getFloat32Array(), l = s._uint32Array, h = a, u = r ? 255 : 0;
                    o[h++] = t[0], o[h++] = t[1], o[h++] = e[0], o[h++] = e[1], l[h++] = n, l[h++] = u,
                        o[h++] = t[2], o[h++] = t[3], o[h++] = e[2], o[h++] = e[3], l[h++] = n, l[h++] = u,
                        o[h++] = t[4], o[h++] = t[5], o[h++] = e[4], o[h++] = e[5], l[h++] = n, l[h++] = u,
                        o[h++] = t[6], o[h++] = t[7], o[h++] = e[6], o[h++] = e[7], l[h++] = n, l[h++] = u,
                        s._upload = !0;
                }
            }], [{
                key: "__int__",
                value: function () {
                    i._fixattriInfo = [5126, 4, 0, 5121, 4, 16, 5121, 4, 20];
                }
            }, {
                key: "getAMesh",
                value: function (t) {
                    var e = null;
                    return e = i._POOL.length ? i._POOL.pop() : new i(), t &amp;&amp; e._vb._resizeBuffer(65536 * i.const_stride, !1),
                        e;
                }
            }]), i;
        }(kt);
        xt.const_stride = 24, xt._maxIB = 16384, xt._POOL = [];
        var Ct = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.call(this, i.const_stride, 4, 4)).canReuse = !0,
                    t.setAttributes(i._fixattriInfo), t;
            }
            return _createClass(i, [{
                key: "addData",
                value: function (t, e, n, r, s) {
                    var a = this._vb, o = this._ib, l = t.length &gt;&gt; 1, h = a.needSize(l * i.const_stride) &gt;&gt; 2, u = a._floatArray32 || a.getFloat32Array(), c = a._uint32Array, _ = 0, d = r.a, f = r.b, v = r.c, p = r.d, y = r.tx, g = r.ty, m = 0;
                    for (m = 0; m &lt; l; m++) {
                        var T = t[_], k = t[_ + 1];
                        u[h] = T * d + k * v + y, u[h + 1] = T * f + k * p + g, u[h + 2] = e[_], u[h + 3] = e[_ + 1],
                            c[h + 4] = s, c[h + 5] = 255, h += 6, _ += 2;
                    }
                    a.setNeedUpload();
                    var x = this.vertNum, C = n.length, E = o.needSize(n.byteLength), b = o.getUint16Array(), w = E &gt;&gt; 1;
                    if (x &gt; 0) {
                        var R = w + C, A = 0;
                        for (m = w; m &lt; R; m++, A++) b[m] = n[A] + x;
                    } else b.set(n, w);
                    o.setNeedUpload(), this.vertNum += l, this.indexNum += n.length;
                }
            }, {
                key: "releaseMesh",
                value: function () {
                    this._vb.setByteLength(0), this._ib.setByteLength(0), this.vertNum = 0, this.indexNum = 0,
                        i._POOL.push(this);
                }
            }, {
                key: "destroy",
                value: function () {
                    this._ib.destroy(), this._vb.destroy(), this._ib.disposeResource(), this._vb.deleteBuffer();
                }
            }], [{
                key: "__init__",
                value: function () {
                    i._fixattriInfo = [5126, 4, 0, 5121, 4, 16, 5121, 4, 20];
                }
            }, {
                key: "getAMesh",
                value: function (t) {
                    var e;
                    return e = i._POOL.length ? i._POOL.pop() : new i(), t &amp;&amp; e._vb._resizeBuffer(65536 * i.const_stride, !1),
                        e;
                }
            }]), i;
        }(kt);
        Ct.const_stride = 24, Ct._POOL = [];
        var Et = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.call(this, i.const_stride, 4, 4)).canReuse = !0,
                    t.setAttributes(i._fixattriInfo), t;
            }
            return _createClass(i, [{
                key: "addVertAndIBToMesh",
                value: function (t, e, n, r) {
                    for (var s = this._vb.needSize(e.length / 2 * i.const_stride) &gt;&gt; 2, a = this._vb._floatArray32 || this._vb.getFloat32Array(), o = this._vb._uint32Array, l = 0, h = e.length / 2, u = 0; u &lt; h; u++) a[s++] = e[l],
                        a[s++] = e[l + 1], l += 2, o[s++] = n;
                    this._vb.setNeedUpload(), this._ib.append(new Uint16Array(r)), this._ib.setNeedUpload(),
                        this.vertNum += h, this.indexNum += r.length;
                }
            }, {
                key: "releaseMesh",
                value: function () {
                    this._vb.setByteLength(0), this._ib.setByteLength(0), this.vertNum = 0, this.indexNum = 0,
                        i._POOL.push(this);
                }
            }, {
                key: "destroy",
                value: function () {
                    this._ib.destroy(), this._vb.destroy(), this._ib.disposeResource(), this._vb.deleteBuffer();
                }
            }], [{
                key: "__init__",
                value: function () {
                    i._fixattriInfo = [5126, 2, 0, 5121, 4, 8];
                }
            }, {
                key: "getAMesh",
                value: function (t) {
                    var e;
                    return e = i._POOL.length ? i._POOL.pop() : new i(), t &amp;&amp; e._vb._resizeBuffer(65536 * i.const_stride, !1),
                        e;
                }
            }]), i;
        }(kt);
        Et.const_stride = 12, Et._POOL = [];
        var bt = function () {
            function t(e, i) {
                _classCallCheck(this, t), this.submitStartPos = 0, this.submitEndPos = 0, this.context = null,
                    this.touches = [], this.submits = [], this.sprite = null, this.meshlist = [], this.cachedClipInfo = new f(),
                    this.oldTx = 0, this.oldTy = 0, this.invMat = new f(), this.context = e, this.sprite = i,
                    e._globalClipMatrix.copyTo(this.cachedClipInfo);
            }
            return _createClass(t, [{
                key: "startRec",
                value: function () {
                    this.context._charSubmitCache._enable &amp;&amp; (this.context._charSubmitCache.enable(!1, this.context),
                        this.context._charSubmitCache.enable(!0, this.context)), this.context._incache = !0,
                        this.touches.length = 0, this.context.touches = this.touches, this.context._globalClipMatrix.copyTo(this.cachedClipInfo),
                        this.submits.length = 0, this.submitStartPos = this.context._submits._length;
                    for (var t = 0, e = this.meshlist.length; t &lt; e; t++) {
                        var i = this.meshlist[t];
                        i.canReuse ? i.releaseMesh() : i.destroy();
                    }
                    this.meshlist.length = 0, this._mesh = xt.getAMesh(!1), this._pathMesh = Et.getAMesh(!1),
                        this._triangleMesh = Ct.getAMesh(!1), this.meshlist.push(this._mesh), this.meshlist.push(this._pathMesh),
                        this.meshlist.push(this._triangleMesh), this.context._curSubmit = lt.RENDERBASE,
                        this._oldMesh = this.context._mesh, this._oldPathMesh = this.context._pathMesh,
                        this._oldTriMesh = this.context._triangleMesh, this._oldMeshList = this.context.meshlist,
                        this.context._mesh = this._mesh, this.context._pathMesh = this._pathMesh, this.context._triangleMesh = this._triangleMesh,
                        this.context.meshlist = this.meshlist, this.oldTx = this.context._curMat.tx, this.oldTy = this.context._curMat.ty,
                        this.context._curMat.tx = 0, this.context._curMat.ty = 0, this.context._curMat.copyTo(this.invMat),
                        this.invMat.invert();
                }
            }, {
                key: "endRec",
                value: function () {
                    this.context._charSubmitCache._enable &amp;&amp; (this.context._charSubmitCache.enable(!1, this.context),
                        this.context._charSubmitCache.enable(!0, this.context));
                    var t = this.context._submits;
                    this.submitEndPos = t._length;
                    for (var e = this.submitEndPos - this.submitStartPos, i = 0; i &lt; e; i++) this.submits.push(t[this.submitStartPos + i]);
                    t._length -= e, this.context._mesh = this._oldMesh, this.context._pathMesh = this._oldPathMesh,
                        this.context._triangleMesh = this._oldTriMesh, this.context.meshlist = this._oldMeshList,
                        this.context._curSubmit = lt.RENDERBASE, this.context._curMat.tx = this.oldTx, this.context._curMat.ty = this.oldTy,
                        this.context.touches = null, this.context._incache = !1;
                }
            }, {
                key: "isCacheValid",
                value: function () {
                    var t = this.context._globalClipMatrix;
                    return t.a == this.cachedClipInfo.a &amp;&amp; t.b == this.cachedClipInfo.b &amp;&amp; t.c == this.cachedClipInfo.c &amp;&amp; t.d == this.cachedClipInfo.d &amp;&amp; t.tx == this.cachedClipInfo.tx &amp;&amp; t.ty == this.cachedClipInfo.ty;
                }
            }, {
                key: "flushsubmit",
                value: function () {
                    var t = lt.RENDERBASE;
                    this.submits.forEach(function (e) {
                        e != lt.RENDERBASE &amp;&amp; (lt.preRender = t, t = e, e.renderSubmit());
                    });
                }
            }, {
                key: "releaseMem",
                value: function () { }
            }]), t;
        }();
        bt.matI = new f();
        var wt = function () {
            function t() {
                _classCallCheck(this, t), this.ALPHA = 1, this.defines = new N(), this.shaderType = 0,
                    this.fillStyle = st.DEFAULT, this.strokeStyle = st.DEFAULT;
            }
            return _createClass(t, [{
                key: "destroy",
                value: function () {
                    this.defines = null, this.filters = null;
                }
            }], [{
                key: "__init__",
                value: function () {
                    W.preCompile2D(0, N.TEXTURE2D, "/*\r\n\ttextureå’Œfillrectä½¿ç”¨çš„ã€‚\r\n*/\r\nattribute vec4 posuv;\r\nattribute vec4 attribColor;\r\nattribute vec4 attribFlags;\r\n//attribute vec4 clipDir;\r\n//attribute vec2 clipRect;\r\nuniform vec4 clipMatDir;\r\nuniform vec2 clipMatPos;\t\t// è¿™ä¸ªæ˜¯å…¨å±€çš„ï¼Œä¸ç”¨å†åº”ç”¨çŸ©é˜µäº†ã€‚\r\nvarying vec2 cliped;\r\nuniform vec2 size;\r\nuniform vec2 clipOff;\t\t\t// ä½¿ç”¨è¦æŠŠclipåç§»ã€‚cacheas normalç”¨. åªç”¨äº†[0]\r\n#ifdef WORLDMAT\r\n\tuniform mat4 mmat;\r\n#endif\r\n#ifdef MVP3D\r\n\tuniform mat4 u_MvpMatrix;\r\n#endif\r\nvarying vec4 v_texcoordAlpha;\r\nvarying vec4 v_color;\r\nvarying float v_useTex;\r\n\r\nvoid main() {\r\n\r\n\tvec4 pos = vec4(posuv.xy,0.,1.);\r\n#ifdef WORLDMAT\r\n\tpos=mmat*pos;\r\n#endif\r\n\tvec4 pos1  =vec4((pos.x/size.x-0.5)*2.0,(0.5-pos.y/size.y)*2.0,0.,1.0);\r\n#ifdef MVP3D\r\n\tgl_Position=u_MvpMatrix*pos1;\r\n#else\r\n\tgl_Position=pos1;\r\n#endif\r\n\tv_texcoordAlpha.xy = posuv.zw;\r\n\t//v_texcoordAlpha.z = attribColor.a/255.0;\r\n\tv_color = attribColor/255.0;\r\n\tv_color.xyz*=v_color.w;//åæ­£åŽé¢ä¹Ÿè¦é¢„ä¹˜\r\n\t\r\n\tv_useTex = attribFlags.r/255.0;\r\n\tfloat clipw = length(clipMatDir.xy);\r\n\tfloat cliph = length(clipMatDir.zw);\r\n\t\r\n\tvec2 clpos = clipMatPos.xy;\r\n\t#ifdef WORLDMAT\r\n\t\t// å¦‚æžœæœ‰mmatï¼Œéœ€è¦ä¿®æ”¹clipMatPos,å›&nbsp;ä¸º è¿™æ˜¯cacheas normal ï¼ˆå¦‚æžœä¸æ˜¯å°±é”™äº†ï¼‰ï¼Œ clipMatPosè¢«åŽ»æŽ‰äº†åç§»\r\n\t\tif(clipOff[0]&gt;0.0){\r\n\t\t\tclpos.x+=mmat[3].x;\t//tx\tæœ€ç®€å•å¤„ç†\r\n\t\t\tclpos.y+=mmat[3].y;\t//ty\r\n\t\t}\r\n\t#endif\r\n\tvec2 clippos = pos.xy - clpos;\t//poså·²ç»åº”ç”¨çŸ©é˜µäº†ï¼Œä¸ºäº†å‡çš„æœ‰æ„ä¹‰ï¼Œclipçš„ä½ç½®ä¹Ÿè¦ç¼©æ”¾\r\n\tif(clipw&gt;20000. &amp;&amp; cliph&gt;20000.)\r\n\t\tcliped = vec2(0.5,0.5);\r\n\telse {\r\n\t\t//è½¬æˆ0åˆ°1ä¹‹é—´ã€‚/clipw/clipw è¡¨ç¤ºclipposä¸Žnormalizeä¹‹åŽçš„clipæœå‘ç‚¹ç§¯ä¹‹åŽï¼Œå†é™¤ä»¥clipw\r\n\t\tcliped=vec2( dot(clippos,clipMatDir.xy)/clipw/clipw, dot(clippos,clipMatDir.zw)/cliph/cliph);\r\n\t}\r\n\r\n}", "/*\r\n\ttextureå’Œfillrectä½¿ç”¨çš„ã€‚\r\n*/\r\n#ifdef GL_FRAGMENT_PRECISION_HIGH\r\nprecision highp float;\r\n#else\r\nprecision mediump float;\r\n#endif\r\n\r\nvarying vec4 v_texcoordAlpha;\r\nvarying vec4 v_color;\r\nvarying float v_useTex;\r\nuniform sampler2D texture;\r\nvarying vec2 cliped;\r\n\r\n#ifdef BLUR_FILTER\r\nuniform vec4 strength_sig2_2sig2_gauss1;\r\nuniform vec2 blurInfo;\r\n\r\n#define PI 3.141593\r\n\r\nfloat getGaussian(float x, float y){\r\n    return strength_sig2_2sig2_gauss1.w*exp(-(x*x+y*y)/strength_sig2_2sig2_gauss1.z);\r\n}\r\n\r\nvec4 blur(){\r\n    const float blurw = 9.0;\r\n    vec4 vec4Color = vec4(0.0,0.0,0.0,0.0);\r\n    vec2 halfsz=vec2(blurw,blurw)/2.0/blurInfo;    \r\n    vec2 startpos=v_texcoordAlpha.xy-halfsz;\r\n    vec2 ctexcoord = startpos;\r\n    vec2 step = 1.0/blurInfo;  //æ¯ä¸ªåƒç´&nbsp;      \r\n    \r\n    for(float y = 0.0;y&lt;=blurw; ++y){\r\n        ctexcoord.x=startpos.x;\r\n        for(float x = 0.0;x&lt;=blurw; ++x){\r\n            //TODO çº¹ç†åæ&nbsp;‡çš„å›ºå®šåç§»åº”è¯¥åœ¨vsä¸­å¤„ç†\r\n            vec4Color += texture2D(texture, ctexcoord)*getGaussian(x-blurw/2.0,y-blurw/2.0);\r\n            ctexcoord.x+=step.x;\r\n        }\r\n        ctexcoord.y+=step.y;\r\n    }\r\n    return vec4Color;\r\n}\r\n#endif\r\n\r\n#ifdef COLOR_FILTER\r\nuniform vec4 colorAlpha;\r\nuniform mat4 colorMat;\r\n#endif\r\n\r\n#ifdef GLOW_FILTER\r\nuniform vec4 u_color;\r\nuniform vec4 u_blurInfo1;\r\nuniform vec4 u_blurInfo2;\r\n#endif\r\n\r\n#ifdef COLOR_ADD\r\nuniform vec4 colorAdd;\r\n#endif\r\n\r\n#ifdef FILLTEXTURE\t\r\nuniform vec4 u_TexRange;//startu,startv,urange, vrange\r\n#endif\r\nvoid main() {\r\n\tif(cliped.x&lt;0.) discard;\r\n\tif(cliped.x&gt;1.) discard;\r\n\tif(cliped.y&lt;0.) discard;\r\n\tif(cliped.y&gt;1.) discard;\r\n\t\r\n#ifdef FILLTEXTURE\t\r\n   vec4 color= texture2D(texture, fract(v_texcoordAlpha.xy)*u_TexRange.zw + u_TexRange.xy);\r\n#else\r\n   vec4 color= texture2D(texture, v_texcoordAlpha.xy);\r\n#endif\r\n\r\n   if(v_useTex&lt;=0.)color = vec4(1.,1.,1.,1.);\r\n   color.a*=v_color.w;\r\n   //color.rgb*=v_color.w;\r\n   color.rgb*=v_color.rgb;\r\n   gl_FragColor=color;\r\n   \r\n   #ifdef COLOR_ADD\r\n\tgl_FragColor = vec4(colorAdd.rgb,colorAdd.a*gl_FragColor.a);\r\n\tgl_FragColor.xyz *= colorAdd.a;\r\n   #endif\r\n   \r\n   #ifdef BLUR_FILTER\r\n\tgl_FragColor =   blur();\r\n\tgl_FragColor.w*=v_color.w;   \r\n   #endif\r\n   \r\n   #ifdef COLOR_FILTER\r\n\tmat4 alphaMat =colorMat;\r\n\r\n\talphaMat[0][3] *= gl_FragColor.a;\r\n\talphaMat[1][3] *= gl_FragColor.a;\r\n\talphaMat[2][3] *= gl_FragColor.a;\r\n\r\n\tgl_FragColor = gl_FragColor * alphaMat;\r\n\tgl_FragColor += colorAlpha/255.0*gl_FragColor.a;\r\n   #endif\r\n   \r\n   #ifdef GLOW_FILTER\r\n\tconst float c_IterationTime = 10.0;\r\n\tfloat floatIterationTotalTime = c_IterationTime * c_IterationTime;\r\n\tvec4 vec4Color = vec4(0.0,0.0,0.0,0.0);\r\n\tvec2 vec2FilterDir = vec2(-(u_blurInfo1.z)/u_blurInfo2.x,-(u_blurInfo1.w)/u_blurInfo2.y);\r\n\tvec2 vec2FilterOff = vec2(u_blurInfo1.x/u_blurInfo2.x/c_IterationTime * 2.0,u_blurInfo1.y/u_blurInfo2.y/c_IterationTime * 2.0);\r\n\tfloat maxNum = u_blurInfo1.x * u_blurInfo1.y;\r\n\tvec2 vec2Off = vec2(0.0,0.0);\r\n\tfloat floatOff = c_IterationTime/2.0;\r\n\tfor(float i = 0.0;i&lt;=c_IterationTime; ++i){\r\n\t\tfor(float j = 0.0;j&lt;=c_IterationTime; ++j){\r\n\t\t\tvec2Off = vec2(vec2FilterOff.x * (i - floatOff),vec2FilterOff.y * (j - floatOff));\r\n\t\t\tvec4Color += texture2D(texture, v_texcoordAlpha.xy + vec2FilterDir + vec2Off)/floatIterationTotalTime;\r\n\t\t}\r\n\t}\r\n\tgl_FragColor = vec4(u_color.rgb,vec4Color.a * u_blurInfo2.z);\r\n\tgl_FragColor.rgb *= gl_FragColor.a;   \r\n   #endif\r\n   \r\n}", null),
                        W.preCompile2D(0, N.PRIMITIVE, "attribute vec4 position;\r\nattribute vec4 attribColor;\r\n//attribute vec4 clipDir;\r\n//attribute vec2 clipRect;\r\nuniform vec4 clipMatDir;\r\nuniform vec2 clipMatPos;\r\n#ifdef WORLDMAT\r\n\tuniform mat4 mmat;\r\n#endif\r\nuniform mat4 u_mmat2;\r\n//uniform vec2 u_pos;\r\nuniform vec2 size;\r\nvarying vec4 color;\r\n//vec4 dirxy=vec4(0.9,0.1, -0.1,0.9);\r\n//vec4 clip=vec4(100.,30.,300.,600.);\r\nvarying vec2 cliped;\r\nvoid main(){\r\n\t\r\n#ifdef WORLDMAT\r\n\tvec4 pos=mmat*vec4(position.xy,0.,1.);\r\n\tgl_Position =vec4((pos.x/size.x-0.5)*2.0,(0.5-pos.y/size.y)*2.0,pos.z,1.0);\r\n#else\r\n\tgl_Position =vec4((position.x/size.x-0.5)*2.0,(0.5-position.y/size.y)*2.0,position.z,1.0);\r\n#endif\t\r\n\tfloat clipw = length(clipMatDir.xy);\r\n\tfloat cliph = length(clipMatDir.zw);\r\n\tvec2 clippos = position.xy - clipMatPos.xy;\t//poså·²ç»åº”ç”¨çŸ©é˜µäº†ï¼Œä¸ºäº†å‡çš„æœ‰æ„ä¹‰ï¼Œclipçš„ä½ç½®ä¹Ÿè¦ç¼©æ”¾\r\n\tif(clipw&gt;20000. &amp;&amp; cliph&gt;20000.)\r\n\t\tcliped = vec2(0.5,0.5);\r\n\telse {\r\n\t\t//clipdiræ˜¯å¸¦ç¼©æ”¾çš„æ–¹å‘ï¼Œç”±äºŽä¸Šé¢clipposæ˜¯åœ¨ç¼©æ”¾åŽçš„ç©ºé—´è®¡ç®—çš„ï¼Œæ‰€ä»¥éœ€è¦æŠŠæ–¹å‘å…ˆnormalizeä¸€ä¸‹\r\n\t\tcliped=vec2( dot(clippos,clipMatDir.xy)/clipw/clipw, dot(clippos,clipMatDir.zw)/cliph/cliph);\r\n\t}\r\n  //pos2d.x = dot(clippos,dirx);\r\n  color=attribColor/255.;\r\n}", "precision mediump float;\r\n//precision mediump float;\r\nvarying vec4 color;\r\n//uniform float alpha;\r\nvarying vec2 cliped;\r\nvoid main(){\r\n\t//vec4 a=vec4(color.r, color.g, color.b, 1);\r\n\t//a.a*=alpha;\r\n    gl_FragColor= color;// vec4(color.r, color.g, color.b, alpha);\r\n\tgl_FragColor.rgb*=color.a;\r\n\tif(cliped.x&lt;0.) discard;\r\n\tif(cliped.x&gt;1.) discard;\r\n\tif(cliped.y&lt;0.) discard;\r\n\tif(cliped.y&gt;1.) discard;\r\n}", null),
                        W.preCompile2D(0, N.SKINMESH, "attribute vec2 position;\r\nattribute vec2 texcoord;\r\nattribute vec4 color;\r\nuniform vec2 size;\r\nuniform float offsetX;\r\nuniform float offsetY;\r\nuniform mat4 mmat;\r\nuniform mat4 u_mmat2;\r\nvarying vec2 v_texcoord;\r\nvarying vec4 v_color;\r\nvoid main() {\r\n  vec4 pos=mmat*u_mmat2*vec4(offsetX+position.x,offsetY+position.y,0,1 );\r\n  gl_Position = vec4((pos.x/size.x-0.5)*2.0,(0.5-pos.y/size.y)*2.0,pos.z,1.0);\r\n  v_color = color;\r\n  v_color.rgb *= v_color.a;\r\n  v_texcoord = texcoord;  \r\n}", "precision mediump float;\r\nvarying vec2 v_texcoord;\r\nvarying vec4 v_color;\r\nuniform sampler2D texture;\r\nuniform float alpha;\r\nvoid main() {\r\n\tvec4 t_color = texture2D(texture, v_texcoord);\r\n\tgl_FragColor = t_color.rgba * v_color;\r\n\tgl_FragColor *= alpha;\r\n}", null);
                }
            }]), t;
        }(), Rt = function () {
            function t() {
                _classCallCheck(this, t);
                var e = y.instance;
                this.ib = mt.create(e.DYNAMIC_DRAW), this.vb = Tt.create(8);
            }
            return _createClass(t, [{
                key: "addSkinMesh",
                value: function (t) {
                    t.getData2(this.vb, this.ib, this.vb._byteLength / 32);
                }
            }, {
                key: "reset",
                value: function () {
                    this.vb.clear(), this.ib.clear();
                }
            }], [{
                key: "getInstance",
                value: function () {
                    return t.instance = t.instance || new t();
                }
            }]), t;
        }(), At = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "createLine2",
                value: function (e, i, n, r, s, a) {
                    if (e.length &lt; 4) return null;
                    var o = t.tempData.length &gt; e.length + 2 ? t.tempData : new Array(e.length + 2);
                    o[0] = e[0], o[1] = e[1];
                    var l = 2, h = 0, u = e.length;
                    for (h = 2; h &lt; u; h += 2) Math.abs(e[h] - e[h - 2]) + Math.abs(e[h + 1] - e[h - 1]) &gt; .01 &amp;&amp; (o[l++] = e[h],
                        o[l++] = e[h + 1]);
                    a &amp;&amp; Math.abs(e[0] - o[l - 2]) + Math.abs(e[1] - o[l - 1]) &gt; .01 &amp;&amp; (o[l++] = e[0],
                        o[l++] = e[1]);
                    var c = s;
                    u = l / 2;
                    var _, d, f, v, p, y, g, m, T, k, x, C, E, b, w, R, A, S, M, I, P = n / 2;
                    for (f = o[0], v = o[1], k = f - (p = o[2]), T = (T = -(v - (y = o[3]))) / (I = Math.sqrt(T * T + k * k)) * P,
                        k = k / I * P, c.push(f - T, v - k, f + T, v + k), h = 1; h &lt; u - 1; h++) f = o[2 * (h - 1)],
                            v = o[2 * (h - 1) + 1], p = o[2 * h], y = o[2 * h + 1], g = o[2 * (h + 1)], m = o[2 * (h + 1) + 1],
                            k = f - p, C = p - g, w = (-(T = (T = -(v - y)) / (I = Math.sqrt(T * T + k * k)) * P) + f) * (-(k = k / I * P) + y) - (-T + p) * (-k + v),
                            S = (-(x = (x = -(y - m)) / (I = Math.sqrt(x * x + C * C)) * P) + g) * (-(C = C / I * P) + y) - (-x + p) * (-C + m),
                            M = (E = -k + v - (-k + y)) * (A = -x + p - (-x + g)) - (R = -C + m - (-C + y)) * (b = -T + p - (-T + f)),
                            Math.abs(M) &lt; .1 ? (M += 10.1, c.push(p - T, y - k, p + T, y + k)) : (_ = (b * S - A * w) / M,
                                d = (R * w - E * S) / M, c.push(_, d, p - (_ - p), y - (d - y)));
                    for (f = o[l - 4], v = o[l - 3], k = f - (p = o[l - 2]), T = (T = -(v - (y = o[l - 1]))) / (I = Math.sqrt(T * T + k * k)) * P,
                        k = k / I * P, c.push(p - T, y - k, p + T, y + k), h = 1; h &lt; u; h++) i.push(r + 2 * (h - 1), r + 2 * (h - 1) + 1, r + 2 * h + 1, r + 2 * h + 1, r + 2 * h, r + 2 * (h - 1));
                    return c;
                }
            }, {
                key: "createLineTriangle",
                value: function (t, e, i, n, r, s, a) {
                    var o = t.slice(), l = o.length, h = o[0], u = o[1], c = o[2], _ = (o[2], 0), d = 0, f = 0, v = 0, p = l / 2;
                    if (!(p &lt;= 1) &amp;&amp; 2 != p) {
                        for (var y = new Array(4 * p), g = 0, m = 0, T = 0; T &lt; p - 1; T++) h = o[m++],
                            u = o[m++], c = o[m++], v = o[m++] - u, 0 != (f = c - h) &amp;&amp; 0 != v &amp;&amp; (_ = Math.sqrt(f * f + v * v)) &gt; .001 &amp;&amp; (y[d = 4 * g] = h,
                                y[d + 1] = u, y[d + 2] = f / _, y[d + 3] = v / _, g++);
                        for (n ? (h = o[l - 2], u = o[l - 1], c = o[0], v = o[1] - u, 0 != (f = c - h) &amp;&amp; 0 != v &amp;&amp; (_ = Math.sqrt(f * f + v * v)) &gt; .001 &amp;&amp; (y[d = 4 * g] = h,
                            y[d + 1] = u, y[d + 2] = f / _, y[d + 3] = v / _, g++)) : (y[d = 4 * g] = h, y[d + 1] = u,
                                y[d + 2] = f / _, y[d + 3] = v / _, g++), m = 0, T = 0; T &lt; p; T++) h = o[m], u = o[m + 1],
                                    c = o[m + 2], o[m + 3];
                    }
                }
            }]), t;
        }();
        At.tempData = new Array(256);
        var St = function t(e, i, n) {
            _classCallCheck(this, t), this.i = e, this.x = i, this.y = n, this.prev = null,
                this.next = null, this.z = null, this.prevZ = null, this.nextZ = null, this.steiner = !1;
        }, Mt = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "earcut",
                value: function (e, i, n) {
                    n = n || 2;
                    var r, s, a, o, l, h, u, c = i &amp;&amp; i.length, _ = c ? i[0] * n : e.length, d = t.linkedList(e, 0, _, n, !0), f = [];
                    if (!d) return f;
                    if (c &amp;&amp; (d = t.eliminateHoles(e, i, d, n)), e.length &gt; 80 * n) {
                        r = a = e[0], s = o = e[1];
                        for (var v = n; v &lt; _; v += n) (l = e[v]) &lt; r &amp;&amp; (r = l), (h = e[v + 1]) &lt; s &amp;&amp; (s = h),
                            l &gt; a &amp;&amp; (a = l), h &gt; o &amp;&amp; (o = h);
                        u = 0 !== (u = Math.max(a - r, o - s)) ? 1 / u : 0;
                    }
                    return t.earcutLinked(d, f, n, r, s, u), f;
                }
            }, {
                key: "linkedList",
                value: function (e, i, n, r, s) {
                    var a, o;
                    if (s === t.signedArea(e, i, n, r) &gt; 0) for (a = i; a &lt; n; a += r) o = t.insertNode(a, e[a], e[a + 1], o); else for (a = n - r; a &gt;= i; a -= r) o = t.insertNode(a, e[a], e[a + 1], o);
                    return o &amp;&amp; t.equals(o, o.next) &amp;&amp; (t.removeNode(o), o = o.next), o;
                }
            }, {
                key: "filterPoints",
                value: function (e, i) {
                    if (!e) return e;
                    i || (i = e);
                    var n, r = e;
                    do {
                        if (n = !1, r.steiner || !t.equals(r, r.next) &amp;&amp; 0 !== t.area(r.prev, r, r.next)) r = r.next; else {
                            if (t.removeNode(r), (r = i = r.prev) === r.next) break;
                            n = !0;
                        }
                    } while (n || r !== i);
                    return i;
                }
            }, {
                key: "earcutLinked",
                value: function (e, i, n, r, s, a) {
                    var o = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : null;
                    if (e) {
                        !o &amp;&amp; a &amp;&amp; t.indexCurve(e, r, s, a);
                        for (var l, h, u = e; e.prev !== e.next;) if (l = e.prev, h = e.next, a ? t.isEarHashed(e, r, s, a) : t.isEar(e)) i.push(l.i / n),
                            i.push(e.i / n), i.push(h.i / n), t.removeNode(e), e = h.next, u = h.next; else if ((e = h) === u) {
                                o ? 1 === o ? (e = t.cureLocalIntersections(e, i, n), t.earcutLinked(e, i, n, r, s, a, 2)) : 2 === o &amp;&amp; t.splitEarcut(e, i, n, r, s, a) : t.earcutLinked(t.filterPoints(e, null), i, n, r, s, a, 1);
                                break;
                            }
                    }
                }
            }, {
                key: "isEar",
                value: function (e) {
                    var i = e.prev, n = e, r = e.next;
                    if (t.area(i, n, r) &gt;= 0) return !1;
                    for (var s = e.next.next; s !== e.prev;) {
                        if (t.pointInTriangle(i.x, i.y, n.x, n.y, r.x, r.y, s.x, s.y) &amp;&amp; t.area(s.prev, s, s.next) &gt;= 0) return !1;
                        s = s.next;
                    }
                    return !0;
                }
            }, {
                key: "isEarHashed",
                value: function (e, i, n, r) {
                    var s = e.prev, a = e, o = e.next;
                    if (t.area(s, a, o) &gt;= 0) return !1;
                    for (var l = s.x &lt; a.x ? s.x &lt; o.x ? s.x : o.x : a.x &lt; o.x ? a.x : o.x, h = s.y &lt; a.y ? s.y &lt; o.y ? s.y : o.y : a.y &lt; o.y ? a.y : o.y, u = s.x &gt; a.x ? s.x &gt; o.x ? s.x : o.x : a.x &gt; o.x ? a.x : o.x, c = s.y &gt; a.y ? s.y &gt; o.y ? s.y : o.y : a.y &gt; o.y ? a.y : o.y, _ = t.zOrder(l, h, i, n, r), d = t.zOrder(u, c, i, n, r), f = e.nextZ; f &amp;&amp; f.z &lt;= d;) {
                        if (f !== e.prev &amp;&amp; f !== e.next &amp;&amp; t.pointInTriangle(s.x, s.y, a.x, a.y, o.x, o.y, f.x, f.y) &amp;&amp; t.area(f.prev, f, f.next) &gt;= 0) return !1;
                        f = f.nextZ;
                    }
                    for (f = e.prevZ; f &amp;&amp; f.z &gt;= _;) {
                        if (f !== e.prev &amp;&amp; f !== e.next &amp;&amp; t.pointInTriangle(s.x, s.y, a.x, a.y, o.x, o.y, f.x, f.y) &amp;&amp; t.area(f.prev, f, f.next) &gt;= 0) return !1;
                        f = f.prevZ;
                    }
                    return !0;
                }
            }, {
                key: "cureLocalIntersections",
                value: function (e, i, n) {
                    var r = e;
                    do {
                        var s = r.prev, a = r.next.next;
                        !t.equals(s, a) &amp;&amp; t.intersects(s, r, r.next, a) &amp;&amp; t.locallyInside(s, a) &amp;&amp; t.locallyInside(a, s) &amp;&amp; (i.push(s.i / n),
                            i.push(r.i / n), i.push(a.i / n), t.removeNode(r), t.removeNode(r.next), r = e = a),
                            r = r.next;
                    } while (r !== e);
                    return r;
                }
            }, {
                key: "splitEarcut",
                value: function (e, i, n, r, s, a) {
                    var o = e;
                    do {
                        for (var l = o.next.next; l !== o.prev;) {
                            if (o.i !== l.i &amp;&amp; t.isValidDiagonal(o, l)) {
                                var h = t.splitPolygon(o, l);
                                return o = t.filterPoints(o, o.next), h = t.filterPoints(h, h.next), t.earcutLinked(o, i, n, r, s, a),
                                    void t.earcutLinked(h, i, n, r, s, a);
                            }
                            l = l.next;
                        }
                        o = o.next;
                    } while (o !== e);
                }
            }, {
                key: "eliminateHoles",
                value: function (e, i, n, r) {
                    var s, a, o, l, h, u = [];
                    for (s = 0, a = i.length; s &lt; a; s++) o = i[s] * r, l = s &lt; a - 1 ? i[s + 1] * r : e.length,
                        (h = t.linkedList(e, o, l, r, !1)) === h.next &amp;&amp; (h.steiner = !0), u.push(t.getLeftmost(h));
                    for (u.sort(t.compareX), s = 0; s &lt; u.length; s++) t.eliminateHole(u[s], n), n = t.filterPoints(n, n.next);
                    return n;
                }
            }, {
                key: "compareX",
                value: function (t, e) {
                    return t.x - e.x;
                }
            }, {
                key: "eliminateHole",
                value: function (e, i) {
                    if (i = t.findHoleBridge(e, i)) {
                        var n = t.splitPolygon(i, e);
                        t.filterPoints(n, n.next);
                    }
                }
            }, {
                key: "findHoleBridge",
                value: function (e, i) {
                    var n, r = i, s = e.x, a = e.y, o = -1 / 0;
                    do {
                        if (a &lt;= r.y &amp;&amp; a &gt;= r.next.y &amp;&amp; r.next.y !== r.y) {
                            var l = r.x + (a - r.y) * (r.next.x - r.x) / (r.next.y - r.y);
                            if (l &lt;= s &amp;&amp; l &gt; o) {
                                if (o = l, l === s) {
                                    if (a === r.y) return r;
                                    if (a === r.next.y) return r.next;
                                }
                                n = r.x &lt; r.next.x ? r : r.next;
                            }
                        }
                        r = r.next;
                    } while (r !== i);
                    if (!n) return null;
                    if (s === o) return n.prev;
                    var h, u = n, c = n.x, _ = n.y, d = 1 / 0;
                    for (r = n.next; r !== u;) s &gt;= r.x &amp;&amp; r.x &gt;= c &amp;&amp; s !== r.x &amp;&amp; t.pointInTriangle(a &lt; _ ? s : o, a, c, _, a &lt; _ ? o : s, a, r.x, r.y) &amp;&amp; ((h = Math.abs(a - r.y) / (s - r.x)) &lt; d || h === d &amp;&amp; r.x &gt; n.x) &amp;&amp; t.locallyInside(r, e) &amp;&amp; (n = r,
                        d = h), r = r.next;
                    return n;
                }
            }, {
                key: "indexCurve",
                value: function (e, i, n, r) {
                    var s = e;
                    do {
                        null === s.z &amp;&amp; (s.z = t.zOrder(s.x, s.y, i, n, r)), s.prevZ = s.prev, s.nextZ = s.next,
                            s = s.next;
                    } while (s !== e);
                    s.prevZ.nextZ = null, s.prevZ = null, t.sortLinked(s);
                }
            }, {
                key: "sortLinked",
                value: function (t) {
                    var e, i, n, r, s, a, o, l, h = 1;
                    do {
                        for (i = t, t = null, s = null, a = 0; i;) {
                            for (a++, n = i, o = 0, e = 0; e &lt; h &amp;&amp; (o++, n = n.nextZ); e++);
                            for (l = h; o &gt; 0 || l &gt; 0 &amp;&amp; n;) 0 !== o &amp;&amp; (0 === l || !n || i.z &lt;= n.z) ? (r = i,
                                i = i.nextZ, o--) : (r = n, n = n.nextZ, l--), s ? s.nextZ = r : t = r, r.prevZ = s,
                                s = r;
                            i = n;
                        }
                        s.nextZ = null, h *= 2;
                    } while (a &gt; 1);
                    return t;
                }
            }, {
                key: "zOrder",
                value: function (t, e, i, n, r) {
                    return (t = 1431655765 &amp; ((t = 858993459 &amp; ((t = 252645135 &amp; ((t = 16711935 &amp; ((t = 32767 * (t - i) * r) | t &lt;&lt; 8)) | t &lt;&lt; 4)) | t &lt;&lt; 2)) | t &lt;&lt; 1)) | (e = 1431655765 &amp; ((e = 858993459 &amp; ((e = 252645135 &amp; ((e = 16711935 &amp; ((e = 32767 * (e - n) * r) | e &lt;&lt; 8)) | e &lt;&lt; 4)) | e &lt;&lt; 2)) | e &lt;&lt; 1)) &lt;&lt; 1;
                }
            }, {
                key: "getLeftmost",
                value: function (t) {
                    var e = t, i = t;
                    do {
                        e.x &lt; i.x &amp;&amp; (i = e), e = e.next;
                    } while (e !== t);
                    return i;
                }
            }, {
                key: "pointInTriangle",
                value: function (t, e, i, n, r, s, a, o) {
                    return (r - a) * (e - o) - (t - a) * (s - o) &gt;= 0 &amp;&amp; (t - a) * (n - o) - (i - a) * (e - o) &gt;= 0 &amp;&amp; (i - a) * (s - o) - (r - a) * (n - o) &gt;= 0;
                }
            }, {
                key: "isValidDiagonal",
                value: function (e, i) {
                    return e.next.i !== i.i &amp;&amp; e.prev.i !== i.i &amp;&amp; !t.intersectsPolygon(e, i) &amp;&amp; t.locallyInside(e, i) &amp;&amp; t.locallyInside(i, e) &amp;&amp; t.middleInside(e, i);
                }
            }, {
                key: "area",
                value: function (t, e, i) {
                    return (e.y - t.y) * (i.x - e.x) - (e.x - t.x) * (i.y - e.y);
                }
            }, {
                key: "equals",
                value: function (t, e) {
                    return t.x === e.x &amp;&amp; t.y === e.y;
                }
            }, {
                key: "intersects",
                value: function (e, i, n, r) {
                    return !!(t.equals(e, i) &amp;&amp; t.equals(n, r) || t.equals(e, r) &amp;&amp; t.equals(n, i)) || t.area(e, i, n) &gt; 0 != t.area(e, i, r) &gt; 0 &amp;&amp; t.area(n, r, e) &gt; 0 != t.area(n, r, i) &gt; 0;
                }
            }, {
                key: "intersectsPolygon",
                value: function (e, i) {
                    var n = e;
                    do {
                        if (n.i !== e.i &amp;&amp; n.next.i !== e.i &amp;&amp; n.i !== i.i &amp;&amp; n.next.i !== i.i &amp;&amp; t.intersects(n, n.next, e, i)) return !0;
                        n = n.next;
                    } while (n !== e);
                    return !1;
                }
            }, {
                key: "locallyInside",
                value: function (e, i) {
                    return t.area(e.prev, e, e.next) &lt; 0 ? t.area(e, i, e.next) &gt;= 0 &amp;&amp; t.area(e, e.prev, i) &gt;= 0 : t.area(e, i, e.prev) &lt; 0 || t.area(e, e.next, i) &lt; 0;
                }
            }, {
                key: "middleInside",
                value: function (t, e) {
                    var i = t, n = !1, r = (t.x + e.x) / 2, s = (t.y + e.y) / 2;
                    do {
                        i.y &gt; s != i.next.y &gt; s &amp;&amp; i.next.y !== i.y &amp;&amp; r &lt; (i.next.x - i.x) * (s - i.y) / (i.next.y - i.y) + i.x &amp;&amp; (n = !n),
                            i = i.next;
                    } while (i !== t);
                    return n;
                }
            }, {
                key: "splitPolygon",
                value: function (t, e) {
                    var i = new St(t.i, t.x, t.y), n = new St(e.i, e.x, e.y), r = t.next, s = e.prev;
                    return t.next = e, e.prev = t, i.next = r, r.prev = i, n.next = i, i.prev = n, s.next = n,
                        n.prev = s, n;
                }
            }, {
                key: "insertNode",
                value: function (t, e, i, n) {
                    var r = new St(t, e, i);
                    return n ? (r.next = n.next, r.prev = n, n.next.prev = r, n.next = r) : (r.prev = r,
                        r.next = r), r;
                }
            }, {
                key: "removeNode",
                value: function (t) {
                    t.next.prev = t.prev, t.prev.next = t.next, t.prevZ &amp;&amp; (t.prevZ.nextZ = t.nextZ),
                        t.nextZ &amp;&amp; (t.nextZ.prevZ = t.prevZ);
                }
            }, {
                key: "signedArea",
                value: function (t, e, i, n) {
                    for (var r = 0, s = e, a = i - n; s &lt; i; s += n) r += (t[a] - t[s]) * (t[s + 1] + t[a + 1]),
                        a = s;
                    return r;
                }
            }]), t;
        }(), It = function t() {
            _classCallCheck(this, t);
        };
        It.BYTES_PE = 4, It.BYTES_PIDX = 2, It.defaultMatrix4 = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
            It.defaultMinusYMatrix4 = [1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], It.uniformMatrix3 = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0],
            It._TMPARRAY = [], It._OFFSETX = 0, It._OFFSETY = 0;
        var Pt = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : lt.TYPE_2D;
                return _classCallCheck(this, i), e.call(this, t);
            }
            return _createClass(i, [{
                key: "renderSubmit",
                value: function () {
                    if (0 === this._numEle || !this._mesh || 0 == this._numEle) return 1;
                    var t = this.shaderValue.textureHost;
                    if (t) {
                        var e = t._getSource();
                        if (!e) return 1;
                        this.shaderValue.texture = e;
                    }
                    var i = g.mainContext;
                    return this._mesh.useMesh(i), this.shaderValue.upload(), B.activeBlendFunction !== this._blendFn &amp;&amp; (g.setBlend(i, !0),
                        this._blendFn(i), B.activeBlendFunction = this._blendFn), i.drawElements(i.TRIANGLES, this._numEle, i.UNSIGNED_SHORT, this._startIdx),
                        U.renderBatches++, U.trianglesFaces += this._numEle / 3, 1;
                }
            }, {
                key: "releaseRender",
                value: function () {
                    lt.RENDERBASE != this &amp;&amp; --this._ref &lt; 1 &amp;&amp; (i.POOL[i._poolSize++] = this, this.shaderValue.release(),
                        this.shaderValue = null, this._mesh = null, this._parent &amp;&amp; (this._parent.releaseRender(),
                            this._parent = null));
                }
            }], [{
                key: "create",
                value: function (t, e, n) {
                    var r = i._poolSize ? i.POOL[--i._poolSize] : new i();
                    r._ref = 1, r._mesh = e, r._key.clear(), r._startIdx = e.indexNum * It.BYTES_PIDX,
                        r._numEle = 0;
                    var s = t._nBlendType;
                    r._blendFn = t._targets ? B.targetFns[s] : B.fns[s], r.shaderValue = n, r.shaderValue.setValue(t._shader2D);
                    var a = t._shader2D.filters;
                    return a &amp;&amp; r.shaderValue.setFilters(a), r;
                }
            }, {
                key: "createShape",
                value: function (t, e, n, r) {
                    var s = i._poolSize ? i.POOL[--i._poolSize] : new i();
                    s._mesh = e, s._numEle = n, s._startIdx = 2 * e.indexNum, s._ref = 1, s.shaderValue = r,
                        s.shaderValue.setValue(t._shader2D);
                    var a = t._nBlendType;
                    return s._key.blendShader = a, s._blendFn = t._targets ? B.targetFns[a] : B.fns[a],
                        s;
                }
            }]), i;
        }(lt);
        Pt._poolSize = 0, Pt.POOL = [];
        var Lt = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.call(this, lt.TYPE_2D))._matrix = new f(),
                    t._matrix4 = It.defaultMatrix4.concat(), t.shaderValue = new V(0, 0), t;
            }
            return _createClass(i, [{
                key: "renderSubmit",
                value: function () {
                    var t = L.worldAlpha, e = L.worldMatrix4, i = L.worldMatrix, n = L.worldFilters, r = L.worldShaderDefines, s = this.shaderValue, a = this._matrix, o = this._matrix4, l = f.TEMP;
                    return f.mul(a, i, l), o[0] = l.a, o[1] = l.b, o[4] = l.c, o[5] = l.d, o[12] = l.tx,
                        o[13] = l.ty, L.worldMatrix = l.clone(), L.worldMatrix4 = o, L.worldAlpha = L.worldAlpha * s.alpha,
                        s.filters &amp;&amp; s.filters.length &amp;&amp; (L.worldFilters = s.filters, L.worldShaderDefines = s.defines),
                        this.canv.flushsubmit(), L.worldAlpha = t, L.worldMatrix4 = e, L.worldMatrix.destroy(),
                        L.worldMatrix = i, L.worldFilters = n, L.worldShaderDefines = r, 1;
                }
            }, {
                key: "releaseRender",
                value: function () {
                    if (--this._ref &lt; 1) {
                        var t = i.POOL;
                        this._mesh = null, t[t._length++] = this;
                    }
                }
            }, {
                key: "getRenderType",
                value: function () {
                    return lt.TYPE_CANVAS;
                }
            }], [{
                key: "create",
                value: function (t, e, n) {
                    var r = i.POOL._length ? i.POOL[--i.POOL._length] : new i();
                    r.canv = t, r._ref = 1, r._numEle = 0;
                    var s = r.shaderValue;
                    return s.alpha = e, s.defines.setValue(0), n &amp;&amp; n.length &amp;&amp; s.setFilters(n), r;
                }
            }]), i;
        }(lt);
        Lt.POOL = [], Lt.POOL._length = 0;
        var Dt = function () {
            function t() {
                _classCallCheck(this, t), this.blendType = 0, this._ref = 1, this._key = new X();
            }
            return _createClass(t, [{
                key: "renderSubmit",
                value: function () {
                    var t = g.mainContext;
                    this._mesh.useMesh(t);
                    var e = this.srcRT;
                    return e &amp;&amp; (this.shaderValue.texture = e._getSource(), this.shaderValue.upload(),
                        this.blend(), U.renderBatches++, U.trianglesFaces += this._numEle / 3, t.drawElements(t.TRIANGLES, this._numEle, t.UNSIGNED_SHORT, this._startIdx)),
                        1;
                }
            }, {
                key: "blend",
                value: function () {
                    if (B.activeBlendFunction !== B.fns[this.blendType]) {
                        var t = g.mainContext;
                        t.enable(t.BLEND), B.fns[this.blendType](t), B.activeBlendFunction = B.fns[this.blendType];
                    }
                }
            }, {
                key: "getRenderType",
                value: function () {
                    return 0;
                }
            }, {
                key: "releaseRender",
                value: function () {
                    if (--this._ref &lt; 1) {
                        var e = t.POOL;
                        e[e._length++] = this;
                    }
                }
            }], [{
                key: "create",
                value: function (e, i, n, r) {
                    var s = t.POOL._length ? t.POOL[--t.POOL._length] : new t();
                    if (s._mesh = i, s.srcRT = r, s._startIdx = i.indexNum * It.BYTES_PIDX, s._ref = 1,
                        s._key.clear(), s._numEle = 0, s.blendType = e._nBlendType, s._key.blendShader = s.blendType,
                        s.shaderValue = n, s.shaderValue.setValue(e._shader2D), e._colorFiler) {
                        var a = e._colorFiler;
                        n.defines.add(a.type), n.colorMat = a._mat, n.colorAlpha = a._alpha;
                    }
                    return s;
                }
            }]), t;
        }();
        Dt.POOL = [], Dt.POOL._length = 0;
        var Ot = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : lt.TYPE_2D;
                return _classCallCheck(this, i), e.call(this, t);
            }
            return _createClass(i, [{
                key: "releaseRender",
                value: function () {
                    --this._ref &lt; 1 &amp;&amp; (i.POOL[i._poolSize++] = this, this.shaderValue.release(), this._mesh = null,
                        this._parent &amp;&amp; (this._parent.releaseRender(), this._parent = null));
                }
            }, {
                key: "renderSubmit",
                value: function () {
                    if (0 === this._numEle) return 1;
                    var t = this.shaderValue.textureHost;
                    if (t) {
                        var e = t ? t._getSource() : null;
                        if (!e) return 1;
                    }
                    var i = g.mainContext;
                    this._mesh.useMesh(i);
                    var n = lt.preRender, r = lt.preRender._key;
                    return 0 === this._key.blendShader &amp;&amp; this._key.submitType === r.submitType &amp;&amp; this._key.blendShader === r.blendShader &amp;&amp; P.activeShader &amp;&amp; lt.preRender.clipInfoID == this.clipInfoID &amp;&amp; n.shaderValue.defines._value === this.shaderValue.defines._value &amp;&amp; 0 == (this.shaderValue.defines._value &amp; N.NOOPTMASK) ? P.activeShader.uploadTexture2D(e) : (B.activeBlendFunction !== this._blendFn &amp;&amp; (g.setBlend(i, !0),
                        this._blendFn(i), B.activeBlendFunction = this._blendFn), this.shaderValue.texture = e,
                        this.shaderValue.upload()), i.drawElements(i.TRIANGLES, this._numEle, i.UNSIGNED_SHORT, this._startIdx),
                        U.renderBatches++, U.trianglesFaces += this._numEle / 3, 1;
                }
            }], [{
                key: "create",
                value: function (t, e, n) {
                    var r = i._poolSize ? i.POOL[--i._poolSize] : new i(lt.TYPE_TEXTURE);
                    r._mesh = e, r._key.clear(), r._key.submitType = lt.KEY_DRAWTEXTURE, r._ref = 1,
                        r._startIdx = e.indexNum * It.BYTES_PIDX, r._numEle = 0;
                    var s = t._nBlendType;
                    if (r._key.blendShader = s, r._blendFn = t._targets ? B.targetFns[s] : B.fns[s],
                        r.shaderValue = n, t._colorFiler) {
                        var a = t._colorFiler;
                        n.defines.add(a.type), n.colorMat = a._mat, n.colorAlpha = a._alpha;
                    }
                    return r;
                }
            }]), i;
        }(lt);
        Ot._poolSize = 0, Ot.POOL = [];
        var Bt = function () {
            function t() {
                _classCallCheck(this, t), this._data = [], this._ndata = 0, this._clipid = -1, this._clipMatrix = new f(),
                    this._enable = !1;
            }
            return _createClass(t, [{
                key: "clear",
                value: function () {
                    this._tex = null, this._imgId = -1, this._ndata = 0, this._enable = !1, this._colorFiler = null;
                }
            }, {
                key: "destroy",
                value: function () {
                    this.clear(), this._data.length = 0, this._data = null;
                }
            }, {
                key: "add",
                value: function (t, e, i, n, r, s) {
                    this._ndata &gt; 0 &amp;&amp; (this._tex != e || this._imgId != i || this._clipid &gt;= 0 &amp;&amp; this._clipid != t._clipInfoID) &amp;&amp; this.submit(t),
                        this._clipid = t._clipInfoID, t._globalClipMatrix.copyTo(this._clipMatrix), this._tex = e,
                        this._imgId = i, this._colorFiler = t._colorFiler, this._data[this._ndata] = n,
                        this._data[this._ndata + 1] = r, this._data[this._ndata + 2] = s, this._ndata += 3;
                }
            }, {
                key: "getPos",
                value: function () {
                    return 0 == t.__nPosPool ? new Array(8) : t.__posPool[--t.__nPosPool];
                }
            }, {
                key: "enable",
                value: function (t, e) {
                    t !== this._enable &amp;&amp; (this._enable = t, this._enable || this.submit(e));
                }
            }, {
                key: "submit",
                value: function (e) {
                    var i = this._ndata;
                    if (i) {
                        var n = e._mesh, r = e._colorFiler;
                        e._colorFiler = this._colorFiler;
                        var s = Ot.create(e, n, V.create(N.TEXTURE2D, 0));
                        e._submits[e._submits._length++] = e._curSubmit = s, s.shaderValue.textureHost = this._tex,
                            s._key.other = this._imgId, e._colorFiler = r, e._copyClipInfo(s, this._clipMatrix),
                            s.clipInfoID = this._clipid;
                        for (var a = 0; a &lt; i; a += 3) n.addQuad(this._data[a], this._data[a + 1], this._data[a + 2], !0),
                            t.__posPool[t.__nPosPool++] = this._data[a];
                        i /= 3, s._numEle += 6 * i, n.indexNum += 6 * i, n.vertNum += 4 * i, e._drawCount += i,
                            this._ndata = 0, yt.loopCount % 100 == 0 &amp;&amp; (this._data.length = 0);
                    }
                }
            }]), t;
        }();
        Bt.__posPool = [], Bt.__nPosPool = 0;
        var Ft = function () {
            function t() {
                var e = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0;
                _classCallCheck(this, t), this.atlasID = 0, this._width = 0, this._height = 0, this._texCount = 0,
                    this._rowInfo = null, this._cells = null, this._used = 0, this._cells = null, this._rowInfo = null,
                    this.atlasID = n, this._init(e, i);
            }
            return _createClass(t, [{
                key: "addRect",
                value: function (t, e, i, n) {
                    return !!this._get(e, i, n) &amp;&amp; (this._fill(n.x, n.y, e, i, t), this._texCount++,
                        !0);
                }
            }, {
                key: "_release",
                value: function () {
                    this._cells = null, this._rowInfo = null;
                }
            }, {
                key: "_init",
                value: function (t, e) {
                    return this._width = t, this._height = e, this._release(), 0 != this._width &amp;&amp; (this._cells = new Uint8Array(this._width * this._height * 3),
                        this._rowInfo = new Uint8Array(this._height), this._used = 0, this._clear(), !0);
                }
            }, {
                key: "_get",
                value: function (t, e, i) {
                    if (t &gt; this._width || e &gt; this._height) return !1;
                    for (var n = -1, r = -1, s = this._width, a = this._height, o = this._cells, l = 0; l &lt; a; l++) if (!(this._rowInfo[l] &lt; t)) for (var h = 0; h &lt; s;) {
                        var u = 3 * (l * s + h);
                        if (0 != o[u] || o[u + 1] &lt; t || o[u + 2] &lt; e) h += o[u + 1]; else {
                            n = h, r = l;
                            for (var c = 0; c &lt; t; c++) if (o[3 * c + u + 2] &lt; e) {
                                n = -1;
                                break;
                            }
                            if (!(n &lt; 0)) return i.x = n, i.y = r, !0;
                            h += o[u + 1];
                        }
                    }
                    return !1;
                }
            }, {
                key: "_fill",
                value: function (t, e, i, n, r) {
                    var s = this._width, a = this._height;
                    this._check(t + i &lt;= s &amp;&amp; e + n &lt;= a);
                    for (var o = e; o &lt; n + e; ++o) {
                        this._check(this._rowInfo[o] &gt;= i), this._rowInfo[o] -= i;
                        for (var l = 0; l &lt; i; l++) {
                            var h = 3 * (t + o * s + l);
                            this._check(0 == this._cells[h]), this._cells[h] = r, this._cells[h + 1] = i, this._cells[h + 2] = n;
                        }
                    }
                    if (t &gt; 0) for (o = 0; o &lt; n; ++o) {
                        var u = 0;
                        for (l = t - 1; l &gt;= 0 &amp;&amp; 0 == this._cells[3 * ((e + o) * s + l)]; --l, ++u);
                        for (l = u; l &gt; 0; --l) this._cells[3 * ((e + o) * s + t - l) + 1] = l, this._check(l &gt; 0);
                    }
                    if (e &gt; 0) for (l = t; l &lt; t + i; ++l) {
                        for (u = 0, o = e - 1; o &gt;= 0 &amp;&amp; 0 == this._cells[3 * (l + o * s)]; --o, u++);
                        for (o = u; o &gt; 0; --o) this._cells[3 * (l + (e - o) * s) + 2] = o, this._check(o &gt; 0);
                    }
                    this._used += i * n / (this._width * this._height);
                }
            }, {
                key: "_check",
                value: function (t) {
                    0 == t &amp;&amp; console.log("xtexMerger é”™è¯¯å•¦");
                }
            }, {
                key: "_clear",
                value: function () {
                    this._texCount = 0;
                    for (var t = 0; t &lt; this._height; t++) this._rowInfo[t] = this._width;
                    for (var e = 0; e &lt; this._height; e++) for (var i = 0; i &lt; this._width; i++) {
                        var n = 3 * (e * this._width + i);
                        this._cells[n] = 0, this._cells[n + 1] = this._width - i, this._cells[n + 2] = this._width - e;
                    }
                }
            }]), t;
        }(), Nt = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n(t, i) {
                var r;
                return _classCallCheck(this, n), (r = e.call(this))._texW = 0, r._texH = 0, r.__destroyed = !1,
                    r._discardTm = 0, r.genID = 0, r.bitmap = {
                        id: 0,
                        _glTexture: null
                    }, r.curUsedCovRate = 0, r.curUsedCovRateAtlas = 0, r.lastTouchTm = 0, r.ri = null,
                    r._texW = t || n.gTextRender.atlasWidth, r._texH = i || n.gTextRender.atlasWidth,
                    r.bitmap.id = r.id, r.lock = !0, r;
            }
            return _createClass(n, [{
                key: "recreateResource",
                value: function () {
                    if (!this._source) {
                        var t = y.instance, e = this._source = t.createTexture();
                        this.bitmap._glTexture = e, g.bindTexture(t, t.TEXTURE_2D, e), t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, this._texW, this._texH, 0, t.RGBA, t.UNSIGNED_BYTE, null),
                            t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, t.LINEAR), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MAG_FILTER, t.LINEAR),
                            t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE),
                            n.gTextRender.debugUV &amp;&amp; this.fillWhite();
                    }
                }
            }, {
                key: "addChar",
                value: function (t, e, r) {
                    var s = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null;
                    if (n.gTextRender.isWan1Wan) return this.addCharCanvas(t, e, r, s);
                    !this._source &amp;&amp; this.recreateResource();
                    var a = y.instance;
                    g.bindTexture(a, a.TEXTURE_2D, this._source), !i.Render.isConchApp &amp;&amp; a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0);
                    var o, l, h, u, c = t.data;
                    return t.data instanceof Uint8ClampedArray &amp;&amp; (c = new Uint8Array(c.buffer)), a.texSubImage2D(a.TEXTURE_2D, 0, e, r, t.width, t.height, a.RGBA, a.UNSIGNED_BYTE, c),
                        !i.Render.isConchApp &amp;&amp; a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1), o = e / this._texW,
                        l = r / this._texH, h = (e + t.width) / this._texW, u = (r + t.height) / this._texH,
                        (s = s || new Array(8))[0] = o, s[1] = l, s[2] = h, s[3] = l, s[4] = h, s[5] = u,
                        s[6] = o, s[7] = u, s;
                }
            }, {
                key: "addCharCanvas",
                value: function (t, e, n) {
                    var r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null;
                    !this._source &amp;&amp; this.recreateResource();
                    var s, a, o, l, h = y.instance;
                    return g.bindTexture(h, h.TEXTURE_2D, this._source), !i.Render.isConchApp &amp;&amp; h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0),
                        h.texSubImage2D(h.TEXTURE_2D, 0, e, n, h.RGBA, h.UNSIGNED_BYTE, t), !i.Render.isConchApp &amp;&amp; h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1),
                        i.Render.isConchApp ? (s = e / this._texW, a = n / this._texH, o = (e + t.width) / this._texW,
                            l = (n + t.height) / this._texH) : (s = (e + 1) / this._texW, a = (n + 1) / this._texH,
                                o = (e + t.width - 1) / this._texW, l = (n + t.height - 1) / this._texH), (r = r || new Array(8))[0] = s,
                        r[1] = a, r[2] = o, r[3] = a, r[4] = o, r[5] = l, r[6] = s, r[7] = l, r;
                }
            }, {
                key: "fillWhite",
                value: function () {
                    !this._source &amp;&amp; this.recreateResource();
                    var t = y.instance, e = new Uint8Array(this._texW * this._texH * 4);
                    e.fill(255), t.texSubImage2D(t.TEXTURE_2D, 0, 0, 0, this._texW, this._texH, t.RGBA, t.UNSIGNED_BYTE, e);
                }
            }, {
                key: "discard",
                value: function () {
                    i.stage.setGlobalRepaint(), this.destroy();
                }
            }, {
                key: "destroy",
                value: function () {
                    this.__destroyed = !0;
                    var t = y.instance;
                    this._source &amp;&amp; t.deleteTexture(this._source), this._source = null;
                }
            }, {
                key: "touchRect",
                value: function (t, e) {
                    this.lastTouchTm != e &amp;&amp; (this.curUsedCovRate = 0, this.curUsedCovRateAtlas = 0,
                        this.lastTouchTm = e);
                    var r = n.gTextRender.atlasWidth * n.gTextRender.atlasWidth, s = i.TextAtlas.atlasGridW * i.TextAtlas.atlasGridW;
                    this.curUsedCovRate += t.bmpWidth * t.bmpHeight / r, this.curUsedCovRateAtlas += Math.ceil(t.bmpWidth / i.TextAtlas.atlasGridW) * Math.ceil(t.bmpHeight / i.TextAtlas.atlasGridW) / (r / s);
                }
            }, {
                key: "_getSource",
                value: function () {
                    return this._source;
                }
            }, {
                key: "drawOnScreen",
                value: function (t, e) { }
            }, {
                key: "texture",
                get: function () {
                    return this;
                }
            }], [{
                key: "getTextTexture",
                value: function (t, e) {
                    return new n(t, e);
                }
            }, {
                key: "clean",
                value: function () {
                    var t = yt.loopStTm;
                    if (0 === n.cleanTm &amp;&amp; (n.cleanTm = t), t - n.cleanTm &gt;= n.gTextRender.checkCleanTextureDt) {
                        for (var e = 0; e &lt; n.poolLen; e++) {
                            var i = n.pool[e];
                            t - i._discardTm &gt;= n.gTextRender.destroyUnusedTextureDt &amp;&amp; (i.destroy(), n.pool[e] = n.pool[n.poolLen - 1],
                                n.poolLen--, e--);
                        }
                        n.cleanTm = t;
                    }
                }
            }]), n;
        }(C);
        Nt.gTextRender = null, Nt.pool = new Array(10), Nt.poolLen = 0, Nt.cleanTm = 0;
        var Ut = function () {
            function t() {
                _classCallCheck(this, t), this.texWidth = 1024, this.texHeight = 1024, this.texture = null,
                    this.charMaps = {}, this.texHeight = this.texWidth = i.TextRender.atlasWidth, this.texture = Nt.getTextTexture(this.texWidth, this.texHeight),
                    this.texWidth / t.atlasGridW &gt; 256 &amp;&amp; (t.atlasGridW = Math.ceil(this.texWidth / 256)),
                    this.atlasgrid = new Ft(this.texWidth / t.atlasGridW, this.texHeight / t.atlasGridW, this.texture.id);
            }
            return _createClass(t, [{
                key: "setProtecteDist",
                value: function (t) { }
            }, {
                key: "getAEmpty",
                value: function (e, i, n) {
                    var r = this.atlasgrid.addRect(1, Math.ceil(e / t.atlasGridW), Math.ceil(i / t.atlasGridW), n);
                    return r &amp;&amp; (n.x *= t.atlasGridW, n.y *= t.atlasGridW), r;
                }
            }, {
                key: "destroy",
                value: function () {
                    for (var t in this.charMaps) {
                        this.charMaps[t].deleted = !0;
                    }
                    this.texture.discard();
                }
            }, {
                key: "printDebugInfo",
                value: function () { }
            }, {
                key: "usedRate",
                get: function () {
                    return this.atlasgrid._used;
                }
            }]), t;
        }();
        Ut.atlasGridW = 16;
        var Gt = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "setTo",
                value: function (t, e, i) {
                    return this.type = t, this.currentTarget = e, this.target = i, this;
                }
            }, {
                key: "stopPropagation",
                value: function () {
                    this._stoped = !0;
                }
            }, {
                key: "touches",
                get: function () {
                    if (!this.nativeEvent) return null;
                    var t = this.nativeEvent.touches;
                    if (t) for (var e = i.stage, n = 0, r = t.length; n &lt; r; n++) {
                        var s = t[n], a = v.TEMP;
                        a.setTo(s.clientX, s.clientY), e._canvasTransform.invertTransformPoint(a), e.transform.invertTransformPoint(a),
                            s.stageX = a.x, s.stageY = a.y;
                    }
                    return t;
                }
            }, {
                key: "altKey",
                get: function () {
                    return this.nativeEvent.altKey;
                }
            }, {
                key: "ctrlKey",
                get: function () {
                    return this.nativeEvent.ctrlKey;
                }
            }, {
                key: "shiftKey",
                get: function () {
                    return this.nativeEvent.shiftKey;
                }
            }, {
                key: "charCode",
                get: function () {
                    return this.nativeEvent.charCode;
                }
            }, {
                key: "keyLocation",
                get: function () {
                    return this.nativeEvent.location || this.nativeEvent.keyLocation;
                }
            }, {
                key: "stageX",
                get: function () {
                    return i.stage.mouseX;
                }
            }, {
                key: "stageY",
                get: function () {
                    return i.stage.mouseY;
                }
            }]), t;
        }();
        Gt.EMPTY = new Gt(), Gt.MOUSE_DOWN = "mousedown", Gt.MOUSE_UP = "mouseup", Gt.CLICK = "click",
            Gt.RIGHT_MOUSE_DOWN = "rightmousedown", Gt.RIGHT_MOUSE_UP = "rightmouseup", Gt.RIGHT_CLICK = "rightclick",
            Gt.MOUSE_MOVE = "mousemove", Gt.MOUSE_OVER = "mouseover", Gt.MOUSE_OUT = "mouseout",
            Gt.MOUSE_WHEEL = "mousewheel", Gt.ROLL_OVER = "mouseover", Gt.ROLL_OUT = "mouseout",
            Gt.DOUBLE_CLICK = "doubleclick", Gt.CHANGE = "change", Gt.CHANGED = "changed", Gt.RESIZE = "resize",
            Gt.ADDED = "added", Gt.REMOVED = "removed", Gt.DISPLAY = "display", Gt.UNDISPLAY = "undisplay",
            Gt.ERROR = "error", Gt.COMPLETE = "complete", Gt.LOADED = "loaded", Gt.READY = "ready",
            Gt.PROGRESS = "progress", Gt.INPUT = "input", Gt.RENDER = "render", Gt.OPEN = "open",
            Gt.MESSAGE = "message", Gt.CLOSE = "close", Gt.KEY_DOWN = "keydown", Gt.KEY_PRESS = "keypress",
            Gt.KEY_UP = "keyup", Gt.FRAME = "enterframe", Gt.DRAG_START = "dragstart", Gt.DRAG_MOVE = "dragmove",
            Gt.DRAG_END = "dragend", Gt.ENTER = "enter", Gt.SELECT = "select", Gt.BLUR = "blur",
            Gt.FOCUS = "focus", Gt.VISIBILITY_CHANGE = "visibilitychange", Gt.FOCUS_CHANGE = "focuschange",
            Gt.PLAYED = "played", Gt.PAUSED = "paused", Gt.STOPPED = "stopped", Gt.START = "start",
            Gt.END = "end", Gt.COMPONENT_ADDED = "componentadded", Gt.COMPONENT_REMOVED = "componentremoved",
            Gt.RELEASED = "released", Gt.LINK = "link", Gt.LABEL = "label", Gt.FULL_SCREEN_CHANGE = "fullscreenchange",
            Gt.DEVICE_LOST = "devicelost", Gt.TRANSFORM_CHANGED = "transformchanged", Gt.ANIMATION_CHANGED = "animationchanged",
            Gt.TRAIL_FILTER_CHANGE = "trailfilterchange", Gt.TRIGGER_ENTER = "triggerenter",
            Gt.TRIGGER_STAY = "triggerstay", Gt.TRIGGER_EXIT = "triggerexit";
        var Wt = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                var t, i = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null, r = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, s = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0, a = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 0;
                return _classCallCheck(this, n), (t = e.call(this)).uvrect = [0, 0, 1, 1], t._destroyed = !1,
                    t._referenceCount = 0, t.$_GID = 0, t.offsetX = 0, t.offsetY = 0, t._w = 0, t._h = 0,
                    t.sourceWidth = 0, t.sourceHeight = 0, t.url = null, t.scaleRate = 1, t.setTo(i, r, s, a),
                    t;
            }
            return _createClass(n, [{
                key: "_addReference",
                value: function () {
                    this._bitmap &amp;&amp; this._bitmap._addReference(), this._referenceCount++;
                }
            }, {
                key: "_removeReference",
                value: function () {
                    this._bitmap &amp;&amp; this._bitmap._removeReference(), this._referenceCount--;
                }
            }, {
                key: "_getSource",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null;
                    return this._destroyed || !this._bitmap ? null : (this.recoverBitmap(t), this._bitmap.destroyed ? null : this.bitmap._getSource());
                }
            }, {
                key: "_onLoaded",
                value: function (t, e) {
                    if (e) if (e == this); else if (e instanceof n) {
                        var i = e;
                        n._create(e, 0, 0, i.width, i.height, 0, 0, i.sourceWidth, i.sourceHeight, this);
                    } else this.bitmap = e, this.sourceWidth = this._w = e.width, this.sourceHeight = this._h = e.height; else;
                    t &amp;&amp; t.run(), this.event(Gt.READY, this);
                }
            }, {
                key: "getIsReady",
                value: function () {
                    return !this._destroyed &amp;&amp; !!this._bitmap;
                }
            }, {
                key: "setTo",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null, e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0, r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 0;
                    this.bitmap = t, this.sourceWidth = i, this.sourceHeight = r, t &amp;&amp; (this._w = t.width,
                        this._h = t.height, this.sourceWidth = this.sourceWidth || t.width, this.sourceHeight = this.sourceHeight || t.height),
                        this.uv = e || n.DEF_UV;
                }
            }, {
                key: "load",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    this._destroyed || i.loader.load(t, m.create(this, this._onLoaded, [e]), null, "htmlimage", 1, !0);
                }
            }, {
                key: "getTexturePixels",
                value: function (t, e, n, r) {
                    var s, a, o, l = this.bitmap, h = this._w, u = this._h, c = this.sourceWidth, _ = this.sourceHeight, d = l.width, f = l.height, v = this.offsetX, p = this.offsetY, y = n, g = r;
                    if (t + n &gt; h + v &amp;&amp; (y -= t + n - h - v), t + n &gt; c &amp;&amp; (n -= t + n - c), e + r &gt; u + p &amp;&amp; (g -= e + r - u - p),
                        e + r &gt; _ &amp;&amp; (r -= e + r - _), n &lt;= 0 || r &lt;= 0) return null;
                    var m = v &gt; t ? v - t : 0, T = p &gt; e ? p - e : 0, k = t &gt; v ? t - v : 0, x = e &gt; p ? e - p : 0;
                    y -= m, g -= T;
                    var C = 4 * n, E = null;
                    try {
                        E = l.getPixels();
                    } catch (t) { }
                    if (E) {
                        if (0 == t &amp;&amp; 0 == e &amp;&amp; n == d &amp;&amp; r == f) return E;
                        var b = this._uv.slice(), w = Math.round(b[0] * d), R = Math.round(b[1] * f), A = new Uint8Array(n * r * 4);
                        for (s = 4 * w + 4 * k + (a = (R + x) * (C = 4 * d)), o = 0; o &lt; g; o++) A.set(E.slice(s, s + 4 * y), 4 * n * (o + T) + 4 * m),
                            s += C;
                        return A;
                    }
                    var S = new i.Context();
                    S.size(n, r), S.asBitmap = !0;
                    var M = null;
                    if (0 != t || 0 != e || n != d || r != f) {
                        var I = (M = this._uv.slice())[0], P = M[1], L = (M[2] - I) / h, D = (M[7] - P) / u;
                        M = [I + k * L, P + x * D, I + (k + y) * L, P + x * D, I + (k + y) * L, P + (x + g) * D, I + k * L, P + (x + g) * D];
                    }
                    S._drawTextureM(this, m, T, y, g, null, 1, M), S._targets.start(), S.flush(), S._targets.end(),
                        S._targets.restore();
                    var O = S._targets.getData(0, 0, n, r);
                    for (S.destroy(), A = new Uint8Array(n * r * 4), s = 0, a = (r - 1) * C, o = r - 1; o &gt;= 0; o--) A.set(O.slice(a, a + C), s),
                        s += C, a -= C;
                    return A;
                }
            }, {
                key: "getPixels",
                value: function (t, e, i, n) {
                    return window.conch ? this._nativeObj.getImageData(t, e, i, n) : this.getTexturePixels(t, e, i, n);
                }
            }, {
                key: "recoverBitmap",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null, e = this._bitmap.url;
                    this._destroyed || this._bitmap &amp;&amp; !this._bitmap.destroyed || !e || i.loader.load(e, m.create(this, function (e) {
                        this.bitmap = e, t &amp;&amp; t();
                    }), null, "htmlimage", 1, !0);
                }
            }, {
                key: "disposeBitmap",
                value: function () {
                    !this._destroyed &amp;&amp; this._bitmap &amp;&amp; this._bitmap.destroy();
                }
            }, {
                key: "destroy",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] &amp;&amp; arguments[0];
                    if (!this._destroyed) {
                        this._destroyed = !0;
                        var e = this._bitmap;
                        e &amp;&amp; (e._removeReference(this._referenceCount), (0 === e.referenceCount || t) &amp;&amp; e.destroy(),
                            e = null), this.url &amp;&amp; this === i.loader.getRes(this.url) &amp;&amp; i.Loader.clearRes(this.url);
                    }
                }
            }, {
                key: "uv",
                get: function () {
                    return this._uv;
                },
                set: function (t) {
                    this.uvrect[0] = Math.min(t[0], t[2], t[4], t[6]), this.uvrect[1] = Math.min(t[1], t[3], t[5], t[7]),
                        this.uvrect[2] = Math.max(t[0], t[2], t[4], t[6]) - this.uvrect[0], this.uvrect[3] = Math.max(t[1], t[3], t[5], t[7]) - this.uvrect[1],
                        this._uv = t;
                }
            }, {
                key: "width",
                get: function () {
                    return this._w ? this._w : this.bitmap ? this.uv &amp;&amp; this.uv !== n.DEF_UV ? (this.uv[2] - this.uv[0]) * this.bitmap.width : this.bitmap.width : 0;
                },
                set: function (t) {
                    this._w = t, this.sourceWidth || (this.sourceWidth = t);
                }
            }, {
                key: "height",
                get: function () {
                    return this._h ? this._h : this.bitmap ? this.uv &amp;&amp; this.uv !== n.DEF_UV ? (this.uv[5] - this.uv[1]) * this.bitmap.height : this.bitmap.height : 0;
                },
                set: function (t) {
                    this._h = t, this.sourceHeight || (this.sourceHeight = t);
                }
            }, {
                key: "bitmap",
                get: function () {
                    return this._bitmap;
                },
                set: function (t) {
                    this._bitmap &amp;&amp; this._bitmap._removeReference(this._referenceCount), this._bitmap = t,
                        t &amp;&amp; t._addReference(this._referenceCount);
                }
            }, {
                key: "destroyed",
                get: function () {
                    return this._destroyed;
                }
            }], [{
                key: "moveUV",
                value: function (t, e, i) {
                    for (var n = 0; n &lt; 8; n += 2) i[n] += t, i[n + 1] += e;
                    return i;
                }
            }, {
                key: "create",
                value: function (t, e, i, r, s) {
                    var a = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 0, o = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : 0, l = arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7] ? arguments[7] : 0, h = arguments.length &gt; 8 &amp;&amp; void 0 !== arguments[8] ? arguments[8] : 0;
                    return n._create(t, e, i, r, s, a, o, l, h);
                }
            }, {
                key: "_create",
                value: function (t, e, i, r, s) {
                    var a, o = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 0, l = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : 0, h = arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7] ? arguments[7] : 0, u = arguments.length &gt; 8 &amp;&amp; void 0 !== arguments[8] ? arguments[8] : 0, c = arguments.length &gt; 9 &amp;&amp; void 0 !== arguments[9] ? arguments[9] : null, _ = t instanceof n, d = _ ? t.uv : n.DEF_UV, f = _ ? t.bitmap : t;
                    f.width &amp;&amp; e + r &gt; f.width &amp;&amp; (r = f.width - e), f.height &amp;&amp; i + s &gt; f.height &amp;&amp; (s = f.height - i),
                        c ? (a = c).setTo(f, null, h || r, u || s) : a = new n(f, null, h || r, u || s),
                        a.width = r, a.height = s, a.offsetX = o, a.offsetY = l;
                    var v = 1 / f.width, p = 1 / f.height;
                    e *= v, i *= p, r *= v, s *= p;
                    var y = a.uv[0], g = a.uv[1], m = a.uv[4], T = a.uv[5], k = m - y, x = T - g, C = n.moveUV(d[0], d[1], [e, i, e + r, i, e + r, i + s, e, i + s]);
                    a.uv = new Float32Array([y + C[0] * k, g + C[1] * x, m - (1 - C[2]) * k, g + C[3] * x, m - (1 - C[4]) * k, T - (1 - C[5]) * x, y + C[6] * k, T - (1 - C[7]) * x]);
                    var E = f.scaleRate;
                    return E &amp;&amp; 1 != E ? (a.sourceWidth /= E, a.sourceHeight /= E, a.width /= E, a.height /= E,
                        a.scaleRate = E) : a.scaleRate = 1, a;
                }
            }, {
                key: "createFromTexture",
                value: function (t, e, i, r, s) {
                    var a = t.scaleRate;
                    1 != a &amp;&amp; (e *= a, i *= a, r *= a, s *= a);
                    var o = p.TEMP.setTo(e - t.offsetX, i - t.offsetY, r, s), l = o.intersection(n._rect1.setTo(0, 0, t.width, t.height), n._rect2);
                    return l ? n.create(t, l.x, l.y, l.width, l.height, l.x - o.x, l.y - o.y, r, s) : null;
                }
            }]), n;
        }(T);
        Wt.DEF_UV = new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]), Wt.NO_UV = new Float32Array([0, 0, 0, 0, 0, 0, 0, 0]),
            Wt.INV_UV = new Float32Array([0, 1, 1, 1, 1, 0, 0, 0]), Wt._rect1 = new p(), Wt._rect2 = new p();
        var Yt = function () {
            function t(e) {
                _classCallCheck(this, t), this._font = "14px Arial", this._family = "Arial", this._size = 14,
                    this._italic = !1, this._bold = !1, this._id = t._gfontID++, this.setFont(e || this._font);
            }
            return _createClass(t, [{
                key: "setFont",
                value: function (t) {
                    this._font = t;
                    var e = t.split(" "), i = e.length;
                    if (i &lt; 2) 1 == i &amp;&amp; e[0].indexOf("px") &gt; 0 &amp;&amp; (this._size = parseInt(e[0])); else {
                        for (var n = -1, r = 0; r &lt; i; r++) if (e[r].indexOf("px") &gt; 0 || e[r].indexOf("pt") &gt; 0) {
                            n = r, this._size = parseInt(e[r]), this._size &lt;= 0 &amp;&amp; (console.error("font parse error:" + t),
                                this._size = 14);
                            break;
                        }
                        var s = n + 1, a = e[s];
                        for (s++; s &lt; i; s++) a += " " + e[s];
                        this._family = a.split(",")[0], this._italic = e.indexOf("italic") &gt;= 0, this._bold = e.indexOf("bold") &gt;= 0;
                    }
                }
            }], [{
                key: "Parse",
                value: function (e) {
                    if (e === t._lastFont) return t._lastFontInfo;
                    var i = t._cache[e];
                    return i || (i = t._cache[e] = new t(e)), t._lastFont = e, t._lastFontInfo = i,
                        i;
                }
            }]), t;
        }();
        Yt.EMPTY = new Yt(null), Yt._cache = {}, Yt._gfontID = 0, Yt._lastFont = "";
        var Vt = function () {
            function t() {
                _classCallCheck(this, t), this.save = [], this.toUpperCase = null, this.width = -1,
                    this.pageChars = [], this.startID = 0, this.startIDStroke = 0, this.lastGCCnt = 0,
                    this.splitRender = !1, this.scalex = 1, this.scaley = 1;
            }
            return _createClass(t, [{
                key: "setText",
                value: function (t) {
                    this.changed = !0, this._text = t, this.width = -1, this.cleanCache();
                }
            }, {
                key: "toString",
                value: function () {
                    return this._text;
                }
            }, {
                key: "charCodeAt",
                value: function (t) {
                    return this._text ? this._text.charCodeAt(t) : NaN;
                }
            }, {
                key: "charAt",
                value: function (t) {
                    return this._text ? this._text.charAt(t) : null;
                }
            }, {
                key: "cleanCache",
                value: function () {
                    this.pageChars.forEach(function (t) {
                        var e = t.tex;
                        t.words;
                        1 == t.words.length &amp;&amp; e &amp;&amp; e.ri &amp;&amp; e.destroy();
                    }), this.pageChars = [], this.startID = 0, this.scalex = 1, this.scaley = 1;
                }
            }, {
                key: "length",
                get: function () {
                    return this._text ? this._text.length : 0;
                }
            }]), t;
        }(), Xt = function () {
            function t() {
                _classCallCheck(this, t), this.char = "", this.deleted = !1, this.uv = new Array(8),
                    this.pos = 0, this.orix = 0, this.oriy = 0, this.touchTick = 0, this.isSpace = !1;
            }
            return _createClass(t, [{
                key: "touch",
                value: function () {
                    var t = yt.loopCount;
                    this.touchTick != t &amp;&amp; this.tex.touchRect(this, t), this.touchTick = t;
                }
            }]), t;
        }(), Ht = function () {
            function t() {
                _classCallCheck(this, t), this.fontsz = 16;
            }
            return _createClass(t, [{
                key: "getWidth",
                value: function (t, e) {
                    return 0;
                }
            }, {
                key: "scale",
                value: function (t, e) { }
            }, {
                key: "getCharBmp",
                value: function (t, e, i, n, r, s, a, o, l, h) {
                    return null;
                }
            }, {
                key: "canvasWidth",
                get: function () {
                    return 0;
                },
                set: function (t) { }
            }]), t;
        }(), zt = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "__init__",
                value: function () {
                    var e = window.Laya || i.Laya;
                    if (t._window) return t._window;
                    var n = t._window = window, r = t._document = n.document, s = t.userAgent = n.navigator.userAgent, a = n.navigator.maxTouchPoints || 0, o = n.navigator.platform;
                    s.indexOf("AlipayMiniGame") &gt; -1 &amp;&amp; "my" in t.window &amp;&amp; (window.aliPayMiniGame(e, e),
                        e.ALIMiniAdapter ? e.ALIMiniAdapter.enable() : console.error("è¯·å…ˆæ·»åŠ&nbsp;é˜¿é‡Œå°æ¸¸æˆé€‚é…åº“")), -1 == s.indexOf("OPPO") &amp;&amp; s.indexOf("MiniGame") &gt; -1 &amp;&amp; "wx" in t.window &amp;&amp; ("bl" in t.window ? (window.biliMiniGame(e, e),
                            e.BLMiniAdapter ? e.BLMiniAdapter.enable() : console.error("è¯·å¼•å…¥bilibiliå°æ¸¸æˆçš„é€‚é…åº“ï¼šhttps://ldc2.layabox.com/doc/?nav=zh-ts-5-0-0")) : "qq" in t.window ? (window.qqMiniGame(e, e),
                                e.QQMiniAdapter ? e.QQMiniAdapter.enable() : console.error("è¯·å¼•å…¥æ‰‹æœºQQå°æ¸¸æˆçš„é€‚é…åº“ï¼šhttps://ldc2.layabox.com/doc/?nav=zh-ts-5-0-0")) : (window.wxMiniGame(e, e),
                                    e.MiniAdpter ? e.MiniAdpter.enable() : console.error("è¯·å…ˆæ·»åŠ&nbsp;å°æ¸¸æˆé€‚é…åº“,è¯¦ç»†æ•™ç¨‹ï¼šhttps://ldc2.layabox.com/doc/?nav=zh-ts-5-0-0"))),
                        s.indexOf("MiniGame") &gt; -1 &amp;&amp; "qq" in t.window &amp;&amp; (window.qqMiniGame(e, e), e.QQMiniAdapter ? e.QQMiniAdapter.enable() : console.error("è¯·å…ˆæ·»åŠ&nbsp;å°æ¸¸æˆé€‚é…åº“,è¯¦ç»†æ•™ç¨‹")),
                        s.indexOf("SwanGame") &gt; -1 &amp;&amp; (window.bdMiniGame(e, e), e.BMiniAdapter ? e.BMiniAdapter.enable() : console.error("è¯·å…ˆæ·»åŠ&nbsp;ç™¾åº¦å°æ¸¸æˆé€‚é…åº“,è¯¦ç»†æ•™ç¨‹ï¼šhttps://ldc2.layabox.com/doc/?nav=zh-ts-5-0-0")),
                        s.indexOf("QuickGame") &gt; -1 &amp;&amp; (window.miMiniGame(e, e), e.KGMiniAdapter ? e.KGMiniAdapter.enable() : console.error("è¯·å…ˆæ·»åŠ&nbsp;å°ç±³å°æ¸¸æˆé€‚é…åº“,è¯¦ç»†æ•™ç¨‹ï¼šhttps://ldc2.layabox.com/doc/?nav=zh-ts-5-0-0")),
                        s.indexOf("OPPO") &gt; -1 &amp;&amp; s.indexOf("MiniGame") &gt; -1 &amp;&amp; (window.qgMiniGame(e, e),
                            e.QGMiniAdapter ? e.QGMiniAdapter.enable() : console.error("è¯·å…ˆæ·»åŠ&nbsp;OPPOå°æ¸¸æˆé€‚é…åº“")), s.indexOf("VVGame") &gt; -1 &amp;&amp; (window.vvMiniGame(e, e),
                                e.VVMiniAdapter ? e.VVMiniAdapter.enable() : console.error("è¯·å…ˆæ·»åŠ&nbsp;VIVOå°æ¸¸æˆé€‚é…åº“")), n.trace = console.log,
                        n.requestAnimationFrame = n.requestAnimationFrame || n.webkitRequestAnimationFrame || n.mozRequestAnimationFrame || n.oRequestAnimationFrame || n.msRequestAnimationFrame || function (t) {
                            return n.setTimeout(t, 1e3 / 60);
                        };
                    var l = r.body.style;
                    l.margin = 0, l.overflow = "hidden", l["-webkit-user-select"] = "none", l["-webkit-tap-highlight-color"] = "rgba(200,200,200,0)";
                    for (var h = r.getElementsByTagName("meta"), u = 0, c = !1, _ = "width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"; u &lt; h.length;) {
                        var d = h[u];
                        if ("viewport" == d.name) {
                            d.content = _, c = !0;
                            break;
                        }
                        u++;
                    }
                    return c || ((d = r.createElement("meta")).name = "viewport", d.content = _, r.getElementsByTagName("head")[0].appendChild(d)),
                        t.onMobile = !!window.isConchApp || s.indexOf("Mobile") &gt; -1, t.onIOS = !!s.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
                        t.onIPhone = s.indexOf("iPhone") &gt; -1, t.onMac = s.indexOf("Mac OS X") &gt; -1, t.onIPad = s.indexOf("iPad") &gt; -1 || "MacIntel" === o &amp;&amp; a &gt; 1,
                        t.onAndroid = s.indexOf("Android") &gt; -1 || s.indexOf("Adr") &gt; -1, t.onWP = s.indexOf("Windows Phone") &gt; -1,
                        t.onQQBrowser = s.indexOf("QQBrowser") &gt; -1, t.onMQQBrowser = s.indexOf("MQQBrowser") &gt; -1 || s.indexOf("Mobile") &gt; -1 &amp;&amp; s.indexOf("QQ") &gt; -1,
                        t.onIE = !!n.ActiveXObject || "ActiveXObject" in n, t.onWeiXin = s.indexOf("MicroMessenger") &gt; -1,
                        t.onSafari = s.indexOf("Safari") &gt; -1, t.onPC = !t.onMobile, t.onMiniGame = s.indexOf("MiniGame") &gt; -1,
                        t.onBDMiniGame = s.indexOf("SwanGame") &gt; -1, t.onLayaRuntime = !!t.window.conch,
                        s.indexOf("OPPO") &gt; -1 &amp;&amp; s.indexOf("MiniGame") &gt; -1 ? (t.onQGMiniGame = !0, t.onMiniGame = !1) : "qq" in t.window &amp;&amp; s.indexOf("MiniGame") &gt; -1 ? (t.onQQMiniGame = !0,
                            t.onMiniGame = !1) : "bl" in t.window &amp;&amp; s.indexOf("MiniGame") &gt; -1 &amp;&amp; (t.onBLMiniGame = !0,
                                t.onMiniGame = !0), t.onVVMiniGame = s.indexOf("VVGame") &gt; -1, t.onKGMiniGame = s.indexOf("QuickGame") &gt; -1,
                        s.indexOf("AlipayMiniGame") &gt; -1 &amp;&amp; (t.onAlipayMiniGame = !0, t.onMiniGame = !1),
                        n;
                }
            }, {
                key: "createElement",
                value: function (e) {
                    return t.__init__(), t._document.createElement(e);
                }
            }, {
                key: "getElementById",
                value: function (e) {
                    return t.__init__(), t._document.getElementById(e);
                }
            }, {
                key: "removeElement",
                value: function (t) {
                    t &amp;&amp; t.parentNode &amp;&amp; t.parentNode.removeChild(t);
                }
            }, {
                key: "now",
                value: function () {
                    return Date.now();
                }
            }, {
                key: "clientWidth",
                get: function () {
                    return t.__init__(), t._window.innerWidth || t._document.body.clientWidth;
                }
            }, {
                key: "clientHeight",
                get: function () {
                    return t.__init__(), t._window.innerHeight || t._document.body.clientHeight || t._document.documentElement.clientHeight;
                }
            }, {
                key: "width",
                get: function () {
                    return t.__init__(), (i.stage &amp;&amp; i.stage.canvasRotation ? t.clientHeight : t.clientWidth) * t.pixelRatio;
                }
            }, {
                key: "height",
                get: function () {
                    return t.__init__(), (i.stage &amp;&amp; i.stage.canvasRotation ? t.clientWidth : t.clientHeight) * t.pixelRatio;
                }
            }, {
                key: "pixelRatio",
                get: function () {
                    return t._pixelRatio &lt; 0 &amp;&amp; (t.__init__(), t.userAgent.indexOf("Mozilla/6.0(Linux; Android 6.0; HUAWEI NXT-AL10 Build/HUAWEINXT-AL10)") &gt; -1 ? t._pixelRatio = 2 : (t._pixelRatio = t._window.devicePixelRatio || 1,
                        t._pixelRatio &lt; 1 &amp;&amp; (t._pixelRatio = 1))), t._pixelRatio;
                }
            }, {
                key: "container",
                get: function () {
                    return t._container || (t.__init__(), t._container = t.createElement("div"), t._container.id = "layaContainer",
                        t._document.body.appendChild(t._container)), t._container;
                },
                set: function (e) {
                    t._container = e;
                }
            }, {
                key: "window",
                get: function () {
                    return t._window || t.__init__();
                }
            }, {
                key: "document",
                get: function () {
                    return t.__init__(), t._document;
                }
            }]), t;
        }();
        zt._pixelRatio = -1, zt.mainCanvas = null, zt.hanzi = new RegExp("^[ä¸€-é¾¥]$"), zt.fontMap = [],
            zt.measureText = function (t, e) {
                var i = zt.hanzi.test(t);
                if (i &amp;&amp; zt.fontMap[e]) return zt.fontMap[e];
                var n = zt.context;
                n.font = e;
                var r = n.measureText(t);
                return i &amp;&amp; (zt.fontMap[e] = r), r;
            };
        var Kt = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i(t, n) {
                var r, s = !(arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2]) || arguments[2], a = !(arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3]) || arguments[3], o = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] &amp;&amp; arguments[4];
                return _classCallCheck(this, i), (r = e.call(this)).ctx = null, r.lastScaleX = 1,
                    r.lastScaleY = 1, r.maxTexW = 0, r.maxTexH = 0, r.scaleFontSize = !0, r.showDbgInfo = !1,
                    r.supportImageData = !0, r.maxTexW = t, r.maxTexH = n, r.scaleFontSize = s, r.supportImageData = a,
                    r.showDbgInfo = o, i.canvas || (i.canvas = zt.createElement("canvas"), i.canvas.width = 1024,
                        i.canvas.height = 512, i.canvas.style.left = "-10000px", i.canvas.style.position = "absolute",
                        document.body.appendChild(i.canvas), r.ctx = i.canvas.getContext("2d")), r;
            }
            return _createClass(i, [{
                key: "getWidth",
                value: function (t, e) {
                    return this.ctx ? (this.ctx._lastFont != t &amp;&amp; (this.ctx.font = t, this.ctx._lastFont = t),
                        this.ctx.measureText(e).width) : 0;
                }
            }, {
                key: "scale",
                value: function (t, e) {
                    if (!this.supportImageData) return this.lastScaleX = t, void (this.lastScaleY = e);
                    this.lastScaleX == t &amp;&amp; this.lastScaleY == e || (this.ctx.setTransform(t, 0, 0, e, 0, 0),
                        this.lastScaleX = t, this.lastScaleY = e);
                }
            }, {
                key: "getCharBmp",
                value: function (t, e, n, r, s, a, o, l, h, u) {
                    var c = arguments.length &gt; 10 &amp;&amp; void 0 !== arguments[10] ? arguments[10] : null;
                    if (!this.supportImageData) return this.getCharCanvas(t, e, n, r, s, a, o, l, h, u);
                    var _ = this.ctx, d = this.fontsz;
                    _.font != e &amp;&amp; (_.font = e, _._lastFont = e), a.width = _.measureText(t).width;
                    var f = a.width * this.lastScaleX, v = a.height * this.lastScaleY;
                    f += (o + h) * this.lastScaleX, v += (l + u) * this.lastScaleY, f = Math.ceil(f),
                        v = Math.ceil(v);
                    var p = (f = Math.min(f, i.canvas.width)) + 2 * n + 1, y = (v = Math.min(v, i.canvas.height)) + 2 * n + 1;
                    c &amp;&amp; (p = Math.max(p, c[0] + c[2] + 1), y = Math.max(y, c[1] + c[3] + 1)), _.clearRect(0, 0, p / this.lastScaleX + 1, y / this.lastScaleY + 1),
                        _.save(), _.textBaseline = "middle", n &gt; 0 &amp;&amp; (_.strokeStyle = s, _.lineWidth = n,
                            _.strokeText(t, o, l + d / 2)), r &amp;&amp; (_.fillStyle = r, _.fillText(t, o, l + d / 2)),
                        this.showDbgInfo &amp;&amp; (_.strokeStyle = "#ff0000", _.strokeRect(1, 1, f - 2, v - 2),
                            _.strokeStyle = "#00ff00", _.strokeRect(o, l, a.width, a.height)), c &amp;&amp; -1 == c[2] &amp;&amp; (c[2] = Math.ceil((a.width + 2 * n) * this.lastScaleX));
                    var g = c ? _.getImageData(c[0], c[1], c[2], c[3] + 1) : _.getImageData(0, 0, f, v + 1);
                    return _.restore(), a.bmpWidth = g.width, a.bmpHeight = g.height, g;
                }
            }, {
                key: "getCharCanvas",
                value: function (t, e, n, r, s, a, o, l, h, u) {
                    var c = this.ctx;
                    c.font != e &amp;&amp; (c.font = e, c._lastFont = e), a.width = c.measureText(t).width;
                    var _ = a.width * this.lastScaleX, d = a.height * this.lastScaleY;
                    _ += (o + h) * this.lastScaleX, d += (l + u) * this.lastScaleY + 1, _ = Math.min(_, this.maxTexW),
                        d = Math.min(d, this.maxTexH), i.canvas.width = Math.min(_ + 1, this.maxTexW), i.canvas.height = Math.min(d + 1, this.maxTexH),
                        c.font = e, c.clearRect(0, 0, _ + 1 + n, d + 1 + n), c.setTransform(1, 0, 0, 1, 0, 0),
                        c.save(), this.scaleFontSize &amp;&amp; c.scale(this.lastScaleX, this.lastScaleY), c.translate(o, l),
                        c.textAlign = "left";
                    var f = this.fontsz;
                    return c.textBaseline = "middle", n &gt; 0 ? (c.strokeStyle = s, c.fillStyle = r, c.lineWidth = n,
                        c.fillAndStrokeText ? c.fillAndStrokeText(t, 0, f / 2) : (c.strokeText(t, 0, f / 2),
                            c.fillText(t, 0, f / 2))) : r &amp;&amp; (c.fillStyle = r, c.fillText(t, 0, f / 2)), this.showDbgInfo &amp;&amp; (c.strokeStyle = "#ff0000",
                                c.strokeRect(0, 0, _, d), c.strokeStyle = "#00ff00", c.strokeRect(0, 0, a.width, a.height)),
                        c.restore(), a.bmpWidth = i.canvas.width, a.bmpHeight = i.canvas.height, i.canvas;
                }
            }, {
                key: "canvasWidth",
                get: function () {
                    return i.canvas.width;
                },
                set: function (t) {
                    i.canvas.width != t &amp;&amp; (i.canvas.width = t, t &gt; 2048 &amp;&amp; console.warn("ç”»æ–‡å­—è®¾ç½®çš„å®½åº¦å¤ªå¤§ï¼Œè¶…è¿‡2048äº†"),
                        this.ctx.setTransform(1, 0, 0, 1, 0, 0), this.ctx.scale(this.lastScaleX, this.lastScaleY));
                }
            }]), i;
        }(Ht);
        Kt.canvas = null;
        var jt = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.call(this)).lastFont = "", t.lastScaleX = 1,
                    t.lastScaleY = 1, t;
            }
            return _createClass(i, [{
                key: "getWidth",
                value: function (t, e) {
                    return window.conchTextCanvas ? (window.conchTextCanvas.font = t, this.lastFont = t,
                        window.conchTextCanvas.measureText(e).width) : 0;
                }
            }, {
                key: "scale",
                value: function (t, e) {
                    this.lastScaleX = t, this.lastScaleY = e;
                }
            }, {
                key: "getCharBmp",
                value: function (t, e, i, n, r, s, a, o, l, h) {
                    if (!window.conchTextCanvas) return null;
                    window.conchTextCanvas.font = e, this.lastFont = e;
                    s.width = window.conchTextCanvas.measureText(t).width, s.height;
                    window.conchTextCanvas.scale &amp;&amp; window.conchTextCanvas.scale(this.lastScaleX, this.lastScaleY);
                    var u = j.create(r), c = u.numColor, _ = j.create(n), d = _.numColor, f = window.conchTextCanvas.getTextBitmapData(t, d, i &gt; 2 ? 2 : i, c);
                    return s.bmpWidth = f.width, s.bmpHeight = f.height, f;
                }
            }]), i;
        }(Ht), qt = function () {
            function t() {
                _classCallCheck(this, t), this.fontSizeInfo = {}, this.mapFont = {}, this.fontID = 0,
                    this.mapColor = [], this.colorID = 0, this.fontScaleX = 1, this.fontScaleY = 1,
                    this._curStrPos = 0, this.textAtlases = [], this.isoTextures = [], this.lastFont = null,
                    this.fontSizeW = 0, this.fontSizeH = 0, this.fontSizeOffX = 0, this.fontSizeOffY = 0,
                    this.renderPerChar = !0, this.tmpAtlasPos = new v(), this.textureMem = 0, i.TextAtlas = Ut;
                var e = !1, n = i.Laya.MiniAdpter;
                n &amp;&amp; n.systemInfo &amp;&amp; n.systemInfo.system &amp;&amp; (e = "ios 10.1.1" === n.systemInfo.system.toLowerCase()),
                    i.Browser.onMiniGame &amp;&amp; !e &amp;&amp; (t.isWan1Wan = !0), this.charRender = i.Render.isConchApp ? new jt() : new Kt(t.atlasWidth, t.atlasWidth, t.scaleFontWithCtx, !t.isWan1Wan, !1),
                    t.textRenderInst = this, i.Laya.textRender = this, t.atlasWidth2 = t.atlasWidth * t.atlasWidth;
            }
            return _createClass(t, [{
                key: "setFont",
                value: function (e) {
                    if (this.lastFont != e) {
                        this.lastFont = e;
                        var i = this.getFontSizeInfo(e._family), n = i &gt;&gt; 24, r = i &gt;&gt; 16 &amp; 255, s = i &gt;&gt; 8 &amp; 255, a = 255 &amp; i, o = e._size / t.standardFontSize;
                        this.fontSizeOffX = Math.ceil(n * o), this.fontSizeOffY = Math.ceil(r * o), this.fontSizeW = Math.ceil(s * o),
                            this.fontSizeH = Math.ceil(a * o), e._font.indexOf("italic") &gt;= 0 ? this.fontStr = e._font.replace("italic", "") : this.fontStr = e._font;
                    }
                }
            }, {
                key: "getNextChar",
                value: function (t) {
                    var e = t.length, i = this._curStrPos;
                    if (i &gt;= e) return null;
                    for (var n = i, r = 0; n &lt; e; n++) {
                        var s = t.charCodeAt(n);
                        if (s &gt;&gt;&gt; 11 == 27) {
                            if (1 == r) break;
                            r = 1, n++;
                        } else if (65038 === s || 65039 === s); else if (8205 == s) r = 2; else if (0 == r) r = 1; else if (1 == r) break;
                    }
                    return this._curStrPos = n, t.substring(i, n);
                }
            }, {
                key: "filltext",
                value: function (t, e, n, r, s, a, o, l, h) {
                    var u = arguments.length &gt; 9 &amp;&amp; void 0 !== arguments[9] ? arguments[9] : 0;
                    if (!(e.length &lt;= 0)) {
                        var c = Yt.Parse(s), _ = 0;
                        switch (h) {
                            case "center":
                                _ = i.Context.ENUM_TEXTALIGN_CENTER;
                                break;

                            case "right":
                                _ = i.Context.ENUM_TEXTALIGN_RIGHT;
                        }
                        this._fast_filltext(t, e, null, n, r, c, a, o, l, _, u);
                    }
                }
            }, {
                key: "fillWords",
                value: function (t, e, i, n, r, s, a, o) {
                    if (e &amp;&amp; !(e.length &lt;= 0)) {
                        var l = "string" == typeof r ? Yt.Parse(r) : r;
                        this._fast_filltext(t, null, e, i, n, l, s, a, o, 0, 0);
                    }
                }
            }, {
                key: "_fast_filltext",
                value: function (e, n, r, s, a, o, l, h, u, c) {
                    if (!(n &amp;&amp; n.length &lt; 1 || r &amp;&amp; r.length &lt; 1)) {
                        if (u &lt; 0 &amp;&amp; (u = 0), this.setFont(o), this.fontScaleX = this.fontScaleY = 1, t.scaleFontWithCtx) {
                            var _ = 1, d = 1;
                            if (i.Render.isConchApp &amp;&amp; !window.conchTextCanvas.scale || (_ = e.getMatScaleX(),
                                d = e.getMatScaleY()), _ &lt; 1e-4 || d &lt; .1) return;
                            _ &gt; 1 &amp;&amp; (this.fontScaleX = _), d &gt; 1 &amp;&amp; (this.fontScaleY = d);
                        }
                        o._italic &amp;&amp; (e._italicDeg = 13);
                        var f = n, v = !r &amp;&amp; n instanceof Vt, p = n, y = !!r, g = v ? f.pageChars : [], m = 0;
                        switch (v ? (p = f._text, (m = f.width) &lt; 0 &amp;&amp; (m = f.width = this.charRender.getWidth(this.fontStr, p))) : m = p ? this.charRender.getWidth(this.fontStr, p) : 0,
                        c) {
                            case i.Context.ENUM_TEXTALIGN_CENTER:
                                s -= m / 2;
                                break;

                            case i.Context.ENUM_TEXTALIGN_RIGHT:
                                s -= m;
                        }
                        f &amp;&amp; g &amp;&amp; this.hasFreedText(g) &amp;&amp; (g = f.pageChars = []);
                        var T = null, k = this.renderPerChar = !v || t.forceSplitRender || y || v &amp;&amp; f.splitRender;
                        if (!g || g.length &lt; 1) if (v &amp;&amp; (f.scalex = this.fontScaleX, f.scaley = this.fontScaleY),
                            k) {
                            var x, C = 0, E = 0;
                            for (this._curStrPos = 0; ;) {
                                if (r) {
                                    var b = r[this._curStrPos++];
                                    b ? (x = b.char, C = b.x, E = b.y) : x = null;
                                } else x = this.getNextChar(p);
                                if (!x) break;
                                if (!(T = this.getCharRenderInfo(x, o, l, h, u, !1))) break;
                                if (T.isSpace); else {
                                    var w = g[T.tex.id];
                                    if (w) w = w.words; else {
                                        var R = {
                                            texgen: T.tex.genID,
                                            tex: T.tex,
                                            words: []
                                        };
                                        g[T.tex.id] = R, w = R.words;
                                    }
                                    w.push({
                                        ri: T,
                                        x: C,
                                        y: E,
                                        w: T.bmpWidth / this.fontScaleX,
                                        h: T.bmpHeight / this.fontScaleY
                                    }), C += T.width;
                                }
                            }
                        } else {
                            var A = t.noAtlas || m * this.fontScaleX &gt; t.atlasWidth;
                            T = this.getCharRenderInfo(p, o, l, h, u, A), g[0] = {
                                texgen: T.tex.genID,
                                tex: T.tex,
                                words: [{
                                    ri: T,
                                    x: 0,
                                    y: 0,
                                    w: T.bmpWidth / this.fontScaleX,
                                    h: T.bmpHeight / this.fontScaleY
                                }]
                            };
                        }
                        this._drawResortedWords(e, s, a, g), e._italicDeg = 0;
                    }
                }
            }, {
                key: "_drawResortedWords",
                value: function (t, e, n, r) {
                    var s = !!t._charSubmitCache &amp;&amp; t._charSubmitCache._enable, a = t._curMat;
                    r.length;
                    for (var o in r) {
                        var l = r[o];
                        if (l) {
                            var h = l.words, u = h.length;
                            if (!(u &lt;= 0)) for (var c = r[o].tex, _ = 0; _ &lt; u; _++) {
                                var d = h[_], f = d.ri;
                                if (!f.isSpace) {
                                    if (f.touch(), t.drawTexAlign = !0, i.Render.isConchApp) t._drawTextureM(c.texture, e + d.x - f.orix, n + d.y - f.oriy, d.w, d.h, null, 1, f.uv); else {
                                        var v = c;
                                        t._inner_drawTexture(v.texture, v.id, e + d.x - f.orix, n + d.y - f.oriy, d.w, d.h, a, f.uv, 1, s);
                                    }
                                    t.touches &amp;&amp; t.touches.push(f);
                                }
                            }
                        }
                    }
                }
            }, {
                key: "hasFreedText",
                value: function (t) {
                    for (var e = t.length, i = 0; i &lt; e; i++) {
                        var n = t[i];
                        if (n) {
                            var r = n.tex;
                            if (r.__destroyed || r.genID != n.texgen) return !0;
                        }
                    }
                    return !1;
                }
            }, {
                key: "getCharRenderInfo",
                value: function (e, n, r, s, a) {
                    var o = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] &amp;&amp; arguments[5], l = this.mapFont[n._family];
                    null == l &amp;&amp; (this.mapFont[n._family] = l = this.fontID++);
                    var h = e + "_" + l + "_" + n._size + "_" + r;
                    a &gt; 0 &amp;&amp; (h += "_" + s + a), n._bold &amp;&amp; (h += "P"), 1 == this.fontScaleX &amp;&amp; 1 == this.fontScaleY || (h += (20 * this.fontScaleX | 0) + "_" + (20 * this.fontScaleY | 0));
                    var u, c, _ = 0, d = this.textAtlases.length;
                    if (!o) for (_ = 0; _ &lt; d; _++) if (u = (c = this.textAtlases[_]).charMaps[h]) return u.touch(),
                        u;
                    u = new Xt(), this.charRender.scale(this.fontScaleX, this.fontScaleY), u.char = e,
                        u.height = n._size;
                    var f = i.Render.isConchApp ? 0 : n._size / 3 | 0, v = null;
                    a || (a = 0);
                    var p = Math.ceil((this.charRender.getWidth(this.fontStr, e) + 2 * a) * this.fontScaleX);
                    if (p &gt; this.charRender.canvasWidth &amp;&amp; (this.charRender.canvasWidth = Math.min(2048, p + 2 * f)),
                        o) {
                        if (this.charRender.fontsz = n._size, v = this.charRender.getCharBmp(e, this.fontStr, a, r, s, u, f, f, f, f, null)) {
                            var y = Nt.getTextTexture(v.width, v.height);
                            y.addChar(v, 0, 0, u.uv), u.tex = y, u.orix = f, u.oriy = f, y.ri = u, this.isoTextures.push(y);
                        }
                    } else {
                        var g = e.length, m = 1 * a, T = Math.ceil((this.fontSizeW + 2 * m) * this.fontScaleX), k = Math.ceil((this.fontSizeH + 2 * m) * this.fontScaleY);
                        t.imgdtRect[0] = (f - this.fontSizeOffX - m) * this.fontScaleX | 0, t.imgdtRect[1] = (f - this.fontSizeOffY - m) * this.fontScaleY | 0,
                            this.renderPerChar || 1 == g ? (t.imgdtRect[2] = Math.max(p, T), t.imgdtRect[3] = Math.max(p, k)) : (t.imgdtRect[2] = -1,
                                t.imgdtRect[3] = k), this.charRender.fontsz = n._size, (v = this.charRender.getCharBmp(e, this.fontStr, a, r, s, u, f, f, f, f, t.imgdtRect)) &amp;&amp; (c = this.addBmpData(v, u),
                                    t.isWan1Wan ? (u.orix = f, u.oriy = f) : (u.orix = this.fontSizeOffX + m, u.oriy = this.fontSizeOffY + m),
                                    c.charMaps[h] = u);
                    }
                    return u;
                }
            }, {
                key: "addBmpData",
                value: function (t, e) {
                    for (var i, n = t.width, r = t.height, s = this.textAtlases.length, a = !1, o = 0; o &lt; s &amp;&amp; !(a = (i = this.textAtlases[o]).getAEmpty(n, r, this.tmpAtlasPos)); o++);
                    if (!a) {
                        if (i = new Ut(), this.textAtlases.push(i), !(a = i.getAEmpty(n, r, this.tmpAtlasPos))) throw "err1";
                        this.cleanAtlases();
                    }
                    return a &amp;&amp; (i.texture.addChar(t, this.tmpAtlasPos.x, this.tmpAtlasPos.y, e.uv),
                        e.tex = i.texture), i;
                }
            }, {
                key: "GC",
                value: function () {
                    for (var e = 0, i = this.textAtlases.length, n = t.destroyAtlasDt, r = 0, s = yt.loopCount, a = -1, o = 0, l = null, h = null; e &lt; i; e++) {
                        if (l = (h = this.textAtlases[e]).texture) {
                            l.curUsedCovRate, r += l.curUsedCovRateAtlas;
                            var u = h.usedRate - l.curUsedCovRateAtlas;
                            o &lt; u &amp;&amp; (o = u, a = e);
                        }
                        s - h.texture.lastTouchTm &gt; n &amp;&amp; (t.showLog &amp;&amp; console.log(h.texture.id), h.destroy(),
                            this.textAtlases[e] = this.textAtlases[i - 1], i--, e--, a = -1);
                    }
                    for (this.textAtlases.length = i, i = this.isoTextures.length, e = 0; e &lt; i; e++) s - (l = this.isoTextures[e]).lastTouchTm &gt; t.destroyUnusedTextureDt &amp;&amp; (l.ri.deleted = !0,
                        l.ri.tex = null, l.destroy(), this.isoTextures[e] = this.isoTextures[i - 1], i--,
                        e--);
                    this.isoTextures.length = i;
                    var c = this.textAtlases.length &gt; 1 &amp;&amp; this.textAtlases.length - r &gt;= 2;
                    (t.atlasWidth * t.atlasWidth * 4 * this.textAtlases.length &gt; t.cleanMem || c || t.simClean) &amp;&amp; (t.simClean = !1,
                        t.showLog &amp;&amp; console.log("æ¸…ç†ä½¿ç”¨çŽ‡ä½Žçš„è´´å›¾ã€‚æ€»ä½¿ç”¨çŽ‡:", r, ":", this.textAtlases.length, "æœ€å·®è´´å›¾:" + a),
                        a &gt;= 0 &amp;&amp; ((h = this.textAtlases[a]).destroy(), this.textAtlases[a] = this.textAtlases[this.textAtlases.length - 1],
                            this.textAtlases.length = this.textAtlases.length - 1)), Nt.clean();
                }
            }, {
                key: "cleanAtlases",
                value: function () { }
            }, {
                key: "getCharBmp",
                value: function (t) { }
            }, {
                key: "checkBmpLine",
                value: function (t, e, i, n) {
                    this.bmpData32.buffer != t.data.buffer &amp;&amp; (this.bmpData32 = new Uint32Array(t.data.buffer));
                    for (var r = t.width * e + i, s = i; s &lt; n; s++) if (0 != this.bmpData32[r++]) return !0;
                    return !1;
                }
            }, {
                key: "updateBbx",
                value: function (t, e) {
                    var i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] &amp;&amp; arguments[2], n = t.width, r = t.height, s = 0, a = e[1], o = 0, l = a;
                    if (this.checkBmpLine(t, a, 0, n)) for (; ;) {
                        if ((l = (a + o) / 2 | 0) + 1 &gt;= a) {
                            e[1] = l;
                            break;
                        }
                        this.checkBmpLine(t, l, 0, n) ? a = l : o = l;
                    }
                    if (e[3] &gt; r) e[3] = r; else if (l = a = e[3], o = r, this.checkBmpLine(t, a, 0, n)) for (; ;) {
                        if ((l = (a + o) / 2 | 0) - 1 &lt;= a) {
                            e[3] = l;
                            break;
                        }
                        this.checkBmpLine(t, l, 0, n) ? a = l : o = l;
                    }
                    if (!i) {
                        var h = e[0], u = n * e[1];
                        for (l = e[1]; l &lt; e[3]; l++) {
                            for (s = 0; s &lt; h; s++) if (0 != this.bmpData32[u + s]) {
                                h = s;
                                break;
                            }
                            u += n;
                        }
                        e[0] = h;
                        var c = e[2];
                        for (u = n * e[1], l = e[1]; l &lt; e[3]; l++) {
                            for (s = c; s &lt; n; s++) if (0 != this.bmpData32[u + s]) {
                                c = s;
                                break;
                            }
                            u += n;
                        }
                        e[2] = c;
                    }
                }
            }, {
                key: "getFontSizeInfo",
                value: function (e) {
                    var n = this.fontSizeInfo[e];
                    if (null != n) return n;
                    var r = "bold " + t.standardFontSize + "px " + e;
                    if (t.isWan1Wan) {
                        this.fontSizeW = 1.5 * this.charRender.getWidth(r, "æœ‰"), this.fontSizeH = 1.5 * t.standardFontSize;
                        var s = this.fontSizeW &lt;&lt; 8 | this.fontSizeH;
                        return this.fontSizeInfo[e] = s, s;
                    }
                    t.pixelBBX[0] = t.standardFontSize / 2, t.pixelBBX[1] = t.standardFontSize / 2,
                        t.pixelBBX[2] = t.standardFontSize, t.pixelBBX[3] = t.standardFontSize;
                    var a = 16, o = 16;
                    this.charRender.scale(1, 1), t.tmpRI.height = t.standardFontSize, this.charRender.fontsz = t.standardFontSize;
                    var l = this.charRender.getCharBmp("g", r, 0, "red", null, t.tmpRI, a, o, 16, 16);
                    i.Render.isConchApp &amp;&amp; (l.data = new Uint8ClampedArray(l.data)), this.bmpData32 = new Uint32Array(l.data.buffer),
                        this.updateBbx(l, t.pixelBBX, !1), l = this.charRender.getCharBmp("æœ‰", r, 0, "red", null, t.tmpRI, o, o, 16, 16),
                        i.Render.isConchApp &amp;&amp; (l.data = new Uint8ClampedArray(l.data)), this.bmpData32 = new Uint32Array(l.data.buffer),
                        t.pixelBBX[2] &lt; a + t.tmpRI.width &amp;&amp; (t.pixelBBX[2] = a + t.tmpRI.width), this.updateBbx(l, t.pixelBBX, !1),
                        i.Render.isConchApp &amp;&amp; (a = 0, o = 0);
                    var h = Math.max(a - t.pixelBBX[0], 0) &lt;&lt; 24 | Math.max(o - t.pixelBBX[1], 0) &lt;&lt; 16 | t.pixelBBX[2] - t.pixelBBX[0] &lt;&lt; 8 | t.pixelBBX[3] - t.pixelBBX[1];
                    return this.fontSizeInfo[e] = h, h;
                }
            }, {
                key: "printDbgInfo",
                value: function () {
                    for (var e in console.log("å›¾é›†ä¸ªæ•°:" + this.textAtlases.length + ",æ¯ä¸ªå›¾é›†å¤§å°:" + t.atlasWidth + "x" + t.atlasWidth, " ç”¨canvas:", t.isWan1Wan),
                        console.log("å›¾é›†å&nbsp;ç”¨ç©ºé—´:" + t.atlasWidth * t.atlasWidth * 4 / 1024 / 1024 * this.textAtlases.length + "M"),
                        console.log("ç¼“å­˜ç”¨åˆ°çš„å­—ä½“:"), this.mapFont) {
                        var i = this.getFontSizeInfo(e), n = i &gt;&gt; 24, r = i &gt;&gt; 16 &amp; 255, s = i &gt;&gt; 8 &amp; 255, a = 255 &amp; i;
                        console.log("    " + e, " off:", n, r, " size:", s, a);
                    }
                    var o = 0;
                    console.log("ç¼“å­˜æ•°æ®:");
                    var l = 0, h = 0;
                    this.textAtlases.forEach(function (e) {
                        var i = e.texture.id, n = yt.loopCount - e.texture.lastTouchTm, r = n &gt; 0 ? n + "å¸§ä»¥å‰" : "å½“å‰å¸§";
                        for (var s in l += e.texture.curUsedCovRate, h += e.texture.curUsedCovRateAtlas,
                            console.log("--å›¾é›†(id:" + i + ",å½“å‰ä½¿ç”¨çŽ‡:" + (1e3 * e.texture.curUsedCovRate | 0) + "â€°", "å½“å‰å›¾é›†ä½¿ç”¨çŽ‡:", (100 * e.texture.curUsedCovRateAtlas | 0) + "%", "å›¾é›†ä½¿ç”¨çŽ‡:", 100 * e.usedRate | 0, "%, ä½¿ç”¨äºŽ:" + r + ")--:"),
                            e.charMaps) {
                            var a = e.charMaps[s];
                            console.log("     off:", a.orix, a.oriy, " bmpå®½é«˜:", a.bmpWidth, a.bmpHeight, "æ—&nbsp;æ•ˆ:", a.deleted, "touchdt:", yt.loopCount - a.touchTick, "ä½ç½®:", a.uv[0] * t.atlasWidth | 0, a.uv[1] * t.atlasWidth | 0, "å­—ç¬¦:", a.char, "key:", s),
                                o++;
                        }
                    }), console.log("ç‹¬ç«‹è´´å›¾æ–‡å­—(" + this.isoTextures.length + "ä¸ª):"), this.isoTextures.forEach(function (t) {
                        console.log("    size:", t._texW, t._texH, "touché—´éš”:", yt.loopCount - t.lastTouchTm, "char:", t.ri.char);
                    }), console.log("æ€»ç¼“å­˜:", o, "æ€»ä½¿ç”¨çŽ‡:", l, "æ€»å½“å‰å›¾é›†ä½¿ç”¨çŽ‡:", h);
                }
            }, {
                key: "showAtlas",
                value: function (e, n, r, s, a, o) {
                    if (!this.textAtlases[e]) return console.log("æ²¡æœ‰è¿™ä¸ªå›¾é›†"), null;
                    var l = new i.Sprite(), h = this.textAtlases[e].texture, u = {
                        width: t.atlasWidth,
                        height: t.atlasWidth,
                        sourceWidth: t.atlasWidth,
                        sourceHeight: t.atlasWidth,
                        offsetX: 0,
                        offsetY: 0,
                        getIsReady: function () {
                            return !0;
                        },
                        _addReference: function () { },
                        _removeReference: function () { },
                        _getSource: function () {
                            return h._getSource();
                        },
                        bitmap: {
                            id: h.id
                        },
                        _uv: Wt.DEF_UV
                    };
                    return l.size = function (t, e) {
                        return this.width = t, this.height = e, l.graphics.clear(), l.graphics.drawRect(0, 0, l.width, l.height, n),
                            l.graphics.drawTexture(u, 0, 0, l.width, l.height), this;
                    }, l.graphics.drawRect(0, 0, a, o, n), l.graphics.drawTexture(u, 0, 0, a, o), l.pos(r, s),
                        i.stage.addChild(l), l;
                }
            }, {
                key: "filltext_native",
                value: function (t, e, n, r, s, a, o, l, h, u) {
                    var c = arguments.length &gt; 10 &amp;&amp; void 0 !== arguments[10] ? arguments[10] : 0;
                    if (!(e &amp;&amp; e.length &lt;= 0 || n &amp;&amp; n.length &lt; 1)) {
                        var _ = Yt.Parse(a), d = 0;
                        switch (u) {
                            case "center":
                                d = i.Context.ENUM_TEXTALIGN_CENTER;
                                break;

                            case "right":
                                d = i.Context.ENUM_TEXTALIGN_RIGHT;
                        }
                        return this._fast_filltext(t, e, n, r, s, _, o, l, h, d, c);
                    }
                }
            }]), t;
        }();
        qt.useOldCharBook = !1, qt.atlasWidth = 1024, qt.noAtlas = !1, qt.forceSplitRender = !1,
            qt.forceWholeRender = !1, qt.scaleFontWithCtx = !0, qt.standardFontSize = 32, qt.destroyAtlasDt = 10,
            qt.checkCleanTextureDt = 2e3, qt.destroyUnusedTextureDt = 3e3, qt.cleanMem = 104857600,
            qt.isWan1Wan = !1, qt.showLog = !1, qt.debugUV = !1, qt.tmpRI = new Xt(), qt.pixelBBX = [0, 0, 0, 0],
            qt.imgdtRect = [0, 0, 0, 0], qt.simClean = !1, Nt.gTextRender = qt;
        var Qt = function () {
            function e() {
                if (_classCallCheck(this, e), this._tmpMatrix = new f(), this._drawTexToDrawTri_Vert = new Float32Array(8),
                    this._drawTexToDrawTri_Index = new Uint16Array([0, 1, 2, 0, 2, 3]), this._tempUV = new Float32Array(8),
                    this._drawTriUseAbsMatrix = !1, this._id = ++e._COUNT, this._other = null, this._renderNextSubmitIndex = 0,
                    this._path = null, this._drawCount = 1, this._width = e._MAXSIZE, this._height = e._MAXSIZE,
                    this._renderCount = 0, this._submits = null, this._curSubmit = null, this._submitKey = new X(),
                    this._mesh = null, this._pathMesh = null, this._triangleMesh = null, this.meshlist = [],
                    this._transedPoints = new Array(8), this._temp4Points = new Array(8), this._clipRect = e.MAXCLIPRECT,
                    this._globalClipMatrix = new f(e._MAXSIZE, 0, 0, e._MAXSIZE, 0, 0), this._clipInCache = !1,
                    this._clipInfoID = 0, this._clipID_Gen = 0, this._lastMatScaleX = 1, this._lastMatScaleY = 1,
                    this._lastMat_a = 1, this._lastMat_b = 0, this._lastMat_c = 0, this._lastMat_d = 1,
                    this._nBlendType = 0, this._save = null, this._targets = null, this._charSubmitCache = null,
                    this._saveMark = null, this._shader2D = new wt(), this.sprite = null, this._italicDeg = 0,
                    this._lastTex = null, this._fillColor = 0, this._flushCnt = 0, this.defTexture = null,
                    this._colorFiler = null, this.drawTexAlign = !1, this._incache = !1, this.isMain = !1,
                    e._contextcount++, e._textRender = e._textRender || new qt(), !this.defTexture) {
                    var t = new S(2, 2);
                    t.setPixels(new Uint8Array(16)), t.lock = !0, this.defTexture = new Wt(t);
                }
                this._lastTex = this.defTexture, this.clear();
            }
            return _createClass(e, [{
                key: "drawImage",
                value: function () { }
            }, {
                key: "getImageData",
                value: function () { }
            }, {
                key: "measureText",
                value: function (t) {
                    return null;
                }
            }, {
                key: "setTransform",
                value: function () { }
            }, {
                key: "$transform",
                value: function (t, e, i, n, r, s) { }
            }, {
                key: "clearRect",
                value: function (t, e, i, n) { }
            }, {
                key: "_drawRect",
                value: function (t, e, i, n, r) {
                    U.renderBatches++, r &amp;&amp; (this.fillStyle = r), this.fillRect(t, e, i, n, null);
                }
            }, {
                key: "drawTexture2",
                value: function (t, e, i, n, r, s) { }
            }, {
                key: "transformByMatrix",
                value: function (t, e, i) {
                    this.transform(t.a, t.b, t.c, t.d, t.tx + e, t.ty + i);
                }
            }, {
                key: "saveTransform",
                value: function (t) {
                    this.save();
                }
            }, {
                key: "restoreTransform",
                value: function (t) {
                    this.restore();
                }
            }, {
                key: "drawRect",
                value: function (t, e, i, n, r, s, a) {
                    null != r &amp;&amp; (this.fillStyle = r, this.fillRect(t, e, i, n)), null != s &amp;&amp; (this.strokeStyle = s,
                        this.lineWidth = a, this.strokeRect(t, e, i, n));
                }
            }, {
                key: "alpha",
                value: function (t) {
                    this.globalAlpha *= t;
                }
            }, {
                key: "_transform",
                value: function (t, e, i) {
                    this.translate(e, i), this.transform(t.a, t.b, t.c, t.d, t.tx, t.ty), this.translate(-e, -i);
                }
            }, {
                key: "_rotate",
                value: function (t, e, i) {
                    this.translate(e, i), this.rotate(t), this.translate(-e, -i);
                }
            }, {
                key: "_scale",
                value: function (t, e, i, n) {
                    this.translate(i, n), this.scale(t, e), this.translate(-i, -n);
                }
            }, {
                key: "_drawLine",
                value: function (t, e, i, n, r, s, a, o, l) {
                    this.beginPath(), this.strokeStyle = a, this.lineWidth = o, this.moveTo(t + i, e + n),
                        this.lineTo(t + r, e + s), this.stroke();
                }
            }, {
                key: "_drawLines",
                value: function (t, e, i, n, r, s) {
                    this.beginPath(), this.strokeStyle = n, this.lineWidth = r, this.addPath(i.slice(), !1, !1, t, e),
                        this.stroke();
                }
            }, {
                key: "drawCurves",
                value: function (t, e, i, n, r) {
                    this.beginPath(), this.strokeStyle = n, this.lineWidth = r, this.moveTo(t + i[0], e + i[1]);
                    for (var s = 2, a = i.length; s &lt; a;) this.quadraticCurveTo(t + i[s++], e + i[s++], t + i[s++], e + i[s++]);
                    this.stroke();
                }
            }, {
                key: "_fillAndStroke",
                value: function (t, e, i) {
                    null != t &amp;&amp; (this.fillStyle = t, this.fill()), null != e &amp;&amp; i &gt; 0 &amp;&amp; (this.strokeStyle = e,
                        this.lineWidth = i, this.stroke());
                }
            }, {
                key: "_drawCircle",
                value: function (t, i, n, r, s, a, o) {
                    U.renderBatches++, this.beginPath(!0), this.arc(t, i, n, 0, e.PI2), this.closePath(),
                        this._fillAndStroke(r, s, a);
                }
            }, {
                key: "_drawPie",
                value: function (t, e, i, n, r, s, a, o, l) {
                    this.beginPath(), this.moveTo(t, e), this.arc(t, e, i, n, r), this.closePath(),
                        this._fillAndStroke(s, a, o);
                }
            }, {
                key: "_drawPoly",
                value: function (t, e, i, n, r, s, a, o) {
                    this.beginPath(), this.addPath(i.slice(), !0, a, t, e), this.closePath(), this._fillAndStroke(n, r, s, a);
                }
            }, {
                key: "_drawPath",
                value: function (t, e, i, n, r) {
                    this.beginPath();
                    for (var s = 0, a = i.length; s &lt; a; s++) {
                        var o = i[s];
                        switch (o[0]) {
                            case "moveTo":
                                this.moveTo(t + o[1], e + o[2]);
                                break;

                            case "lineTo":
                                this.lineTo(t + o[1], e + o[2]);
                                break;

                            case "arcTo":
                                this.arcTo(t + o[1], e + o[2], t + o[3], e + o[4], o[5]);
                                break;

                            case "closePath":
                                this.closePath();
                        }
                    }
                    null != n &amp;&amp; (this.fillStyle = n.fillStyle, this.fill()), null != r &amp;&amp; (this.strokeStyle = r.strokeStyle,
                        this.lineWidth = r.lineWidth || 1, this.lineJoin = r.lineJoin, this.lineCap = r.lineCap,
                        this.miterLimit = r.miterLimit, this.stroke());
                }
            }, {
                key: "clearBG",
                value: function (t, e, i, n) {
                    var r = g.mainContext;
                    r.clearColor(t, e, i, n), r.clear(r.COLOR_BUFFER_BIT);
                }
            }, {
                key: "_getSubmits",
                value: function () {
                    return this._submits;
                }
            }, {
                key: "_releaseMem",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] &amp;&amp; arguments[0];
                    if (this._submits) {
                        this._curMat &amp;&amp; this._curMat.destroy(), this._curMat = null, this._shader2D.destroy(),
                            this._shader2D = null, this._charSubmitCache.clear();
                        for (var e = 0, i = this._submits._length; e &lt; i; e++) this._submits[e].releaseRender();
                        var n;
                        for (this._submits.length = 0, this._submits._length = 0, this._submits = null,
                            this._curSubmit = null, this._path = null, this._save = null, e = 0, n = this.meshlist.length; e &lt; n; e++) {
                            var r = this.meshlist[e];
                            r.destroy();
                        }
                        this.meshlist.length = 0, this.sprite = null, t || (this._targets &amp;&amp; this._targets.destroy(),
                            this._targets = null);
                    }
                }
            }, {
                key: "destroy",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] &amp;&amp; arguments[0];
                    --e._contextcount, this.sprite = null, this._releaseMem(t), this._charSubmitCache.destroy(),
                        this._mesh.destroy(), t || (this._targets &amp;&amp; this._targets.destroy(), this._targets = null);
                }
            }, {
                key: "clear",
                value: function () {
                    this._submits || (this._other = Zt.DEFAULT, this._curMat = f.create(), this._charSubmitCache = new Bt(),
                        this._mesh = xt.getAMesh(this.isMain), this.meshlist.push(this._mesh), this._pathMesh = Et.getAMesh(this.isMain),
                        this.meshlist.push(this._pathMesh), this._triangleMesh = Ct.getAMesh(this.isMain),
                        this.meshlist.push(this._triangleMesh), this._submits = [], this._save = [ct.Create(this)],
                        this._save.length = 10, this._shader2D = new wt()), this._submitKey.clear(), this._mesh.clearVB(),
                        this._drawCount = 1, this._other = Zt.DEFAULT, this._other.lineWidth = this._shader2D.ALPHA = 1,
                        this._nBlendType = 0, this._clipRect = e.MAXCLIPRECT, this._curSubmit = lt.RENDERBASE,
                        lt.RENDERBASE._ref = 16777215, lt.RENDERBASE._numEle = 0, this._shader2D.fillStyle = this._shader2D.strokeStyle = st.DEFAULT;
                    for (var t = 0, i = this._submits._length; t &lt; i; t++) this._submits[t].releaseRender();
                    this._submits._length = 0, this._curMat.identity(), this._other.clear(), this._saveMark = this._save[0],
                        this._save._length = 1;
                }
            }, {
                key: "size",
                value: function (e, i) {
                    this._width == e &amp;&amp; this._height == i || (this._width = e, this._height = i, this._targets &amp;&amp; (this._targets.destroy(),
                        this._targets = new D(e, i, t.RenderTextureFormat.R8G8B8A8, -1)), this.isMain &amp;&amp; (g.mainContext.viewport(0, 0, e, i),
                            L.width = e, L.height = i)), 0 === e &amp;&amp; 0 === i &amp;&amp; this._releaseMem();
                }
            }, {
                key: "getMatScaleX",
                value: function () {
                    return this._lastMat_a == this._curMat.a &amp;&amp; this._lastMat_b == this._curMat.b || (this._lastMatScaleX = this._curMat.getScaleX(),
                        this._lastMat_a = this._curMat.a, this._lastMat_b = this._curMat.b), this._lastMatScaleX;
                }
            }, {
                key: "getMatScaleY",
                value: function () {
                    return this._lastMat_c == this._curMat.c &amp;&amp; this._lastMat_d == this._curMat.d || (this._lastMatScaleY = this._curMat.getScaleY(),
                        this._lastMat_c = this._curMat.c, this._lastMat_d = this._curMat.d), this._lastMatScaleY;
                }
            }, {
                key: "setFillColor",
                value: function (t) {
                    this._fillColor = t;
                }
            }, {
                key: "getFillColor",
                value: function () {
                    return this._fillColor;
                }
            }, {
                key: "translate",
                value: function (t, e) {
                    0 === t &amp;&amp; 0 === e || (dt.save(this), this._curMat._bTransform ? (_t.save(this),
                        this._curMat.tx += t * this._curMat.a + e * this._curMat.c, this._curMat.ty += t * this._curMat.b + e * this._curMat.d) : (this._curMat.tx = t,
                            this._curMat.ty = e));
                }
            }, {
                key: "save",
                value: function () {
                    this._save[this._save._length++] = ct.Create(this);
                }
            }, {
                key: "restore",
                value: function () {
                    var t = this._save._length, e = this._nBlendType;
                    if (!(t &lt; 1)) {
                        for (var i = t - 1; i &gt;= 0; i--) {
                            var n = this._save[i];
                            if (n.restore(this), n.isSaveMark()) return void (this._save._length = i);
                        }
                        e != this._nBlendType &amp;&amp; (this._curSubmit = lt.RENDERBASE);
                    }
                }
            }, {
                key: "fillText",
                value: function (t, i, n, r, s, a) {
                    var o = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : 0, l = arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7] ? arguments[7] : "";
                    e._textRender.filltext(this, t, i, n, r, s, l, o, a);
                }
            }, {
                key: "drawText",
                value: function (t, i, n, r, s, a) {
                    e._textRender.filltext(this, t, i, n, r, s, null, 0, a);
                }
            }, {
                key: "fillWords",
                value: function (t, i, n, r, s) {
                    e._textRender.fillWords(this, t, i, n, r, s, null, 0);
                }
            }, {
                key: "strokeWord",
                value: function (t, i, n, r, s, a, o) {
                    e._textRender.filltext(this, t, i, n, r, null, s, a, o);
                }
            }, {
                key: "fillBorderText",
                value: function (t, i, n, r, s, a, o, l) {
                    e._textRender.filltext(this, t, i, n, r, s, a, o, l);
                }
            }, {
                key: "fillBorderWords",
                value: function (t, i, n, r, s, a, o) {
                    e._textRender.fillWords(this, t, i, n, r, s, a, o);
                }
            }, {
                key: "_fast_filltext",
                value: function (t, i, n, r, s, a, o, l) {
                    var h = arguments.length &gt; 8 &amp;&amp; void 0 !== arguments[8] ? arguments[8] : 0;
                    e._textRender._fast_filltext(this, t, null, i, n, r, s, a, o, l, h);
                }
            }, {
                key: "_fillRect",
                value: function (t, i, n, r, s) {
                    var a = this._curSubmit, o = a &amp;&amp; a._key.submitType === lt.KEY_DRAWTEXTURE &amp;&amp; a._key.blendShader === this._nBlendType;
                    this._mesh.vertNum + 4 &gt; e._MAXVERTNUM &amp;&amp; (this._mesh = xt.getAMesh(this.isMain),
                        this.meshlist.push(this._mesh), o = !1), o &amp;&amp; (o = o &amp;&amp; this.isSameClipInfo(a)),
                        this.transformQuad(t, i, n, r, 0, this._curMat, this._transedPoints), this.clipedOff(this._transedPoints) || (this._mesh.addQuad(this._transedPoints, Wt.NO_UV, s, !1),
                            o || (a = this._curSubmit = Ot.create(this, this._mesh, V.create(N.TEXTURE2D, 0)),
                                this._submits[this._submits._length++] = a, this._copyClipInfo(a, this._globalClipMatrix),
                                a.shaderValue.textureHost = this._lastTex, a._key.other = this._lastTex &amp;&amp; this._lastTex.bitmap ? this._lastTex.bitmap.id : -1,
                                a._renderType = lt.TYPE_TEXTURE), this._curSubmit._numEle += 6, this._mesh.indexNum += 6,
                            this._mesh.vertNum += 4);
                }
            }, {
                key: "fillRect",
                value: function (t, e, i, n, r) {
                    var s = r ? st.create(r) : this._shader2D.fillStyle, a = this.mixRGBandAlpha(s.toInt());
                    this._fillRect(t, e, i, n, a);
                }
            }, {
                key: "fillTexture",
                value: function (t, e, n, r, s, a, o, l) {
                    t._getSource() ? this._fillTexture(t, t.width, t.height, t.uvrect, e, n, r, s, a, o.x, o.y) : this.sprite &amp;&amp; i.systemTimer.callLater(this, this._repaintSprite);
                }
            }, {
                key: "_fillTexture",
                value: function (t, i, n, r, s, a, o, l, h, u, c) {
                    var _ = this._curSubmit;
                    this._mesh.vertNum + 4 &gt; e._MAXVERTNUM &amp;&amp; (this._mesh = xt.getAMesh(this.isMain),
                        this.meshlist.push(this._mesh));
                    var d = !0, f = !0;
                    switch (h) {
                        case "repeat":
                            break;

                        case "repeat-x":
                            f = !1;
                            break;

                        case "repeat-y":
                            d = !1;
                            break;

                        case "no-repeat":
                            d = f = !1;
                    }
                    var v = this._temp4Points, p = 0, y = 0, g = 0, m = 0, T = 0, k = 0;
                    if (u &lt; 0 ? (g = s, p = -u % i / i) : g = s + u, c &lt; 0 ? (m = a, y = -c % n / n) : m = a + c,
                        T = s + o, k = a + l, !d &amp;&amp; (T = Math.min(T, s + u + i)), !f &amp;&amp; (k = Math.min(k, a + c + n)),
                        !(T &lt; s || k &lt; a || g &gt; T || m &gt; k)) {
                        var x = (T - s - u) / i, C = (k - a - c) / n;
                        if (this.transformQuad(g, m, T - g, k - m, 0, this._curMat, this._transedPoints),
                            v[0] = p, v[1] = y, v[2] = x, v[3] = y, v[4] = x, v[5] = C, v[6] = p, v[7] = C,
                            !this.clipedOff(this._transedPoints)) {
                            var E = this._mixRGBandAlpha(4294967295, this._shader2D.ALPHA);
                            this._mesh.addQuad(this._transedPoints, v, E, !0);
                            var b = V.create(N.TEXTURE2D, 0);
                            b.defines.add(N.FILLTEXTURE), b.u_TexRange = r.concat(), _ = this._curSubmit = Ot.create(this, this._mesh, b),
                                this._submits[this._submits._length++] = _, this._copyClipInfo(_, this._globalClipMatrix),
                                _.shaderValue.textureHost = t, _._renderType = lt.TYPE_TEXTURE, this._curSubmit._numEle += 6,
                                this._mesh.indexNum += 6, this._mesh.vertNum += 4;
                        }
                        this.breakNextMerge();
                    }
                }
            }, {
                key: "setColorFilter",
                value: function (t) {
                    ht.save(this, ht.TYPE_COLORFILTER, this, !0), this._colorFiler = t, this._curSubmit = lt.RENDERBASE;
                }
            }, {
                key: "drawTexture",
                value: function (t, e, i, n, r) {
                    this._drawTextureM(t, e, i, n, r, null, 1, null);
                }
            }, {
                key: "drawTextures",
                value: function (t, e, n, r) {
                    if (t._getSource()) for (var s = e.length / 2, a = 0, o = t.bitmap.id, l = 0; l &lt; s; l++) this._inner_drawTexture(t, o, e[a++] + n, e[a++] + r, 0, 0, null, null, 1, !1); else this.sprite &amp;&amp; i.systemTimer.callLater(this, this._repaintSprite);
                }
            }, {
                key: "_drawTextureAddSubmit",
                value: function (t, e) {
                    var i = null;
                    i = Ot.create(this, this._mesh, V.create(N.TEXTURE2D, 0)), this._submits[this._submits._length++] = i,
                        i.shaderValue.textureHost = e, i._key.other = t, i._renderType = lt.TYPE_TEXTURE,
                        this._curSubmit = i;
                }
            }, {
                key: "_drawTextureM",
                value: function (t, e, i, n, r, s, a, o) {
                    var l = this.sprite;
                    return !!t._getSource(function () {
                        l &amp;&amp; l.repaint();
                    }) &amp;&amp; this._inner_drawTexture(t, t.bitmap.id, e, i, n, r, s, o, a, !1);
                }
            }, {
                key: "_drawRenderTexture",
                value: function (t, e, i, n, r, s, a, o) {
                    return this._inner_drawTexture(t, -1, e, i, n, r, s, o, 1, !1);
                }
            }, {
                key: "submitDebugger",
                value: function () {
                    this._submits[this._submits._length++] = H.create([], function () { }, this);
                }
            }, {
                key: "_copyClipInfo",
                value: function (t, e) {
                    var i = t.shaderValue.clipMatDir;
                    i[0] = e.a, i[1] = e.b, i[2] = e.c, i[3] = e.d;
                    var n = t.shaderValue.clipMatPos;
                    n[0] = e.tx, n[1] = e.ty, t.clipInfoID = this._clipInfoID, this._clipInCache &amp;&amp; (t.shaderValue.clipOff[0] = 1);
                }
            }, {
                key: "isSameClipInfo",
                value: function (t) {
                    return t.clipInfoID === this._clipInfoID;
                }
            }, {
                key: "_useNewTex2DSubmit",
                value: function (t, i) {
                    this._mesh.vertNum + i &gt; e._MAXVERTNUM &amp;&amp; (this._mesh = xt.getAMesh(this.isMain),
                        this.meshlist.push(this._mesh));
                    var n = Ot.create(this, this._mesh, V.create(N.TEXTURE2D, 0));
                    this._submits[this._submits._length++] = this._curSubmit = n, n.shaderValue.textureHost = t,
                        this._copyClipInfo(n, this._globalClipMatrix);
                }
            }, {
                key: "_drawTexRect",
                value: function (t, e, i, n, r) {
                    this.transformQuad(t, e, i, n, this._italicDeg, this._curMat, this._transedPoints);
                    var s = this._transedPoints;
                    s[0] = s[0] + .5 | 0, s[1] = s[1] + .5 | 0, s[2] = s[2] + .5 | 0, s[3] = s[3] + .5 | 0,
                        s[4] = s[4] + .5 | 0, s[5] = s[5] + .5 | 0, s[6] = s[6] + .5 | 0, s[7] = s[7] + .5 | 0,
                        this.clipedOff(this._transedPoints) || (this._mesh.addQuad(this._transedPoints, r, this._fillColor, !0),
                            this._curSubmit._numEle += 6, this._mesh.indexNum += 6, this._mesh.vertNum += 4);
                }
            }, {
                key: "drawCallOptimize",
                value: function (t) {
                    return this._charSubmitCache.enable(t, this), t;
                }
            }, {
                key: "_inner_drawTexture",
                value: function (t, i, n, r, s, a, o, l, h, u) {
                    if (!(s &lt;= 0 || a &lt;= 0)) {
                        var c = this._curSubmit._key;
                        if (l = l || t._uv, c.submitType === lt.KEY_TRIANGLES &amp;&amp; c.other === i) {
                            var _ = this._drawTexToDrawTri_Vert;
                            _[0] = n, _[1] = r, _[2] = n + s, _[3] = r, _[4] = n + s, _[5] = r + a, _[6] = n,
                                _[7] = r + a, this._drawTriUseAbsMatrix = !0;
                            var d = this._tempUV;
                            return d[0] = l[0], d[1] = l[1], d[2] = l[2], d[3] = l[3], d[4] = l[4], d[5] = l[5],
                                d[6] = l[6], d[7] = l[7], this.drawTriangles(t, 0, 0, _, d, this._drawTexToDrawTri_Index, o, h, null, null),
                                this._drawTriUseAbsMatrix = !1, !0;
                        }
                        var f = this._mesh, v = this._curSubmit, p = u ? this._charSubmitCache.getPos() : this._transedPoints;
                        if (this.transformQuad(n, r, s || t.width, a || t.height, this._italicDeg, o || this._curMat, p),
                            this.drawTexAlign) {
                            var y = Math.round;
                            p[0] = y(p[0]), p[1] = y(p[1]), p[2] = y(p[2]), p[3] = y(p[3]), p[4] = y(p[4]),
                                p[5] = y(p[5]), p[6] = y(p[6]), p[7] = y(p[7]), this.drawTexAlign = !1;
                        }
                        var g = this._mixRGBandAlpha(4294967295, this._shader2D.ALPHA * h);
                        if (u) return this._charSubmitCache.add(this, t, i, p, l, g), !0;
                        this._drawCount++;
                        var m = i &gt;= 0 &amp;&amp; c.submitType === lt.KEY_DRAWTEXTURE &amp;&amp; c.other === i;
                        return m &amp;&amp; (m = m &amp;&amp; this.isSameClipInfo(v)), this._lastTex = t, f.vertNum + 4 &gt; e._MAXVERTNUM &amp;&amp; (f = this._mesh = xt.getAMesh(this.isMain),
                            this.meshlist.push(f), m = !1), f.addQuad(p, l, g, !0), m || (this._submits[this._submits._length++] = this._curSubmit = v = Ot.create(this, f, V.create(N.TEXTURE2D, 0)),
                                v.shaderValue.textureHost = t, v._key.other = i, this._copyClipInfo(v, this._globalClipMatrix)),
                            v._numEle += 6, f.indexNum += 6, f.vertNum += 4, !0;
                    }
                }
            }, {
                key: "transform4Points",
                value: function (t, e, i) {
                    var n = e.tx, r = e.ty, s = e.a, a = e.b, o = e.c, l = e.d, h = t[0], u = t[1], c = t[2], _ = t[3], d = t[4], f = t[5], v = t[6], p = t[7];
                    e._bTransform ? (i[0] = h * s + u * o + n, i[1] = h * a + u * l + r, i[2] = c * s + _ * o + n,
                        i[3] = c * a + _ * l + r, i[4] = d * s + f * o + n, i[5] = d * a + f * l + r, i[6] = v * s + p * o + n,
                        i[7] = v * a + p * l + r) : (i[0] = h + n, i[1] = u + r, i[2] = c + n, i[3] = _ + r,
                            i[4] = d + n, i[5] = f + r, i[6] = v + n, i[7] = p + r);
                }
            }, {
                key: "clipedOff",
                value: function (t) {
                    return this._clipRect.width &lt;= 0 || this._clipRect.height &lt;= 0;
                }
            }, {
                key: "transformQuad",
                value: function (t, e, i, n, r, s, a) {
                    var o = 0;
                    0 != r &amp;&amp; (o = Math.tan(r * Math.PI / 180) * n);
                    var l = t + i, h = e + n, u = s.tx, c = s.ty, _ = s.a, d = s.b, f = s.c, v = s.d, p = t + o, y = e, g = l + o, m = e, T = l, k = h, x = t, C = h;
                    s._bTransform ? (a[0] = p * _ + y * f + u, a[1] = p * d + y * v + c, a[2] = g * _ + m * f + u,
                        a[3] = g * d + m * v + c, a[4] = T * _ + k * f + u, a[5] = T * d + k * v + c, a[6] = x * _ + C * f + u,
                        a[7] = x * d + C * v + c) : (a[0] = p + u, a[1] = y + c, a[2] = g + u, a[3] = m + c,
                            a[4] = T + u, a[5] = k + c, a[6] = x + u, a[7] = C + c);
                }
            }, {
                key: "pushRT",
                value: function () {
                    this.addRenderObject(H.create(null, D.pushRT, this));
                }
            }, {
                key: "popRT",
                value: function () {
                    this.addRenderObject(H.create(null, D.popRT, this)), this.breakNextMerge();
                }
            }, {
                key: "useRT",
                value: function (t) {
                    this.addRenderObject(H.create([t], function (t) {
                        if (!t) throw "error useRT";
                        t.start(), t.clear(0, 0, 0, 0);
                    }, this)), this.breakNextMerge();
                }
            }, {
                key: "RTRestore",
                value: function (t) {
                    this.addRenderObject(H.create([t], function (t) {
                        t.restore();
                    }, this)), this.breakNextMerge();
                }
            }, {
                key: "breakNextMerge",
                value: function () {
                    this._curSubmit = lt.RENDERBASE;
                }
            }, {
                key: "_repaintSprite",
                value: function () {
                    this.sprite &amp;&amp; this.sprite.repaint();
                }
            }, {
                key: "drawTextureWithTransform",
                value: function (t, e, i, n, r, s, a, o, l, h) {
                    var u, c = arguments.length &gt; 10 &amp;&amp; void 0 !== arguments[10] ? arguments[10] : null, _ = arguments.length &gt; 11 ? arguments[11] : void 0, d = this._curMat;
                    h &amp;&amp; (u = this.globalCompositeOperation, this.globalCompositeOperation = h);
                    var v = this._colorFiler;
                    if (c &amp;&amp; this.setColorFilter(c), !s) return this._drawTextureM(t, e + a, i + o, n, r, d, l, _),
                        h &amp;&amp; (this.globalCompositeOperation = u), void (c &amp;&amp; this.setColorFilter(v));
                    var p = this._tmpMatrix;
                    p.a = s.a, p.b = s.b, p.c = s.c, p.d = s.d, p.tx = s.tx + a, p.ty = s.ty + o, p._bTransform = s._bTransform,
                        s &amp;&amp; d._bTransform ? (f.mul(p, d, p), (s = p)._bTransform = !0) : (p.tx += d.tx,
                            p.ty += d.ty, s = p), this._drawTextureM(t, e, i, n, r, s, l, _), h &amp;&amp; (this.globalCompositeOperation = u),
                        c &amp;&amp; this.setColorFilter(v);
                }
            }, {
                key: "_flushToTarget",
                value: function (t, e) {
                    L.worldScissorTest = !1;
                    var i = y.instance;
                    i.disable(i.SCISSOR_TEST);
                    var n = L.worldAlpha, r = L.worldMatrix4, s = L.worldMatrix;
                    L.worldMatrix = f.EMPTY, L.restoreTempArray(), L.worldMatrix4 = L.TEMPMAT4_ARRAY,
                        L.worldAlpha = 1, P.activeShader = null, e.start(), t._submits._length &gt; 0 &amp;&amp; e.clear(0, 0, 0, 0),
                        t._curSubmit = lt.RENDERBASE, t.flush(), t.clear(), e.restore(), t._curSubmit = lt.RENDERBASE,
                        P.activeShader = null, L.worldAlpha = n, L.worldMatrix4 = r, L.worldMatrix = s;
                }
            }, {
                key: "drawCanvas",
                value: function (t, e, i, n, r) {
                    if (t) {
                        var s, a = t.context;
                        if (a._targets) a._submits._length &gt; 0 &amp;&amp; (s = H.create([a, a._targets], this._flushToTarget, this),
                            this._submits[this._submits._length++] = s), this._drawRenderTexture(a._targets, e, i, n, r, null, 1, D.flipyuv),
                            this._curSubmit = lt.RENDERBASE; else {
                            var o = t;
                            o.touches &amp;&amp; o.touches.forEach(function (t) {
                                t.touch();
                            }), s = Lt.create(t, this._shader2D.ALPHA, this._shader2D.filters), this._submits[this._submits._length++] = s,
                                s._key.clear();
                            var l = s._matrix;
                            this._curMat.copyTo(l);
                            var h = l.tx, u = l.ty;
                            l.tx = l.ty = 0, l.transformPoint(v.TEMP.setTo(e, i)), l.translate(v.TEMP.x + h, v.TEMP.y + u),
                                f.mul(o.invMat, l, l), this._curSubmit = lt.RENDERBASE;
                        }
                    }
                }
            }, {
                key: "drawTarget",
                value: function (t, i, n, r, s, a, o) {
                    var l = arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7] ? arguments[7] : null, h = arguments.length &gt; 8 &amp;&amp; void 0 !== arguments[8] ? arguments[8] : -1;
                    if (this._drawCount++, this._mesh.vertNum + 4 &gt; e._MAXVERTNUM &amp;&amp; (this._mesh = xt.getAMesh(this.isMain),
                        this.meshlist.push(this._mesh)), this.transformQuad(i, n, r, s, 0, a || this._curMat, this._transedPoints),
                        !this.clipedOff(this._transedPoints)) {
                        this._mesh.addQuad(this._transedPoints, l || Wt.DEF_UV, 4294967295, !0);
                        var u = this._curSubmit = Dt.create(this, this._mesh, o, t);
                        return u.blendType = -1 == h ? this._nBlendType : h, this._copyClipInfo(u, this._globalClipMatrix),
                            u._numEle = 6, this._mesh.indexNum += 6, this._mesh.vertNum += 4, this._submits[this._submits._length++] = u,
                            this._curSubmit = lt.RENDERBASE, !0;
                    }
                    return this._curSubmit = lt.RENDERBASE, !1;
                }
            }, {
                key: "drawTriangles",
                value: function (t, n, r, s, a, o, l, h, u, c) {
                    var _ = arguments.length &gt; 10 &amp;&amp; void 0 !== arguments[10] ? arguments[10] : 4294967295;
                    if (t._getSource()) {
                        var d = null;
                        c &amp;&amp; (d = this.globalCompositeOperation, this.globalCompositeOperation = c), this._drawCount++;
                        var v = this._tmpMatrix, p = this._triangleMesh, y = null, g = !1;
                        u &amp;&amp; (y = this._colorFiler, this._colorFiler = u, this._curSubmit = lt.RENDERBASE,
                            g = y != u);
                        var m = t.bitmap, T = this._curSubmit._key, k = T.submitType === lt.KEY_TRIANGLES &amp;&amp; T.other === m.id &amp;&amp; T.blendShader == this._nBlendType;
                        if (p.vertNum + s.length / 2 &gt; e._MAXVERTNUM &amp;&amp; (p = this._triangleMesh = Ct.getAMesh(this.isMain),
                            this.meshlist.push(p), k = !1), !k) {
                            var x = this._curSubmit = Ot.create(this, p, V.create(N.TEXTURE2D, 0));
                            x.shaderValue.textureHost = t, x._renderType = lt.TYPE_TEXTURE, x._key.submitType = lt.KEY_TRIANGLES,
                                x._key.other = m.id, this._copyClipInfo(x, this._globalClipMatrix), this._submits[this._submits._length++] = x;
                        }
                        var C = this._mixRGBandAlpha(_, this._shader2D.ALPHA * h);
                        this._drawTriUseAbsMatrix ? p.addData(s, a, o, l, C) : (l ? (v.a = l.a, v.b = l.b,
                            v.c = l.c, v.d = l.d, v.tx = l.tx + n, v.ty = l.ty + r) : (v.a = 1, v.b = 0, v.c = 0,
                                v.d = 1, v.tx = n, v.ty = r), f.mul(v, this._curMat, v), p.addData(s, a, o, v || this._curMat, C)),
                            this._curSubmit._numEle += o.length, g &amp;&amp; (this._colorFiler = y, this._curSubmit = lt.RENDERBASE),
                            c &amp;&amp; (this.globalCompositeOperation = d);
                    } else this.sprite &amp;&amp; i.systemTimer.callLater(this, this._repaintSprite);
                }
            }, {
                key: "transform",
                value: function (t, e, i, n, r, s) {
                    _t.save(this), f.mul(f.TEMP.setTo(t, e, i, n, r, s), this._curMat, this._curMat),
                        this._curMat._checkTransform();
                }
            }, {
                key: "_transformByMatrix",
                value: function (t, e, i) {
                    t.setTranslate(e, i), f.mul(t, this._curMat, this._curMat), t.setTranslate(0, 0),
                        this._curMat._bTransform = !0;
                }
            }, {
                key: "setTransformByMatrix",
                value: function (t) {
                    t.copyTo(this._curMat);
                }
            }, {
                key: "rotate",
                value: function (t) {
                    _t.save(this), this._curMat.rotateEx(t);
                }
            }, {
                key: "scale",
                value: function (t, e) {
                    _t.save(this), this._curMat.scaleEx(t, e);
                }
            }, {
                key: "clipRect",
                value: function (t, i, n, r) {
                    ut.save(this), this._clipRect == e.MAXCLIPRECT ? this._clipRect = new p(t, i, n, r) : (this._clipRect.width = n,
                        this._clipRect.height = r, this._clipRect.x = t, this._clipRect.y = i), this._clipID_Gen++,
                        this._clipID_Gen %= 1e4, this._clipInfoID = this._clipID_Gen;
                    var s = this._globalClipMatrix, a = s.tx, o = s.ty, l = a + s.a, h = o + s.d;
                    if (this._clipRect.width &gt;= e._MAXSIZE ? (s.a = s.d = e._MAXSIZE, s.b = s.c = s.tx = s.ty = 0) : (this._curMat._bTransform ? (s.tx = this._clipRect.x * this._curMat.a + this._clipRect.y * this._curMat.c + this._curMat.tx,
                        s.ty = this._clipRect.x * this._curMat.b + this._clipRect.y * this._curMat.d + this._curMat.ty,
                        s.a = this._clipRect.width * this._curMat.a, s.b = this._clipRect.width * this._curMat.b,
                        s.c = this._clipRect.height * this._curMat.c, s.d = this._clipRect.height * this._curMat.d) : (s.tx = this._clipRect.x + this._curMat.tx,
                            s.ty = this._clipRect.y + this._curMat.ty, s.a = this._clipRect.width, s.b = s.c = 0,
                            s.d = this._clipRect.height), this._incache &amp;&amp; (this._clipInCache = !0)), s.a &gt; 0 &amp;&amp; s.d &gt; 0) {
                        var u = s.tx + s.a, c = s.ty + s.d;
                        u &lt;= a || c &lt;= o || s.tx &gt;= l || s.ty &gt;= h ? (s.a = -.1, s.d = -.1) : (s.tx &lt; a &amp;&amp; (s.a -= a - s.tx,
                            s.tx = a), u &gt; l &amp;&amp; (s.a -= u - l), s.ty &lt; o &amp;&amp; (s.d -= o - s.ty, s.ty = o), c &gt; h &amp;&amp; (s.d -= c - h),
                            s.a &lt;= 0 &amp;&amp; (s.a = -.1), s.d &lt;= 0 &amp;&amp; (s.d = -.1));
                    }
                }
            }, {
                key: "drawMesh",
                value: function (t, e, i, n, r, s, a, o) { }
            }, {
                key: "addRenderObject",
                value: function (t) {
                    this._submits[this._submits._length++] = t;
                }
            }, {
                key: "submitElement",
                value: function (t, e) {
                    this.isMain;
                    var i = this._submits, n = i._length;
                    e &lt; 0 &amp;&amp; (e = i._length);
                    for (var r = lt.RENDERBASE; t &lt; e;) this._renderNextSubmitIndex = t + 1, i[t] !== lt.RENDERBASE ? (lt.preRender = r,
                        t += (r = i[t]).renderSubmit()) : t++;
                    return n;
                }
            }, {
                key: "flush",
                value: function () {
                    this._clipID_Gen = 0;
                    var t = this.submitElement(0, this._submits._length);
                    this._path &amp;&amp; this._path.reset(), Rt.instance &amp;&amp; Rt.getInstance().reset(), this._curSubmit = lt.RENDERBASE;
                    for (var e = 0, i = this.meshlist.length; e &lt; i; e++) {
                        var n = this.meshlist[e];
                        n.canReuse ? n.releaseMesh() : n.destroy();
                    }
                    return this.meshlist.length = 0, this._mesh = xt.getAMesh(this.isMain), this._pathMesh = Et.getAMesh(this.isMain),
                        this._triangleMesh = Ct.getAMesh(this.isMain), this.meshlist.push(this._mesh, this._pathMesh, this._triangleMesh),
                        this._flushCnt++, this._flushCnt % 60 == 0 &amp;&amp; this.isMain &amp;&amp; qt.textRenderInst &amp;&amp; qt.textRenderInst.GC(),
                        t;
                }
            }, {
                key: "beginPath",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] &amp;&amp; arguments[0], e = this._getPath();
                    e.beginPath(t);
                }
            }, {
                key: "closePath",
                value: function () {
                    this._path.closePath();
                }
            }, {
                key: "addPath",
                value: function (t, e, i, n, r) {
                    for (var s = 0, a = 0, o = t.length / 2; a &lt; o; a++) {
                        var l = t[s] + n, h = t[s + 1] + r;
                        t[s] = l, t[s + 1] = h, s += 2;
                    }
                    this._getPath().push(t, i);
                }
            }, {
                key: "fill",
                value: function () {
                    var t = this._curMat, i = this._getPath(), n = this._curSubmit, r = n._key.submitType === lt.KEY_VG &amp;&amp; n._key.blendShader === this._nBlendType;
                    r &amp;&amp; (r = r &amp;&amp; this.isSameClipInfo(n)), r || (this._curSubmit = this.addVGSubmit(this._pathMesh));
                    for (var s, a = this.mixRGBandAlpha(this.fillStyle.toInt()), o = 0, l = 0, h = i.paths.length; l &lt; h; l++) {
                        var u = i.paths[l], c = u.path.length / 2;
                        if (!(c &lt; 3 || 3 == c &amp;&amp; !u.convex)) {
                            var _, d, f, v, p = u.path.concat(), y = 0;
                            if (t._bTransform) for (y = 0; y &lt; c; y++) d = (_ = y &lt;&lt; 1) + 1, f = p[_], v = p[d],
                                p[_] = t.a * f + t.c * v + t.tx, p[d] = t.b * f + t.d * v + t.ty; else for (y = 0; y &lt; c; y++) d = (_ = y &lt;&lt; 1) + 1,
                                    f = p[_], v = p[d], p[_] = f + t.tx, p[d] = v + t.ty;
                            this._pathMesh.vertNum + c &gt; e._MAXVERTNUM &amp;&amp; (this._curSubmit._numEle += o, o = 0,
                                this._pathMesh = Et.getAMesh(this.isMain), this._curSubmit = this.addVGSubmit(this._pathMesh));
                            var g = this._pathMesh.vertNum;
                            if (u.convex) {
                                var m = c - 2;
                                s = new Array(3 * m);
                                for (var T = 0, k = 0; k &lt; m; k++) s[T++] = g, s[T++] = k + 1 + g, s[T++] = k + 2 + g;
                            } else if (s = Mt.earcut(p, null, 2), g &gt; 0) for (var x = 0; x &lt; s.length; x++) s[x] += g;
                            this._pathMesh.addVertAndIBToMesh(this, p, a, s), o += s.length;
                        }
                    }
                    this._curSubmit._numEle += o;
                }
            }, {
                key: "addVGSubmit",
                value: function (t) {
                    var e = Pt.createShape(this, t, 0, V.create(N.PRIMITIVE, 0));
                    return e._key.submitType = lt.KEY_VG, this._submits[this._submits._length++] = e,
                        this._copyClipInfo(e, this._globalClipMatrix), e;
                }
            }, {
                key: "stroke",
                value: function () {
                    if (this.lineWidth &gt; 0) {
                        var t = this.mixRGBandAlpha(this.strokeStyle._color.numColor), i = this._getPath(), n = this._curSubmit, r = n._key.submitType === lt.KEY_VG &amp;&amp; n._key.blendShader === this._nBlendType;
                        r &amp;&amp; (r = r &amp;&amp; this.isSameClipInfo(n)), r || (this._curSubmit = this.addVGSubmit(this._pathMesh));
                        for (var s = 0, a = 0, o = i.paths.length; a &lt; o; a++) {
                            var l = i.paths[a];
                            if (!(l.path.length &lt;= 0)) {
                                var h = [], u = [], c = 2 * l.path.length;
                                if (!(c &lt; 2)) {
                                    this._pathMesh.vertNum + c &gt; e._MAXVERTNUM &amp;&amp; (this._curSubmit._numEle += s, s = 0,
                                        this._pathMesh = Et.getAMesh(this.isMain), this.meshlist.push(this._pathMesh), this._curSubmit = this.addVGSubmit(this._pathMesh)),
                                        At.createLine2(l.path, h, this.lineWidth, this._pathMesh.vertNum, u, l.loop);
                                    var _, d, f, v, p = u.length / 2, y = this._curMat, g = 0;
                                    if (y._bTransform) for (g = 0; g &lt; p; g++) d = (_ = g &lt;&lt; 1) + 1, f = u[_], v = u[d],
                                        u[_] = y.a * f + y.c * v + y.tx, u[d] = y.b * f + y.d * v + y.ty; else for (g = 0; g &lt; p; g++) d = (_ = g &lt;&lt; 1) + 1,
                                            f = u[_], v = u[d], u[_] = f + y.tx, u[d] = v + y.ty;
                                    this._pathMesh.addVertAndIBToMesh(this, u, t, h), s += h.length;
                                }
                            }
                        }
                        this._curSubmit._numEle += s;
                    }
                }
            }, {
                key: "moveTo",
                value: function (t, e) {
                    var i = this._getPath();
                    i.newPath(), i._lastOriX = t, i._lastOriY = e, i.addPoint(t, e);
                }
            }, {
                key: "lineTo",
                value: function (t, e) {
                    var i = this._getPath();
                    Math.abs(t - i._lastOriX) &lt; .001 &amp;&amp; Math.abs(e - i._lastOriY) &lt; .001 || (i._lastOriX = t,
                        i._lastOriY = e, i.addPoint(t, e));
                }
            }, {
                key: "arcTo",
                value: function (t, i, n, r, s) {
                    var a = 0, o = 0, l = 0, h = this._path._lastOriX - t, u = this._path._lastOriY - i, c = Math.sqrt(h * h + u * u);
                    if (!(c &lt;= 1e-6)) {
                        var _ = h / c, d = u / c, f = n - t, v = r - i, p = f * f + v * v, y = Math.sqrt(p);
                        if (!(y &lt;= 1e-6)) {
                            var g = f / y, m = v / y, T = _ + g, k = d + m, x = Math.sqrt(T * T + k * k);
                            if (!(x &lt;= 1e-6)) {
                                var C = T / x, E = k / x, b = Math.acos(C * _ + E * d), w = Math.PI / 2 - b, R = (c = s / Math.tan(w)) * _ + t, A = c * d + i, S = Math.sqrt(c * c + s * s), M = t + C * S, I = i + E * S, P = 0, L = 0;
                                if (_ * m - d * g &gt;= 0) {
                                    var D = 2 * w / e.SEGNUM;
                                    P = Math.sin(D), L = Math.cos(D);
                                } else D = 2 * -w / e.SEGNUM, P = Math.sin(D), L = Math.cos(D);
                                var O = this._path._lastOriX, B = this._path._lastOriY, F = R, N = A;
                                (Math.abs(F - this._path._lastOriX) &gt; .1 || Math.abs(N - this._path._lastOriY) &gt; .1) &amp;&amp; (o = F,
                                    l = N, O = F, B = N, this._path._lastOriX = o, this._path._lastOriY = l, this._path.addPoint(o, l));
                                var U = R - M, G = A - I;
                                for (a = 0; a &lt; e.SEGNUM; a++) {
                                    var W = U * L + G * P, Y = -U * P + G * L;
                                    o = W + M, l = Y + I, (Math.abs(O - o) &gt; .1 || Math.abs(B - l) &gt; .1) &amp;&amp; (this._path._lastOriX = o,
                                        this._path._lastOriY = l, this._path.addPoint(o, l), O = o, B = l), U = W, G = Y;
                                }
                            }
                        }
                    }
                }
            }, {
                key: "arc",
                value: function (t, e, i, n, r) {
                    var s, a, o = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] &amp;&amp; arguments[5], l = 0, h = 0, u = 0, c = 0, _ = 0;
                    if (h = r - n, o) if (Math.abs(h) &gt;= 2 * Math.PI) h = 2 * -Math.PI; else for (; h &gt; 0;) h -= 2 * Math.PI; else if (Math.abs(h) &gt;= 2 * Math.PI) h = 2 * Math.PI; else for (; h &lt; 0;) h += 2 * Math.PI;
                    var d = this.getMatScaleX(), f = this.getMatScaleY(), v = i * (d &gt; f ? d : f), p = 2 * Math.PI * v;
                    a = 0 | Math.max(p / 10, 10);
                    var y = this._getPath();
                    for (s = 0; s &lt;= a; s++) l = n + h * (s / a), u = Math.cos(l), _ = e + Math.sin(l) * i,
                        (c = t + u * i) == this._path._lastOriX &amp;&amp; _ == this._path._lastOriY || y.addPoint(c, _);
                    u = Math.cos(r), _ = e + Math.sin(r) * i, (c = t + u * i) == this._path._lastOriX &amp;&amp; _ == this._path._lastOriY || y.addPoint(c, _);
                }
            }, {
                key: "quadraticCurveTo",
                value: function (t, e, i, n) {
                    for (var r = nt.I.getBezierPoints([this._path._lastOriX, this._path._lastOriY, t, e, i, n], 30, 2), s = 0, a = r.length / 2; s &lt; a; s++) this.lineTo(r[2 * s], r[2 * s + 1]);
                    this.lineTo(i, n);
                }
            }, {
                key: "mixRGBandAlpha",
                value: function (t) {
                    return this._mixRGBandAlpha(t, this._shader2D.ALPHA);
                }
            }, {
                key: "_mixRGBandAlpha",
                value: function (t, e) {
                    if (e &gt;= 1) return t;
                    var i = (4278190080 &amp; t) &gt;&gt;&gt; 24;
                    return 0 != i ? i *= e : i = 255 * e, 16777215 &amp; t | i &lt;&lt; 24;
                }
            }, {
                key: "strokeRect",
                value: function (t, e, i, n, r) {
                    if (this.lineWidth &gt; 0) {
                        var s = this.mixRGBandAlpha(this.strokeStyle._color.numColor), a = this.lineWidth / 2;
                        this._fillRect(t - a, e - a, i + this.lineWidth, this.lineWidth, s), this._fillRect(t - a, e - a + n, i + this.lineWidth, this.lineWidth, s),
                            this._fillRect(t - a, e + a, this.lineWidth, n - this.lineWidth, s), this._fillRect(t - a + i, e + a, this.lineWidth, n - this.lineWidth, s);
                    }
                }
            }, {
                key: "clip",
                value: function () { }
            }, {
                key: "drawParticle",
                value: function (t, e, i) {
                    i.x = t, i.y = e, this._submits[this._submits._length++] = i;
                }
            }, {
                key: "_getPath",
                value: function () {
                    return this._path || (this._path = new at());
                }
            }, {
                key: "_fillTexture_h",
                value: function (t, i, n, r, s, a, o, l) {
                    r &lt;= 0 &amp;&amp; console.error("_fillTexture_h error: oriw must&gt;0");
                    for (var h = a, u = Math.floor(l / r), c = l % r, _ = 0; _ &lt; u; _++) this._inner_drawTexture(t, i, h, o, r, s, this._curMat, n, 1, !1),
                        h += r;
                    if (c &gt; 0) {
                        var d = n[2] - n[0], f = n[0] + d * (c / r), v = e.tmpuv1;
                        v[0] = n[0], v[1] = n[1], v[2] = f, v[3] = n[3], v[4] = f, v[5] = n[5], v[6] = n[6],
                            v[7] = n[7], this._inner_drawTexture(t, i, h, o, c, s, this._curMat, v, 1, !1);
                    }
                }
            }, {
                key: "_fillTexture_v",
                value: function (t, i, n, r, s, a, o, l) {
                    s &lt;= 0 &amp;&amp; console.error("_fillTexture_v error: orih must&gt;0");
                    for (var h = o, u = Math.floor(l / s), c = l % s, _ = 0; _ &lt; u; _++) this._inner_drawTexture(t, i, a, h, r, s, this._curMat, n, 1, !1),
                        h += s;
                    if (c &gt; 0) {
                        var d = n[7] - n[1], f = n[1] + d * (c / s), v = e.tmpuv1;
                        v[0] = n[0], v[1] = n[1], v[2] = n[2], v[3] = n[3], v[4] = n[4], v[5] = f, v[6] = n[6],
                            v[7] = f, this._inner_drawTexture(t, i, a, h, r, c, this._curMat, v, 1, !1);
                    }
                }
            }, {
                key: "drawTextureWithSizeGrid",
                value: function (t, i, n, r, s, a, o, l) {
                    if (t._getSource()) {
                        i += o, n += l;
                        var h = t.uv, u = t.bitmap.width, c = t.bitmap.height, _ = a[0], d = a[3], f = a[1], v = a[2], p = a[4], y = !1;
                        r == u &amp;&amp; (d = f = 0), s == c &amp;&amp; (_ = v = 0);
                        var g = _ / c, m = d / u, T = f / u, k = v / c;
                        if (d + f &gt; r) {
                            var x = r;
                            y = !0, r = d + f, this.save(), this.clipRect(0 + i, 0 + n, x, s);
                        }
                        var C = t.bitmap.id, E = this._curMat, b = this._tempUV, w = h[0], R = h[1], A = h[4], S = h[5], M = w, I = R, P = A, L = S;
                        if (d &amp;&amp; _ &amp;&amp; (P = w + m, L = R + g, b[0] = w, b[1] = R, b[2] = P, b[3] = R, b[4] = P,
                            b[5] = L, b[6] = w, b[7] = L, this._inner_drawTexture(t, C, i, n, d, _, E, b, 1, !1)),
                            f &amp;&amp; _ &amp;&amp; (M = A - T, I = R, P = A, L = R + g, b[0] = M, b[1] = I, b[2] = P, b[3] = I,
                                b[4] = P, b[5] = L, b[6] = M, b[7] = L, this._inner_drawTexture(t, C, r - f + i, 0 + n, f, _, E, b, 1, !1)),
                            d &amp;&amp; v &amp;&amp; (M = w, I = S - k, P = w + m, L = S, b[0] = M, b[1] = I, b[2] = P, b[3] = I,
                                b[4] = P, b[5] = L, b[6] = M, b[7] = L, this._inner_drawTexture(t, C, 0 + i, s - v + n, d, v, E, b, 1, !1)),
                            f &amp;&amp; v &amp;&amp; (M = A - T, I = S - k, P = A, L = S, b[0] = M, b[1] = I, b[2] = P, b[3] = I,
                                b[4] = P, b[5] = L, b[6] = M, b[7] = L, this._inner_drawTexture(t, C, r - f + i, s - v + n, f, v, E, b, 1, !1)),
                            _ &amp;&amp; (M = w + m, I = R, P = A - T, L = R + g, b[0] = M, b[1] = I, b[2] = P, b[3] = I,
                                b[4] = P, b[5] = L, b[6] = M, b[7] = L, p ? this._fillTexture_h(t, C, b, t.width - d - f, _, d + i, n, r - d - f) : this._inner_drawTexture(t, C, d + i, n, r - d - f, _, E, b, 1, !1)),
                            v &amp;&amp; (M = w + m, I = S - k, P = A - T, L = S, b[0] = M, b[1] = I, b[2] = P, b[3] = I,
                                b[4] = P, b[5] = L, b[6] = M, b[7] = L, p ? this._fillTexture_h(t, C, b, t.width - d - f, v, d + i, s - v + n, r - d - f) : this._inner_drawTexture(t, C, d + i, s - v + n, r - d - f, v, E, b, 1, !1)),
                            d &amp;&amp; (M = w, I = R + g, P = w + m, L = S - k, b[0] = M, b[1] = I, b[2] = P, b[3] = I,
                                b[4] = P, b[5] = L, b[6] = M, b[7] = L, p ? this._fillTexture_v(t, C, b, d, t.height - _ - v, i, _ + n, s - _ - v) : this._inner_drawTexture(t, C, i, _ + n, d, s - _ - v, E, b, 1, !1)),
                            f &amp;&amp; (M = A - T, I = R + g, P = A, L = S - k, b[0] = M, b[1] = I, b[2] = P, b[3] = I,
                                b[4] = P, b[5] = L, b[6] = M, b[7] = L, p ? this._fillTexture_v(t, C, b, f, t.height - _ - v, r - f + i, _ + n, s - _ - v) : this._inner_drawTexture(t, C, r - f + i, _ + n, f, s - _ - v, E, b, 1, !1)),
                            M = w + m, I = R + g, P = A - T, L = S - k, b[0] = M, b[1] = I, b[2] = P, b[3] = I,
                            b[4] = P, b[5] = L, b[6] = M, b[7] = L, p) {
                            var D = e.tmpUVRect;
                            D[0] = M, D[1] = I, D[2] = P - M, D[3] = L - I, this._fillTexture(t, t.width - d - f, t.height - _ - v, D, d + i, _ + n, r - d - f, s - _ - v, "repeat", 0, 0);
                        } else this._inner_drawTexture(t, C, d + i, _ + n, r - d - f, s - _ - v, E, b, 1, !1);
                        y &amp;&amp; this.restore();
                    }
                }
            }, {
                key: "lineJoin",
                get: function () {
                    return "";
                },
                set: function (t) { }
            }, {
                key: "lineCap",
                get: function () {
                    return "";
                },
                set: function (t) { }
            }, {
                key: "miterLimit",
                get: function () {
                    return "";
                },
                set: function (t) { }
            }, {
                key: "asBitmap",
                set: function (e) {
                    if (e) {
                        var i = this._targets;
                        if (!this._width || !this._height) throw Error("asBitmap no size!");
                        i &amp;&amp; i.width == this._width &amp;&amp; i.height == this._height || (i &amp;&amp; i.destroy(), this._targets = new D(this._width, this._height, t.RenderTextureFormat.R8G8B8A8, -1));
                    } else this._targets &amp;&amp; this._targets.destroy(), this._targets = null;
                }
            }, {
                key: "fillStyle",
                set: function (t) {
                    this._shader2D.fillStyle.equal(t) || (ht.save(this, ht.TYPE_FILESTYLE, this._shader2D, !1),
                        this._shader2D.fillStyle = st.create(t), this._submitKey.other = -this._shader2D.fillStyle.toInt());
                },
                get: function () {
                    return this._shader2D.fillStyle;
                }
            }, {
                key: "globalAlpha",
                set: function (t) {
                    (t = Math.floor(1e3 * t) / 1e3) != this._shader2D.ALPHA &amp;&amp; (ht.save(this, ht.TYPE_ALPHA, this._shader2D, !1),
                        this._shader2D.ALPHA = t);
                },
                get: function () {
                    return this._shader2D.ALPHA;
                }
            }, {
                key: "textAlign",
                set: function (t) {
                    this._other.textAlign === t || (this._other = this._other.make(), ht.save(this, ht.TYPE_TEXTALIGN, this._other, !1),
                        this._other.textAlign = t);
                },
                get: function () {
                    return this._other.textAlign;
                }
            }, {
                key: "textBaseline",
                set: function (t) {
                    this._other.textBaseline === t || (this._other = this._other.make(), ht.save(this, ht.TYPE_TEXTBASELINE, this._other, !1),
                        this._other.textBaseline = t);
                },
                get: function () {
                    return this._other.textBaseline;
                }
            }, {
                key: "globalCompositeOperation",
                set: function (t) {
                    var e = B.TOINT[t];
                    null == e || this._nBlendType === e || (ht.save(this, ht.TYPE_GLOBALCOMPOSITEOPERATION, this, !0),
                        this._curSubmit = lt.RENDERBASE, this._nBlendType = e);
                },
                get: function () {
                    return B.NAMES[this._nBlendType];
                }
            }, {
                key: "strokeStyle",
                set: function (t) {
                    this._shader2D.strokeStyle.equal(t) || (ht.save(this, ht.TYPE_STROKESTYLE, this._shader2D, !1),
                        this._shader2D.strokeStyle = st.create(t), this._submitKey.other = -this._shader2D.strokeStyle.toInt());
                },
                get: function () {
                    return this._shader2D.strokeStyle;
                }
            }, {
                key: "lineWidth",
                set: function (t) {
                    this._other.lineWidth === t || (this._other = this._other.make(), ht.save(this, ht.TYPE_LINEWIDTH, this._other, !1),
                        this._other.lineWidth = t);
                },
                get: function () {
                    return this._other.lineWidth;
                }
            }, {
                key: "font",
                set: function (t) {
                    this._other = this._other.make(), ht.save(this, ht.TYPE_FONT, this._other, !1);
                }
            }, {
                key: "canvas",
                get: function () {
                    return this._canvas;
                }
            }], [{
                key: "__init__",
                value: function () {
                    e.MAXCLIPRECT = new p(0, 0, e._MAXSIZE, e._MAXSIZE), Zt.DEFAULT = new Zt();
                }
            }, {
                key: "set2DRenderConfig",
                value: function () {
                    var t = y.instance;
                    g.setBlend(t, !0), g.setBlendEquation(t, t.FUNC_ADD), B.activeBlendFunction = null,
                        g.setBlendFunc(t, t.ONE, t.ONE_MINUS_SRC_ALPHA), g.setDepthTest(t, !1), g.setCullFace(t, !1),
                        g.setDepthMask(t, !0), g.setFrontFace(t, t.CCW), t.viewport(0, 0, L.width, L.height);
                }
            }]), e;
        }();
        Qt.ENUM_TEXTALIGN_DEFAULT = 0, Qt.ENUM_TEXTALIGN_CENTER = 1, Qt.ENUM_TEXTALIGN_RIGHT = 2,
            Qt._SUBMITVBSIZE = 32e3, Qt._MAXSIZE = 99999999, Qt._MAXVERTNUM = 65535, Qt.MAXCLIPRECT = null,
            Qt._COUNT = 0, Qt.SEGNUM = 32, Qt._contextcount = 0, Qt.PI2 = 2 * Math.PI, Qt._textRender = null,
            Qt.tmpuv1 = [0, 0, 0, 0, 0, 0, 0, 0], Qt.tmpUV = [0, 0, 0, 0, 0, 0, 0, 0], Qt.tmpUVRect = [0, 0, 0, 0];
        var Zt = function () {
            function t() {
                _classCallCheck(this, t), this.lineWidth = 1;
            }
            return _createClass(t, [{
                key: "clear",
                value: function () {
                    this.lineWidth = 1, this.textAlign = this.textBaseline = null;
                }
            }, {
                key: "make",
                value: function () {
                    return this === t.DEFAULT ? new t() : this;
                }
            }]), t;
        }(), $t = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "_uint8ArraySlice",
                value: function () {
                    for (var t = this.length, e = new Uint8Array(this.length), i = 0; i &lt; t; i++) e[i] = this[i];
                    return e;
                }
            }, {
                key: "_float32ArraySlice",
                value: function () {
                    for (var t = this.length, e = new Float32Array(this.length), i = 0; i &lt; t; i++) e[i] = this[i];
                    return e;
                }
            }, {
                key: "_uint16ArraySlice",
                value: function () {
                    var t, e, i, n = this;
                    if (0 === arguments.length) for (t = n.length, e = new Uint16Array(t), i = 0; i &lt; t; i++) e[i] = n[i]; else if (2 === arguments.length) {
                        var r = arguments.length &lt;= 0 ? void 0 : arguments[0], s = arguments.length &lt;= 1 ? void 0 : arguments[1];
                        if (s &gt; r) for (t = s - r, e = new Uint16Array(t), i = r; i &lt; s; i++) e[i - r] = n[i]; else e = new Uint16Array(0);
                    }
                    return e;
                }
            }, {
                key: "_nativeRender_enable",
                value: function () { }
            }, {
                key: "enable",
                value: function () {
                    return !0;
                }
            }, {
                key: "inner_enable",
                value: function () {
                    return Float32Array.prototype.slice || (Float32Array.prototype.slice = t._float32ArraySlice),
                        Uint16Array.prototype.slice || (Uint16Array.prototype.slice = t._uint16ArraySlice),
                        Uint8Array.prototype.slice || (Uint8Array.prototype.slice = t._uint8ArraySlice),
                        !0;
                }
            }, {
                key: "onStageResize",
                value: function (t, e) {
                    null != g.mainContext &amp;&amp; (g.mainContext.viewport(0, 0, t, e), L.width = t, L.height = e);
                }
            }]), t;
        }();
        $t._isWebGL2 = !1, $t.isNativeRender_enable = !1;
        !function () {
            var t = {};
            function e(e, i) {
                var n;
                t[e] = !0, void 0 !== i &amp;&amp; (n = i, window.console &amp;&amp; window.console.error &amp;&amp; window.console.error(n));
            }
            var i = function t(e) {
                var i = e.gl;
                this.ext = e, this.isAlive = !0, this.hasBeenBound = !1, this.elementArrayBuffer = null,
                    this.attribs = new Array(e.maxVertexAttribs);
                for (var n = 0; n &lt; this.attribs.length; n++) {
                    var r = new t.VertexAttrib(i);
                    this.attribs[n] = r;
                }
                this.maxAttrib = 0;
            };
            (i.VertexAttrib = function (t) {
                this.enabled = !1, this.buffer = null, this.size = 4, this.type = t.FLOAT, this.normalized = !1,
                    this.stride = 16, this.offset = 0, this.cached = "", this.recache();
            }).prototype.recache = function () {
                this.cached = [this.size, this.type, this.normalized, this.stride, this.offset].join(":");
            };
            var n = function (e) {
                var i = this;
                this.gl = e, function (e) {
                    var i = e.getError;
                    e.getError = function () {
                        var n;
                        do {
                            (n = i.apply(e)) != e.NO_ERROR &amp;&amp; (t[n] = !0);
                        } while (n != e.NO_ERROR);
                        for (var r in t) if (t[r]) return delete t[r], parseInt(r);
                        return e.NO_ERROR;
                    };
                }(e);
                var n = this.original = {
                    getParameter: e.getParameter,
                    enableVertexAttribArray: e.enableVertexAttribArray,
                    disableVertexAttribArray: e.disableVertexAttribArray,
                    bindBuffer: e.bindBuffer,
                    getVertexAttrib: e.getVertexAttrib,
                    vertexAttribPointer: e.vertexAttribPointer
                };
                e.getParameter = function (t) {
                    return t == i.VERTEX_ARRAY_BINDING_OES ? i.currentVertexArrayObject == i.defaultVertexArrayObject ? null : i.currentVertexArrayObject : n.getParameter.apply(this, arguments);
                }, e.enableVertexAttribArray = function (t) {
                    var e = i.currentVertexArrayObject;
                    e.maxAttrib = Math.max(e.maxAttrib, t);
                    var r = e.attribs[t];
                    return r.enabled = !0, n.enableVertexAttribArray.apply(this, arguments);
                }, e.disableVertexAttribArray = function (t) {
                    var e = i.currentVertexArrayObject;
                    e.maxAttrib = Math.max(e.maxAttrib, t);
                    var r = e.attribs[t];
                    return r.enabled = !1, n.disableVertexAttribArray.apply(this, arguments);
                }, e.bindBuffer = function (t, r) {
                    switch (t) {
                        case e.ARRAY_BUFFER:
                            i.currentArrayBuffer = r;
                            break;

                        case e.ELEMENT_ARRAY_BUFFER:
                            i.currentVertexArrayObject.elementArrayBuffer = r;
                    }
                    return n.bindBuffer.apply(this, arguments);
                }, e.getVertexAttrib = function (t, r) {
                    var s = i.currentVertexArrayObject, a = s.attribs[t];
                    switch (r) {
                        case e.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:
                            return a.buffer;

                        case e.VERTEX_ATTRIB_ARRAY_ENABLED:
                            return a.enabled;

                        case e.VERTEX_ATTRIB_ARRAY_SIZE:
                            return a.size;

                        case e.VERTEX_ATTRIB_ARRAY_STRIDE:
                            return a.stride;

                        case e.VERTEX_ATTRIB_ARRAY_TYPE:
                            return a.type;

                        case e.VERTEX_ATTRIB_ARRAY_NORMALIZED:
                            return a.normalized;

                        default:
                            return n.getVertexAttrib.apply(this, arguments);
                    }
                }, e.vertexAttribPointer = function (t, e, r, s, a, o) {
                    var l = i.currentVertexArrayObject;
                    l.maxAttrib = Math.max(l.maxAttrib, t);
                    var h = l.attribs[t];
                    return h.buffer = i.currentArrayBuffer, h.size = e, h.type = r, h.normalized = s,
                        h.stride = a, h.offset = o, h.recache(), n.vertexAttribPointer.apply(this, arguments);
                }, e.instrumentExtension &amp;&amp; e.instrumentExtension(this, "OES_vertex_array_object"),
                    e.canvas.addEventListener("webglcontextrestored", function () {
                        var t;
                        t = "OESVertexArrayObject emulation library context restored", window.console &amp;&amp; window.console.log &amp;&amp; window.console.log(t),
                            i.reset_();
                    }, !0), this.reset_();
            };
            n.prototype.VERTEX_ARRAY_BINDING_OES = 34229, n.prototype.reset_ = function () {
                if (void 0 !== this.vertexArrayObjects) for (var t = 0; t &lt; this.vertexArrayObjects.length; ++t) this.vertexArrayObjects.isAlive = !1;
                var e = this.gl;
                this.maxVertexAttribs = e.getParameter(e.MAX_VERTEX_ATTRIBS), this.defaultVertexArrayObject = new i(this),
                    this.currentVertexArrayObject = null, this.currentArrayBuffer = null, this.vertexArrayObjects = [this.defaultVertexArrayObject],
                    this.bindVertexArrayOES(null);
            }, n.prototype.createVertexArrayOES = function () {
                var t = new i(this);
                return this.vertexArrayObjects.push(t), t;
            }, n.prototype.deleteVertexArrayOES = function (t) {
                t.isAlive = !1, this.vertexArrayObjects.splice(this.vertexArrayObjects.indexOf(t), 1),
                    this.currentVertexArrayObject == t &amp;&amp; this.bindVertexArrayOES(null);
            }, n.prototype.isVertexArrayOES = function (t) {
                return !!(t &amp;&amp; t instanceof i &amp;&amp; t.hasBeenBound &amp;&amp; t.ext == this);
            }, n.prototype.bindVertexArrayOES = function (t) {
                var i = this.gl;
                if (!t || t.isAlive) {
                    var n = this.original, r = this.currentVertexArrayObject;
                    this.currentVertexArrayObject = t || this.defaultVertexArrayObject, this.currentVertexArrayObject.hasBeenBound = !0;
                    var s = this.currentVertexArrayObject;
                    if (r != s) {
                        r &amp;&amp; s.elementArrayBuffer == r.elementArrayBuffer || n.bindBuffer.call(i, i.ELEMENT_ARRAY_BUFFER, s.elementArrayBuffer);
                        for (var a = this.currentArrayBuffer, o = Math.max(r ? r.maxAttrib : 0, s.maxAttrib), l = 0; l &lt;= o; l++) {
                            var h = s.attribs[l], u = r ? r.attribs[l] : null;
                            if (r &amp;&amp; h.enabled == u.enabled || (h.enabled ? n.enableVertexAttribArray.call(i, l) : n.disableVertexAttribArray.call(i, l)),
                                h.enabled) {
                                var c = !1;
                                r &amp;&amp; h.buffer == u.buffer || (a != h.buffer &amp;&amp; (n.bindBuffer.call(i, i.ARRAY_BUFFER, h.buffer),
                                    a = h.buffer), c = !0), (c || h.cached != u.cached) &amp;&amp; n.vertexAttribPointer.call(i, l, h.size, h.type, h.normalized, h.stride, h.offset);
                            }
                        }
                        this.currentArrayBuffer != a &amp;&amp; n.bindBuffer.call(i, i.ARRAY_BUFFER, this.currentArrayBuffer);
                    }
                } else e(i.INVALID_OPERATION, "bindVertexArrayOES: attempt to bind deleted arrayObject");
            }, window._setupVertexArrayObject = function (t) {
                var e = t.getSupportedExtensions;
                t.getSupportedExtensions = function () {
                    var t = e.call(this) || [];
                    return t.indexOf("OES_vertex_array_object") &lt; 0 &amp;&amp; t.push("OES_vertex_array_object"),
                        t;
                };
                var i = t.getExtension;
                t.getExtension = function (t) {
                    var e = i.call(this, t);
                    return e || ("OES_vertex_array_object" !== t ? null : (this.__OESVertexArrayObject || (console.log("Setup OES_vertex_array_object polyfill"),
                        this.__OESVertexArrayObject = new n(this)), this.__OESVertexArrayObject));
                };
            };
        }();
        var Jt = function () {
            function e() {
                _classCallCheck(this, e);
            }
            return _createClass(e, null, [{
                key: "supportTextureFormat",
                value: function (e) {
                    switch (e) {
                        case t.TextureFormat.R32G32B32A32:
                            return !(!y.layaGPUInstance._isWebGL2 &amp;&amp; !y.layaGPUInstance._oesTextureFloat);

                        default:
                            return !0;
                    }
                }
            }, {
                key: "supportRenderTextureFormat",
                value: function (e) {
                    switch (e) {
                        case t.RenderTextureFormat.R16G16B16A16:
                            return !!(y.layaGPUInstance._isWebGL2 || y.layaGPUInstance._oesTextureHalfFloat &amp;&amp; y.layaGPUInstance._oesTextureHalfFloatLinear);

                        case t.RenderTextureFormat.Depth:
                            return !(!y.layaGPUInstance._isWebGL2 &amp;&amp; !y.layaGPUInstance._webgl_depth_texture);

                        case t.RenderTextureFormat.ShadowMap:
                            return !!y.layaGPUInstance._isWebGL2;

                        default:
                            return !0;
                    }
                }
            }, {
                key: "maxTextureCount",
                get: function () {
                    return this._maxTextureCount;
                }
            }, {
                key: "maxTextureSize",
                get: function () {
                    return this._maxTextureSize;
                }
            }, {
                key: "shaderCapailityLevel",
                get: function () {
                    return this._shaderCapailityLevel;
                }
            }]), e;
        }(), te = function () {
            function t(e, n) {
                _classCallCheck(this, t), this._gl = null, this._vaoExt = null, this._angleInstancedArrays = null,
                    this._isWebGL2 = !1, this._oesTextureHalfFloat = null, this._oes_element_index_uint = null,
                    this._oesTextureHalfFloatLinear = null, this._oesTextureFloat = null, this._extShaderTextureLod = null,
                    this._extTextureFilterAnisotropic = null, this._compressedTextureS3tc = null, this._compressedTexturePvrtc = null,
                    this._compressedTextureEtc1 = null, this._webgl_depth_texture = null, this._gl = e,
                    this._isWebGL2 = n;
                var r = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS), s = e.getParameter(e.MAX_TEXTURE_SIZE);
                n ? (this._getExtension("EXT_color_buffer_float"), Jt._shaderCapailityLevel = 35) : (i.Render.isConchApp || window._setupVertexArrayObject &amp;&amp; window._setupVertexArrayObject(e),
                    this._vaoExt = this._getExtension("OES_vertex_array_object"), this._angleInstancedArrays = this._getExtension("ANGLE_instanced_arrays"),
                    this._oesTextureHalfFloat = this._getExtension("OES_texture_half_float"), this._oesTextureHalfFloatLinear = this._getExtension("OES_texture_half_float_linear"),
                    this._oesTextureFloat = this._getExtension("OES_texture_float"), this._oes_element_index_uint = this._getExtension("OES_element_index_uint"),
                    this._extShaderTextureLod = this._getExtension("EXT_shader_texture_lod"), this._webgl_depth_texture = this._getExtension("WEBGL_depth_texture"),
                    Jt._shaderCapailityLevel = 30), this._extTextureFilterAnisotropic = this._getExtension("EXT_texture_filter_anisotropic"),
                    this._compressedTextureS3tc = this._getExtension("WEBGL_compressed_texture_s3tc"),
                    this._compressedTexturePvrtc = this._getExtension("WEBGL_compressed_texture_pvrtc"),
                    this._compressedTextureEtc1 = this._getExtension("WEBGL_compressed_texture_etc1"),
                    Jt._maxTextureCount = r, Jt._maxTextureSize = s;
            }
            return _createClass(t, [{
                key: "_getExtension",
                value: function (e) {
                    var i = t._extentionVendorPrefixes;
                    for (var n in i) {
                        var r = this._gl.getExtension(i[n] + e);
                        if (r) return r;
                    }
                    return null;
                }
            }, {
                key: "createVertexArray",
                value: function () {
                    return this._isWebGL2 ? this._gl.createVertexArray() : this._vaoExt.createVertexArrayOES();
                }
            }, {
                key: "bindVertexArray",
                value: function (t) {
                    this._isWebGL2 ? this._gl.bindVertexArray(t) : this._vaoExt.bindVertexArrayOES(t);
                }
            }, {
                key: "deleteVertexArray",
                value: function (t) {
                    this._isWebGL2 ? this._gl.deleteVertexArray(t) : this._vaoExt.deleteVertexArrayOES(t);
                }
            }, {
                key: "isVertexArray",
                value: function (t) {
                    this._isWebGL2 ? this._gl.isVertexArray(t) : this._vaoExt.isVertexArrayOES(t);
                }
            }, {
                key: "drawElementsInstanced",
                value: function (t, e, i, n, r) {
                    this._isWebGL2 ? this._gl.drawElementsInstanced(t, e, i, n, r) : this._angleInstancedArrays.drawElementsInstancedANGLE(t, e, i, n, r);
                }
            }, {
                key: "drawArraysInstanced",
                value: function (t, e, i, n) {
                    this._isWebGL2 ? this._gl.drawArraysInstanced(t, e, i, n) : this._angleInstancedArrays.drawArraysInstancedANGLE(t, e, i, n);
                }
            }, {
                key: "vertexAttribDivisor",
                value: function (t, e) {
                    this._isWebGL2 ? this._gl.vertexAttribDivisor(t, e) : this._angleInstancedArrays.vertexAttribDivisorANGLE(t, e);
                }
            }, {
                key: "supportInstance",
                value: function () {
                    return !(!this._isWebGL2 &amp;&amp; !this._angleInstancedArrays || !e.allowGPUInstanceDynamicBatch);
                }
            }, {
                key: "supportElementIndexUint32",
                value: function () {
                    return !(!this._isWebGL2 &amp;&amp; !this._oes_element_index_uint);
                }
            }]), t;
        }();
        te._extentionVendorPrefixes = ["", "WEBKIT_", "MOZ_"];
        var ee = function () {
            function t(e, n, r) {
                _classCallCheck(this, t), this._timeId = 0, t._mainCanvas = r;
                var s = t._mainCanvas.source;
                s.id = "layaCanvas", s.width = e, s.height = n, t.isConchApp &amp;&amp; document.body.appendChild(s),
                    this.initRender(t._mainCanvas, e, n), window.requestAnimationFrame(function t(e) {
                        i.stage._loop(), window.requestAnimationFrame(t);
                    }), i.stage.on("visibilitychange", this, this._onVisibilitychange);
            }
            return _createClass(t, [{
                key: "_onVisibilitychange",
                value: function () {
                    i.stage.isVisibility ? 0 != this._timeId &amp;&amp; window.clearInterval(this._timeId) : this._timeId = window.setInterval(this._enterFrame, 1e3);
                }
            }, {
                key: "initRender",
                value: function (i, n, r) {
                    var s = y.instance = g.mainContext = function (t) {
                        var i, n = ["webgl2", "webgl", "experimental-webgl", "webkit-3d", "moz-webgl"];
                        e.useWebGL2 &amp;&amp; !zt.onBDMiniGame || n.shift();
                        for (var r = 0; r &lt; n.length; r++) {
                            try {
                                i = t.getContext(n[r], {
                                    stencil: e.isStencil,
                                    alpha: e.isAlpha,
                                    antialias: e.isAntialias,
                                    premultipliedAlpha: e.premultipliedAlpha,
                                    preserveDrawingBuffer: e.preserveDrawingBuffer
                                });
                            } catch (t) { }
                            if (i) return "webgl2" === n[r] &amp;&amp; ($t._isWebGL2 = !0), i;
                        }
                        return null;
                    }(t._mainCanvas.source);
                    if (!s) return !1;
                    y.instance = s, y.layaGPUInstance = new te(s, $t._isWebGL2), i.size(n, r), Qt.__init__(),
                        lt.__init__();
                    var a = new Qt();
                    return a.isMain = !0, t._context = a, i._setContext(a), N.__init__(), V.__init__(),
                        wt.__init__(), gt.__int__(s), B._init_(s), !0;
                }
            }, {
                key: "_enterFrame",
                value: function () {
                    i.stage._loop();
                }
            }], [{
                key: "context",
                get: function () {
                    return t._context;
                }
            }, {
                key: "canvas",
                get: function () {
                    return t._mainCanvas.source;
                }
            }]), t;
        }();
        ee.supportWebGLPlusCulling = !1, ee.supportWebGLPlusAnimation = !1, ee.supportWebGLPlusRendering = !1,
            ee.isConchApp = !1, ee.isConchApp = null != window.conch, (ee.isConchApp || null != window.qq &amp;&amp; null != window.qq.webglPlus) &amp;&amp; (ee.supportWebGLPlusCulling = !1,
                ee.supportWebGLPlusAnimation = !1, ee.supportWebGLPlusRendering = !1);
        var ie = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.texture = null, this.vertices = null, this.uvs = null, this.indices = null,
                        this.matrix = null, n.recover("DrawTrianglesCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t.drawTriangles(this.texture, this.x + e, this.y + i, this.vertices, this.uvs, this.indices, this.matrix, this.alpha, this.color, this.blendMode, this.colorNum);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a, o, l, h, u, c, _) {
                    var d = n.getItemByClass("DrawTrianglesCmd", t);
                    if (d.texture = e, d.x = i, d.y = r, d.vertices = s, d.uvs = a, d.indices = o, d.matrix = l,
                        d.alpha = h, u) {
                        d.color = new q();
                        var f = j.create(u).arrColor;
                        d.color.color(255 * f[0], 255 * f[1], 255 * f[2], 255 * f[3]);
                    }
                    return d.blendMode = c, d.colorNum = _, d;
                }
            }]), t;
        }();
        ie.ID = "DrawTriangles";
        var ne = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.texture._removeReference(), n.recover("Draw9GridTexture", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t.drawTextureWithSizeGrid(this.texture, this.x, this.y, this.width, this.height, this.sizeGrid, e, i);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a, o) {
                    var l = n.getItemByClass("Draw9GridTexture", t);
                    return l.texture = e, e._addReference(), l.x = i, l.y = r, l.width = s, l.height = a,
                        l.sizeGrid = o, l;
                }
            }]), t;
        }();
        ne.ID = "Draw9GridTexture";
        var re = function () {
            function t() {
                _classCallCheck(this, t), this._cacheBoundsType = !1;
            }
            return _createClass(t, [{
                key: "destroy",
                value: function () {
                    this._graphics = null, this._cacheBoundsType = !1, this._temp &amp;&amp; (this._temp.length = 0),
                        this._rstBoundPoints &amp;&amp; (this._rstBoundPoints.length = 0), this._bounds &amp;&amp; this._bounds.recover(),
                        this._bounds = null, n.recover("GraphicsBounds", this);
                }
            }, {
                key: "reset",
                value: function () {
                    this._temp &amp;&amp; (this._temp.length = 0);
                }
            }, {
                key: "getBounds",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] &amp;&amp; arguments[0];
                    return (!this._bounds || !this._temp || this._temp.length &lt; 1 || t != this._cacheBoundsType) &amp;&amp; (this._bounds = p._getWrapRec(this.getBoundPoints(t), this._bounds)),
                        this._cacheBoundsType = t, this._bounds;
                }
            }, {
                key: "getBoundPoints",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] &amp;&amp; arguments[0];
                    return (!this._temp || this._temp.length &lt; 1 || t != this._cacheBoundsType) &amp;&amp; (this._temp = this._getCmdPoints(t)),
                        this._cacheBoundsType = t, this._rstBoundPoints = K.copyArray(this._rstBoundPoints, this._temp);
                }
            }, {
                key: "_getCmdPoints",
                value: function () {
                    var e, i = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] &amp;&amp; arguments[0], n = this._graphics.cmds;
                    if ((e = this._temp || (this._temp = [])).length = 0, n || null == this._graphics._one || (t._tempCmds.length = 0,
                        t._tempCmds.push(this._graphics._one), n = t._tempCmds), !n) return e;
                    var f = t._tempMatrixArrays;
                    f.length = 0;
                    var v = t._initMatrix;
                    v.identity();
                    for (var y, g, m = t._tempMatrix, T = 0, k = n.length; T &lt; k; T++) switch ((y = n[T]).cmdID) {
                        case r.ID:
                            f.push(v), v = v.clone();
                            break;

                        case $.ID:
                            v = f.pop();
                            break;

                        case tt.ID:
                            m.identity(), m.translate(-y.pivotX, -y.pivotY), m.scale(y.scaleX, y.scaleY), m.translate(y.pivotX, y.pivotY),
                                this._switchMatrix(v, m);
                            break;

                        case J.ID:
                            m.identity(), m.translate(-y.pivotX, -y.pivotY), m.rotate(y.angle), m.translate(y.pivotX, y.pivotY),
                                this._switchMatrix(v, m);
                            break;

                        case it.ID:
                            m.identity(), m.translate(y.tx, y.ty), this._switchMatrix(v, m);
                            break;

                        case et.ID:
                            m.identity(), m.translate(-y.pivotX, -y.pivotY), m.concat(y.matrix), m.translate(y.pivotX, y.pivotY),
                                this._switchMatrix(v, m);
                            break;

                        case o.ID:
                        case Z.ID:
                            t._addPointArrToRst(e, p._getBoundPointS(y.x, y.y, y.width, y.height), v);
                            break;

                        case Q.ID:
                            v.copyTo(m), y.matrix &amp;&amp; m.concat(y.matrix), t._addPointArrToRst(e, p._getBoundPointS(y.x, y.y, y.width, y.height), m);
                            break;

                        case o.ID:
                            if (g = y.texture, i) y.width &amp;&amp; y.height ? t._addPointArrToRst(e, p._getBoundPointS(y.x, y.y, y.width, y.height), v) : t._addPointArrToRst(e, p._getBoundPointS(y.x, y.y, g.width, g.height), v); else {
                                var x = (y.width || g.sourceWidth) / g.width, C = (y.height || g.sourceHeight) / g.height, E = x * g.sourceWidth, b = C * g.sourceHeight, w = g.offsetX &gt; 0 ? g.offsetX : 0, R = g.offsetY &gt; 0 ? g.offsetY : 0;
                                w *= x, R *= C, t._addPointArrToRst(e, p._getBoundPointS(y.x - w, y.y - R, E, b), v);
                            }
                            break;

                        case Z.ID:
                            y.width &amp;&amp; y.height ? t._addPointArrToRst(e, p._getBoundPointS(y.x, y.y, y.width, y.height), v) : (g = y.texture,
                                t._addPointArrToRst(e, p._getBoundPointS(y.x, y.y, g.width, g.height), v));
                            break;

                        case Q.ID:
                            var A;
                            y.matrix ? (v.copyTo(m), m.concat(y.matrix), A = m) : A = v, i ? y.width &amp;&amp; y.height ? t._addPointArrToRst(e, p._getBoundPointS(y.x, y.y, y.width, y.height), A) : (g = y.texture,
                                t._addPointArrToRst(e, p._getBoundPointS(y.x, y.y, g.width, g.height), A)) : (g = y.texture,
                                    x = (y.width || g.sourceWidth) / g.width, C = (y.height || g.sourceHeight) / g.height,
                                    E = x * g.sourceWidth, b = C * g.sourceHeight, w = g.offsetX &gt; 0 ? g.offsetX : 0,
                                    R = g.offsetY &gt; 0 ? g.offsetY : 0, w *= x, R *= C, t._addPointArrToRst(e, p._getBoundPointS(y.x - w, y.y - R, E, b), A));
                            break;

                        case d.ID:
                            t._addPointArrToRst(e, p._getBoundPointS(y.x, y.y, y.width, y.height), v);
                            break;

                        case s.ID:
                            t._addPointArrToRst(e, p._getBoundPointS(y.x - y.radius, y.y - y.radius, y.radius + y.radius, y.radius + y.radius), v);
                            break;

                        case l.ID:
                            var S;
                            t._tempPoints.length = 0, S = .5 * y.lineWidth, y.fromX == y.toX ? t._tempPoints.push(y.fromX + S, y.fromY, y.toX + S, y.toY, y.fromX - S, y.fromY, y.toX - S, y.toY) : y.fromY == y.toY ? t._tempPoints.push(y.fromX, y.fromY + S, y.toX, y.toY + S, y.fromX, y.fromY - S, y.toX, y.toY - S) : t._tempPoints.push(y.fromX, y.fromY, y.toX, y.toY),
                                t._addPointArrToRst(e, t._tempPoints, v);
                            break;

                        case a.ID:
                            t._addPointArrToRst(e, nt.I.getBezierPoints(y.points), v, y.x, y.y);
                            break;

                        case h.ID:
                        case _.ID:
                            t._addPointArrToRst(e, y.points, v, y.x, y.y);
                            break;

                        case u.ID:
                            t._addPointArrToRst(e, this._getPathPoints(y.paths), v, y.x, y.y);
                            break;

                        case c.ID:
                            t._addPointArrToRst(e, this._getPiePoints(y.x, y.y, y.radius, y.startAngle, y.endAngle), v);
                            break;

                        case ie.ID:
                            t._addPointArrToRst(e, this._getTriAngBBXPoints(y.vertices), v);
                            break;

                        case ne.ID:
                            t._addPointArrToRst(e, this._getDraw9GridBBXPoints(y), v);
                    }
                    return e.length &gt; 200 ? e = K.copyArray(e, p._getWrapRec(e)._getBoundPoints()) : e.length &gt; 8 &amp;&amp; (e = rt.scanPList(e)),
                        e;
                }
            }, {
                key: "_switchMatrix",
                value: function (t, e) {
                    e.concat(t), e.copyTo(t);
                }
            }, {
                key: "_getPiePoints",
                value: function (e, i, n, r, s) {
                    var a = t._tempPoints;
                    t._tempPoints.length = 0;
                    var o = Math.PI / 180, l = s - r;
                    if (l &gt;= 360 || l &lt;= -360) return a.push(e - n, i - n), a.push(e + n, i - n), a.push(e + n, i + n),
                        a.push(e - n, i + n), a;
                    a.push(e, i);
                    var h = l % 360;
                    h &lt; 0 &amp;&amp; (h += 360);
                    var u = r + h, c = r * o, _ = u * o;
                    a.push(e + n * Math.cos(c), i + n * Math.sin(c)), a.push(e + n * Math.cos(_), i + n * Math.sin(_));
                    for (var d = 90 * Math.ceil(r / 90), f = 90 * Math.floor(u / 90), v = d; v &lt;= f; v += 90) {
                        var p = v * o;
                        a.push(e + n * Math.cos(p), i + n * Math.sin(p));
                    }
                    return a;
                }
            }, {
                key: "_getTriAngBBXPoints",
                value: function (t) {
                    var e = t.length;
                    if (e &lt; 2) return [];
                    for (var i = t[0], n = t[1], r = i, s = n, a = 2; a &lt; e;) {
                        var o = t[a++], l = t[a++];
                        i &gt; o &amp;&amp; (i = o), n &gt; l &amp;&amp; (n = l), r &lt; o &amp;&amp; (r = o), s &lt; l &amp;&amp; (s = l);
                    }
                    return [i, n, r, n, r, s, i, s];
                }
            }, {
                key: "_getDraw9GridBBXPoints",
                value: function (t) {
                    var e = t.width, i = t.height;
                    return [0, 0, e, 0, e, i, 0, i];
                }
            }, {
                key: "_getPathPoints",
                value: function (e) {
                    var i, n, r, s = t._tempPoints;
                    for (s.length = 0, n = e.length, i = 0; i &lt; n; i++) (r = e[i]).length &gt; 1 &amp;&amp; (s.push(r[1], r[2]),
                        r.length &gt; 3 &amp;&amp; s.push(r[3], r[4]));
                    return s;
                }
            }], [{
                key: "create",
                value: function () {
                    return n.getItemByClass("GraphicsBounds", t);
                }
            }, {
                key: "_addPointArrToRst",
                value: function (e, i, n) {
                    var r, s, a = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 0, o = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0;
                    for (s = i.length, r = 0; r &lt; s; r += 2) t._addPointToRst(e, i[r] + a, i[r + 1] + o, n);
                }
            }, {
                key: "_addPointToRst",
                value: function (t, e, i, n) {
                    var r = v.TEMP;
                    r.setTo(e || 0, i || 0), n.transformPoint(r), t.push(r.x, r.y);
                }
            }]), t;
        }();
        re._tempMatrix = new f(), re._initMatrix = new f(), re._tempPoints = [], re._tempMatrixArrays = [],
            re._tempCmds = [];
        var se = function t() {
            _classCallCheck(this, t);
        };
        se.ALPHA = 1, se.TRANSFORM = 2, se.BLEND = 4, se.CANVAS = 8, se.FILTERS = 16, se.MASK = 32,
            se.CLIP = 64, se.STYLE = 128, se.TEXTURE = 256, se.GRAPHICS = 512, se.LAYAGL3D = 1024,
            se.CUSTOM = 2048, se.ONECHILD = 4096, se.CHILDS = 8192, se.REPAINT_NONE = 0, se.REPAINT_NODE = 1,
            se.REPAINT_CACHE = 2, se.REPAINT_ALL = 3;
        var ae = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    n.recover("ClipRectCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t.clipRect(this.x + e, this.y + i, this.width, this.height);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i, r, s) {
                    var a = n.getItemByClass("ClipRectCmd", t);
                    return a.x = e, a.y = i, a.width = r, a.height = s, a;
                }
            }]), t;
        }();
        ae.ID = "ClipRect";
        var oe = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this.texture._removeReference(), this.texture = null, this.pos = null, n.recover("DrawTexturesCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t.drawTextures(this.texture, this.pos, e, i);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e, i) {
                    var r = n.getItemByClass("DrawTexturesCmd", t);
                    return r.texture = e, e._addReference(), r.pos = i, r;
                }
            }]), t;
        }();
        oe.ID = "DrawTextures";
        var le = function () {
            function t() {
                _classCallCheck(this, t), this._textIsWorldText = !1, this._fontColor = 4294967295,
                    this._strokeColor = 0, this._fontObj = t._defFontObj, this._nTexAlign = 0;
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    n.recover("FillTextCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, n) {
                    i.stage.isGlobalRepaint() &amp;&amp; this._textIsWorldText &amp;&amp; this._text.cleanCache(), this._words ? Qt._textRender.fillWords(t, this._words, this.x + e, this.y + n, this._fontObj, this._color, this._borderColor, this._lineWidth) : this._textIsWorldText ? t._fast_filltext(this._text, this.x + e, this.y + n, this._fontObj, this._color, this._borderColor, this._lineWidth, this._nTexAlign, 0) : Qt._textRender.filltext(t, this._text, this.x + e, this.y + n, this.font, this.color, this._borderColor, this._lineWidth, this._textAlign);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }, {
                key: "text",
                get: function () {
                    return this._text;
                },
                set: function (t) {
                    this._text = t, this._textIsWorldText = t instanceof Vt, this._textIsWorldText &amp;&amp; this._text.cleanCache();
                }
            }, {
                key: "font",
                get: function () {
                    return this._font;
                },
                set: function (t) {
                    this._font = t, this._fontObj = Yt.Parse(t), this._textIsWorldText &amp;&amp; this._text.cleanCache();
                }
            }, {
                key: "color",
                get: function () {
                    return this._color;
                },
                set: function (t) {
                    this._color = t, this._fontColor = j.create(t).numColor, this._textIsWorldText &amp;&amp; this._text.cleanCache();
                }
            }, {
                key: "textAlign",
                get: function () {
                    return this._textAlign;
                },
                set: function (t) {
                    switch (this._textAlign = t, t) {
                        case "center":
                            this._nTexAlign = i.Context.ENUM_TEXTALIGN_CENTER;
                            break;

                        case "right":
                            this._nTexAlign = i.Context.ENUM_TEXTALIGN_RIGHT;
                            break;

                        default:
                            this._nTexAlign = i.Context.ENUM_TEXTALIGN_DEFAULT;
                    }
                    this._textIsWorldText &amp;&amp; this._text.cleanCache();
                }
            }], [{
                key: "create",
                value: function (e, i, r, s, a, o, l, h, u) {
                    var c = n.getItemByClass("FillTextCmd", t);
                    return c.text = e, c._textIsWorldText = e instanceof Vt, c._words = i, c.x = r,
                        c.y = s, c.font = a, c.color = o, c.textAlign = l, c._lineWidth = h, c._borderColor = u,
                        c;
                }
            }]), t;
        }();
        le.ID = "FillText", le._defFontObj = new Yt(null);
        var he = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    n.recover("SaveCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t.save();
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function () {
                    return n.getItemByClass("SaveCmd", t);
                }
            }]), t;
        }();
        he.ID = "Save";
        var ue = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "regCacheByFunction",
                value: function (e, i) {
                    var n;
                    t.unRegCacheByFunction(e, i), n = {
                        tryDispose: e,
                        getCacheList: i
                    }, t._cacheList.push(n);
                }
            }, {
                key: "unRegCacheByFunction",
                value: function (e, i) {
                    var n, r;
                    for (r = t._cacheList.length, n = 0; n &lt; r; n++) if (t._cacheList[n].tryDispose == e &amp;&amp; t._cacheList[n].getCacheList == i) return void t._cacheList.splice(n, 1);
                }
            }, {
                key: "forceDispose",
                value: function () {
                    var e, i = t._cacheList.length;
                    for (e = 0; e &lt; i; e++) t._cacheList[e].tryDispose(!0);
                }
            }, {
                key: "beginCheck",
                value: function () {
                    var e = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 15e3;
                    i.systemTimer.loop(e, null, t._checkLoop);
                }
            }, {
                key: "stopCheck",
                value: function () {
                    i.systemTimer.clear(null, t._checkLoop);
                }
            }, {
                key: "_checkLoop",
                value: function () {
                    var e = t._cacheList;
                    if (!(e.length &lt; 1)) {
                        var n, r, s = i.Browser.now();
                        for (r = n = e.length; n &gt; 0 &amp;&amp; (t._index++, t._index = t._index % r, e[t._index].tryDispose(!1),
                            !(i.Browser.now() - s &gt; t.loopTimeLimit));) n--;
                    }
                }
            }]), t;
        }();
        ue.loopTimeLimit = 2, ue._cacheList = [], ue._index = 0;
        var ce = function () {
            function t() {
                _classCallCheck(this, t), this.useDic = {}, this.shapeDic = {}, this.shapeLineDic = {},
                    this._id = 0, this._checkKey = !1, this._freeIdArray = [], ue.regCacheByFunction(this.startDispose.bind(this), this.getCacheList.bind(this));
            }
            return _createClass(t, [{
                key: "getId",
                value: function () {
                    return this._id++;
                }
            }, {
                key: "addShape",
                value: function (t, e) {
                    this.shapeDic[t] = e, this.useDic[t] || (this.useDic[t] = !0);
                }
            }, {
                key: "addLine",
                value: function (t, e) {
                    this.shapeLineDic[t] = e, this.shapeLineDic[t] || (this.shapeLineDic[t] = !0);
                }
            }, {
                key: "getShape",
                value: function (t) {
                    this._checkKey &amp;&amp; null != this.useDic[t] &amp;&amp; (this.useDic[t] = !0);
                }
            }, {
                key: "deleteShape",
                value: function (t) {
                    this.shapeDic[t] &amp;&amp; (this.shapeDic[t] = null, delete this.shapeDic[t]), this.shapeLineDic[t] &amp;&amp; (this.shapeLineDic[t] = null,
                        delete this.shapeLineDic[t]), null != this.useDic[t] &amp;&amp; delete this.useDic[t];
                }
            }, {
                key: "getCacheList",
                value: function () {
                    var t, e = [];
                    for (t in this.shapeDic) e.push(this.shapeDic[t]);
                    for (t in this.shapeLineDic) e.push(this.shapeLineDic[t]);
                    return e;
                }
            }, {
                key: "startDispose",
                value: function (t) {
                    var e;
                    for (e in this.useDic) this.useDic[e] = !1;
                    this._checkKey = !0;
                }
            }, {
                key: "endDispose",
                value: function () {
                    if (this._checkKey) {
                        var t;
                        for (t in this.useDic) this.useDic[t] || this.deleteShape(t);
                        this._checkKey = !1;
                    }
                }
            }], [{
                key: "getInstance",
                value: function () {
                    return t.instance = t.instance || new t();
                }
            }]), t;
        }(), _e = function () {
            function t() {
                _classCallCheck(this, t), this._sp = null, this._one = null, this._render = this._renderEmpty,
                    this._cmds = null, this._vectorgraphArray = null, this._graphicBounds = null, this.autoDestroy = !1,
                    this._createData();
            }
            return _createClass(t, [{
                key: "_createData",
                value: function () { }
            }, {
                key: "_clearData",
                value: function () { }
            }, {
                key: "_destroyData",
                value: function () { }
            }, {
                key: "destroy",
                value: function () {
                    this.clear(!0), this._graphicBounds &amp;&amp; this._graphicBounds.destroy(), this._graphicBounds = null,
                        this._vectorgraphArray = null, this._sp &amp;&amp; (this._sp._renderType = 0, this._sp._setRenderType(0),
                            this._sp = null), this._destroyData();
                }
            }, {
                key: "clear",
                value: function () {
                    var t = !(arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0]) || arguments[0];
                    if (t) {
                        var e = this._one;
                        if (this._cmds) {
                            var i, n = this._cmds.length;
                            for (i = 0; i &lt; n; i++) (e = this._cmds[i]).recover();
                            this._cmds.length = 0;
                        } else e &amp;&amp; e.recover();
                    } else this._cmds = null;
                    if (this._one = null, this._render = this._renderEmpty, this._clearData(), this._sp &amp;&amp; (this._sp._renderType &amp;= ~se.GRAPHICS,
                        this._sp._setRenderType(this._sp._renderType)), this._repaint(), this._vectorgraphArray) {
                        for (i = 0, n = this._vectorgraphArray.length; i &lt; n; i++) ce.getInstance().deleteShape(this._vectorgraphArray[i]);
                        this._vectorgraphArray.length = 0;
                    }
                }
            }, {
                key: "_clearBoundsCache",
                value: function () {
                    this._graphicBounds &amp;&amp; this._graphicBounds.reset();
                }
            }, {
                key: "_initGraphicBounds",
                value: function () {
                    this._graphicBounds || (this._graphicBounds = re.create(), this._graphicBounds._graphics = this);
                }
            }, {
                key: "_repaint",
                value: function () {
                    this._clearBoundsCache(), this._sp &amp;&amp; this._sp.repaint();
                }
            }, {
                key: "_isOnlyOne",
                value: function () {
                    return !this._cmds || 0 === this._cmds.length;
                }
            }, {
                key: "getBounds",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] &amp;&amp; arguments[0];
                    return this._initGraphicBounds(), this._graphicBounds.getBounds(t);
                }
            }, {
                key: "getBoundPoints",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] &amp;&amp; arguments[0];
                    return this._initGraphicBounds(), this._graphicBounds.getBoundPoints(t);
                }
            }, {
                key: "drawImage",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0, n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 0, r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0;
                    if (!t) return null;
                    if (n || (n = t.sourceWidth), r || (r = t.sourceHeight), t.getIsReady()) {
                        var s = n / t.sourceWidth, a = r / t.sourceHeight;
                        if (n = t.width * s, r = t.height * a, n &lt;= 0 || r &lt;= 0) return null;
                        e += t.offsetX * s, i += t.offsetY * a;
                    }
                    this._sp &amp;&amp; (this._sp._renderType |= se.GRAPHICS, this._sp._setRenderType(this._sp._renderType));
                    var l = o.create.call(this, t, e, i, n, r);
                    return null == this._one ? (this._one = l, this._render = this._renderOneImg) : this._saveToCmd(null, l),
                        this._repaint(), l;
                }
            }, {
                key: "drawTexture",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0, n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 0, r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0, s = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : null, a = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : 1, o = arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7] ? arguments[7] : null, l = arguments.length &gt; 8 &amp;&amp; void 0 !== arguments[8] ? arguments[8] : null, h = arguments.length &gt; 9 ? arguments[9] : void 0;
                    if (!t || a &lt; .01) return null;
                    if (!t.getIsReady()) return null;
                    if (n || (n = t.sourceWidth), r || (r = t.sourceHeight), t.getIsReady()) {
                        var u = n / t.sourceWidth, c = r / t.sourceHeight;
                        if (n = t.width * u, r = t.height * c, n &lt;= 0 || r &lt;= 0) return null;
                        e += t.offsetX * u, i += t.offsetY * c;
                    }
                    this._sp &amp;&amp; (this._sp._renderType |= se.GRAPHICS, this._sp._setRenderType(this._sp._renderType));
                    var _ = Q.create.call(this, t, e, i, n, r, s, a, o, l, h);
                    return this._repaint(), this._saveToCmd(null, _);
                }
            }, {
                key: "drawTextures",
                value: function (t, e) {
                    return t ? this._saveToCmd(ee._context.drawTextures, oe.create.call(this, t, e)) : null;
                }
            }, {
                key: "drawTriangles",
                value: function (t, e, i, n, r, s) {
                    var a = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : null, o = arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7] ? arguments[7] : 1, l = arguments.length &gt; 8 &amp;&amp; void 0 !== arguments[8] ? arguments[8] : null, h = arguments.length &gt; 9 &amp;&amp; void 0 !== arguments[9] ? arguments[9] : null, u = arguments.length &gt; 10 &amp;&amp; void 0 !== arguments[10] ? arguments[10] : void 0;
                    return this._saveToCmd(ee._context.drawTriangles, ie.create.call(this, t, e, i, n, r, s, a, o, l, h, u));
                }
            }, {
                key: "fillTexture",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 0, r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0, s = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : "repeat", a = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : null;
                    return t &amp;&amp; t.getIsReady() ? this._saveToCmd(ee._context._fillTexture, Z.create.call(this, t, e, i, n, r, s, a || v.EMPTY, {})) : null;
                }
            }, {
                key: "_saveToCmd",
                value: function (t, e) {
                    return this._sp &amp;&amp; (this._sp._renderType |= se.GRAPHICS, this._sp._setRenderType(this._sp._renderType)),
                        null == this._one ? (this._one = e, this._render = this._renderOne) : (this._render = this._renderAll,
                            0 === (this._cmds || (this._cmds = [])).length &amp;&amp; this._cmds.push(this._one), this._cmds.push(e)),
                        this._repaint(), e;
                }
            }, {
                key: "clipRect",
                value: function (t, e, i, n) {
                    return this._saveToCmd(ee._context.clipRect, ae.create.call(this, t, e, i, n));
                }
            }, {
                key: "fillText",
                value: function (t, e, n, r, s, a) {
                    return this._saveToCmd(ee._context.fillText, le.create.call(this, t, null, e, n, r || i.Text.defaultFontStr(), s, a, 0, ""));
                }
            }, {
                key: "fillBorderText",
                value: function (t, e, n, r, s, a, o, l) {
                    return this._saveToCmd(ee._context.fillText, le.create.call(this, t, null, e, n, r || i.Text.defaultFontStr(), s, l, o, a));
                }
            }, {
                key: "fillWords",
                value: function (t, e, n, r, s) {
                    return this._saveToCmd(ee._context.fillText, le.create.call(this, null, t, e, n, r || i.Text.defaultFontStr(), s));
                }
            }, {
                key: "fillBorderWords",
                value: function (t, e, n, r, s, a, o) {
                    return this._saveToCmd(ee._context.fillText, le.create.call(this, null, t, e, n, r || i.Text.defaultFontStr(), s, "", o, a));
                }
            }, {
                key: "strokeText",
                value: function (t, e, n, r, s, a, o) {
                    return this._saveToCmd(ee._context.fillText, le.create.call(this, t, null, e, n, r || i.Text.defaultFontStr(), null, o, a, s));
                }
            }, {
                key: "alpha",
                value: function (t) {
                    return this._saveToCmd(ee._context.alpha, r.create.call(this, t));
                }
            }, {
                key: "transform",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0;
                    return this._saveToCmd(ee._context._transform, et.create.call(this, t, e, i));
                }
            }, {
                key: "rotate",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0;
                    return this._saveToCmd(ee._context._rotate, J.create.call(this, t, e, i));
                }
            }, {
                key: "scale",
                value: function (t, e) {
                    var i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0, n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 0;
                    return this._saveToCmd(ee._context._scale, tt.create.call(this, t, e, i, n));
                }
            }, {
                key: "translate",
                value: function (t, e) {
                    return this._saveToCmd(ee._context.translate, it.create.call(this, t, e));
                }
            }, {
                key: "save",
                value: function () {
                    return this._saveToCmd(ee._context._save, he.create.call(this));
                }
            }, {
                key: "restore",
                value: function () {
                    return this._saveToCmd(ee._context.restore, $.create.call(this));
                }
            }, {
                key: "replaceText",
                value: function (t) {
                    this._repaint();
                    var e = this._cmds;
                    if (e) {
                        for (var i = e.length - 1; i &gt; -1; i--) if (this._isTextCmd(e[i])) return e[i].text = t,
                            !0;
                    } else if (this._one &amp;&amp; this._isTextCmd(this._one)) return this._one.text = t, !0;
                    return !1;
                }
            }, {
                key: "_isTextCmd",
                value: function (t) {
                    return t.cmdID == le.ID;
                }
            }, {
                key: "replaceTextColor",
                value: function (t) {
                    this._repaint();
                    var e = this._cmds;
                    if (e) for (var i = e.length - 1; i &gt; -1; i--) this._isTextCmd(e[i]) &amp;&amp; this._setTextCmdColor(e[i], t); else this._one &amp;&amp; this._isTextCmd(this._one) &amp;&amp; this._setTextCmdColor(this._one, t);
                }
            }, {
                key: "_setTextCmdColor",
                value: function (t, e) {
                    switch (t.cmdID) {
                        case le.ID:
                            t.color = e;
                    }
                }
            }, {
                key: "loadImage",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0, r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 0, s = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0, a = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : null, o = i.Loader.getRes(t);
                    o ? o.getIsReady() ? this.drawImage(o, e, n, r, s) : o.once(Gt.READY, this, this.drawImage, [o, e, n, r, s]) : ((o = new Wt()).load(t),
                        i.Loader.cacheTexture(t, o), o.once(Gt.READY, this, this.drawImage, [o, e, n, r, s])),
                        null != a &amp;&amp; (o.getIsReady() ? a.call(this._sp) : o.on(Gt.READY, this._sp, a));
                }
            }, {
                key: "_renderEmpty",
                value: function (t, e, i, n) { }
            }, {
                key: "_renderAll",
                value: function (t, e, i, n) {
                    for (var r = this._cmds, s = 0, a = r.length; s &lt; a; s++) r[s].run(e, i, n);
                }
            }, {
                key: "_renderOne",
                value: function (t, e, i, n) {
                    e.sprite = t, this._one.run(e, i, n);
                }
            }, {
                key: "_renderOneImg",
                value: function (t, e, i, n) {
                    e.sprite = t, this._one.run(e, i, n);
                }
            }, {
                key: "drawLine",
                value: function (t, e, i, n, r) {
                    var s = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 1, a = s &lt; 1 || s % 2 == 0 ? 0 : .5;
                    return this._saveToCmd(ee._context._drawLine, l.create.call(this, t + a, e + a, i + a, n + a, r, s, 0));
                }
            }, {
                key: "drawLines",
                value: function (t, e, i, n) {
                    var r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 1;
                    if (!i || i.length &lt; 4) return null;
                    var s = r &lt; 1 || r % 2 == 0 ? 0 : .5;
                    return this._saveToCmd(ee._context._drawLines, h.create.call(this, t + s, e + s, i, n, r, 0));
                }
            }, {
                key: "drawCurves",
                value: function (t, e, i, n) {
                    var r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 1;
                    return this._saveToCmd(ee._context.drawCurves, a.create.call(this, t, e, i, n, r));
                }
            }, {
                key: "drawRect",
                value: function (t, e, i, n, r) {
                    var s = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : null, a = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : 1, o = a &gt;= 1 &amp;&amp; s ? a / 2 : 0, l = s ? a : 0;
                    return this._saveToCmd(ee._context.drawRect, d.create.call(this, t + o, e + o, i - l, n - l, r, s, a));
                }
            }, {
                key: "drawCircle",
                value: function (t, e, i, n) {
                    var r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null, a = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 1, o = a &gt;= 1 &amp;&amp; r ? a / 2 : 0;
                    return this._saveToCmd(ee._context._drawCircle, s.create.call(this, t, e, i - o, n, r, a, 0));
                }
            }, {
                key: "drawPie",
                value: function (t, e, i, n, r, s) {
                    var a = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : null, o = arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7] ? arguments[7] : 1, l = o &gt;= 1 &amp;&amp; a ? o / 2 : 0, h = a ? o : 0;
                    return this._saveToCmd(ee._context._drawPie, c.create.call(this, t + l, e + l, i - h, K.toRadian(n), K.toRadian(r), s, a, o, 0));
                }
            }, {
                key: "drawPoly",
                value: function (t, e, i, n) {
                    var r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null, s = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 1, a = !1;
                    a = !(i.length &gt; 6);
                    var o = s &gt;= 1 &amp;&amp; r ? s % 2 == 0 ? 0 : .5 : 0;
                    return this._saveToCmd(ee._context._drawPoly, _.create.call(this, t + o, e + o, i, n, r, s, a, 0));
                }
            }, {
                key: "drawPath",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null;
                    return this._saveToCmd(ee._context._drawPath, u.create.call(this, t, e, i, n, r));
                }
            }, {
                key: "draw9Grid",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0, n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 0, r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0, s = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : null;
                    this._saveToCmd(null, ne.create(t, e, i, n, r, s));
                }
            }, {
                key: "cmds",
                get: function () {
                    return this._cmds;
                },
                set: function (t) {
                    this._sp &amp;&amp; (this._sp._renderType |= se.GRAPHICS, this._sp._setRenderType(this._sp._renderType)),
                        this._cmds = t, this._render = this._renderAll, this._repaint();
                }
            }]), t;
        }(), de = function t() {
            _classCallCheck(this, t);
        };
        de.NOT_ACTIVE = 1, de.ACTIVE_INHIERARCHY = 2, de.AWAKED = 4, de.NOT_READY = 8, de.DISPLAY = 16,
            de.HAS_ZORDER = 32, de.HAS_MOUSE = 64, de.DISPLAYED_INSTAGE = 128, de.DRAWCALL_OPTIMIZE = 256;
        var fe = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "__init__",
                value: function () {
                    t.map[se.ALPHA | se.TRANSFORM | se.GRAPHICS] = t.alpha_transform_drawLayaGL, t.map[se.ALPHA | se.GRAPHICS] = t.alpha_drawLayaGL,
                        t.map[se.TRANSFORM | se.GRAPHICS] = t.transform_drawLayaGL, t.map[se.TRANSFORM | se.CHILDS] = t.transform_drawNodes,
                        t.map[se.ALPHA | se.TRANSFORM | se.TEXTURE] = t.alpha_transform_drawTexture, t.map[se.ALPHA | se.TEXTURE] = t.alpha_drawTexture,
                        t.map[se.TRANSFORM | se.TEXTURE] = t.transform_drawTexture, t.map[se.GRAPHICS | se.CHILDS] = t.drawLayaGL_drawNodes;
                }
            }, {
                key: "transform_drawTexture",
                value: function (e, i, n, r) {
                    e._style;
                    var s = e.texture;
                    i.saveTransform(t.curMat), i.transformByMatrix(e.transform, n, r), i.drawTexture(s, -e.pivotX, -e.pivotY, e._width || s.width, e._height || s.height),
                        i.restoreTransform(t.curMat);
                }
            }, {
                key: "alpha_drawTexture",
                value: function (t, e, i, n) {
                    var r, s = t._style, a = t.texture;
                    if ((r = s.alpha) &gt; .01 || t._needRepaint()) {
                        var o = e.globalAlpha;
                        e.globalAlpha *= r, e.drawTexture(a, i - s.pivotX + a.offsetX, n - s.pivotY + a.offsetY, t._width || a.width, t._height || a.height),
                            e.globalAlpha = o;
                    }
                }
            }, {
                key: "alpha_transform_drawTexture",
                value: function (e, i, n, r) {
                    var s, a = e._style, o = e.texture;
                    if ((s = a.alpha) &gt; .01 || e._needRepaint()) {
                        var l = i.globalAlpha;
                        i.globalAlpha *= s, i.saveTransform(t.curMat), i.transformByMatrix(e.transform, n, r),
                            i.drawTexture(o, -a.pivotX + o.offsetX, -a.pivotY + o.offsetY, e._width || o.width, e._height || o.height),
                            i.restoreTransform(t.curMat), i.globalAlpha = l;
                    }
                }
            }, {
                key: "alpha_transform_drawLayaGL",
                value: function (e, i, n, r) {
                    var s, a = e._style;
                    if ((s = a.alpha) &gt; .01 || e._needRepaint()) {
                        var o = i.globalAlpha;
                        i.globalAlpha *= s, i.saveTransform(t.curMat), i.transformByMatrix(e.transform, n, r),
                            e._graphics &amp;&amp; e._graphics._render(e, i, -a.pivotX, -a.pivotY), i.restoreTransform(t.curMat),
                            i.globalAlpha = o;
                    }
                }
            }, {
                key: "alpha_drawLayaGL",
                value: function (t, e, i, n) {
                    var r, s = t._style;
                    if ((r = s.alpha) &gt; .01 || t._needRepaint()) {
                        var a = e.globalAlpha;
                        e.globalAlpha *= r, t._graphics &amp;&amp; t._graphics._render(t, e, i - s.pivotX, n - s.pivotY),
                            e.globalAlpha = a;
                    }
                }
            }, {
                key: "transform_drawLayaGL",
                value: function (e, i, n, r) {
                    var s = e._style;
                    i.saveTransform(t.curMat), i.transformByMatrix(e.transform, n, r), e._graphics &amp;&amp; e._graphics._render(e, i, -s.pivotX, -s.pivotY),
                        i.restoreTransform(t.curMat);
                }
            }, {
                key: "transform_drawNodes",
                value: function (e, i, n, r) {
                    var s = e._getBit(de.DRAWCALL_OPTIMIZE) &amp;&amp; i.drawCallOptimize(!0), a = e._style;
                    i.saveTransform(t.curMat), i.transformByMatrix(e.transform, n, r), n = -a.pivotX,
                        r = -a.pivotY;
                    var o, l = e._children, h = l.length;
                    if (a.viewport) {
                        var u, c, _ = a.viewport, d = _.x, f = _.y, v = _.right, p = _.bottom;
                        for (y = 0; y &lt; h; ++y) (o = l[y])._visible &amp;&amp; (u = o._x) &lt; v &amp;&amp; u + o.width &gt; d &amp;&amp; (c = o._y) &lt; p &amp;&amp; c + o.height &gt; f &amp;&amp; o.render(i, n, r);
                    } else for (var y = 0; y &lt; h; ++y) (o = l[y])._visible &amp;&amp; o.render(i, n, r);
                    i.restoreTransform(t.curMat), s &amp;&amp; i.drawCallOptimize(!1);
                }
            }, {
                key: "drawLayaGL_drawNodes",
                value: function (t, e, i, n) {
                    var r = t._getBit(de.DRAWCALL_OPTIMIZE) &amp;&amp; e.drawCallOptimize(!0), s = t._style;
                    i -= s.pivotX, n -= s.pivotY, t._graphics &amp;&amp; t._graphics._render(t, e, i, n);
                    var a, o = t._children, l = o.length;
                    if (s.viewport) {
                        var h, u, c = s.viewport, _ = c.x, d = c.y, f = c.right, v = c.bottom;
                        for (p = 0; p &lt; l; ++p) (a = o[p])._visible &amp;&amp; (h = a._x) &lt; f &amp;&amp; h + a.width &gt; _ &amp;&amp; (u = a._y) &lt; v &amp;&amp; u + a.height &gt; d &amp;&amp; a.render(e, i, n);
                    } else for (var p = 0; p &lt; l; ++p) (a = o[p])._visible &amp;&amp; a.render(e, i, n);
                    r &amp;&amp; e.drawCallOptimize(!1);
                }
            }]), t;
        }();
        fe.map = {}, fe.curMat = new f();
        var ve = function () {
            function t(e, i) {
                if (_classCallCheck(this, t), fe.map[e]) return this._fun = fe.map[e], void (this._next = t.NORENDER);
                switch (this._next = i || t.NORENDER, e) {
                    case 0:
                        return void (this._fun = this._no);

                    case se.ALPHA:
                        return void (this._fun = this._alpha);

                    case se.TRANSFORM:
                        return void (this._fun = this._transform);

                    case se.BLEND:
                        return void (this._fun = this._blend);

                    case se.CANVAS:
                        return void (this._fun = this._canvas);

                    case se.MASK:
                        return void (this._fun = this._mask);

                    case se.CLIP:
                        return void (this._fun = this._clip);

                    case se.STYLE:
                        return void (this._fun = this._style);

                    case se.GRAPHICS:
                        return void (this._fun = this._graphics);

                    case se.CHILDS:
                        return void (this._fun = this._children);

                    case se.CUSTOM:
                        return void (this._fun = this._custom);

                    case se.TEXTURE:
                        return void (this._fun = this._texture);

                    case se.FILTERS:
                        return void (this._fun = z._filter);

                    case t.INIT:
                        return void (this._fun = t._initRenderFun);
                }
                this.onCreate(e);
            }
            return _createClass(t, [{
                key: "onCreate",
                value: function (t) { }
            }, {
                key: "_style",
                value: function (t, e, i, n) {
                    var r = t._style;
                    null != r.render &amp;&amp; r.render(t, e, i, n);
                    var s = this._next;
                    s._fun.call(s, t, e, i, n);
                }
            }, {
                key: "_no",
                value: function (t, e, i, n) { }
            }, {
                key: "_custom",
                value: function (t, e, i, n) {
                    t.customRender(e, i, n), this._next._fun.call(this._next, t, e, i - t.pivotX, n - t.pivotY);
                }
            }, {
                key: "_clip",
                value: function (e, i, n, r) {
                    var s = this._next;
                    if (s != t.NORENDER) {
                        var a = e._style.scrollRect, o = a.width, l = a.height;
                        0 !== o &amp;&amp; 0 !== l &amp;&amp; (i.save(), i.clipRect(n, r, o, l), s._fun.call(s, e, i, n - a.x, r - a.y),
                            i.restore());
                    }
                }
            }, {
                key: "_texture",
                value: function (e, i, n, r) {
                    var s = e.texture;
                    s._getSource() &amp;&amp; i.drawTexture(s, n - e.pivotX + s.offsetX, r - e.pivotY + s.offsetY, e._width || s.width, e._height || s.height);
                    var a = this._next;
                    a != t.NORENDER &amp;&amp; a._fun.call(a, e, i, n, r);
                }
            }, {
                key: "_graphics",
                value: function (e, i, n, r) {
                    var s = e._style, a = e._graphics;
                    a &amp;&amp; a._render(e, i, n - s.pivotX, r - s.pivotY);
                    var o = this._next;
                    o != t.NORENDER &amp;&amp; o._fun.call(o, e, i, n, r);
                }
            }, {
                key: "_image",
                value: function (t, e, i, n) {
                    var r = t._style;
                    e.drawTexture2(i, n, r.pivotX, r.pivotY, t.transform, t._graphics._one);
                }
            }, {
                key: "_image2",
                value: function (t, e, i, n) {
                    var r = t._style;
                    e.drawTexture2(i, n, r.pivotX, r.pivotY, t.transform, t._graphics._one);
                }
            }, {
                key: "_alpha",
                value: function (t, e, i, n) {
                    var r;
                    if ((r = t._style.alpha) &gt; .01 || t._needRepaint()) {
                        var s = e.globalAlpha;
                        e.globalAlpha *= r;
                        var a = this._next;
                        a._fun.call(a, t, e, i, n), e.globalAlpha = s;
                    }
                }
            }, {
                key: "_transform",
                value: function (e, i, n, r) {
                    var s = e.transform, a = this._next;
                    e._style;
                    s &amp;&amp; a != t.NORENDER ? (i.save(), i.transform(s.a, s.b, s.c, s.d, s.tx + n, s.ty + r),
                        a._fun.call(a, e, i, 0, 0), i.restore()) : a != t.NORENDER &amp;&amp; a._fun.call(a, e, i, n, r);
                }
            }, {
                key: "_children",
                value: function (t, e, i, n) {
                    var r, s = t._style, a = t._children, o = a.length;
                    i -= t.pivotX, n -= t.pivotY;
                    var l = t._getBit(de.DRAWCALL_OPTIMIZE) &amp;&amp; e.drawCallOptimize(!0);
                    if (s.viewport) {
                        var h, u, c = s.viewport, _ = c.x, d = c.y, f = c.right, v = c.bottom;
                        for (p = 0; p &lt; o; ++p) (r = a[p])._visible &amp;&amp; (h = r._x) &lt; f &amp;&amp; h + r.width &gt; _ &amp;&amp; (u = r._y) &lt; v &amp;&amp; u + r.height &gt; d &amp;&amp; r.render(e, i, n);
                    } else for (var p = 0; p &lt; o; ++p) (r = a[p])._visible &amp;&amp; r.render(e, i, n);
                    l &amp;&amp; e.drawCallOptimize(!1);
                }
            }, {
                key: "_canvas",
                value: function (t, e, n, r) {
                    var s = t._cacheStyle, a = this._next;
                    if (s.enableCanvasRender) {
                        "bitmap" === s.cacheAs ? U.canvasBitmap++ : U.canvasNormal++;
                        var o = !1, l = !1;
                        if (s.canvas) {
                            var h = s.canvas, u = (h.context, h.touches);
                            if (u) for (var c = 0; c &lt; u.length; c++) if (u[c].deleted) {
                                l = !0;
                                break;
                            }
                            o = h.isCacheValid &amp;&amp; !h.isCacheValid();
                        }
                        if (t._needRepaint() || !s.canvas || l || o || i.stage.isGlobalRepaint()) if ("normal" === s.cacheAs) {
                            if (e._targets) return void a._fun.call(a, t, e, n, r);
                            this._canvas_webgl_normal_repaint(t, e);
                        } else this._canvas_repaint(t, e, n, r);
                        var _ = s.cacheRect;
                        e.drawCanvas(s.canvas, n + _.x, r + _.y, _.width, _.height);
                    } else a._fun.call(a, t, e, n, r);
                }
            }, {
                key: "_canvas_repaint",
                value: function (t, e, i, n) {
                    var r, s, a, o, l, h, u, c, _, d = t._cacheStyle, f = this._next, v = d.canvas, p = d.cacheAs;
                    if (u = (_ = d._calculateCacheRect(t, p, i, n)).x, c = _.y, l = (o = d.cacheRect).width * u,
                        h = o.height * c, s = o.x, a = o.y, "bitmap" === p &amp;&amp; (l &gt; 2048 || h &gt; 2048)) return console.warn("cache bitmap size larger than 2048,cache ignored"),
                            d.releaseContext(), void f._fun.call(f, t, e, i, n);
                    if (v || (d.createContext(), v = d.canvas), (r = v.context).sprite = t, (v.width != l || v.height != h) &amp;&amp; v.size(l, h),
                        "bitmap" === p ? r.asBitmap = !0 : "normal" === p &amp;&amp; (r.asBitmap = !1), r.clear(),
                        1 != u || 1 != c) {
                        var y = r;
                        y.save(), y.scale(u, c), f._fun.call(f, t, r, -s, -a), y.restore(), t._applyFilters();
                    } else y = r, f._fun.call(f, t, r, -s, -a), t._applyFilters();
                    d.staticCache &amp;&amp; (d.reCache = !1), U.canvasReCache++;
                }
            }, {
                key: "_canvas_webgl_normal_repaint",
                value: function (t, e) {
                    var i = t._cacheStyle, n = this._next, r = i.canvas, s = i.cacheAs;
                    i._calculateCacheRect(t, s, 0, 0), r || (r = i.canvas = new bt(e, t));
                    var a = r.context;
                    r.startRec(), n._fun.call(n, t, a, t.pivotX, t.pivotY), t._applyFilters(), U.canvasReCache++,
                        r.endRec();
                }
            }, {
                key: "_blend",
                value: function (t, e, i, n) {
                    var r = t._style, s = this._next;
                    r.blendMode ? (e.save(), e.globalCompositeOperation = r.blendMode, s._fun.call(s, t, e, i, n),
                        e.restore()) : s._fun.call(s, t, e, i, n);
                }
            }, {
                key: "_mask",
                value: function (e, i, n, r) {
                    var s = this._next, a = e.mask, o = i;
                    if (a) {
                        o.save();
                        var l = o.globalCompositeOperation, h = new p();
                        if (h.copyFrom(a.getBounds()), h.width = Math.round(h.width), h.height = Math.round(h.height),
                            h.x = Math.round(h.x), h.y = Math.round(h.y), h.width &gt; 0 &amp;&amp; h.height &gt; 0) {
                            var u = h.width, c = h.height, _ = O.getRT(u, c);
                            o.breakNextMerge(), o.pushRT(), o.addRenderObject(H.create([o, _, u, c], t.tmpTarget, this)),
                                a.render(o, -h.x, -h.y), o.breakNextMerge(), o.popRT(), o.save(), o.clipRect(n + h.x - e.getStyle().pivotX, r + h.y - e.getStyle().pivotY, u, c),
                                s._fun.call(s, e, o, n, r), o.restore(), l = o.globalCompositeOperation, o.addRenderObject(H.create(["mask"], t.setBlendMode, this));
                            var d = V.create(N.TEXTURE2D, 0), v = Wt.INV_UV;
                            o.drawTarget(_, n + h.x - e.getStyle().pivotX, r + h.y - e.getStyle().pivotY, u, c, f.TEMP.identity(), d, v, 6),
                                o.addRenderObject(H.create([_], t.recycleTarget, this)), o.addRenderObject(H.create([l], t.setBlendMode, this));
                        }
                        o.restore();
                    } else s._fun.call(s, e, i, n, r);
                }
            }], [{
                key: "__init__",
                value: function () {
                    var e, i, n;
                    for (fe.__init__(), n = new t(t.INIT, null), i = t.renders.length = 2 * se.CHILDS,
                        e = 0; e &lt; i; e++) t.renders[e] = n;
                    t.renders[0] = new t(0, null);
                }
            }, {
                key: "_initRenderFun",
                value: function (e, i, n, r) {
                    var s = e._renderType;
                    (t.renders[s] = t._getTypeRender(s))._fun(e, i, n, r);
                }
            }, {
                key: "_getTypeRender",
                value: function (e) {
                    if (fe.map[e]) return new t(e, null);
                    for (var i = null, n = se.CHILDS; n &gt; 0;) n &amp; e &amp;&amp; (i = new t(n, i)), n &gt;&gt;= 1;
                    return i;
                }
            }, {
                key: "tmpTarget",
                value: function (t, e, i, n) {
                    e.start(), e.clear(0, 0, 0, 0);
                }
            }, {
                key: "recycleTarget",
                value: function (t) {
                    O.releaseRT(t);
                }
            }, {
                key: "setBlendMode",
                value: function (t) {
                    var e = g.mainContext;
                    B.targetFns[B.TOINT[t]](e);
                }
            }]), t;
        }();
        ve.INIT = 69905, ve.renders = [], ve.NORENDER = new ve(0, null), ve.tempUV = new Array(8);
        var pe = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                var t, i = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] &amp;&amp; arguments[0];
                return _classCallCheck(this, n), (t = e.call(this))._source = i ? zt.createElement("canvas") : _assertThisInitialized(t),
                    t.lock = !0, t;
            }
            return _createClass(n, [{
                key: "_getSource",
                value: function () {
                    return this._source;
                }
            }, {
                key: "source",
                get: function () {
                    return this._source;
                }
            }]), _createClass(n, [{
                key: "clear",
                value: function () {
                    this._ctx &amp;&amp; (this._ctx.clear ? this._ctx.clear() : this._ctx.clearRect(0, 0, this._width, this._height)),
                        this._texture &amp;&amp; (this._texture.destroy(), this._texture = null);
                }
            }, {
                key: "destroy",
                value: function () {
                    _get(_getPrototypeOf(n.prototype), "destroy", this).call(this), this._setCPUMemory(0),
                        this._ctx &amp;&amp; this._ctx.destroy &amp;&amp; this._ctx.destroy(), this._ctx = null;
                }
            }, {
                key: "release",
                value: function () { }
            }, {
                key: "_setContext",
                value: function (t) {
                    this._ctx = t;
                }
            }, {
                key: "getContext",
                value: function (t) {
                    return this.context;
                }
            }, {
                key: "getMemSize",
                value: function () {
                    return 0;
                }
            }, {
                key: "size",
                value: function (t, e) {
                    (this._width != t || this._height != e || this._source &amp;&amp; (this._source.width != t || this._source.height != e)) &amp;&amp; (this._width = t,
                        this._height = e, this._setCPUMemory(t * e * 4), this._ctx &amp;&amp; this._ctx.size &amp;&amp; this._ctx.size(t, e),
                        this._source &amp;&amp; (this._source.height = e, this._source.width = t), this._texture &amp;&amp; (this._texture.destroy(),
                            this._texture = null));
                }
            }, {
                key: "getTexture",
                value: function () {
                    if (!this._texture) {
                        var t = new S();
                        t.loadImageSource(this.source), this._texture = new Wt(t);
                    }
                    return this._texture;
                }
            }, {
                key: "toBase64",
                value: function (t, e) {
                    if (this._source) {
                        if (i.Render.isConchApp) {
                            var n = window;
                            if (2 == n.conchConfig.threadMode) throw "native 2 thread mode use toBase64Async";
                            var r = this._ctx._targets.sourceWidth, s = this._ctx._targets.sourceHeight, a = this._ctx._targets.getData(0, 0, r, s);
                            return n.conchToBase64FlipY ? n.conchToBase64FlipY(t, e, a.buffer, r, s) : n.conchToBase64(t, e, a.buffer, r, s);
                        }
                        return this._source.toDataURL(t, e);
                    }
                    return null;
                }
            }, {
                key: "toBase64Async",
                value: function (t, e, i) {
                    var n = this._ctx._targets.sourceWidth, r = this._ctx._targets.sourceHeight;
                    this._ctx._targets.getDataAsync(0, 0, n, r, function (s) {
                        var a = window, o = a.conchToBase64FlipY ? a.conchToBase64FlipY(t, e, s.buffer, n, r) : a.conchToBase64(t, e, s.buffer, n, r);
                        i(o);
                    });
                }
            }, {
                key: "context",
                get: function () {
                    return this._ctx || (this._source == this ? this._ctx = new i.Context() : this._ctx = this._source.getContext(i.Render.isConchApp ? "layagl" : "2d"),
                        this._ctx._canvas = this), this._ctx;
                }
            }]), n;
        }(R), ye = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "contains",
                value: function (e, i) {
                    return !!t._isHitGraphic(e, i, this.hit) &amp;&amp; !t._isHitGraphic(e, i, this.unHit);
                }
            }, {
                key: "hit",
                get: function () {
                    return this._hit || (this._hit = new i.Graphics()), this._hit;
                },
                set: function (t) {
                    this._hit = t;
                }
            }, {
                key: "unHit",
                get: function () {
                    return this._unHit || (this._unHit = new i.Graphics()), this._unHit;
                },
                set: function (t) {
                    this._unHit = t;
                }
            }], [{
                key: "_isHitGraphic",
                value: function (e, i, n) {
                    if (!n) return !1;
                    var r, s, a, o = n.cmds;
                    if (!o &amp;&amp; n._one &amp;&amp; ((o = t._cmds).length = 1, o[0] = n._one), !o) return !1;
                    for (s = o.length, r = 0; r &lt; s; r++) if (a = o[r]) {
                        switch (a.cmdID) {
                            case "Translate":
                                e -= a.tx, i -= a.ty;
                        }
                        if (t._isHitCmd(e, i, a)) return !0;
                    }
                    return !1;
                }
            }, {
                key: "_isHitCmd",
                value: function (e, i, n) {
                    if (!n) return !1;
                    var r = !1;
                    switch (n.cmdID) {
                        case "DrawRect":
                            t._rect.setTo(n.x, n.y, n.width, n.height), r = t._rect.contains(e, i);
                            break;

                        case "DrawCircle":
                            r = (e -= n.x) * e + (i -= n.y) * i &lt; n.radius * n.radius;
                            break;

                        case "DrawPoly":
                            e -= n.x, i -= n.y, r = t._ptInPolygon(e, i, n.points);
                    }
                    return r;
                }
            }, {
                key: "_ptInPolygon",
                value: function (e, i, n) {
                    var r = t._ptPoint;
                    r.setTo(e, i);
                    var s, a, o, l, h, u = 0;
                    h = n.length;
                    for (var c = 0; c &lt; h; c += 2) {
                        if (s = n[c], a = n[c + 1], o = n[(c + 2) % h], a != (l = n[(c + 3) % h])) if (!(r.y &lt; Math.min(a, l))) if (!(r.y &gt;= Math.max(a, l))) (r.y - a) * (o - s) / (l - a) + s &gt; r.x &amp;&amp; u++;
                    }
                    return u % 2 == 1;
                }
            }]), t;
        }();
        ye._cmds = [], ye._rect = new p(), ye._ptPoint = new v();
        var ge = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "regClass",
                value: function (e, i) {
                    t._classMap[e] = i;
                }
            }, {
                key: "regShortClassName",
                value: function (e) {
                    for (var i = 0; i &lt; e.length; i++) {
                        var n = e[i], r = n.name;
                        t._classMap[r] = n;
                    }
                }
            }, {
                key: "getRegClass",
                value: function (e) {
                    return t._classMap[e];
                }
            }, {
                key: "getClass",
                value: function (e) {
                    var n = t._classMap[e] || t._classMap["Laya." + e] || e, r = i.Laya;
                    return "string" == typeof n ? i.__classMap[n] || r[e] : n;
                }
            }, {
                key: "getInstance",
                value: function (e) {
                    var i = t.getClass(e);
                    return i ? new i() : (console.warn("[error] Undefined class:", e), null);
                }
            }, {
                key: "createByJson",
                value: function (e) {
                    var i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, s = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null;
                    "string" == typeof e &amp;&amp; (e = JSON.parse(e));
                    var a = e.props;
                    if (!i &amp;&amp; !(i = s ? s.runWith(e) : t.getInstance(a.runtime || e.type))) return null;
                    var o = e.child;
                    if (o) for (var l = 0, h = o.length; l &lt; h; l++) {
                        var u = o[l];
                        if ("render" !== u.props.name &amp;&amp; "render" !== u.props.renderType || !i._$set_itemRender) if ("Graphic" == u.type) t._addGraphicsToSprite(u, i); else if (t._isDrawType(u.type)) t._addGraphicToSprite(u, i, !0); else {
                            var c = t.createByJson(u, null, n, r, s);
                            "Script" === u.type ? "owner" in c ? c.owner = i : "target" in c &amp;&amp; (c.target = i) : "mask" == u.props.renderType ? i.mask = c : i.addChild(c);
                        } else i.itemRender = u;
                    }
                    if (a) for (var _ in a) {
                        var d = a[_];
                        "var" === _ &amp;&amp; n ? n[d] = i : d instanceof Array &amp;&amp; i[_] instanceof Function ? i[_].apply(i, d) : i[_] = d;
                    }
                    return r &amp;&amp; e.customProps &amp;&amp; r.runWith([i, e]), i.created &amp;&amp; i.created(), i;
                }
            }, {
                key: "_addGraphicsToSprite",
                value: function (e, i) {
                    var n = e.child;
                    if (n &amp;&amp; !(n.length &lt; 1)) {
                        var r, s, a = t._getGraphicsFromSprite(e, i), o = 0, l = 0;
                        for (e.props &amp;&amp; (o = t._getObjVar(e.props, "x", 0), l = t._getObjVar(e.props, "y", 0)),
                            0 != o &amp;&amp; 0 != l &amp;&amp; a.translate(o, l), s = n.length, r = 0; r &lt; s; r++) t._addGraphicToGraphics(n[r], a);
                        0 != o &amp;&amp; 0 != l &amp;&amp; a.translate(-o, -l);
                    }
                }
            }, {
                key: "_addGraphicToSprite",
                value: function (e, i) {
                    var n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] &amp;&amp; arguments[2], r = n ? t._getGraphicsFromSprite(e, i) : i.graphics;
                    t._addGraphicToGraphics(e, r);
                }
            }, {
                key: "_getGraphicsFromSprite",
                value: function (t, e) {
                    if (!t || !t.props) return e.graphics;
                    var i = t.props.renderType;
                    if ("hit" === i || "unHit" === i) {
                        var n = e._style.hitArea || (e.hitArea = new ye());
                        n[i] || (n[i] = new _e());
                        var r = n[i];
                    }
                    return r || (r = e.graphics), r;
                }
            }, {
                key: "_getTransformData",
                value: function (e) {
                    var i;
                    ("pivotX" in e || "pivotY" in e) &amp;&amp; (i = i || new f()).translate(-t._getObjVar(e, "pivotX", 0), -t._getObjVar(e, "pivotY", 0));
                    var n = t._getObjVar(e, "scaleX", 1), r = t._getObjVar(e, "scaleY", 1), s = t._getObjVar(e, "rotation", 0);
                    t._getObjVar(e, "skewX", 0), t._getObjVar(e, "skewY", 0);
                    return 1 == n &amp;&amp; 1 == r &amp;&amp; 0 == s || ((i = i || new f()).scale(n, r), i.rotate(.0174532922222222 * s)),
                        i;
                }
            }, {
                key: "_addGraphicToGraphics",
                value: function (e, i) {
                    var n, r;
                    if ((n = e.props) &amp;&amp; (r = t.DrawTypeDic[e.type])) {
                        var s = i, a = t._getParams(n, r[1], r[2], r[3]), o = t._tM;
                        (o || 1 != t._alpha) &amp;&amp; (s.save(), o &amp;&amp; s.transform(o), 1 != t._alpha &amp;&amp; s.alpha(t._alpha)),
                            s[r[0]].apply(s, a), (o || 1 != t._alpha) &amp;&amp; s.restore();
                    }
                }
            }, {
                key: "_adptLineData",
                value: function (t) {
                    return t[2] = parseFloat(t[0]) + parseFloat(t[2]), t[3] = parseFloat(t[1]) + parseFloat(t[3]),
                        t;
                }
            }, {
                key: "_adptTextureData",
                value: function (t) {
                    return t[0] = i.Loader.getRes(t[0]), t;
                }
            }, {
                key: "_adptLinesData",
                value: function (e) {
                    return e[2] = t._getPointListByStr(e[2]), e;
                }
            }, {
                key: "_isDrawType",
                value: function (e) {
                    return "Image" !== e &amp;&amp; e in t.DrawTypeDic;
                }
            }, {
                key: "_getParams",
                value: function (e, i) {
                    var n, r, s, a = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0, o = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, l = t._temParam;
                    for (l.length = i.length, r = i.length, n = 0; n &lt; r; n++) l[n] = t._getObjVar(e, i[n][0], i[n][1]);
                    return t._alpha = t._getObjVar(e, "alpha", 1), (s = t._getTransformData(e)) ? (a || (a = 0),
                        s.translate(l[a], l[a + 1]), l[a] = l[a + 1] = 0, t._tM = s) : t._tM = null, o &amp;&amp; t[o] &amp;&amp; (l = t[o](l)),
                        l;
                }
            }, {
                key: "_getPointListByStr",
                value: function (t) {
                    var e, i, n = t.split(",");
                    for (i = n.length, e = 0; e &lt; i; e++) n[e] = parseFloat(n[e]);
                    return n;
                }
            }, {
                key: "_getObjVar",
                value: function (t, e, i) {
                    return e in t ? t[e] : i;
                }
            }]), t;
        }();
        ge.DrawTypeDic = {
            Rect: ["drawRect", [["x", 0], ["y", 0], ["width", 0], ["height", 0], ["fillColor", null], ["lineColor", null], ["lineWidth", 1]]],
            Circle: ["drawCircle", [["x", 0], ["y", 0], ["radius", 0], ["fillColor", null], ["lineColor", null], ["lineWidth", 1]]],
            Pie: ["drawPie", [["x", 0], ["y", 0], ["radius", 0], ["startAngle", 0], ["endAngle", 0], ["fillColor", null], ["lineColor", null], ["lineWidth", 1]]],
            Image: ["drawTexture", [["x", 0], ["y", 0], ["width", 0], ["height", 0]]],
            Texture: ["drawTexture", [["skin", null], ["x", 0], ["y", 0], ["width", 0], ["height", 0]], 1, "_adptTextureData"],
            FillTexture: ["fillTexture", [["skin", null], ["x", 0], ["y", 0], ["width", 0], ["height", 0], ["repeat", null]], 1, "_adptTextureData"],
            FillText: ["fillText", [["text", ""], ["x", 0], ["y", 0], ["font", null], ["color", null], ["textAlign", null]], 1],
            Line: ["drawLine", [["x", 0], ["y", 0], ["toX", 0], ["toY", 0], ["lineColor", null], ["lineWidth", 0]], 0, "_adptLineData"],
            Lines: ["drawLines", [["x", 0], ["y", 0], ["points", ""], ["lineColor", null], ["lineWidth", 0]], 0, "_adptLinesData"],
            Curves: ["drawCurves", [["x", 0], ["y", 0], ["points", ""], ["lineColor", null], ["lineWidth", 0]], 0, "_adptLinesData"],
            Poly: ["drawPoly", [["x", 0], ["y", 0], ["points", ""], ["fillColor", null], ["lineColor", null], ["lineWidth", 1]], 0, "_adptLinesData"]
        }, ge._temParam = [], ge._classMap = {};
        var me = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "reset",
                value: function () {
                    return this.bounds &amp;&amp; this.bounds.recover(), this.userBounds &amp;&amp; this.userBounds.recover(),
                        this.bounds = null, this.userBounds = null, this.temBM = null, this;
                }
            }, {
                key: "recover",
                value: function () {
                    n.recover("BoundsStyle", this.reset());
                }
            }], [{
                key: "create",
                value: function () {
                    return n.getItemByClass("BoundsStyle", t);
                }
            }]), t;
        }(), Te = function () {
            function t() {
                _classCallCheck(this, t), this.reset();
            }
            return _createClass(t, [{
                key: "needBitmapCache",
                value: function () {
                    return this.cacheForFilters || !!this.mask;
                }
            }, {
                key: "needEnableCanvasRender",
                value: function () {
                    return "none" != this.userSetCache || this.cacheForFilters || !!this.mask;
                }
            }, {
                key: "releaseContext",
                value: function () {
                    if (this.canvas &amp;&amp; this.canvas.size) {
                        n.recover("CacheCanvas", this.canvas), this.canvas.size(0, 0);
                        try {
                            this.canvas.width = 0, this.canvas.height = 0;
                        } catch (t) { }
                    }
                    this.canvas = null;
                }
            }, {
                key: "createContext",
                value: function () {
                    if (!this.canvas) {
                        this.canvas = n.getItem("CacheCanvas") || new pe(!1);
                        var t = this.canvas.context;
                        t || (t = this.canvas.getContext("2d"));
                    }
                }
            }, {
                key: "releaseFilterCache",
                value: function () {
                    var t = this.filterCache;
                    t &amp;&amp; (t.destroy(), t.recycle(), this.filterCache = null);
                }
            }, {
                key: "recover",
                value: function () {
                    this !== t.EMPTY &amp;&amp; n.recover("SpriteCache", this.reset());
                }
            }, {
                key: "reset",
                value: function () {
                    return this.releaseContext(), this.releaseFilterCache(), this.cacheAs = "none",
                        this.enableCanvasRender = !1, this.userSetCache = "none", this.cacheForFilters = !1,
                        this.staticCache = !1, this.reCache = !0, this.mask = null, this.maskParent = null,
                        this.filterCache = null, this.filters = null, this.hasGlowFilter = !1, this.cacheRect &amp;&amp; this.cacheRect.recover(),
                        this.cacheRect = null, this;
                }
            }, {
                key: "_calculateCacheRect",
                value: function (e, i, n, r) {
                    var s, a = e._cacheStyle;
                    if (a.cacheRect || (a.cacheRect = p.create()), "bitmap" === i ? ((s = e.getSelfBounds()).width = s.width + 2 * t.CANVAS_EXTEND_EDGE,
                        s.height = s.height + 2 * t.CANVAS_EXTEND_EDGE, s.x = s.x - e.pivotX, s.y = s.y - e.pivotY,
                        s.x = s.x - t.CANVAS_EXTEND_EDGE, s.y = s.y - t.CANVAS_EXTEND_EDGE, s.x = Math.floor(s.x + n) - n,
                        s.y = Math.floor(s.y + r) - r, s.width = Math.floor(s.width), s.height = Math.floor(s.height),
                        a.cacheRect.copyFrom(s)) : a.cacheRect.setTo(-e._style.pivotX, -e._style.pivotY, 1, 1),
                        s = a.cacheRect, e._style.scrollRect) {
                        var o = e._style.scrollRect;
                        s.x -= o.x, s.y -= o.y;
                    }
                    return t._scaleInfo.setTo(1, 1), t._scaleInfo;
                }
            }], [{
                key: "create",
                value: function () {
                    return n.getItemByClass("SpriteCache", t);
                }
            }]), t;
        }();
        Te.EMPTY = new Te(), Te._scaleInfo = new v(), Te.CANVAS_EXTEND_EDGE = 16;
        var ke = function () {
            function t() {
                _classCallCheck(this, t), this.reset();
            }
            return _createClass(t, [{
                key: "reset",
                value: function () {
                    return this.scaleX = this.scaleY = 1, this.skewX = this.skewY = 0, this.pivotX = this.pivotY = this.rotation = 0,
                        this.alpha = 1, this.scrollRect &amp;&amp; this.scrollRect.recover(), this.scrollRect = null,
                        this.viewport &amp;&amp; this.viewport.recover(), this.viewport = null, this.hitArea = null,
                        this.dragging = null, this.blendMode = null, this;
                }
            }, {
                key: "recover",
                value: function () {
                    this !== t.EMPTY &amp;&amp; n.recover("SpriteStyle", this.reset());
                }
            }], [{
                key: "create",
                value: function () {
                    return n.getItemByClass("SpriteStyle", t);
                }
            }]), t;
        }();
        ke.EMPTY = new ke();
        var xe = function (t) {
            _inherits(r, t);
            var e = _createSuper(r);
            function r() {
                var t;
                return _classCallCheck(this, r), (t = e.call(this))._bits = 0, t._children = r.ARRAY_EMPTY,
                    t._extUIChild = r.ARRAY_EMPTY, t._parent = null, t.name = "", t.destroyed = !1,
                    t.createGLBuffer(), t;
            }
            return _createClass(r, [{
                key: "createGLBuffer",
                value: function () { }
            }, {
                key: "_setBit",
                value: function (t, e) {
                    t === de.DISPLAY &amp;&amp; (this._getBit(t) != e &amp;&amp; this._updateDisplayedInstage());
                    e ? this._bits |= t : this._bits &amp;= ~t;
                }
            }, {
                key: "_getBit",
                value: function (t) {
                    return 0 != (this._bits &amp; t);
                }
            }, {
                key: "_setUpNoticeChain",
                value: function () {
                    this._getBit(de.DISPLAY) &amp;&amp; this._setBitUp(de.DISPLAY);
                }
            }, {
                key: "_setBitUp",
                value: function (t) {
                    var e = this;
                    for (e._setBit(t, !0), e = e._parent; e;) {
                        if (e._getBit(t)) return;
                        e._setBit(t, !0), e = e._parent;
                    }
                }
            }, {
                key: "on",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null;
                    return t !== Gt.DISPLAY &amp;&amp; t !== Gt.UNDISPLAY || this._getBit(de.DISPLAY) || this._setBitUp(de.DISPLAY),
                        this._createListener(t, e, i, n, !1);
                }
            }, {
                key: "once",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null;
                    return t !== Gt.DISPLAY &amp;&amp; t !== Gt.UNDISPLAY || this._getBit(de.DISPLAY) || this._setBitUp(de.DISPLAY),
                        this._createListener(t, e, i, n, !0);
                }
            }, {
                key: "destroy",
                value: function () {
                    var t = !(arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0]) || arguments[0];
                    this.destroyed = !0, this._destroyAllComponent(), this._parent &amp;&amp; this._parent.removeChild(this),
                        this._children &amp;&amp; (t ? this.destroyChildren() : this.removeChildren()), this.onDestroy(),
                        this._children = null, this.offAll();
                }
            }, {
                key: "onDestroy",
                value: function () { }
            }, {
                key: "destroyChildren",
                value: function () {
                    if (this._children) for (var t = 0, e = this._children.length; t &lt; e; t++) this._children[0].destroy(!0);
                }
            }, {
                key: "addChild",
                value: function (t) {
                    if (!t || this.destroyed || t === this) return t;
                    if (t._zOrder &amp;&amp; this._setBit(de.HAS_ZORDER, !0), t._parent === this) {
                        var e = this.getChildIndex(t);
                        e !== this._children.length - 1 &amp;&amp; (this._children.splice(e, 1), this._children.push(t),
                            this._childChanged());
                    } else t._parent &amp;&amp; t._parent.removeChild(t), this._children === r.ARRAY_EMPTY &amp;&amp; (this._children = []),
                        this._children.push(t), t._setParent(this), this._childChanged();
                    return t;
                }
            }, {
                key: "addInputChild",
                value: function (t) {
                    if (this._extUIChild == r.ARRAY_EMPTY) this._extUIChild = [t]; else {
                        if (this._extUIChild.indexOf(t) &gt;= 0) return null;
                        this._extUIChild.push(t);
                    }
                    return null;
                }
            }, {
                key: "removeInputChild",
                value: function (t) {
                    var e = this._extUIChild.indexOf(t);
                    e &gt;= 0 &amp;&amp; this._extUIChild.splice(e, 1);
                }
            }, {
                key: "addChildren",
                value: function () {
                    for (var t = 0, e = arguments.length; t &lt; e;) {
                        var i;
                        this.addChild((i = t++) &lt; 0 || arguments.length &lt;= i ? void 0 : arguments[i]);
                    }
                }
            }, {
                key: "addChildAt",
                value: function (t, e) {
                    if (!t || this.destroyed || t === this) return t;
                    if (t._zOrder &amp;&amp; this._setBit(de.HAS_ZORDER, !0), e &gt;= 0 &amp;&amp; e &lt;= this._children.length) {
                        if (t._parent === this) {
                            var i = this.getChildIndex(t);
                            this._children.splice(i, 1), this._children.splice(e, 0, t), this._childChanged();
                        } else t._parent &amp;&amp; t._parent.removeChild(t), this._children === r.ARRAY_EMPTY &amp;&amp; (this._children = []),
                            this._children.splice(e, 0, t), t._setParent(this);
                        return t;
                    }
                    throw new Error("appendChildAt:The index is out of bounds");
                }
            }, {
                key: "getChildIndex",
                value: function (t) {
                    return this._children.indexOf(t);
                }
            }, {
                key: "getChildByName",
                value: function (t) {
                    var e = this._children;
                    if (e) for (var i = 0, n = e.length; i &lt; n; i++) {
                        var r = e[i];
                        if (r.name === t) return r;
                    }
                    return null;
                }
            }, {
                key: "getChildAt",
                value: function (t) {
                    return this._children[t] || null;
                }
            }, {
                key: "setChildIndex",
                value: function (t, e) {
                    var i = this._children;
                    if (e &lt; 0 || e &gt;= i.length) throw new Error("setChildIndex:The index is out of bounds.");
                    var n = this.getChildIndex(t);
                    if (n &lt; 0) throw new Error("setChildIndex:node is must child of this object.");
                    return i.splice(n, 1), i.splice(e, 0, t), this._childChanged(), t;
                }
            }, {
                key: "_childChanged",
                value: function () { }
            }, {
                key: "removeChild",
                value: function (t) {
                    if (!this._children) return t;
                    var e = this._children.indexOf(t);
                    return this.removeChildAt(e);
                }
            }, {
                key: "removeSelf",
                value: function () {
                    return this._parent &amp;&amp; this._parent.removeChild(this), this;
                }
            }, {
                key: "removeChildByName",
                value: function (t) {
                    var e = this.getChildByName(t);
                    return e &amp;&amp; this.removeChild(e), e;
                }
            }, {
                key: "removeChildAt",
                value: function (t) {
                    var e = this.getChildAt(t);
                    return e &amp;&amp; (this._children.splice(t, 1), e._setParent(null)), e;
                }
            }, {
                key: "removeChildren",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 2147483647;
                    if (this._children &amp;&amp; this._children.length &gt; 0) {
                        var i = this._children;
                        if (0 === t &amp;&amp; e &gt;= i.length - 1) {
                            var n = i;
                            this._children = r.ARRAY_EMPTY;
                        } else n = i.splice(t, e - t);
                        for (var s = 0, a = n.length; s &lt; a; s++) n[s]._setParent(null);
                    }
                    return this;
                }
            }, {
                key: "replaceChild",
                value: function (t, e) {
                    var i = this._children.indexOf(e);
                    return i &gt; -1 ? (this._children.splice(i, 1, t), e._setParent(null), t._setParent(this),
                        t) : null;
                }
            }, {
                key: "_setParent",
                value: function (t) {
                    this._parent !== t &amp;&amp; (t ? (this._parent = t, this._onAdded(), this.event(Gt.ADDED),
                        this._getBit(de.DISPLAY) &amp;&amp; (this._setUpNoticeChain(), t.displayedInStage &amp;&amp; this._displayChild(this, !0)),
                        t._childChanged(this)) : (this._onRemoved(), this.event(Gt.REMOVED), this._parent._childChanged(),
                            this._getBit(de.DISPLAY) &amp;&amp; this._displayChild(this, !1), this._parent = t));
                }
            }, {
                key: "_updateDisplayedInstage",
                value: function () {
                    var t;
                    t = this;
                    for (var e = i.stage, n = !1; t;) {
                        if (t._getBit(de.DISPLAY)) {
                            n = t._getBit(de.DISPLAYED_INSTAGE);
                            break;
                        }
                        if (t === e || t._getBit(de.DISPLAYED_INSTAGE)) {
                            n = !0;
                            break;
                        }
                        t = t._parent;
                    }
                    this._setBit(de.DISPLAYED_INSTAGE, n);
                }
            }, {
                key: "_setDisplay",
                value: function (t) {
                    this._getBit(de.DISPLAYED_INSTAGE) !== t &amp;&amp; (this._setBit(de.DISPLAYED_INSTAGE, t),
                        t ? this.event(Gt.DISPLAY) : this.event(Gt.UNDISPLAY));
                }
            }, {
                key: "_displayChild",
                value: function (t, e) {
                    var i = t._children;
                    if (i) for (var n = 0, r = i.length; n &lt; r; n++) {
                        var s = i[n];
                        s._getBit(de.DISPLAY) &amp;&amp; (s._children.length &gt; 0 ? this._displayChild(s, e) : s._setDisplay(e));
                    }
                    t._setDisplay(e);
                }
            }, {
                key: "contains",
                value: function (t) {
                    if (t === this) return !0;
                    for (; t;) {
                        if (t._parent === this) return !0;
                        t = t._parent;
                    }
                    return !1;
                }
            }, {
                key: "timerLoop",
                value: function (t, e, n) {
                    var r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, s = !(arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4]) || arguments[4], a = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] &amp;&amp; arguments[5], o = this.scene ? this.scene.timer : i.timer;
                    o.loop(t, e, n, r, s, a);
                }
            }, {
                key: "timerOnce",
                value: function (t, e, n) {
                    var r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, s = !(arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4]) || arguments[4], a = this.scene ? this.scene.timer : i.timer;
                    a._create(!1, !1, t, e, n, r, s);
                }
            }, {
                key: "frameLoop",
                value: function (t, e, n) {
                    var r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, s = !(arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4]) || arguments[4], a = this.scene ? this.scene.timer : i.timer;
                    a._create(!0, !0, t, e, n, r, s);
                }
            }, {
                key: "frameOnce",
                value: function (t, e, n) {
                    var r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, s = !(arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4]) || arguments[4], a = this.scene ? this.scene.timer : i.timer;
                    a._create(!0, !1, t, e, n, r, s);
                }
            }, {
                key: "clearTimer",
                value: function (t, e) {
                    (this.scene ? this.scene.timer : i.timer).clear(t, e);
                }
            }, {
                key: "callLater",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, n = this.scene ? this.scene.timer : i.timer;
                    n.callLater(this, t, e);
                }
            }, {
                key: "runCallLater",
                value: function (t) {
                    (this.scene ? this.scene.timer : i.timer).runCallLater(this, t);
                }
            }, {
                key: "_onActive",
                value: function () {
                    U.spriteCount++;
                }
            }, {
                key: "_onInActive",
                value: function () {
                    U.spriteCount--;
                }
            }, {
                key: "_onActiveInScene",
                value: function () { }
            }, {
                key: "_onInActiveInScene",
                value: function () { }
            }, {
                key: "_parse",
                value: function (t, e) { }
            }, {
                key: "_setBelongScene",
                value: function (t) {
                    if (!this._scene) {
                        this._scene = t, this._onActiveInScene();
                        for (var e = 0, i = this._children.length; e &lt; i; e++) this._children[e]._setBelongScene(t);
                    }
                }
            }, {
                key: "_setUnBelongScene",
                value: function () {
                    if (this._scene !== this) {
                        this._onInActiveInScene(), this._scene = null;
                        for (var t = 0, e = this._children.length; t &lt; e; t++) this._children[t]._setUnBelongScene();
                    }
                }
            }, {
                key: "onAwake",
                value: function () { }
            }, {
                key: "onEnable",
                value: function () { }
            }, {
                key: "_processActive",
                value: function () {
                    this._activeChangeScripts || (this._activeChangeScripts = []), this._activeHierarchy(this._activeChangeScripts),
                        this._activeScripts();
                }
            }, {
                key: "_activeHierarchy",
                value: function (t) {
                    if (this._setBit(de.ACTIVE_INHIERARCHY, !0), this._components) for (var e = 0, i = this._components.length; e &lt; i; e++) {
                        var n = this._components[e];
                        n._isScript() ? n._enabled &amp;&amp; t.push(n) : n._setActive(!0);
                    }
                    for (this._onActive(), e = 0, i = this._children.length; e &lt; i; e++) {
                        var r = this._children[e];
                        !r._getBit(de.NOT_ACTIVE) &amp;&amp; r._activeHierarchy(t);
                    }
                    this._getBit(de.AWAKED) || (this._setBit(de.AWAKED, !0), this.onAwake()), this.onEnable();
                }
            }, {
                key: "_activeScripts",
                value: function () {
                    for (var t = 0, e = this._activeChangeScripts.length; t &lt; e; t++) {
                        var i = this._activeChangeScripts[t];
                        i._awaked || (i._awaked = !0, i._onAwake()), i._onEnable();
                    }
                    this._activeChangeScripts.length = 0;
                }
            }, {
                key: "_processInActive",
                value: function () {
                    this._activeChangeScripts || (this._activeChangeScripts = []), this._inActiveHierarchy(this._activeChangeScripts),
                        this._inActiveScripts();
                }
            }, {
                key: "_inActiveHierarchy",
                value: function (t) {
                    if (this._onInActive(), this._components) for (var e = 0, i = this._components.length; e &lt; i; e++) {
                        var n = this._components[e];
                        n._setActive(!1), n._isScript() &amp;&amp; n._enabled &amp;&amp; t.push(n);
                    }
                    for (this._setBit(de.ACTIVE_INHIERARCHY, !1), e = 0, i = this._children.length; e &lt; i; e++) {
                        var r = this._children[e];
                        r &amp;&amp; !r._getBit(de.NOT_ACTIVE) &amp;&amp; r._inActiveHierarchy(t);
                    }
                    this.onDisable();
                }
            }, {
                key: "_inActiveScripts",
                value: function () {
                    for (var t = 0, e = this._activeChangeScripts.length; t &lt; e; t++) this._activeChangeScripts[t].onDisable();
                    this._activeChangeScripts.length = 0;
                }
            }, {
                key: "onDisable",
                value: function () { }
            }, {
                key: "_onAdded",
                value: function () {
                    if (this._activeChangeScripts &amp;&amp; 0 !== this._activeChangeScripts.length) throw "Node: can't set the main inActive node active in hierarchy,if the operate is in main inActive node or it's children script's onDisable Event.";
                    var t = this._parent.scene;
                    t &amp;&amp; this._setBelongScene(t), this._parent.activeInHierarchy &amp;&amp; this.active &amp;&amp; this._processActive();
                }
            }, {
                key: "_onRemoved",
                value: function () {
                    if (this._activeChangeScripts &amp;&amp; 0 !== this._activeChangeScripts.length) throw "Node: can't set the main active node inActive in hierarchy,if the operate is in main active node or it's children script's onEnable Event.";
                    this._parent.activeInHierarchy &amp;&amp; this.active &amp;&amp; this._processInActive(), this._parent.scene &amp;&amp; this._setUnBelongScene();
                }
            }, {
                key: "_addComponentInstance",
                value: function (t) {
                    this._components = this._components || [], this._components.push(t), t.owner = this,
                        t._onAdded(), this.activeInHierarchy &amp;&amp; t._setActive(!0);
                }
            }, {
                key: "_destroyComponent",
                value: function (t) {
                    if (this._components) for (var e = 0, i = this._components.length; e &lt; i; e++) {
                        var n = this._components[e];
                        if (n === t) {
                            n._destroy(), this._components.splice(e, 1);
                            break;
                        }
                    }
                }
            }, {
                key: "_destroyAllComponent",
                value: function () {
                    if (this._components) for (; this._components.length &gt; 0;) {
                        var t = this._components.pop();
                        t &amp;&amp; t._destroy();
                    }
                }
            }, {
                key: "_cloneTo",
                value: function (t, e, i) {
                    var n = t;
                    if (this._components) for (var r = 0, s = this._components.length; r &lt; s; r++) {
                        var a = n.addComponent(this._components[r].constructor);
                        this._components[r]._cloneTo(a);
                    }
                }
            }, {
                key: "addComponentIntance",
                value: function (t) {
                    if (t.owner) throw "Node:the component has belong to other node.";
                    if (t.isSingleton &amp;&amp; this.getComponent(t.constructor)) throw "Node:the component is singleton,can't add the second one.";
                    return this._addComponentInstance(t), t;
                }
            }, {
                key: "addComponent",
                value: function (t) {
                    var e = n.createByClass(t);
                    if (e._destroyed = !1, e.isSingleton &amp;&amp; this.getComponent(t)) throw "æ—&nbsp;æ³•å®žä¾‹" + t + "ç»„ä»¶ï¼Œ" + t + "ç»„ä»¶å·²å­˜åœ¨ï¼";
                    return this._addComponentInstance(e), e;
                }
            }, {
                key: "getComponent",
                value: function (t) {
                    if (this._components) for (var e = 0, i = this._components.length; e &lt; i; e++) {
                        var n = this._components[e];
                        if (n instanceof t) return n;
                    }
                    return null;
                }
            }, {
                key: "getComponents",
                value: function (t) {
                    var e;
                    if (this._components) for (var i = 0, n = this._components.length; i &lt; n; i++) {
                        var r = this._components[i];
                        r instanceof t &amp;&amp; (e = e || []).push(r);
                    }
                    return e;
                }
            }, {
                key: "numChildren",
                get: function () {
                    return this._children.length;
                }
            }, {
                key: "parent",
                get: function () {
                    return this._parent;
                }
            }, {
                key: "displayedInStage",
                get: function () {
                    return this._getBit(de.DISPLAY) || this._setBitUp(de.DISPLAY), this._getBit(de.DISPLAYED_INSTAGE);
                }
            }, {
                key: "scene",
                get: function () {
                    return this._scene;
                }
            }, {
                key: "active",
                get: function () {
                    return !this._getBit(de.NOT_READY) &amp;&amp; !this._getBit(de.NOT_ACTIVE);
                },
                set: function (t) {
                    if (t = !!t, !this._getBit(de.NOT_ACTIVE) !== t) {
                        if (this._activeChangeScripts &amp;&amp; 0 !== this._activeChangeScripts.length) throw t ? "Node: can't set the main inActive node active in hierarchy,if the operate is in main inActive node or it's children script's onDisable Event." : "Node: can't set the main active node inActive in hierarchy,if the operate is in main active node or it's children script's onEnable Event.";
                        this._setBit(de.NOT_ACTIVE, !t), this._parent &amp;&amp; this._parent.activeInHierarchy &amp;&amp; (t ? this._processActive() : this._processInActive());
                    }
                }
            }, {
                key: "activeInHierarchy",
                get: function () {
                    return this._getBit(de.ACTIVE_INHIERARCHY);
                }
            }, {
                key: "timer",
                get: function () {
                    return this.scene ? this.scene.timer : i.timer;
                }
            }]), r;
        }(T);
        xe.ARRAY_EMPTY = [], ge.regClass("laya.display.Node", xe), ge.regClass("Laya.Node", xe);
        var Ce = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                var t;
                return _classCallCheck(this, n), (t = e.call(this))._x = 0, t._y = 0, t._width = 0,
                    t._height = 0, t._visible = !0, t._mouseState = 0, t._zOrder = 0, t._renderType = 0,
                    t._transform = null, t._tfChanged = !1, t._repaint = se.REPAINT_NONE, t._texture = null,
                    t._style = ke.EMPTY, t._cacheStyle = Te.EMPTY, t._boundStyle = null, t._graphics = null,
                    t.mouseThrough = !1, t.autoSize = !1, t.hitTestPrior = !1, t;
            }
            return _createClass(n, [{
                key: "destroy",
                value: function () {
                    var t = !(arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0]) || arguments[0];
                    _get(_getPrototypeOf(n.prototype), "destroy", this).call(this, t), this._style &amp;&amp; this._style.recover(),
                        this._cacheStyle &amp;&amp; this._cacheStyle.recover(), this._boundStyle &amp;&amp; this._boundStyle.recover(),
                        this._style = null, this._cacheStyle = null, this._boundStyle = null, this._transform = null,
                        this._graphics &amp;&amp; this._graphics.autoDestroy &amp;&amp; this._graphics.destroy(), this._graphics = null,
                        this.texture = null;
                }
            }, {
                key: "updateZOrder",
                value: function () {
                    K.updateOrder(this._children) &amp;&amp; this.repaint();
                }
            }, {
                key: "_getBoundsStyle",
                value: function () {
                    return this._boundStyle || (this._boundStyle = me.create()), this._boundStyle;
                }
            }, {
                key: "_setCustomRender",
                value: function () { }
            }, {
                key: "_setCacheAs",
                value: function (t) { }
            }, {
                key: "_checkCanvasEnable",
                value: function () {
                    var t = this._cacheStyle.needEnableCanvasRender();
                    this._getCacheStyle().enableCanvasRender = t, t ? (this._cacheStyle.needBitmapCache() ? this._cacheStyle.cacheAs = "bitmap" : this._cacheStyle.cacheAs = this._cacheStyle.userSetCache,
                        this._cacheStyle.reCache = !0, this._renderType |= se.CANVAS) : (this._cacheStyle.cacheAs = "none",
                            this._cacheStyle.releaseContext(), this._renderType &amp;= ~se.CANVAS), this._setCacheAs(this._cacheStyle.cacheAs),
                        this._setRenderType(this._renderType);
                }
            }, {
                key: "reCache",
                value: function () {
                    this._cacheStyle.reCache = !0, this._repaint |= se.REPAINT_CACHE;
                }
            }, {
                key: "getRepaint",
                value: function () {
                    return this._repaint;
                }
            }, {
                key: "_setX",
                value: function (t) {
                    this._x = t;
                }
            }, {
                key: "_setY",
                value: function (t) {
                    this._y = t;
                }
            }, {
                key: "_setWidth",
                value: function (t, e) { }
            }, {
                key: "_setHeight",
                value: function (t, e) { }
            }, {
                key: "set_width",
                value: function (t) {
                    this._width !== t &amp;&amp; (this._width = t, this._setWidth(this.texture, t), this._setTranformChange());
                }
            }, {
                key: "get_width",
                value: function () {
                    return this.autoSize ? this.texture ? this.texture.width : this._graphics || 0 !== this._children.length ? this.getSelfBounds().width : 0 : this._width || (this.texture ? this.texture.width : 0);
                }
            }, {
                key: "set_height",
                value: function (t) {
                    this._height !== t &amp;&amp; (this._height = t, this._setHeight(this.texture, t), this._setTranformChange());
                }
            }, {
                key: "get_height",
                value: function () {
                    return this.autoSize ? this.texture ? this.texture.height : this._graphics || 0 !== this._children.length ? this.getSelfBounds().height : 0 : this._height || (this.texture ? this.texture.height : 0);
                }
            }, {
                key: "setSelfBounds",
                value: function (t) {
                    this._getBoundsStyle().userBounds = t;
                }
            }, {
                key: "getBounds",
                value: function () {
                    return this._getBoundsStyle().bounds = p._getWrapRec(this._boundPointsToParent());
                }
            }, {
                key: "getSelfBounds",
                value: function () {
                    return this._boundStyle &amp;&amp; this._boundStyle.userBounds ? this._boundStyle.userBounds : this._graphics || 0 !== this._children.length || this._texture ? this._getBoundsStyle().bounds = p._getWrapRec(this._getBoundPointsM(!1)) : p.TEMP.setTo(0, 0, this.width, this.height);
                }
            }, {
                key: "_boundPointsToParent",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] &amp;&amp; arguments[0], e = 0, i = 0;
                    this._style &amp;&amp; (e = this.pivotX, i = this.pivotY, t = t || 0 !== this._style.rotation,
                        this._style.scrollRect &amp;&amp; (e += this._style.scrollRect.x, i += this._style.scrollRect.y));
                    var n = this._getBoundPointsM(t);
                    if (!n || n.length &lt; 1) return n;
                    if (8 != n.length &amp;&amp; (n = t ? rt.scanPList(n) : p._getWrapRec(n, p.TEMP)._getBoundPoints()),
                        !this.transform) return K.transPointList(n, this._x - e, this._y - i), n;
                    var r, s = v.TEMP, a = n.length;
                    for (r = 0; r &lt; a; r += 2) s.x = n[r], s.y = n[r + 1], this.toParentPoint(s), n[r] = s.x,
                        n[r + 1] = s.y;
                    return n;
                }
            }, {
                key: "getGraphicBounds",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] &amp;&amp; arguments[0];
                    return this._graphics ? this._graphics.getBounds(t) : p.TEMP.setTo(0, 0, 0, 0);
                }
            }, {
                key: "_getBoundPointsM",
                value: function () {
                    var t, e, i, r, s = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] &amp;&amp; arguments[0];
                    if (this._boundStyle &amp;&amp; this._boundStyle.userBounds) return this._boundStyle.userBounds._getBoundPoints();
                    if (this._boundStyle || this._getBoundsStyle(), this._boundStyle.temBM || (this._boundStyle.temBM = []),
                        this._style.scrollRect) {
                        var a = K.clearArray(this._boundStyle.temBM), o = p.TEMP;
                        return o.copyFrom(this._style.scrollRect), K.concatArray(a, o._getBoundPoints()),
                            a;
                    }
                    this._graphics ? t = this._graphics.getBoundPoints() : (t = K.clearArray(this._boundStyle.temBM),
                        this._texture &amp;&amp; ((o = p.TEMP).setTo(0, 0, this.width || this._texture.width, this.height || this._texture.height),
                            K.concatArray(t, o._getBoundPoints())));
                    for (var l = 0, h = (r = this._children).length; l &lt; h; l++) (e = r[l]) instanceof n &amp;&amp; !0 === e._visible &amp;&amp; (i = e._boundPointsToParent(s)) &amp;&amp; (t = t ? K.concatArray(t, i) : i);
                    return t;
                }
            }, {
                key: "_getCacheStyle",
                value: function () {
                    return this._cacheStyle === Te.EMPTY &amp;&amp; (this._cacheStyle = Te.create()), this._cacheStyle;
                }
            }, {
                key: "getStyle",
                value: function () {
                    return this._style === ke.EMPTY &amp;&amp; (this._style = ke.create()), this._style;
                }
            }, {
                key: "setStyle",
                value: function (t) {
                    this._style = t;
                }
            }, {
                key: "_setScaleX",
                value: function (t) {
                    this._style.scaleX = t;
                }
            }, {
                key: "_setScaleY",
                value: function (t) {
                    this._style.scaleY = t;
                }
            }, {
                key: "set_scaleX",
                value: function (t) {
                    this.getStyle().scaleX !== t &amp;&amp; (this._setScaleX(t), this._setTranformChange());
                }
            }, {
                key: "get_scaleX",
                value: function () {
                    return this._style.scaleX;
                }
            }, {
                key: "set_scaleY",
                value: function (t) {
                    this.getStyle().scaleY !== t &amp;&amp; (this._setScaleY(t), this._setTranformChange());
                }
            }, {
                key: "get_scaleY",
                value: function () {
                    return this._style.scaleY;
                }
            }, {
                key: "_setRotation",
                value: function (t) {
                    this._style.rotation = t;
                }
            }, {
                key: "_setSkewX",
                value: function (t) {
                    this._style.skewX = t;
                }
            }, {
                key: "_setSkewY",
                value: function (t) {
                    this._style.skewY = t;
                }
            }, {
                key: "_createTransform",
                value: function () {
                    return f.create();
                }
            }, {
                key: "_adjustTransform",
                value: function () {
                    this._tfChanged = !1;
                    var t = this._style, e = t.scaleX, i = t.scaleY, n = t.skewX, r = t.skewY, s = t.rotation, a = this._transform || (this._transform = this._createTransform());
                    if (s || 1 !== e || 1 !== i || 0 !== n || 0 !== r) {
                        a._bTransform = !0;
                        var o = .0174532922222222 * (s - n), l = .0174532922222222 * (s + r), h = Math.cos(l), u = Math.sin(l), c = Math.sin(o), _ = Math.cos(o);
                        a.a = e * h, a.b = e * u, a.c = -i * c, a.d = i * _, a.tx = a.ty = 0;
                    } else a.identity(), this._renderType &amp;= ~se.TRANSFORM, this._setRenderType(this._renderType);
                    return a;
                }
            }, {
                key: "_setTransform",
                value: function (t) { }
            }, {
                key: "get_transform",
                value: function () {
                    return this._tfChanged ? this._adjustTransform() : this._transform;
                }
            }, {
                key: "set_transform",
                value: function (t) {
                    this._tfChanged = !1;
                    var e = this._transform || (this._transform = this._createTransform());
                    t.copyTo(e), this._setTransform(e), t &amp;&amp; (this._x = e.tx, this._y = e.ty, e.tx = e.ty = 0),
                        t ? this._renderType |= se.TRANSFORM : this._renderType &amp;= ~se.TRANSFORM, this._setRenderType(this._renderType),
                        this.parentRepaint();
                }
            }, {
                key: "_setPivotX",
                value: function (t) {
                    this.getStyle().pivotX = t;
                }
            }, {
                key: "_getPivotX",
                value: function () {
                    return this._style.pivotX;
                }
            }, {
                key: "_setPivotY",
                value: function (t) {
                    this.getStyle().pivotY = t;
                }
            }, {
                key: "_getPivotY",
                value: function () {
                    return this._style.pivotY;
                }
            }, {
                key: "_setAlpha",
                value: function (t) {
                    this._style.alpha !== t &amp;&amp; (this.getStyle().alpha = t, 1 !== t ? this._renderType |= se.ALPHA : this._renderType &amp;= ~se.ALPHA,
                        this._setRenderType(this._renderType), this.parentRepaint());
                }
            }, {
                key: "_getAlpha",
                value: function () {
                    return this._style.alpha;
                }
            }, {
                key: "get_visible",
                value: function () {
                    return this._visible;
                }
            }, {
                key: "set_visible",
                value: function (t) {
                    this._visible !== t &amp;&amp; (this._visible = t, this.parentRepaint(se.REPAINT_ALL));
                }
            }, {
                key: "_setBlendMode",
                value: function (t) { }
            }, {
                key: "_setGraphics",
                value: function (t) { }
            }, {
                key: "_setGraphicsCallBack",
                value: function () { }
            }, {
                key: "_setScrollRect",
                value: function (t) { }
            }, {
                key: "pos",
                value: function (t, e) {
                    var i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] &amp;&amp; arguments[2];
                    if (this._x !== t || this._y !== e) {
                        if (this.destroyed) return this;
                        if (i) {
                            this._setX(t), this._setY(e), this.parentRepaint(se.REPAINT_CACHE);
                            var n = this._cacheStyle.maskParent;
                            n &amp;&amp; n.repaint(se.REPAINT_CACHE);
                        } else this.x = t, this.y = e;
                    }
                    return this;
                }
            }, {
                key: "pivot",
                value: function (t, e) {
                    return this.pivotX = t, this.pivotY = e, this;
                }
            }, {
                key: "size",
                value: function (t, e) {
                    return this.width = t, this.height = e, this;
                }
            }, {
                key: "scale",
                value: function (t, e) {
                    var i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] &amp;&amp; arguments[2], n = this.getStyle();
                    if (n.scaleX != t || n.scaleY != e) {
                        if (this.destroyed) return this;
                        i ? (this._setScaleX(t), this._setScaleY(e), this._setTranformChange()) : (this.scaleX = t,
                            this.scaleY = e);
                    }
                    return this;
                }
            }, {
                key: "skew",
                value: function (t, e) {
                    return this.skewX = t, this.skewY = e, this;
                }
            }, {
                key: "render",
                value: function (t, e, i) {
                    ve.renders[this._renderType]._fun(this, t, e + this._x, i + this._y), this._repaint = 0;
                }
            }, {
                key: "drawToCanvas",
                value: function (t, e, i, r) {
                    return n.drawToCanvas(this, this._renderType, t, e, i, r);
                }
            }, {
                key: "drawToTexture",
                value: function (t, e, i, r) {
                    var s = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null;
                    return n.drawToTexture(this, this._renderType, t, e, i, r, s);
                }
            }, {
                key: "drawToTexture3D",
                value: function (t, e, i) {
                    throw "not implement";
                }
            }, {
                key: "customRender",
                value: function (t, e, i) {
                    this._repaint = se.REPAINT_ALL;
                }
            }, {
                key: "_applyFilters",
                value: function () { }
            }, {
                key: "_setColorFilter",
                value: function (t) { }
            }, {
                key: "_isHaveGlowFilter",
                value: function () {
                    var t, e;
                    if (this.filters) for (t = 0; t &lt; this.filters.length; t++) if (this.filters[t].type == z.GLOW) return !0;
                    for (t = 0, e = this._children.length; t &lt; e; t++) if (this._children[t]._isHaveGlowFilter()) return !0;
                    return !1;
                }
            }, {
                key: "localToGlobal",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1], n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null;
                    !0 === e &amp;&amp; (t = new v(t.x, t.y));
                    var r = this;
                    for (n = n || i.stage; r &amp;&amp; !r.destroyed &amp;&amp; r != n;) t = r.toParentPoint(t), r = r.parent;
                    return t;
                }
            }, {
                key: "globalToLocal",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1], n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null;
                    e &amp;&amp; (t = new v(t.x, t.y));
                    var r = this, s = [];
                    for (n = n || i.stage; r &amp;&amp; !r.destroyed &amp;&amp; r != n;) s.push(r), r = r.parent;
                    for (var a = s.length - 1; a &gt;= 0;) t = (r = s[a]).fromParentPoint(t), a--;
                    return t;
                }
            }, {
                key: "toParentPoint",
                value: function (t) {
                    if (!t) return t;
                    t.x -= this.pivotX, t.y -= this.pivotY, this.transform &amp;&amp; this._transform.transformPoint(t),
                        t.x += this._x, t.y += this._y;
                    var e = this._style.scrollRect;
                    return e &amp;&amp; (t.x -= e.x, t.y -= e.y), t;
                }
            }, {
                key: "fromParentPoint",
                value: function (t) {
                    if (!t) return t;
                    t.x -= this._x, t.y -= this._y;
                    var e = this._style.scrollRect;
                    return e &amp;&amp; (t.x += e.x, t.y += e.y), this.transform &amp;&amp; this._transform.invertTransformPoint(t),
                        t.x += this.pivotX, t.y += this.pivotY, t;
                }
            }, {
                key: "fromStagePoint",
                value: function (t) {
                    return t;
                }
            }, {
                key: "on",
                value: function (t, e, i) {
                    var r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null;
                    return 1 !== this._mouseState &amp;&amp; this.isMouseEvent(t) ? (this.mouseEnabled = !0,
                        this._setBit(de.HAS_MOUSE, !0), this._parent &amp;&amp; this._onDisplay(), this._createListener(t, e, i, r, !1)) : _get(_getPrototypeOf(n.prototype), "on", this).call(this, t, e, i, r);
                }
            }, {
                key: "once",
                value: function (t, e, i) {
                    var r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null;
                    return 1 !== this._mouseState &amp;&amp; this.isMouseEvent(t) ? (this.mouseEnabled = !0,
                        this._setBit(de.HAS_MOUSE, !0), this._parent &amp;&amp; this._onDisplay(), this._createListener(t, e, i, r, !0)) : _get(_getPrototypeOf(n.prototype), "once", this).call(this, t, e, i, r);
                }
            }, {
                key: "_onDisplay",
                value: function (t) {
                    if (1 !== this._mouseState) {
                        var e = this;
                        for (e = e.parent; e &amp;&amp; 1 !== e._mouseState &amp;&amp; !e._getBit(de.HAS_MOUSE);) e.mouseEnabled = !0,
                            e._setBit(de.HAS_MOUSE, !0), e = e.parent;
                    }
                }
            }, {
                key: "_setParent",
                value: function (t) {
                    _get(_getPrototypeOf(n.prototype), "_setParent", this).call(this, t), t &amp;&amp; this._getBit(de.HAS_MOUSE) &amp;&amp; this._onDisplay();
                }
            }, {
                key: "loadImage",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    if (t) {
                        var n = i.Loader.textureMap[x.formatURL(t)];
                        n || ((n = new Wt()).load(t), i.Loader.cacheTexture(t, n)), this.texture = n, n.getIsReady() ? r.call(this) : n.once(Gt.READY, this, r);
                    } else this.texture = null, r.call(this);
                    function r() {
                        this.repaint(se.REPAINT_ALL), e &amp;&amp; e.run();
                    }
                    return this;
                }
            }, {
                key: "repaint",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : se.REPAINT_CACHE;
                    this._repaint &amp; t || (this._repaint |= t, this.parentRepaint(t)), this._cacheStyle &amp;&amp; this._cacheStyle.maskParent &amp;&amp; this._cacheStyle.maskParent.repaint(t);
                }
            }, {
                key: "_needRepaint",
                value: function () {
                    return this._repaint &amp; se.REPAINT_CACHE &amp;&amp; this._cacheStyle.enableCanvasRender &amp;&amp; this._cacheStyle.reCache;
                }
            }, {
                key: "_childChanged",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null;
                    this._children.length ? this._renderType |= se.CHILDS : this._renderType &amp;= ~se.CHILDS,
                        this._setRenderType(this._renderType), t &amp;&amp; this._getBit(de.HAS_ZORDER) &amp;&amp; i.systemTimer.callLater(this, this.updateZOrder),
                        this.repaint(se.REPAINT_ALL);
                }
            }, {
                key: "parentRepaint",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : se.REPAINT_CACHE, e = this._parent;
                    !e || e._repaint &amp; t || (e._repaint |= t, e.parentRepaint(t));
                }
            }, {
                key: "_setMask",
                value: function (t) { }
            }, {
                key: "startDrag",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null, e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1], n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0, r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 300, s = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null, a = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] &amp;&amp; arguments[5], o = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : .92;
                    this._style.dragging || (this.getStyle().dragging = new i.Dragging()), this._style.dragging.start(this, t, e, n, r, s, a, o);
                }
            }, {
                key: "stopDrag",
                value: function () {
                    this._style.dragging &amp;&amp; this._style.dragging.stop();
                }
            }, {
                key: "_setDisplay",
                value: function (t) {
                    t || this._cacheStyle &amp;&amp; (this._cacheStyle.releaseContext(), this._cacheStyle.releaseFilterCache(),
                        this._cacheStyle.hasGlowFilter &amp;&amp; (this._cacheStyle.hasGlowFilter = !1)), _get(_getPrototypeOf(n.prototype), "_setDisplay", this).call(this, t);
                }
            }, {
                key: "hitTestPoint",
                value: function (t, e) {
                    var i = this.globalToLocal(v.TEMP.setTo(t, e));
                    return t = i.x, e = i.y, (this._style.hitArea ? this._style.hitArea : this._width &gt; 0 &amp;&amp; this._height &gt; 0 ? p.TEMP.setTo(0, 0, this._width, this._height) : this.getSelfBounds()).contains(t, e);
                }
            }, {
                key: "getMousePoint",
                value: function () {
                    return this.globalToLocal(v.TEMP.setTo(i.stage.mouseX, i.stage.mouseY));
                }
            }, {
                key: "_setTexture",
                value: function (t) { }
            }, {
                key: "_setRenderType",
                value: function (t) { }
            }, {
                key: "_setTranformChange",
                value: function () {
                    this._tfChanged = !0, this._renderType |= se.TRANSFORM, this.parentRepaint(se.REPAINT_CACHE);
                }
            }, {
                key: "_setBgStyleColor",
                value: function (t, e, i, n, r) { }
            }, {
                key: "_setBorderStyleColor",
                value: function (t, e, i, n, r, s) { }
            }, {
                key: "captureMouseEvent",
                value: function (t) {
                    i.MouseManager.instance.setCapture(this, t);
                }
            }, {
                key: "releaseMouseEvent",
                value: function () {
                    i.MouseManager.instance.releaseCapture();
                }
            }, {
                key: "customRenderEnable",
                set: function (t) {
                    t &amp;&amp; (this._renderType |= se.CUSTOM, this._setRenderType(this._renderType), this._setCustomRender());
                }
            }, {
                key: "cacheAs",
                get: function () {
                    return this._cacheStyle.cacheAs;
                },
                set: function (t) {
                    t !== this._cacheStyle.userSetCache &amp;&amp; (this.mask &amp;&amp; "normal" === t || (this._setCacheAs(t),
                        this._getCacheStyle().userSetCache = t, this._checkCanvasEnable(), this.repaint()));
                }
            }, {
                key: "staticCache",
                get: function () {
                    return this._cacheStyle.staticCache;
                },
                set: function (t) {
                    this._getCacheStyle().staticCache = t, t || this.reCache();
                }
            }, {
                key: "x",
                get: function () {
                    return this._x;
                },
                set: function (t) {
                    if (!this.destroyed &amp;&amp; this._x !== t) {
                        this._setX(t), this.parentRepaint(se.REPAINT_CACHE);
                        var e = this._cacheStyle.maskParent;
                        e &amp;&amp; e.repaint(se.REPAINT_CACHE);
                    }
                }
            }, {
                key: "y",
                get: function () {
                    return this._y;
                },
                set: function (t) {
                    if (!this.destroyed &amp;&amp; this._y !== t) {
                        this._setY(t), this.parentRepaint(se.REPAINT_CACHE);
                        var e = this._cacheStyle.maskParent;
                        e &amp;&amp; e.repaint(se.REPAINT_CACHE);
                    }
                }
            }, {
                key: "width",
                get: function () {
                    return this.get_width();
                },
                set: function (t) {
                    this.set_width(t);
                }
            }, {
                key: "height",
                get: function () {
                    return this.get_height();
                },
                set: function (t) {
                    this.set_height(t);
                }
            }, {
                key: "displayWidth",
                get: function () {
                    return this.width * this.scaleX;
                }
            }, {
                key: "displayHeight",
                get: function () {
                    return this.height * this.scaleY;
                }
            }, {
                key: "scaleX",
                get: function () {
                    return this._style.scaleX;
                },
                set: function (t) {
                    this.set_scaleX(t);
                }
            }, {
                key: "scaleY",
                get: function () {
                    return this._style.scaleY;
                },
                set: function (t) {
                    this.set_scaleY(t);
                }
            }, {
                key: "rotation",
                get: function () {
                    return this._style.rotation;
                },
                set: function (t) {
                    this.getStyle().rotation !== t &amp;&amp; (this._setRotation(t), this._setTranformChange());
                }
            }, {
                key: "skewX",
                get: function () {
                    return this._style.skewX;
                },
                set: function (t) {
                    this.getStyle().skewX !== t &amp;&amp; (this._setSkewX(t), this._setTranformChange());
                }
            }, {
                key: "skewY",
                get: function () {
                    return this._style.skewY;
                },
                set: function (t) {
                    this.getStyle().skewY !== t &amp;&amp; (this._setSkewY(t), this._setTranformChange());
                }
            }, {
                key: "transform",
                get: function () {
                    return this._tfChanged ? this._adjustTransform() : this._transform;
                },
                set: function (t) {
                    this.set_transform(t);
                }
            }, {
                key: "pivotX",
                get: function () {
                    return this._getPivotX();
                },
                set: function (t) {
                    this._setPivotX(t), this.repaint();
                }
            }, {
                key: "pivotY",
                get: function () {
                    return this._getPivotY();
                },
                set: function (t) {
                    this._setPivotY(t), this.repaint();
                }
            }, {
                key: "alpha",
                get: function () {
                    return this._getAlpha();
                },
                set: function (t) {
                    t = t &lt; 0 ? 0 : t &gt; 1 ? 1 : t, this._setAlpha(t);
                }
            }, {
                key: "visible",
                get: function () {
                    return this.get_visible();
                },
                set: function (t) {
                    this.set_visible(t);
                }
            }, {
                key: "blendMode",
                get: function () {
                    return this._style.blendMode;
                },
                set: function (t) {
                    this._setBlendMode(t), this.getStyle().blendMode = t, t &amp;&amp; "source-over" != t ? this._renderType |= se.BLEND : this._renderType &amp;= ~se.BLEND,
                        this._setRenderType(this._renderType), this.parentRepaint();
                }
            }, {
                key: "graphics",
                get: function () {
                    return this._graphics || (this.graphics = new _e(), this._graphics.autoDestroy = !0),
                        this._graphics;
                },
                set: function (t) {
                    this._graphics &amp;&amp; (this._graphics._sp = null), this._graphics = t, t ? (this._setGraphics(t),
                        this._renderType |= se.GRAPHICS, t._sp = this) : this._renderType &amp;= ~se.GRAPHICS,
                        this._setRenderType(this._renderType), this.repaint();
                }
            }, {
                key: "scrollRect",
                get: function () {
                    return this._style.scrollRect;
                },
                set: function (t) {
                    this.getStyle().scrollRect = t, this._setScrollRect(t), this.repaint(), t ? this._renderType |= se.CLIP : this._renderType &amp;= ~se.CLIP,
                        this._setRenderType(this._renderType);
                }
            }, {
                key: "filters",
                get: function () {
                    return this._cacheStyle.filters;
                },
                set: function (t) {
                    t &amp;&amp; 0 === t.length &amp;&amp; (t = null), this._cacheStyle.filters != t &amp;&amp; (this._getCacheStyle().filters = t ? t.slice() : null,
                        t &amp;&amp; t.length ? (this._setColorFilter(t[0]), this._renderType |= se.FILTERS) : (this._setColorFilter(null),
                            this._renderType &amp;= ~se.FILTERS), this._setRenderType(this._renderType), t &amp;&amp; t.length &gt; 0 ? (this._getBit(de.DISPLAY) || this._setBitUp(de.DISPLAY),
                                1 == t.length &amp;&amp; t[0] instanceof q || (this._getCacheStyle().cacheForFilters = !0,
                                    this._checkCanvasEnable())) : this._cacheStyle.cacheForFilters &amp;&amp; (this._cacheStyle.cacheForFilters = !1,
                                        this._checkCanvasEnable()), this._getCacheStyle().hasGlowFilter = this._isHaveGlowFilter(),
                        this.repaint());
                }
            }, {
                key: "stage",
                get: function () {
                    return i.stage;
                }
            }, {
                key: "hitArea",
                get: function () {
                    return this._style.hitArea;
                },
                set: function (t) {
                    this.getStyle().hitArea = t;
                }
            }, {
                key: "mask",
                get: function () {
                    return this._cacheStyle.mask;
                },
                set: function (t) {
                    t &amp;&amp; this.mask &amp;&amp; this.mask._cacheStyle.maskParent || (this._getCacheStyle().mask = t,
                        this._setMask(t), this._checkCanvasEnable(), t ? t._getCacheStyle().maskParent = this : this.mask &amp;&amp; (this.mask._getCacheStyle().maskParent = null),
                        this._renderType |= se.MASK, this._setRenderType(this._renderType), this.parentRepaint(se.REPAINT_ALL));
                }
            }, {
                key: "mouseEnabled",
                get: function () {
                    return this._mouseState &gt; 1;
                },
                set: function (t) {
                    this._mouseState = t ? 2 : 1;
                }
            }, {
                key: "globalScaleX",
                get: function () {
                    for (var t = 1, e = this; e &amp;&amp; e !== i.stage;) t *= e.scaleX, e = e.parent;
                    return t;
                }
            }, {
                key: "globalRotation",
                get: function () {
                    for (var t = 0, e = this; e &amp;&amp; e !== i.stage;) t += e.rotation, e = e.parent;
                    return t;
                }
            }, {
                key: "globalScaleY",
                get: function () {
                    for (var t = 1, e = this; e &amp;&amp; e !== i.stage;) t *= e.scaleY, e = e.parent;
                    return t;
                }
            }, {
                key: "mouseX",
                get: function () {
                    return this.getMousePoint().x;
                }
            }, {
                key: "mouseY",
                get: function () {
                    return this.getMousePoint().y;
                }
            }, {
                key: "zOrder",
                get: function () {
                    return this._zOrder;
                },
                set: function (t) {
                    this._zOrder != t &amp;&amp; (this._zOrder = t, this._parent &amp;&amp; (t &amp;&amp; this._parent._setBit(de.HAS_ZORDER, !0),
                        i.systemTimer.callLater(this._parent, this.updateZOrder)));
                }
            }, {
                key: "texture",
                get: function () {
                    return this._texture;
                },
                set: function (t) {
                    "string" == typeof t ? this.loadImage(t) : this._texture != t &amp;&amp; (this._texture &amp;&amp; this._texture._removeReference(),
                        this._texture = t, t &amp;&amp; t._addReference(), this._setTexture(t), this._setWidth(this._texture, this.width),
                        this._setHeight(this._texture, this.height), t ? this._renderType |= se.TEXTURE : this._renderType &amp;= ~se.TEXTURE,
                        this._setRenderType(this._renderType), this.repaint());
                }
            }, {
                key: "viewport",
                get: function () {
                    return this._style.viewport;
                },
                set: function (t) {
                    var e;
                    "string" == typeof t &amp;&amp; ((e = t.split(",")).length &gt; 3 &amp;&amp; (t = new p(parseFloat(e[0]), parseFloat(e[1]), parseFloat(e[2]), parseFloat(e[3]))));
                    this.getStyle().viewport = t;
                }
            }, {
                key: "drawCallOptimize",
                set: function (t) {
                    this._setBit(de.DRAWCALL_OPTIMIZE, t);
                },
                get: function () {
                    return this._getBit(de.DRAWCALL_OPTIMIZE);
                }
            }], [{
                key: "drawToCanvas",
                value: function (t, e, i, n, r, s) {
                    r -= t.x, s -= t.y, r |= 0, s |= 0, i |= 0, n |= 0;
                    var a = new Qt();
                    a.size(i, n), a.asBitmap = !0, a._targets.start(), a._targets.clear(0, 0, 0, 0),
                        ve.renders[e]._fun(t, a, r, s), a.flush(), a._targets.end(), a._targets.restore();
                    var o = a._targets.getData(0, 0, i, n);
                    a.destroy();
                    for (var l = new ImageData(i, n), h = 4 * i, u = l.data, c = n - 1, _ = c * h, d = 0; c &gt;= 0; c--) u.set(o.subarray(d, d + h), _),
                        _ -= h, d += h;
                    var f = new pe(!0);
                    return f.size(i, n), f.getContext("2d").putImageData(l, 0, 0), f;
                }
            }, {
                key: "drawToTexture",
                value: function (t, e, i, r, s, a) {
                    var o = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : null;
                    n.drawtocanvCtx || (n.drawtocanvCtx = new Qt()), s -= t.x, a -= t.y, s |= 0, a |= 0,
                        i |= 0, r |= 0;
                    var l = o ? n.drawtocanvCtx : new Qt();
                    if (l.clear(), l.size(i, r), o ? l._targets = o : l.asBitmap = !0, l._targets.start(),
                        l._targets.clear(0, 0, 0, 0), ve.renders[e]._fun(t, l, s, a), l.flush(), l._targets.end(),
                        l._targets.restore(), !o) {
                        var h = new Wt(l._targets, Wt.INV_UV);
                        return l.destroy(!0), h;
                    }
                    return t._repaint = 0, o;
                }
            }, {
                key: "fromImage",
                value: function (t) {
                    return new n().loadImage(t);
                }
            }]), n;
        }(xe);
        ge.regClass("laya.display.Sprite", Ce), ge.regClass("Laya.Sprite", Ce);
        var Ee = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.apply(this, arguments)).italic = !1, t;
            }
            return _createClass(i, [{
                key: "reset",
                value: function () {
                    return _get(_getPrototypeOf(i.prototype), "reset", this).call(this), this.italic = !1,
                        this.align = "left", this.wordWrap = !1, this.leading = 0, this.padding = [0, 0, 0, 0],
                        this.bgColor = null, this.borderColor = null, this.asPassword = !1, this.stroke = 0,
                        this.strokeColor = "#000000", this.bold = !1, this.underline = !1, this.underlineColor = null,
                        this.currBitmapFont = null, this;
                }
            }, {
                key: "recover",
                value: function () {
                    this !== i.EMPTY &amp;&amp; n.recover("TextStyle", this.reset());
                }
            }, {
                key: "render",
                value: function (t, e, i, n) {
                    (this.bgColor || this.borderColor) &amp;&amp; e.drawRect(i, n, t.width, t.height, this.bgColor, this.borderColor, 1);
                }
            }], [{
                key: "create",
                value: function () {
                    return n.getItemByClass("TextStyle", i);
                }
            }]), i;
        }(ke);
        Ee.EMPTY = new Ee();
        var be = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                var t;
                return _classCallCheck(this, n), (t = e.call(this))._textWidth = 0, t._textHeight = 0,
                    t._lines = [], t._lineWidths = [], t._startX = 0, t._startY = 0, t._charSize = {},
                    t._valign = "top", t._fontSize = n.defaultFontSize, t._font = n.defaultFont, t._color = "#000000",
                    t._singleCharRender = !1, t.overflow = n.VISIBLE, t._style = Ee.EMPTY, t;
            }
            return _createClass(n, [{
                key: "getStyle",
                value: function () {
                    return this._style === Ee.EMPTY &amp;&amp; (this._style = Ee.create()), this._style;
                }
            }, {
                key: "_getTextStyle",
                value: function () {
                    return this._style === Ee.EMPTY &amp;&amp; (this._style = Ee.create()), this._style;
                }
            }, {
                key: "destroy",
                value: function () {
                    var t = !(arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0]) || arguments[0];
                    _get(_getPrototypeOf(n.prototype), "destroy", this).call(this, t), this._clipPoint = null,
                        this._lines = null, this._lineWidths = null, this._words &amp;&amp; this._words.forEach(function (t) {
                            t.cleanCache();
                        }), this._words = null, this._charSize = null;
                }
            }, {
                key: "_getBoundPointsM",
                value: function () {
                    var t = p.TEMP;
                    return t.setTo(0, 0, this.width, this.height), t._getBoundPoints();
                }
            }, {
                key: "getGraphicBounds",
                value: function () {
                    var t = p.TEMP;
                    return t.setTo(0, 0, this.width, this.height), t;
                }
            }, {
                key: "_getCSSStyle",
                value: function () {
                    return this._style;
                }
            }, {
                key: "get_text",
                value: function () {
                    return this._text || "";
                }
            }, {
                key: "set_text",
                value: function (t) {
                    this._text !== t &amp;&amp; (this.lang(t + ""), this.isChanged = !0, this.event(Gt.CHANGE),
                        this.borderColor &amp;&amp; this._setBorderStyleColor(0, 0, this.width, this.height, this.borderColor, 1));
                }
            }, {
                key: "lang",
                value: function (t) {
                    console.log(111111111111111111111, t, this)
                    if (t == "æ­å–œè¿‡å…³") {
                        console.log(111111111)
                    }
                    if (t = n.langPacks &amp;&amp; n.langPacks[t] ? n.langPacks[t] : t, arguments.length &lt; 2)
                        this._text = t;
                    else {
                        for (var e = 0, i = arguments.length; e &lt; i; e++) t = t.replace("{" + e + "}", arguments[e + 1]);
                        this._text = t;
                    }
                }
            }, {
                key: "get_color",
                value: function () {
                    return this._color;
                }
            }, {
                key: "set_color",
                value: function (t) {
                    this._color != t &amp;&amp; (this._color = t, !this._isChanged &amp;&amp; this._graphics ? this._graphics.replaceTextColor(this.color) : this.isChanged = !0);
                }
            }, {
                key: "set_bgColor",
                value: function (t) {
                    this._getTextStyle().bgColor = t, this._renderType |= se.STYLE, this._setBgStyleColor(0, 0, this.width, this.height, t),
                        this._setRenderType(this._renderType), this.isChanged = !0;
                }
            }, {
                key: "get_bgColor",
                value: function () {
                    return this._style.bgColor;
                }
            }, {
                key: "_getContextFont",
                value: function () {
                    return (this.italic ? "italic " : "") + (this.bold ? "bold " : "") + this.fontSize + "px " + (i.Browser.onIPhone &amp;&amp; n.fontFamilyMap[this.font] || this.font);
                }
            }, {
                key: "_isPassWordMode",
                value: function () {
                    var t = this._style.asPassword;
                    return "prompt" in this &amp;&amp; this.prompt == this._text &amp;&amp; (t = !1), t;
                }
            }, {
                key: "_getPassWordTxt",
                value: function (t) {
                    var e;
                    e = "";
                    for (var i = t.length; i &gt; 0; i--) e += "â—";
                    return e;
                }
            }, {
                key: "_renderText",
                value: function () {
                    var t = this.padding, e = this._lines.length;
                    this.overflow != n.VISIBLE &amp;&amp; (e = Math.min(e, Math.floor((this.height - t[0] - t[2]) / (this.leading + this._charSize.height)) + 1));
                    var r = this.scrollY / (this._charSize.height + this.leading) | 0, s = this.graphics;
                    s.clear(!0);
                    var a = this._getContextFont();
                    i.Browser.context.font = a;
                    var o = t[3], l = "left", h = this._lines, u = this.leading + this._charSize.height, c = this._style.currBitmapFont;
                    c &amp;&amp; (u = this.leading + c.getMaxHeight());
                    var _ = t[0];
                    if (!c &amp;&amp; this._width &gt; 0 &amp;&amp; this._textWidth &lt;= this._width &amp;&amp; ("right" == this.align ? (l = "right",
                        o = this._width - t[1]) : "center" == this.align &amp;&amp; (l = "center", o = .5 * this._width + t[3] - t[1])),
                        this._height &gt; 0) {
                        var d = this._textHeight &gt; this._height ? "top" : this.valign;
                        "middle" === d ? _ = .5 * (this._height - e * u) + t[0] - t[2] : "bottom" === d &amp;&amp; (_ = this._height - e * u - t[2]);
                    }
                    var f = this._style;
                    if (c &amp;&amp; c.autoScaleSize) var v = c.fontSize / this.fontSize;
                    if (this._clipPoint) {
                        var p, y;
                        if (s.save(), c &amp;&amp; c.autoScaleSize) p = this._width ? this._width - t[3] - t[1] : this._textWidth,
                            y = this._height ? this._height - t[0] - t[2] : this._textHeight, p *= v, y *= v,
                            s.clipRect(t[3], t[0], p, y); else s.clipRect(t[3], t[0], this._width ? this._width - t[3] - t[1] : this._textWidth, this._height ? this._height - t[0] - t[2] : this._textHeight);
                        this.repaint();
                    }
                    var g = f.asPassword;
                    "prompt" in this &amp;&amp; this.prompt == this._text &amp;&amp; (g = !1);
                    for (var m = 0, T = 0, k = Math.min(this._lines.length, e + r) || 1, x = r; x &lt; k; x++) {
                        var C, E = h[x];
                        if (g) {
                            var b = E.length;
                            E = "";
                            for (var w = b; w &gt; 0; w--) E += "â—";
                        }
                        if (null == E &amp;&amp; (E = ""), m = o - (this._clipPoint ? this._clipPoint.x : 0), T = _ + u * x - (this._clipPoint ? this._clipPoint.y : 0),
                            this.underline &amp;&amp; this._drawUnderline(l, m, T, x), c) {
                            var R = this.width;
                            c.autoScaleSize &amp;&amp; (R = this.width * v), c._drawText(E, this, m, T, this.align, R);
                        } else this._words || (this._words = []), this._words.length &gt; x - r ? C = this._words[x - r] : (C = new Vt(),
                            this._words.push(C)), C.setText(E), C.splitRender = this._singleCharRender, f.stroke ? s.fillBorderText(C, m, T, a, this.color, f.strokeColor, f.stroke, l) : s.fillText(C, m, T, a, this.color, l);
                    }
                    if (c &amp;&amp; c.autoScaleSize) {
                        var A = 1 / v;
                        this.scale(A, A);
                    }
                    this._clipPoint &amp;&amp; s.restore(), this._startX = o, this._startY = _;
                }
            }, {
                key: "_drawUnderline",
                value: function (t, e, i, n) {
                    var r = this._lineWidths[n];
                    switch (t) {
                        case "center":
                            e -= r / 2;
                            break;

                        case "right":
                            e -= r;
                    }
                    i += this._charSize.height, this._graphics.drawLine(e, i, e + r, i, this.underlineColor || this.color, 1);
                }
            }, {
                key: "typeset",
                value: function () {
                    if (this._isChanged = !1, !this._text) return this._clipPoint = null, this._textWidth = this._textHeight = 0,
                        void this.graphics.clear(!0);
                    i.Render.isConchApp ? window.conchTextCanvas.font = this._getContextFont() : i.Browser.context.font = this._getContextFont(),
                        this._lines.length = 0, this._lineWidths.length = 0, this._isPassWordMode() ? this._parseLines(this._getPassWordTxt(this._text)) : this._parseLines(this._text),
                        this._evalTextSize(), this._checkEnabledViewportOrNot() ? this._clipPoint || (this._clipPoint = new v(0, 0)) : this._clipPoint = null,
                        this._renderText();
                }
            }, {
                key: "_evalTextSize",
                value: function () {
                    var t, e;
                    t = Math.max.apply(this, this._lineWidths), e = this._style.currBitmapFont ? this._lines.length * (this._style.currBitmapFont.getMaxHeight() + this.leading) + this.padding[0] + this.padding[2] : this._lines.length * (this._charSize.height + this.leading) + this.padding[0] + this.padding[2],
                        t == this._textWidth &amp;&amp; e == this._textHeight || (this._textWidth = t, this._textHeight = e);
                }
            }, {
                key: "_checkEnabledViewportOrNot",
                value: function () {
                    return this.overflow == n.SCROLL &amp;&amp; (this._width &gt; 0 &amp;&amp; this._textWidth &gt; this._width || this._height &gt; 0 &amp;&amp; this._textHeight &gt; this._height);
                }
            }, {
                key: "changeText",
                value: function (t) {
                    this._text !== t &amp;&amp; (this.lang(t + ""), this._graphics &amp;&amp; this._graphics.replaceText(this._text) || this.typeset());
                }
            }, {
                key: "_parseLines",
                value: function (t) {
                    var e = this.wordWrap || this.overflow == n.HIDDEN;
                    if (e) var r = this._getWordWrapWidth();
                    var s = this._style.currBitmapFont;
                    if (s) this._charSize.width = s.getMaxWidth(), this._charSize.height = s.getMaxHeight(); else {
                        var a = null;
                        (a = i.Render.isConchApp ? window.conchTextCanvas.measureText(n._testWord) : i.Browser.context.measureText(n._testWord)) || (a = {
                            width: 100
                        }), this._charSize.width = a.width, this._charSize.height = a.height || this.fontSize;
                    }
                    for (var o = t.replace(/\r\n/g, "\n").split("\n"), l = 0, h = o.length; l &lt; h; l++) {
                        var u = o[l];
                        e ? this._parseLine(u, r) : (this._lineWidths.push(this._getTextWidth(u)), this._lines.push(u));
                    }
                }
            }, {
                key: "_parseLine",
                value: function (t, e) {
                    var i = this._lines, r = 0, s = 0, a = 0, o = 0;
                    if ((s = this._getTextWidth(t)) &lt;= e) return i.push(t), void this._lineWidths.push(s);
                    s = this._charSize.width, 0 == (r = Math.floor(e / s)) &amp;&amp; (r = 1), a = s = this._getTextWidth(t.substring(0, r));
                    for (var l = r, h = t.length; l &lt; h; l++) if ((a += s = this._getTextWidth(t.charAt(l))) &gt; e) if (this.wordWrap) {
                        var u = t.substring(o, l);
                        if (u.charCodeAt(u.length - 1) &lt; 255) {
                            var c = /(?:\w|-)+$/.exec(u);
                            c &amp;&amp; (l = c.index + o, 0 == c.index ? l += u.length : u = t.substring(o, l));
                        }
                        if (i.push(u), this._lineWidths.push(a - s), o = l, !(l + r &lt; h)) {
                            i.push(t.substring(o, h)), this._lineWidths.push(this._getTextWidth(i[i.length - 1])),
                                o = -1;
                            break;
                        }
                        l += r, a = s = this._getTextWidth(t.substring(o, l)), l--;
                    } else if (this.overflow == n.HIDDEN) return i.push(t.substring(0, l)), void this._lineWidths.push(this._getTextWidth(i[i.length - 1]));
                    this.wordWrap &amp;&amp; -1 != o &amp;&amp; (i.push(t.substring(o, h)), this._lineWidths.push(this._getTextWidth(i[i.length - 1])));
                }
            }, {
                key: "_getTextWidth",
                value: function (t) {
                    var e = this._style.currBitmapFont;
                    return e ? e.getTextWidth(t) : i.Render.isConchApp ? window.conchTextCanvas.measureText(t).width : (i.Browser.context.measureText(t) || {
                        width: 100
                    }).width;
                }
            }, {
                key: "_getWordWrapWidth",
                value: function () {
                    var t, e = this.padding, n = this._style.currBitmapFont;
                    return (t = n &amp;&amp; n.autoScaleSize ? this._width * (n.fontSize / this.fontSize) : this._width) &lt;= 0 &amp;&amp; (t = this.wordWrap ? 100 : i.Browser.width),
                        t &lt;= 0 &amp;&amp; (t = 100), t - e[3] - e[1];
                }
            }, {
                key: "getCharPoint",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    this._isChanged &amp;&amp; i.systemTimer.runCallLater(this, this.typeset);
                    for (var n = 0, r = this._lines, s = 0, a = 0, o = r.length; a &lt; o; a++) {
                        if (t &lt; (n += r[a].length)) {
                            var l = a;
                            break;
                        }
                        s = n;
                    }
                    var h = (this.italic ? "italic " : "") + (this.bold ? "bold " : "") + this.fontSize + "px " + this.font;
                    i.Browser.context.font = h;
                    var u = this._getTextWidth(this._text.substring(s, t)), c = e || new v();
                    return c.setTo(this._startX + u - (this._clipPoint ? this._clipPoint.x : 0), this._startY + l * (this._charSize.height + this.leading) - (this._clipPoint ? this._clipPoint.y : 0));
                }
            }, {
                key: "width",
                get: function () {
                    return this._width ? this._width : this.textWidth + this.padding[1] + this.padding[3];
                },
                set: function (t) {
                    t != this._width &amp;&amp; (_get(_getPrototypeOf(n.prototype), "set_width", this).call(this, t),
                        this.isChanged = !0, this.borderColor &amp;&amp; this._setBorderStyleColor(0, 0, this.width, this.height, this.borderColor, 1));
                }
            }, {
                key: "height",
                get: function () {
                    return this._height ? this._height : this.textHeight;
                },
                set: function (t) {
                    t != this._height &amp;&amp; (_get(_getPrototypeOf(n.prototype), "set_height", this).call(this, t),
                        this.isChanged = !0, this.borderColor &amp;&amp; this._setBorderStyleColor(0, 0, this.width, this.height, this.borderColor, 1));
                }
            }, {
                key: "textWidth",
                get: function () {
                    return this._isChanged &amp;&amp; i.systemTimer.runCallLater(this, this.typeset), this._textWidth;
                }
            }, {
                key: "textHeight",
                get: function () {
                    return this._isChanged &amp;&amp; i.systemTimer.runCallLater(this, this.typeset), this._textHeight;
                }
            }, {
                key: "text",
                get: function () {
                    return this._text || "";
                },
                set: function (t) {
                    this.set_text(t);
                }
            }, {
                key: "font",
                get: function () {
                    return this._font;
                },
                set: function (t) {
                    this._style.currBitmapFont &amp;&amp; (this._getTextStyle().currBitmapFont = null, this.scale(1, 1)),
                        n._bitmapFonts &amp;&amp; n._bitmapFonts[t] &amp;&amp; (this._getTextStyle().currBitmapFont = n._bitmapFonts[t]),
                        this._font = t, this.isChanged = !0;
                }
            }, {
                key: "fontSize",
                get: function () {
                    return this._fontSize;
                },
                set: function (t) {
                    this._fontSize != t &amp;&amp; (this._fontSize = t, this.isChanged = !0);
                }
            }, {
                key: "bold",
                get: function () {
                    return this._style.bold;
                },
                set: function (t) {
                    this._getTextStyle().bold = t, this.isChanged = !0;
                }
            }, {
                key: "color",
                get: function () {
                    return this._color;
                },
                set: function (t) {
                    this.set_color(t);
                }
            }, {
                key: "italic",
                get: function () {
                    return this._style.italic;
                },
                set: function (t) {
                    this._getTextStyle().italic = t, this.isChanged = !0;
                }
            }, {
                key: "align",
                get: function () {
                    return this._style.align;
                },
                set: function (t) {
                    this._getTextStyle().align = t, this.isChanged = !0;
                }
            }, {
                key: "valign",
                get: function () {
                    return this._valign;
                },
                set: function (t) {
                    this._valign = t, this.isChanged = !0;
                }
            }, {
                key: "wordWrap",
                get: function () {
                    return this._style.wordWrap;
                },
                set: function (t) {
                    this._getTextStyle().wordWrap = t, this.isChanged = !0;
                }
            }, {
                key: "leading",
                get: function () {
                    return this._style.leading;
                },
                set: function (t) {
                    this._getTextStyle().leading = t, this.isChanged = !0;
                }
            }, {
                key: "padding",
                get: function () {
                    return this._style.padding;
                },
                set: function (t) {
                    if ("string" == typeof t) {
                        var e, i, n;
                        for (n = (e = t.split(",")).length; e.length &lt; 4;) e.push(0);
                        for (i = 0; i &lt; n; i++) e[i] = parseFloat(e[i]) || 0;
                        t = e;
                    }
                    this._getTextStyle().padding = t, this.isChanged = !0;
                }
            }, {
                key: "bgColor",
                get: function () {
                    return this._style.bgColor;
                },
                set: function (t) {
                    this.set_bgColor(t);
                }
            }, {
                key: "borderColor",
                get: function () {
                    return this._style.borderColor;
                },
                set: function (t) {
                    this._getTextStyle().borderColor = t, this._renderType |= se.STYLE, this._setBorderStyleColor(0, 0, this.width, this.height, t, 1),
                        this._setRenderType(this._renderType), this.isChanged = !0;
                }
            }, {
                key: "stroke",
                get: function () {
                    return this._style.stroke;
                },
                set: function (t) {
                    this._getTextStyle().stroke = t, this.isChanged = !0;
                }
            }, {
                key: "strokeColor",
                get: function () {
                    return this._style.strokeColor;
                },
                set: function (t) {
                    this._getTextStyle().strokeColor = t, this.isChanged = !0;
                }
            }, {
                key: "isChanged",
                set: function (t) {
                    this._isChanged !== t &amp;&amp; (this._isChanged = t, t &amp;&amp; i.systemTimer.callLater(this, this.typeset));
                }
            }, {
                key: "scrollX",
                set: function (t) {
                    if (!(this.overflow != n.SCROLL || this.textWidth &lt; this._width) &amp;&amp; this._clipPoint) {
                        t = t &lt; this.padding[3] ? this.padding[3] : t;
                        var e = this._textWidth - this._width;
                        t = t &gt; e ? e : t, this._clipPoint.x = t, this._renderText();
                    }
                },
                get: function () {
                    return this._clipPoint ? this._clipPoint.x : 0;
                }
            }, {
                key: "scrollY",
                set: function (t) {
                    if (!(this.overflow != n.SCROLL || this.textHeight &lt; this._height) &amp;&amp; this._clipPoint) {
                        t = t &lt; this.padding[0] ? this.padding[0] : t;
                        var e = this._textHeight - this._height;
                        t = t &gt; e ? e : t, this._clipPoint.y = t, this._renderText();
                    }
                },
                get: function () {
                    return this._clipPoint ? this._clipPoint.y : 0;
                }
            }, {
                key: "maxScrollX",
                get: function () {
                    return this.textWidth &lt; this._width ? 0 : this._textWidth - this._width;
                }
            }, {
                key: "maxScrollY",
                get: function () {
                    return this.textHeight &lt; this._height ? 0 : this._textHeight - this._height;
                }
            }, {
                key: "lines",
                get: function () {
                    return this._isChanged &amp;&amp; this.typeset(), this._lines;
                }
            }, {
                key: "underlineColor",
                get: function () {
                    return this._style.underlineColor;
                },
                set: function (t) {
                    this._getTextStyle().underlineColor = t, this._isChanged || this._renderText();
                }
            }, {
                key: "underline",
                get: function () {
                    return this._style.underline;
                },
                set: function (t) {
                    this._getTextStyle().underline = t;
                }
            }, {
                key: "singleCharRender",
                set: function (t) {
                    this._singleCharRender = t;
                },
                get: function () {
                    return this._singleCharRender;
                }
            }], [{
                key: "defaultFontStr",
                value: function () {
                    return n.defaultFontSize + "px " + n.defaultFont;
                }
            }, {
                key: "registerBitmapFont",
                value: function (t, e) {
                    n._bitmapFonts || (n._bitmapFonts = {}), n._bitmapFonts[t] = e;
                }
            }, {
                key: "unregisterBitmapFont",
                value: function (t) {
                    var e = !(arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1]) || arguments[1];
                    if (n._bitmapFonts &amp;&amp; n._bitmapFonts[t]) {
                        var i = n._bitmapFonts[t];
                        e &amp;&amp; i.destroy(), delete n._bitmapFonts[t];
                    }
                }
            }]), n;
        }(Ce);
        be.VISIBLE = "visible", be.SCROLL = "scroll", be.HIDDEN = "hidden", be.defaultFontSize = 12,
            be.defaultFont = "Arial", be.isComplexText = !1, be.fontFamilyMap = {
                "æŠ¥éš¶": "æŠ¥éš¶-ç®€",
                "é»‘ä½“": "é»‘ä½“-ç®€",
                "æ¥·ä½“": "æ¥·ä½“-ç®€",
                "å…°äº­é»‘": "å…°äº­é»‘-ç®€",
                "éš¶å˜": "éš¶å˜-ç®€",
                "å‡Œæ…§ä½“": "å‡Œæ…§ä½“-ç®€",
                "ç¿©ç¿©ä½“": "ç¿©ç¿©ä½“-ç®€",
                "è‹¹æ–¹": "è‹¹æ–¹-ç®€",
                "æ‰‹æœ­ä½“": "æ‰‹æœ­ä½“-ç®€",
                "å®‹ä½“": "å®‹ä½“-ç®€",
                "å¨ƒå¨ƒä½“": "å¨ƒå¨ƒä½“-ç®€",
                "é­ç¢‘": "é­ç¢‘-ç®€",
                "è¡Œæ¥·": "è¡Œæ¥·-ç®€",
                "é›…ç—ž": "é›…ç—ž-ç®€",
                "åœ†ä½“": "åœ†ä½“-ç®€"
            }, be._testWord = "æ¸¸", be.CharacterCache = !0, be.RightToLeft = !1, i.regClass(be),
            ge.regClass("laya.display.Text", be), ge.regClass("Laya.Text", be);
        var we = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                var t;
                return _classCallCheck(this, n), (t = e.call(this))._multiline = !1, t._editable = !0,
                    t._maxChars = 1e5, t._type = "text", t._prompt = "", t._promptColor = "#A9A9A9",
                    t._originColor = "#000000", t._content = "", n.IOS_IFRAME = i.Browser.onIOS &amp;&amp; i.Browser.window.top != i.Browser.window.self,
                    t._width = 100, t._height = 20, t.multiline = !1, t.overflow = be.SCROLL, t.on(Gt.MOUSE_DOWN, _assertThisInitialized(t), t._onMouseDown),
                    t.on(Gt.UNDISPLAY, _assertThisInitialized(t), t._onUnDisplay), t;
            }
            return _createClass(n, [{
                key: "setSelection",
                value: function (t, e) {
                    this.focus = !0, n.inputElement.selectionStart = t, n.inputElement.selectionEnd = e;
                }
            }, {
                key: "_onUnDisplay",
                value: function () {
                    this.focus = !1;
                }
            }, {
                key: "_onMouseDown",
                value: function (t) {
                    this.focus = !0;
                }
            }, {
                key: "_syncInputTransform",
                value: function () {
                    var t = this.nativeInput, e = K.getTransformRelativeToWindow(this, this.padding[3], this.padding[0]), r = this._width - this.padding[1] - this.padding[3], s = this._height - this.padding[0] - this.padding[2];
                    i.Render.isConchApp ? (t.setScale(e.scaleX, e.scaleY), t.setSize(r, s), t.setPos(e.x, e.y)) : (n.inputContainer.style.transform = n.inputContainer.style.webkitTransform = "scale(" + e.scaleX + "," + e.scaleY + ") rotate(" + i.stage.canvasDegree + "deg)",
                        t.style.width = r + "px", t.style.height = s + "px", n.inputContainer.style.left = e.x + "px",
                        n.inputContainer.style.top = e.y + "px");
                }
            }, {
                key: "select",
                value: function () {
                    this.nativeInput.select();
                }
            }, {
                key: "_setInputMethod",
                value: function () {
                    n.input.parentElement &amp;&amp; n.inputContainer.removeChild(n.input), n.area.parentElement &amp;&amp; n.inputContainer.removeChild(n.area),
                        n.inputElement = this._multiline ? n.area : n.input, n.inputContainer.appendChild(n.inputElement),
                        be.RightToLeft &amp;&amp; (n.inputElement.style.direction = "rtl");
                }
            }, {
                key: "_focusIn",
                value: function () {
                    n.isInputting = !0;
                    var t = this.nativeInput;
                    this._focus = !0;
                    var e = t.style;
                    e.whiteSpace = this.wordWrap ? "pre-wrap" : "nowrap", this._setPromptColor(), t.readOnly = !this._editable,
                        i.Render.isConchApp &amp;&amp; (t.setType(this._type), t.setForbidEdit(!this._editable)),
                        t.maxLength = this._maxChars;
                    this.padding;
                    if (t.value = this._content, t.placeholder = this._prompt, i.stage.off(Gt.KEY_DOWN, this, this._onKeyDown),
                        i.stage.on(Gt.KEY_DOWN, this, this._onKeyDown), i.stage.focus = this, this.event(Gt.FOCUS),
                        i.Browser.onPC &amp;&amp; t.focus(), !(i.Browser.onMiniGame || i.Browser.onBDMiniGame || i.Browser.onQGMiniGame || i.Browser.onKGMiniGame || i.Browser.onVVMiniGame || i.Browser.onAlipayMiniGame || i.Browser.onQQMiniGame || i.Browser.onBLMiniGame)) {
                        this._text;
                        this._text = null;
                    }
                    this.typeset(), t.setColor(this._originColor), t.setFontSize(this.fontSize), t.setFontFace(i.Browser.onIPhone &amp;&amp; be.fontFamilyMap[this.font] || this.font),
                        i.Render.isConchApp &amp;&amp; t.setMultiAble &amp;&amp; t.setMultiAble(this._multiline), e.lineHeight = this.leading + this.fontSize + "px",
                        e.fontStyle = this.italic ? "italic" : "normal", e.fontWeight = this.bold ? "bold" : "normal",
                        e.textAlign = this.align, e.padding = "0 0", this._syncInputTransform(), !i.Render.isConchApp &amp;&amp; i.Browser.onPC &amp;&amp; i.systemTimer.frameLoop(1, this, this._syncInputTransform);
                }
            }, {
                key: "_setPromptColor",
                value: function () {
                    n.promptStyleDOM = i.Browser.getElementById("promptStyle"), n.promptStyleDOM || (n.promptStyleDOM = i.Browser.createElement("style"),
                        n.promptStyleDOM.setAttribute("id", "promptStyle"), i.Browser.document.head.appendChild(n.promptStyleDOM)),
                        n.promptStyleDOM.innerText = "input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {color:" + this._promptColor + "}input:-moz-placeholder, textarea:-moz-placeholder {color:" + this._promptColor + "}input::-moz-placeholder, textarea::-moz-placeholder {color:" + this._promptColor + "}input:-ms-input-placeholder, textarea:-ms-input-placeholder {color:" + this._promptColor + "}";
                }
            }, {
                key: "_focusOut",
                value: function () {
                    n.isInputting &amp;&amp; (n.isInputting = !1, this._focus = !1, this._text = null, this._content = this.nativeInput.value,
                        this._content ? (_get(_getPrototypeOf(n.prototype), "set_text", this).call(this, this._content),
                            _get(_getPrototypeOf(n.prototype), "set_color", this).call(this, this._originColor)) : (_get(_getPrototypeOf(n.prototype), "set_text", this).call(this, this._prompt),
                                _get(_getPrototypeOf(n.prototype), "set_color", this).call(this, this._promptColor)),
                        i.stage.off(Gt.KEY_DOWN, this, this._onKeyDown), i.stage.focus = null, this.event(Gt.BLUR),
                        this.event(Gt.CHANGE), i.Render.isConchApp &amp;&amp; this.nativeInput.blur(), i.Browser.onPC &amp;&amp; i.systemTimer.clear(this, this._syncInputTransform));
                }
            }, {
                key: "_onKeyDown",
                value: function (t) {
                    13 === t.keyCode &amp;&amp; (i.Browser.onMobile &amp;&amp; !this._multiline &amp;&amp; (this.focus = !1),
                        this.event(Gt.ENTER));
                }
            }, {
                key: "changeText",
                value: function (t) {
                    this._content = t, this._focus ? (this.nativeInput.value = t || "", this.event(Gt.CHANGE)) : _get(_getPrototypeOf(n.prototype), "changeText", this).call(this, t);
                }
            }, {
                key: "multiline",
                get: function () {
                    return this._multiline;
                },
                set: function (t) {
                    this._multiline = t, this.valign = t ? "top" : "middle";
                }
            }, {
                key: "nativeInput",
                get: function () {
                    return this._multiline ? n.area : n.input;
                }
            }, {
                key: "focus",
                get: function () {
                    return this._focus;
                },
                set: function (t) {
                    var e = this.nativeInput;
                    this._focus !== t &amp;&amp; (t ? (e.target ? e.target._focusOut() : this._setInputMethod(),
                        e.target = this, this._focusIn()) : (e.target = null, this._focusOut(), i.Browser.document.body.scrollTop = 0,
                            e.blur(), i.Render.isConchApp ? e.setPos(-1e4, -1e4) : n.inputContainer.contains(e) &amp;&amp; n.inputContainer.removeChild(e)));
                }
            }, {
                key: "text",
                set: function (t) {
                    _get(_getPrototypeOf(n.prototype), "set_color", this).call(this, this._originColor),
                        t += "", this._focus ? (this.nativeInput.value = t || "", this.event(Gt.CHANGE)) : (this._multiline || (t = t.replace(/\r?\n/g, "")),
                            this._content = t, t ? _get(_getPrototypeOf(n.prototype), "set_text", this).call(this, t) : (_get(_getPrototypeOf(n.prototype), "set_text", this).call(this, this._prompt),
                                _get(_getPrototypeOf(n.prototype), "set_color", this).call(this, this.promptColor)));
                },
                get: function () {
                    return this._focus ? this.nativeInput.value : this._content || "";
                }
            }, {
                key: "color",
                set: function (t) {
                    this._focus &amp;&amp; this.nativeInput.setColor(t), _get(_getPrototypeOf(n.prototype), "set_color", this).call(this, this._content ? t : this._promptColor),
                        this._originColor = t;
                },
                get: function () {
                    return _get(_getPrototypeOf(n.prototype), "color", this);
                }
            }, {
                key: "bgColor",
                set: function (t) {
                    _get(_getPrototypeOf(n.prototype), "set_bgColor", this).call(this, t), i.Render.isConchApp &amp;&amp; this.nativeInput.setBgColor(t);
                },
                get: function () {
                    return _get(_getPrototypeOf(n.prototype), "bgColor", this);
                }
            }, {
                key: "restrict",
                get: function () {
                    return this._restrictPattern ? this._restrictPattern.source : "";
                },
                set: function (t) {
                    t ? ((t = "[^" + t + "]").indexOf("^^") &gt; -1 &amp;&amp; (t = t.replace("^^", "")), this._restrictPattern = new RegExp(t, "g")) : this._restrictPattern = null;
                }
            }, {
                key: "editable",
                set: function (t) {
                    this._editable = t, i.Render.isConchApp &amp;&amp; n.input.setForbidEdit(!t);
                },
                get: function () {
                    return this._editable;
                }
            }, {
                key: "maxChars",
                get: function () {
                    return this._maxChars;
                },
                set: function (t) {
                    t &lt;= 0 &amp;&amp; (t = 1e5), this._maxChars = t;
                }
            }, {
                key: "prompt",
                get: function () {
                    return this._prompt;
                },
                set: function (t) {
                    !this._text &amp;&amp; t &amp;&amp; _get(_getPrototypeOf(n.prototype), "set_color", this).call(this, this._promptColor),
                        this.promptColor = this._promptColor, this._text ? _get(_getPrototypeOf(n.prototype), "set_text", this).call(this, this._text == this._prompt ? t : this._text) : _get(_getPrototypeOf(n.prototype), "set_text", this).call(this, t),
                        this._prompt = be.langPacks &amp;&amp; be.langPacks[t] ? be.langPacks[t] : t;
                }
            }, {
                key: "promptColor",
                get: function () {
                    return this._promptColor;
                },
                set: function (t) {
                    this._promptColor = t, this._content || _get(_getPrototypeOf(n.prototype), "set_color", this).call(this, t);
                }
            }, {
                key: "type",
                get: function () {
                    return this._type;
                },
                set: function (t) {
                    this._getTextStyle().asPassword = "password" === t, this._type = t;
                }
            }], [{
                key: "__init__",
                value: function () {
                    if (n._createInputElement(), i.Browser.onMobile) {
                        var t = !1;
                        (i.Browser.onMiniGame || i.Browser.onBDMiniGame || i.Browser.onQGMiniGame || i.Browser.onKGMiniGame || i.Browser.onVVMiniGame || i.Browser.onAlipayMiniGame || i.Browser.onQQMiniGame || i.Browser.onBLMiniGame) &amp;&amp; (t = !0),
                            i.Render.canvas.addEventListener(n.IOS_IFRAME ? t ? "touchend" : "click" : "touchend", n._popupInputMethod);
                    }
                }
            }, {
                key: "_popupInputMethod",
                value: function (t) {
                    n.isInputting &amp;&amp; n.inputElement.focus();
                }
            }, {
                key: "_createInputElement",
                value: function () {
                    n._initInput(n.area = i.Browser.createElement("textarea")), n._initInput(n.input = i.Browser.createElement("input")),
                        n.inputContainer = i.Browser.createElement("div"), n.inputContainer.style.position = "absolute",
                        n.inputContainer.style.zIndex = 1e5, i.Browser.container.appendChild(n.inputContainer),
                        n.inputContainer.setPos = function (t, e) {
                            n.inputContainer.style.left = t + "px", n.inputContainer.style.top = e + "px";
                        };
                }
            }, {
                key: "_initInput",
                value: function (t) {
                    var e = t.style;
                    e.cssText = "position:absolute;overflow:hidden;resize:none;transform-origin:0 0;-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-o-transform-origin:0 0;",
                        e.resize = "none", e.backgroundColor = "transparent", e.border = "none", e.outline = "none",
                        e.zIndex = 1, t.addEventListener("input", n._processInputting), t.addEventListener("mousemove", n._stopEvent),
                        t.addEventListener("mousedown", n._stopEvent), t.addEventListener("touchmove", n._stopEvent),
                        t.setFontFace = function (e) {
                            t.style.fontFamily = e;
                        }, i.Render.isConchApp || (t.setColor = function (e) {
                            t.style.color = e;
                        }, t.setFontSize = function (e) {
                            t.style.fontSize = e + "px";
                        });
                }
            }, {
                key: "_processInputting",
                value: function (t) {
                    var e = n.inputElement.target;
                    if (e) {
                        var i = n.inputElement.value;
                        e._restrictPattern &amp;&amp; (i = i.replace(/\u2006|\x27/g, ""), e._restrictPattern.test(i) &amp;&amp; (i = i.replace(e._restrictPattern, ""),
                            n.inputElement.value = i)), e._text = i, e.event(Gt.INPUT);
                    }
                }
            }, {
                key: "_stopEvent",
                value: function (t) {
                    "touchmove" == t.type &amp;&amp; t.preventDefault(), t.stopPropagation &amp;&amp; t.stopPropagation();
                }
            }]), n;
        }(be);
        we.TYPE_TEXT = "text", we.TYPE_PASSWORD = "password", we.TYPE_EMAIL = "email", we.TYPE_URL = "url",
            we.TYPE_NUMBER = "number", we.TYPE_RANGE = "range", we.TYPE_DATE = "date", we.TYPE_MONTH = "month",
            we.TYPE_WEEK = "week", we.TYPE_TIME = "time", we.TYPE_DATE_TIME = "datetime", we.TYPE_DATE_TIME_LOCAL = "datetime-local",
            we.TYPE_SEARCH = "search", we.IOS_IFRAME = !1, we.inputHeight = 45, we.isInputting = !1,
            ge.regClass("laya.display.Input", we), ge.regClass("Laya.Input", we);
        var Re = function () {
            function t() {
                _classCallCheck(this, t), this.preOvers = [], this.preDowns = [], this.preRightDowns = [],
                    this.enable = !0, this._event = new Gt(), this._lastClickTime = 0;
            }
            return _createClass(t, [{
                key: "_clearTempArrs",
                value: function () {
                    t._oldArr.length = 0, t._newArr.length = 0, t._tEleArr.length = 0;
                }
            }, {
                key: "getTouchFromArr",
                value: function (t, e) {
                    var i, n, r;
                    for (n = e.length, i = 0; i &lt; n; i++) if ((r = e[i]).id == t) return r;
                    return null;
                }
            }, {
                key: "removeTouchFromArr",
                value: function (t, e) {
                    var i;
                    for (i = e.length - 1; i &gt;= 0; i--) e[i].id == t &amp;&amp; e.splice(i, 1);
                }
            }, {
                key: "createTouchO",
                value: function (t, e) {
                    var i;
                    return (i = n.getItem("TouchData") || {}).id = e, i.tar = t, i;
                }
            }, {
                key: "onMouseDown",
                value: function (e, i) {
                    var n, r, s, a, o = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] &amp;&amp; arguments[2];
                    this.enable &amp;&amp; (n = this.getTouchFromArr(i, this.preOvers), s = this.getEles(e, null, t._tEleArr),
                        n ? n.tar = e : (r = this.createTouchO(e, i), this.preOvers.push(r)), zt.onMobile &amp;&amp; this.sendEvents(s, Gt.MOUSE_OVER),
                        a = o ? this.preDowns : this.preRightDowns, (n = this.getTouchFromArr(i, a)) ? n.tar = e : (r = this.createTouchO(e, i),
                            a.push(r)), this.sendEvents(s, o ? Gt.MOUSE_DOWN : Gt.RIGHT_MOUSE_DOWN), this._clearTempArrs());
                }
            }, {
                key: "sendEvents",
                value: function (t, e) {
                    var i, n, r;
                    for (n = t.length, this._event._stoped = !1, r = t[0], i = 0; i &lt; n; i++) {
                        var s = t[i];
                        if (s.destroyed) return;
                        if (s.event(e, this._event.setTo(e, s, r)), this._event._stoped) break;
                    }
                }
            }, {
                key: "getEles",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null;
                    for (i ? i.length = 0 : i = []; t &amp;&amp; t != e;) i.push(t), t = t.parent;
                    return i;
                }
            }, {
                key: "checkMouseOutAndOverOfMove",
                value: function (e, i) {
                    var n, r, s, a;
                    if (i != e) if (i.contains(e)) r = this.getEles(e, i, t._tEleArr), this.sendEvents(r, Gt.MOUSE_OVER); else if (e.contains(i)) r = this.getEles(i, e, t._tEleArr),
                        this.sendEvents(r, Gt.MOUSE_OUT); else {
                        var o, l, h;
                        for ((r = t._tEleArr).length = 0, o = this.getEles(i, null, t._oldArr), l = this.getEles(e, null, t._newArr),
                            a = o.length, s = 0; s &lt; a; s++) {
                            if (n = o[s], (h = l.indexOf(n)) &gt;= 0) {
                                l.splice(h, l.length - h);
                                break;
                            }
                            r.push(n);
                        }
                        r.length &gt; 0 &amp;&amp; this.sendEvents(r, Gt.MOUSE_OUT), l.length &gt; 0 &amp;&amp; this.sendEvents(l, Gt.MOUSE_OVER);
                    }
                }
            }, {
                key: "onMouseMove",
                value: function (e, i) {
                    var n, r;
                    this.enable &amp;&amp; ((n = this.getTouchFromArr(i, this.preOvers)) ? (this.checkMouseOutAndOverOfMove(e, n.tar),
                        n.tar = e, r = this.getEles(e, null, t._tEleArr)) : (r = this.getEles(e, null, t._tEleArr),
                            this.sendEvents(r, Gt.MOUSE_OVER), this.preOvers.push(this.createTouchO(e, i))),
                        this.sendEvents(r, Gt.MOUSE_MOVE), this._clearTempArrs());
                }
            }, {
                key: "getLastOvers",
                value: function () {
                    return t._tEleArr.length = 0, this.preOvers.length &gt; 0 &amp;&amp; this.preOvers[0].tar ? this.getEles(this.preOvers[0].tar, null, t._tEleArr) : (t._tEleArr.push(i.stage),
                        t._tEleArr);
                }
            }, {
                key: "stageMouseOut",
                value: function () {
                    var t;
                    t = this.getLastOvers(), this.preOvers.length = 0, this.sendEvents(t, Gt.MOUSE_OUT);
                }
            }, {
                key: "onMouseUp",
                value: function (e, i) {
                    var r = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] &amp;&amp; arguments[2];
                    if (this.enable) {
                        var s, a, o, l, h, u, c, _, d = zt.onMobile;
                        if (a = this.getEles(e, null, t._tEleArr), this.sendEvents(a, r ? Gt.MOUSE_UP : Gt.RIGHT_MOUSE_UP),
                            _ = r ? this.preDowns : this.preRightDowns, s = this.getTouchFromArr(i, _)) {
                            var f, v = zt.now();
                            if (f = v - this._lastClickTime &lt; 300, this._lastClickTime = v, e == s.tar) c = a; else for (o = this.getEles(s.tar, null, t._oldArr),
                                (c = t._newArr).length = 0, h = o.length, l = 0; l &lt; h; l++) u = o[l], a.indexOf(u) &gt;= 0 &amp;&amp; c.push(u);
                            c.length &gt; 0 &amp;&amp; this.sendEvents(c, r ? Gt.CLICK : Gt.RIGHT_CLICK), r &amp;&amp; f &amp;&amp; this.sendEvents(c, Gt.DOUBLE_CLICK),
                                this.removeTouchFromArr(i, _), s.tar = null, n.recover("TouchData", s);
                        } else;
                        (s = this.getTouchFromArr(i, this.preOvers)) &amp;&amp; d &amp;&amp; ((c = this.getEles(s.tar, null, c)) &amp;&amp; c.length &gt; 0 &amp;&amp; this.sendEvents(c, Gt.MOUSE_OUT),
                            this.removeTouchFromArr(i, this.preOvers), s.tar = null, n.recover("TouchData", s)),
                            this._clearTempArrs();
                    }
                }
            }]), t;
        }();
        Re.I = new Re(), Re._oldArr = [], Re._newArr = [], Re._tEleArr = [];
        var Ae = function () {
            function t() {
                _classCallCheck(this, t), this.mouseX = 0, this.mouseY = 0, this.disableMouseEvent = !1,
                    this.mouseDownTime = 0, this.mouseMoveAccuracy = 2, this._event = new Gt(), this._captureSp = null,
                    this._captureChain = [], this._captureExlusiveMode = !1, this._hitCaputreSp = !1,
                    this._point = new v(), this._rect = new p(), this._lastMoveTimer = 0, this._prePoint = new v(),
                    this._touchIDs = {}, this._curTouchID = NaN, this._id = 1;
            }
            return _createClass(t, [{
                key: "__init__",
                value: function (e, i) {
                    this._stage = e;
                    var n = this;
                    i.oncontextmenu = function (e) {
                        if (t.enabled) return !1;
                    }, i.addEventListener("mousedown", function (e) {
                        t.enabled &amp;&amp; (zt.onIE || e.cancelable &amp;&amp; e.preventDefault(), n.mouseDownTime = zt.now(),
                            n.runEvent(e));
                    }), i.addEventListener("mouseup", function (e) {
                        t.enabled &amp;&amp; (e.cancelable &amp;&amp; e.preventDefault(), n.mouseDownTime = -zt.now(), n.runEvent(e));
                    }, !0), i.addEventListener("mousemove", function (e) {
                        if (t.enabled) {
                            e.cancelable &amp;&amp; e.preventDefault();
                            var i = zt.now();
                            if (i - n._lastMoveTimer &lt; 10) return;
                            n._lastMoveTimer = i, n.runEvent(e);
                        }
                    }, !0), i.addEventListener("mouseout", function (e) {
                        t.enabled &amp;&amp; n.runEvent(e);
                    }), i.addEventListener("mouseover", function (e) {
                        t.enabled &amp;&amp; n.runEvent(e);
                    }), i.addEventListener("touchstart", function (e) {
                        t.enabled &amp;&amp; (t._isFirstTouch || we.isInputting || e.cancelable &amp;&amp; e.preventDefault(),
                            n.mouseDownTime = zt.now(), n.runEvent(e));
                    }), i.addEventListener("touchend", function (e) {
                        t.enabled ? (t._isFirstTouch || we.isInputting || e.cancelable &amp;&amp; e.preventDefault(),
                            t._isFirstTouch = !1, n.mouseDownTime = -zt.now(), n.runEvent(e)) : n._curTouchID = NaN;
                    }, !0), i.addEventListener("touchmove", function (e) {
                        t.enabled &amp;&amp; (e.cancelable &amp;&amp; e.preventDefault(), n.runEvent(e));
                    }, !0), i.addEventListener("touchcancel", function (e) {
                        t.enabled ? (e.cancelable &amp;&amp; e.preventDefault(), n.runEvent(e)) : n._curTouchID = NaN;
                    }, !0), i.addEventListener("mousewheel", function (e) {
                        t.enabled &amp;&amp; n.runEvent(e);
                    }), i.addEventListener("DOMMouseScroll", function (e) {
                        t.enabled &amp;&amp; n.runEvent(e);
                    });
                }
            }, {
                key: "initEvent",
                value: function (t) {
                    var e, i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, n = this;
                    n._event._stoped = !1, n._event.nativeEvent = i || t, n._target = null, this._point.setTo(t.pageX || t.clientX, t.pageY || t.clientY),
                        this._stage._canvasTransform &amp;&amp; (this._stage._canvasTransform.invertTransformPoint(this._point),
                            n.mouseX = this._point.x, n.mouseY = this._point.y), n._event.touchId = t.identifier || 0,
                        this._tTouchID = n._event.touchId, (e = Re.I._event)._stoped = !1, e.nativeEvent = n._event.nativeEvent,
                        e.touchId = n._event.touchId;
                }
            }, {
                key: "checkMouseWheel",
                value: function (t) {
                    this._event.delta = t.wheelDelta ? .025 * t.wheelDelta : -t.detail;
                    for (var e = Re.I.getLastOvers(), i = 0, n = e.length; i &lt; n; i++) {
                        var r = e[i];
                        r.event(Gt.MOUSE_WHEEL, this._event.setTo(Gt.MOUSE_WHEEL, r, this._target));
                    }
                }
            }, {
                key: "onMouseMove",
                value: function (t) {
                    Re.I.onMouseMove(t, this._tTouchID);
                }
            }, {
                key: "onMouseDown",
                value: function (t) {
                    if (we.isInputting &amp;&amp; i.stage.focus &amp;&amp; i.stage.focus.focus &amp;&amp; !i.stage.focus.contains(this._target)) {
                        var e = i.stage.focus._tf || i.stage.focus, n = t._tf || t;
                        n instanceof we &amp;&amp; n.multiline == e.multiline ? e._focusOut() : e.focus = !1;
                    }
                    Re.I.onMouseDown(t, this._tTouchID, this._isLeftMouse);
                }
            }, {
                key: "onMouseUp",
                value: function (t) {
                    Re.I.onMouseUp(t, this._tTouchID, this._isLeftMouse);
                }
            }, {
                key: "check",
                value: function (t, e, i, n) {
                    this._point.setTo(e, i), t.fromParentPoint(this._point), e = this._point.x, i = this._point.y;
                    var r = t._style.scrollRect;
                    if (r &amp;&amp; (this._rect.setTo(r.x, r.y, r.width, r.height), !this._rect.contains(e, i))) return !1;
                    if (!this.disableMouseEvent) {
                        if (t.hitTestPrior &amp;&amp; !t.mouseThrough &amp;&amp; !this.hitTest(t, e, i)) return !1;
                        for (var s = t._children.length - 1; s &gt; -1; s--) {
                            var a = t._children[s];
                            if (!a.destroyed &amp;&amp; a._mouseState &gt; 1 &amp;&amp; a._visible &amp;&amp; this.check(a, e, i, n)) return !0;
                        }
                        for (s = t._extUIChild.length - 1; s &gt;= 0; s--) {
                            var o = t._extUIChild[s];
                            if (!o.destroyed &amp;&amp; o._mouseState &gt; 1 &amp;&amp; o._visible &amp;&amp; this.check(o, e, i, n)) return !0;
                        }
                    }
                    var l = !(!t.hitTestPrior || t.mouseThrough || this.disableMouseEvent) || this.hitTest(t, e, i);
                    return l ? (this._target = t, n.call(this, t), this._target == this._hitCaputreSp &amp;&amp; (this._hitCaputreSp = !0)) : n === this.onMouseUp &amp;&amp; t === this._stage &amp;&amp; (this._target = this._stage,
                        n.call(this, this._target)), l;
                }
            }, {
                key: "hitTest",
                value: function (t, e, i) {
                    var n = !1;
                    t.scrollRect &amp;&amp; (e -= t._style.scrollRect.x, i -= t._style.scrollRect.y);
                    var r = t._style.hitArea;
                    return r &amp;&amp; r._hit ? r.contains(e, i) : ((t.width &gt; 0 &amp;&amp; t.height &gt; 0 || t.mouseThrough || r) &amp;&amp; (n = t.mouseThrough ? t.getGraphicBounds().contains(e, i) : (r || this._rect.setTo(0, 0, t.width, t.height)).contains(e, i)),
                        n);
                }
            }, {
                key: "_checkAllBaseUI",
                value: function (t, e, i) {
                    var n = this.handleExclusiveCapture(this.mouseX, this.mouseY, i);
                    return !!n || (n = this.check(this._stage, this.mouseX, this.mouseY, i), this.handleCapture(this.mouseX, this.mouseY, i) || n);
                }
            }, {
                key: "check3DUI",
                value: function (t, e, i) {
                    for (var n = this._stage._3dUI, r = 0, s = !1; r &lt; n.length; r++) {
                        var a = n[r];
                        this._stage._curUIBase = a, !a.destroyed &amp;&amp; a._mouseState &gt; 1 &amp;&amp; a._visible &amp;&amp; (s = s || this.check(a, this.mouseX, this.mouseY, i));
                    }
                    return this._stage._curUIBase = this._stage, s;
                }
            }, {
                key: "handleExclusiveCapture",
                value: function (t, e, i) {
                    if (this._captureExlusiveMode &amp;&amp; this._captureSp &amp;&amp; this._captureChain.length &gt; 0) {
                        var n;
                        this._point.setTo(t, e);
                        for (var r = 0; r &lt; this._captureChain.length; r++) (n = this._captureChain[r]).fromParentPoint(this._point);
                        return this._target = n, i.call(this, n), !0;
                    }
                    return !1;
                }
            }, {
                key: "handleCapture",
                value: function (t, e, i) {
                    if (!this._hitCaputreSp &amp;&amp; this._captureSp &amp;&amp; this._captureChain.length &gt; 0) {
                        var n;
                        this._point.setTo(t, e);
                        for (var r = 0; r &lt; this._captureChain.length; r++) (n = this._captureChain[r]).fromParentPoint(this._point);
                        return this._target = n, i.call(this, n), !0;
                    }
                    return !1;
                }
            }, {
                key: "runEvent",
                value: function (e) {
                    var i, n, r;
                    switch ("mousemove" !== e.type &amp;&amp; (this._prePoint.x = this._prePoint.y = -1e6),
                    e.type) {
                        case "mousedown":
                            this._touchIDs[0] = this._id++, t._isTouchRespond ? t._isTouchRespond = !1 : (this._isLeftMouse = 0 === e.button,
                                this.initEvent(e), this._checkAllBaseUI(this.mouseX, this.mouseY, this.onMouseDown));
                            break;

                        case "mouseup":
                            this._isLeftMouse = 0 === e.button, this.initEvent(e), this._checkAllBaseUI(this.mouseX, this.mouseY, this.onMouseUp);
                            break;

                        case "mousemove":
                            Math.abs(this._prePoint.x - e.clientX) + Math.abs(this._prePoint.y - e.clientY) &gt;= this.mouseMoveAccuracy &amp;&amp; (this._prePoint.x = e.clientX,
                                this._prePoint.y = e.clientY, this.initEvent(e), this._checkAllBaseUI(this.mouseX, this.mouseY, this.onMouseMove));
                            break;

                        case "touchstart":
                            t._isTouchRespond = !0, this._isLeftMouse = !0;
                            var s = e.changedTouches;
                            for (i = 0, n = s.length; i &lt; n; i++) r = s[i], (t.multiTouchEnabled || isNaN(this._curTouchID)) &amp;&amp; (this._curTouchID = r.identifier,
                                this._id % 200 == 0 &amp;&amp; (this._touchIDs = {}), this._touchIDs[r.identifier] = this._id++,
                                this.initEvent(r, e), this._checkAllBaseUI(this.mouseX, this.mouseY, this.onMouseDown));
                            break;

                        case "touchend":
                        case "touchcancel":
                            t._isTouchRespond = !0, this._isLeftMouse = !0;
                            var a = e.changedTouches;
                            for (i = 0, n = a.length; i &lt; n; i++) {
                                if (r = a[i], t.multiTouchEnabled || r.identifier == this._curTouchID) this._curTouchID = NaN,
                                    this.initEvent(r, e), this._checkAllBaseUI(this.mouseX, this.mouseY, this.onMouseUp) || this.onMouseUp(null);
                            }
                            break;

                        case "touchmove":
                            var o = e.changedTouches;
                            for (i = 0, n = o.length; i &lt; n; i++) r = o[i], (t.multiTouchEnabled || r.identifier == this._curTouchID) &amp;&amp; (this.initEvent(r, e),
                                this._checkAllBaseUI(this.mouseX, this.mouseY, this.onMouseMove));
                            break;

                        case "wheel":
                        case "mousewheel":
                        case "DOMMouseScroll":
                            this.checkMouseWheel(e);
                            break;

                        case "mouseout":
                            Re.I.stageMouseOut();
                            break;

                        case "mouseover":
                            this._stage.event(Gt.MOUSE_OVER, this._event.setTo(Gt.MOUSE_OVER, this._stage, this._stage));
                    }
                }
            }, {
                key: "setCapture",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1];
                    this._captureSp = t, this._captureExlusiveMode = e, this._captureChain.length = 0,
                        this._captureChain.push(t);
                    for (var n = t; n != i.stage &amp;&amp; n != i.stage._curUIBase &amp;&amp; (n = n.parent);) this._captureChain.splice(0, 0, n);
                }
            }, {
                key: "releaseCapture",
                value: function () {
                    console.log("release capture"), this._captureSp = null;
                }
            }]), t;
        }();
        Ae.instance = new Ae(), Ae.enabled = !0, Ae.multiTouchEnabled = !0, Ae._isFirstTouch = !0;
        var Se = function () {
            function t() {
                _classCallCheck(this, t), this._pool = [], this._map = {}, this._laters = [];
            }
            return _createClass(t, [{
                key: "_update",
                value: function () {
                    var t = this._laters, e = t.length;
                    if (e &gt; 0) {
                        for (var i = 0, n = e - 1; i &lt;= n; i++) {
                            var r = t[i];
                            this._map[r.key] = null, null !== r.method &amp;&amp; (r.run(), r.clear()), this._pool.push(r),
                                i === n &amp;&amp; (n = t.length - 1);
                        }
                        t.length = 0;
                    }
                }
            }, {
                key: "_getHandler",
                value: function (t, e) {
                    var n = t ? t.$_GID || (t.$_GID = i.Utils.getGID()) : 0, r = e.$_TID || (e.$_TID = i.Timer._mid++);
                    return this._map[n + "." + r];
                }
            }, {
                key: "callLater",
                value: function (t, e) {
                    var i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null;
                    if (null == this._getHandler(t, e)) {
                        var n;
                        (n = this._pool.length ? this._pool.pop() : new Me()).caller = t, n.method = e,
                            n.args = i;
                        var r = t ? t.$_GID : 0, s = e.$_TID;
                        n.key = r + "." + s, this._map[n.key] = n, this._laters.push(n);
                    }
                }
            }, {
                key: "runCallLater",
                value: function (t, e) {
                    var i = this._getHandler(t, e);
                    i &amp;&amp; null != i.method &amp;&amp; (this._map[i.key] = null, i.run(), i.clear());
                }
            }]), t;
        }();
        Se.I = new Se();
        var Me = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "clear",
                value: function () {
                    this.caller = null, this.method = null, this.args = null;
                }
            }, {
                key: "run",
                value: function () {
                    var t = this.caller;
                    if (t &amp;&amp; t.destroyed) return this.clear();
                    var e = this.method, i = this.args;
                    null != e &amp;&amp; (i ? e.apply(t, i) : e.call(t));
                }
            }]), t;
        }(), Ie = function t() {
            _classCallCheck(this, t);
        };
        Ie.createShaderCondition = function (t) {
            var e = "(function() {return " + t + ";})";
            return window.Laya._runScript(e);
        }, Ie.changeWebGLSize = function (t, e) {
            $t.onStageResize(t, e);
        };
        var Pe = function (t) {
            _inherits(r, t);
            var n = _createSuper(r);
            function r() {
                var t, i;
                _classCallCheck(this, r), (i = n.call(this)).offset = new v(), i._frameRate = "fast",
                    i.designWidth = 0, i.designHeight = 0, i.canvasRotation = !1, i.canvasDegree = 0,
                    i.renderingEnabled = !0, i.screenAdaptationEnabled = !0, i._canvasTransform = new f(),
                    i._screenMode = "none", i._scaleMode = "noscale", i._alignV = "top", i._alignH = "left",
                    i._bgColor = "black", i._mouseMoveTime = 0, i._renderCount = 0, i._safariOffsetY = 0,
                    i._frameStartTime = 0, i._previousOrientation = zt.window.orientation, i._wgColor = [0, 0, 0, 1],
                    i._scene3Ds = [], i._globalRepaintSet = !1, i._globalRepaintGet = !1, i._3dUI = [],
                    i._curUIBase = null, i.useRetinalCanvas = !1, _get((t = _assertThisInitialized(i),
                        _getPrototypeOf(r.prototype)), "set_transform", t).call(t, i._createTransform()),
                    i.mouseEnabled = !0, i.hitTestPrior = !0, i.autoSize = !1, i._setBit(de.DISPLAYED_INSTAGE, !0),
                    i._setBit(de.ACTIVE_INHIERARCHY, !0), i._isFocused = !0, i._isVisibility = !0, i.useRetinalCanvas = e.useRetinalCanvas;
                var s = zt.window;
                s.addEventListener("focus", function () {
                    i._isFocused = !0, i.event(Gt.FOCUS), i.event(Gt.FOCUS_CHANGE);
                }), s.addEventListener("blur", function () {
                    i._isFocused = !1, i.event(Gt.BLUR), i.event(Gt.FOCUS_CHANGE), i._isInputting() &amp;&amp; (we.inputElement.target.focus = !1);
                });
                var a = "visibilityState", o = "visibilitychange", l = s.document;
                return void 0 !== l.hidden ? (o = "visibilitychange", a = "visibilityState") : void 0 !== l.mozHidden ? (o = "mozvisibilitychange",
                    a = "mozVisibilityState") : void 0 !== l.msHidden ? (o = "msvisibilitychange", a = "msVisibilityState") : void 0 !== l.webkitHidden &amp;&amp; (o = "webkitvisibilitychange",
                        a = "webkitVisibilityState"), s.document.addEventListener(o, function () {
                            "hidden" == zt.document[a] ? (i._isVisibility = !1, i._isInputting() &amp;&amp; (we.inputElement.target.focus = !1)) : i._isVisibility = !0,
                                i.renderingEnabled = i._isVisibility, i.event(Gt.VISIBILITY_CHANGE);
                        }), s.addEventListener("resize", function () {
                            var t = zt.window.orientation;
                            null != t &amp;&amp; t != i._previousOrientation &amp;&amp; i._isInputting() &amp;&amp; (we.inputElement.target.focus = !1),
                                i._previousOrientation = t, i._isInputting() || (zt.onSafari &amp;&amp; (i._safariOffsetY = (zt.window.__innerHeight || zt.document.body.clientHeight || zt.document.documentElement.clientHeight) - zt.window.innerHeight),
                                    i._resetCanvas());
                        }), s.addEventListener("orientationchange", function (t) {
                            i._resetCanvas();
                        }), i.on(Gt.MOUSE_MOVE, _assertThisInitialized(i), i._onmouseMove), zt.onMobile &amp;&amp; i.on(Gt.MOUSE_DOWN, _assertThisInitialized(i), i._onmouseMove),
                    i;
            }
            return _createClass(r, [{
                key: "_isInputting",
                value: function () {
                    return zt.onMobile &amp;&amp; we.isInputting;
                }
            }, {
                key: "_changeCanvasSize",
                value: function () {
                    this.setScreenSize(zt.clientWidth * zt.pixelRatio, zt.clientHeight * zt.pixelRatio);
                }
            }, {
                key: "_resetCanvas",
                value: function () {
                    this.screenAdaptationEnabled &amp;&amp; this._changeCanvasSize();
                }
            }, {
                key: "setScreenSize",
                value: function (t, e) {
                    var i = !1;
                    if (this._screenMode !== r.SCREEN_NONE &amp;&amp; (i = (t / e &lt; 1 ? r.SCREEN_VERTICAL : r.SCREEN_HORIZONTAL) !== this._screenMode)) {
                        var n = e;
                        e = t, t = n;
                    }
                    this.canvasRotation = i;
                    var s = ee._mainCanvas, a = s.source.style, o = this._canvasTransform.identity(), l = this._scaleMode, h = t / this.designWidth, u = e / this.designHeight, c = this.useRetinalCanvas ? t : this.designWidth, _ = this.useRetinalCanvas ? e : this.designHeight, d = t, f = e, v = zt.pixelRatio;
                    switch (this._width = this.designWidth, this._height = this.designHeight, l) {
                        case r.SCALE_NOSCALE:
                            h = u = 1, d = this.designWidth, f = this.designHeight;
                            break;

                        case r.SCALE_SHOWALL:
                            h = u = Math.min(h, u), c = d = Math.round(this.designWidth * h), _ = f = Math.round(this.designHeight * u);
                            break;

                        case r.SCALE_NOBORDER:
                            h = u = Math.max(h, u), d = Math.round(this.designWidth * h), f = Math.round(this.designHeight * u);
                            break;

                        case r.SCALE_FULL:
                            h = u = 1, this._width = c = t, this._height = _ = e;
                            break;

                        case r.SCALE_FIXED_WIDTH:
                            u = h, this._height = _ = Math.round(e / h);
                            break;

                        case r.SCALE_FIXED_HEIGHT:
                            h = u, this._width = c = Math.round(t / u);
                            break;

                        case r.SCALE_FIXED_AUTO:
                            t / e &lt; this.designWidth / this.designHeight ? (u = h, this._height = _ = Math.round(e / h)) : (h = u,
                                this._width = c = Math.round(t / u));
                    }
                    this.useRetinalCanvas &amp;&amp; (d = c = t, f = _ = e), h *= this.scaleX, u *= this.scaleY,
                        1 === h &amp;&amp; 1 === u ? this.transform.identity() : (this.transform.a = this._formatData(h / (d / c)),
                            this.transform.d = this._formatData(u / (f / _))), s.size(c, _), Ie.changeWebGLSize(c, _),
                        o.scale(d / c / v, f / _ / v), this._alignH === r.ALIGN_LEFT ? this.offset.x = 0 : this._alignH === r.ALIGN_RIGHT ? this.offset.x = t - d : this.offset.x = .5 * (t - d) / v,
                        this._alignV === r.ALIGN_TOP ? this.offset.y = 0 : this._alignV === r.ALIGN_BOTTOM ? this.offset.y = e - f : this.offset.y = .5 * (e - f) / v,
                        this.offset.x = Math.round(this.offset.x), this.offset.y = Math.round(this.offset.y),
                        o.translate(this.offset.x, this.offset.y), this._safariOffsetY &amp;&amp; o.translate(0, this._safariOffsetY),
                        this.canvasDegree = 0, i &amp;&amp; (this._screenMode === r.SCREEN_HORIZONTAL ? (o.rotate(Math.PI / 2),
                            o.translate(e / v, 0), this.canvasDegree = 90) : (o.rotate(-Math.PI / 2), o.translate(0, t / v),
                                this.canvasDegree = -90)), o.a = this._formatData(o.a), o.d = this._formatData(o.d),
                        o.tx = this._formatData(o.tx), o.ty = this._formatData(o.ty), _get(_getPrototypeOf(r.prototype), "set_transform", this).call(this, this.transform),
                        a.transformOrigin = a.webkitTransformOrigin = a.msTransformOrigin = a.mozTransformOrigin = a.oTransformOrigin = "0px 0px 0px",
                        a.transform = a.webkitTransform = a.msTransform = a.mozTransform = a.oTransform = "matrix(" + o.toString() + ")",
                        this._safariOffsetY &amp;&amp; o.translate(0, -this._safariOffsetY), o.translate(parseInt(a.left) || 0, parseInt(a.top) || 0),
                        this.visible = !0, this._repaint |= se.REPAINT_CACHE, this.event(Gt.RESIZE);
                }
            }, {
                key: "_formatData",
                value: function (t) {
                    return Math.abs(t) &lt; 1e-6 ? 0 : Math.abs(1 - t) &lt; .001 ? t &gt; 0 ? 1 : -1 : t;
                }
            }, {
                key: "getMousePoint",
                value: function () {
                    return v.TEMP.setTo(this.mouseX, this.mouseY);
                }
            }, {
                key: "repaint",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : se.REPAINT_CACHE;
                    this._repaint |= t;
                }
            }, {
                key: "parentRepaint",
                value: function () { }
            }, {
                key: "_loop",
                value: function () {
                    return this._globalRepaintGet = this._globalRepaintSet, this._globalRepaintSet = !1,
                        this.render(ee._context, 0, 0), !0;
                }
            }, {
                key: "getFrameTm",
                value: function () {
                    return this._frameStartTime;
                }
            }, {
                key: "_onmouseMove",
                value: function (t) {
                    this._mouseMoveTime = zt.now();
                }
            }, {
                key: "getTimeFromFrameStart",
                value: function () {
                    return zt.now() - this._frameStartTime;
                }
            }, {
                key: "render",
                value: function (t, e, i) {
                    if (window.conch) this.renderToNative(t, e, i); else {
                        if (this._frameRate === r.FRAME_SLEEP) {
                            var n = zt.now();
                            if (!(n - this._frameStartTime &gt;= 1e3)) return;
                            this._frameStartTime = n;
                        } else {
                            if (!this._visible) return this._renderCount++, void (this._renderCount % 5 == 0 &amp;&amp; (Se.I._update(),
                                U.loopCount++, yt.loopCount = U.loopCount, this._updateTimers()));
                            this._frameStartTime = zt.now(), yt.loopStTm = this._frameStartTime;
                        }
                        this._renderCount++;
                        var s = (this._frameRate === r.FRAME_MOUSE ? this._frameStartTime - this._mouseMoveTime &lt; 2e3 ? r.FRAME_FAST : r.FRAME_SLOW : this._frameRate) !== r.FRAME_SLOW, a = this._renderCount % 2 == 0;
                        if (U.renderSlow = !s, s || a) {
                            if (Se.I._update(), U.loopCount++, yt.loopCount = U.loopCount, this.renderingEnabled) {
                                for (var o = 0, l = this._scene3Ds.length; o &lt; l; o++) this._scene3Ds[o]._update();
                                t.clear(), _get(_getPrototypeOf(r.prototype), "render", this).call(this, t, e, i),
                                    U._StatRender.renderNotCanvas(t, e, i);
                            }
                            this.renderingEnabled &amp;&amp; (r.clear(this._bgColor), t.flush(), ce.instance &amp;&amp; ce.getInstance().endDispose()),
                                this._updateTimers();
                        }
                    }
                }
            }, {
                key: "renderToNative",
                value: function (t, e, i) {
                    if (this._renderCount++, this._visible) {
                        if (Se.I._update(), U.loopCount++, yt.loopCount = U.loopCount, this.renderingEnabled) {
                            for (var n = 0, s = this._scene3Ds.length; n &lt; s; n++) this._scene3Ds[n]._update();
                            t.clear(), _get(_getPrototypeOf(r.prototype), "render", this).call(this, t, e, i),
                                U._StatRender.renderNotCanvas(t, e, i);
                        }
                        this.renderingEnabled &amp;&amp; (r.clear(this._bgColor), t.flush(), ce.instance &amp;&amp; ce.getInstance().endDispose()),
                            this._updateTimers();
                    } else this._renderCount % 5 == 0 &amp;&amp; (Se.I._update(), U.loopCount++, yt.loopCount = U.loopCount,
                        this._updateTimers());
                }
            }, {
                key: "_updateTimers",
                value: function () {
                    i.systemTimer._update(), i.startTimer._update(), i.physicsTimer._update(), i.updateTimer._update(),
                        i.lateTimer._update(), i.timer._update();
                }
            }, {
                key: "_requestFullscreen",
                value: function () {
                    var t = zt.document.documentElement;
                    t.requestFullscreen ? t.requestFullscreen() : t.mozRequestFullScreen ? t.mozRequestFullScreen() : t.webkitRequestFullscreen ? t.webkitRequestFullscreen() : t.msRequestFullscreen &amp;&amp; t.msRequestFullscreen();
                }
            }, {
                key: "_fullScreenChanged",
                value: function () {
                    i.stage.event(Gt.FULL_SCREEN_CHANGE);
                }
            }, {
                key: "exitFullscreen",
                value: function () {
                    var t = zt.document;
                    t.exitFullscreen ? t.exitFullscreen() : t.mozCancelFullScreen ? t.mozCancelFullScreen() : t.webkitExitFullscreen &amp;&amp; t.webkitExitFullscreen();
                }
            }, {
                key: "isGlobalRepaint",
                value: function () {
                    return this._globalRepaintGet;
                }
            }, {
                key: "setGlobalRepaint",
                value: function () {
                    this._globalRepaintSet = !0;
                }
            }, {
                key: "add3DUI",
                value: function (t) {
                    var e = t.rootView;
                    this._3dUI.indexOf(e) &gt;= 0 || this._3dUI.push(e);
                }
            }, {
                key: "remove3DUI",
                value: function (t) {
                    var e = t.rootView, i = this._3dUI.indexOf(e);
                    return i &gt;= 0 &amp;&amp; (this._3dUI.splice(i, 1), !0);
                }
            }, {
                key: "width",
                set: function (t) {
                    this.designWidth = t, _get(_getPrototypeOf(r.prototype), "set_width", this).call(this, t),
                        i.systemTimer.callLater(this, this._changeCanvasSize);
                },
                get: function () {
                    return _get(_getPrototypeOf(r.prototype), "get_width", this).call(this);
                }
            }, {
                key: "height",
                set: function (t) {
                    this.designHeight = t, _get(_getPrototypeOf(r.prototype), "set_height", this).call(this, t),
                        i.systemTimer.callLater(this, this._changeCanvasSize);
                },
                get: function () {
                    return _get(_getPrototypeOf(r.prototype), "get_height", this).call(this);
                }
            }, {
                key: "transform",
                set: function (t) {
                    _get(_getPrototypeOf(r.prototype), "set_transform", this).call(this, t);
                },
                get: function () {
                    return this._tfChanged &amp;&amp; this._adjustTransform(), this._transform = this._transform || this._createTransform();
                }
            }, {
                key: "isFocused",
                get: function () {
                    return this._isFocused;
                }
            }, {
                key: "isVisibility",
                get: function () {
                    return this._isVisibility;
                }
            }, {
                key: "scaleMode",
                get: function () {
                    return this._scaleMode;
                },
                set: function (t) {
                    this._scaleMode = t, i.systemTimer.callLater(this, this._changeCanvasSize);
                }
            }, {
                key: "alignH",
                get: function () {
                    return this._alignH;
                },
                set: function (t) {
                    this._alignH = t, i.systemTimer.callLater(this, this._changeCanvasSize);
                }
            }, {
                key: "alignV",
                get: function () {
                    return this._alignV;
                },
                set: function (t) {
                    this._alignV = t, i.systemTimer.callLater(this, this._changeCanvasSize);
                }
            }, {
                key: "bgColor",
                get: function () {
                    return this._bgColor;
                },
                set: function (t) {
                    this._bgColor = t, this._wgColor = t ? j.create(t).arrColor : null, ee.canvas.style.background = t || "none";
                }
            }, {
                key: "mouseX",
                get: function () {
                    return Math.round(Ae.instance.mouseX / this.clientScaleX);
                }
            }, {
                key: "mouseY",
                get: function () {
                    return Math.round(Ae.instance.mouseY / this.clientScaleY);
                }
            }, {
                key: "clientScaleX",
                get: function () {
                    return this._transform ? this._transform.getScaleX() : 1;
                }
            }, {
                key: "clientScaleY",
                get: function () {
                    return this._transform ? this._transform.getScaleY() : 1;
                }
            }, {
                key: "screenMode",
                get: function () {
                    return this._screenMode;
                },
                set: function (t) {
                    this._screenMode = t;
                }
            }, {
                key: "visible",
                set: function (t) {
                    this.visible !== t &amp;&amp; (_get(_getPrototypeOf(r.prototype), "set_visible", this).call(this, t),
                        ee._mainCanvas.source.style.visibility = t ? "visible" : "hidden");
                },
                get: function () {
                    return _get(_getPrototypeOf(r.prototype), "visible", this);
                }
            }, {
                key: "fullScreenEnabled",
                set: function (t) {
                    var e = zt.document, i = ee.canvas;
                    t ? (i.addEventListener("mousedown", this._requestFullscreen), i.addEventListener("touchstart", this._requestFullscreen),
                        e.addEventListener("fullscreenchange", this._fullScreenChanged), e.addEventListener("mozfullscreenchange", this._fullScreenChanged),
                        e.addEventListener("webkitfullscreenchange", this._fullScreenChanged), e.addEventListener("msfullscreenchange", this._fullScreenChanged)) : (i.removeEventListener("mousedown", this._requestFullscreen),
                            i.removeEventListener("touchstart", this._requestFullscreen), e.removeEventListener("fullscreenchange", this._fullScreenChanged),
                            e.removeEventListener("mozfullscreenchange", this._fullScreenChanged), e.removeEventListener("webkitfullscreenchange", this._fullScreenChanged),
                            e.removeEventListener("msfullscreenchange", this._fullScreenChanged));
                }
            }, {
                key: "frameRate",
                get: function () {
                    return i.Render.isConchApp ? this._frameRateNative : this._frameRate;
                },
                set: function (t) {
                    if (i.Render.isConchApp) {
                        var e = window.conch;
                        switch (t) {
                            case r.FRAME_FAST:
                                e.config.setLimitFPS(60);
                                break;

                            case r.FRAME_MOUSE:
                                e.config.setMouseFrame(2e3);
                                break;

                            case r.FRAME_SLOW:
                                e.config.setSlowFrame(!0);
                                break;

                            case r.FRAME_SLEEP:
                                e.config.setLimitFPS(1);
                        }
                        this._frameRateNative = t;
                    } else this._frameRate = t;
                }
            }]), r;
        }(Ce);
        Pe.SCALE_NOSCALE = "noscale", Pe.SCALE_EXACTFIT = "exactfit", Pe.SCALE_SHOWALL = "showall",
            Pe.SCALE_NOBORDER = "noborder", Pe.SCALE_FULL = "full", Pe.SCALE_FIXED_WIDTH = "fixedwidth",
            Pe.SCALE_FIXED_HEIGHT = "fixedheight", Pe.SCALE_FIXED_AUTO = "fixedauto", Pe.ALIGN_LEFT = "left",
            Pe.ALIGN_RIGHT = "right", Pe.ALIGN_CENTER = "center", Pe.ALIGN_TOP = "top", Pe.ALIGN_MIDDLE = "middle",
            Pe.ALIGN_BOTTOM = "bottom", Pe.SCREEN_NONE = "none", Pe.SCREEN_HORIZONTAL = "horizontal",
            Pe.SCREEN_VERTICAL = "vertical", Pe.FRAME_FAST = "fast", Pe.FRAME_SLOW = "slow",
            Pe.FRAME_MOUSE = "mouse", Pe.FRAME_SLEEP = "sleep", Pe.clear = function (t) {
                Qt.set2DRenderConfig();
                var n = y.instance;
                L.worldScissorTest &amp;&amp; n.disable(n.SCISSOR_TEST);
                var r = ee.context, s = 0 == r._submits._length || e.preserveDrawingBuffer ? j.create(t).arrColor : i.stage._wgColor;
                s ? r.clearBG(s[0], s[1], s[2], s[3]) : r.clearBG(0, 0, 0, 0), L.clear();
            }, ge.regClass("laya.display.Stage", Pe), ge.regClass("Laya.Stage", Pe);
        var Le = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "__init__",
                value: function () {
                    t._addEvent("keydown"), t._addEvent("keypress"), t._addEvent("keyup");
                }
            }, {
                key: "_addEvent",
                value: function (e) {
                    i.Browser.document.addEventListener(e, function (i) {
                        t._dispatch(i, e);
                    }, !0);
                }
            }, {
                key: "_dispatch",
                value: function (e, n) {
                    if (t.enabled) {
                        t._event._stoped = !1, t._event.nativeEvent = e, t._event.keyCode = e.keyCode || e.which || e.charCode,
                            "keydown" === n ? t._pressKeys[t._event.keyCode] = !0 : "keyup" === n &amp;&amp; (t._pressKeys[t._event.keyCode] = null);
                        for (var r = i.stage.focus &amp;&amp; null != i.stage.focus.event &amp;&amp; i.stage.focus.displayedInStage ? i.stage.focus : i.stage, s = r; s;) s.event(n, t._event.setTo(n, s, r)),
                            s = s.parent;
                    }
                }
            }, {
                key: "hasKeyDown",
                value: function (e) {
                    return t._pressKeys[e];
                }
            }]), t;
        }();
        Le._pressKeys = {}, Le.enabled = !0, Le._event = new Gt();
        var De = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.apply(this, arguments)).isStopped = !1,
                    t;
            }
            return _createClass(i, [{
                key: "play",
                value: function () { }
            }, {
                key: "stop",
                value: function () {
                    this.completeHandler &amp;&amp; this.completeHandler.run();
                }
            }, {
                key: "pause",
                value: function () { }
            }, {
                key: "resume",
                value: function () { }
            }, {
                key: "__runComplete",
                value: function (t) {
                    t &amp;&amp; t.run();
                }
            }, {
                key: "volume",
                set: function (t) { },
                get: function () {
                    return 1;
                }
            }, {
                key: "position",
                get: function () {
                    return 0;
                }
            }, {
                key: "duration",
                get: function () {
                    return 0;
                }
            }]), i;
        }(T), Oe = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n(t) {
                var i;
                return _classCallCheck(this, n), (i = e.call(this))._audio = null, i._onEnd = i.__onEnd.bind(_assertThisInitialized(i)),
                    i._resumePlay = i.__resumePlay.bind(_assertThisInitialized(i)), t.addEventListener("ended", i._onEnd),
                    i._audio = t, i;
            }
            return _createClass(n, [{
                key: "__onEnd",
                value: function (t) {
                    if (1 == this.loops) return this.completeHandler &amp;&amp; (i.systemTimer.once(10, this, this.__runComplete, [this.completeHandler], !1),
                        this.completeHandler = null), this.stop(), void this.event(Gt.COMPLETE);
                    this.loops &gt; 0 &amp;&amp; this.loops--, this.startTime = 0, this.play();
                }
            }, {
                key: "__resumePlay",
                value: function () {
                    if (this._audio &amp;&amp; this._audio.removeEventListener("canplay", this._resumePlay),
                        !this.isStopped) try {
                            this._audio.currentTime = this.startTime, zt.container.appendChild(this._audio),
                                this._audio.play();
                        } catch (t) {
                            this.event(Gt.ERROR);
                        }
                }
            }, {
                key: "play",
                value: function () {
                    this.isStopped = !1;
                    try {
                        this._audio.playbackRate = i.SoundManager.playbackRate, this._audio.currentTime = this.startTime;
                    } catch (t) {
                        return void this._audio.addEventListener("canplay", this._resumePlay);
                    }
                    i.SoundManager.addChannel(this), zt.container.appendChild(this._audio), "play" in this._audio &amp;&amp; this._audio.play();
                }
            }, {
                key: "stop",
                value: function () {
                    _get(_getPrototypeOf(n.prototype), "stop", this).call(this), this.isStopped = !0,
                        i.SoundManager.removeChannel(this), this.completeHandler = null, this._audio &amp;&amp; ("pause" in this._audio &amp;&amp; i.Render.isConchApp &amp;&amp; this._audio.stop(),
                            this._audio.pause(), this._audio.removeEventListener("ended", this._onEnd), this._audio.removeEventListener("canplay", this._resumePlay),
                            i.Browser.onIE || this._audio != i.AudioSound._musicAudio &amp;&amp; i.Pool.recover("audio:" + this.url, this._audio),
                            zt.removeElement(this._audio), this._audio = null, i.SoundManager.autoReleaseSound &amp;&amp; i.SoundManager.disposeSoundLater(this.url));
                }
            }, {
                key: "pause",
                value: function () {
                    this.isStopped = !0, i.SoundManager.removeChannel(this), "pause" in this._audio &amp;&amp; this._audio.pause(),
                        i.SoundManager.autoReleaseSound &amp;&amp; i.SoundManager.disposeSoundLater(this.url);
                }
            }, {
                key: "resume",
                value: function () {
                    var t = this._audio;
                    t &amp;&amp; (this.isStopped = !1, 0 == t.readyState &amp;&amp; (t.src = this.url, t.addEventListener("canplay", this._resumePlay),
                        t.load()), i.SoundManager.addChannel(this), "play" in t &amp;&amp; t.play());
                }
            }, {
                key: "position",
                get: function () {
                    return this._audio ? this._audio.currentTime : 0;
                }
            }, {
                key: "duration",
                get: function () {
                    return this._audio ? this._audio.duration : 0;
                }
            }, {
                key: "volume",
                set: function (t) {
                    this._audio &amp;&amp; (this._audio.volume = t);
                },
                get: function () {
                    return this._audio ? this._audio.volume : 1;
                }
            }]), n;
        }(De), Be = function (t) {
            _inherits(r, t);
            var e = _createSuper(r);
            function r() {
                var t;
                return _classCallCheck(this, r), (t = e.apply(this, arguments)).loaded = !1, t;
            }
            return _createClass(r, [{
                key: "dispose",
                value: function () {
                    var t = r._audioCache[this.url];
                    n.clearBySign("audio:" + this.url), t &amp;&amp; (ee.isConchApp || (t.src = ""), delete r._audioCache[this.url]);
                }
            }, {
                key: "load",
                value: function (t) {
                    var e;
                    if (t = x.formatURL(t), this.url = t, t == i.SoundManager._bgMusic ? (r._initMusicAudio(),
                        (e = r._musicAudio).src != t &amp;&amp; (r._audioCache[e.src] = null, e = null)) : e = r._audioCache[t],
                        e &amp;&amp; e.readyState &gt;= 2) this.event(Gt.COMPLETE); else {
                        e || (t == i.SoundManager._bgMusic ? (r._initMusicAudio(), e = r._musicAudio) : e = zt.createElement("audio"),
                            r._audioCache[t] = e, e.src = t), e.addEventListener("canplaythrough", s), e.addEventListener("error", a);
                        var n = this;
                        this.audio = e, e.load ? e.load() : a();
                    }
                    function s() {
                        o(), n.loaded = !0, n.event(Gt.COMPLETE);
                    }
                    function a() {
                        e.load = null, o(), n.event(Gt.ERROR);
                    }
                    function o() {
                        e.removeEventListener("canplaythrough", s), e.removeEventListener("error", a);
                    }
                }
            }, {
                key: "play",
                value: function () {
                    var t, e, s = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, a = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0;
                    if (!this.url) return null;
                    if (!(t = this.url == i.SoundManager._bgMusic ? r._musicAudio : r._audioCache[this.url])) return null;
                    e = n.getItem("audio:" + this.url), ee.isConchApp ? e || ((e = zt.createElement("audio")).src = this.url) : this.url == i.SoundManager._bgMusic ? (r._initMusicAudio(),
                        (e = r._musicAudio).src = this.url) : e = e || t.cloneNode(!0);
                    var o = new Oe(e);
                    return o.url = this.url, o.loops = a, o.startTime = s, o.play(), i.SoundManager.addChannel(o),
                        o;
                }
            }, {
                key: "duration",
                get: function () {
                    var t;
                    return (t = r._audioCache[this.url]) ? t.duration : 0;
                }
            }], [{
                key: "_initMusicAudio",
                value: function () {
                    r._musicAudio || (r._musicAudio || (r._musicAudio = zt.createElement("audio")),
                        ee.isConchApp || zt.document.addEventListener("mousedown", r._makeMusicOK));
                }
            }, {
                key: "_makeMusicOK",
                value: function () {
                    zt.document.removeEventListener("mousedown", r._makeMusicOK), r._musicAudio.src ? r._musicAudio.play() : (r._musicAudio.src = "",
                        r._musicAudio.load());
                }
            }]), r;
        }(T);
        Be._audioCache = {};
        var Fe = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                var t;
                return _classCallCheck(this, n), (t = e.call(this)).bufferSource = null, t._currentTime = 0,
                    t._volume = 1, t._startTime = 0, t._pauseTime = 0, t.context = i.WebAudioSound.ctx,
                    t._onPlayEnd = K.bind(t.__onPlayEnd, _assertThisInitialized(t)), t.context.createGain ? t.gain = t.context.createGain() : t.gain = t.context.createGainNode(),
                    t;
            }
            return _createClass(n, [{
                key: "play",
                value: function () {
                    if (i.SoundManager.addChannel(this), this.isStopped = !1, this._clearBufferSource(),
                        this.audioBuffer) {
                        if (this.startTime &gt;= this.duration) return stop();
                        var t = this.context, e = this.gain, r = t.createBufferSource();
                        this.bufferSource = r, r.buffer = this.audioBuffer, r.connect(e), e &amp;&amp; e.disconnect(),
                            e.connect(t.destination), r.onended = this._onPlayEnd, this._startTime = zt.now(),
                            this.gain.gain.setTargetAtTime ? this.gain.gain.setTargetAtTime(this._volume, this.context.currentTime, n.SetTargetDelay) : this.gain.gain.value = this._volume,
                            0 == this.loops &amp;&amp; (r.loop = !0), r.playbackRate.setTargetAtTime ? r.playbackRate.setTargetAtTime(i.SoundManager.playbackRate, this.context.currentTime, n.SetTargetDelay) : r.playbackRate.value = i.SoundManager.playbackRate,
                            r.start(0, this.startTime), this._currentTime = 0;
                    }
                }
            }, {
                key: "__onPlayEnd",
                value: function () {
                    if (1 == this.loops) return this.completeHandler &amp;&amp; (i.timer.once(10, this, this.__runComplete, [this.completeHandler], !1),
                        this.completeHandler = null), this.stop(), void this.event(Gt.COMPLETE);
                    this.loops &gt; 0 &amp;&amp; this.loops--, this.startTime = 0, this.play();
                }
            }, {
                key: "_clearBufferSource",
                value: function () {
                    if (this.bufferSource) {
                        var t = this.bufferSource;
                        t.stop ? t.stop(0) : t.noteOff(0), t.disconnect(0), t.onended = null, n._tryCleanFailed || this._tryClearBuffer(t),
                            this.bufferSource = null;
                    }
                }
            }, {
                key: "_tryClearBuffer",
                value: function (t) {
                    if (zt.onMac) try {
                        t.buffer = i.WebAudioSound._miniBuffer;
                    } catch (t) {
                        n._tryCleanFailed = !0;
                    } else try {
                        t.buffer = null;
                    } catch (t) {
                        n._tryCleanFailed = !0;
                    }
                }
            }, {
                key: "stop",
                value: function () {
                    _get(_getPrototypeOf(n.prototype), "stop", this).call(this), this._clearBufferSource(),
                        this.audioBuffer = null, this.gain &amp;&amp; this.gain.disconnect(), this.isStopped = !0,
                        i.SoundManager.removeChannel(this), this.completeHandler = null, i.SoundManager.autoReleaseSound &amp;&amp; i.SoundManager.disposeSoundLater(this.url);
                }
            }, {
                key: "pause",
                value: function () {
                    this.isStopped || (this._pauseTime = this.position), this._clearBufferSource(),
                        this.gain &amp;&amp; this.gain.disconnect(), this.isStopped = !0, i.SoundManager.removeChannel(this),
                        i.SoundManager.autoReleaseSound &amp;&amp; i.SoundManager.disposeSoundLater(this.url);
                }
            }, {
                key: "resume",
                value: function () {
                    this.startTime = this._pauseTime, this.play();
                }
            }, {
                key: "position",
                get: function () {
                    return this.bufferSource ? (zt.now() - this._startTime) / 1e3 + this.startTime : 0;
                }
            }, {
                key: "duration",
                get: function () {
                    return this.audioBuffer ? this.audioBuffer.duration : 0;
                }
            }, {
                key: "volume",
                set: function (t) {
                    this._volume = t, this.isStopped || (this.gain.gain.setTargetAtTime ? this.gain.gain.setTargetAtTime(t, this.context.currentTime, n.SetTargetDelay) : this.gain.gain.value = t);
                },
                get: function () {
                    return this._volume;
                }
            }]), n;
        }(De);
        Fe._tryCleanFailed = !1, Fe.SetTargetDelay = .001;
        var Ne = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                var t;
                return _classCallCheck(this, n), (t = e.apply(this, arguments)).loaded = !1, t._disposed = !1,
                    t;
            }
            return _createClass(n, [{
                key: "load",
                value: function (t) {
                    var e = this;
                    if (t = x.formatURL(t), this.url = t, this.audioBuffer = n._dataCache[t], this.audioBuffer) this._loaded(this.audioBuffer); else if (n.e.on("loaded:" + t, this, this._loaded),
                        n.e.on("err:" + t, this, this._err), !n.__loadingSound[t]) {
                        n.__loadingSound[t] = !0;
                        var i = new XMLHttpRequest();
                        i.open("GET", t, !0), i.responseType = "arraybuffer", i.onload = function () {
                            e._disposed ? e._removeLoadEvents() : (e.data = i.response, n.buffs.push({
                                buffer: e.data,
                                url: e.url
                            }), n.decode());
                        }, i.onerror = function (t) {
                            e._err();
                        }, i.send();
                    }
                }
            }, {
                key: "_err",
                value: function () {
                    this._removeLoadEvents(), n.__loadingSound[this.url] = !1, this.event(Gt.ERROR);
                }
            }, {
                key: "_loaded",
                value: function (t) {
                    this._removeLoadEvents(), this._disposed || (this.audioBuffer = t, n._dataCache[this.url] = this.audioBuffer,
                        this.loaded = !0, this.event(Gt.COMPLETE));
                }
            }, {
                key: "_removeLoadEvents",
                value: function () {
                    n.e.off("loaded:" + this.url, this, this._loaded), n.e.off("err:" + this.url, this, this._err);
                }
            }, {
                key: "__playAfterLoaded",
                value: function () {
                    if (this.__toPlays) {
                        var t, e, i, n;
                        for (e = (i = this.__toPlays).length, t = 0; t &lt; e; t++) (n = i[t])[2] &amp;&amp; !n[2].isStopped &amp;&amp; this.play(n[0], n[1], n[2]);
                        this.__toPlays.length = 0;
                    }
                }
            }, {
                key: "play",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null;
                    return n = n || new Fe(), this.audioBuffer || this.url &amp;&amp; (this.__toPlays || (this.__toPlays = []),
                        this.__toPlays.push([t, e, n]), this.once(Gt.COMPLETE, this, this.__playAfterLoaded),
                        this.load(this.url)), n.url = this.url, n.loops = e, n.audioBuffer = this.audioBuffer,
                        n.startTime = t, n.play(), i.SoundManager.addChannel(n), n;
                }
            }, {
                key: "dispose",
                value: function () {
                    this._disposed = !0, delete n._dataCache[this.url], delete n.__loadingSound[this.url],
                        this.audioBuffer = null, this.data = null, this.__toPlays = [];
                }
            }, {
                key: "duration",
                get: function () {
                    return this.audioBuffer ? this.audioBuffer.duration : 0;
                }
            }], [{
                key: "decode",
                value: function () {
                    n.buffs.length &lt;= 0 || n.isDecoding || (n.isDecoding = !0, n.tInfo = n.buffs.shift(),
                        n.ctx.decodeAudioData(n.tInfo.buffer, n._done, n._fail));
                }
            }, {
                key: "_done",
                value: function (t) {
                    n.e.event("loaded:" + n.tInfo.url, t), n.isDecoding = !1, n.decode();
                }
            }, {
                key: "_fail",
                value: function () {
                    n.e.event("err:" + n.tInfo.url, null), n.isDecoding = !1, n.decode();
                }
            }, {
                key: "_playEmptySound",
                value: function () {
                    if (null != n.ctx) {
                        var t = n.ctx.createBufferSource();
                        t.buffer = n._miniBuffer, t.connect(n.ctx.destination), t.start(0, 0, 0);
                    }
                }
            }, {
                key: "_unlock",
                value: function () {
                    n._unlocked || (n._playEmptySound(), "running" == n.ctx.state &amp;&amp; (window.document.removeEventListener("mousedown", n._unlock, !0),
                        window.document.removeEventListener("touchend", n._unlock, !0), window.document.removeEventListener("touchstart", n._unlock, !0),
                        n._unlocked = !0));
                }
            }, {
                key: "initWebAudio",
                value: function () {
                    "running" != n.ctx.state &amp;&amp; (n._unlock(), window.document.addEventListener("mousedown", n._unlock, !0),
                        window.document.addEventListener("touchend", n._unlock, !0), window.document.addEventListener("touchstart", n._unlock, !0));
                }
            }]), n;
        }(T);
        Ne._dataCache = {}, Ne.webAudioEnabled = window.AudioContext || window.webkitAudioContext || window.mozAudioContext,
            Ne.ctx = Ne.webAudioEnabled ? new (window.AudioContext || window.webkitAudioContext || window.mozAudioContext)() : void 0,
            Ne.buffs = [], Ne.isDecoding = !1, Ne._miniBuffer = Ne.ctx ? Ne.ctx.createBuffer(1, 1, 22050) : void 0,
            Ne.e = new T(), Ne._unlocked = !1, Ne.__loadingSound = {};
        var Ue = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "__init__",
                value: function () {
                    var e = i.Browser.window, n = !!(e.AudioContext || e.webkitAudioContext || e.mozAudioContext);
                    return n &amp;&amp; Ne.initWebAudio(), t._soundClass = n ? Ne : Be, Be._initMusicAudio(),
                        t._musicClass = Be, n;
                }
            }, {
                key: "addChannel",
                value: function (e) {
                    t._channels.indexOf(e) &gt;= 0 || t._channels.push(e);
                }
            }, {
                key: "removeChannel",
                value: function (e) {
                    var i;
                    for (i = t._channels.length - 1; i &gt;= 0; i--) t._channels[i] == e &amp;&amp; t._channels.splice(i, 1);
                }
            }, {
                key: "disposeSoundLater",
                value: function (e) {
                    t._lastSoundUsedTimeDic[e] = i.Browser.now(), t._isCheckingDispose || (t._isCheckingDispose = !0,
                        i.timer.loop(5e3, null, t._checkDisposeSound));
                }
            }, {
                key: "_checkDisposeSound",
                value: function () {
                    var e, n = i.Browser.now(), r = !1;
                    for (e in t._lastSoundUsedTimeDic) n - t._lastSoundUsedTimeDic[e] &gt; 3e4 ? (delete t._lastSoundUsedTimeDic[e],
                        t.disposeSoundIfNotUsed(e)) : r = !0;
                    r || (t._isCheckingDispose = !1, i.timer.clear(null, t._checkDisposeSound));
                }
            }, {
                key: "disposeSoundIfNotUsed",
                value: function (e) {
                    var i;
                    for (i = t._channels.length - 1; i &gt;= 0; i--) if (t._channels[i].url == e) return;
                    t.destroySound(e);
                }
            }, {
                key: "_visibilityChange",
                value: function () {
                    i.stage.isVisibility ? t._stageOnFocus() : t._stageOnBlur();
                }
            }, {
                key: "_stageOnBlur",
                value: function () {
                    t._isActive = !1, t._musicChannel &amp;&amp; (t._musicChannel.isStopped || (t._blurPaused = !0,
                        t._musicChannel.pause())), t.stopAllSound(), i.stage.once(Gt.MOUSE_DOWN, null, t._stageOnFocus);
                }
            }, {
                key: "_recoverWebAudio",
                value: function () {
                    Ne.ctx &amp;&amp; "running" != Ne.ctx.state &amp;&amp; Ne.ctx.resume &amp;&amp; Ne.ctx.resume();
                }
            }, {
                key: "_stageOnFocus",
                value: function () {
                    t._isActive = !0, t._recoverWebAudio(), i.stage.off(Gt.MOUSE_DOWN, null, t._stageOnFocus),
                        t._blurPaused &amp;&amp; t._musicChannel &amp;&amp; t._musicChannel.isStopped &amp;&amp; (t._blurPaused = !1,
                            t._musicChannel.resume());
                }
            }, {
                key: "playSound",
                value: function (e) {
                    var n, r, s = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 1, a = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, o = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, l = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0;
                    if (!t._isActive || !e) return null;
                    if (t._muted) return null;
                    if (t._recoverWebAudio(), (e = x.formatURL(e)) == t._bgMusic) {
                        if (t._musicMuted) return null;
                    } else {
                        if (i.Render.isConchApp) {
                            var h = K.getFileExtension(e);
                            if ("wav" != h &amp;&amp; "ogg" != h) return alert("The sound only supports wav or ogg format,for optimal performance reason,please refer to the official website document."),
                                null;
                        }
                        if (t._soundMuted) return null;
                    }
                    return i.Browser.onBDMiniGame || i.Browser.onMiniGame || i.Browser.onKGMiniGame || i.Browser.onQGMiniGame || i.Browser.onVVMiniGame || i.Browser.onAlipayMiniGame || i.Browser.onQQMiniGame || i.Browser.onBLMiniGame || (n = i.loader.getRes(e)),
                        o || (o = t._soundClass), n || ((n = new o()).load(e), i.Browser.onBDMiniGame || i.Browser.onMiniGame || i.Browser.onKGMiniGame || i.Browser.onQGMiniGame || i.Browser.onVVMiniGame || i.Browser.onAlipayMiniGame || i.Browser.onQQMiniGame || i.Browser.onBLMiniGame || i.Loader.cacheRes(e, n)),
                        (r = n.play(l, s)) ? (r.url = e, r.volume = e == t._bgMusic ? t.musicVolume : t.soundVolume,
                            r.completeHandler = a, r) : null;
                }
            }, {
                key: "destroySound",
                value: function (t) {
                    var e = i.loader.getRes(t);
                    e &amp;&amp; (i.Loader.clearRes(t), e.dispose());
                }
            }, {
                key: "playMusic",
                value: function (e) {
                    var i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 0;
                    return e = x.formatURL(e), t._bgMusic = e, t._musicChannel &amp;&amp; t._musicChannel.stop(),
                        t._musicChannel = t.playSound(e, i, n, t._musicClass, r);
                }
            }, {
                key: "stopSound",
                value: function (e) {
                    var i, n;
                    for (e = x.formatURL(e), i = t._channels.length - 1; i &gt;= 0; i--) (n = t._channels[i]).url == e &amp;&amp; n.stop();
                }
            }, {
                key: "stopAll",
                value: function () {
                    var e;
                    for (t._bgMusic = null, e = t._channels.length - 1; e &gt;= 0; e--) t._channels[e].stop();
                }
            }, {
                key: "stopAllSound",
                value: function () {
                    var e, i;
                    for (e = t._channels.length - 1; e &gt;= 0; e--) (i = t._channels[e]).url != t._bgMusic &amp;&amp; i.stop();
                }
            }, {
                key: "stopMusic",
                value: function () {
                    t._musicChannel &amp;&amp; t._musicChannel.stop(), t._bgMusic = null;
                }
            }, {
                key: "setSoundVolume",
                value: function (e) {
                    var i, n, r = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    if (r) r = x.formatURL(r), t._setVolume(r, e); else for (t.soundVolume = e, i = t._channels.length - 1; i &gt;= 0; i--) (n = t._channels[i]).url != t._bgMusic &amp;&amp; (n.volume = e);
                }
            }, {
                key: "setMusicVolume",
                value: function (e) {
                    t.musicVolume = e, t._setVolume(t._bgMusic, e);
                }
            }, {
                key: "_setVolume",
                value: function (e, i) {
                    var n, r;
                    for (e = x.formatURL(e), n = t._channels.length - 1; n &gt;= 0; n--) (r = t._channels[n]).url == e &amp;&amp; (r.volume = i);
                }
            }, {
                key: "autoStopMusic",
                set: function (e) {
                    i.stage.off(Gt.BLUR, null, t._stageOnBlur), i.stage.off(Gt.FOCUS, null, t._stageOnFocus),
                        i.stage.off(Gt.VISIBILITY_CHANGE, null, t._visibilityChange), t._autoStopMusic = e,
                        e &amp;&amp; (i.stage.on(Gt.BLUR, null, t._stageOnBlur), i.stage.on(Gt.FOCUS, null, t._stageOnFocus),
                            i.stage.on(Gt.VISIBILITY_CHANGE, null, t._visibilityChange));
                },
                get: function () {
                    return t._autoStopMusic;
                }
            }, {
                key: "muted",
                set: function (e) {
                    e != t._muted &amp;&amp; (e &amp;&amp; t.stopAllSound(), t.musicMuted = e, t._muted = e);
                },
                get: function () {
                    return t._muted;
                }
            }, {
                key: "soundMuted",
                set: function (e) {
                    t._soundMuted = e;
                },
                get: function () {
                    return t._soundMuted;
                }
            }, {
                key: "musicMuted",
                set: function (e) {
                    e != t._musicMuted &amp;&amp; (e ? (t._bgMusic &amp;&amp; t._musicChannel &amp;&amp; !t._musicChannel.isStopped ? i.Render.isConchApp ? t._musicChannel._audio &amp;&amp; (t._musicChannel._audio.muted = !0) : t._musicChannel.pause() : t._musicChannel = null,
                        t._musicMuted = e) : (t._musicMuted = e, t._bgMusic &amp;&amp; t._musicChannel &amp;&amp; (i.Render.isConchApp ? t._musicChannel._audio &amp;&amp; (t._musicChannel._audio.muted = !1) : t._musicChannel.resume())));
                },
                get: function () {
                    return t._musicMuted;
                }
            }, {
                key: "useAudioMusic",
                get: function () {
                    return t._useAudioMusic;
                },
                set: function (e) {
                    t._useAudioMusic = e, t._musicClass = e ? Be : null;
                }
            }]), t;
        }();
        Ue.musicVolume = 1, Ue.soundVolume = 1, Ue.playbackRate = 1, Ue._useAudioMusic = !0,
            Ue._muted = !1, Ue._soundMuted = !1, Ue._musicMuted = !1, Ue._bgMusic = null, Ue._musicChannel = null,
            Ue._channels = [], Ue._blurPaused = !1, Ue._isActive = !0, Ue._lastSoundUsedTimeDic = {},
            Ue._isCheckingDispose = !1, Ue.autoReleaseSound = !0;
        var Ge = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "create",
                value: function () {
                    return this.json ? i.SceneUtils.createByData(null, this.json) : null;
                }
            }]), t;
        }(), We = function () {
            function t() {
                var e = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null;
                _classCallCheck(this, t), this._xd_ = !0, this._allocated_ = 8, this._pos_ = 0,
                    this._length = 0, e ? (this._u8d_ = new Uint8Array(e), this._d_ = new DataView(this._u8d_.buffer),
                        this._length = this._d_.byteLength) : this._resizeBuffer(this._allocated_);
            }
            return _createClass(t, [{
                key: "_resizeBuffer",
                value: function (t) {
                    try {
                        var e = new Uint8Array(t);
                        null != this._u8d_ &amp;&amp; (this._u8d_.length &lt;= t ? e.set(this._u8d_) : e.set(this._u8d_.subarray(0, t))),
                            this._u8d_ = e, this._d_ = new DataView(e.buffer);
                    } catch (e) {
                        throw "Invalid typed array length:" + t;
                    }
                }
            }, {
                key: "getString",
                value: function () {
                    return this.readString();
                }
            }, {
                key: "readString",
                value: function () {
                    return this._rUTF(this.getUint16());
                }
            }, {
                key: "getFloat32Array",
                value: function (t, e) {
                    return this.readFloat32Array(t, e);
                }
            }, {
                key: "readFloat32Array",
                value: function (t, e) {
                    var i = t + e;
                    i = i &gt; this._length ? this._length : i;
                    var n = new Float32Array(this._d_.buffer.slice(t, i));
                    return this._pos_ = i, n;
                }
            }, {
                key: "getUint8Array",
                value: function (t, e) {
                    return this.readUint8Array(t, e);
                }
            }, {
                key: "readUint8Array",
                value: function (t, e) {
                    var i = t + e;
                    i = i &gt; this._length ? this._length : i;
                    var n = new Uint8Array(this._d_.buffer.slice(t, i));
                    return this._pos_ = i, n;
                }
            }, {
                key: "getInt16Array",
                value: function (t, e) {
                    return this.readInt16Array(t, e);
                }
            }, {
                key: "readInt16Array",
                value: function (t, e) {
                    var i = t + e;
                    i = i &gt; this._length ? this._length : i;
                    var n = new Int16Array(this._d_.buffer.slice(t, i));
                    return this._pos_ = i, n;
                }
            }, {
                key: "getFloat32",
                value: function () {
                    return this.readFloat32();
                }
            }, {
                key: "readFloat32",
                value: function () {
                    if (this._pos_ + 4 &gt; this._length) throw "getFloat32 error - Out of bounds";
                    var t = this._d_.getFloat32(this._pos_, this._xd_);
                    return this._pos_ += 4, t;
                }
            }, {
                key: "getFloat64",
                value: function () {
                    return this.readFloat64();
                }
            }, {
                key: "readFloat64",
                value: function () {
                    if (this._pos_ + 8 &gt; this._length) throw "getFloat64 error - Out of bounds";
                    var t = this._d_.getFloat64(this._pos_, this._xd_);
                    return this._pos_ += 8, t;
                }
            }, {
                key: "writeFloat32",
                value: function (t) {
                    this._ensureWrite(this._pos_ + 4), this._d_.setFloat32(this._pos_, t, this._xd_),
                        this._pos_ += 4;
                }
            }, {
                key: "writeFloat64",
                value: function (t) {
                    this._ensureWrite(this._pos_ + 8), this._d_.setFloat64(this._pos_, t, this._xd_),
                        this._pos_ += 8;
                }
            }, {
                key: "getInt32",
                value: function () {
                    return this.readInt32();
                }
            }, {
                key: "readInt32",
                value: function () {
                    if (this._pos_ + 4 &gt; this._length) throw "getInt32 error - Out of bounds";
                    var t = this._d_.getInt32(this._pos_, this._xd_);
                    return this._pos_ += 4, t;
                }
            }, {
                key: "getUint32",
                value: function () {
                    return this.readUint32();
                }
            }, {
                key: "readUint32",
                value: function () {
                    if (this._pos_ + 4 &gt; this._length) throw "getUint32 error - Out of bounds";
                    var t = this._d_.getUint32(this._pos_, this._xd_);
                    return this._pos_ += 4, t;
                }
            }, {
                key: "writeInt32",
                value: function (t) {
                    this._ensureWrite(this._pos_ + 4), this._d_.setInt32(this._pos_, t, this._xd_),
                        this._pos_ += 4;
                }
            }, {
                key: "writeUint32",
                value: function (t) {
                    this._ensureWrite(this._pos_ + 4), this._d_.setUint32(this._pos_, t, this._xd_),
                        this._pos_ += 4;
                }
            }, {
                key: "getInt16",
                value: function () {
                    return this.readInt16();
                }
            }, {
                key: "readInt16",
                value: function () {
                    if (this._pos_ + 2 &gt; this._length) throw "getInt16 error - Out of bounds";
                    var t = this._d_.getInt16(this._pos_, this._xd_);
                    return this._pos_ += 2, t;
                }
            }, {
                key: "getUint16",
                value: function () {
                    return this.readUint16();
                }
            }, {
                key: "readUint16",
                value: function () {
                    if (this._pos_ + 2 &gt; this._length) throw "getUint16 error - Out of bounds";
                    var t = this._d_.getUint16(this._pos_, this._xd_);
                    return this._pos_ += 2, t;
                }
            }, {
                key: "writeUint16",
                value: function (t) {
                    this._ensureWrite(this._pos_ + 2), this._d_.setUint16(this._pos_, t, this._xd_),
                        this._pos_ += 2;
                }
            }, {
                key: "writeInt16",
                value: function (t) {
                    this._ensureWrite(this._pos_ + 2), this._d_.setInt16(this._pos_, t, this._xd_),
                        this._pos_ += 2;
                }
            }, {
                key: "getUint8",
                value: function () {
                    return this.readUint8();
                }
            }, {
                key: "readUint8",
                value: function () {
                    if (this._pos_ + 1 &gt; this._length) throw "getUint8 error - Out of bounds";
                    return this._u8d_[this._pos_++];
                }
            }, {
                key: "writeUint8",
                value: function (t) {
                    this._ensureWrite(this._pos_ + 1), this._d_.setUint8(this._pos_, t), this._pos_++;
                }
            }, {
                key: "_getUInt8",
                value: function (t) {
                    return this._readUInt8(t);
                }
            }, {
                key: "_readUInt8",
                value: function (t) {
                    return this._d_.getUint8(t);
                }
            }, {
                key: "_getUint16",
                value: function (t) {
                    return this._readUint16(t);
                }
            }, {
                key: "_readUint16",
                value: function (t) {
                    return this._d_.getUint16(t, this._xd_);
                }
            }, {
                key: "_getMatrix",
                value: function () {
                    return this._readMatrix();
                }
            }, {
                key: "_readMatrix",
                value: function () {
                    return new f(this.getFloat32(), this.getFloat32(), this.getFloat32(), this.getFloat32(), this.getFloat32(), this.getFloat32());
                }
            }, {
                key: "_rUTF",
                value: function (t) {
                    var e, i, n = this._pos_ + t, r = String.fromCharCode, s = this._u8d_, a = [], o = 0;
                    for (a.length = 1e3; this._pos_ &lt; n;) if ((e = s[this._pos_++]) &lt; 128) 0 != e &amp;&amp; (a[o++] = r(e)); else if (e &lt; 224) a[o++] = r((63 &amp; e) &lt;&lt; 6 | 127 &amp; s[this._pos_++]); else if (e &lt; 240) i = s[this._pos_++],
                        a[o++] = r((31 &amp; e) &lt;&lt; 12 | (127 &amp; i) &lt;&lt; 6 | 127 &amp; s[this._pos_++]); else {
                        var l = (15 &amp; e) &lt;&lt; 18 | (127 &amp; (i = s[this._pos_++])) &lt;&lt; 12 | (127 &amp; s[this._pos_++]) &lt;&lt; 6 | 127 &amp; s[this._pos_++];
                        if (l &gt;= 65536) {
                            var h = l - 65536, u = 55296 | h &gt;&gt; 10, c = 56320 | 1023 &amp; h;
                            a[o++] = r(u), a[o++] = r(c);
                        } else a[o++] = r(l);
                    }
                    return a.length = o, a.join("");
                }
            }, {
                key: "getCustomString",
                value: function (t) {
                    return this.readCustomString(t);
                }
            }, {
                key: "readCustomString",
                value: function (t) {
                    for (var e, i = "", n = 0, r = String.fromCharCode, s = this._u8d_; t &gt; 0;) if ((e = s[this._pos_]) &lt; 128) i += r(e),
                        this._pos_++, t--; else for (n = e - 128, this._pos_++, t -= n; n &gt; 0;) e = s[this._pos_++],
                            i += r(s[this._pos_++] &lt;&lt; 8 | e), n--;
                    return i;
                }
            }, {
                key: "clear",
                value: function () {
                    this._pos_ = 0, this.length = 0;
                }
            }, {
                key: "__getBuffer",
                value: function () {
                    return this._d_.buffer;
                }
            }, {
                key: "writeUTFBytes",
                value: function (t) {
                    for (var e = 0, i = (t += "").length; e &lt; i; e++) {
                        var n = t.charCodeAt(e);
                        if (n &lt;= 127) this.writeByte(n); else if (n &lt;= 2047) this._ensureWrite(this._pos_ + 2),
                            this._u8d_.set([192 | n &gt;&gt; 6, 128 | 63 &amp; n], this._pos_), this._pos_ += 2; else if (n &gt;= 55296 &amp;&amp; n &lt;= 56319) {
                                e++;
                                var r = t.charCodeAt(e);
                                if (!Number.isNaN(r) &amp;&amp; r &gt;= 56320 &amp;&amp; r &lt;= 57343) {
                                    var s = 64 + (1023 &amp; n), a = 1023 &amp; r, o = 240 | s &gt;&gt; 8 &amp; 63, l = 128 | s &gt;&gt; 2 &amp; 63, h = 128 | (3 &amp; s) &lt;&lt; 4 | a &gt;&gt; 6 &amp; 15, u = 128 | 63 &amp; a;
                                    this._ensureWrite(this._pos_ + 4), this._u8d_.set([o, l, h, u], this._pos_), this._pos_ += 4;
                                }
                            } else n &lt;= 65535 ? (this._ensureWrite(this._pos_ + 3), this._u8d_.set([224 | n &gt;&gt; 12, 128 | n &gt;&gt; 6 &amp; 63, 128 | 63 &amp; n], this._pos_),
                                this._pos_ += 3) : (this._ensureWrite(this._pos_ + 4), this._u8d_.set([240 | n &gt;&gt; 18, 128 | n &gt;&gt; 12 &amp; 63, 128 | n &gt;&gt; 6 &amp; 63, 128 | 63 &amp; n], this._pos_),
                                    this._pos_ += 4);
                    }
                }
            }, {
                key: "writeUTFString",
                value: function (t) {
                    var e = this.pos;
                    this.writeUint16(1), this.writeUTFBytes(t);
                    var i = this.pos - e - 2;
                    this._d_.setUint16(e, i, this._xd_);
                }
            }, {
                key: "readUTFString",
                value: function () {
                    return this.readUTFBytes(this.getUint16());
                }
            }, {
                key: "getUTFString",
                value: function () {
                    return this.readUTFString();
                }
            }, {
                key: "readUTFBytes",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : -1;
                    if (0 === t) return "";
                    var e = this.bytesAvailable;
                    if (t &gt; e) throw "readUTFBytes error - Out of bounds";
                    return t = t &gt; 0 ? t : e, this._rUTF(t);
                }
            }, {
                key: "getUTFBytes",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : -1;
                    return this.readUTFBytes(t);
                }
            }, {
                key: "writeByte",
                value: function (t) {
                    this._ensureWrite(this._pos_ + 1), this._d_.setInt8(this._pos_, t), this._pos_ += 1;
                }
            }, {
                key: "readByte",
                value: function () {
                    if (this._pos_ + 1 &gt; this._length) throw "readByte error - Out of bounds";
                    return this._d_.getInt8(this._pos_++);
                }
            }, {
                key: "getByte",
                value: function () {
                    return this.readByte();
                }
            }, {
                key: "_ensureWrite",
                value: function (t) {
                    this._length &lt; t &amp;&amp; (this._length = t), this._allocated_ &lt; t &amp;&amp; (this.length = t);
                }
            }, {
                key: "writeArrayBuffer",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 0;
                    if (e &lt; 0 || i &lt; 0) throw "writeArrayBuffer error - Out of bounds";
                    0 == i &amp;&amp; (i = t.byteLength - e), this._ensureWrite(this._pos_ + i);
                    var n = new Uint8Array(t);
                    this._u8d_.set(n.subarray(e, e + i), this._pos_), this._pos_ += i;
                }
            }, {
                key: "readArrayBuffer",
                value: function (t) {
                    var e;
                    return e = this._u8d_.buffer.slice(this._pos_, this._pos_ + t), this._pos_ = this._pos_ + t,
                        e;
                }
            }, {
                key: "buffer",
                get: function () {
                    var t = this._d_.buffer;
                    return t.byteLength === this._length ? t : t.slice(0, this._length);
                }
            }, {
                key: "endian",
                get: function () {
                    return this._xd_ ? t.LITTLE_ENDIAN : t.BIG_ENDIAN;
                },
                set: function (e) {
                    this._xd_ = e === t.LITTLE_ENDIAN;
                }
            }, {
                key: "length",
                set: function (t) {
                    this._allocated_ &lt; t ? this._resizeBuffer(this._allocated_ = Math.floor(Math.max(t, 2 * this._allocated_))) : this._allocated_ &gt; t &amp;&amp; this._resizeBuffer(this._allocated_ = t),
                        this._length = t;
                },
                get: function () {
                    return this._length;
                }
            }, {
                key: "pos",
                get: function () {
                    return this._pos_;
                },
                set: function (t) {
                    this._pos_ = t;
                }
            }, {
                key: "bytesAvailable",
                get: function () {
                    return this._length - this._pos_;
                }
            }], [{
                key: "getSystemEndian",
                value: function () {
                    if (!t._sysEndian) {
                        var e = new ArrayBuffer(2);
                        new DataView(e).setInt16(0, 256, !0), t._sysEndian = 256 === new Int16Array(e)[0] ? t.LITTLE_ENDIAN : t.BIG_ENDIAN;
                    }
                    return t._sysEndian;
                }
            }]), t;
        }();
        We.BIG_ENDIAN = "bigEndian", We.LITTLE_ENDIAN = "littleEndian", We._sysEndian = null;
        var Ye = function () {
            function t() {
                _classCallCheck(this, t), this._fontCharDic = {}, this._fontWidthMap = {}, this._maxWidth = 0,
                    this._spaceWidth = 10, this.fontSize = 12, this.autoScaleSize = !1, this.letterSpacing = 0;
            }
            return _createClass(t, [{
                key: "loadFont",
                value: function (t, e) {
                    this._path = t, this._complete = e, t &amp;&amp; -1 !== t.indexOf(".fnt") ? i.loader.load([{
                        url: t,
                        type: i.Loader.XML
                    }, {
                        url: t.replace(".fnt", ".png"),
                        type: i.Loader.IMAGE
                    }], m.create(this, this._onLoaded)) : console.error('Bitmap font configuration information must be a ".fnt" file');
                }
            }, {
                key: "_onLoaded",
                value: function () {
                    this.parseFont(i.Loader.getRes(this._path), i.Loader.getRes(this._path.replace(".fnt", ".png"))),
                        this._complete &amp;&amp; this._complete.run();
                }
            }, {
                key: "parseFont",
                value: function (t, e) {
                    if (null != t &amp;&amp; null != e) {
                        this._texture = e;
                        var i = t.getElementsByTagName("info");
                        if (!i[0].getAttributeNode) return this.parseFont2(t, e);
                        this.fontSize = parseInt(i[0].getAttributeNode("size").nodeValue);
                        var n = i[0].getAttributeNode("padding").nodeValue.split(",");
                        this._padding = [parseInt(n[0]), parseInt(n[1]), parseInt(n[2]), parseInt(n[3])];
                        var r = t.getElementsByTagName("char"), s = 0;
                        for (s = 0; s &lt; r.length; s++) {
                            var a = r[s], o = parseInt(a.getAttributeNode("id").nodeValue), l = parseInt(a.getAttributeNode("xoffset").nodeValue) / 1, h = parseInt(a.getAttributeNode("yoffset").nodeValue) / 1, u = parseInt(a.getAttributeNode("xadvance").nodeValue) / 1, c = new p();
                            c.x = parseInt(a.getAttributeNode("x").nodeValue), c.y = parseInt(a.getAttributeNode("y").nodeValue),
                                c.width = parseInt(a.getAttributeNode("width").nodeValue), c.height = parseInt(a.getAttributeNode("height").nodeValue);
                            var _ = Wt.create(e, c.x, c.y, c.width, c.height, l, h);
                            this._maxWidth = Math.max(this._maxWidth, u + this.letterSpacing), this._fontCharDic[o] = _,
                                this._fontWidthMap[o] = u;
                        }
                    }
                }
            }, {
                key: "parseFont2",
                value: function (t, e) {
                    if (null != t &amp;&amp; null != e) {
                        this._texture = e;
                        var i = t.getElementsByTagName("info");
                        this.fontSize = parseInt(i[0].attributes.size.nodeValue);
                        var n = i[0].attributes.padding.nodeValue.split(",");
                        this._padding = [parseInt(n[0]), parseInt(n[1]), parseInt(n[2]), parseInt(n[3])];
                        var r = t.getElementsByTagName("char"), s = 0;
                        for (s = 0; s &lt; r.length; s++) {
                            var a = r[s].attributes, o = parseInt(a.id.nodeValue), l = parseInt(a.xoffset.nodeValue) / 1, h = parseInt(a.yoffset.nodeValue) / 1, u = parseInt(a.xadvance.nodeValue) / 1, c = new p();
                            c.x = parseInt(a.x.nodeValue), c.y = parseInt(a.y.nodeValue), c.width = parseInt(a.width.nodeValue),
                                c.height = parseInt(a.height.nodeValue);
                            var _ = Wt.create(e, c.x, c.y, c.width, c.height, l, h);
                            this._maxWidth = Math.max(this._maxWidth, u + this.letterSpacing), this._fontCharDic[o] = _,
                                this._fontWidthMap[o] = u;
                        }
                    }
                }
            }, {
                key: "getCharTexture",
                value: function (t) {
                    return this._fontCharDic[t.charCodeAt(0)];
                }
            }, {
                key: "destroy",
                value: function () {
                    if (this._texture) {
                        for (var t in this._fontCharDic) {
                            var e = this._fontCharDic[t];
                            e &amp;&amp; e.destroy();
                        }
                        this._texture.destroy(), this._fontCharDic = null, this._fontWidthMap = null, this._texture = null,
                            this._complete = null, this._padding = null;
                    }
                }
            }, {
                key: "setSpaceWidth",
                value: function (t) {
                    this._spaceWidth = t;
                }
            }, {
                key: "getCharWidth",
                value: function (t) {
                    var e = t.charCodeAt(0);
                    return this._fontWidthMap[e] ? this._fontWidthMap[e] + this.letterSpacing : " " === t ? this._spaceWidth + this.letterSpacing : 0;
                }
            }, {
                key: "getTextWidth",
                value: function (t) {
                    for (var e = 0, i = 0, n = t.length; i &lt; n; i++) e += this.getCharWidth(t.charAt(i));
                    return e;
                }
            }, {
                key: "getMaxWidth",
                value: function () {
                    return this._maxWidth;
                }
            }, {
                key: "getMaxHeight",
                value: function () {
                    return this.fontSize;
                }
            }, {
                key: "_drawText",
                value: function (t, e, i, n, r, s) {
                    var a, o = this.getTextWidth(t), l = 0;
                    "center" === r &amp;&amp; (l = (s - o) / 2), "right" === r &amp;&amp; (l = s - o);
                    for (var h = 0, u = 0, c = t.length; u &lt; c; u++) (a = this.getCharTexture(t.charAt(u))) &amp;&amp; (e.graphics.drawImage(a, i + h + l, n),
                        h += this.getCharWidth(t.charAt(u)));
                }
            }]), t;
        }();
        ge.regClass("laya.display.BitmapFont", Ye), ge.regClass("Laya.BitmapFont", Ye);
        var Ve = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.apply(this, arguments))._http = new XMLHttpRequest(),
                    t;
            }
            return _createClass(i, [{
                key: "send",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : "get", r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : "text", s = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null;
                    this._responseType = r, this._data = null, (zt.onVVMiniGame || zt.onQGMiniGame || zt.onQQMiniGame || zt.onAlipayMiniGame || zt.onBLMiniGame) &amp;&amp; (t = i._urlEncode(t)),
                        this._url = t;
                    var a = this, o = this._http;
                    t = x.getAdptedFilePath(t), o.open(n, t, !0);
                    var l = !1;
                    if (s) for (var h = 0; h &lt; s.length; h++) o.setRequestHeader(s[h++], s[h]); else window.conch || (e &amp;&amp; "string" != typeof e ? (o.setRequestHeader("Content-Type", "application/json"),
                        l = !0) : o.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"));
                    var u = "arraybuffer" !== r ? "text" : "arraybuffer";
                    o.responseType = u, o.dataType &amp;&amp; (o.dataType = u), o.onerror = function (t) {
                        a._onError(t);
                    }, o.onabort = function (t) {
                        a._onAbort(t);
                    }, o.onprogress = function (t) {
                        a._onProgress(t);
                    }, o.onload = function (t) {
                        a._onLoad(t);
                    }, zt.onBLMiniGame &amp;&amp; zt.onAndroid &amp;&amp; !e &amp;&amp; (e = {}), o.send(l ? JSON.stringify(e) : e);
                }
            }, {
                key: "_onProgress",
                value: function (t) {
                    t &amp;&amp; t.lengthComputable &amp;&amp; this.event(Gt.PROGRESS, t.loaded / t.total);
                }
            }, {
                key: "_onAbort",
                value: function (t) {
                    this.error("Request was aborted by user");
                }
            }, {
                key: "_onError",
                value: function (t) {
                    this.error("Request failed Status:" + this._http.status + " text:" + this._http.statusText);
                }
            }, {
                key: "_onLoad",
                value: function (t) {
                    var e = this._http, i = void 0 !== e.status ? e.status : 200;
                    200 === i || 204 === i || 0 === i ? this.complete() : this.error("[" + e.status + "]" + e.statusText + ":" + e.responseURL);
                }
            }, {
                key: "error",
                value: function (t) {
                    this.clear(), console.warn(this.url, t), this.event(Gt.ERROR, t);
                }
            }, {
                key: "complete",
                value: function () {
                    this.clear();
                    var t = !0;
                    try {
                        "json" === this._responseType ? this._data = JSON.parse(this._http.responseText) : "xml" === this._responseType ? this._data = K.parseXMLFromString(this._http.responseText) : this._data = this._http.response || this._http.responseText;
                    } catch (e) {
                        t = !1, this.error(e.message);
                    }
                    t &amp;&amp; this.event(Gt.COMPLETE, this._data instanceof Array ? [this._data] : this._data);
                }
            }, {
                key: "clear",
                value: function () {
                    var t = this._http;
                    t.onerror = t.onabort = t.onprogress = t.onload = null;
                }
            }, {
                key: "url",
                get: function () {
                    return this._url;
                }
            }, {
                key: "data",
                get: function () {
                    return this._data;
                }
            }, {
                key: "http",
                get: function () {
                    return this._http;
                }
            }]), i;
        }(T);
        Ve._urlEncode = encodeURI;
        var Xe = function (e) {
            _inherits(r, e);
            var n = _createSuper(r);
            function r() {
                var t;
                return _classCallCheck(this, r), (t = n.apply(this, arguments))._customParse = !1,
                    t;
            }
            return _createClass(r, [{
                key: "load",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, n = !(arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2]) || arguments[2], s = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, a = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] &amp;&amp; arguments[4], o = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : i.WorkerLoader.enable;
                    if (t) {
                        var l;
                        if (r.setGroup(t, "666"), this._url = t, 0 === t.indexOf("data:image") ? e = r.IMAGE : (t == "cnf.json" ? t : t = x.formatURL(t)),
                            this._type = e || (e = r.getTypeFromUrl(this._url)), this._cache = n, this._useWorkerLoader = o,
                            this._data = null, o &amp;&amp; i.WorkerLoader.enableWorkerLoader(), l = e == r.IMAGE ? r.textureMap[t] : r.loadedMap[t],
                            !a &amp;&amp; l) return this._data = l, this.event(Gt.PROGRESS, 1), void this.event(Gt.COMPLETE, this._data);
                        if (s &amp;&amp; r.setGroup(t, s), null != r.parserMap[e]) return this._customParse = !0,
                            void (r.parserMap[e] instanceof m ? r.parserMap[e].runWith(this) : r.parserMap[e].call(null, this));
                        this._loadResourceFilter(e, t);
                    } else this.onLoaded(null);
                }
            }, {
                key: "_loadResourceFilter",
                value: function (t, e) {
                    this._loadResource(t, e);
                }
            }, {
                key: "_loadResource",
                value: function (t, e) {
                    switch (t) {
                        case r.IMAGE:
                        case "htmlimage":
                        case "nativeimage":
                            this._loadImage(e);
                            break;

                        case r.SOUND:
                            this._loadSound(e);
                            break;

                        case r.TTF:
                            this._loadTTF(e);
                            break;

                        case r.ATLAS:
                        case r.PREFAB:
                        case r.PLF:
                            this._loadHttpRequestWhat(e, r.JSON);
                            break;

                        case r.FONT:
                            this._loadHttpRequestWhat(e, r.XML);
                            break;

                        case r.PLFB:
                            this._loadHttpRequestWhat(e, r.BUFFER);
                            break;

                        default:
                            this._loadHttpRequestWhat(e, t);
                    }
                }
            }, {
                key: "_loadHttpRequest",
                value: function (t, e, i, n, r, s, a, o) {
                    zt.onVVMiniGame ? this._http = new Ve() : this._http || (this._http = new Ve()),
                        s &amp;&amp; this._http.on(Gt.PROGRESS, r, s), n &amp;&amp; this._http.on(Gt.COMPLETE, i, n), this._http.on(Gt.ERROR, a, o),
                        this._http.send(t, null, "get", e);
                }
            }, {
                key: "_loadHtmlImage",
                value: function (t, e, i, n, s) {
                    var a;
                    function o() {
                        var e = a;
                        e.onload = null, e.onerror = null, delete r._imgCache[t];
                    }
                    (a = new zt.window.Image()).crossOrigin = "", a.onload = function () {
                        o(), i.call(e, a);
                    }, a.onerror = function () {
                        o(), s.call(n);
                    }, a.src = t, r._imgCache[t] = a;
                }
            }, {
                key: "_loadHttpRequestWhat",
                value: function (t, e) {
                    r.preLoadedMap[t] ? this.onLoaded(r.preLoadedMap[t]) : this._loadHttpRequest(t, e, this, this.onLoaded, this, this.onProgress, this, this.onError);
                }
            }, {
                key: "_loadTTF",
                value: function (t) {
                    t = x.formatURL(t);
                    var e = new i.TTFLoader();
                    e.complete = m.create(this, this.onLoaded), e.load(t);
                }
            }, {
                key: "_loadImage",
                value: function (t) {
                    var e = !(arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1]) || arguments[1], i = this;
                    e &amp;&amp; (t = x.formatURL(t));
                    var n = function () {
                        i.event(Gt.ERROR, "Load image failed");
                    };
                    if ("nativeimage" === this._type) this._loadHtmlImage(t, this, this.onLoaded, this, n); else {
                        var s = K.getFileExtension(t);
                        "ktx" === s || "pvr" === s ? this._loadHttpRequest(t, r.BUFFER, this, this.onLoaded, this, this.onProgress, this, this.onError) : this._loadHtmlImage(t, this, this.onLoaded, this, n);
                    }
                }
            }, {
                key: "_loadSound",
                value: function (t) {
                    var e = new Ue._soundClass(), i = this;
                    function n() {
                        e.offAll();
                    }
                    e.on(Gt.COMPLETE, this, function () {
                        n(), i.onLoaded(e);
                    }), e.on(Gt.ERROR, this, function () {
                        n(), e.dispose(), i.event(Gt.ERROR, "Load sound failed");
                    }), e.load(t);
                }
            }, {
                key: "onProgress",
                value: function (t) {
                    this._type === r.ATLAS ? this.event(Gt.PROGRESS, .3 * t) : this.event(Gt.PROGRESS, t);
                }
            }, {
                key: "onError",
                value: function (t) {
                    this.event(Gt.ERROR, t);
                }
            }, {
                key: "onLoaded",
                value: function () {
                    var e = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null, i = this._type;
                    if (i == r.PLFB) this.parsePLFBData(e), this.complete(e); else if (i == r.PLF) this.parsePLFData(e),
                        this.complete(e); else if (i === r.IMAGE) {
                            if (e instanceof ArrayBuffer) {
                                var n, s = K.getFileExtension(this._url);
                                switch (s) {
                                    case "ktx":
                                        n = t.TextureFormat.ETC1RGB;
                                        break;

                                    case "pvr":
                                        n = t.TextureFormat.PVRTCRGBA_4BPPV;
                                        break;

                                    default:
                                        return void console.error("unknown format", s);
                                }
                                (f = new S(0, 0, n, !1, !1)).wrapModeU = t.WarpMode.Clamp, f.wrapModeV = t.WarpMode.Clamp,
                                    f.setCompressData(e), f._setCreateURL(this.url);
                            } else if (!(e instanceof S)) {
                                (f = new S(e.width, e.height, 1, !1, !1)).wrapModeU = t.WarpMode.Clamp, f.wrapModeV = t.WarpMode.Clamp,
                                    f.loadImageSource(e, !0), f._setCreateURL(e.src);
                            }
                            var a = new Wt(f);
                            a.url = this._url, this.complete(a);
                        } else if (i === r.SOUND || "nativeimage" === i) this.complete(e); else if ("htmlimage" === i) {
                            (f = new S(e.width, e.height, 1, !1, !1)).wrapModeU = t.WarpMode.Clamp, f.wrapModeV = t.WarpMode.Clamp,
                                f.loadImageSource(e, !0), f._setCreateURL(e.src), this.complete(f);
                        } else if (i === r.ATLAS) {
                            if (e.frames) {
                                var o = [];
                                if (!this._data) {
                                    if (this._data = e, e.meta &amp;&amp; e.meta.image) {
                                        o = e.meta.image.split(",");
                                        var l = this._url.indexOf("/") &gt;= 0 ? "/" : "\\", h = this._url.lastIndexOf(l), u = h &gt;= 0 ? this._url.substr(0, h + 1) : "", c = null;
                                        zt.onAndroid &amp;&amp; e.meta.compressTextureAndroid &amp;&amp; (c = ".ktx"), zt.onIOS &amp;&amp; e.meta.compressTextureIOS &amp;&amp; (c = ".pvr");
                                        for (var _ = 0, d = o.length; _ &lt; d; _++) o[_] = c ? u + o[_].replace(".png", c) : u + o[_];
                                    } else o = [this._url.replace(".json", ".png")];
                                    o.reverse(), e.toLoads = o, e.pics = [];
                                }
                                return this.event(Gt.PROGRESS, .3 + 1 / o.length * .6), this._loadResourceFilter(r.IMAGE, o.pop());
                            }
                            var f;
                            if (e instanceof S || ((f = new S(e.width, e.height, 1, !1, !1)).wrapModeU = A.WARPMODE_CLAMP,
                                f.wrapModeV = A.WARPMODE_CLAMP, f.loadImageSource(e, !0), f._setCreateURL(e.src),
                                e = f), this._data.pics.push(e), this._data.toLoads.length &gt; 0) return this.event(Gt.PROGRESS, .3 + 1 / this._data.toLoads.length * .6),
                                    this._loadResourceFilter(r.IMAGE, this._data.toLoads.pop());
                            var v = this._data.frames, p = this._url.split("?")[0], y = this._data.meta &amp;&amp; this._data.meta.prefix ? this._data.meta.prefix : p.substring(0, p.lastIndexOf(".")) + "/", g = this._data.pics, m = x.formatURL(this._url), T = r.atlasMap[m] || (r.atlasMap[m] = []);
                            T.dir = y;
                            var k = 1;
                            if (this._data.meta &amp;&amp; this._data.meta.scale &amp;&amp; 1 != this._data.meta.scale) for (var C in k = parseFloat(this._data.meta.scale),
                                v) {
                                var E, b = v[C], w = g[b.frame.idx ? b.frame.idx : 0], R = x.formatURL(y + C);
                                w.scaleRate = k, E = Wt._create(w, b.frame.x, b.frame.y, b.frame.w, b.frame.h, b.spriteSourceSize.x, b.spriteSourceSize.y, b.sourceSize.w, b.sourceSize.h, r.getRes(R)),
                                    r.cacheTexture(R, E), E.url = R, T.push(R);
                            } else for (C in v) w = g[(b = v[C]).frame.idx ? b.frame.idx : 0], R = x.formatURL(y + C),
                                E = Wt._create(w, b.frame.x, b.frame.y, b.frame.w, b.frame.h, b.spriteSourceSize.x, b.spriteSourceSize.y, b.sourceSize.w, b.sourceSize.h, r.getRes(R)),
                                r.cacheTexture(R, E), E.url = R, T.push(R);
                            delete this._data.pics, this.complete(this._data);
                        } else if (i === r.FONT) {
                            if (!e._source) return this._data = e, this.event(Gt.PROGRESS, .5), this._loadResourceFilter(r.IMAGE, this._url.replace(".fnt", ".png"));
                            var M = new Ye();
                            M.parseFont(this._data, new Wt(e));
                            var I = this._url.split(".fnt")[0].split("/"), P = I[I.length - 1];
                            be.registerBitmapFont(P, M), this._data = M, this.complete(this._data);
                        } else if (i === r.PREFAB) {
                            var L = new Ge();
                            L.json = e, this.complete(L);
                        } else this.complete(e);
                }
            }, {
                key: "parsePLFData",
                value: function (t) {
                    var e, i, n;
                    for (e in t) switch (n = t[e], e) {
                        case "json":
                        case "text":
                            for (i in n) r.preLoadedMap[x.formatURL(i)] = n[i];
                            break;

                        default:
                            for (i in n) r.preLoadedMap[x.formatURL(i)] = n[i];
                    }
                }
            }, {
                key: "parsePLFBData",
                value: function (t) {
                    var e, i, n;
                    for (n = (e = new We(t)).getInt32(), i = 0; i &lt; n; i++) this.parseOnePLFBFile(e);
                }
            }, {
                key: "parseOnePLFBFile",
                value: function (t) {
                    var e, i, n;
                    i = t.getUTFString(), e = t.getInt32(), n = t.readArrayBuffer(e), r.preLoadedMap[x.formatURL(i)] = n;
                }
            }, {
                key: "complete",
                value: function (t) {
                    this._data = t, this._customParse ? this.event(Gt.LOADED, t instanceof Array ? [t] : t) : (r._loaders.push(this),
                        r._isWorking || r.checkNext());
                }
            }, {
                key: "endLoad",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null;
                    t &amp;&amp; (this._data = t), this._cache &amp;&amp; r.cacheRes(this._url, this._data), this.event(Gt.PROGRESS, 1),
                        this.event(Gt.COMPLETE, this.data instanceof Array ? [this.data] : this.data);
                }
            }, {
                key: "url",
                get: function () {
                    return this._url;
                }
            }, {
                key: "type",
                get: function () {
                    return this._type;
                }
            }, {
                key: "cache",
                get: function () {
                    return this._cache;
                }
            }, {
                key: "data",
                get: function () {
                    return this._data;
                }
            }], [{
                key: "getTypeFromUrl",
                value: function (t) {
                    var e = K.getFileExtension(t);
                    return e ? r.typeMap[e] : (console.warn("Not recognize the resources suffix", t),
                        "text");
                }
            }, {
                key: "checkNext",
                value: function () {
                    r._isWorking = !0;
                    for (var t = zt.now(); r._startIndex &lt; r._loaders.length;) if (r._loaders[r._startIndex].endLoad(),
                        r._startIndex++, zt.now() - t &gt; r.maxTimeOut) return console.warn("loader callback cost a long time:" + (zt.now() - t) + " url=" + r._loaders[r._startIndex - 1].url),
                            void i.systemTimer.frameOnce(1, null, r.checkNext);
                    r._loaders.length = 0, r._startIndex = 0, r._isWorking = !1;
                }
            }, {
                key: "clearRes",
                value: function (t) {
                    t = x.formatURL(t);
                    var e = r.getAtlas(t);
                    if (e) {
                        for (var i = 0, n = e.length; i &lt; n; i++) {
                            var s = e[i], a = r.getRes(s);
                            delete r.textureMap[s], a &amp;&amp; a.destroy();
                        }
                        e.length = 0, delete r.atlasMap[t];
                    }
                    var o = r.textureMap[t];
                    o &amp;&amp; (o.destroy(), delete r.textureMap[t]), r.loadedMap[t] &amp;&amp; delete r.loadedMap[t];
                }
            }, {
                key: "clearTextureRes",
                value: function (t) {
                    t = x.formatURL(t);
                    var e = r.getAtlas(t);
                    if (e &amp;&amp; e.length &gt; 0) e.forEach(function (t) {
                        var e = r.getRes(t);
                        e instanceof Wt &amp;&amp; e.disposeBitmap();
                    }); else {
                        var i = r.getRes(t);
                        i instanceof Wt &amp;&amp; i.disposeBitmap();
                    }
                }
            }, {
                key: "getRes",
                value: function (t) {
                    var e = r.textureMap[x.formatURL(t)];
                    return e || r.loadedMap[x.formatURL(t)];
                }
            }, {
                key: "getAtlas",
                value: function (t) {
                    return r.atlasMap[x.formatURL(t)];
                }
            }, {
                key: "cacheRes",
                value: function (t, e) {
                    t = x.formatURL(t), null != r.loadedMap[t] ? console.warn("Resources already exist,is repeated loading:", t) : e instanceof Wt ? (r.loadedMap[t] = e.bitmap,
                        r.textureMap[t] = e) : r.loadedMap[t] = e;
                }
            }, {
                key: "cacheTexture",
                value: function (t, e) {
                    t = x.formatURL(t), null != r.textureMap[t] ? console.warn("Resources already exist,is repeated loading:", t) : r.textureMap[t] = e;
                }
            }, {
                key: "setGroup",
                value: function (t, e) {
                    r.groupMap[e] || (r.groupMap[e] = []), r.groupMap[e].push(t);
                }
            }, {
                key: "clearResByGroup",
                value: function (t) {
                    if (r.groupMap[t]) {
                        var e, i = r.groupMap[t], n = i.length;
                        for (e = 0; e &lt; n; e++) r.clearRes(i[e]);
                        i.length = 0;
                    }
                }
            }]), r;
        }(T);
        Xe.TEXT = "text", Xe.JSON = "json", Xe.PREFAB = "prefab", Xe.XML = "xml", Xe.BUFFER = "arraybuffer",
            Xe.IMAGE = "image", Xe.SOUND = "sound", Xe.ATLAS = "atlas", Xe.FONT = "font", Xe.TTF = "ttf",
            Xe.PLF = "plf", Xe.PLFB = "plfb", Xe.HIERARCHY = "HIERARCHY", Xe.MESH = "MESH",
            Xe.MATERIAL = "MATERIAL", Xe.TEXTURE2D = "TEXTURE2D", Xe.TEXTURECUBE = "TEXTURECUBE",
            Xe.ANIMATIONCLIP = "ANIMATIONCLIP", Xe.AVATAR = "AVATAR", Xe.TERRAINHEIGHTDATA = "TERRAINHEIGHTDATA",
            Xe.TERRAINRES = "TERRAIN", Xe.typeMap = {
                ttf: "ttf",
                png: "image",
                jpg: "image",
                jpeg: "image",
                ktx: "image",
                pvr: "image",
                txt: "text",
                json: "json",
                prefab: "prefab",
                xml: "xml",
                als: "atlas",
                atlas: "atlas",
                mp3: "sound",
                ogg: "sound",
                wav: "sound",
                part: "json",
                fnt: "font",
                plf: "plf",
                plfb: "plfb",
                scene: "json",
                ani: "json",
                sk: "arraybuffer"
            }, Xe.parserMap = {}, Xe.maxTimeOut = 100, Xe.groupMap = {}, Xe.loadedMap = {},
            Xe.atlasMap = {}, Xe.textureMap = {}, Xe.preLoadedMap = {}, Xe._imgCache = {}, Xe._loaders = [],
            Xe._isWorking = !1, Xe._startIndex = 0;
        var He = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "enable",
                value: function (e) {
                    var n = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    i.loader.load(e, m.create(null, t._onInfoLoaded, [n]), null, Xe.JSON);
                }
            }, {
                key: "_onInfoLoaded",
                value: function (e, i) {
                    var n, r, s, a, o;
                    for (n in i) for (r = (s = i[n])[0], o = (s = s[1]).length, a = 0; a &lt; o; a++) t._fileLoadDic[r + s[a]] = n;
                    e &amp;&amp; e.run();
                }
            }, {
                key: "getFileLoadPath",
                value: function (e) {
                    return t._fileLoadDic[e] || e;
                }
            }]), t;
        }();
        He._fileLoadDic = {};
        var ze = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                var t;
                _classCallCheck(this, n), (t = e.call(this)).retryNum = 1, t.retryDelay = 0, t.maxLoader = 5,
                    t._loaders = [], t._loaderCount = 0, t._resInfos = [], t._infoPool = [], t._maxPriority = 5,
                    t._failRes = {}, t._statInfo = {
                        count: 1,
                        loaded: 1
                    };
                for (var i = 0; i &lt; t._maxPriority; i++) t._resInfos[i] = [];
                return t;
            }
            return _createClass(n, [{
                key: "getProgress",
                value: function () {
                    return this._statInfo.loaded / this._statInfo.count;
                }
            }, {
                key: "resetProgress",
                value: function () {
                    this._statInfo.count = this._statInfo.loaded = 1;
                }
            }, {
                key: "create",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null, s = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : null, a = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : 1, o = !(arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7]) || arguments[7];
                    this._create(t, !0, e, i, n, r, s, a, o);
                }
            }, {
                key: "_create",
                value: function (t, e) {
                    var i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null, s = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : null, a = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : null, o = arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7] ? arguments[7] : 1, l = !(arguments.length &gt; 8 &amp;&amp; void 0 !== arguments[8]) || arguments[8];
                    if (t instanceof Array) {
                        var h = !0, u = t, c = u.length, _ = 0;
                        if (n) var d = m.create(n.caller, n ? n.method : null, n.args, !1);
                        for (var f = 0; f &lt; c; f++) {
                            var v = u[f];
                            "string" == typeof v &amp;&amp; (v = u[f] = {
                                url: v
                            }), v.progress = 0;
                        }
                        for (f = 0; f &lt; c; f++) {
                            v = u[f];
                            var p = n ? m.create(null, function (t, e) {
                                t.progress = e;
                                for (var i = 0, n = 0; n &lt; c; n++) {
                                    i += u[n].progress;
                                }
                                var r = i / c;
                                d.runWith(r);
                            }, [v], !1) : null, y = n || i ? m.create(null, function (t) {
                                var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                                _++, t.progress = 1, e || (h = !1), _ === c &amp;&amp; i &amp;&amp; i.runWith(h);
                            }, [v]) : null;
                            this._createOne(v.url, e, y, p, v.type || r, v.constructParams || s, v.propertyParams || a, v.priority || o, l);
                        }
                    } else this._createOne(t, e, i, n, r, s, a, o, l);
                }
            }, {
                key: "_createOne",
                value: function (t, e) {
                    var r = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, s = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, a = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null, o = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : null, l = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : null, h = arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7] ? arguments[7] : 1, u = !(arguments.length &gt; 8 &amp;&amp; void 0 !== arguments[8]) || arguments[8], c = this.getRes(t);
                    if (c) !e &amp;&amp; c instanceof C &amp;&amp; c._addReference(), s &amp;&amp; s.runWith(1), r &amp;&amp; r.runWith(c); else {
                        var _ = K.getFileExtension(t);
                        if (a || (a = n.createMap[_] ? n.createMap[_][0] : null), !a) return void this.load(t, r, s, a, h, u);
                        var d = Xe.parserMap;
                        if (!d[a]) return void this.load(t, r, s, a, h, u);
                        this._createLoad(t, m.create(null, function (n) {
                            n &amp;&amp; (!e &amp;&amp; n instanceof C &amp;&amp; n._addReference(), n._setCreateURL(t)), r &amp;&amp; r.runWith(n),
                                i.loader.event(t);
                        }), s, a, o, l, h, u, !0);
                    }
                }
            }, {
                key: "load",
                value: function (t) {
                    var e, r = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, s = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, a = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, o = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 1, l = !(arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5]) || arguments[5], h = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : null, u = arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7] &amp;&amp; arguments[7], c = arguments.length &gt; 8 &amp;&amp; void 0 !== arguments[8] ? arguments[8] : i.WorkerLoader.enable;
                    if (t instanceof Array) return this._loadAssets(t, r, s, a, o, l, h);
                    if (e = a === Xe.IMAGE ? Xe.textureMap[x.formatURL(t)] : Xe.loadedMap[x.formatURL(t)],
                        u || null == e) {
                        var _;
                        _ = t, (t = He.getFileLoadPath(t)) != _ &amp;&amp; "nativeimage" !== a ? a = Xe.ATLAS : _ = null;
                        var d = n._resMap[t];
                        d ? (r &amp;&amp; (_ ? r &amp;&amp; d._createListener(Gt.COMPLETE, this, this._resInfoLoaded, [_, r], !1, !1) : r &amp;&amp; d._createListener(Gt.COMPLETE, r.caller, r.method, r.args, !1, !1)),
                            s &amp;&amp; d._createListener(Gt.PROGRESS, s.caller, s.method, s.args, !1, !1)) : ((d = this._infoPool.length ? this._infoPool.pop() : new Ke()).url = t,
                                d.type = a, d.cache = l, d.group = h, d.ignoreCache = u, d.useWorkerLoader = c,
                                d.originalUrl = _, r &amp;&amp; d.on(Gt.COMPLETE, r.caller, r.method, r.args), s &amp;&amp; d.on(Gt.PROGRESS, s.caller, s.method, s.args),
                                n._resMap[t] = d, o = o &lt; this._maxPriority ? o : this._maxPriority - 1, this._resInfos[o].push(d),
                                this._statInfo.count++, this.event(Gt.PROGRESS, this.getProgress()), this._next());
                    } else i.systemTimer.frameOnce(1, this, function () {
                        s &amp;&amp; s.runWith(1), r &amp;&amp; r.runWith(e instanceof Array ? [e] : e), this._loaderCount || this.event(Gt.COMPLETE);
                    });
                    return this;
                }
            }, {
                key: "_resInfoLoaded",
                value: function (t, e) {
                    e.runWith(Xe.getRes(t));
                }
            }, {
                key: "_createLoad",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, r = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, s = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, a = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null, o = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : null, l = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : 1, h = !(arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7]) || arguments[7], u = arguments.length &gt; 8 &amp;&amp; void 0 !== arguments[8] &amp;&amp; arguments[8];
                    if (t instanceof Array) return this._loadAssets(t, e, r, s, l, h);
                    var c = Xe.getRes(t);
                    if (null != c) i.systemTimer.frameOnce(1, this, function () {
                        r &amp;&amp; r.runWith(1), e &amp;&amp; e.runWith(c), this._loaderCount || this.event(Gt.COMPLETE);
                    }); else {
                        var _ = n._resMap[t];
                        _ ? (e &amp;&amp; _._createListener(Gt.COMPLETE, e.caller, e.method, e.args, !1, !1), r &amp;&amp; _._createListener(Gt.PROGRESS, r.caller, r.method, r.args, !1, !1)) : ((_ = this._infoPool.length ? this._infoPool.pop() : new Ke()).url = t,
                            _.type = s, _.cache = !1, _.ignoreCache = u, _.originalUrl = null, _.group = null,
                            _.createCache = h, _.createConstructParams = a, _.createPropertyParams = o, e &amp;&amp; _.on(Gt.COMPLETE, e.caller, e.method, e.args),
                            r &amp;&amp; _.on(Gt.PROGRESS, r.caller, r.method, r.args), n._resMap[t] = _, l = l &lt; this._maxPriority ? l : this._maxPriority - 1,
                            this._resInfos[l].push(_), this._statInfo.count++, this.event(Gt.PROGRESS, this.getProgress()),
                            this._next());
                    }
                    return this;
                }
            }, {
                key: "_next",
                value: function () {
                    if (!(this._loaderCount &gt;= this.maxLoader)) {
                        for (var t = 0; t &lt; this._maxPriority; t++) for (var e = this._resInfos[t]; e.length &gt; 0;) {
                            var i = e.shift();
                            if (i) return this._doLoad(i);
                        }
                        this._loaderCount || this.event(Gt.COMPLETE);
                    }
                }
            }, {
                key: "_doLoad",
                value: function (t) {
                    this._loaderCount++;
                    var e = this._loaders.length ? this._loaders.pop() : new Xe();
                    e.on(Gt.COMPLETE, null, n), e.on(Gt.PROGRESS, null, function (e) {
                        t.event(Gt.PROGRESS, e);
                    }), e.on(Gt.ERROR, null, function (t) {
                        n(null);
                    });
                    var i = this;
                    function n() {
                        var n = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null;
                        e.offAll(), e._data = null, e._customParse = !1, i._loaders.push(e), i._endLoad(t, n instanceof Array ? [n] : n),
                            i._loaderCount--, i._next();
                    }
                    e._constructParams = t.createConstructParams, e._propertyParams = t.createPropertyParams,
                        e._createCache = t.createCache, e.load(t.url, t.type, t.cache, t.group, t.ignoreCache, t.useWorkerLoader);
                }
            }, {
                key: "_endLoad",
                value: function (t, e) {
                    var r = t.url;
                    if (null == e) {
                        var s = this._failRes[r] || 0;
                        if (s &lt; this.retryNum) return console.warn("[warn]Retry to load:", r), this._failRes[r] = s + 1,
                            void i.systemTimer.once(this.retryDelay, this, this._addReTry, [t], !1);
                        Xe.clearRes(r), console.warn("[error]Failed to load:", r), this.event(Gt.ERROR, r);
                    }
                    this._failRes[r] &amp;&amp; (this._failRes[r] = 0), delete n._resMap[r], t.originalUrl &amp;&amp; (e = Xe.getRes(t.originalUrl)),
                        t.event(Gt.COMPLETE, e), t.offAll(), this._infoPool.push(t), this._statInfo.loaded++,
                        this.event(Gt.PROGRESS, this.getProgress());
                }
            }, {
                key: "_addReTry",
                value: function (t) {
                    this._resInfos[this._maxPriority - 1].push(t), this._next();
                }
            }, {
                key: "clearRes",
                value: function (t) {
                    Xe.clearRes(t);
                }
            }, {
                key: "clearTextureRes",
                value: function (t) {
                    Xe.clearTextureRes(t);
                }
            }, {
                key: "getRes",
                value: function (t) {
                    return Xe.getRes(t);
                }
            }, {
                key: "cacheRes",
                value: function (t, e) {
                    Xe.cacheRes(t, e);
                }
            }, {
                key: "setGroup",
                value: function (t, e) {
                    Xe.setGroup(t, e);
                }
            }, {
                key: "clearResByGroup",
                value: function (t) {
                    Xe.clearResByGroup(t);
                }
            }, {
                key: "clearUnLoaded",
                value: function () {
                    for (var t = 0; t &lt; this._maxPriority; t++) {
                        for (var e = this._resInfos[t], i = e.length - 1; i &gt; -1; i--) {
                            var r = e[i];
                            r &amp;&amp; (r.offAll(), this._infoPool.push(r));
                        }
                        e.length = 0;
                    }
                    this._loaderCount = 0, n._resMap = {};
                }
            }, {
                key: "cancelLoadByUrls",
                value: function (t) {
                    if (t) for (var e = 0, i = t.length; e &lt; i; e++) this.cancelLoadByUrl(t[e]);
                }
            }, {
                key: "cancelLoadByUrl",
                value: function (t) {
                    for (var e = 0; e &lt; this._maxPriority; e++) for (var i = this._resInfos[e], r = i.length - 1; r &gt; -1; r--) {
                        var s = i[r];
                        s &amp;&amp; s.url === t &amp;&amp; (i[r] = null, s.offAll(), this._infoPool.push(s));
                    }
                    n._resMap[t] &amp;&amp; delete n._resMap[t];
                }
            }, {
                key: "_loadAssets",
                value: function (t) {
                    for (var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 1, s = !(arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5]) || arguments[5], a = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] ? arguments[6] : null, o = t.length, l = 0, h = 0, u = [], c = !0, _ = 0; _ &lt; o; _++) {
                        var d = t[_], f = void 0;
                        (f = "string" == typeof d ? {
                            url: d,
                            type: n,
                            size: 1,
                            priority: r
                        } : d).size || (f.size = 1), f.progress = 0, h += f.size, u.push(f);
                        var v = i ? m.create(null, g, [f], !1) : null, p = e || i ? m.create(null, y, [f]) : null;
                        this.load(f.url, p, v, f.type, f.priority || 1, s, f.group || a, !1, f.useWorkerLoader);
                    }
                    function y(t) {
                        var i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                        l++, t.progress = 1, i || (c = !1), l === o &amp;&amp; e &amp;&amp; e.runWith(c);
                    }
                    function g(t, e) {
                        if (null != i) {
                            t.progress = e;
                            for (var n = 0, r = 0; r &lt; u.length; r++) {
                                var s = u[r];
                                if (s) {
                                    var a = null == s.progress ? 0 : s.progress;
                                    n += null == s.size ? 0 : s.size * a;
                                }
                            }
                            var o = n / h;
                            i.runWith(o);
                        }
                    }
                    return this;
                }
            }, {
                key: "decodeBitmaps",
                value: function (t) {
                    var e, n, r = t.length;
                    for (n = i.Render._context, e = 0; e &lt; r; e++) {
                        var s, a;
                        if (s = Xe.getAtlas(t[e])) this._decodeTexture(s[0], n); else (a = this.getRes(t[e])) &amp;&amp; a instanceof Wt &amp;&amp; this._decodeTexture(a, n);
                    }
                }
            }, {
                key: "_decodeTexture",
                value: function (t, e) {
                    var i = t.bitmap;
                    if (t &amp;&amp; i) {
                        var n = i.source || i.image;
                        if (n &amp;&amp; n instanceof HTMLImageElement) {
                            e.drawImage(n, 0, 0, 1, 1);
                            e.getImageData(0, 0, 1, 1);
                        }
                    }
                }
            }], [{
                key: "cacheRes",
                value: function (t, e) {
                    Xe.cacheRes(t, e);
                }
            }]), n;
        }(T);
        ze._resMap = {}, ze.createMap = {
            atlas: [null, Xe.ATLAS]
        };
        var Ke = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                return _classCallCheck(this, i), e.apply(this, arguments);
            }
            return i;
        }(T), je = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "__init__",
                value: function () {
                    return t._baseClass || (t._baseClass = qe, qe.init()), t.items = t._baseClass.items,
                        t.support = t._baseClass.support, t.support;
                }
            }, {
                key: "setItem",
                value: function (e, i) {
                    t._baseClass.setItem(e, i);
                }
            }, {
                key: "getItem",
                value: function (e) {
                    return t._baseClass.getItem(e);
                }
            }, {
                key: "setJSON",
                value: function (e, i) {
                    t._baseClass.setJSON(e, i);
                }
            }, {
                key: "getJSON",
                value: function (e) {
                    return t._baseClass.getJSON(e);
                }
            }, {
                key: "removeItem",
                value: function (e) {
                    t._baseClass.removeItem(e);
                }
            }, {
                key: "clear",
                value: function () {
                    t._baseClass.clear();
                }
            }]), t;
        }();
        je.support = !1;
        var qe = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "init",
                value: function () {
                    try {
                        t.support = !0, t.items = window.localStorage, t.setItem("laya", "1"), t.removeItem("laya");
                    } catch (e) {
                        t.support = !1;
                    }
                    t.support || console.log("LocalStorage is not supprot or browser is private mode.");
                }
            }, {
                key: "setItem",
                value: function (e, i) {
                    try {
                        t.support &amp;&amp; t.items.setItem(e, i);
                    } catch (t) {
                        console.warn("set localStorage failed", t);
                    }
                }
            }, {
                key: "getItem",
                value: function (e) {
                    return t.support ? t.items.getItem(e) : null;
                }
            }, {
                key: "setJSON",
                value: function (e, i) {
                    try {
                        t.support &amp;&amp; t.items.setItem(e, JSON.stringify(i));
                    } catch (t) {
                        console.warn("set localStorage failed", t);
                    }
                }
            }, {
                key: "getJSON",
                value: function (e) {
                    try {
                        return JSON.parse(t.support ? t.items.getItem(e) : null);
                    } catch (i) {
                        return t.items.getItem(e);
                    }
                }
            }, {
                key: "removeItem",
                value: function (e) {
                    t.support &amp;&amp; t.items.removeItem(e);
                }
            }, {
                key: "clear",
                value: function () {
                    t.support &amp;&amp; t.items.clear();
                }
            }]), t;
        }();
        qe.support = !1;
        var Qe = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "load",
                value: function (t) {
                    this._url = t;
                    var e = t.split(".ttf")[0].split("/");
                    this.fontName = e[e.length - 1], i.Render.isConchApp ? this._loadConch() : window.FontFace ? this._loadWithFontFace() : this._loadWithCSS();
                }
            }, {
                key: "_loadConch",
                value: function () {
                    this._http = new Ve(), this._http.on(Gt.ERROR, this, this._onErr), this._http.on(Gt.COMPLETE, this, this._onHttpLoaded),
                        this._http.send(this._url, null, "get", Xe.BUFFER);
                }
            }, {
                key: "_onHttpLoaded",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null;
                    window.conchTextCanvas.setFontFaceFromBuffer(this.fontName, t), this._clearHttp(),
                        this._complete();
                }
            }, {
                key: "_clearHttp",
                value: function () {
                    this._http &amp;&amp; (this._http.off(Gt.ERROR, this, this._onErr), this._http.off(Gt.COMPLETE, this, this._onHttpLoaded),
                        this._http = null);
                }
            }, {
                key: "_onErr",
                value: function () {
                    this._clearHttp(), this.err &amp;&amp; (this.err.runWith("fail:" + this._url), this.err = null);
                }
            }, {
                key: "_complete",
                value: function () {
                    i.systemTimer.clear(this, this._complete), i.systemTimer.clear(this, this._checkComplete),
                        this._div &amp;&amp; this._div.parentNode &amp;&amp; (this._div.parentNode.removeChild(this._div),
                            this._div = null), this.complete &amp;&amp; (this.complete.runWith(this), this.complete = null);
                }
            }, {
                key: "_checkComplete",
                value: function () {
                    i.Browser.measureText(t._testString, this._fontTxt).width != this._txtWidth &amp;&amp; this._complete();
                }
            }, {
                key: "_loadWithFontFace",
                value: function () {
                    var t = new window.FontFace(this.fontName, "url('" + this._url + "')");
                    document.fonts.add(t);
                    var e = this;
                    t.loaded.then(function () {
                        e._complete();
                    }), t.load();
                }
            }, {
                key: "_createDiv",
                value: function () {
                    this._div = zt.createElement("div"), this._div.innerHTML = "laya";
                    var t = this._div.style;
                    t.fontFamily = this.fontName, t.position = "absolute", t.left = "-100px", t.top = "-100px",
                        document.body.appendChild(this._div);
                }
            }, {
                key: "_loadWithCSS",
                value: function () {
                    var e = zt.createElement("style");
                    e.type = "text/css", document.body.appendChild(e), e.textContent = "@font-face { font-family:'" + this.fontName + "'; src:url('" + this._url + "');}",
                        this._fontTxt = "40px " + this.fontName, this._txtWidth = zt.measureText(t._testString, this._fontTxt).width;
                    var n = this;
                    e.onload = function () {
                        i.systemTimer.once(1e4, n, this._complete);
                    }, i.systemTimer.loop(20, this, this._checkComplete), this._createDiv();
                }
            }]), t;
        }();
        Qe._testString = "LayaTTFFont";
        var Ze = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "linearNone",
                value: function (t, e, i, n) {
                    return i * t / n + e;
                }
            }, {
                key: "linearIn",
                value: function (t, e, i, n) {
                    return i * t / n + e;
                }
            }, {
                key: "linearInOut",
                value: function (t, e, i, n) {
                    return i * t / n + e;
                }
            }, {
                key: "linearOut",
                value: function (t, e, i, n) {
                    return i * t / n + e;
                }
            }, {
                key: "bounceIn",
                value: function (e, i, n, r) {
                    return n - t.bounceOut(r - e, 0, n, r) + i;
                }
            }, {
                key: "bounceInOut",
                value: function (e, i, n, r) {
                    return e &lt; .5 * r ? .5 * t.bounceIn(2 * e, 0, n, r) + i : .5 * t.bounceOut(2 * e - r, 0, n, r) + .5 * n + i;
                }
            }, {
                key: "bounceOut",
                value: function (t, e, i, n) {
                    return (t /= n) &lt; 1 / 2.75 ? i * (7.5625 * t * t) + e : t &lt; 2 / 2.75 ? i * (7.5625 * (t -= 1.5 / 2.75) * t + .75) + e : t &lt; 2.5 / 2.75 ? i * (7.5625 * (t -= 2.25 / 2.75) * t + .9375) + e : i * (7.5625 * (t -= 2.625 / 2.75) * t + .984375) + e;
                }
            }, {
                key: "backIn",
                value: function (t, e, i, n) {
                    var r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 1.70158;
                    return i * (t /= n) * t * ((r + 1) * t - r) + e;
                }
            }, {
                key: "backInOut",
                value: function (t, e, i, n) {
                    var r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 1.70158;
                    return (t /= .5 * n) &lt; 1 ? .5 * i * (t * t * ((1 + (r *= 1.525)) * t - r)) + e : i / 2 * ((t -= 2) * t * ((1 + (r *= 1.525)) * t + r) + 2) + e;
                }
            }, {
                key: "backOut",
                value: function (t, e, i, n) {
                    var r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 1.70158;
                    return i * ((t = t / n - 1) * t * ((r + 1) * t + r) + 1) + e;
                }
            }, {
                key: "elasticIn",
                value: function (e, i, n, r) {
                    var s, a = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0, o = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 0;
                    return 0 == e ? i : 1 == (e /= r) ? i + n : (o || (o = .3 * r), !a || n &gt; 0 &amp;&amp; a &lt; n || n &lt; 0 &amp;&amp; a &lt; -n ? (a = n,
                        s = o / 4) : s = o / t.PI2 * Math.asin(n / a), -a * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * r - s) * t.PI2 / o) + i);
                }
            }, {
                key: "elasticInOut",
                value: function (e, i, n, r) {
                    var s, a = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0, o = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 0;
                    return 0 == e ? i : 2 == (e /= .5 * r) ? i + n : (o || (o = r * (.3 * 1.5)), !a || n &gt; 0 &amp;&amp; a &lt; n || n &lt; 0 &amp;&amp; a &lt; -n ? (a = n,
                        s = o / 4) : s = o / t.PI2 * Math.asin(n / a), e &lt; 1 ? a * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * r - s) * t.PI2 / o) * -.5 + i : a * Math.pow(2, -10 * (e -= 1)) * Math.sin((e * r - s) * t.PI2 / o) * .5 + n + i);
                }
            }, {
                key: "elasticOut",
                value: function (e, i, n, r) {
                    var s, a = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0, o = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 0;
                    return 0 == e ? i : 1 == (e /= r) ? i + n : (o || (o = .3 * r), !a || n &gt; 0 &amp;&amp; a &lt; n || n &lt; 0 &amp;&amp; a &lt; -n ? (a = n,
                        s = o / 4) : s = o / t.PI2 * Math.asin(n / a), a * Math.pow(2, -10 * e) * Math.sin((e * r - s) * t.PI2 / o) + n + i);
                }
            }, {
                key: "strongIn",
                value: function (t, e, i, n) {
                    return i * (t /= n) * t * t * t * t + e;
                }
            }, {
                key: "strongInOut",
                value: function (t, e, i, n) {
                    return (t /= .5 * n) &lt; 1 ? .5 * i * t * t * t * t * t + e : .5 * i * ((t -= 2) * t * t * t * t + 2) + e;
                }
            }, {
                key: "strongOut",
                value: function (t, e, i, n) {
                    return i * ((t = t / n - 1) * t * t * t * t + 1) + e;
                }
            }, {
                key: "sineInOut",
                value: function (t, e, i, n) {
                    return .5 * -i * (Math.cos(Math.PI * t / n) - 1) + e;
                }
            }, {
                key: "sineIn",
                value: function (e, i, n, r) {
                    return -n * Math.cos(e / r * t.HALF_PI) + n + i;
                }
            }, {
                key: "sineOut",
                value: function (e, i, n, r) {
                    return n * Math.sin(e / r * t.HALF_PI) + i;
                }
            }, {
                key: "quintIn",
                value: function (t, e, i, n) {
                    return i * (t /= n) * t * t * t * t + e;
                }
            }, {
                key: "quintInOut",
                value: function (t, e, i, n) {
                    return (t /= .5 * n) &lt; 1 ? .5 * i * t * t * t * t * t + e : .5 * i * ((t -= 2) * t * t * t * t + 2) + e;
                }
            }, {
                key: "quintOut",
                value: function (t, e, i, n) {
                    return i * ((t = t / n - 1) * t * t * t * t + 1) + e;
                }
            }, {
                key: "quartIn",
                value: function (t, e, i, n) {
                    return i * (t /= n) * t * t * t + e;
                }
            }, {
                key: "quartInOut",
                value: function (t, e, i, n) {
                    return (t /= .5 * n) &lt; 1 ? .5 * i * t * t * t * t + e : .5 * -i * ((t -= 2) * t * t * t - 2) + e;
                }
            }, {
                key: "quartOut",
                value: function (t, e, i, n) {
                    return -i * ((t = t / n - 1) * t * t * t - 1) + e;
                }
            }, {
                key: "cubicIn",
                value: function (t, e, i, n) {
                    return i * (t /= n) * t * t + e;
                }
            }, {
                key: "cubicInOut",
                value: function (t, e, i, n) {
                    return (t /= .5 * n) &lt; 1 ? .5 * i * t * t * t + e : .5 * i * ((t -= 2) * t * t + 2) + e;
                }
            }, {
                key: "cubicOut",
                value: function (t, e, i, n) {
                    return i * ((t = t / n - 1) * t * t + 1) + e;
                }
            }, {
                key: "quadIn",
                value: function (t, e, i, n) {
                    return i * (t /= n) * t + e;
                }
            }, {
                key: "quadInOut",
                value: function (t, e, i, n) {
                    return (t /= .5 * n) &lt; 1 ? .5 * i * t * t + e : .5 * -i * (--t * (t - 2) - 1) + e;
                }
            }, {
                key: "quadOut",
                value: function (t, e, i, n) {
                    return -i * (t /= n) * (t - 2) + e;
                }
            }, {
                key: "expoIn",
                value: function (t, e, i, n) {
                    return 0 == t ? e : i * Math.pow(2, 10 * (t / n - 1)) + e - .001 * i;
                }
            }, {
                key: "expoInOut",
                value: function (t, e, i, n) {
                    return 0 == t ? e : t == n ? e + i : (t /= .5 * n) &lt; 1 ? .5 * i * Math.pow(2, 10 * (t - 1)) + e : .5 * i * (2 - Math.pow(2, -10 * --t)) + e;
                }
            }, {
                key: "expoOut",
                value: function (t, e, i, n) {
                    return t == n ? e + i : i * (1 - Math.pow(2, -10 * t / n)) + e;
                }
            }, {
                key: "circIn",
                value: function (t, e, i, n) {
                    return -i * (Math.sqrt(1 - (t /= n) * t) - 1) + e;
                }
            }, {
                key: "circInOut",
                value: function (t, e, i, n) {
                    return (t /= .5 * n) &lt; 1 ? .5 * -i * (Math.sqrt(1 - t * t) - 1) + e : .5 * i * (Math.sqrt(1 - (t -= 2) * t) + 1) + e;
                }
            }, {
                key: "circOut",
                value: function (t, e, i, n) {
                    return i * Math.sqrt(1 - (t = t / n - 1) * t) + e;
                }
            }]), t;
        }();
        Ze.HALF_PI = .5 * Math.PI, Ze.PI2 = 2 * Math.PI;
        var $e = function () {
            function t() {
                _classCallCheck(this, t), this.gid = 0, this.repeat = 1, this._count = 0;
            }
            return _createClass(t, [{
                key: "to",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null, s = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 0, a = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] &amp;&amp; arguments[6];
                    return this._create(t, e, i, n, r, s, a, !0, !1, !0);
                }
            }, {
                key: "from",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null, s = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 0, a = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] &amp;&amp; arguments[6];
                    return this._create(t, e, i, n, r, s, a, !1, !1, !0);
                }
            }, {
                key: "_create",
                value: function (e, n, r, s, a, o, l, h, u, c) {
                    if (!e) throw new Error("Tween:target is null");
                    this._target = e, this._duration = r, this._ease = s || n.ease || t.easeNone, this._complete = a || n.complete,
                        this._delay = o, this._props = [], this._usedTimer = 0, this._startTimer = zt.now(),
                        this._usedPool = u, this._delayParam = null, this.update = n.update;
                    var _ = e.$_GID || (e.$_GID = K.getGID());
                    return t.tweenMap[_] ? (l &amp;&amp; t.clearTween(e), t.tweenMap[_].push(this)) : t.tweenMap[_] = [this],
                        c ? o &lt;= 0 ? this.firstStart(e, n, h) : (this._delayParam = [e, n, h], i.timer.once(o, this, this.firstStart, this._delayParam)) : this._initProps(e, n, h),
                        this;
                }
            }, {
                key: "firstStart",
                value: function (t, e, i) {
                    this._delayParam = null, t.destroyed ? this.clear() : (this._initProps(t, e, i),
                        this._beginLoop());
                }
            }, {
                key: "_initProps",
                value: function (t, e, i) {
                    for (var n in e) if ("number" == typeof t[n]) {
                        var r = i ? t[n] : e[n], s = i ? e[n] : t[n];
                        this._props.push([n, r, s - r]), i || (t[n] = r);
                    }
                }
            }, {
                key: "_beginLoop",
                value: function () {
                    i.timer.frameLoop(1, this, this._doEase);
                }
            }, {
                key: "_doEase",
                value: function () {
                    this._updateEase(zt.now());
                }
            }, {
                key: "_updateEase",
                value: function (e) {
                    var i = this._target;
                    if (i) {
                        if (i.destroyed) return t.clearTween(i);
                        var n = this._usedTimer = e - this._startTimer - this._delay;
                        if (!(n &lt; 0)) {
                            if (n &gt;= this._duration) return this.complete();
                            for (var r = n &gt; 0 ? this._ease(n, 0, 1, this._duration) : 0, s = this._props, a = 0, o = s.length; a &lt; o; a++) {
                                var l = s[a];
                                i[l[0]] = l[1] + r * l[2];
                            }
                            this.update &amp;&amp; this.update.run();
                        }
                    }
                }
            }, {
                key: "complete",
                value: function () {
                    if (this._target) {
                        i.timer.runTimer(this, this.firstStart);
                        for (var t = this._target, e = this._props, n = this._complete, r = 0, s = e.length; r &lt; s; r++) {
                            var a = e[r];
                            t[a[0]] = a[1] + a[2];
                        }
                        this.update &amp;&amp; this.update.run(), this._count++, 0 != this.repeat &amp;&amp; this._count &gt;= this.repeat ? (this.clear(),
                            n &amp;&amp; n.run()) : this.restart();
                    }
                }
            }, {
                key: "pause",
                value: function () {
                    var t;
                    i.timer.clear(this, this._beginLoop), i.timer.clear(this, this._doEase), i.timer.clear(this, this.firstStart),
                        (t = zt.now() - this._startTimer - this._delay) &lt; 0 &amp;&amp; (this._usedTimer = t);
                }
            }, {
                key: "setStartTime",
                value: function (t) {
                    this._startTimer = t;
                }
            }, {
                key: "clear",
                value: function () {
                    this._target &amp;&amp; (this._remove(), this._clear());
                }
            }, {
                key: "_clear",
                value: function () {
                    this.pause(), i.timer.clear(this, this.firstStart), this._complete = null, this._target = null,
                        this._ease = null, this._props = null, this._delayParam = null, this.repeat = 1,
                        this._usedPool &amp;&amp; (this.update = null, n.recover("tween", this));
                }
            }, {
                key: "recover",
                value: function () {
                    this._usedPool = !0, this._clear();
                }
            }, {
                key: "_remove",
                value: function () {
                    var e = t.tweenMap[this._target.$_GID];
                    if (e) for (var i = 0, n = e.length; i &lt; n; i++) if (e[i] === this) {
                        e.splice(i, 1);
                        break;
                    }
                }
            }, {
                key: "restart",
                value: function () {
                    if (this.pause(), this._usedTimer = 0, this._startTimer = zt.now(), this._delayParam) i.timer.once(this._delay, this, this.firstStart, this._delayParam); else {
                        for (var t = this._props, e = 0, n = t.length; e &lt; n; e++) {
                            var r = t[e];
                            this._target[r[0]] = r[1];
                        }
                        i.timer.once(this._delay, this, this._beginLoop);
                    }
                }
            }, {
                key: "resume",
                value: function () {
                    this._usedTimer &gt;= this._duration || (this._startTimer = zt.now() - this._usedTimer - this._delay,
                        this._delayParam ? this._usedTimer &lt; 0 ? i.timer.once(-this._usedTimer, this, this.firstStart, this._delayParam) : this.firstStart.apply(this, this._delayParam) : this._beginLoop());
                }
            }, {
                key: "progress",
                set: function (t) {
                    var e = t * this._duration;
                    this._startTimer = zt.now() - this._delay - e;
                }
            }], [{
                key: "to",
                value: function (e, i, r) {
                    var s = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, a = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null, o = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 0, l = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] &amp;&amp; arguments[6], h = !(arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7]) || arguments[7];
                    return n.getItemByClass("tween", t)._create(e, i, r, s, a, o, l, !0, h, !0);
                }
            }, {
                key: "from",
                value: function (e, i, r) {
                    var s = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, a = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null, o = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] ? arguments[5] : 0, l = arguments.length &gt; 6 &amp;&amp; void 0 !== arguments[6] &amp;&amp; arguments[6], h = !(arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7]) || arguments[7];
                    return n.getItemByClass("tween", t)._create(e, i, r, s, a, o, l, !1, h, !0);
                }
            }, {
                key: "clearAll",
                value: function (e) {
                    if (e &amp;&amp; e.$_GID) {
                        var i = t.tweenMap[e.$_GID];
                        if (i) {
                            for (var n = 0, r = i.length; n &lt; r; n++) i[n]._clear();
                            i.length = 0;
                        }
                    }
                }
            }, {
                key: "clear",
                value: function (t) {
                    t.clear();
                }
            }, {
                key: "clearTween",
                value: function (e) {
                    t.clearAll(e);
                }
            }, {
                key: "easeNone",
                value: function (t, e, i, n) {
                    return i * t / n + e;
                }
            }]), t;
        }();
        $e.tweenMap = [];
        var Je = function () {
            function t() {
                _classCallCheck(this, t), this.ratio = .92, this.maxOffset = 60, this._dragging = !1,
                    this._clickOnly = !0;
            }
            return _createClass(t, [{
                key: "start",
                value: function (t, e, n, r, s, a, o) {
                    var l = arguments.length &gt; 7 &amp;&amp; void 0 !== arguments[7] ? arguments[7] : .92;
                    this.clearTimer(), this.target = t, this.area = e, this.hasInertia = n, this.elasticDistance = e ? r : 0,
                        this.elasticBackTime = s, this.data = a, this._disableMouseEvent = o, this.ratio = l,
                        this._parent = t.parent, this._clickOnly = !0, this._dragging = !0, this._elasticRateX = this._elasticRateY = 1,
                        this._lastX = this._parent.mouseX, this._lastY = this._parent.mouseY, i.stage.on(Gt.MOUSE_UP, this, this.onStageMouseUp),
                        i.stage.on(Gt.MOUSE_OUT, this, this.onStageMouseUp), i.systemTimer.frameLoop(1, this, this.loop);
                }
            }, {
                key: "clearTimer",
                value: function () {
                    i.systemTimer.clear(this, this.loop), i.systemTimer.clear(this, this.tweenMove),
                        this._tween &amp;&amp; (this._tween.recover(), this._tween = null);
                }
            }, {
                key: "stop",
                value: function () {
                    this._dragging &amp;&amp; (Ae.instance.disableMouseEvent = !1, i.stage.off(Gt.MOUSE_UP, this, this.onStageMouseUp),
                        i.stage.off(Gt.MOUSE_OUT, this, this.onStageMouseUp), this._dragging = !1, this.target &amp;&amp; this.area &amp;&amp; this.backToArea(),
                        this.clear());
                }
            }, {
                key: "loop",
                value: function () {
                    var t = this._parent.getMousePoint(), e = t.x, n = t.y, r = e - this._lastX, s = n - this._lastY;
                    if (this._clickOnly) {
                        if (!(Math.abs(r * i.stage._canvasTransform.getScaleX()) &gt; 1 || Math.abs(s * i.stage._canvasTransform.getScaleY()) &gt; 1)) return;
                        this._clickOnly = !1, this._offsets || (this._offsets = []), this._offsets.length = 0,
                            this.target.event(Gt.DRAG_START, this.data), Ae.instance.disableMouseEvent = this._disableMouseEvent;
                    } else this._offsets.push(r, s);
                    0 === r &amp;&amp; 0 === s || (this._lastX = e, this._lastY = n, this.target.x += r * this._elasticRateX,
                        this.target.y += s * this._elasticRateY, this.area &amp;&amp; this.checkArea(), this.target.event(Gt.DRAG_MOVE, this.data));
                }
            }, {
                key: "checkArea",
                value: function () {
                    if (this.elasticDistance &lt;= 0) this.backToArea(); else {
                        if (this.target._x &lt; this.area.x) var t = this.area.x - this.target._x; else t = this.target._x &gt; this.area.x + this.area.width ? this.target._x - this.area.x - this.area.width : 0;
                        if (this._elasticRateX = Math.max(0, 1 - t / this.elasticDistance), this.target._y &lt; this.area.y) var e = this.area.y - this.target.y; else e = this.target._y &gt; this.area.y + this.area.height ? this.target._y - this.area.y - this.area.height : 0;
                        this._elasticRateY = Math.max(0, 1 - e / this.elasticDistance);
                    }
                }
            }, {
                key: "backToArea",
                value: function () {
                    this.target.x = Math.min(Math.max(this.target._x, this.area.x), this.area.x + this.area.width),
                        this.target.y = Math.min(Math.max(this.target._y, this.area.y), this.area.y + this.area.height);
                }
            }, {
                key: "onStageMouseUp",
                value: function (t) {
                    if (Ae.instance.disableMouseEvent = !1, i.stage.off(Gt.MOUSE_UP, this, this.onStageMouseUp),
                        i.stage.off(Gt.MOUSE_OUT, this, this.onStageMouseUp), i.systemTimer.clear(this, this.loop),
                        !this._clickOnly &amp;&amp; this.target) if (this.hasInertia) {
                            this._offsets.length &lt; 1 &amp;&amp; this._offsets.push(this._parent.mouseX - this._lastX, this._parent.mouseY - this._lastY),
                                this._offsetX = this._offsetY = 0;
                            for (var e = this._offsets.length, n = Math.min(e, 6), r = this._offsets.length - n, s = e - 1; s &gt; r; s--) this._offsetY += this._offsets[s--],
                                this._offsetX += this._offsets[s];
                            this._offsetX = this._offsetX / n * 2, this._offsetY = this._offsetY / n * 2, Math.abs(this._offsetX) &gt; this.maxOffset &amp;&amp; (this._offsetX = this._offsetX &gt; 0 ? this.maxOffset : -this.maxOffset),
                                Math.abs(this._offsetY) &gt; this.maxOffset &amp;&amp; (this._offsetY = this._offsetY &gt; 0 ? this.maxOffset : -this.maxOffset),
                                i.systemTimer.frameLoop(1, this, this.tweenMove);
                        } else this.elasticDistance &gt; 0 ? this.checkElastic() : this.clear();
                }
            }, {
                key: "checkElastic",
                value: function () {
                    var t = NaN, e = NaN;
                    if (this.target.x &lt; this.area.x ? t = this.area.x : this.target._x &gt; this.area.x + this.area.width &amp;&amp; (t = this.area.x + this.area.width),
                        this.target.y &lt; this.area.y ? e = this.area.y : this.target._y &gt; this.area.y + this.area.height &amp;&amp; (e = this.area.y + this.area.height),
                        isNaN(t) &amp;&amp; isNaN(e)) this.clear(); else {
                        var i = {};
                        isNaN(t) || (i.x = t), isNaN(e) || (i.y = e), this._tween = $e.to(this.target, i, this.elasticBackTime, Ze.sineOut, m.create(this, this.clear), 0, !1, !1);
                    }
                }
            }, {
                key: "tweenMove",
                value: function () {
                    this._offsetX *= this.ratio * this._elasticRateX, this._offsetY *= this.ratio * this._elasticRateY,
                        this.target.x += this._offsetX, this.target.y += this._offsetY, this.area &amp;&amp; this.checkArea(),
                        this.target.event(Gt.DRAG_MOVE, this.data), (Math.abs(this._offsetX) &lt; 1 &amp;&amp; Math.abs(this._offsetY) &lt; 1 || this._elasticRateX &lt; .5 || this._elasticRateY &lt; .5) &amp;&amp; (i.systemTimer.clear(this, this.tweenMove),
                            this.elasticDistance &gt; 0 ? this.checkElastic() : this.clear());
                }
            }, {
                key: "clear",
                value: function () {
                    if (this.target) {
                        this.clearTimer();
                        var t = this.target;
                        this.target = null, this._parent = null, t.event(Gt.DRAG_END, this.data);
                    }
                }
            }]), t;
        }(), ti = function () {
            function t() {
                _classCallCheck(this, t), this._id = K.getGID(), this._resetComp();
            }
            return _createClass(t, [{
                key: "_isScript",
                value: function () {
                    return !1;
                }
            }, {
                key: "_resetComp",
                value: function () {
                    this._indexInList = -1, this._enabled = !0, this._awaked = !1, this.owner = null;
                }
            }, {
                key: "_getIndexInList",
                value: function () {
                    return this._indexInList;
                }
            }, {
                key: "_setIndexInList",
                value: function (t) {
                    this._indexInList = t;
                }
            }, {
                key: "_onAdded",
                value: function () { }
            }, {
                key: "_onAwake",
                value: function () { }
            }, {
                key: "_onEnable",
                value: function () { }
            }, {
                key: "_onDisable",
                value: function () { }
            }, {
                key: "_onDestroy",
                value: function () { }
            }, {
                key: "onReset",
                value: function () { }
            }, {
                key: "_parse",
                value: function (t) { }
            }, {
                key: "_cloneTo",
                value: function (t) { }
            }, {
                key: "_setActive",
                value: function (t) {
                    t ? (this._awaked || (this._awaked = !0, this._onAwake()), this._enabled &amp;&amp; this._onEnable()) : this._enabled &amp;&amp; this._onDisable();
                }
            }, {
                key: "destroy",
                value: function () {
                    this.owner &amp;&amp; this.owner._destroyComponent(this);
                }
            }, {
                key: "_destroy",
                value: function () {
                    this.owner.activeInHierarchy &amp;&amp; this._enabled &amp;&amp; this._setActive(!1), this._onDestroy(),
                        this._destroyed = !0, this.onReset !== t.prototype.onReset ? (this.onReset(), this._resetComp(),
                            n.recoverByClass(this)) : this._resetComp();
                }
            }, {
                key: "id",
                get: function () {
                    return this._id;
                }
            }, {
                key: "enabled",
                get: function () {
                    return this._enabled;
                },
                set: function (t) {
                    this._enabled != t &amp;&amp; (this._enabled = t, this.owner &amp;&amp; (t ? this.owner.activeInHierarchy &amp;&amp; this._onEnable() : this.owner.activeInHierarchy &amp;&amp; this._onDisable()));
                }
            }, {
                key: "isSingleton",
                get: function () {
                    return !0;
                }
            }, {
                key: "destroyed",
                get: function () {
                    return this._destroyed;
                }
            }]), t;
        }(), ei = function (t) {
            _inherits(n, t);
            var i = _createSuper(n);
            function n() {
                var t;
                return _classCallCheck(this, n), (t = i.call(this)).wrapMode = 0, t._interval = e.animationInterval,
                    t._isReverse = !1, t._frameRateChanged = !1, t._setBitUp(de.DISPLAY), t;
            }
            return _createClass(n, [{
                key: "play",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, e = !(arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1]) || arguments[1], i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : "";
                    this._isPlaying = !0, this._actionName = i, this.index = "string" == typeof t ? this._getFrameByLabel(t) : t,
                        this.loop = e, this._isReverse = this.wrapMode === n.WRAP_REVERSE, 0 == this.index &amp;&amp; this._isReverse &amp;&amp; (this.index = this.count - 1),
                        this.interval &gt; 0 &amp;&amp; this.timerLoop(this.interval, this, this._frameLoop, null, !0, !0);
                }
            }, {
                key: "_getFrameByLabel",
                value: function (t) {
                    for (var e = 0; e &lt; this._count; e++) {
                        var i = this._labels[e];
                        if (i &amp;&amp; i.indexOf(t) &gt; -1) return e;
                    }
                    return 0;
                }
            }, {
                key: "_frameLoop",
                value: function () {
                    if (this._isReverse) {
                        if (this._index--, this._index &lt; 0) {
                            if (!this.loop) return this._index = 0, this.stop(), void this.event(Gt.COMPLETE);
                            this.wrapMode == n.WRAP_PINGPONG ? (this._index = this._count &gt; 0 ? 1 : 0, this._isReverse = !1) : this._index = this._count - 1,
                                this.event(Gt.COMPLETE);
                        }
                    } else if (this._index++, this._index &gt;= this._count) {
                        if (!this.loop) return this._index--, this.stop(), void this.event(Gt.COMPLETE);
                        this.wrapMode == n.WRAP_PINGPONG ? (this._index = this._count - 2 &gt;= 0 ? this._count - 2 : 0,
                            this._isReverse = !0) : this._index = 0, this.event(Gt.COMPLETE);
                    }
                    this.index = this._index;
                }
            }, {
                key: "_setControlNode",
                value: function (t) {
                    this._controlNode &amp;&amp; (this._controlNode.off(Gt.DISPLAY, this, this._resumePlay),
                        this._controlNode.off(Gt.UNDISPLAY, this, this._resumePlay)), this._controlNode = t,
                        t &amp;&amp; t != this &amp;&amp; (t.on(Gt.DISPLAY, this, this._resumePlay), t.on(Gt.UNDISPLAY, this, this._resumePlay));
                }
            }, {
                key: "_setDisplay",
                value: function (t) {
                    _get(_getPrototypeOf(n.prototype), "_setDisplay", this).call(this, t), this._resumePlay();
                }
            }, {
                key: "_resumePlay",
                value: function () {
                    this._isPlaying &amp;&amp; (this._controlNode.displayedInStage ? this.play(this._index, this.loop, this._actionName) : this.clearTimer(this, this._frameLoop));
                }
            }, {
                key: "stop",
                value: function () {
                    this._isPlaying = !1, this.clearTimer(this, this._frameLoop);
                }
            }, {
                key: "addLabel",
                value: function (t, e) {
                    this._labels || (this._labels = {}), this._labels[e] || (this._labels[e] = []),
                        this._labels[e].push(t);
                }
            }, {
                key: "removeLabel",
                value: function (t) {
                    if (t) {
                        if (this._labels) for (var e in this._labels) this._removeLabelFromList(this._labels[e], t);
                    } else this._labels = null;
                }
            }, {
                key: "_removeLabelFromList",
                value: function (t, e) {
                    if (t) for (var i = t.length - 1; i &gt;= 0; i--) t[i] == e &amp;&amp; t.splice(i, 1);
                }
            }, {
                key: "gotoAndStop",
                value: function (t) {
                    this.index = "string" == typeof t ? this._getFrameByLabel(t) : t, this.stop();
                }
            }, {
                key: "_displayToIndex",
                value: function (t) { }
            }, {
                key: "clear",
                value: function () {
                    return this.stop(), this._labels = null, this;
                }
            }, {
                key: "interval",
                get: function () {
                    return this._interval;
                },
                set: function (t) {
                    this._interval != t &amp;&amp; (this._frameRateChanged = !0, this._interval = t, this._isPlaying &amp;&amp; t &gt; 0 &amp;&amp; this.timerLoop(t, this, this._frameLoop, null, !0, !0));
                }
            }, {
                key: "isPlaying",
                get: function () {
                    return this._isPlaying;
                }
            }, {
                key: "index",
                get: function () {
                    return this._index;
                },
                set: function (t) {
                    if (this._index = t, this._displayToIndex(t), this._labels &amp;&amp; this._labels[t]) for (var e = this._labels[t], i = 0, n = e.length; i &lt; n; i++) this.event(Gt.LABEL, e[i]);
                }
            }, {
                key: "count",
                get: function () {
                    return this._count;
                }
            }]), n;
        }(Ce);
        ei.WRAP_POSITIVE = 0, ei.WRAP_REVERSE = 1, ei.WRAP_PINGPONG = 2, ge.regClass("laya.display.AnimationBase", ei),
            ge.regClass("Laya.AnimationBase", ei);
        var ii = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "subtractVector3",
                value: function (t, e, i) {
                    i[0] = t[0] - e[0], i[1] = t[1] - e[1], i[2] = t[2] - e[2];
                }
            }, {
                key: "lerp",
                value: function (t, e, i) {
                    return t * (1 - i) + e * i;
                }
            }, {
                key: "scaleVector3",
                value: function (t, e, i) {
                    i[0] = t[0] * e, i[1] = t[1] * e, i[2] = t[2] * e;
                }
            }, {
                key: "lerpVector3",
                value: function (t, e, i, n) {
                    var r = t[0], s = t[1], a = t[2];
                    n[0] = r + i * (e[0] - r), n[1] = s + i * (e[1] - s), n[2] = a + i * (e[2] - a);
                }
            }, {
                key: "lerpVector4",
                value: function (t, e, i, n) {
                    var r = t[0], s = t[1], a = t[2], o = t[3];
                    n[0] = r + i * (e[0] - r), n[1] = s + i * (e[1] - s), n[2] = a + i * (e[2] - a),
                        n[3] = o + i * (e[3] - o);
                }
            }, {
                key: "slerpQuaternionArray",
                value: function (t, e, i, n, r, s, a) {
                    var o, l, h, u, c, _ = t[e + 0], d = t[e + 1], f = t[e + 2], v = t[e + 3], p = i[n + 0], y = i[n + 1], g = i[n + 2], m = i[n + 3];
                    return (l = _ * p + d * y + f * g + v * m) &lt; 0 &amp;&amp; (l = -l, p = -p, y = -y, g = -g,
                        m = -m), 1 - l &gt; 1e-6 ? (o = Math.acos(l), h = Math.sin(o), u = Math.sin((1 - r) * o) / h,
                            c = Math.sin(r * o) / h) : (u = 1 - r, c = r), s[a + 0] = u * _ + c * p, s[a + 1] = u * d + c * y,
                        s[a + 2] = u * f + c * g, s[a + 3] = u * v + c * m, s;
                }
            }, {
                key: "getRotation",
                value: function (t, e, i, n) {
                    return Math.atan2(n - e, i - t) / Math.PI * 180;
                }
            }, {
                key: "sortBigFirst",
                value: function (t, e) {
                    return t == e ? 0 : e &gt; t ? 1 : -1;
                }
            }, {
                key: "sortSmallFirst",
                value: function (t, e) {
                    return t == e ? 0 : e &gt; t ? -1 : 1;
                }
            }, {
                key: "sortNumBigFirst",
                value: function (t, e) {
                    return parseFloat(e) - parseFloat(t);
                }
            }, {
                key: "sortNumSmallFirst",
                value: function (t, e) {
                    return parseFloat(t) - parseFloat(e);
                }
            }, {
                key: "sortByKey",
                value: function (e) {
                    var i, n = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1], r = !(arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2]) || arguments[2];
                    return i = n ? r ? t.sortNumBigFirst : t.sortBigFirst : r ? t.sortNumSmallFirst : t.sortSmallFirst,
                        function (t, n) {
                            return i(t[e], n[e]);
                        };
                }
            }]), t;
        }(), ni = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), t = e.call(this), void 0 === i._sortIndexFun &amp;&amp; (i._sortIndexFun = ii.sortByKey("index", !1, !0)),
                    t;
            }
            return _createClass(i, null, [{
                key: "_sortIndexFun",
                value: function (t, e) {
                    return t.index - e.index;
                }
            }]), _createClass(i, [{
                key: "_setUp",
                value: function (t, e) {
                    this._targetDic = t, this._animationData = e, this.interval = 1e3 / e.frameRate,
                        e.parsed ? (this._count = e.count, this._labels = e.labels, this._usedFrames = e.animationNewFrames) : (this._usedFrames = [],
                            this._calculateDatas(), e.parsed = !0, e.labels = this._labels, e.count = this._count,
                            e.animationNewFrames = this._usedFrames);
                }
            }, {
                key: "clear",
                value: function () {
                    return _get(_getPrototypeOf(i.prototype), "clear", this).call(this), this._targetDic = null,
                        this._animationData = null, this;
                }
            }, {
                key: "_displayToIndex",
                value: function (t) {
                    if (this._animationData) {
                        t &lt; 0 &amp;&amp; (t = 0), t &gt; this._count &amp;&amp; (t = this._count);
                        var e, i = this._animationData.nodes, n = i.length;
                        for (e = 0; e &lt; n; e++) this._displayNodeToFrame(i[e], t);
                    }
                }
            }, {
                key: "_displayNodeToFrame",
                value: function (t, e) {
                    var i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null;
                    i || (i = this._targetDic);
                    var n = i[t.target];
                    if (n) {
                        var r, s, a, o, l = t.frames, h = t.keys, u = h.length;
                        for (o = 0; o &lt; u; o++) a = (s = l[r = h[o]]).length &gt; e ? s[e] : s[s.length - 1],
                            n[r] = a;
                        var c, _ = t.funkeys;
                        if (0 != (u = _.length)) for (o = 0; o &lt; u; o++) void 0 !== (c = l[r = _[o]])[e] &amp;&amp; n[r] &amp;&amp; n[r].apply(n, c[e]);
                    }
                }
            }, {
                key: "_calculateDatas",
                value: function () {
                    if (this._animationData) {
                        var t, e, i = this._animationData.nodes, n = i.length;
                        for (this._count = 0, t = 0; t &lt; n; t++) e = i[t], this._calculateKeyFrames(e);
                        this._count += 1;
                    }
                }
            }, {
                key: "_calculateKeyFrames",
                value: function (t) {
                    var e, n, r = t.keyframes, s = t.target;
                    for (e in t.frames || (t.frames = {}), t.keys ? t.keys.length = 0 : t.keys = [],
                        t.funkeys ? t.funkeys.length = 0 : t.funkeys = [], t.initValues || (t.initValues = {}),
                        r) {
                        var a = -1 != e.indexOf("()");
                        if (n = r[e], a &amp;&amp; (e = e.substr(0, e.length - 2)), t.frames[e] || (t.frames[e] = []),
                            a) {
                            t.funkeys.push(e);
                            for (var o = t.frames[e], l = 0; l &lt; n.length; l++) {
                                var h = n[l];
                                o[h.index] = h.value, h.index &gt; this._count &amp;&amp; (this._count = h.index);
                            }
                        } else this._targetDic &amp;&amp; this._targetDic[s] &amp;&amp; (t.initValues[e] = this._targetDic[s][e]),
                            n.sort(i._sortIndexFun), t.keys.push(e), this._calculateNodePropFrames(n, t.frames[e], e, s);
                    }
                }
            }, {
                key: "resetNodes",
                value: function () {
                    if (this._targetDic &amp;&amp; this._animationData) {
                        var t, e, i, n = this._animationData.nodes, r = n.length;
                        for (t = 0; t &lt; r; t++) if (i = (e = n[t]).initValues) {
                            var s, a = this._targetDic[e.target];
                            if (a) for (s in i) a[s] = i[s];
                        }
                    }
                }
            }, {
                key: "_calculateNodePropFrames",
                value: function (t, e, i, n) {
                    var r, s = t.length - 1;
                    for (e.length = t[s].index + 1, r = 0; r &lt; s; r++) this._dealKeyFrame(t[r]), this._calculateFrameValues(t[r], t[r + 1], e);
                    0 == s &amp;&amp; (e[0] = t[0].value, this._usedFrames &amp;&amp; (this._usedFrames[t[0].index] = !0)),
                        this._dealKeyFrame(t[r]);
                }
            }, {
                key: "_dealKeyFrame",
                value: function (t) {
                    t.label &amp;&amp; "" != t.label &amp;&amp; this.addLabel(t.label, t.index);
                }
            }, {
                key: "_calculateFrameValues",
                value: function (t, e, i) {
                    var n, r, s = t.index, a = e.index, o = t.value, l = e.value - t.value, h = a - s, u = this._usedFrames;
                    if (a &gt; this._count &amp;&amp; (this._count = a), t.tween) for (null == (r = Ze[t.tweenMethod]) &amp;&amp; (r = Ze.linearNone),
                        n = s; n &lt; a; n++) i[n] = r(n - s, o, l, h), u &amp;&amp; (u[n] = !0); else for (n = s; n &lt; a; n++) i[n] = o;
                    u &amp;&amp; (u[t.index] = !0, u[e.index] = !0), i[e.index] = e.value;
                }
            }]), i;
        }(ei);
        ge.regClass("laya.display.FrameAnimation", ni), ge.regClass("Laya.FrameAnimation", ni);
        var ri = function () {
            function t() {
                _classCallCheck(this, t), this._obj = {}, t._maps.push(this);
            }
            return _createClass(t, [{
                key: "set",
                value: function (e, i) {
                    null != e &amp;&amp; (t.supportWeakMap || ("string" == typeof e || "number" == typeof e ? this._obj[e] = i : (e.$_GID || (e.$_GID = K.getGID()),
                        this._obj[e.$_GID] = i)));
                }
            }, {
                key: "get",
                value: function (e) {
                    return null == e ? null : t.supportWeakMap ? void 0 : "string" == typeof e || "number" == typeof e ? this._obj[e] : this._obj[e.$_GID];
                }
            }, {
                key: "del",
                value: function (e) {
                    null != e &amp;&amp; (t.supportWeakMap || ("string" == typeof e || "number" == typeof e ? delete this._obj[e] : delete this._obj[this._obj.$_GID]));
                }
            }, {
                key: "has",
                value: function (e) {
                    return null != e &amp;&amp; (t.supportWeakMap ? void 0 : "string" == typeof e || "number" == typeof e ? null != this._obj[e] : null != this._obj[this._obj.$_GID]);
                }
            }], [{
                key: "__init__",
                value: function () {
                    t.I = new t(), t.supportWeakMap || i.systemTimer.loop(t.delInterval, null, t.clearCache);
                }
            }, {
                key: "clearCache",
                value: function () {
                    for (var e = 0, i = t._maps.length; e &lt; i; e++) {
                        t._maps[e]._obj = {};
                    }
                }
            }]), t;
        }();
        ri.supportWeakMap = !1, ri.delInterval = 6e5, ri._maps = [];
        var si = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "__init",
                value: function () {
                    t._funMap = new ri();
                }
            }, {
                key: "getBindFun",
                value: function (e) {
                    var i = t._funMap.get(e);
                    if (null == i) {
                        var n = '"' + e + '"', r = "(function(data){if(data==null)return;with(data){try{\nreturn " + (n = n.replace(/^"\${|}"$/g, "").replace(/\${/g, '"+').replace(/}/g, '+"')) + "\n}catch(e){}}})";
                        i = window.Laya._runScript(r), t._funMap.set(e, i);
                    }
                    return i;
                }
            }, {
                key: "createByData",
                value: function (e, i) {
                    var n = oi.create();
                    if ((e = t.createComp(i, e, e, null, n))._setBit(de.NOT_READY, !0), "_idMap" in e &amp;&amp; (e._idMap = n._idMap),
                        i.animations) {
                        var r, s, a, o = [], l = i.animations, h = l.length;
                        for (r = 0; r &lt; h; r++) {
                            switch (s = new ni(), a = l[r], s._setUp(n._idMap, a), e[a.name] = s, s._setControlNode(e),
                            a.action) {
                                case 1:
                                    s.play(0, !1);
                                    break;

                                case 2:
                                    s.play(0, !0);
                            }
                            o.push(s);
                        }
                        e._aniList = o;
                    }
                    return "Scene" === e._$componentType &amp;&amp; e._width &gt; 0 &amp;&amp; null == i.props.hitTestPrior &amp;&amp; !e.mouseThrough &amp;&amp; (e.hitTestPrior = !0),
                        n.beginLoad(e), e;
                }
            }, {
                key: "createInitTool",
                value: function () {
                    return oi.create();
                }
            }, {
                key: "createComp",
                value: function (e) {
                    var n = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, r = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, s = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, a = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null;
                    if ("Scene3D" == e.type || "Sprite3D" == e.type) {
                        var o = [], l = i.Laya.Utils3D._createSceneByJsonForMaker(e, o, a);
                        return "Sprite3D" == e.type ? i.Laya.StaticBatchManager.combine(l, o) : i.Laya.StaticBatchManager.combine(null, o),
                            l;
                    }
                    if (!(n = n || t.getCompInstance(e))) return e.props &amp;&amp; e.props.runtime ? console.warn("runtime not found:" + e.props.runtime) : console.warn("can not create:" + e.type),
                        null;
                    var h = e.child;
                    if (h) for (var u = "List" == n._$componentType, c = 0, _ = h.length; c &lt; _; c++) {
                        var d = h[c];
                        if (!("itemRender" in n) || "render" != d.props.name &amp;&amp; "render" !== d.props.renderType) if ("Graphic" == d.type) i.ClassUtils._addGraphicsToSprite(d, n); else if (i.ClassUtils._isDrawType(d.type)) i.ClassUtils._addGraphicToSprite(d, n, !0); else {
                            if (u) {
                                var f = [], v = t.createComp(d, null, r, f, a);
                                f.length &amp;&amp; (v._$bindData = f);
                            } else v = t.createComp(d, null, r, s, a);
                            "Script" == d.type ? v instanceof ti ? n._addComponentInstance(v) : "owner" in v ? v.owner = n : "target" in v &amp;&amp; (v.target = n) : "mask" == d.props.renderType || "mask" == d.props.name ? n.mask = v : v instanceof xe &amp;&amp; n.addChild(v);
                        } else n.itemRender = d;
                    }
                    var p = e.props;
                    for (var y in p) {
                        var g = p[y];
                        "string" == typeof g &amp;&amp; (g.indexOf("@node:") &gt;= 0 || g.indexOf("@Prefab:") &gt;= 0) ? a &amp;&amp; a.addNodeRef(n, y, g) : t.setCompValue(n, y, g, r, s);
                    }
                    return n._afterInited &amp;&amp; n._afterInited(), e.compId &amp;&amp; a &amp;&amp; a._idMap &amp;&amp; (a._idMap[e.compId] = n),
                        n;
                }
            }, {
                key: "setCompValue",
                value: function (e, n, r) {
                    var s = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, a = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null;
                    if ("string" == typeof r &amp;&amp; r.indexOf("${") &gt; -1) {
                        if (t._sheet || (t._sheet = i.ClassUtils.getClass("laya.data.Table")), !t._sheet) return void console.warn("Can not find class Sheet");
                        if (a) a.push(e, n, r); else if (s) {
                            -1 == r.indexOf("].") &amp;&amp; (r = r.replace(".", "[0]."));
                            var o, l, h = new ai(e, n, r);
                            h.exe(s);
                            for (var u = r.replace(/\[.*?\]\./g, "."); null != (o = t._parseWatchData.exec(u));) {
                                for (var c = o[1]; null != (l = t._parseKeyWord.exec(c));) {
                                    var _ = l[0], d = s._watchMap[_] || (s._watchMap[_] = []);
                                    d.push(h), t._sheet.I.notifer.on(_, s, s.changeData, [_]);
                                }
                                (d = s._watchMap[c] || (s._watchMap[c] = [])).push(h), t._sheet.I.notifer.on(c, s, s.changeData, [c]);
                            }
                        }
                    } else "var" === n &amp;&amp; s ? s[r] = e : e[n] = "true" === r || "false" !== r &amp;&amp; r;
                }
            }, {
                key: "getCompInstance",
                value: function (e) {
                    if ("UIView" == e.type &amp;&amp; e.props &amp;&amp; e.props.pageData) return t.createByData(null, e.props.pageData);
                    var r = e.props &amp;&amp; e.props.runtime || e.type, s = i.ClassUtils.getClass(r);
                    if (!s) throw "Can not find class " + r;
                    if ("Script" === e.type &amp;&amp; s.prototype._doAwake) {
                        var a = n.createByClass(s);
                        return a._destroyed = !1, a;
                    }
                    return e.props &amp;&amp; "renderType" in e.props &amp;&amp; "instance" == e.props.renderType ? (s.instance || (s.instance = new s()),
                        s.instance) : new s();
                }
            }]), t;
        }();
        si._parseWatchData = /\${(.*?)}/g, si._parseKeyWord = /[a-zA-Z_][a-zA-Z0-9_]*(?:(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+)/g;
        var ai = function () {
            function t(e, i, n) {
                _classCallCheck(this, t), this.comp = e, this.prop = i, this.value = n;
            }
            return _createClass(t, [{
                key: "exe",
                value: function (t) {
                    var e = si.getBindFun(this.value);
                    this.comp[this.prop] = e.call(this, t);
                }
            }]), t;
        }(), oi = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "reset",
                value: function () {
                    this._nodeRefList = null, this._initList = null, this._idMap = null, this._loadList = null,
                        this._scene = null;
                }
            }, {
                key: "recover",
                value: function () {
                    this.reset(), n.recover("InitTool", this);
                }
            }, {
                key: "addLoadRes",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    this._loadList || (this._loadList = []), e ? this._loadList.push({
                        url: t,
                        type: e
                    }) : this._loadList.push(t);
                }
            }, {
                key: "addNodeRef",
                value: function (t, e, i) {
                    this._nodeRefList || (this._nodeRefList = []), this._nodeRefList.push([t, e, i]),
                        i.indexOf("@Prefab:") &gt;= 0 &amp;&amp; this.addLoadRes(i.replace("@Prefab:", ""), Xe.PREFAB);
                }
            }, {
                key: "setNodeRef",
                value: function () {
                    if (this._nodeRefList) if (this._idMap) {
                        var t, e, i;
                        for (e = this._nodeRefList.length, t = 0; t &lt; e; t++) (i = this._nodeRefList[t])[0][i[1]] = this.getReferData(i[2]);
                        this._nodeRefList = null;
                    } else this._nodeRefList = null;
                }
            }, {
                key: "getReferData",
                value: function (t) {
                    if (t.indexOf("@Prefab:") &gt;= 0) return Xe.getRes(t.replace("@Prefab:", ""));
                    if (t.indexOf("@arr:") &gt;= 0) {
                        var e, i, n, r;
                        for (n = (e = (t = t.replace("@arr:", "")).split(",")).length, i = 0; i &lt; n; i++) r = e[i],
                            e[i] = r ? this._idMap[r.replace("@node:", "")] : null;
                        return e;
                    }
                    return this._idMap[t.replace("@node:", "")];
                }
            }, {
                key: "addInitItem",
                value: function (t) {
                    this._initList || (this._initList = []), this._initList.push(t);
                }
            }, {
                key: "doInits",
                value: function () {
                    this._initList &amp;&amp; (this._initList = null);
                }
            }, {
                key: "finish",
                value: function () {
                    this.setNodeRef(), this.doInits(), this._scene._setBit(de.NOT_READY, !1), this._scene.parent &amp;&amp; this._scene.parent.activeInHierarchy &amp;&amp; this._scene.active &amp;&amp; this._scene._processActive(),
                        this._scene.event("onViewCreated"), this.recover();
                }
            }, {
                key: "beginLoad",
                value: function (t) {
                    this._scene = t, !this._loadList || this._loadList.length &lt; 1 ? this.finish() : i.loader.load(this._loadList, m.create(this, this.finish));
                }
            }], [{
                key: "create",
                value: function () {
                    var e = n.getItemByClass("InitTool", t);
                    return e._idMap = [], e;
                }
            }]), t;
        }(), li = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "show",
                value: function () { }
            }, {
                key: "enable",
                value: function () { }
            }, {
                key: "hide",
                value: function () { }
            }, {
                key: "set_onclick",
                value: function (t) { }
            }, {
                key: "isCanvasRender",
                value: function () {
                    return !0;
                }
            }, {
                key: "renderNotCanvas",
                value: function (t, e, i) { }
            }]), t;
        }(), hi = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                var t;
                return _classCallCheck(this, n), (t = e.apply(this, arguments))._show = !1, t._useCanvas = !1,
                    t._height = 100, t._view = [], t;
            }
            return _createClass(n, [{
                key: "show",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0;
                    zt.onMiniGame || i.Render.isConchApp || zt.onBDMiniGame || zt.onKGMiniGame || zt.onQGMiniGame || zt.onQQMiniGame || zt.onAlipayMiniGame || zt.onBLMiniGame || (this._useCanvas = !0),
                        this._show = !0, U._fpsData.length = 60, this._view[0] = {
                            title: "FPS(WebGL)",
                            value: "_fpsStr",
                            color: "yellow",
                            units: "int"
                        }, this._view[1] = {
                            title: "Sprite",
                            value: "_spriteStr",
                            color: "white",
                            units: "int"
                        }, this._view[2] = {
                            title: "RenderBatches",
                            value: "renderBatches",
                            color: "white",
                            units: "int"
                        }, this._view[3] = {
                            title: "SavedRenderBatches",
                            value: "savedRenderBatches",
                            color: "white",
                            units: "int"
                        }, this._view[4] = {
                            title: "CPUMemory",
                            value: "cpuMemory",
                            color: "yellow",
                            units: "M"
                        }, this._view[5] = {
                            title: "GPUMemory",
                            value: "gpuMemory",
                            color: "yellow",
                            units: "M"
                        }, this._view[6] = {
                            title: "Shader",
                            value: "shaderCall",
                            color: "white",
                            units: "int"
                        }, this._view[7] = {
                            title: "Canvas",
                            value: "_canvasStr",
                            color: "white",
                            units: "int"
                        }, ee.is3DMode &amp;&amp; (this._view[0].title = "FPS(3D)", this._view[8] = {
                            title: "TriFaces",
                            value: "trianglesFaces",
                            color: "white",
                            units: "int"
                        }, this._view[9] = {
                            title: "FrustumCulling",
                            value: "frustumCulling",
                            color: "white",
                            units: "int"
                        }, this._view[10] = {
                            title: "OctreeNodeCulling",
                            value: "octreeNodeCulling",
                            color: "white",
                            units: "int"
                        }), this._useCanvas ? this.createUIPre(t, e) : this.createUI(t, e), this.enable();
                }
            }, {
                key: "createUIPre",
                value: function (t, e) {
                    var i = zt.pixelRatio;
                    this._width = 180 * i, this._vx = 120 * i, this._height = i * (12 * this._view.length + 3 * i) + 4,
                        n._fontSize = 12 * i;
                    for (var r = 0; r &lt; this._view.length; r++) this._view[r].x = 4, this._view[r].y = r * n._fontSize + 2 * i;
                    this._canvas || (this._canvas = new pe(!0), this._canvas.size(this._width, this._height),
                        this._ctx = this._canvas.getContext("2d"), this._ctx.textBaseline = "top", this._ctx.font = n._fontSize + "px Arial",
                        this._canvas.source.style.cssText = "pointer-events:none;background:rgba(150,150,150,0.8);z-index:100000;position: absolute;direction:ltr;left:" + t + "px;top:" + e + "px;width:" + this._width / i + "px;height:" + this._height / i + "px;"),
                        zt.onKGMiniGame || zt.container.appendChild(this._canvas.source), this._first = !0,
                        this.loop(), this._first = !1;
                }
            }, {
                key: "createUI",
                value: function (t, e) {
                    var i = this._sp, r = zt.pixelRatio;
                    i || (i = new Ce(), this._leftText = new be(), this._leftText.pos(5, 5), this._leftText.color = "#ffffff",
                        i.addChild(this._leftText), this._txt = new be(), this._txt.pos(130 * r, 5), this._txt.color = "#ffffff",
                        i.addChild(this._txt), this._sp = i), i.pos(t, e);
                    for (var s = "", a = 0; a &lt; this._view.length; a++) {
                        s += this._view[a].title + "\n";
                    }
                    this._leftText.text = s;
                    var o = 138 * r, l = r * (12 * this._view.length + 3 * r) + 4;
                    this._txt.fontSize = n._fontSize * r, this._leftText.fontSize = n._fontSize * r,
                        i.size(o, l), i.graphics.clear(), i.graphics.alpha(.5), i.graphics.drawRect(0, 0, o + 110, l + 30, "#999999"),
                        i.graphics.alpha(2), this.loop();
                }
            }, {
                key: "enable",
                value: function () {
                    i.systemTimer.frameLoop(1, this, this.loop);
                }
            }, {
                key: "hide",
                value: function () {
                    this._show = !1, i.systemTimer.clear(this, this.loop), this._canvas &amp;&amp; zt.removeElement(this._canvas.source);
                }
            }, {
                key: "set_onclick",
                value: function (t) {
                    this._sp &amp;&amp; this._sp.on("click", this._sp, t), this._canvas &amp;&amp; (this._canvas.source.onclick = t,
                        this._canvas.source.style.pointerEvents = "");
                }
            }, {
                key: "loop",
                value: function () {
                    U._count++;
                    var t = zt.now();
                    if (!(t - U._timer &lt; 1e3)) {
                        var e = U._count;
                        if (U.FPS = Math.round(1e3 * e / (t - U._timer)), this._show) {
                            U.trianglesFaces = Math.round(U.trianglesFaces / e), this._useCanvas ? U.renderBatches = Math.round(U.renderBatches / e) : U.renderBatches = Math.round(U.renderBatches / e) - 1,
                                U.savedRenderBatches = Math.round(U.savedRenderBatches / e), U.shaderCall = Math.round(U.shaderCall / e),
                                U.spriteRenderUseCacheCount = Math.round(U.spriteRenderUseCacheCount / e), U.canvasNormal = Math.round(U.canvasNormal / e),
                                U.canvasBitmap = Math.round(U.canvasBitmap / e), U.canvasReCache = Math.ceil(U.canvasReCache / e),
                                U.frustumCulling = Math.round(U.frustumCulling / e), U.octreeNodeCulling = Math.round(U.octreeNodeCulling / e);
                            var i = U.FPS &gt; 0 ? Math.floor(1e3 / U.FPS).toString() : " ";
                            U._fpsStr = U.FPS + (U.renderSlow ? " slow" : "") + " " + i, U._spriteStr = U.spriteCount + (U.spriteRenderUseCacheCount ? "/" + U.spriteRenderUseCacheCount : ""),
                                U._canvasStr = U.canvasReCache + "/" + U.canvasNormal + "/" + U.canvasBitmap, U.cpuMemory = C.cpuMemory,
                                U.gpuMemory = C.gpuMemory, this._useCanvas ? this.renderInfoPre() : this.renderInfo(),
                                U.clear();
                        }
                        U._count = 0, U._timer = t;
                    }
                }
            }, {
                key: "renderInfoPre",
                value: function () {
                    var t, e, i = 0;
                    if (this._canvas) {
                        var n = this._ctx;
                        for (n.clearRect(this._first ? 0 : this._vx, 0, this._width, this._height), i = 0; i &lt; this._view.length; i++) t = this._view[i],
                            this._first &amp;&amp; (n.fillStyle = "white", n.fillText(t.title, t.x, t.y)), n.fillStyle = t.color,
                            e = U[t.value], "M" == t.units &amp;&amp; (e = Math.floor(e / 1048576 * 100) / 100 + " M"),
                            n.fillText(e + "", t.x + this._vx, t.y);
                    }
                }
            }, {
                key: "renderInfo",
                value: function () {
                    for (var t = "", e = 0; e &lt; this._view.length; e++) {
                        var i = this._view[e], n = U[i.value];
                        "M" == i.units &amp;&amp; (n = Math.floor(n / 1048576 * 100) / 100 + " M"), "K" == i.units &amp;&amp; (n = Math.floor(n / 1024 * 100) / 100 + " K"),
                            t += n + "\n";
                    }
                    this._txt.text = t;
                }
            }, {
                key: "isCanvasRender",
                value: function () {
                    return this._useCanvas;
                }
            }, {
                key: "renderNotCanvas",
                value: function (t, e, i) {
                    this._show &amp;&amp; this._sp &amp;&amp; this._sp.render(t, 0, 0);
                }
            }]), n;
        }(li);
        hi._fontSize = 12;
        var ui = function () {
            function t() {
                var e = !(arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0]) || arguments[0];
                _classCallCheck(this, t), this.scale = 1, this.currTimer = Date.now(), this.currFrame = 0,
                    this._delta = 0, this._lastTimer = Date.now(), this._map = [], this._handlers = [],
                    this._temp = [], this._count = 0, e &amp;&amp; t.gSysTimer &amp;&amp; t.gSysTimer.frameLoop(1, this, this._update);
            }
            return _createClass(t, [{
                key: "_update",
                value: function () {
                    if (this.scale &lt;= 0) return this._lastTimer = Date.now(), void (this._delta = 0);
                    var t = this.currFrame = this.currFrame + this.scale, e = Date.now(), i = e - this._lastTimer &gt; 3e4;
                    this._delta = (e - this._lastTimer) * this.scale;
                    var n = this.currTimer = this.currTimer + this._delta;
                    this._lastTimer = e;
                    var r = this._handlers;
                    this._count = 0;
                    for (var s = 0, a = r.length; s &lt; a; s++) {
                        var o = r[s];
                        if (null !== o.method) {
                            var l = o.userFrame ? t : n;
                            if (l &gt;= o.exeTime) if (o.repeat) if (!o.jumpFrame || i) o.exeTime += o.delay, o.run(!1),
                                l &gt; o.exeTime &amp;&amp; (o.exeTime += Math.ceil((l - o.exeTime) / o.delay) * o.delay); else for (; l &gt;= o.exeTime;) o.exeTime += o.delay,
                                    o.run(!1); else o.run(!0);
                        } else this._count++;
                    }
                    (this._count &gt; 30 || t % 200 == 0) &amp;&amp; this._clearHandlers();
                }
            }, {
                key: "_clearHandlers",
                value: function () {
                    for (var t = this._handlers, e = 0, i = t.length; e &lt; i; e++) {
                        var n = t[e];
                        null !== n.method ? this._temp.push(n) : this._recoverHandler(n);
                    }
                    this._handlers = this._temp, t.length = 0, this._temp = t;
                }
            }, {
                key: "_recoverHandler",
                value: function (e) {
                    this._map[e.key] == e &amp;&amp; (this._map[e.key] = null), e.clear(), t._pool.push(e);
                }
            }, {
                key: "_create",
                value: function (e, i, n, r, s, a, o) {
                    if (!n) return s.apply(r, a), null;
                    if (o) {
                        var l = this._getHandler(r, s);
                        if (l) return l.repeat = i, l.userFrame = e, l.delay = n, l.caller = r, l.method = s,
                            l.args = a, l.exeTime = n + (e ? this.currFrame : this.currTimer + Date.now() - this._lastTimer),
                            l;
                    }
                    return (l = t._pool.length &gt; 0 ? t._pool.pop() : new ci()).repeat = i, l.userFrame = e,
                        l.delay = n, l.caller = r, l.method = s, l.args = a, l.exeTime = n + (e ? this.currFrame : this.currTimer + Date.now() - this._lastTimer),
                        this._indexHandler(l), this._handlers.push(l), l;
                }
            }, {
                key: "_indexHandler",
                value: function (e) {
                    var n = e.caller, r = e.method, s = n ? n.$_GID || (n.$_GID = i.Utils.getGID()) : 0, a = r.$_TID || (r.$_TID = 1e5 * t._mid++);
                    e.key = s + a, this._map[e.key] = e;
                }
            }, {
                key: "once",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, r = !(arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4]) || arguments[4];
                    this._create(!1, !1, t, e, i, n, r);
                }
            }, {
                key: "loop",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, r = !(arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4]) || arguments[4], s = arguments.length &gt; 5 &amp;&amp; void 0 !== arguments[5] &amp;&amp; arguments[5], a = this._create(!1, !0, t, e, i, n, r);
                    a &amp;&amp; (a.jumpFrame = s);
                }
            }, {
                key: "frameOnce",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, r = !(arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4]) || arguments[4];
                    this._create(!0, !1, t, e, i, n, r);
                }
            }, {
                key: "frameLoop",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, r = !(arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4]) || arguments[4];
                    this._create(!0, !0, t, e, i, n, r);
                }
            }, {
                key: "toString",
                value: function () {
                    return " handlers:" + this._handlers.length + " pool:" + t._pool.length;
                }
            }, {
                key: "clear",
                value: function (t, e) {
                    var i = this._getHandler(t, e);
                    i &amp;&amp; (this._map[i.key] = null, i.key = 0, i.clear());
                }
            }, {
                key: "clearAll",
                value: function (t) {
                    if (t) for (var e = 0, i = this._handlers.length; e &lt; i; e++) {
                        var n = this._handlers[e];
                        n.caller === t &amp;&amp; (this._map[n.key] = null, n.key = 0, n.clear());
                    }
                }
            }, {
                key: "_getHandler",
                value: function (e, n) {
                    var r = e ? e.$_GID || (e.$_GID = i.Utils.getGID()) : 0, s = n.$_TID || (n.$_TID = 1e5 * t._mid++);
                    return this._map[r + s];
                }
            }, {
                key: "callLater",
                value: function (t, e) {
                    var i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null;
                    Se.I.callLater(t, e, i);
                }
            }, {
                key: "runCallLater",
                value: function (t, e) {
                    Se.I.runCallLater(t, e);
                }
            }, {
                key: "runTimer",
                value: function (t, e) {
                    var i = this._getHandler(t, e);
                    i &amp;&amp; null != i.method &amp;&amp; (this._map[i.key] = null, i.run(!0));
                }
            }, {
                key: "pause",
                value: function () {
                    this.scale = 0;
                }
            }, {
                key: "resume",
                value: function () {
                    this.scale = 1;
                }
            }, {
                key: "delta",
                get: function () {
                    return this._delta;
                }
            }]), t;
        }();
        ui.gSysTimer = null, ui._pool = [], ui._mid = 1;
        var ci = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "clear",
                value: function () {
                    this.caller = null, this.method = null, this.args = null;
                }
            }, {
                key: "run",
                value: function (t) {
                    var e = this.caller;
                    if (e &amp;&amp; e.destroyed) return this.clear();
                    var i = this.method, n = this.args;
                    t &amp;&amp; this.clear(), null != i &amp;&amp; (n ? i.apply(e, n) : i.call(e));
                }
            }]), t;
        }(), _i = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i(t) {
                var n;
                _classCallCheck(this, i), (n = e.call(this, N.SKINMESH, 0)).offsetX = 300, n.offsetY = 0;
                var r = g.mainContext, s = 8 * It.BYTES_PE;
                return n.position = [2, r.FLOAT, !1, s, 0], n.texcoord = [2, r.FLOAT, !1, s, 2 * It.BYTES_PE],
                    n.color = [4, r.FLOAT, !1, s, 4 * It.BYTES_PE], n;
            }
            return i;
        }(V), di = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i(t) {
                var n;
                return _classCallCheck(this, i), (n = e.call(this, N.PRIMITIVE, 0))._attribLocation = ["position", 0, "attribColor", 1],
                    n;
            }
            return i;
        }(V), fi = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t, n = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0;
                return _classCallCheck(this, i), (t = e.call(this, N.TEXTURE2D, n)).strength = 0,
                    t.blurInfo = null, t.colorMat = null, t.colorAlpha = null, t._attribLocation = ["posuv", 0, "attribColor", 1, "attribFlags", 2],
                    t;
            }
            return _createClass(i, [{
                key: "clear",
                value: function () {
                    this.texture = null, this.shader = null, this.defines._value = this.subID;
                }
            }]), i;
        }(V), vi = function () {
            function t(e) {
                _classCallCheck(this, t), this.codes = {}, this.funs = {}, this.curUseID = -1, this.funnames = "",
                    this.script = e;
                for (var n, r, s = 0; !((s = e.indexOf("#begin", s)) &lt; 0);) {
                    for (r = s + 5; !((r = e.indexOf("#end", r)) &lt; 0) &amp;&amp; "i" === e.charAt(r + 4);) r += 5;
                    if (r &lt; 0) throw "add include err,no #end:" + e;
                    n = e.indexOf("\n", s);
                    var a = i.ShaderCompile.splitToWords(e.substr(s, n - s), null);
                    "code" == a[1] ? this.codes[a[2]] = e.substr(n + 1, r - n - 1) : "function" == a[1] &amp;&amp; (n = e.indexOf("function", s),
                        n += "function".length, this.funs[a[3]] = e.substr(n + 1, r - n - 1), this.funnames += a[3] + ";"),
                        s = r + 1;
                }
            }
            return _createClass(t, [{
                key: "getWith",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null, e = t ? this.codes[t] : this.script;
                    if (!e) throw "get with error:" + t;
                    return e;
                }
            }, {
                key: "getFunsScript",
                value: function (t) {
                    var e = "";
                    for (var i in this.funs) t.indexOf(i + ";") &gt;= 0 &amp;&amp; (e += this.funs[i]);
                    return e;
                }
            }]), t;
        }(), pi = function () {
            function t(e) {
                _classCallCheck(this, t), this.childs = [], this.text = "", this.useFuns = "", this.z = 0,
                    this.includefiles = e;
            }
            return _createClass(t, [{
                key: "setParent",
                value: function (t) {
                    t.childs.push(this), this.z = t.z + 1, this.parent = t;
                }
            }, {
                key: "setCondition",
                value: function (t, e) {
                    t &amp;&amp; (this.conditionType = e, t = t.replace(/(\s*$)/g, ""), this.condition = function () {
                        return this[t];
                    }, this.condition.__condition = t);
                }
            }, {
                key: "toscript",
                value: function (e, i) {
                    return this._toscript(e, i, ++t.__id);
                }
            }, {
                key: "_toscript",
                value: function (t, e, n) {
                    if (this.childs.length &lt; 1 &amp;&amp; !this.text) return e;
                    e.length;
                    if (this.condition) {
                        var r = !!this.condition.call(t);
                        if (this.conditionType === i.ShaderCompile.IFDEF_ELSE &amp;&amp; (r = !r), !r) return e;
                    }
                    if (this.text &amp;&amp; e.push(this.text), this.childs.length &gt; 0 &amp;&amp; this.childs.forEach(function (i, r, s) {
                        i._toscript(t, e, n);
                    }), this.includefiles.length &gt; 0 &amp;&amp; this.useFuns.length &gt; 0) for (var s, a = 0, o = this.includefiles.length; a &lt; o; a++) this.includefiles[a].curUseID != n &amp;&amp; (s = this.includefiles[a].file.getFunsScript(this.useFuns)).length &gt; 0 &amp;&amp; (this.includefiles[a].curUseID = n,
                        e[0] = s + e[0]);
                    return e;
                }
            }]), t;
        }();
        pi.__id = 1;
        var yi = function () {
            function t(e, i, n) {
                _classCallCheck(this, t), this.defs = {};
                var r = this;
                function s(e) {
                    e = e.replace(t._clearCR, "");
                    var i = [], n = new pi(i);
                    return r._compileToTree(n, e.split("\n"), 0, i, r.defs), n;
                }
                var a = Date.now();
                this._VS = s(e), this._PS = s(i), this._nameMap = n, Date.now() - a &gt; 2 &amp;&amp; console.log("ShaderCompile use time:" + (Date.now() - a) + "  size:" + e.length + "/" + i.length);
            }
            return _createClass(t, [{
                key: "_compileToTree",
                value: function (e, i, n, r, s) {
                    var a, o, l, h, u, c, _, d, f, v, p;
                    for (f = n; f &lt; i.length; f++) if (!((l = i[f]).length &lt; 1) &amp;&amp; 0 !== (c = l.indexOf("//"))) {
                        if (c &gt;= 0 &amp;&amp; (l = l.substr(0, c)), a = d || new pi(r), d = null, a.text = l, a.noCompile = !0,
                            (c = l.indexOf("#")) &gt;= 0) {
                            for (h = "#", p = c + 1, v = l.length; p &lt; v; p++) {
                                var y = l.charAt(p);
                                if (" " === y || "\t" === y || "?" === y) break;
                                h += y;
                            }
                            switch (a.name = h, h) {
                                case "#ifdef":
                                case "#ifndef":
                                    if (a.src = l, a.noCompile = null != l.match(/[!&amp;|()=&lt;&gt;]/), a.noCompile ? console.log("function():Boolean{return " + l.substr(c + a.name.length) + "}") : (_ = l.replace(/^\s*/, "").split(/\s+/),
                                        a.setCondition(_[1], "#ifdef" === h ? t.IFDEF_YES : t.IFDEF_ELSE), a.text = "//" + a.text),
                                        a.setParent(e), e = a, s) for (_ = l.substr(p).split(t._splitToWordExps3), p = 0; p &lt; _.length; p++) (l = _[p]).length &amp;&amp; (s[l] = !0);
                                    continue;

                                case "#if":
                                    if (a.src = l, a.noCompile = !0, a.setParent(e), e = a, s) for (_ = l.substr(p).split(t._splitToWordExps3),
                                        p = 0; p &lt; _.length; p++) (l = _[p]).length &amp;&amp; "defined" != l &amp;&amp; (s[l] = !0);
                                    continue;

                                case "#else":
                                    a.src = l, o = (e = e.parent).childs[e.childs.length - 1], a.noCompile = o.noCompile,
                                        a.noCompile || (a.condition = o.condition, a.conditionType = o.conditionType == t.IFDEF_YES ? t.IFDEF_ELSE : t.IFDEF_YES,
                                            a.text = "//" + a.text + " " + o.text + " " + a.conditionType), a.setParent(e),
                                        e = a;
                                    continue;

                                case "#endif":
                                    o = (e = e.parent).childs[e.childs.length - 1], a.noCompile = o.noCompile, a.noCompile || (a.text = "//" + a.text),
                                        a.setParent(e);
                                    continue;

                                case "#include":
                                    _ = t.splitToWords(l, null);
                                    var g = t.includes[_[1]];
                                    if (!g) throw "ShaderCompile error no this include file:" + _[1];
                                    if ((c = _[0].indexOf("?")) &lt; 0) {
                                        a.setParent(e), l = g.getWith("with" == _[2] ? _[3] : null), this._compileToTree(a, l.split("\n"), 0, r, s),
                                            a.text = "";
                                        continue;
                                    }
                                    a.setCondition(_[0].substr(c + 1), t.IFDEF_YES), a.text = g.getWith("with" == _[2] ? _[3] : null);
                                    break;

                                case "#import":
                                    u = (_ = t.splitToWords(l, null))[1], r.push({
                                        node: a,
                                        file: t.includes[u],
                                        ofs: a.text.length
                                    });
                                    continue;
                            }
                        } else {
                            if ((o = e.childs[e.childs.length - 1]) &amp;&amp; !o.name) {
                                r.length &gt; 0 &amp;&amp; t.splitToWords(l, o), d = a, o.text += "\n" + l;
                                continue;
                            }
                            r.length &gt; 0 &amp;&amp; t.splitToWords(l, a);
                        }
                        a.setParent(e);
                    }
                }
            }, {
                key: "createShader",
                value: function (t, e, i, n) {
                    var r = {}, s = "";
                    if (t) for (var a in t) s += "#define " + a + "\n", r[a] = !0;
                    var o = this._VS.toscript(r, []), l = this._PS.toscript(r, []);
                    return (i || W.create)(s + o.join("\n"), s + l.join("\n"), e, this._nameMap, n);
                }
            }], [{
                key: "__init__",
                value: function () {
                    var e = y.instance;
                    t.shaderParamsMap = {
                        float: e.FLOAT,
                        int: e.INT,
                        bool: e.BOOL,
                        vec2: e.FLOAT_VEC2,
                        vec3: e.FLOAT_VEC3,
                        vec4: e.FLOAT_VEC4,
                        ivec2: e.INT_VEC2,
                        ivec3: e.INT_VEC3,
                        ivec4: e.INT_VEC4,
                        bvec2: e.BOOL_VEC2,
                        bvec3: e.BOOL_VEC3,
                        bvec4: e.BOOL_VEC4,
                        mat2: e.FLOAT_MAT2,
                        mat3: e.FLOAT_MAT3,
                        mat4: e.FLOAT_MAT4,
                        sampler2D: e.SAMPLER_2D,
                        samplerCube: e.SAMPLER_CUBE
                    };
                }
            }, {
                key: "_parseOne",
                value: function (e, i, n, r, s, a) {
                    var o = {
                        type: t.shaderParamsMap[n[r + 1]],
                        name: n[r + 2],
                        size: isNaN(parseInt(n[r + 3])) ? 1 : parseInt(n[r + 3])
                    };
                    return a &amp;&amp; ("attribute" == s ? e.push(o) : i.push(o)), ":" == n[r + 3] &amp;&amp; (o.type = n[r + 4],
                        r += 2), r += 2;
                }
            }, {
                key: "addInclude",
                value: function (e, i) {
                    if (!i || 0 === i.length) throw new Error("add shader include file err:" + e);
                    if (t.includes[e]) throw new Error("add shader include file err, has add:" + e);
                    t.includes[e] = new vi(i);
                }
            }, {
                key: "preGetParams",
                value: function (e, i) {
                    var n, r, s = [e, i], a = {}, o = [], l = [], h = {}, u = [];
                    a.attributes = o, a.uniforms = l, a.defines = h;
                    for (var c = 0; c &lt; 2; c++) {
                        s[c] = s[c].replace(t._removeAnnotation, "");
                        var _, d = s[c].match(t._reg);
                        for (n = 0, r = d.length; n &lt; r; n++) {
                            var f = d[n];
                            if ("attribute" == f || "uniform" == f) n = t._parseOne(o, l, d, n, f, !0); else {
                                if ("#define" == f) {
                                    u[f = d[++n]] = 1;
                                    continue;
                                }
                                if ("#ifdef" == f) {
                                    h[_ = d[++n]] = h[_] || [];
                                    for (n++; n &lt; r; n++) if ("attribute" == (f = d[n]) || "uniform" == f) n = t._parseOne(o, l, d, n, f, u[_]); else if ("#else" == f) for (n++; n &lt; r; n++) if ("attribute" == (f = d[n]) || "uniform" == f) n = t._parseOne(o, l, d, n, f, !u[_]); else if ("#endif" == f) break;
                                }
                            }
                        }
                    }
                    return a;
                }
            }, {
                key: "splitToWords",
                value: function (t, e) {
                    for (var i, n, r = [], s = -1, a = 0, o = t.length; a &lt; o; a++) if (i = t.charAt(a),
                        " \t=+-*/&amp;%!&lt;&gt;()'\",;".indexOf(i) &gt;= 0) {
                        if (s &gt;= 0 &amp;&amp; a - s &gt; 1 &amp;&amp; (n = t.substr(s, a - s), r.push(n)), '"' == i || "'" == i) {
                            var l = t.indexOf(i, a + 1);
                            if (l &lt; 0) throw "Sharder err:" + t;
                            r.push(t.substr(a + 1, l - a - 1)), a = l, s = -1;
                            continue;
                        }
                        "(" == i &amp;&amp; e &amp;&amp; r.length &gt; 0 &amp;&amp; (n = r[r.length - 1] + ";", "vec4;main;".indexOf(n) &lt; 0 &amp;&amp; (e.useFuns += n)),
                            s = -1;
                    } else s &lt; 0 &amp;&amp; (s = a);
                    return s &lt; o &amp;&amp; o - s &gt; 1 &amp;&amp; (n = t.substr(s, o - s), r.push(n)), r;
                }
            }]), t;
        }();
        yi.IFDEF_NO = 0, yi.IFDEF_YES = 1, yi.IFDEF_ELSE = 2, yi.IFDEF_PARENT = 3, yi._removeAnnotation = new RegExp("(/\\*([^*]|[\\r\\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+/)|(//.*)", "g"),
            yi._reg = new RegExp("(\".*\")|('.*')|([#\\w\\*-\\.+/()=&lt;&gt;{}\\\\]+)|([,;:\\\\])", "g"),
            yi._splitToWordExps = new RegExp("[(\".*\")]+|[('.*')]+|([ \\t=\\+\\-*/&amp;%!&lt;&gt;!%(),;])", "g"),
            yi.includes = {}, yi._clearCR = new RegExp("\r", "g"), yi._splitToWordExps3 = new RegExp("[ \\t=\\+\\-*/&amp;%!&lt;&gt;!%(),;\\|]", "g");
        var gi = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                _classCallCheck(this, i), (t = e.call(this)).worker = new Worker(i.workerPath);
                var n = _assertThisInitialized(t);
                return t.worker.onmessage = function (t) {
                    n.workerMessage(t.data);
                }, t;
            }
            return _createClass(i, [{
                key: "workerMessage",
                value: function (t) {
                    if (t) switch (t.type) {
                        case "Image":
                            this.imageLoaded(t);
                            break;

                        case "Disable":
                            i.enable = !1;
                    }
                }
            }, {
                key: "imageLoaded",
                value: function (t) {
                    if (t.dataType &amp;&amp; "imageBitmap" == t.dataType) {
                        var e = t.imageBitmap;
                        console.log("load:", t.url), this.event(t.url, e);
                    } else this.event(t.url, null);
                }
            }, {
                key: "loadImage",
                value: function (t) {
                    this.worker.postMessage(t);
                }
            }, {
                key: "_loadImage",
                value: function (t) {
                    var e = this, n = e.type;
                    if (this._useWorkerLoader &amp;&amp; i._enable) {
                        t = x.formatURL(t);
                        var r = function (r) {
                            if (s(), r) {
                                var a = r;
                                "nativeimage" !== n &amp;&amp; (a = new S()).loadImageSource(r), e.onLoaded(a);
                            } else i._preLoadFun.call(e, t);
                        };
                        i.I.on(t, e, r), i.I.loadImage(t);
                    } else i._preLoadFun.call(e, t);
                    function s() {
                        i.I.off(t, e, r);
                    }
                }
            }], [{
                key: "__init__",
                value: function () {
                    return null == i._preLoadFun &amp;&amp; (!!Worker &amp;&amp; (i._preLoadFun = Xe.prototype._loadImage,
                        Xe.prototype._loadImage = i.prototype._loadImage, i.I || (i.I = new i()), !0));
                }
            }, {
                key: "workerSupported",
                value: function () {
                    return !!Worker;
                }
            }, {
                key: "enableWorkerLoader",
                value: function () {
                    i._tryEnabled || (i.enable = !0, i._tryEnabled = !0);
                }
            }, {
                key: "enable",
                set: function (t) {
                    i._enable != t &amp;&amp; (i._enable = t, t &amp;&amp; null == i._preLoadFun &amp;&amp; (i._enable = i.__init__()));
                },
                get: function () {
                    return i._enable;
                }
            }]), i;
        }(T);
        gi.workerPath = "libs/workerloader.js", gi._enable = !1, gi._tryEnabled = !1;
        var mi = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "__init__",
                value: function () {
                    t._style = zt.document.body.style;
                }
            }, {
                key: "hide",
                value: function () {
                    "none" != t.cursor &amp;&amp; (t._preCursor = t.cursor, t.cursor = "none");
                }
            }, {
                key: "show",
                value: function () {
                    "none" == t.cursor &amp;&amp; (t._preCursor ? t.cursor = t._preCursor : t.cursor = "auto");
                }
            }, {
                key: "cursor",
                set: function (e) {
                    t._style.cursor = e;
                },
                get: function () {
                    return t._style.cursor;
                }
            }]), t;
        }(), Ti = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i(t) {
                var n;
                return _classCallCheck(this, i), (n = e.call(this, i.const_stride, 4 * t * i.const_stride, 4)).canReuse = !0,
                    n.setAttributes(i._fixattriInfo), n.createQuadIB(t), n._quadNum = t, n;
            }
            return _createClass(i, [{
                key: "setMaxParticleNum",
                value: function (t) {
                    this._vb._resizeBuffer(4 * t * i.const_stride, !1), this.createQuadIB(t);
                }
            }, {
                key: "releaseMesh",
                value: function () {
                    this._vb.setByteLength(0), this.vertNum = 0, this.indexNum = 0, i._POOL.push(this);
                }
            }, {
                key: "destroy",
                value: function () {
                    this._ib.destroy(), this._vb.destroy(), this._vb.deleteBuffer();
                }
            }], [{
                key: "__init__",
                value: function () {
                    var t = y.instance;
                    i._fixattriInfo = [t.FLOAT, 4, 0, t.FLOAT, 3, 16, t.FLOAT, 3, 28, t.FLOAT, 4, 40, t.FLOAT, 4, 56, t.FLOAT, 3, 72, t.FLOAT, 2, 84, t.FLOAT, 4, 92, t.FLOAT, 1, 108, t.FLOAT, 1, 112];
                }
            }, {
                key: "getAMesh",
                value: function (t) {
                    if (i._POOL.length) {
                        var e = i._POOL.pop();
                        return e.setMaxParticleNum(t), e;
                    }
                    return new i(t);
                }
            }]), i;
        }(kt);
        Ti.const_stride = 116, Ti._POOL = [];
        var ki = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                return _classCallCheck(this, i), e.apply(this, arguments);
            }
            return i;
        }(R);
        ki.create = function (e, i, n) {
            var r = new S(e, i, n, !1, !1);
            return r.wrapModeU = t.WarpMode.Clamp, r.wrapModeV = t.WarpMode.Clamp, r;
        };
        var xi = function () {
            function e() {
                _classCallCheck(this, e);
            }
            return _createClass(e, null, [{
                key: "__init",
                value: function (t) {
                    t.forEach(function (t) {
                        t.__init$ &amp;&amp; t.__init$();
                    });
                }
            }, {
                key: "init",
                value: function (n, r) {
                    if (!e._isinit) {
                        e._isinit = !0, ArrayBuffer.prototype.slice || (ArrayBuffer.prototype.slice = e._arrayBufferSlice),
                            zt.__init__();
                        var s = zt.mainCanvas = new pe(!0), a = s.source.style;
                        a.position = "absolute", a.top = a.left = "0px", a.background = "#000000", zt.onKGMiniGame || zt.onAlipayMiniGame || zt.container.appendChild(s.source),
                            zt.canvas = new pe(!0), zt.context = zt.canvas.getContext("2d"), zt.supportWebAudio = Ue.__init__(),
                            zt.supportLocalStorage = je.__init__(), e.systemTimer = new ui(!1), t.systemTimer = ui.gSysTimer = e.systemTimer,
                            e.startTimer = new ui(!1), e.physicsTimer = new ui(!1), e.updateTimer = new ui(!1),
                            e.lateTimer = new ui(!1), e.timer = new ui(!1), t.startTimer = i.startTimer = e.startTimer,
                            t.lateTimer = i.lateTimer = e.lateTimer, t.updateTimer = i.updateTimer = e.updateTimer,
                            i.systemTimer = e.systemTimer, t.timer = i.timer = e.timer, t.physicsTimer = i.physicsTimer = e.physicsTimer,
                            e.loader = new ze(), i.Laya = e, t.loader = i.loader = e.loader, ri.__init__(),
                            si.__init(), mi.__init__(), $t.inner_enable();
                        for (var o = arguments.length, l = new Array(o &gt; 2 ? o - 2 : 0), h = 2; h &lt; o; h++) l[h - 2] = arguments[h];
                        if (l) for (var u = 0, c = l.length; u &lt; c; u++) l[u] &amp;&amp; l[u].enable &amp;&amp; l[u].enable();
                        return i.Render.isConchApp &amp;&amp; e.enableNative(), e.enableWebGLPlus(), ue.beginCheck(),
                            t.stage = e.stage = new Pe(), i.stage = e.stage, K.gStage = e.stage, x.rootPath = x._basePath = e._getUrlPath(),
                            xt.__int__(), Et.__init__(), Ct.__init__(), e.render = new ee(0, 0, zt.mainCanvas),
                            t.render = e.render, e.stage.size(n, r), window.stage = e.stage, g.__init__(), Ti.__init__(),
                            yi.__init__(), ve.__init__(), Le.__init__(), Ae.instance.__init__(e.stage, ee.canvas),
                            we.__init__(), Ue.autoStopMusic = !0, U._StatRender = new hi(), V._initone(N.TEXTURE2D, fi),
                            V._initone(N.TEXTURE2D | N.FILTERGLOW, fi), V._initone(N.PRIMITIVE, di), V._initone(N.SKINMESH, _i),
                            ee.canvas;
                    }
                }
            }, {
                key: "_getUrlPath",
                value: function () {
                    var t = zt.window.location, e = t.pathname;
                    return e = ":" == e.charAt(2) ? e.substring(1) : e, x.getPath("file:" == t.protocol ? e : t.protocol + "//" + t.host + t.pathname);
                }
            }, {
                key: "_arrayBufferSlice",
                value: function (t, e) {
                    var i = new Uint8Array(this, t, e - t), n = new Uint8Array(i.length);
                    return n.set(i), n.buffer;
                }
            }, {
                key: "alertGlobalError",
                value: function (t) {
                    var e = 0;
                    zt.window.onerror = t ? function (t, i, n, r, s) {
                        e++ &lt; 5 &amp;&amp; s &amp;&amp; this.alert("å‡ºé”™å•¦ï¼Œè¯·æŠŠæ­¤ä¿¡æ¯æˆªå›¾ç»™ç&nbsp;”å‘å•†\n" + t + "\n" + s.stack);
                    } : null;
                }
            }, {
                key: "_runScript",
                value: function (t) {
                    return zt.window[e._evcode](t);
                }
            }, {
                key: "enableDebugPanel",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : "libs/laya.debugtool.js";
                    if (window.Laya.DebugPanel) window.Laya.DebugPanel.enable(); else {
                        var e = zt.createElement("script");
                        e.onload = function () {
                            window.Laya.DebugPanel.enable();
                        }, e.src = t, zt.document.body.appendChild(e);
                    }
                }
            }, {
                key: "enableWebGLPlus",
                value: function () {
                    g.__init_native();
                }
            }, {
                key: "enableNative",
                value: function () {
                    e.isNativeRender_enable || (e.isNativeRender_enable = !0, ee.supportWebGLPlusRendering &amp;&amp; (W.prototype.uploadTexture2D = function (t) {
                        var e = y.instance;
                        e.bindTexture(e.TEXTURE_2D, t);
                    }), L.width = zt.window.innerWidth, L.height = zt.window.innerHeight, zt.measureText = function (t, e) {
                        return window.conchTextCanvas.font = e, window.conchTextCanvas.measureText(t);
                    }, Pe.clear = function (t) {
                        Qt.set2DRenderConfig();
                        var e = j.create(t).arrColor, i = y.instance;
                        e &amp;&amp; i.clearColor(e[0], e[1], e[2], e[3]), i.clear(i.COLOR_BUFFER_BIT | i.DEPTH_BUFFER_BIT | i.STENCIL_BUFFER_BIT),
                            L.clear();
                    }, Ce.drawToCanvas = Ce.drawToTexture = function (t, e, i, n, r, s) {
                        r -= t.x, s -= t.y, r |= 0, s |= 0, i |= 0, n |= 0;
                        var a = new pe(!1), o = a.getContext("2d");
                        return a.size(i, n), o.asBitmap = !0, o._targets.start(), ve.renders[e]._fun(t, o, r, s),
                            o.flush(), o._targets.end(), o._targets.restore(), a;
                    }, Object.defineProperty(D.prototype, "uv", {
                        get: function () {
                            return this._uv;
                        },
                        set: function (t) {
                            this._uv = t;
                        }
                    }), pe.prototype.getTexture = function () {
                        return this._texture || (this._texture = this.context._targets, this._texture.uv = D.flipyuv,
                            this._texture.bitmap = this._texture), this._texture;
                    });
                }
            }]), e;
        }();
        xi.stage = null, xi.systemTimer = null, xi.startTimer = null, xi.physicsTimer = null,
            xi.updateTimer = null, xi.lateTimer = null, xi.timer = null, xi.loader = null, xi.version = "2.6.1",
            xi._isinit = !1, xi.isWXOpenDataContext = !1, xi.isWXPosMsg = !1, xi.__classmap = null,
            xi.Config = e, xi.TextRender = qt, xi.EventDispatcher = T, xi.SoundChannel = De,
            xi.Stage = Pe, xi.Render = ee, xi.Browser = zt, xi.Sprite = Ce, xi.Node = xe, xi.Context = Qt,
            xi.WebGL = $t, xi.Handler = m, xi.RunDriver = Ie, xi.Utils = K, xi.Input = we, xi.Loader = Xe,
            xi.LocalStorage = je, xi.SoundManager = Ue, xi.URL = x, xi.Event = Gt, xi.Matrix = f,
            xi.HTMLImage = ki, xi.Laya = xi, xi._evcode = "eval", xi.isNativeRender_enable = !1,
            xi.__classmap = i.__classMap, i.Timer = ui, i.Dragging = Je, i.GraphicsBounds = re,
            i.Sprite = Ce, i.TextRender = qt, i.Loader = Xe, i.TTFLoader = Qe, i.WebAudioSound = Ne,
            i.SoundManager = Ue, i.ShaderCompile = yi, i.ClassUtils = ge, i.SceneUtils = si,
            i.Context = Qt, i.Render = ee, i.MouseManager = Ae, i.Text = be, i.Browser = zt,
            i.WebGL = $t, i.AudioSound = Be, i.Pool = n, i.Utils = K, i.Graphics = _e, i.Submit = Pt,
            i.Stage = Pe, i.Resource = C, i.WorkerLoader = gi;
        var Ci = window._layalibs;
        if (Ci) {
            Ci.sort(function (t, e) {
                return t.i - e.i;
            });
            for (var Ei = 0; Ei &lt; Ci.length; Ei++) Ci[Ei].f(window, window.document, xi);
        }
        var bi = window;
        bi.Laya ? (bi.Laya.Laya = xi, Object.assign(bi.Laya, xi)) : bi.Laya = xi;
        var wi = xi.__init, Ri = xi.init, Ai = xi.version, Si = xi.alertGlobalError, Mi = xi.enableDebugPanel;
        function Ii(t, e) {
            for (var i = 0, n = e.length; i &lt; n; i += 2) if ("length" == e[i]) t.length = e[i + 1].call(t); else {
                !function () {
                    var n = e[i], r = e[i + 1];
                    Object.defineProperty(t, n, {
                        get: function () {
                            return delete this[n], this[n] = r.call(this);
                        },
                        set: function (t) {
                            delete this[n], this[n] = t;
                        },
                        enumerable: !0,
                        configurable: !0
                    });
                }();
            }
        }
        var Pi = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                return _classCallCheck(this, i), e.call(this);
            }
            return _createClass(i, [{
                key: "isSingleton",
                get: function () {
                    return !1;
                }
            }]), _createClass(i, [{
                key: "onAwake",
                value: function () { }
            }, {
                key: "onEnable",
                value: function () { }
            }, {
                key: "onStart",
                value: function () { }
            }, {
                key: "onUpdate",
                value: function () { }
            }, {
                key: "onLateUpdate",
                value: function () { }
            }, {
                key: "onDisable",
                value: function () { }
            }, {
                key: "onDestroy",
                value: function () { }
            }]), i;
        }(ti), Li = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                return _classCallCheck(this, n), e.apply(this, arguments);
            }
            return _createClass(n, [{
                key: "_onAwake",
                value: function () {
                    this.onAwake(), this.onStart !== n.prototype.onStart &amp;&amp; i.startTimer.frameOnce(1, this, this.onStart);
                }
            }, {
                key: "_onEnable",
                value: function () {
                    var t = n.prototype;
                    this.onTriggerEnter !== t.onTriggerEnter &amp;&amp; this.owner.on(Gt.TRIGGER_ENTER, this, this.onTriggerEnter),
                        this.onTriggerStay !== t.onTriggerStay &amp;&amp; this.owner.on(Gt.TRIGGER_STAY, this, this.onTriggerStay),
                        this.onTriggerExit !== t.onTriggerExit &amp;&amp; this.owner.on(Gt.TRIGGER_EXIT, this, this.onTriggerExit),
                        this.onMouseDown !== t.onMouseDown &amp;&amp; this.owner.on(Gt.MOUSE_DOWN, this, this.onMouseDown),
                        this.onMouseUp !== t.onMouseUp &amp;&amp; this.owner.on(Gt.MOUSE_UP, this, this.onMouseUp),
                        this.onClick !== t.onClick &amp;&amp; this.owner.on(Gt.CLICK, this, this.onClick), this.onStageMouseDown !== t.onStageMouseDown &amp;&amp; i.stage.on(Gt.MOUSE_DOWN, this, this.onStageMouseDown),
                        this.onStageMouseUp !== t.onStageMouseUp &amp;&amp; i.stage.on(Gt.MOUSE_UP, this, this.onStageMouseUp),
                        this.onStageClick !== t.onStageClick &amp;&amp; i.stage.on(Gt.CLICK, this, this.onStageClick),
                        this.onStageMouseMove !== t.onStageMouseMove &amp;&amp; i.stage.on(Gt.MOUSE_MOVE, this, this.onStageMouseMove),
                        this.onDoubleClick !== t.onDoubleClick &amp;&amp; this.owner.on(Gt.DOUBLE_CLICK, this, this.onDoubleClick),
                        this.onRightClick !== t.onRightClick &amp;&amp; this.owner.on(Gt.RIGHT_CLICK, this, this.onRightClick),
                        this.onMouseMove !== t.onMouseMove &amp;&amp; this.owner.on(Gt.MOUSE_MOVE, this, this.onMouseMove),
                        this.onMouseOver !== t.onMouseOver &amp;&amp; this.owner.on(Gt.MOUSE_OVER, this, this.onMouseOver),
                        this.onMouseOut !== t.onMouseOut &amp;&amp; this.owner.on(Gt.MOUSE_OUT, this, this.onMouseOut),
                        this.onKeyDown !== t.onKeyDown &amp;&amp; i.stage.on(Gt.KEY_DOWN, this, this.onKeyDown),
                        this.onKeyPress !== t.onKeyPress &amp;&amp; i.stage.on(Gt.KEY_PRESS, this, this.onKeyPress),
                        this.onKeyUp !== t.onKeyUp &amp;&amp; i.stage.on(Gt.KEY_UP, this, this.onKeyUp), this.onUpdate !== t.onUpdate &amp;&amp; i.updateTimer.frameLoop(1, this, this.onUpdate),
                        this.onLateUpdate !== t.onLateUpdate &amp;&amp; i.lateTimer.frameLoop(1, this, this.onLateUpdate),
                        this.onPreRender !== t.onPreRender &amp;&amp; i.lateTimer.frameLoop(1, this, this.onPreRender),
                        this.onEnable();
                }
            }, {
                key: "_onDisable",
                value: function () {
                    this.owner.offAllCaller(this), i.stage.offAllCaller(this), i.startTimer.clearAll(this),
                        i.updateTimer.clearAll(this), i.lateTimer.clearAll(this);
                }
            }, {
                key: "_isScript",
                value: function () {
                    return !0;
                }
            }, {
                key: "_onDestroy",
                value: function () {
                    this.onDestroy();
                }
            }, {
                key: "onAwake",
                value: function () { }
            }, {
                key: "onEnable",
                value: function () { }
            }, {
                key: "onStart",
                value: function () { }
            }, {
                key: "onTriggerEnter",
                value: function (t, e, i) { }
            }, {
                key: "onTriggerStay",
                value: function (t, e, i) { }
            }, {
                key: "onTriggerExit",
                value: function (t, e, i) { }
            }, {
                key: "onMouseDown",
                value: function (t) { }
            }, {
                key: "onMouseUp",
                value: function (t) { }
            }, {
                key: "onClick",
                value: function (t) { }
            }, {
                key: "onStageMouseDown",
                value: function (t) { }
            }, {
                key: "onStageMouseUp",
                value: function (t) { }
            }, {
                key: "onStageClick",
                value: function (t) { }
            }, {
                key: "onStageMouseMove",
                value: function (t) { }
            }, {
                key: "onDoubleClick",
                value: function (t) { }
            }, {
                key: "onRightClick",
                value: function (t) { }
            }, {
                key: "onMouseMove",
                value: function (t) { }
            }, {
                key: "onMouseOver",
                value: function (t) { }
            }, {
                key: "onMouseOut",
                value: function (t) { }
            }, {
                key: "onKeyDown",
                value: function (t) { }
            }, {
                key: "onKeyPress",
                value: function (t) { }
            }, {
                key: "onKeyUp",
                value: function (t) { }
            }, {
                key: "onUpdate",
                value: function () { }
            }, {
                key: "onLateUpdate",
                value: function () { }
            }, {
                key: "onPreRender",
                value: function () { }
            }, {
                key: "onPostRender",
                value: function () { }
            }, {
                key: "onDisable",
                value: function () { }
            }, {
                key: "onDestroy",
                value: function () { }
            }, {
                key: "isSingleton",
                get: function () {
                    return !1;
                }
            }]), n;
        }(ti), Di = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.apply(this, arguments))._nodeIDAniDic = {},
                    t;
            }
            return _createClass(i, [{
                key: "_parseNodeList",
                value: function (t) {
                    this._nodeList || (this._nodeList = []), this._nodeDefaultProps[t.compId] = t.props,
                        t.compId &amp;&amp; this._nodeList.push(t.compId);
                    var e = t.child;
                    if (e) {
                        var i, n = e.length;
                        for (i = 0; i &lt; n; i++) this._parseNodeList(e[i]);
                    }
                }
            }, {
                key: "_calGraphicData",
                value: function (t) {
                    var e;
                    if (this._setUp(null, t), this._createGraphicData(), this._nodeIDAniDic) for (e in this._nodeIDAniDic) this._nodeIDAniDic[e] = null;
                }
            }, {
                key: "_createGraphicData",
                value: function () {
                    var t, e, i = [], n = this.count, r = this._usedFrames;
                    for (r || (r = []), t = 0; t &lt; n; t++) !r[t] &amp;&amp; e || (e = this._createFrameGraphic(t)),
                        i.push(e);
                    this._gList = i;
                }
            }, {
                key: "_createFrameGraphic",
                value: function (t) {
                    var e = new _e();
                    return i._rootMatrix || (i._rootMatrix = new f()), this._updateNodeGraphic(this._rootNode, t, i._rootMatrix, e),
                        e;
                }
            }, {
                key: "_updateNodeGraphic",
                value: function (t, e, i, n) {
                    var r, s, a, o = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 1;
                    (r = this._nodeGDic[t.compId] = this._getNodeGraphicData(t.compId, e, this._nodeGDic[t.compId])).resultTransform || (r.resultTransform = new f()),
                        s = r.resultTransform, f.mul(r.transform, i, s);
                    var l = r.alpha * o;
                    if (!(l &lt; .01)) {
                        r.skin &amp;&amp; (a = this._getTextureByUrl(r.skin)) &amp;&amp; (s._checkTransform() ? (n.drawTexture(a, 0, 0, r.width, r.height, s, l),
                            r.resultTransform = null) : n.drawTexture(a, s.tx, s.ty, r.width, r.height, null, l));
                        var h, u, c = t.child;
                        if (c) for (u = c.length, h = 0; h &lt; u; h++) this._updateNodeGraphic(c[h], e, s, n, l);
                    }
                }
            }, {
                key: "_updateNoChilds",
                value: function (t, e) {
                    if (t.skin) {
                        var i = this._getTextureByUrl(t.skin);
                        if (i) {
                            var n = t.transform;
                            n._checkTransform(), !n._bTransform ? e.drawTexture(i, n.tx, n.ty, t.width, t.height, null, t.alpha) : e.drawTexture(i, 0, 0, t.width, t.height, n.clone(), t.alpha);
                        }
                    }
                }
            }, {
                key: "_updateNodeGraphic2",
                value: function (t, e, i) {
                    var n;
                    if (n = this._nodeGDic[t.compId] = this._getNodeGraphicData(t.compId, e, this._nodeGDic[t.compId]),
                        t.child) {
                        var r, s, a, o = n.transform;
                        o._checkTransform(), s = (r = !o._bTransform) &amp;&amp; (0 != o.tx || 0 != o.ty), (a = o._bTransform || 1 != n.alpha) &amp;&amp; i.save(),
                            1 != n.alpha &amp;&amp; i.alpha(n.alpha), r ? s &amp;&amp; i.translate(o.tx, o.ty) : i.transform(o.clone());
                        var l, h, u, c = t.child;
                        if (n.skin &amp;&amp; (l = this._getTextureByUrl(n.skin)) &amp;&amp; i.drawImage(l, 0, 0, n.width, n.height),
                            c) for (u = c.length, h = 0; h &lt; u; h++) this._updateNodeGraphic2(c[h], e, i);
                        a ? i.restore() : r ? s &amp;&amp; i.translate(-o.tx, -o.ty) : i.transform(o.clone().invert());
                    } else this._updateNoChilds(n, i);
                }
            }, {
                key: "_calculateKeyFrames",
                value: function (t) {
                    _get(_getPrototypeOf(i.prototype), "_calculateKeyFrames", this).call(this, t), this._nodeIDAniDic[t.target] = t;
                }
            }, {
                key: "getNodeDataByID",
                value: function (t) {
                    return this._nodeIDAniDic[t];
                }
            }, {
                key: "_getParams",
                value: function (t, e, n, r) {
                    var s = i._temParam;
                    s.length = e.length;
                    var a, o = e.length;
                    for (a = 0; a &lt; o; a++) s[a] = this._getObjVar(t, e[a][0], n, e[a][1], r);
                    return s;
                }
            }, {
                key: "_getObjVar",
                value: function (t, e, i, n, r) {
                    if (e in t) {
                        var s = t[e];
                        return i &gt;= s.length &amp;&amp; (i = s.length - 1), t[e][i];
                    }
                    return e in r ? r[e] : n;
                }
            }, {
                key: "_getNodeGraphicData",
                value: function (t, e, n) {
                    n || (n = new Oi()), n.transform ? n.transform.identity() : n.transform = new f();
                    var r = this.getNodeDataByID(t);
                    if (!r) return n;
                    var s, a, o, l = r.frames, h = this._getParams(l, i._drawTextureCmd, e, this._nodeDefaultProps[t]), u = h[0], c = h[5], _ = h[6], d = h[13], v = h[14], p = h[7], y = h[8], g = h[9], m = h[11], T = h[12];
                    s = h[3], a = h[4], 0 != s &amp;&amp; 0 != a || (u = null), -1 == s &amp;&amp; (s = 0), -1 == a &amp;&amp; (a = 0),
                        n.skin = u, n.width = s, n.height = a, u &amp;&amp; ((o = this._getTextureByUrl(u)) ? (s || (s = o.sourceWidth),
                            a || (a = o.sourceHeight)) : console.warn("lost skin:", u, ",you may load pics first")),
                        n.alpha = h[10];
                    var k = n.transform;
                    0 != d &amp;&amp; (c = d * s), 0 != v &amp;&amp; (_ = v * a), 0 == c &amp;&amp; 0 == _ || k.translate(-c, -_);
                    var x = null;
                    if (g || 1 !== p || 1 !== y || m || T) {
                        (x = i._tempMt).identity(), x._bTransform = !0;
                        var C = .0174532922222222 * (g - m), E = .0174532922222222 * (g + T), b = Math.cos(E), w = Math.sin(E), R = Math.sin(C), A = Math.cos(C);
                        x.a = p * b, x.b = p * w, x.c = -y * R, x.d = y * A, x.tx = x.ty = 0;
                    }
                    return x &amp;&amp; (k = f.mul(k, x, k)), k.translate(h[1], h[2]), n;
                }
            }, {
                key: "_getTextureByUrl",
                value: function (t) {
                    return Xe.getRes(t);
                }
            }, {
                key: "setAniData",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    if (t.animations) {
                        this._nodeDefaultProps = {}, this._nodeGDic = {}, this._nodeList &amp;&amp; (this._nodeList.length = 0),
                            this._rootNode = t, this._parseNodeList(t);
                        var n, r, s = {}, a = [], o = t.animations, l = o.length;
                        for (n = 0; n &lt; l; n++) if (r = o[n], this._labels = null, (!e || e == r.name) &amp;&amp; r) {
                            try {
                                this._calGraphicData(r);
                            } catch (t) {
                                console.warn("parse animation fail:" + r.name + ",empty animation created"), this._gList = [];
                            }
                            var h = {};
                            h.interval = 1e3 / r.frameRate, h.frames = this._gList, h.labels = this._labels,
                                h.name = r.name, a.push(h), s[r.name] = h;
                        }
                        this.animationList = a, this.animationDic = s;
                    }
                    i._temParam.length = 0;
                }
            }, {
                key: "parseByData",
                value: function (t) {
                    var e, i;
                    e = t.nodeRoot, i = t.aniO, delete t.nodeRoot, delete t.aniO, this._nodeDefaultProps = {},
                        this._nodeGDic = {}, this._nodeList &amp;&amp; (this._nodeList.length = 0), this._rootNode = e,
                        this._parseNodeList(e), this._labels = null;
                    try {
                        this._calGraphicData(i);
                    } catch (t) {
                        console.warn("parse animation fail:" + i.name + ",empty animation created"), this._gList = [];
                    }
                    var n = t;
                    return n.interval = 1e3 / i.frameRate, n.frames = this._gList, n.labels = this._labels,
                        n.name = i.name, n;
                }
            }, {
                key: "setUpAniData",
                value: function (t) {
                    if (t.animations) {
                        var e, i, n = {}, r = [], s = t.animations, a = s.length;
                        for (e = 0; e &lt; a; e++) if (i = s[e]) {
                            var o = {};
                            o.name = i.name, o.aniO = i, o.nodeRoot = t, r.push(o), n[i.name] = o;
                        }
                        this.animationList = r, this.animationDic = n;
                    }
                }
            }, {
                key: "_clear",
                value: function () {
                    this.animationList = null, this.animationDic = null, this._gList = null, this._nodeGDic = null;
                }
            }], [{
                key: "parseAnimationByData",
                value: function (t) {
                    var e;
                    return i._I || (i._I = new i()), e = i._I.parseByData(t), i._I._clear(), e;
                }
            }, {
                key: "parseAnimationData",
                value: function (t) {
                    var e;
                    return i._I || (i._I = new i()), i._I.setUpAniData(t), (e = {}).animationList = i._I.animationList,
                        e.animationDic = i._I.animationDic, i._I._clear(), e;
                }
            }]), i;
        }(ni);
        Di._drawTextureCmd = [["skin", null], ["x", 0], ["y", 0], ["width", -1], ["height", -1], ["pivotX", 0], ["pivotY", 0], ["scaleX", 1], ["scaleY", 1], ["rotation", 0], ["alpha", 1], ["skewX", 0], ["skewY", 0], ["anchorX", 0], ["anchorY", 0]],
            Di._temParam = [], Di._tempMt = new f();
        var Oi = function t() {
            _classCallCheck(this, t), this.alpha = 1;
        }, Bi = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                var t;
                return _classCallCheck(this, n), (t = e.call(this))._setControlNode(_assertThisInitialized(t)),
                    t;
            }
            return _createClass(n, [{
                key: "destroy",
                value: function () {
                    var t = !(arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0]) || arguments[0];
                    this.stop(), _get(_getPrototypeOf(n.prototype), "destroy", this).call(this, t),
                        this._frames = null, this._labels = null;
                }
            }, {
                key: "play",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, e = !(arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1]) || arguments[1], i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : "";
                    i &amp;&amp; this._setFramesFromCache(i, !0), _get(_getPrototypeOf(n.prototype), "play", this).call(this, t, e, i);
                }
            }, {
                key: "_setFramesFromCache",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1];
                    if (this._url &amp;&amp; (t = this._url + "#" + t), t &amp;&amp; n.framesMap[t]) {
                        var i = n.framesMap[t];
                        return i instanceof Array ? (this._frames = n.framesMap[t], this._count = this._frames.length) : (i.nodeRoot &amp;&amp; (n.framesMap[t] = Di.parseAnimationByData(i),
                            i = n.framesMap[t]), this._frames = i.frames, this._count = this._frames.length,
                            this._frameRateChanged || (this._interval = i.interval), this._labels = this._copyLabels(i.labels)),
                            !0;
                    }
                    return e &amp;&amp; console.log("ani not found:", t), !1;
                }
            }, {
                key: "_copyLabels",
                value: function (t) {
                    if (!t) return null;
                    var e, i;
                    for (i in e = {}, t) e[i] = K.copyArray([], t[i]);
                    return e;
                }
            }, {
                key: "_frameLoop",
                value: function () {
                    this._visible &amp;&amp; this._style.alpha &gt; .01 &amp;&amp; this._frames &amp;&amp; _get(_getPrototypeOf(n.prototype), "_frameLoop", this).call(this);
                }
            }, {
                key: "_displayToIndex",
                value: function (t) {
                    this._frames &amp;&amp; (this.graphics = this._frames[t]);
                }
            }, {
                key: "clear",
                value: function () {
                    return _get(_getPrototypeOf(n.prototype), "clear", this).call(this), this.stop(),
                        this.graphics = null, this._frames = null, this._labels = null, this;
                }
            }, {
                key: "loadImages",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : "";
                    return this._url = "", this._setFramesFromCache(e) || (this.frames = n.framesMap[e] ? n.framesMap[e] : n.createFrames(t, e)),
                        this;
                }
            }, {
                key: "loadAtlas",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, r = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : "";
                    this._url = "";
                    var s = this;
                    if (!s._setFramesFromCache(r)) {
                        var a = function (i) {
                            t === i &amp;&amp; (s.frames = n.framesMap[r] ? n.framesMap[r] : n.createFrames(t, r), e &amp;&amp; e.run());
                        };
                        Xe.getAtlas(t) ? a(t) : i.loader.load(t, m.create(null, a, [t]), null, Xe.ATLAS);
                    }
                    return this;
                }
            }, {
                key: "loadAnimation",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null;
                    this._url = t;
                    var r = this;
                    return this._actionName || (this._actionName = ""), r._setFramesFromCache(this._actionName) ? (r._setFramesFromCache(this._actionName, !0),
                        this.index = 0, e &amp;&amp; e.run()) : !n || Xe.getAtlas(n) ? this._loadAnimationData(t, e, n) : i.loader.load(n, m.create(this, this._loadAnimationData, [t, e, n]), null, Xe.ATLAS),
                        this;
                }
            }, {
                key: "_loadAnimationData",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, r = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null;
                    if (!r || Xe.getAtlas(r)) {
                        var s = this;
                        Xe.getRes(t) ? a(t) : i.loader.load(t, m.create(null, a, [t]), null, Xe.JSON);
                    } else console.warn("atlas load fail:" + r);
                    function a(i) {
                        if (Xe.getRes(i)) {
                            if (t === i) {
                                var r;
                                if (n.framesMap[t + "#"]) s._setFramesFromCache(s._actionName, !0), s.index = 0,
                                    s._resumePlay(); else {
                                    var a = Di.parseAnimationData(Xe.getRes(t));
                                    if (!a) return;
                                    var o, l, h = a.animationList, u = h.length;
                                    for (o = 0; o &lt; u; o++) r = h[o], n.framesMap[t + "#" + r.name] = r, l || (l = r);
                                    l &amp;&amp; (n.framesMap[t + "#"] = l, s._setFramesFromCache(s._actionName, !0), s.index = 0),
                                        s._resumePlay();
                                }
                                e &amp;&amp; e.run();
                            }
                            Xe.clearRes(t);
                        } else n.framesMap[t + "#"] &amp;&amp; (s._setFramesFromCache(s._actionName, !0), s.index = 0,
                            s._resumePlay(), e &amp;&amp; e.run());
                    }
                }
            }, {
                key: "frames",
                get: function () {
                    return this._frames;
                },
                set: function (t) {
                    this._frames = t, t &amp;&amp; (this._count = t.length, this._actionName &amp;&amp; this._setFramesFromCache(this._actionName, !0),
                        this.index = this._index);
                }
            }, {
                key: "source",
                set: function (t) {
                    t.indexOf(".ani") &gt; -1 ? this.loadAnimation(t) : t.indexOf(".json") &gt; -1 || t.indexOf("als") &gt; -1 || t.indexOf("atlas") &gt; -1 ? this.loadAtlas(t) : this.loadImages(t.split(","));
                }
            }, {
                key: "autoAnimation",
                set: function (t) {
                    this.play(0, !0, t);
                }
            }, {
                key: "autoPlay",
                set: function (t) {
                    t ? this.play() : this.stop();
                }
            }], [{
                key: "createFrames",
                value: function (t, e) {
                    var i;
                    if ("string" == typeof t) {
                        var r = Xe.getAtlas(t);
                        if (r &amp;&amp; r.length) {
                            i = [];
                            for (var s = 0, a = r.length; s &lt; a; s++) {
                                var o = new _e();
                                o.drawImage(Xe.getRes(r[s]), 0, 0), i.push(o);
                            }
                        }
                    } else if (t instanceof Array) for (i = [], s = 0, a = t.length; s &lt; a; s++) (o = new _e()).loadImage(t[s], 0, 0),
                        i.push(o);
                    return e &amp;&amp; (n.framesMap[e] = i), i;
                }
            }, {
                key: "clearCache",
                value: function (t) {
                    var e, i = n.framesMap, r = t + "#";
                    for (e in i) e !== t &amp;&amp; 0 !== e.indexOf(r) || delete n.framesMap[e];
                }
            }]), n;
        }(ei);
        Bi.framesMap = {}, i.regClass(Bi), ge.regClass("laya.display.Animation", Bi), ge.regClass("Laya.Animation", Bi);
        var Fi = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.apply(this, arguments))._initData = {},
                    t;
            }
            return _createClass(i, [{
                key: "_onOtherBegin",
                value: function (t) {
                    t !== this &amp;&amp; this.stop();
                }
            }, {
                key: "_addEvent",
                value: function () {
                    this._target &amp;&amp; this._playEvent &amp;&amp; (this._setControlNode(this._target), this._target.on(this._playEvent, this, this._onPlayAction));
                }
            }, {
                key: "_onPlayAction",
                value: function () {
                    this.play(0, !1);
                }
            }, {
                key: "play",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, e = !(arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1]) || arguments[1], n = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : "";
                    this._target &amp;&amp; (this._target.event(i.EFFECT_BEGIN, [this]), this._recordInitData(),
                        _get(_getPrototypeOf(i.prototype), "play", this).call(this, t, e, n));
                }
            }, {
                key: "_recordInitData",
                value: function () {
                    var t, e, i;
                    if (this._aniKeys) for (e = this._aniKeys.length, t = 0; t &lt; e; t++) i = this._aniKeys[t],
                        this._initData[i] = this._target[i];
                }
            }, {
                key: "_displayToIndex",
                value: function (t) {
                    if (this._animationData) {
                        t &lt; 0 &amp;&amp; (t = 0), t &gt; this._count &amp;&amp; (t = this._count);
                        var e, i = this._animationData.nodes, n = i.length;
                        for (n = n &gt; 1 ? 1 : n, e = 0; e &lt; n; e++) this._displayNodeToFrame(i[e], t);
                    }
                }
            }, {
                key: "_displayNodeToFrame",
                value: function (t, e) {
                    if (this._target) {
                        var i, n, r, s, a, o, l, h, u, c = this._target, _ = t.frames, d = t.keys, f = d.length, v = t.secondFrames;
                        for (s = 0; s &lt; f; s++) n = _[i = d[s]], -1 == (a = v[i]) ? r = this._initData[i] : e &lt; a ? (h = (l = t.keyframes[i])[0]).tween ? (null == (o = Ze[h.tweenMethod]) &amp;&amp; (o = Ze.linearNone),
                            u = l[1], r = o(e, this._initData[i], u.value - this._initData[i], u.index)) : r = this._initData[i] : r = n.length &gt; e ? n[e] : n[n.length - 1],
                            c[i] = r;
                    }
                }
            }, {
                key: "_calculateKeyFrames",
                value: function (t) {
                    _get(_getPrototypeOf(i.prototype), "_calculateKeyFrames", this).call(this, t);
                    var e, n, r = t.keyframes, s = (t.target, {});
                    for (e in t.secondFrames = s, r) (n = r[e]).length &lt;= 1 ? s[e] = -1 : s[e] = n[1].index;
                }
            }, {
                key: "target",
                set: function (t) {
                    this._target &amp;&amp; this._target.off(i.EFFECT_BEGIN, this, this._onOtherBegin), this._target = t,
                        this._target &amp;&amp; this._target.on(i.EFFECT_BEGIN, this, this._onOtherBegin), this._addEvent();
                },
                get: function () {
                    return this._target;
                }
            }, {
                key: "playEvent",
                set: function (t) {
                    this._playEvent = t, t &amp;&amp; this._addEvent();
                }
            }, {
                key: "effectClass",
                set: function (t) {
                    if (this._effectClass = ge.getClass(t), this._effectClass) {
                        var e = this._effectClass.uiView;
                        if (e) {
                            var i = e.animations;
                            if (i &amp;&amp; i[0]) {
                                var n = i[0];
                                this._setUp({}, n), n.nodes &amp;&amp; n.nodes[0] &amp;&amp; (this._aniKeys = n.nodes[0].keys);
                            }
                        }
                    }
                }
            }, {
                key: "effectData",
                set: function (t) {
                    if (t) {
                        var e = t.animations;
                        if (e &amp;&amp; e[0]) {
                            var i = e[0];
                            this._setUp({}, i), i.nodes &amp;&amp; i.nodes[0] &amp;&amp; (this._aniKeys = i.nodes[0].keys);
                        }
                    }
                }
            }]), i;
        }(ni);
        Fi.EFFECT_BEGIN = "effectbegin", ge.regClass("laya.display.EffectAnimation", Fi),
            ge.regClass("Laya.EffectAnimation", Fi);
        var Ni = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                var t;
                return _classCallCheck(this, n), (t = e.call(this))._completeHandler = new m(_assertThisInitialized(t), t.onOneLoadComplete),
                    t.reset(), t;
            }
            return _createClass(n, [{
                key: "reset",
                value: function () {
                    this._toLoadList = [], this._isLoading = !1, this.totalCount = 0;
                }
            }, {
                key: "load",
                value: function (t) {
                    var e, i, n = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1], r = !(arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2]) || arguments[2];
                    if (t instanceof Array) for (i = t.length, e = 0; e &lt; i; e++) this._addToLoadList(t[e], n); else this._addToLoadList(t, n);
                    r &amp;&amp; this._checkNext();
                }
            }, {
                key: "_addToLoadList",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1];
                    this._toLoadList.indexOf(t) &gt;= 0 || Xe.getRes(t) || (e ? this._toLoadList.push({
                        url: t
                    }) : this._toLoadList.push(t), this.totalCount++);
                }
            }, {
                key: "_checkNext",
                value: function () {
                    if (!this._isLoading) {
                        if (0 == this._toLoadList.length) return void this.event(Gt.COMPLETE);
                        var t;
                        "string" == typeof (t = this._toLoadList.pop()) ? this.loadOne(t) : this.loadOne(t.url, !0);
                    }
                }
            }, {
                key: "loadOne",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1];
                    this._curUrl = t;
                    var r = K.getFileExtension(this._curUrl);
                    e ? i.loader.create(t, this._completeHandler) : n.LoadableExtensions[r] ? i.loader.load(t, this._completeHandler, null, n.LoadableExtensions[r]) : t != He.getFileLoadPath(t) || n.No3dLoadTypes[r] || !ze.createMap[r] ? i.loader.load(t, this._completeHandler) : i.loader.create(t, this._completeHandler);
                }
            }, {
                key: "onOneLoadComplete",
                value: function () {
                    this._isLoading = !1, Xe.getRes(this._curUrl) || console.log("Fail to load:", this._curUrl);
                    var t, e = K.getFileExtension(this._curUrl);
                    n.LoadableExtensions[e] &amp;&amp; ((t = Xe.getRes(this._curUrl)) &amp;&amp; t instanceof Ge &amp;&amp; (t = t.json),
                        t &amp;&amp; (t.loadList &amp;&amp; this.load(t.loadList, !1, !1), t.loadList3D &amp;&amp; this.load(t.loadList3D, !0, !1)));
                    "sk" == e &amp;&amp; this.load(this._curUrl.replace(".sk", ".png"), !1, !1), this.event(Gt.PROGRESS, this.getProgress()),
                        this._checkNext();
                }
            }, {
                key: "getProgress",
                value: function () {
                    return this.loadedCount / this.totalCount;
                }
            }, {
                key: "leftCount",
                get: function () {
                    return this._isLoading ? this._toLoadList.length + 1 : this._toLoadList.length;
                }
            }, {
                key: "loadedCount",
                get: function () {
                    return this.totalCount - this.leftCount;
                }
            }]), n;
        }(T);
        Ni.LoadableExtensions = {
            scene: Xe.JSON,
            scene3d: Xe.JSON,
            ani: Xe.JSON,
            ui: Xe.JSON,
            prefab: Xe.PREFAB
        }, Ni.No3dLoadTypes = {
            png: !0,
            jpg: !0,
            txt: !0
        };
        var Ui = function (t) {
            _inherits(n, t);
            var e = _createSuper(n);
            function n() {
                var t, i = !(arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0]) || arguments[0];
                return _classCallCheck(this, n), (t = e.call(this)).autoDestroyAtClosed = !1, t.url = null,
                    t._viewCreated = !1, t._$componentType = "Scene", t._setBit(de.NOT_READY, !0), n.unDestroyedScenes.push(_assertThisInitialized(t)),
                    t._scene = _assertThisInitialized(t), i &amp;&amp; t.createChildren(), t;
            }
            return _createClass(n, [{
                key: "createChildren",
                value: function () { }
            }, {
                key: "loadScene",
                value: function (t) {
                    var e = t.indexOf(".") &gt; -1 ? t : t + ".scene", n = i.loader.getRes(e);
                    if (n) this.createView(n); else {
                        i.loader.resetProgress();
                        var r = new Ni();
                        r.on(Gt.COMPLETE, this, this._onSceneLoaded, [e]), r.load(e);
                    }
                }
            }, {
                key: "_onSceneLoaded",
                value: function (t) {
                    this.createView(i.Loader.getRes(t));
                }
            }, {
                key: "createView",
                value: function (t) {
                    t &amp;&amp; !this._viewCreated &amp;&amp; (this._viewCreated = !0, si.createByData(this, t));
                }
            }, {
                key: "getNodeByID",
                value: function (t) {
                    return this._idMap ? this._idMap[t] : null;
                }
            }, {
                key: "open",
                value: function () {
                    var t = !(arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0]) || arguments[0], e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    t &amp;&amp; n.closeAll(), n.root.addChild(this), this.onOpened(e);
                }
            }, {
                key: "onOpened",
                value: function (t) { }
            }, {
                key: "close",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null;
                    this.onClosed(t), this.autoDestroyAtClosed ? this.destroy() : this.removeSelf();
                }
            }, {
                key: "onClosed",
                value: function () { }
            }, {
                key: "destroy",
                value: function () {
                    var t = !(arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0]) || arguments[0];
                    this._idMap = null, _get(_getPrototypeOf(n.prototype), "destroy", this).call(this, t);
                    for (var e = n.unDestroyedScenes, i = e.length - 1; i &gt; -1; i--) if (e[i] === this) return void e.splice(i, 1);
                }
            }, {
                key: "_sizeChanged",
                value: function () {
                    this.event(Gt.RESIZE);
                }
            }, {
                key: "scaleX",
                set: function (t) {
                    _get(_getPrototypeOf(n.prototype), "get_scaleX", this).call(this) != t &amp;&amp; (_get(_getPrototypeOf(n.prototype), "set_scaleX", this).call(this, t),
                        this.event(Gt.RESIZE));
                },
                get: function () {
                    return _get(_getPrototypeOf(n.prototype), "scaleX", this);
                }
            }, {
                key: "scaleY",
                set: function (t) {
                    _get(_getPrototypeOf(n.prototype), "get_scaleY", this).call(this) != t &amp;&amp; (_get(_getPrototypeOf(n.prototype), "set_scaleY", this).call(this, t),
                        this.event(Gt.RESIZE));
                },
                get: function () {
                    return _get(_getPrototypeOf(n.prototype), "scaleY", this);
                }
            }, {
                key: "width",
                get: function () {
                    if (this._width) return this._width;
                    for (var t = 0, e = this.numChildren - 1; e &gt; -1; e--) {
                        var i = this.getChildAt(e);
                        i._visible &amp;&amp; (t = Math.max(i._x + i.width * i.scaleX, t));
                    }
                    return t;
                },
                set: function (t) {
                    _get(_getPrototypeOf(n.prototype), "get_width", this).call(this) != t &amp;&amp; (_get(_getPrototypeOf(n.prototype), "set_width", this).call(this, t),
                        this.callLater(this._sizeChanged));
                }
            }, {
                key: "height",
                get: function () {
                    if (this._height) return this._height;
                    for (var t = 0, e = this.numChildren - 1; e &gt; -1; e--) {
                        var i = this.getChildAt(e);
                        i._visible &amp;&amp; (t = Math.max(i._y + i.height * i.scaleY, t));
                    }
                    return t;
                },
                set: function (t) {
                    _get(_getPrototypeOf(n.prototype), "get_height", this).call(this) != t &amp;&amp; (_get(_getPrototypeOf(n.prototype), "set_height", this).call(this, t),
                        this.callLater(this._sizeChanged));
                }
            }, {
                key: "timer",
                get: function () {
                    return this._timer || i.timer;
                },
                set: function (t) {
                    this._timer = t;
                }
            }], [{
                key: "setUIMap",
                value: function (t) {
                    var e = i.loader.getRes(t);
                    if (!e) throw "è¯·æå‰åŠ&nbsp;è½½uimapçš„jsonï¼Œå†ä½¿ç”¨è¯¥æŽ¥å£è®¾ç½®ï¼";
                    for (var n in e) i.Loader.loadedMap[x.formatURL(n + ".scene")] = e[n];
                }
            }, {
                key: "load",
                value: function (t) {
                    var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null, r = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null;
                    i.loader.resetProgress();
                    var s = new Ni();
                    function a(t) {
                        n._loadPage &amp;&amp; n._loadPage.event("progress", t), r &amp;&amp; r.runWith(t);
                    }
                    function o() {
                        s.off(Gt.PROGRESS, null, a);
                        var r = i.Loader.getRes(t);
                        if (!r) throw "Can not find scene:" + t;
                        if (!r.props) throw "Scene data is error:" + t;
                        var o = r.props.runtime ? r.props.runtime : r.type, l = i.ClassUtils.getClass(o);
                        if ("instance" == r.props.renderType) var h = l.instance || (l.instance = new l()); else h = new l();
                        if (!(h &amp;&amp; h instanceof xe)) throw "Can not find scene:" + o;
                        h.url = t, h._getBit(de.NOT_READY) ? (h.on("onViewCreated", null, function () {
                            e &amp;&amp; e.runWith(h);
                        }), h.createView(r)) : e &amp;&amp; e.runWith(h), n.hideLoadingPage();
                    }
                    s.on(Gt.PROGRESS, null, a), s.once(Gt.COMPLETE, null, o), s.load(t);
                }
            }, {
                key: "open",
                value: function (t) {
                    var e = !(arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1]) || arguments[1], i = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, r = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, s = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : null;
                    if (i instanceof m) {
                        var a = r;
                        r = i, i = a;
                    }
                    n.showLoadingPage(), n.load(t, m.create(null, this._onSceneLoaded, [e, r, i]), s);
                }
            }, {
                key: "_onSceneLoaded",
                value: function (t, e, i, n) {
                    n.open(t, i), e &amp;&amp; e.runWith(n);
                }
            }, {
                key: "close",
                value: function (t) {
                    for (var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : "", i = !1, r = n.unDestroyedScenes, s = 0, a = r.length; s &lt; a; s++) {
                        var o = r[s];
                        o &amp;&amp; o.parent &amp;&amp; o.url === t &amp;&amp; o.name == e &amp;&amp; (o.close(), i = !0);
                    }
                    return i;
                }
            }, {
                key: "closeAll",
                value: function () {
                    for (var t = n.root, e = 0, i = t.numChildren; e &lt; i; e++) {
                        var r = t.getChildAt(0);
                        r instanceof n ? r.close() : r.removeSelf();
                    }
                }
            }, {
                key: "destroy",
                value: function (t) {
                    for (var e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : "", i = !1, r = [].concat(n.unDestroyedScenes), s = 0, a = r.length; s &lt; a; s++) {
                        var o = r[s];
                        o.url !== t || o.name != e || o.destroyed || (o.destroy(), i = !0);
                    }
                    return i;
                }
            }, {
                key: "gc",
                value: function () {
                    C.destroyUnusedResources();
                }
            }, {
                key: "setLoadingPage",
                value: function (t) {
                    n._loadPage != t &amp;&amp; (n._loadPage = t);
                }
            }, {
                key: "showLoadingPage",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null, e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 500;
                    n._loadPage &amp;&amp; (i.systemTimer.clear(null, n._showLoading), i.systemTimer.clear(null, n._hideLoading),
                        i.systemTimer.once(e, null, n._showLoading, [t], !1));
                }
            }, {
                key: "_showLoading",
                value: function (t) {
                    i.stage.addChild(n._loadPage), n._loadPage.onOpened(t);
                }
            }, {
                key: "_hideLoading",
                value: function () {
                    n._loadPage.close();
                }
            }, {
                key: "hideLoadingPage",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 500;
                    n._loadPage &amp;&amp; (i.systemTimer.clear(null, n._showLoading), i.systemTimer.clear(null, n._hideLoading),
                        i.systemTimer.once(t, null, n._hideLoading));
                }
            }, {
                key: "root",
                get: function () {
                    return n._root || (n._root = i.stage.addChild(new Ce()), n._root.name = "root",
                        i.stage.on("resize", null, function () {
                            n._root.size(i.stage.width, i.stage.height), n._root.event(Gt.RESIZE);
                        }), n._root.size(i.stage.width, i.stage.height), n._root.event(Gt.RESIZE)), n._root;
                }
            }]), n;
        }(Ce);
        Ui.unDestroyedScenes = [], i.regClass(Ui), ge.regClass("laya.display.Scene", Ui),
            ge.regClass("Laya.Scene", Ui);
        var Gi = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "recover",
                value: function () {
                    this._templ = null, n.recover("DrawParticleCmd", this);
                }
            }, {
                key: "run",
                value: function (t, e, i) {
                    t.drawParticle(e, i, this._templ);
                }
            }, {
                key: "cmdID",
                get: function () {
                    return t.ID;
                }
            }], [{
                key: "create",
                value: function (e) {
                    var i = n.getItemByClass("DrawParticleCmd", t);
                    return i._templ = e, i;
                }
            }]), t;
        }();
        Gi.ID = "DrawParticleCmd";
        var Wi = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "paramChanged",
                value: function () {
                    xi.systemTimer.callLater(this, this.buildFilter);
                }
            }, {
                key: "buildFilter",
                value: function () {
                    this._target &amp;&amp; this.addFilter(this._target);
                }
            }, {
                key: "addFilter",
                value: function (t) {
                    var e;
                    t &amp;&amp; (t.filters ? (e = t.filters).indexOf(this._filter) &lt; 0 &amp;&amp; (e.push(this._filter),
                        t.filters = K.copyArray([], e)) : t.filters = [this._filter]);
                }
            }, {
                key: "removeFilter",
                value: function (t) {
                    t &amp;&amp; (t.filters = null);
                }
            }, {
                key: "target",
                set: function (t) {
                    this._target != t &amp;&amp; (this._target = t, this.paramChanged());
                }
            }]), t;
        }(), Yi = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "render",
                value: function (t, e, i, n, r) {
                    var s = V.create(N.TEXTURE2D, 0);
                    this.setShaderInfo(s, r, t.width, t.height), e.drawTarget(t, 0, 0, i, n, f.EMPTY.identity(), s);
                }
            }, {
                key: "setShaderInfo",
                value: function (e, i, n, r) {
                    e.defines.add(z.BLUR);
                    var s = e;
                    t.blurinfo[0] = n, t.blurinfo[1] = r, s.blurInfo = t.blurinfo;
                    var a = i.strength / 3, o = a * a;
                    i.strength_sig2_2sig2_gauss1[0] = i.strength, i.strength_sig2_2sig2_gauss1[1] = o,
                        i.strength_sig2_2sig2_gauss1[2] = 2 * o, i.strength_sig2_2sig2_gauss1[3] = 1 / (2 * Math.PI * o),
                        s.strength_sig2_2sig2_gauss1 = i.strength_sig2_2sig2_gauss1;
                }
            }]), t;
        }();
        Yi.blurinfo = new Array(2);
        var Vi = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t, n = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 4;
                return _classCallCheck(this, i), (t = e.call(this)).strength_sig2_2sig2_gauss1 = [],
                    t.strength = n, t._glRender = new Yi(), t;
            }
            return _createClass(i, [{
                key: "getStrenth_sig2_2sig2_native",
                value: function () {
                    this.strength_sig2_native || (this.strength_sig2_native = new Float32Array(4));
                    var t = this.strength / 3, e = t * t;
                    return this.strength_sig2_native[0] = this.strength, this.strength_sig2_native[1] = e,
                        this.strength_sig2_native[2] = 2 * e, this.strength_sig2_native[3] = 1 / (2 * Math.PI * e),
                        this.strength_sig2_native;
                }
            }, {
                key: "type",
                get: function () {
                    return z.BLUR;
                }
            }]), i;
        }(z), Xi = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.call(this))._strength = 4, t._filter = new Vi(t.strength),
                    t;
            }
            return _createClass(i, [{
                key: "buildFilter",
                value: function () {
                    this._filter = new Vi(this.strength), _get(_getPrototypeOf(i.prototype), "buildFilter", this).call(this);
                }
            }, {
                key: "strength",
                get: function () {
                    return this._strength;
                },
                set: function (t) {
                    this._strength = t;
                }
            }]), i;
        }(Wi), Hi = function () {
            function t() {
                _classCallCheck(this, t), this._curState = 0, this.effectScale = 1.5, this.tweenTime = 300;
            }
            return _createClass(t, [{
                key: "toChangedState",
                value: function () {
                    this._curState = 1, this._curTween &amp;&amp; $e.clear(this._curTween), this._curTween = $e.to(this._tar, {
                        scaleX: this.effectScale,
                        scaleY: this.effectScale
                    }, this.tweenTime, Ze[this.effectEase], m.create(this, this.tweenComplete));
                }
            }, {
                key: "toInitState",
                value: function () {
                    2 != this._curState &amp;&amp; (this._curTween &amp;&amp; $e.clear(this._curTween), this._curState = 2,
                        this._curTween = $e.to(this._tar, {
                            scaleX: 1,
                            scaleY: 1
                        }, this.tweenTime, Ze[this.backEase], m.create(this, this.tweenComplete)));
                }
            }, {
                key: "tweenComplete",
                value: function () {
                    this._curState = 0, this._curTween = null;
                }
            }, {
                key: "target",
                set: function (t) {
                    this._tar = t, t.on(Gt.MOUSE_DOWN, this, this.toChangedState), t.on(Gt.MOUSE_UP, this, this.toInitState),
                        t.on(Gt.MOUSE_OUT, this, this.toInitState);
                }
            }]), t;
        }(), zi = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.call(this))._brightness = 0, t._contrast = 0,
                    t._saturation = 0, t._hue = 0, t._red = 0, t._green = 0, t._blue = 0, t._alpha = 0,
                    t._filter = new q(), t;
            }
            return _createClass(i, [{
                key: "buildFilter",
                value: function () {
                    this._filter.reset(), this._filter.color(this.red, this.green, this.blue, this.alpha),
                        this._filter.adjustHue(this.hue), this._filter.adjustContrast(this.contrast), this._filter.adjustBrightness(this.brightness),
                        this._filter.adjustSaturation(this.saturation), _get(_getPrototypeOf(i.prototype), "buildFilter", this).call(this);
                }
            }, {
                key: "brightness",
                get: function () {
                    return this._brightness;
                },
                set: function (t) {
                    this._brightness = t, this.paramChanged();
                }
            }, {
                key: "contrast",
                get: function () {
                    return this._contrast;
                },
                set: function (t) {
                    this._contrast = t, this.paramChanged();
                }
            }, {
                key: "saturation",
                get: function () {
                    return this._saturation;
                },
                set: function (t) {
                    this._saturation = t, this.paramChanged();
                }
            }, {
                key: "hue",
                get: function () {
                    return this._hue;
                },
                set: function (t) {
                    this._hue = t, this.paramChanged();
                }
            }, {
                key: "red",
                get: function () {
                    return this._red;
                },
                set: function (t) {
                    this._red = t, this.paramChanged();
                }
            }, {
                key: "green",
                get: function () {
                    return this._green;
                },
                set: function (t) {
                    this._green = t, this.paramChanged();
                }
            }, {
                key: "blue",
                get: function () {
                    return this._blue;
                },
                set: function (t) {
                    this._blue = t, this.paramChanged();
                }
            }, {
                key: "color",
                get: function () {
                    return this._color;
                },
                set: function (t) {
                    var e;
                    this._color = t, e = j.create(t), this._red = 255 * e.arrColor[0], this._green = 255 * e.arrColor[1],
                        this._blue = 255 * e.arrColor[2], this.paramChanged();
                }
            }, {
                key: "alpha",
                get: function () {
                    return this._alpha;
                },
                set: function (t) {
                    this._alpha = t, this.paramChanged();
                }
            }]), i;
        }(Wi), Ki = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.apply(this, arguments)).duration = 1e3,
                    t.delay = 0, t.repeat = 0, t.autoDestroyAtComplete = !0, t;
            }
            return _createClass(i, [{
                key: "_onAwake",
                value: function () {
                    this.target = this.target || this.owner, this.autoDestroyAtComplete &amp;&amp; (this._comlete = m.create(this.target, this.target.destroy, null, !1)),
                        this.eventName ? this.owner.on(this.eventName, this, this._exeTween) : this._exeTween();
                }
            }, {
                key: "_exeTween",
                value: function () {
                    this._tween = this._doTween(), this._tween.repeat = this.repeat;
                }
            }, {
                key: "_doTween",
                value: function () {
                    return null;
                }
            }, {
                key: "onReset",
                value: function () {
                    this.duration = 1e3, this.delay = 0, this.repeat = 0, this.ease = null, this.target = null,
                        this.eventName &amp;&amp; (this.owner.off(this.eventName, this, this._exeTween), this.eventName = null),
                        this._comlete &amp;&amp; (this._comlete.recover(), this._comlete = null), this._tween &amp;&amp; (this._tween.clear(),
                            this._tween = null);
                }
            }]), i;
        }(ti), ji = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                return _classCallCheck(this, i), e.apply(this, arguments);
            }
            return _createClass(i, [{
                key: "_doTween",
                value: function () {
                    return this.target.alpha = 0, $e.to(this.target, {
                        alpha: 1
                    }, this.duration, Ze[this.ease], this._comlete, this.delay);
                }
            }]), i;
        }(Ki), qi = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                return _classCallCheck(this, i), e.apply(this, arguments);
            }
            return _createClass(i, [{
                key: "_doTween",
                value: function () {
                    return this.target.alpha = 1, $e.to(this.target, {
                        alpha: 0
                    }, this.duration, Ze[this.ease], this._comlete, this.delay);
                }
            }]), i;
        }(Ki), Qi = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "setShaderInfo",
                value: function (t, e, i, n) {
                    t.defines.add(n.type);
                    var r = t;
                    r.u_blurInfo1 = n._sv_blurInfo1;
                    var s = n._sv_blurInfo2;
                    s[0] = e, s[1] = i, r.u_blurInfo2 = s, r.u_color = n.getColor();
                }
            }, {
                key: "render",
                value: function (t, e, i, n, r) {
                    var s = i, a = n, o = V.create(N.TEXTURE2D, 0);
                    this.setShaderInfo(o, s, a, r);
                    var l = V.create(N.TEXTURE2D, 0), h = f.TEMP.identity();
                    e.drawTarget(t, 0, 0, s, a, h, o), e.drawTarget(t, 0, 0, s, a, h, l);
                }
            }]), t;
        }(), Zi = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i(t) {
                var n, r = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 4, s = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 6, a = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : 6;
                return _classCallCheck(this, i), (n = e.call(this))._elements = new Float32Array(9),
                    n._sv_blurInfo1 = new Array(4), n._sv_blurInfo2 = [0, 0, 1, 0], n._color = new j(t),
                    n.blur = Math.min(r, 20), n.offX = s, n.offY = a, n._sv_blurInfo1[0] = n._sv_blurInfo1[1] = n.blur,
                    n._sv_blurInfo1[2] = s, n._sv_blurInfo1[3] = -a, n._glRender = new Qi(), n;
            }
            return _createClass(i, [{
                key: "getColor",
                value: function () {
                    return this._color.arrColor;
                }
            }, {
                key: "getColorNative",
                value: function () {
                    this._color_native || (this._color_native = new Float32Array(4));
                    var t = this.getColor();
                    return this._color_native[0] = t[0], this._color_native[1] = t[1], this._color_native[2] = t[2],
                        this._color_native[3] = t[3], this._color_native;
                }
            }, {
                key: "getBlurInfo1Native",
                value: function () {
                    return this._blurInof1_native || (this._blurInof1_native = new Float32Array(4)),
                        this._blurInof1_native[0] = this._blurInof1_native[1] = this.blur, this._blurInof1_native[2] = this.offX,
                        this._blurInof1_native[3] = this.offY, this._blurInof1_native;
                }
            }, {
                key: "getBlurInfo2Native",
                value: function () {
                    return this._blurInof2_native || (this._blurInof2_native = new Float32Array(4)),
                        this._blurInof2_native[2] = 1, this._blurInof2_native;
                }
            }, {
                key: "type",
                get: function () {
                    return Vi.GLOW;
                }
            }, {
                key: "offY",
                get: function () {
                    return this._elements[6];
                },
                set: function (t) {
                    this._elements[6] = t, this._sv_blurInfo1[3] = -t;
                }
            }, {
                key: "offX",
                get: function () {
                    return this._elements[5];
                },
                set: function (t) {
                    this._elements[5] = t, this._sv_blurInfo1[2] = t;
                }
            }, {
                key: "blur",
                get: function () {
                    return this._elements[4];
                },
                set: function (t) {
                    this._elements[4] = t, this._sv_blurInfo1[0] = this._sv_blurInfo1[1] = t;
                }
            }]), i;
        }(z), $i = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.call(this))._color = "#ff0000", t._blur = 4,
                    t._offX = 6, t._offY = 6, t._filter = new Zi(t._color), t;
            }
            return _createClass(i, [{
                key: "buildFilter",
                value: function () {
                    this._filter = new Zi(this.color, this.blur, this.offX, this.offY), _get(_getPrototypeOf(i.prototype), "buildFilter", this).call(this);
                }
            }, {
                key: "color",
                get: function () {
                    return this._color;
                },
                set: function (t) {
                    this._color = t, this.paramChanged();
                }
            }, {
                key: "blur",
                get: function () {
                    return this._blur;
                },
                set: function (t) {
                    this._blur = t, this.paramChanged();
                }
            }, {
                key: "offX",
                get: function () {
                    return this._offX;
                },
                set: function (t) {
                    this._offX = t, this.paramChanged();
                }
            }, {
                key: "offY",
                get: function () {
                    return this._offY;
                },
                set: function (t) {
                    this._offY = t, this.paramChanged();
                }
            }]), i;
        }(Wi), Ji = function t() {
            _classCallCheck(this, t);
        };
        Ji.STANDARD = 0, Ji.LEFT = 1, Ji.RIGHT = 2, Ji.NUM_PAD = 3;
        var tn = function t() {
            _classCallCheck(this, t);
        };
        tn.NUMBER_0 = 48, tn.NUMBER_1 = 49, tn.NUMBER_2 = 50, tn.NUMBER_3 = 51, tn.NUMBER_4 = 52,
            tn.NUMBER_5 = 53, tn.NUMBER_6 = 54, tn.NUMBER_7 = 55, tn.NUMBER_8 = 56, tn.NUMBER_9 = 57,
            tn.A = 65, tn.B = 66, tn.C = 67, tn.D = 68, tn.E = 69, tn.F = 70, tn.G = 71, tn.H = 72,
            tn.I = 73, tn.J = 74, tn.K = 75, tn.L = 76, tn.M = 77, tn.N = 78, tn.O = 79, tn.P = 80,
            tn.Q = 81, tn.R = 82, tn.S = 83, tn.T = 84, tn.U = 85, tn.V = 86, tn.W = 87, tn.X = 88,
            tn.Y = 89, tn.Z = 90, tn.F1 = 112, tn.F2 = 113, tn.F3 = 114, tn.F4 = 115, tn.F5 = 116,
            tn.F6 = 117, tn.F7 = 118, tn.F8 = 119, tn.F9 = 120, tn.F10 = 121, tn.F11 = 122,
            tn.F12 = 123, tn.F13 = 124, tn.F14 = 125, tn.F15 = 126, tn.NUMPAD = 21, tn.NUMPAD_0 = 96,
            tn.NUMPAD_1 = 97, tn.NUMPAD_2 = 98, tn.NUMPAD_3 = 99, tn.NUMPAD_4 = 100, tn.NUMPAD_5 = 101,
            tn.NUMPAD_6 = 102, tn.NUMPAD_7 = 103, tn.NUMPAD_8 = 104, tn.NUMPAD_9 = 105, tn.NUMPAD_ADD = 107,
            tn.NUMPAD_DECIMAL = 110, tn.NUMPAD_DIVIDE = 111, tn.NUMPAD_ENTER = 108, tn.NUMPAD_MULTIPLY = 106,
            tn.NUMPAD_SUBTRACT = 109, tn.SEMICOLON = 186, tn.EQUAL = 187, tn.COMMA = 188, tn.MINUS = 189,
            tn.PERIOD = 190, tn.SLASH = 191, tn.BACKQUOTE = 192, tn.LEFTBRACKET = 219, tn.BACKSLASH = 220,
            tn.RIGHTBRACKET = 221, tn.QUOTE = 222, tn.ALTERNATE = 18, tn.BACKSPACE = 8, tn.CAPS_LOCK = 20,
            tn.COMMAND = 15, tn.CONTROL = 17, tn.DELETE = 46, tn.ENTER = 13, tn.ESCAPE = 27,
            tn.PAGE_UP = 33, tn.PAGE_DOWN = 34, tn.END = 35, tn.HOME = 36, tn.LEFT = 37, tn.UP = 38,
            tn.RIGHT = 39, tn.DOWN = 40, tn.SHIFT = 16, tn.SPACE = 32, tn.TAB = 9, tn.INSERT = 45;
        var en = function () {
            function t(e, i, n, r) {
                _classCallCheck(this, t), this._idata = [];
            }
            return _createClass(t, [{
                key: "getArrayData",
                value: function () {
                    return this._idata;
                }
            }, {
                key: "getPtrID",
                value: function () {
                    return 0;
                }
            }, {
                key: "beginEncoding",
                value: function () { }
            }, {
                key: "endEncoding",
                value: function () { }
            }, {
                key: "clearEncoding",
                value: function () {
                    this._idata.length = 0;
                }
            }, {
                key: "getCount",
                value: function () {
                    return this._idata.length;
                }
            }, {
                key: "add_ShaderValue",
                value: function (t) {
                    this._idata.push(t);
                }
            }, {
                key: "addShaderUniform",
                value: function (t) {
                    this.add_ShaderValue(t);
                }
            }]), t;
        }(), nn = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "uploadShaderUniforms",
                value: function (t, e, i, n) {
                    for (var r = i._data, s = e.getArrayData(), a = 0, o = 0, l = s.length; o &lt; l; o++) {
                        var h = s[o];
                        if (n || -1 !== h.textureID) {
                            var u = r[h.dataOffset];
                            null != u &amp;&amp; (a += h.fun.call(h.caller, h, u));
                        }
                    }
                    return a;
                }
            }, {
                key: "uploadCustomUniform",
                value: function (t, e, i, n) {
                    var r = 0, s = e[i];
                    return s &amp;&amp; null != n &amp;&amp; (r += s.fun.call(s.caller, s, n)), r;
                }
            }, {
                key: "uploadShaderUniformsForNative",
                value: function (t, e, i) {
                    var n = y.UPLOAD_SHADER_UNIFORM_TYPE_ID;
                    i._runtimeCopyValues.length &gt; 0 &amp;&amp; (n = y.UPLOAD_SHADER_UNIFORM_TYPE_DATA);
                    var r = i._data;
                    return y.instance.uploadShaderUniforms(e, r, n);
                }
            }]), t;
        }(), rn = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "render",
                value: function (e, i, n) {
                    t._addType(this._renderType), t.showRenderTypeInfo(this._renderType), ve.renders[this._renderType]._fun(this, e, i + this._x, n + this._y),
                        this._repaint = 0;
                }
            }, {
                key: "_stageRender",
                value: function (e, n, r) {
                    t._countStart(), t._PreStageRender.call(i.stage, e, n, r), t._countEnd();
                }
            }], [{
                key: "getMCDName",
                value: function (e) {
                    return t._typeToNameDic[e];
                }
            }, {
                key: "showRenderTypeInfo",
                value: function (e) {
                    var i = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1];
                    if (i || !t.showedDic[e]) {
                        if (t.showedDic[e] = !0, !t._rendertypeToStrDic[e]) {
                            var n, r = [];
                            for (n = 1; n &lt;= e;) n &amp; e &amp;&amp; r.push(t.getMCDName(n &amp; e)), n &lt;&lt;= 1;
                            t._rendertypeToStrDic[e] = r.join(",");
                        }
                        console.log("cmd:", t._rendertypeToStrDic[e]);
                    }
                }
            }, {
                key: "__init__",
                value: function () {
                    t._typeToNameDic[se.ALPHA] = "ALPHA", t._typeToNameDic[se.TRANSFORM] = "TRANSFORM",
                        t._typeToNameDic[se.TEXTURE] = "TEXTURE", t._typeToNameDic[se.GRAPHICS] = "GRAPHICS",
                        t._typeToNameDic[se.ONECHILD] = "ONECHILD", t._typeToNameDic[se.CHILDS] = "CHILDS",
                        t._typeToNameDic[se.TRANSFORM | se.ALPHA] = "TRANSFORM|ALPHA", t._typeToNameDic[se.CANVAS] = "CANVAS",
                        t._typeToNameDic[se.BLEND] = "BLEND", t._typeToNameDic[se.FILTERS] = "FILTERS",
                        t._typeToNameDic[se.MASK] = "MASK", t._typeToNameDic[se.CLIP] = "CLIP", t._typeToNameDic[se.LAYAGL3D] = "LAYAGL3D";
                }
            }, {
                key: "_countStart",
                value: function () {
                    var e;
                    for (e in t._countDic) t._countDic[e] = 0;
                }
            }, {
                key: "_countEnd",
                value: function () {
                    t._i++, t._i &gt; 60 &amp;&amp; (t.showCountInfo(), t._i = 0);
                }
            }, {
                key: "_addType",
                value: function (e) {
                    t._countDic[e] ? t._countDic[e] += 1 : t._countDic[e] = 1;
                }
            }, {
                key: "showCountInfo",
                value: function () {
                    var e;
                    for (e in console.log("==================="), t._countDic) console.log("count:" + t._countDic[e]),
                        t.showRenderTypeInfo(e, !0);
                }
            }, {
                key: "enableQuickTest",
                value: function () {
                    t.__init__(), Ce.prototype.render = t.prototype.render, t._PreStageRender = Pe.prototype.render,
                        Pe.prototype.render = t.prototype._stageRender;
                }
            }]), t;
        }();
        rn.showedDic = {}, rn._rendertypeToStrDic = {}, rn._typeToNameDic = {}, rn._countDic = {},
            rn._i = 0;
        var sn = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                return _classCallCheck(this, i), e.apply(this, arguments);
            }
            return _createClass(i, [{
                key: "load",
                value: function (t) { }
            }, {
                key: "play",
                value: function () {
                    return null;
                }
            }, {
                key: "dispose",
                value: function () { }
            }, {
                key: "duration",
                get: function () {
                    return 0;
                }
            }]), i;
        }(T), an = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.call(this)).visible = !1, t.on(Gt.ADDED, _assertThisInitialized(t), t._onParentChange),
                    t.on(Gt.REMOVED, _assertThisInitialized(t), t._onParentChange), t;
            }
            return _createClass(i, [{
                key: "_onParentChange",
                value: function () {
                    this.target = this.parent;
                }
            }, {
                key: "play",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 1, e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : null;
                    isNaN(t) &amp;&amp; (t = 1), this.url &amp;&amp; (this.stop(), this._channel = Ue.playSound(this.url, t, e));
                }
            }, {
                key: "stop",
                value: function () {
                    this._channel &amp;&amp; !this._channel.isStopped &amp;&amp; this._channel.stop(), this._channel = null;
                }
            }, {
                key: "_setPlayAction",
                value: function (t, e, i) {
                    var n = !(arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3]) || arguments[3];
                    this[i] &amp;&amp; t &amp;&amp; (n ? t.on(e, this, this[i]) : t.off(e, this, this[i]));
                }
            }, {
                key: "_setPlayActions",
                value: function (t, e, i) {
                    var n = !(arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3]) || arguments[3];
                    if (t &amp;&amp; e) {
                        var r, s, a = e.split(",");
                        for (s = a.length, r = 0; r &lt; s; r++) this._setPlayAction(t, a[r], i, n);
                    }
                }
            }, {
                key: "playEvent",
                set: function (t) {
                    this._playEvents = t, t &amp;&amp; this._tar &amp;&amp; this._setPlayActions(this._tar, t, "play");
                }
            }, {
                key: "target",
                set: function (t) {
                    this._tar &amp;&amp; (this._setPlayActions(this._tar, this._playEvents, "play", !1), this._setPlayActions(this._tar, this._stopEvents, "stop", !1)),
                        this._tar = t, this._tar &amp;&amp; (this._setPlayActions(this._tar, this._playEvents, "play", !0),
                            this._setPlayActions(this._tar, this._stopEvents, "stop", !0));
                }
            }, {
                key: "stopEvent",
                set: function (t) {
                    this._stopEvents = t, t &amp;&amp; this._tar &amp;&amp; this._setPlayActions(this._tar, t, "stop");
                }
            }]), i;
        }(Ce), on = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "enable",
                value: function (e, n) {
                    var r = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : 2;
                    t.type = r, i.loader.load(e, m.create(null, t.onManifestLoaded, [n]), null, Xe.JSON);
                }
            }, {
                key: "onManifestLoaded",
                value: function (e, i) {
                    t.manifest = i, x.customFormat = t.addVersionPrefix, e.run(), i || console.warn("èµ„æºç‰ˆæœ¬æ¸…å•æ–‡ä»¶ä¸å­˜åœ¨ï¼Œä¸ä½¿ç”¨èµ„æºç‰ˆæœ¬ç®¡ç†ã€‚å¿½ç•¥ERR_FILE_NOT_FOUNDé”™è¯¯ã€‚");
                }
            }, {
                key: "addVersionPrefix",
                value: function (e) {
                    return e = x.getAdptedFilePath(e), t.manifest &amp;&amp; t.manifest[e] ? t.type == t.FILENAME_VERSION ? t.manifest[e] : t.manifest[e] + "/" + e : e;
                }
            }]), t;
        }();
        on.FOLDER_VERSION = 1, on.FILENAME_VERSION = 2, on.type = on.FOLDER_VERSION;
        var ln, hn = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t, n = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : null, r = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 0, s = arguments.length &gt; 2 &amp;&amp; void 0 !== arguments[2] ? arguments[2] : null, a = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null;
                return _classCallCheck(this, i), (t = e.call(this)).disableInput = !1, t.protocols = [],
                    t._byteClass = s || We, t.protocols = a, t.endian = i.BIG_ENDIAN, n &amp;&amp; r &gt; 0 &amp;&amp; r &lt; 65535 &amp;&amp; t.connect(n, r),
                    t;
            }
            return _createClass(i, [{
                key: "connect",
                value: function (t, e) {
                    var i = "ws://" + t + ":" + e;
                    this.connectByUrl(i);
                }
            }, {
                key: "connectByUrl",
                value: function (t) {
                    var e = this;
                    null != this._socket &amp;&amp; this.close(), this._socket &amp;&amp; this.cleanSocket(), this.protocols &amp;&amp; 0 != this.protocols.length ? this._socket = new zt.window.WebSocket(t, this.protocols) : this._socket = new zt.window.WebSocket(t),
                        this._socket.binaryType = "arraybuffer", this._output = new this._byteClass(), this._output.endian = this.endian,
                        this._input = new this._byteClass(), this._input.endian = this.endian, this._addInputPosition = 0,
                        this._socket.onopen = function (t) {
                            e._onOpen(t);
                        }, this._socket.onmessage = function (t) {
                            e._onMessage(t);
                        }, this._socket.onclose = function (t) {
                            e._onClose(t);
                        }, this._socket.onerror = function (t) {
                            e._onError(t);
                        };
                }
            }, {
                key: "cleanSocket",
                value: function () {
                    this.close(), this._connected = !1, this._socket.onopen = null, this._socket.onmessage = null,
                        this._socket.onclose = null, this._socket.onerror = null, this._socket = null;
                }
            }, {
                key: "close",
                value: function () {
                    if (null != this._socket) try {
                        this._socket.close();
                    } catch (t) { }
                }
            }, {
                key: "_onOpen",
                value: function (t) {
                    this._connected = !0, this.event(Gt.OPEN, t);
                }
            }, {
                key: "_onMessage",
                value: function (t) {
                    if (t &amp;&amp; t.data) {
                        var e = t.data;
                        if (this.disableInput &amp;&amp; e) this.event(Gt.MESSAGE, e); else {
                            this._input.length &gt; 0 &amp;&amp; this._input.bytesAvailable &lt; 1 &amp;&amp; (this._input.clear(),
                                this._addInputPosition = 0);
                            var i = this._input.pos;
                            !this._addInputPosition &amp;&amp; (this._addInputPosition = 0), this._input.pos = this._addInputPosition,
                                e &amp;&amp; ("string" == typeof e ? this._input.writeUTFBytes(e) : this._input.writeArrayBuffer(e),
                                    this._addInputPosition = this._input.pos, this._input.pos = i), this.event(Gt.MESSAGE, e);
                        }
                    }
                }
            }, {
                key: "_onClose",
                value: function (t) {
                    this._connected = !1, this.event(Gt.CLOSE, t);
                }
            }, {
                key: "_onError",
                value: function (t) {
                    this.event(Gt.ERROR, t);
                }
            }, {
                key: "send",
                value: function (t) {
                    this._socket.send(t);
                }
            }, {
                key: "flush",
                value: function () {
                    if (this._output &amp;&amp; this._output.length &gt; 0) {
                        var t;
                        try {
                            this._socket &amp;&amp; this._socket.send(this._output.__getBuffer().slice(0, this._output.length));
                        } catch (e) {
                            t = e;
                        }
                        this._output.endian = this.endian, this._output.clear(), t &amp;&amp; this.event(Gt.ERROR, t);
                    }
                }
            }, {
                key: "input",
                get: function () {
                    return this._input;
                }
            }, {
                key: "output",
                get: function () {
                    return this._output;
                }
            }, {
                key: "connected",
                get: function () {
                    return this._connected;
                }
            }, {
                key: "endian",
                get: function () {
                    return this._endian;
                },
                set: function (t) {
                    this._endian = t, null != this._input &amp;&amp; (this._input.endian = t), null != this._output &amp;&amp; (this._output.endian = t);
                }
            }]), i;
        }(T);
        hn.LITTLE_ENDIAN = "littleEndian", hn.BIG_ENDIAN = "bigEndian", (ln = t.TextureDecodeFormat || (t.TextureDecodeFormat = {}))[ln.Normal = 0] = "Normal",
            ln[ln.RGBM = 1] = "RGBM";
        var un = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "changeDefinition",
                value: function (t, e) {
                    window.Laya[t] = e;
                    var i = t + "=classObj";
                    window.eval(i);
                }
            }]), t;
        }(), cn = function () {
            function t() {
                _classCallCheck(this, t), this.reset();
            }
            return _createClass(t, [{
                key: "setData",
                value: function (e, i, n, r) {
                    return this.char = e, this.charNum = e.charCodeAt(0), this.x = this.y = 0, this.width = i,
                        this.height = n, this.style = r, this.isWord = !t._isWordRegExp.test(e), this;
                }
            }, {
                key: "reset",
                value: function () {
                    return this.x = this.y = this.width = this.height = 0, this.isWord = !1, this.char = null,
                        this.charNum = 0, this.style = null, this;
                }
            }, {
                key: "recover",
                value: function () {
                    n.recover("HTMLChar", this.reset());
                }
            }, {
                key: "_isChar",
                value: function () {
                    return !0;
                }
            }, {
                key: "_getCSSStyle",
                value: function () {
                    return this.style;
                }
            }], [{
                key: "create",
                value: function () {
                    return n.getItemByClass("HTMLChar", t);
                }
            }]), t;
        }();
        cn._isWordRegExp = new RegExp("[\\w.]", "");
        var _n = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "enable",
                value: function () {
                    t._logdiv || (t._logdiv = zt.createElement("div"), t._logdiv.style.cssText = "border:white;padding:4px;overflow-y:auto;z-index:1000000;background:rgba(100,100,100,0.6);color:white;position: absolute;left:0px;top:0px;width:50%;height:50%;",
                        zt.document.body.appendChild(t._logdiv), t._btn = zt.createElement("button"), t._btn.innerText = "Hide",
                        t._btn.style.cssText = "z-index:1000001;position: absolute;left:10px;top:10px;",
                        t._btn.onclick = t.toggle, zt.document.body.appendChild(t._btn));
                }
            }, {
                key: "toggle",
                value: function () {
                    var e = t._logdiv.style;
                    "" === e.display ? (t._btn.innerText = "Show", e.display = "none") : (t._btn.innerText = "Hide",
                        e.display = "");
                }
            }, {
                key: "print",
                value: function (e) {
                    t._logdiv &amp;&amp; (t._count &gt;= t.maxCount &amp;&amp; t.clear(), t._count++, t._logdiv.innerText += e + "\n",
                        t.autoScrollToBottom &amp;&amp; t._logdiv.scrollHeight - t._logdiv.scrollTop - t._logdiv.clientHeight &lt; 50 &amp;&amp; (t._logdiv.scrollTop = t._logdiv.scrollHeight));
                }
            }, {
                key: "clear",
                value: function () {
                    t._logdiv.innerText = "", t._count = 0;
                }
            }]), t;
        }();
        _n._count = 0, _n.maxCount = 50, _n.autoScrollToBottom = !0;
        var dn = function () {
            function t(e, i, n, r) {
                _classCallCheck(this, t), this.scale = 1, this.datas = new Array(300), this.datapos = 0,
                    this.id = e, this.color = i, this.name = n, this.scale = r;
            }
            return _createClass(t, [{
                key: "addData",
                value: function (t) {
                    this.datas[this.datapos] = t, this.datapos++, this.datapos %= 300;
                }
            }]), t;
        }(), fn = function (t) {
            _inherits(i, t);
            var e = _createSuper(i);
            function i() {
                var t;
                return _classCallCheck(this, i), (t = e.call(this)).datas = [], t.xdata = new Array(i.DATANUM),
                    t.ydata = new Array(i.DATANUM), t.hud_width = 800, t.hud_height = 200, t.gMinV = 0,
                    t.gMaxV = 100, t.textSpace = 40, t.sttm = 0, i.inst = _assertThisInitialized(t),
                    t._renderType |= se.CUSTOM, t._setRenderType(t._renderType), t._setCustomRender(),
                    t.addDataDef(0, 16777215, "frame", 1), t.addDataDef(1, 65280, "update", 1), t.addDataDef(2, 16711680, "flush", 1),
                    i._now = performance ? performance.now.bind(performance) : Date.now, t;
            }
            return _createClass(i, [{
                key: "now",
                value: function () {
                    return i._now();
                }
            }, {
                key: "start",
                value: function () {
                    this.sttm = i._now();
                }
            }, {
                key: "end",
                value: function (t) {
                    var e = i._now() - this.sttm;
                    this.updateValue(t, e);
                }
            }, {
                key: "config",
                value: function (t, e) {
                    this.hud_width = t, this.hud_height = e;
                }
            }, {
                key: "addDataDef",
                value: function (t, e, i, n) {
                    this.datas[t] = new dn(t, e, i, n);
                }
            }, {
                key: "updateValue",
                value: function (t, e) {
                    this.datas[t].addData(e);
                }
            }, {
                key: "v2y",
                value: function (t) {
                    this._y, this.hud_height, this.gMinV, this.gMaxV;
                    return this._y + this.hud_height * (1 - (t - this.gMinV) / this.gMaxV);
                }
            }, {
                key: "drawHLine",
                value: function (t, e, i, n) {
                    var r = this._x, s = (this._x, this.hud_width, this.v2y(e));
                    t.fillText(n, r, s - 6, null, "green", null), r += this.textSpace, t.fillStyle = i,
                        t.fillRect(r, s, this._x + this.hud_width, 1, null);
                }
            }, {
                key: "customRender",
                value: function (t, e, n) {
                    var r = performance.now();
                    i._lastTm &lt;= 0 &amp;&amp; (i._lastTm = r), this.updateValue(0, r - i._lastTm), i._lastTm = r,
                        t.save(), t.fillRect(this._x, this._y, this.hud_width, this.hud_height + 4, "#000000cc"),
                        t.globalAlpha = .9, this.drawHLine(t, 0, "green", "    0"), this.drawHLine(t, 10, "green", "  10"),
                        this.drawHLine(t, 16.667, "red", " "), this.drawHLine(t, 20, "green", "50|20"),
                        this.drawHLine(t, 33.334, "yellow", ""), this.drawHLine(t, 16.667 * 3, "yellow", ""),
                        this.drawHLine(t, 66.668, "yellow", ""), this.drawHLine(t, 50, "green", "20|50"),
                        this.drawHLine(t, 100, "green", "10|100");
                    for (var s = 0, a = this.datas.length; s &lt; a; s++) {
                        var o = this.datas[s];
                        if (o) {
                            var l = o.datas.length, h = (this.hud_width - this.textSpace) / l, u = o.datapos, c = this._x + this.textSpace;
                            t.fillStyle = o.color;
                            for (var _ = l; u &lt; _; u++) {
                                var d = this.v2y(o.datas[u] * o.scale);
                                t.fillRect(c, d, h, this.hud_height + this._y - d, null), c += h;
                            }
                            for (u = 0; u &lt; o.datapos; u++) d = this.v2y(o.datas[u] * o.scale), t.fillRect(c, d, h, this.hud_height + this._y - d, null),
                                c += h;
                        }
                    }
                    t.restore();
                }
            }]), i;
        }(Ce);
        fn._lastTm = 0, fn._now = null, fn.DATANUM = 300, fn.drawTexTm = 0;
        var vn = function () {
            function t() {
                _classCallCheck(this, t), this.maxCount = 1e3;
            }
            return _createClass(t, [{
                key: "getCacheList",
                value: function () {
                    return n.getPoolBySign(this.sign);
                }
            }, {
                key: "tryDispose",
                value: function (t) {
                    var e;
                    (e = n.getPoolBySign(this.sign)).length &gt; this.maxCount &amp;&amp; e.splice(this.maxCount, e.length - this.maxCount);
                }
            }], [{
                key: "addPoolCacheManager",
                value: function (e) {
                    var i, n = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] ? arguments[1] : 100;
                    (i = new t()).sign = e, i.maxCount = n, ue.regCacheByFunction(K.bind(i.tryDispose, i), K.bind(i.getCacheList, i));
                }
            }]), t;
        }(), pn = function (t) {
            _inherits(r, t);
            var e = _createSuper(r);
            function r() {
                var t;
                return _classCallCheck(this, r), (t = e.apply(this, arguments))._tweenDic = {},
                    t._tweenDataList = [], t._currTime = 0, t._lastTime = 0, t._startTime = 0, t._index = 0,
                    t._gidIndex = 0, t._firstTweenDic = {}, t._startTimeSort = !1, t._endTimeSort = !1,
                    t._loopKey = !1, t.scale = 1, t._frameRate = 60, t._frameIndex = 0, t._total = 0,
                    t;
            }
            return _createClass(r, [{
                key: "to",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0;
                    return this._create(t, e, i, n, r, !0);
                }
            }, {
                key: "from",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, r = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0;
                    return this._create(t, e, i, n, r, !1);
                }
            }, {
                key: "_create",
                value: function (t, e, i, r, s, a) {
                    var o = n.getItemByClass("tweenData", yn);
                    return o.isTo = a, o.type = 0, o.target = t, o.duration = i, o.data = e, o.startTime = this._startTime + s,
                        o.endTime = o.startTime + o.duration, o.ease = r, this._startTime = Math.max(o.endTime, this._startTime),
                        this._tweenDataList.push(o), this._startTimeSort = !0, this._endTimeSort = !0, this;
                }
            }, {
                key: "addLabel",
                value: function (t, e) {
                    var i = n.getItemByClass("tweenData", yn);
                    return i.type = 1, i.data = t, i.endTime = i.startTime = this._startTime + e, this._labelDic || (this._labelDic = {}),
                        this._labelDic[t] = i, this._tweenDataList.push(i), this;
                }
            }, {
                key: "removeLabel",
                value: function (t) {
                    if (this._labelDic &amp;&amp; this._labelDic[t]) {
                        var e = this._labelDic[t];
                        if (e) {
                            var i = this._tweenDataList.indexOf(e);
                            i &gt; -1 &amp;&amp; this._tweenDataList.splice(i, 1);
                        }
                        delete this._labelDic[t];
                    }
                }
            }, {
                key: "gotoTime",
                value: function (t) {
                    if (null != this._tweenDataList &amp;&amp; 0 != this._tweenDataList.length) {
                        var e, i, r, s;
                        for (var a in this._firstTweenDic) if (i = this._firstTweenDic[a]) for (var o in i) o in i.diyTarget &amp;&amp; (i.diyTarget[o] = i[o]);
                        for (a in this._tweenDic) (e = this._tweenDic[a]).clear(), delete this._tweenDic[a];
                        if (this._index = 0, this._gidIndex = 0, this._currTime = t, this._lastTime = zt.now(),
                            null == this._endTweenDataList || this._endTimeSort) {
                            this._endTimeSort = !1, this._endTweenDataList = r = this._tweenDataList.concat(),
                                r.sort(function (t, e) {
                                    return t.endTime &gt; e.endTime ? 1 : t.endTime &lt; e.endTime ? -1 : 0;
                                });
                        } else r = this._endTweenDataList;
                        for (var l = 0, h = r.length; l &lt; h; l++) if (0 == (s = r[l]).type) {
                            if (!(t &gt;= s.endTime)) break;
                            this._index = Math.max(this._index, l + 1);
                            var u = s.data;
                            if (s.isTo) for (var c in u) s.target[c] = u[c];
                        }
                        for (l = 0, h = this._tweenDataList.length; l &lt; h; l++) 0 == (s = this._tweenDataList[l]).type &amp;&amp; t &gt;= s.startTime &amp;&amp; t &lt; s.endTime &amp;&amp; (this._index = Math.max(this._index, l + 1),
                            this._gidIndex++, (e = n.getItemByClass("tween", $e))._create(s.target, s.data, s.duration, s.ease, m.create(this, this._animComplete, [this._gidIndex]), 0, !1, s.isTo, !0, !1),
                            e.setStartTime(this._currTime - (t - s.startTime)), e._updateEase(this._currTime),
                            e.gid = this._gidIndex, this._tweenDic[this._gidIndex] = e);
                    }
                }
            }, {
                key: "gotoLabel",
                value: function (t) {
                    if (null != this._labelDic) {
                        var e = this._labelDic[t];
                        e &amp;&amp; this.gotoTime(e.startTime);
                    }
                }
            }, {
                key: "pause",
                value: function () {
                    i.timer.clear(this, this._update);
                }
            }, {
                key: "resume",
                value: function () {
                    this.play(this._currTime, this._loopKey);
                }
            }, {
                key: "play",
                value: function () {
                    var t = arguments.length &gt; 0 &amp;&amp; void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length &gt; 1 &amp;&amp; void 0 !== arguments[1] &amp;&amp; arguments[1];
                    if (this._tweenDataList) {
                        if (this._startTimeSort) {
                            var n = function (t, e) {
                                return t.startTime &gt; e.startTime ? 1 : t.startTime &lt; e.startTime ? -1 : 0;
                            };
                            this._startTimeSort = !1, this._tweenDataList.sort(n);
                            for (var r = 0, s = this._tweenDataList.length; r &lt; s; r++) {
                                var a = this._tweenDataList[r];
                                if (null != a &amp;&amp; 0 == a.type) {
                                    var o = a.target, l = o.$_GID || (o.$_GID = K.getGID()), h = null;
                                    for (var u in null == this._firstTweenDic[l] ? ((h = {}).diyTarget = o, this._firstTweenDic[l] = h) : h = this._firstTweenDic[l],
                                        a.data) null == h[u] &amp;&amp; (h[u] = o[u]);
                                }
                            }
                        }
                        "string" == typeof t ? this.gotoLabel(t) : this.gotoTime(t), this._loopKey = e,
                            this._lastTime = zt.now(), i.timer.frameLoop(1, this, this._update);
                    }
                }
            }, {
                key: "_update",
                value: function () {
                    if (this._currTime &gt;= this._startTime) {
                        if (!this._loopKey) {
                            for (var t in this._tweenDic) (e = this._tweenDic[t]).complete();
                            return this.pause(), void this._complete();
                        }
                        if (this._complete(), !this._tweenDataList) return;
                        this.gotoTime(0);
                    }
                    var e, i = zt.now(), r = i - this._lastTime, s = this._currTime += r * this.scale;
                    for (t in this._lastTime = i, this._tweenDic) (e = this._tweenDic[t])._updateEase(s);
                    if (0 != this._tweenDataList.length &amp;&amp; this._index &lt; this._tweenDataList.length) {
                        var a = this._tweenDataList[this._index];
                        s &gt;= a.startTime &amp;&amp; (this._index++, 0 == a.type ? (this._gidIndex++, (e = n.getItemByClass("tween", $e))._create(a.target, a.data, a.duration, a.ease, m.create(this, this._animComplete, [this._gidIndex]), 0, !1, a.isTo, !0, !1),
                            e.setStartTime(s), e.gid = this._gidIndex, this._tweenDic[this._gidIndex] = e, e._updateEase(s)) : this.event(Gt.LABEL, a.data));
                    }
                }
            }, {
                key: "_animComplete",
                value: function (t) {
                    this._tweenDic[t] &amp;&amp; delete this._tweenDic[t];
                }
            }, {
                key: "_complete",
                value: function () {
                    this.event(Gt.COMPLETE);
                }
            }, {
                key: "reset",
                value: function () {
                    var t, e, n;
                    if (this._labelDic) for (t in this._labelDic) delete this._labelDic[t];
                    for (t in this._tweenDic) this._tweenDic[t].clear(), delete this._tweenDic[t];
                    for (t in this._firstTweenDic) delete this._firstTweenDic[t];
                    if (this._endTweenDataList = null, this._tweenDataList &amp;&amp; this._tweenDataList.length) for (n = this._tweenDataList.length,
                        e = 0; e &lt; n; e++) this._tweenDataList[e] &amp;&amp; this._tweenDataList[e].destroy();
                    this._tweenDataList.length = 0, this._currTime = 0, this._lastTime = 0, this._startTime = 0,
                        this._index = 0, this._gidIndex = 0, this.scale = 1, i.timer.clear(this, this._update);
                }
            }, {
                key: "destroy",
                value: function () {
                    this.reset(), this._labelDic = null, this._tweenDic = null, this._tweenDataList = null,
                        this._firstTweenDic = null;
                }
            }, {
                key: "index",
                get: function () {
                    return this._frameIndex;
                },
                set: function (t) {
                    this._frameIndex = t, this.gotoTime(this._frameIndex / this._frameRate * 1e3);
                }
            }, {
                key: "total",
                get: function () {
                    return this._total = Math.floor(this._startTime / 1e3 * this._frameRate), this._total;
                }
            }], [{
                key: "to",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, s = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0;
                    return new r().to(t, e, i, n, s);
                }
            }, {
                key: "from",
                value: function (t, e, i) {
                    var n = arguments.length &gt; 3 &amp;&amp; void 0 !== arguments[3] ? arguments[3] : null, s = arguments.length &gt; 4 &amp;&amp; void 0 !== arguments[4] ? arguments[4] : 0;
                    return new r().from(t, e, i, n, s);
                }
            }]), r;
        }(T), yn = function () {
            function t() {
                _classCallCheck(this, t), this.type = 0, this.isTo = !0;
            }
            return _createClass(t, [{
                key: "destroy",
                value: function () {
                    this.target = null, this.ease = null, this.data = null, this.isTo = !0, this.type = 0,
                        n.recover("tweenData", this);
                }
            }]), t;
        }(), gn = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, [{
                key: "characterMapContains",
                value: function (e) {
                    for (var i = 0; i &lt; t.charsMap.length; ++i) if (t.charsMap[i][0] === e) return !0;
                    return !1;
                }
            }, {
                key: "getCharRep",
                value: function (e) {
                    for (var i = 0; i &lt; t.charsMap.length; ++i) if (t.charsMap[i][0] === e) return t.charsMap[i];
                    return !1;
                }
            }, {
                key: "getCombCharRep",
                value: function (e, i) {
                    for (var n = 0; n &lt; t.combCharsMap.length; ++n) if (t.combCharsMap[n][0][0] === e &amp;&amp; t.combCharsMap[n][0][1] === i) return t.combCharsMap[n];
                    return !1;
                }
            }, {
                key: "isTransparent",
                value: function (e) {
                    for (var i = 0; i &lt; t.transChars.length; ++i) if (t.transChars[i] === e) return !0;
                    return !1;
                }
            }, {
                key: "getOriginalCharsFromCode",
                value: function (e) {
                    var i;
                    for (i = 0; i &lt; t.charsMap.length; ++i) if (t.charsMap[i].indexOf(e) &gt; -1) return String.fromCharCode(t.charsMap[i][0]);
                    for (i = 0; i &lt; t.combCharsMap.length; ++i) if (t.combCharsMap[i].indexOf(e) &gt; -1) return String.fromCharCode(t.combCharsMap[i][0][0]) + String.fromCharCode(t.combCharsMap[i][0][1]);
                    return String.fromCharCode(e);
                }
            }, {
                key: "convertArabic",
                value: function (t) {
                    for (var e, i, n = "", r = 0; r &lt; t.length; ++r) {
                        var s = t.charCodeAt(r);
                        if (this.characterMapContains(s)) {
                            for (var a = null, o = null, l = r - 1, h = r + 1; l &gt;= 0 &amp;&amp; this.isTransparent(t.charCodeAt(l)); --l);
                            for ((!(e = !!(a = l &gt;= 0 ? t.charCodeAt(l) : null) &amp;&amp; this.getCharRep(a)) || null == e[2] &amp;&amp; null == e[3]) &amp;&amp; (a = null); h &lt; t.length &amp;&amp; this.isTransparent(t.charCodeAt(h)); ++h);
                            if ((!(e = !!(o = h &lt; t.length ? t.charCodeAt(h) : null) &amp;&amp; this.getCharRep(o)) || null == e[3] &amp;&amp; null == e[4]) &amp;&amp; (o = null),
                                1604 === s &amp;&amp; null != o &amp;&amp; (1570 === o || 1571 === o || 1573 === o || 1575 === o)) {
                                i = this.getCombCharRep(s, o), n += null != a ? String.fromCharCode(i[4]) : String.fromCharCode(i[1]),
                                    ++r;
                                continue;
                            }
                            if (e = this.getCharRep(s), null != a &amp;&amp; null != o &amp;&amp; null != e[3]) {
                                n += String.fromCharCode(e[3]);
                                continue;
                            }
                            if (null != a &amp;&amp; null != e[4]) {
                                n += String.fromCharCode(e[4]);
                                continue;
                            }
                            if (null != o &amp;&amp; null != e[2]) {
                                n += String.fromCharCode(e[2]);
                                continue;
                            }
                            n += String.fromCharCode(e[1]);
                        } else n += String.fromCharCode(s);
                    }
                    return n;
                }
            }, {
                key: "convertArabicBack",
                value: function (t) {
                    var e, i, n = "";
                    for (i = 0; i &lt; t.length; ++i) e = t.charCodeAt(i), n += this.getOriginalCharsFromCode(e);
                    return n;
                }
            }]), t;
        }();
        gn.charsMap = [[1569, 65152, null, null, null], [1570, 65153, null, null, 65154], [1571, 65155, null, null, 65156], [1572, 65157, null, null, 65158], [1573, 65159, null, null, 65160], [1574, 65161, 65163, 65164, 65162], [1575, 65165, null, null, 65166], [1576, 65167, 65169, 65170, 65168], [1577, 65171, null, null, 65172], [1578, 65173, 65175, 65176, 65174], [1579, 65177, 65179, 65180, 65178], [1580, 65181, 65183, 65184, 65182], [1581, 65185, 65187, 65188, 65186], [1582, 65189, 65191, 65192, 65190], [1583, 65193, null, null, 65194], [1584, 65195, null, null, 65196], [1585, 65197, null, null, 65198], [1586, 65199, null, null, 65200], [1587, 65201, 65203, 65204, 65202], [1588, 65205, 65207, 65208, 65206], [1589, 65209, 65211, 65212, 65210], [1590, 65213, 65215, 65216, 65214], [1591, 65217, 65219, 65220, 65218], [1592, 65221, 65223, 65224, 65222], [1593, 65225, 65227, 65228, 65226], [1594, 65229, 65231, 65232, 65230], [1600, 1600, 1600, 1600, 1600], [1601, 65233, 65235, 65236, 65234], [1602, 65237, 65239, 65240, 65238], [1603, 65241, 65243, 65244, 65242], [1604, 65245, 65247, 65248, 65246], [1605, 65249, 65251, 65252, 65250], [1606, 65253, 65255, 65256, 65254], [1607, 65257, 65259, 65260, 65258], [1608, 65261, null, null, 65262], [1609, 65263, null, null, 65264], [1610, 65265, 65267, 65268, 65266], [1662, 64342, 64344, 64345, 64343], [1740, 64508, 64510, 64511, 64509], [1670, 64378, 64380, 64381, 64379], [1705, 64398, 64400, 64401, 64399], [1711, 64402, 64404, 64405, 64403], [1688, 64394, null, null, 64395]],
            gn.combCharsMap = [[[1604, 1570], 65269, null, null, 65270], [[1604, 1571], 65271, null, null, 65272], [[1604, 1573], 65273, null, null, 65274], [[1604, 1575], 65275, null, null, 65276]],
            gn.transChars = [1552, 1554, 1555, 1556, 1557, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1648, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1759, 1760, 1761, 1762, 1763, 1764, 1767, 1768, 1770, 1771, 1772, 1773];
        var mn = function () {
            function t() {
                _classCallCheck(this, t);
            }
            return _createClass(t, null, [{
                key: "ArrayMul",
                value: function (e, i, n) {
                    if (e) if (i) for (var r, s, a, o, l = 0; l &lt; 4; l++) r = e[l], s = e[l + 4], a = e[l + 8],
                        o = e[l + 12], n[l] = r * i[0] + s * i[1] + a * i[2] + o * i[3], n[l + 4] = r * i[4] + s * i[5] + a * i[6] + o * i[7],
                        n[l + 8] = r * i[8] + s * i[9] + a * i[10] + o * i[11], n[l + 12] = r * i[12] + s * i[13] + a * i[14] + o * i[15]; else t.copyArray(e, n); else t.copyArray(i, n);
                }
            }, {
                key: "copyArray",
                value: function (t, e) {
                    if (t &amp;&amp; e) for (var i = 0; i &lt; t.length; i++) e[i] = t[i];
                }
            }]), t;
        }();
        return t.AlphaCmd = r, t.Animation = Bi, t.AnimationBase = ei, t.ArabicReshaper = gn,
            t.AtlasGrid = Ft, t.AtlasInfoManager = He, t.AudioSound = Be, t.AudioSoundChannel = Oe,
            t.BasePoly = At, t.BaseShader = P, t.BaseTexture = A, t.Bezier = nt, t.Bitmap = R,
            t.BitmapFont = Ye, t.BlendMode = B, t.BlurFilter = Vi, t.BlurFilterGLRender = Yi,
            t.BlurFilterSetter = Xi, t.BoundsStyle = me, t.Browser = zt, t.Buffer = pt, t.Buffer2D = gt,
            t.BufferState2D = vt, t.BufferStateBase = ft, t.ButtonEffect = Hi, t.Byte = We,
            t.CONST3D2D = It, t.CacheManger = ue, t.CacheStyle = Te, t.CallLater = Se, t.CharRenderInfo = Xt,
            t.CharRender_Canvas = Kt, t.CharRender_Native = jt, t.CharSubmitCache = Bt, t.ClassUtils = ge,
            t.ClipRectCmd = ae, t.ColorFilter = q, t.ColorFilterSetter = zi, t.ColorUtils = j,
            t.CommandEncoder = en, t.CommonScript = Pi, t.Component = ti, t.Config = e, t.Const = de,
            t.Context = Qt, t.Dragging = Je, t.Draw9GridTexture = ne, t.DrawCircleCmd = s, t.DrawCurvesCmd = a,
            t.DrawImageCmd = o, t.DrawLineCmd = l, t.DrawLinesCmd = h, t.DrawParticleCmd = Gi,
            t.DrawPathCmd = u, t.DrawPieCmd = c, t.DrawPolyCmd = _, t.DrawRectCmd = d, t.DrawStyle = st,
            t.DrawTextureCmd = Q, t.DrawTexturesCmd = oe, t.DrawTrianglesCmd = ie, t.Earcut = Mt,
            t.EarcutNode = St, t.Ease = Ze, t.EffectAnimation = Fi, t.EffectBase = Ki, t.Event = Gt,
            t.EventDispatcher = T, t.FadeIn = ji, t.FadeOut = qi, t.FillTextCmd = le, t.FillTextureCmd = Z,
            t.Filter = z, t.FilterSetterBase = Wi, t.FontInfo = Yt, t.FrameAnimation = ni, t.GlowFilter = Zi,
            t.GlowFilterGLRender = Qi, t.GlowFilterSetter = $i, t.GrahamScan = rt, t.GraphicAnimation = Di,
            t.Graphics = _e, t.GraphicsBounds = re, t.HTMLCanvas = pe, t.HTMLChar = cn, t.HTMLImage = ki,
            t.Handler = m, t.HitArea = ye, t.HttpRequest = Ve, t.ICharRender = Ht, t.ILaya = i,
            t.IStatRender = li, t.IndexBuffer2D = mt, t.InlcudeFile = vi, t.Input = we, t.KeyBoardManager = Le,
            t.KeyLocation = Ji, t.Keyboard = tn, t.Laya = xi, t.LayaGL = y, t.LayaGLQuickRunner = fe,
            t.LayaGLRunner = nn, t.LayaGPU = te, t.Loader = Xe, t.LoaderManager = ze, t.LocalStorage = je,
            t.Log = _n, t.MathUtil = ii, t.MatirxArray = mn, t.Matrix = f, t.Mesh2D = kt, t.MeshParticle2D = Ti,
            t.MeshQuadTexture = xt, t.MeshTexture = Ct, t.MeshVG = Et, t.Mouse = mi, t.MouseManager = Ae,
            t.Node = xe, t.Path = at, t.PerfData = dn, t.PerfHUD = fn, t.Point = v, t.Pool = n,
            t.PoolCache = vn, t.Prefab = Ge, t.PrimitiveSV = di, t.QuickTestTool = rn, t.Rectangle = p,
            t.Render = ee, t.RenderInfo = yt, t.RenderSprite = ve, t.RenderState2D = L, t.RenderTexture2D = D,
            t.Resource = C, t.ResourceVersion = on, t.RestoreCmd = $, t.RotateCmd = J, t.RunDriver = Ie,
            t.SaveBase = ht, t.SaveClipRect = ut, t.SaveCmd = he, t.SaveMark = ct, t.SaveTransform = _t,
            t.SaveTranslate = dt, t.ScaleCmd = tt, t.Scene = Ui, t.SceneLoader = Ni, t.SceneUtils = si,
            t.Script = Li, t.Shader = W, t.Shader2D = wt, t.Shader2X = Y, t.ShaderCompile = yi,
            t.ShaderDefines2D = N, t.ShaderDefinesBase = F, t.ShaderNode = pi, t.ShaderValue = function t() {
                _classCallCheck(this, t);
            }, t.SkinMeshBuffer = Rt, t.SkinSV = _i, t.Socket = hn, t.Sound = sn, t.SoundChannel = De,
            t.SoundManager = Ue, t.SoundNode = an, t.Sprite = Ce, t.SpriteConst = se, t.SpriteStyle = ke,
            t.Stage = Pe, t.Stat = U, t.StatUI = hi, t.StringKey = G, t.Submit = Pt, t.SubmitBase = lt,
            t.SubmitCMD = H, t.SubmitCanvas = Lt, t.SubmitKey = X, t.SubmitTarget = Dt, t.SubmitTexture = Ot,
            t.System = un, t.SystemUtils = Jt, t.TTFLoader = Qe, t.Text = be, t.TextAtlas = Ut,
            t.TextRender = qt, t.TextStyle = Ee, t.TextTexture = Nt, t.Texture = Wt, t.Texture2D = S,
            t.TextureSV = fi, t.TimeLine = pn, t.Timer = ui, t.TouchManager = Re, t.TransformCmd = et,
            t.TranslateCmd = it, t.Tween = $e, t.URL = x, t.Utils = K, t.Value2D = V, t.VectorGraphManager = ce,
            t.VertexArrayObject = function t() {
                _classCallCheck(this, t);
            }, t.VertexBuffer2D = Tt, t.WeakObject = ri, t.WebAudioSound = Ne, t.WebAudioSoundChannel = Fe,
            t.WebGL = $t, t.WebGLCacheAsNormalCanvas = bt, t.WebGLContext = g, t.WebGLRTMgr = O,
            t.WordText = Vt, t.WorkerLoader = gi, t.__init = wi, t._static = Ii, t.alertGlobalError = Si,
            t.enableDebugPanel = Mi, t.init = Ri, t.isWXOpenDataContext = void 0, t.isWXPosMsg = void 0,
            t.version = Ai, t.static = Ii, t;
    }({});
}()</pre></body></html>