@idmui/spot 1.1.3 → 1.1.4

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.
@@ -1,18 +1,18 @@
1
- /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
1
+ /*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
2
2
  const {
3
- entries: Tt,
4
- setPrototypeOf: rt,
5
- isFrozen: Bt,
6
- getPrototypeOf: Yt,
7
- getOwnPropertyDescriptor: Xt
3
+ entries: dt,
4
+ setPrototypeOf: at,
5
+ isFrozen: Wt,
6
+ getPrototypeOf: Bt,
7
+ getOwnPropertyDescriptor: Yt
8
8
  } = Object;
9
9
  let {
10
10
  freeze: S,
11
11
  seal: O,
12
- create: _t
12
+ create: Tt
13
13
  } = Object, {
14
- apply: we,
15
- construct: xe
14
+ apply: Ce,
15
+ construct: we
16
16
  } = typeof Reflect < "u" && Reflect;
17
17
  S || (S = function(o) {
18
18
  return o;
@@ -20,90 +20,89 @@ S || (S = function(o) {
20
20
  O || (O = function(o) {
21
21
  return o;
22
22
  });
23
- we || (we = function(o, l, s) {
23
+ Ce || (Ce = function(o, l, s) {
24
24
  return o.apply(l, s);
25
25
  });
26
- xe || (xe = function(o, l) {
26
+ we || (we = function(o, l) {
27
27
  return new o(...l);
28
28
  });
29
- const le = R(Array.prototype.forEach), jt = R(Array.prototype.lastIndexOf), st = R(Array.prototype.pop), $ = R(Array.prototype.push), Vt = R(Array.prototype.splice), fe = R(String.prototype.toLowerCase), Ne = R(String.prototype.toString), lt = R(String.prototype.match), q = R(String.prototype.replace), $t = R(String.prototype.indexOf), qt = R(String.prototype.trim), L = R(Object.prototype.hasOwnProperty), A = R(RegExp.prototype.test), K = Kt(TypeError);
29
+ const se = R(Array.prototype.forEach), Xt = R(Array.prototype.lastIndexOf), rt = R(Array.prototype.pop), V = R(Array.prototype.push), jt = R(Array.prototype.splice), ce = R(String.prototype.toLowerCase), Ne = R(String.prototype.toString), st = R(String.prototype.match), $ = R(String.prototype.replace), Vt = R(String.prototype.indexOf), $t = R(String.prototype.trim), L = R(Object.prototype.hasOwnProperty), A = R(RegExp.prototype.test), q = qt(TypeError);
30
30
  function R(r) {
31
31
  return function(o) {
32
- o instanceof RegExp && (o.lastIndex = 0);
33
32
  for (var l = arguments.length, s = new Array(l > 1 ? l - 1 : 0), T = 1; T < l; T++)
34
33
  s[T - 1] = arguments[T];
35
- return we(r, o, s);
34
+ return Ce(r, o, s);
36
35
  };
37
36
  }
38
- function Kt(r) {
37
+ function qt(r) {
39
38
  return function() {
40
39
  for (var o = arguments.length, l = new Array(o), s = 0; s < o; s++)
41
40
  l[s] = arguments[s];
42
- return xe(r, l);
41
+ return we(r, l);
43
42
  };
44
43
  }
45
44
  function a(r, o) {
46
- let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : fe;
47
- rt && rt(r, null);
45
+ let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ce;
46
+ at && at(r, null);
48
47
  let s = o.length;
49
48
  for (; s--; ) {
50
49
  let T = o[s];
51
50
  if (typeof T == "string") {
52
- const N = l(T);
53
- N !== T && (Bt(o) || (o[s] = N), T = N);
51
+ const b = l(T);
52
+ b !== T && (Wt(o) || (o[s] = b), T = b);
54
53
  }
55
54
  r[T] = !0;
56
55
  }
57
56
  return r;
58
57
  }
59
- function Zt(r) {
58
+ function Kt(r) {
60
59
  for (let o = 0; o < r.length; o++)
61
60
  L(r, o) || (r[o] = null);
62
61
  return r;
63
62
  }
64
- function C(r) {
65
- const o = _t(null);
66
- for (const [l, s] of Tt(r))
67
- L(r, l) && (Array.isArray(s) ? o[l] = Zt(s) : s && typeof s == "object" && s.constructor === Object ? o[l] = C(s) : o[l] = s);
63
+ function w(r) {
64
+ const o = Tt(null);
65
+ for (const [l, s] of dt(r))
66
+ L(r, l) && (Array.isArray(s) ? o[l] = Kt(s) : s && typeof s == "object" && s.constructor === Object ? o[l] = w(s) : o[l] = s);
68
67
  return o;
69
68
  }
70
- function Z(r, o) {
69
+ function K(r, o) {
71
70
  for (; r !== null; ) {
72
- const s = Xt(r, o);
71
+ const s = Yt(r, o);
73
72
  if (s) {
74
73
  if (s.get)
75
74
  return R(s.get);
76
75
  if (typeof s.value == "function")
77
76
  return R(s.value);
78
77
  }
79
- r = Yt(r);
78
+ r = Bt(r);
80
79
  }
81
80
  function l() {
82
81
  return null;
83
82
  }
84
83
  return l;
85
84
  }
86
- const ct = S(["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", "section", "select", "shadow", "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"]), be = S(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ie = S(["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"]), Jt = S(["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"]), Me = S(["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"]), Qt = S(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ft = S(["#text"]), ut = S(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "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", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Ce = S(["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", "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"]), mt = S(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), ce = S(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), en = O(/\{\{[\w\W]*|[\w\W]*\}\}/gm), tn = O(/<%[\w\W]*|[\w\W]*%>/gm), nn = O(/\$\{[\w\W]*/gm), on = O(/^data-[\-\w.\u00B7-\uFFFF]+$/), an = O(/^aria-[\-\w]+$/), Et = O(
87
- /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
85
+ const lt = S(["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", "section", "select", "shadow", "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"]), De = S(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), be = S(["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"]), Zt = S(["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 = S(["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"]), Jt = S(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ct = S(["#text"]), ft = S(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "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", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Me = S(["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", "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"]), ut = S(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), le = S(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Qt = O(/\{\{[\w\W]*|[\w\W]*\}\}/gm), en = O(/<%[\w\W]*|[\w\W]*%>/gm), tn = O(/\$\{[\w\W]*/gm), nn = O(/^data-[\-\w.\u00B7-\uFFFF]+$/), on = O(/^aria-[\-\w]+$/), _t = O(
86
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
88
87
  // eslint-disable-line no-useless-escape
89
- ), rn = O(/^(?:\w+script|data):/i), sn = O(
88
+ ), an = O(/^(?:\w+script|data):/i), rn = O(
90
89
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
91
90
  // eslint-disable-line no-control-regex
92
- ), gt = O(/^html$/i), ln = O(/^[a-z][.\w]*(-[.\w]+)+$/i);
93
- var pt = /* @__PURE__ */ Object.freeze({
91
+ ), Et = O(/^html$/i), sn = O(/^[a-z][.\w]*(-[.\w]+)+$/i);
92
+ var mt = /* @__PURE__ */ Object.freeze({
94
93
  __proto__: null,
95
- ARIA_ATTR: an,
96
- ATTR_WHITESPACE: sn,
97
- CUSTOM_ELEMENT: ln,
98
- DATA_ATTR: on,
99
- DOCTYPE_NAME: gt,
100
- ERB_EXPR: tn,
101
- IS_ALLOWED_URI: Et,
102
- IS_SCRIPT_OR_DATA: rn,
103
- MUSTACHE_EXPR: en,
104
- TMPLIT_EXPR: nn
94
+ ARIA_ATTR: on,
95
+ ATTR_WHITESPACE: rn,
96
+ CUSTOM_ELEMENT: sn,
97
+ DATA_ATTR: nn,
98
+ DOCTYPE_NAME: Et,
99
+ ERB_EXPR: en,
100
+ IS_ALLOWED_URI: _t,
101
+ IS_SCRIPT_OR_DATA: an,
102
+ MUSTACHE_EXPR: Qt,
103
+ TMPLIT_EXPR: tn
105
104
  });
106
- const J = {
105
+ const Z = {
107
106
  element: 1,
108
107
  attribute: 2,
109
108
  text: 3,
@@ -119,17 +118,17 @@ const J = {
119
118
  documentFragment: 11,
120
119
  notation: 12
121
120
  // Deprecated
122
- }, cn = function() {
121
+ }, ln = function() {
123
122
  return typeof window > "u" ? null : window;
124
- }, fn = function(o, l) {
123
+ }, cn = function(o, l) {
125
124
  if (typeof o != "object" || typeof o.createPolicy != "function")
126
125
  return null;
127
126
  let s = null;
128
127
  const T = "data-tt-policy-suffix";
129
128
  l && l.hasAttribute(T) && (s = l.getAttribute(T));
130
- const N = "dompurify" + (s ? "#" + s : "");
129
+ const b = "dompurify" + (s ? "#" + s : "");
131
130
  try {
132
- return o.createPolicy(N, {
131
+ return o.createPolicy(b, {
133
132
  createHTML(x) {
134
133
  return x;
135
134
  },
@@ -138,9 +137,9 @@ const J = {
138
137
  }
139
138
  });
140
139
  } catch {
141
- return console.warn("TrustedTypes policy " + N + " could not be created."), null;
140
+ return console.warn("TrustedTypes policy " + b + " could not be created."), null;
142
141
  }
143
- }, dt = function() {
142
+ }, pt = function() {
144
143
  return {
145
144
  afterSanitizeAttributes: [],
146
145
  afterSanitizeElements: [],
@@ -153,57 +152,57 @@ const J = {
153
152
  uponSanitizeShadowNode: []
154
153
  };
155
154
  };
156
- function ht() {
157
- let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : cn();
158
- const o = (i) => ht(i);
159
- if (o.version = "3.2.6", o.removed = [], !r || !r.document || r.document.nodeType !== J.document || !r.Element)
155
+ function gt() {
156
+ let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ln();
157
+ const o = (i) => gt(i);
158
+ if (o.version = "3.2.4", o.removed = [], !r || !r.document || r.document.nodeType !== Z.document || !r.Element)
160
159
  return o.isSupported = !1, o;
161
160
  let {
162
161
  document: l
163
162
  } = r;
164
163
  const s = l, T = s.currentScript, {
165
- DocumentFragment: N,
164
+ DocumentFragment: b,
166
165
  HTMLTemplateElement: x,
167
- Node: ue,
168
- Element: Pe,
169
- NodeFilter: G,
170
- NamedNodeMap: At = r.NamedNodeMap || r.MozNamedAttrMap,
171
- HTMLFormElement: St,
172
- DOMParser: Rt,
173
- trustedTypes: Q
174
- } = r, W = Pe.prototype, yt = Z(W, "cloneNode"), Ot = Z(W, "remove"), Lt = Z(W, "nextSibling"), Dt = Z(W, "childNodes"), ee = Z(W, "parentNode");
166
+ Node: fe,
167
+ Element: xe,
168
+ NodeFilter: z,
169
+ NamedNodeMap: ht = r.NamedNodeMap || r.MozNamedAttrMap,
170
+ HTMLFormElement: At,
171
+ DOMParser: St,
172
+ trustedTypes: J
173
+ } = r, G = xe.prototype, Rt = K(G, "cloneNode"), yt = K(G, "remove"), Ot = K(G, "nextSibling"), Lt = K(G, "childNodes"), Q = K(G, "parentNode");
175
174
  if (typeof x == "function") {
176
175
  const i = l.createElement("template");
177
176
  i.content && i.content.ownerDocument && (l = i.content.ownerDocument);
178
177
  }
179
- let g, B = "";
178
+ let E, W = "";
180
179
  const {
181
- implementation: me,
180
+ implementation: ue,
182
181
  createNodeIterator: Nt,
183
- createDocumentFragment: bt,
184
- getElementsByTagName: It
182
+ createDocumentFragment: Dt,
183
+ getElementsByTagName: bt
185
184
  } = l, {
186
- importNode: Mt
185
+ importNode: It
187
186
  } = s;
188
- let h = dt();
189
- o.isSupported = typeof Tt == "function" && typeof ee == "function" && me && me.createHTMLDocument !== void 0;
187
+ let g = pt();
188
+ o.isSupported = typeof dt == "function" && typeof Q == "function" && ue && ue.createHTMLDocument !== void 0;
190
189
  const {
191
- MUSTACHE_EXPR: pe,
192
- ERB_EXPR: de,
193
- TMPLIT_EXPR: Te,
194
- DATA_ATTR: Ct,
195
- ARIA_ATTR: wt,
196
- IS_SCRIPT_OR_DATA: xt,
197
- ATTR_WHITESPACE: ve,
198
- CUSTOM_ELEMENT: Pt
199
- } = pt;
190
+ MUSTACHE_EXPR: me,
191
+ ERB_EXPR: pe,
192
+ TMPLIT_EXPR: de,
193
+ DATA_ATTR: Mt,
194
+ ARIA_ATTR: Ct,
195
+ IS_SCRIPT_OR_DATA: wt,
196
+ ATTR_WHITESPACE: Pe,
197
+ CUSTOM_ELEMENT: xt
198
+ } = mt;
200
199
  let {
201
- IS_ALLOWED_URI: ke
202
- } = pt, m = null;
203
- const Ue = a({}, [...ct, ...be, ...Ie, ...Me, ...ft]);
204
- let d = null;
205
- const Fe = a({}, [...ut, ...Ce, ...mt, ...ce]);
206
- let f = Object.seal(_t(null, {
200
+ IS_ALLOWED_URI: ve
201
+ } = mt, u = null;
202
+ const ke = a({}, [...lt, ...De, ...be, ...Ie, ...ct]);
203
+ let p = null;
204
+ const Ue = a({}, [...ft, ...Me, ...ut, ...le]);
205
+ let f = Object.seal(Tt(null, {
207
206
  tagNameCheck: {
208
207
  writable: !0,
209
208
  configurable: !1,
@@ -222,70 +221,70 @@ function ht() {
222
221
  enumerable: !0,
223
222
  value: !1
224
223
  }
225
- })), Y = null, _e = null, He = !0, Ee = !0, ze = !1, Ge = !0, P = !1, te = !0, w = !1, ge = !1, he = !1, v = !1, ne = !1, oe = !1, We = !0, Be = !1;
226
- const vt = "user-content-";
227
- let Ae = !0, X = !1, k = {}, U = null;
228
- const Ye = a({}, ["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"]);
229
- let Xe = null;
230
- const je = a({}, ["audio", "video", "img", "source", "image", "track"]);
224
+ })), B = null, Te = null, Fe = !0, _e = !0, He = !1, ze = !0, P = !1, Ee = !0, C = !1, ge = !1, he = !1, v = !1, ee = !1, te = !1, Ge = !0, We = !1;
225
+ const Pt = "user-content-";
226
+ let Ae = !0, Y = !1, k = {}, U = null;
227
+ const Be = a({}, ["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"]);
228
+ let Ye = null;
229
+ const Xe = a({}, ["audio", "video", "img", "source", "image", "track"]);
231
230
  let Se = null;
232
- const Ve = a({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ie = "http://www.w3.org/1998/Math/MathML", ae = "http://www.w3.org/2000/svg", b = "http://www.w3.org/1999/xhtml";
233
- let F = b, Re = !1, ye = null;
234
- const kt = a({}, [ie, ae, b], Ne);
235
- let re = a({}, ["mi", "mo", "mn", "ms", "mtext"]), se = a({}, ["annotation-xml"]);
236
- const Ut = a({}, ["title", "style", "font", "a", "script"]);
237
- let j = null;
238
- const Ft = ["application/xhtml+xml", "text/html"], Ht = "text/html";
239
- let p = null, H = null;
240
- const zt = l.createElement("form"), $e = function(e) {
231
+ const je = a({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ne = "http://www.w3.org/1998/Math/MathML", oe = "http://www.w3.org/2000/svg", I = "http://www.w3.org/1999/xhtml";
232
+ let F = I, Re = !1, ye = null;
233
+ const vt = a({}, [ne, oe, I], Ne);
234
+ let ie = a({}, ["mi", "mo", "mn", "ms", "mtext"]), ae = a({}, ["annotation-xml"]);
235
+ const kt = a({}, ["title", "style", "font", "a", "script"]);
236
+ let X = null;
237
+ const Ut = ["application/xhtml+xml", "text/html"], Ft = "text/html";
238
+ let m = null, H = null;
239
+ const Ht = l.createElement("form"), Ve = function(e) {
241
240
  return e instanceof RegExp || e instanceof Function;
242
241
  }, Oe = function() {
243
242
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
244
243
  if (!(H && H === e)) {
245
- if ((!e || typeof e != "object") && (e = {}), e = C(e), j = // eslint-disable-next-line unicorn/prefer-includes
246
- Ft.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? Ht : e.PARSER_MEDIA_TYPE, p = j === "application/xhtml+xml" ? Ne : fe, m = L(e, "ALLOWED_TAGS") ? a({}, e.ALLOWED_TAGS, p) : Ue, d = L(e, "ALLOWED_ATTR") ? a({}, e.ALLOWED_ATTR, p) : Fe, ye = L(e, "ALLOWED_NAMESPACES") ? a({}, e.ALLOWED_NAMESPACES, Ne) : kt, Se = L(e, "ADD_URI_SAFE_ATTR") ? a(C(Ve), e.ADD_URI_SAFE_ATTR, p) : Ve, Xe = L(e, "ADD_DATA_URI_TAGS") ? a(C(je), e.ADD_DATA_URI_TAGS, p) : je, U = L(e, "FORBID_CONTENTS") ? a({}, e.FORBID_CONTENTS, p) : Ye, Y = L(e, "FORBID_TAGS") ? a({}, e.FORBID_TAGS, p) : C({}), _e = L(e, "FORBID_ATTR") ? a({}, e.FORBID_ATTR, p) : C({}), k = L(e, "USE_PROFILES") ? e.USE_PROFILES : !1, He = e.ALLOW_ARIA_ATTR !== !1, Ee = e.ALLOW_DATA_ATTR !== !1, ze = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ge = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, P = e.SAFE_FOR_TEMPLATES || !1, te = e.SAFE_FOR_XML !== !1, w = e.WHOLE_DOCUMENT || !1, v = e.RETURN_DOM || !1, ne = e.RETURN_DOM_FRAGMENT || !1, oe = e.RETURN_TRUSTED_TYPE || !1, he = e.FORCE_BODY || !1, We = e.SANITIZE_DOM !== !1, Be = e.SANITIZE_NAMED_PROPS || !1, Ae = e.KEEP_CONTENT !== !1, X = e.IN_PLACE || !1, ke = e.ALLOWED_URI_REGEXP || Et, F = e.NAMESPACE || b, re = e.MATHML_TEXT_INTEGRATION_POINTS || re, se = e.HTML_INTEGRATION_POINTS || se, f = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && $e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (f.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && $e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (f.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (f.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), P && (Ee = !1), ne && (v = !0), k && (m = a({}, ft), d = [], k.html === !0 && (a(m, ct), a(d, ut)), k.svg === !0 && (a(m, be), a(d, Ce), a(d, ce)), k.svgFilters === !0 && (a(m, Ie), a(d, Ce), a(d, ce)), k.mathMl === !0 && (a(m, Me), a(d, mt), a(d, ce))), e.ADD_TAGS && (m === Ue && (m = C(m)), a(m, e.ADD_TAGS, p)), e.ADD_ATTR && (d === Fe && (d = C(d)), a(d, e.ADD_ATTR, p)), e.ADD_URI_SAFE_ATTR && a(Se, e.ADD_URI_SAFE_ATTR, p), e.FORBID_CONTENTS && (U === Ye && (U = C(U)), a(U, e.FORBID_CONTENTS, p)), Ae && (m["#text"] = !0), w && a(m, ["html", "head", "body"]), m.table && (a(m, ["tbody"]), delete Y.tbody), e.TRUSTED_TYPES_POLICY) {
244
+ if ((!e || typeof e != "object") && (e = {}), e = w(e), X = // eslint-disable-next-line unicorn/prefer-includes
245
+ Ut.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? Ft : e.PARSER_MEDIA_TYPE, m = X === "application/xhtml+xml" ? Ne : ce, u = L(e, "ALLOWED_TAGS") ? a({}, e.ALLOWED_TAGS, m) : ke, p = L(e, "ALLOWED_ATTR") ? a({}, e.ALLOWED_ATTR, m) : Ue, ye = L(e, "ALLOWED_NAMESPACES") ? a({}, e.ALLOWED_NAMESPACES, Ne) : vt, Se = L(e, "ADD_URI_SAFE_ATTR") ? a(w(je), e.ADD_URI_SAFE_ATTR, m) : je, Ye = L(e, "ADD_DATA_URI_TAGS") ? a(w(Xe), e.ADD_DATA_URI_TAGS, m) : Xe, U = L(e, "FORBID_CONTENTS") ? a({}, e.FORBID_CONTENTS, m) : Be, B = L(e, "FORBID_TAGS") ? a({}, e.FORBID_TAGS, m) : {}, Te = L(e, "FORBID_ATTR") ? a({}, e.FORBID_ATTR, m) : {}, k = L(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Fe = e.ALLOW_ARIA_ATTR !== !1, _e = e.ALLOW_DATA_ATTR !== !1, He = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ze = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, P = e.SAFE_FOR_TEMPLATES || !1, Ee = e.SAFE_FOR_XML !== !1, C = e.WHOLE_DOCUMENT || !1, v = e.RETURN_DOM || !1, ee = e.RETURN_DOM_FRAGMENT || !1, te = e.RETURN_TRUSTED_TYPE || !1, he = e.FORCE_BODY || !1, Ge = e.SANITIZE_DOM !== !1, We = e.SANITIZE_NAMED_PROPS || !1, Ae = e.KEEP_CONTENT !== !1, Y = e.IN_PLACE || !1, ve = e.ALLOWED_URI_REGEXP || _t, F = e.NAMESPACE || I, ie = e.MATHML_TEXT_INTEGRATION_POINTS || ie, ae = e.HTML_INTEGRATION_POINTS || ae, f = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Ve(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (f.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Ve(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (f.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (f.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), P && (_e = !1), ee && (v = !0), k && (u = a({}, ct), p = [], k.html === !0 && (a(u, lt), a(p, ft)), k.svg === !0 && (a(u, De), a(p, Me), a(p, le)), k.svgFilters === !0 && (a(u, be), a(p, Me), a(p, le)), k.mathMl === !0 && (a(u, Ie), a(p, ut), a(p, le))), e.ADD_TAGS && (u === ke && (u = w(u)), a(u, e.ADD_TAGS, m)), e.ADD_ATTR && (p === Ue && (p = w(p)), a(p, e.ADD_ATTR, m)), e.ADD_URI_SAFE_ATTR && a(Se, e.ADD_URI_SAFE_ATTR, m), e.FORBID_CONTENTS && (U === Be && (U = w(U)), a(U, e.FORBID_CONTENTS, m)), Ae && (u["#text"] = !0), C && a(u, ["html", "head", "body"]), u.table && (a(u, ["tbody"]), delete B.tbody), e.TRUSTED_TYPES_POLICY) {
247
246
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
248
- throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
247
+ throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
249
248
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
250
- throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
251
- g = e.TRUSTED_TYPES_POLICY, B = g.createHTML("");
249
+ throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
250
+ E = e.TRUSTED_TYPES_POLICY, W = E.createHTML("");
252
251
  } else
253
- g === void 0 && (g = fn(Q, T)), g !== null && typeof B == "string" && (B = g.createHTML(""));
252
+ E === void 0 && (E = cn(J, T)), E !== null && typeof W == "string" && (W = E.createHTML(""));
254
253
  S && S(e), H = e;
255
254
  }
256
- }, qe = a({}, [...be, ...Ie, ...Jt]), Ke = a({}, [...Me, ...Qt]), Gt = function(e) {
257
- let t = ee(e);
255
+ }, $e = a({}, [...De, ...be, ...Zt]), qe = a({}, [...Ie, ...Jt]), zt = function(e) {
256
+ let t = Q(e);
258
257
  (!t || !t.tagName) && (t = {
259
258
  namespaceURI: F,
260
259
  tagName: "template"
261
260
  });
262
- const n = fe(e.tagName), c = fe(t.tagName);
263
- return ye[e.namespaceURI] ? e.namespaceURI === ae ? t.namespaceURI === b ? n === "svg" : t.namespaceURI === ie ? n === "svg" && (c === "annotation-xml" || re[c]) : !!qe[n] : e.namespaceURI === ie ? t.namespaceURI === b ? n === "math" : t.namespaceURI === ae ? n === "math" && se[c] : !!Ke[n] : e.namespaceURI === b ? t.namespaceURI === ae && !se[c] || t.namespaceURI === ie && !re[c] ? !1 : !Ke[n] && (Ut[n] || !qe[n]) : !!(j === "application/xhtml+xml" && ye[e.namespaceURI]) : !1;
264
- }, D = function(e) {
265
- $(o.removed, {
261
+ const n = ce(e.tagName), c = ce(t.tagName);
262
+ return ye[e.namespaceURI] ? e.namespaceURI === oe ? t.namespaceURI === I ? n === "svg" : t.namespaceURI === ne ? n === "svg" && (c === "annotation-xml" || ie[c]) : !!$e[n] : e.namespaceURI === ne ? t.namespaceURI === I ? n === "math" : t.namespaceURI === oe ? n === "math" && ae[c] : !!qe[n] : e.namespaceURI === I ? t.namespaceURI === oe && !ae[c] || t.namespaceURI === ne && !ie[c] ? !1 : !qe[n] && (kt[n] || !$e[n]) : !!(X === "application/xhtml+xml" && ye[e.namespaceURI]) : !1;
263
+ }, N = function(e) {
264
+ V(o.removed, {
266
265
  element: e
267
266
  });
268
267
  try {
269
- ee(e).removeChild(e);
268
+ Q(e).removeChild(e);
270
269
  } catch {
271
- Ot(e);
270
+ yt(e);
272
271
  }
273
- }, z = function(e, t) {
272
+ }, re = function(e, t) {
274
273
  try {
275
- $(o.removed, {
274
+ V(o.removed, {
276
275
  attribute: t.getAttributeNode(e),
277
276
  from: t
278
277
  });
279
278
  } catch {
280
- $(o.removed, {
279
+ V(o.removed, {
281
280
  attribute: null,
282
281
  from: t
283
282
  });
284
283
  }
285
284
  if (t.removeAttribute(e), e === "is")
286
- if (v || ne)
285
+ if (v || ee)
287
286
  try {
288
- D(t);
287
+ N(t);
289
288
  } catch {
290
289
  }
291
290
  else
@@ -293,97 +292,97 @@ function ht() {
293
292
  t.setAttribute(e, "");
294
293
  } catch {
295
294
  }
296
- }, Ze = function(e) {
295
+ }, Ke = function(e) {
297
296
  let t = null, n = null;
298
297
  if (he)
299
298
  e = "<remove></remove>" + e;
300
299
  else {
301
- const u = lt(e, /^[\r\n\t ]+/);
302
- n = u && u[0];
300
+ const d = st(e, /^[\r\n\t ]+/);
301
+ n = d && d[0];
303
302
  }
304
- j === "application/xhtml+xml" && F === b && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
305
- const c = g ? g.createHTML(e) : e;
306
- if (F === b)
303
+ X === "application/xhtml+xml" && F === I && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
304
+ const c = E ? E.createHTML(e) : e;
305
+ if (F === I)
307
306
  try {
308
- t = new Rt().parseFromString(c, j);
307
+ t = new St().parseFromString(c, X);
309
308
  } catch {
310
309
  }
311
310
  if (!t || !t.documentElement) {
312
- t = me.createDocument(F, "template", null);
311
+ t = ue.createDocument(F, "template", null);
313
312
  try {
314
- t.documentElement.innerHTML = Re ? B : c;
313
+ t.documentElement.innerHTML = Re ? W : c;
315
314
  } catch {
316
315
  }
317
316
  }
318
317
  const _ = t.body || t.documentElement;
319
- return e && n && _.insertBefore(l.createTextNode(n), _.childNodes[0] || null), F === b ? It.call(t, w ? "html" : "body")[0] : w ? t.documentElement : _;
320
- }, Je = function(e) {
318
+ return e && n && _.insertBefore(l.createTextNode(n), _.childNodes[0] || null), F === I ? bt.call(t, C ? "html" : "body")[0] : C ? t.documentElement : _;
319
+ }, Ze = function(e) {
321
320
  return Nt.call(
322
321
  e.ownerDocument || e,
323
322
  e,
324
323
  // eslint-disable-next-line no-bitwise
325
- G.SHOW_ELEMENT | G.SHOW_COMMENT | G.SHOW_TEXT | G.SHOW_PROCESSING_INSTRUCTION | G.SHOW_CDATA_SECTION,
324
+ z.SHOW_ELEMENT | z.SHOW_COMMENT | z.SHOW_TEXT | z.SHOW_PROCESSING_INSTRUCTION | z.SHOW_CDATA_SECTION,
326
325
  null
327
326
  );
328
327
  }, Le = function(e) {
329
- return e instanceof St && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof At) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
330
- }, Qe = function(e) {
331
- return typeof ue == "function" && e instanceof ue;
328
+ return e instanceof At && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof ht) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
329
+ }, Je = function(e) {
330
+ return typeof fe == "function" && e instanceof fe;
332
331
  };
333
- function I(i, e, t) {
334
- le(i, (n) => {
332
+ function M(i, e, t) {
333
+ se(i, (n) => {
335
334
  n.call(o, e, t, H);
336
335
  });
337
336
  }
338
- const et = function(e) {
337
+ const Qe = function(e) {
339
338
  let t = null;
340
- if (I(h.beforeSanitizeElements, e, null), Le(e))
341
- return D(e), !0;
342
- const n = p(e.nodeName);
343
- if (I(h.uponSanitizeElement, e, {
339
+ if (M(g.beforeSanitizeElements, e, null), Le(e))
340
+ return N(e), !0;
341
+ const n = m(e.nodeName);
342
+ if (M(g.uponSanitizeElement, e, {
344
343
  tagName: n,
345
- allowedTags: m
346
- }), te && e.hasChildNodes() && !Qe(e.firstElementChild) && A(/<[/\w!]/g, e.innerHTML) && A(/<[/\w!]/g, e.textContent) || e.nodeType === J.progressingInstruction || te && e.nodeType === J.comment && A(/<[/\w]/g, e.data))
347
- return D(e), !0;
348
- if (!m[n] || Y[n]) {
349
- if (!Y[n] && nt(n) && (f.tagNameCheck instanceof RegExp && A(f.tagNameCheck, n) || f.tagNameCheck instanceof Function && f.tagNameCheck(n)))
344
+ allowedTags: u
345
+ }), e.hasChildNodes() && !Je(e.firstElementChild) && A(/<[/\w]/g, e.innerHTML) && A(/<[/\w]/g, e.textContent) || e.nodeType === Z.progressingInstruction || Ee && e.nodeType === Z.comment && A(/<[/\w]/g, e.data))
346
+ return N(e), !0;
347
+ if (!u[n] || B[n]) {
348
+ if (!B[n] && tt(n) && (f.tagNameCheck instanceof RegExp && A(f.tagNameCheck, n) || f.tagNameCheck instanceof Function && f.tagNameCheck(n)))
350
349
  return !1;
351
350
  if (Ae && !U[n]) {
352
- const c = ee(e) || e.parentNode, _ = Dt(e) || e.childNodes;
351
+ const c = Q(e) || e.parentNode, _ = Lt(e) || e.childNodes;
353
352
  if (_ && c) {
354
- const u = _.length;
355
- for (let y = u - 1; y >= 0; --y) {
356
- const M = yt(_[y], !0);
357
- M.__removalCount = (e.__removalCount || 0) + 1, c.insertBefore(M, Lt(e));
353
+ const d = _.length;
354
+ for (let y = d - 1; y >= 0; --y) {
355
+ const D = Rt(_[y], !0);
356
+ D.__removalCount = (e.__removalCount || 0) + 1, c.insertBefore(D, Ot(e));
358
357
  }
359
358
  }
360
359
  }
361
- return D(e), !0;
360
+ return N(e), !0;
362
361
  }
363
- return e instanceof Pe && !Gt(e) || (n === "noscript" || n === "noembed" || n === "noframes") && A(/<\/no(script|embed|frames)/i, e.innerHTML) ? (D(e), !0) : (P && e.nodeType === J.text && (t = e.textContent, le([pe, de, Te], (c) => {
364
- t = q(t, c, " ");
365
- }), e.textContent !== t && ($(o.removed, {
362
+ return e instanceof xe && !zt(e) || (n === "noscript" || n === "noembed" || n === "noframes") && A(/<\/no(script|embed|frames)/i, e.innerHTML) ? (N(e), !0) : (P && e.nodeType === Z.text && (t = e.textContent, se([me, pe, de], (c) => {
363
+ t = $(t, c, " ");
364
+ }), e.textContent !== t && (V(o.removed, {
366
365
  element: e.cloneNode()
367
- }), e.textContent = t)), I(h.afterSanitizeElements, e, null), !1);
368
- }, tt = function(e, t, n) {
369
- if (We && (t === "id" || t === "name") && (n in l || n in zt))
366
+ }), e.textContent = t)), M(g.afterSanitizeElements, e, null), !1);
367
+ }, et = function(e, t, n) {
368
+ if (Ge && (t === "id" || t === "name") && (n in l || n in Ht))
370
369
  return !1;
371
- if (!(Ee && !_e[t] && A(Ct, t))) {
372
- if (!(He && A(wt, t))) {
373
- if (!d[t] || _e[t]) {
370
+ if (!(_e && !Te[t] && A(Mt, t))) {
371
+ if (!(Fe && A(Ct, t))) {
372
+ if (!p[t] || Te[t]) {
374
373
  if (
375
374
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
376
375
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
377
376
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
378
- !(nt(e) && (f.tagNameCheck instanceof RegExp && A(f.tagNameCheck, e) || f.tagNameCheck instanceof Function && f.tagNameCheck(e)) && (f.attributeNameCheck instanceof RegExp && A(f.attributeNameCheck, t) || f.attributeNameCheck instanceof Function && f.attributeNameCheck(t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
377
+ !(tt(e) && (f.tagNameCheck instanceof RegExp && A(f.tagNameCheck, e) || f.tagNameCheck instanceof Function && f.tagNameCheck(e)) && (f.attributeNameCheck instanceof RegExp && A(f.attributeNameCheck, t) || f.attributeNameCheck instanceof Function && f.attributeNameCheck(t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
379
378
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
380
379
  t === "is" && f.allowCustomizedBuiltInElements && (f.tagNameCheck instanceof RegExp && A(f.tagNameCheck, n) || f.tagNameCheck instanceof Function && f.tagNameCheck(n)))
381
380
  )
382
381
  return !1;
383
382
  } else if (!Se[t]) {
384
- if (!A(ke, q(n, ve, ""))) {
385
- if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && $t(n, "data:") === 0 && Xe[e])) {
386
- if (!(ze && !A(xt, q(n, ve, "")))) {
383
+ if (!A(ve, $(n, Pe, ""))) {
384
+ if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Vt(n, "data:") === 0 && Ye[e])) {
385
+ if (!(He && !A(wt, $(n, Pe, "")))) {
387
386
  if (n)
388
387
  return !1;
389
388
  }
@@ -393,10 +392,10 @@ function ht() {
393
392
  }
394
393
  }
395
394
  return !0;
395
+ }, tt = function(e) {
396
+ return e !== "annotation-xml" && st(e, xt);
396
397
  }, nt = function(e) {
397
- return e !== "annotation-xml" && lt(e, Pt);
398
- }, ot = function(e) {
399
- I(h.beforeSanitizeAttributes, e, null);
398
+ M(g.beforeSanitizeAttributes, e, null);
400
399
  const {
401
400
  attributes: t
402
401
  } = e;
@@ -406,109 +405,101 @@ function ht() {
406
405
  attrName: "",
407
406
  attrValue: "",
408
407
  keepAttr: !0,
409
- allowedAttributes: d,
408
+ allowedAttributes: p,
410
409
  forceKeepAttr: void 0
411
410
  };
412
411
  let c = t.length;
413
412
  for (; c--; ) {
414
413
  const _ = t[c], {
415
- name: u,
414
+ name: d,
416
415
  namespaceURI: y,
417
- value: M
418
- } = _, V = p(u), De = M;
419
- let E = u === "value" ? De : qt(De);
420
- if (n.attrName = V, n.attrValue = E, n.keepAttr = !0, n.forceKeepAttr = void 0, I(h.uponSanitizeAttribute, e, n), E = n.attrValue, Be && (V === "id" || V === "name") && (z(u, e), E = vt + E), te && A(/((--!?|])>)|<\/(style|title)/i, E)) {
421
- z(u, e);
416
+ value: D
417
+ } = _, j = m(d);
418
+ let h = d === "value" ? D : $t(D);
419
+ if (n.attrName = j, n.attrValue = h, n.keepAttr = !0, n.forceKeepAttr = void 0, M(g.uponSanitizeAttribute, e, n), h = n.attrValue, We && (j === "id" || j === "name") && (re(d, e), h = Pt + h), Ee && A(/((--!?|])>)|<\/(style|title)/i, h)) {
420
+ re(d, e);
422
421
  continue;
423
422
  }
424
- if (n.forceKeepAttr)
423
+ if (n.forceKeepAttr || (re(d, e), !n.keepAttr))
425
424
  continue;
426
- if (!n.keepAttr) {
427
- z(u, e);
428
- continue;
429
- }
430
- if (!Ge && A(/\/>/i, E)) {
431
- z(u, e);
425
+ if (!ze && A(/\/>/i, h)) {
426
+ re(d, e);
432
427
  continue;
433
428
  }
434
- P && le([pe, de, Te], (at) => {
435
- E = q(E, at, " ");
429
+ P && se([me, pe, de], (it) => {
430
+ h = $(h, it, " ");
436
431
  });
437
- const it = p(e.nodeName);
438
- if (!tt(it, V, E)) {
439
- z(u, e);
440
- continue;
441
- }
442
- if (g && typeof Q == "object" && typeof Q.getAttributeType == "function" && !y)
443
- switch (Q.getAttributeType(it, V)) {
444
- case "TrustedHTML": {
445
- E = g.createHTML(E);
446
- break;
447
- }
448
- case "TrustedScriptURL": {
449
- E = g.createScriptURL(E);
450
- break;
432
+ const ot = m(e.nodeName);
433
+ if (et(ot, j, h)) {
434
+ if (E && typeof J == "object" && typeof J.getAttributeType == "function" && !y)
435
+ switch (J.getAttributeType(ot, j)) {
436
+ case "TrustedHTML": {
437
+ h = E.createHTML(h);
438
+ break;
439
+ }
440
+ case "TrustedScriptURL": {
441
+ h = E.createScriptURL(h);
442
+ break;
443
+ }
451
444
  }
452
- }
453
- if (E !== De)
454
445
  try {
455
- y ? e.setAttributeNS(y, u, E) : e.setAttribute(u, E), Le(e) ? D(e) : st(o.removed);
446
+ y ? e.setAttributeNS(y, d, h) : e.setAttribute(d, h), Le(e) ? N(e) : rt(o.removed);
456
447
  } catch {
457
- z(u, e);
458
448
  }
449
+ }
459
450
  }
460
- I(h.afterSanitizeAttributes, e, null);
461
- }, Wt = function i(e) {
451
+ M(g.afterSanitizeAttributes, e, null);
452
+ }, Gt = function i(e) {
462
453
  let t = null;
463
- const n = Je(e);
464
- for (I(h.beforeSanitizeShadowDOM, e, null); t = n.nextNode(); )
465
- I(h.uponSanitizeShadowNode, t, null), et(t), ot(t), t.content instanceof N && i(t.content);
466
- I(h.afterSanitizeShadowDOM, e, null);
454
+ const n = Ze(e);
455
+ for (M(g.beforeSanitizeShadowDOM, e, null); t = n.nextNode(); )
456
+ M(g.uponSanitizeShadowNode, t, null), Qe(t), nt(t), t.content instanceof b && i(t.content);
457
+ M(g.afterSanitizeShadowDOM, e, null);
467
458
  };
468
459
  return o.sanitize = function(i) {
469
460
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, n = null, c = null, _ = null;
470
- if (Re = !i, Re && (i = "<!-->"), typeof i != "string" && !Qe(i))
461
+ if (Re = !i, Re && (i = "<!-->"), typeof i != "string" && !Je(i))
471
462
  if (typeof i.toString == "function") {
472
463
  if (i = i.toString(), typeof i != "string")
473
- throw K("dirty is not a string, aborting");
464
+ throw q("dirty is not a string, aborting");
474
465
  } else
475
- throw K("toString is not a function");
466
+ throw q("toString is not a function");
476
467
  if (!o.isSupported)
477
468
  return i;
478
- if (ge || Oe(e), o.removed = [], typeof i == "string" && (X = !1), X) {
469
+ if (ge || Oe(e), o.removed = [], typeof i == "string" && (Y = !1), Y) {
479
470
  if (i.nodeName) {
480
- const M = p(i.nodeName);
481
- if (!m[M] || Y[M])
482
- throw K("root node is forbidden and cannot be sanitized in-place");
471
+ const D = m(i.nodeName);
472
+ if (!u[D] || B[D])
473
+ throw q("root node is forbidden and cannot be sanitized in-place");
483
474
  }
484
- } else if (i instanceof ue)
485
- t = Ze("<!---->"), n = t.ownerDocument.importNode(i, !0), n.nodeType === J.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? t = n : t.appendChild(n);
475
+ } else if (i instanceof fe)
476
+ t = Ke("<!---->"), n = t.ownerDocument.importNode(i, !0), n.nodeType === Z.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? t = n : t.appendChild(n);
486
477
  else {
487
- if (!v && !P && !w && // eslint-disable-next-line unicorn/prefer-includes
478
+ if (!v && !P && !C && // eslint-disable-next-line unicorn/prefer-includes
488
479
  i.indexOf("<") === -1)
489
- return g && oe ? g.createHTML(i) : i;
490
- if (t = Ze(i), !t)
491
- return v ? null : oe ? B : "";
480
+ return E && te ? E.createHTML(i) : i;
481
+ if (t = Ke(i), !t)
482
+ return v ? null : te ? W : "";
492
483
  }
493
- t && he && D(t.firstChild);
494
- const u = Je(X ? i : t);
495
- for (; c = u.nextNode(); )
496
- et(c), ot(c), c.content instanceof N && Wt(c.content);
497
- if (X)
484
+ t && he && N(t.firstChild);
485
+ const d = Ze(Y ? i : t);
486
+ for (; c = d.nextNode(); )
487
+ Qe(c), nt(c), c.content instanceof b && Gt(c.content);
488
+ if (Y)
498
489
  return i;
499
490
  if (v) {
500
- if (ne)
501
- for (_ = bt.call(t.ownerDocument); t.firstChild; )
491
+ if (ee)
492
+ for (_ = Dt.call(t.ownerDocument); t.firstChild; )
502
493
  _.appendChild(t.firstChild);
503
494
  else
504
495
  _ = t;
505
- return (d.shadowroot || d.shadowrootmode) && (_ = Mt.call(s, _, !0)), _;
496
+ return (p.shadowroot || p.shadowrootmode) && (_ = It.call(s, _, !0)), _;
506
497
  }
507
- let y = w ? t.outerHTML : t.innerHTML;
508
- return w && m["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && A(gt, t.ownerDocument.doctype.name) && (y = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
509
- ` + y), P && le([pe, de, Te], (M) => {
510
- y = q(y, M, " ");
511
- }), g && oe ? g.createHTML(y) : y;
498
+ let y = C ? t.outerHTML : t.innerHTML;
499
+ return C && u["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && A(Et, t.ownerDocument.doctype.name) && (y = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
500
+ ` + y), P && se([me, pe, de], (D) => {
501
+ y = $(y, D, " ");
502
+ }), E && te ? E.createHTML(y) : y;
512
503
  }, o.setConfig = function() {
513
504
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
514
505
  Oe(i), ge = !0;
@@ -516,23 +507,23 @@ function ht() {
516
507
  H = null, ge = !1;
517
508
  }, o.isValidAttribute = function(i, e, t) {
518
509
  H || Oe({});
519
- const n = p(i), c = p(e);
520
- return tt(n, c, t);
510
+ const n = m(i), c = m(e);
511
+ return et(n, c, t);
521
512
  }, o.addHook = function(i, e) {
522
- typeof e == "function" && $(h[i], e);
513
+ typeof e == "function" && V(g[i], e);
523
514
  }, o.removeHook = function(i, e) {
524
515
  if (e !== void 0) {
525
- const t = jt(h[i], e);
526
- return t === -1 ? void 0 : Vt(h[i], t, 1)[0];
516
+ const t = Xt(g[i], e);
517
+ return t === -1 ? void 0 : jt(g[i], t, 1)[0];
527
518
  }
528
- return st(h[i]);
519
+ return rt(g[i]);
529
520
  }, o.removeHooks = function(i) {
530
- h[i] = [];
521
+ g[i] = [];
531
522
  }, o.removeAllHooks = function() {
532
- h = dt();
523
+ g = pt();
533
524
  }, o;
534
525
  }
535
- var un = ht();
526
+ var fn = gt();
536
527
  export {
537
- un as default
528
+ fn as default
538
529
  };