@opensystemslab/map 1.0.0-alpha.5 → 1.0.0-alpha.6

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.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 */
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 */
2
2
  const {
3
- entries: dt,
4
- setPrototypeOf: at,
5
- isFrozen: Wt,
6
- getPrototypeOf: Bt,
7
- getOwnPropertyDescriptor: Yt
3
+ entries: Tt,
4
+ setPrototypeOf: rt,
5
+ isFrozen: Bt,
6
+ getPrototypeOf: Yt,
7
+ getOwnPropertyDescriptor: Xt
8
8
  } = Object;
9
9
  let {
10
10
  freeze: S,
11
11
  seal: y,
12
- create: Tt
12
+ create: _t
13
13
  } = Object, {
14
- apply: Ce,
15
- construct: we
14
+ apply: we,
15
+ construct: xe
16
16
  } = typeof Reflect < "u" && Reflect;
17
17
  S || (S = function(o) {
18
18
  return o;
@@ -20,106 +20,107 @@ S || (S = function(o) {
20
20
  y || (y = function(o) {
21
21
  return o;
22
22
  });
23
- Ce || (Ce = function(o, l, s) {
23
+ we || (we = function(o, l, s) {
24
24
  return o.apply(l, s);
25
25
  });
26
- we || (we = function(o, l) {
26
+ xe || (xe = function(o, l) {
27
27
  return new o(...l);
28
28
  });
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);
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);
30
30
  function R(r) {
31
31
  return function(o) {
32
+ o instanceof RegExp && (o.lastIndex = 0);
32
33
  for (var l = arguments.length, s = new Array(l > 1 ? l - 1 : 0), T = 1; T < l; T++)
33
34
  s[T - 1] = arguments[T];
34
- return Ce(r, o, s);
35
+ return we(r, o, s);
35
36
  };
36
37
  }
37
- function qt(r) {
38
+ function Kt(r) {
38
39
  return function() {
39
40
  for (var o = arguments.length, l = new Array(o), s = 0; s < o; s++)
40
41
  l[s] = arguments[s];
41
- return we(r, l);
42
+ return xe(r, l);
42
43
  };
43
44
  }
44
45
  function a(r, o) {
45
- let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ce;
46
- at && at(r, null);
46
+ let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : fe;
47
+ rt && rt(r, null);
47
48
  let s = o.length;
48
49
  for (; s--; ) {
49
50
  let T = o[s];
50
51
  if (typeof T == "string") {
51
- const b = l(T);
52
- b !== T && (Wt(o) || (o[s] = b), T = b);
52
+ const N = l(T);
53
+ N !== T && (Bt(o) || (o[s] = N), T = N);
53
54
  }
54
55
  r[T] = !0;
55
56
  }
56
57
  return r;
57
58
  }
58
- function Kt(r) {
59
+ function Zt(r) {
59
60
  for (let o = 0; o < r.length; o++)
60
61
  L(r, o) || (r[o] = null);
61
62
  return r;
62
63
  }
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);
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);
67
68
  return o;
68
69
  }
69
- function K(r, o) {
70
+ function Z(r, o) {
70
71
  for (; r !== null; ) {
71
- const s = Yt(r, o);
72
+ const s = Xt(r, o);
72
73
  if (s) {
73
74
  if (s.get)
74
75
  return R(s.get);
75
76
  if (typeof s.value == "function")
76
77
  return R(s.value);
77
78
  }
78
- r = Bt(r);
79
+ r = Yt(r);
79
80
  }
80
81
  function l() {
81
82
  return null;
82
83
  }
83
84
  return l;
84
85
  }
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 = y(/\{\{[\w\W]*|[\w\W]*\}\}/gm), en = y(/<%[\w\W]*|[\w\W]*%>/gm), tn = y(/\$\{[\w\W]*/gm), nn = y(/^data-[\-\w.\u00B7-\uFFFF]+$/), on = y(/^aria-[\-\w]+$/), _t = y(
86
- /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
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 = y(/\{\{[\w\W]*|[\w\W]*\}\}/gm), tn = y(/<%[\w\W]*|[\w\W]*%>/gm), nn = y(/\$\{[\w\W]*/gm), on = y(/^data-[\-\w.\u00B7-\uFFFF]+$/), an = y(/^aria-[\-\w]+$/), Et = y(
87
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
87
88
  // eslint-disable-line no-useless-escape
88
- ), an = y(/^(?:\w+script|data):/i), rn = y(
89
+ ), rn = y(/^(?:\w+script|data):/i), sn = y(
89
90
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
90
91
  // eslint-disable-line no-control-regex
91
- ), Et = y(/^html$/i), sn = y(/^[a-z][.\w]*(-[.\w]+)+$/i);
92
- var mt = /* @__PURE__ */ Object.freeze({
92
+ ), gt = y(/^html$/i), ln = y(/^[a-z][.\w]*(-[.\w]+)+$/i);
93
+ var pt = /* @__PURE__ */ Object.freeze({
93
94
  __proto__: null,
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
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
104
105
  });
105
- const Z = {
106
+ const J = {
106
107
  element: 1,
107
108
  text: 3,
108
109
  // Deprecated
109
110
  progressingInstruction: 7,
110
111
  comment: 8,
111
112
  document: 9
112
- }, ln = function() {
113
+ }, cn = function() {
113
114
  return typeof window > "u" ? null : window;
114
- }, cn = function(o, l) {
115
+ }, fn = function(o, l) {
115
116
  if (typeof o != "object" || typeof o.createPolicy != "function")
116
117
  return null;
117
118
  let s = null;
118
119
  const T = "data-tt-policy-suffix";
119
120
  l && l.hasAttribute(T) && (s = l.getAttribute(T));
120
- const b = "dompurify" + (s ? "#" + s : "");
121
+ const N = "dompurify" + (s ? "#" + s : "");
121
122
  try {
122
- return o.createPolicy(b, {
123
+ return o.createPolicy(N, {
123
124
  createHTML(x) {
124
125
  return x;
125
126
  },
@@ -128,9 +129,9 @@ const Z = {
128
129
  }
129
130
  });
130
131
  } catch {
131
- return console.warn("TrustedTypes policy " + b + " could not be created."), null;
132
+ return console.warn("TrustedTypes policy " + N + " could not be created."), null;
132
133
  }
133
- }, pt = function() {
134
+ }, dt = function() {
134
135
  return {
135
136
  afterSanitizeAttributes: [],
136
137
  afterSanitizeElements: [],
@@ -143,57 +144,57 @@ const Z = {
143
144
  uponSanitizeShadowNode: []
144
145
  };
145
146
  };
146
- function gt() {
147
- let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ln();
148
- const o = (i) => gt(i);
149
- if (o.version = "3.2.4", o.removed = [], !r || !r.document || r.document.nodeType !== Z.document || !r.Element)
147
+ function ht() {
148
+ let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : cn();
149
+ const o = (i) => ht(i);
150
+ if (o.version = "3.2.6", o.removed = [], !r || !r.document || r.document.nodeType !== J.document || !r.Element)
150
151
  return o.isSupported = !1, o;
151
152
  let {
152
153
  document: l
153
154
  } = r;
154
155
  const s = l, T = s.currentScript, {
155
- DocumentFragment: b,
156
+ DocumentFragment: N,
156
157
  HTMLTemplateElement: x,
157
- Node: fe,
158
- Element: xe,
159
- NodeFilter: z,
160
- NamedNodeMap: ht = r.NamedNodeMap || r.MozNamedAttrMap,
161
- HTMLFormElement: At,
162
- DOMParser: St,
163
- trustedTypes: J
164
- } = r, G = xe.prototype, Rt = K(G, "cloneNode"), Ot = K(G, "remove"), yt = K(G, "nextSibling"), Lt = K(G, "childNodes"), Q = K(G, "parentNode");
158
+ Node: ue,
159
+ Element: Pe,
160
+ NodeFilter: G,
161
+ NamedNodeMap: At = r.NamedNodeMap || r.MozNamedAttrMap,
162
+ HTMLFormElement: St,
163
+ DOMParser: Rt,
164
+ trustedTypes: Q
165
+ } = r, W = Pe.prototype, Ot = Z(W, "cloneNode"), yt = Z(W, "remove"), Lt = Z(W, "nextSibling"), Dt = Z(W, "childNodes"), ee = Z(W, "parentNode");
165
166
  if (typeof x == "function") {
166
167
  const i = l.createElement("template");
167
168
  i.content && i.content.ownerDocument && (l = i.content.ownerDocument);
168
169
  }
169
- let E, W = "";
170
+ let g, B = "";
170
171
  const {
171
- implementation: ue,
172
+ implementation: me,
172
173
  createNodeIterator: Nt,
173
- createDocumentFragment: Dt,
174
- getElementsByTagName: bt
174
+ createDocumentFragment: bt,
175
+ getElementsByTagName: It
175
176
  } = l, {
176
- importNode: It
177
+ importNode: Mt
177
178
  } = s;
178
- let g = pt();
179
- o.isSupported = typeof dt == "function" && typeof Q == "function" && ue && ue.createHTMLDocument !== void 0;
179
+ let h = dt();
180
+ o.isSupported = typeof Tt == "function" && typeof ee == "function" && me && me.createHTMLDocument !== void 0;
180
181
  const {
181
- MUSTACHE_EXPR: me,
182
- ERB_EXPR: pe,
183
- TMPLIT_EXPR: de,
184
- DATA_ATTR: Mt,
185
- ARIA_ATTR: Ct,
186
- IS_SCRIPT_OR_DATA: wt,
187
- ATTR_WHITESPACE: Pe,
188
- CUSTOM_ELEMENT: xt
189
- } = mt;
182
+ MUSTACHE_EXPR: pe,
183
+ ERB_EXPR: de,
184
+ TMPLIT_EXPR: Te,
185
+ DATA_ATTR: Ct,
186
+ ARIA_ATTR: wt,
187
+ IS_SCRIPT_OR_DATA: xt,
188
+ ATTR_WHITESPACE: ve,
189
+ CUSTOM_ELEMENT: Pt
190
+ } = pt;
190
191
  let {
191
- IS_ALLOWED_URI: ve
192
- } = mt, u = null;
193
- const ke = a({}, [...lt, ...De, ...be, ...Ie, ...ct]);
194
- let p = null;
195
- const Ue = a({}, [...ft, ...Me, ...ut, ...le]);
196
- let f = Object.seal(Tt(null, {
192
+ IS_ALLOWED_URI: ke
193
+ } = pt, m = null;
194
+ const Ue = a({}, [...ct, ...be, ...Ie, ...Me, ...ft]);
195
+ let d = null;
196
+ const Fe = a({}, [...ut, ...Ce, ...mt, ...ce]);
197
+ let f = Object.seal(_t(null, {
197
198
  tagNameCheck: {
198
199
  writable: !0,
199
200
  configurable: !1,
@@ -212,70 +213,70 @@ function gt() {
212
213
  enumerable: !0,
213
214
  value: !1
214
215
  }
215
- })), 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;
216
- const Pt = "user-content-";
217
- let Ae = !0, Y = !1, k = {}, U = null;
218
- 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"]);
219
- let Ye = null;
220
- const Xe = a({}, ["audio", "video", "img", "source", "image", "track"]);
216
+ })), 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;
217
+ const vt = "user-content-";
218
+ let Ae = !0, X = !1, k = {}, U = null;
219
+ 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"]);
220
+ let Xe = null;
221
+ const je = a({}, ["audio", "video", "img", "source", "image", "track"]);
221
222
  let Se = null;
222
- 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";
223
- let F = I, Re = !1, Oe = null;
224
- const vt = a({}, [ne, oe, I], Ne);
225
- let ie = a({}, ["mi", "mo", "mn", "ms", "mtext"]), ae = a({}, ["annotation-xml"]);
226
- const kt = a({}, ["title", "style", "font", "a", "script"]);
227
- let X = null;
228
- const Ut = ["application/xhtml+xml", "text/html"], Ft = "text/html";
229
- let m = null, H = null;
230
- const Ht = l.createElement("form"), Ve = function(e) {
223
+ 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";
224
+ let F = b, Re = !1, Oe = null;
225
+ const kt = a({}, [ie, ae, b], Ne);
226
+ let re = a({}, ["mi", "mo", "mn", "ms", "mtext"]), se = a({}, ["annotation-xml"]);
227
+ const Ut = a({}, ["title", "style", "font", "a", "script"]);
228
+ let j = null;
229
+ const Ft = ["application/xhtml+xml", "text/html"], Ht = "text/html";
230
+ let p = null, H = null;
231
+ const zt = l.createElement("form"), $e = function(e) {
231
232
  return e instanceof RegExp || e instanceof Function;
232
233
  }, ye = function() {
233
234
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
234
235
  if (!(H && H === e)) {
235
- if ((!e || typeof e != "object") && (e = {}), e = w(e), X = // eslint-disable-next-line unicorn/prefer-includes
236
- 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, Oe = 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) {
236
+ if ((!e || typeof e != "object") && (e = {}), e = C(e), j = // eslint-disable-next-line unicorn/prefer-includes
237
+ 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, Oe = 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) {
237
238
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
238
- throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
239
+ throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
239
240
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
240
- throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
241
- E = e.TRUSTED_TYPES_POLICY, W = E.createHTML("");
241
+ throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
242
+ g = e.TRUSTED_TYPES_POLICY, B = g.createHTML("");
242
243
  } else
243
- E === void 0 && (E = cn(J, T)), E !== null && typeof W == "string" && (W = E.createHTML(""));
244
+ g === void 0 && (g = fn(Q, T)), g !== null && typeof B == "string" && (B = g.createHTML(""));
244
245
  S && S(e), H = e;
245
246
  }
246
- }, $e = a({}, [...De, ...be, ...Zt]), qe = a({}, [...Ie, ...Jt]), zt = function(e) {
247
- let t = Q(e);
247
+ }, qe = a({}, [...be, ...Ie, ...Jt]), Ke = a({}, [...Me, ...Qt]), Gt = function(e) {
248
+ let t = ee(e);
248
249
  (!t || !t.tagName) && (t = {
249
250
  namespaceURI: F,
250
251
  tagName: "template"
251
252
  });
252
- const n = ce(e.tagName), c = ce(t.tagName);
253
- return Oe[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" && Oe[e.namespaceURI]) : !1;
254
- }, N = function(e) {
255
- V(o.removed, {
253
+ const n = fe(e.tagName), c = fe(t.tagName);
254
+ return Oe[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" && Oe[e.namespaceURI]) : !1;
255
+ }, D = function(e) {
256
+ $(o.removed, {
256
257
  element: e
257
258
  });
258
259
  try {
259
- Q(e).removeChild(e);
260
+ ee(e).removeChild(e);
260
261
  } catch {
261
- Ot(e);
262
+ yt(e);
262
263
  }
263
- }, re = function(e, t) {
264
+ }, z = function(e, t) {
264
265
  try {
265
- V(o.removed, {
266
+ $(o.removed, {
266
267
  attribute: t.getAttributeNode(e),
267
268
  from: t
268
269
  });
269
270
  } catch {
270
- V(o.removed, {
271
+ $(o.removed, {
271
272
  attribute: null,
272
273
  from: t
273
274
  });
274
275
  }
275
276
  if (t.removeAttribute(e), e === "is")
276
- if (v || ee)
277
+ if (v || ne)
277
278
  try {
278
- N(t);
279
+ D(t);
279
280
  } catch {
280
281
  }
281
282
  else
@@ -283,96 +284,96 @@ function gt() {
283
284
  t.setAttribute(e, "");
284
285
  } catch {
285
286
  }
286
- }, Ke = function(e) {
287
+ }, Ze = function(e) {
287
288
  let t = null, n = null;
288
289
  if (he)
289
290
  e = "<remove></remove>" + e;
290
291
  else {
291
- const d = st(e, /^[\r\n\t ]+/);
292
- n = d && d[0];
292
+ const u = lt(e, /^[\r\n\t ]+/);
293
+ n = u && u[0];
293
294
  }
294
- X === "application/xhtml+xml" && F === I && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
295
- const c = E ? E.createHTML(e) : e;
296
- if (F === I)
295
+ j === "application/xhtml+xml" && F === b && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
296
+ const c = g ? g.createHTML(e) : e;
297
+ if (F === b)
297
298
  try {
298
- t = new St().parseFromString(c, X);
299
+ t = new Rt().parseFromString(c, j);
299
300
  } catch {
300
301
  }
301
302
  if (!t || !t.documentElement) {
302
- t = ue.createDocument(F, "template", null);
303
+ t = me.createDocument(F, "template", null);
303
304
  try {
304
- t.documentElement.innerHTML = Re ? W : c;
305
+ t.documentElement.innerHTML = Re ? B : c;
305
306
  } catch {
306
307
  }
307
308
  }
308
309
  const _ = t.body || t.documentElement;
309
- return e && n && _.insertBefore(l.createTextNode(n), _.childNodes[0] || null), F === I ? bt.call(t, C ? "html" : "body")[0] : C ? t.documentElement : _;
310
- }, Ze = function(e) {
310
+ return e && n && _.insertBefore(l.createTextNode(n), _.childNodes[0] || null), F === b ? It.call(t, w ? "html" : "body")[0] : w ? t.documentElement : _;
311
+ }, Je = function(e) {
311
312
  return Nt.call(
312
313
  e.ownerDocument || e,
313
314
  e,
314
315
  // eslint-disable-next-line no-bitwise
315
- z.SHOW_ELEMENT | z.SHOW_COMMENT | z.SHOW_TEXT | z.SHOW_PROCESSING_INSTRUCTION | z.SHOW_CDATA_SECTION,
316
+ G.SHOW_ELEMENT | G.SHOW_COMMENT | G.SHOW_TEXT | G.SHOW_PROCESSING_INSTRUCTION | G.SHOW_CDATA_SECTION,
316
317
  null
317
318
  );
318
319
  }, Le = function(e) {
319
- 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");
320
- }, Je = function(e) {
321
- return typeof fe == "function" && e instanceof fe;
320
+ 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");
321
+ }, Qe = function(e) {
322
+ return typeof ue == "function" && e instanceof ue;
322
323
  };
323
- function M(i, e, t) {
324
- se(i, (n) => {
324
+ function I(i, e, t) {
325
+ le(i, (n) => {
325
326
  n.call(o, e, t, H);
326
327
  });
327
328
  }
328
- const Qe = function(e) {
329
+ const et = function(e) {
329
330
  let t = null;
330
- if (M(g.beforeSanitizeElements, e, null), Le(e))
331
- return N(e), !0;
332
- const n = m(e.nodeName);
333
- if (M(g.uponSanitizeElement, e, {
331
+ if (I(h.beforeSanitizeElements, e, null), Le(e))
332
+ return D(e), !0;
333
+ const n = p(e.nodeName);
334
+ if (I(h.uponSanitizeElement, e, {
334
335
  tagName: n,
335
- allowedTags: u
336
- }), 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))
337
- return N(e), !0;
338
- if (!u[n] || B[n]) {
339
- if (!B[n] && tt(n) && (f.tagNameCheck instanceof RegExp && A(f.tagNameCheck, n) || f.tagNameCheck instanceof Function && f.tagNameCheck(n)))
336
+ allowedTags: m
337
+ }), 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))
338
+ return D(e), !0;
339
+ if (!m[n] || Y[n]) {
340
+ if (!Y[n] && nt(n) && (f.tagNameCheck instanceof RegExp && A(f.tagNameCheck, n) || f.tagNameCheck instanceof Function && f.tagNameCheck(n)))
340
341
  return !1;
341
342
  if (Ae && !U[n]) {
342
- const c = Q(e) || e.parentNode, _ = Lt(e) || e.childNodes;
343
+ const c = ee(e) || e.parentNode, _ = Dt(e) || e.childNodes;
343
344
  if (_ && c) {
344
- const d = _.length;
345
- for (let O = d - 1; O >= 0; --O) {
346
- const D = Rt(_[O], !0);
347
- D.__removalCount = (e.__removalCount || 0) + 1, c.insertBefore(D, yt(e));
345
+ const u = _.length;
346
+ for (let O = u - 1; O >= 0; --O) {
347
+ const M = Ot(_[O], !0);
348
+ M.__removalCount = (e.__removalCount || 0) + 1, c.insertBefore(M, Lt(e));
348
349
  }
349
350
  }
350
351
  }
351
- return N(e), !0;
352
+ return D(e), !0;
352
353
  }
353
- 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) => {
354
- t = $(t, c, " ");
355
- }), e.textContent !== t && (V(o.removed, {
354
+ 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) => {
355
+ t = q(t, c, " ");
356
+ }), e.textContent !== t && ($(o.removed, {
356
357
  element: e.cloneNode()
357
- }), e.textContent = t)), M(g.afterSanitizeElements, e, null), !1);
358
- }, et = function(e, t, n) {
359
- if (Ge && (t === "id" || t === "name") && (n in l || n in Ht))
358
+ }), e.textContent = t)), I(h.afterSanitizeElements, e, null), !1);
359
+ }, tt = function(e, t, n) {
360
+ if (We && (t === "id" || t === "name") && (n in l || n in zt))
360
361
  return !1;
361
- if (!(_e && !Te[t] && A(Mt, t))) {
362
- if (!(Fe && A(Ct, t))) {
363
- if (!p[t] || Te[t]) {
362
+ if (!(Ee && !_e[t] && A(Ct, t))) {
363
+ if (!(He && A(wt, t))) {
364
+ if (!d[t] || _e[t]) {
364
365
  if (
365
366
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
366
367
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
367
368
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
368
- !(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
369
+ !(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
369
370
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
370
371
  t === "is" && f.allowCustomizedBuiltInElements && (f.tagNameCheck instanceof RegExp && A(f.tagNameCheck, n) || f.tagNameCheck instanceof Function && f.tagNameCheck(n)))
371
372
  ) return !1;
372
373
  } else if (!Se[t]) {
373
- if (!A(ve, $(n, Pe, ""))) {
374
- if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Vt(n, "data:") === 0 && Ye[e])) {
375
- if (!(He && !A(wt, $(n, Pe, "")))) {
374
+ if (!A(ke, q(n, ve, ""))) {
375
+ if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && $t(n, "data:") === 0 && Xe[e])) {
376
+ if (!(ze && !A(xt, q(n, ve, "")))) {
376
377
  if (n)
377
378
  return !1;
378
379
  }
@@ -382,10 +383,10 @@ function gt() {
382
383
  }
383
384
  }
384
385
  return !0;
385
- }, tt = function(e) {
386
- return e !== "annotation-xml" && st(e, xt);
387
386
  }, nt = function(e) {
388
- M(g.beforeSanitizeAttributes, e, null);
387
+ return e !== "annotation-xml" && lt(e, Pt);
388
+ }, ot = function(e) {
389
+ I(h.beforeSanitizeAttributes, e, null);
389
390
  const {
390
391
  attributes: t
391
392
  } = e;
@@ -395,101 +396,109 @@ function gt() {
395
396
  attrName: "",
396
397
  attrValue: "",
397
398
  keepAttr: !0,
398
- allowedAttributes: p,
399
+ allowedAttributes: d,
399
400
  forceKeepAttr: void 0
400
401
  };
401
402
  let c = t.length;
402
403
  for (; c--; ) {
403
404
  const _ = t[c], {
404
- name: d,
405
+ name: u,
405
406
  namespaceURI: O,
406
- value: D
407
- } = _, j = m(d);
408
- let h = d === "value" ? D : $t(D);
409
- 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)) {
410
- re(d, e);
407
+ value: M
408
+ } = _, V = p(u), De = M;
409
+ let E = u === "value" ? De : qt(De);
410
+ 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)) {
411
+ z(u, e);
411
412
  continue;
412
413
  }
413
- if (n.forceKeepAttr || (re(d, e), !n.keepAttr))
414
+ if (n.forceKeepAttr)
414
415
  continue;
415
- if (!ze && A(/\/>/i, h)) {
416
- re(d, e);
416
+ if (!n.keepAttr) {
417
+ z(u, e);
418
+ continue;
419
+ }
420
+ if (!Ge && A(/\/>/i, E)) {
421
+ z(u, e);
417
422
  continue;
418
423
  }
419
- P && se([me, pe, de], (it) => {
420
- h = $(h, it, " ");
424
+ P && le([pe, de, Te], (at) => {
425
+ E = q(E, at, " ");
421
426
  });
422
- const ot = m(e.nodeName);
423
- if (et(ot, j, h)) {
424
- if (E && typeof J == "object" && typeof J.getAttributeType == "function" && !O)
425
- switch (J.getAttributeType(ot, j)) {
426
- case "TrustedHTML": {
427
- h = E.createHTML(h);
428
- break;
429
- }
430
- case "TrustedScriptURL": {
431
- h = E.createScriptURL(h);
432
- break;
433
- }
427
+ const it = p(e.nodeName);
428
+ if (!tt(it, V, E)) {
429
+ z(u, e);
430
+ continue;
431
+ }
432
+ if (g && typeof Q == "object" && typeof Q.getAttributeType == "function" && !O)
433
+ switch (Q.getAttributeType(it, V)) {
434
+ case "TrustedHTML": {
435
+ E = g.createHTML(E);
436
+ break;
434
437
  }
438
+ case "TrustedScriptURL": {
439
+ E = g.createScriptURL(E);
440
+ break;
441
+ }
442
+ }
443
+ if (E !== De)
435
444
  try {
436
- O ? e.setAttributeNS(O, d, h) : e.setAttribute(d, h), Le(e) ? N(e) : rt(o.removed);
445
+ O ? e.setAttributeNS(O, u, E) : e.setAttribute(u, E), Le(e) ? D(e) : st(o.removed);
437
446
  } catch {
447
+ z(u, e);
438
448
  }
439
- }
440
449
  }
441
- M(g.afterSanitizeAttributes, e, null);
442
- }, Gt = function i(e) {
450
+ I(h.afterSanitizeAttributes, e, null);
451
+ }, Wt = function i(e) {
443
452
  let t = null;
444
- const n = Ze(e);
445
- for (M(g.beforeSanitizeShadowDOM, e, null); t = n.nextNode(); )
446
- M(g.uponSanitizeShadowNode, t, null), Qe(t), nt(t), t.content instanceof b && i(t.content);
447
- M(g.afterSanitizeShadowDOM, e, null);
453
+ const n = Je(e);
454
+ for (I(h.beforeSanitizeShadowDOM, e, null); t = n.nextNode(); )
455
+ I(h.uponSanitizeShadowNode, t, null), et(t), ot(t), t.content instanceof N && i(t.content);
456
+ I(h.afterSanitizeShadowDOM, e, null);
448
457
  };
449
458
  return o.sanitize = function(i) {
450
459
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, n = null, c = null, _ = null;
451
- if (Re = !i, Re && (i = "<!-->"), typeof i != "string" && !Je(i))
460
+ if (Re = !i, Re && (i = "<!-->"), typeof i != "string" && !Qe(i))
452
461
  if (typeof i.toString == "function") {
453
462
  if (i = i.toString(), typeof i != "string")
454
- throw q("dirty is not a string, aborting");
463
+ throw K("dirty is not a string, aborting");
455
464
  } else
456
- throw q("toString is not a function");
465
+ throw K("toString is not a function");
457
466
  if (!o.isSupported)
458
467
  return i;
459
- if (ge || ye(e), o.removed = [], typeof i == "string" && (Y = !1), Y) {
468
+ if (ge || ye(e), o.removed = [], typeof i == "string" && (X = !1), X) {
460
469
  if (i.nodeName) {
461
- const D = m(i.nodeName);
462
- if (!u[D] || B[D])
463
- throw q("root node is forbidden and cannot be sanitized in-place");
470
+ const M = p(i.nodeName);
471
+ if (!m[M] || Y[M])
472
+ throw K("root node is forbidden and cannot be sanitized in-place");
464
473
  }
465
- } else if (i instanceof fe)
466
- t = Ke("<!---->"), n = t.ownerDocument.importNode(i, !0), n.nodeType === Z.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? t = n : t.appendChild(n);
474
+ } else if (i instanceof ue)
475
+ t = Ze("<!---->"), n = t.ownerDocument.importNode(i, !0), n.nodeType === J.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? t = n : t.appendChild(n);
467
476
  else {
468
- if (!v && !P && !C && // eslint-disable-next-line unicorn/prefer-includes
477
+ if (!v && !P && !w && // eslint-disable-next-line unicorn/prefer-includes
469
478
  i.indexOf("<") === -1)
470
- return E && te ? E.createHTML(i) : i;
471
- if (t = Ke(i), !t)
472
- return v ? null : te ? W : "";
479
+ return g && oe ? g.createHTML(i) : i;
480
+ if (t = Ze(i), !t)
481
+ return v ? null : oe ? B : "";
473
482
  }
474
- t && he && N(t.firstChild);
475
- const d = Ze(Y ? i : t);
476
- for (; c = d.nextNode(); )
477
- Qe(c), nt(c), c.content instanceof b && Gt(c.content);
478
- if (Y)
483
+ t && he && D(t.firstChild);
484
+ const u = Je(X ? i : t);
485
+ for (; c = u.nextNode(); )
486
+ et(c), ot(c), c.content instanceof N && Wt(c.content);
487
+ if (X)
479
488
  return i;
480
489
  if (v) {
481
- if (ee)
482
- for (_ = Dt.call(t.ownerDocument); t.firstChild; )
490
+ if (ne)
491
+ for (_ = bt.call(t.ownerDocument); t.firstChild; )
483
492
  _.appendChild(t.firstChild);
484
493
  else
485
494
  _ = t;
486
- return (p.shadowroot || p.shadowrootmode) && (_ = It.call(s, _, !0)), _;
495
+ return (d.shadowroot || d.shadowrootmode) && (_ = Mt.call(s, _, !0)), _;
487
496
  }
488
- let O = C ? t.outerHTML : t.innerHTML;
489
- return C && u["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && A(Et, t.ownerDocument.doctype.name) && (O = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
490
- ` + O), P && se([me, pe, de], (D) => {
491
- O = $(O, D, " ");
492
- }), E && te ? E.createHTML(O) : O;
497
+ let O = w ? t.outerHTML : t.innerHTML;
498
+ return w && m["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && A(gt, t.ownerDocument.doctype.name) && (O = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
499
+ ` + O), P && le([pe, de, Te], (M) => {
500
+ O = q(O, M, " ");
501
+ }), g && oe ? g.createHTML(O) : O;
493
502
  }, o.setConfig = function() {
494
503
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
495
504
  ye(i), ge = !0;
@@ -497,23 +506,23 @@ function gt() {
497
506
  H = null, ge = !1;
498
507
  }, o.isValidAttribute = function(i, e, t) {
499
508
  H || ye({});
500
- const n = m(i), c = m(e);
501
- return et(n, c, t);
509
+ const n = p(i), c = p(e);
510
+ return tt(n, c, t);
502
511
  }, o.addHook = function(i, e) {
503
- typeof e == "function" && V(g[i], e);
512
+ typeof e == "function" && $(h[i], e);
504
513
  }, o.removeHook = function(i, e) {
505
514
  if (e !== void 0) {
506
- const t = Xt(g[i], e);
507
- return t === -1 ? void 0 : jt(g[i], t, 1)[0];
515
+ const t = jt(h[i], e);
516
+ return t === -1 ? void 0 : Vt(h[i], t, 1)[0];
508
517
  }
509
- return rt(g[i]);
518
+ return st(h[i]);
510
519
  }, o.removeHooks = function(i) {
511
- g[i] = [];
520
+ h[i] = [];
512
521
  }, o.removeAllHooks = function() {
513
- g = pt();
522
+ h = dt();
514
523
  }, o;
515
524
  }
516
- var fn = gt();
525
+ var un = ht();
517
526
  export {
518
- fn as default
527
+ un as default
519
528
  };