@nysds/nys-icon 1.20.1 → 1.21.0

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/nys-icon.js CHANGED
@@ -1,273 +1,895 @@
1
- import { LitElement as Bn, unsafeCSS as Wn, html as Yn } from "lit";
2
- import { property as nt, state as $n } from "lit/decorators.js";
1
+ import { LitElement as Jn, html as Qn, unsafeCSS as tr } from "lit";
2
+ import { property as Q, state as er } from "lit/decorators.js";
3
3
  /*!
4
4
  * █▄ █ █ █ █▀▀▀█ █▀▀▄ █▀▀▀█
5
5
  * █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
6
6
  * █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
7
7
  *
8
- * Icon Component v1.20.1
8
+ * Icon Component v1.21.0
9
9
  * Part of the New York State Design System
10
10
  * Repository: https://github.com/its-hcd/nysds
11
11
  * License: MIT
12
12
  */
13
- /*!
14
- * New York State Design System v1.20.1
15
- * Description: A design system for New York State's digital products.
16
- * Repository: https://github.com/its-hcd/nysds
17
- * License: MIT
18
- */
19
- let jn = 0;
20
- function Xn(i) {
21
- return `${i}-${Date.now()}-${jn++}`;
13
+ var nr = 0;
14
+ function rr(r) {
15
+ return `${r}-${Date.now()}-${nr++}`;
22
16
  }
23
- const Vn = (i) => {
24
- class n extends i {
17
+ var ir = (r) => {
18
+ class n extends r {
25
19
  get idPrefix() {
26
20
  return this.localName || "nys-element";
27
21
  }
28
22
  ensureId() {
29
- this.id || (this.id = Xn(this.idPrefix));
23
+ this.id || (this.id = rr(this.idPrefix));
30
24
  }
31
25
  connectedCallback() {
32
26
  super.connectedCallback(), this.ensureId();
33
27
  }
34
28
  }
35
29
  return n;
36
- }, qn = /* @__PURE__ */ Vn(Bn), Ot = globalThis.__nysIconRegistry ??= /* @__PURE__ */ new Map(), mt = globalThis.__nysIconWatchers ??= /* @__PURE__ */ new Map();
37
- let oe = null, Be = null;
38
- async function Kn() {
39
- return oe || (Be ??= import("./nys-icon.library-DHBltclg.js").then(
40
- (i) => oe = i.default
41
- ), Be);
30
+ }, or = /* @__PURE__ */ ir(Jn), vt = globalThis.__nysIconRegistry ??= /* @__PURE__ */ new Map(), pt = globalThis.__nysIconWatchers ??= /* @__PURE__ */ new Map(), se = null, Ke = null;
31
+ async function ar() {
32
+ return se || (Ke ??= import("./nys-icon.library-Bi_7DKlD.js").then((r) => se = r.default), Ke);
42
33
  }
43
- function Zn() {
44
- if (globalThis.__nysIconDefaultRegistered || Ot.has("default")) {
34
+ function sr() {
35
+ if (globalThis.__nysIconDefaultRegistered || vt.has("default")) {
45
36
  globalThis.__nysIconDefaultRegistered = !0;
46
37
  return;
47
38
  }
48
- globalThis.__nysIconDefaultRegistered = !0, Ot.set("default", {
49
- resolver: async (i) => {
50
- if (!i) return;
51
- const s = (await Kn())[i];
52
- return s ? { type: "svg", content: s } : void 0;
53
- }
54
- });
39
+ globalThis.__nysIconDefaultRegistered = !0, vt.set("default", { resolver: async (r) => {
40
+ if (!r) return;
41
+ const n = (await ar())[r];
42
+ return n ? {
43
+ type: "svg",
44
+ content: n
45
+ } : void 0;
46
+ } });
55
47
  }
56
- function Ui(i, n) {
57
- Ot.set(i, n), mt.get(i)?.forEach((s) => s.redraw());
48
+ function qr(r, n) {
49
+ vt.set(r, n), pt.get(r)?.forEach((s) => s.redraw());
58
50
  }
59
- function Hi(i) {
60
- Ot.delete(i), mt.get(i)?.forEach((n) => n.redraw());
51
+ function Kr(r) {
52
+ vt.delete(r), pt.get(r)?.forEach((n) => n.redraw());
61
53
  }
62
- function Jn(i) {
63
- return Zn(), Ot.get(i);
54
+ function lr(r) {
55
+ return sr(), vt.get(r);
64
56
  }
65
- function We(i, n) {
66
- mt.has(i) || mt.set(i, /* @__PURE__ */ new Set()), mt.get(i).add(n);
57
+ function Ze(r, n) {
58
+ pt.has(r) || pt.set(r, /* @__PURE__ */ new Set()), pt.get(r).add(n);
67
59
  }
68
- function Ye(i, n) {
69
- mt.get(i)?.delete(n);
60
+ function Je(r, n) {
61
+ pt.get(r)?.delete(n);
70
62
  }
71
- /*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */
72
- function $e(i, n) {
73
- (n == null || n > i.length) && (n = i.length);
74
- for (var s = 0, l = Array(n); s < n; s++) l[s] = i[s];
63
+ function Qe(r, n) {
64
+ (n == null || n > r.length) && (n = r.length);
65
+ for (var s = 0, l = Array(n); s < n; s++) l[s] = r[s];
75
66
  return l;
76
67
  }
77
- function Qn(i) {
78
- if (Array.isArray(i)) return i;
68
+ function cr(r) {
69
+ if (Array.isArray(r)) return r;
79
70
  }
80
- function ti(i, n) {
81
- var s = i == null ? null : typeof Symbol < "u" && i[Symbol.iterator] || i["@@iterator"];
71
+ function ur(r, n) {
72
+ var s = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
82
73
  if (s != null) {
83
- var l, u, m, A, dt = [], M = !0, ht = !1;
74
+ var l, u, p, y, k = [], I = !0, wt = !1;
84
75
  try {
85
- if (m = (s = s.call(i)).next, n !== 0) for (; !(M = (l = m.call(s)).done) && (dt.push(l.value), dt.length !== n); M = !0) ;
86
- } catch (kt) {
87
- ht = !0, u = kt;
76
+ if (p = (s = s.call(r)).next, n !== 0) for (; !(I = (l = p.call(s)).done) && (k.push(l.value), k.length !== n); I = !0) ;
77
+ } catch (tt) {
78
+ wt = !0, u = tt;
88
79
  } finally {
89
80
  try {
90
- if (!M && s.return != null && (A = s.return(), Object(A) !== A)) return;
81
+ if (!I && s.return != null && (y = s.return(), Object(y) !== y)) return;
91
82
  } finally {
92
- if (ht) throw u;
83
+ if (wt) throw u;
93
84
  }
94
85
  }
95
- return dt;
86
+ return k;
96
87
  }
97
88
  }
98
- function ei() {
89
+ function fr() {
99
90
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
100
91
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
101
92
  }
102
- function ni(i, n) {
103
- return Qn(i) || ti(i, n) || ii(i, n) || ei();
93
+ function pr(r, n) {
94
+ return cr(r) || ur(r, n) || mr(r, n) || fr();
104
95
  }
105
- function ii(i, n) {
106
- if (i) {
107
- if (typeof i == "string") return $e(i, n);
108
- var s = {}.toString.call(i).slice(8, -1);
109
- return s === "Object" && i.constructor && (s = i.constructor.name), s === "Map" || s === "Set" ? Array.from(i) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? $e(i, n) : void 0;
96
+ function mr(r, n) {
97
+ if (r) {
98
+ if (typeof r == "string") return Qe(r, n);
99
+ var s = {}.toString.call(r).slice(8, -1);
100
+ return s === "Object" && r.constructor && (s = r.constructor.name), s === "Map" || s === "Set" ? Array.from(r) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? Qe(r, n) : void 0;
110
101
  }
111
102
  }
112
- const ln = Object.entries, je = Object.setPrototypeOf, oi = Object.isFrozen, ri = Object.getPrototypeOf, si = Object.getOwnPropertyDescriptor;
113
- let O = Object.freeze, w = Object.seal, pt = Object.create, cn = typeof Reflect < "u" && Reflect, ue = cn.apply, fe = cn.construct;
114
- O || (O = function(n) {
103
+ var _n = Object.entries, tn = Object.setPrototypeOf, dr = Object.isFrozen, hr = Object.getPrototypeOf, _r = Object.getOwnPropertyDescriptor, A = Object.freeze, E = Object.seal, ft = Object.create, gn = typeof Reflect < "u" && Reflect, de = gn.apply, he = gn.construct;
104
+ A || (A = function(n) {
115
105
  return n;
116
106
  });
117
- w || (w = function(n) {
107
+ E || (E = function(n) {
118
108
  return n;
119
109
  });
120
- ue || (ue = function(n, s) {
121
- for (var l = arguments.length, u = new Array(l > 2 ? l - 2 : 0), m = 2; m < l; m++)
122
- u[m - 2] = arguments[m];
110
+ de || (de = function(n, s) {
111
+ for (var l = arguments.length, u = new Array(l > 2 ? l - 2 : 0), p = 2; p < l; p++) u[p - 2] = arguments[p];
123
112
  return n.apply(s, u);
124
113
  });
125
- fe || (fe = function(n) {
126
- for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
127
- l[u - 1] = arguments[u];
114
+ he || (he = function(n) {
115
+ for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++) l[u - 1] = arguments[u];
128
116
  return new n(...l);
129
117
  });
130
- const ut = E(Array.prototype.forEach), ai = E(Array.prototype.lastIndexOf), Xe = E(Array.prototype.pop), ft = E(Array.prototype.push), li = E(Array.prototype.splice), X = Array.isArray, bt = E(String.prototype.toLowerCase), re = E(String.prototype.toString), Ve = E(String.prototype.match), Et = E(String.prototype.replace), qe = E(String.prototype.indexOf), ci = E(String.prototype.trim), ui = E(Number.prototype.toString), fi = E(Boolean.prototype.toString), Ke = typeof BigInt > "u" ? null : E(BigInt.prototype.toString), Ze = typeof Symbol > "u" ? null : E(Symbol.prototype.toString), S = E(Object.prototype.hasOwnProperty), At = E(Object.prototype.toString), b = E(RegExp.prototype.test), et = pi(TypeError);
131
- function E(i) {
118
+ var J = b(Array.prototype.forEach), gr = b(Array.prototype.lastIndexOf), en = b(Array.prototype.pop), Tt = b(Array.prototype.push), yr = b(Array.prototype.splice), mt = Array.isArray, Et = b(String.prototype.toLowerCase), le = b(String.prototype.toString), nn = b(String.prototype.match), bt = b(String.prototype.replace), rn = b(String.prototype.indexOf), Tr = b(String.prototype.trim), br = b(Number.prototype.toString), Ar = b(Boolean.prototype.toString), on = typeof BigInt > "u" ? null : b(BigInt.prototype.toString), an = typeof Symbol > "u" ? null : b(Symbol.prototype.toString), L = b(Object.prototype.hasOwnProperty), At = b(Object.prototype.toString), S = b(RegExp.prototype.test), Z = Er(TypeError);
119
+ function b(r) {
132
120
  return function(n) {
133
121
  n instanceof RegExp && (n.lastIndex = 0);
134
- for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
135
- l[u - 1] = arguments[u];
136
- return ue(i, n, l);
122
+ for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++) l[u - 1] = arguments[u];
123
+ return de(r, n, l);
137
124
  };
138
125
  }
139
- function pi(i) {
126
+ function Er(r) {
140
127
  return function() {
141
- for (var n = arguments.length, s = new Array(n), l = 0; l < n; l++)
142
- s[l] = arguments[l];
143
- return fe(i, s);
128
+ for (var n = arguments.length, s = new Array(n), l = 0; l < n; l++) s[l] = arguments[l];
129
+ return he(r, s);
144
130
  };
145
131
  }
146
- function p(i, n) {
147
- let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : bt;
148
- if (je && je(i, null), !X(n))
149
- return i;
132
+ function d(r, n) {
133
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Et;
134
+ if (tn && tn(r, null), !mt(n)) return r;
150
135
  let l = n.length;
151
136
  for (; l--; ) {
152
137
  let u = n[l];
153
138
  if (typeof u == "string") {
154
- const m = s(u);
155
- m !== u && (oi(n) || (n[l] = m), u = m);
139
+ const p = s(u);
140
+ p !== u && (dr(n) || (n[l] = p), u = p);
156
141
  }
157
- i[u] = !0;
142
+ r[u] = !0;
158
143
  }
159
- return i;
144
+ return r;
160
145
  }
161
- function mi(i) {
162
- for (let n = 0; n < i.length; n++)
163
- S(i, n) || (i[n] = null);
164
- return i;
146
+ function Sr(r) {
147
+ for (let n = 0; n < r.length; n++) L(r, n) || (r[n] = null);
148
+ return r;
165
149
  }
166
- function L(i) {
167
- const n = pt(null);
168
- for (const l of ln(i)) {
169
- var s = ni(l, 2);
170
- const u = s[0], m = s[1];
171
- S(i, u) && (X(m) ? n[u] = mi(m) : m && typeof m == "object" && m.constructor === Object ? n[u] = L(m) : n[u] = m);
150
+ function N(r) {
151
+ const n = ft(null);
152
+ for (const l of _n(r)) {
153
+ var s = pr(l, 2);
154
+ const u = s[0], p = s[1];
155
+ L(r, u) && (mt(p) ? n[u] = Sr(p) : p && typeof p == "object" && p.constructor === Object ? n[u] = N(p) : n[u] = p);
172
156
  }
173
157
  return n;
174
158
  }
175
- function di(i) {
176
- switch (typeof i) {
159
+ function vr(r) {
160
+ switch (typeof r) {
177
161
  case "string":
178
- return i;
162
+ return r;
179
163
  case "number":
180
- return ui(i);
164
+ return br(r);
181
165
  case "boolean":
182
- return fi(i);
166
+ return Ar(r);
183
167
  case "bigint":
184
- return Ke ? Ke(i) : "0";
168
+ return on ? on(r) : "0";
185
169
  case "symbol":
186
- return Ze ? Ze(i) : "Symbol()";
170
+ return an ? an(r) : "Symbol()";
187
171
  case "undefined":
188
- return At(i);
172
+ return At(r);
189
173
  case "function":
190
174
  case "object": {
191
- if (i === null)
192
- return At(i);
193
- const n = i, s = H(n, "toString");
175
+ if (r === null) return At(r);
176
+ const n = r, s = M(n, "toString");
194
177
  if (typeof s == "function") {
195
178
  const l = s(n);
196
179
  return typeof l == "string" ? l : At(l);
197
180
  }
198
- return At(i);
181
+ return At(r);
199
182
  }
200
183
  default:
201
- return At(i);
184
+ return At(r);
202
185
  }
203
186
  }
204
- function H(i, n) {
205
- for (; i !== null; ) {
206
- const l = si(i, n);
187
+ function M(r, n) {
188
+ for (; r !== null; ) {
189
+ const l = _r(r, n);
207
190
  if (l) {
208
- if (l.get)
209
- return E(l.get);
210
- if (typeof l.value == "function")
211
- return E(l.value);
191
+ if (l.get) return b(l.get);
192
+ if (typeof l.value == "function") return b(l.value);
212
193
  }
213
- i = ri(i);
194
+ r = hr(r);
214
195
  }
215
196
  function s() {
216
197
  return null;
217
198
  }
218
199
  return s;
219
200
  }
220
- function hi(i) {
201
+ function wr(r) {
221
202
  try {
222
- return b(i, ""), !0;
203
+ return S(r, ""), !0;
223
204
  } catch {
224
205
  return !1;
225
206
  }
226
207
  }
227
- const Je = O(["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"]), se = O(["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"]), ae = O(["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"]), _i = O(["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"]), le = O(["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"]), Ti = O(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Qe = O(["#text"]), tn = O(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "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"]), ce = O(["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", "dominant-baseline", "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-orientation", "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"]), en = O(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "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"]), xt = O(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), gi = w(/{{[\w\W]*|^[\w\W]*}}/g), yi = w(/<%[\w\W]*|^[\w\W]*%>/g), Ei = w(/\${[\w\W]*/g), Ai = w(/^data-[\-\w.\u00B7-\uFFFF]+$/), bi = w(/^aria-[\-\w]+$/), nn = w(
228
- /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
229
- // eslint-disable-line no-useless-escape
230
- ), Si = w(/^(?:\w+script|data):/i), Oi = w(
231
- /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
232
- // eslint-disable-line no-control-regex
233
- ), wi = w(/^html$/i), Ri = w(/^[a-z][.\w]*(-[.\w]+)+$/i), on = w(/<[/\w!]/g), rn = w(/<[/\w]/g), Ii = w(/<\/no(script|embed|frames)/i), Ni = w(/\/>/i), v = {
208
+ var sn = A([
209
+ "a",
210
+ "abbr",
211
+ "acronym",
212
+ "address",
213
+ "area",
214
+ "article",
215
+ "aside",
216
+ "audio",
217
+ "b",
218
+ "bdi",
219
+ "bdo",
220
+ "big",
221
+ "blink",
222
+ "blockquote",
223
+ "body",
224
+ "br",
225
+ "button",
226
+ "canvas",
227
+ "caption",
228
+ "center",
229
+ "cite",
230
+ "code",
231
+ "col",
232
+ "colgroup",
233
+ "content",
234
+ "data",
235
+ "datalist",
236
+ "dd",
237
+ "decorator",
238
+ "del",
239
+ "details",
240
+ "dfn",
241
+ "dialog",
242
+ "dir",
243
+ "div",
244
+ "dl",
245
+ "dt",
246
+ "element",
247
+ "em",
248
+ "fieldset",
249
+ "figcaption",
250
+ "figure",
251
+ "font",
252
+ "footer",
253
+ "form",
254
+ "h1",
255
+ "h2",
256
+ "h3",
257
+ "h4",
258
+ "h5",
259
+ "h6",
260
+ "head",
261
+ "header",
262
+ "hgroup",
263
+ "hr",
264
+ "html",
265
+ "i",
266
+ "img",
267
+ "input",
268
+ "ins",
269
+ "kbd",
270
+ "label",
271
+ "legend",
272
+ "li",
273
+ "main",
274
+ "map",
275
+ "mark",
276
+ "marquee",
277
+ "menu",
278
+ "menuitem",
279
+ "meter",
280
+ "nav",
281
+ "nobr",
282
+ "ol",
283
+ "optgroup",
284
+ "option",
285
+ "output",
286
+ "p",
287
+ "picture",
288
+ "pre",
289
+ "progress",
290
+ "q",
291
+ "rp",
292
+ "rt",
293
+ "ruby",
294
+ "s",
295
+ "samp",
296
+ "search",
297
+ "section",
298
+ "select",
299
+ "shadow",
300
+ "slot",
301
+ "small",
302
+ "source",
303
+ "spacer",
304
+ "span",
305
+ "strike",
306
+ "strong",
307
+ "style",
308
+ "sub",
309
+ "summary",
310
+ "sup",
311
+ "table",
312
+ "tbody",
313
+ "td",
314
+ "template",
315
+ "textarea",
316
+ "tfoot",
317
+ "th",
318
+ "thead",
319
+ "time",
320
+ "tr",
321
+ "track",
322
+ "tt",
323
+ "u",
324
+ "ul",
325
+ "var",
326
+ "video",
327
+ "wbr"
328
+ ]), ce = A([
329
+ "svg",
330
+ "a",
331
+ "altglyph",
332
+ "altglyphdef",
333
+ "altglyphitem",
334
+ "animatecolor",
335
+ "animatemotion",
336
+ "animatetransform",
337
+ "circle",
338
+ "clippath",
339
+ "defs",
340
+ "desc",
341
+ "ellipse",
342
+ "enterkeyhint",
343
+ "exportparts",
344
+ "filter",
345
+ "font",
346
+ "g",
347
+ "glyph",
348
+ "glyphref",
349
+ "hkern",
350
+ "image",
351
+ "inputmode",
352
+ "line",
353
+ "lineargradient",
354
+ "marker",
355
+ "mask",
356
+ "metadata",
357
+ "mpath",
358
+ "part",
359
+ "path",
360
+ "pattern",
361
+ "polygon",
362
+ "polyline",
363
+ "radialgradient",
364
+ "rect",
365
+ "stop",
366
+ "style",
367
+ "switch",
368
+ "symbol",
369
+ "text",
370
+ "textpath",
371
+ "title",
372
+ "tref",
373
+ "tspan",
374
+ "view",
375
+ "vkern"
376
+ ]), ue = A([
377
+ "feBlend",
378
+ "feColorMatrix",
379
+ "feComponentTransfer",
380
+ "feComposite",
381
+ "feConvolveMatrix",
382
+ "feDiffuseLighting",
383
+ "feDisplacementMap",
384
+ "feDistantLight",
385
+ "feDropShadow",
386
+ "feFlood",
387
+ "feFuncA",
388
+ "feFuncB",
389
+ "feFuncG",
390
+ "feFuncR",
391
+ "feGaussianBlur",
392
+ "feImage",
393
+ "feMerge",
394
+ "feMergeNode",
395
+ "feMorphology",
396
+ "feOffset",
397
+ "fePointLight",
398
+ "feSpecularLighting",
399
+ "feSpotLight",
400
+ "feTile",
401
+ "feTurbulence"
402
+ ]), Or = A([
403
+ "animate",
404
+ "color-profile",
405
+ "cursor",
406
+ "discard",
407
+ "font-face",
408
+ "font-face-format",
409
+ "font-face-name",
410
+ "font-face-src",
411
+ "font-face-uri",
412
+ "foreignobject",
413
+ "hatch",
414
+ "hatchpath",
415
+ "mesh",
416
+ "meshgradient",
417
+ "meshpatch",
418
+ "meshrow",
419
+ "missing-glyph",
420
+ "script",
421
+ "set",
422
+ "solidcolor",
423
+ "unknown",
424
+ "use"
425
+ ]), fe = A([
426
+ "math",
427
+ "menclose",
428
+ "merror",
429
+ "mfenced",
430
+ "mfrac",
431
+ "mglyph",
432
+ "mi",
433
+ "mlabeledtr",
434
+ "mmultiscripts",
435
+ "mn",
436
+ "mo",
437
+ "mover",
438
+ "mpadded",
439
+ "mphantom",
440
+ "mroot",
441
+ "mrow",
442
+ "ms",
443
+ "mspace",
444
+ "msqrt",
445
+ "mstyle",
446
+ "msub",
447
+ "msup",
448
+ "msubsup",
449
+ "mtable",
450
+ "mtd",
451
+ "mtext",
452
+ "mtr",
453
+ "munder",
454
+ "munderover",
455
+ "mprescripts"
456
+ ]), Rr = A([
457
+ "maction",
458
+ "maligngroup",
459
+ "malignmark",
460
+ "mlongdiv",
461
+ "mscarries",
462
+ "mscarry",
463
+ "msgroup",
464
+ "mstack",
465
+ "msline",
466
+ "msrow",
467
+ "semantics",
468
+ "annotation",
469
+ "annotation-xml",
470
+ "mprescripts",
471
+ "none"
472
+ ]), ln = A(["#text"]), cn = A([
473
+ "accept",
474
+ "action",
475
+ "align",
476
+ "alt",
477
+ "autocapitalize",
478
+ "autocomplete",
479
+ "autopictureinpicture",
480
+ "autoplay",
481
+ "background",
482
+ "bgcolor",
483
+ "border",
484
+ "capture",
485
+ "cellpadding",
486
+ "cellspacing",
487
+ "checked",
488
+ "cite",
489
+ "class",
490
+ "clear",
491
+ "color",
492
+ "cols",
493
+ "colspan",
494
+ "command",
495
+ "commandfor",
496
+ "controls",
497
+ "controlslist",
498
+ "coords",
499
+ "crossorigin",
500
+ "datetime",
501
+ "decoding",
502
+ "default",
503
+ "dir",
504
+ "disabled",
505
+ "disablepictureinpicture",
506
+ "disableremoteplayback",
507
+ "download",
508
+ "draggable",
509
+ "enctype",
510
+ "enterkeyhint",
511
+ "exportparts",
512
+ "face",
513
+ "for",
514
+ "headers",
515
+ "height",
516
+ "hidden",
517
+ "high",
518
+ "href",
519
+ "hreflang",
520
+ "id",
521
+ "inert",
522
+ "inputmode",
523
+ "integrity",
524
+ "ismap",
525
+ "kind",
526
+ "label",
527
+ "lang",
528
+ "list",
529
+ "loading",
530
+ "loop",
531
+ "low",
532
+ "max",
533
+ "maxlength",
534
+ "media",
535
+ "method",
536
+ "min",
537
+ "minlength",
538
+ "multiple",
539
+ "muted",
540
+ "name",
541
+ "nonce",
542
+ "noshade",
543
+ "novalidate",
544
+ "nowrap",
545
+ "open",
546
+ "optimum",
547
+ "part",
548
+ "pattern",
549
+ "placeholder",
550
+ "playsinline",
551
+ "popover",
552
+ "popovertarget",
553
+ "popovertargetaction",
554
+ "poster",
555
+ "preload",
556
+ "pubdate",
557
+ "radiogroup",
558
+ "readonly",
559
+ "rel",
560
+ "required",
561
+ "rev",
562
+ "reversed",
563
+ "role",
564
+ "rows",
565
+ "rowspan",
566
+ "spellcheck",
567
+ "scope",
568
+ "selected",
569
+ "shape",
570
+ "size",
571
+ "sizes",
572
+ "slot",
573
+ "span",
574
+ "srclang",
575
+ "start",
576
+ "src",
577
+ "srcset",
578
+ "step",
579
+ "style",
580
+ "summary",
581
+ "tabindex",
582
+ "title",
583
+ "translate",
584
+ "type",
585
+ "usemap",
586
+ "valign",
587
+ "value",
588
+ "width",
589
+ "wrap",
590
+ "xmlns"
591
+ ]), pe = A([
592
+ "accent-height",
593
+ "accumulate",
594
+ "additive",
595
+ "alignment-baseline",
596
+ "amplitude",
597
+ "ascent",
598
+ "attributename",
599
+ "attributetype",
600
+ "azimuth",
601
+ "basefrequency",
602
+ "baseline-shift",
603
+ "begin",
604
+ "bias",
605
+ "by",
606
+ "class",
607
+ "clip",
608
+ "clippathunits",
609
+ "clip-path",
610
+ "clip-rule",
611
+ "color",
612
+ "color-interpolation",
613
+ "color-interpolation-filters",
614
+ "color-profile",
615
+ "color-rendering",
616
+ "cx",
617
+ "cy",
618
+ "d",
619
+ "dx",
620
+ "dy",
621
+ "diffuseconstant",
622
+ "direction",
623
+ "display",
624
+ "divisor",
625
+ "dominant-baseline",
626
+ "dur",
627
+ "edgemode",
628
+ "elevation",
629
+ "end",
630
+ "exponent",
631
+ "fill",
632
+ "fill-opacity",
633
+ "fill-rule",
634
+ "filter",
635
+ "filterunits",
636
+ "flood-color",
637
+ "flood-opacity",
638
+ "font-family",
639
+ "font-size",
640
+ "font-size-adjust",
641
+ "font-stretch",
642
+ "font-style",
643
+ "font-variant",
644
+ "font-weight",
645
+ "fx",
646
+ "fy",
647
+ "g1",
648
+ "g2",
649
+ "glyph-name",
650
+ "glyphref",
651
+ "gradientunits",
652
+ "gradienttransform",
653
+ "height",
654
+ "href",
655
+ "id",
656
+ "image-rendering",
657
+ "in",
658
+ "in2",
659
+ "intercept",
660
+ "k",
661
+ "k1",
662
+ "k2",
663
+ "k3",
664
+ "k4",
665
+ "kerning",
666
+ "keypoints",
667
+ "keysplines",
668
+ "keytimes",
669
+ "lang",
670
+ "lengthadjust",
671
+ "letter-spacing",
672
+ "kernelmatrix",
673
+ "kernelunitlength",
674
+ "lighting-color",
675
+ "local",
676
+ "marker-end",
677
+ "marker-mid",
678
+ "marker-start",
679
+ "markerheight",
680
+ "markerunits",
681
+ "markerwidth",
682
+ "maskcontentunits",
683
+ "maskunits",
684
+ "max",
685
+ "mask",
686
+ "mask-type",
687
+ "media",
688
+ "method",
689
+ "mode",
690
+ "min",
691
+ "name",
692
+ "numoctaves",
693
+ "offset",
694
+ "operator",
695
+ "opacity",
696
+ "order",
697
+ "orient",
698
+ "orientation",
699
+ "origin",
700
+ "overflow",
701
+ "paint-order",
702
+ "path",
703
+ "pathlength",
704
+ "patterncontentunits",
705
+ "patterntransform",
706
+ "patternunits",
707
+ "pointer-events",
708
+ "points",
709
+ "preservealpha",
710
+ "preserveaspectratio",
711
+ "primitiveunits",
712
+ "r",
713
+ "rx",
714
+ "ry",
715
+ "radius",
716
+ "refx",
717
+ "refy",
718
+ "repeatcount",
719
+ "repeatdur",
720
+ "restart",
721
+ "result",
722
+ "rotate",
723
+ "scale",
724
+ "seed",
725
+ "shape-rendering",
726
+ "slope",
727
+ "specularconstant",
728
+ "specularexponent",
729
+ "spreadmethod",
730
+ "startoffset",
731
+ "stddeviation",
732
+ "stitchtiles",
733
+ "stop-color",
734
+ "stop-opacity",
735
+ "stroke-dasharray",
736
+ "stroke-dashoffset",
737
+ "stroke-linecap",
738
+ "stroke-linejoin",
739
+ "stroke-miterlimit",
740
+ "stroke-opacity",
741
+ "stroke",
742
+ "stroke-width",
743
+ "style",
744
+ "surfacescale",
745
+ "systemlanguage",
746
+ "tabindex",
747
+ "tablevalues",
748
+ "targetx",
749
+ "targety",
750
+ "transform",
751
+ "transform-origin",
752
+ "text-anchor",
753
+ "text-decoration",
754
+ "text-orientation",
755
+ "text-rendering",
756
+ "textlength",
757
+ "type",
758
+ "u1",
759
+ "u2",
760
+ "unicode",
761
+ "values",
762
+ "vector-effect",
763
+ "viewbox",
764
+ "visibility",
765
+ "version",
766
+ "vert-adv-y",
767
+ "vert-origin-x",
768
+ "vert-origin-y",
769
+ "width",
770
+ "word-spacing",
771
+ "wrap",
772
+ "writing-mode",
773
+ "xchannelselector",
774
+ "ychannelselector",
775
+ "x",
776
+ "x1",
777
+ "x2",
778
+ "xmlns",
779
+ "y",
780
+ "y1",
781
+ "y2",
782
+ "z",
783
+ "zoomandpan"
784
+ ]), un = A([
785
+ "accent",
786
+ "accentunder",
787
+ "align",
788
+ "bevelled",
789
+ "close",
790
+ "columnalign",
791
+ "columnlines",
792
+ "columnspacing",
793
+ "columnspan",
794
+ "denomalign",
795
+ "depth",
796
+ "dir",
797
+ "display",
798
+ "displaystyle",
799
+ "encoding",
800
+ "fence",
801
+ "frame",
802
+ "height",
803
+ "href",
804
+ "id",
805
+ "largeop",
806
+ "length",
807
+ "linethickness",
808
+ "lquote",
809
+ "lspace",
810
+ "mathbackground",
811
+ "mathcolor",
812
+ "mathsize",
813
+ "mathvariant",
814
+ "maxsize",
815
+ "minsize",
816
+ "movablelimits",
817
+ "notation",
818
+ "numalign",
819
+ "open",
820
+ "rowalign",
821
+ "rowlines",
822
+ "rowspacing",
823
+ "rowspan",
824
+ "rspace",
825
+ "rquote",
826
+ "scriptlevel",
827
+ "scriptminsize",
828
+ "scriptsizemultiplier",
829
+ "selection",
830
+ "separator",
831
+ "separators",
832
+ "stretchy",
833
+ "subscriptshift",
834
+ "supscriptshift",
835
+ "symmetric",
836
+ "voffset",
837
+ "width",
838
+ "xmlns"
839
+ ]), Ht = A([
840
+ "xlink:href",
841
+ "xml:id",
842
+ "xlink:title",
843
+ "xml:space",
844
+ "xmlns:xlink"
845
+ ]), Lr = E(/{{[\w\W]*|^[\w\W]*}}/g), Ir = E(/<%[\w\W]*|^[\w\W]*%>/g), Dr = E(/\${[\w\W]*/g), Nr = E(/^data-[\-\w.\u00B7-\uFFFF]+$/), Cr = E(/^aria-[\-\w]+$/), fn = E(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Mr = E(/^(?:\w+script|data):/i), xr = E(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Pr = E(/^html$/i), zr = E(/^[a-z][.\w]*(-[.\w]+)+$/i), pn = E(/<[/\w!]/g), mn = E(/<[/\w]/g), kr = E(/<\/no(script|embed|frames)/i), Ur = E(/\/>/i), D = {
234
846
  element: 1,
235
847
  attribute: 2,
236
848
  text: 3,
237
849
  cdataSection: 4,
238
850
  entityReference: 5,
239
- // Deprecated
240
851
  entityNode: 6,
241
- // Deprecated
242
852
  processingInstruction: 7,
243
853
  comment: 8,
244
854
  document: 9,
245
855
  documentType: 10,
246
856
  documentFragment: 11,
247
857
  notation: 12
248
- // Deprecated
249
- }, Li = function() {
858
+ }, yn = [
859
+ "style",
860
+ "script",
861
+ "xmp",
862
+ "iframe",
863
+ "noembed",
864
+ "noframes",
865
+ "plaintext",
866
+ "noscript"
867
+ ], Fr = A(d({}, yn)), Hr = (function() {
868
+ const r = {};
869
+ return J(yn, (n) => {
870
+ r[n] = E(new RegExp("</" + n + "(?=[\\t\\n\\f\\r />])", "i"));
871
+ }), A(r);
872
+ })(), Gr = function() {
250
873
  return typeof window > "u" ? null : window;
251
- }, Di = function(n, s) {
252
- if (typeof n != "object" || typeof n.createPolicy != "function")
253
- return null;
874
+ }, Wr = function(n, s) {
875
+ if (typeof n != "object" || typeof n.createPolicy != "function") return null;
254
876
  let l = null;
255
877
  const u = "data-tt-policy-suffix";
256
878
  s && s.hasAttribute(u) && (l = s.getAttribute(u));
257
- const m = "dompurify" + (l ? "#" + l : "");
879
+ const p = "dompurify" + (l ? "#" + l : "");
258
880
  try {
259
- return n.createPolicy(m, {
260
- createHTML(A) {
261
- return A;
881
+ return n.createPolicy(p, {
882
+ createHTML(y) {
883
+ return y;
262
884
  },
263
- createScriptURL(A) {
264
- return A;
885
+ createScriptURL(y) {
886
+ return y;
265
887
  }
266
888
  });
267
889
  } catch {
268
- return console.warn("TrustedTypes policy " + m + " could not be created."), null;
890
+ return console.warn("TrustedTypes policy " + p + " could not be created."), null;
269
891
  }
270
- }, sn = function() {
892
+ }, dn = function() {
271
893
  return {
272
894
  afterSanitizeAttributes: [],
273
895
  afterSanitizeElements: [],
@@ -279,53 +901,70 @@ const Je = O(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
279
901
  uponSanitizeElement: [],
280
902
  uponSanitizeShadowNode: []
281
903
  };
282
- }, j = function(n, s, l, u) {
283
- return S(n, s) && X(n[s]) ? p(u.base ? L(u.base) : {}, n[s], u.transform) : l;
904
+ }, W = function(n, s, l, u) {
905
+ return L(n, s) && mt(n[s]) ? d(u.base ? N(u.base) : {}, n[s], u.transform) : l;
906
+ }, me = function(n, s, l) {
907
+ const u = L(n, s) ? n[s] : void 0;
908
+ return u && typeof u == "object" ? N(u) : l();
284
909
  };
285
- function un() {
286
- let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Li();
287
- const n = (r) => un(r);
288
- if (n.version = "3.4.12", n.removed = [], !i || !i.document || i.document.nodeType !== v.document || !i.Element)
910
+ function Tn() {
911
+ let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Gr();
912
+ const n = (o) => Tn(o);
913
+ if (n.version = "3.4.14", n.removed = [], !r || !r.document || r.document.nodeType !== D.document || !r.Element)
289
914
  return n.isSupported = !1, n;
290
- let s = i.document;
915
+ let s = r.document;
291
916
  const l = s, u = l.currentScript;
292
- i.DocumentFragment;
293
- const m = i.HTMLTemplateElement, A = i.Node, dt = i.Element, M = i.NodeFilter, ht = i.NamedNodeMap;
294
- ht === void 0 && (i.NamedNodeMap || i.MozNamedAttrMap), i.HTMLFormElement;
295
- const kt = i.DOMParser, wt = i.trustedTypes, K = dt.prototype, pn = H(K, "cloneNode"), zt = H(K, "remove"), mn = H(K, "nextSibling"), it = H(K, "childNodes"), Z = H(K, "parentNode"), me = H(K, "shadowRoot"), Ft = H(K, "attributes"), I = A && A.prototype ? H(A.prototype, "nodeType") : null, k = A && A.prototype ? H(A.prototype, "nodeName") : null;
296
- if (typeof m == "function") {
297
- const r = s.createElement("template");
298
- r.content && r.content.ownerDocument && (s = r.content.ownerDocument);
917
+ r.DocumentFragment;
918
+ const p = r.HTMLTemplateElement, y = r.Node, k = r.Element, I = r.NodeFilter;
919
+ r.NamedNodeMap === void 0 && (r.NamedNodeMap || r.MozNamedAttrMap), r.HTMLFormElement;
920
+ const wt = r.DOMParser, tt = r.trustedTypes, Y = k.prototype, En = M(Y, "cloneNode"), Gt = M(Y, "remove"), Sn = M(Y, "nextSibling"), et = M(Y, "childNodes"), nt = M(Y, "parentNode"), ge = M(Y, "shadowRoot"), Wt = M(Y, "attributes"), $ = y && y.prototype ? M(y.prototype, "nodeType") : null, rt = y && y.prototype ? M(y.prototype, "nodeName") : null, Ot = y && y.prototype ? M(y.prototype, "ownerDocument") : null, dt = function(t) {
921
+ return $ ? $(t) : t.nodeType;
922
+ }, Bt = function(t) {
923
+ return rt ? rt(t) : t.nodeName;
924
+ };
925
+ if (typeof p == "function") {
926
+ const o = s.createElement("template");
927
+ o.content && o.content.ownerDocument && (s = o.content.ownerDocument);
299
928
  }
300
- let D, J = "", Ut, de = !1, _t = 0;
301
- const he = function() {
302
- if (_t > 0)
303
- throw et('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
304
- }, ot = function(t) {
305
- he(), _t++;
929
+ let O, X = "", jt, ye = !1, ht = 0;
930
+ const Te = function() {
931
+ if (ht > 0) throw Z('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
932
+ }, it = function(t) {
933
+ Te(), ht++;
306
934
  try {
307
- return D.createHTML(t);
935
+ return O.createHTML(t);
308
936
  } finally {
309
- _t--;
937
+ ht--;
310
938
  }
311
- }, dn = function(t) {
312
- he(), _t++;
939
+ }, vn = function(t) {
940
+ Te(), ht++;
313
941
  try {
314
- return D.createScriptURL(t);
942
+ return O.createScriptURL(t);
315
943
  } finally {
316
- _t--;
944
+ ht--;
317
945
  }
318
- }, hn = function() {
319
- return de || (Ut = Di(wt, u), de = !0), Ut;
320
- }, Rt = s, Ht = Rt.implementation, _e = Rt.createNodeIterator, _n = Rt.createDocumentFragment, Tn = Rt.getElementsByTagName, gn = l.importNode;
321
- let h = sn();
322
- n.isSupported = typeof ln == "function" && typeof Z == "function" && Ht && Ht.createHTMLDocument !== void 0;
323
- const yn = gi, En = yi, An = Ei, bn = Ai, Sn = bi, On = Si, Te = Oi, wn = Ri;
324
- let ge = nn, _ = null;
325
- const ye = p({}, [...Je, ...se, ...ae, ...le, ...Qe]);
326
- let T = null;
327
- const Ee = p({}, [...tn, ...ce, ...en, ...xt]);
328
- let g = Object.seal(pt(null, {
946
+ }, wn = function() {
947
+ return ye || (jt = Wr(tt, u), ye = !0), jt;
948
+ }, Rt = s, Yt = Rt.implementation, be = Rt.createNodeIterator, On = Rt.createDocumentFragment, Rn = Rt.getElementsByTagName, Ln = l.importNode;
949
+ let h = dn();
950
+ n.isSupported = typeof _n == "function" && typeof nt == "function" && Yt && Yt.createHTMLDocument !== void 0;
951
+ const In = Lr, Dn = Ir, Nn = Dr, Cn = Nr, Mn = Cr, xn = Mr, Ae = xr, Pn = zr;
952
+ let Ee = fn, _ = null;
953
+ const $t = d({}, [
954
+ ...sn,
955
+ ...ce,
956
+ ...ue,
957
+ ...fe,
958
+ ...ln
959
+ ]);
960
+ let g = null;
961
+ const Xt = d({}, [
962
+ ...cn,
963
+ ...pe,
964
+ ...un,
965
+ ...Ht
966
+ ]);
967
+ let x = Object.seal(ft(null, {
329
968
  tagNameCheck: {
330
969
  writable: !0,
331
970
  configurable: !1,
@@ -344,8 +983,8 @@ function un() {
344
983
  enumerable: !0,
345
984
  value: !1
346
985
  }
347
- })), Tt = null, Ae = null;
348
- const B = Object.seal(pt(null, {
986
+ })), _t = null, Se = null;
987
+ const F = Object.seal(ft(null, {
349
988
  tagCheck: {
350
989
  writable: !0,
351
990
  configurable: !1,
@@ -359,10 +998,10 @@ function un() {
359
998
  value: null
360
999
  }
361
1000
  }));
362
- let be = !0, Gt = !0, Se = !1, Oe = !0, W = !1, Y = !0, Q = !1, Bt = !1, Wt = null, Yt = null, $t = !1, rt = !1, It = !1, Nt = !1, we = !0, Re = !1;
1001
+ let ve = !0, Vt = !0, we = !1, Oe = !0, H = !1, V = !0, q = !1, qt = !1, Lt = null, It = null, Kt = !1, ot = !1, Dt = !1, Nt = !1, Re = !0, Le = !1;
363
1002
  const Ie = "user-content-";
364
- let jt = !0, Xt = !1, st = {}, z = null;
365
- const Vt = p({}, [
1003
+ let Zt = !0, Jt = !1, at = {}, st = null;
1004
+ const De = d({}, [
366
1005
  "annotation-xml",
367
1006
  "audio",
368
1007
  "colgroup",
@@ -381,15 +1020,6 @@ function un() {
381
1020
  "noscript",
382
1021
  "plaintext",
383
1022
  "script",
384
- // <selectedcontent> mirrors the selected <option>'s subtree, cloned by
385
- // the UA (customizable <select>) — including any on* handlers — and the
386
- // engine re-mirrors synchronously whenever a removal changes which
387
- // option/selectedcontent is current, even inside DOMPurify's inert
388
- // DOMParser document. Hoisting its children on removal re-inserts a fresh
389
- // mirror target ahead of the walk, which the engine refills, looping
390
- // forever (DoS) and amplifying output. Dropping its content on removal
391
- // (rather than hoisting) breaks that cascade; the content is a duplicate
392
- // of the option, which is sanitized on its own. See campaign-3 F1/F6.
393
1023
  "selectedcontent",
394
1024
  "style",
395
1025
  "svg",
@@ -400,575 +1030,559 @@ function un() {
400
1030
  "xmp"
401
1031
  ]);
402
1032
  let Ne = null;
403
- const Le = p({}, ["audio", "video", "img", "source", "image", "track"]);
404
- let qt = null;
405
- const De = p({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Lt = "http://www.w3.org/1998/Math/MathML", Dt = "http://www.w3.org/2000/svg", F = "http://www.w3.org/1999/xhtml";
406
- let at = F, Kt = !1, Zt = null;
407
- const Rn = p({}, [Lt, Dt, F], re), Ce = O(["mi", "mo", "mn", "ms", "mtext"]);
408
- let Jt = p({}, Ce);
409
- const Me = O(["annotation-xml"]);
410
- let Qt = p({}, Me);
411
- const In = p({}, ["title", "style", "font", "a", "script"]);
1033
+ const Ce = d({}, [
1034
+ "audio",
1035
+ "video",
1036
+ "img",
1037
+ "source",
1038
+ "image",
1039
+ "track"
1040
+ ]);
1041
+ let Me = null;
1042
+ const xe = d({}, [
1043
+ "alt",
1044
+ "class",
1045
+ "for",
1046
+ "id",
1047
+ "label",
1048
+ "name",
1049
+ "pattern",
1050
+ "placeholder",
1051
+ "role",
1052
+ "summary",
1053
+ "title",
1054
+ "value",
1055
+ "style",
1056
+ "xmlns"
1057
+ ]), Ct = "http://www.w3.org/1998/Math/MathML", Mt = "http://www.w3.org/2000/svg", P = "http://www.w3.org/1999/xhtml";
1058
+ let lt = P, Qt = !1, te = null;
1059
+ const zn = d({}, [
1060
+ Ct,
1061
+ Mt,
1062
+ P
1063
+ ], le), Pe = A([
1064
+ "mi",
1065
+ "mo",
1066
+ "mn",
1067
+ "ms",
1068
+ "mtext"
1069
+ ]);
1070
+ let ee = d({}, Pe);
1071
+ const ze = A(["annotation-xml"]);
1072
+ let ne = d({}, ze);
1073
+ const kn = d({}, [
1074
+ "title",
1075
+ "style",
1076
+ "font",
1077
+ "a",
1078
+ "script"
1079
+ ]);
412
1080
  let gt = null;
413
- const Nn = ["application/xhtml+xml", "text/html"], Ln = "text/html";
414
- let d = null, lt = null;
415
- const Dn = s.createElement("form"), ve = function(t) {
1081
+ const Un = ["application/xhtml+xml", "text/html"], Fn = "text/html";
1082
+ let T = null, ct = null;
1083
+ const Hn = s.createElement("form"), ke = function(t) {
416
1084
  return t instanceof RegExp || t instanceof Function;
417
- }, te = function() {
1085
+ }, re = function() {
418
1086
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
419
- if (lt && lt === t)
420
- return;
421
- (!t || typeof t != "object") && (t = {}), t = L(t), gt = // eslint-disable-next-line unicorn/prefer-includes
422
- Nn.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Ln : t.PARSER_MEDIA_TYPE, d = gt === "application/xhtml+xml" ? re : bt, _ = j(t, "ALLOWED_TAGS", ye, {
423
- transform: d
424
- }), T = j(t, "ALLOWED_ATTR", Ee, {
425
- transform: d
426
- }), Zt = j(t, "ALLOWED_NAMESPACES", Rn, {
427
- transform: re
428
- }), qt = j(t, "ADD_URI_SAFE_ATTR", De, {
429
- transform: d,
430
- base: De
431
- }), Ne = j(t, "ADD_DATA_URI_TAGS", Le, {
432
- transform: d,
433
- base: Le
434
- }), z = j(t, "FORBID_CONTENTS", Vt, {
435
- transform: d
436
- }), Tt = j(t, "FORBID_TAGS", L({}), {
437
- transform: d
438
- }), Ae = j(t, "FORBID_ATTR", L({}), {
439
- transform: d
440
- }), st = S(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? L(t.USE_PROFILES) : t.USE_PROFILES : !1, be = t.ALLOW_ARIA_ATTR !== !1, Gt = t.ALLOW_DATA_ATTR !== !1, Se = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Oe = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, W = t.SAFE_FOR_TEMPLATES || !1, Y = t.SAFE_FOR_XML !== !1, Q = t.WHOLE_DOCUMENT || !1, rt = t.RETURN_DOM || !1, It = t.RETURN_DOM_FRAGMENT || !1, Nt = t.RETURN_TRUSTED_TYPE || !1, $t = t.FORCE_BODY || !1, we = t.SANITIZE_DOM !== !1, Re = t.SANITIZE_NAMED_PROPS || !1, jt = t.KEEP_CONTENT !== !1, Xt = t.IN_PLACE || !1, ge = hi(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : nn, at = typeof t.NAMESPACE == "string" ? t.NAMESPACE : F, Jt = S(t, "MATHML_TEXT_INTEGRATION_POINTS") && t.MATHML_TEXT_INTEGRATION_POINTS && typeof t.MATHML_TEXT_INTEGRATION_POINTS == "object" ? L(t.MATHML_TEXT_INTEGRATION_POINTS) : p({}, Ce), Qt = S(t, "HTML_INTEGRATION_POINTS") && t.HTML_INTEGRATION_POINTS && typeof t.HTML_INTEGRATION_POINTS == "object" ? L(t.HTML_INTEGRATION_POINTS) : p({}, Me);
441
- const e = S(t, "CUSTOM_ELEMENT_HANDLING") && t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING == "object" ? L(t.CUSTOM_ELEMENT_HANDLING) : pt(null);
442
- if (g = pt(null), S(e, "tagNameCheck") && ve(e.tagNameCheck) && (g.tagNameCheck = e.tagNameCheck), S(e, "attributeNameCheck") && ve(e.attributeNameCheck) && (g.attributeNameCheck = e.attributeNameCheck), S(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (g.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), w(g), W && (Gt = !1), It && (rt = !0), st && (_ = p({}, Qe), T = pt(null), st.html === !0 && (p(_, Je), p(T, tn)), st.svg === !0 && (p(_, se), p(T, ce), p(T, xt)), st.svgFilters === !0 && (p(_, ae), p(T, ce), p(T, xt)), st.mathMl === !0 && (p(_, le), p(T, en), p(T, xt))), B.tagCheck = null, B.attributeCheck = null, S(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? B.tagCheck = t.ADD_TAGS : X(t.ADD_TAGS) && (_ === ye && (_ = L(_)), p(_, t.ADD_TAGS, d))), S(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? B.attributeCheck = t.ADD_ATTR : X(t.ADD_ATTR) && (T === Ee && (T = L(T)), p(T, t.ADD_ATTR, d))), S(t, "ADD_URI_SAFE_ATTR") && X(t.ADD_URI_SAFE_ATTR) && p(qt, t.ADD_URI_SAFE_ATTR, d), S(t, "FORBID_CONTENTS") && X(t.FORBID_CONTENTS) && (z === Vt && (z = L(z)), p(z, t.FORBID_CONTENTS, d)), S(t, "ADD_FORBID_CONTENTS") && X(t.ADD_FORBID_CONTENTS) && (z === Vt && (z = L(z)), p(z, t.ADD_FORBID_CONTENTS, d)), jt && (_["#text"] = !0), Q && p(_, ["html", "head", "body"]), _.table && (p(_, ["tbody"]), delete Tt.tbody), t.TRUSTED_TYPES_POLICY) {
443
- if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
444
- throw et('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
445
- if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
446
- throw et('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
447
- const o = D;
448
- D = t.TRUSTED_TYPES_POLICY;
1087
+ if (ct && ct === t) return;
1088
+ (!t || typeof t != "object") && (t = {}), t = N(t), gt = Un.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Fn : t.PARSER_MEDIA_TYPE, T = gt === "application/xhtml+xml" ? le : Et, _ = W(t, "ALLOWED_TAGS", $t, { transform: T }), g = W(t, "ALLOWED_ATTR", Xt, { transform: T }), te = W(t, "ALLOWED_NAMESPACES", zn, { transform: le }), Me = W(t, "ADD_URI_SAFE_ATTR", xe, {
1089
+ transform: T,
1090
+ base: xe
1091
+ }), Ne = W(t, "ADD_DATA_URI_TAGS", Ce, {
1092
+ transform: T,
1093
+ base: Ce
1094
+ }), st = W(t, "FORBID_CONTENTS", De, { transform: T }), _t = W(t, "FORBID_TAGS", N({}), { transform: T }), Se = W(t, "FORBID_ATTR", N({}), { transform: T }), at = L(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? N(t.USE_PROFILES) : t.USE_PROFILES : !1, ve = t.ALLOW_ARIA_ATTR !== !1, Vt = t.ALLOW_DATA_ATTR !== !1, we = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Oe = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = t.SAFE_FOR_TEMPLATES || !1, V = t.SAFE_FOR_XML !== !1, q = t.WHOLE_DOCUMENT || !1, ot = t.RETURN_DOM || !1, Dt = t.RETURN_DOM_FRAGMENT || !1, Nt = t.RETURN_TRUSTED_TYPE || !1, Kt = t.FORCE_BODY || !1, Re = t.SANITIZE_DOM !== !1, Le = t.SANITIZE_NAMED_PROPS || !1, Zt = t.KEEP_CONTENT !== !1, Jt = t.IN_PLACE || !1, Ee = wr(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : fn, lt = typeof t.NAMESPACE == "string" ? t.NAMESPACE : P, ee = me(t, "MATHML_TEXT_INTEGRATION_POINTS", () => d({}, Pe)), ne = me(t, "HTML_INTEGRATION_POINTS", () => d({}, ze));
1095
+ const e = me(t, "CUSTOM_ELEMENT_HANDLING", () => ft(null));
1096
+ if (x = ft(null), L(e, "tagNameCheck") && ke(e.tagNameCheck) && (x.tagNameCheck = e.tagNameCheck), L(e, "attributeNameCheck") && ke(e.attributeNameCheck) && (x.attributeNameCheck = e.attributeNameCheck), L(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (x.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), E(x), H && (Vt = !1), Dt && (ot = !0), at && (_ = d({}, ln), g = ft(null), at.html === !0 && (d(_, sn), d(g, cn)), at.svg === !0 && (d(_, ce), d(g, pe), d(g, Ht)), at.svgFilters === !0 && (d(_, ue), d(g, pe), d(g, Ht)), at.mathMl === !0 && (d(_, fe), d(g, un), d(g, Ht))), F.tagCheck = null, F.attributeCheck = null, L(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? F.tagCheck = t.ADD_TAGS : mt(t.ADD_TAGS) && (_ === $t && (_ = N(_)), d(_, t.ADD_TAGS, T))), L(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? F.attributeCheck = t.ADD_ATTR : mt(t.ADD_ATTR) && (g === Xt && (g = N(g)), d(g, t.ADD_ATTR, T))), L(t, "ADD_FORBID_CONTENTS") && mt(t.ADD_FORBID_CONTENTS) && (st === De && (st = N(st)), d(st, t.ADD_FORBID_CONTENTS, T)), Zt && (_["#text"] = !0), q && d(_, [
1097
+ "html",
1098
+ "head",
1099
+ "body"
1100
+ ]), _.table && (d(_, ["tbody"]), delete _t.tbody), t.TRUSTED_TYPES_POLICY) {
1101
+ if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function") throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1102
+ if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
1103
+ const i = O;
1104
+ O = t.TRUSTED_TYPES_POLICY;
449
1105
  try {
450
- J = ot("");
1106
+ X = it("");
451
1107
  } catch (a) {
452
- throw D = o, a;
1108
+ throw O = i, a;
453
1109
  }
454
- } else t.TRUSTED_TYPES_POLICY === null ? (D = void 0, J = "") : (D === void 0 && (D = hn()), D && typeof J == "string" && (J = ot("")));
455
- O && O(t), lt = t;
456
- }, Pe = p({}, [...se, ...ae, ..._i]), xe = p({}, [...le, ...Ti]), Cn = function(t, e, o) {
457
- return e.namespaceURI === F ? t === "svg" : e.namespaceURI === Lt ? t === "svg" && (o === "annotation-xml" || Jt[o]) : !!Pe[t];
458
- }, Mn = function(t, e, o) {
459
- return e.namespaceURI === F ? t === "math" : e.namespaceURI === Dt ? t === "math" && Qt[o] : !!xe[t];
460
- }, vn = function(t, e, o) {
461
- return e.namespaceURI === Dt && !Qt[o] || e.namespaceURI === Lt && !Jt[o] ? !1 : !xe[t] && (In[t] || !Pe[t]);
462
- }, Pn = function(t) {
463
- let e = Z(t);
1110
+ } else t.TRUSTED_TYPES_POLICY === null ? (O = void 0, X = "") : (O === void 0 && (O = wn()), O && typeof X == "string" && (X = it("")));
1111
+ A && A(t), ct = t;
1112
+ }, Ue = d({}, [
1113
+ ...ce,
1114
+ ...ue,
1115
+ ...Or
1116
+ ]), Fe = d({}, [...fe, ...Rr]), Gn = function(t, e, i) {
1117
+ return e.namespaceURI === P ? t === "svg" : e.namespaceURI === Ct ? t === "svg" && (i === "annotation-xml" || ee[i]) : !!Ue[t];
1118
+ }, Wn = function(t, e, i) {
1119
+ return e.namespaceURI === P ? t === "math" : e.namespaceURI === Mt ? t === "math" && ne[i] : !!Fe[t];
1120
+ }, Bn = function(t, e, i) {
1121
+ return e.namespaceURI === Mt && !ne[i] || e.namespaceURI === Ct && !ee[i] ? !1 : !Fe[t] && (kn[t] || !Ue[t]);
1122
+ }, jn = function(t) {
1123
+ let e = nt(t);
464
1124
  (!e || !e.tagName) && (e = {
465
- namespaceURI: at,
1125
+ namespaceURI: lt,
466
1126
  tagName: "template"
467
1127
  });
468
- const o = bt(t.tagName), a = bt(e.tagName);
469
- return Zt[t.namespaceURI] ? t.namespaceURI === Dt ? Cn(o, e, a) : t.namespaceURI === Lt ? Mn(o, e, a) : t.namespaceURI === F ? vn(o, e, a) : !!(gt === "application/xhtml+xml" && Zt[t.namespaceURI]) : !1;
470
- }, $ = function(t) {
471
- ft(n.removed, {
472
- element: t
473
- });
1128
+ const i = Et(t.tagName), a = Et(e.tagName);
1129
+ return te[t.namespaceURI] ? t.namespaceURI === Mt ? Gn(i, e, a) : t.namespaceURI === Ct ? Wn(i, e, a) : t.namespaceURI === P ? Bn(i, e, a) : !!(gt === "application/xhtml+xml" && te[t.namespaceURI]) : !1;
1130
+ }, G = function(t) {
1131
+ Tt(n.removed, { element: t });
1132
+ try {
1133
+ nt(t).removeChild(t);
1134
+ } catch {
1135
+ if (Gt(t), !nt(t)) throw Z("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1136
+ }
1137
+ }, He = function(t, e, i) {
474
1138
  try {
475
- Z(t).removeChild(t);
1139
+ t.removeAttributeNode(e);
476
1140
  } catch {
477
- if (zt(t), !Z(t))
478
- throw et("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1141
+ try {
1142
+ t.removeAttribute(i);
1143
+ } catch {
1144
+ }
479
1145
  }
480
- }, Ct = function(t) {
481
- ee(t);
482
- const e = it(t);
1146
+ }, xt = function(t) {
1147
+ Pt(t);
1148
+ const e = et(t);
483
1149
  if (e) {
484
1150
  const a = [];
485
- ut(e, (c) => {
486
- ft(a, c);
487
- }), ut(a, (c) => {
1151
+ J(e, (c) => {
1152
+ Tt(a, c);
1153
+ }), J(a, (c) => {
488
1154
  try {
489
- zt(c);
1155
+ Gt(c);
490
1156
  } catch {
491
1157
  }
492
1158
  });
493
1159
  }
494
- const o = Ft(t);
495
- if (o)
496
- for (let a = o.length - 1; a >= 0; --a) {
497
- const c = o[a], f = c && c.name;
498
- if (typeof f == "string")
499
- try {
500
- t.removeAttribute(f);
501
- } catch {
502
- }
503
- }
504
- }, tt = function(t, e) {
1160
+ const i = Wt(t);
1161
+ if (i) for (let a = i.length - 1; a >= 0; --a) {
1162
+ const c = i[a], f = c && c.name;
1163
+ typeof f == "string" && He(t, c, f);
1164
+ }
1165
+ }, K = function(t, e, i) {
1166
+ if (!i) try {
1167
+ i = e.getAttributeNode(t);
1168
+ } catch {
1169
+ i = null;
1170
+ }
1171
+ Tt(n.removed, {
1172
+ attribute: i || null,
1173
+ from: e
1174
+ });
505
1175
  try {
506
- ft(n.removed, {
507
- attribute: e.getAttributeNode(t),
508
- from: e
509
- });
1176
+ i ? e.removeAttributeNode(i) : e.removeAttribute(t);
510
1177
  } catch {
511
- ft(n.removed, {
512
- attribute: null,
513
- from: e
514
- });
1178
+ try {
1179
+ e.removeAttribute(t);
1180
+ } catch {
1181
+ }
515
1182
  }
516
- if (e.removeAttribute(t), t === "is")
517
- if (rt || It)
518
- try {
519
- $(e);
520
- } catch {
521
- }
522
- else
523
- try {
524
- e.setAttribute(t, "");
525
- } catch {
526
- }
527
- }, xn = function(t) {
528
- const e = Ft(t);
1183
+ if (t === "is")
1184
+ if (ot || Dt) try {
1185
+ G(e);
1186
+ } catch {
1187
+ }
1188
+ else try {
1189
+ e.setAttribute(t, "");
1190
+ } catch {
1191
+ }
1192
+ }, Yn = function(t) {
1193
+ const e = Wt(t);
529
1194
  if (e)
530
- for (let o = e.length - 1; o >= 0; --o) {
531
- const a = e[o], c = a && a.name;
532
- if (!(typeof c != "string" || T[d(c)]))
533
- try {
534
- t.removeAttribute(c);
535
- } catch {
536
- }
1195
+ for (let i = e.length - 1; i >= 0; --i) {
1196
+ const a = e[i], c = a && a.name;
1197
+ typeof c != "string" || g[T(c)] || He(t, a, c);
537
1198
  }
538
- }, ee = function(t) {
1199
+ }, Pt = function(t) {
539
1200
  const e = [t];
540
1201
  for (; e.length > 0; ) {
541
- const o = e.pop();
542
- (I ? I(o) : o.nodeType) === v.element && xn(o);
543
- const c = it(o);
544
- if (c)
545
- for (let f = c.length - 1; f >= 0; --f)
546
- e.push(c[f]);
1202
+ const i = e.pop();
1203
+ dt(i) === D.element && Yn(i);
1204
+ const a = et(i);
1205
+ if (a) for (let c = a.length - 1; c >= 0; --c) e.push(a[c]);
547
1206
  }
548
- }, kn = function(t) {
549
- if (!Y)
550
- return;
1207
+ }, Ge = function(t, e) {
1208
+ return V ? t === "patchsrc" ? !0 : t === "for" && e !== "label" && e !== "output" : !1;
1209
+ }, $n = function(t) {
1210
+ if (!V) return;
551
1211
  const e = [t];
552
1212
  for (; e.length > 0; ) {
553
- const o = e.pop(), a = I ? I(o) : o.nodeType;
554
- if (a === v.processingInstruction || a === v.comment && b(rn, o.data)) {
1213
+ const i = e.pop(), a = dt(i);
1214
+ if (a === D.processingInstruction || a === D.comment && S(mn, i.data)) {
555
1215
  try {
556
- zt(o);
1216
+ Gt(i);
557
1217
  } catch {
558
1218
  }
559
1219
  continue;
560
1220
  }
561
- if (a === v.element) {
562
- const f = o, y = d(k ? k(o) : o.nodeName);
1221
+ if (a === D.element) {
1222
+ const f = i, m = T(Bt(i));
563
1223
  try {
564
- f.hasAttribute && f.hasAttribute("patchsrc") && f.removeAttribute("patchsrc"), f.hasAttribute && f.hasAttribute("for") && y !== "label" && y !== "output" && f.removeAttribute("for");
1224
+ f.hasAttribute && f.hasAttribute("patchsrc") && f.removeAttribute("patchsrc"), f.hasAttribute && f.hasAttribute("for") && Ge("for", m) && f.removeAttribute("for");
565
1225
  } catch {
566
1226
  }
567
1227
  }
568
- const c = it(o);
569
- if (c)
570
- for (let f = c.length - 1; f >= 0; --f)
571
- e.push(c[f]);
1228
+ const c = et(i);
1229
+ if (c) for (let f = c.length - 1; f >= 0; --f) e.push(c[f]);
572
1230
  }
573
- }, ke = function(t) {
574
- let e = null, o = null;
575
- if ($t)
576
- t = "<remove></remove>" + t;
1231
+ }, We = function(t) {
1232
+ let e = null, i = null;
1233
+ if (Kt) t = "<remove></remove>" + t;
577
1234
  else {
578
- const f = Ve(t, /^[\r\n\t ]+/);
579
- o = f && f[0];
1235
+ const f = nn(t, /^[\r\n\t ]+/);
1236
+ i = f && f[0];
1237
+ }
1238
+ gt === "application/xhtml+xml" && lt === P && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
1239
+ const a = O ? it(t) : t;
1240
+ if (lt === P) try {
1241
+ e = new wt().parseFromString(a, gt);
1242
+ } catch {
580
1243
  }
581
- gt === "application/xhtml+xml" && at === F && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
582
- const a = D ? ot(t) : t;
583
- if (at === F)
584
- try {
585
- e = new kt().parseFromString(a, gt);
586
- } catch {
587
- }
588
1244
  if (!e || !e.documentElement) {
589
- e = Ht.createDocument(at, "template", null);
1245
+ e = Yt.createDocument(lt, "template", null);
590
1246
  try {
591
- e.documentElement.innerHTML = Kt ? J : a;
1247
+ e.documentElement.innerHTML = Qt ? X : a;
592
1248
  } catch {
593
1249
  }
594
1250
  }
595
1251
  const c = e.body || e.documentElement;
596
- return t && o && c.insertBefore(s.createTextNode(o), c.childNodes[0] || null), at === F ? Tn.call(e, Q ? "html" : "body")[0] : Q ? e.documentElement : c;
597
- }, ze = function(t) {
598
- return _e.call(
599
- t.ownerDocument || t,
600
- t,
601
- // eslint-disable-next-line no-bitwise
602
- M.SHOW_ELEMENT | M.SHOW_COMMENT | M.SHOW_TEXT | M.SHOW_PROCESSING_INSTRUCTION | M.SHOW_CDATA_SECTION,
603
- null
604
- );
605
- }, Mt = function(t) {
606
- return t = Et(t, yn, " "), t = Et(t, En, " "), t = Et(t, An, " "), t;
607
- }, ne = function(t) {
1252
+ return t && i && c.insertBefore(s.createTextNode(i), c.childNodes[0] || null), lt === P ? Rn.call(e, q ? "html" : "body")[0] : q ? e.documentElement : c;
1253
+ }, Be = function(t) {
1254
+ const e = Ot ? Ot(t) : t.ownerDocument;
1255
+ return be.call(e || t, t, I.SHOW_ELEMENT | I.SHOW_COMMENT | I.SHOW_TEXT | I.SHOW_PROCESSING_INSTRUCTION | I.SHOW_CDATA_SECTION, null);
1256
+ }, zt = function(t) {
1257
+ return t = bt(t, In, " "), t = bt(t, Dn, " "), t = bt(t, Nn, " "), t;
1258
+ }, ie = function(t) {
608
1259
  var e;
609
1260
  t.normalize();
610
- const o = _e.call(
611
- t.ownerDocument || t,
612
- t,
613
- // eslint-disable-next-line no-bitwise
614
- M.SHOW_TEXT | M.SHOW_COMMENT | M.SHOW_CDATA_SECTION | M.SHOW_PROCESSING_INSTRUCTION,
615
- null
616
- );
617
- let a = o.nextNode();
618
- for (; a; )
619
- a.data = Mt(a.data), a = o.nextNode();
620
- const c = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
621
- c && ut(c, (f) => {
622
- ct(f.content) && ne(f.content);
1261
+ const i = Ot ? Ot(t) : t.ownerDocument, a = be.call(i || t, t, I.SHOW_TEXT | I.SHOW_COMMENT | I.SHOW_CDATA_SECTION | I.SHOW_PROCESSING_INSTRUCTION, null);
1262
+ let c = a.nextNode();
1263
+ for (; c; )
1264
+ c.data = zt(c.data), c = a.nextNode();
1265
+ const f = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
1266
+ f && J(f, (m) => {
1267
+ ut(m.content) && ie(m.content);
623
1268
  });
624
- }, vt = function(t) {
625
- const e = k ? k(t) : null;
626
- return typeof e != "string" || d(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
627
- // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
628
- // makes the direct read diverge from the cached read; a clean form
629
- // (same-realm OR foreign-realm) has both reads pointing at the same
630
- // canonical NamedNodeMap.
631
- t.attributes !== Ft(t) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
632
- // returns the integer 1 for any Element regardless of realm; direct
633
- // read on a clobbered form (e.g. <input name="nodeType">) returns
634
- // the named child element. Cheap addition — nodeType is read from
635
- // an internal slot, no serialization cost — and removes a residual
636
- // clobbering surface used by several mXSS / PI / comment branches
637
- // in _sanitizeElements that compare currentNode.nodeType directly.
638
- t.nodeType !== I(t) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
639
- // "childNodes" shadows the prototype getter. Direct reads of
640
- // form.childNodes from a clobbered form return the named child
641
- // instead of the real NodeList, so any walk that reads it directly
642
- // skips the form's real children. Compare the direct read to the
643
- // cached Node.prototype getter — when the form's named-property
644
- // getter intercepts the read, the two values differ and we flag
645
- // the form. This catches every clobbering child type (input,
646
- // select, etc.) regardless of whether the named child happens to
647
- // carry a numeric .length, which a typeof-based probe would miss
648
- // (e.g. HTMLSelectElement.length is a defined unsigned-long).
649
- t.childNodes !== it(t);
650
- }, ct = function(t) {
651
- if (!I || typeof t != "object" || t === null)
652
- return !1;
1269
+ }, kt = function(t) {
1270
+ const e = rt ? rt(t) : null;
1271
+ return typeof e != "string" || T(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || t.attributes !== Wt(t) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || t.nodeType !== $(t) || t.childNodes !== et(t);
1272
+ }, ut = function(t) {
1273
+ if (!$ || typeof t != "object" || t === null) return !1;
653
1274
  try {
654
- return I(t) === v.documentFragment;
1275
+ return $(t) === D.documentFragment;
655
1276
  } catch {
656
1277
  return !1;
657
1278
  }
658
1279
  }, yt = function(t) {
659
- if (!I || typeof t != "object" || t === null)
660
- return !1;
1280
+ if (!$ || typeof t != "object" || t === null) return !1;
661
1281
  try {
662
- return typeof I(t) == "number";
1282
+ return typeof $(t) == "number";
663
1283
  } catch {
664
1284
  return !1;
665
1285
  }
666
1286
  };
667
- function U(r, t, e) {
668
- r.length !== 0 && ut(r, (o) => {
669
- o.call(n, t, e, lt);
1287
+ function z(o, t, e) {
1288
+ o.length !== 0 && J(o, (i) => {
1289
+ i.call(n, t, e, ct);
670
1290
  });
671
1291
  }
672
- const zn = function(t, e) {
673
- return !!(Y && t.hasChildNodes() && !yt(t.firstElementChild) && b(on, t.textContent) && b(on, t.innerHTML) || Y && t.namespaceURI === F && e === "style" && yt(t.firstElementChild) || t.nodeType === v.processingInstruction || Y && t.nodeType === v.comment && b(rn, t.data));
674
- }, Fn = function(t, e) {
675
- if (!Tt[e] && He(e) && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, e) || g.tagNameCheck instanceof Function && g.tagNameCheck(e)))
676
- return !1;
677
- if (jt && !z[e]) {
678
- const o = Z(t), a = it(t);
679
- if (a && o) {
680
- const c = a.length;
681
- for (let f = c - 1; f >= 0; --f) {
682
- const y = Xt ? a[f] : pn(a[f], !0);
683
- o.insertBefore(y, mn(t));
1292
+ const Xn = function(t, e) {
1293
+ return !!(V && t.hasChildNodes() && !yt(t.firstElementChild) && S(pn, t.textContent) && S(pn, t.innerHTML) || V && t.namespaceURI === P && Fr[e] && (yt(t.firstElementChild) || typeof t.textContent == "string" && S(Hr[e], t.textContent)) || t.nodeType === D.processingInstruction || V && t.nodeType === D.comment && S(mn, t.data));
1294
+ }, Ut = function(t, e) {
1295
+ if (t instanceof RegExp) return S(t, e);
1296
+ if (t instanceof Function) {
1297
+ for (var i = arguments.length, a = new Array(i > 2 ? i - 2 : 0), c = 2; c < i; c++) a[c - 2] = arguments[c];
1298
+ return !!t(e, ...a);
1299
+ }
1300
+ return !1;
1301
+ }, Vn = function(t, e, i) {
1302
+ if (!_t[e] && Ve(e) && Ut(x.tagNameCheck, e)) return !1;
1303
+ if (Zt && !st[e]) {
1304
+ const a = nt(t), c = et(t);
1305
+ if (c && a) {
1306
+ const f = c.length;
1307
+ for (let m = f - 1; m >= 0; --m) {
1308
+ const v = t === i ? En(c[m], !0) : c[m];
1309
+ a.insertBefore(v, Sn(t));
684
1310
  }
685
1311
  }
686
1312
  }
687
- return $(t), !0;
688
- }, Fe = function(t, e) {
689
- if (U(h.beforeSanitizeElements, t, null), t !== e && Z(t) === null)
690
- return !0;
691
- if (vt(t))
692
- return $(t), !0;
693
- const o = d(k ? k(t) : t.nodeName);
694
- if (U(h.uponSanitizeElement, t, {
695
- tagName: o,
1313
+ return G(t), !0;
1314
+ }, je = function(t, e, i, a) {
1315
+ return t.length === 0 ? e : e === i || e === a ? N(e) : e;
1316
+ }, Ye = function(t, e) {
1317
+ return t === e || nt(t) !== null ? !1 : (Jt && Pt(t), !0);
1318
+ }, $e = function(t, e) {
1319
+ if (z(h.beforeSanitizeElements, t, null), Ye(t, e)) return !0;
1320
+ if (kt(t))
1321
+ return G(t), !0;
1322
+ const i = T(Bt(t));
1323
+ if (_ = je(h.uponSanitizeElement, _, $t, Lt), z(h.uponSanitizeElement, t, {
1324
+ tagName: i,
696
1325
  allowedTags: _
697
- }), t !== e && Z(t) === null)
698
- return !0;
699
- if (zn(t, o))
700
- return $(t), !0;
701
- if (Tt[o] || !(B.tagCheck instanceof Function && B.tagCheck(o)) && !_[o]) {
702
- const c = Fn(t, o);
703
- return c === !1 && U(h.afterSanitizeElements, t, null), c;
1326
+ }), Ye(t, e)) return !0;
1327
+ if (Xn(t, i))
1328
+ return G(t), !0;
1329
+ if (_t[i] || !(F.tagCheck instanceof Function && F.tagCheck(i)) && !_[i]) {
1330
+ const a = Vn(t, i, e);
1331
+ return a === !1 && z(h.afterSanitizeElements, t, null), a;
704
1332
  }
705
- if ((I ? I(t) : t.nodeType) === v.element && !Pn(t) || (o === "noscript" || o === "noembed" || o === "noframes") && b(Ii, t.innerHTML))
706
- return $(t), !0;
707
- if (W && t.nodeType === v.text) {
708
- const c = Mt(t.textContent);
709
- t.textContent !== c && (ft(n.removed, {
710
- element: t.cloneNode()
711
- }), t.textContent = c);
1333
+ if (dt(t) === D.element && !jn(t) || (i === "noscript" || i === "noembed" || i === "noframes") && S(kr, t.innerHTML))
1334
+ return G(t), !0;
1335
+ if (H && t.nodeType === D.text) {
1336
+ const a = zt(t.textContent);
1337
+ t.textContent !== a && (Tt(n.removed, { element: t.cloneNode() }), t.textContent = a);
712
1338
  }
713
- return U(h.afterSanitizeElements, t, null), !1;
714
- }, Ue = function(t, e, o) {
715
- if (Ae[e] || Y && e === "patchsrc" || Y && e === "for" && t !== "label" && t !== "output" || we && (e === "id" || e === "name") && (o in s || o in Dn))
716
- return !1;
717
- const a = T[e] || B.attributeCheck instanceof Function && B.attributeCheck(e, t);
718
- if (!(Gt && b(bn, e))) {
719
- if (!(be && b(Sn, e))) {
720
- if (a) {
721
- if (!qt[e]) {
722
- if (!b(ge, Et(o, Te, ""))) {
723
- if (!((e === "src" || e === "xlink:href" || e === "href") && t !== "script" && qe(o, "data:") === 0 && Ne[t])) {
724
- if (!(Se && !b(On, Et(o, Te, "")))) {
725
- if (o)
726
- return !1;
727
- }
728
- }
729
- }
730
- }
731
- } else if (
732
- // First condition does a very basic check if a) it's basically a valid custom element tagname AND
733
- // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
734
- // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
735
- !(He(t) && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, t) || g.tagNameCheck instanceof Function && g.tagNameCheck(t)) && (g.attributeNameCheck instanceof RegExp && b(g.attributeNameCheck, e) || g.attributeNameCheck instanceof Function && g.attributeNameCheck(e, t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
736
- // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
737
- e === "is" && g.allowCustomizedBuiltInElements && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, o) || g.tagNameCheck instanceof Function && g.tagNameCheck(o)))
738
- ) return !1;
739
- }
1339
+ return z(h.afterSanitizeElements, t, null), !1;
1340
+ }, Xe = function(t, e, i) {
1341
+ if (Se[e] || Ge(e, t) || Re && (e === "id" || e === "name") && (i in s || i in Hn)) return !1;
1342
+ const a = g[e] || F.attributeCheck instanceof Function && F.attributeCheck(e, t);
1343
+ return Vt && S(Cn, e) || ve && S(Mn, e) ? !0 : a ? Me[e] || S(Ee, bt(i, Ae, "")) || (e === "src" || e === "xlink:href" || e === "href") && t !== "script" && rn(i, "data:") === 0 && Ne[t] || we && !S(xn, bt(i, Ae, "")) ? !0 : !i : Ve(t) && Ut(x.tagNameCheck, t) && Ut(x.attributeNameCheck, e, t) || e === "is" && x.allowCustomizedBuiltInElements && Ut(x.tagNameCheck, i);
1344
+ }, qn = d({}, [
1345
+ "annotation-xml",
1346
+ "color-profile",
1347
+ "font-face",
1348
+ "font-face-format",
1349
+ "font-face-name",
1350
+ "font-face-src",
1351
+ "font-face-uri",
1352
+ "missing-glyph"
1353
+ ]), Ve = function(t) {
1354
+ return !qn[Et(t)] && S(Pn, t);
1355
+ }, Kn = function(t, e, i, a) {
1356
+ if (O && typeof tt == "object" && typeof tt.getAttributeType == "function" && !i) switch (tt.getAttributeType(t, e)) {
1357
+ case "TrustedHTML":
1358
+ return it(a);
1359
+ case "TrustedScriptURL":
1360
+ return vn(a);
740
1361
  }
741
- return !0;
742
- }, Un = p({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), He = function(t) {
743
- return !Un[bt(t)] && b(wn, t);
744
- }, Hn = function(t, e, o, a) {
745
- if (D && typeof wt == "object" && typeof wt.getAttributeType == "function" && !o)
746
- switch (wt.getAttributeType(t, e)) {
747
- case "TrustedHTML":
748
- return ot(a);
749
- case "TrustedScriptURL":
750
- return dn(a);
751
- }
752
1362
  return a;
753
- }, Gn = function(t, e, o, a) {
1363
+ }, Zn = function(t, e, i, a) {
754
1364
  try {
755
- o ? t.setAttributeNS(o, e, a) : t.setAttribute(e, a), vt(t) ? $(t) : Xe(n.removed);
1365
+ i ? t.setAttributeNS(i, e, a) : t.setAttribute(e, a), kt(t) ? G(t) : en(n.removed);
756
1366
  } catch {
757
- tt(e, t);
1367
+ K(e, t);
758
1368
  }
759
- }, Ge = function(t) {
760
- U(h.beforeSanitizeAttributes, t, null);
1369
+ }, qe = function(t) {
1370
+ z(h.beforeSanitizeAttributes, t, null);
761
1371
  const e = t.attributes;
762
- if (!e || vt(t))
763
- return;
764
- const o = {
1372
+ if (!e || kt(t)) return;
1373
+ g = je(h.uponSanitizeAttribute, g, Xt, It);
1374
+ const i = {
765
1375
  attrName: "",
766
1376
  attrValue: "",
767
1377
  keepAttr: !0,
768
- allowedAttributes: T,
1378
+ allowedAttributes: g,
769
1379
  forceKeepAttr: void 0
770
1380
  };
771
1381
  let a = e.length;
772
- const c = d(t.nodeName);
1382
+ const c = T(t.nodeName);
773
1383
  for (; a--; ) {
774
- const f = e[a], y = f.name, R = f.namespaceURI, P = f.value, C = d(y), x = P;
775
- let N = y === "value" ? x : ci(x);
776
- if (o.attrName = C, o.attrValue = N, o.keepAttr = !0, o.forceKeepAttr = void 0, U(h.uponSanitizeAttribute, t, o), N = o.attrValue, Re && (C === "id" || C === "name") && qe(N, Ie) !== 0 && (tt(y, t), N = Ie + N), Y && b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, N)) {
777
- tt(y, t);
1384
+ const f = e[a], m = f.name, v = f.namespaceURI, C = f.value, R = T(m), ae = C;
1385
+ let w = m === "value" ? ae : Tr(ae);
1386
+ if (i.attrName = R, i.attrValue = w, i.keepAttr = !0, i.forceKeepAttr = void 0, z(h.uponSanitizeAttribute, t, i), w = i.attrValue, Le && (R === "id" || R === "name") && rn(w, Ie) !== 0 && (K(m, t, f), w = Ie + w), V && S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, w)) {
1387
+ K(m, t, f);
778
1388
  continue;
779
1389
  }
780
- if (C === "attributename" && Ve(N, "href")) {
781
- tt(y, t);
1390
+ if (R === "attributename" && nn(w, "href")) {
1391
+ K(m, t, f);
782
1392
  continue;
783
1393
  }
784
- if (!o.forceKeepAttr) {
785
- if (!o.keepAttr) {
786
- tt(y, t);
1394
+ if (!i.forceKeepAttr) {
1395
+ if (!i.keepAttr) {
1396
+ K(m, t, f);
787
1397
  continue;
788
1398
  }
789
- if (!Oe && b(Ni, N)) {
790
- tt(y, t);
1399
+ if (!Oe && S(Ur, w)) {
1400
+ K(m, t, f);
791
1401
  continue;
792
1402
  }
793
- if (W && (N = Mt(N)), !Ue(c, C, N)) {
794
- tt(y, t);
1403
+ if (H && (w = zt(w)), !Xe(c, R, w)) {
1404
+ K(m, t, f);
795
1405
  continue;
796
1406
  }
797
- N = Hn(c, C, R, N), N !== x && Gn(t, y, R, N);
1407
+ w = Kn(c, R, v, w), w !== ae && Zn(t, m, v, w);
798
1408
  }
799
1409
  }
800
- U(h.afterSanitizeAttributes, t, null);
801
- }, Pt = function(t) {
1410
+ z(h.afterSanitizeAttributes, t, null);
1411
+ }, Ft = function(t) {
802
1412
  let e = null;
803
- const o = ze(t);
804
- for (U(h.beforeSanitizeShadowDOM, t, null); e = o.nextNode(); )
805
- if (U(h.uponSanitizeShadowNode, e, null), Fe(e, t), Ge(e), ct(e.content) && Pt(e.content), (I ? I(e) : e.nodeType) === v.element) {
806
- const c = me(e);
807
- ct(c) && (ie(c), Pt(c));
1413
+ const i = Be(t);
1414
+ for (z(h.beforeSanitizeShadowDOM, t, null); e = i.nextNode(); )
1415
+ if (z(h.uponSanitizeShadowNode, e, null), $e(e, t), qe(e), ut(e.content) && Ft(e.content), dt(e) === D.element) {
1416
+ const a = ge(e);
1417
+ ut(a) && (oe(a), Ft(a));
808
1418
  }
809
- U(h.afterSanitizeShadowDOM, t, null);
810
- }, ie = function(t) {
1419
+ z(h.afterSanitizeShadowDOM, t, null);
1420
+ }, oe = function(t) {
811
1421
  const e = [{
812
1422
  node: t,
813
1423
  shadow: null
814
1424
  }];
815
1425
  for (; e.length > 0; ) {
816
- const o = e.pop();
817
- if (o.shadow) {
818
- Pt(o.shadow);
1426
+ const i = e.pop();
1427
+ if (i.shadow) {
1428
+ Ft(i.shadow);
819
1429
  continue;
820
1430
  }
821
- const a = o.node, f = (I ? I(a) : a.nodeType) === v.element, y = it(a);
822
- if (y)
823
- for (let R = y.length - 1; R >= 0; --R)
824
- e.push({
825
- node: y[R],
826
- shadow: null
827
- });
828
- if (f) {
829
- const R = k ? k(a) : null;
830
- if (typeof R == "string" && d(R) === "template") {
831
- const P = a.content;
832
- ct(P) && e.push({
833
- node: P,
1431
+ const a = i.node, c = dt(a) === D.element, f = et(a);
1432
+ if (f) for (let m = f.length - 1; m >= 0; --m) e.push({
1433
+ node: f[m],
1434
+ shadow: null
1435
+ });
1436
+ if (c) {
1437
+ const m = rt ? rt(a) : null;
1438
+ if (typeof m == "string" && T(m) === "template") {
1439
+ const v = a.content;
1440
+ ut(v) && e.push({
1441
+ node: v,
834
1442
  shadow: null
835
1443
  });
836
1444
  }
837
1445
  }
838
- if (f) {
839
- const R = me(a);
840
- ct(R) && e.push({
1446
+ if (c) {
1447
+ const m = ge(a);
1448
+ ut(m) && e.push({
841
1449
  node: null,
842
- shadow: R
1450
+ shadow: m
843
1451
  }, {
844
- node: R,
1452
+ node: m,
845
1453
  shadow: null
846
1454
  });
847
1455
  }
848
1456
  }
849
1457
  };
850
- return n.sanitize = function(r) {
851
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, o = null, a = null, c = null;
852
- if (Kt = !r, Kt && (r = "<!-->"), typeof r != "string" && !yt(r) && (r = di(r), typeof r != "string"))
853
- throw et("dirty is not a string, aborting");
854
- if (!n.isSupported)
855
- return r;
856
- Bt ? (_ = Wt, T = Yt) : te(t), (h.uponSanitizeElement.length > 0 || h.uponSanitizeAttribute.length > 0) && (_ = L(_)), h.uponSanitizeAttribute.length > 0 && (T = L(T)), n.removed = [];
857
- const f = Xt && typeof r != "string" && yt(r);
1458
+ return n.sanitize = function(o) {
1459
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, i = null, a = null, c = null;
1460
+ if (Qt = !o, Qt && (o = "<!-->"), typeof o != "string" && !yt(o) && (o = vr(o), typeof o != "string"))
1461
+ throw Z("dirty is not a string, aborting");
1462
+ if (!n.isSupported) return o;
1463
+ qt ? (_ = Lt, g = It) : re(t), (h.uponSanitizeElement.length > 0 || h.uponSanitizeAttribute.length > 0) && (_ = N(_)), h.uponSanitizeAttribute.length > 0 && (g = N(g)), n.removed = [];
1464
+ const f = Jt && typeof o != "string" && yt(o);
858
1465
  if (f) {
859
- kn(r);
860
- const C = k ? k(r) : r.nodeName;
1466
+ $n(o);
1467
+ const C = Bt(o);
861
1468
  if (typeof C == "string") {
862
- const x = d(C);
863
- if (!_[x] || Tt[x])
864
- throw Ct(r), et("root node is forbidden and cannot be sanitized in-place");
1469
+ const R = T(C);
1470
+ if (!_[R] || _t[R])
1471
+ throw xt(o), Z("root node is forbidden and cannot be sanitized in-place");
865
1472
  }
866
- if (vt(r))
867
- throw Ct(r), et("root node is clobbered and cannot be sanitized in-place");
1473
+ if (kt(o))
1474
+ throw xt(o), Z("root node is clobbered and cannot be sanitized in-place");
868
1475
  try {
869
- ie(r);
870
- } catch (x) {
871
- throw Ct(r), x;
1476
+ oe(o);
1477
+ } catch (R) {
1478
+ throw xt(o), R;
872
1479
  }
873
- } else if (yt(r))
874
- e = ke("<!---->"), o = e.ownerDocument.importNode(r, !0), o.nodeType === v.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? e = o : e.appendChild(o), ie(o);
1480
+ } else if (yt(o))
1481
+ e = We("<!---->"), i = e.ownerDocument.importNode(o, !0), i.nodeType === D.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? e = i : e.appendChild(i), oe(i);
875
1482
  else {
876
- if (!rt && !W && !Q && // eslint-disable-next-line unicorn/prefer-includes
877
- r.indexOf("<") === -1)
878
- return D && Nt ? ot(r) : r;
879
- if (e = ke(r), !e)
880
- return rt ? null : Nt ? J : "";
1483
+ if (!ot && !H && !q && o.indexOf("<") === -1) return O && Nt ? it(o) : o;
1484
+ if (e = We(o), !e) return ot ? null : Nt ? X : "";
881
1485
  }
882
- e && $t && $(e.firstChild);
883
- const y = f ? r : e, R = ze(y);
1486
+ e && Kt && G(e.firstChild);
1487
+ const m = f ? o : e;
884
1488
  try {
885
- for (; a = R.nextNode(); )
886
- Fe(a, y), Ge(a), ct(a.content) && Pt(a.content);
1489
+ const C = Be(m);
1490
+ for (; a = C.nextNode(); )
1491
+ $e(a, m), qe(a), ut(a.content) && Ft(a.content);
887
1492
  } catch (C) {
888
- throw f && (Ct(r), ut(n.removed, (x) => {
889
- x.element && ee(x.element);
1493
+ throw f && (xt(o), J(n.removed, (R) => {
1494
+ R.element && Pt(R.element);
890
1495
  })), C;
891
1496
  }
892
1497
  if (f)
893
- return ut(n.removed, (C) => {
894
- C.element && ee(C.element);
895
- }), W && ne(r), r;
896
- if (rt) {
897
- if (W && ne(e), It)
898
- for (c = _n.call(e.ownerDocument); e.firstChild; )
899
- c.appendChild(e.firstChild);
900
- else
901
- c = e;
902
- return (T.shadowroot || T.shadowrootmode) && (c = gn.call(l, c, !0)), c;
1498
+ return J(n.removed, (C) => {
1499
+ C.element && Pt(C.element);
1500
+ }), H && ie(o), o;
1501
+ if (ot) {
1502
+ if (H && ie(e), Dt)
1503
+ for (c = On.call(e.ownerDocument); e.firstChild; ) c.appendChild(e.firstChild);
1504
+ else c = e;
1505
+ return (g.shadowroot || g.shadowrootmode) && (c = Ln.call(l, c, !0)), c;
903
1506
  }
904
- let P = Q ? e.outerHTML : e.innerHTML;
905
- return Q && _["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && b(wi, e.ownerDocument.doctype.name) && (P = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
906
- ` + P), W && (P = Mt(P)), D && Nt ? ot(P) : P;
1507
+ let v = q ? e.outerHTML : e.innerHTML;
1508
+ return q && _["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && S(Pr, e.ownerDocument.doctype.name) && (v = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
1509
+ ` + v), H && (v = zt(v)), O && Nt ? it(v) : v;
907
1510
  }, n.setConfig = function() {
908
- let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
909
- te(r), Bt = !0, Wt = _, Yt = T;
1511
+ let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1512
+ re(o), qt = !0, Lt = _, It = g;
910
1513
  }, n.clearConfig = function() {
911
- lt = null, Bt = !1, Wt = null, Yt = null, D = Ut, J = "";
912
- }, n.isValidAttribute = function(r, t, e) {
913
- lt || te({});
914
- const o = d(r), a = d(t);
915
- return Ue(o, a, e);
916
- }, n.addHook = function(r, t) {
917
- typeof t == "function" && S(h, r) && ft(h[r], t);
918
- }, n.removeHook = function(r, t) {
919
- if (S(h, r)) {
1514
+ ct = null, qt = !1, Lt = null, It = null, O = jt, X = "";
1515
+ }, n.isValidAttribute = function(o, t, e) {
1516
+ ct || re({});
1517
+ const i = T(o), a = T(t);
1518
+ return Xe(i, a, e);
1519
+ }, n.addHook = function(o, t) {
1520
+ typeof t == "function" && L(h, o) && Tt(h[o], t);
1521
+ }, n.removeHook = function(o, t) {
1522
+ if (L(h, o)) {
920
1523
  if (t !== void 0) {
921
- const e = ai(h[r], t);
922
- return e === -1 ? void 0 : li(h[r], e, 1)[0];
1524
+ const e = gr(h[o], t);
1525
+ return e === -1 ? void 0 : yr(h[o], e, 1)[0];
923
1526
  }
924
- return Xe(h[r]);
1527
+ return en(h[o]);
925
1528
  }
926
- }, n.removeHooks = function(r) {
927
- S(h, r) && (h[r] = []);
1529
+ }, n.removeHooks = function(o) {
1530
+ L(h, o) && (h[o] = []);
928
1531
  }, n.removeAllHooks = function() {
929
- h = sn();
1532
+ h = dn();
930
1533
  }, n;
931
1534
  }
932
- var Ci = un();
933
- const St = /* @__PURE__ */ new Map(), pe = /* @__PURE__ */ new Map();
934
- function fn(i, n) {
935
- const s = Ci.sanitize(i, {
936
- USE_PROFILES: { svg: !0, svgFilters: !0 },
1535
+ var Br = Tn(), St = /* @__PURE__ */ new Map(), _e = /* @__PURE__ */ new Map();
1536
+ function bn(r, n) {
1537
+ const s = Br.sanitize(r, {
1538
+ USE_PROFILES: {
1539
+ svg: !0,
1540
+ svgFilters: !0
1541
+ },
937
1542
  FORBID_TAGS: ["script", "use"],
938
- // <use> can SSRF to external hrefs
939
- FORBID_ATTR: ["onload", "onerror", "onbegin", "href", "xlink:href"]
940
- }), m = new DOMParser().parseFromString(s, "image/svg+xml").documentElement;
941
- if (!(m instanceof SVGElement))
942
- throw new Error(`Invalid SVG from ${n}`);
943
- return m;
1543
+ FORBID_ATTR: [
1544
+ "onload",
1545
+ "onerror",
1546
+ "onbegin",
1547
+ "href",
1548
+ "xlink:href"
1549
+ ]
1550
+ }), l = new DOMParser().parseFromString(s, "image/svg+xml").documentElement;
1551
+ if (!(l instanceof SVGElement)) throw new Error(`Invalid SVG from ${n}`);
1552
+ return l;
1553
+ }
1554
+ async function jr(r) {
1555
+ const n = await fetch(r);
1556
+ if (!n.ok) throw new Error(`Failed to load icon: ${n.status}`);
1557
+ return bn(await n.text(), r);
944
1558
  }
945
- async function Mi(i) {
946
- const n = await fetch(i);
947
- if (!n.ok)
948
- throw new Error(`Failed to load icon: ${n.status}`);
949
- return fn(await n.text(), i);
1559
+ async function hn(r) {
1560
+ return St.has(r) || St.set(r, jr(r)), (await St.get(r)).cloneNode(!0);
950
1561
  }
951
- async function an(i) {
952
- return St.has(i) || St.set(i, Mi(i)), (await St.get(i)).cloneNode(!0);
1562
+ function Yr(r) {
1563
+ let n = _e.get(r);
1564
+ return n || (n = bn(r, "inline SVG source"), _e.set(r, n)), n.cloneNode(!0);
953
1565
  }
954
- function vi(i) {
955
- let n = pe.get(i);
956
- return n || (n = fn(i, "inline SVG source"), pe.set(i, n)), n.cloneNode(!0);
1566
+ function Zr(r) {
1567
+ r ? St.delete(r) : (St.clear(), _e.clear());
957
1568
  }
958
- function Gi(i) {
959
- i ? St.delete(i) : (St.clear(), pe.clear());
1569
+ var $r = ":host{--_nys-icon-size:var(--nys-icon-size,.7em);vertical-align:middle;width:fit-content;height:fit-content;display:inline-block;box-sizing:content-box!important}@supports (font-size:1cap){:host{--_nys-icon-size:var(--nys-icon-size,1cap)}}.nys-icon--svg{width:var(--_nys-icon-size,1em);height:var(--_nys-icon-size,1em);white-space:nowrap;display:block}.nys-icon--xs{width:calc(var(--_nys-icon-size) * .75);height:calc(var(--_nys-icon-size) * .75)}.nys-icon--sm{width:calc(var(--_nys-icon-size) * .875);height:calc(var(--_nys-icon-size) * .875)}.nys-icon--md{width:var(--_nys-icon-size);height:var(--_nys-icon-size)}.nys-icon--lg{width:calc(var(--_nys-icon-size) * 1.125);height:calc(var(--_nys-icon-size) * 1.125)}.nys-icon--xl{width:calc(var(--_nys-icon-size) * 1.25);height:calc(var(--_nys-icon-size) * 1.25)}.nys-icon--2xl{width:calc(var(--_nys-icon-size) * 1.5);height:calc(var(--_nys-icon-size) * 1.5)}.nys-icon--3xl{width:calc(var(--_nys-icon-size) * 1.875);height:calc(var(--_nys-icon-size) * 1.875)}.nys-icon--4xl{width:calc(var(--_nys-icon-size) * 2.25);height:calc(var(--_nys-icon-size) * 2.25)}.nys-icon--5xl{width:calc(var(--_nys-icon-size) * 3);height:calc(var(--_nys-icon-size) * 3)}.nys-icon--12{width:.75rem;height:.75rem}.nys-icon--14{width:.875rem;height:.875rem}.nys-icon--16{width:1rem;height:1rem}.nys-icon--18{width:1.125rem;height:1.125rem}.nys-icon--20{width:1.25rem;height:1.25rem}.nys-icon--24{width:1.5rem;height:1.5rem}.nys-icon--32{width:2rem;height:2rem}.nys-icon--40{width:2.5rem;height:2.5rem}.nys-icon--50{width:3.125rem;height:3.125rem}.nys-icon--flip-horizontal{transform:scaleX(-1)}.nys-icon--flip-vertical{transform:scaleY(-1)}.nys-icon--flip-both{transform:scale(-1)}";
1570
+ function B(r, n) {
1571
+ if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(r, n);
960
1572
  }
961
- const Pi = ":host{display:inline-block;width:fit-content;height:fit-content;--_nys-icon-size: var( --nys-icon-size, .7em );box-sizing:content-box!important;vertical-align:middle}@supports (font-size: 1cap){:host{--_nys-icon-size: var(--nys-icon-size, 1cap)}}.nys-icon--svg{width:var(--_nys-icon-size, 1em);height:var(--_nys-icon-size, 1em);display:block;white-space:nowrap}.nys-icon--xs{width:calc(var(--_nys-icon-size) * .75);height:calc(var(--_nys-icon-size) * .75)}.nys-icon--sm{width:calc(var(--_nys-icon-size) * .875);height:calc(var(--_nys-icon-size) * .875)}.nys-icon--md{width:var(--_nys-icon-size);height:var(--_nys-icon-size)}.nys-icon--lg{width:calc(var(--_nys-icon-size) * 1.125);height:calc(var(--_nys-icon-size) * 1.125)}.nys-icon--xl{width:calc(var(--_nys-icon-size) * 1.25);height:calc(var(--_nys-icon-size) * 1.25)}.nys-icon--2xl{width:calc(var(--_nys-icon-size) * 1.5);height:calc(var(--_nys-icon-size) * 1.5)}.nys-icon--3xl{width:calc(var(--_nys-icon-size) * 1.875);height:calc(var(--_nys-icon-size) * 1.875)}.nys-icon--4xl{width:calc(var(--_nys-icon-size) * 2.25);height:calc(var(--_nys-icon-size) * 2.25)}.nys-icon--5xl{width:calc(var(--_nys-icon-size) * 3);height:calc(var(--_nys-icon-size) * 3)}.nys-icon--12{width:.75rem;height:.75rem}.nys-icon--14{width:.875rem;height:.875rem}.nys-icon--16{width:1rem;height:1rem}.nys-icon--18{width:1.125rem;height:1.125rem}.nys-icon--20{width:1.25rem;height:1.25rem}.nys-icon--24{width:1.5rem;height:1.5rem}.nys-icon--32{width:2rem;height:2rem}.nys-icon--40{width:2.5rem;height:2.5rem}.nys-icon--50{width:3.125rem;height:3.125rem}.nys-icon--flip-horizontal{transform:scaleX(-1)}.nys-icon--flip-vertical{transform:scaleY(-1)}.nys-icon--flip-both{transform:scale(-1)}";
962
- var xi = Object.defineProperty, q = (i, n, s, l) => {
963
- for (var u = void 0, m = i.length - 1, A; m >= 0; m--)
964
- (A = i[m]) && (u = A(n, s, u) || u);
965
- return u && xi(n, s, u), u;
966
- }, V;
967
- const G = (V = class extends qn {
968
- constructor() {
969
- super(...arguments), this.name = "", this.library = "default", this.ariaLabel = "", this.rotate = "0", this.flip = "", this.color = "", this.size = "md", this._svg = null, this._loadSeq = 0, this._loadPromise = null;
1573
+ function j(r, n, s, l) {
1574
+ var u = arguments.length, p = u < 3 ? n : l === null ? l = Object.getOwnPropertyDescriptor(n, s) : l, y;
1575
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") p = Reflect.decorate(r, n, s, l);
1576
+ else for (var k = r.length - 1; k >= 0; k--) (y = r[k]) && (p = (u < 3 ? y(p) : u > 3 ? y(n, s, p) : y(n, s)) || p);
1577
+ return u > 3 && p && Object.defineProperty(n, s, p), p;
1578
+ }
1579
+ var U = class An extends or {
1580
+ constructor(...n) {
1581
+ super(...n), this.name = "", this.library = "default", this.ariaLabel = "", this.rotate = "0", this.flip = "", this.color = "", this.size = "md", this._svg = null, this._loadSeq = 0, this._loadPromise = null;
1582
+ }
1583
+ static {
1584
+ this.styles = tr($r);
970
1585
  }
971
- /** Resolves when the current icon load (if any) is complete. */
972
1586
  get updateComplete() {
973
1587
  return (async () => {
974
1588
  const n = await super.updateComplete;
@@ -976,34 +1590,29 @@ const G = (V = class extends qn {
976
1590
  })();
977
1591
  }
978
1592
  connectedCallback() {
979
- super.connectedCallback(), this._reflectHostSemantics(), We(this.library, this);
1593
+ super.connectedCallback(), this._reflectHostSemantics(), Ze(this.library, this);
980
1594
  }
981
1595
  disconnectedCallback() {
982
- super.disconnectedCallback(), Ye(this.library, this);
1596
+ super.disconnectedCallback(), Je(this.library, this);
983
1597
  }
984
- /** Called by the icon library registry when the current library changes. */
985
1598
  redraw() {
986
1599
  this._loadIcon();
987
1600
  }
988
- /**
989
- * Lit calls firstUpdated after the first render, once all reactive
990
- * properties (including those set from the template) are resolved.
991
- * This guarantees the initial _loadIcon runs with the correct name
992
- * and library values, avoiding the race where updated() might not
993
- * fire for properties that equal their defaults.
994
- */
995
1601
  firstUpdated() {
996
1602
  this._loadIcon();
997
1603
  }
1604
+ static {
1605
+ this._validName = /^[a-zA-Z0-9_-]+$/;
1606
+ }
998
1607
  updated(n) {
999
- if (n.has("name") && !V._validName.test(this.name)) {
1608
+ if (n.has("name") && !An._validName.test(this.name)) {
1000
1609
  console.warn(`nys-icon: invalid name "${this.name}" — ignored`), this._svg = null;
1001
1610
  return;
1002
1611
  }
1003
1612
  if (n.has("name") || n.has("library")) {
1004
1613
  if (n.has("library")) {
1005
1614
  const s = n.get("library");
1006
- s && Ye(s, this), We(this.library, this);
1615
+ s && Je(s, this), Ze(this.library, this);
1007
1616
  }
1008
1617
  this._loadIcon();
1009
1618
  }
@@ -1012,7 +1621,7 @@ const G = (V = class extends qn {
1012
1621
  _loadIcon() {
1013
1622
  const n = ++this._loadSeq;
1014
1623
  this._loadPromise = (async () => {
1015
- const s = Jn(this.library);
1624
+ const s = lr(this.library);
1016
1625
  if (!s || !this.name) {
1017
1626
  this._svg = null;
1018
1627
  return;
@@ -1024,7 +1633,7 @@ const G = (V = class extends qn {
1024
1633
  this._svg = null;
1025
1634
  return;
1026
1635
  }
1027
- const u = typeof l == "string" ? await an(l) : l.type === "url" ? await an(l.href) : vi(l.content);
1636
+ const u = typeof l == "string" ? await hn(l) : l.type === "url" ? await hn(l.href) : Yr(l.content);
1028
1637
  if (n !== this._loadSeq) return;
1029
1638
  s.mutator?.(u), this._applyAttributes(u), this._svg = u;
1030
1639
  } catch {
@@ -1035,56 +1644,34 @@ const G = (V = class extends qn {
1035
1644
  _applyAttributes(n) {
1036
1645
  n.setAttribute("role", "img"), this.ariaLabel ? (n.setAttribute("aria-label", this.ariaLabel), n.removeAttribute("aria-hidden")) : (n.setAttribute("aria-hidden", "true"), n.removeAttribute("aria-label")), this.rotate && this.rotate !== "0" ? n.style.rotate = `${this.rotate}deg` : n.style.removeProperty("rotate"), n.style.color = this.color || "currentcolor", n.classList.add(`nys-icon--${this.size}`), n.classList.add("nys-icon--svg"), this.flip && n.classList.add(`nys-icon--flip-${this.flip}`), this._reflectHostSemantics();
1037
1646
  }
1038
- /**
1039
- * Reflects the icon's accessible state onto the host:
1040
- * - Labeled icon -> role="img" + aria-label, no aria-hidden.
1041
- * - Decorative -> aria-hidden="true", no role/label.
1042
- *
1043
- * These are reflected as host *attributes* (rather than via
1044
- * ElementInternals) on purpose: aria-hidden / role / aria-label in
1045
- * attribute form have universal, consistent assistive-technology support,
1046
- * whereas AT support for these states set through ElementInternals is still
1047
- * uneven across browser/screen-reader combinations. The host role/label
1048
- * therefore depend on runtime state (ariaLabel), so defaultRole stays null.
1049
- */
1050
1647
  _reflectHostSemantics() {
1051
1648
  this.ariaLabel ? (this.setAttribute("role", "img"), this.setAttribute("aria-label", this.ariaLabel), this.removeAttribute("aria-hidden")) : (this.removeAttribute("role"), this.removeAttribute("aria-label"), this.setAttribute("aria-hidden", "true"));
1052
1649
  }
1053
1650
  render() {
1054
- return this._svg ? Yn`${this._svg}` : null;
1651
+ return this._svg ? Qn`${this._svg}` : null;
1055
1652
  }
1056
- }, V.styles = Wn(Pi), V._validName = /^[a-zA-Z0-9_-]+$/, V);
1057
- q([
1058
- nt({ type: String, reflect: !0 })
1059
- ], G.prototype, "name");
1060
- q([
1061
- nt({ type: String, reflect: !0 })
1062
- ], G.prototype, "library");
1063
- q([
1064
- nt({ type: String })
1065
- ], G.prototype, "ariaLabel");
1066
- q([
1067
- nt({ type: String })
1068
- ], G.prototype, "rotate");
1069
- q([
1070
- nt({ type: String })
1071
- ], G.prototype, "flip");
1072
- q([
1073
- nt({ type: String })
1074
- ], G.prototype, "color");
1075
- q([
1076
- nt({ type: String })
1077
- ], G.prototype, "size");
1078
- q([
1079
- $n()
1080
- ], G.prototype, "_svg");
1081
- let ki = G;
1082
- customElements.get("nys-icon") || customElements.define("nys-icon", ki);
1653
+ };
1654
+ j([Q({
1655
+ type: String,
1656
+ reflect: !0
1657
+ }), B("design:type", Object)], U.prototype, "name", void 0);
1658
+ j([Q({
1659
+ type: String,
1660
+ reflect: !0
1661
+ }), B("design:type", Object)], U.prototype, "library", void 0);
1662
+ j([Q({ type: String }), B("design:type", Object)], U.prototype, "ariaLabel", void 0);
1663
+ j([Q({ type: String }), B("design:type", Object)], U.prototype, "rotate", void 0);
1664
+ j([Q({ type: String }), B("design:type", Object)], U.prototype, "flip", void 0);
1665
+ j([Q({ type: String }), B("design:type", Object)], U.prototype, "color", void 0);
1666
+ j([Q({ type: String }), B("design:type", String)], U.prototype, "size", void 0);
1667
+ j([er(), B("design:type", Object)], U.prototype, "_svg", void 0);
1668
+ customElements.get("nys-icon") || customElements.define("nys-icon", U);
1083
1669
  export {
1084
- ki as NysIcon,
1085
- Gi as clearIconCache,
1086
- Jn as getIconLibrary,
1087
- Ui as registerIconLibrary,
1088
- Hi as unregisterIconLibrary
1670
+ U as NysIcon,
1671
+ Zr as clearIconCache,
1672
+ lr as getIconLibrary,
1673
+ qr as registerIconLibrary,
1674
+ Kr as unregisterIconLibrary
1089
1675
  };
1090
- //# sourceMappingURL=nys-icon.js.map
1676
+
1677
+ //# sourceMappingURL=nys-icon.js.map