@nysds/nys-icon 1.19.0 → 1.19.2

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,206 +1,215 @@
1
- import { LitElement as mn, unsafeCSS as pn, html as dn } from "lit";
2
- import { property as V, state as hn } from "lit/decorators.js";
1
+ import { LitElement as Pn, unsafeCSS as kn, html as zn } from "lit";
2
+ import { property as Q, state as Un } from "lit/decorators.js";
3
3
  /*!
4
4
  * █▄ █ █ █ █▀▀▀█ █▀▀▄ █▀▀▀█
5
5
  * █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
6
6
  * █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
7
7
  *
8
- * Icon Component v1.19.0
8
+ * Icon Component v1.19.2
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
13
  window.__nysIconRegistry || (window.__nysIconRegistry = /* @__PURE__ */ new Map());
14
14
  window.__nysIconWatchers || (window.__nysIconWatchers = /* @__PURE__ */ new Map());
15
- const Tt = window.__nysIconRegistry, rt = window.__nysIconWatchers;
16
- if (!Tt.has("default")) {
17
- const i = new URL(
18
- /* @vite-ignore */
19
- "./icons/",
20
- import.meta.url
21
- ).href;
22
- Tt.set("default", {
23
- resolver: (e) => e ? `${i}${e}.svg` : void 0
15
+ const bt = window.__nysIconRegistry, ct = window.__nysIconWatchers;
16
+ function Fn() {
17
+ const o = /(?:^|\/)(?:nysds(?:\.es|\.min)?|nys-icon)\.js(?:[?#]|$)/;
18
+ if (typeof document < "u") {
19
+ const s = document.currentScript;
20
+ if (s?.src) return new URL("./icons/", s.src).href;
21
+ const l = Array.from(
22
+ document.querySelectorAll("script[src]")
23
+ ).find((m) => o.test(m.src));
24
+ if (l?.src) return new URL("./icons/", l.src).href;
25
+ }
26
+ const n = import.meta.url;
27
+ return n ? new URL("./icons/", n).href : new URL("./icons/", document.baseURI).href;
28
+ }
29
+ if (!bt.has("default")) {
30
+ const o = Fn();
31
+ bt.set("default", {
32
+ resolver: (n) => n ? `${o}${n}.svg` : void 0
24
33
  });
25
34
  }
26
- function ei(i, e) {
27
- Tt.set(i, e), rt.get(i)?.forEach((r) => r.redraw());
35
+ function Lo(o, n) {
36
+ bt.set(o, n), ct.get(o)?.forEach((s) => s.redraw());
28
37
  }
29
- function ni(i) {
30
- Tt.delete(i), rt.get(i)?.forEach((e) => e.redraw());
38
+ function Do(o) {
39
+ bt.delete(o), ct.get(o)?.forEach((n) => n.redraw());
31
40
  }
32
- function _n(i) {
33
- return Tt.get(i);
41
+ function Hn(o) {
42
+ return bt.get(o);
34
43
  }
35
- function De(i, e) {
36
- rt.has(i) || rt.set(i, /* @__PURE__ */ new Set()), rt.get(i).add(e);
44
+ function Fe(o, n) {
45
+ ct.has(o) || ct.set(o, /* @__PURE__ */ new Set()), ct.get(o).add(n);
37
46
  }
38
- function Le(i, e) {
39
- rt.get(i)?.delete(e);
47
+ function He(o, n) {
48
+ ct.get(o)?.delete(n);
40
49
  }
41
- /*! @license DOMPurify 3.4.7 | (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.7/LICENSE */
42
- function Ce(i, e) {
43
- (e == null || e > i.length) && (e = i.length);
44
- for (var r = 0, s = Array(e); r < e; r++) s[r] = i[r];
45
- return s;
50
+ /*! @license DOMPurify 3.4.11 | (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.11/LICENSE */
51
+ function Ge(o, n) {
52
+ (n == null || n > o.length) && (n = o.length);
53
+ for (var s = 0, c = Array(n); s < n; s++) c[s] = o[s];
54
+ return c;
46
55
  }
47
- function gn(i) {
48
- if (Array.isArray(i)) return i;
56
+ function Gn(o) {
57
+ if (Array.isArray(o)) return o;
49
58
  }
50
- function Tn(i, e) {
51
- var r = i == null ? null : typeof Symbol < "u" && i[Symbol.iterator] || i["@@iterator"];
52
- if (r != null) {
53
- var s, l, m, d, at = [], N = !0, st = !1;
59
+ function Bn(o, n) {
60
+ var s = o == null ? null : typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"];
61
+ if (s != null) {
62
+ var c, l, m, d, lt = [], D = !0, ut = !1;
54
63
  try {
55
- if (m = (r = r.call(i)).next, e !== 0) for (; !(N = (s = m.call(r)).done) && (at.push(s.value), at.length !== e); N = !0) ;
56
- } catch (kt) {
57
- st = !0, l = kt;
64
+ if (m = (s = s.call(o)).next, n !== 0) for (; !(D = (c = m.call(s)).done) && (lt.push(c.value), lt.length !== n); D = !0) ;
65
+ } catch (xt) {
66
+ ut = !0, l = xt;
58
67
  } finally {
59
68
  try {
60
- if (!N && r.return != null && (d = r.return(), Object(d) !== d)) return;
69
+ if (!D && s.return != null && (d = s.return(), Object(d) !== d)) return;
61
70
  } finally {
62
- if (st) throw l;
71
+ if (ut) throw l;
63
72
  }
64
73
  }
65
- return at;
74
+ return lt;
66
75
  }
67
76
  }
68
- function yn() {
77
+ function Wn() {
69
78
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
70
79
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
71
80
  }
72
- function An(i, e) {
73
- return gn(i) || Tn(i, e) || En(i, e) || yn();
81
+ function Yn(o, n) {
82
+ return Gn(o) || Bn(o, n) || jn(o, n) || Wn();
74
83
  }
75
- function En(i, e) {
76
- if (i) {
77
- if (typeof i == "string") return Ce(i, e);
78
- var r = {}.toString.call(i).slice(8, -1);
79
- return r === "Object" && i.constructor && (r = i.constructor.name), r === "Map" || r === "Set" ? Array.from(i) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ce(i, e) : void 0;
84
+ function jn(o, n) {
85
+ if (o) {
86
+ if (typeof o == "string") return Ge(o, n);
87
+ var s = {}.toString.call(o).slice(8, -1);
88
+ return s === "Object" && o.constructor && (s = o.constructor.name), s === "Map" || s === "Set" ? Array.from(o) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? Ge(o, n) : void 0;
80
89
  }
81
90
  }
82
- const je = Object.entries, Me = Object.setPrototypeOf, Sn = Object.isFrozen, bn = Object.getPrototypeOf, Rn = Object.getOwnPropertyDescriptor;
83
- let I = Object.freeze, L = Object.seal, ot = Object.create, $e = typeof Reflect < "u" && Reflect, ie = $e.apply, oe = $e.construct;
84
- I || (I = function(e) {
85
- return e;
91
+ const en = Object.entries, Be = Object.setPrototypeOf, $n = Object.isFrozen, Xn = Object.getPrototypeOf, Vn = Object.getOwnPropertyDescriptor;
92
+ let O = Object.freeze, R = Object.seal, at = Object.create, nn = typeof Reflect < "u" && Reflect, se = nn.apply, ae = nn.construct;
93
+ O || (O = function(n) {
94
+ return n;
86
95
  });
87
- L || (L = function(e) {
88
- return e;
96
+ R || (R = function(n) {
97
+ return n;
89
98
  });
90
- ie || (ie = function(e, r) {
91
- for (var s = arguments.length, l = new Array(s > 2 ? s - 2 : 0), m = 2; m < s; m++)
99
+ se || (se = function(n, s) {
100
+ for (var c = arguments.length, l = new Array(c > 2 ? c - 2 : 0), m = 2; m < c; m++)
92
101
  l[m - 2] = arguments[m];
93
- return e.apply(r, l);
102
+ return n.apply(s, l);
94
103
  });
95
- oe || (oe = function(e) {
96
- for (var r = arguments.length, s = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++)
97
- s[l - 1] = arguments[l];
98
- return new e(...s);
104
+ ae || (ae = function(n) {
105
+ for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), l = 1; l < s; l++)
106
+ c[l - 1] = arguments[l];
107
+ return new n(...c);
99
108
  });
100
- const et = A(Array.prototype.forEach), On = A(Array.prototype.lastIndexOf), ve = A(Array.prototype.pop), nt = A(Array.prototype.push), wn = A(Array.prototype.splice), w = Array.isArray, _t = A(String.prototype.toLowerCase), Jt = A(String.prototype.toString), xe = A(String.prototype.match), it = A(String.prototype.replace), Pe = A(String.prototype.indexOf), In = A(String.prototype.trim), Nn = A(Number.prototype.toString), Dn = A(Boolean.prototype.toString), ke = typeof BigInt > "u" ? null : A(BigInt.prototype.toString), Fe = typeof Symbol > "u" ? null : A(Symbol.prototype.toString), h = A(Object.prototype.hasOwnProperty), dt = A(Object.prototype.toString), b = A(RegExp.prototype.test), ht = Ln(TypeError);
101
- function A(i) {
102
- return function(e) {
103
- e instanceof RegExp && (e.lastIndex = 0);
104
- for (var r = arguments.length, s = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++)
105
- s[l - 1] = arguments[l];
106
- return ie(i, e, s);
109
+ const yt = A(Array.prototype.forEach), qn = A(Array.prototype.lastIndexOf), We = A(Array.prototype.pop), st = A(Array.prototype.push), Kn = A(Array.prototype.splice), j = Array.isArray, At = A(String.prototype.toLowerCase), ee = A(String.prototype.toString), Ye = A(String.prototype.match), gt = A(String.prototype.replace), je = A(String.prototype.indexOf), Zn = A(String.prototype.trim), Jn = A(Number.prototype.toString), Qn = A(Boolean.prototype.toString), $e = typeof BigInt > "u" ? null : A(BigInt.prototype.toString), Xe = typeof Symbol > "u" ? null : A(Symbol.prototype.toString), b = A(Object.prototype.hasOwnProperty), Et = A(Object.prototype.toString), w = A(RegExp.prototype.test), J = to(TypeError);
110
+ function A(o) {
111
+ return function(n) {
112
+ n instanceof RegExp && (n.lastIndex = 0);
113
+ for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), l = 1; l < s; l++)
114
+ c[l - 1] = arguments[l];
115
+ return se(o, n, c);
107
116
  };
108
117
  }
109
- function Ln(i) {
118
+ function to(o) {
110
119
  return function() {
111
- for (var e = arguments.length, r = new Array(e), s = 0; s < e; s++)
112
- r[s] = arguments[s];
113
- return oe(i, r);
120
+ for (var n = arguments.length, s = new Array(n), c = 0; c < n; c++)
121
+ s[c] = arguments[c];
122
+ return ae(o, s);
114
123
  };
115
124
  }
116
- function c(i, e) {
117
- let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _t;
118
- if (Me && Me(i, null), !w(e))
119
- return i;
120
- let s = e.length;
121
- for (; s--; ) {
122
- let l = e[s];
125
+ function f(o, n) {
126
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : At;
127
+ if (Be && Be(o, null), !j(n))
128
+ return o;
129
+ let c = n.length;
130
+ for (; c--; ) {
131
+ let l = n[c];
123
132
  if (typeof l == "string") {
124
- const m = r(l);
125
- m !== l && (Sn(e) || (e[s] = m), l = m);
133
+ const m = s(l);
134
+ m !== l && ($n(n) || (n[c] = m), l = m);
126
135
  }
127
- i[l] = !0;
136
+ o[l] = !0;
128
137
  }
129
- return i;
138
+ return o;
130
139
  }
131
- function Cn(i) {
132
- for (let e = 0; e < i.length; e++)
133
- h(i, e) || (i[e] = null);
134
- return i;
140
+ function eo(o) {
141
+ for (let n = 0; n < o.length; n++)
142
+ b(o, n) || (o[n] = null);
143
+ return o;
135
144
  }
136
- function R(i) {
137
- const e = ot(null);
138
- for (const s of je(i)) {
139
- var r = An(s, 2);
140
- const l = r[0], m = r[1];
141
- h(i, l) && (w(m) ? e[l] = Cn(m) : m && typeof m == "object" && m.constructor === Object ? e[l] = R(m) : e[l] = m);
145
+ function N(o) {
146
+ const n = at(null);
147
+ for (const c of en(o)) {
148
+ var s = Yn(c, 2);
149
+ const l = s[0], m = s[1];
150
+ b(o, l) && (j(m) ? n[l] = eo(m) : m && typeof m == "object" && m.constructor === Object ? n[l] = N(m) : n[l] = m);
142
151
  }
143
- return e;
152
+ return n;
144
153
  }
145
- function Mn(i) {
146
- switch (typeof i) {
154
+ function no(o) {
155
+ switch (typeof o) {
147
156
  case "string":
148
- return i;
157
+ return o;
149
158
  case "number":
150
- return Nn(i);
159
+ return Jn(o);
151
160
  case "boolean":
152
- return Dn(i);
161
+ return Qn(o);
153
162
  case "bigint":
154
- return ke ? ke(i) : "0";
163
+ return $e ? $e(o) : "0";
155
164
  case "symbol":
156
- return Fe ? Fe(i) : "Symbol()";
165
+ return Xe ? Xe(o) : "Symbol()";
157
166
  case "undefined":
158
- return dt(i);
167
+ return Et(o);
159
168
  case "function":
160
169
  case "object": {
161
- if (i === null)
162
- return dt(i);
163
- const e = i, r = z(e, "toString");
164
- if (typeof r == "function") {
165
- const s = r(e);
166
- return typeof s == "string" ? s : dt(s);
170
+ if (o === null)
171
+ return Et(o);
172
+ const n = o, s = z(n, "toString");
173
+ if (typeof s == "function") {
174
+ const c = s(n);
175
+ return typeof c == "string" ? c : Et(c);
167
176
  }
168
- return dt(i);
177
+ return Et(o);
169
178
  }
170
179
  default:
171
- return dt(i);
180
+ return Et(o);
172
181
  }
173
182
  }
174
- function z(i, e) {
175
- for (; i !== null; ) {
176
- const s = Rn(i, e);
177
- if (s) {
178
- if (s.get)
179
- return A(s.get);
180
- if (typeof s.value == "function")
181
- return A(s.value);
183
+ function z(o, n) {
184
+ for (; o !== null; ) {
185
+ const c = Vn(o, n);
186
+ if (c) {
187
+ if (c.get)
188
+ return A(c.get);
189
+ if (typeof c.value == "function")
190
+ return A(c.value);
182
191
  }
183
- i = bn(i);
192
+ o = Xn(o);
184
193
  }
185
- function r() {
194
+ function s() {
186
195
  return null;
187
196
  }
188
- return r;
197
+ return s;
189
198
  }
190
- function vn(i) {
199
+ function oo(o) {
191
200
  try {
192
- return b(i, ""), !0;
201
+ return w(o, ""), !0;
193
202
  } catch {
194
203
  return !1;
195
204
  }
196
205
  }
197
- const ze = I(["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"]), Qt = I(["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"]), te = I(["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"]), xn = I(["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"]), ee = I(["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"]), Pn = I(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Ue = I(["#text"]), He = I(["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"]), ne = I(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Ge = I(["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"]), Pt = I(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), kn = L(/{{[\w\W]*|^[\w\W]*}}/g), Fn = L(/<%[\w\W]*|^[\w\W]*%>/g), zn = L(/\${[\w\W]*/g), Un = L(/^data-[\-\w.\u00B7-\uFFFF]+$/), Hn = L(/^aria-[\-\w]+$/), We = L(
206
+ const Ve = 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"]), ne = 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"]), oe = 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"]), io = 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"]), ie = 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"]), ro = O(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), qe = O(["#text"]), Ke = 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"]), re = 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", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Ze = 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"]), vt = O(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), so = R(/{{[\w\W]*|^[\w\W]*}}/g), ao = R(/<%[\w\W]*|^[\w\W]*%>/g), co = R(/\${[\w\W]*/g), lo = R(/^data-[\-\w.\u00B7-\uFFFF]+$/), uo = R(/^aria-[\-\w]+$/), Je = R(
198
207
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
199
208
  // eslint-disable-line no-useless-escape
200
- ), Gn = L(/^(?:\w+script|data):/i), Wn = L(
209
+ ), fo = R(/^(?:\w+script|data):/i), po = R(
201
210
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
202
211
  // eslint-disable-line no-control-regex
203
- ), Bn = L(/^html$/i), jn = L(/^[a-z][.\w]*(-[.\w]+)+$/i), F = {
212
+ ), mo = R(/^html$/i), ho = R(/^[a-z][.\w]*(-[.\w]+)+$/i), Qe = R(/<[/\w!]/g), _o = R(/<[/\w]/g), To = R(/<\/no(script|embed|frames)/i), yo = R(/\/>/i), k = {
204
213
  element: 1,
205
214
  attribute: 2,
206
215
  text: 3,
@@ -209,24 +218,24 @@ const ze = I(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
209
218
  // Deprecated
210
219
  entityNode: 6,
211
220
  // Deprecated
212
- progressingInstruction: 7,
221
+ processingInstruction: 7,
213
222
  comment: 8,
214
223
  document: 9,
215
224
  documentType: 10,
216
225
  documentFragment: 11,
217
226
  notation: 12
218
227
  // Deprecated
219
- }, $n = function() {
228
+ }, go = function() {
220
229
  return typeof window > "u" ? null : window;
221
- }, Yn = function(e, r) {
222
- if (typeof e != "object" || typeof e.createPolicy != "function")
230
+ }, Eo = function(n, s) {
231
+ if (typeof n != "object" || typeof n.createPolicy != "function")
223
232
  return null;
224
- let s = null;
233
+ let c = null;
225
234
  const l = "data-tt-policy-suffix";
226
- r && r.hasAttribute(l) && (s = r.getAttribute(l));
227
- const m = "dompurify" + (s ? "#" + s : "");
235
+ s && s.hasAttribute(l) && (c = s.getAttribute(l));
236
+ const m = "dompurify" + (c ? "#" + c : "");
228
237
  try {
229
- return e.createPolicy(m, {
238
+ return n.createPolicy(m, {
230
239
  createHTML(d) {
231
240
  return d;
232
241
  },
@@ -237,7 +246,7 @@ const ze = I(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
237
246
  } catch {
238
247
  return console.warn("TrustedTypes policy " + m + " could not be created."), null;
239
248
  }
240
- }, Be = function() {
249
+ }, tn = function() {
241
250
  return {
242
251
  afterSanitizeAttributes: [],
243
252
  afterSanitizeElements: [],
@@ -249,32 +258,53 @@ const ze = I(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
249
258
  uponSanitizeElement: [],
250
259
  uponSanitizeShadowNode: []
251
260
  };
261
+ }, Y = function(n, s, c, l) {
262
+ return b(n, s) && j(n[s]) ? f(l.base ? N(l.base) : {}, n[s], l.transform) : c;
252
263
  };
253
- function Ye() {
254
- let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : $n();
255
- const e = (a) => Ye(a);
256
- if (e.version = "3.4.7", e.removed = [], !i || !i.document || i.document.nodeType !== F.document || !i.Element)
257
- return e.isSupported = !1, e;
258
- let r = i.document;
259
- const s = r, l = s.currentScript;
260
- i.DocumentFragment;
261
- const m = i.HTMLTemplateElement, d = i.Node, at = i.Element, N = i.NodeFilter, st = i.NamedNodeMap;
262
- st === void 0 && (i.NamedNodeMap || i.MozNamedAttrMap), i.HTMLFormElement;
263
- const kt = i.DOMParser, yt = i.trustedTypes, $ = at.prototype, Xe = z($, "cloneNode"), Ve = z($, "remove"), qe = z($, "nextSibling"), At = z($, "childNodes"), Et = z($, "parentNode"), St = z($, "shadowRoot"), Ke = z($, "attributes"), C = d && d.prototype ? z(d.prototype, "nodeType") : null, q = d && d.prototype ? z(d.prototype, "nodeName") : null;
264
+ function on() {
265
+ let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : go();
266
+ const n = (r) => on(r);
267
+ if (n.version = "3.4.11", n.removed = [], !o || !o.document || o.document.nodeType !== k.document || !o.Element)
268
+ return n.isSupported = !1, n;
269
+ let s = o.document;
270
+ const c = s, l = c.currentScript;
271
+ o.DocumentFragment;
272
+ const m = o.HTMLTemplateElement, d = o.Node, lt = o.Element, D = o.NodeFilter, ut = o.NamedNodeMap;
273
+ ut === void 0 && (o.NamedNodeMap || o.MozNamedAttrMap), o.HTMLFormElement;
274
+ const xt = o.DOMParser, wt = o.trustedTypes, V = lt.prototype, rn = z(V, "cloneNode"), ce = z(V, "remove"), sn = z(V, "nextSibling"), ft = z(V, "childNodes"), pt = z(V, "parentNode"), le = z(V, "shadowRoot"), Pt = z(V, "attributes"), C = d && d.prototype ? z(d.prototype, "nodeType") : null, H = d && d.prototype ? z(d.prototype, "nodeName") : null;
264
275
  if (typeof m == "function") {
265
- const a = r.createElement("template");
266
- a.content && a.content.ownerDocument && (r = a.content.ownerDocument);
276
+ const r = s.createElement("template");
277
+ r.content && r.content.ownerDocument && (s = r.content.ownerDocument);
267
278
  }
268
- let O, lt = "";
269
- const bt = r, Ft = bt.implementation, re = bt.createNodeIterator, Ze = bt.createDocumentFragment, Je = bt.getElementsByTagName, Qe = s.importNode;
270
- let E = Be();
271
- e.isSupported = typeof je == "function" && typeof Et == "function" && Ft && Ft.createHTMLDocument !== void 0;
272
- const Rt = kn, Ot = Fn, wt = zn, tn = Un, en = Hn, nn = Gn, ae = Wn, on = jn;
273
- let se = We, _ = null;
274
- const zt = c({}, [...ze, ...Qt, ...te, ...ee, ...Ue]);
275
- let y = null;
276
- const Ut = c({}, [...He, ...ne, ...Ge, ...Pt]);
277
- let g = Object.seal(ot(null, {
279
+ let L, q = "", kt, ue = !1, mt = 0;
280
+ const fe = function() {
281
+ if (mt > 0)
282
+ throw J('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.');
283
+ }, tt = function(t) {
284
+ fe(), mt++;
285
+ try {
286
+ return L.createHTML(t);
287
+ } finally {
288
+ mt--;
289
+ }
290
+ }, an = function(t) {
291
+ fe(), mt++;
292
+ try {
293
+ return L.createScriptURL(t);
294
+ } finally {
295
+ mt--;
296
+ }
297
+ }, cn = function() {
298
+ return ue || (kt = Eo(wt, l), ue = !0), kt;
299
+ }, Ot = s, zt = Ot.implementation, pe = Ot.createNodeIterator, ln = Ot.createDocumentFragment, un = Ot.getElementsByTagName, fn = c.importNode;
300
+ let g = tn();
301
+ n.isSupported = typeof en == "function" && typeof pt == "function" && zt && zt.createHTMLDocument !== void 0;
302
+ const pn = so, mn = ao, dn = co, hn = lo, _n = uo, Tn = fo, me = po, yn = ho;
303
+ let de = Je, h = null;
304
+ const he = f({}, [...Ve, ...ne, ...oe, ...ie, ...qe]);
305
+ let _ = null;
306
+ const _e = f({}, [...Ke, ...re, ...Ze, ...vt]);
307
+ let T = Object.seal(at(null, {
278
308
  tagNameCheck: {
279
309
  writable: !0,
280
310
  configurable: !1,
@@ -293,8 +323,8 @@ function Ye() {
293
323
  enumerable: !0,
294
324
  value: !1
295
325
  }
296
- })), ct = null, It = null;
297
- const G = Object.seal(ot(null, {
326
+ })), dt = null, Te = null;
327
+ const G = Object.seal(at(null, {
298
328
  tagCheck: {
299
329
  writable: !0,
300
330
  configurable: !1,
@@ -308,135 +338,250 @@ function Ye() {
308
338
  value: null
309
339
  }
310
340
  }));
311
- let le = !0, Ht = !0, ce = !1, fe = !0, W = !1, ft = !0, Y = !1, Gt = !1, Wt = !1, K = !1, Nt = !1, Dt = !1, ue = !0, me = !1;
312
- const pe = "user-content-";
313
- let Bt = !0, ut = !1, Z = {}, x = null;
314
- const jt = c({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
315
- let de = null;
316
- const he = c({}, ["audio", "video", "img", "source", "image", "track"]);
341
+ let ye = !0, Ut = !0, ge = !1, Ee = !0, B = !1, ht = !0, K = !1, Ft = !1, Ht = null, Gt = null, Bt = !1, et = !1, Rt = !1, It = !1, Ae = !0, Se = !1;
342
+ const be = "user-content-";
343
+ let Wt = !0, Yt = !1, nt = {}, x = null;
344
+ const jt = f({}, [
345
+ "annotation-xml",
346
+ "audio",
347
+ "colgroup",
348
+ "desc",
349
+ "foreignobject",
350
+ "head",
351
+ "iframe",
352
+ "math",
353
+ "mi",
354
+ "mn",
355
+ "mo",
356
+ "ms",
357
+ "mtext",
358
+ "noembed",
359
+ "noframes",
360
+ "noscript",
361
+ "plaintext",
362
+ "script",
363
+ // <selectedcontent> mirrors the selected <option>'s subtree, cloned by
364
+ // the UA (customizable <select>) — including any on* handlers — and the
365
+ // engine re-mirrors synchronously whenever a removal changes which
366
+ // option/selectedcontent is current, even inside DOMPurify's inert
367
+ // DOMParser document. Hoisting its children on removal re-inserts a fresh
368
+ // mirror target ahead of the walk, which the engine refills, looping
369
+ // forever (DoS) and amplifying output. Dropping its content on removal
370
+ // (rather than hoisting) breaks that cascade; the content is a duplicate
371
+ // of the option, which is sanitized on its own. See campaign-3 F1/F6.
372
+ "selectedcontent",
373
+ "style",
374
+ "svg",
375
+ "template",
376
+ "thead",
377
+ "title",
378
+ "video",
379
+ "xmp"
380
+ ]);
381
+ let we = null;
382
+ const Oe = f({}, ["audio", "video", "img", "source", "image", "track"]);
317
383
  let $t = null;
318
- const _e = c({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Lt = "http://www.w3.org/1998/Math/MathML", Ct = "http://www.w3.org/2000/svg", P = "http://www.w3.org/1999/xhtml";
319
- let J = P, Yt = !1, Xt = null;
320
- const rn = c({}, [Lt, Ct, P], Jt);
321
- let Vt = c({}, ["mi", "mo", "mn", "ms", "mtext"]), qt = c({}, ["annotation-xml"]);
322
- const an = c({}, ["title", "style", "font", "a", "script"]);
323
- let mt = null;
324
- const sn = ["application/xhtml+xml", "text/html"], ln = "text/html";
325
- let T = null, Q = null;
326
- const cn = r.createElement("form"), ge = function(t) {
384
+ const Re = f({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Nt = "http://www.w3.org/1998/Math/MathML", Lt = "http://www.w3.org/2000/svg", P = "http://www.w3.org/1999/xhtml";
385
+ let ot = P, Xt = !1, Vt = null;
386
+ const gn = f({}, [Nt, Lt, P], ee), Ie = O(["mi", "mo", "mn", "ms", "mtext"]);
387
+ let qt = f({}, Ie);
388
+ const Ne = O(["annotation-xml"]);
389
+ let Kt = f({}, Ne);
390
+ const En = f({}, ["title", "style", "font", "a", "script"]);
391
+ let _t = null;
392
+ const An = ["application/xhtml+xml", "text/html"], Sn = "text/html";
393
+ let y = null, it = null;
394
+ const bn = s.createElement("form"), Le = function(t) {
327
395
  return t instanceof RegExp || t instanceof Function;
328
- }, Kt = function() {
396
+ }, Zt = function() {
329
397
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
330
- if (Q && Q === t)
398
+ if (it && it === t)
331
399
  return;
332
- (!t || typeof t != "object") && (t = {}), t = R(t), mt = // eslint-disable-next-line unicorn/prefer-includes
333
- sn.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? ln : t.PARSER_MEDIA_TYPE, T = mt === "application/xhtml+xml" ? Jt : _t, _ = h(t, "ALLOWED_TAGS") && w(t.ALLOWED_TAGS) ? c({}, t.ALLOWED_TAGS, T) : zt, y = h(t, "ALLOWED_ATTR") && w(t.ALLOWED_ATTR) ? c({}, t.ALLOWED_ATTR, T) : Ut, Xt = h(t, "ALLOWED_NAMESPACES") && w(t.ALLOWED_NAMESPACES) ? c({}, t.ALLOWED_NAMESPACES, Jt) : rn, $t = h(t, "ADD_URI_SAFE_ATTR") && w(t.ADD_URI_SAFE_ATTR) ? c(R(_e), t.ADD_URI_SAFE_ATTR, T) : _e, de = h(t, "ADD_DATA_URI_TAGS") && w(t.ADD_DATA_URI_TAGS) ? c(R(he), t.ADD_DATA_URI_TAGS, T) : he, x = h(t, "FORBID_CONTENTS") && w(t.FORBID_CONTENTS) ? c({}, t.FORBID_CONTENTS, T) : jt, ct = h(t, "FORBID_TAGS") && w(t.FORBID_TAGS) ? c({}, t.FORBID_TAGS, T) : R({}), It = h(t, "FORBID_ATTR") && w(t.FORBID_ATTR) ? c({}, t.FORBID_ATTR, T) : R({}), Z = h(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? R(t.USE_PROFILES) : t.USE_PROFILES : !1, le = t.ALLOW_ARIA_ATTR !== !1, Ht = t.ALLOW_DATA_ATTR !== !1, ce = t.ALLOW_UNKNOWN_PROTOCOLS || !1, fe = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, W = t.SAFE_FOR_TEMPLATES || !1, ft = t.SAFE_FOR_XML !== !1, Y = t.WHOLE_DOCUMENT || !1, K = t.RETURN_DOM || !1, Nt = t.RETURN_DOM_FRAGMENT || !1, Dt = t.RETURN_TRUSTED_TYPE || !1, Wt = t.FORCE_BODY || !1, ue = t.SANITIZE_DOM !== !1, me = t.SANITIZE_NAMED_PROPS || !1, Bt = t.KEEP_CONTENT !== !1, ut = t.IN_PLACE || !1, se = vn(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : We, J = typeof t.NAMESPACE == "string" ? t.NAMESPACE : P, Vt = h(t, "MATHML_TEXT_INTEGRATION_POINTS") && t.MATHML_TEXT_INTEGRATION_POINTS && typeof t.MATHML_TEXT_INTEGRATION_POINTS == "object" ? R(t.MATHML_TEXT_INTEGRATION_POINTS) : c({}, ["mi", "mo", "mn", "ms", "mtext"]), qt = h(t, "HTML_INTEGRATION_POINTS") && t.HTML_INTEGRATION_POINTS && typeof t.HTML_INTEGRATION_POINTS == "object" ? R(t.HTML_INTEGRATION_POINTS) : c({}, ["annotation-xml"]);
334
- const n = h(t, "CUSTOM_ELEMENT_HANDLING") && t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING == "object" ? R(t.CUSTOM_ELEMENT_HANDLING) : ot(null);
335
- if (g = ot(null), h(n, "tagNameCheck") && ge(n.tagNameCheck) && (g.tagNameCheck = n.tagNameCheck), h(n, "attributeNameCheck") && ge(n.attributeNameCheck) && (g.attributeNameCheck = n.attributeNameCheck), h(n, "allowCustomizedBuiltInElements") && typeof n.allowCustomizedBuiltInElements == "boolean" && (g.allowCustomizedBuiltInElements = n.allowCustomizedBuiltInElements), W && (Ht = !1), Nt && (K = !0), Z && (_ = c({}, Ue), y = ot(null), Z.html === !0 && (c(_, ze), c(y, He)), Z.svg === !0 && (c(_, Qt), c(y, ne), c(y, Pt)), Z.svgFilters === !0 && (c(_, te), c(y, ne), c(y, Pt)), Z.mathMl === !0 && (c(_, ee), c(y, Ge), c(y, Pt))), G.tagCheck = null, G.attributeCheck = null, h(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? G.tagCheck = t.ADD_TAGS : w(t.ADD_TAGS) && (_ === zt && (_ = R(_)), c(_, t.ADD_TAGS, T))), h(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? G.attributeCheck = t.ADD_ATTR : w(t.ADD_ATTR) && (y === Ut && (y = R(y)), c(y, t.ADD_ATTR, T))), h(t, "ADD_URI_SAFE_ATTR") && w(t.ADD_URI_SAFE_ATTR) && c($t, t.ADD_URI_SAFE_ATTR, T), h(t, "FORBID_CONTENTS") && w(t.FORBID_CONTENTS) && (x === jt && (x = R(x)), c(x, t.FORBID_CONTENTS, T)), h(t, "ADD_FORBID_CONTENTS") && w(t.ADD_FORBID_CONTENTS) && (x === jt && (x = R(x)), c(x, t.ADD_FORBID_CONTENTS, T)), Bt && (_["#text"] = !0), Y && c(_, ["html", "head", "body"]), _.table && (c(_, ["tbody"]), delete ct.tbody), t.TRUSTED_TYPES_POLICY) {
400
+ (!t || typeof t != "object") && (t = {}), t = N(t), _t = // eslint-disable-next-line unicorn/prefer-includes
401
+ An.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Sn : t.PARSER_MEDIA_TYPE, y = _t === "application/xhtml+xml" ? ee : At, h = Y(t, "ALLOWED_TAGS", he, {
402
+ transform: y
403
+ }), _ = Y(t, "ALLOWED_ATTR", _e, {
404
+ transform: y
405
+ }), Vt = Y(t, "ALLOWED_NAMESPACES", gn, {
406
+ transform: ee
407
+ }), $t = Y(t, "ADD_URI_SAFE_ATTR", Re, {
408
+ transform: y,
409
+ base: Re
410
+ }), we = Y(t, "ADD_DATA_URI_TAGS", Oe, {
411
+ transform: y,
412
+ base: Oe
413
+ }), x = Y(t, "FORBID_CONTENTS", jt, {
414
+ transform: y
415
+ }), dt = Y(t, "FORBID_TAGS", N({}), {
416
+ transform: y
417
+ }), Te = Y(t, "FORBID_ATTR", N({}), {
418
+ transform: y
419
+ }), nt = b(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? N(t.USE_PROFILES) : t.USE_PROFILES : !1, ye = t.ALLOW_ARIA_ATTR !== !1, Ut = t.ALLOW_DATA_ATTR !== !1, ge = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Ee = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, B = t.SAFE_FOR_TEMPLATES || !1, ht = t.SAFE_FOR_XML !== !1, K = t.WHOLE_DOCUMENT || !1, et = t.RETURN_DOM || !1, Rt = t.RETURN_DOM_FRAGMENT || !1, It = t.RETURN_TRUSTED_TYPE || !1, Bt = t.FORCE_BODY || !1, Ae = t.SANITIZE_DOM !== !1, Se = t.SANITIZE_NAMED_PROPS || !1, Wt = t.KEEP_CONTENT !== !1, Yt = t.IN_PLACE || !1, de = oo(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : Je, ot = typeof t.NAMESPACE == "string" ? t.NAMESPACE : P, qt = b(t, "MATHML_TEXT_INTEGRATION_POINTS") && t.MATHML_TEXT_INTEGRATION_POINTS && typeof t.MATHML_TEXT_INTEGRATION_POINTS == "object" ? N(t.MATHML_TEXT_INTEGRATION_POINTS) : f({}, Ie), Kt = b(t, "HTML_INTEGRATION_POINTS") && t.HTML_INTEGRATION_POINTS && typeof t.HTML_INTEGRATION_POINTS == "object" ? N(t.HTML_INTEGRATION_POINTS) : f({}, Ne);
420
+ const e = b(t, "CUSTOM_ELEMENT_HANDLING") && t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING == "object" ? N(t.CUSTOM_ELEMENT_HANDLING) : at(null);
421
+ if (T = at(null), b(e, "tagNameCheck") && Le(e.tagNameCheck) && (T.tagNameCheck = e.tagNameCheck), b(e, "attributeNameCheck") && Le(e.attributeNameCheck) && (T.attributeNameCheck = e.attributeNameCheck), b(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (T.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), R(T), B && (Ut = !1), Rt && (et = !0), nt && (h = f({}, qe), _ = at(null), nt.html === !0 && (f(h, Ve), f(_, Ke)), nt.svg === !0 && (f(h, ne), f(_, re), f(_, vt)), nt.svgFilters === !0 && (f(h, oe), f(_, re), f(_, vt)), nt.mathMl === !0 && (f(h, ie), f(_, Ze), f(_, vt))), G.tagCheck = null, G.attributeCheck = null, b(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? G.tagCheck = t.ADD_TAGS : j(t.ADD_TAGS) && (h === he && (h = N(h)), f(h, t.ADD_TAGS, y))), b(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? G.attributeCheck = t.ADD_ATTR : j(t.ADD_ATTR) && (_ === _e && (_ = N(_)), f(_, t.ADD_ATTR, y))), b(t, "ADD_URI_SAFE_ATTR") && j(t.ADD_URI_SAFE_ATTR) && f($t, t.ADD_URI_SAFE_ATTR, y), b(t, "FORBID_CONTENTS") && j(t.FORBID_CONTENTS) && (x === jt && (x = N(x)), f(x, t.FORBID_CONTENTS, y)), b(t, "ADD_FORBID_CONTENTS") && j(t.ADD_FORBID_CONTENTS) && (x === jt && (x = N(x)), f(x, t.ADD_FORBID_CONTENTS, y)), Wt && (h["#text"] = !0), K && f(h, ["html", "head", "body"]), h.table && (f(h, ["tbody"]), delete dt.tbody), t.TRUSTED_TYPES_POLICY) {
336
422
  if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
337
- throw ht('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
423
+ throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
338
424
  if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
339
- throw ht('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
340
- O = t.TRUSTED_TYPES_POLICY, lt = O.createHTML("");
341
- } else
342
- O === void 0 && (O = Yn(yt, l)), O !== null && typeof lt == "string" && (lt = O.createHTML(""));
343
- (E.uponSanitizeElement.length > 0 || E.uponSanitizeAttribute.length > 0) && _ === zt && (_ = R(_)), E.uponSanitizeAttribute.length > 0 && y === Ut && (y = R(y)), I && I(t), Q = t;
344
- }, Te = c({}, [...Qt, ...te, ...xn]), ye = c({}, [...ee, ...Pn]), fn = function(t) {
345
- let n = Et(t);
346
- (!n || !n.tagName) && (n = {
347
- namespaceURI: J,
425
+ throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
426
+ const i = L;
427
+ L = t.TRUSTED_TYPES_POLICY;
428
+ try {
429
+ q = tt("");
430
+ } catch (a) {
431
+ throw L = i, a;
432
+ }
433
+ } else t.TRUSTED_TYPES_POLICY === null ? (L = void 0, q = "") : (L === void 0 && (L = cn()), L && typeof q == "string" && (q = tt("")));
434
+ O && O(t), it = t;
435
+ }, De = f({}, [...ne, ...oe, ...io]), Ce = f({}, [...ie, ...ro]), wn = function(t, e, i) {
436
+ return e.namespaceURI === P ? t === "svg" : e.namespaceURI === Nt ? t === "svg" && (i === "annotation-xml" || qt[i]) : !!De[t];
437
+ }, On = function(t, e, i) {
438
+ return e.namespaceURI === P ? t === "math" : e.namespaceURI === Lt ? t === "math" && Kt[i] : !!Ce[t];
439
+ }, Rn = function(t, e, i) {
440
+ return e.namespaceURI === Lt && !Kt[i] || e.namespaceURI === Nt && !qt[i] ? !1 : !Ce[t] && (En[t] || !De[t]);
441
+ }, In = function(t) {
442
+ let e = pt(t);
443
+ (!e || !e.tagName) && (e = {
444
+ namespaceURI: ot,
348
445
  tagName: "template"
349
446
  });
350
- const o = _t(t.tagName), u = _t(n.tagName);
351
- return Xt[t.namespaceURI] ? t.namespaceURI === Ct ? n.namespaceURI === P ? o === "svg" : n.namespaceURI === Lt ? o === "svg" && (u === "annotation-xml" || Vt[u]) : !!Te[o] : t.namespaceURI === Lt ? n.namespaceURI === P ? o === "math" : n.namespaceURI === Ct ? o === "math" && qt[u] : !!ye[o] : t.namespaceURI === P ? n.namespaceURI === Ct && !qt[u] || n.namespaceURI === Lt && !Vt[u] ? !1 : !ye[o] && (an[o] || !Te[o]) : !!(mt === "application/xhtml+xml" && Xt[t.namespaceURI]) : !1;
352
- }, M = function(t) {
353
- nt(e.removed, {
447
+ const i = At(t.tagName), a = At(e.tagName);
448
+ return Vt[t.namespaceURI] ? t.namespaceURI === Lt ? wn(i, e, a) : t.namespaceURI === Nt ? On(i, e, a) : t.namespaceURI === P ? Rn(i, e, a) : !!(_t === "application/xhtml+xml" && Vt[t.namespaceURI]) : !1;
449
+ }, W = function(t) {
450
+ st(n.removed, {
354
451
  element: t
355
452
  });
356
453
  try {
357
- Et(t).removeChild(t);
454
+ pt(t).removeChild(t);
358
455
  } catch {
359
- Ve(t);
456
+ if (ce(t), !pt(t))
457
+ throw J("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
360
458
  }
361
- }, X = function(t, n) {
459
+ }, Me = function(t) {
460
+ const e = ft(t);
461
+ if (e) {
462
+ const a = [];
463
+ yt(e, (u) => {
464
+ st(a, u);
465
+ }), yt(a, (u) => {
466
+ try {
467
+ ce(u);
468
+ } catch {
469
+ }
470
+ });
471
+ }
472
+ const i = Pt(t);
473
+ if (i)
474
+ for (let a = i.length - 1; a >= 0; --a) {
475
+ const u = i[a], p = u && u.name;
476
+ if (typeof p == "string")
477
+ try {
478
+ t.removeAttribute(p);
479
+ } catch {
480
+ }
481
+ }
482
+ }, Z = function(t, e) {
362
483
  try {
363
- nt(e.removed, {
364
- attribute: n.getAttributeNode(t),
365
- from: n
484
+ st(n.removed, {
485
+ attribute: e.getAttributeNode(t),
486
+ from: e
366
487
  });
367
488
  } catch {
368
- nt(e.removed, {
489
+ st(n.removed, {
369
490
  attribute: null,
370
- from: n
491
+ from: e
371
492
  });
372
493
  }
373
- if (n.removeAttribute(t), t === "is")
374
- if (K || Nt)
494
+ if (e.removeAttribute(t), t === "is")
495
+ if (et || Rt)
375
496
  try {
376
- M(n);
497
+ W(e);
377
498
  } catch {
378
499
  }
379
500
  else
380
501
  try {
381
- n.setAttribute(t, "");
502
+ e.setAttribute(t, "");
382
503
  } catch {
383
504
  }
384
- }, Ae = function(t) {
385
- let n = null, o = null;
386
- if (Wt)
505
+ }, Nn = function(t) {
506
+ const e = Pt(t);
507
+ if (e)
508
+ for (let i = e.length - 1; i >= 0; --i) {
509
+ const a = e[i], u = a && a.name;
510
+ if (!(typeof u != "string" || _[y(u)]))
511
+ try {
512
+ t.removeAttribute(u);
513
+ } catch {
514
+ }
515
+ }
516
+ }, Ln = function(t) {
517
+ const e = [t];
518
+ for (; e.length > 0; ) {
519
+ const i = e.pop();
520
+ (C ? C(i) : i.nodeType) === k.element && Nn(i);
521
+ const u = ft(i);
522
+ if (u)
523
+ for (let p = u.length - 1; p >= 0; --p)
524
+ e.push(u[p]);
525
+ }
526
+ }, ve = function(t) {
527
+ let e = null, i = null;
528
+ if (Bt)
387
529
  t = "<remove></remove>" + t;
388
530
  else {
389
- const p = xe(t, /^[\r\n\t ]+/);
390
- o = p && p[0];
531
+ const p = Ye(t, /^[\r\n\t ]+/);
532
+ i = p && p[0];
391
533
  }
392
- mt === "application/xhtml+xml" && J === P && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
393
- const u = O ? O.createHTML(t) : t;
394
- if (J === P)
534
+ _t === "application/xhtml+xml" && ot === P && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
535
+ const a = L ? tt(t) : t;
536
+ if (ot === P)
395
537
  try {
396
- n = new kt().parseFromString(u, mt);
538
+ e = new xt().parseFromString(a, _t);
397
539
  } catch {
398
540
  }
399
- if (!n || !n.documentElement) {
400
- n = Ft.createDocument(J, "template", null);
541
+ if (!e || !e.documentElement) {
542
+ e = zt.createDocument(ot, "template", null);
401
543
  try {
402
- n.documentElement.innerHTML = Yt ? lt : u;
544
+ e.documentElement.innerHTML = Xt ? q : a;
403
545
  } catch {
404
546
  }
405
547
  }
406
- const f = n.body || n.documentElement;
407
- return t && o && f.insertBefore(r.createTextNode(o), f.childNodes[0] || null), J === P ? Je.call(n, Y ? "html" : "body")[0] : Y ? n.documentElement : f;
408
- }, Ee = function(t) {
409
- return re.call(
548
+ const u = e.body || e.documentElement;
549
+ return t && i && u.insertBefore(s.createTextNode(i), u.childNodes[0] || null), ot === P ? un.call(e, K ? "html" : "body")[0] : K ? e.documentElement : u;
550
+ }, xe = function(t) {
551
+ return pe.call(
410
552
  t.ownerDocument || t,
411
553
  t,
412
554
  // eslint-disable-next-line no-bitwise
413
- N.SHOW_ELEMENT | N.SHOW_COMMENT | N.SHOW_TEXT | N.SHOW_PROCESSING_INSTRUCTION | N.SHOW_CDATA_SECTION,
555
+ D.SHOW_ELEMENT | D.SHOW_COMMENT | D.SHOW_TEXT | D.SHOW_PROCESSING_INSTRUCTION | D.SHOW_CDATA_SECTION,
414
556
  null
415
557
  );
416
- }, Se = function(t) {
558
+ }, Dt = function(t) {
559
+ return t = gt(t, pn, " "), t = gt(t, mn, " "), t = gt(t, dn, " "), t;
560
+ }, Jt = function(t) {
561
+ var e;
417
562
  t.normalize();
418
- const n = re.call(
563
+ const i = pe.call(
419
564
  t.ownerDocument || t,
420
565
  t,
421
566
  // eslint-disable-next-line no-bitwise
422
- N.SHOW_TEXT | N.SHOW_COMMENT | N.SHOW_CDATA_SECTION | N.SHOW_PROCESSING_INSTRUCTION,
567
+ D.SHOW_TEXT | D.SHOW_COMMENT | D.SHOW_CDATA_SECTION | D.SHOW_PROCESSING_INSTRUCTION,
423
568
  null
424
569
  );
425
- let o = n.nextNode();
426
- for (; o; ) {
427
- let u = o.data;
428
- et([Rt, Ot, wt], (f) => {
429
- u = it(u, f, " ");
430
- }), o.data = u, o = n.nextNode();
431
- }
432
- }, Mt = function(t) {
433
- const n = q ? q(t) : null;
434
- return typeof n != "string" || T(n) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
570
+ let a = i.nextNode();
571
+ for (; a; )
572
+ a.data = Dt(a.data), a = i.nextNode();
573
+ const u = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
574
+ u && yt(u, (p) => {
575
+ rt(p.content) && Jt(p.content);
576
+ });
577
+ }, Ct = function(t) {
578
+ const e = H ? H(t) : null;
579
+ return typeof e != "string" || y(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
435
580
  // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
436
581
  // makes the direct read diverge from the cached read; a clean form
437
582
  // (same-realm OR foreign-realm) has both reads pointing at the same
438
583
  // canonical NamedNodeMap.
439
- t.attributes !== Ke(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
584
+ t.attributes !== Pt(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
440
585
  // returns the integer 1 for any Element regardless of realm; direct
441
586
  // read on a clobbered form (e.g. <input name="nodeType">) returns
442
587
  // the named child element. Cheap addition — nodeType is read from
@@ -454,16 +599,16 @@ function Ye() {
454
599
  // select, etc.) regardless of whether the named child happens to
455
600
  // carry a numeric .length, which a typeof-based probe would miss
456
601
  // (e.g. HTMLSelectElement.length is a defined unsigned-long).
457
- t.childNodes !== At(t);
458
- }, pt = function(t) {
602
+ t.childNodes !== ft(t);
603
+ }, rt = function(t) {
459
604
  if (!C || typeof t != "object" || t === null)
460
605
  return !1;
461
606
  try {
462
- return C(t) === F.documentFragment;
607
+ return C(t) === k.documentFragment;
463
608
  } catch {
464
609
  return !1;
465
610
  }
466
- }, vt = function(t) {
611
+ }, Tt = function(t) {
467
612
  if (!C || typeof t != "object" || t === null)
468
613
  return !1;
469
614
  try {
@@ -472,275 +617,306 @@ function Ye() {
472
617
  return !1;
473
618
  }
474
619
  };
475
- function U(a, t, n) {
476
- et(a, (o) => {
477
- o.call(e, t, n, Q);
620
+ function U(r, t, e) {
621
+ r.length !== 0 && yt(r, (i) => {
622
+ i.call(n, t, e, it);
478
623
  });
479
624
  }
480
- const be = function(t) {
481
- let n = null;
482
- if (U(E.beforeSanitizeElements, t, null), Mt(t))
483
- return M(t), !0;
484
- const o = T(t.nodeName);
485
- if (U(E.uponSanitizeElement, t, {
486
- tagName: o,
487
- allowedTags: _
488
- }), ft && t.hasChildNodes() && !vt(t.firstElementChild) && b(/<[/\w!]/g, t.innerHTML) && b(/<[/\w!]/g, t.textContent) || ft && t.namespaceURI === P && o === "style" && vt(t.firstElementChild) || t.nodeType === F.progressingInstruction || ft && t.nodeType === F.comment && b(/<[/\w]/g, t.data))
489
- return M(t), !0;
490
- if (ct[o] || !(G.tagCheck instanceof Function && G.tagCheck(o)) && !_[o]) {
491
- if (!ct[o] && Oe(o) && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, o) || g.tagNameCheck instanceof Function && g.tagNameCheck(o)))
492
- return !1;
493
- if (Bt && !x[o]) {
494
- const f = Et(t), p = At(t);
495
- if (p && f) {
496
- const D = p.length;
497
- for (let k = D - 1; k >= 0; --k) {
498
- const v = Xe(p[k], !0);
499
- f.insertBefore(v, qe(t));
500
- }
625
+ const Dn = function(t, e) {
626
+ return !!(ht && t.hasChildNodes() && !Tt(t.firstElementChild) && w(Qe, t.textContent) && w(Qe, t.innerHTML) || ht && t.namespaceURI === P && e === "style" && Tt(t.firstElementChild) || t.nodeType === k.processingInstruction || ht && t.nodeType === k.comment && w(_o, t.data));
627
+ }, Cn = function(t, e) {
628
+ if (!dt[e] && ze(e) && (T.tagNameCheck instanceof RegExp && w(T.tagNameCheck, e) || T.tagNameCheck instanceof Function && T.tagNameCheck(e)))
629
+ return !1;
630
+ if (Wt && !x[e]) {
631
+ const i = pt(t), a = ft(t);
632
+ if (a && i) {
633
+ const u = a.length;
634
+ for (let p = u - 1; p >= 0; --p) {
635
+ const S = Yt ? a[p] : rn(a[p], !0);
636
+ i.insertBefore(S, sn(t));
501
637
  }
502
638
  }
503
- return M(t), !0;
504
639
  }
505
- return (C ? C(t) : t.nodeType) === F.element && !fn(t) || (o === "noscript" || o === "noembed" || o === "noframes") && b(/<\/no(script|embed|frames)/i, t.innerHTML) ? (M(t), !0) : (W && t.nodeType === F.text && (n = t.textContent, et([Rt, Ot, wt], (f) => {
506
- n = it(n, f, " ");
507
- }), t.textContent !== n && (nt(e.removed, {
508
- element: t.cloneNode()
509
- }), t.textContent = n)), U(E.afterSanitizeElements, t, null), !1);
510
- }, Re = function(t, n, o) {
511
- if (It[n] || ue && (n === "id" || n === "name") && (o in r || o in cn))
640
+ return W(t), !0;
641
+ }, Pe = function(t) {
642
+ if (U(g.beforeSanitizeElements, t, null), Ct(t))
643
+ return W(t), !0;
644
+ const e = y(H ? H(t) : t.nodeName);
645
+ if (U(g.uponSanitizeElement, t, {
646
+ tagName: e,
647
+ allowedTags: h
648
+ }), Dn(t, e))
649
+ return W(t), !0;
650
+ if (dt[e] || !(G.tagCheck instanceof Function && G.tagCheck(e)) && !h[e])
651
+ return Cn(t, e);
652
+ if ((C ? C(t) : t.nodeType) === k.element && !In(t) || (e === "noscript" || e === "noembed" || e === "noframes") && w(To, t.innerHTML))
653
+ return W(t), !0;
654
+ if (B && t.nodeType === k.text) {
655
+ const a = Dt(t.textContent);
656
+ t.textContent !== a && (st(n.removed, {
657
+ element: t.cloneNode()
658
+ }), t.textContent = a);
659
+ }
660
+ return U(g.afterSanitizeElements, t, null), !1;
661
+ }, ke = function(t, e, i) {
662
+ if (Te[e] || Ae && (e === "id" || e === "name") && (i in s || i in bn))
512
663
  return !1;
513
- const u = y[n] || G.attributeCheck instanceof Function && G.attributeCheck(n, t);
514
- if (!(Ht && !It[n] && b(tn, n))) {
515
- if (!(le && b(en, n))) {
516
- if (!u || It[n]) {
517
- if (
518
- // First condition does a very basic check if a) it's basically a valid custom element tagname AND
519
- // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
520
- // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
521
- !(Oe(t) && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, t) || g.tagNameCheck instanceof Function && g.tagNameCheck(t)) && (g.attributeNameCheck instanceof RegExp && b(g.attributeNameCheck, n) || g.attributeNameCheck instanceof Function && g.attributeNameCheck(n, t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
522
- // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
523
- n === "is" && g.allowCustomizedBuiltInElements && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, o) || g.tagNameCheck instanceof Function && g.tagNameCheck(o)))
524
- ) return !1;
525
- } else if (!$t[n]) {
526
- if (!b(se, it(o, ae, ""))) {
527
- if (!((n === "src" || n === "xlink:href" || n === "href") && t !== "script" && Pe(o, "data:") === 0 && de[t])) {
528
- if (!(ce && !b(nn, it(o, ae, "")))) {
529
- if (o)
530
- return !1;
664
+ const a = _[e] || G.attributeCheck instanceof Function && G.attributeCheck(e, t);
665
+ if (!(Ut && w(hn, e))) {
666
+ if (!(ye && w(_n, e))) {
667
+ if (a) {
668
+ if (!$t[e]) {
669
+ if (!w(de, gt(i, me, ""))) {
670
+ if (!((e === "src" || e === "xlink:href" || e === "href") && t !== "script" && je(i, "data:") === 0 && we[t])) {
671
+ if (!(ge && !w(Tn, gt(i, me, "")))) {
672
+ if (i)
673
+ return !1;
674
+ }
531
675
  }
532
676
  }
533
677
  }
534
- }
678
+ } else if (
679
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
680
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
681
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
682
+ !(ze(t) && (T.tagNameCheck instanceof RegExp && w(T.tagNameCheck, t) || T.tagNameCheck instanceof Function && T.tagNameCheck(t)) && (T.attributeNameCheck instanceof RegExp && w(T.attributeNameCheck, e) || T.attributeNameCheck instanceof Function && T.attributeNameCheck(e, t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
683
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
684
+ e === "is" && T.allowCustomizedBuiltInElements && (T.tagNameCheck instanceof RegExp && w(T.tagNameCheck, i) || T.tagNameCheck instanceof Function && T.tagNameCheck(i)))
685
+ ) return !1;
535
686
  }
536
687
  }
537
688
  return !0;
538
- }, un = c({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), Oe = function(t) {
539
- return !un[_t(t)] && b(on, t);
540
- }, we = function(t) {
541
- U(E.beforeSanitizeAttributes, t, null);
542
- const n = t.attributes;
543
- if (!n || Mt(t))
689
+ }, Mn = f({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), ze = function(t) {
690
+ return !Mn[At(t)] && w(yn, t);
691
+ }, vn = function(t, e, i, a) {
692
+ if (L && typeof wt == "object" && typeof wt.getAttributeType == "function" && !i)
693
+ switch (wt.getAttributeType(t, e)) {
694
+ case "TrustedHTML":
695
+ return tt(a);
696
+ case "TrustedScriptURL":
697
+ return an(a);
698
+ }
699
+ return a;
700
+ }, xn = function(t, e, i, a) {
701
+ try {
702
+ i ? t.setAttributeNS(i, e, a) : t.setAttribute(e, a), Ct(t) ? W(t) : We(n.removed);
703
+ } catch {
704
+ Z(e, t);
705
+ }
706
+ }, Ue = function(t) {
707
+ U(g.beforeSanitizeAttributes, t, null);
708
+ const e = t.attributes;
709
+ if (!e || Ct(t))
544
710
  return;
545
- const o = {
711
+ const i = {
546
712
  attrName: "",
547
713
  attrValue: "",
548
714
  keepAttr: !0,
549
- allowedAttributes: y,
715
+ allowedAttributes: _,
550
716
  forceKeepAttr: void 0
551
717
  };
552
- let u = n.length;
553
- for (; u--; ) {
554
- const f = n[u], p = f.name, D = f.namespaceURI, k = f.value, v = T(p), Zt = k;
555
- let S = p === "value" ? Zt : In(Zt);
556
- if (o.attrName = v, o.attrValue = S, o.keepAttr = !0, o.forceKeepAttr = void 0, U(E.uponSanitizeAttribute, t, o), S = o.attrValue, me && (v === "id" || v === "name") && Pe(S, pe) !== 0 && (X(p, t), S = pe + S), ft && b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, S)) {
557
- X(p, t);
718
+ let a = e.length;
719
+ const u = y(t.nodeName);
720
+ for (; a--; ) {
721
+ const p = e[a], S = p.name, E = p.namespaceURI, M = p.value, v = y(S), te = M;
722
+ let I = S === "value" ? te : Zn(te);
723
+ if (i.attrName = v, i.attrValue = I, i.keepAttr = !0, i.forceKeepAttr = void 0, U(g.uponSanitizeAttribute, t, i), I = i.attrValue, Se && (v === "id" || v === "name") && je(I, be) !== 0 && (Z(S, t), I = be + I), ht && w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, I)) {
724
+ Z(S, t);
558
725
  continue;
559
726
  }
560
- if (v === "attributename" && xe(S, "href")) {
561
- X(p, t);
727
+ if (v === "attributename" && Ye(I, "href")) {
728
+ Z(S, t);
562
729
  continue;
563
730
  }
564
- if (o.forceKeepAttr)
565
- continue;
566
- if (!o.keepAttr) {
567
- X(p, t);
568
- continue;
731
+ if (!i.forceKeepAttr) {
732
+ if (!i.keepAttr) {
733
+ Z(S, t);
734
+ continue;
735
+ }
736
+ if (!Ee && w(yo, I)) {
737
+ Z(S, t);
738
+ continue;
739
+ }
740
+ if (B && (I = Dt(I)), !ke(u, v, I)) {
741
+ Z(S, t);
742
+ continue;
743
+ }
744
+ I = vn(u, v, E, I), I !== te && xn(t, S, E, I);
569
745
  }
570
- if (!fe && b(/\/>/i, S)) {
571
- X(p, t);
572
- continue;
746
+ }
747
+ U(g.afterSanitizeAttributes, t, null);
748
+ }, Mt = function(t) {
749
+ let e = null;
750
+ const i = xe(t);
751
+ for (U(g.beforeSanitizeShadowDOM, t, null); e = i.nextNode(); )
752
+ if (U(g.uponSanitizeShadowNode, e, null), Pe(e), Ue(e), rt(e.content) && Mt(e.content), (C ? C(e) : e.nodeType) === k.element) {
753
+ const u = le(e);
754
+ rt(u) && (Qt(u), Mt(u));
573
755
  }
574
- W && et([Rt, Ot, wt], (Ne) => {
575
- S = it(S, Ne, " ");
576
- });
577
- const Ie = T(t.nodeName);
578
- if (!Re(Ie, v, S)) {
579
- X(p, t);
756
+ U(g.afterSanitizeShadowDOM, t, null);
757
+ }, Qt = function(t) {
758
+ const e = [{
759
+ node: t,
760
+ shadow: null
761
+ }];
762
+ for (; e.length > 0; ) {
763
+ const i = e.pop();
764
+ if (i.shadow) {
765
+ Mt(i.shadow);
580
766
  continue;
581
767
  }
582
- if (O && typeof yt == "object" && typeof yt.getAttributeType == "function" && !D)
583
- switch (yt.getAttributeType(Ie, v)) {
584
- case "TrustedHTML": {
585
- S = O.createHTML(S);
586
- break;
587
- }
588
- case "TrustedScriptURL": {
589
- S = O.createScriptURL(S);
590
- break;
591
- }
592
- }
593
- if (S !== Zt)
594
- try {
595
- D ? t.setAttributeNS(D, p, S) : t.setAttribute(p, S), Mt(t) ? M(t) : ve(e.removed);
596
- } catch {
597
- X(p, t);
768
+ const a = i.node, p = (C ? C(a) : a.nodeType) === k.element, S = ft(a);
769
+ if (S)
770
+ for (let E = S.length - 1; E >= 0; --E)
771
+ e.push({
772
+ node: S[E],
773
+ shadow: null
774
+ });
775
+ if (p) {
776
+ const E = H ? H(a) : null;
777
+ if (typeof E == "string" && y(E) === "template") {
778
+ const M = a.content;
779
+ rt(M) && e.push({
780
+ node: M,
781
+ shadow: null
782
+ });
598
783
  }
599
- }
600
- U(E.afterSanitizeAttributes, t, null);
601
- }, xt = function(t) {
602
- let n = null;
603
- const o = Ee(t);
604
- for (U(E.beforeSanitizeShadowDOM, t, null); n = o.nextNode(); )
605
- if (U(E.uponSanitizeShadowNode, n, null), be(n), we(n), pt(n.content) && xt(n.content), (C ? C(n) : n.nodeType) === F.element) {
606
- const f = St ? St(n) : n.shadowRoot;
607
- pt(f) && (tt(f), xt(f));
608
784
  }
609
- U(E.afterSanitizeShadowDOM, t, null);
610
- }, tt = function(t) {
611
- const n = C ? C(t) : t.nodeType;
612
- if (n === F.element) {
613
- const f = St ? St(t) : t.shadowRoot;
614
- pt(f) && (tt(f), xt(f));
615
- }
616
- const o = At ? At(t) : t.childNodes;
617
- if (!o)
618
- return;
619
- const u = [];
620
- et(o, (f) => {
621
- nt(u, f);
622
- });
623
- for (const f of u)
624
- tt(f);
625
- if (n === F.element) {
626
- const f = q ? q(t) : null;
627
- if (typeof f == "string" && T(f) === "template") {
628
- const p = t.content;
629
- pt(p) && tt(p);
785
+ if (p) {
786
+ const E = le(a);
787
+ rt(E) && e.push({
788
+ node: null,
789
+ shadow: E
790
+ }, {
791
+ node: E,
792
+ shadow: null
793
+ });
630
794
  }
631
795
  }
632
796
  };
633
- return e.sanitize = function(a) {
634
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = null, o = null, u = null, f = null;
635
- if (Yt = !a, Yt && (a = "<!-->"), typeof a != "string" && !vt(a) && (a = Mn(a), typeof a != "string"))
636
- throw ht("dirty is not a string, aborting");
637
- if (!e.isSupported)
638
- return a;
639
- if (Gt || Kt(t), e.removed = [], typeof a == "string" && (ut = !1), ut) {
640
- const k = q ? q(a) : a.nodeName;
641
- if (typeof k == "string") {
642
- const v = T(k);
643
- if (!_[v] || ct[v])
644
- throw ht("root node is forbidden and cannot be sanitized in-place");
797
+ return n.sanitize = function(r) {
798
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, i = null, a = null, u = null;
799
+ if (Xt = !r, Xt && (r = "<!-->"), typeof r != "string" && !Tt(r) && (r = no(r), typeof r != "string"))
800
+ throw J("dirty is not a string, aborting");
801
+ if (!n.isSupported)
802
+ return r;
803
+ Ft ? (h = Ht, _ = Gt) : Zt(t), (g.uponSanitizeElement.length > 0 || g.uponSanitizeAttribute.length > 0) && (h = N(h)), g.uponSanitizeAttribute.length > 0 && (_ = N(_)), n.removed = [];
804
+ const p = Yt && typeof r != "string" && Tt(r);
805
+ if (p) {
806
+ const M = H ? H(r) : r.nodeName;
807
+ if (typeof M == "string") {
808
+ const v = y(M);
809
+ if (!h[v] || dt[v])
810
+ throw J("root node is forbidden and cannot be sanitized in-place");
811
+ }
812
+ if (Ct(r))
813
+ throw J("root node is clobbered and cannot be sanitized in-place");
814
+ try {
815
+ Qt(r);
816
+ } catch (v) {
817
+ throw Me(r), v;
645
818
  }
646
- if (Mt(a))
647
- throw ht("root node is clobbered and cannot be sanitized in-place");
648
- tt(a);
649
- } else if (vt(a))
650
- n = Ae("<!---->"), o = n.ownerDocument.importNode(a, !0), o.nodeType === F.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? n = o : n.appendChild(o), tt(o);
819
+ } else if (Tt(r))
820
+ e = ve("<!---->"), i = e.ownerDocument.importNode(r, !0), i.nodeType === k.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? e = i : e.appendChild(i), Qt(i);
651
821
  else {
652
- if (!K && !W && !Y && // eslint-disable-next-line unicorn/prefer-includes
653
- a.indexOf("<") === -1)
654
- return O && Dt ? O.createHTML(a) : a;
655
- if (n = Ae(a), !n)
656
- return K ? null : Dt ? lt : "";
822
+ if (!et && !B && !K && // eslint-disable-next-line unicorn/prefer-includes
823
+ r.indexOf("<") === -1)
824
+ return L && It ? tt(r) : r;
825
+ if (e = ve(r), !e)
826
+ return et ? null : It ? q : "";
657
827
  }
658
- n && Wt && M(n.firstChild);
659
- const p = Ee(ut ? a : n);
660
- for (; u = p.nextNode(); )
661
- be(u), we(u), pt(u.content) && xt(u.content);
662
- if (ut)
663
- return W && Se(a), a;
664
- if (K) {
665
- if (W && Se(n), Nt)
666
- for (f = Ze.call(n.ownerDocument); n.firstChild; )
667
- f.appendChild(n.firstChild);
828
+ e && Bt && W(e.firstChild);
829
+ const S = xe(p ? r : e);
830
+ try {
831
+ for (; a = S.nextNode(); )
832
+ Pe(a), Ue(a), rt(a.content) && Mt(a.content);
833
+ } catch (M) {
834
+ throw p && Me(r), M;
835
+ }
836
+ if (p)
837
+ return yt(n.removed, (M) => {
838
+ M.element && Ln(M.element);
839
+ }), B && Jt(r), r;
840
+ if (et) {
841
+ if (B && Jt(e), Rt)
842
+ for (u = ln.call(e.ownerDocument); e.firstChild; )
843
+ u.appendChild(e.firstChild);
668
844
  else
669
- f = n;
670
- return (y.shadowroot || y.shadowrootmode) && (f = Qe.call(s, f, !0)), f;
845
+ u = e;
846
+ return (_.shadowroot || _.shadowrootmode) && (u = fn.call(c, u, !0)), u;
671
847
  }
672
- let D = Y ? n.outerHTML : n.innerHTML;
673
- return Y && _["!doctype"] && n.ownerDocument && n.ownerDocument.doctype && n.ownerDocument.doctype.name && b(Bn, n.ownerDocument.doctype.name) && (D = "<!DOCTYPE " + n.ownerDocument.doctype.name + `>
674
- ` + D), W && et([Rt, Ot, wt], (k) => {
675
- D = it(D, k, " ");
676
- }), O && Dt ? O.createHTML(D) : D;
677
- }, e.setConfig = function() {
678
- let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
679
- Kt(a), Gt = !0;
680
- }, e.clearConfig = function() {
681
- Q = null, Gt = !1;
682
- }, e.isValidAttribute = function(a, t, n) {
683
- Q || Kt({});
684
- const o = T(a), u = T(t);
685
- return Re(o, u, n);
686
- }, e.addHook = function(a, t) {
687
- typeof t == "function" && nt(E[a], t);
688
- }, e.removeHook = function(a, t) {
689
- if (t !== void 0) {
690
- const n = On(E[a], t);
691
- return n === -1 ? void 0 : wn(E[a], n, 1)[0];
848
+ let E = K ? e.outerHTML : e.innerHTML;
849
+ return K && h["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && w(mo, e.ownerDocument.doctype.name) && (E = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
850
+ ` + E), B && (E = Dt(E)), L && It ? tt(E) : E;
851
+ }, n.setConfig = function() {
852
+ let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
853
+ Zt(r), Ft = !0, Ht = h, Gt = _;
854
+ }, n.clearConfig = function() {
855
+ it = null, Ft = !1, Ht = null, Gt = null, L = kt, q = "";
856
+ }, n.isValidAttribute = function(r, t, e) {
857
+ it || Zt({});
858
+ const i = y(r), a = y(t);
859
+ return ke(i, a, e);
860
+ }, n.addHook = function(r, t) {
861
+ typeof t == "function" && b(g, r) && st(g[r], t);
862
+ }, n.removeHook = function(r, t) {
863
+ if (b(g, r)) {
864
+ if (t !== void 0) {
865
+ const e = qn(g[r], t);
866
+ return e === -1 ? void 0 : Kn(g[r], e, 1)[0];
867
+ }
868
+ return We(g[r]);
692
869
  }
693
- return ve(E[a]);
694
- }, e.removeHooks = function(a) {
695
- E[a] = [];
696
- }, e.removeAllHooks = function() {
697
- E = Be();
698
- }, e;
870
+ }, n.removeHooks = function(r) {
871
+ b(g, r) && (g[r] = []);
872
+ }, n.removeAllHooks = function() {
873
+ g = tn();
874
+ }, n;
699
875
  }
700
- var Xn = Ye();
701
- const gt = /* @__PURE__ */ new Map();
702
- async function Vn(i) {
703
- const e = await fetch(i);
704
- if (!e.ok)
705
- throw new Error(`Failed to load icon: ${e.status}`);
706
- const r = await e.text(), s = Xn.sanitize(r, {
876
+ var Ao = on();
877
+ const St = /* @__PURE__ */ new Map();
878
+ async function So(o) {
879
+ const n = await fetch(o);
880
+ if (!n.ok)
881
+ throw new Error(`Failed to load icon: ${n.status}`);
882
+ const s = await n.text(), c = Ao.sanitize(s, {
707
883
  USE_PROFILES: { svg: !0, svgFilters: !0 },
708
884
  FORBID_TAGS: ["script", "use"],
709
885
  // <use> can SSRF to external hrefs
710
886
  FORBID_ATTR: ["onload", "onerror", "onbegin", "href", "xlink:href"]
711
- }), d = new DOMParser().parseFromString(s, "image/svg+xml").documentElement;
887
+ }), d = new DOMParser().parseFromString(c, "image/svg+xml").documentElement;
712
888
  if (!(d instanceof SVGElement))
713
- throw new Error(`Invalid SVG from ${i}`);
889
+ throw new Error(`Invalid SVG from ${o}`);
714
890
  return d;
715
891
  }
716
- async function qn(i) {
717
- return gt.has(i) || gt.set(i, Vn(i)), (await gt.get(i)).cloneNode(!0);
892
+ async function bo(o) {
893
+ return St.has(o) || St.set(o, So(o)), (await St.get(o)).cloneNode(!0);
718
894
  }
719
- function ii(i) {
720
- i ? gt.delete(i) : gt.clear();
895
+ function Co(o) {
896
+ o ? St.delete(o) : St.clear();
721
897
  }
722
- const Kn = ":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)}";
723
- var Zn = Object.defineProperty, j = (i, e, r, s) => {
724
- for (var l = void 0, m = i.length - 1, d; m >= 0; m--)
725
- (d = i[m]) && (l = d(e, r, l) || l);
726
- return l && Zn(e, r, l), l;
727
- }, B;
728
- const H = (B = class extends mn {
898
+ const wo = ":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)}";
899
+ var Oo = Object.defineProperty, X = (o, n, s, c) => {
900
+ for (var l = void 0, m = o.length - 1, d; m >= 0; m--)
901
+ (d = o[m]) && (l = d(n, s, l) || l);
902
+ return l && Oo(n, s, l), l;
903
+ }, $;
904
+ const F = ($ = class extends Pn {
729
905
  constructor() {
730
906
  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;
731
907
  }
732
908
  /** Resolves when the current icon load (if any) is complete. */
733
909
  get updateComplete() {
734
910
  return (async () => {
735
- const e = await super.updateComplete;
736
- return await this._loadPromise, e;
911
+ const n = await super.updateComplete;
912
+ return await this._loadPromise, n;
737
913
  })();
738
914
  }
739
915
  connectedCallback() {
740
- super.connectedCallback(), De(this.library, this);
916
+ super.connectedCallback(), Fe(this.library, this);
741
917
  }
742
918
  disconnectedCallback() {
743
- super.disconnectedCallback(), Le(this.library, this);
919
+ super.disconnectedCallback(), He(this.library, this);
744
920
  }
745
921
  /** Called by the icon library registry when the current library changes. */
746
922
  redraw() {
@@ -756,79 +932,79 @@ const H = (B = class extends mn {
756
932
  firstUpdated() {
757
933
  this._loadIcon();
758
934
  }
759
- updated(e) {
760
- if (e.has("name") && !B._validName.test(this.name)) {
935
+ updated(n) {
936
+ if (n.has("name") && !$._validName.test(this.name)) {
761
937
  console.warn(`nys-icon: invalid name "${this.name}" — ignored`), this._svg = null;
762
938
  return;
763
939
  }
764
- if (e.has("name") || e.has("library")) {
765
- if (e.has("library")) {
766
- const r = e.get("library");
767
- r && Le(r, this), De(this.library, this);
940
+ if (n.has("name") || n.has("library")) {
941
+ if (n.has("library")) {
942
+ const s = n.get("library");
943
+ s && He(s, this), Fe(this.library, this);
768
944
  }
769
945
  this._loadIcon();
770
946
  }
771
- this._svg && (e.has("ariaLabel") || e.has("rotate") || e.has("flip") || e.has("color") || e.has("size")) && this._applyAttributes(this._svg);
947
+ this._svg && (n.has("ariaLabel") || n.has("rotate") || n.has("flip") || n.has("color") || n.has("size")) && this._applyAttributes(this._svg);
772
948
  }
773
949
  _loadIcon() {
774
- const e = ++this._loadSeq;
950
+ const n = ++this._loadSeq;
775
951
  this._loadPromise = (async () => {
776
- const r = _n(this.library);
777
- if (!r || !this.name) {
952
+ const s = Hn(this.library);
953
+ if (!s || !this.name) {
778
954
  this._svg = null;
779
955
  return;
780
956
  }
781
- const s = r.resolver(this.name);
782
- if (!s) {
957
+ const c = s.resolver(this.name);
958
+ if (!c) {
783
959
  this._svg = null;
784
960
  return;
785
961
  }
786
962
  try {
787
- const l = await qn(s);
788
- if (e !== this._loadSeq) return;
789
- r.mutator?.(l), this._applyAttributes(l), this._svg = l;
963
+ const l = await bo(c);
964
+ if (n !== this._loadSeq) return;
965
+ s.mutator?.(l), this._applyAttributes(l), this._svg = l;
790
966
  } catch {
791
- e === this._loadSeq && (this._svg = null);
967
+ n === this._loadSeq && (this._svg = null);
792
968
  }
793
969
  })();
794
970
  }
795
- _applyAttributes(e) {
796
- e.setAttribute("role", "img"), this.ariaLabel ? (e.setAttribute("aria-label", this.ariaLabel), e.removeAttribute("aria-hidden")) : (e.setAttribute("aria-hidden", "true"), e.removeAttribute("aria-label")), e.style.rotate = `${this.rotate}deg`, e.style.color = this.color || "currentcolor", e.classList.add(`nys-icon--${this.size}`), e.classList.add("nys-icon--svg"), this.flip && e.classList.add(`nys-icon--flip-${this.flip}`);
971
+ _applyAttributes(n) {
972
+ 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")), n.style.rotate = `${this.rotate}deg`, 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}`);
797
973
  }
798
974
  render() {
799
- return this._svg ? dn`${this._svg}` : null;
975
+ return this._svg ? zn`${this._svg}` : null;
800
976
  }
801
- }, B.styles = pn(Kn), B._validName = /^[a-zA-Z0-9_-]+$/, B);
802
- j([
803
- V({ type: String, reflect: !0 })
804
- ], H.prototype, "name");
805
- j([
806
- V({ type: String, reflect: !0 })
807
- ], H.prototype, "library");
808
- j([
809
- V({ type: String })
810
- ], H.prototype, "ariaLabel");
811
- j([
812
- V({ type: String })
813
- ], H.prototype, "rotate");
814
- j([
815
- V({ type: String })
816
- ], H.prototype, "flip");
817
- j([
818
- V({ type: String })
819
- ], H.prototype, "color");
820
- j([
821
- V({ type: String })
822
- ], H.prototype, "size");
823
- j([
824
- hn()
825
- ], H.prototype, "_svg");
826
- let Jn = H;
827
- customElements.get("nys-icon") || customElements.define("nys-icon", Jn);
977
+ }, $.styles = kn(wo), $._validName = /^[a-zA-Z0-9_-]+$/, $);
978
+ X([
979
+ Q({ type: String, reflect: !0 })
980
+ ], F.prototype, "name");
981
+ X([
982
+ Q({ type: String, reflect: !0 })
983
+ ], F.prototype, "library");
984
+ X([
985
+ Q({ type: String })
986
+ ], F.prototype, "ariaLabel");
987
+ X([
988
+ Q({ type: String })
989
+ ], F.prototype, "rotate");
990
+ X([
991
+ Q({ type: String })
992
+ ], F.prototype, "flip");
993
+ X([
994
+ Q({ type: String })
995
+ ], F.prototype, "color");
996
+ X([
997
+ Q({ type: String })
998
+ ], F.prototype, "size");
999
+ X([
1000
+ Un()
1001
+ ], F.prototype, "_svg");
1002
+ let Ro = F;
1003
+ customElements.get("nys-icon") || customElements.define("nys-icon", Ro);
828
1004
  export {
829
- Jn as NysIcon,
830
- ii as clearIconCache,
831
- ei as registerIconLibrary,
832
- ni as unregisterIconLibrary
1005
+ Ro as NysIcon,
1006
+ Co as clearIconCache,
1007
+ Lo as registerIconLibrary,
1008
+ Do as unregisterIconLibrary
833
1009
  };
834
1010
  //# sourceMappingURL=nys-icon.js.map