wrec 0.19.2 → 0.19.3

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 CHANGED
@@ -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 Ct = M(Array.prototype.forEach), xn = M(Array.prototype.lastIndexOf), $e = M(Array.prototype.pop), lt = M(Array.prototype.push), Pn = M(Array.prototype.splice), Lt = M(String.prototype.toLowerCase), Jt = M(String.prototype.toString), Qt = M(String.prototype.match), ft = M(String.prototype.replace), kn = M(String.prototype.indexOf), Fn = M(String.prototype.trim), x = M(Object.prototype.hasOwnProperty), N = M(RegExp.prototype.test), ut = Un(TypeError);
37
+ const Ot = M(Array.prototype.forEach), Pn = M(Array.prototype.lastIndexOf), $e = M(Array.prototype.pop), lt = M(Array.prototype.push), xn = M(Array.prototype.splice), Lt = M(String.prototype.toLowerCase), Jt = M(String.prototype.toString), Qt = M(String.prototype.match), ft = M(String.prototype.replace), kn = M(String.prototype.indexOf), Fn = M(String.prototype.trim), P = M(Object.prototype.hasOwnProperty), N = M(RegExp.prototype.test), ut = Un(TypeError);
38
38
  function M(i) {
39
39
  return function(t) {
40
40
  t instanceof RegExp && (t.lastIndex = 0);
@@ -66,13 +66,13 @@ function d(i, t) {
66
66
  }
67
67
  function Hn(i) {
68
68
  for (let t = 0; t < i.length; t++)
69
- x(i, t) || (i[t] = null);
69
+ P(i, t) || (i[t] = null);
70
70
  return i;
71
71
  }
72
72
  function F(i) {
73
73
  const t = ce(null);
74
74
  for (const [e, n] of Ke(i))
75
- x(i, e) && (Array.isArray(n) ? t[e] = Hn(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = F(n) : t[e] = n);
75
+ P(i, e) && (Array.isArray(n) ? t[e] = Hn(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = F(n) : t[e] = n);
76
76
  return t;
77
77
  }
78
78
  function pt(i, t) {
@@ -91,7 +91,7 @@ function pt(i, t) {
91
91
  }
92
92
  return e;
93
93
  }
94
- const Ge = 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"]), zn = 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"]), $n = L(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), We = 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"]), wt = L(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Gn = v(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Wn = v(/<%[\w\W]*|[\w\W]*%>/gm), Bn = v(/\$\{[\w\W]*/gm), jn = v(/^data-[\-\w.\u00B7-\uFFFF]+$/), Yn = v(/^aria-[\-\w]+$/), Ze = v(
94
+ const Ge = 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"]), zn = 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"]), $n = L(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), We = 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"]), Ct = L(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Gn = v(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Wn = v(/<%[\w\W]*|[\w\W]*%>/gm), Bn = v(/\$\{[\w\W]*/gm), jn = v(/^data-[\-\w.\u00B7-\uFFFF]+$/), Yn = v(/^aria-[\-\w]+$/), Ze = v(
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
  ), Vn = v(/^(?:\w+script|data):/i), Xn = v(
@@ -175,17 +175,17 @@ function Qe() {
175
175
  const f = e.createElement("template");
176
176
  f.content && f.content.ownerDocument && (e = f.content.ownerDocument);
177
177
  }
178
- let C, it = "";
178
+ let O, it = "";
179
179
  const {
180
- implementation: Pt,
180
+ implementation: xt,
181
181
  createNodeIterator: dn,
182
182
  createDocumentFragment: Tn,
183
183
  getElementsByTagName: gn
184
184
  } = e, {
185
185
  importNode: En
186
186
  } = n;
187
- let w = Ve();
188
- t.isSupported = typeof Ke == "function" && typeof Et == "function" && Pt && Pt.createHTMLDocument !== void 0;
187
+ let C = Ve();
188
+ t.isSupported = typeof Ke == "function" && typeof Et == "function" && xt && xt.createHTMLDocument !== void 0;
189
189
  const {
190
190
  MUSTACHE_EXPR: kt,
191
191
  ERB_EXPR: Ft,
@@ -201,7 +201,7 @@ function Qe() {
201
201
  } = Ye, _ = null;
202
202
  const Te = d({}, [...Ge, ...te, ...ee, ...ne, ...We]);
203
203
  let S = null;
204
- const ge = d({}, [...Be, ...oe, ...je, ...wt]);
204
+ const ge = d({}, [...Be, ...oe, ...je, ...Ct]);
205
205
  let g = Object.seal(ce(null, {
206
206
  tagNameCheck: {
207
207
  writable: !0,
@@ -238,43 +238,43 @@ function Qe() {
238
238
  }));
239
239
  let Ee = !0, zt = !0, Ae = !1, _e = !0, Z = !1, At = !0, V = !1, $t = !1, Gt = !1, J = !1, _t = !1, bt = !1, be = !0, Se = !1;
240
240
  const yn = "user-content-";
241
- let Wt = !0, at = !1, Q = {}, P = null;
241
+ let Wt = !0, at = !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 Oe = d({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), St = "http://www.w3.org/1998/Math/MathML", yt = "http://www.w3.org/2000/svg", z = "http://www.w3.org/1999/xhtml";
246
+ const we = d({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), St = "http://www.w3.org/1998/Math/MathML", yt = "http://www.w3.org/2000/svg", z = "http://www.w3.org/1999/xhtml";
247
247
  let tt = z, Yt = !1, Vt = null;
248
248
  const Rn = d({}, [St, yt, z], Jt);
249
- let Rt = d({}, ["mi", "mo", "mn", "ms", "mtext"]), Ot = d({}, ["annotation-xml"]);
250
- const On = d({}, ["title", "style", "font", "a", "script"]);
249
+ let Rt = d({}, ["mi", "mo", "mn", "ms", "mtext"]), wt = d({}, ["annotation-xml"]);
250
+ const wn = d({}, ["title", "style", "font", "a", "script"]);
251
251
  let ct = null;
252
- const Cn = ["application/xhtml+xml", "text/html"], wn = "text/html";
252
+ const On = ["application/xhtml+xml", "text/html"], Cn = "text/html";
253
253
  let A = null, et = null;
254
- const Nn = e.createElement("form"), Ce = function(o) {
254
+ const Nn = 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 = F(o), ct = // eslint-disable-next-line unicorn/prefer-includes
260
- Cn.indexOf(o.PARSER_MEDIA_TYPE) === -1 ? wn : o.PARSER_MEDIA_TYPE, A = ct === "application/xhtml+xml" ? Jt : Lt, _ = x(o, "ALLOWED_TAGS") ? d({}, o.ALLOWED_TAGS, A) : Te, S = x(o, "ALLOWED_ATTR") ? d({}, o.ALLOWED_ATTR, A) : ge, Vt = x(o, "ALLOWED_NAMESPACES") ? d({}, o.ALLOWED_NAMESPACES, Jt) : Rn, jt = x(o, "ADD_URI_SAFE_ATTR") ? d(F(Oe), o.ADD_URI_SAFE_ATTR, A) : Oe, ye = x(o, "ADD_DATA_URI_TAGS") ? d(F(Re), o.ADD_DATA_URI_TAGS, A) : Re, P = x(o, "FORBID_CONTENTS") ? d({}, o.FORBID_CONTENTS, A) : Bt, rt = x(o, "FORBID_TAGS") ? d({}, o.FORBID_TAGS, A) : F({}), Ht = x(o, "FORBID_ATTR") ? d({}, o.FORBID_ATTR, A) : F({}), Q = x(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, At = o.SAFE_FOR_XML !== !1, V = o.WHOLE_DOCUMENT || !1, J = o.RETURN_DOM || !1, _t = o.RETURN_DOM_FRAGMENT || !1, bt = o.RETURN_TRUSTED_TYPE || !1, Gt = o.FORCE_BODY || !1, be = o.SANITIZE_DOM !== !1, Se = o.SANITIZE_NAMED_PROPS || !1, Wt = o.KEEP_CONTENT !== !1, at = o.IN_PLACE || !1, de = o.ALLOWED_URI_REGEXP || Ze, tt = o.NAMESPACE || z, Rt = o.MATHML_TEXT_INTEGRATION_POINTS || Rt, Ot = o.HTML_INTEGRATION_POINTS || Ot, g = o.CUSTOM_ELEMENT_HANDLING || {}, o.CUSTOM_ELEMENT_HANDLING && Ce(o.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (g.tagNameCheck = o.CUSTOM_ELEMENT_HANDLING.tagNameCheck), o.CUSTOM_ELEMENT_HANDLING && Ce(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), _t && (J = !0), Q && (_ = d({}, We), S = [], Q.html === !0 && (d(_, Ge), d(S, Be)), Q.svg === !0 && (d(_, te), d(S, oe), d(S, wt)), Q.svgFilters === !0 && (d(_, ee), d(S, oe), d(S, wt)), Q.mathMl === !0 && (d(_, ne), d(S, je), d(S, wt))), o.ADD_TAGS && (typeof o.ADD_TAGS == "function" ? K.tagCheck = o.ADD_TAGS : (_ === Te && (_ = F(_)), d(_, o.ADD_TAGS, A))), o.ADD_ATTR && (typeof o.ADD_ATTR == "function" ? K.attributeCheck = o.ADD_ATTR : (S === ge && (S = F(S)), d(S, o.ADD_ATTR, A))), o.ADD_URI_SAFE_ATTR && d(jt, o.ADD_URI_SAFE_ATTR, A), o.FORBID_CONTENTS && (P === Bt && (P = F(P)), d(P, o.FORBID_CONTENTS, A)), o.ADD_FORBID_CONTENTS && (P === Bt && (P = F(P)), d(P, o.ADD_FORBID_CONTENTS, A)), Wt && (_["#text"] = !0), V && d(_, ["html", "head", "body"]), _.table && (d(_, ["tbody"]), delete rt.tbody), o.TRUSTED_TYPES_POLICY) {
260
+ On.indexOf(o.PARSER_MEDIA_TYPE) === -1 ? Cn : o.PARSER_MEDIA_TYPE, A = ct === "application/xhtml+xml" ? Jt : Lt, _ = 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) : Rn, jt = P(o, "ADD_URI_SAFE_ATTR") ? d(F(we), o.ADD_URI_SAFE_ATTR, A) : we, ye = P(o, "ADD_DATA_URI_TAGS") ? d(F(Re), o.ADD_DATA_URI_TAGS, A) : Re, x = P(o, "FORBID_CONTENTS") ? d({}, o.FORBID_CONTENTS, A) : Bt, rt = P(o, "FORBID_TAGS") ? d({}, o.FORBID_TAGS, A) : F({}), Ht = P(o, "FORBID_ATTR") ? d({}, o.FORBID_ATTR, A) : F({}), 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, At = o.SAFE_FOR_XML !== !1, V = o.WHOLE_DOCUMENT || !1, J = o.RETURN_DOM || !1, _t = o.RETURN_DOM_FRAGMENT || !1, bt = o.RETURN_TRUSTED_TYPE || !1, Gt = o.FORCE_BODY || !1, be = o.SANITIZE_DOM !== !1, Se = o.SANITIZE_NAMED_PROPS || !1, Wt = o.KEEP_CONTENT !== !1, at = o.IN_PLACE || !1, de = o.ALLOWED_URI_REGEXP || Ze, tt = o.NAMESPACE || z, Rt = o.MATHML_TEXT_INTEGRATION_POINTS || Rt, wt = o.HTML_INTEGRATION_POINTS || wt, 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), _t && (J = !0), Q && (_ = d({}, We), S = [], Q.html === !0 && (d(_, Ge), d(S, Be)), Q.svg === !0 && (d(_, te), d(S, oe), d(S, Ct)), Q.svgFilters === !0 && (d(_, ee), d(S, oe), d(S, Ct)), Q.mathMl === !0 && (d(_, ne), d(S, je), d(S, Ct))), o.ADD_TAGS && (typeof o.ADD_TAGS == "function" ? K.tagCheck = o.ADD_TAGS : (_ === Te && (_ = F(_)), d(_, o.ADD_TAGS, A))), o.ADD_ATTR && (typeof o.ADD_ATTR == "function" ? K.attributeCheck = o.ADD_ATTR : (S === ge && (S = F(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 = F(x)), d(x, o.FORBID_CONTENTS, A)), o.ADD_FORBID_CONTENTS && (x === Bt && (x = F(x)), d(x, o.ADD_FORBID_CONTENTS, A)), Wt && (_["#text"] = !0), V && d(_, ["html", "head", "body"]), _.table && (d(_, ["tbody"]), delete rt.tbody), o.TRUSTED_TYPES_POLICY) {
261
261
  if (typeof o.TRUSTED_TYPES_POLICY.createHTML != "function")
262
262
  throw ut('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
263
263
  if (typeof o.TRUSTED_TYPES_POLICY.createScriptURL != "function")
264
264
  throw ut('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
265
- C = o.TRUSTED_TYPES_POLICY, it = C.createHTML("");
265
+ O = o.TRUSTED_TYPES_POLICY, it = O.createHTML("");
266
266
  } else
267
- C === void 0 && (C = Zn(H, s)), C !== null && typeof it == "string" && (it = C.createHTML(""));
267
+ O === void 0 && (O = Zn(H, s)), O !== null && typeof it == "string" && (it = O.createHTML(""));
268
268
  L && L(o), et = o;
269
269
  }
270
- }, we = d({}, [...te, ...ee, ...zn]), Ne = d({}, [...ne, ...$n]), Ln = function(o) {
270
+ }, Ce = d({}, [...te, ...ee, ...zn]), Ne = d({}, [...ne, ...$n]), Ln = function(o) {
271
271
  let a = Et(o);
272
272
  (!a || !a.tagName) && (a = {
273
273
  namespaceURI: tt,
274
274
  tagName: "template"
275
275
  });
276
276
  const l = Lt(o.tagName), T = Lt(a.tagName);
277
- return Vt[o.namespaceURI] ? o.namespaceURI === yt ? a.namespaceURI === z ? l === "svg" : a.namespaceURI === St ? l === "svg" && (T === "annotation-xml" || Rt[T]) : !!we[l] : o.namespaceURI === St ? a.namespaceURI === z ? l === "math" : a.namespaceURI === yt ? l === "math" && Ot[T] : !!Ne[l] : o.namespaceURI === z ? a.namespaceURI === yt && !Ot[T] || a.namespaceURI === St && !Rt[T] ? !1 : !Ne[l] && (On[l] || !we[l]) : !!(ct === "application/xhtml+xml" && Vt[o.namespaceURI]) : !1;
277
+ return Vt[o.namespaceURI] ? o.namespaceURI === yt ? a.namespaceURI === z ? l === "svg" : a.namespaceURI === St ? l === "svg" && (T === "annotation-xml" || Rt[T]) : !!Ce[l] : o.namespaceURI === St ? a.namespaceURI === z ? l === "math" : a.namespaceURI === yt ? l === "math" && wt[T] : !!Ne[l] : o.namespaceURI === z ? a.namespaceURI === yt && !wt[T] || a.namespaceURI === St && !Rt[T] ? !1 : !Ne[l] && (wn[l] || !Ce[l]) : !!(ct === "application/xhtml+xml" && Vt[o.namespaceURI]) : !1;
278
278
  }, k = function(o) {
279
279
  lt(t.removed, {
280
280
  element: o
@@ -316,21 +316,21 @@ function Qe() {
316
316
  l = E && E[0];
317
317
  }
318
318
  ct === "application/xhtml+xml" && tt === z && (o = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + o + "</body></html>");
319
- const T = C ? C.createHTML(o) : o;
319
+ const T = O ? O.createHTML(o) : o;
320
320
  if (tt === z)
321
321
  try {
322
322
  a = new W().parseFromString(T, ct);
323
323
  } catch {
324
324
  }
325
325
  if (!a || !a.documentElement) {
326
- a = Pt.createDocument(tt, "template", null);
326
+ a = xt.createDocument(tt, "template", null);
327
327
  try {
328
328
  a.documentElement.innerHTML = Yt ? it : T;
329
329
  } catch {
330
330
  }
331
331
  }
332
- const O = a.body || a.documentElement;
333
- return o && l && O.insertBefore(e.createTextNode(l), O.childNodes[0] || null), tt === z ? gn.call(a, V ? "html" : "body")[0] : V ? a.documentElement : O;
332
+ const w = a.body || a.documentElement;
333
+ return o && l && w.insertBefore(e.createTextNode(l), w.childNodes[0] || null), tt === z ? gn.call(a, V ? "html" : "body")[0] : V ? a.documentElement : w;
334
334
  }, Me = function(o) {
335
335
  return dn.call(
336
336
  o.ownerDocument || o,
@@ -345,40 +345,40 @@ function Qe() {
345
345
  return typeof u == "function" && o instanceof u;
346
346
  };
347
347
  function $(f, o, a) {
348
- Ct(f, (l) => {
348
+ Ot(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
- if ($(w.beforeSanitizeElements, o, null), qt(o))
354
+ if ($(C.beforeSanitizeElements, o, null), qt(o))
355
355
  return k(o), !0;
356
356
  const l = A(o.nodeName);
357
- if ($(w.uponSanitizeElement, o, {
357
+ if ($(C.uponSanitizeElement, o, {
358
358
  tagName: l,
359
359
  allowedTags: _
360
360
  }), At && o.hasChildNodes() && !De(o.firstElementChild) && N(/<[/\w!]/g, o.innerHTML) && N(/<[/\w!]/g, o.textContent) || o.nodeType === mt.progressingInstruction || At && o.nodeType === mt.comment && N(/<[/\w]/g, o.data))
361
361
  return k(o), !0;
362
362
  if (!(K.tagCheck instanceof Function && K.tagCheck(l)) && (!_[l] || rt[l])) {
363
- if (!rt[l] && xe(l) && (g.tagNameCheck instanceof RegExp && N(g.tagNameCheck, l) || g.tagNameCheck instanceof Function && g.tagNameCheck(l)))
363
+ if (!rt[l] && Pe(l) && (g.tagNameCheck instanceof RegExp && N(g.tagNameCheck, l) || g.tagNameCheck instanceof Function && g.tagNameCheck(l)))
364
364
  return !1;
365
- if (Wt && !P[l]) {
366
- const T = Et(o) || o.parentNode, O = hn(o) || o.childNodes;
367
- if (O && T) {
368
- const E = O.length;
365
+ if (Wt && !x[l]) {
366
+ const T = Et(o) || o.parentNode, w = hn(o) || o.childNodes;
367
+ if (w && T) {
368
+ const E = w.length;
369
369
  for (let D = E - 1; D >= 0; --D) {
370
- const G = un(O[D], !0);
370
+ const G = un(w[D], !0);
371
371
  G.__removalCount = (o.__removalCount || 0) + 1, T.insertBefore(G, mn(o));
372
372
  }
373
373
  }
374
374
  }
375
375
  return k(o), !0;
376
376
  }
377
- return o instanceof p && !Ln(o) || (l === "noscript" || l === "noembed" || l === "noframes") && N(/<\/no(script|embed|frames)/i, o.innerHTML) ? (k(o), !0) : (Z && o.nodeType === mt.text && (a = o.textContent, Ct([kt, Ft, Ut], (T) => {
377
+ return o instanceof p && !Ln(o) || (l === "noscript" || l === "noembed" || l === "noframes") && N(/<\/no(script|embed|frames)/i, o.innerHTML) ? (k(o), !0) : (Z && o.nodeType === mt.text && (a = o.textContent, Ot([kt, Ft, Ut], (T) => {
378
378
  a = ft(a, T, " ");
379
379
  }), o.textContent !== a && (lt(t.removed, {
380
380
  element: o.cloneNode()
381
- }), o.textContent = a)), $(w.afterSanitizeElements, o, null), !1);
381
+ }), o.textContent = a)), $(C.afterSanitizeElements, o, null), !1);
382
382
  }, ve = function(o, a, l) {
383
383
  if (be && (a === "id" || a === "name") && (l in e || l in Nn))
384
384
  return !1;
@@ -390,7 +390,7 @@ function Qe() {
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
- !(xe(o) && (g.tagNameCheck instanceof RegExp && N(g.tagNameCheck, o) || g.tagNameCheck instanceof Function && g.tagNameCheck(o)) && (g.attributeNameCheck instanceof RegExp && N(g.attributeNameCheck, a) || g.attributeNameCheck instanceof Function && g.attributeNameCheck(a, o)) || // Alternative, second condition checks if it's an `is`-attribute, AND
393
+ !(Pe(o) && (g.tagNameCheck instanceof RegExp && N(g.tagNameCheck, o) || g.tagNameCheck instanceof Function && g.tagNameCheck(o)) && (g.attributeNameCheck instanceof RegExp && N(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
395
  a === "is" && g.allowCustomizedBuiltInElements && (g.tagNameCheck instanceof RegExp && N(g.tagNameCheck, l) || g.tagNameCheck instanceof Function && g.tagNameCheck(l)))
396
396
  ) return !1;
@@ -408,10 +408,10 @@ function Qe() {
408
408
  }
409
409
  }
410
410
  return !0;
411
- }, xe = function(o) {
412
- return o !== "annotation-xml" && Qt(o, Sn);
413
411
  }, Pe = function(o) {
414
- $(w.beforeSanitizeAttributes, o, null);
412
+ return o !== "annotation-xml" && Qt(o, Sn);
413
+ }, xe = function(o) {
414
+ $(C.beforeSanitizeAttributes, o, null);
415
415
  const {
416
416
  attributes: a
417
417
  } = o;
@@ -426,13 +426,13 @@ function Qe() {
426
426
  };
427
427
  let T = a.length;
428
428
  for (; T--; ) {
429
- const O = a[T], {
429
+ const w = a[T], {
430
430
  name: E,
431
431
  namespaceURI: D,
432
432
  value: G
433
- } = O, nt = A(E), Kt = G;
433
+ } = w, nt = A(E), Kt = G;
434
434
  let y = E === "value" ? Kt : Fn(Kt);
435
- if (l.attrName = nt, l.attrValue = y, l.keepAttr = !0, l.forceKeepAttr = void 0, $(w.uponSanitizeAttribute, o, l), y = l.attrValue, Se && (nt === "id" || nt === "name") && (X(E, o), y = yn + y), At && N(/((--!?|])>)|<\/(style|title|textarea)/i, 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(E, o), y = yn + y), At && N(/((--!?|])>)|<\/(style|title|textarea)/i, y)) {
436
436
  X(E, o);
437
437
  continue;
438
438
  }
@@ -450,7 +450,7 @@ function Qe() {
450
450
  X(E, o);
451
451
  continue;
452
452
  }
453
- Z && Ct([kt, Ft, Ut], (Fe) => {
453
+ Z && Ot([kt, Ft, Ut], (Fe) => {
454
454
  y = ft(y, Fe, " ");
455
455
  });
456
456
  const ke = A(o.nodeName);
@@ -458,14 +458,14 @@ function Qe() {
458
458
  X(E, o);
459
459
  continue;
460
460
  }
461
- if (C && typeof H == "object" && typeof H.getAttributeType == "function" && !D)
461
+ if (O && typeof H == "object" && typeof H.getAttributeType == "function" && !D)
462
462
  switch (H.getAttributeType(ke, nt)) {
463
463
  case "TrustedHTML": {
464
- y = C.createHTML(y);
464
+ y = O.createHTML(y);
465
465
  break;
466
466
  }
467
467
  case "TrustedScriptURL": {
468
- y = C.createScriptURL(y);
468
+ y = O.createScriptURL(y);
469
469
  break;
470
470
  }
471
471
  }
@@ -476,16 +476,16 @@ function Qe() {
476
476
  X(E, o);
477
477
  }
478
478
  }
479
- $(w.afterSanitizeAttributes, o, null);
479
+ $(C.afterSanitizeAttributes, o, null);
480
480
  }, Mn = function f(o) {
481
481
  let a = null;
482
482
  const l = Me(o);
483
- for ($(w.beforeSanitizeShadowDOM, o, null); a = l.nextNode(); )
484
- $(w.uponSanitizeShadowNode, a, null), Ie(a), Pe(a), a.content instanceof r && f(a.content);
485
- $(w.afterSanitizeShadowDOM, o, null);
483
+ for ($(C.beforeSanitizeShadowDOM, o, null); a = l.nextNode(); )
484
+ $(C.uponSanitizeShadowNode, a, null), Ie(a), xe(a), a.content instanceof r && f(a.content);
485
+ $(C.afterSanitizeShadowDOM, o, null);
486
486
  };
487
487
  return t.sanitize = function(f) {
488
- let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = null, l = null, T = null, O = null;
488
+ let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = null, l = null, T = null, w = null;
489
489
  if (Yt = !f, Yt && (f = "<!-->"), typeof f != "string" && !De(f))
490
490
  if (typeof f.toString == "function") {
491
491
  if (f = f.toString(), typeof f != "string")
@@ -505,29 +505,29 @@ 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 C && bt ? C.createHTML(f) : f;
508
+ return O && bt ? O.createHTML(f) : f;
509
509
  if (a = Le(f), !a)
510
510
  return J ? null : bt ? it : "";
511
511
  }
512
512
  a && Gt && k(a.firstChild);
513
513
  const E = Me(at ? f : a);
514
514
  for (; T = E.nextNode(); )
515
- Ie(T), Pe(T), T.content instanceof r && Mn(T.content);
515
+ Ie(T), xe(T), T.content instanceof r && Mn(T.content);
516
516
  if (at)
517
517
  return f;
518
518
  if (J) {
519
519
  if (_t)
520
- for (O = Tn.call(a.ownerDocument); a.firstChild; )
521
- O.appendChild(a.firstChild);
520
+ for (w = Tn.call(a.ownerDocument); a.firstChild; )
521
+ w.appendChild(a.firstChild);
522
522
  else
523
- O = a;
524
- return (S.shadowroot || S.shadowrootmode) && (O = En.call(n, O, !0)), O;
523
+ w = a;
524
+ return (S.shadowroot || S.shadowrootmode) && (w = En.call(n, w, !0)), w;
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 && N(Je, a.ownerDocument.doctype.name) && (D = "<!DOCTYPE " + a.ownerDocument.doctype.name + `>
528
- ` + D), Z && Ct([kt, Ft, Ut], (G) => {
528
+ ` + D), Z && Ot([kt, Ft, Ut], (G) => {
529
529
  D = ft(D, G, " ");
530
- }), C && bt ? C.createHTML(D) : D;
530
+ }), O && bt ? 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;
@@ -538,17 +538,17 @@ function Qe() {
538
538
  const l = A(f), T = A(o);
539
539
  return ve(l, T, a);
540
540
  }, t.addHook = function(f, o) {
541
- typeof o == "function" && lt(w[f], o);
541
+ typeof o == "function" && lt(C[f], o);
542
542
  }, t.removeHook = function(f, o) {
543
543
  if (o !== void 0) {
544
- const a = xn(w[f], o);
545
- return a === -1 ? void 0 : Pn(w[f], a, 1)[0];
544
+ const a = Pn(C[f], o);
545
+ return a === -1 ? void 0 : xn(C[f], a, 1)[0];
546
546
  }
547
- return $e(w[f]);
547
+ return $e(C[f]);
548
548
  }, t.removeHooks = function(f) {
549
- w[f] = [];
549
+ C[f] = [];
550
550
  }, t.removeAllHooks = function() {
551
- w = Ve();
551
+ C = Ve();
552
552
  }, t;
553
553
  }
554
554
  var tn = Qe();
@@ -601,10 +601,10 @@ function nn(i) {
601
601
  const Mt = typeof window < "u" && typeof window.document < "u";
602
602
  let qe = class extends Error {
603
603
  };
604
- var q, vt, U, Tt, gt, Y, xt, on;
604
+ var q, vt, U, Tt, gt, Y, Pt, on;
605
605
  const st = class st {
606
606
  constructor(t, e, n) {
607
- j(this, xt);
607
+ j(this, Pt);
608
608
  j(this, vt, /* @__PURE__ */ Symbol("objectId"));
609
609
  // This cannot be replaced by a WeakMap<ChangeListener, Set<string>>
610
610
  // because there is no way to iterate over the keys of a WeakMap.
@@ -615,7 +615,7 @@ const st = class st {
615
615
  if (!t) throw new qe("name cannot be empty");
616
616
  if (R(st, q).has(t))
617
617
  throw new qe(`WrecState with name "${t}" already exists`);
618
- if (ot(this, Tt, t), ot(this, gt, e), ot(this, Y, en({}, He(this, xt, on).bind(this))), e && Mt) {
618
+ if (ot(this, Tt, t), ot(this, gt, e), ot(this, Y, en({}, He(this, Pt, on).bind(this))), e && Mt) {
619
619
  const s = sessionStorage.getItem("wrec-state-" + t), r = s ? JSON.parse(s) : void 0;
620
620
  r && (n = r);
621
621
  }
@@ -680,7 +680,7 @@ const st = class st {
680
680
  ot(this, U, R(this, U).filter((e) => e.listenerRef.deref() !== t));
681
681
  }
682
682
  };
683
- q = new WeakMap(), vt = new WeakMap(), U = new WeakMap(), Tt = new WeakMap(), gt = new WeakMap(), Y = new WeakMap(), xt = new WeakSet(), on = function(t, e, n) {
683
+ q = new WeakMap(), vt = new WeakMap(), U = new WeakMap(), Tt = new WeakMap(), gt = new WeakMap(), Y = new WeakMap(), Pt = new WeakSet(), on = function(t, e, n) {
684
684
  const s = /* @__PURE__ */ new Set();
685
685
  for (const r of R(this, U)) {
686
686
  const c = r.listenerRef.deref();
@@ -807,14 +807,25 @@ function ae(i, t, e) {
807
807
  const [n, s] = t.split(":");
808
808
  i instanceof CSSStyleRule ? i.style.setProperty(n, e) : (fn(i, n, e), n === "value" && me(i) && (i.value = e));
809
809
  }
810
- function lo(i) {
810
+ async function lo(i) {
811
811
  const t = /* @__PURE__ */ new Set();
812
- for (const n of It(i)) {
812
+ for (const n of It(i.content)) {
813
813
  const { localName: s } = n;
814
814
  s.includes("-") && t.add(s);
815
815
  }
816
- const e = [...t].map((n) => customElements.whenDefined(n));
817
- return Promise.all(e);
816
+ function e(n) {
817
+ return new Promise((s, r) => {
818
+ setTimeout(() => {
819
+ const c = `custom element <${n}> not defined`;
820
+ r(new Error(c));
821
+ }, 1e3);
822
+ });
823
+ }
824
+ return Promise.all(
825
+ [...t].map(
826
+ async (n) => Promise.race([customElements.whenDefined(n), e(n)])
827
+ )
828
+ );
818
829
  }
819
830
  class I extends HTMLElement {
820
831
  // This is used to lookup the camelCase property name
@@ -905,23 +916,21 @@ class I extends HTMLElement {
905
916
  this[e] = n;
906
917
  }
907
918
  connectedCallback() {
908
- this.#P(), this.#C(), this.#R().then(() => {
909
- this.hasAttribute("disabled") && this.#d(), requestAnimationFrame(() => {
910
- this.#y(this.shadowRoot), this.#T(this.shadowRoot), this.#O();
911
- });
919
+ this.#x(), this.#O(), this.#R().then(() => {
920
+ this.hasAttribute("disabled") && this.#d(), this.#y(this.shadowRoot), this.#T(this.shadowRoot), this.#w();
912
921
  });
913
922
  }
914
- #O() {
923
+ #w() {
915
924
  const t = this.#t, { properties: e } = t;
916
925
  for (const [n, { computed: s }] of Object.entries(e))
917
926
  s && (this[n] = this.#o(s));
918
927
  }
919
- #C() {
928
+ #O() {
920
929
  const t = this.#t, { observedAttributes: e, properties: n } = t;
921
930
  for (const [s, r] of Object.entries(n))
922
- this.#w(s, r, e);
931
+ this.#C(s, r, e);
923
932
  }
924
- #w(t, e, n) {
933
+ #C(t, e, n) {
925
934
  const s = I.getAttrName(t), r = this.hasAttribute(s);
926
935
  e.required && !r && this.#e(this, t, "is a required attribute");
927
936
  let c = e.value;
@@ -938,7 +947,7 @@ class I extends HTMLElement {
938
947
  if (h === b) return;
939
948
  this.#F(t, u, h), this[m] = h;
940
949
  const { state: W, stateProp: H } = this.#t.properties[t];
941
- H && Jn(W, H, h), this.#v(t), this.#I(t, u, h, s), this.#A(t), this.#x(t, h);
950
+ H && Jn(W, H, h), this.#v(t), this.#I(t, u, h, s), this.#A(t), this.#P(t, h);
942
951
  const B = this.#c[t];
943
952
  B && this.setFormValue(B, String(h)), this.propertyChangedCallback(t, b, h), e.dispatch && this.dispatch("change", {
944
953
  tagName: this.localName,
@@ -1239,7 +1248,7 @@ class I extends HTMLElement {
1239
1248
  }
1240
1249
  // Update corresponding parent web component property if bound to one.
1241
1250
  // VS Code thinks this is never called, but it is called by #defineProp.
1242
- #x(t, e) {
1251
+ #P(t, e) {
1243
1252
  const n = this.#u.get(t);
1244
1253
  if (!n) return;
1245
1254
  const s = this.getRootNode();
@@ -1270,7 +1279,7 @@ class I extends HTMLElement {
1270
1279
  }
1271
1280
  t.addListener(this, e);
1272
1281
  }
1273
- #P() {
1282
+ #x() {
1274
1283
  const t = this.#t, e = new Set(Object.keys(t.properties));
1275
1284
  for (const n of e)
1276
1285
  so.has(n) && this.#e(
package/dist/wrec.js CHANGED
@@ -204,17 +204,25 @@ function updateValue(element, attrName, value) {
204
204
  }
205
205
  }
206
206
  }
207
- function waitForDefines(template) {
207
+ // Waits for all custom elements used in a template to be defined.
208
+ async function waitForDefines(template) {
208
209
  // Find all the custom elements used in the template.
209
210
  const customSet = new Set();
210
- for (const element of getAllDescendants(template)) {
211
+ for (const element of getAllDescendants(template.content)) {
211
212
  const { localName } = element;
212
213
  if (localName.includes('-'))
213
214
  customSet.add(localName);
214
215
  }
216
+ function getTimeout(tagName) {
217
+ return new Promise((_, reject) => {
218
+ setTimeout(() => {
219
+ const message = `custom element <${tagName}> not defined`;
220
+ reject(new Error(message));
221
+ }, 1000);
222
+ });
223
+ }
215
224
  // Wait for all the custom elements to be defined.
216
- const promises = [...customSet].map(name => customElements.whenDefined(name));
217
- return Promise.all(promises);
225
+ return Promise.all([...customSet].map(async (tagName) => Promise.race([customElements.whenDefined(tagName), getTimeout(tagName)])));
218
226
  }
219
227
  export class Wrec extends HTMLElement {
220
228
  // This is used to lookup the camelCase property name
@@ -329,12 +337,9 @@ export class Wrec extends HTMLElement {
329
337
  this.#buildDOM().then(() => {
330
338
  if (this.hasAttribute('disabled'))
331
339
  this.#disableOrEnable();
332
- // Wait for the DOM to update.
333
- requestAnimationFrame(() => {
334
- this.#wireEvents(this.shadowRoot);
335
- this.#makeReactive(this.shadowRoot);
336
- this.#computeProps();
337
- });
340
+ this.#wireEvents(this.shadowRoot);
341
+ this.#makeReactive(this.shadowRoot);
342
+ this.#computeProps();
338
343
  });
339
344
  }
340
345
  #computeProps() {
package/dist/wrec.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"wrec.js","sourceRoot":"","sources":["../src/wrec.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,OAAO,EAAC,YAAY,EAAE,YAAY,EAAC,MAAM,YAAY,CAAC;AAEtD,iEAAiE;AACjE,mEAAmE;AACnE,mEAAmE;AACnE,wCAAwC;AACxC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC9B,QAAQ;IACR,UAAU;IACV,SAAS;IACT,SAAS;IACT,SAAS;IACT,WAAW;IACX,SAAS;IACT,UAAU;CACX,CAAC,CAAC;AACH,SAAS,CAAC,OAAO,CAAC,uBAAuB,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;IACzD,MAAM,EAAC,QAAQ,EAAC,GAAG,IAAI,CAAC;IACxB,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACrC,IAAI,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;AAC5D,CAAC,CAAC,CAAC;AAcH,MAAM,SAAU,SAAQ,KAAK;CAAG;AAEhC,MAAM,eAAe,GAAG,8BAA8B,CAAC;AACvD,MAAM,UAAU,GAAG,UAAU,CAAC;AAC9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K,OAAO;YAAE,MAAM;QAC1C,MAAM,WAAW,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACjD,IAAI,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;YACnC,MAAM,OAAO,GAAG,QAAQ,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC;YACjD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACtD,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC"}
package/dist/wrec.min.js CHANGED
@@ -1 +1 @@
1
- import DOMPurify from"dompurify";import{getPathValue,setPathValue}from"./paths.js";const safeOnAttrNames=new Set(["onblur","onchange","onclick","onfocus","oninput","onkeydown","onreset","onsubmit"]);DOMPurify.addHook("uponSanitizeAttribute",(t,e)=>{const{attrName:s}=e,r=s.toLowerCase();safeOnAttrNames.has(r)&&(e.forceKeepAttr=!0)});class WrecError extends Error{}const CSS_PROPERTY_RE=/([a-zA-Z-]+)\s*:\s*([^;}]+)/g,FIRST_CHAR="a-zA-Z_$",OTHER_CHAR="a-zA-Z_$0-9",IDENTIFIER=`[a-zA-Z_$][${OTHER_CHAR}]*`,HTML_COMMENT_TEXT_RE=/<!--\s*(.*?)\s*-->/,HTML_ELEMENT_TEXT_RE=/<(\w+)(?:\s[^>]*)?>((?:[^<]|<(?!\w))*?)<\/\1>/g,REF_RE=new RegExp(`^this\\.${IDENTIFIER}$`),REFS_RE=new RegExp(`this\\.${IDENTIFIER}(\\.${IDENTIFIER})*`,"g"),REFS_TEST_RE=new RegExp(`this\\.${IDENTIFIER}(\\.${IDENTIFIER})*`),RESERVED_ATTRS=new Set(["class","style"]),SKIP=5;function canDisable(t){return t instanceof HTMLButtonElement||t instanceof HTMLFieldSetElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof Wrec}export function createElement(t,e,s){const r=document.createElement(t);if(e)for(const[t,s]of Object.entries(e))r.setAttribute(t,s);return s&&(r.innerHTML=s),r}const defaultForType=t=>t===String?"":t===Number?0:t!==Boolean&&(t===Array?[]:t===Object?{}:void 0);function getAllDescendants(t){const e=[];let s=t.firstElementChild;for(;s;)e.push(s),s.shadowRoot&&e.push(...getAllDescendants(s.shadowRoot)),s.firstElementChild&&e.push(...getAllDescendants(s)),s=s.nextElementSibling;return e}const getPropName=t=>t.substring(5).split(".")[0];function interpolate(t,e){let s=t[0];return e.forEach((e,r)=>{s+=e+t[r+1]}),s}function isPrimitive(t){const e=typeof t;return"string"===e||"number"===e||"boolean"===e}function isTextArea(t){return"textarea"===t.localName}function isValueElement(t){const{localName:e}=t;return"input"===e||"select"===e}const removeHtmlComments=t=>t.replace(/<!--[\s\S]*?-->/g,"");function replace(t,e,s,r){return t.slice(0,e)+r+t.slice(e+s)}function sanitize(t){let e=t.trim(),s=null;/^\s*<tr[\s>]/i.test(e)?(e=`<table><tbody>${e}</tbody></table>`,s="tbody"):/^\s*<(td|th)[\s>]/i.test(e)?(e=`<table><tbody><tr>${e}</tr></tbody></table>`,s="tr"):/^\s*<option[\s>]/i.test(e)?(e=`<select>${e}</select>`,s="select"):/^\s*<col[\s>]/i.test(e)&&(e=`<table><colgroup>${e}</colgroup></table>`,s="colgroup");const r=DOMPurify.sanitize(e,{ADD_TAGS:["#comment"],ALLOW_UNKNOWN_PROTOCOLS:!0,RETURN_DOM_FRAGMENT:!0});if(s){const t=r.querySelector(s);if(t)return t.childNodes}return r.childNodes}function stringToNumber(t){const e=Number(t);if(isNaN(e))throw new WrecError(`can't convert "${t}" to a number`);return e}function updateAttribute(t,e,s){const[r,o]=e.split(":");if(isPrimitive(s))if("boolean"==typeof s){s?t.setAttribute(r,r):t.removeAttribute(r);t[Wrec.getPropName(r)]=s}else{const o=t.getAttribute(e),i=String(s);o!==i&&(t.setAttribute(r,i),"value"===r&&isValueElement(t)&&(t.value=i))}else{t[Wrec.getPropName(e)]=s}}function updateValue(t,e,s){const[r,o]=e.split(":");t instanceof CSSStyleRule?t.style.setProperty(r,s):(updateAttribute(t,r,s),"value"===r&&isValueElement(t)&&(t.value=s))}function waitForDefines(t){const e=new Set;for(const s of getAllDescendants(t)){const{localName:t}=s;t.includes("-")&&e.add(t)}const s=[...e].map(t=>customElements.whenDefined(t));return Promise.all(s)}export class Wrec extends HTMLElement{static#t=new Map;static#e=new Map;static css="";static formAssociated=!1;static html="";static properties;static propToComputedMap;static propToExprsMap;static template=null;#s=this.constructor;#r=new Map;#o={};#i;#n={};#a=null;#c=new Map;constructor(){super(),this.attachShadow({mode:"open"});const t=this.#s;t.properties||(t.properties={}),t.propToComputedMap||(t.propToComputedMap=new Map),t.propToExprsMap||(t.propToExprsMap=new Map)}attributeChangedCallback(t,e,s){"disabled"===t&&this.#l();const r=Wrec.getPropName(t);if(this.#p(r)){const t=this.#h(r,String(s));this[r]=t;const o=this.#o[r];o&&this.setFormValue(o,String(t)),this.propertyChangedCallback(r,e,s)}}async#u(){const t=this.#s;let{template:e}=t;if(!e){e=t.template=document.createElement("template");let s="<style>\n :host([hidden]) { display: none; }";t.css&&(s+=t.css),s+="</style>\n";let r=t.html.trim();r.startsWith("<")||(r=`<span>\x3c!--${r}--\x3e</span>`),e.innerHTML=s+r}await waitForDefines(e),this.shadowRoot.replaceChildren(e.content.cloneNode(!0))}changed(t,e,s){this[e]=s}connectedCallback(){this.#f(),this.#d(),this.#u().then(()=>{this.hasAttribute("disabled")&&this.#l(),requestAnimationFrame(()=>{this.#m(this.shadowRoot),this.#b(this.shadowRoot),this.#E()})})}#E(){const t=this.#s,{properties:e}=t;for(const[t,{computed:s}]of Object.entries(e))s&&(this[t]=this.#y(s))}#d(){const t=this.#s,{observedAttributes:e,properties:s}=t;for(const[t,r]of Object.entries(s))this.#g(t,r,e)}#g(t,e,s){const r=Wrec.getAttrName(t),o=this.hasAttribute(r);e.required&&!o&&this.#T(this,t,"is a required attribute");let i=e.value;this.hasOwnProperty(t)&&(i=this[t],delete this[t]);const{type:n}=e,a=n===Boolean?i||o:s.includes(r)&&o?this.#A(t,r):i||defaultForType(n),c="#"+t;this[c]=a,e.computed&&this.#R(t,e),Object.defineProperty(this,t,{enumerable:!0,get(){return this[c]},set(s){n===Number&&"string"==typeof s&&(s=stringToNumber(s));const o=this[c];if(s===o)return;this.#w(t,n,s),this[c]=s;const{state:i,stateProp:a}=this.#s.properties[t];a&&setPathValue(i,a,s),this.#v(t),this.#S(t,n,s,r),this.#M(t),this.#P(t,s);const l=this.#o[t];l&&this.setFormValue(l,String(s)),this.propertyChangedCallback(t,o,s),e.dispatch&&this.dispatch("change",{tagName:this.localName,property:t,oldValue:o,value:s})}})}#l(){const t=this.hasAttribute("disabled"),e=getAllDescendants(this.shadowRoot);for(const s of e)canDisable(s)&&(s.disabled=t)}disconnectedCallback(){this.#r.clear(),this.#n.clear(),this.#c.clear()}dispatch(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}displayIfSet(t,e="block"){return`display: ${t?e:"none"}`}static elementName(){return this.name.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}#x(t){const e=t instanceof Wrec;for(const s of t.getAttributeNames()){const r=t.getAttribute(s),o=this.#N(t,r);if(o){const r=this[o];void 0===r&&this.#C(t,s,o),t[o]=r;let[i,n]=s.split(":");if("value"===i)if(n){if(void 0===t["on"+n]){const e="refers to an unsupported event name";this.#T(t,s,e)}t.setAttribute(i,this[o])}else n="change";e&&t.#c.set(Wrec.getPropName(i),o)}this.#O(r,t,s)}}#y(t){const e=new Function("return "+t).call(this);return Array.isArray(e)?e.join(""):e}#_(t){const{localName:e}=t;if("style"===e){const{sheet:e}=t,s=e?.cssRules??[],r=Array.from(s);for(const t of r)if(t.constructor===CSSStyleRule){const e=Array.from(t.style);for(const s of e)if(s.startsWith("--")){const e=t.style.getPropertyValue(s);this.#O(e,t,s)}}}else{let e="";if(isTextArea(t)){this.#O(t.textContent,t);const s=t.textContent?.match(HTML_COMMENT_TEXT_RE);s&&(e=s[1])}else{const s=Array.from(t.childNodes).find(t=>t.nodeType===Node.COMMENT_NODE);s&&(e=s.textContent?.trim()??"")}if(e){const s=this.#N(t,e);s&&isTextArea(t)?t.textContent=this[s]:this.#O(e,t)}}}formAssociatedCallback(){let t=this.getAttribute("form-assoc");if(!t){const e=this.getAttribute("name");if(!e)return;if(!this.#p("value"))return;t=`value:${e}`}const e={},s=t.split(",");for(const t of s){const[s,r]=t.split(":");e[s.trim()]=r.trim()}this.#o=e,this.#i=new FormData,this.#a=this.attachInternals(),this.#a.setFormValue(this.#i);const r=Object.keys(this.#s.properties),o=this.#n;for(const t of r)o[t]=this[t]}formResetCallback(){const t=this.#n;for(const e of Object.keys(t)){let s=t[e];REF_RE.test(s)&&(s=this.#y(s)),this[e]=s}}static getAttrName(t){let e=Wrec.#e.get(t);return e||(e=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wrec.#e.set(t,e)),e}static getPropName(t){let e=Wrec.#t.get(t);return e||(e=t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()),Wrec.#t.set(t,e)),e}#$(t,e,s){if(1!==s.length)return;const[r]=s;if(!REF_RE.test(r))return;const o=isValueElement(t)||isTextArea(t);let[i,n]=(e??"").split(":");if(!(o&&"value"===i||isTextArea(t)))return;if(n){if(void 0===t["on"+n]){const s="refers to an unsupported event name";this.#T(t,e,s)}}else n="change";const a=getPropName(r);t.addEventListener(n,t=>{const{target:e}=t;if(!e)return;const s=e.value,{type:r}=this.#s.properties[a];this[a]=r===Number?stringToNumber(s):s,this.#M(a)})}#p(t){return Boolean(this.#s.properties[t])}#b(t){const e=Array.from(t.querySelectorAll("*"));for(const t of e)this.#x(t),t.firstElementChild||this.#_(t)}#W(){if(this.#s.formAssociated||null===this.closest("form"))return;const t=this.#s.name;throw new WrecError(`inside form, class ${t} requires "static formAssociated = true;"`)}static get observedAttributes(){const t=Object.keys(this.properties||{}).map(Wrec.getAttrName);return t.includes("disabled")||t.push("disabled"),t}propertyChangedCallback(t,e,s){}#N(t,e){if(!e||!REF_RE.test(e))return;const s=getPropName(e);return void 0===this[s]&&this.#C(t,"",s),s}#M(t){const e=this.#s.propToExprsMap.get(t)||[];for(const t of e){let e=this.#y(t);const s=this.#r.get(t)??[];for(const t of s)if(t instanceof HTMLElement)this.#I(t,e);else if(t instanceof CSSStyleRule);else{const{element:s,attrName:r}=t;s instanceof CSSStyleRule?s.style.setProperty(r,e):updateValue(s,r,e)}}}static register(){const t=this.elementName();customElements.get(t)||customElements.define(t,this)}#R(t,e){const{computed:s,uses:r}=e,o=this.#s.propToComputedMap;function i(e,s){let r=o.get(e);r||(r=[],o.set(e,r)),r.push([t,s])}const n=s.match(REFS_RE)||[];for(const e of n){const r=e.substring(5);void 0===this[r]&&this.#C(null,t,r),"function"!=typeof this[r]&&i(r,s)}if(r)for(const t of r.split(","))i(t,s)}#O(t,e,s=void 0){if(!t)return;const r=this.#L(e,s,t);if(!r){const r=t.replaceAll("this..","this.");return void(s?updateValue(e,s,r):"textContent"in e&&(e.textContent=r))}const o=this.#s;r.forEach(e=>{const s=getPropName(e);if("function"==typeof this[s])return;const r=o.propToExprsMap;let i=r.get(s);i||(i=[],r.set(s,i)),i.includes(t)||i.push(t)});for(const[t,e]of this.#r.entries())for(const s of e){const r=s instanceof HTMLElement||s instanceof CSSStyleRule?s:s.element;r instanceof CSSStyleRule||(r.isConnected||this.#r.set(t,e.filter(t=>t!==s)))}let i=this.#r.get(t);i||(i=[],this.#r.set(t,i)),i.push(s?{element:e,attrName:s}:e),e instanceof HTMLElement&&this.#$(e,s,r);const n=this.#y(t);s?updateValue(e,s,n):this.#I(e,n)}setAttributeSafe(t,e){this.hasAttribute(t)||this.setAttribute(t,e)}setFormValue(t,e){this.#i&&isPrimitive(e)&&(this.#i.set(t,e),this.#a?.setFormValue(this.#i))}#T(t,e,s){const r=this.#s,o=t instanceof HTMLElement?t.localName:"CSS rule";throw new WrecError(`component ${r.elementName()}`+(t?`, element "${o}"`:"")+(e?`, attribute "${e}"`:"")+` ${s}`)}#C(t,e,s){this.#T(t,e,`refers to missing property "${s}"`)}#A(t,e){return this.#h(t,this.getAttribute(e))}#h(t,e){if(e?.match(REFS_RE))return e;const s=this.#s,{type:r}=s.properties[t];return r||this.#T(null,t,"does not specify its type"),r===String?e:r===Number?stringToNumber(e):r===Boolean?"true"===e||"false"!==e&&"null"!==e&&(e&&e!==t&&this.#T(null,t,"is a Boolean attribute, so its value must match attribute name or be missing"),e===t):void 0}#S(t,e,s,r){if(isPrimitive(s)&&this.hasAttribute(r)){s!==(e===Boolean?this.hasAttribute(r):this.#A(t,r))&&updateAttribute(this,t,s)}}#v(t){const e=this.#s.propToComputedMap.get(t)||[];for(const[t,s]of e)this[t]=this.#y(s)}#I(t,e){if(void 0===e)return;const s=t instanceof HTMLElement,r=typeof e;if("string"!==r&&"number"!==r&&this.#T(t,void 0," computed content is not a string or number"),t instanceof HTMLElement&&isTextArea(t))t.value=e;else if(s&&"string"===r&&e.trim().startsWith("<")){const s=sanitize(e);t.replaceChildren(...s),this.#m(t),this.#b(t)}else s&&(t.textContent=e)}#P(t,e){const s=this.#c.get(t);if(!s)return;const r=this.getRootNode();if(!(r instanceof ShadowRoot))return;const{host:o}=r;if(!o)return;o[s]=e}useState(t,e){if(!e){e={};for(const s of Object.keys(t))e[s]=s}this.#D(t,e);for(const[s,r]of Object.entries(e))if(this.#p(r)){const e=getPathValue(t,s);void 0!==e&&(this[r]=e);const o=this.#s.properties[r];o.state=t,o.stateProp=s}t.addListener(this,e)}#f(){const t=this.#s,e=new Set(Object.keys(t.properties));for(const t of e)RESERVED_ATTRS.has(t)&&this.#T(null,"",`property "${t}" is not allowed because it is a reserved attribute`);for(const t of this.getAttributeNames())if("class"!==t&&"id"!==t&&"disabled"!==t&&!t.startsWith("on"))if("form-assoc"!==t){if(!e.has(Wrec.getPropName(t))){if("name"===t){this.#W();continue}this.#T(null,t,"is not a supported attribute")}}else this.#W()}#L(t,e,s){const r=s.match(REFS_RE);if(r)return r.forEach(s=>{const r=getPropName(s);void 0===this[r]&&this.#C(t,e,r)}),r}#D(t,e){for(const[s,r]of Object.entries(e)){let e=getPathValue(t,s);if(void 0===e)throw new WrecError(`invalid state path "${s}"`);e=this[r],this.#p(r)||this.#T(null,r,"refers to missing property in useState map")}}#w(t,e,s){if(s instanceof e)return;let r=typeof s;if("object"===r){const{constructor:o}=s;r=o.name,o!==e&&this.#T(null,t,`was set to a ${r}, but must be a ${e.name}`)}r!==e.name.toLowerCase()&&this.#T(null,t,`was set to a ${r}, but must be a ${e.name}`)}#m(t){const e=Array.from(t.querySelectorAll("*"));for(const t of e){const e=[];for(const s of Array.from(t.attributes)){const r=s.name;if(r.startsWith("on")){let o=r.slice(2);o=o[0].toLowerCase()+o.slice(1).toLowerCase();const i=s.value;let n;this.#L(t,r,i),"function"==typeof this[i]?n=t=>this[i](t):(this.#L(t,r,i),n=()=>this.#y(i)),t.addEventListener(o,n),e.push(r)}}for(const s of e)t.removeAttribute(s)}}}export function css(t,...e){let s=interpolate(t,e);for(;;){const t=CSS_PROPERTY_RE.exec(s);if(!t)break;const e=t[2];if(REFS_TEST_RE.test(e)){const r=t[1];if(!r.startsWith("--")){const o=`--${r}: ${e};\n ${r}: var(--${r})`;s=replace(s,t.index,t[0].length,o)}}}return s}export function html(t,...e){let s=interpolate(t,e);for(;;){const t=HTML_ELEMENT_TEXT_RE.exec(s);if(!t||"style"===t[1])break;const e=removeHtmlComments(t[2]);if(REFS_TEST_RE.test(e)){const r=`\x3c!-- ${e.trim()} --\x3e`;s=replace(s,t.index+t[0].indexOf(">")+1,e.length,r)}}return s}export{WrecState}from"./wrec-state";import{createDeepProxy,proxyToPlainObject}from"./proxies.js";const inBrowser="undefined"!=typeof window&&void 0!==window.document;class WrecError extends Error{}export class WrecState{static#F=new Map;static{inBrowser&&window.addEventListener("beforeunload",()=>{for(const[t,e]of this.#F.entries())if(e.#H){const s=proxyToPlainObject(e);sessionStorage.setItem("wrec-state-"+t,JSON.stringify(s))}})}static get(t){return this.#F.get(t)}#V=Symbol("objectId");#j=[];#k;#H;#B;constructor(t,e,s){if(!t)throw new WrecError("name cannot be empty");if(WrecState.#F.has(t))throw new WrecError(`WrecState with name "${t}" already exists`);if(this.#k=t,this.#H=e,this.#B=createDeepProxy({},this.#z.bind(this)),e&&inBrowser){const e=sessionStorage.getItem("wrec-state-"+t),r=e?JSON.parse(e):void 0;r&&(s=r)}if(s)for(const[t,e]of Object.entries(s))this.addProperty(t,e);WrecState.#F.set(t,this)}addListener(t,e={}){const s=this.#j.find(e=>e.listenerRef.deref()===t);if(s){const{propertyMap:t}=s;for(const[s,r]of Object.entries(e))t[s]=r}else this.#j.push({listenerRef:new WeakRef(t),propertyMap:e})}addProperty(t,e){Object.defineProperty(this,t,{enumerable:!0,get(){return this.#B[t]},set(e){this.#B[t]=e}}),this.#B[t]=e}get id(){return this.#V}log(){console.log("WrecState:",this.#k);for(const[t,e]of Object.entries(this.#B))console.log(` ${t} = ${JSON.stringify(e)}`)}#z(t,e,s){const r=new Set;for(const o of this.#j){const i=o.listenerRef.deref();if(i)if(inBrowser&&i instanceof HTMLElement&&!i.isConnected)r.add(o);else{const{propertyMap:r}=o,n=Object.keys(r);(0===n.length||n.includes(t))&&i.changed(t,r[t],s,e,this)}else r.add(o)}this.#j=this.#j.filter(t=>!r.has(t))}removeListener(t){this.#j=this.#j.filter(e=>e.listenerRef.deref()!==t)}}if(inBrowser){"development"===process.env.NODE_ENV&&(window.WrecState=WrecState)}
1
+ import DOMPurify from"dompurify";import{getPathValue,setPathValue}from"./paths.js";const safeOnAttrNames=new Set(["onblur","onchange","onclick","onfocus","oninput","onkeydown","onreset","onsubmit"]);DOMPurify.addHook("uponSanitizeAttribute",(t,e)=>{const{attrName:s}=e,r=s.toLowerCase();safeOnAttrNames.has(r)&&(e.forceKeepAttr=!0)});class WrecError extends Error{}const CSS_PROPERTY_RE=/([a-zA-Z-]+)\s*:\s*([^;}]+)/g,FIRST_CHAR="a-zA-Z_$",OTHER_CHAR="a-zA-Z_$0-9",IDENTIFIER=`[a-zA-Z_$][${OTHER_CHAR}]*`,HTML_COMMENT_TEXT_RE=/<!--\s*(.*?)\s*-->/,HTML_ELEMENT_TEXT_RE=/<(\w+)(?:\s[^>]*)?>((?:[^<]|<(?!\w))*?)<\/\1>/g,REF_RE=new RegExp(`^this\\.${IDENTIFIER}$`),REFS_RE=new RegExp(`this\\.${IDENTIFIER}(\\.${IDENTIFIER})*`,"g"),REFS_TEST_RE=new RegExp(`this\\.${IDENTIFIER}(\\.${IDENTIFIER})*`),RESERVED_ATTRS=new Set(["class","style"]),SKIP=5;function canDisable(t){return t instanceof HTMLButtonElement||t instanceof HTMLFieldSetElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof Wrec}export function createElement(t,e,s){const r=document.createElement(t);if(e)for(const[t,s]of Object.entries(e))r.setAttribute(t,s);return s&&(r.innerHTML=s),r}const defaultForType=t=>t===String?"":t===Number?0:t!==Boolean&&(t===Array?[]:t===Object?{}:void 0);function getAllDescendants(t){const e=[];let s=t.firstElementChild;for(;s;)e.push(s),s.shadowRoot&&e.push(...getAllDescendants(s.shadowRoot)),s.firstElementChild&&e.push(...getAllDescendants(s)),s=s.nextElementSibling;return e}const getPropName=t=>t.substring(5).split(".")[0];function interpolate(t,e){let s=t[0];return e.forEach((e,r)=>{s+=e+t[r+1]}),s}function isPrimitive(t){const e=typeof t;return"string"===e||"number"===e||"boolean"===e}function isTextArea(t){return"textarea"===t.localName}function isValueElement(t){const{localName:e}=t;return"input"===e||"select"===e}const removeHtmlComments=t=>t.replace(/<!--[\s\S]*?-->/g,"");function replace(t,e,s,r){return t.slice(0,e)+r+t.slice(e+s)}function sanitize(t){let e=t.trim(),s=null;/^\s*<tr[\s>]/i.test(e)?(e=`<table><tbody>${e}</tbody></table>`,s="tbody"):/^\s*<(td|th)[\s>]/i.test(e)?(e=`<table><tbody><tr>${e}</tr></tbody></table>`,s="tr"):/^\s*<option[\s>]/i.test(e)?(e=`<select>${e}</select>`,s="select"):/^\s*<col[\s>]/i.test(e)&&(e=`<table><colgroup>${e}</colgroup></table>`,s="colgroup");const r=DOMPurify.sanitize(e,{ADD_TAGS:["#comment"],ALLOW_UNKNOWN_PROTOCOLS:!0,RETURN_DOM_FRAGMENT:!0});if(s){const t=r.querySelector(s);if(t)return t.childNodes}return r.childNodes}function stringToNumber(t){const e=Number(t);if(isNaN(e))throw new WrecError(`can't convert "${t}" to a number`);return e}function updateAttribute(t,e,s){const[r,o]=e.split(":");if(isPrimitive(s))if("boolean"==typeof s){s?t.setAttribute(r,r):t.removeAttribute(r);t[Wrec.getPropName(r)]=s}else{const o=t.getAttribute(e),i=String(s);o!==i&&(t.setAttribute(r,i),"value"===r&&isValueElement(t)&&(t.value=i))}else{t[Wrec.getPropName(e)]=s}}function updateValue(t,e,s){const[r,o]=e.split(":");t instanceof CSSStyleRule?t.style.setProperty(r,s):(updateAttribute(t,r,s),"value"===r&&isValueElement(t)&&(t.value=s))}async function waitForDefines(t){const e=new Set;for(const s of getAllDescendants(t.content)){const{localName:t}=s;t.includes("-")&&e.add(t)}function s(t){return new Promise((e,s)=>{setTimeout(()=>{s(new Error(`custom element <${t}> not defined`))},1e3)})}return Promise.all([...e].map(async t=>Promise.race([customElements.whenDefined(t),s(t)])))}export class Wrec extends HTMLElement{static#t=new Map;static#e=new Map;static css="";static formAssociated=!1;static html="";static properties;static propToComputedMap;static propToExprsMap;static template=null;#s=this.constructor;#r=new Map;#o={};#i;#n={};#a=null;#c=new Map;constructor(){super(),this.attachShadow({mode:"open"});const t=this.#s;t.properties||(t.properties={}),t.propToComputedMap||(t.propToComputedMap=new Map),t.propToExprsMap||(t.propToExprsMap=new Map)}attributeChangedCallback(t,e,s){"disabled"===t&&this.#l();const r=Wrec.getPropName(t);if(this.#p(r)){const t=this.#h(r,String(s));this[r]=t;const o=this.#o[r];o&&this.setFormValue(o,String(t)),this.propertyChangedCallback(r,e,s)}}async#u(){const t=this.#s;let{template:e}=t;if(!e){e=t.template=document.createElement("template");let s="<style>\n :host([hidden]) { display: none; }";t.css&&(s+=t.css),s+="</style>\n";let r=t.html.trim();r.startsWith("<")||(r=`<span>\x3c!--${r}--\x3e</span>`),e.innerHTML=s+r}await waitForDefines(e),this.shadowRoot.replaceChildren(e.content.cloneNode(!0))}changed(t,e,s){this[e]=s}connectedCallback(){this.#f(),this.#d(),this.#u().then(()=>{this.hasAttribute("disabled")&&this.#l(),this.#m(this.shadowRoot),this.#b(this.shadowRoot),this.#E()})}#E(){const t=this.#s,{properties:e}=t;for(const[t,{computed:s}]of Object.entries(e))s&&(this[t]=this.#y(s))}#d(){const t=this.#s,{observedAttributes:e,properties:s}=t;for(const[t,r]of Object.entries(s))this.#g(t,r,e)}#g(t,e,s){const r=Wrec.getAttrName(t),o=this.hasAttribute(r);e.required&&!o&&this.#T(this,t,"is a required attribute");let i=e.value;this.hasOwnProperty(t)&&(i=this[t],delete this[t]);const{type:n}=e,a=n===Boolean?i||o:s.includes(r)&&o?this.#w(t,r):i||defaultForType(n),c="#"+t;this[c]=a,e.computed&&this.#R(t,e),Object.defineProperty(this,t,{enumerable:!0,get(){return this[c]},set(s){n===Number&&"string"==typeof s&&(s=stringToNumber(s));const o=this[c];if(s===o)return;this.#A(t,n,s),this[c]=s;const{state:i,stateProp:a}=this.#s.properties[t];a&&setPathValue(i,a,s),this.#v(t),this.#S(t,n,s,r),this.#M(t),this.#P(t,s);const l=this.#o[t];l&&this.setFormValue(l,String(s)),this.propertyChangedCallback(t,o,s),e.dispatch&&this.dispatch("change",{tagName:this.localName,property:t,oldValue:o,value:s})}})}#l(){const t=this.hasAttribute("disabled"),e=getAllDescendants(this.shadowRoot);for(const s of e)canDisable(s)&&(s.disabled=t)}disconnectedCallback(){this.#r.clear(),this.#n.clear(),this.#c.clear()}dispatch(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}displayIfSet(t,e="block"){return`display: ${t?e:"none"}`}static elementName(){return this.name.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}#x(t){const e=t instanceof Wrec;for(const s of t.getAttributeNames()){const r=t.getAttribute(s),o=this.#N(t,r);if(o){const r=this[o];void 0===r&&this.#C(t,s,o),t[o]=r;let[i,n]=s.split(":");if("value"===i)if(n){if(void 0===t["on"+n]){const e="refers to an unsupported event name";this.#T(t,s,e)}t.setAttribute(i,this[o])}else n="change";e&&t.#c.set(Wrec.getPropName(i),o)}this.#O(r,t,s)}}#y(t){const e=new Function("return "+t).call(this);return Array.isArray(e)?e.join(""):e}#_(t){const{localName:e}=t;if("style"===e){const{sheet:e}=t,s=e?.cssRules??[],r=Array.from(s);for(const t of r)if(t.constructor===CSSStyleRule){const e=Array.from(t.style);for(const s of e)if(s.startsWith("--")){const e=t.style.getPropertyValue(s);this.#O(e,t,s)}}}else{let e="";if(isTextArea(t)){this.#O(t.textContent,t);const s=t.textContent?.match(HTML_COMMENT_TEXT_RE);s&&(e=s[1])}else{const s=Array.from(t.childNodes).find(t=>t.nodeType===Node.COMMENT_NODE);s&&(e=s.textContent?.trim()??"")}if(e){const s=this.#N(t,e);s&&isTextArea(t)?t.textContent=this[s]:this.#O(e,t)}}}formAssociatedCallback(){let t=this.getAttribute("form-assoc");if(!t){const e=this.getAttribute("name");if(!e)return;if(!this.#p("value"))return;t=`value:${e}`}const e={},s=t.split(",");for(const t of s){const[s,r]=t.split(":");e[s.trim()]=r.trim()}this.#o=e,this.#i=new FormData,this.#a=this.attachInternals(),this.#a.setFormValue(this.#i);const r=Object.keys(this.#s.properties),o=this.#n;for(const t of r)o[t]=this[t]}formResetCallback(){const t=this.#n;for(const e of Object.keys(t)){let s=t[e];REF_RE.test(s)&&(s=this.#y(s)),this[e]=s}}static getAttrName(t){let e=Wrec.#e.get(t);return e||(e=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wrec.#e.set(t,e)),e}static getPropName(t){let e=Wrec.#t.get(t);return e||(e=t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase()),Wrec.#t.set(t,e)),e}#$(t,e,s){if(1!==s.length)return;const[r]=s;if(!REF_RE.test(r))return;const o=isValueElement(t)||isTextArea(t);let[i,n]=(e??"").split(":");if(!(o&&"value"===i||isTextArea(t)))return;if(n){if(void 0===t["on"+n]){const s="refers to an unsupported event name";this.#T(t,e,s)}}else n="change";const a=getPropName(r);t.addEventListener(n,t=>{const{target:e}=t;if(!e)return;const s=e.value,{type:r}=this.#s.properties[a];this[a]=r===Number?stringToNumber(s):s,this.#M(a)})}#p(t){return Boolean(this.#s.properties[t])}#b(t){const e=Array.from(t.querySelectorAll("*"));for(const t of e)this.#x(t),t.firstElementChild||this.#_(t)}#W(){if(this.#s.formAssociated||null===this.closest("form"))return;const t=this.#s.name;throw new WrecError(`inside form, class ${t} requires "static formAssociated = true;"`)}static get observedAttributes(){const t=Object.keys(this.properties||{}).map(Wrec.getAttrName);return t.includes("disabled")||t.push("disabled"),t}propertyChangedCallback(t,e,s){}#N(t,e){if(!e||!REF_RE.test(e))return;const s=getPropName(e);return void 0===this[s]&&this.#C(t,"",s),s}#M(t){const e=this.#s.propToExprsMap.get(t)||[];for(const t of e){let e=this.#y(t);const s=this.#r.get(t)??[];for(const t of s)if(t instanceof HTMLElement)this.#I(t,e);else if(t instanceof CSSStyleRule);else{const{element:s,attrName:r}=t;s instanceof CSSStyleRule?s.style.setProperty(r,e):updateValue(s,r,e)}}}static register(){const t=this.elementName();customElements.get(t)||customElements.define(t,this)}#R(t,e){const{computed:s,uses:r}=e,o=this.#s.propToComputedMap;function i(e,s){let r=o.get(e);r||(r=[],o.set(e,r)),r.push([t,s])}const n=s.match(REFS_RE)||[];for(const e of n){const r=e.substring(5);void 0===this[r]&&this.#C(null,t,r),"function"!=typeof this[r]&&i(r,s)}if(r)for(const t of r.split(","))i(t,s)}#O(t,e,s=void 0){if(!t)return;const r=this.#L(e,s,t);if(!r){const r=t.replaceAll("this..","this.");return void(s?updateValue(e,s,r):"textContent"in e&&(e.textContent=r))}const o=this.#s;r.forEach(e=>{const s=getPropName(e);if("function"==typeof this[s])return;const r=o.propToExprsMap;let i=r.get(s);i||(i=[],r.set(s,i)),i.includes(t)||i.push(t)});for(const[t,e]of this.#r.entries())for(const s of e){const r=s instanceof HTMLElement||s instanceof CSSStyleRule?s:s.element;r instanceof CSSStyleRule||(r.isConnected||this.#r.set(t,e.filter(t=>t!==s)))}let i=this.#r.get(t);i||(i=[],this.#r.set(t,i)),i.push(s?{element:e,attrName:s}:e),e instanceof HTMLElement&&this.#$(e,s,r);const n=this.#y(t);s?updateValue(e,s,n):this.#I(e,n)}setAttributeSafe(t,e){this.hasAttribute(t)||this.setAttribute(t,e)}setFormValue(t,e){this.#i&&isPrimitive(e)&&(this.#i.set(t,e),this.#a?.setFormValue(this.#i))}#T(t,e,s){const r=this.#s,o=t instanceof HTMLElement?t.localName:"CSS rule";throw new WrecError(`component ${r.elementName()}`+(t?`, element "${o}"`:"")+(e?`, attribute "${e}"`:"")+` ${s}`)}#C(t,e,s){this.#T(t,e,`refers to missing property "${s}"`)}#w(t,e){return this.#h(t,this.getAttribute(e))}#h(t,e){if(e?.match(REFS_RE))return e;const s=this.#s,{type:r}=s.properties[t];return r||this.#T(null,t,"does not specify its type"),r===String?e:r===Number?stringToNumber(e):r===Boolean?"true"===e||"false"!==e&&"null"!==e&&(e&&e!==t&&this.#T(null,t,"is a Boolean attribute, so its value must match attribute name or be missing"),e===t):void 0}#S(t,e,s,r){if(isPrimitive(s)&&this.hasAttribute(r)){s!==(e===Boolean?this.hasAttribute(r):this.#w(t,r))&&updateAttribute(this,t,s)}}#v(t){const e=this.#s.propToComputedMap.get(t)||[];for(const[t,s]of e)this[t]=this.#y(s)}#I(t,e){if(void 0===e)return;const s=t instanceof HTMLElement,r=typeof e;if("string"!==r&&"number"!==r&&this.#T(t,void 0," computed content is not a string or number"),t instanceof HTMLElement&&isTextArea(t))t.value=e;else if(s&&"string"===r&&e.trim().startsWith("<")){const s=sanitize(e);t.replaceChildren(...s),this.#m(t),this.#b(t)}else s&&(t.textContent=e)}#P(t,e){const s=this.#c.get(t);if(!s)return;const r=this.getRootNode();if(!(r instanceof ShadowRoot))return;const{host:o}=r;if(!o)return;o[s]=e}useState(t,e){if(!e){e={};for(const s of Object.keys(t))e[s]=s}this.#D(t,e);for(const[s,r]of Object.entries(e))if(this.#p(r)){const e=getPathValue(t,s);void 0!==e&&(this[r]=e);const o=this.#s.properties[r];o.state=t,o.stateProp=s}t.addListener(this,e)}#f(){const t=this.#s,e=new Set(Object.keys(t.properties));for(const t of e)RESERVED_ATTRS.has(t)&&this.#T(null,"",`property "${t}" is not allowed because it is a reserved attribute`);for(const t of this.getAttributeNames())if("class"!==t&&"id"!==t&&"disabled"!==t&&!t.startsWith("on"))if("form-assoc"!==t){if(!e.has(Wrec.getPropName(t))){if("name"===t){this.#W();continue}this.#T(null,t,"is not a supported attribute")}}else this.#W()}#L(t,e,s){const r=s.match(REFS_RE);if(r)return r.forEach(s=>{const r=getPropName(s);void 0===this[r]&&this.#C(t,e,r)}),r}#D(t,e){for(const[s,r]of Object.entries(e)){let e=getPathValue(t,s);if(void 0===e)throw new WrecError(`invalid state path "${s}"`);e=this[r],this.#p(r)||this.#T(null,r,"refers to missing property in useState map")}}#A(t,e,s){if(s instanceof e)return;let r=typeof s;if("object"===r){const{constructor:o}=s;r=o.name,o!==e&&this.#T(null,t,`was set to a ${r}, but must be a ${e.name}`)}r!==e.name.toLowerCase()&&this.#T(null,t,`was set to a ${r}, but must be a ${e.name}`)}#m(t){const e=Array.from(t.querySelectorAll("*"));for(const t of e){const e=[];for(const s of Array.from(t.attributes)){const r=s.name;if(r.startsWith("on")){let o=r.slice(2);o=o[0].toLowerCase()+o.slice(1).toLowerCase();const i=s.value;let n;this.#L(t,r,i),"function"==typeof this[i]?n=t=>this[i](t):(this.#L(t,r,i),n=()=>this.#y(i)),t.addEventListener(o,n),e.push(r)}}for(const s of e)t.removeAttribute(s)}}}export function css(t,...e){let s=interpolate(t,e);for(;;){const t=CSS_PROPERTY_RE.exec(s);if(!t)break;const e=t[2];if(REFS_TEST_RE.test(e)){const r=t[1];if(!r.startsWith("--")){const o=`--${r}: ${e};\n ${r}: var(--${r})`;s=replace(s,t.index,t[0].length,o)}}}return s}export function html(t,...e){let s=interpolate(t,e);for(;;){const t=HTML_ELEMENT_TEXT_RE.exec(s);if(!t||"style"===t[1])break;const e=removeHtmlComments(t[2]);if(REFS_TEST_RE.test(e)){const r=`\x3c!-- ${e.trim()} --\x3e`;s=replace(s,t.index+t[0].indexOf(">")+1,e.length,r)}}return s}export{WrecState}from"./wrec-state";import{createDeepProxy,proxyToPlainObject}from"./proxies.js";const inBrowser="undefined"!=typeof window&&void 0!==window.document;class WrecError extends Error{}export class WrecState{static#H=new Map;static{inBrowser&&window.addEventListener("beforeunload",()=>{for(const[t,e]of this.#H.entries())if(e.#F){const s=proxyToPlainObject(e);sessionStorage.setItem("wrec-state-"+t,JSON.stringify(s))}})}static get(t){return this.#H.get(t)}#V=Symbol("objectId");#j=[];#k;#F;#B;constructor(t,e,s){if(!t)throw new WrecError("name cannot be empty");if(WrecState.#H.has(t))throw new WrecError(`WrecState with name "${t}" already exists`);if(this.#k=t,this.#F=e,this.#B=createDeepProxy({},this.#z.bind(this)),e&&inBrowser){const e=sessionStorage.getItem("wrec-state-"+t),r=e?JSON.parse(e):void 0;r&&(s=r)}if(s)for(const[t,e]of Object.entries(s))this.addProperty(t,e);WrecState.#H.set(t,this)}addListener(t,e={}){const s=this.#j.find(e=>e.listenerRef.deref()===t);if(s){const{propertyMap:t}=s;for(const[s,r]of Object.entries(e))t[s]=r}else this.#j.push({listenerRef:new WeakRef(t),propertyMap:e})}addProperty(t,e){Object.defineProperty(this,t,{enumerable:!0,get(){return this.#B[t]},set(e){this.#B[t]=e}}),this.#B[t]=e}get id(){return this.#V}log(){console.log("WrecState:",this.#k);for(const[t,e]of Object.entries(this.#B))console.log(` ${t} = ${JSON.stringify(e)}`)}#z(t,e,s){const r=new Set;for(const o of this.#j){const i=o.listenerRef.deref();if(i)if(inBrowser&&i instanceof HTMLElement&&!i.isConnected)r.add(o);else{const{propertyMap:r}=o,n=Object.keys(r);(0===n.length||n.includes(t))&&i.changed(t,r[t],s,e,this)}else r.add(o)}this.#j=this.#j.filter(t=>!r.has(t))}removeListener(t){this.#j=this.#j.filter(e=>e.listenerRef.deref()!==t)}}if(inBrowser){"development"===process.env.NODE_ENV&&(window.WrecState=WrecState)}
package/dist/wrec.umd.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(T,E){typeof exports=="object"&&typeof module<"u"?E(exports):typeof define=="function"&&define.amd?define(["exports"],E):(T=typeof globalThis<"u"?globalThis:T||self,E(T.wrec={}))})(this,(function(T){"use strict";var fn=T=>{throw TypeError(T)};var ge=(T,E,N)=>E.has(T)||fn("Cannot "+N);var w=(T,E,N)=>(ge(T,E,"read from private field"),N?N.call(T):E.get(T)),q=(T,E,N)=>E.has(T)?fn("Cannot add the same private member more than once"):E instanceof WeakSet?E.add(T):E.set(T,N),at=(T,E,N,bt)=>(ge(T,E,"write to private field"),bt?bt.call(T,N):E.set(T,N),N),un=(T,E,N)=>(ge(T,E,"access private method"),N);var K,Mt,H,dt,Tt,Y,Dt,pn;const{entries:E,setPrototypeOf:N,isFrozen:bt,getPrototypeOf:mn,getOwnPropertyDescriptor:hn}=Object;let{freeze:L,seal:k,create:zt}=Object,{apply:$t,construct:Wt}=typeof Reflect<"u"&&Reflect;L||(L=function(t){return t}),k||(k=function(t){return t}),$t||($t=function(t,e){for(var n=arguments.length,s=new Array(n>2?n-2:0),i=2;i<n;i++)s[i-2]=arguments[i];return t.apply(e,s)}),Wt||(Wt=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];return new t(...n)});const St=D(Array.prototype.forEach),dn=D(Array.prototype.lastIndexOf),Ee=D(Array.prototype.pop),ct=D(Array.prototype.push),Tn=D(Array.prototype.splice),yt=D(String.prototype.toLowerCase),Gt=D(String.prototype.toString),Bt=D(String.prototype.match),lt=D(String.prototype.replace),gn=D(String.prototype.indexOf),En=D(String.prototype.trim),F=D(Object.prototype.hasOwnProperty),M=D(RegExp.prototype.test),ft=An(TypeError);function D(r){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];return $t(r,t,n)}}function An(r){return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Wt(r,e)}}function d(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yt;N&&N(r,null);let n=t.length;for(;n--;){let s=t[n];if(typeof s=="string"){const i=e(s);i!==s&&(bt(t)||(t[n]=i),s=i)}r[s]=!0}return r}function _n(r){for(let t=0;t<r.length;t++)F(r,t)||(r[t]=null);return r}function U(r){const t=zt(null);for(const[e,n]of E(r))F(r,e)&&(Array.isArray(n)?t[e]=_n(n):n&&typeof n=="object"&&n.constructor===Object?t[e]=U(n):t[e]=n);return t}function ut(r,t){for(;r!==null;){const n=hn(r,t);if(n){if(n.get)return D(n.get);if(typeof n.value=="function")return D(n.value)}r=mn(r)}function e(){return null}return e}const Ae=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"]),jt=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"]),Yt=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"]),bn=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"]),Vt=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"]),Sn=L(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_e=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"]),Xt=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"]),Se=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"]),Rt=L(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yn=k(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Rn=k(/<%[\w\W]*|[\w\W]*%>/gm),On=k(/\$\{[\w\W]*/gm),wn=k(/^data-[\-\w.\u00B7-\uFFFF]+$/),Cn=k(/^aria-[\-\w]+$/),ye=k(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Nn=k(/^(?:\w+script|data):/i),Ln=k(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Re=k(/^html$/i),Mn=k(/^[a-z][.\w]*(-[.\w]+)+$/i);var Oe=Object.freeze({__proto__:null,ARIA_ATTR:Cn,ATTR_WHITESPACE:Ln,CUSTOM_ELEMENT:Mn,DATA_ATTR:wn,DOCTYPE_NAME:Re,ERB_EXPR:Rn,IS_ALLOWED_URI:ye,IS_SCRIPT_OR_DATA:Nn,MUSTACHE_EXPR:yn,TMPLIT_EXPR:On});const pt={element:1,text:3,progressingInstruction:7,comment:8,document:9},Dn=function(){return typeof window>"u"?null:window},In=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const s="data-tt-policy-suffix";e&&e.hasAttribute(s)&&(n=e.getAttribute(s));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},we=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ce(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dn();const t=f=>Ce(f);if(t.version="3.3.1",t.removed=[],!r||!r.document||r.document.nodeType!==pt.document||!r.Element)return t.isSupported=!1,t;let{document:e}=r;const n=e,s=n.currentScript,{DocumentFragment:i,HTMLTemplateElement:c,Node:u,Element:p,NodeFilter:m,NamedNodeMap:h=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:y,DOMParser:V,trustedTypes:W}=r,X=p.prototype,Xn=ut(X,"cloneNode"),qn=ut(X,"remove"),Kn=ut(X,"nextSibling"),Zn=ut(X,"childNodes"),It=ut(X,"parentNode");if(typeof c=="function"){const f=e.createElement("template");f.content&&f.content.ownerDocument&&(e=f.content.ownerDocument)}let v,gt="";const{implementation:ee,createNodeIterator:Jn,createDocumentFragment:Qn,getElementsByTagName:to}=e,{importNode:eo}=n;let P=we();t.isSupported=typeof E=="function"&&typeof It=="function"&&ee&&ee.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ne,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:no,ARIA_ATTR:oo,IS_SCRIPT_OR_DATA:so,ATTR_WHITESPACE:He,CUSTOM_ELEMENT:io}=Oe;let{IS_ALLOWED_URI:ze}=Oe,S=null;const $e=d({},[...Ae,...jt,...Yt,...Vt,..._e]);let R=null;const We=d({},[...be,...Xt,...Se,...Rt]);let A=Object.seal(zt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Et=null,ie=null;const tt=Object.seal(zt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ge=!0,re=!0,Be=!1,je=!0,et=!1,vt=!0,Z=!1,ae=!1,ce=!1,nt=!1,Pt=!1,xt=!1,Ye=!0,Ve=!1;const ro="user-content-";let le=!0,At=!1,ot={},z=null;const fe=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"]);let Xe=null;const qe=d({},["audio","video","img","source","image","track"]);let ue=null;const Ke=d({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),kt="http://www.w3.org/1998/Math/MathML",Ft="http://www.w3.org/2000/svg",G="http://www.w3.org/1999/xhtml";let st=G,pe=!1,me=null;const ao=d({},[kt,Ft,G],Gt);let Ut=d({},["mi","mo","mn","ms","mtext"]),Ht=d({},["annotation-xml"]);const co=d({},["title","style","font","a","script"]);let _t=null;const lo=["application/xhtml+xml","text/html"],fo="text/html";let b=null,it=null;const uo=e.createElement("form"),Ze=function(o){return o instanceof RegExp||o instanceof Function},he=function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(it&&it===o)){if((!o||typeof o!="object")&&(o={}),o=U(o),_t=lo.indexOf(o.PARSER_MEDIA_TYPE)===-1?fo:o.PARSER_MEDIA_TYPE,b=_t==="application/xhtml+xml"?Gt:yt,S=F(o,"ALLOWED_TAGS")?d({},o.ALLOWED_TAGS,b):$e,R=F(o,"ALLOWED_ATTR")?d({},o.ALLOWED_ATTR,b):We,me=F(o,"ALLOWED_NAMESPACES")?d({},o.ALLOWED_NAMESPACES,Gt):ao,ue=F(o,"ADD_URI_SAFE_ATTR")?d(U(Ke),o.ADD_URI_SAFE_ATTR,b):Ke,Xe=F(o,"ADD_DATA_URI_TAGS")?d(U(qe),o.ADD_DATA_URI_TAGS,b):qe,z=F(o,"FORBID_CONTENTS")?d({},o.FORBID_CONTENTS,b):fe,Et=F(o,"FORBID_TAGS")?d({},o.FORBID_TAGS,b):U({}),ie=F(o,"FORBID_ATTR")?d({},o.FORBID_ATTR,b):U({}),ot=F(o,"USE_PROFILES")?o.USE_PROFILES:!1,Ge=o.ALLOW_ARIA_ATTR!==!1,re=o.ALLOW_DATA_ATTR!==!1,Be=o.ALLOW_UNKNOWN_PROTOCOLS||!1,je=o.ALLOW_SELF_CLOSE_IN_ATTR!==!1,et=o.SAFE_FOR_TEMPLATES||!1,vt=o.SAFE_FOR_XML!==!1,Z=o.WHOLE_DOCUMENT||!1,nt=o.RETURN_DOM||!1,Pt=o.RETURN_DOM_FRAGMENT||!1,xt=o.RETURN_TRUSTED_TYPE||!1,ce=o.FORCE_BODY||!1,Ye=o.SANITIZE_DOM!==!1,Ve=o.SANITIZE_NAMED_PROPS||!1,le=o.KEEP_CONTENT!==!1,At=o.IN_PLACE||!1,ze=o.ALLOWED_URI_REGEXP||ye,st=o.NAMESPACE||G,Ut=o.MATHML_TEXT_INTEGRATION_POINTS||Ut,Ht=o.HTML_INTEGRATION_POINTS||Ht,A=o.CUSTOM_ELEMENT_HANDLING||{},o.CUSTOM_ELEMENT_HANDLING&&Ze(o.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(A.tagNameCheck=o.CUSTOM_ELEMENT_HANDLING.tagNameCheck),o.CUSTOM_ELEMENT_HANDLING&&Ze(o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(A.attributeNameCheck=o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),o.CUSTOM_ELEMENT_HANDLING&&typeof o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(A.allowCustomizedBuiltInElements=o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),et&&(re=!1),Pt&&(nt=!0),ot&&(S=d({},_e),R=[],ot.html===!0&&(d(S,Ae),d(R,be)),ot.svg===!0&&(d(S,jt),d(R,Xt),d(R,Rt)),ot.svgFilters===!0&&(d(S,Yt),d(R,Xt),d(R,Rt)),ot.mathMl===!0&&(d(S,Vt),d(R,Se),d(R,Rt))),o.ADD_TAGS&&(typeof o.ADD_TAGS=="function"?tt.tagCheck=o.ADD_TAGS:(S===$e&&(S=U(S)),d(S,o.ADD_TAGS,b))),o.ADD_ATTR&&(typeof o.ADD_ATTR=="function"?tt.attributeCheck=o.ADD_ATTR:(R===We&&(R=U(R)),d(R,o.ADD_ATTR,b))),o.ADD_URI_SAFE_ATTR&&d(ue,o.ADD_URI_SAFE_ATTR,b),o.FORBID_CONTENTS&&(z===fe&&(z=U(z)),d(z,o.FORBID_CONTENTS,b)),o.ADD_FORBID_CONTENTS&&(z===fe&&(z=U(z)),d(z,o.ADD_FORBID_CONTENTS,b)),le&&(S["#text"]=!0),Z&&d(S,["html","head","body"]),S.table&&(d(S,["tbody"]),delete Et.tbody),o.TRUSTED_TYPES_POLICY){if(typeof o.TRUSTED_TYPES_POLICY.createHTML!="function")throw ft('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof o.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ft('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=o.TRUSTED_TYPES_POLICY,gt=v.createHTML("")}else v===void 0&&(v=In(W,s)),v!==null&&typeof gt=="string"&&(gt=v.createHTML(""));L&&L(o),it=o}},Je=d({},[...jt,...Yt,...bn]),Qe=d({},[...Vt,...Sn]),po=function(o){let a=It(o);(!a||!a.tagName)&&(a={namespaceURI:st,tagName:"template"});const l=yt(o.tagName),g=yt(a.tagName);return me[o.namespaceURI]?o.namespaceURI===Ft?a.namespaceURI===G?l==="svg":a.namespaceURI===kt?l==="svg"&&(g==="annotation-xml"||Ut[g]):!!Je[l]:o.namespaceURI===kt?a.namespaceURI===G?l==="math":a.namespaceURI===Ft?l==="math"&&Ht[g]:!!Qe[l]:o.namespaceURI===G?a.namespaceURI===Ft&&!Ht[g]||a.namespaceURI===kt&&!Ut[g]?!1:!Qe[l]&&(co[l]||!Je[l]):!!(_t==="application/xhtml+xml"&&me[o.namespaceURI]):!1},$=function(o){ct(t.removed,{element:o});try{It(o).removeChild(o)}catch{qn(o)}},J=function(o,a){try{ct(t.removed,{attribute:a.getAttributeNode(o),from:a})}catch{ct(t.removed,{attribute:null,from:a})}if(a.removeAttribute(o),o==="is")if(nt||Pt)try{$(a)}catch{}else try{a.setAttribute(o,"")}catch{}},tn=function(o){let a=null,l=null;if(ce)o="<remove></remove>"+o;else{const _=Bt(o,/^[\r\n\t ]+/);l=_&&_[0]}_t==="application/xhtml+xml"&&st===G&&(o='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+o+"</body></html>");const g=v?v.createHTML(o):o;if(st===G)try{a=new V().parseFromString(g,_t)}catch{}if(!a||!a.documentElement){a=ee.createDocument(st,"template",null);try{a.documentElement.innerHTML=pe?gt:g}catch{}}const C=a.body||a.documentElement;return o&&l&&C.insertBefore(e.createTextNode(l),C.childNodes[0]||null),st===G?to.call(a,Z?"html":"body")[0]:Z?a.documentElement:C},en=function(o){return Jn.call(o.ownerDocument||o,o,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},de=function(o){return o instanceof y&&(typeof o.nodeName!="string"||typeof o.textContent!="string"||typeof o.removeChild!="function"||!(o.attributes instanceof h)||typeof o.removeAttribute!="function"||typeof o.setAttribute!="function"||typeof o.namespaceURI!="string"||typeof o.insertBefore!="function"||typeof o.hasChildNodes!="function")},nn=function(o){return typeof u=="function"&&o instanceof u};function B(f,o,a){St(f,l=>{l.call(t,o,a,it)})}const on=function(o){let a=null;if(B(P.beforeSanitizeElements,o,null),de(o))return $(o),!0;const l=b(o.nodeName);if(B(P.uponSanitizeElement,o,{tagName:l,allowedTags:S}),vt&&o.hasChildNodes()&&!nn(o.firstElementChild)&&M(/<[/\w!]/g,o.innerHTML)&&M(/<[/\w!]/g,o.textContent)||o.nodeType===pt.progressingInstruction||vt&&o.nodeType===pt.comment&&M(/<[/\w]/g,o.data))return $(o),!0;if(!(tt.tagCheck instanceof Function&&tt.tagCheck(l))&&(!S[l]||Et[l])){if(!Et[l]&&rn(l)&&(A.tagNameCheck instanceof RegExp&&M(A.tagNameCheck,l)||A.tagNameCheck instanceof Function&&A.tagNameCheck(l)))return!1;if(le&&!z[l]){const g=It(o)||o.parentNode,C=Zn(o)||o.childNodes;if(C&&g){const _=C.length;for(let x=_-1;x>=0;--x){const j=Xn(C[x],!0);j.__removalCount=(o.__removalCount||0)+1,g.insertBefore(j,Kn(o))}}}return $(o),!0}return o instanceof p&&!po(o)||(l==="noscript"||l==="noembed"||l==="noframes")&&M(/<\/no(script|embed|frames)/i,o.innerHTML)?($(o),!0):(et&&o.nodeType===pt.text&&(a=o.textContent,St([ne,oe,se],g=>{a=lt(a,g," ")}),o.textContent!==a&&(ct(t.removed,{element:o.cloneNode()}),o.textContent=a)),B(P.afterSanitizeElements,o,null),!1)},sn=function(o,a,l){if(Ye&&(a==="id"||a==="name")&&(l in e||l in uo))return!1;if(!(re&&!ie[a]&&M(no,a))){if(!(Ge&&M(oo,a))){if(!(tt.attributeCheck instanceof Function&&tt.attributeCheck(a,o))){if(!R[a]||ie[a]){if(!(rn(o)&&(A.tagNameCheck instanceof RegExp&&M(A.tagNameCheck,o)||A.tagNameCheck instanceof Function&&A.tagNameCheck(o))&&(A.attributeNameCheck instanceof RegExp&&M(A.attributeNameCheck,a)||A.attributeNameCheck instanceof Function&&A.attributeNameCheck(a,o))||a==="is"&&A.allowCustomizedBuiltInElements&&(A.tagNameCheck instanceof RegExp&&M(A.tagNameCheck,l)||A.tagNameCheck instanceof Function&&A.tagNameCheck(l))))return!1}else if(!ue[a]){if(!M(ze,lt(l,He,""))){if(!((a==="src"||a==="xlink:href"||a==="href")&&o!=="script"&&gn(l,"data:")===0&&Xe[o])){if(!(Be&&!M(so,lt(l,He,"")))){if(l)return!1}}}}}}}return!0},rn=function(o){return o!=="annotation-xml"&&Bt(o,io)},an=function(o){B(P.beforeSanitizeAttributes,o,null);const{attributes:a}=o;if(!a||de(o))return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0};let g=a.length;for(;g--;){const C=a[g],{name:_,namespaceURI:x,value:j}=C,rt=b(_),Te=j;let O=_==="value"?Te:En(Te);if(l.attrName=rt,l.attrValue=O,l.keepAttr=!0,l.forceKeepAttr=void 0,B(P.uponSanitizeAttribute,o,l),O=l.attrValue,Ve&&(rt==="id"||rt==="name")&&(J(_,o),O=ro+O),vt&&M(/((--!?|])>)|<\/(style|title|textarea)/i,O)){J(_,o);continue}if(rt==="attributename"&&Bt(O,"href")){J(_,o);continue}if(l.forceKeepAttr)continue;if(!l.keepAttr){J(_,o);continue}if(!je&&M(/\/>/i,O)){J(_,o);continue}et&&St([ne,oe,se],ln=>{O=lt(O,ln," ")});const cn=b(o.nodeName);if(!sn(cn,rt,O)){J(_,o);continue}if(v&&typeof W=="object"&&typeof W.getAttributeType=="function"&&!x)switch(W.getAttributeType(cn,rt)){case"TrustedHTML":{O=v.createHTML(O);break}case"TrustedScriptURL":{O=v.createScriptURL(O);break}}if(O!==Te)try{x?o.setAttributeNS(x,_,O):o.setAttribute(_,O),de(o)?$(o):Ee(t.removed)}catch{J(_,o)}}B(P.afterSanitizeAttributes,o,null)},mo=function f(o){let a=null;const l=en(o);for(B(P.beforeSanitizeShadowDOM,o,null);a=l.nextNode();)B(P.uponSanitizeShadowNode,a,null),on(a),an(a),a.content instanceof i&&f(a.content);B(P.afterSanitizeShadowDOM,o,null)};return t.sanitize=function(f){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=null,l=null,g=null,C=null;if(pe=!f,pe&&(f="<!-->"),typeof f!="string"&&!nn(f))if(typeof f.toString=="function"){if(f=f.toString(),typeof f!="string")throw ft("dirty is not a string, aborting")}else throw ft("toString is not a function");if(!t.isSupported)return f;if(ae||he(o),t.removed=[],typeof f=="string"&&(At=!1),At){if(f.nodeName){const j=b(f.nodeName);if(!S[j]||Et[j])throw ft("root node is forbidden and cannot be sanitized in-place")}}else if(f instanceof u)a=tn("<!---->"),l=a.ownerDocument.importNode(f,!0),l.nodeType===pt.element&&l.nodeName==="BODY"||l.nodeName==="HTML"?a=l:a.appendChild(l);else{if(!nt&&!et&&!Z&&f.indexOf("<")===-1)return v&&xt?v.createHTML(f):f;if(a=tn(f),!a)return nt?null:xt?gt:""}a&&ce&&$(a.firstChild);const _=en(At?f:a);for(;g=_.nextNode();)on(g),an(g),g.content instanceof i&&mo(g.content);if(At)return f;if(nt){if(Pt)for(C=Qn.call(a.ownerDocument);a.firstChild;)C.appendChild(a.firstChild);else C=a;return(R.shadowroot||R.shadowrootmode)&&(C=eo.call(n,C,!0)),C}let x=Z?a.outerHTML:a.innerHTML;return Z&&S["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&M(Re,a.ownerDocument.doctype.name)&&(x="<!DOCTYPE "+a.ownerDocument.doctype.name+`>
2
- `+x),et&&St([ne,oe,se],j=>{x=lt(x,j," ")}),v&&xt?v.createHTML(x):x},t.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};he(f),ae=!0},t.clearConfig=function(){it=null,ae=!1},t.isValidAttribute=function(f,o,a){it||he({});const l=b(f),g=b(o);return sn(l,g,a)},t.addHook=function(f,o){typeof o=="function"&&ct(P[f],o)},t.removeHook=function(f,o){if(o!==void 0){const a=dn(P[f],o);return a===-1?void 0:Tn(P[f],a,1)[0]}return Ee(P[f])},t.removeHooks=function(f){P[f]=[]},t.removeAllHooks=function(){P=we()},t}var Ne=Ce();function Le(r,t){let e=r;for(const n of t.split("."))e=e[n];return e}function vn(r,t,e){const n=t.split("."),s=n.length-1;let i=r;n.forEach((c,u)=>{u===s?i[c]=e:i=i[c]})}function Me(r,t,e=""){const n=new WeakMap,s={get(i,c){const u=Reflect.get(i,c);if(u===null||typeof u!="object")return u;const p=n.get(u);if(p)return p;const m=e?`${e}.${c}`:c,h=Me(u,t,m);return n.set(u,h),h},set(i,c,u){const p=Reflect.get(i,c);if(p!==u){Reflect.set(i,c,u);const m=e?`${e}.${c}`:c;t(m,p,u)}return!0}};return new Proxy(r,s)}function De(r){const t={};for(const[e,n]of Object.entries(r)){const s=typeof n=="object"&&n!==null;t[e]=s?De(n):n}return t}const Ot=typeof window<"u"&&typeof window.document<"u";let Ie=class extends Error{};const Q=class Q{constructor(t,e,n){q(this,Dt);q(this,Mt,Symbol("objectId"));q(this,H,[]);q(this,dt);q(this,Tt);q(this,Y);if(!t)throw new Ie("name cannot be empty");if(w(Q,K).has(t))throw new Ie(`WrecState with name "${t}" already exists`);if(at(this,dt,t),at(this,Tt,e),at(this,Y,Me({},un(this,Dt,pn).bind(this))),e&&Ot){const s=sessionStorage.getItem("wrec-state-"+t),i=s?JSON.parse(s):void 0;i&&(n=i)}if(n)for(const[s,i]of Object.entries(n))this.addProperty(s,i);w(Q,K).set(t,this)}static get(t){return w(this,K).get(t)}addListener(t,e={}){const n=w(this,H).find(s=>s.listenerRef.deref()===t);if(n){const{propertyMap:s}=n;for(const[i,c]of Object.entries(e))s[i]=c}else w(this,H).push({listenerRef:new WeakRef(t),propertyMap:e})}addProperty(t,e){Object.defineProperty(this,t,{enumerable:!0,get(){return w(this,Y)[t]},set(n){w(this,Y)[t]=n}}),w(this,Y)[t]=e}get id(){return w(this,Mt)}log(){console.log("WrecState:",w(this,dt));for(const[t,e]of Object.entries(w(this,Y)))console.log(` ${t} = ${JSON.stringify(e)}`)}removeListener(t){at(this,H,w(this,H).filter(e=>e.listenerRef.deref()!==t))}};K=new WeakMap,Mt=new WeakMap,H=new WeakMap,dt=new WeakMap,Tt=new WeakMap,Y=new WeakMap,Dt=new WeakSet,pn=function(t,e,n){const s=new Set;for(const i of w(this,H)){const c=i.listenerRef.deref();if(!c)s.add(i);else if(Ot&&c instanceof HTMLElement&&!c.isConnected)s.add(i);else{const{propertyMap:u}=i,p=Object.keys(u);(p.length===0||p.includes(t))&&c.changed(t,u[t],n,e,this)}}at(this,H,w(this,H).filter(i=>!s.has(i)))},q(Q,K,new Map),Ot&&window.addEventListener("beforeunload",()=>{for(const[t,e]of w(Q,K).entries())if(w(e,Tt)){const n=De(e);sessionStorage.setItem("wrec-state-"+t,JSON.stringify(n))}});let wt=Q;Ot&&process.env.NODE_ENV==="development"&&(window.WrecState=wt);const Pn=new Set(["onblur","onchange","onclick","onfocus","oninput","onkeydown","onreset","onsubmit"]);Ne.addHook("uponSanitizeAttribute",(r,t)=>{const{attrName:e}=t,n=e.toLowerCase();Pn.has(n)&&(t.forceKeepAttr=!0)});class Ct extends Error{}const xn=/([a-zA-Z-]+)\s*:\s*([^;}]+)/g,ve="a-zA-Z_$",kn=ve+"0-9",mt=`[${ve}][${kn}]*`,Fn=/<!--\s*(.*?)\s*-->/,Un=/<(\w+)(?:\s[^>]*)?>((?:[^<]|<(?!\w))*?)<\/\1>/g,qt=new RegExp(`^this\\.${mt}$`),Kt=new RegExp(`this\\.${mt}(\\.${mt})*`,"g"),Pe=new RegExp(`this\\.${mt}(\\.${mt})*`),Hn=new Set(["class","style"]),xe=5;function zn(r){return r instanceof HTMLButtonElement||r instanceof HTMLFieldSetElement||r instanceof HTMLInputElement||r instanceof HTMLSelectElement||r instanceof HTMLTextAreaElement||r instanceof I}function $n(r,t,e){const n=document.createElement(r);if(t)for(const[s,i]of Object.entries(t))n.setAttribute(s,i);return e&&(n.innerHTML=e),n}const Wn=r=>r===String?"":r===Number?0:r===Boolean?!1:r===Array?[]:r===Object?{}:void 0;function Nt(r){const t=[];let e=r.firstElementChild;for(;e;)t.push(e),e.shadowRoot&&t.push(...Nt(e.shadowRoot)),e.firstElementChild&&t.push(...Nt(e)),e=e.nextElementSibling;return t}const Lt=r=>r.substring(xe).split(".")[0];function ke(r,t){let e=r[0];return t.forEach((n,s)=>{e+=n+r[s+1]}),e}function Zt(r){const t=typeof r;return t==="string"||t==="number"||t==="boolean"}function ht(r){return r.localName==="textarea"}function Jt(r){const{localName:t}=r;return t==="input"||t==="select"}const Gn=r=>r.replace(/<!--[\s\S]*?-->/g,"");function Fe(r,t,e,n){return r.slice(0,t)+n+r.slice(t+e)}function Bn(r){let t=r.trim(),e=null;/^\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");const n=Ne.sanitize(t,{ADD_TAGS:["#comment"],ALLOW_UNKNOWN_PROTOCOLS:!0,RETURN_DOM_FRAGMENT:!0});if(e){const s=n.querySelector(e);if(s)return s.childNodes}return n.childNodes}function Qt(r){const t=Number(r);if(isNaN(t))throw new Ct(`can't convert "${r}" to a number`);return t}function Ue(r,t,e){const[n,s]=t.split(":");if(Zt(e))if(typeof e=="boolean"){e?r.setAttribute(n,n):r.removeAttribute(n);const i=I.getPropName(n);r[i]=e}else{const i=r.getAttribute(t),c=String(e);i!==c&&(r.setAttribute(n,c),n==="value"&&Jt(r)&&(r.value=c))}else{const i=I.getPropName(t);r[i]=e}}function te(r,t,e){const[n,s]=t.split(":");r instanceof CSSStyleRule?r.style.setProperty(n,e):(Ue(r,n,e),n==="value"&&Jt(r)&&(r.value=e))}function jn(r){const t=new Set;for(const n of Nt(r)){const{localName:s}=n;s.includes("-")&&t.add(s)}const e=[...t].map(n=>customElements.whenDefined(n));return Promise.all(e)}class I extends HTMLElement{static#m=new Map;static#h=new Map;static css="";static formAssociated=!1;static html="";static properties;static propToComputedMap;static propToExprsMap;static template=null;#t=this.constructor;#n=new Map;#c={};#s;#l={};#f=null;#u=new Map;constructor(){super(),this.attachShadow({mode:"open"});const t=this.#t;t.properties||(t.properties={}),t.propToComputedMap||(t.propToComputedMap=new Map),t.propToExprsMap||(t.propToExprsMap=new Map)}attributeChangedCallback(t,e,n){t==="disabled"&&this.#d();const s=I.getPropName(t);if(this.#i(s)){const i=this.#b(s,String(n));this[s]=i;const c=this.#c[s];c&&this.setFormValue(c,String(i)),this.propertyChangedCallback(s,e,n)}}async#R(){const t=this.#t;let{template:e}=t;if(!e){e=t.template=document.createElement("template");let n=`<style>
1
+ (function(T,E){typeof exports=="object"&&typeof module<"u"?E(exports):typeof define=="function"&&define.amd?define(["exports"],E):(T=typeof globalThis<"u"?globalThis:T||self,E(T.wrec={}))})(this,(function(T){"use strict";var fn=T=>{throw TypeError(T)};var ge=(T,E,N)=>E.has(T)||fn("Cannot "+N);var O=(T,E,N)=>(ge(T,E,"read from private field"),N?N.call(T):E.get(T)),q=(T,E,N)=>E.has(T)?fn("Cannot add the same private member more than once"):E instanceof WeakSet?E.add(T):E.set(T,N),at=(T,E,N,bt)=>(ge(T,E,"write to private field"),bt?bt.call(T,N):E.set(T,N),N),un=(T,E,N)=>(ge(T,E,"access private method"),N);var K,Mt,H,dt,Tt,Y,Dt,pn;const{entries:E,setPrototypeOf:N,isFrozen:bt,getPrototypeOf:mn,getOwnPropertyDescriptor:hn}=Object;let{freeze:L,seal:k,create:zt}=Object,{apply:$t,construct:Wt}=typeof Reflect<"u"&&Reflect;L||(L=function(t){return t}),k||(k=function(t){return t}),$t||($t=function(t,e){for(var n=arguments.length,s=new Array(n>2?n-2:0),i=2;i<n;i++)s[i-2]=arguments[i];return t.apply(e,s)}),Wt||(Wt=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];return new t(...n)});const St=D(Array.prototype.forEach),dn=D(Array.prototype.lastIndexOf),Ee=D(Array.prototype.pop),ct=D(Array.prototype.push),Tn=D(Array.prototype.splice),yt=D(String.prototype.toLowerCase),Gt=D(String.prototype.toString),Bt=D(String.prototype.match),lt=D(String.prototype.replace),gn=D(String.prototype.indexOf),En=D(String.prototype.trim),F=D(Object.prototype.hasOwnProperty),M=D(RegExp.prototype.test),ft=An(TypeError);function D(r){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];return $t(r,t,n)}}function An(r){return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Wt(r,e)}}function d(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yt;N&&N(r,null);let n=t.length;for(;n--;){let s=t[n];if(typeof s=="string"){const i=e(s);i!==s&&(bt(t)||(t[n]=i),s=i)}r[s]=!0}return r}function _n(r){for(let t=0;t<r.length;t++)F(r,t)||(r[t]=null);return r}function U(r){const t=zt(null);for(const[e,n]of E(r))F(r,e)&&(Array.isArray(n)?t[e]=_n(n):n&&typeof n=="object"&&n.constructor===Object?t[e]=U(n):t[e]=n);return t}function ut(r,t){for(;r!==null;){const n=hn(r,t);if(n){if(n.get)return D(n.get);if(typeof n.value=="function")return D(n.value)}r=mn(r)}function e(){return null}return e}const Ae=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"]),jt=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"]),Yt=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"]),bn=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"]),Vt=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"]),Sn=L(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_e=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"]),Xt=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"]),Se=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"]),Rt=L(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yn=k(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Rn=k(/<%[\w\W]*|[\w\W]*%>/gm),wn=k(/\$\{[\w\W]*/gm),On=k(/^data-[\-\w.\u00B7-\uFFFF]+$/),Cn=k(/^aria-[\-\w]+$/),ye=k(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Nn=k(/^(?:\w+script|data):/i),Ln=k(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Re=k(/^html$/i),Mn=k(/^[a-z][.\w]*(-[.\w]+)+$/i);var we=Object.freeze({__proto__:null,ARIA_ATTR:Cn,ATTR_WHITESPACE:Ln,CUSTOM_ELEMENT:Mn,DATA_ATTR:On,DOCTYPE_NAME:Re,ERB_EXPR:Rn,IS_ALLOWED_URI:ye,IS_SCRIPT_OR_DATA:Nn,MUSTACHE_EXPR:yn,TMPLIT_EXPR:wn});const pt={element:1,text:3,progressingInstruction:7,comment:8,document:9},Dn=function(){return typeof window>"u"?null:window},In=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const s="data-tt-policy-suffix";e&&e.hasAttribute(s)&&(n=e.getAttribute(s));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Oe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ce(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dn();const t=f=>Ce(f);if(t.version="3.3.1",t.removed=[],!r||!r.document||r.document.nodeType!==pt.document||!r.Element)return t.isSupported=!1,t;let{document:e}=r;const n=e,s=n.currentScript,{DocumentFragment:i,HTMLTemplateElement:c,Node:u,Element:p,NodeFilter:m,NamedNodeMap:h=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:y,DOMParser:V,trustedTypes:W}=r,X=p.prototype,Xn=ut(X,"cloneNode"),qn=ut(X,"remove"),Kn=ut(X,"nextSibling"),Zn=ut(X,"childNodes"),It=ut(X,"parentNode");if(typeof c=="function"){const f=e.createElement("template");f.content&&f.content.ownerDocument&&(e=f.content.ownerDocument)}let v,gt="";const{implementation:ee,createNodeIterator:Jn,createDocumentFragment:Qn,getElementsByTagName:to}=e,{importNode:eo}=n;let P=Oe();t.isSupported=typeof E=="function"&&typeof It=="function"&&ee&&ee.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ne,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:no,ARIA_ATTR:oo,IS_SCRIPT_OR_DATA:so,ATTR_WHITESPACE:He,CUSTOM_ELEMENT:io}=we;let{IS_ALLOWED_URI:ze}=we,S=null;const $e=d({},[...Ae,...jt,...Yt,...Vt,..._e]);let R=null;const We=d({},[...be,...Xt,...Se,...Rt]);let A=Object.seal(zt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Et=null,ie=null;const tt=Object.seal(zt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ge=!0,re=!0,Be=!1,je=!0,et=!1,vt=!0,Z=!1,ae=!1,ce=!1,nt=!1,Pt=!1,xt=!1,Ye=!0,Ve=!1;const ro="user-content-";let le=!0,At=!1,ot={},z=null;const fe=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"]);let Xe=null;const qe=d({},["audio","video","img","source","image","track"]);let ue=null;const Ke=d({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),kt="http://www.w3.org/1998/Math/MathML",Ft="http://www.w3.org/2000/svg",G="http://www.w3.org/1999/xhtml";let st=G,pe=!1,me=null;const ao=d({},[kt,Ft,G],Gt);let Ut=d({},["mi","mo","mn","ms","mtext"]),Ht=d({},["annotation-xml"]);const co=d({},["title","style","font","a","script"]);let _t=null;const lo=["application/xhtml+xml","text/html"],fo="text/html";let b=null,it=null;const uo=e.createElement("form"),Ze=function(o){return o instanceof RegExp||o instanceof Function},he=function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(it&&it===o)){if((!o||typeof o!="object")&&(o={}),o=U(o),_t=lo.indexOf(o.PARSER_MEDIA_TYPE)===-1?fo:o.PARSER_MEDIA_TYPE,b=_t==="application/xhtml+xml"?Gt:yt,S=F(o,"ALLOWED_TAGS")?d({},o.ALLOWED_TAGS,b):$e,R=F(o,"ALLOWED_ATTR")?d({},o.ALLOWED_ATTR,b):We,me=F(o,"ALLOWED_NAMESPACES")?d({},o.ALLOWED_NAMESPACES,Gt):ao,ue=F(o,"ADD_URI_SAFE_ATTR")?d(U(Ke),o.ADD_URI_SAFE_ATTR,b):Ke,Xe=F(o,"ADD_DATA_URI_TAGS")?d(U(qe),o.ADD_DATA_URI_TAGS,b):qe,z=F(o,"FORBID_CONTENTS")?d({},o.FORBID_CONTENTS,b):fe,Et=F(o,"FORBID_TAGS")?d({},o.FORBID_TAGS,b):U({}),ie=F(o,"FORBID_ATTR")?d({},o.FORBID_ATTR,b):U({}),ot=F(o,"USE_PROFILES")?o.USE_PROFILES:!1,Ge=o.ALLOW_ARIA_ATTR!==!1,re=o.ALLOW_DATA_ATTR!==!1,Be=o.ALLOW_UNKNOWN_PROTOCOLS||!1,je=o.ALLOW_SELF_CLOSE_IN_ATTR!==!1,et=o.SAFE_FOR_TEMPLATES||!1,vt=o.SAFE_FOR_XML!==!1,Z=o.WHOLE_DOCUMENT||!1,nt=o.RETURN_DOM||!1,Pt=o.RETURN_DOM_FRAGMENT||!1,xt=o.RETURN_TRUSTED_TYPE||!1,ce=o.FORCE_BODY||!1,Ye=o.SANITIZE_DOM!==!1,Ve=o.SANITIZE_NAMED_PROPS||!1,le=o.KEEP_CONTENT!==!1,At=o.IN_PLACE||!1,ze=o.ALLOWED_URI_REGEXP||ye,st=o.NAMESPACE||G,Ut=o.MATHML_TEXT_INTEGRATION_POINTS||Ut,Ht=o.HTML_INTEGRATION_POINTS||Ht,A=o.CUSTOM_ELEMENT_HANDLING||{},o.CUSTOM_ELEMENT_HANDLING&&Ze(o.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(A.tagNameCheck=o.CUSTOM_ELEMENT_HANDLING.tagNameCheck),o.CUSTOM_ELEMENT_HANDLING&&Ze(o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(A.attributeNameCheck=o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),o.CUSTOM_ELEMENT_HANDLING&&typeof o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(A.allowCustomizedBuiltInElements=o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),et&&(re=!1),Pt&&(nt=!0),ot&&(S=d({},_e),R=[],ot.html===!0&&(d(S,Ae),d(R,be)),ot.svg===!0&&(d(S,jt),d(R,Xt),d(R,Rt)),ot.svgFilters===!0&&(d(S,Yt),d(R,Xt),d(R,Rt)),ot.mathMl===!0&&(d(S,Vt),d(R,Se),d(R,Rt))),o.ADD_TAGS&&(typeof o.ADD_TAGS=="function"?tt.tagCheck=o.ADD_TAGS:(S===$e&&(S=U(S)),d(S,o.ADD_TAGS,b))),o.ADD_ATTR&&(typeof o.ADD_ATTR=="function"?tt.attributeCheck=o.ADD_ATTR:(R===We&&(R=U(R)),d(R,o.ADD_ATTR,b))),o.ADD_URI_SAFE_ATTR&&d(ue,o.ADD_URI_SAFE_ATTR,b),o.FORBID_CONTENTS&&(z===fe&&(z=U(z)),d(z,o.FORBID_CONTENTS,b)),o.ADD_FORBID_CONTENTS&&(z===fe&&(z=U(z)),d(z,o.ADD_FORBID_CONTENTS,b)),le&&(S["#text"]=!0),Z&&d(S,["html","head","body"]),S.table&&(d(S,["tbody"]),delete Et.tbody),o.TRUSTED_TYPES_POLICY){if(typeof o.TRUSTED_TYPES_POLICY.createHTML!="function")throw ft('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof o.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ft('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=o.TRUSTED_TYPES_POLICY,gt=v.createHTML("")}else v===void 0&&(v=In(W,s)),v!==null&&typeof gt=="string"&&(gt=v.createHTML(""));L&&L(o),it=o}},Je=d({},[...jt,...Yt,...bn]),Qe=d({},[...Vt,...Sn]),po=function(o){let a=It(o);(!a||!a.tagName)&&(a={namespaceURI:st,tagName:"template"});const l=yt(o.tagName),g=yt(a.tagName);return me[o.namespaceURI]?o.namespaceURI===Ft?a.namespaceURI===G?l==="svg":a.namespaceURI===kt?l==="svg"&&(g==="annotation-xml"||Ut[g]):!!Je[l]:o.namespaceURI===kt?a.namespaceURI===G?l==="math":a.namespaceURI===Ft?l==="math"&&Ht[g]:!!Qe[l]:o.namespaceURI===G?a.namespaceURI===Ft&&!Ht[g]||a.namespaceURI===kt&&!Ut[g]?!1:!Qe[l]&&(co[l]||!Je[l]):!!(_t==="application/xhtml+xml"&&me[o.namespaceURI]):!1},$=function(o){ct(t.removed,{element:o});try{It(o).removeChild(o)}catch{qn(o)}},J=function(o,a){try{ct(t.removed,{attribute:a.getAttributeNode(o),from:a})}catch{ct(t.removed,{attribute:null,from:a})}if(a.removeAttribute(o),o==="is")if(nt||Pt)try{$(a)}catch{}else try{a.setAttribute(o,"")}catch{}},tn=function(o){let a=null,l=null;if(ce)o="<remove></remove>"+o;else{const _=Bt(o,/^[\r\n\t ]+/);l=_&&_[0]}_t==="application/xhtml+xml"&&st===G&&(o='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+o+"</body></html>");const g=v?v.createHTML(o):o;if(st===G)try{a=new V().parseFromString(g,_t)}catch{}if(!a||!a.documentElement){a=ee.createDocument(st,"template",null);try{a.documentElement.innerHTML=pe?gt:g}catch{}}const C=a.body||a.documentElement;return o&&l&&C.insertBefore(e.createTextNode(l),C.childNodes[0]||null),st===G?to.call(a,Z?"html":"body")[0]:Z?a.documentElement:C},en=function(o){return Jn.call(o.ownerDocument||o,o,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},de=function(o){return o instanceof y&&(typeof o.nodeName!="string"||typeof o.textContent!="string"||typeof o.removeChild!="function"||!(o.attributes instanceof h)||typeof o.removeAttribute!="function"||typeof o.setAttribute!="function"||typeof o.namespaceURI!="string"||typeof o.insertBefore!="function"||typeof o.hasChildNodes!="function")},nn=function(o){return typeof u=="function"&&o instanceof u};function B(f,o,a){St(f,l=>{l.call(t,o,a,it)})}const on=function(o){let a=null;if(B(P.beforeSanitizeElements,o,null),de(o))return $(o),!0;const l=b(o.nodeName);if(B(P.uponSanitizeElement,o,{tagName:l,allowedTags:S}),vt&&o.hasChildNodes()&&!nn(o.firstElementChild)&&M(/<[/\w!]/g,o.innerHTML)&&M(/<[/\w!]/g,o.textContent)||o.nodeType===pt.progressingInstruction||vt&&o.nodeType===pt.comment&&M(/<[/\w]/g,o.data))return $(o),!0;if(!(tt.tagCheck instanceof Function&&tt.tagCheck(l))&&(!S[l]||Et[l])){if(!Et[l]&&rn(l)&&(A.tagNameCheck instanceof RegExp&&M(A.tagNameCheck,l)||A.tagNameCheck instanceof Function&&A.tagNameCheck(l)))return!1;if(le&&!z[l]){const g=It(o)||o.parentNode,C=Zn(o)||o.childNodes;if(C&&g){const _=C.length;for(let x=_-1;x>=0;--x){const j=Xn(C[x],!0);j.__removalCount=(o.__removalCount||0)+1,g.insertBefore(j,Kn(o))}}}return $(o),!0}return o instanceof p&&!po(o)||(l==="noscript"||l==="noembed"||l==="noframes")&&M(/<\/no(script|embed|frames)/i,o.innerHTML)?($(o),!0):(et&&o.nodeType===pt.text&&(a=o.textContent,St([ne,oe,se],g=>{a=lt(a,g," ")}),o.textContent!==a&&(ct(t.removed,{element:o.cloneNode()}),o.textContent=a)),B(P.afterSanitizeElements,o,null),!1)},sn=function(o,a,l){if(Ye&&(a==="id"||a==="name")&&(l in e||l in uo))return!1;if(!(re&&!ie[a]&&M(no,a))){if(!(Ge&&M(oo,a))){if(!(tt.attributeCheck instanceof Function&&tt.attributeCheck(a,o))){if(!R[a]||ie[a]){if(!(rn(o)&&(A.tagNameCheck instanceof RegExp&&M(A.tagNameCheck,o)||A.tagNameCheck instanceof Function&&A.tagNameCheck(o))&&(A.attributeNameCheck instanceof RegExp&&M(A.attributeNameCheck,a)||A.attributeNameCheck instanceof Function&&A.attributeNameCheck(a,o))||a==="is"&&A.allowCustomizedBuiltInElements&&(A.tagNameCheck instanceof RegExp&&M(A.tagNameCheck,l)||A.tagNameCheck instanceof Function&&A.tagNameCheck(l))))return!1}else if(!ue[a]){if(!M(ze,lt(l,He,""))){if(!((a==="src"||a==="xlink:href"||a==="href")&&o!=="script"&&gn(l,"data:")===0&&Xe[o])){if(!(Be&&!M(so,lt(l,He,"")))){if(l)return!1}}}}}}}return!0},rn=function(o){return o!=="annotation-xml"&&Bt(o,io)},an=function(o){B(P.beforeSanitizeAttributes,o,null);const{attributes:a}=o;if(!a||de(o))return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0};let g=a.length;for(;g--;){const C=a[g],{name:_,namespaceURI:x,value:j}=C,rt=b(_),Te=j;let w=_==="value"?Te:En(Te);if(l.attrName=rt,l.attrValue=w,l.keepAttr=!0,l.forceKeepAttr=void 0,B(P.uponSanitizeAttribute,o,l),w=l.attrValue,Ve&&(rt==="id"||rt==="name")&&(J(_,o),w=ro+w),vt&&M(/((--!?|])>)|<\/(style|title|textarea)/i,w)){J(_,o);continue}if(rt==="attributename"&&Bt(w,"href")){J(_,o);continue}if(l.forceKeepAttr)continue;if(!l.keepAttr){J(_,o);continue}if(!je&&M(/\/>/i,w)){J(_,o);continue}et&&St([ne,oe,se],ln=>{w=lt(w,ln," ")});const cn=b(o.nodeName);if(!sn(cn,rt,w)){J(_,o);continue}if(v&&typeof W=="object"&&typeof W.getAttributeType=="function"&&!x)switch(W.getAttributeType(cn,rt)){case"TrustedHTML":{w=v.createHTML(w);break}case"TrustedScriptURL":{w=v.createScriptURL(w);break}}if(w!==Te)try{x?o.setAttributeNS(x,_,w):o.setAttribute(_,w),de(o)?$(o):Ee(t.removed)}catch{J(_,o)}}B(P.afterSanitizeAttributes,o,null)},mo=function f(o){let a=null;const l=en(o);for(B(P.beforeSanitizeShadowDOM,o,null);a=l.nextNode();)B(P.uponSanitizeShadowNode,a,null),on(a),an(a),a.content instanceof i&&f(a.content);B(P.afterSanitizeShadowDOM,o,null)};return t.sanitize=function(f){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=null,l=null,g=null,C=null;if(pe=!f,pe&&(f="<!-->"),typeof f!="string"&&!nn(f))if(typeof f.toString=="function"){if(f=f.toString(),typeof f!="string")throw ft("dirty is not a string, aborting")}else throw ft("toString is not a function");if(!t.isSupported)return f;if(ae||he(o),t.removed=[],typeof f=="string"&&(At=!1),At){if(f.nodeName){const j=b(f.nodeName);if(!S[j]||Et[j])throw ft("root node is forbidden and cannot be sanitized in-place")}}else if(f instanceof u)a=tn("<!---->"),l=a.ownerDocument.importNode(f,!0),l.nodeType===pt.element&&l.nodeName==="BODY"||l.nodeName==="HTML"?a=l:a.appendChild(l);else{if(!nt&&!et&&!Z&&f.indexOf("<")===-1)return v&&xt?v.createHTML(f):f;if(a=tn(f),!a)return nt?null:xt?gt:""}a&&ce&&$(a.firstChild);const _=en(At?f:a);for(;g=_.nextNode();)on(g),an(g),g.content instanceof i&&mo(g.content);if(At)return f;if(nt){if(Pt)for(C=Qn.call(a.ownerDocument);a.firstChild;)C.appendChild(a.firstChild);else C=a;return(R.shadowroot||R.shadowrootmode)&&(C=eo.call(n,C,!0)),C}let x=Z?a.outerHTML:a.innerHTML;return Z&&S["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&M(Re,a.ownerDocument.doctype.name)&&(x="<!DOCTYPE "+a.ownerDocument.doctype.name+`>
2
+ `+x),et&&St([ne,oe,se],j=>{x=lt(x,j," ")}),v&&xt?v.createHTML(x):x},t.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};he(f),ae=!0},t.clearConfig=function(){it=null,ae=!1},t.isValidAttribute=function(f,o,a){it||he({});const l=b(f),g=b(o);return sn(l,g,a)},t.addHook=function(f,o){typeof o=="function"&&ct(P[f],o)},t.removeHook=function(f,o){if(o!==void 0){const a=dn(P[f],o);return a===-1?void 0:Tn(P[f],a,1)[0]}return Ee(P[f])},t.removeHooks=function(f){P[f]=[]},t.removeAllHooks=function(){P=Oe()},t}var Ne=Ce();function Le(r,t){let e=r;for(const n of t.split("."))e=e[n];return e}function vn(r,t,e){const n=t.split("."),s=n.length-1;let i=r;n.forEach((c,u)=>{u===s?i[c]=e:i=i[c]})}function Me(r,t,e=""){const n=new WeakMap,s={get(i,c){const u=Reflect.get(i,c);if(u===null||typeof u!="object")return u;const p=n.get(u);if(p)return p;const m=e?`${e}.${c}`:c,h=Me(u,t,m);return n.set(u,h),h},set(i,c,u){const p=Reflect.get(i,c);if(p!==u){Reflect.set(i,c,u);const m=e?`${e}.${c}`:c;t(m,p,u)}return!0}};return new Proxy(r,s)}function De(r){const t={};for(const[e,n]of Object.entries(r)){const s=typeof n=="object"&&n!==null;t[e]=s?De(n):n}return t}const wt=typeof window<"u"&&typeof window.document<"u";let Ie=class extends Error{};const Q=class Q{constructor(t,e,n){q(this,Dt);q(this,Mt,Symbol("objectId"));q(this,H,[]);q(this,dt);q(this,Tt);q(this,Y);if(!t)throw new Ie("name cannot be empty");if(O(Q,K).has(t))throw new Ie(`WrecState with name "${t}" already exists`);if(at(this,dt,t),at(this,Tt,e),at(this,Y,Me({},un(this,Dt,pn).bind(this))),e&&wt){const s=sessionStorage.getItem("wrec-state-"+t),i=s?JSON.parse(s):void 0;i&&(n=i)}if(n)for(const[s,i]of Object.entries(n))this.addProperty(s,i);O(Q,K).set(t,this)}static get(t){return O(this,K).get(t)}addListener(t,e={}){const n=O(this,H).find(s=>s.listenerRef.deref()===t);if(n){const{propertyMap:s}=n;for(const[i,c]of Object.entries(e))s[i]=c}else O(this,H).push({listenerRef:new WeakRef(t),propertyMap:e})}addProperty(t,e){Object.defineProperty(this,t,{enumerable:!0,get(){return O(this,Y)[t]},set(n){O(this,Y)[t]=n}}),O(this,Y)[t]=e}get id(){return O(this,Mt)}log(){console.log("WrecState:",O(this,dt));for(const[t,e]of Object.entries(O(this,Y)))console.log(` ${t} = ${JSON.stringify(e)}`)}removeListener(t){at(this,H,O(this,H).filter(e=>e.listenerRef.deref()!==t))}};K=new WeakMap,Mt=new WeakMap,H=new WeakMap,dt=new WeakMap,Tt=new WeakMap,Y=new WeakMap,Dt=new WeakSet,pn=function(t,e,n){const s=new Set;for(const i of O(this,H)){const c=i.listenerRef.deref();if(!c)s.add(i);else if(wt&&c instanceof HTMLElement&&!c.isConnected)s.add(i);else{const{propertyMap:u}=i,p=Object.keys(u);(p.length===0||p.includes(t))&&c.changed(t,u[t],n,e,this)}}at(this,H,O(this,H).filter(i=>!s.has(i)))},q(Q,K,new Map),wt&&window.addEventListener("beforeunload",()=>{for(const[t,e]of O(Q,K).entries())if(O(e,Tt)){const n=De(e);sessionStorage.setItem("wrec-state-"+t,JSON.stringify(n))}});let Ot=Q;wt&&process.env.NODE_ENV==="development"&&(window.WrecState=Ot);const Pn=new Set(["onblur","onchange","onclick","onfocus","oninput","onkeydown","onreset","onsubmit"]);Ne.addHook("uponSanitizeAttribute",(r,t)=>{const{attrName:e}=t,n=e.toLowerCase();Pn.has(n)&&(t.forceKeepAttr=!0)});class Ct extends Error{}const xn=/([a-zA-Z-]+)\s*:\s*([^;}]+)/g,ve="a-zA-Z_$",kn=ve+"0-9",mt=`[${ve}][${kn}]*`,Fn=/<!--\s*(.*?)\s*-->/,Un=/<(\w+)(?:\s[^>]*)?>((?:[^<]|<(?!\w))*?)<\/\1>/g,qt=new RegExp(`^this\\.${mt}$`),Kt=new RegExp(`this\\.${mt}(\\.${mt})*`,"g"),Pe=new RegExp(`this\\.${mt}(\\.${mt})*`),Hn=new Set(["class","style"]),xe=5;function zn(r){return r instanceof HTMLButtonElement||r instanceof HTMLFieldSetElement||r instanceof HTMLInputElement||r instanceof HTMLSelectElement||r instanceof HTMLTextAreaElement||r instanceof I}function $n(r,t,e){const n=document.createElement(r);if(t)for(const[s,i]of Object.entries(t))n.setAttribute(s,i);return e&&(n.innerHTML=e),n}const Wn=r=>r===String?"":r===Number?0:r===Boolean?!1:r===Array?[]:r===Object?{}:void 0;function Nt(r){const t=[];let e=r.firstElementChild;for(;e;)t.push(e),e.shadowRoot&&t.push(...Nt(e.shadowRoot)),e.firstElementChild&&t.push(...Nt(e)),e=e.nextElementSibling;return t}const Lt=r=>r.substring(xe).split(".")[0];function ke(r,t){let e=r[0];return t.forEach((n,s)=>{e+=n+r[s+1]}),e}function Zt(r){const t=typeof r;return t==="string"||t==="number"||t==="boolean"}function ht(r){return r.localName==="textarea"}function Jt(r){const{localName:t}=r;return t==="input"||t==="select"}const Gn=r=>r.replace(/<!--[\s\S]*?-->/g,"");function Fe(r,t,e,n){return r.slice(0,t)+n+r.slice(t+e)}function Bn(r){let t=r.trim(),e=null;/^\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");const n=Ne.sanitize(t,{ADD_TAGS:["#comment"],ALLOW_UNKNOWN_PROTOCOLS:!0,RETURN_DOM_FRAGMENT:!0});if(e){const s=n.querySelector(e);if(s)return s.childNodes}return n.childNodes}function Qt(r){const t=Number(r);if(isNaN(t))throw new Ct(`can't convert "${r}" to a number`);return t}function Ue(r,t,e){const[n,s]=t.split(":");if(Zt(e))if(typeof e=="boolean"){e?r.setAttribute(n,n):r.removeAttribute(n);const i=I.getPropName(n);r[i]=e}else{const i=r.getAttribute(t),c=String(e);i!==c&&(r.setAttribute(n,c),n==="value"&&Jt(r)&&(r.value=c))}else{const i=I.getPropName(t);r[i]=e}}function te(r,t,e){const[n,s]=t.split(":");r instanceof CSSStyleRule?r.style.setProperty(n,e):(Ue(r,n,e),n==="value"&&Jt(r)&&(r.value=e))}async function jn(r){const t=new Set;for(const n of Nt(r.content)){const{localName:s}=n;s.includes("-")&&t.add(s)}function e(n){return new Promise((s,i)=>{setTimeout(()=>{const c=`custom element <${n}> not defined`;i(new Error(c))},1e3)})}return Promise.all([...t].map(async n=>Promise.race([customElements.whenDefined(n),e(n)])))}class I extends HTMLElement{static#m=new Map;static#h=new Map;static css="";static formAssociated=!1;static html="";static properties;static propToComputedMap;static propToExprsMap;static template=null;#t=this.constructor;#n=new Map;#c={};#s;#l={};#f=null;#u=new Map;constructor(){super(),this.attachShadow({mode:"open"});const t=this.#t;t.properties||(t.properties={}),t.propToComputedMap||(t.propToComputedMap=new Map),t.propToExprsMap||(t.propToExprsMap=new Map)}attributeChangedCallback(t,e,n){t==="disabled"&&this.#d();const s=I.getPropName(t);if(this.#i(s)){const i=this.#b(s,String(n));this[s]=i;const c=this.#c[s];c&&this.setFormValue(c,String(i)),this.propertyChangedCallback(s,e,n)}}async#R(){const t=this.#t;let{template:e}=t;if(!e){e=t.template=document.createElement("template");let n=`<style>
3
3
  :host([hidden]) { display: none; }`;t.css&&(n+=t.css),n+=`</style>
4
- `;let s=t.html.trim();s.startsWith("<")||(s=`<span><!--${s}--></span>`),e.innerHTML=n+s}await jn(e),this.shadowRoot.replaceChildren(e.content.cloneNode(!0))}changed(t,e,n){this[e]=n}connectedCallback(){this.#x(),this.#w(),this.#R().then(()=>{this.hasAttribute("disabled")&&this.#d(),requestAnimationFrame(()=>{this.#y(this.shadowRoot),this.#T(this.shadowRoot),this.#O()})})}#O(){const t=this.#t,{properties:e}=t;for(const[n,{computed:s}]of Object.entries(e))s&&(this[n]=this.#o(s))}#w(){const t=this.#t,{observedAttributes:e,properties:n}=t;for(const[s,i]of Object.entries(n))this.#C(s,i,e)}#C(t,e,n){const s=I.getAttrName(t),i=this.hasAttribute(s);e.required&&!i&&this.#e(this,t,"is a required attribute");let c=e.value;this.hasOwnProperty(t)&&(c=this[t],delete this[t]);const{type:u}=e,p=u===Boolean?c||i:n.includes(s)&&i?this.#_(t,s):c||Wn(u),m="#"+t;this[m]=p,e.computed&&this.#D(t,e),Object.defineProperty(this,t,{enumerable:!0,get(){return this[m]},set(h){u===Number&&typeof h=="string"&&(h=Qt(h));const y=this[m];if(h===y)return;this.#F(t,u,h),this[m]=h;const{state:V,stateProp:W}=this.#t.properties[t];W&&vn(V,W,h),this.#v(t),this.#I(t,u,h,s),this.#A(t),this.#P(t,h);const X=this.#c[t];X&&this.setFormValue(X,String(h)),this.propertyChangedCallback(t,y,h),e.dispatch&&this.dispatch("change",{tagName:this.localName,property:t,oldValue:y,value:h})}})}#d(){const t=this.hasAttribute("disabled"),e=Nt(this.shadowRoot);for(const n of e)zn(n)&&(n.disabled=t)}disconnectedCallback(){this.#n.clear(),this.#l.clear(),this.#u.clear()}dispatch(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}displayIfSet(t,e="block"){return`display: ${t?e:"none"}`}static elementName(){return this.name.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}#N(t){const e=t instanceof I;for(const n of t.getAttributeNames()){const s=t.getAttribute(n),i=this.#E(t,s);if(i){const c=this[i];c===void 0&&this.#a(t,n,i),t[i]=c;let[u,p]=n.split(":");u==="value"&&(p?(t["on"+p]===void 0&&this.#e(t,n,"refers to an unsupported event name"),t.setAttribute(u,this[i])):p="change"),e&&t.#u.set(I.getPropName(u),i)}this.#r(s,t,n)}}#o(t){const e=new Function("return "+t).call(this);return Array.isArray(e)?e.join(""):e}#L(t){const{localName:e}=t;if(e==="style"){const{sheet:n}=t,s=n?.cssRules??[],i=Array.from(s);for(const c of i)if(c.constructor===CSSStyleRule){const u=Array.from(c.style);for(const p of u)if(p.startsWith("--")){const m=c.style.getPropertyValue(p);this.#r(m,c,p)}}}else{let n="";if(ht(t)){this.#r(t.textContent,t);const s=t.textContent?.match(Fn);s&&(n=s[1])}else{const s=Array.from(t.childNodes).find(i=>i.nodeType===Node.COMMENT_NODE);s&&(n=s.textContent?.trim()??"")}if(n){const s=this.#E(t,n);s&&ht(t)?t.textContent=this[s]:this.#r(n,t)}}}formAssociatedCallback(){let t=this.getAttribute("form-assoc");if(!t){const c=this.getAttribute("name");if(c)if(this.#i("value"))t=`value:${c}`;else return;else return}const e={},n=t.split(",");for(const c of n){const[u,p]=c.split(":");e[u.trim()]=p.trim()}this.#c=e,this.#s=new FormData,this.#f=this.attachInternals(),this.#f.setFormValue(this.#s);const s=Object.keys(this.#t.properties),i=this.#l;for(const c of s)i[c]=this[c]}formResetCallback(){const t=this.#l;for(const e of Object.keys(t)){let n=t[e];qt.test(n)&&(n=this.#o(n)),this[e]=n}}static getAttrName(t){let e=I.#h.get(t);return e||(e=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),I.#h.set(t,e)),e}static getPropName(t){let e=I.#m.get(t);return e||(e=t.replace(/-([a-z])/g,(n,s)=>s.toUpperCase()),I.#m.set(t,e)),e}#M(t,e,n){if(n.length!==1)return;const[s]=n;if(!qt.test(s))return;const i=Jt(t)||ht(t);let[c,u]=(e??"").split(":");if(!(i&&c==="value"||ht(t)))return;u?t["on"+u]===void 0&&this.#e(t,e,"refers to an unsupported event name"):u="change";const m=Lt(s);t.addEventListener(u,h=>{const{target:y}=h;if(!y)return;const V=y.value,{type:W}=this.#t.properties[m];this[m]=W===Number?Qt(V):V,this.#A(m)})}#i(t){return!!this.#t.properties[t]}#T(t){const e=Array.from(t.querySelectorAll("*"));for(const n of e)this.#N(n),n.firstElementChild||this.#L(n)}#g(){if(this.#t.formAssociated||this.closest("form")===null)return;const t=this.#t.name;throw new Ct(`inside form, class ${t} requires "static formAssociated = true;"`)}static get observedAttributes(){const t=Object.keys(this.properties||{}).map(I.getAttrName);return t.includes("disabled")||t.push("disabled"),t}propertyChangedCallback(t,e,n){}#E(t,e){if(!e||!qt.test(e))return;const n=Lt(e);return this[n]===void 0&&this.#a(t,"",n),n}#A(t){const s=this.#t.propToExprsMap.get(t)||[];for(const i of s){let c=this.#o(i);const u=this.#n.get(i)??[];for(const p of u)if(p instanceof HTMLElement)this.#S(p,c);else if(!(p instanceof CSSStyleRule)){const{element:m,attrName:h}=p;m instanceof CSSStyleRule?m.style.setProperty(h,c):te(m,h,c)}}}static register(){const t=this.elementName();customElements.get(t)||customElements.define(t,this)}#D(t,e){const{computed:n,uses:s}=e,i=this.#t.propToComputedMap;function c(p,m){let h=i.get(p);h||(h=[],i.set(p,h)),h.push([t,m])}const u=n.match(Kt)||[];for(const p of u){const m=p.substring(xe);this[m]===void 0&&this.#a(null,t,m),typeof this[m]!="function"&&c(m,n)}if(s)for(const p of s.split(","))c(p,n)}#r(t,e,n=void 0){if(!t)return;const s=this.#p(e,n,t);if(!s){const p=t.replaceAll("this..","this.");n?te(e,n,p):"textContent"in e&&(e.textContent=p);return}const i=this.#t;s.forEach(p=>{const m=Lt(p);if(typeof this[m]=="function")return;const h=i.propToExprsMap;let y=h.get(m);y||(y=[],h.set(m,y)),y.includes(t)||y.push(t)});for(const[p,m]of this.#n.entries())for(const h of m){const y=h instanceof HTMLElement||h instanceof CSSStyleRule?h:h.element;y instanceof CSSStyleRule||y.isConnected||this.#n.set(p,m.filter(V=>V!==h))}let c=this.#n.get(t);c||(c=[],this.#n.set(t,c)),c.push(n?{element:e,attrName:n}:e),e instanceof HTMLElement&&this.#M(e,n,s);const u=this.#o(t);n?te(e,n,u):this.#S(e,u)}setAttributeSafe(t,e){this.hasAttribute(t)||this.setAttribute(t,e)}setFormValue(t,e){!this.#s||!Zt(e)||(this.#s.set(t,e),this.#f?.setFormValue(this.#s))}#e(t,e,n){const s=this.#t,i=t instanceof HTMLElement?t.localName:"CSS rule";throw new Ct(`component ${s.elementName()}`+(t?`, element "${i}"`:"")+(e?`, attribute "${e}"`:"")+` ${n}`)}#a(t,e,n){this.#e(t,e,`refers to missing property "${n}"`)}#_(t,e){return this.#b(t,this.getAttribute(e))}#b(t,e){if(e?.match(Kt))return e;const n=this.#t,{type:s}=n.properties[t];if(s||this.#e(null,t,"does not specify its type"),s===String)return e;if(s===Number)return Qt(e);if(s===Boolean)return e==="true"?!0:e==="false"||e==="null"?!1:(e&&e!==t&&this.#e(null,t,"is a Boolean attribute, so its value must match attribute name or be missing"),e===t)}#I(t,e,n,s){if(Zt(n)&&this.hasAttribute(s)){const i=e===Boolean?this.hasAttribute(s):this.#_(t,s);n!==i&&Ue(this,t,n)}}#v(t){const n=this.#t.propToComputedMap.get(t)||[];for(const[s,i]of n)this[s]=this.#o(i)}#S(t,e){if(e===void 0)return;const n=t instanceof HTMLElement,s=typeof e;if(s!=="string"&&s!=="number"&&this.#e(t,void 0," computed content is not a string or number"),t instanceof HTMLElement&&ht(t))t.value=e;else if(n&&s==="string"&&e.trim().startsWith("<")){const i=Bn(e);t.replaceChildren(...i),this.#y(t),this.#T(t)}else n&&(t.textContent=e)}#P(t,e){const n=this.#u.get(t);if(!n)return;const s=this.getRootNode();if(!(s instanceof ShadowRoot))return;const{host:i}=s;if(!i)return;const c=i;c[n]=e}useState(t,e){if(!e){e={};for(const n of Object.keys(t))e[n]=n}this.#k(t,e);for(const[n,s]of Object.entries(e))if(this.#i(s)){const i=Le(t,n);i!==void 0&&(this[s]=i);const c=this.#t.properties[s];c.state=t,c.stateProp=n}t.addListener(this,e)}#x(){const t=this.#t,e=new Set(Object.keys(t.properties));for(const n of e)Hn.has(n)&&this.#e(null,"",`property "${n}" is not allowed because it is a reserved attribute`);for(const n of this.getAttributeNames())if(n!=="class"&&n!=="id"&&n!=="disabled"&&!n.startsWith("on")){if(n==="form-assoc"){this.#g();continue}if(!e.has(I.getPropName(n))){if(n==="name"){this.#g();continue}this.#e(null,n,"is not a supported attribute")}}}#p(t,e,n){const s=n.match(Kt);if(s)return s.forEach(i=>{const c=Lt(i);this[c]===void 0&&this.#a(t,e,c)}),s}#k(t,e){for(const[n,s]of Object.entries(e)){let i=Le(t,n);if(i===void 0)throw new Ct(`invalid state path "${n}"`);i=this[s],this.#i(s)||this.#e(null,s,"refers to missing property in useState map")}}#F(t,e,n){if(n instanceof e)return;let s=typeof n;if(s==="object"){const{constructor:i}=n;s=i.name,i!==e&&this.#e(null,t,`was set to a ${s}, but must be a ${e.name}`)}s!==e.name.toLowerCase()&&this.#e(null,t,`was set to a ${s}, but must be a ${e.name}`)}#y(t){const e=Array.from(t.querySelectorAll("*"));for(const n of e){const s=[];for(const i of Array.from(n.attributes)){const c=i.name;if(c.startsWith("on")){let u=c.slice(2);u=u[0].toLowerCase()+u.slice(1).toLowerCase();const p=i.value;this.#p(n,c,p);let m;typeof this[p]=="function"?m=h=>this[p](h):(this.#p(n,c,p),m=()=>this.#o(p)),n.addEventListener(u,m),s.push(c)}}for(const i of s)n.removeAttribute(i)}}}function Yn(r,...t){let e=ke(r,t);for(;;){const n=xn.exec(e);if(!n)break;const s=n[2];if(Pe.test(s)){const i=n[1];if(!i.startsWith("--")){const c=`--${i}: ${s};
5
- ${i}: var(--${i})`;e=Fe(e,n.index,n[0].length,c)}}}return e}function Vn(r,...t){let e=ke(r,t);for(;;){const n=Un.exec(e);if(!n||n[1]==="style")break;const s=Gn(n[2]);if(Pe.test(s)){const i=`<!-- ${s.trim()} -->`,c=n.index+n[0].indexOf(">")+1;e=Fe(e,c,s.length,i)}}return e}T.Wrec=I,T.WrecState=wt,T.createElement=$n,T.css=Yn,T.html=Vn,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
4
+ `;let s=t.html.trim();s.startsWith("<")||(s=`<span><!--${s}--></span>`),e.innerHTML=n+s}await jn(e),this.shadowRoot.replaceChildren(e.content.cloneNode(!0))}changed(t,e,n){this[e]=n}connectedCallback(){this.#x(),this.#O(),this.#R().then(()=>{this.hasAttribute("disabled")&&this.#d(),this.#y(this.shadowRoot),this.#T(this.shadowRoot),this.#w()})}#w(){const t=this.#t,{properties:e}=t;for(const[n,{computed:s}]of Object.entries(e))s&&(this[n]=this.#o(s))}#O(){const t=this.#t,{observedAttributes:e,properties:n}=t;for(const[s,i]of Object.entries(n))this.#C(s,i,e)}#C(t,e,n){const s=I.getAttrName(t),i=this.hasAttribute(s);e.required&&!i&&this.#e(this,t,"is a required attribute");let c=e.value;this.hasOwnProperty(t)&&(c=this[t],delete this[t]);const{type:u}=e,p=u===Boolean?c||i:n.includes(s)&&i?this.#_(t,s):c||Wn(u),m="#"+t;this[m]=p,e.computed&&this.#D(t,e),Object.defineProperty(this,t,{enumerable:!0,get(){return this[m]},set(h){u===Number&&typeof h=="string"&&(h=Qt(h));const y=this[m];if(h===y)return;this.#F(t,u,h),this[m]=h;const{state:V,stateProp:W}=this.#t.properties[t];W&&vn(V,W,h),this.#v(t),this.#I(t,u,h,s),this.#A(t),this.#P(t,h);const X=this.#c[t];X&&this.setFormValue(X,String(h)),this.propertyChangedCallback(t,y,h),e.dispatch&&this.dispatch("change",{tagName:this.localName,property:t,oldValue:y,value:h})}})}#d(){const t=this.hasAttribute("disabled"),e=Nt(this.shadowRoot);for(const n of e)zn(n)&&(n.disabled=t)}disconnectedCallback(){this.#n.clear(),this.#l.clear(),this.#u.clear()}dispatch(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}displayIfSet(t,e="block"){return`display: ${t?e:"none"}`}static elementName(){return this.name.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}#N(t){const e=t instanceof I;for(const n of t.getAttributeNames()){const s=t.getAttribute(n),i=this.#E(t,s);if(i){const c=this[i];c===void 0&&this.#a(t,n,i),t[i]=c;let[u,p]=n.split(":");u==="value"&&(p?(t["on"+p]===void 0&&this.#e(t,n,"refers to an unsupported event name"),t.setAttribute(u,this[i])):p="change"),e&&t.#u.set(I.getPropName(u),i)}this.#r(s,t,n)}}#o(t){const e=new Function("return "+t).call(this);return Array.isArray(e)?e.join(""):e}#L(t){const{localName:e}=t;if(e==="style"){const{sheet:n}=t,s=n?.cssRules??[],i=Array.from(s);for(const c of i)if(c.constructor===CSSStyleRule){const u=Array.from(c.style);for(const p of u)if(p.startsWith("--")){const m=c.style.getPropertyValue(p);this.#r(m,c,p)}}}else{let n="";if(ht(t)){this.#r(t.textContent,t);const s=t.textContent?.match(Fn);s&&(n=s[1])}else{const s=Array.from(t.childNodes).find(i=>i.nodeType===Node.COMMENT_NODE);s&&(n=s.textContent?.trim()??"")}if(n){const s=this.#E(t,n);s&&ht(t)?t.textContent=this[s]:this.#r(n,t)}}}formAssociatedCallback(){let t=this.getAttribute("form-assoc");if(!t){const c=this.getAttribute("name");if(c)if(this.#i("value"))t=`value:${c}`;else return;else return}const e={},n=t.split(",");for(const c of n){const[u,p]=c.split(":");e[u.trim()]=p.trim()}this.#c=e,this.#s=new FormData,this.#f=this.attachInternals(),this.#f.setFormValue(this.#s);const s=Object.keys(this.#t.properties),i=this.#l;for(const c of s)i[c]=this[c]}formResetCallback(){const t=this.#l;for(const e of Object.keys(t)){let n=t[e];qt.test(n)&&(n=this.#o(n)),this[e]=n}}static getAttrName(t){let e=I.#h.get(t);return e||(e=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),I.#h.set(t,e)),e}static getPropName(t){let e=I.#m.get(t);return e||(e=t.replace(/-([a-z])/g,(n,s)=>s.toUpperCase()),I.#m.set(t,e)),e}#M(t,e,n){if(n.length!==1)return;const[s]=n;if(!qt.test(s))return;const i=Jt(t)||ht(t);let[c,u]=(e??"").split(":");if(!(i&&c==="value"||ht(t)))return;u?t["on"+u]===void 0&&this.#e(t,e,"refers to an unsupported event name"):u="change";const m=Lt(s);t.addEventListener(u,h=>{const{target:y}=h;if(!y)return;const V=y.value,{type:W}=this.#t.properties[m];this[m]=W===Number?Qt(V):V,this.#A(m)})}#i(t){return!!this.#t.properties[t]}#T(t){const e=Array.from(t.querySelectorAll("*"));for(const n of e)this.#N(n),n.firstElementChild||this.#L(n)}#g(){if(this.#t.formAssociated||this.closest("form")===null)return;const t=this.#t.name;throw new Ct(`inside form, class ${t} requires "static formAssociated = true;"`)}static get observedAttributes(){const t=Object.keys(this.properties||{}).map(I.getAttrName);return t.includes("disabled")||t.push("disabled"),t}propertyChangedCallback(t,e,n){}#E(t,e){if(!e||!qt.test(e))return;const n=Lt(e);return this[n]===void 0&&this.#a(t,"",n),n}#A(t){const s=this.#t.propToExprsMap.get(t)||[];for(const i of s){let c=this.#o(i);const u=this.#n.get(i)??[];for(const p of u)if(p instanceof HTMLElement)this.#S(p,c);else if(!(p instanceof CSSStyleRule)){const{element:m,attrName:h}=p;m instanceof CSSStyleRule?m.style.setProperty(h,c):te(m,h,c)}}}static register(){const t=this.elementName();customElements.get(t)||customElements.define(t,this)}#D(t,e){const{computed:n,uses:s}=e,i=this.#t.propToComputedMap;function c(p,m){let h=i.get(p);h||(h=[],i.set(p,h)),h.push([t,m])}const u=n.match(Kt)||[];for(const p of u){const m=p.substring(xe);this[m]===void 0&&this.#a(null,t,m),typeof this[m]!="function"&&c(m,n)}if(s)for(const p of s.split(","))c(p,n)}#r(t,e,n=void 0){if(!t)return;const s=this.#p(e,n,t);if(!s){const p=t.replaceAll("this..","this.");n?te(e,n,p):"textContent"in e&&(e.textContent=p);return}const i=this.#t;s.forEach(p=>{const m=Lt(p);if(typeof this[m]=="function")return;const h=i.propToExprsMap;let y=h.get(m);y||(y=[],h.set(m,y)),y.includes(t)||y.push(t)});for(const[p,m]of this.#n.entries())for(const h of m){const y=h instanceof HTMLElement||h instanceof CSSStyleRule?h:h.element;y instanceof CSSStyleRule||y.isConnected||this.#n.set(p,m.filter(V=>V!==h))}let c=this.#n.get(t);c||(c=[],this.#n.set(t,c)),c.push(n?{element:e,attrName:n}:e),e instanceof HTMLElement&&this.#M(e,n,s);const u=this.#o(t);n?te(e,n,u):this.#S(e,u)}setAttributeSafe(t,e){this.hasAttribute(t)||this.setAttribute(t,e)}setFormValue(t,e){!this.#s||!Zt(e)||(this.#s.set(t,e),this.#f?.setFormValue(this.#s))}#e(t,e,n){const s=this.#t,i=t instanceof HTMLElement?t.localName:"CSS rule";throw new Ct(`component ${s.elementName()}`+(t?`, element "${i}"`:"")+(e?`, attribute "${e}"`:"")+` ${n}`)}#a(t,e,n){this.#e(t,e,`refers to missing property "${n}"`)}#_(t,e){return this.#b(t,this.getAttribute(e))}#b(t,e){if(e?.match(Kt))return e;const n=this.#t,{type:s}=n.properties[t];if(s||this.#e(null,t,"does not specify its type"),s===String)return e;if(s===Number)return Qt(e);if(s===Boolean)return e==="true"?!0:e==="false"||e==="null"?!1:(e&&e!==t&&this.#e(null,t,"is a Boolean attribute, so its value must match attribute name or be missing"),e===t)}#I(t,e,n,s){if(Zt(n)&&this.hasAttribute(s)){const i=e===Boolean?this.hasAttribute(s):this.#_(t,s);n!==i&&Ue(this,t,n)}}#v(t){const n=this.#t.propToComputedMap.get(t)||[];for(const[s,i]of n)this[s]=this.#o(i)}#S(t,e){if(e===void 0)return;const n=t instanceof HTMLElement,s=typeof e;if(s!=="string"&&s!=="number"&&this.#e(t,void 0," computed content is not a string or number"),t instanceof HTMLElement&&ht(t))t.value=e;else if(n&&s==="string"&&e.trim().startsWith("<")){const i=Bn(e);t.replaceChildren(...i),this.#y(t),this.#T(t)}else n&&(t.textContent=e)}#P(t,e){const n=this.#u.get(t);if(!n)return;const s=this.getRootNode();if(!(s instanceof ShadowRoot))return;const{host:i}=s;if(!i)return;const c=i;c[n]=e}useState(t,e){if(!e){e={};for(const n of Object.keys(t))e[n]=n}this.#k(t,e);for(const[n,s]of Object.entries(e))if(this.#i(s)){const i=Le(t,n);i!==void 0&&(this[s]=i);const c=this.#t.properties[s];c.state=t,c.stateProp=n}t.addListener(this,e)}#x(){const t=this.#t,e=new Set(Object.keys(t.properties));for(const n of e)Hn.has(n)&&this.#e(null,"",`property "${n}" is not allowed because it is a reserved attribute`);for(const n of this.getAttributeNames())if(n!=="class"&&n!=="id"&&n!=="disabled"&&!n.startsWith("on")){if(n==="form-assoc"){this.#g();continue}if(!e.has(I.getPropName(n))){if(n==="name"){this.#g();continue}this.#e(null,n,"is not a supported attribute")}}}#p(t,e,n){const s=n.match(Kt);if(s)return s.forEach(i=>{const c=Lt(i);this[c]===void 0&&this.#a(t,e,c)}),s}#k(t,e){for(const[n,s]of Object.entries(e)){let i=Le(t,n);if(i===void 0)throw new Ct(`invalid state path "${n}"`);i=this[s],this.#i(s)||this.#e(null,s,"refers to missing property in useState map")}}#F(t,e,n){if(n instanceof e)return;let s=typeof n;if(s==="object"){const{constructor:i}=n;s=i.name,i!==e&&this.#e(null,t,`was set to a ${s}, but must be a ${e.name}`)}s!==e.name.toLowerCase()&&this.#e(null,t,`was set to a ${s}, but must be a ${e.name}`)}#y(t){const e=Array.from(t.querySelectorAll("*"));for(const n of e){const s=[];for(const i of Array.from(n.attributes)){const c=i.name;if(c.startsWith("on")){let u=c.slice(2);u=u[0].toLowerCase()+u.slice(1).toLowerCase();const p=i.value;this.#p(n,c,p);let m;typeof this[p]=="function"?m=h=>this[p](h):(this.#p(n,c,p),m=()=>this.#o(p)),n.addEventListener(u,m),s.push(c)}}for(const i of s)n.removeAttribute(i)}}}function Yn(r,...t){let e=ke(r,t);for(;;){const n=xn.exec(e);if(!n)break;const s=n[2];if(Pe.test(s)){const i=n[1];if(!i.startsWith("--")){const c=`--${i}: ${s};
5
+ ${i}: var(--${i})`;e=Fe(e,n.index,n[0].length,c)}}}return e}function Vn(r,...t){let e=ke(r,t);for(;;){const n=Un.exec(e);if(!n||n[1]==="style")break;const s=Gn(n[2]);if(Pe.test(s)){const i=`<!-- ${s.trim()} -->`,c=n.index+n[0].indexOf(">")+1;e=Fe(e,c,s.length,i)}}return e}T.Wrec=I,T.WrecState=Ot,T.createElement=$n,T.css=Yn,T.html=Vn,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "wrec",
3
3
  "description": "a small library that greatly simplifies building web components",
4
4
  "author": "R. Mark Volkmann",
5
- "version": "0.19.2",
5
+ "version": "0.19.3",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",