<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">!function(t, e, i) {
    var n = (i.un, i.uns, i["static"]), r = i["class"], s = i.getset, h = (i.__newvec, 
    laya.utils.Browser), l = laya.utils.ClassUtils, a = (laya.resource.Context, laya.events.Event, 
    laya.display.Graphics, laya.utils.HTMLChar), o = laya.utils.Handler, u = laya.net.Loader, c = laya.utils.Pool, d = laya.maths.Rectangle, _ = laya.display.Sprite, f = laya.display.Text, p = laya.resource.Texture, y = laya.net.URL, g = laya.utils.Utils;
    i["interface"]("laya.html.utils.ILayout");
    var m = function() {
        function t() {
            this.rec = new d(), this.reset();
        }
        r(t, "laya.html.dom.HTMLHitRect");
        var e = t.prototype;
        return e.reset = function() {
            return this.rec.reset(), this.href = null, this;
        }, e.recover = function() {
            c.recover("HTMLHitRect", this.reset());
        }, t.create = function() {
            return c.getItemByClass("HTMLHitRect", t);
        }, t;
    }(), x = function() {
        function t() {
            this.x = 0, this.y = 0, this.w = 0, this.h = 0, this.wordStartIndex = 0, this.minTextHeight = 99999, 
            this.mWidth = 0, this.elements = new Array();
        }
        r(t, "laya.html.utils.LayoutLine");
        var e = t.prototype;
        return e.updatePos = function(t, e, i, n, r, s, h) {
            var l, a = 0;
            this.elements.length &gt; 0 &amp;&amp; (l = this.elements[this.elements.length - 1], a = l.x + l.width - this.elements[0].x), 
            h = h || this.h;
            var o = 0, u = NaN;
            "center" === r &amp;&amp; (o = (e - a) / 2), "right" === r &amp;&amp; (o = e - a);
            for (var c = 0, d = this.elements.length; d &gt; c; c++) {
                l = this.elements[c];
                var _ = l._getCSSStyle();
                switch (0 !== o &amp;&amp; (l.x += o), _.valign) {
                  case "top":
                    l.y = n;
                    break;

                  case "middle":
                    var f = 0;
                    99999 != this.minTextHeight &amp;&amp; (f = this.minTextHeight);
                    var p = (f + h) / 2;
                    p = Math.max(p, this.h), u = l instanceof laya.html.dom.HTMLImageElement ? n + p - l.height : n + p - l.height, 
                    l.y = u;
                    break;

                  case "bottom":
                    l.y = n + (h - l.height);
                }
            }
        }, t;
    }(), S = function() {
        function t() {
            this.all = new Array(), this.styleSheets = v.styleSheets;
        }
        r(t, "laya.html.dom.HTMLDocument");
        var e = t.prototype;
        return e.getElementById = function(t) {
            return this.all[t];
        }, e.setElementById = function(t, e) {
            this.all[t] = e;
        }, n(t, [ "document", function() {
            return this.document = new t();
        } ]), t;
    }(), L = function() {
        function t() {}
        return r(t, "laya.html.utils.Layout"), t.later = function(e) {
            null == t._will &amp;&amp; (t._will = [], i.stage.frameLoop(1, null, function() {
                if (!(t._will.length &lt; 1)) {
                    for (var e = 0; e &lt; t._will.length; e++) laya.html.utils.Layout.layout(t._will[e]);
                    t._will.length = 0;
                }
            })), t._will.push(e);
        }, t.layout = function(e) {
            if (!e || !e._style) return null;
            var i = e._style;
            if (0 === (512 &amp; i._type)) return null;
            e.style._type &amp;= -513;
            var n = t._multiLineLayout(e);
            return n;
        }, t._multiLineLayout = function(e) {
            function i() {
                I.y = T, T += I.h + _, I.mWidth = R, R = 0, I = new x(), C.push(I), I.h = 0, w = 0, 
                k = !0, b = !1;
            }
            var n = new Array();
            e._addChildsToLayout(n);
            var r, s, h, l, a, o = 0, u = n.length, c = e._getCSSStyle(), d = c.letterSpacing, _ = c.leading, f = c.lineHeight, p = c._widthAuto() || !c.wordWrap, y = p ? 999999 : e.width, g = (e.height, 
            0), m = c.italic ? c.fontSize / 3 : 0, S = c.align, L = c.valign, v = "top" !== L || "left" !== S || 0 != f, w = 0, T = 0, E = 0, H = 0, C = new Array(), I = C[0] = new x(), b = !1, M = !1;
            I.h = 0, c.italic &amp;&amp; (y -= c.fontSize / 3);
            var R = 0, k = !0;
            for (o = 0; u &gt; o; o++) if (r = n[o], null != r) if (k = !1, r instanceof laya.html.dom.HTMLBrElement) i(), 
            I.y = T, I.h = f; else {
                if (r._isChar()) {
                    if (l = r, l.isWord) b = M || "\n" === l["char"], I.wordStartIndex = I.elements.length; else {
                        if (C.length &gt; 0 &amp;&amp; w + E &gt; y &amp;&amp; I.wordStartIndex &gt; 0) {
                            var D = 0;
                            D = I.elements.length - I.wordStartIndex + 1, I.elements.length = I.wordStartIndex, 
                            o -= D, i();
                            continue;
                        }
                        b = !1, R += l.width;
                    }
                    E = l.width + l.style.letterSpacing, H = l.height, M = !1, b = b || w + E &gt; y, b &amp;&amp; i(), 
                    I.minTextHeight = Math.min(I.minTextHeight, r.height);
                } else s = r._getCSSStyle(), a = r, h = s.padding, b = M || s.getLineElement(), 
                E = a.width + h[1] + h[3] + s.letterSpacing, H = a.height + h[0] + h[2], M = s.getLineElement(), 
                b = b || w + E &gt; y &amp;&amp; s.wordWrap, b &amp;&amp; i();
                I.elements.push(r), I.h = Math.max(I.h, H), r.x = w, r.y = T, w += E, I.w = w - d, 
                I.y = T, g = Math.max(w + m, g);
            } else k || (w += t.DIV_ELEMENT_PADDING), I.wordStartIndex = I.elements.length;
            if (T = I.y + I.h, v) {
                var N = 0, A = y;
                for (p &amp;&amp; e.width &gt; 0 &amp;&amp; (A = e.width), o = 0, u = C.length; u &gt; o; o++) C[o].updatePos(0, A, o, N, S, L, f), 
                N += Math.max(f, C[o].h + _);
                T = N;
            }
            return p &amp;&amp; (e.width = g), T &gt; e.height &amp;&amp; (e.height = T), [ g, T ];
        }, t.DIV_ELEMENT_PADDING = 0, t._will = null, t;
    }(), v = (function() {
        function t() {}
        r(t, "laya.html.dom.HTMLBrElement");
        var e = t.prototype;
        return e._addToLayout = function(t) {
            t.push(this);
        }, e.reset = function() {
            return this;
        }, e.destroy = function() {
            c.recover(T.getClassName(this), this.reset());
        }, e._setParent = function(t) {}, e._getCSSStyle = function() {
            return t.brStyle || (t.brStyle = new v(), t.brStyle.setLineElement(!0), t.brStyle.block = !0), 
            t.brStyle;
        }, e.renderSelfToGraphic = function(t, e, i, n) {}, s(0, e, "URI", null, function(t) {}), 
        s(0, e, "parent", null, function(t) {}), s(0, e, "href", null, function(t) {}), 
        t.brStyle = null, t;
    }(), function() {
        function t() {
            this.padding = t._PADDING, this.reset();
        }
        r(t, "laya.html.utils.HTMLStyle");
        var e = t.prototype;
        return e._getExtendStyle = function() {
            return this._extendStyle === w.EMPTY &amp;&amp; (this._extendStyle = w.create()), this._extendStyle;
        }, e.reset = function() {
            return this.ower = null, this._type = 0, this.wordWrap = !0, this.fontSize = f.defaultFontSize, 
            this.family = f.defaultFont, this.color = "#000000", this.valign = "top", this.padding = t._PADDING, 
            this.bold = !1, this.italic = !1, this.align = "left", this.textDecoration = null, 
            this.bgColor = null, this.borderColor = null, this._extendStyle &amp;&amp; this._extendStyle.recover(), 
            this._extendStyle = w.EMPTY, this;
        }, e.recover = function() {
            c.recover("HTMLStyle", this.reset());
        }, e.inherit = function(e) {
            var i, n = 0, r = 0;
            i = t._inheritProps, r = i.length;
            var s;
            for (n = 0; r &gt; n; n++) s = i[n], this[s] = e[s];
        }, e._widthAuto = function() {
            return 0 !== (262144 &amp; this._type);
        }, e.widthed = function(t) {
            return 0 != (8 &amp; this._type);
        }, e._calculation = function(t, e) {
            return !1;
        }, e.heighted = function(t) {
            return 0 != (8192 &amp; this._type);
        }, e.size = function(t, e) {
            var i = this.ower, n = !1;
            -1 !== t &amp;&amp; t != i.width &amp;&amp; (this._type |= 8, i.width = t, n = !0), -1 !== e &amp;&amp; e != i.height &amp;&amp; (this._type |= 8192, 
            i.height = e, n = !0), n &amp;&amp; i._layoutLater();
        }, e.getLineElement = function() {
            return 0 != (65536 &amp; this._type);
        }, e.setLineElement = function(t) {
            t ? this._type |= 65536 : this._type &amp;= -65537;
        }, e._enableLayout = function() {
            return 0 === (2 &amp; this._type) &amp;&amp; 0 === (4 &amp; this._type);
        }, e.cssText = function(e) {
            this.attrs(t.parseOneCSS(e, ";"));
        }, e.attrs = function(t) {
            if (t) for (var e = 0, i = t.length; i &gt; e; e++) {
                var n = t[e];
                this[n[0]] = n[1];
            }
        }, s(0, e, "font", function() {
            return (this.italic ? "italic " : "") + (this.bold ? "bold " : "") + this.fontSize + "px " + (h.onIPhone ? f.fontFamilyMap[this.family] || this.family : this.family);
        }, function(t) {
            for (var e = t.split(" "), i = 0, n = e.length; n &gt; i; i++) {
                var r = e[i];
                switch (r) {
                  case "italic":
                    this.italic = !0;
                    continue;

                  case "bold":
                    this.bold = !0;
                    continue;
                }
                r.indexOf("px") &gt; 0 &amp;&amp; (this.fontSize = parseInt(r), this.family = e[i + 1], i++);
            }
        }), s(0, e, "href", function() {
            return this._extendStyle.href;
        }, function(t) {
            t !== this._extendStyle.href &amp;&amp; (this._getExtendStyle().href = t);
        }), s(0, e, "lineHeight", function() {
            return this._extendStyle.lineHeight;
        }, function(t) {
            this._extendStyle.lineHeight !== t &amp;&amp; (this._getExtendStyle().lineHeight = t);
        }), s(0, e, "strokeColor", function() {
            return this._extendStyle.strokeColor;
        }, function(t) {
            this._extendStyle.strokeColor !== t &amp;&amp; (this._getExtendStyle().strokeColor = t);
        }), s(0, e, "stroke", function() {
            return this._extendStyle.stroke;
        }, function(t) {
            this._extendStyle.stroke !== t &amp;&amp; (this._getExtendStyle().stroke = t);
        }), s(0, e, "leading", function() {
            return this._extendStyle.leading;
        }, function(t) {
            this._extendStyle.leading !== t &amp;&amp; (this._getExtendStyle().leading = t);
        }), s(0, e, "align", function() {
            var e = 48 &amp; this._type;
            return t.align_Value[e];
        }, function(e) {
            e in t.alignVDic &amp;&amp; (this._type &amp;= -49, this._type |= t.alignVDic[e]);
        }), s(0, e, "valign", function() {
            var e = 192 &amp; this._type;
            return t.vAlign_Value[e];
        }, function(e) {
            e in t.alignVDic &amp;&amp; (this._type &amp;= -193, this._type |= t.alignVDic[e]);
        }), s(0, e, "block", function() {
            return 0 != (1 &amp; this._type);
        }, function(t) {
            t ? this._type |= 1 : this._type &amp;= -2;
        }), s(0, e, "wordWrap", function() {
            return 0 === (131072 &amp; this._type);
        }, function(t) {
            t ? this._type &amp;= -131073 : this._type |= 131072;
        }), s(0, e, "bold", function() {
            return 0 != (1024 &amp; this._type);
        }, function(t) {
            t ? this._type |= 1024 : this._type &amp;= -1025;
        }), s(0, e, "italic", function() {
            return 0 != (2048 &amp; this._type);
        }, function(t) {
            t ? this._type |= 2048 : this._type &amp;= -2049;
        }), s(0, e, "whiteSpace", function() {
            return 131072 &amp; this._type ? "nowrap" : "";
        }, function(t) {
            "nowrap" === t &amp;&amp; (this._type |= 131072), "none" === t &amp;&amp; (this._type &amp;= -131073);
        }), s(0, e, "width", null, function(t) {
            if (this._type |= 8, "string" == typeof t) {
                var e = t.indexOf("auto");
                if (e &gt;= 0 &amp;&amp; (this._type |= 262144, t = t.substr(0, e)), this._calculation("width", t)) return;
                t = parseInt(t);
            }
            this.size(t, -1);
        }), s(0, e, "height", null, function(t) {
            if (this._type |= 8192, "string" == typeof t) {
                if (this._calculation("height", t)) return;
                t = parseInt(t);
            }
            this.size(-1, t);
        }), s(0, e, "letterSpacing", function() {
            return this._extendStyle.letterSpacing;
        }, function(t) {
            "string" == typeof t &amp;&amp; (t = parseInt(t + "")), t != this._extendStyle.letterSpacing &amp;&amp; (this._getExtendStyle().letterSpacing = t);
        }), s(0, e, "position", function() {
            return 4 &amp; this._type ? "absolute" : "";
        }, function(t) {
            "absolute" === t ? this._type |= 4 : this._type &amp;= -5;
        }), s(0, e, "absolute", function() {
            return 0 !== (4 &amp; this._type);
        }), s(0, e, "paddingLeft", function() {
            return this.padding[3];
        }), s(0, e, "paddingTop", function() {
            return this.padding[0];
        }), t.create = function() {
            return c.getItemByClass("HTMLStyle", t);
        }, t.parseOneCSS = function(e, i) {
            for (var n, r = [], s = e.split(i), h = 0, l = s.length; l &gt; h; h++) {
                var a = s[h], o = a.indexOf(":"), u = a.substr(0, o).replace(/^\s+|\s+$/g, "");
                if (0 !== u.length) {
                    var c = a.substr(o + 1).replace(/^\s+|\s+$/g, ""), d = [ u, c ];
                    switch (u) {
                      case "italic":
                      case "bold":
                        d[1] = "true" == c;
                        break;

                      case "font-weight":
                        "bold" == c &amp;&amp; (d[1] = !0, d[0] = "bold");
                        break;

                      case "line-height":
                        d[0] = "lineHeight", d[1] = parseInt(c);
                        break;

                      case "font-size":
                        d[0] = "fontSize", d[1] = parseInt(c);
                        break;

                      case "stroke":
                        d[0] = "stroke", d[1] = parseInt(c);
                        break;

                      case "padding":
                        n = c.split(" "), n.length &gt; 1 || (n[1] = n[2] = n[3] = n[0]), d[1] = [ parseInt(n[0]), parseInt(n[1]), parseInt(n[2]), parseInt(n[3]) ];
                        break;

                      default:
                        (d[0] = t._CSSTOVALUE[u]) || (d[0] = u);
                    }
                    r.push(d);
                }
            }
            return r;
        }, t.parseCSS = function(e, i) {
            for (var n; null != (n = t._parseCSSRegExp.exec(e)); ) t.styleSheets[n[1]] = t.parseOneCSS(n[2], ";");
        }, t._CSSTOVALUE = {
            "letter-spacing": "letterSpacing",
            "white-space": "whiteSpace",
            "line-height": "lineHeight",
            "font-family": "family",
            "vertical-align": "valign",
            "text-decoration": "textDecoration",
            "background-color": "bgColor",
            "border-color": "borderColor"
        }, t._parseCSSRegExp = new RegExp("([.#]\\w+)\\s*{([\\s\\S]*?)}", "g"), t.ALIGN_LEFT = "left", 
        t.ALIGN_CENTER = "center", t.ALIGN_RIGHT = "right", t.VALIGN_TOP = "top", t.VALIGN_MIDDLE = "middle", 
        t.VALIGN_BOTTOM = "bottom", t.styleSheets = {}, t.ADDLAYOUTED = 512, t._PADDING = [ 0, 0, 0, 0 ], 
        t._HEIGHT_SET = 8192, t._LINE_ELEMENT = 65536, t._NOWARP = 131072, t._WIDTHAUTO = 262144, 
        t._BOLD = 1024, t._ITALIC = 2048, t._CSS_BLOCK = 1, t._DISPLAY_NONE = 2, t._ABSOLUTE = 4, 
        t._WIDTH_SET = 8, t._ALIGN = 48, t._VALIGN = 192, n(t, [ "_inheritProps", function() {
            return this._inheritProps = [ "italic", "align", "valign", "leading", "stroke", "strokeColor", "bold", "fontSize", "lineHeight", "wordWrap", "color" ];
        }, "alignVDic", function() {
            return this.alignVDic = {
                left: 0,
                center: 16,
                right: 32,
                top: 0,
                middle: 64,
                bottom: 128
            };
        }, "align_Value", function() {
            return this.align_Value = {
                0: "left",
                16: "center",
                32: "right"
            };
        }, "vAlign_Value", function() {
            return this.vAlign_Value = {
                0: "top",
                64: "middle",
                128: "bottom"
            };
        } ]), t;
    }()), w = function() {
        function t() {
            this.reset();
        }
        r(t, "laya.html.utils.HTMLExtendStyle");
        var e = t.prototype;
        return e.reset = function() {
            return this.stroke = 0, this.strokeColor = "#000000", this.leading = 0, this.lineHeight = 0, 
            this.letterSpacing = 0, this.href = null, this;
        }, e.recover = function() {
            this != t.EMPTY &amp;&amp; c.recover("HTMLExtendStyle", this.reset());
        }, t.create = function() {
            return c.getItemByClass("HTMLExtendStyle", t);
        }, t.EMPTY = new t(), t;
    }(), T = function() {
        function t() {
            this._creates(), this.reset();
        }
        r(t, "laya.html.dom.HTMLElement");
        var e = t.prototype;
        return e._creates = function() {
            this._style = v.create();
        }, e.reset = function() {
            if (this.URI = null, this.parent = null, this._style.reset(), this._style.ower = this, 
            this._style.valign = "middle", this._text &amp;&amp; this._text.words) {
                var e = this._text.words, i = 0, n = 0;
                n = e.length;
                var r;
                for (i = 0; n &gt; i; i++) r = e[i], r &amp;&amp; r.recover();
            }
            return this._text = t._EMPTYTEXT, this._children &amp;&amp; (this._children.length = 0), 
            this._x = this._y = this._width = this._height = 0, this;
        }, e._getCSSStyle = function() {
            return this._style;
        }, e._addChildsToLayout = function(t) {
            var e = this._getWords();
            if (null == e &amp;&amp; (!this._children || 0 == this._children.length)) return !1;
            if (e) for (var i = 0, n = e.length; n &gt; i; i++) t.push(e[i]);
            return this._children &amp;&amp; this._children.forEach(function(e, i, n) {
                var r = e._style;
                r._enableLayout &amp;&amp; r._enableLayout() &amp;&amp; e._addToLayout(t);
            }), !0;
        }, e._addToLayout = function(t) {
            if (this._style) {
                var e = this._style;
                e.absolute || (e.block ? t.push(this) : this._addChildsToLayout(t) &amp;&amp; (this.x = this.y = 0));
            }
        }, e.repaint = function(t) {
            void 0 === t &amp;&amp; (t = !1), this.parentRepaint(t);
        }, e.parentRepaint = function(t) {
            void 0 === t &amp;&amp; (t = !1), this.parent &amp;&amp; this.parent.repaint(t);
        }, e._setParent = function(t) {
            if (t instanceof laya.html.dom.HTMLElement) {
                var e = t;
                this.URI || (this.URI = e.URI), this.style &amp;&amp; this.style.inherit(e.style);
            }
        }, e.appendChild = function(t) {
            return this.addChild(t);
        }, e.addChild = function(t) {
            return t.parent &amp;&amp; t.parent.removeChild(t), this._children || (this._children = []), 
            this._children.push(t), t.parent = this, t._setParent(this), this.repaint(), t;
        }, e.removeChild = function(t) {
            if (!this._children) return null;
            var e = 0, i = 0;
            for (i = this._children.length, e = 0; i &gt; e; e++) if (this._children[e] == t) return this._children.splice(e, 1), 
            t;
            return null;
        }, e.destroy = function() {
            this._children &amp;&amp; (this.destroyChildren(), this._children.length = 0), c.recover(t.getClassName(this), this.reset());
        }, e.destroyChildren = function() {
            if (this._children) {
                for (var t = this._children.length - 1; t &gt; -1; t--) this._children[t].destroy();
                this._children.length = 0;
            }
        }, e._getWords = function() {
            if (!this._text) return null;
            var t = this._text.text;
            if (!t || 0 === t.length) return null;
            var e = this._text.words;
            if (e &amp;&amp; e.length === t.length) return e;
            null === e &amp;&amp; (this._text.words = e = []), e.length = t.length;
            for (var i, n = this.style, r = n.font, s = 0, h = t.length; h &gt; s; s++) i = g.measureText(t.charAt(s), r), 
            e[s] = a.create().setData(t.charAt(s), i.width, i.height || n.fontSize, n);
            return e;
        }, e._isChar = function() {
            return !1;
        }, e._layoutLater = function() {
            var t = this.style;
            512 &amp; t._type || (t.widthed(this) &amp;&amp; (this._children &amp;&amp; this._children.length &gt; 0 || null != this._getWords()) &amp;&amp; t.block ? (L.later(this), 
            t._type |= 512) : this.parent &amp;&amp; this.parent._layoutLater());
        }, e._setAttributes = function(t, e) {
            switch (t) {
              case "style":
                this.style.cssText(e);
                break;

              case "class":
                this.className = e;
                break;

              case "x":
                this.x = parseFloat(e);
                break;

              case "y":
                this.y = parseFloat(e);
                break;

              case "width":
                this.width = parseFloat(e);
                break;

              case "height":
                this.height = parseFloat(e);
                break;

              default:
                this[t] = e;
            }
        }, e.formatURL = function(e) {
            return this.URI ? t.formatURL1(e, this.URI ? this.URI.path : null) : e;
        }, e.drawToGraphic = function(t, e, i, n) {
            e += this.x, i += this.y;
            var r = this.style;
            r.paddingLeft &amp;&amp; (e += r.paddingLeft), r.paddingTop &amp;&amp; (i += r.paddingTop), (null != r.bgColor || r.borderColor) &amp;&amp; t.drawRect(e, i, this.width, this.height, r.bgColor, r.borderColor, 1), 
            this.renderSelfToGraphic(t, e, i, n);
            var s, h = 0, l = 0;
            if (this._children &amp;&amp; this._children.length &gt; 0) for (l = this._children.length, 
            h = 0; l &gt; h; h++) s = this._children[h], null != s.drawToGraphic &amp;&amp; s.drawToGraphic(t, e, i, n);
        }, e.renderSelfToGraphic = function(t, e, i, n) {
            var r = this.style, s = this._getWords(), h = 0;
            if (s) {
                h = s.length;
                if (r) {
                    var l = r.font, a = r.color;
                    if (r.stroke) {
                        var o = r.stroke;
                        o = parseInt(o);
                        var u = r.strokeColor;
                        t.fillBorderWords(s, e, i, l, a, u, o);
                    } else t.fillWords(s, e, i, l, a);
                    if (this.href) {
                        var c = s.length - 1, d = s[c], _ = d.y + d.height;
                        if (d.y == s[0].y) {
                            "none" != r.textDecoration &amp;&amp; t.drawLine(s[0].x, _, d.x + d.width, _, a, 1);
                            var f = m.create();
                            f.rec.setTo(s[0].x, d.y, d.x + d.width - s[0].x, d.height), f.href = this.href, 
                            n.push(f);
                        } else this.workLines(s, t, n);
                    }
                }
            }
        }, e.workLines = function(t, e, i) {
            var n = this.style, r = !1;
            r = "none" != n.textDecoration;
            var s = 0, h = 0;
            h = t.length;
            var l;
            l = t[s];
            var a;
            if (a = l, l) {
                var o;
                for (s = 1; h &gt; s; s++) o = t[s], o.y != l.y ? (this.createOneLine(l, a, r, e, i), 
                l = o, a = o) : a = o;
                this.createOneLine(l, a, r, e, i);
            }
        }, e.createOneLine = function(t, e, i, n, r) {
            var s = e.y + e.height;
            i &amp;&amp; n.drawLine(t.x, s, e.x + e.width, s, this.color, 1);
            var h = m.create();
            h.rec.setTo(t.x, e.y, e.x + e.width - t.x, e.height), h.href = this.href, r.push(h);
        }, s(0, e, "href", function() {
            return this._style ? this._style.href : null;
        }, function(t) {
            this._style &amp;&amp; t != this._style.href &amp;&amp; (this._style.href = t, this.repaint());
        }), s(0, e, "color", null, function(t) {
            this.style.color = t;
        }), s(0, e, "id", null, function(t) {
            S.document.setElementById(t, this);
        }), s(0, e, "innerTEXT", function() {
            return this._text.text;
        }, function(e) {
            this._text === t._EMPTYTEXT ? this._text = {
                text: e,
                words: null
            } : (this._text.text = e, this._text.words &amp;&amp; (this._text.words.length = 0)), this.repaint();
        }), s(0, e, "style", function() {
            return this._style;
        }), s(0, e, "width", function() {
            return this._width;
        }, function(t) {
            this._width !== t &amp;&amp; (this._width = t, this.repaint());
        }), s(0, e, "x", function() {
            return this._x;
        }, function(t) {
            this._x != t &amp;&amp; (this._x = t, this.parentRepaint());
        }), s(0, e, "y", function() {
            return this._y;
        }, function(t) {
            this._y != t &amp;&amp; (this._y = t, this.parentRepaint());
        }), s(0, e, "height", function() {
            return this._height;
        }, function(t) {
            this._height !== t &amp;&amp; (this._height = t, this.repaint());
        }), s(0, e, "className", null, function(t) {
            this.style.attrs(S.document.styleSheets["." + t]);
        }), t.formatURL1 = function(t, e) {
            if (!t) return "null path";
            if (e || (e = y.basePath), t.indexOf(":") &gt; 0) return t;
            if (null != y.customFormat &amp;&amp; (t = y.customFormat(t)), t.indexOf(":") &gt; 0) return t;
            var i = t.charAt(0);
            if ("." === i) return y._formatRelativePath(e + t);
            if ("~" === i) return y.rootPath + t.substring(1);
            if ("d" === i) {
                if (0 === t.indexOf("data:image")) return t;
            } else if ("/" === i) return t;
            return e + t;
        }, t.getClassName = function(t) {
            return "function" == typeof t ? t.name : t.constructor.name;
        }, t._EMPTYTEXT = {
            text: null,
            words: null
        }, t;
    }(), E = function() {
        function t() {}
        return r(t, "laya.html.utils.HTMLParse"), t.getInstance = function(e) {
            var i = c.getItem(t._htmlClassMapShort[e]);
            return i || (i = l.getInstance(e)), i;
        }, t.parse = function(e, i, n) {
            i = i.replace(/&lt;br&gt;/g, "&lt;br/&gt;"), i = "&lt;root&gt;" + i + "&lt;/root&gt;", i = i.replace(t.spacePattern, t.char255);
            var r = g.parseXMLFromString(i);
            t._parseXML(e, r.childNodes[0].childNodes, n);
        }, t._parseXML = function(e, i, n, r) {
            var s = 0, h = 0;
            if (i.join || i.item) for (s = 0, h = i.length; h &gt; s; ++s) t._parseXML(e, i[s], n, r); else {
                var l, a;
                if (3 == i.nodeType) {
                    var o;
                    return void (e instanceof laya.html.dom.HTMLDivParser ? (null == i.nodeName &amp;&amp; (i.nodeName = "#text"), 
                    a = i.nodeName.toLowerCase(), o = i.textContent.replace(/^\s+|\s+$/g, ""), o.length &gt; 0 &amp;&amp; (l = t.getInstance(a), 
                    l &amp;&amp; (e.addChild(l), l.innerTEXT = o.replace(t.char255AndOneSpacePattern, " ")))) : (o = i.textContent.replace(/^\s+|\s+$/g, ""), 
                    o.length &gt; 0 &amp;&amp; (e.innerTEXT = o.replace(t.char255AndOneSpacePattern, " "))));
                }
                if (a = i.nodeName.toLowerCase(), "#comment" == a) return;
                if (l = t.getInstance(a)) {
                    "p" == a ? (e.addChild(t.getInstance("br")), l = e.addChild(l), e.addChild(t.getInstance("br"))) : l = e.addChild(l), 
                    l.URI = n, l.href = r;
                    var u = i.attributes;
                    if (u &amp;&amp; u.length &gt; 0) for (s = 0, h = u.length; h &gt; s; ++s) {
                        var c = u[s], d = c.nodeName, _ = c.value;
                        l._setAttributes(d, _);
                    }
                    t._parseXML(l, i.childNodes, n, l.href);
                } else t._parseXML(e, i.childNodes, n, r);
            }
        }, t.char255 = String.fromCharCode(255), t.spacePattern = /&amp;nbsp;|&amp;#160;/g, t.char255AndOneSpacePattern = new RegExp(String.fromCharCode(255) + "|(\\s+)", "g"), 
        t._htmlClassMapShort = {
            div: "HTMLDivParser",
            p: "HTMLElement",
            img: "HTMLImageElement",
            span: "HTMLElement",
            br: "HTMLBrElement",
            style: "HTMLStyleElement",
            font: "HTMLElement",
            a: "HTMLElement",
            "#text": "HTMLElement",
            link: "HTMLLinkElement"
        }, t;
    }(), H = (function(t) {
        function e() {
            e.__super.call(this);
        }
        r(e, "laya.html.dom.HTMLImageElement", t);
        var i = e.prototype;
        return i.reset = function() {
            return t.prototype.reset.call(this), this._tex &amp;&amp; this._tex.off("loaded", this, this.onloaded), 
            this._tex = null, this._url = null, this;
        }, i.onloaded = function() {
            if (this._style) {
                var t = this._style;
                t.widthed(this) ? -1 : this._tex.width, t.heighted(this) ? -1 : this._tex.height;
                t.widthed(this) || this._width == this._tex.width || (this.width = this._tex.width, 
                this.parent &amp;&amp; this.parent._layoutLater()), t.heighted(this) || this._height == this._tex.height || (this.height = this._tex.height, 
                this.parent &amp;&amp; this.parent._layoutLater()), this.repaint();
            }
        }, i._addToLayout = function(t) {
            var e = this._style;
            !e.absolute &amp;&amp; t.push(this);
        }, i.renderSelfToGraphic = function(t, e, i, n) {
            this._tex &amp;&amp; t.drawImage(this._tex, e, i, this.width || this._tex.width, this.height || this._tex.height);
        }, s(0, i, "src", null, function(t) {
            if (t = this.formatURL(t), this._url !== t) {
                this._url = t;
                var e = this._tex = u.getRes(t);
                e || (this._tex = e = new p(), e.load(t), u.cacheRes(t, e)), e.getIsReady() ? this.onloaded() : e.once("ready", this, this.onloaded);
            }
        }), e;
    }(T), function(t) {
        function e() {
            this.contextHeight = NaN, this.contextWidth = NaN, this._htmlBounds = null, this._boundsRec = null, 
            this.repaintHandler = null, e.__super.call(this);
        }
        r(e, "laya.html.dom.HTMLDivParser", t);
        var n = e.prototype;
        return n.reset = function() {
            return t.prototype.reset.call(this), this._style.block = !0, this._style.setLineElement(!0), 
            this._style.width = 200, this._style.height = 200, this.repaintHandler = null, this.contextHeight = 0, 
            this.contextWidth = 0, this;
        }, n.appendHTML = function(t) {
            E.parse(this, t, this.URI), this.layout();
        }, n._addChildsToLayout = function(t) {
            var e = this._getWords();
            if (null == e &amp;&amp; (!this._children || 0 == this._children.length)) return !1;
            e &amp;&amp; e.forEach(function(e) {
                t.push(e);
            });
            for (var i = !0, n = 0, r = this._children.length; r &gt; n; n++) {
                var s = this._children[n];
                i ? i = !1 : t.push(null), s._addToLayout(t);
            }
            return !0;
        }, n._addToLayout = function(t) {
            this.layout(), !this.style.absolute &amp;&amp; t.push(this);
        }, n.getBounds = function() {
            return this._htmlBounds ? (this._boundsRec || (this._boundsRec = d.create()), this._boundsRec.copyFrom(this._htmlBounds)) : null;
        }, n.parentRepaint = function(e) {
            void 0 === e &amp;&amp; (e = !1), t.prototype.parentRepaint.call(this), this.repaintHandler &amp;&amp; this.repaintHandler.runWith(e);
        }, n.layout = function() {
            this.style._type |= 512;
            var t = L.layout(this);
            if (t) {
                this._htmlBounds || (this._htmlBounds = d.create());
                var e = this._htmlBounds;
                e.x = e.y = 0, e.width = this.contextWidth = t[0], e.height = this.contextHeight = t[1];
            }
        }, s(0, n, "height", function() {
            return this._height ? this._height : this.contextHeight;
        }, t.prototype._$set_height), s(0, n, "innerHTML", null, function(t) {
            this.destroyChildren(), this.appendHTML(t);
        }), s(0, n, "width", function() {
            return this._width ? this._width : this.contextWidth;
        }, function(t) {
            var e = !1;
            e = 0 === t ? t != this._width : t != this.width, i.superSet(T, this, "width", t), 
            e &amp;&amp; this.layout();
        }), e;
    }(T)), C = (function(t) {
        function e() {
            e.__super.call(this);
        }
        r(e, "laya.html.dom.HTMLLinkElement", t);
        var i = e.prototype;
        return i._creates = function() {}, i.drawToGraphic = function(t, e, i, n) {}, i.reset = function() {
            return this._loader &amp;&amp; this._loader.off("complete", this, this._onload), this._loader = null, 
            this;
        }, i._onload = function(t) {
            switch (this._loader &amp;&amp; (this._loader = null), this.type) {
              case "text/css":
                v.parseCSS(t, this.URI);
            }
            this.repaint(!0);
        }, s(0, i, "href", t.prototype._$get_href, function(t) {
            if (t) {
                if (t = this.formatURL(t), this.URI = new y(t), this._loader &amp;&amp; this._loader.off("complete", this, this._onload), 
                u.getRes(t)) return void ("text/css" == this.type &amp;&amp; v.parseCSS(u.getRes(t), this.URI));
                this._loader = new u(), this._loader.once("complete", this, this._onload), this._loader.load(t, "text");
            }
        }), e._cuttingStyle = new RegExp("((@keyframes[\\s\\t]+|)(.+))[\\t\\n\\r\\s]*{", "g"), 
        e;
    }(T), function(t) {
        function e() {
            e.__super.call(this);
        }
        r(e, "laya.html.dom.HTMLStyleElement", t);
        var i = e.prototype;
        return i._creates = function() {}, i.drawToGraphic = function(t, e, i, n) {}, i.reset = function() {
            return this;
        }, s(0, i, "innerTEXT", t.prototype._$get_innerTEXT, function(t) {
            v.parseCSS(t, null);
        }), e;
    }(T), function(t) {
        function e() {
            this._element = null, this._recList = [], this._innerHTML = null, this._repaintState = 0, 
            e.__super.call(this), this._element = new H(), this._element.repaintHandler = new o(this, this._htmlDivRepaint), 
            this.mouseEnabled = !0, this.on("click", this, this._onMouseClick);
        }
        r(e, "laya.html.dom.HTMLDivElement", t);
        var i = e.prototype;
        return i.destroy = function(e) {
            void 0 === e &amp;&amp; (e = !0), this._element &amp;&amp; this._element.reset(), this._element = null, 
            this._doClears(), t.prototype.destroy.call(this, e);
        }, i._htmlDivRepaint = function(t) {
            void 0 === t &amp;&amp; (t = !1), t ? this._repaintState &lt; 2 &amp;&amp; (this._repaintState = 2) : this._repaintState &lt; 1 &amp;&amp; (this._repaintState = 1), 
            this._repaintState &gt; 0 &amp;&amp; this._setGraphicDirty();
        }, i._updateGraphicWork = function() {
            switch (this._repaintState) {
              case 1:
                this._updateGraphic();
                break;

              case 2:
                this._refresh();
            }
        }, i._setGraphicDirty = function() {
            this.callLater(this._updateGraphicWork);
        }, i._doClears = function() {
            if (this._recList) {
                var t, e = 0, i = this._recList.length;
                for (e = 0; i &gt; e; e++) t = this._recList[e], t.recover();
                this._recList.length = 0;
            }
        }, i._updateGraphic = function() {
            this._doClears(), this.graphics.clear(!0), this._repaintState = 0, this._element.drawToGraphic(this.graphics, -this._element.x, -this._element.y, this._recList);
            var t = this._element.getBounds();
            t &amp;&amp; this.setSelfBounds(t), this.size(t.width, t.height);
        }, i._refresh = function() {
            this._repaintState = 1, this._innerHTML &amp;&amp; (this._element.innerHTML = this._innerHTML), 
            this._setGraphicDirty();
        }, i._onMouseClick = function() {
            var t, e = this.mouseX, i = this.mouseY, n = 0, r = 0;
            for (r = this._recList.length, n = 0; r &gt; n; n++) t = this._recList[n], t.rec.contains(e, i) &amp;&amp; this._eventLink(t.href);
        }, i._eventLink = function(t) {
            this.event("link", [ t ]);
        }, s(0, i, "style", function() {
            return this._element.style;
        }), s(0, i, "innerHTML", null, function(t) {
            this._innerHTML != t &amp;&amp; (this._repaintState = 1, this._innerHTML = t, this._element.innerHTML = t, 
            this._setGraphicDirty());
        }), s(0, i, "contextWidth", function() {
            return this._element.contextWidth;
        }), s(0, i, "contextHeight", function() {
            return this._element.contextHeight;
        }), e;
    }(_));
    (function(t) {
        function e() {
            e.__super.call(this), this._element._getCSSStyle().valign = "middle";
        }
        r(e, "laya.html.dom.HTMLIframeElement", t);
        var i = e.prototype;
        return s(0, i, "href", null, function(t) {
            var e = this;
            t = this._element.formatURL(t);
            var i = new u();
            i.once("complete", null, function(i) {
                var n = e._element.URI;
                e._element.URI = new y(t), e.innerHTML = i, !n || (e._element.URI = n);
            }), i.load(t, "text");
        }), e;
    })(C);
}(window, document, Laya);</pre></body></html>