wrec 0.20.6 → 0.20.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/wrec.es.js +210 -210
- package/dist/wrec.umd.js +4 -4
- package/package.json +1 -1
package/dist/wrec.es.js
CHANGED
|
@@ -6,9 +6,9 @@ var R = (i, t, e) => (Zt(i, t, "read from private field"), e ? e.call(i) : t.get
|
|
|
6
6
|
const {
|
|
7
7
|
entries: Ke,
|
|
8
8
|
setPrototypeOf: ze,
|
|
9
|
-
isFrozen:
|
|
10
|
-
getPrototypeOf:
|
|
11
|
-
getOwnPropertyDescriptor:
|
|
9
|
+
isFrozen: Nn,
|
|
10
|
+
getPrototypeOf: Dn,
|
|
11
|
+
getOwnPropertyDescriptor: In
|
|
12
12
|
} = Object;
|
|
13
13
|
let {
|
|
14
14
|
freeze: L,
|
|
@@ -34,7 +34,7 @@ fe || (fe = function(t) {
|
|
|
34
34
|
n[s - 1] = arguments[s];
|
|
35
35
|
return new t(...n);
|
|
36
36
|
});
|
|
37
|
-
const
|
|
37
|
+
const Mt = N(Array.prototype.forEach), Pn = N(Array.prototype.lastIndexOf), $e = N(Array.prototype.pop), ft = N(Array.prototype.push), xn = N(Array.prototype.splice), Nt = N(String.prototype.toLowerCase), Jt = N(String.prototype.toString), Qt = N(String.prototype.match), ut = N(String.prototype.replace), vn = N(String.prototype.indexOf), kn = N(String.prototype.trim), P = N(Object.prototype.hasOwnProperty), M = N(RegExp.prototype.test), pt = Fn(TypeError);
|
|
38
38
|
function N(i) {
|
|
39
39
|
return function(t) {
|
|
40
40
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -43,7 +43,7 @@ function N(i) {
|
|
|
43
43
|
return le(i, t, n);
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Fn(i) {
|
|
47
47
|
return function() {
|
|
48
48
|
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
|
|
49
49
|
e[n] = arguments[n];
|
|
@@ -58,13 +58,13 @@ function d(i, t) {
|
|
|
58
58
|
let s = t[n];
|
|
59
59
|
if (typeof s == "string") {
|
|
60
60
|
const r = e(s);
|
|
61
|
-
r !== s && (
|
|
61
|
+
r !== s && (Nn(t) || (t[n] = r), s = r);
|
|
62
62
|
}
|
|
63
63
|
i[s] = !0;
|
|
64
64
|
}
|
|
65
65
|
return i;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Un(i) {
|
|
68
68
|
for (let t = 0; t < i.length; t++)
|
|
69
69
|
P(i, t) || (i[t] = null);
|
|
70
70
|
return i;
|
|
@@ -72,44 +72,44 @@ function Hn(i) {
|
|
|
72
72
|
function k(i) {
|
|
73
73
|
const t = ce(null);
|
|
74
74
|
for (const [e, n] of Ke(i))
|
|
75
|
-
P(i, e) && (Array.isArray(n) ? t[e] =
|
|
75
|
+
P(i, e) && (Array.isArray(n) ? t[e] = Un(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = k(n) : t[e] = n);
|
|
76
76
|
return t;
|
|
77
77
|
}
|
|
78
78
|
function ht(i, t) {
|
|
79
79
|
for (; i !== null; ) {
|
|
80
|
-
const n =
|
|
80
|
+
const n = In(i, t);
|
|
81
81
|
if (n) {
|
|
82
82
|
if (n.get)
|
|
83
83
|
return N(n.get);
|
|
84
84
|
if (typeof n.value == "function")
|
|
85
85
|
return N(n.value);
|
|
86
86
|
}
|
|
87
|
-
i =
|
|
87
|
+
i = Dn(i);
|
|
88
88
|
}
|
|
89
89
|
function e() {
|
|
90
90
|
return null;
|
|
91
91
|
}
|
|
92
92
|
return e;
|
|
93
93
|
}
|
|
94
|
-
const We = L(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), te = L(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ee = L(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]),
|
|
94
|
+
const We = L(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), te = L(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ee = L(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Hn = L(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), ne = L(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), zn = L(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Ge = L(["#text"]), Be = L(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), oe = L(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), je = L(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Lt = L(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), $n = I(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Wn = I(/<%[\w\W]*|[\w\W]*%>/gm), Gn = I(/\$\{[\w\W]*/gm), Bn = I(/^data-[\-\w.\u00B7-\uFFFF]+$/), jn = I(/^aria-[\-\w]+$/), Ze = I(
|
|
95
95
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
96
96
|
// eslint-disable-line no-useless-escape
|
|
97
|
-
),
|
|
97
|
+
), Yn = I(/^(?:\w+script|data):/i), Vn = I(
|
|
98
98
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
99
99
|
// eslint-disable-line no-control-regex
|
|
100
|
-
), Je = I(/^html$/i),
|
|
100
|
+
), Je = I(/^html$/i), Xn = I(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
101
101
|
var Ye = /* @__PURE__ */ Object.freeze({
|
|
102
102
|
__proto__: null,
|
|
103
|
-
ARIA_ATTR:
|
|
104
|
-
ATTR_WHITESPACE:
|
|
105
|
-
CUSTOM_ELEMENT:
|
|
106
|
-
DATA_ATTR:
|
|
103
|
+
ARIA_ATTR: jn,
|
|
104
|
+
ATTR_WHITESPACE: Vn,
|
|
105
|
+
CUSTOM_ELEMENT: Xn,
|
|
106
|
+
DATA_ATTR: Bn,
|
|
107
107
|
DOCTYPE_NAME: Je,
|
|
108
|
-
ERB_EXPR:
|
|
108
|
+
ERB_EXPR: Wn,
|
|
109
109
|
IS_ALLOWED_URI: Ze,
|
|
110
|
-
IS_SCRIPT_OR_DATA:
|
|
111
|
-
MUSTACHE_EXPR:
|
|
112
|
-
TMPLIT_EXPR:
|
|
110
|
+
IS_SCRIPT_OR_DATA: Yn,
|
|
111
|
+
MUSTACHE_EXPR: $n,
|
|
112
|
+
TMPLIT_EXPR: Gn
|
|
113
113
|
});
|
|
114
114
|
const mt = {
|
|
115
115
|
element: 1,
|
|
@@ -118,9 +118,9 @@ const mt = {
|
|
|
118
118
|
progressingInstruction: 7,
|
|
119
119
|
comment: 8,
|
|
120
120
|
document: 9
|
|
121
|
-
},
|
|
121
|
+
}, qn = function() {
|
|
122
122
|
return typeof window > "u" ? null : window;
|
|
123
|
-
},
|
|
123
|
+
}, Kn = function(t, e) {
|
|
124
124
|
if (typeof t != "object" || typeof t.createPolicy != "function")
|
|
125
125
|
return null;
|
|
126
126
|
let n = null;
|
|
@@ -153,7 +153,7 @@ const mt = {
|
|
|
153
153
|
};
|
|
154
154
|
};
|
|
155
155
|
function Qe() {
|
|
156
|
-
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
156
|
+
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : qn();
|
|
157
157
|
const t = (f) => Qe(f);
|
|
158
158
|
if (t.version = "3.3.1", t.removed = [], !i || !i.document || i.document.nodeType !== mt.document || !i.Element)
|
|
159
159
|
return t.isSupported = !1, t;
|
|
@@ -170,39 +170,39 @@ function Qe() {
|
|
|
170
170
|
HTMLFormElement: b,
|
|
171
171
|
DOMParser: G,
|
|
172
172
|
trustedTypes: H
|
|
173
|
-
} = i, B = p.prototype,
|
|
173
|
+
} = i, B = p.prototype, fn = ht(B, "cloneNode"), un = ht(B, "remove"), pn = ht(B, "nextSibling"), hn = ht(B, "childNodes"), _t = ht(B, "parentNode");
|
|
174
174
|
if (typeof c == "function") {
|
|
175
175
|
const f = e.createElement("template");
|
|
176
176
|
f.content && f.content.ownerDocument && (e = f.content.ownerDocument);
|
|
177
177
|
}
|
|
178
178
|
let O, rt = "";
|
|
179
179
|
const {
|
|
180
|
-
implementation:
|
|
181
|
-
createNodeIterator:
|
|
182
|
-
createDocumentFragment:
|
|
183
|
-
getElementsByTagName:
|
|
180
|
+
implementation: vt,
|
|
181
|
+
createNodeIterator: mn,
|
|
182
|
+
createDocumentFragment: dn,
|
|
183
|
+
getElementsByTagName: Tn
|
|
184
184
|
} = e, {
|
|
185
185
|
importNode: gn
|
|
186
186
|
} = n;
|
|
187
187
|
let C = Ve();
|
|
188
|
-
t.isSupported = typeof Ke == "function" && typeof
|
|
188
|
+
t.isSupported = typeof Ke == "function" && typeof _t == "function" && vt && vt.createHTMLDocument !== void 0;
|
|
189
189
|
const {
|
|
190
190
|
MUSTACHE_EXPR: kt,
|
|
191
191
|
ERB_EXPR: Ft,
|
|
192
192
|
TMPLIT_EXPR: Ut,
|
|
193
|
-
DATA_ATTR:
|
|
194
|
-
ARIA_ATTR:
|
|
195
|
-
IS_SCRIPT_OR_DATA:
|
|
193
|
+
DATA_ATTR: En,
|
|
194
|
+
ARIA_ATTR: An,
|
|
195
|
+
IS_SCRIPT_OR_DATA: _n,
|
|
196
196
|
ATTR_WHITESPACE: me,
|
|
197
|
-
CUSTOM_ELEMENT:
|
|
197
|
+
CUSTOM_ELEMENT: bn
|
|
198
198
|
} = Ye;
|
|
199
199
|
let {
|
|
200
200
|
IS_ALLOWED_URI: de
|
|
201
201
|
} = Ye, _ = null;
|
|
202
202
|
const Te = d({}, [...We, ...te, ...ee, ...ne, ...Ge]);
|
|
203
203
|
let S = null;
|
|
204
|
-
const
|
|
205
|
-
let
|
|
204
|
+
const ge = d({}, [...Be, ...oe, ...je, ...Lt]);
|
|
205
|
+
let g = Object.seal(ce(null, {
|
|
206
206
|
tagNameCheck: {
|
|
207
207
|
writable: !0,
|
|
208
208
|
configurable: !1,
|
|
@@ -236,53 +236,53 @@ function Qe() {
|
|
|
236
236
|
value: null
|
|
237
237
|
}
|
|
238
238
|
}));
|
|
239
|
-
let
|
|
240
|
-
const
|
|
241
|
-
let Gt = !0, ct = !1, Q = {},
|
|
239
|
+
let Ee = !0, zt = !0, Ae = !1, _e = !0, Z = !1, bt = !0, V = !1, $t = !1, Wt = !1, J = !1, St = !1, yt = !1, be = !0, Se = !1;
|
|
240
|
+
const Sn = "user-content-";
|
|
241
|
+
let Gt = !0, ct = !1, Q = {}, x = null;
|
|
242
242
|
const Bt = d({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
243
243
|
let ye = null;
|
|
244
244
|
const Re = d({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
245
245
|
let jt = null;
|
|
246
|
-
const we = d({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]),
|
|
246
|
+
const we = d({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Rt = "http://www.w3.org/1998/Math/MathML", wt = "http://www.w3.org/2000/svg", z = "http://www.w3.org/1999/xhtml";
|
|
247
247
|
let tt = z, Yt = !1, Vt = null;
|
|
248
|
-
const
|
|
249
|
-
let
|
|
250
|
-
const
|
|
248
|
+
const yn = d({}, [Rt, wt, z], Jt);
|
|
249
|
+
let Ot = d({}, ["mi", "mo", "mn", "ms", "mtext"]), Ct = d({}, ["annotation-xml"]);
|
|
250
|
+
const Rn = d({}, ["title", "style", "font", "a", "script"]);
|
|
251
251
|
let lt = null;
|
|
252
|
-
const
|
|
252
|
+
const wn = ["application/xhtml+xml", "text/html"], On = "text/html";
|
|
253
253
|
let A = null, et = null;
|
|
254
|
-
const
|
|
254
|
+
const Cn = e.createElement("form"), Oe = function(o) {
|
|
255
255
|
return o instanceof RegExp || o instanceof Function;
|
|
256
256
|
}, Xt = function() {
|
|
257
257
|
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
258
258
|
if (!(et && et === o)) {
|
|
259
259
|
if ((!o || typeof o != "object") && (o = {}), o = k(o), lt = // eslint-disable-next-line unicorn/prefer-includes
|
|
260
|
-
|
|
260
|
+
wn.indexOf(o.PARSER_MEDIA_TYPE) === -1 ? On : o.PARSER_MEDIA_TYPE, A = lt === "application/xhtml+xml" ? Jt : Nt, _ = P(o, "ALLOWED_TAGS") ? d({}, o.ALLOWED_TAGS, A) : Te, S = P(o, "ALLOWED_ATTR") ? d({}, o.ALLOWED_ATTR, A) : ge, Vt = P(o, "ALLOWED_NAMESPACES") ? d({}, o.ALLOWED_NAMESPACES, Jt) : yn, jt = P(o, "ADD_URI_SAFE_ATTR") ? d(k(we), o.ADD_URI_SAFE_ATTR, A) : we, ye = P(o, "ADD_DATA_URI_TAGS") ? d(k(Re), o.ADD_DATA_URI_TAGS, A) : Re, x = P(o, "FORBID_CONTENTS") ? d({}, o.FORBID_CONTENTS, A) : Bt, at = P(o, "FORBID_TAGS") ? d({}, o.FORBID_TAGS, A) : k({}), Ht = P(o, "FORBID_ATTR") ? d({}, o.FORBID_ATTR, A) : k({}), Q = P(o, "USE_PROFILES") ? o.USE_PROFILES : !1, Ee = o.ALLOW_ARIA_ATTR !== !1, zt = o.ALLOW_DATA_ATTR !== !1, Ae = o.ALLOW_UNKNOWN_PROTOCOLS || !1, _e = o.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Z = o.SAFE_FOR_TEMPLATES || !1, bt = o.SAFE_FOR_XML !== !1, V = o.WHOLE_DOCUMENT || !1, J = o.RETURN_DOM || !1, St = o.RETURN_DOM_FRAGMENT || !1, yt = o.RETURN_TRUSTED_TYPE || !1, Wt = o.FORCE_BODY || !1, be = o.SANITIZE_DOM !== !1, Se = o.SANITIZE_NAMED_PROPS || !1, Gt = o.KEEP_CONTENT !== !1, ct = o.IN_PLACE || !1, de = o.ALLOWED_URI_REGEXP || Ze, tt = o.NAMESPACE || z, Ot = o.MATHML_TEXT_INTEGRATION_POINTS || Ot, Ct = o.HTML_INTEGRATION_POINTS || Ct, g = o.CUSTOM_ELEMENT_HANDLING || {}, o.CUSTOM_ELEMENT_HANDLING && Oe(o.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (g.tagNameCheck = o.CUSTOM_ELEMENT_HANDLING.tagNameCheck), o.CUSTOM_ELEMENT_HANDLING && Oe(o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (g.attributeNameCheck = o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), o.CUSTOM_ELEMENT_HANDLING && typeof o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (g.allowCustomizedBuiltInElements = o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Z && (zt = !1), St && (J = !0), Q && (_ = d({}, Ge), S = [], Q.html === !0 && (d(_, We), d(S, Be)), Q.svg === !0 && (d(_, te), d(S, oe), d(S, Lt)), Q.svgFilters === !0 && (d(_, ee), d(S, oe), d(S, Lt)), Q.mathMl === !0 && (d(_, ne), d(S, je), d(S, Lt))), o.ADD_TAGS && (typeof o.ADD_TAGS == "function" ? K.tagCheck = o.ADD_TAGS : (_ === Te && (_ = k(_)), d(_, o.ADD_TAGS, A))), o.ADD_ATTR && (typeof o.ADD_ATTR == "function" ? K.attributeCheck = o.ADD_ATTR : (S === ge && (S = k(S)), d(S, o.ADD_ATTR, A))), o.ADD_URI_SAFE_ATTR && d(jt, o.ADD_URI_SAFE_ATTR, A), o.FORBID_CONTENTS && (x === Bt && (x = k(x)), d(x, o.FORBID_CONTENTS, A)), o.ADD_FORBID_CONTENTS && (x === Bt && (x = k(x)), d(x, o.ADD_FORBID_CONTENTS, A)), Gt && (_["#text"] = !0), V && d(_, ["html", "head", "body"]), _.table && (d(_, ["tbody"]), delete at.tbody), o.TRUSTED_TYPES_POLICY) {
|
|
261
261
|
if (typeof o.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
262
262
|
throw pt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
263
263
|
if (typeof o.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
264
264
|
throw pt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
265
265
|
O = o.TRUSTED_TYPES_POLICY, rt = O.createHTML("");
|
|
266
266
|
} else
|
|
267
|
-
O === void 0 && (O =
|
|
267
|
+
O === void 0 && (O = Kn(H, s)), O !== null && typeof rt == "string" && (rt = O.createHTML(""));
|
|
268
268
|
L && L(o), et = o;
|
|
269
269
|
}
|
|
270
|
-
}, Ce = d({}, [...te, ...ee, ...
|
|
271
|
-
let a =
|
|
270
|
+
}, Ce = d({}, [...te, ...ee, ...Hn]), Me = d({}, [...ne, ...zn]), Mn = function(o) {
|
|
271
|
+
let a = _t(o);
|
|
272
272
|
(!a || !a.tagName) && (a = {
|
|
273
273
|
namespaceURI: tt,
|
|
274
274
|
tagName: "template"
|
|
275
275
|
});
|
|
276
276
|
const l = Nt(o.tagName), T = Nt(a.tagName);
|
|
277
|
-
return Vt[o.namespaceURI] ? o.namespaceURI ===
|
|
278
|
-
},
|
|
277
|
+
return Vt[o.namespaceURI] ? o.namespaceURI === wt ? a.namespaceURI === z ? l === "svg" : a.namespaceURI === Rt ? l === "svg" && (T === "annotation-xml" || Ot[T]) : !!Ce[l] : o.namespaceURI === Rt ? a.namespaceURI === z ? l === "math" : a.namespaceURI === wt ? l === "math" && Ct[T] : !!Me[l] : o.namespaceURI === z ? a.namespaceURI === wt && !Ct[T] || a.namespaceURI === Rt && !Ot[T] ? !1 : !Me[l] && (Rn[l] || !Ce[l]) : !!(lt === "application/xhtml+xml" && Vt[o.namespaceURI]) : !1;
|
|
278
|
+
}, v = function(o) {
|
|
279
279
|
ft(t.removed, {
|
|
280
280
|
element: o
|
|
281
281
|
});
|
|
282
282
|
try {
|
|
283
|
-
|
|
283
|
+
_t(o).removeChild(o);
|
|
284
284
|
} catch {
|
|
285
|
-
|
|
285
|
+
un(o);
|
|
286
286
|
}
|
|
287
287
|
}, X = function(o, a) {
|
|
288
288
|
try {
|
|
@@ -297,9 +297,9 @@ function Qe() {
|
|
|
297
297
|
});
|
|
298
298
|
}
|
|
299
299
|
if (a.removeAttribute(o), o === "is")
|
|
300
|
-
if (J ||
|
|
300
|
+
if (J || St)
|
|
301
301
|
try {
|
|
302
|
-
|
|
302
|
+
v(a);
|
|
303
303
|
} catch {
|
|
304
304
|
}
|
|
305
305
|
else
|
|
@@ -312,8 +312,8 @@ function Qe() {
|
|
|
312
312
|
if (Wt)
|
|
313
313
|
o = "<remove></remove>" + o;
|
|
314
314
|
else {
|
|
315
|
-
const
|
|
316
|
-
l =
|
|
315
|
+
const E = Qt(o, /^[\r\n\t ]+/);
|
|
316
|
+
l = E && E[0];
|
|
317
317
|
}
|
|
318
318
|
lt === "application/xhtml+xml" && tt === z && (o = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + o + "</body></html>");
|
|
319
319
|
const T = O ? O.createHTML(o) : o;
|
|
@@ -323,16 +323,16 @@ function Qe() {
|
|
|
323
323
|
} catch {
|
|
324
324
|
}
|
|
325
325
|
if (!a || !a.documentElement) {
|
|
326
|
-
a =
|
|
326
|
+
a = vt.createDocument(tt, "template", null);
|
|
327
327
|
try {
|
|
328
328
|
a.documentElement.innerHTML = Yt ? rt : T;
|
|
329
329
|
} catch {
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
const w = a.body || a.documentElement;
|
|
333
|
-
return o && l && w.insertBefore(e.createTextNode(l), w.childNodes[0] || null), tt === z ?
|
|
333
|
+
return o && l && w.insertBefore(e.createTextNode(l), w.childNodes[0] || null), tt === z ? Tn.call(a, V ? "html" : "body")[0] : V ? a.documentElement : w;
|
|
334
334
|
}, Ne = function(o) {
|
|
335
|
-
return
|
|
335
|
+
return mn.call(
|
|
336
336
|
o.ownerDocument || o,
|
|
337
337
|
o,
|
|
338
338
|
// eslint-disable-next-line no-bitwise
|
|
@@ -345,59 +345,59 @@ function Qe() {
|
|
|
345
345
|
return typeof u == "function" && o instanceof u;
|
|
346
346
|
};
|
|
347
347
|
function $(f, o, a) {
|
|
348
|
-
|
|
348
|
+
Mt(f, (l) => {
|
|
349
349
|
l.call(t, o, a, et);
|
|
350
350
|
});
|
|
351
351
|
}
|
|
352
352
|
const Ie = function(o) {
|
|
353
353
|
let a = null;
|
|
354
354
|
if ($(C.beforeSanitizeElements, o, null), qt(o))
|
|
355
|
-
return
|
|
355
|
+
return v(o), !0;
|
|
356
356
|
const l = A(o.nodeName);
|
|
357
357
|
if ($(C.uponSanitizeElement, o, {
|
|
358
358
|
tagName: l,
|
|
359
359
|
allowedTags: _
|
|
360
|
-
}),
|
|
361
|
-
return
|
|
360
|
+
}), bt && o.hasChildNodes() && !De(o.firstElementChild) && M(/<[/\w!]/g, o.innerHTML) && M(/<[/\w!]/g, o.textContent) || o.nodeType === mt.progressingInstruction || bt && o.nodeType === mt.comment && M(/<[/\w]/g, o.data))
|
|
361
|
+
return v(o), !0;
|
|
362
362
|
if (!(K.tagCheck instanceof Function && K.tagCheck(l)) && (!_[l] || at[l])) {
|
|
363
|
-
if (!at[l] &&
|
|
363
|
+
if (!at[l] && xe(l) && (g.tagNameCheck instanceof RegExp && M(g.tagNameCheck, l) || g.tagNameCheck instanceof Function && g.tagNameCheck(l)))
|
|
364
364
|
return !1;
|
|
365
|
-
if (Gt && !
|
|
366
|
-
const T =
|
|
365
|
+
if (Gt && !x[l]) {
|
|
366
|
+
const T = _t(o) || o.parentNode, w = hn(o) || o.childNodes;
|
|
367
367
|
if (w && T) {
|
|
368
|
-
const
|
|
369
|
-
for (let D =
|
|
370
|
-
const W =
|
|
371
|
-
W.__removalCount = (o.__removalCount || 0) + 1, T.insertBefore(W,
|
|
368
|
+
const E = w.length;
|
|
369
|
+
for (let D = E - 1; D >= 0; --D) {
|
|
370
|
+
const W = fn(w[D], !0);
|
|
371
|
+
W.__removalCount = (o.__removalCount || 0) + 1, T.insertBefore(W, pn(o));
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
return
|
|
375
|
+
return v(o), !0;
|
|
376
376
|
}
|
|
377
|
-
return o instanceof p && !
|
|
377
|
+
return o instanceof p && !Mn(o) || (l === "noscript" || l === "noembed" || l === "noframes") && M(/<\/no(script|embed|frames)/i, o.innerHTML) ? (v(o), !0) : (Z && o.nodeType === mt.text && (a = o.textContent, Mt([kt, Ft, Ut], (T) => {
|
|
378
378
|
a = ut(a, T, " ");
|
|
379
379
|
}), o.textContent !== a && (ft(t.removed, {
|
|
380
380
|
element: o.cloneNode()
|
|
381
381
|
}), o.textContent = a)), $(C.afterSanitizeElements, o, null), !1);
|
|
382
382
|
}, Pe = function(o, a, l) {
|
|
383
|
-
if (be && (a === "id" || a === "name") && (l in e || l in
|
|
383
|
+
if (be && (a === "id" || a === "name") && (l in e || l in Cn))
|
|
384
384
|
return !1;
|
|
385
|
-
if (!(zt && !Ht[a] && M(
|
|
386
|
-
if (!(
|
|
385
|
+
if (!(zt && !Ht[a] && M(En, a))) {
|
|
386
|
+
if (!(Ee && M(An, a))) {
|
|
387
387
|
if (!(K.attributeCheck instanceof Function && K.attributeCheck(a, o))) {
|
|
388
388
|
if (!S[a] || Ht[a]) {
|
|
389
389
|
if (
|
|
390
390
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
391
391
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
392
392
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
393
|
-
!(
|
|
393
|
+
!(xe(o) && (g.tagNameCheck instanceof RegExp && M(g.tagNameCheck, o) || g.tagNameCheck instanceof Function && g.tagNameCheck(o)) && (g.attributeNameCheck instanceof RegExp && M(g.attributeNameCheck, a) || g.attributeNameCheck instanceof Function && g.attributeNameCheck(a, o)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
394
394
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
395
|
-
a === "is" &&
|
|
395
|
+
a === "is" && g.allowCustomizedBuiltInElements && (g.tagNameCheck instanceof RegExp && M(g.tagNameCheck, l) || g.tagNameCheck instanceof Function && g.tagNameCheck(l)))
|
|
396
396
|
) return !1;
|
|
397
397
|
} else if (!jt[a]) {
|
|
398
398
|
if (!M(de, ut(l, me, ""))) {
|
|
399
|
-
if (!((a === "src" || a === "xlink:href" || a === "href") && o !== "script" &&
|
|
400
|
-
if (!(Ae && !M(
|
|
399
|
+
if (!((a === "src" || a === "xlink:href" || a === "href") && o !== "script" && vn(l, "data:") === 0 && ye[o])) {
|
|
400
|
+
if (!(Ae && !M(_n, ut(l, me, "")))) {
|
|
401
401
|
if (l)
|
|
402
402
|
return !1;
|
|
403
403
|
}
|
|
@@ -408,9 +408,9 @@ function Qe() {
|
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
return !0;
|
|
411
|
-
}, ve = function(o) {
|
|
412
|
-
return o !== "annotation-xml" && Qt(o, Sn);
|
|
413
411
|
}, xe = function(o) {
|
|
412
|
+
return o !== "annotation-xml" && Qt(o, bn);
|
|
413
|
+
}, ve = function(o) {
|
|
414
414
|
$(C.beforeSanitizeAttributes, o, null);
|
|
415
415
|
const {
|
|
416
416
|
attributes: a
|
|
@@ -427,35 +427,35 @@ function Qe() {
|
|
|
427
427
|
let T = a.length;
|
|
428
428
|
for (; T--; ) {
|
|
429
429
|
const w = a[T], {
|
|
430
|
-
name:
|
|
430
|
+
name: E,
|
|
431
431
|
namespaceURI: D,
|
|
432
432
|
value: W
|
|
433
|
-
} = w, nt = A(
|
|
434
|
-
let y =
|
|
435
|
-
if (l.attrName = nt, l.attrValue = y, l.keepAttr = !0, l.forceKeepAttr = void 0, $(C.uponSanitizeAttribute, o, l), y = l.attrValue, Se && (nt === "id" || nt === "name") && (X(
|
|
436
|
-
X(
|
|
433
|
+
} = w, nt = A(E), Kt = W;
|
|
434
|
+
let y = E === "value" ? Kt : kn(Kt);
|
|
435
|
+
if (l.attrName = nt, l.attrValue = y, l.keepAttr = !0, l.forceKeepAttr = void 0, $(C.uponSanitizeAttribute, o, l), y = l.attrValue, Se && (nt === "id" || nt === "name") && (X(E, o), y = Sn + y), bt && M(/((--!?|])>)|<\/(style|title|textarea)/i, y)) {
|
|
436
|
+
X(E, o);
|
|
437
437
|
continue;
|
|
438
438
|
}
|
|
439
439
|
if (nt === "attributename" && Qt(y, "href")) {
|
|
440
|
-
X(
|
|
440
|
+
X(E, o);
|
|
441
441
|
continue;
|
|
442
442
|
}
|
|
443
443
|
if (l.forceKeepAttr)
|
|
444
444
|
continue;
|
|
445
445
|
if (!l.keepAttr) {
|
|
446
|
-
X(
|
|
446
|
+
X(E, o);
|
|
447
447
|
continue;
|
|
448
448
|
}
|
|
449
449
|
if (!_e && M(/\/>/i, y)) {
|
|
450
|
-
X(
|
|
450
|
+
X(E, o);
|
|
451
451
|
continue;
|
|
452
452
|
}
|
|
453
|
-
Z &&
|
|
453
|
+
Z && Mt([kt, Ft, Ut], (Fe) => {
|
|
454
454
|
y = ut(y, Fe, " ");
|
|
455
455
|
});
|
|
456
456
|
const ke = A(o.nodeName);
|
|
457
457
|
if (!Pe(ke, nt, y)) {
|
|
458
|
-
X(
|
|
458
|
+
X(E, o);
|
|
459
459
|
continue;
|
|
460
460
|
}
|
|
461
461
|
if (O && typeof H == "object" && typeof H.getAttributeType == "function" && !D)
|
|
@@ -471,17 +471,17 @@ function Qe() {
|
|
|
471
471
|
}
|
|
472
472
|
if (y !== Kt)
|
|
473
473
|
try {
|
|
474
|
-
D ? o.setAttributeNS(D,
|
|
474
|
+
D ? o.setAttributeNS(D, E, y) : o.setAttribute(E, y), qt(o) ? v(o) : $e(t.removed);
|
|
475
475
|
} catch {
|
|
476
|
-
X(
|
|
476
|
+
X(E, o);
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
479
|
$(C.afterSanitizeAttributes, o, null);
|
|
480
|
-
},
|
|
480
|
+
}, Ln = function f(o) {
|
|
481
481
|
let a = null;
|
|
482
482
|
const l = Ne(o);
|
|
483
483
|
for ($(C.beforeSanitizeShadowDOM, o, null); a = l.nextNode(); )
|
|
484
|
-
$(C.uponSanitizeShadowNode, a, null), Ie(a),
|
|
484
|
+
$(C.uponSanitizeShadowNode, a, null), Ie(a), ve(a), a.content instanceof r && f(a.content);
|
|
485
485
|
$(C.afterSanitizeShadowDOM, o, null);
|
|
486
486
|
};
|
|
487
487
|
return t.sanitize = function(f) {
|
|
@@ -505,19 +505,19 @@ function Qe() {
|
|
|
505
505
|
else {
|
|
506
506
|
if (!J && !Z && !V && // eslint-disable-next-line unicorn/prefer-includes
|
|
507
507
|
f.indexOf("<") === -1)
|
|
508
|
-
return O &&
|
|
508
|
+
return O && yt ? O.createHTML(f) : f;
|
|
509
509
|
if (a = Le(f), !a)
|
|
510
|
-
return J ? null :
|
|
510
|
+
return J ? null : yt ? rt : "";
|
|
511
511
|
}
|
|
512
|
-
a && Wt &&
|
|
513
|
-
const
|
|
514
|
-
for (; T =
|
|
515
|
-
Ie(T),
|
|
512
|
+
a && Wt && v(a.firstChild);
|
|
513
|
+
const E = Ne(ct ? f : a);
|
|
514
|
+
for (; T = E.nextNode(); )
|
|
515
|
+
Ie(T), ve(T), T.content instanceof r && Ln(T.content);
|
|
516
516
|
if (ct)
|
|
517
517
|
return f;
|
|
518
518
|
if (J) {
|
|
519
|
-
if (
|
|
520
|
-
for (w =
|
|
519
|
+
if (St)
|
|
520
|
+
for (w = dn.call(a.ownerDocument); a.firstChild; )
|
|
521
521
|
w.appendChild(a.firstChild);
|
|
522
522
|
else
|
|
523
523
|
w = a;
|
|
@@ -525,9 +525,9 @@ function Qe() {
|
|
|
525
525
|
}
|
|
526
526
|
let D = V ? a.outerHTML : a.innerHTML;
|
|
527
527
|
return V && _["!doctype"] && a.ownerDocument && a.ownerDocument.doctype && a.ownerDocument.doctype.name && M(Je, a.ownerDocument.doctype.name) && (D = "<!DOCTYPE " + a.ownerDocument.doctype.name + `>
|
|
528
|
-
` + D), Z &&
|
|
528
|
+
` + D), Z && Mt([kt, Ft, Ut], (W) => {
|
|
529
529
|
D = ut(D, W, " ");
|
|
530
|
-
}), O &&
|
|
530
|
+
}), O && yt ? O.createHTML(D) : D;
|
|
531
531
|
}, t.setConfig = function() {
|
|
532
532
|
let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
533
533
|
Xt(f), $t = !0;
|
|
@@ -541,7 +541,7 @@ function Qe() {
|
|
|
541
541
|
typeof o == "function" && ft(C[f], o);
|
|
542
542
|
}, t.removeHook = function(f, o) {
|
|
543
543
|
if (o !== void 0) {
|
|
544
|
-
const a =
|
|
544
|
+
const a = Pn(C[f], o);
|
|
545
545
|
return a === -1 ? void 0 : xn(C[f], a, 1)[0];
|
|
546
546
|
}
|
|
547
547
|
return $e(C[f]);
|
|
@@ -588,21 +588,21 @@ function nn(i) {
|
|
|
588
588
|
const Dt = typeof window < "u" && typeof window.document < "u";
|
|
589
589
|
let Xe = class extends Error {
|
|
590
590
|
};
|
|
591
|
-
var q, Pt, F, Et,
|
|
591
|
+
var q, Pt, F, Et, At, Y, xt, on;
|
|
592
592
|
const it = class it {
|
|
593
593
|
constructor(t, e, n) {
|
|
594
|
-
j(this,
|
|
594
|
+
j(this, xt);
|
|
595
595
|
j(this, Pt, /* @__PURE__ */ Symbol("objectId"));
|
|
596
596
|
// This cannot be replaced by a WeakMap<ChangeListener, Set<string>>
|
|
597
597
|
// because there is no way to iterate over the keys of a WeakMap.
|
|
598
598
|
j(this, F, []);
|
|
599
599
|
j(this, Et);
|
|
600
|
-
j(this,
|
|
600
|
+
j(this, At);
|
|
601
601
|
j(this, Y);
|
|
602
602
|
if (!t) throw new Xe("name cannot be empty");
|
|
603
603
|
if (R(it, q).has(t))
|
|
604
604
|
throw new Xe(`WrecState with name "${t}" already exists`);
|
|
605
|
-
if (ot(this, Et, t), ot(this,
|
|
605
|
+
if (ot(this, Et, t), ot(this, At, e), ot(this, Y, en({}, He(this, xt, on).bind(this))), e && Dt) {
|
|
606
606
|
const s = sessionStorage.getItem("wrec-state-" + t), r = s ? JSON.parse(s) : void 0;
|
|
607
607
|
r && (n = r);
|
|
608
608
|
}
|
|
@@ -667,7 +667,7 @@ const it = class it {
|
|
|
667
667
|
ot(this, F, R(this, F).filter((e) => e.listenerRef.deref() !== t));
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
|
-
q = new WeakMap(), Pt = new WeakMap(), F = new WeakMap(), Et = new WeakMap(),
|
|
670
|
+
q = new WeakMap(), Pt = new WeakMap(), F = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), Y = new WeakMap(), xt = new WeakSet(), on = function(t, e, n) {
|
|
671
671
|
const s = /* @__PURE__ */ new Set();
|
|
672
672
|
for (const r of R(this, F)) {
|
|
673
673
|
const c = r.listenerRef.deref();
|
|
@@ -691,7 +691,7 @@ q = new WeakMap(), Pt = new WeakMap(), F = new WeakMap(), Et = new WeakMap(), gt
|
|
|
691
691
|
));
|
|
692
692
|
}, j(it, q, /* @__PURE__ */ new Map()), Dt && window.addEventListener("beforeunload", () => {
|
|
693
693
|
for (const [t, e] of R(it, q).entries())
|
|
694
|
-
if (R(e,
|
|
694
|
+
if (R(e, At)) {
|
|
695
695
|
const n = nn(e);
|
|
696
696
|
sessionStorage.setItem("wrec-state-" + t, JSON.stringify(n));
|
|
697
697
|
}
|
|
@@ -704,20 +704,21 @@ function qe(i, t) {
|
|
|
704
704
|
e = e[n];
|
|
705
705
|
return e;
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function Zn(i, t, e) {
|
|
708
708
|
const n = t.split("."), s = n.length - 1;
|
|
709
709
|
let r = i;
|
|
710
710
|
n.forEach((c, u) => {
|
|
711
711
|
u === s ? r[c] = e : r = r[c];
|
|
712
712
|
});
|
|
713
713
|
}
|
|
714
|
-
const
|
|
714
|
+
const Jn = /* @__PURE__ */ new Set([
|
|
715
715
|
"class",
|
|
716
|
+
"disabled",
|
|
716
717
|
"hidden",
|
|
717
718
|
"id",
|
|
718
|
-
"
|
|
719
|
+
"tabindex",
|
|
719
720
|
"title"
|
|
720
|
-
]),
|
|
721
|
+
]), Qn = /* @__PURE__ */ new Set([
|
|
721
722
|
"onblur",
|
|
722
723
|
"onchange",
|
|
723
724
|
"onclick",
|
|
@@ -729,22 +730,22 @@ const Qn = /* @__PURE__ */ new Set([
|
|
|
729
730
|
]);
|
|
730
731
|
tn.addHook("uponSanitizeAttribute", (i, t) => {
|
|
731
732
|
const { attrName: e } = t, n = e.toLowerCase();
|
|
732
|
-
|
|
733
|
+
Qn.has(n) && (t.forceKeepAttr = !0);
|
|
733
734
|
});
|
|
734
735
|
class st extends Error {
|
|
735
736
|
}
|
|
736
|
-
const
|
|
737
|
-
function
|
|
737
|
+
const to = /([a-zA-Z-]+)\s*:\s*([^;}]+)/g, sn = "a-zA-Z_$", eo = sn + "0-9", gt = `[${sn}][${eo}]*`, no = /<!--\s*(.*?)\s*-->/, oo = /<(\w+)(?:\s[^>]*)?>((?:[^<]|<(?!\w))*?)<\/\1>/g, se = new RegExp(`^this\\.${gt}$`), ie = new RegExp(`this\\.${gt}(\\.${gt})*`, "g"), rn = new RegExp(`this\\.${gt}(\\.${gt})*`), so = 5;
|
|
738
|
+
function io(i) {
|
|
738
739
|
return i instanceof HTMLButtonElement || i instanceof HTMLFieldSetElement || i instanceof HTMLInputElement || i instanceof HTMLSelectElement || i instanceof HTMLTextAreaElement || i instanceof U;
|
|
739
740
|
}
|
|
740
|
-
function
|
|
741
|
+
function po(i, t, e) {
|
|
741
742
|
const n = document.createElement(i);
|
|
742
743
|
if (t)
|
|
743
744
|
for (const [s, r] of Object.entries(t))
|
|
744
745
|
n.setAttribute(s, r);
|
|
745
746
|
return e && (n.innerHTML = e), n;
|
|
746
747
|
}
|
|
747
|
-
const
|
|
748
|
+
const ro = (i) => i === String ? "" : i === Number ? 0 : i === Boolean ? !1 : i === Array ? [] : i === Object ? {} : void 0;
|
|
748
749
|
function It(i) {
|
|
749
750
|
const t = [];
|
|
750
751
|
let e = i.firstElementChild;
|
|
@@ -752,8 +753,8 @@ function It(i) {
|
|
|
752
753
|
t.push(e), e.shadowRoot && t.push(...It(e.shadowRoot)), e.firstElementChild && t.push(...It(e)), e = e.nextElementSibling;
|
|
753
754
|
return t;
|
|
754
755
|
}
|
|
755
|
-
const
|
|
756
|
-
function
|
|
756
|
+
const dt = (i) => i.substring(so).split(".")[0];
|
|
757
|
+
function an(i, t) {
|
|
757
758
|
let e = i[0];
|
|
758
759
|
return t.forEach((n, s) => {
|
|
759
760
|
e += n + i[s + 1];
|
|
@@ -763,18 +764,18 @@ function pe(i) {
|
|
|
763
764
|
const t = typeof i;
|
|
764
765
|
return t === "string" || t === "number" || t === "boolean";
|
|
765
766
|
}
|
|
766
|
-
function
|
|
767
|
+
function Tt(i) {
|
|
767
768
|
return i.localName === "textarea";
|
|
768
769
|
}
|
|
769
770
|
function he(i) {
|
|
770
771
|
const { localName: t } = i;
|
|
771
772
|
return t === "input" || t === "select";
|
|
772
773
|
}
|
|
773
|
-
const
|
|
774
|
-
function
|
|
774
|
+
const ao = (i) => i.replace(/<!--[\s\S]*?-->/g, "");
|
|
775
|
+
function cn(i, t, e, n) {
|
|
775
776
|
return i.slice(0, t) + n + i.slice(t + e);
|
|
776
777
|
}
|
|
777
|
-
function
|
|
778
|
+
function co(i) {
|
|
778
779
|
let t = i.trim(), e = null;
|
|
779
780
|
/^\s*<tr[\s>]/i.test(t) ? (t = `<table><tbody>${t}</tbody></table>`, e = "tbody") : /^\s*<(td|th)[\s>]/i.test(t) ? (t = `<table><tbody><tr>${t}</tr></tbody></table>`, e = "tr") : /^\s*<option[\s>]/i.test(t) ? (t = `<select>${t}</select>`, e = "select") : /^\s*<col[\s>]/i.test(t) && (t = `<table><colgroup>${t}</colgroup></table>`, e = "colgroup");
|
|
780
781
|
const n = tn.sanitize(t, {
|
|
@@ -793,7 +794,7 @@ function re(i) {
|
|
|
793
794
|
if (isNaN(t)) throw new st(`can't convert "${i}" to a number`);
|
|
794
795
|
return t;
|
|
795
796
|
}
|
|
796
|
-
function
|
|
797
|
+
function ln(i, t, e) {
|
|
797
798
|
const [n, s] = t.split(":");
|
|
798
799
|
if (pe(e))
|
|
799
800
|
if (typeof e == "boolean") {
|
|
@@ -811,9 +812,9 @@ function fn(i, t, e) {
|
|
|
811
812
|
}
|
|
812
813
|
function ae(i, t, e) {
|
|
813
814
|
const [n, s] = t.split(":");
|
|
814
|
-
i instanceof CSSStyleRule ? i.style.setProperty(n, e) : (
|
|
815
|
+
i instanceof CSSStyleRule ? i.style.setProperty(n, e) : (ln(i, n, e), n === "value" && he(i) && (i.value = e));
|
|
815
816
|
}
|
|
816
|
-
async function
|
|
817
|
+
async function lo(i) {
|
|
817
818
|
const t = /* @__PURE__ */ new Set();
|
|
818
819
|
for (const n of It(i.content)) {
|
|
819
820
|
const { localName: s } = n;
|
|
@@ -903,16 +904,16 @@ class U extends HTMLElement {
|
|
|
903
904
|
t.attrToPropMap || (t.attrToPropMap = /* @__PURE__ */ new Map()), t.properties || (t.properties = {}), t.propToAttrMap || (t.propToExprsMap = /* @__PURE__ */ new Map()), t.propToComputedMap || (t.propToComputedMap = /* @__PURE__ */ new Map()), t.propToExprsMap || (t.propToExprsMap = /* @__PURE__ */ new Map());
|
|
904
905
|
}
|
|
905
906
|
attributeChangedCallback(t, e, n) {
|
|
906
|
-
t === "disabled" && this.#
|
|
907
|
+
t === "disabled" && this.#m();
|
|
907
908
|
const s = U.getPropName(t);
|
|
908
909
|
if (this.#i(s)) {
|
|
909
|
-
const r = this.#
|
|
910
|
+
const r = this.#_(s, String(n));
|
|
910
911
|
this[s] = r;
|
|
911
912
|
const c = this.#c[s];
|
|
912
913
|
c && this.setFormValue(c, String(r)), this.propertyChangedCallback(s, e, n);
|
|
913
914
|
}
|
|
914
915
|
}
|
|
915
|
-
async #
|
|
916
|
+
async #y() {
|
|
916
917
|
const t = this.#t;
|
|
917
918
|
let { template: e } = t;
|
|
918
919
|
if (!e) {
|
|
@@ -925,32 +926,34 @@ class U extends HTMLElement {
|
|
|
925
926
|
if (!s) throw new st("static property html must be set");
|
|
926
927
|
s.startsWith("<") || (s = `<span><!--${s}--></span>`), e.innerHTML = n + s;
|
|
927
928
|
}
|
|
928
|
-
await
|
|
929
|
+
await lo(e), this.shadowRoot.replaceChildren(e.content.cloneNode(!0));
|
|
929
930
|
}
|
|
930
931
|
changed(t, e, n) {
|
|
931
932
|
this[e] = n;
|
|
932
933
|
}
|
|
933
934
|
connectedCallback() {
|
|
934
|
-
this.#P(), this.#
|
|
935
|
-
this.hasAttribute("disabled") && this.#
|
|
935
|
+
this.#P(), this.#w(), this.#y().then(() => {
|
|
936
|
+
this.hasAttribute("disabled") && this.#m(), this.#S(this.shadowRoot), this.#d(this.shadowRoot), this.#R();
|
|
936
937
|
});
|
|
937
938
|
}
|
|
938
|
-
#
|
|
939
|
+
#R() {
|
|
939
940
|
const t = this.#t, { properties: e } = t;
|
|
940
941
|
for (const [n, { computed: s }] of Object.entries(e))
|
|
941
942
|
s && (this[n] = this.#o(s));
|
|
942
943
|
}
|
|
943
|
-
#
|
|
944
|
+
#w() {
|
|
944
945
|
const t = this.#t, { observedAttributes: e, properties: n } = t;
|
|
945
946
|
for (const [s, r] of Object.entries(n))
|
|
946
|
-
this.#
|
|
947
|
+
r.computed || this.#h(s, r, e);
|
|
948
|
+
for (const [s, r] of Object.entries(n))
|
|
949
|
+
r.computed && this.#h(s, r, e);
|
|
947
950
|
}
|
|
948
|
-
#
|
|
951
|
+
#h(t, e, n) {
|
|
949
952
|
const s = U.getAttrName(t), r = this.hasAttribute(s);
|
|
950
953
|
e.required && !r && this.#e(this, t, "is a required attribute");
|
|
951
954
|
let c = e.value;
|
|
952
955
|
this.hasOwnProperty(t) && (c = this[t], delete this[t]);
|
|
953
|
-
const { type: u } = e, p = u === Boolean ? c || r : n.includes(s) && r ? this.#
|
|
956
|
+
const { type: u } = e, p = u === Boolean ? c || r : n.includes(s) && r ? this.#A(t, s) : c || ro(u), h = "#" + t;
|
|
954
957
|
this[h] = p, e.computed && this.#L(t, e), Object.defineProperty(this, t, {
|
|
955
958
|
enumerable: !0,
|
|
956
959
|
get() {
|
|
@@ -960,9 +963,9 @@ class U extends HTMLElement {
|
|
|
960
963
|
u === Number && typeof m == "string" && (m = re(m));
|
|
961
964
|
const b = this[h];
|
|
962
965
|
if (m === b) return;
|
|
963
|
-
this.#
|
|
966
|
+
this.#v(t, u, m), this[h] = m;
|
|
964
967
|
const { state: G, stateProp: H } = this.#t.properties[t];
|
|
965
|
-
H &&
|
|
968
|
+
H && Zn(G, H, m), this.#D(t), this.#N(t, u, m, s), this.#E(t), this.#I(t, m);
|
|
966
969
|
const B = this.#c[t];
|
|
967
970
|
B && this.setFormValue(B, String(m)), this.propertyChangedCallback(t, b, m), e.dispatch && this.dispatch("change", {
|
|
968
971
|
tagName: this.localName,
|
|
@@ -973,10 +976,10 @@ class U extends HTMLElement {
|
|
|
973
976
|
}
|
|
974
977
|
});
|
|
975
978
|
}
|
|
976
|
-
#
|
|
979
|
+
#m() {
|
|
977
980
|
const t = this.hasAttribute("disabled"), e = It(this.shadowRoot);
|
|
978
981
|
for (const n of e)
|
|
979
|
-
|
|
982
|
+
io(n) && (n.disabled = t);
|
|
980
983
|
}
|
|
981
984
|
disconnectedCallback() {
|
|
982
985
|
this.#n.clear(), this.#l.clear(), this.#u.clear();
|
|
@@ -998,7 +1001,7 @@ class U extends HTMLElement {
|
|
|
998
1001
|
#O(t) {
|
|
999
1002
|
const e = t instanceof U;
|
|
1000
1003
|
for (const n of t.getAttributeNames()) {
|
|
1001
|
-
const s = t.getAttribute(n), r = this.#
|
|
1004
|
+
const s = t.getAttribute(n), r = this.#g(t, s);
|
|
1002
1005
|
if (r) {
|
|
1003
1006
|
const c = this[r];
|
|
1004
1007
|
c === void 0 && this.#a(t, n, r), t[r] = c;
|
|
@@ -1012,8 +1015,7 @@ class U extends HTMLElement {
|
|
|
1012
1015
|
}
|
|
1013
1016
|
}
|
|
1014
1017
|
#o(t) {
|
|
1015
|
-
|
|
1016
|
-
return Array.isArray(e) ? e.join("") : e;
|
|
1018
|
+
return new Function("return " + t).call(this);
|
|
1017
1019
|
}
|
|
1018
1020
|
#C(t) {
|
|
1019
1021
|
const { localName: e } = t;
|
|
@@ -1030,9 +1032,9 @@ class U extends HTMLElement {
|
|
|
1030
1032
|
}
|
|
1031
1033
|
} else {
|
|
1032
1034
|
let n = "";
|
|
1033
|
-
if (
|
|
1035
|
+
if (Tt(t)) {
|
|
1034
1036
|
this.#r(t.textContent, t);
|
|
1035
|
-
const s = t.textContent?.match(
|
|
1037
|
+
const s = t.textContent?.match(no);
|
|
1036
1038
|
s && (n = s[1]);
|
|
1037
1039
|
} else {
|
|
1038
1040
|
const s = Array.from(t.childNodes).find(
|
|
@@ -1041,8 +1043,8 @@ class U extends HTMLElement {
|
|
|
1041
1043
|
s && (n = s.textContent?.trim() ?? "");
|
|
1042
1044
|
}
|
|
1043
1045
|
if (n) {
|
|
1044
|
-
const s = this.#
|
|
1045
|
-
s &&
|
|
1046
|
+
const s = this.#g(t, n);
|
|
1047
|
+
s && Tt(t) ? t.textContent = this[s] : this.#r(n, t);
|
|
1046
1048
|
}
|
|
1047
1049
|
}
|
|
1048
1050
|
}
|
|
@@ -1091,11 +1093,11 @@ class U extends HTMLElement {
|
|
|
1091
1093
|
if (n.length !== 1) return;
|
|
1092
1094
|
const [s] = n;
|
|
1093
1095
|
if (!se.test(s)) return;
|
|
1094
|
-
const r = he(t) ||
|
|
1096
|
+
const r = he(t) || Tt(t);
|
|
1095
1097
|
let [c, u] = (e ?? "").split(":");
|
|
1096
|
-
if (!(r && c === "value" ||
|
|
1098
|
+
if (!(r && c === "value" || Tt(t))) return;
|
|
1097
1099
|
u ? t["on" + u] === void 0 && this.#e(t, e, "refers to an unsupported event name") : u = "change";
|
|
1098
|
-
const h =
|
|
1100
|
+
const h = dt(s);
|
|
1099
1101
|
t.addEventListener(u, (m) => {
|
|
1100
1102
|
const { target: b } = m;
|
|
1101
1103
|
if (!b) return;
|
|
@@ -1106,13 +1108,13 @@ class U extends HTMLElement {
|
|
|
1106
1108
|
#i(t) {
|
|
1107
1109
|
return !!this.#t.properties[t];
|
|
1108
1110
|
}
|
|
1109
|
-
#
|
|
1111
|
+
#d(t) {
|
|
1110
1112
|
const e = Array.from(t.querySelectorAll("*"));
|
|
1111
1113
|
for (const n of e)
|
|
1112
1114
|
this.#O(n), n.firstElementChild || this.#C(n);
|
|
1113
1115
|
}
|
|
1114
1116
|
// formAssociated is only needed when the component is inside a form.
|
|
1115
|
-
#
|
|
1117
|
+
#T() {
|
|
1116
1118
|
if (this.#t.formAssociated || this.closest("form") === null) return;
|
|
1117
1119
|
const t = this.#t.name;
|
|
1118
1120
|
throw new st(
|
|
@@ -1128,9 +1130,9 @@ class U extends HTMLElement {
|
|
|
1128
1130
|
// Subclasses can override this to add functionality.
|
|
1129
1131
|
propertyChangedCallback(t, e, n) {
|
|
1130
1132
|
}
|
|
1131
|
-
#
|
|
1133
|
+
#g(t, e) {
|
|
1132
1134
|
if (!e || !se.test(e)) return;
|
|
1133
|
-
const n =
|
|
1135
|
+
const n = dt(e);
|
|
1134
1136
|
return this[n] === void 0 && this.#a(t, "", n), n;
|
|
1135
1137
|
}
|
|
1136
1138
|
#E(t) {
|
|
@@ -1140,7 +1142,7 @@ class U extends HTMLElement {
|
|
|
1140
1142
|
const u = this.#n.get(r) ?? [];
|
|
1141
1143
|
for (const p of u)
|
|
1142
1144
|
if (p instanceof HTMLElement)
|
|
1143
|
-
this.#
|
|
1145
|
+
this.#b(p, c);
|
|
1144
1146
|
else if (!(p instanceof CSSStyleRule)) {
|
|
1145
1147
|
const { element: h, attrName: m } = p;
|
|
1146
1148
|
h instanceof CSSStyleRule ? h.style.setProperty(m, c) : ae(h, m, c);
|
|
@@ -1155,7 +1157,7 @@ class U extends HTMLElement {
|
|
|
1155
1157
|
}
|
|
1156
1158
|
const u = n.match(ie) || [];
|
|
1157
1159
|
for (const p of u) {
|
|
1158
|
-
const h = p
|
|
1160
|
+
const h = dt(p);
|
|
1159
1161
|
this[h] === void 0 && this.#a(null, t, h), typeof this[h] != "function" && c(h, n);
|
|
1160
1162
|
}
|
|
1161
1163
|
if (s)
|
|
@@ -1174,7 +1176,7 @@ class U extends HTMLElement {
|
|
|
1174
1176
|
}
|
|
1175
1177
|
const r = this.#t;
|
|
1176
1178
|
s.forEach((p) => {
|
|
1177
|
-
const h =
|
|
1179
|
+
const h = dt(p);
|
|
1178
1180
|
if (typeof this[h] == "function") return;
|
|
1179
1181
|
const m = r.propToExprsMap;
|
|
1180
1182
|
let b = m.get(h);
|
|
@@ -1191,7 +1193,7 @@ class U extends HTMLElement {
|
|
|
1191
1193
|
let c = this.#n.get(t);
|
|
1192
1194
|
c || (c = [], this.#n.set(t, c)), c.push(n ? { element: e, attrName: n } : e), e instanceof HTMLElement && this.#M(e, n, s);
|
|
1193
1195
|
const u = this.#o(t);
|
|
1194
|
-
n ? ae(e, n, u) : this.#
|
|
1196
|
+
n ? ae(e, n, u) : this.#b(e, u);
|
|
1195
1197
|
}
|
|
1196
1198
|
// This follows the best practice
|
|
1197
1199
|
// "Do not override author-set, global attributes."
|
|
@@ -1210,10 +1212,10 @@ class U extends HTMLElement {
|
|
|
1210
1212
|
#a(t, e, n) {
|
|
1211
1213
|
this.#e(t, e, `refers to missing property "${n}"`);
|
|
1212
1214
|
}
|
|
1213
|
-
#g(t, e) {
|
|
1214
|
-
return this.#A(t, this.getAttribute(e));
|
|
1215
|
-
}
|
|
1216
1215
|
#A(t, e) {
|
|
1216
|
+
return this.#_(t, this.getAttribute(e));
|
|
1217
|
+
}
|
|
1218
|
+
#_(t, e) {
|
|
1217
1219
|
if (e?.match(ie)) return e;
|
|
1218
1220
|
const n = this.#t, { type: s } = n.properties[t];
|
|
1219
1221
|
if (s || this.#e(null, t, "does not specify its type"), s === String) return e;
|
|
@@ -1229,8 +1231,8 @@ class U extends HTMLElement {
|
|
|
1229
1231
|
// VS Code thinks this is never called, but it is called by #defineProp.
|
|
1230
1232
|
#N(t, e, n, s) {
|
|
1231
1233
|
if (pe(n) && this.hasAttribute(s)) {
|
|
1232
|
-
const r = e === Boolean ? this.hasAttribute(s) : this.#
|
|
1233
|
-
n !== r &&
|
|
1234
|
+
const r = e === Boolean ? this.hasAttribute(s) : this.#A(t, s);
|
|
1235
|
+
n !== r && ln(this, t, n);
|
|
1234
1236
|
}
|
|
1235
1237
|
}
|
|
1236
1238
|
// Updates all computed properties that reference this property.
|
|
@@ -1240,19 +1242,23 @@ class U extends HTMLElement {
|
|
|
1240
1242
|
for (const [s, r] of n)
|
|
1241
1243
|
this[s] = this.#o(r);
|
|
1242
1244
|
}
|
|
1243
|
-
#
|
|
1245
|
+
#b(t, e) {
|
|
1244
1246
|
if (e === void 0) return;
|
|
1245
|
-
const n = t instanceof HTMLElement
|
|
1246
|
-
|
|
1247
|
+
const n = t instanceof HTMLElement;
|
|
1248
|
+
Array.isArray(e) && (e = e.join(""));
|
|
1249
|
+
const s = typeof e;
|
|
1250
|
+
s !== "string" && s !== "number" && this.#e(
|
|
1247
1251
|
t,
|
|
1248
1252
|
void 0,
|
|
1249
1253
|
" computed content is not a string or number"
|
|
1250
|
-
)
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1254
|
+
);
|
|
1255
|
+
const r = String(e);
|
|
1256
|
+
if (t instanceof HTMLElement && Tt(t))
|
|
1257
|
+
t.value = r;
|
|
1258
|
+
else if (n && s === "string" && r.trim().startsWith("<")) {
|
|
1259
|
+
const c = co(r);
|
|
1260
|
+
t.replaceChildren(...c), this.#S(t), this.#d(t);
|
|
1261
|
+
} else n && (t.textContent = r);
|
|
1256
1262
|
}
|
|
1257
1263
|
// Update corresponding parent web component property if bound to one.
|
|
1258
1264
|
// VS Code thinks this is never called, but it is called by #defineProp.
|
|
@@ -1277,7 +1283,7 @@ class U extends HTMLElement {
|
|
|
1277
1283
|
for (const n of Object.keys(t))
|
|
1278
1284
|
e[n] = n;
|
|
1279
1285
|
}
|
|
1280
|
-
this.#
|
|
1286
|
+
this.#x(t, e);
|
|
1281
1287
|
for (const [n, s] of Object.entries(e))
|
|
1282
1288
|
if (this.#i(s)) {
|
|
1283
1289
|
const r = qe(t, n);
|
|
@@ -1288,25 +1294,19 @@ class U extends HTMLElement {
|
|
|
1288
1294
|
t.addListener(this, e);
|
|
1289
1295
|
}
|
|
1290
1296
|
#P() {
|
|
1291
|
-
const t =
|
|
1292
|
-
for (const
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
`property "${n}" is not allowed because it is a reserved attribute`
|
|
1297
|
-
);
|
|
1298
|
-
for (const n of this.getAttributeNames())
|
|
1299
|
-
if (!Qn.has(n) && !n.startsWith("on")) {
|
|
1300
|
-
if (n === "form-assoc") {
|
|
1301
|
-
this.#d();
|
|
1297
|
+
const t = new Set(Object.keys(this.#t.properties));
|
|
1298
|
+
for (const e of this.getAttributeNames())
|
|
1299
|
+
if (!Jn.has(e) && !e.startsWith("on")) {
|
|
1300
|
+
if (e === "form-assoc") {
|
|
1301
|
+
this.#T();
|
|
1302
1302
|
continue;
|
|
1303
1303
|
}
|
|
1304
|
-
if (!
|
|
1305
|
-
if (
|
|
1306
|
-
this.#
|
|
1304
|
+
if (!t.has(U.getPropName(e))) {
|
|
1305
|
+
if (e === "name") {
|
|
1306
|
+
this.#T();
|
|
1307
1307
|
continue;
|
|
1308
1308
|
}
|
|
1309
|
-
this.#e(null,
|
|
1309
|
+
this.#e(null, e, "is not a supported attribute");
|
|
1310
1310
|
}
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
@@ -1314,11 +1314,11 @@ class U extends HTMLElement {
|
|
|
1314
1314
|
const s = n.match(ie);
|
|
1315
1315
|
if (s)
|
|
1316
1316
|
return s.forEach((r) => {
|
|
1317
|
-
const c =
|
|
1317
|
+
const c = dt(r);
|
|
1318
1318
|
this[c] === void 0 && this.#a(t, e, c);
|
|
1319
1319
|
}), s;
|
|
1320
1320
|
}
|
|
1321
|
-
#
|
|
1321
|
+
#x(t, e) {
|
|
1322
1322
|
for (const [n, s] of Object.entries(e)) {
|
|
1323
1323
|
let r = qe(t, n);
|
|
1324
1324
|
if (r === void 0)
|
|
@@ -1332,7 +1332,7 @@ class U extends HTMLElement {
|
|
|
1332
1332
|
}
|
|
1333
1333
|
// When type is an array, this can't validate the type of the array elements.
|
|
1334
1334
|
// This is called by #defineProp.
|
|
1335
|
-
#
|
|
1335
|
+
#v(t, e, n) {
|
|
1336
1336
|
if (n instanceof e) return;
|
|
1337
1337
|
let s = typeof n;
|
|
1338
1338
|
if (s === "object") {
|
|
@@ -1349,7 +1349,7 @@ class U extends HTMLElement {
|
|
|
1349
1349
|
`was set to a ${s}, but must be a ${e.name}`
|
|
1350
1350
|
);
|
|
1351
1351
|
}
|
|
1352
|
-
#
|
|
1352
|
+
#S(t) {
|
|
1353
1353
|
const e = Array.from(t.querySelectorAll("*"));
|
|
1354
1354
|
for (const n of e) {
|
|
1355
1355
|
const s = [];
|
|
@@ -1369,10 +1369,10 @@ class U extends HTMLElement {
|
|
|
1369
1369
|
}
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
|
-
function
|
|
1373
|
-
let e =
|
|
1372
|
+
function ho(i, ...t) {
|
|
1373
|
+
let e = an(i, t);
|
|
1374
1374
|
for (; ; ) {
|
|
1375
|
-
const n =
|
|
1375
|
+
const n = to.exec(e);
|
|
1376
1376
|
if (!n) break;
|
|
1377
1377
|
const s = n[2];
|
|
1378
1378
|
if (rn.test(s)) {
|
|
@@ -1380,21 +1380,21 @@ function mo(i, ...t) {
|
|
|
1380
1380
|
if (!r.startsWith("--")) {
|
|
1381
1381
|
const c = `--${r}: ${s};
|
|
1382
1382
|
${r}: var(--${r})`;
|
|
1383
|
-
e =
|
|
1383
|
+
e = cn(e, n.index, n[0].length, c);
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
1387
|
return e;
|
|
1388
1388
|
}
|
|
1389
|
-
function
|
|
1390
|
-
let e =
|
|
1389
|
+
function mo(i, ...t) {
|
|
1390
|
+
let e = an(i, t);
|
|
1391
1391
|
for (; ; ) {
|
|
1392
|
-
const n =
|
|
1392
|
+
const n = oo.exec(e);
|
|
1393
1393
|
if (!n || n[1] === "style") break;
|
|
1394
|
-
const s =
|
|
1394
|
+
const s = ao(n[2]);
|
|
1395
1395
|
if (rn.test(s)) {
|
|
1396
1396
|
const r = `<!-- ${s.trim()} -->`, c = n.index + n[0].indexOf(">") + 1;
|
|
1397
|
-
e =
|
|
1397
|
+
e = cn(e, c, s.length, r);
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
1400
|
return e;
|
|
@@ -1402,7 +1402,7 @@ function To(i, ...t) {
|
|
|
1402
1402
|
export {
|
|
1403
1403
|
U as Wrec,
|
|
1404
1404
|
ue as WrecState,
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1405
|
+
po as createElement,
|
|
1406
|
+
ho as css,
|
|
1407
|
+
mo as html
|
|
1408
1408
|
};
|