@ianicdev/datatables2 0.14.1 → 0.14.3

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 (44) hide show
  1. package/dist/{Comparison-B1k718kG.cjs → Comparison-CVzXvlvi.cjs} +1 -1
  2. package/dist/{Comparison-DTzJRNSy.js → Comparison-DAi7Aa9Z.js} +1 -1
  3. package/dist/{Datepicker-C_KKuvSU.js → Datepicker-B7xBy8ax.js} +2 -2
  4. package/dist/{Datepicker-S2Vl_t28.cjs → Datepicker-cMcdVoo-.cjs} +1 -1
  5. package/dist/{Options-EhfS46B8.cjs → Options-C3emML2G.cjs} +1 -1
  6. package/dist/{Options-Bj3Jo-IP.js → Options-CU-1JVgX.js} +4 -4
  7. package/dist/{RefreshTable-Dq7B7xo2.js → RefreshTable-CwUjsUL-.js} +1 -1
  8. package/dist/{RefreshTable-Bs1a9PJD.cjs → RefreshTable-DJZ4Mh3v.cjs} +1 -1
  9. package/dist/{Search-CRW-DZiL.js → Search-1fAth3WQ.js} +2 -2
  10. package/dist/{Search-BWy8k_Eg.cjs → Search-DGxvHCPT.cjs} +1 -1
  11. package/dist/{Table-Du0Te7Zd.cjs → Table-Cu5iRUDI.cjs} +1 -1
  12. package/dist/{Table-spuLCMf3.js → Table-_a4frupi.js} +3 -3
  13. package/dist/{TableServer-lxgN28QV.js → TableServer-BYZRdHOm.js} +3 -3
  14. package/dist/{TableServer-BRxInTYw.cjs → TableServer-P8AR1Ehx.cjs} +1 -1
  15. package/dist/{TableVirtual-DHsPiFBj.cjs → TableVirtual-BXKTIFbT.cjs} +1 -1
  16. package/dist/{TableVirtual-CNTcgkyE.js → TableVirtual-Dde-7AHU.js} +3 -3
  17. package/dist/{cellRender-Bhtc4Itp.js → cellRender-BEgL0JTW.js} +2 -2
  18. package/dist/{cellRender-DnNtKWhj.cjs → cellRender-DL4HpIUi.cjs} +1 -1
  19. package/dist/{dataTables-CWzjBBzz.js → dataTables-BxaRRppW.js} +1 -1
  20. package/dist/{dataTables-DyiBukfs.cjs → dataTables-DYlTkxTh.cjs} +1 -1
  21. package/dist/datatables.cjs +1 -1
  22. package/dist/datatables.js +1 -1
  23. package/dist/{index-ka-ZCwwl.js → index-B5bmSQsY.js} +2 -2
  24. package/dist/{index-Bkdn_tzR.js → index-BSbsesD7.js} +2 -2
  25. package/dist/{index-CaNvcRDB.cjs → index-BWIPrvi7.cjs} +1 -1
  26. package/dist/{index-tBoBj0Rj.js → index-CPbEDu9V.js} +2 -2
  27. package/dist/{index-CBlqNooE.cjs → index-CrG_xjXa.cjs} +1 -1
  28. package/dist/{index-BIU6vg82.js → index-CxAv-tAe.js} +5 -5
  29. package/dist/{index-BzQgkBK3.cjs → index-DX660s8h.cjs} +1 -1
  30. package/dist/{index-DIZGGvJw.cjs → index-nlE2tt5U.cjs} +1 -1
  31. package/dist/{index.es-2MQhREvK.cjs → index.es-CMEgL8sb.cjs} +1 -1
  32. package/dist/{index.es-BFlnZJ5-.js → index.es-DlohF0Sr.js} +1 -1
  33. package/dist/{jspdf--k_BCiS7.js → jspdf-C3bweOu8.js} +10 -7
  34. package/dist/{jspdf-Hm0oHFrh.cjs → jspdf-DOJt5cTR.cjs} +3 -3
  35. package/dist/purify.es-Dnh2QiaB.cjs +3 -0
  36. package/dist/purify.es-Drpa_w5x.js +829 -0
  37. package/dist/{useColumns-tIJVX7bL.js → useColumns-O-w2963T.js} +162 -162
  38. package/dist/{useColumns-QAZVw0r6.cjs → useColumns-SLXn9xXw.cjs} +1 -1
  39. package/dist/{useDownload-BbiPuiZP.js → useDownload-BArHXGs3.js} +2 -2
  40. package/dist/useDownload-Cd_O7X_d.cjs +1 -0
  41. package/package.json +16 -16
  42. package/dist/purify.es-B_jmwKeU.cjs +0 -2
  43. package/dist/purify.es-CMwH3CPX.js +0 -552
  44. package/dist/useDownload-mYZxXe0l.cjs +0 -1
