@amsom-habitat/amsom-excel-extractor 1.0.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.
@@ -0,0 +1,461 @@
1
+ /*! @license DOMPurify 2.5.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.6/LICENSE */
2
+ function M(n) {
3
+ "@babel/helpers - typeof";
4
+ return M = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
5
+ return typeof a;
6
+ } : function(a) {
7
+ return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
8
+ }, M(n);
9
+ }
10
+ function Re(n, a) {
11
+ return Re = Object.setPrototypeOf || function(o, l) {
12
+ return o.__proto__ = l, o;
13
+ }, Re(n, a);
14
+ }
15
+ function zt() {
16
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
17
+ if (typeof Proxy == "function") return !0;
18
+ try {
19
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
20
+ })), !0;
21
+ } catch {
22
+ return !1;
23
+ }
24
+ }
25
+ function ie(n, a, o) {
26
+ return zt() ? ie = Reflect.construct : ie = function(l, f, b) {
27
+ var A = [null];
28
+ A.push.apply(A, f);
29
+ var K = Function.bind.apply(l, A), D = new K();
30
+ return b && Re(D, b.prototype), D;
31
+ }, ie.apply(null, arguments);
32
+ }
33
+ function w(n) {
34
+ return Pt(n) || jt(n) || Bt(n) || Gt();
35
+ }
36
+ function Pt(n) {
37
+ if (Array.isArray(n)) return Ie(n);
38
+ }
39
+ function jt(n) {
40
+ if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
41
+ }
42
+ function Bt(n, a) {
43
+ if (n) {
44
+ if (typeof n == "string") return Ie(n, a);
45
+ var o = Object.prototype.toString.call(n).slice(8, -1);
46
+ if (o === "Object" && n.constructor && (o = n.constructor.name), o === "Map" || o === "Set") return Array.from(n);
47
+ if (o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)) return Ie(n, a);
48
+ }
49
+ }
50
+ function Ie(n, a) {
51
+ (a == null || a > n.length) && (a = n.length);
52
+ for (var o = 0, l = new Array(a); o < a; o++) l[o] = n[o];
53
+ return l;
54
+ }
55
+ function Gt() {
56
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
57
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
58
+ }
59
+ var Wt = Object.hasOwnProperty, ct = Object.setPrototypeOf, qt = Object.isFrozen, Yt = Object.getPrototypeOf, $t = Object.getOwnPropertyDescriptor, y = Object.freeze, N = Object.seal, Kt = Object.create, ht = typeof Reflect < "u" && Reflect, ce = ht.apply, Fe = ht.construct;
60
+ ce || (ce = function(n, a, o) {
61
+ return n.apply(a, o);
62
+ });
63
+ y || (y = function(n) {
64
+ return n;
65
+ });
66
+ N || (N = function(n) {
67
+ return n;
68
+ });
69
+ Fe || (Fe = function(n, a) {
70
+ return ie(n, w(a));
71
+ });
72
+ var Vt = E(Array.prototype.forEach), st = E(Array.prototype.pop), $ = E(Array.prototype.push), le = E(String.prototype.toLowerCase), Oe = E(String.prototype.toString), ut = E(String.prototype.match), _ = E(String.prototype.replace), Xt = E(String.prototype.indexOf), Zt = E(String.prototype.trim), g = E(RegExp.prototype.test), Ce = Jt(TypeError);
73
+ function E(n) {
74
+ return function(a) {
75
+ for (var o = arguments.length, l = new Array(o > 1 ? o - 1 : 0), f = 1; f < o; f++)
76
+ l[f - 1] = arguments[f];
77
+ return ce(n, a, l);
78
+ };
79
+ }
80
+ function Jt(n) {
81
+ return function() {
82
+ for (var a = arguments.length, o = new Array(a), l = 0; l < a; l++)
83
+ o[l] = arguments[l];
84
+ return Fe(n, o);
85
+ };
86
+ }
87
+ function i(n, a, o) {
88
+ var l;
89
+ o = (l = o) !== null && l !== void 0 ? l : le, ct && ct(n, null);
90
+ for (var f = a.length; f--; ) {
91
+ var b = a[f];
92
+ if (typeof b == "string") {
93
+ var A = o(b);
94
+ A !== b && (qt(a) || (a[f] = A), b = A);
95
+ }
96
+ n[b] = !0;
97
+ }
98
+ return n;
99
+ }
100
+ function U(n) {
101
+ var a = Kt(null), o;
102
+ for (o in n)
103
+ ce(Wt, n, [o]) === !0 && (a[o] = n[o]);
104
+ return a;
105
+ }
106
+ function ae(n, a) {
107
+ for (; n !== null; ) {
108
+ var o = $t(n, a);
109
+ if (o) {
110
+ if (o.get)
111
+ return E(o.get);
112
+ if (typeof o.value == "function")
113
+ return E(o.value);
114
+ }
115
+ n = Yt(n);
116
+ }
117
+ function l(f) {
118
+ return console.warn("fallback value for", f), null;
119
+ }
120
+ return l;
121
+ }
122
+ var mt = y(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Le = y(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), De = y(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Qt = y(["animate", "color-profile", "cursor", "discard", "fedropshadow", "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"]), xe = y(["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"]), en = y(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ft = y(["#text"]), pt = y(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), Me = y(["accent-height", "accumulate", "additive", "alignment-baseline", "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", "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", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "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", "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"]), dt = y(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), oe = y(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), tn = N(/\{\{[\w\W]*|[\w\W]*\}\}/gm), nn = N(/<%[\w\W]*|[\w\W]*%>/gm), rn = N(/\${[\w\W]*}/gm), an = N(/^data-[\-\w.\u00B7-\uFFFF]/), on = N(/^aria-[\-\w]+$/), ln = N(
123
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
124
+ // eslint-disable-line no-useless-escape
125
+ ), cn = N(/^(?:\w+script|data):/i), sn = N(
126
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
127
+ // eslint-disable-line no-control-regex
128
+ ), un = N(/^html$/i), mn = N(/^[a-z][.\w]*(-[.\w]+)+$/i), fn = function() {
129
+ return typeof window > "u" ? null : window;
130
+ }, pn = function(n, a) {
131
+ if (M(n) !== "object" || typeof n.createPolicy != "function")
132
+ return null;
133
+ var o = null, l = "data-tt-policy-suffix";
134
+ a.currentScript && a.currentScript.hasAttribute(l) && (o = a.currentScript.getAttribute(l));
135
+ var f = "dompurify" + (o ? "#" + o : "");
136
+ try {
137
+ return n.createPolicy(f, {
138
+ createHTML: function(b) {
139
+ return b;
140
+ },
141
+ createScriptURL: function(b) {
142
+ return b;
143
+ }
144
+ });
145
+ } catch {
146
+ return console.warn("TrustedTypes policy " + f + " could not be created."), null;
147
+ }
148
+ };
149
+ function gt() {
150
+ var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : fn(), a = function(e) {
151
+ return gt(e);
152
+ };
153
+ if (a.version = "2.5.6", a.removed = [], !n || !n.document || n.document.nodeType !== 9)
154
+ return a.isSupported = !1, a;
155
+ var o = n.document, l = n.document, f = n.DocumentFragment, b = n.HTMLTemplateElement, A = n.Node, K = n.Element, D = n.NodeFilter, Ue = n.NamedNodeMap, yt = Ue === void 0 ? n.NamedNodeMap || n.MozNamedAttrMap : Ue, bt = n.HTMLFormElement, vt = n.DOMParser, V = n.trustedTypes, X = K.prototype, Tt = ae(X, "cloneNode"), Nt = ae(X, "nextSibling"), Et = ae(X, "childNodes"), se = ae(X, "parentNode");
156
+ if (typeof b == "function") {
157
+ var ue = l.createElement("template");
158
+ ue.content && ue.content.ownerDocument && (l = ue.content.ownerDocument);
159
+ }
160
+ var S = pn(V, o), me = S ? S.createHTML("") : "", Z = l, fe = Z.implementation, At = Z.createNodeIterator, St = Z.createDocumentFragment, _t = Z.getElementsByTagName, wt = o.importNode, He = {};
161
+ try {
162
+ He = U(l).documentMode ? l.documentMode : {};
163
+ } catch {
164
+ }
165
+ var k = {};
166
+ a.isSupported = typeof se == "function" && fe && fe.createHTMLDocument !== void 0 && He !== 9;
167
+ var pe = tn, de = nn, he = rn, kt = an, Ot = on, Ct = cn, ze = sn, Lt = mn, ge = ln, p = null, Pe = i({}, [].concat(w(mt), w(Le), w(De), w(xe), w(ft))), d = null, je = i({}, [].concat(w(pt), w(Me), w(dt), w(oe))), s = Object.seal(Object.create(null, {
168
+ tagNameCheck: {
169
+ writable: !0,
170
+ configurable: !1,
171
+ enumerable: !0,
172
+ value: null
173
+ },
174
+ attributeNameCheck: {
175
+ writable: !0,
176
+ configurable: !1,
177
+ enumerable: !0,
178
+ value: null
179
+ },
180
+ allowCustomizedBuiltInElements: {
181
+ writable: !0,
182
+ configurable: !1,
183
+ enumerable: !0,
184
+ value: !1
185
+ }
186
+ })), W = null, ye = null, Be = !0, be = !0, Ge = !1, We = !0, H = !1, ve = !0, R = !1, Te = !1, Ne = !1, z = !1, J = !1, Q = !1, qe = !0, Ye = !1, Dt = "user-content-", Ee = !0, q = !1, P = {}, j = null, $e = i({}, ["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"]), Ke = null, Ve = i({}, ["audio", "video", "img", "source", "image", "track"]), Ae = null, Xe = i({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ee = "http://www.w3.org/1998/Math/MathML", te = "http://www.w3.org/2000/svg", C = "http://www.w3.org/1999/xhtml", B = C, Se = !1, _e = null, xt = i({}, [ee, te, C], Oe), I, Mt = ["application/xhtml+xml", "text/html"], Rt = "text/html", h, G = null, It = l.createElement("form"), Ze = function(e) {
187
+ return e instanceof RegExp || e instanceof Function;
188
+ }, we = function(e) {
189
+ G && G === e || ((!e || M(e) !== "object") && (e = {}), e = U(e), I = // eslint-disable-next-line unicorn/prefer-includes
190
+ Mt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? I = Rt : I = e.PARSER_MEDIA_TYPE, h = I === "application/xhtml+xml" ? Oe : le, p = "ALLOWED_TAGS" in e ? i({}, e.ALLOWED_TAGS, h) : Pe, d = "ALLOWED_ATTR" in e ? i({}, e.ALLOWED_ATTR, h) : je, _e = "ALLOWED_NAMESPACES" in e ? i({}, e.ALLOWED_NAMESPACES, Oe) : xt, Ae = "ADD_URI_SAFE_ATTR" in e ? i(
191
+ U(Xe),
192
+ // eslint-disable-line indent
193
+ e.ADD_URI_SAFE_ATTR,
194
+ // eslint-disable-line indent
195
+ h
196
+ // eslint-disable-line indent
197
+ ) : Xe, Ke = "ADD_DATA_URI_TAGS" in e ? i(
198
+ U(Ve),
199
+ // eslint-disable-line indent
200
+ e.ADD_DATA_URI_TAGS,
201
+ // eslint-disable-line indent
202
+ h
203
+ // eslint-disable-line indent
204
+ ) : Ve, j = "FORBID_CONTENTS" in e ? i({}, e.FORBID_CONTENTS, h) : $e, W = "FORBID_TAGS" in e ? i({}, e.FORBID_TAGS, h) : {}, ye = "FORBID_ATTR" in e ? i({}, e.FORBID_ATTR, h) : {}, P = "USE_PROFILES" in e ? e.USE_PROFILES : !1, Be = e.ALLOW_ARIA_ATTR !== !1, be = e.ALLOW_DATA_ATTR !== !1, Ge = e.ALLOW_UNKNOWN_PROTOCOLS || !1, We = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = e.SAFE_FOR_TEMPLATES || !1, ve = e.SAFE_FOR_XML !== !1, R = e.WHOLE_DOCUMENT || !1, z = e.RETURN_DOM || !1, J = e.RETURN_DOM_FRAGMENT || !1, Q = e.RETURN_TRUSTED_TYPE || !1, Ne = e.FORCE_BODY || !1, qe = e.SANITIZE_DOM !== !1, Ye = e.SANITIZE_NAMED_PROPS || !1, Ee = e.KEEP_CONTENT !== !1, q = e.IN_PLACE || !1, ge = e.ALLOWED_URI_REGEXP || ge, B = e.NAMESPACE || C, s = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Ze(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (s.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Ze(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (s.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (s.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), H && (be = !1), J && (z = !0), P && (p = i({}, w(ft)), d = [], P.html === !0 && (i(p, mt), i(d, pt)), P.svg === !0 && (i(p, Le), i(d, Me), i(d, oe)), P.svgFilters === !0 && (i(p, De), i(d, Me), i(d, oe)), P.mathMl === !0 && (i(p, xe), i(d, dt), i(d, oe))), e.ADD_TAGS && (p === Pe && (p = U(p)), i(p, e.ADD_TAGS, h)), e.ADD_ATTR && (d === je && (d = U(d)), i(d, e.ADD_ATTR, h)), e.ADD_URI_SAFE_ATTR && i(Ae, e.ADD_URI_SAFE_ATTR, h), e.FORBID_CONTENTS && (j === $e && (j = U(j)), i(j, e.FORBID_CONTENTS, h)), Ee && (p["#text"] = !0), R && i(p, ["html", "head", "body"]), p.table && (i(p, ["tbody"]), delete W.tbody), y && y(e), G = e);
205
+ }, Je = i({}, ["mi", "mo", "mn", "ms", "mtext"]), Qe = i({}, ["foreignobject", "annotation-xml"]), Ft = i({}, ["title", "style", "font", "a", "script"]), ne = i({}, Le);
206
+ i(ne, De), i(ne, Qt);
207
+ var ke = i({}, xe);
208
+ i(ke, en);
209
+ var Ut = function(e) {
210
+ var r = se(e);
211
+ (!r || !r.tagName) && (r = {
212
+ namespaceURI: B,
213
+ tagName: "template"
214
+ });
215
+ var t = le(e.tagName), c = le(r.tagName);
216
+ return _e[e.namespaceURI] ? e.namespaceURI === te ? r.namespaceURI === C ? t === "svg" : r.namespaceURI === ee ? t === "svg" && (c === "annotation-xml" || Je[c]) : !!ne[t] : e.namespaceURI === ee ? r.namespaceURI === C ? t === "math" : r.namespaceURI === te ? t === "math" && Qe[c] : !!ke[t] : e.namespaceURI === C ? r.namespaceURI === te && !Qe[c] || r.namespaceURI === ee && !Je[c] ? !1 : !ke[t] && (Ft[t] || !ne[t]) : !!(I === "application/xhtml+xml" && _e[e.namespaceURI]) : !1;
217
+ }, F = function(e) {
218
+ $(a.removed, {
219
+ element: e
220
+ });
221
+ try {
222
+ e.parentNode.removeChild(e);
223
+ } catch {
224
+ try {
225
+ e.outerHTML = me;
226
+ } catch {
227
+ e.remove();
228
+ }
229
+ }
230
+ }, re = function(e, r) {
231
+ try {
232
+ $(a.removed, {
233
+ attribute: r.getAttributeNode(e),
234
+ from: r
235
+ });
236
+ } catch {
237
+ $(a.removed, {
238
+ attribute: null,
239
+ from: r
240
+ });
241
+ }
242
+ if (r.removeAttribute(e), e === "is" && !d[e])
243
+ if (z || J)
244
+ try {
245
+ F(r);
246
+ } catch {
247
+ }
248
+ else
249
+ try {
250
+ r.setAttribute(e, "");
251
+ } catch {
252
+ }
253
+ }, et = function(e) {
254
+ var r, t;
255
+ if (Ne)
256
+ e = "<remove></remove>" + e;
257
+ else {
258
+ var c = ut(e, /^[\r\n\t ]+/);
259
+ t = c && c[0];
260
+ }
261
+ I === "application/xhtml+xml" && B === C && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
262
+ var u = S ? S.createHTML(e) : e;
263
+ if (B === C)
264
+ try {
265
+ r = new vt().parseFromString(u, I);
266
+ } catch {
267
+ }
268
+ if (!r || !r.documentElement) {
269
+ r = fe.createDocument(B, "template", null);
270
+ try {
271
+ r.documentElement.innerHTML = Se ? me : u;
272
+ } catch {
273
+ }
274
+ }
275
+ var T = r.body || r.documentElement;
276
+ return e && t && T.insertBefore(l.createTextNode(t), T.childNodes[0] || null), B === C ? _t.call(r, R ? "html" : "body")[0] : R ? r.documentElement : T;
277
+ }, tt = function(e) {
278
+ return At.call(
279
+ e.ownerDocument || e,
280
+ e,
281
+ // eslint-disable-next-line no-bitwise
282
+ D.SHOW_ELEMENT | D.SHOW_COMMENT | D.SHOW_TEXT | D.SHOW_PROCESSING_INSTRUCTION | D.SHOW_CDATA_SECTION,
283
+ null,
284
+ !1
285
+ );
286
+ }, nt = function(e) {
287
+ return e instanceof bt && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof yt) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
288
+ }, Y = function(e) {
289
+ return M(A) === "object" ? e instanceof A : e && M(e) === "object" && typeof e.nodeType == "number" && typeof e.nodeName == "string";
290
+ }, L = function(e, r, t) {
291
+ k[e] && Vt(k[e], function(c) {
292
+ c.call(a, r, t, G);
293
+ });
294
+ }, rt = function(e) {
295
+ var r;
296
+ if (L("beforeSanitizeElements", e, null), nt(e) || g(/[\u0080-\uFFFF]/, e.nodeName))
297
+ return F(e), !0;
298
+ var t = h(e.nodeName);
299
+ if (L("uponSanitizeElement", e, {
300
+ tagName: t,
301
+ allowedTags: p
302
+ }), e.hasChildNodes() && !Y(e.firstElementChild) && (!Y(e.content) || !Y(e.content.firstElementChild)) && g(/<[/\w]/g, e.innerHTML) && g(/<[/\w]/g, e.textContent) || t === "select" && g(/<template/i, e.innerHTML) || e.nodeType === 7 || ve && e.nodeType === 8 && g(/<[/\w]/g, e.data))
303
+ return F(e), !0;
304
+ if (!p[t] || W[t]) {
305
+ if (!W[t] && ot(t) && (s.tagNameCheck instanceof RegExp && g(s.tagNameCheck, t) || s.tagNameCheck instanceof Function && s.tagNameCheck(t)))
306
+ return !1;
307
+ if (Ee && !j[t]) {
308
+ var c = se(e) || e.parentNode, u = Et(e) || e.childNodes;
309
+ if (u && c)
310
+ for (var T = u.length, m = T - 1; m >= 0; --m) {
311
+ var x = Tt(u[m], !0);
312
+ x.__removalCount = (e.__removalCount || 0) + 1, c.insertBefore(x, Nt(e));
313
+ }
314
+ }
315
+ return F(e), !0;
316
+ }
317
+ return e instanceof K && !Ut(e) || (t === "noscript" || t === "noembed" || t === "noframes") && g(/<\/no(script|embed|frames)/i, e.innerHTML) ? (F(e), !0) : (H && e.nodeType === 3 && (r = e.textContent, r = _(r, pe, " "), r = _(r, de, " "), r = _(r, he, " "), e.textContent !== r && ($(a.removed, {
318
+ element: e.cloneNode()
319
+ }), e.textContent = r)), L("afterSanitizeElements", e, null), !1);
320
+ }, at = function(e, r, t) {
321
+ if (qe && (r === "id" || r === "name") && (t in l || t in It))
322
+ return !1;
323
+ if (!(be && !ye[r] && g(kt, r)) && !(Be && g(Ot, r))) {
324
+ if (!d[r] || ye[r]) {
325
+ if (
326
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
327
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
328
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
329
+ !(ot(e) && (s.tagNameCheck instanceof RegExp && g(s.tagNameCheck, e) || s.tagNameCheck instanceof Function && s.tagNameCheck(e)) && (s.attributeNameCheck instanceof RegExp && g(s.attributeNameCheck, r) || s.attributeNameCheck instanceof Function && s.attributeNameCheck(r)) || // Alternative, second condition checks if it's an `is`-attribute, AND
330
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
331
+ r === "is" && s.allowCustomizedBuiltInElements && (s.tagNameCheck instanceof RegExp && g(s.tagNameCheck, t) || s.tagNameCheck instanceof Function && s.tagNameCheck(t)))
332
+ ) return !1;
333
+ } else if (!Ae[r] && !g(ge, _(t, ze, "")) && !((r === "src" || r === "xlink:href" || r === "href") && e !== "script" && Xt(t, "data:") === 0 && Ke[e]) && !(Ge && !g(Ct, _(t, ze, ""))) && t)
334
+ return !1;
335
+ }
336
+ return !0;
337
+ }, ot = function(e) {
338
+ return e !== "annotation-xml" && ut(e, Lt);
339
+ }, it = function(e) {
340
+ var r, t, c, u;
341
+ L("beforeSanitizeAttributes", e, null);
342
+ var T = e.attributes;
343
+ if (T) {
344
+ var m = {
345
+ attrName: "",
346
+ attrValue: "",
347
+ keepAttr: !0,
348
+ allowedAttributes: d
349
+ };
350
+ for (u = T.length; u--; ) {
351
+ r = T[u];
352
+ var x = r, O = x.name, v = x.namespaceURI;
353
+ if (t = O === "value" ? r.value : Zt(r.value), c = h(O), m.attrName = c, m.attrValue = t, m.keepAttr = !0, m.forceKeepAttr = void 0, L("uponSanitizeAttribute", e, m), t = m.attrValue, ve && g(/((--!?|])>)|<\/(style|title)/i, t)) {
354
+ re(O, e);
355
+ continue;
356
+ }
357
+ if (!m.forceKeepAttr && (re(O, e), !!m.keepAttr)) {
358
+ if (!We && g(/\/>/i, t)) {
359
+ re(O, e);
360
+ continue;
361
+ }
362
+ H && (t = _(t, pe, " "), t = _(t, de, " "), t = _(t, he, " "));
363
+ var lt = h(e.nodeName);
364
+ if (at(lt, c, t)) {
365
+ if (Ye && (c === "id" || c === "name") && (re(O, e), t = Dt + t), S && M(V) === "object" && typeof V.getAttributeType == "function" && !v)
366
+ switch (V.getAttributeType(lt, c)) {
367
+ case "TrustedHTML": {
368
+ t = S.createHTML(t);
369
+ break;
370
+ }
371
+ case "TrustedScriptURL": {
372
+ t = S.createScriptURL(t);
373
+ break;
374
+ }
375
+ }
376
+ try {
377
+ v ? e.setAttributeNS(v, O, t) : e.setAttribute(O, t), nt(e) ? F(e) : st(a.removed);
378
+ } catch {
379
+ }
380
+ }
381
+ }
382
+ }
383
+ L("afterSanitizeAttributes", e, null);
384
+ }
385
+ }, Ht = function e(r) {
386
+ var t, c = tt(r);
387
+ for (L("beforeSanitizeShadowDOM", r, null); t = c.nextNode(); )
388
+ L("uponSanitizeShadowNode", t, null), !rt(t) && (t.content instanceof f && e(t.content), it(t));
389
+ L("afterSanitizeShadowDOM", r, null);
390
+ };
391
+ return a.sanitize = function(e) {
392
+ var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t, c, u, T, m;
393
+ if (Se = !e, Se && (e = "<!-->"), typeof e != "string" && !Y(e))
394
+ if (typeof e.toString == "function") {
395
+ if (e = e.toString(), typeof e != "string")
396
+ throw Ce("dirty is not a string, aborting");
397
+ } else
398
+ throw Ce("toString is not a function");
399
+ if (!a.isSupported) {
400
+ if (M(n.toStaticHTML) === "object" || typeof n.toStaticHTML == "function") {
401
+ if (typeof e == "string")
402
+ return n.toStaticHTML(e);
403
+ if (Y(e))
404
+ return n.toStaticHTML(e.outerHTML);
405
+ }
406
+ return e;
407
+ }
408
+ if (Te || we(r), a.removed = [], typeof e == "string" && (q = !1), q) {
409
+ if (e.nodeName) {
410
+ var x = h(e.nodeName);
411
+ if (!p[x] || W[x])
412
+ throw Ce("root node is forbidden and cannot be sanitized in-place");
413
+ }
414
+ } else if (e instanceof A)
415
+ t = et("<!---->"), c = t.ownerDocument.importNode(e, !0), c.nodeType === 1 && c.nodeName === "BODY" || c.nodeName === "HTML" ? t = c : t.appendChild(c);
416
+ else {
417
+ if (!z && !H && !R && // eslint-disable-next-line unicorn/prefer-includes
418
+ e.indexOf("<") === -1)
419
+ return S && Q ? S.createHTML(e) : e;
420
+ if (t = et(e), !t)
421
+ return z ? null : Q ? me : "";
422
+ }
423
+ t && Ne && F(t.firstChild);
424
+ for (var O = tt(q ? e : t); u = O.nextNode(); )
425
+ u.nodeType === 3 && u === T || rt(u) || (u.content instanceof f && Ht(u.content), it(u), T = u);
426
+ if (T = null, q)
427
+ return e;
428
+ if (z) {
429
+ if (J)
430
+ for (m = St.call(t.ownerDocument); t.firstChild; )
431
+ m.appendChild(t.firstChild);
432
+ else
433
+ m = t;
434
+ return (d.shadowroot || d.shadowrootmod) && (m = wt.call(o, m, !0)), m;
435
+ }
436
+ var v = R ? t.outerHTML : t.innerHTML;
437
+ return R && p["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && g(un, t.ownerDocument.doctype.name) && (v = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
438
+ ` + v), H && (v = _(v, pe, " "), v = _(v, de, " "), v = _(v, he, " ")), S && Q ? S.createHTML(v) : v;
439
+ }, a.setConfig = function(e) {
440
+ we(e), Te = !0;
441
+ }, a.clearConfig = function() {
442
+ G = null, Te = !1;
443
+ }, a.isValidAttribute = function(e, r, t) {
444
+ G || we({});
445
+ var c = h(e), u = h(r);
446
+ return at(c, u, t);
447
+ }, a.addHook = function(e, r) {
448
+ typeof r == "function" && (k[e] = k[e] || [], $(k[e], r));
449
+ }, a.removeHook = function(e) {
450
+ if (k[e])
451
+ return st(k[e]);
452
+ }, a.removeHooks = function(e) {
453
+ k[e] && (k[e] = []);
454
+ }, a.removeAllHooks = function() {
455
+ k = {};
456
+ }, a;
457
+ }
458
+ var dn = gt();
459
+ export {
460
+ dn as default
461
+ };