@squeed/flow-sdk 2.0.35 → 2.0.36

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,28 +1,28 @@
1
1
  /*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */
2
2
  function je(o, r) {
3
3
  (r == null || r > o.length) && (r = o.length);
4
- for (var s = 0, c = Array(r); s < r; s++) c[s] = o[s];
4
+ for (var a = 0, c = Array(r); a < r; a++) c[a] = o[a];
5
5
  return c;
6
6
  }
7
7
  function Hn(o) {
8
8
  if (Array.isArray(o)) return o;
9
9
  }
10
10
  function Gn(o, r) {
11
- var s = o == null ? null : typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"];
12
- if (s != null) {
13
- var c, f, d, E, x = [], R = !0, F = !1;
11
+ var a = o == null ? null : typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"];
12
+ if (a != null) {
13
+ var c, f, m, A, z = [], y = !0, j = !1;
14
14
  try {
15
- if (d = (s = s.call(o)).next, r !== 0) for (; !(R = (c = d.call(s)).done) && (x.push(c.value), x.length !== r); R = !0) ;
16
- } catch (z) {
17
- F = !0, f = z;
15
+ if (m = (a = a.call(o)).next, r !== 0) for (; !(y = (c = m.call(a)).done) && (z.push(c.value), z.length !== r); y = !0) ;
16
+ } catch (J) {
17
+ j = !0, f = J;
18
18
  } finally {
19
19
  try {
20
- if (!R && s.return != null && (E = s.return(), Object(E) !== E)) return;
20
+ if (!y && a.return != null && (A = a.return(), Object(A) !== A)) return;
21
21
  } finally {
22
- if (F) throw f;
22
+ if (j) throw f;
23
23
  }
24
24
  }
25
- return x;
25
+ return z;
26
26
  }
27
27
  }
28
28
  function Wn() {
@@ -35,54 +35,54 @@ function Bn(o, r) {
35
35
  function jn(o, r) {
36
36
  if (o) {
37
37
  if (typeof o == "string") return je(o, r);
38
- var s = {}.toString.call(o).slice(8, -1);
39
- return s === "Object" && o.constructor && (s = o.constructor.name), s === "Map" || s === "Set" ? Array.from(o) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? je(o, r) : void 0;
38
+ var a = {}.toString.call(o).slice(8, -1);
39
+ return a === "Object" && o.constructor && (a = o.constructor.name), a === "Map" || a === "Set" ? Array.from(o) : a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a) ? je(o, r) : void 0;
40
40
  }
41
41
  }
42
- const an = Object.entries, Ye = Object.setPrototypeOf, Yn = Object.isFrozen, $n = Object.getPrototypeOf, Xn = Object.getOwnPropertyDescriptor;
43
- let b = Object.freeze, S = Object.seal, ct = Object.create, sn = typeof Reflect < "u" && Reflect, se = sn.apply, le = sn.construct;
44
- b || (b = function(r) {
42
+ const sn = Object.entries, Ye = Object.setPrototypeOf, Yn = Object.isFrozen, $n = Object.getPrototypeOf, Xn = Object.getOwnPropertyDescriptor;
43
+ let S = Object.freeze, O = Object.seal, ct = Object.create, an = typeof Reflect < "u" && Reflect, ae = an.apply, le = an.construct;
44
+ S || (S = function(r) {
45
45
  return r;
46
46
  });
47
- S || (S = function(r) {
47
+ O || (O = function(r) {
48
48
  return r;
49
49
  });
50
- se || (se = function(r, s) {
51
- for (var c = arguments.length, f = new Array(c > 2 ? c - 2 : 0), d = 2; d < c; d++)
52
- f[d - 2] = arguments[d];
53
- return r.apply(s, f);
50
+ ae || (ae = function(r, a) {
51
+ for (var c = arguments.length, f = new Array(c > 2 ? c - 2 : 0), m = 2; m < c; m++)
52
+ f[m - 2] = arguments[m];
53
+ return r.apply(a, f);
54
54
  });
55
55
  le || (le = function(r) {
56
- for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), f = 1; f < s; f++)
56
+ for (var a = arguments.length, c = new Array(a > 1 ? a - 1 : 0), f = 1; f < a; f++)
57
57
  c[f - 1] = arguments[f];
58
58
  return new r(...c);
59
59
  });
60
- const J = y(Array.prototype.forEach), Vn = y(Array.prototype.lastIndexOf), $e = y(Array.prototype.pop), Tt = y(Array.prototype.push), qn = y(Array.prototype.splice), ut = Array.isArray, Et = y(String.prototype.toLowerCase), ee = y(String.prototype.toString), Xe = y(String.prototype.match), _t = y(String.prototype.replace), Ve = y(String.prototype.indexOf), Kn = y(String.prototype.trim), Zn = y(Number.prototype.toString), Jn = y(Boolean.prototype.toString), qe = typeof BigInt > "u" ? null : y(BigInt.prototype.toString), Ke = typeof Symbol > "u" ? null : y(Symbol.prototype.toString), N = y(Object.prototype.hasOwnProperty), gt = y(Object.prototype.toString), O = y(RegExp.prototype.test), Z = Qn(TypeError);
61
- function y(o) {
60
+ const Z = b(Array.prototype.forEach), Vn = b(Array.prototype.lastIndexOf), $e = b(Array.prototype.pop), Tt = b(Array.prototype.push), qn = b(Array.prototype.splice), ut = Array.isArray, Et = b(String.prototype.toLowerCase), ee = b(String.prototype.toString), Xe = b(String.prototype.match), gt = b(String.prototype.replace), Ve = b(String.prototype.indexOf), Kn = b(String.prototype.trim), Zn = b(Number.prototype.toString), Jn = b(Boolean.prototype.toString), qe = typeof BigInt > "u" ? null : b(BigInt.prototype.toString), Ke = typeof Symbol > "u" ? null : b(Symbol.prototype.toString), N = b(Object.prototype.hasOwnProperty), _t = b(Object.prototype.toString), R = b(RegExp.prototype.test), K = Qn(TypeError);
61
+ function b(o) {
62
62
  return function(r) {
63
63
  r instanceof RegExp && (r.lastIndex = 0);
64
- for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), f = 1; f < s; f++)
64
+ for (var a = arguments.length, c = new Array(a > 1 ? a - 1 : 0), f = 1; f < a; f++)
65
65
  c[f - 1] = arguments[f];
66
- return se(o, r, c);
66
+ return ae(o, r, c);
67
67
  };
68
68
  }
69
69
  function Qn(o) {
70
70
  return function() {
71
- for (var r = arguments.length, s = new Array(r), c = 0; c < r; c++)
72
- s[c] = arguments[c];
73
- return le(o, s);
71
+ for (var r = arguments.length, a = new Array(r), c = 0; c < r; c++)
72
+ a[c] = arguments[c];
73
+ return le(o, a);
74
74
  };
75
75
  }
76
76
  function p(o, r) {
77
- let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Et;
77
+ let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Et;
78
78
  if (Ye && Ye(o, null), !ut(r))
79
79
  return o;
80
80
  let c = r.length;
81
81
  for (; c--; ) {
82
82
  let f = r[c];
83
83
  if (typeof f == "string") {
84
- const d = s(f);
85
- d !== f && (Yn(r) || (r[c] = d), f = d);
84
+ const m = a(f);
85
+ m !== f && (Yn(r) || (r[c] = m), f = m);
86
86
  }
87
87
  o[f] = !0;
88
88
  }
@@ -95,10 +95,10 @@ function to(o) {
95
95
  }
96
96
  function C(o) {
97
97
  const r = ct(null);
98
- for (const c of an(o)) {
99
- var s = Bn(c, 2);
100
- const f = s[0], d = s[1];
101
- N(o, f) && (ut(d) ? r[f] = to(d) : d && typeof d == "object" && d.constructor === Object ? r[f] = C(d) : r[f] = d);
98
+ for (const c of sn(o)) {
99
+ var a = Bn(c, 2);
100
+ const f = a[0], m = a[1];
101
+ N(o, f) && (ut(m) ? r[f] = to(m) : m && typeof m == "object" && m.constructor === Object ? r[f] = C(m) : r[f] = m);
102
102
  }
103
103
  return r;
104
104
  }
@@ -115,20 +115,20 @@ function eo(o) {
115
115
  case "symbol":
116
116
  return Ke ? Ke(o) : "Symbol()";
117
117
  case "undefined":
118
- return gt(o);
118
+ return _t(o);
119
119
  case "function":
120
120
  case "object": {
121
121
  if (o === null)
122
- return gt(o);
123
- const r = o, s = P(r, "toString");
124
- if (typeof s == "function") {
125
- const c = s(r);
126
- return typeof c == "string" ? c : gt(c);
122
+ return _t(o);
123
+ const r = o, a = P(r, "toString");
124
+ if (typeof a == "function") {
125
+ const c = a(r);
126
+ return typeof c == "string" ? c : _t(c);
127
127
  }
128
- return gt(o);
128
+ return _t(o);
129
129
  }
130
130
  default:
131
- return gt(o);
131
+ return _t(o);
132
132
  }
133
133
  }
134
134
  function P(o, r) {
@@ -136,31 +136,31 @@ function P(o, r) {
136
136
  const c = Xn(o, r);
137
137
  if (c) {
138
138
  if (c.get)
139
- return y(c.get);
139
+ return b(c.get);
140
140
  if (typeof c.value == "function")
141
- return y(c.value);
141
+ return b(c.value);
142
142
  }
143
143
  o = $n(o);
144
144
  }
145
- function s() {
145
+ function a() {
146
146
  return null;
147
147
  }
148
- return s;
148
+ return a;
149
149
  }
150
150
  function no(o) {
151
151
  try {
152
- return O(o, ""), !0;
152
+ return R(o, ""), !0;
153
153
  } catch {
154
154
  return !1;
155
155
  }
156
156
  }
157
- const Ze = b(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), ne = b(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), oe = b(["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"]), oo = b(["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"]), re = b(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), ro = b(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Je = b(["#text"]), Qe = b(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), ie = b(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dominant-baseline", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "pointer-events", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "vector-effect", "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"]), tn = b(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Pt = b(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), io = S(/{{[\w\W]*|^[\w\W]*}}/g), ao = S(/<%[\w\W]*|^[\w\W]*%>/g), so = S(/\${[\w\W]*/g), lo = S(/^data-[\-\w.\u00B7-\uFFFF]+$/), co = S(/^aria-[\-\w]+$/), en = S(
157
+ const Ze = 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", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), ne = S(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), oe = 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"]), oo = 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"]), re = 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"]), ro = S(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Je = S(["#text"]), Qe = S(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), ie = 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", "dominant-baseline", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "pointer-events", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "vector-effect", "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"]), tn = S(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Pt = S(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), io = O(/{{[\w\W]*|^[\w\W]*}}/g), so = O(/<%[\w\W]*|^[\w\W]*%>/g), ao = O(/\${[\w\W]*/g), lo = O(/^data-[\-\w.\u00B7-\uFFFF]+$/), co = O(/^aria-[\-\w]+$/), en = O(
158
158
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
159
159
  // eslint-disable-line no-useless-escape
160
- ), uo = S(/^(?:\w+script|data):/i), fo = S(
160
+ ), uo = O(/^(?:\w+script|data):/i), fo = O(
161
161
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
162
162
  // eslint-disable-line no-control-regex
163
- ), po = S(/^html$/i), mo = S(/^[a-z][.\w]*(-[.\w]+)+$/i), nn = S(/<[/\w!]/g), on = S(/<[/\w]/g), ho = S(/<\/no(script|embed|frames)/i), To = S(/\/>/i), M = {
163
+ ), po = O(/^html$/i), mo = O(/^[a-z][.\w]*(-[.\w]+)+$/i), nn = O(/<[/\w!]/g), on = O(/<[/\w]/g), ho = O(/<\/no(script|embed|frames)/i), To = O(/\/>/i), M = {
164
164
  element: 1,
165
165
  attribute: 2,
166
166
  text: 3,
@@ -176,31 +176,31 @@ const Ze = b(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
176
176
  documentFragment: 11,
177
177
  notation: 12
178
178
  // Deprecated
179
- }, ln = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"], _o = b(p({}, ln)), go = (function() {
179
+ }, ln = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"], go = S(p({}, ln)), _o = (function() {
180
180
  const o = {};
181
- return J(ln, (r) => {
182
- o[r] = S(new RegExp("</" + r + "(?=[\\t\\n\\f\\r />])", "i"));
183
- }), b(o);
181
+ return Z(ln, (r) => {
182
+ o[r] = O(new RegExp("</" + r + "(?=[\\t\\n\\f\\r />])", "i"));
183
+ }), S(o);
184
184
  })(), Eo = function() {
185
185
  return typeof window > "u" ? null : window;
186
- }, Ao = function(r, s) {
186
+ }, Ao = function(r, a) {
187
187
  if (typeof r != "object" || typeof r.createPolicy != "function")
188
188
  return null;
189
189
  let c = null;
190
190
  const f = "data-tt-policy-suffix";
191
- s && s.hasAttribute(f) && (c = s.getAttribute(f));
192
- const d = "dompurify" + (c ? "#" + c : "");
191
+ a && a.hasAttribute(f) && (c = a.getAttribute(f));
192
+ const m = "dompurify" + (c ? "#" + c : "");
193
193
  try {
194
- return r.createPolicy(d, {
195
- createHTML(E) {
196
- return E;
194
+ return r.createPolicy(m, {
195
+ createHTML(A) {
196
+ return A;
197
197
  },
198
- createScriptURL(E) {
199
- return E;
198
+ createScriptURL(A) {
199
+ return A;
200
200
  }
201
201
  });
202
202
  } catch {
203
- return console.warn("TrustedTypes policy " + d + " could not be created."), null;
203
+ return console.warn("TrustedTypes policy " + m + " could not be created."), null;
204
204
  }
205
205
  }, rn = function() {
206
206
  return {
@@ -214,10 +214,10 @@ const Ze = b(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
214
214
  uponSanitizeElement: [],
215
215
  uponSanitizeShadowNode: []
216
216
  };
217
- }, Y = function(r, s, c, f) {
218
- return N(r, s) && ut(r[s]) ? p(f.base ? C(f.base) : {}, r[s], f.transform) : c;
219
- }, ae = function(r, s, c) {
220
- const f = N(r, s) ? r[s] : void 0;
217
+ }, B = function(r, a, c, f) {
218
+ return N(r, a) && ut(r[a]) ? p(f.base ? C(f.base) : {}, r[a], f.transform) : c;
219
+ }, se = function(r, a, c) {
220
+ const f = N(r, a) ? r[a] : void 0;
221
221
  return f && typeof f == "object" ? C(f) : c();
222
222
  };
223
223
  function cn() {
@@ -225,24 +225,24 @@ function cn() {
225
225
  const r = (i) => cn(i);
226
226
  if (r.version = "3.4.15", r.removed = [], !o || !o.document || o.document.nodeType !== M.document || !o.Element)
227
227
  return r.isSupported = !1, r;
228
- let s = o.document;
229
- const c = s, f = c.currentScript;
228
+ let a = o.document;
229
+ const c = a, f = c.currentScript;
230
230
  o.DocumentFragment;
231
- const d = o.HTMLTemplateElement, E = o.Node, x = o.Element, R = o.NodeFilter, F = o.NamedNodeMap;
232
- F === void 0 && (o.NamedNodeMap || o.MozNamedAttrMap), o.HTMLFormElement;
233
- const z = o.DOMParser, H = o.trustedTypes, G = x.prototype, un = P(G, "cloneNode"), vt = P(G, "remove"), ce = P(G, "removeAttributeNode"), fn = P(G, "nextSibling"), Q = P(G, "childNodes"), tt = P(G, "parentNode"), ue = P(G, "shadowRoot"), kt = P(G, "attributes"), $ = E && E.prototype ? P(E.prototype, "nodeType") : null, et = E && E.prototype ? P(E.prototype, "nodeName") : null, At = E && E.prototype ? P(E.prototype, "ownerDocument") : null, ft = function(t) {
234
- return $ ? $(t) : t.nodeType;
231
+ const m = o.HTMLTemplateElement, A = o.Node, z = o.Element, y = o.NodeFilter, j = o.NamedNodeMap;
232
+ j === void 0 && (o.NamedNodeMap || o.MozNamedAttrMap), o.HTMLFormElement;
233
+ const J = o.DOMParser, F = o.trustedTypes, x = z.prototype, un = P(x, "cloneNode"), vt = P(x, "remove"), ce = P(x, "removeAttributeNode"), fn = P(x, "nextSibling"), Q = P(x, "childNodes"), tt = P(x, "parentNode"), ue = P(x, "shadowRoot"), kt = P(x, "attributes"), Y = A && A.prototype ? P(A.prototype, "nodeType") : null, et = A && A.prototype ? P(A.prototype, "nodeName") : null, At = A && A.prototype ? P(A.prototype, "ownerDocument") : null, ft = function(t) {
234
+ return Y ? Y(t) : t.nodeType;
235
235
  }, Ut = function(t) {
236
236
  return et ? et(t) : t.nodeName;
237
237
  };
238
- if (typeof d == "function") {
239
- const i = s.createElement("template");
240
- i.content && i.content.ownerDocument && (s = i.content.ownerDocument);
238
+ if (typeof m == "function") {
239
+ const i = a.createElement("template");
240
+ i.content && i.content.ownerDocument && (a = i.content.ownerDocument);
241
241
  }
242
- let D, X = "", Ft, fe = !1, pt = 0;
242
+ let D, $ = "", Ft, fe = !1, pt = 0;
243
243
  const pe = function() {
244
244
  if (pt > 0)
245
- throw Z('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
245
+ throw K('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
246
246
  }, nt = function(t) {
247
247
  pe(), pt++;
248
248
  try {
@@ -258,14 +258,14 @@ function cn() {
258
258
  pt--;
259
259
  }
260
260
  }, mn = function() {
261
- return fe || (Ft = Ao(H, f), fe = !0), Ft;
262
- }, yt = s, zt = yt.implementation, me = yt.createNodeIterator, dn = yt.createDocumentFragment, hn = yt.getElementsByTagName, Tn = c.importNode;
261
+ return fe || (Ft = Ao(F, f), fe = !0), Ft;
262
+ }, yt = a, zt = yt.implementation, me = yt.createNodeIterator, dn = yt.createDocumentFragment, hn = yt.getElementsByTagName, Tn = c.importNode;
263
263
  let h = rn();
264
- r.isSupported = typeof an == "function" && typeof tt == "function" && zt && zt.createHTMLDocument !== void 0;
265
- const _n = io, gn = ao, En = so, An = lo, yn = co, bn = uo, de = fo, Sn = mo;
264
+ r.isSupported = typeof sn == "function" && typeof tt == "function" && zt && zt.createHTMLDocument !== void 0;
265
+ const gn = io, _n = so, En = ao, An = lo, yn = co, bn = uo, de = fo, Sn = mo;
266
266
  let he = en, T = null;
267
267
  const Ht = p({}, [...Ze, ...ne, ...oe, ...re, ...Je]);
268
- let _ = null;
268
+ let g = null;
269
269
  const Gt = p({}, [...Qe, ...ie, ...tn, ...Pt]);
270
270
  let v = Object.seal(ct(null, {
271
271
  tagNameCheck: {
@@ -287,7 +287,7 @@ function cn() {
287
287
  value: !1
288
288
  }
289
289
  })), mt = null, Te = null;
290
- const W = Object.seal(ct(null, {
290
+ const H = Object.seal(ct(null, {
291
291
  tagCheck: {
292
292
  writable: !0,
293
293
  configurable: !1,
@@ -301,7 +301,7 @@ function cn() {
301
301
  value: null
302
302
  }
303
303
  }));
304
- let _e = !0, Wt = !0, ge = !1, Ee = !0, B = !1, V = !0, q = !1, Bt = !1, bt = null, St = null, jt = !1, ot = !1, Ot = !1, Rt = !1, Ae = !0, ye = !1;
304
+ let ge = !0, Wt = !0, _e = !1, Ee = !0, G = !1, X = !0, V = !1, Bt = !1, bt = null, St = null, jt = !1, ot = !1, Ot = !1, Rt = !1, Ae = !0, ye = !1;
305
305
  const be = "user-content-";
306
306
  let Yt = !0, $t = !1, rt = {}, it = null;
307
307
  const Se = p({}, [
@@ -345,66 +345,66 @@ function cn() {
345
345
  const Re = p({}, ["audio", "video", "img", "source", "image", "track"]);
346
346
  let we = null;
347
347
  const De = p({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), wt = "http://www.w3.org/1998/Math/MathML", Dt = "http://www.w3.org/2000/svg", k = "http://www.w3.org/1999/xhtml";
348
- let at = k, Xt = !1, Vt = null;
349
- const On = p({}, [wt, Dt, k], ee), Le = b(["mi", "mo", "mn", "ms", "mtext"]);
348
+ let st = k, Xt = !1, Vt = null;
349
+ const On = p({}, [wt, Dt, k], ee), Le = S(["mi", "mo", "mn", "ms", "mtext"]);
350
350
  let qt = p({}, Le);
351
- const Ie = b(["annotation-xml"]);
351
+ const Ie = S(["annotation-xml"]);
352
352
  let Kt = p({}, Ie);
353
353
  const Rn = p({}, ["title", "style", "font", "a", "script"]);
354
354
  let dt = null;
355
355
  const wn = ["application/xhtml+xml", "text/html"], Dn = "text/html";
356
- let A = null, st = null;
357
- const Ln = s.createElement("form"), Ne = function(t) {
356
+ let E = null, at = null;
357
+ const Ln = a.createElement("form"), Ne = function(t) {
358
358
  return t instanceof RegExp || t instanceof Function;
359
359
  }, Zt = function() {
360
360
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
361
- if (st && st === t)
361
+ if (at && at === t)
362
362
  return;
363
363
  (!t || typeof t != "object") && (t = {}), t = C(t), dt = // eslint-disable-next-line unicorn/prefer-includes
364
- wn.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Dn : t.PARSER_MEDIA_TYPE, A = dt === "application/xhtml+xml" ? ee : Et, T = Y(t, "ALLOWED_TAGS", Ht, {
365
- transform: A
366
- }), _ = Y(t, "ALLOWED_ATTR", Gt, {
367
- transform: A
368
- }), Vt = Y(t, "ALLOWED_NAMESPACES", On, {
364
+ wn.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Dn : t.PARSER_MEDIA_TYPE, E = dt === "application/xhtml+xml" ? ee : Et, T = B(t, "ALLOWED_TAGS", Ht, {
365
+ transform: E
366
+ }), g = B(t, "ALLOWED_ATTR", Gt, {
367
+ transform: E
368
+ }), Vt = B(t, "ALLOWED_NAMESPACES", On, {
369
369
  transform: ee
370
- }), we = Y(t, "ADD_URI_SAFE_ATTR", De, {
371
- transform: A,
370
+ }), we = B(t, "ADD_URI_SAFE_ATTR", De, {
371
+ transform: E,
372
372
  base: De
373
- }), Oe = Y(t, "ADD_DATA_URI_TAGS", Re, {
374
- transform: A,
373
+ }), Oe = B(t, "ADD_DATA_URI_TAGS", Re, {
374
+ transform: E,
375
375
  base: Re
376
- }), it = Y(t, "FORBID_CONTENTS", Se, {
377
- transform: A
378
- }), mt = Y(t, "FORBID_TAGS", C({}), {
379
- transform: A
380
- }), Te = Y(t, "FORBID_ATTR", C({}), {
381
- transform: A
382
- }), rt = N(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? C(t.USE_PROFILES) : t.USE_PROFILES : !1, _e = t.ALLOW_ARIA_ATTR !== !1, Wt = t.ALLOW_DATA_ATTR !== !1, ge = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Ee = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, B = t.SAFE_FOR_TEMPLATES || !1, V = t.SAFE_FOR_XML !== !1, q = t.WHOLE_DOCUMENT || !1, ot = t.RETURN_DOM || !1, Ot = t.RETURN_DOM_FRAGMENT || !1, Rt = t.RETURN_TRUSTED_TYPE || !1, jt = t.FORCE_BODY || !1, Ae = t.SANITIZE_DOM !== !1, ye = t.SANITIZE_NAMED_PROPS || !1, Yt = t.KEEP_CONTENT !== !1, $t = t.IN_PLACE || !1, he = no(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : en, at = typeof t.NAMESPACE == "string" ? t.NAMESPACE : k, qt = ae(
376
+ }), it = B(t, "FORBID_CONTENTS", Se, {
377
+ transform: E
378
+ }), mt = B(t, "FORBID_TAGS", C({}), {
379
+ transform: E
380
+ }), Te = B(t, "FORBID_ATTR", C({}), {
381
+ transform: E
382
+ }), rt = N(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? C(t.USE_PROFILES) : t.USE_PROFILES : !1, ge = t.ALLOW_ARIA_ATTR !== !1, Wt = t.ALLOW_DATA_ATTR !== !1, _e = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Ee = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = t.SAFE_FOR_TEMPLATES || !1, X = t.SAFE_FOR_XML !== !1, V = t.WHOLE_DOCUMENT || !1, ot = t.RETURN_DOM || !1, Ot = t.RETURN_DOM_FRAGMENT || !1, Rt = t.RETURN_TRUSTED_TYPE || !1, jt = t.FORCE_BODY || !1, Ae = t.SANITIZE_DOM !== !1, ye = t.SANITIZE_NAMED_PROPS || !1, Yt = t.KEEP_CONTENT !== !1, $t = t.IN_PLACE || !1, he = no(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : en, st = typeof t.NAMESPACE == "string" ? t.NAMESPACE : k, qt = se(
383
383
  t,
384
384
  "MATHML_TEXT_INTEGRATION_POINTS",
385
385
  () => p({}, Le)
386
386
  // Default built-in map
387
- ), Kt = ae(
387
+ ), Kt = se(
388
388
  t,
389
389
  "HTML_INTEGRATION_POINTS",
390
390
  () => p({}, Ie)
391
391
  // Default built-in map
392
392
  );
393
- const e = ae(t, "CUSTOM_ELEMENT_HANDLING", () => ct(null));
394
- if (v = ct(null), N(e, "tagNameCheck") && Ne(e.tagNameCheck) && (v.tagNameCheck = e.tagNameCheck), N(e, "attributeNameCheck") && Ne(e.attributeNameCheck) && (v.attributeNameCheck = e.attributeNameCheck), N(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (v.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), S(v), B && (Wt = !1), Ot && (ot = !0), rt && (T = p({}, Je), _ = ct(null), rt.html === !0 && (p(T, Ze), p(_, Qe)), rt.svg === !0 && (p(T, ne), p(_, ie), p(_, Pt)), rt.svgFilters === !0 && (p(T, oe), p(_, ie), p(_, Pt)), rt.mathMl === !0 && (p(T, re), p(_, tn), p(_, Pt))), W.tagCheck = null, W.attributeCheck = null, N(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? W.tagCheck = t.ADD_TAGS : ut(t.ADD_TAGS) && (T === Ht && (T = C(T)), p(T, t.ADD_TAGS, A))), N(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? W.attributeCheck = t.ADD_ATTR : ut(t.ADD_ATTR) && (_ === Gt && (_ = C(_)), p(_, t.ADD_ATTR, A))), N(t, "ADD_FORBID_CONTENTS") && ut(t.ADD_FORBID_CONTENTS) && (it === Se && (it = C(it)), p(it, t.ADD_FORBID_CONTENTS, A)), Yt && (T["#text"] = !0), q && p(T, ["html", "head", "body"]), T.table && (p(T, ["tbody"]), delete mt.tbody), t.TRUSTED_TYPES_POLICY) {
393
+ const e = se(t, "CUSTOM_ELEMENT_HANDLING", () => ct(null));
394
+ if (v = ct(null), N(e, "tagNameCheck") && Ne(e.tagNameCheck) && (v.tagNameCheck = e.tagNameCheck), N(e, "attributeNameCheck") && Ne(e.attributeNameCheck) && (v.attributeNameCheck = e.attributeNameCheck), N(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (v.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), O(v), G && (Wt = !1), Ot && (ot = !0), rt && (T = p({}, Je), g = ct(null), rt.html === !0 && (p(T, Ze), p(g, Qe)), rt.svg === !0 && (p(T, ne), p(g, ie), p(g, Pt)), rt.svgFilters === !0 && (p(T, oe), p(g, ie), p(g, Pt)), rt.mathMl === !0 && (p(T, re), p(g, tn), p(g, Pt))), H.tagCheck = null, H.attributeCheck = null, N(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? H.tagCheck = t.ADD_TAGS : ut(t.ADD_TAGS) && (T === Ht && (T = C(T)), p(T, t.ADD_TAGS, E))), N(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? H.attributeCheck = t.ADD_ATTR : ut(t.ADD_ATTR) && (g === Gt && (g = C(g)), p(g, t.ADD_ATTR, E))), N(t, "ADD_FORBID_CONTENTS") && ut(t.ADD_FORBID_CONTENTS) && (it === Se && (it = C(it)), p(it, t.ADD_FORBID_CONTENTS, E)), Yt && (T["#text"] = !0), V && p(T, ["html", "head", "body"]), T.table && (p(T, ["tbody"]), delete mt.tbody), t.TRUSTED_TYPES_POLICY) {
395
395
  if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
396
- throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
396
+ throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
397
397
  if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
398
- throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
398
+ throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
399
399
  const n = D;
400
400
  D = t.TRUSTED_TYPES_POLICY;
401
401
  try {
402
- X = nt("");
403
- } catch (a) {
404
- throw D = n, a;
402
+ $ = nt("");
403
+ } catch (s) {
404
+ throw D = n, s;
405
405
  }
406
- } else t.TRUSTED_TYPES_POLICY === null ? (D = void 0, X = "") : (D === void 0 && (D = mn()), D && typeof X == "string" && (X = nt("")));
407
- b && b(t), st = t;
406
+ } else t.TRUSTED_TYPES_POLICY === null ? (D = void 0, $ = "") : (D === void 0 && (D = mn()), D && typeof $ == "string" && ($ = nt("")));
407
+ S && S(t), at = t;
408
408
  }, Me = p({}, [...ne, ...oe, ...oo]), Ce = p({}, [...re, ...ro]), In = function(t, e, n) {
409
409
  return e.namespaceURI === k ? t === "svg" : e.namespaceURI === wt ? t === "svg" && (n === "annotation-xml" || qt[n]) : !!Me[t];
410
410
  }, Nn = function(t, e, n) {
@@ -414,12 +414,12 @@ function cn() {
414
414
  }, Cn = function(t) {
415
415
  let e = tt(t);
416
416
  (!e || !e.tagName) && (e = {
417
- namespaceURI: at,
417
+ namespaceURI: st,
418
418
  tagName: "template"
419
419
  });
420
- const n = Et(t.tagName), a = Et(e.tagName);
421
- return Vt[t.namespaceURI] ? t.namespaceURI === Dt ? In(n, e, a) : t.namespaceURI === wt ? Nn(n, e, a) : t.namespaceURI === k ? Mn(n, e, a) : !!(dt === "application/xhtml+xml" && Vt[t.namespaceURI]) : !1;
422
- }, j = function(t) {
420
+ const n = Et(t.tagName), s = Et(e.tagName);
421
+ return Vt[t.namespaceURI] ? t.namespaceURI === Dt ? In(n, e, s) : t.namespaceURI === wt ? Nn(n, e, s) : t.namespaceURI === k ? Mn(n, e, s) : !!(dt === "application/xhtml+xml" && Vt[t.namespaceURI]) : !1;
422
+ }, W = function(t) {
423
423
  Tt(r.removed, {
424
424
  element: t
425
425
  });
@@ -427,7 +427,7 @@ function cn() {
427
427
  tt(t).removeChild(t);
428
428
  } catch {
429
429
  if (vt(t), !tt(t))
430
- throw Z("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
430
+ throw K("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
431
431
  }
432
432
  }, xe = function(t, e, n) {
433
433
  try {
@@ -442,10 +442,10 @@ function cn() {
442
442
  It(t);
443
443
  const e = Q(t);
444
444
  if (e) {
445
- const a = [];
446
- J(e, (l) => {
447
- Tt(a, l);
448
- }), J(a, (l) => {
445
+ const s = [];
446
+ Z(e, (l) => {
447
+ Tt(s, l);
448
+ }), Z(s, (l) => {
449
449
  try {
450
450
  vt(l);
451
451
  } catch {
@@ -454,11 +454,11 @@ function cn() {
454
454
  }
455
455
  const n = kt(t);
456
456
  if (n)
457
- for (let a = n.length - 1; a >= 0; --a) {
458
- const l = n[a], u = l && l.name;
457
+ for (let s = n.length - 1; s >= 0; --s) {
458
+ const l = n[s], u = l && l.name;
459
459
  typeof u == "string" && xe(t, l, u);
460
460
  }
461
- }, K = function(t, e, n) {
461
+ }, q = function(t, e, n) {
462
462
  if (!n)
463
463
  try {
464
464
  n = e.getAttributeNode(t);
@@ -480,7 +480,7 @@ function cn() {
480
480
  if (t === "is")
481
481
  if (ot || Ot)
482
482
  try {
483
- j(e);
483
+ W(e);
484
484
  } catch {
485
485
  }
486
486
  else
@@ -492,8 +492,8 @@ function cn() {
492
492
  const e = kt(t);
493
493
  if (e)
494
494
  for (let n = e.length - 1; n >= 0; --n) {
495
- const a = e[n], l = a && a.name;
496
- typeof l != "string" || _[A(l)] || xe(t, a, l);
495
+ const s = e[n], l = s && s.name;
496
+ typeof l != "string" || g[E(l)] || xe(t, s, l);
497
497
  }
498
498
  }, It = function(t) {
499
499
  const e = [t];
@@ -506,24 +506,24 @@ function cn() {
506
506
  e.push(l[u]);
507
507
  }
508
508
  }, Pe = function(t, e) {
509
- return V ? t === "patchsrc" ? !0 : t === "for" && e !== "label" && e !== "output" : !1;
509
+ return X ? t === "patchsrc" ? !0 : t === "for" && e !== "label" && e !== "output" : !1;
510
510
  }, Pn = function(t) {
511
- if (!V)
511
+ if (!X)
512
512
  return;
513
513
  const e = [t];
514
514
  for (; e.length > 0; ) {
515
- const n = e.pop(), a = ft(n);
516
- if (a === M.processingInstruction || a === M.comment && O(on, n.data)) {
515
+ const n = e.pop(), s = ft(n);
516
+ if (s === M.processingInstruction || s === M.comment && R(on, n.data)) {
517
517
  try {
518
518
  vt(n);
519
519
  } catch {
520
520
  }
521
521
  continue;
522
522
  }
523
- if (a === M.element) {
524
- const u = n, m = A(Ut(n));
523
+ if (s === M.element) {
524
+ const u = n, d = E(Ut(n));
525
525
  try {
526
- u.hasAttribute && u.hasAttribute("patchsrc") && u.removeAttribute("patchsrc"), u.hasAttribute && u.hasAttribute("for") && Pe("for", m) && u.removeAttribute("for");
526
+ u.hasAttribute && u.hasAttribute("patchsrc") && u.removeAttribute("patchsrc"), u.hasAttribute && u.hasAttribute("for") && Pe("for", d) && u.removeAttribute("for");
527
527
  } catch {
528
528
  }
529
529
  }
@@ -540,53 +540,53 @@ function cn() {
540
540
  const u = Xe(t, /^[\r\n\t ]+/);
541
541
  n = u && u[0];
542
542
  }
543
- dt === "application/xhtml+xml" && at === k && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
544
- const a = D ? nt(t) : t;
545
- if (at === k)
543
+ dt === "application/xhtml+xml" && st === k && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
544
+ const s = D ? nt(t) : t;
545
+ if (st === k)
546
546
  try {
547
- e = new z().parseFromString(a, dt);
547
+ e = new J().parseFromString(s, dt);
548
548
  } catch {
549
549
  }
550
550
  if (!e || !e.documentElement) {
551
- e = zt.createDocument(at, "template", null);
551
+ e = zt.createDocument(st, "template", null);
552
552
  try {
553
- e.documentElement.innerHTML = Xt ? X : a;
553
+ e.documentElement.innerHTML = Xt ? $ : s;
554
554
  } catch {
555
555
  }
556
556
  }
557
557
  const l = e.body || e.documentElement;
558
- return t && n && l.insertBefore(s.createTextNode(n), l.childNodes[0] || null), at === k ? hn.call(e, q ? "html" : "body")[0] : q ? e.documentElement : l;
558
+ return t && n && l.insertBefore(a.createTextNode(n), l.childNodes[0] || null), st === k ? hn.call(e, V ? "html" : "body")[0] : V ? e.documentElement : l;
559
559
  }, ke = function(t) {
560
560
  const e = At ? At(t) : t.ownerDocument;
561
561
  return me.call(
562
562
  e || t,
563
563
  t,
564
564
  // eslint-disable-next-line no-bitwise
565
- R.SHOW_ELEMENT | R.SHOW_COMMENT | R.SHOW_TEXT | R.SHOW_PROCESSING_INSTRUCTION | R.SHOW_CDATA_SECTION,
565
+ y.SHOW_ELEMENT | y.SHOW_COMMENT | y.SHOW_TEXT | y.SHOW_PROCESSING_INSTRUCTION | y.SHOW_CDATA_SECTION,
566
566
  null
567
567
  );
568
568
  }, Nt = function(t) {
569
- return t = _t(t, _n, " "), t = _t(t, gn, " "), t = _t(t, En, " "), t;
569
+ return t = gt(t, gn, " "), t = gt(t, _n, " "), t = gt(t, En, " "), t;
570
570
  }, Jt = function(t) {
571
571
  var e;
572
572
  t.normalize();
573
- const n = At ? At(t) : t.ownerDocument, a = me.call(
573
+ const n = At ? At(t) : t.ownerDocument, s = me.call(
574
574
  n || t,
575
575
  t,
576
576
  // eslint-disable-next-line no-bitwise
577
- R.SHOW_TEXT | R.SHOW_COMMENT | R.SHOW_CDATA_SECTION | R.SHOW_PROCESSING_INSTRUCTION,
577
+ y.SHOW_TEXT | y.SHOW_COMMENT | y.SHOW_CDATA_SECTION | y.SHOW_PROCESSING_INSTRUCTION,
578
578
  null
579
579
  );
580
- let l = a.nextNode();
580
+ let l = s.nextNode();
581
581
  for (; l; )
582
- l.data = Nt(l.data), l = a.nextNode();
582
+ l.data = Nt(l.data), l = s.nextNode();
583
583
  const u = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
584
- u && J(u, (m) => {
585
- lt(m.content) && Jt(m.content);
584
+ u && Z(u, (d) => {
585
+ lt(d.content) && Jt(d.content);
586
586
  });
587
587
  }, Mt = function(t) {
588
588
  const e = et ? et(t) : null;
589
- return typeof e != "string" || A(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
589
+ return typeof e != "string" || E(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
590
590
  // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
591
591
  // makes the direct read diverge from the cached read; a clean form
592
592
  // (same-realm OR foreign-realm) has both reads pointing at the same
@@ -607,7 +607,7 @@ function cn() {
607
607
  // an internal slot, no serialization cost — and removes a residual
608
608
  // clobbering surface used by several mXSS / PI / comment branches
609
609
  // in _sanitizeElements that compare currentNode.nodeType directly.
610
- t.nodeType !== $(t) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
610
+ t.nodeType !== Y(t) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
611
611
  // "childNodes" shadows the prototype getter. Direct reads of
612
612
  // form.childNodes from a clobbered form return the named child
613
613
  // instead of the real NodeList, so any walk that reads it directly
@@ -620,76 +620,76 @@ function cn() {
620
620
  // (e.g. HTMLSelectElement.length is a defined unsigned-long).
621
621
  t.childNodes !== Q(t);
622
622
  }, lt = function(t) {
623
- if (!$ || typeof t != "object" || t === null)
623
+ if (!Y || typeof t != "object" || t === null)
624
624
  return !1;
625
625
  try {
626
- return $(t) === M.documentFragment;
626
+ return Y(t) === M.documentFragment;
627
627
  } catch {
628
628
  return !1;
629
629
  }
630
630
  }, ht = function(t) {
631
- if (!$ || typeof t != "object" || t === null)
631
+ if (!Y || typeof t != "object" || t === null)
632
632
  return !1;
633
633
  try {
634
- return typeof $(t) == "number";
634
+ return typeof Y(t) == "number";
635
635
  } catch {
636
636
  return !1;
637
637
  }
638
638
  };
639
639
  function U(i, t, e) {
640
- i.length !== 0 && J(i, (n) => {
641
- n.call(r, t, e, st);
640
+ i.length !== 0 && Z(i, (n) => {
641
+ n.call(r, t, e, at);
642
642
  });
643
643
  }
644
644
  const vn = function(t, e) {
645
- return !!(V && t.hasChildNodes() && !ht(t.firstElementChild) && O(nn, t.textContent) && O(nn, t.innerHTML) || V && t.namespaceURI === k && _o[e] && (ht(t.firstElementChild) || typeof t.textContent == "string" && O(go[e], t.textContent)) || t.nodeType === M.processingInstruction || V && t.nodeType === M.comment && O(on, t.data));
645
+ return !!(X && t.hasChildNodes() && !ht(t.firstElementChild) && R(nn, t.textContent) && R(nn, t.innerHTML) || X && t.namespaceURI === k && go[e] && (ht(t.firstElementChild) || typeof t.textContent == "string" && R(_o[e], t.textContent)) || t.nodeType === M.processingInstruction || X && t.nodeType === M.comment && R(on, t.data));
646
646
  }, Ct = function(t, e) {
647
647
  if (t instanceof RegExp)
648
- return O(t, e);
648
+ return R(t, e);
649
649
  if (t instanceof Function) {
650
- for (var n = arguments.length, a = new Array(n > 2 ? n - 2 : 0), l = 2; l < n; l++)
651
- a[l - 2] = arguments[l];
652
- return !!t(e, ...a);
650
+ for (var n = arguments.length, s = new Array(n > 2 ? n - 2 : 0), l = 2; l < n; l++)
651
+ s[l - 2] = arguments[l];
652
+ return !!t(e, ...s);
653
653
  }
654
654
  return !1;
655
655
  }, kn = function(t, e, n) {
656
656
  if (!mt[e] && Ge(e) && Ct(v.tagNameCheck, e))
657
657
  return !1;
658
658
  if (Yt && !it[e]) {
659
- const a = tt(t), l = Q(t);
660
- if (l && a) {
659
+ const s = tt(t), l = Q(t);
660
+ if (l && s) {
661
661
  const u = l.length;
662
- for (let m = u - 1; m >= 0; --m) {
663
- const g = t === n ? un(l[m], !0) : l[m];
664
- a.insertBefore(g, fn(t));
662
+ for (let d = u - 1; d >= 0; --d) {
663
+ const _ = t === n ? un(l[d], !0) : l[d];
664
+ s.insertBefore(_, fn(t));
665
665
  }
666
666
  }
667
667
  }
668
- return j(t), !0;
669
- }, Ue = function(t, e, n, a) {
670
- return t.length === 0 ? e : e === n || e === a ? C(e) : e;
668
+ return W(t), !0;
669
+ }, Ue = function(t, e, n, s) {
670
+ return t.length === 0 ? e : e === n || e === s ? C(e) : e;
671
671
  }, Fe = function(t, e) {
672
672
  return t === e || tt(t) !== null ? !1 : ($t && It(t), !0);
673
673
  }, ze = function(t, e) {
674
674
  if (U(h.beforeSanitizeElements, t, null), Fe(t, e))
675
675
  return !0;
676
676
  if (Mt(t))
677
- return j(t), !0;
678
- const n = A(Ut(t));
677
+ return W(t), !0;
678
+ const n = E(Ut(t));
679
679
  if (T = Ue(h.uponSanitizeElement, T, Ht, bt), U(h.uponSanitizeElement, t, {
680
680
  tagName: n,
681
681
  allowedTags: T
682
682
  }), Fe(t, e))
683
683
  return !0;
684
684
  if (vn(t, n))
685
- return j(t), !0;
686
- if (mt[n] || !(W.tagCheck instanceof Function && W.tagCheck(n)) && !T[n]) {
685
+ return W(t), !0;
686
+ if (mt[n] || !(H.tagCheck instanceof Function && H.tagCheck(n)) && !T[n]) {
687
687
  const l = kn(t, n, e);
688
688
  return l === !1 && U(h.afterSanitizeElements, t, null), l;
689
689
  }
690
- if (ft(t) === M.element && !Cn(t) || (n === "noscript" || n === "noembed" || n === "noframes") && O(ho, t.innerHTML))
691
- return j(t), !0;
692
- if (B && t.nodeType === M.text) {
690
+ if (ft(t) === M.element && !Cn(t) || (n === "noscript" || n === "noembed" || n === "noframes") && R(ho, t.innerHTML))
691
+ return W(t), !0;
692
+ if (G && t.nodeType === M.text) {
693
693
  const l = Nt(t.textContent);
694
694
  t.textContent !== l && (Tt(r.removed, {
695
695
  element: t.cloneNode()
@@ -697,10 +697,10 @@ function cn() {
697
697
  }
698
698
  return U(h.afterSanitizeElements, t, null), !1;
699
699
  }, He = function(t, e, n) {
700
- if (Te[e] || Pe(e, t) || Ae && (e === "id" || e === "name") && (n in s || n in Ln))
700
+ if (Te[e] || Pe(e, t) || Ae && (e === "id" || e === "name") && (n in a || n in Ln))
701
701
  return !1;
702
- const a = _[e] || W.attributeCheck instanceof Function && W.attributeCheck(e, t);
703
- return Wt && O(An, e) || _e && O(yn, e) ? !0 : a ? we[e] || O(he, _t(n, de, "")) || (e === "src" || e === "xlink:href" || e === "href") && t !== "script" && Ve(n, "data:") === 0 && Oe[t] || ge && !O(bn, _t(n, de, "")) ? !0 : !n : (
702
+ const s = g[e] || H.attributeCheck instanceof Function && H.attributeCheck(e, t);
703
+ return Wt && R(An, e) || ge && R(yn, e) ? !0 : s ? we[e] || R(he, gt(n, de, "")) || (e === "src" || e === "xlink:href" || e === "href") && t !== "script" && Ve(n, "data:") === 0 && Oe[t] || _e && !R(bn, gt(n, de, "")) ? !0 : !n : (
704
704
  // Condition a) covers a basically valid custom element tag name whose
705
705
  // tag passes the configured tagNameCheck and whose attribute name
706
706
  // passes the configured attributeNameCheck ...
@@ -710,62 +710,62 @@ function cn() {
710
710
  e === "is" && v.allowCustomizedBuiltInElements && Ct(v.tagNameCheck, n)
711
711
  );
712
712
  }, Un = p({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), Ge = function(t) {
713
- return !Un[Et(t)] && O(Sn, t);
714
- }, Fn = function(t, e, n, a) {
715
- if (D && typeof H == "object" && typeof H.getAttributeType == "function" && !n)
716
- switch (H.getAttributeType(t, e)) {
713
+ return !Un[Et(t)] && R(Sn, t);
714
+ }, Fn = function(t, e, n, s) {
715
+ if (D && typeof F == "object" && typeof F.getAttributeType == "function" && !n)
716
+ switch (F.getAttributeType(t, e)) {
717
717
  case "TrustedHTML":
718
- return nt(a);
718
+ return nt(s);
719
719
  case "TrustedScriptURL":
720
- return pn(a);
720
+ return pn(s);
721
721
  }
722
- return a;
723
- }, zn = function(t, e, n, a) {
722
+ return s;
723
+ }, zn = function(t, e, n, s) {
724
724
  try {
725
- return n ? t.setAttributeNS(n, e, a) : t.setAttribute(e, a), Mt(t) ? (j(t), !1) : !0;
725
+ return n ? t.setAttributeNS(n, e, s) : t.setAttribute(e, s), Mt(t) ? (W(t), !1) : !0;
726
726
  } catch {
727
- return K(e, t), !1;
727
+ return q(e, t), !1;
728
728
  }
729
729
  }, We = function(t) {
730
730
  U(h.beforeSanitizeAttributes, t, null);
731
731
  const e = t.attributes;
732
732
  if (!e || Mt(t))
733
733
  return;
734
- _ = Ue(h.uponSanitizeAttribute, _, Gt, St);
734
+ g = Ue(h.uponSanitizeAttribute, g, Gt, St);
735
735
  const n = {
736
736
  attrName: "",
737
737
  attrValue: "",
738
738
  keepAttr: !0,
739
- allowedAttributes: _,
739
+ allowedAttributes: g,
740
740
  forceKeepAttr: void 0
741
741
  };
742
- let a = e.length;
743
- const l = A(t.nodeName);
744
- for (; a--; ) {
745
- const u = e[a], m = u.name, g = u.namespaceURI, L = u.value, I = A(m), te = L;
746
- let w = m === "value" ? te : Kn(te), Be = !1;
747
- if (n.attrName = I, n.attrValue = w, n.keepAttr = !0, n.forceKeepAttr = void 0, U(h.uponSanitizeAttribute, t, n), w = n.attrValue, ye && (I === "id" || I === "name") && Ve(w, be) !== 0 && (K(m, t, u), w = be + w, Be = !0), V && O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, w)) {
748
- K(m, t, u);
742
+ let s = e.length;
743
+ const l = E(t.nodeName);
744
+ for (; s--; ) {
745
+ const u = e[s], d = u.name, _ = u.namespaceURI, L = u.value, I = E(d), te = L;
746
+ let w = d === "value" ? te : Kn(te), Be = !1;
747
+ if (n.attrName = I, n.attrValue = w, n.keepAttr = !0, n.forceKeepAttr = void 0, U(h.uponSanitizeAttribute, t, n), w = n.attrValue, ye && (I === "id" || I === "name") && Ve(w, be) !== 0 && (q(d, t, u), w = be + w, Be = !0), X && R(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, w)) {
748
+ q(d, t, u);
749
749
  continue;
750
750
  }
751
751
  if (I === "attributename" && Xe(w, "href")) {
752
- K(m, t, u);
752
+ q(d, t, u);
753
753
  continue;
754
754
  }
755
755
  if (!n.forceKeepAttr) {
756
756
  if (!n.keepAttr) {
757
- K(m, t, u);
757
+ q(d, t, u);
758
758
  continue;
759
759
  }
760
- if (!Ee && O(To, w)) {
761
- K(m, t, u);
760
+ if (!Ee && R(To, w)) {
761
+ q(d, t, u);
762
762
  continue;
763
763
  }
764
- if (B && (w = Nt(w)), !He(l, I, w)) {
765
- K(m, t, u);
764
+ if (G && (w = Nt(w)), !He(l, I, w)) {
765
+ q(d, t, u);
766
766
  continue;
767
767
  }
768
- w = Fn(l, I, g, w), w !== te && zn(t, m, g, w) && Be && $e(r.removed);
768
+ w = Fn(l, I, _, w), w !== te && zn(t, d, _, w) && Be && $e(r.removed);
769
769
  }
770
770
  }
771
771
  U(h.afterSanitizeAttributes, t, null);
@@ -774,8 +774,8 @@ function cn() {
774
774
  const n = ke(t);
775
775
  for (U(h.beforeSanitizeShadowDOM, t, null); e = n.nextNode(); )
776
776
  if (U(h.uponSanitizeShadowNode, e, null), ze(e, t), We(e), lt(e.content) && xt(e.content), ft(e) === M.element) {
777
- const a = ue(e);
778
- lt(a) && (Qt(a), xt(a));
777
+ const s = ue(e);
778
+ lt(s) && (Qt(s), xt(s));
779
779
  }
780
780
  U(h.afterSanitizeShadowDOM, t, null);
781
781
  }, Qt = function(t) {
@@ -789,17 +789,17 @@ function cn() {
789
789
  xt(n.shadow);
790
790
  continue;
791
791
  }
792
- const a = n.node, u = ft(a) === M.element, m = Q(a);
793
- if (m)
794
- for (let g = m.length - 1; g >= 0; --g)
792
+ const s = n.node, u = ft(s) === M.element, d = Q(s);
793
+ if (d)
794
+ for (let _ = d.length - 1; _ >= 0; --_)
795
795
  e.push({
796
- node: m[g],
796
+ node: d[_],
797
797
  shadow: null
798
798
  });
799
799
  if (u) {
800
- const g = et ? et(a) : null;
801
- if (typeof g == "string" && A(g) === "template") {
802
- const L = a.content;
800
+ const _ = et ? et(s) : null;
801
+ if (typeof _ == "string" && E(_) === "template") {
802
+ const L = s.content;
803
803
  lt(L) && e.push({
804
804
  node: L,
805
805
  shadow: null
@@ -807,35 +807,35 @@ function cn() {
807
807
  }
808
808
  }
809
809
  if (u) {
810
- const g = ue(a);
811
- lt(g) && e.push({
810
+ const _ = ue(s);
811
+ lt(_) && e.push({
812
812
  node: null,
813
- shadow: g
813
+ shadow: _
814
814
  }, {
815
- node: g,
815
+ node: _,
816
816
  shadow: null
817
817
  });
818
818
  }
819
819
  }
820
820
  };
821
821
  return r.sanitize = function(i) {
822
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, n = null, a = null, l = null;
822
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, n = null, s = null, l = null;
823
823
  if (Xt = !i, Xt && (i = "<!-->"), typeof i != "string" && !ht(i) && (i = eo(i), typeof i != "string"))
824
- throw Z("dirty is not a string, aborting");
824
+ throw K("dirty is not a string, aborting");
825
825
  if (!r.isSupported)
826
826
  return i;
827
- Bt ? (T = bt, _ = St) : Zt(t), (h.uponSanitizeElement.length > 0 || h.uponSanitizeAttribute.length > 0) && (T = C(T)), h.uponSanitizeAttribute.length > 0 && (_ = C(_)), r.removed = [];
827
+ Bt ? (T = bt, g = St) : Zt(t), (h.uponSanitizeElement.length > 0 || h.uponSanitizeAttribute.length > 0) && (T = C(T)), h.uponSanitizeAttribute.length > 0 && (g = C(g)), r.removed = [];
828
828
  const u = $t && typeof i != "string" && ht(i);
829
829
  if (u) {
830
830
  Pn(i);
831
831
  const L = Ut(i);
832
832
  if (typeof L == "string") {
833
- const I = A(L);
833
+ const I = E(L);
834
834
  if (!T[I] || mt[I])
835
- throw Lt(i), Z("root node is forbidden and cannot be sanitized in-place");
835
+ throw Lt(i), K("root node is forbidden and cannot be sanitized in-place");
836
836
  }
837
837
  if (Mt(i))
838
- throw Lt(i), Z("root node is clobbered and cannot be sanitized in-place");
838
+ throw Lt(i), K("root node is clobbered and cannot be sanitized in-place");
839
839
  try {
840
840
  Qt(i);
841
841
  } catch (I) {
@@ -844,47 +844,47 @@ function cn() {
844
844
  } else if (ht(i))
845
845
  e = ve("<!---->"), n = e.ownerDocument.importNode(i, !0), n.nodeType === M.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? e = n : e.appendChild(n), Qt(e);
846
846
  else {
847
- if (!ot && !B && !q && // eslint-disable-next-line unicorn/prefer-includes
847
+ if (!ot && !G && !V && // eslint-disable-next-line unicorn/prefer-includes
848
848
  i.indexOf("<") === -1)
849
849
  return D && Rt ? nt(i) : i;
850
850
  if (e = ve(i), !e)
851
- return ot ? null : Rt ? X : "";
851
+ return ot ? null : Rt ? $ : "";
852
852
  }
853
- e && jt && j(e.firstChild);
854
- const m = u ? i : e;
853
+ e && jt && W(e.firstChild);
854
+ const d = u ? i : e;
855
855
  try {
856
- const L = ke(m);
857
- for (; a = L.nextNode(); )
858
- ze(a, m), We(a), lt(a.content) && xt(a.content);
856
+ const L = ke(d);
857
+ for (; s = L.nextNode(); )
858
+ ze(s, d), We(s), lt(s.content) && xt(s.content);
859
859
  } catch (L) {
860
- throw u && (Lt(i), J(r.removed, (I) => {
860
+ throw u && (Lt(i), Z(r.removed, (I) => {
861
861
  I.element && It(I.element);
862
862
  })), L;
863
863
  }
864
864
  if (u)
865
- return J(r.removed, (L) => {
865
+ return Z(r.removed, (L) => {
866
866
  L.element && It(L.element);
867
- }), B && Jt(i), i;
867
+ }), G && Jt(i), i;
868
868
  if (ot) {
869
- if (B && Jt(e), Ot)
869
+ if (G && Jt(e), Ot)
870
870
  for (l = dn.call(e.ownerDocument); e.firstChild; )
871
871
  l.appendChild(e.firstChild);
872
872
  else
873
873
  l = e;
874
- return (_.shadowroot || _.shadowrootmode) && (l = Tn.call(c, l, !0)), l;
874
+ return (g.shadowroot || g.shadowrootmode) && (l = Tn.call(c, l, !0)), l;
875
875
  }
876
- let g = q ? e.outerHTML : e.innerHTML;
877
- return q && T["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && O(po, e.ownerDocument.doctype.name) && (g = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
878
- ` + g), B && (g = Nt(g)), D && Rt ? nt(g) : g;
876
+ let _ = V ? e.outerHTML : e.innerHTML;
877
+ return V && T["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && R(po, e.ownerDocument.doctype.name) && (_ = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
878
+ ` + _), G && (_ = Nt(_)), D && Rt ? nt(_) : _;
879
879
  }, r.setConfig = function() {
880
880
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
881
- Zt(i), Bt = !0, bt = T, St = _;
881
+ Zt(i), Bt = !0, bt = T, St = g;
882
882
  }, r.clearConfig = function() {
883
- st = null, Bt = !1, bt = null, St = null, D = Ft, X = "";
883
+ at = null, Bt = !1, bt = null, St = null, D = Ft, $ = "";
884
884
  }, r.isValidAttribute = function(i, t, e) {
885
- st || Zt({});
886
- const n = A(i), a = A(t);
887
- return He(n, a, e);
885
+ at || Zt({});
886
+ const n = E(i), s = E(t);
887
+ return He(n, s, e);
888
888
  }, r.addHook = function(i, t) {
889
889
  typeof t == "function" && N(h, i) && Tt(h[i], t);
890
890
  }, r.removeHook = function(i, t) {
@@ -902,14 +902,14 @@ function cn() {
902
902
  }, r;
903
903
  }
904
904
  var yo = cn();
905
- async function So(o, r, s = !1) {
906
- var E;
905
+ async function So(o, r, a = !1, c = !1) {
906
+ var z;
907
907
  if (o.length > 1e5)
908
908
  throw new Error("Preview source exceeds 100,000 characters.");
909
- const c = crypto.randomUUID();
910
- let f;
909
+ const f = crypto.randomUUID();
910
+ let m;
911
911
  if (r === "html")
912
- f = yo.sanitize(o, {
912
+ m = yo.sanitize(o, {
913
913
  WHOLE_DOCUMENT: !0,
914
914
  ADD_TAGS: ["style"],
915
915
  FORBID_TAGS: [
@@ -925,38 +925,51 @@ async function So(o, r, s = !1) {
925
925
  FORBID_ATTR: ["href", "action", "formaction", "srcset"]
926
926
  });
927
927
  else {
928
- const [x, { default: R }] = await Promise.all([
928
+ const [y, { default: j }] = await Promise.all([
929
929
  import("typescript"),
930
930
  import("./_virtual_content-preview-runtime-X_KtOyFO.js")
931
- ]), F = x.transpileModule(o, {
931
+ ]), J = y.transpileModule(o, {
932
932
  fileName: "preview.tsx",
933
933
  reportDiagnostics: !0,
934
934
  compilerOptions: {
935
- jsx: x.JsxEmit.React,
936
- module: x.ModuleKind.CommonJS,
937
- target: x.ScriptTarget.ES2020,
935
+ jsx: y.JsxEmit.React,
936
+ module: y.ModuleKind.CommonJS,
937
+ target: y.ScriptTarget.ES2020,
938
938
  esModuleInterop: !0
939
939
  }
940
- }), z = (E = F.diagnostics) == null ? void 0 : E.filter(
941
- (H) => H.category === x.DiagnosticCategory.Error
940
+ }), F = (z = J.diagnostics) == null ? void 0 : z.filter(
941
+ (x) => x.category === y.DiagnosticCategory.Error
942
942
  );
943
- if (z != null && z.length)
943
+ if (F != null && F.length)
944
944
  throw new Error(
945
- z.map(
946
- (H) => x.flattenDiagnosticMessageText(H.messageText, `
945
+ F.map(
946
+ (x) => y.flattenDiagnosticMessageText(x.messageText, `
947
947
  `)
948
948
  ).join(`
949
949
  `)
950
950
  );
951
- f = `<div id="preview"></div><script type="application/json" id="source">${JSON.stringify(F.outputText).replace(/</g, "\\u003c")}<\/script><script nonce="${c}">${R.replace(/<\/script/gi, "<\\/script")}<\/script>`;
951
+ m = `<div id="preview"></div><script type="application/json" id="source">${JSON.stringify(J.outputText).replace(/</g, "\\u003c")}<\/script><script nonce="${f}">${j.replace(/<\/script/gi, "<\\/script")}<\/script>`;
952
952
  }
953
- return s && (f += `<script nonce="${c}">document.addEventListener('dblclick', function(event) {
953
+ return a && (m += `<script nonce="${f}">document.addEventListener('dblclick', function(event) {
954
954
  if (event.defaultPrevented || !(event.target instanceof Element) || event.target.closest('button, a, input, textarea, select, video, audio, [contenteditable], [role="button"], [role="textbox"]')) return;
955
955
  event.preventDefault();
956
956
  parent.postMessage({type: 'squeed:content-edit'}, '*');
957
- });<\/script>`), `<!doctype html><html><head><meta http-equiv="Content-Security-Policy" content="${`default-src 'none'; script-src ${r === "jsx" ? `'nonce-${c}' 'unsafe-eval'` : s ? `'nonce-${c}'` : "'none'"}; style-src 'unsafe-inline'; img-src data: blob:; media-src https: data: blob:; connect-src 'none'; base-uri 'none'; form-action 'none'; frame-src 'none';`}"><meta name="referrer" content="no-referrer"><style>html{color-scheme:light}body{margin:0;padding:0;font:16px/1.5 sans-serif;color:#18181b;background:white;overflow-wrap:anywhere}*{box-sizing:border-box}img{max-width:100%}pre{white-space:pre-wrap}</style></head><body>${f}</body></html>`;
957
+ });<\/script>`), c && (m += `<style>body{display:flow-root}</style><script nonce="${f}">(() => {
958
+ let previous = 0;
959
+ const report = () => {
960
+ const height = Math.ceil(Math.max(document.body.getBoundingClientRect().height, document.body.scrollHeight));
961
+ if (height > 0 && height !== previous) {
962
+ previous = height;
963
+ parent.postMessage({type: 'squeed:content-size', height}, '*');
964
+ }
965
+ };
966
+ new ResizeObserver(report).observe(document.body);
967
+ window.addEventListener('load', report);
968
+ document.fonts.ready.then(report);
969
+ report();
970
+ })();<\/script>`), `<!doctype html><html><head><meta http-equiv="Content-Security-Policy" content="${`default-src 'none'; script-src ${r === "jsx" ? `'nonce-${f}' 'unsafe-eval'` : a || c ? `'nonce-${f}'` : "'none'"}; style-src 'unsafe-inline'; img-src data: blob:; media-src https: data: blob:; connect-src 'none'; base-uri 'none'; form-action 'none'; frame-src 'none';`}"><meta name="referrer" content="no-referrer"><style>html{color-scheme:light}body{margin:0;padding:0;font:16px/1.5 sans-serif;color:#18181b;background:white;overflow-wrap:anywhere}*{box-sizing:border-box}img{max-width:100%}pre{white-space:pre-wrap}</style></head><body>${m}</body></html>`;
958
971
  }
959
972
  export {
960
973
  So as contentPreviewDocument
961
974
  };
962
- //# sourceMappingURL=contentPreviewDocument-C2D0H-Lr.js.map
975
+ //# sourceMappingURL=contentPreviewDocument-Bhsc4K4s.js.map