@@ -0,0 +1,829 @@
1
+ function Mt(n, o) {
2
+ (o == null || o > n.length) && (o = n.length);
3
+ for (var s = 0, l = Array(o); s < o; s++) l[s] = n[s];
4
+ return l;
5
+ }
6
+ function Nn(n) {
7
+ if (Array.isArray(n)) return n;
8
+ }
9
+ function In(n, o) {
10
+ var s = n == null ? null : typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"];
11
+ if (s != null) {
12
+ var l, u, m, N, re = [], w = !0, ie = !1;
13
+ try {
14
+ if (m = (s = s.call(n)).next, o !== 0) for (; !(w = (l = m.call(s)).done) && (re.push(l.value), re.length !== o); w = !0) ;
15
+ } catch (Ie) {
16
+ ie = !0, u = Ie;
17
+ } finally {
18
+ try {
19
+ if (!w && s.return != null && (N = s.return(), Object(N) !== N)) return;
20
+ } finally {
21
+ if (ie) throw u;
22
+ }
23
+ }
24
+ return re;
25
+ }
26
+ }
27
+ function Dn() {
28
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
30
+ }
31
+ function Ln(n, o) {
32
+ return Nn(n) || In(n, o) || wn(n, o) || Dn();
33
+ }
34
+ function wn(n, o) {
35
+ if (n) {
36
+ if (typeof n == "string") return Mt(n, o);
37
+ var s = {}.toString.call(n).slice(8, -1);
38
+ return s === "Object" && n.constructor && (s = n.constructor.name), s === "Map" || s === "Set" ? Array.from(n) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? Mt(n, o) : void 0;
39
+ }
40
+ }
41
+ const $t = Object.entries, Pt = Object.setPrototypeOf, Cn = Object.isFrozen, Mn = Object.getPrototypeOf, Pn = Object.getOwnPropertyDescriptor;
42
+ let O = Object.freeze, R = Object.seal, oe = Object.create, Xt = typeof Reflect < "u" && Reflect, Qe = Xt.apply, et = Xt.construct;
43
+ O || (O = function(o) {
44
+ return o;
45
+ });
46
+ R || (R = function(o) {
47
+ return o;
48
+ });
49
+ Qe || (Qe = function(o, s) {
50
+ for (var l = arguments.length, u = new Array(l > 2 ? l - 2 : 0), m = 2; m < l; m++)
51
+ u[m - 2] = arguments[m];
52
+ return o.apply(s, u);
53
+ });
54
+ et || (et = function(o) {
55
+ for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
56
+ l[u - 1] = arguments[u];
57
+ return new o(...l);
58
+ });
59
+ const me = A(Array.prototype.forEach), xn = A(Array.prototype.lastIndexOf), xt = A(Array.prototype.pop), ne = A(Array.prototype.push), kn = A(Array.prototype.splice), Y = Array.isArray, _e = A(String.prototype.toLowerCase), Ve = A(String.prototype.toString), kt = A(String.prototype.match), de = A(String.prototype.replace), vt = A(String.prototype.indexOf), vn = A(String.prototype.trim), Un = A(Number.prototype.toString), Fn = A(Boolean.prototype.toString), Ut = typeof BigInt > "u" ? null : A(BigInt.prototype.toString), Ft = typeof Symbol > "u" ? null : A(Symbol.prototype.toString), S = A(Object.prototype.hasOwnProperty), Te = A(Object.prototype.toString), b = A(RegExp.prototype.test), q = zn(TypeError);
60
+ function A(n) {
61
+ return function(o) {
62
+ o instanceof RegExp && (o.lastIndex = 0);
63
+ for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
64
+ l[u - 1] = arguments[u];
65
+ return Qe(n, o, l);
66
+ };
67
+ }
68
+ function zn(n) {
69
+ return function() {
70
+ for (var o = arguments.length, s = new Array(o), l = 0; l < o; l++)
71
+ s[l] = arguments[l];
72
+ return et(n, s);
73
+ };
74
+ }
75
+ function f(n, o) {
76
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _e;
77
+ if (Pt && Pt(n, null), !Y(o))
78
+ return n;
79
+ let l = o.length;
80
+ for (; l--; ) {
81
+ let u = o[l];
82
+ if (typeof u == "string") {
83
+ const m = s(u);
84
+ m !== u && (Cn(o) || (o[l] = m), u = m);
85
+ }
86
+ n[u] = !0;
87
+ }
88
+ return n;
89
+ }
90
+ function Hn(n) {
91
+ for (let o = 0; o < n.length; o++)
92
+ S(n, o) || (n[o] = null);
93
+ return n;
94
+ }
95
+ function D(n) {
96
+ const o = oe(null);
97
+ for (const l of $t(n)) {
98
+ var s = Ln(l, 2);
99
+ const u = s[0], m = s[1];
100
+ S(n, u) && (Y(m) ? o[u] = Hn(m) : m && typeof m == "object" && m.constructor === Object ? o[u] = D(m) : o[u] = m);
101
+ }
102
+ return o;
103
+ }
104
+ function Gn(n) {
105
+ switch (typeof n) {
106
+ case "string":
107
+ return n;
108
+ case "number":
109
+ return Un(n);
110
+ case "boolean":
111
+ return Fn(n);
112
+ case "bigint":
113
+ return Ut ? Ut(n) : "0";
114
+ case "symbol":
115
+ return Ft ? Ft(n) : "Symbol()";
116
+ case "undefined":
117
+ return Te(n);
118
+ case "function":
119
+ case "object": {
120
+ if (n === null)
121
+ return Te(n);
122
+ const o = n, s = U(o, "toString");
123
+ if (typeof s == "function") {
124
+ const l = s(o);
125
+ return typeof l == "string" ? l : Te(l);
126
+ }
127
+ return Te(n);
128
+ }
129
+ default:
130
+ return Te(n);
131
+ }
132
+ }
133
+ function U(n, o) {
134
+ for (; n !== null; ) {
135
+ const l = Pn(n, o);
136
+ if (l) {
137
+ if (l.get)
138
+ return A(l.get);
139
+ if (typeof l.value == "function")
140
+ return A(l.value);
141
+ }
142
+ n = Mn(n);
143
+ }
144
+ function s() {
145
+ return null;
146
+ }
147
+ return s;
148
+ }
149
+ function Bn(n) {
150
+ try {
151
+ return b(n, ""), !0;
152
+ } catch {
153
+ return !1;
154
+ }
155
+ }
156
+ const zt = O(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), qe = O(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ke = O(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Wn = O(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Ze = O(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Yn = O(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Ht = O(["#text"]), Gt = O(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), Je = O(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Bt = O(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Ne = O(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), jn = R(/{{[\w\W]*|^[\w\W]*}}/g), $n = R(/<%[\w\W]*|^[\w\W]*%>/g), Xn = R(/\${[\w\W]*/g), Vn = R(/^data-[\-\w.\u00B7-\uFFFF]+$/), qn = R(/^aria-[\-\w]+$/), Wt = R(
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
+ ), Kn = R(/^(?:\w+script|data):/i), Zn = R(
160
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
161
+ // eslint-disable-line no-control-regex
162
+ ), Jn = R(/^html$/i), Qn = R(/^[a-z][.\w]*(-[.\w]+)+$/i), Yt = R(/<[/\w!]/g), eo = R(/<[/\w]/g), to = R(/<\/no(script|embed|frames)/i), no = R(/\/>/i), v = {
163
+ element: 1,
164
+ attribute: 2,
165
+ text: 3,
166
+ cdataSection: 4,
167
+ entityReference: 5,
168
+ // Deprecated
169
+ entityNode: 6,
170
+ // Deprecated
171
+ processingInstruction: 7,
172
+ comment: 8,
173
+ document: 9,
174
+ documentType: 10,
175
+ documentFragment: 11,
176
+ notation: 12
177
+ // Deprecated
178
+ }, oo = function() {
179
+ return typeof window > "u" ? null : window;
180
+ }, ro = function(o, s) {
181
+ if (typeof o != "object" || typeof o.createPolicy != "function")
182
+ return null;
183
+ let l = null;
184
+ const u = "data-tt-policy-suffix";
185
+ s && s.hasAttribute(u) && (l = s.getAttribute(u));
186
+ const m = "dompurify" + (l ? "#" + l : "");
187
+ try {
188
+ return o.createPolicy(m, {
189
+ createHTML(N) {
190
+ return N;
191
+ },
192
+ createScriptURL(N) {
193
+ return N;
194
+ }
195
+ });
196
+ } catch {
197
+ return console.warn("TrustedTypes policy " + m + " could not be created."), null;
198
+ }
199
+ }, jt = function() {
200
+ return {
201
+ afterSanitizeAttributes: [],
202
+ afterSanitizeElements: [],
203
+ afterSanitizeShadowDOM: [],
204
+ beforeSanitizeAttributes: [],
205
+ beforeSanitizeElements: [],
206
+ beforeSanitizeShadowDOM: [],
207
+ uponSanitizeAttribute: [],
208
+ uponSanitizeElement: [],
209
+ uponSanitizeShadowNode: []
210
+ };
211
+ }, W = function(o, s, l, u) {
212
+ return S(o, s) && Y(o[s]) ? f(u.base ? D(u.base) : {}, o[s], u.transform) : l;
213
+ };
214
+ function Vt() {
215
+ let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : oo();
216
+ const o = (i) => Vt(i);
217
+ if (o.version = "3.4.11", o.removed = [], !n || !n.document || n.document.nodeType !== v.document || !n.Element)
218
+ return o.isSupported = !1, o;
219
+ let s = n.document;
220
+ const l = s, u = l.currentScript;
221
+ n.DocumentFragment;
222
+ const m = n.HTMLTemplateElement, N = n.Node, re = n.Element, w = n.NodeFilter, ie = n.NamedNodeMap;
223
+ ie === void 0 && (n.NamedNodeMap || n.MozNamedAttrMap), n.HTMLFormElement;
224
+ const Ie = n.DOMParser, he = n.trustedTypes, j = re.prototype, qt = U(j, "cloneNode"), tt = U(j, "remove"), Kt = U(j, "nextSibling"), ae = U(j, "childNodes"), se = U(j, "parentNode"), nt = U(j, "shadowRoot"), De = U(j, "attributes"), C = N && N.prototype ? U(N.prototype, "nodeType") : null, z = N && N.prototype ? U(N.prototype, "nodeName") : null;
225
+ if (typeof m == "function") {
226
+ const i = s.createElement("template");
227
+ i.content && i.content.ownerDocument && (s = i.content.ownerDocument);
228
+ }
229
+ let L, $ = "", Le, ot = !1, le = 0;
230
+ const rt = function() {
231
+ if (le > 0)
232
+ throw q('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.');
233
+ }, K = function(e) {
234
+ rt(), le++;
235
+ try {
236
+ return L.createHTML(e);
237
+ } finally {
238
+ le--;
239
+ }
240
+ }, Zt = function(e) {
241
+ rt(), le++;
242
+ try {
243
+ return L.createScriptURL(e);
244
+ } finally {
245
+ le--;
246
+ }
247
+ }, Jt = function() {
248
+ return ot || (Le = ro(he, u), ot = !0), Le;
249
+ }, ge = s, we = ge.implementation, it = ge.createNodeIterator, Qt = ge.createDocumentFragment, en = ge.getElementsByTagName, tn = l.importNode;
250
+ let g = jt();
251
+ o.isSupported = typeof $t == "function" && typeof se == "function" && we && we.createHTMLDocument !== void 0;
252
+ const nn = jn, on = $n, rn = Xn, an = Vn, sn = qn, ln = Kn, at = Zn, cn = Qn;
253
+ let st = Wt, d = null;
254
+ const lt = f({}, [...zt, ...qe, ...Ke, ...Ze, ...Ht]);
255
+ let T = null;
256
+ const ct = f({}, [...Gt, ...Je, ...Bt, ...Ne]);
257
+ let _ = Object.seal(oe(null, {
258
+ tagNameCheck: {
259
+ writable: !0,
260
+ configurable: !1,
261
+ enumerable: !0,
262
+ value: null
263
+ },
264
+ attributeNameCheck: {
265
+ writable: !0,
266
+ configurable: !1,
267
+ enumerable: !0,
268
+ value: null
269
+ },
270
+ allowCustomizedBuiltInElements: {
271
+ writable: !0,
272
+ configurable: !1,
273
+ enumerable: !0,
274
+ value: !1
275
+ }
276
+ })), ce = null, ut = null;
277
+ const H = Object.seal(oe(null, {
278
+ tagCheck: {
279
+ writable: !0,
280
+ configurable: !1,
281
+ enumerable: !0,
282
+ value: null
283
+ },
284
+ attributeCheck: {
285
+ writable: !0,
286
+ configurable: !1,
287
+ enumerable: !0,
288
+ value: null
289
+ }
290
+ }));
291
+ let ft = !0, Ce = !0, pt = !1, mt = !0, G = !1, ue = !0, X = !1, Me = !1, Pe = null, xe = null, ke = !1, Z = !1, Ee = !1, Ae = !1, dt = !0, Tt = !1;
292
+ const _t = "user-content-";
293
+ let ve = !0, Ue = !1, J = {}, x = null;
294
+ const Fe = f({}, [
295
+ "annotation-xml",
296
+ "audio",
297
+ "colgroup",
298
+ "desc",
299
+ "foreignobject",
300
+ "head",
301
+ "iframe",
302
+ "math",
303
+ "mi",
304
+ "mn",
305
+ "mo",
306
+ "ms",
307
+ "mtext",
308
+ "noembed",
309
+ "noframes",
310
+ "noscript",
311
+ "plaintext",
312
+ "script",
313
+ // <selectedcontent> mirrors the selected <option>'s subtree, cloned by
314
+ // the UA (customizable <select>) — including any on* handlers — and the
315
+ // engine re-mirrors synchronously whenever a removal changes which
316
+ // option/selectedcontent is current, even inside DOMPurify's inert
317
+ // DOMParser document. Hoisting its children on removal re-inserts a fresh
318
+ // mirror target ahead of the walk, which the engine refills, looping
319
+ // forever (DoS) and amplifying output. Dropping its content on removal
320
+ // (rather than hoisting) breaks that cascade; the content is a duplicate
321
+ // of the option, which is sanitized on its own. See campaign-3 F1/F6.
322
+ "selectedcontent",
323
+ "style",
324
+ "svg",
325
+ "template",
326
+ "thead",
327
+ "title",
328
+ "video",
329
+ "xmp"
330
+ ]);
331
+ let ht = null;
332
+ const gt = f({}, ["audio", "video", "img", "source", "image", "track"]);
333
+ let ze = null;
334
+ const Et = f({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ye = "http://www.w3.org/1998/Math/MathML", Se = "http://www.w3.org/2000/svg", k = "http://www.w3.org/1999/xhtml";
335
+ let Q = k, He = !1, Ge = null;
336
+ const un = f({}, [ye, Se, k], Ve), At = O(["mi", "mo", "mn", "ms", "mtext"]);
337
+ let Be = f({}, At);
338
+ const yt = O(["annotation-xml"]);
339
+ let We = f({}, yt);
340
+ const fn = f({}, ["title", "style", "font", "a", "script"]);
341
+ let fe = null;
342
+ const pn = ["application/xhtml+xml", "text/html"], mn = "text/html";
343
+ let h = null, ee = null;
344
+ const dn = s.createElement("form"), St = function(e) {
345
+ return e instanceof RegExp || e instanceof Function;
346
+ }, Ye = function() {
347
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
348
+ if (ee && ee === e)
349
+ return;
350
+ (!e || typeof e != "object") && (e = {}), e = D(e), fe = // eslint-disable-next-line unicorn/prefer-includes
351
+ pn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? mn : e.PARSER_MEDIA_TYPE, h = fe === "application/xhtml+xml" ? Ve : _e, d = W(e, "ALLOWED_TAGS", lt, {
352
+ transform: h
353
+ }), T = W(e, "ALLOWED_ATTR", ct, {
354
+ transform: h
355
+ }), Ge = W(e, "ALLOWED_NAMESPACES", un, {
356
+ transform: Ve
357
+ }), ze = W(e, "ADD_URI_SAFE_ATTR", Et, {
358
+ transform: h,
359
+ base: Et
360
+ }), ht = W(e, "ADD_DATA_URI_TAGS", gt, {
361
+ transform: h,
362
+ base: gt
363
+ }), x = W(e, "FORBID_CONTENTS", Fe, {
364
+ transform: h
365
+ }), ce = W(e, "FORBID_TAGS", D({}), {
366
+ transform: h
367
+ }), ut = W(e, "FORBID_ATTR", D({}), {
368
+ transform: h
369
+ }), J = S(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? D(e.USE_PROFILES) : e.USE_PROFILES : !1, ft = e.ALLOW_ARIA_ATTR !== !1, Ce = e.ALLOW_DATA_ATTR !== !1, pt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, mt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = e.SAFE_FOR_TEMPLATES || !1, ue = e.SAFE_FOR_XML !== !1, X = e.WHOLE_DOCUMENT || !1, Z = e.RETURN_DOM || !1, Ee = e.RETURN_DOM_FRAGMENT || !1, Ae = e.RETURN_TRUSTED_TYPE || !1, ke = e.FORCE_BODY || !1, dt = e.SANITIZE_DOM !== !1, Tt = e.SANITIZE_NAMED_PROPS || !1, ve = e.KEEP_CONTENT !== !1, Ue = e.IN_PLACE || !1, st = Bn(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Wt, Q = typeof e.NAMESPACE == "string" ? e.NAMESPACE : k, Be = S(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? D(e.MATHML_TEXT_INTEGRATION_POINTS) : f({}, At), We = S(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? D(e.HTML_INTEGRATION_POINTS) : f({}, yt);
370
+ const t = S(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? D(e.CUSTOM_ELEMENT_HANDLING) : oe(null);
371
+ if (_ = oe(null), S(t, "tagNameCheck") && St(t.tagNameCheck) && (_.tagNameCheck = t.tagNameCheck), S(t, "attributeNameCheck") && St(t.attributeNameCheck) && (_.attributeNameCheck = t.attributeNameCheck), S(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (_.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), R(_), G && (Ce = !1), Ee && (Z = !0), J && (d = f({}, Ht), T = oe(null), J.html === !0 && (f(d, zt), f(T, Gt)), J.svg === !0 && (f(d, qe), f(T, Je), f(T, Ne)), J.svgFilters === !0 && (f(d, Ke), f(T, Je), f(T, Ne)), J.mathMl === !0 && (f(d, Ze), f(T, Bt), f(T, Ne))), H.tagCheck = null, H.attributeCheck = null, S(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? H.tagCheck = e.ADD_TAGS : Y(e.ADD_TAGS) && (d === lt && (d = D(d)), f(d, e.ADD_TAGS, h))), S(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? H.attributeCheck = e.ADD_ATTR : Y(e.ADD_ATTR) && (T === ct && (T = D(T)), f(T, e.ADD_ATTR, h))), S(e, "ADD_URI_SAFE_ATTR") && Y(e.ADD_URI_SAFE_ATTR) && f(ze, e.ADD_URI_SAFE_ATTR, h), S(e, "FORBID_CONTENTS") && Y(e.FORBID_CONTENTS) && (x === Fe && (x = D(x)), f(x, e.FORBID_CONTENTS, h)), S(e, "ADD_FORBID_CONTENTS") && Y(e.ADD_FORBID_CONTENTS) && (x === Fe && (x = D(x)), f(x, e.ADD_FORBID_CONTENTS, h)), ve && (d["#text"] = !0), X && f(d, ["html", "head", "body"]), d.table && (f(d, ["tbody"]), delete ce.tbody), e.TRUSTED_TYPES_POLICY) {
372
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
373
+ throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
374
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
375
+ throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
376
+ const r = L;
377
+ L = e.TRUSTED_TYPES_POLICY;
378
+ try {
379
+ $ = K("");
380
+ } catch (a) {
381
+ throw L = r, a;
382
+ }
383
+ } else e.TRUSTED_TYPES_POLICY === null ? (L = void 0, $ = "") : (L === void 0 && (L = Jt()), L && typeof $ == "string" && ($ = K("")));
384
+ O && O(e), ee = e;
385
+ }, bt = f({}, [...qe, ...Ke, ...Wn]), Ot = f({}, [...Ze, ...Yn]), Tn = function(e, t, r) {
386
+ return t.namespaceURI === k ? e === "svg" : t.namespaceURI === ye ? e === "svg" && (r === "annotation-xml" || Be[r]) : !!bt[e];
387
+ }, _n = function(e, t, r) {
388
+ return t.namespaceURI === k ? e === "math" : t.namespaceURI === Se ? e === "math" && We[r] : !!Ot[e];
389
+ }, hn = function(e, t, r) {
390
+ return t.namespaceURI === Se && !We[r] || t.namespaceURI === ye && !Be[r] ? !1 : !Ot[e] && (fn[e] || !bt[e]);
391
+ }, gn = function(e) {
392
+ let t = se(e);
393
+ (!t || !t.tagName) && (t = {
394
+ namespaceURI: Q,
395
+ tagName: "template"
396
+ });
397
+ const r = _e(e.tagName), a = _e(t.tagName);
398
+ return Ge[e.namespaceURI] ? e.namespaceURI === Se ? Tn(r, t, a) : e.namespaceURI === ye ? _n(r, t, a) : e.namespaceURI === k ? hn(r, t, a) : !!(fe === "application/xhtml+xml" && Ge[e.namespaceURI]) : !1;
399
+ }, B = function(e) {
400
+ ne(o.removed, {
401
+ element: e
402
+ });
403
+ try {
404
+ se(e).removeChild(e);
405
+ } catch {
406
+ if (tt(e), !se(e))
407
+ throw q("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
408
+ }
409
+ }, Rt = function(e) {
410
+ const t = ae(e);
411
+ if (t) {
412
+ const a = [];
413
+ me(t, (c) => {
414
+ ne(a, c);
415
+ }), me(a, (c) => {
416
+ try {
417
+ tt(c);
418
+ } catch {
419
+ }
420
+ });
421
+ }
422
+ const r = De(e);
423
+ if (r)
424
+ for (let a = r.length - 1; a >= 0; --a) {
425
+ const c = r[a], p = c && c.name;
426
+ if (typeof p == "string")
427
+ try {
428
+ e.removeAttribute(p);
429
+ } catch {
430
+ }
431
+ }
432
+ }, V = function(e, t) {
433
+ try {
434
+ ne(o.removed, {
435
+ attribute: t.getAttributeNode(e),
436
+ from: t
437
+ });
438
+ } catch {
439
+ ne(o.removed, {
440
+ attribute: null,
441
+ from: t
442
+ });
443
+ }
444
+ if (t.removeAttribute(e), e === "is")
445
+ if (Z || Ee)
446
+ try {
447
+ B(t);
448
+ } catch {
449
+ }
450
+ else
451
+ try {
452
+ t.setAttribute(e, "");
453
+ } catch {
454
+ }
455
+ }, En = function(e) {
456
+ const t = De(e);
457
+ if (t)
458
+ for (let r = t.length - 1; r >= 0; --r) {
459
+ const a = t[r], c = a && a.name;
460
+ if (!(typeof c != "string" || T[h(c)]))
461
+ try {
462
+ e.removeAttribute(c);
463
+ } catch {
464
+ }
465
+ }
466
+ }, An = function(e) {
467
+ const t = [e];
468
+ for (; t.length > 0; ) {
469
+ const r = t.pop();
470
+ (C ? C(r) : r.nodeType) === v.element && En(r);
471
+ const c = ae(r);
472
+ if (c)
473
+ for (let p = c.length - 1; p >= 0; --p)
474
+ t.push(c[p]);
475
+ }
476
+ }, Nt = function(e) {
477
+ let t = null, r = null;
478
+ if (ke)
479
+ e = "<remove></remove>" + e;
480
+ else {
481
+ const p = kt(e, /^[\r\n\t ]+/);
482
+ r = p && p[0];
483
+ }
484
+ fe === "application/xhtml+xml" && Q === k && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
485
+ const a = L ? K(e) : e;
486
+ if (Q === k)
487
+ try {
488
+ t = new Ie().parseFromString(a, fe);
489
+ } catch {
490
+ }
491
+ if (!t || !t.documentElement) {
492
+ t = we.createDocument(Q, "template", null);
493
+ try {
494
+ t.documentElement.innerHTML = He ? $ : a;
495
+ } catch {
496
+ }
497
+ }
498
+ const c = t.body || t.documentElement;
499
+ return e && r && c.insertBefore(s.createTextNode(r), c.childNodes[0] || null), Q === k ? en.call(t, X ? "html" : "body")[0] : X ? t.documentElement : c;
500
+ }, It = function(e) {
501
+ return it.call(
502
+ e.ownerDocument || e,
503
+ e,
504
+ // eslint-disable-next-line no-bitwise
505
+ w.SHOW_ELEMENT | w.SHOW_COMMENT | w.SHOW_TEXT | w.SHOW_PROCESSING_INSTRUCTION | w.SHOW_CDATA_SECTION,
506
+ null
507
+ );
508
+ }, be = function(e) {
509
+ return e = de(e, nn, " "), e = de(e, on, " "), e = de(e, rn, " "), e;
510
+ }, je = function(e) {
511
+ var t;
512
+ e.normalize();
513
+ const r = it.call(
514
+ e.ownerDocument || e,
515
+ e,
516
+ // eslint-disable-next-line no-bitwise
517
+ w.SHOW_TEXT | w.SHOW_COMMENT | w.SHOW_CDATA_SECTION | w.SHOW_PROCESSING_INSTRUCTION,
518
+ null
519
+ );
520
+ let a = r.nextNode();
521
+ for (; a; )
522
+ a.data = be(a.data), a = r.nextNode();
523
+ const c = (t = e.querySelectorAll) === null || t === void 0 ? void 0 : t.call(e, "template");
524
+ c && me(c, (p) => {
525
+ te(p.content) && je(p.content);
526
+ });
527
+ }, Oe = function(e) {
528
+ const t = z ? z(e) : null;
529
+ return typeof t != "string" || h(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
530
+ // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
531
+ // makes the direct read diverge from the cached read; a clean form
532
+ // (same-realm OR foreign-realm) has both reads pointing at the same
533
+ // canonical NamedNodeMap.
534
+ e.attributes !== De(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
535
+ // returns the integer 1 for any Element regardless of realm; direct
536
+ // read on a clobbered form (e.g. <input name="nodeType">) returns
537
+ // the named child element. Cheap addition — nodeType is read from
538
+ // an internal slot, no serialization cost — and removes a residual
539
+ // clobbering surface used by several mXSS / PI / comment branches
540
+ // in _sanitizeElements that compare currentNode.nodeType directly.
541
+ e.nodeType !== C(e) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
542
+ // "childNodes" shadows the prototype getter. Direct reads of
543
+ // form.childNodes from a clobbered form return the named child
544
+ // instead of the real NodeList, so any walk that reads it directly
545
+ // skips the form's real children. Compare the direct read to the
546
+ // cached Node.prototype getter — when the form's named-property
547
+ // getter intercepts the read, the two values differ and we flag
548
+ // the form. This catches every clobbering child type (input,
549
+ // select, etc.) regardless of whether the named child happens to
550
+ // carry a numeric .length, which a typeof-based probe would miss
551
+ // (e.g. HTMLSelectElement.length is a defined unsigned-long).
552
+ e.childNodes !== ae(e);
553
+ }, te = function(e) {
554
+ if (!C || typeof e != "object" || e === null)
555
+ return !1;
556
+ try {
557
+ return C(e) === v.documentFragment;
558
+ } catch {
559
+ return !1;
560
+ }
561
+ }, pe = function(e) {
562
+ if (!C || typeof e != "object" || e === null)
563
+ return !1;
564
+ try {
565
+ return typeof C(e) == "number";
566
+ } catch {
567
+ return !1;
568
+ }
569
+ };
570
+ function F(i, e, t) {
571
+ i.length !== 0 && me(i, (r) => {
572
+ r.call(o, e, t, ee);
573
+ });
574
+ }
575
+ const yn = function(e, t) {
576
+ return !!(ue && e.hasChildNodes() && !pe(e.firstElementChild) && b(Yt, e.textContent) && b(Yt, e.innerHTML) || ue && e.namespaceURI === k && t === "style" && pe(e.firstElementChild) || e.nodeType === v.processingInstruction || ue && e.nodeType === v.comment && b(eo, e.data));
577
+ }, Sn = function(e, t) {
578
+ if (!ce[t] && wt(t) && (_.tagNameCheck instanceof RegExp && b(_.tagNameCheck, t) || _.tagNameCheck instanceof Function && _.tagNameCheck(t)))
579
+ return !1;
580
+ if (ve && !x[t]) {
581
+ const r = se(e), a = ae(e);
582
+ if (a && r) {
583
+ const c = a.length;
584
+ for (let p = c - 1; p >= 0; --p) {
585
+ const y = Ue ? a[p] : qt(a[p], !0);
586
+ r.insertBefore(y, Kt(e));
587
+ }
588
+ }
589
+ }
590
+ return B(e), !0;
591
+ }, Dt = function(e) {
592
+ if (F(g.beforeSanitizeElements, e, null), Oe(e))
593
+ return B(e), !0;
594
+ const t = h(z ? z(e) : e.nodeName);
595
+ if (F(g.uponSanitizeElement, e, {
596
+ tagName: t,
597
+ allowedTags: d
598
+ }), yn(e, t))
599
+ return B(e), !0;
600
+ if (ce[t] || !(H.tagCheck instanceof Function && H.tagCheck(t)) && !d[t])
601
+ return Sn(e, t);
602
+ if ((C ? C(e) : e.nodeType) === v.element && !gn(e) || (t === "noscript" || t === "noembed" || t === "noframes") && b(to, e.innerHTML))
603
+ return B(e), !0;
604
+ if (G && e.nodeType === v.text) {
605
+ const a = be(e.textContent);
606
+ e.textContent !== a && (ne(o.removed, {
607
+ element: e.cloneNode()
608
+ }), e.textContent = a);
609
+ }
610
+ return F(g.afterSanitizeElements, e, null), !1;
611
+ }, Lt = function(e, t, r) {
612
+ if (ut[t] || dt && (t === "id" || t === "name") && (r in s || r in dn))
613
+ return !1;
614
+ const a = T[t] || H.attributeCheck instanceof Function && H.attributeCheck(t, e);
615
+ if (!(Ce && b(an, t))) {
616
+ if (!(ft && b(sn, t))) {
617
+ if (a) {
618
+ if (!ze[t]) {
619
+ if (!b(st, de(r, at, ""))) {
620
+ if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && vt(r, "data:") === 0 && ht[e])) {
621
+ if (!(pt && !b(ln, de(r, at, "")))) {
622
+ if (r)
623
+ return !1;
624
+ }
625
+ }
626
+ }
627
+ }
628
+ } else if (
629
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
630
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
631
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
632
+ !(wt(e) && (_.tagNameCheck instanceof RegExp && b(_.tagNameCheck, e) || _.tagNameCheck instanceof Function && _.tagNameCheck(e)) && (_.attributeNameCheck instanceof RegExp && b(_.attributeNameCheck, t) || _.attributeNameCheck instanceof Function && _.attributeNameCheck(t, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
633
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
634
+ t === "is" && _.allowCustomizedBuiltInElements && (_.tagNameCheck instanceof RegExp && b(_.tagNameCheck, r) || _.tagNameCheck instanceof Function && _.tagNameCheck(r)))
635
+ ) return !1;
636
+ }
637
+ }
638
+ return !0;
639
+ }, bn = f({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), wt = function(e) {
640
+ return !bn[_e(e)] && b(cn, e);
641
+ }, On = function(e, t, r, a) {
642
+ if (L && typeof he == "object" && typeof he.getAttributeType == "function" && !r)
643
+ switch (he.getAttributeType(e, t)) {
644
+ case "TrustedHTML":
645
+ return K(a);
646
+ case "TrustedScriptURL":
647
+ return Zt(a);
648
+ }
649
+ return a;
650
+ }, Rn = function(e, t, r, a) {
651
+ try {
652
+ r ? e.setAttributeNS(r, t, a) : e.setAttribute(t, a), Oe(e) ? B(e) : xt(o.removed);
653
+ } catch {
654
+ V(t, e);
655
+ }
656
+ }, Ct = function(e) {
657
+ F(g.beforeSanitizeAttributes, e, null);
658
+ const t = e.attributes;
659
+ if (!t || Oe(e))
660
+ return;
661
+ const r = {
662
+ attrName: "",
663
+ attrValue: "",
664
+ keepAttr: !0,
665
+ allowedAttributes: T,
666
+ forceKeepAttr: void 0
667
+ };
668
+ let a = t.length;
669
+ const c = h(e.nodeName);
670
+ for (; a--; ) {
671
+ const p = t[a], y = p.name, E = p.namespaceURI, M = p.value, P = h(y), Xe = M;
672
+ let I = y === "value" ? Xe : vn(Xe);
673
+ if (r.attrName = P, r.attrValue = I, r.keepAttr = !0, r.forceKeepAttr = void 0, F(g.uponSanitizeAttribute, e, r), I = r.attrValue, Tt && (P === "id" || P === "name") && vt(I, _t) !== 0 && (V(y, e), I = _t + I), ue && b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, I)) {
674
+ V(y, e);
675
+ continue;
676
+ }
677
+ if (P === "attributename" && kt(I, "href")) {
678
+ V(y, e);
679
+ continue;
680
+ }
681
+ if (!r.forceKeepAttr) {
682
+ if (!r.keepAttr) {
683
+ V(y, e);
684
+ continue;
685
+ }
686
+ if (!mt && b(no, I)) {
687
+ V(y, e);
688
+ continue;
689
+ }
690
+ if (G && (I = be(I)), !Lt(c, P, I)) {
691
+ V(y, e);
692
+ continue;
693
+ }
694
+ I = On(c, P, E, I), I !== Xe && Rn(e, y, E, I);
695
+ }
696
+ }
697
+ F(g.afterSanitizeAttributes, e, null);
698
+ }, Re = function(e) {
699
+ let t = null;
700
+ const r = It(e);
701
+ for (F(g.beforeSanitizeShadowDOM, e, null); t = r.nextNode(); )
702
+ if (F(g.uponSanitizeShadowNode, t, null), Dt(t), Ct(t), te(t.content) && Re(t.content), (C ? C(t) : t.nodeType) === v.element) {
703
+ const c = nt(t);
704
+ te(c) && ($e(c), Re(c));
705
+ }
706
+ F(g.afterSanitizeShadowDOM, e, null);
707
+ }, $e = function(e) {
708
+ const t = [{
709
+ node: e,
710
+ shadow: null
711
+ }];
712
+ for (; t.length > 0; ) {
713
+ const r = t.pop();
714
+ if (r.shadow) {
715
+ Re(r.shadow);
716
+ continue;
717
+ }
718
+ const a = r.node, p = (C ? C(a) : a.nodeType) === v.element, y = ae(a);
719
+ if (y)
720
+ for (let E = y.length - 1; E >= 0; --E)
721
+ t.push({
722
+ node: y[E],
723
+ shadow: null
724
+ });
725
+ if (p) {
726
+ const E = z ? z(a) : null;
727
+ if (typeof E == "string" && h(E) === "template") {
728
+ const M = a.content;
729
+ te(M) && t.push({
730
+ node: M,
731
+ shadow: null
732
+ });
733
+ }
734
+ }
735
+ if (p) {
736
+ const E = nt(a);
737
+ te(E) && t.push({
738
+ node: null,
739
+ shadow: E
740
+ }, {
741
+ node: E,
742
+ shadow: null
743
+ });
744
+ }
745
+ }
746
+ };
747
+ return o.sanitize = function(i) {
748
+ let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, r = null, a = null, c = null;
749
+ if (He = !i, He && (i = "<!-->"), typeof i != "string" && !pe(i) && (i = Gn(i), typeof i != "string"))
750
+ throw q("dirty is not a string, aborting");
751
+ if (!o.isSupported)
752
+ return i;
753
+ Me ? (d = Pe, T = xe) : Ye(e), (g.uponSanitizeElement.length > 0 || g.uponSanitizeAttribute.length > 0) && (d = D(d)), g.uponSanitizeAttribute.length > 0 && (T = D(T)), o.removed = [];
754
+ const p = Ue && typeof i != "string" && pe(i);
755
+ if (p) {
756
+ const M = z ? z(i) : i.nodeName;
757
+ if (typeof M == "string") {
758
+ const P = h(M);
759
+ if (!d[P] || ce[P])
760
+ throw q("root node is forbidden and cannot be sanitized in-place");
761
+ }
762
+ if (Oe(i))
763
+ throw q("root node is clobbered and cannot be sanitized in-place");
764
+ try {
765
+ $e(i);
766
+ } catch (P) {
767
+ throw Rt(i), P;
768
+ }
769
+ } else if (pe(i))
770
+ t = Nt("<!---->"), r = t.ownerDocument.importNode(i, !0), r.nodeType === v.element && r.nodeName === "BODY" || r.nodeName === "HTML" ? t = r : t.appendChild(r), $e(r);
771
+ else {
772
+ if (!Z && !G && !X && // eslint-disable-next-line unicorn/prefer-includes
773
+ i.indexOf("<") === -1)
774
+ return L && Ae ? K(i) : i;
775
+ if (t = Nt(i), !t)
776
+ return Z ? null : Ae ? $ : "";
777
+ }
778
+ t && ke && B(t.firstChild);
779
+ const y = It(p ? i : t);
780
+ try {
781
+ for (; a = y.nextNode(); )
782
+ Dt(a), Ct(a), te(a.content) && Re(a.content);
783
+ } catch (M) {
784
+ throw p && Rt(i), M;
785
+ }
786
+ if (p)
787
+ return me(o.removed, (M) => {
788
+ M.element && An(M.element);
789
+ }), G && je(i), i;
790
+ if (Z) {
791
+ if (G && je(t), Ee)
792
+ for (c = Qt.call(t.ownerDocument); t.firstChild; )
793
+ c.appendChild(t.firstChild);
794
+ else
795
+ c = t;
796
+ return (T.shadowroot || T.shadowrootmode) && (c = tn.call(l, c, !0)), c;
797
+ }
798
+ let E = X ? t.outerHTML : t.innerHTML;
799
+ return X && d["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && b(Jn, t.ownerDocument.doctype.name) && (E = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
800
+ ` + E), G && (E = be(E)), L && Ae ? K(E) : E;
801
+ }, o.setConfig = function() {
802
+ let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
803
+ Ye(i), Me = !0, Pe = d, xe = T;
804
+ }, o.clearConfig = function() {
805
+ ee = null, Me = !1, Pe = null, xe = null, L = Le, $ = "";
806
+ }, o.isValidAttribute = function(i, e, t) {
807
+ ee || Ye({});
808
+ const r = h(i), a = h(e);
809
+ return Lt(r, a, t);
810
+ }, o.addHook = function(i, e) {
811
+ typeof e == "function" && S(g, i) && ne(g[i], e);
812
+ }, o.removeHook = function(i, e) {
813
+ if (S(g, i)) {
814
+ if (e !== void 0) {
815
+ const t = xn(g[i], e);
816
+ return t === -1 ? void 0 : kn(g[i], t, 1)[0];
817
+ }
818
+ return xt(g[i]);
819
+ }
820
+ }, o.removeHooks = function(i) {
821
+ S(g, i) && (g[i] = []);
822
+ }, o.removeAllHooks = function() {
823
+ g = jt();
824
+ }, o;
825
+ }
826
+ var io = Vt();
827
+ export {
828
+ io as default
829
+ };