@blogmcp/sdk 0.9.3 → 0.10.0

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