iking-web-ui-pro 1.2.6 → 1.2.8
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.
- package/dist/IkApprovalProcessDetail/ik.index.es.js +123 -132
- package/dist/IkDescription/ik.index.es.js +15 -24
- package/dist/IkDetailPreviewFiles/ik.index.es.js +15 -24
- package/dist/IkImageUploadEditor/ik.index.es.js +1227 -1227
- package/dist/IkPreviewFile/ik.index.es.js +15 -24
- package/dist/IkPrint/ik.index.es.js +1 -1
- package/dist/IkPrint/{index.es-DDNCkl-c.mjs → index.es-OMtWcZN6.mjs} +1 -1
- package/dist/{jspdf.es.min-DsM3mxSl.mjs → IkPrint/jspdf.es.min-CYsYASKt.mjs} +2 -2
- package/dist/IkPrint/purify.es-CiEWEeUM.mjs +605 -0
- package/dist/IkUploadFile/ik.index.es.js +307 -306
- package/dist/IkUploadFile/iking-web-ui-pro.css +1 -1
- package/dist/iking-web-ui-pro.css +1 -1
- package/dist/{index-Cba2fjdk.mjs → index-Cbyui2C0.mjs} +9518 -9526
- package/dist/{index.es-DqdRfgV4.mjs → index.es-ByDyBGi-.mjs} +139 -139
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +199 -198
- package/dist/{IkPrint/jspdf.es.min-DLP80Gi4.mjs → jspdf.es.min-BpyVpHjP.mjs} +2 -2
- package/dist/purify.es-CiEWEeUM.mjs +605 -0
- package/dist/src/components/IkBtnSetting/index.d.ts +1 -1
- package/dist/src/components/IkBtnSetting/src/IkBtnSetting.vue.d.ts +1 -1
- package/dist/src/components/IkDragList/index.d.ts +3 -3
- package/dist/src/components/IkDragList/src/IkDragList.vue.d.ts +1 -1
- package/dist/src/components/IkMonacoEditor/index.d.ts +16 -16
- package/dist/src/components/IkMonacoEditor/src/index.vue.d.ts +16 -16
- package/dist/src/components/IkPageFull/index.d.ts +3 -3
- package/dist/src/components/IkPageFull/src/IkDialog.d.ts +2 -2
- package/dist/src/components/IkPageFull/src/IkPageHead.vue.d.ts +1 -1
- package/dist/src/components/IkPageFull/src/IkPageTable.vue.d.ts +1 -1
- package/dist/src/components/IkPageFull/src/IkSearchAuto.d.ts +1 -1
- package/dist/src/components/IkPageFull/src/index.vue.d.ts +1 -1
- package/dist/src/components/IkPickerUser/index.d.ts +2 -2
- package/dist/src/components/IkPickerUser/src/picker.vue.d.ts +2 -2
- package/dist/src/components/IkSideText/IkSideText.vue.d.ts +2 -2
- package/dist/src/components/IkSideText/index.d.ts +2 -2
- package/dist/src/components/IkStatu/index.d.ts +1 -1
- package/dist/src/components/IkStatu/src/index.vue.d.ts +1 -1
- package/dist/src/components/IkSvgIcon/index.d.ts +16 -16
- package/dist/src/components/IkTree/IkTree.vue.d.ts +2532 -788
- package/dist/src/components/IkUploadImage/index.d.ts +3 -3
- package/dist/src/components/IkUploadImage/src/index.vue.d.ts +1 -1
- package/package.json +1 -1
- package/dist/IkPrint/purify.es-D5dazAgD.mjs +0 -553
- package/dist/purify.es-D5dazAgD.mjs +0 -553
- package/dist/src/components/IkTree/index.d.ts +0 -12349
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
/*! @license DOMPurify 3.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.5/LICENSE */
|
|
2
|
+
function Et(n, o) {
|
|
3
|
+
(o == null || o > n.length) && (o = n.length);
|
|
4
|
+
for (var a = 0, s = Array(o); a < o; a++) s[a] = n[a];
|
|
5
|
+
return s;
|
|
6
|
+
}
|
|
7
|
+
function tn(n) {
|
|
8
|
+
if (Array.isArray(n)) return n;
|
|
9
|
+
}
|
|
10
|
+
function nn(n, o) {
|
|
11
|
+
var a = n == null ? null : typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"];
|
|
12
|
+
if (a != null) {
|
|
13
|
+
var s, f, u, C, H = [], B = !0, N = !1;
|
|
14
|
+
try {
|
|
15
|
+
if (u = (a = a.call(n)).next, o !== 0) for (; !(B = (s = u.call(a)).done) && (H.push(s.value), H.length !== o); B = !0) ;
|
|
16
|
+
} catch (se) {
|
|
17
|
+
N = !0, f = se;
|
|
18
|
+
} finally {
|
|
19
|
+
try {
|
|
20
|
+
if (!B && a.return != null && (C = a.return(), Object(C) !== C)) return;
|
|
21
|
+
} finally {
|
|
22
|
+
if (N) throw f;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return H;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function on() {
|
|
29
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
30
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
31
|
+
}
|
|
32
|
+
function rn(n, o) {
|
|
33
|
+
return tn(n) || nn(n, o) || an(n, o) || on();
|
|
34
|
+
}
|
|
35
|
+
function an(n, o) {
|
|
36
|
+
if (n) {
|
|
37
|
+
if (typeof n == "string") return Et(n, o);
|
|
38
|
+
var a = {}.toString.call(n).slice(8, -1);
|
|
39
|
+
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) ? Et(n, o) : void 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const Mt = Object.entries, At = Object.setPrototypeOf, sn = Object.isFrozen, ln = Object.getPrototypeOf, cn = Object.getOwnPropertyDescriptor;
|
|
43
|
+
let R = Object.freeze, L = Object.seal, J = Object.create, wt = typeof Reflect < "u" && Reflect, Be = wt.apply, je = wt.construct;
|
|
44
|
+
R || (R = function(o) {
|
|
45
|
+
return o;
|
|
46
|
+
});
|
|
47
|
+
L || (L = function(o) {
|
|
48
|
+
return o;
|
|
49
|
+
});
|
|
50
|
+
Be || (Be = function(o, a) {
|
|
51
|
+
for (var s = arguments.length, f = new Array(s > 2 ? s - 2 : 0), u = 2; u < s; u++)
|
|
52
|
+
f[u - 2] = arguments[u];
|
|
53
|
+
return o.apply(a, f);
|
|
54
|
+
});
|
|
55
|
+
je || (je = function(o) {
|
|
56
|
+
for (var a = arguments.length, s = new Array(a > 1 ? a - 1 : 0), f = 1; f < a; f++)
|
|
57
|
+
s[f - 1] = arguments[f];
|
|
58
|
+
return new o(...s);
|
|
59
|
+
});
|
|
60
|
+
const V = g(Array.prototype.forEach), fn = g(Array.prototype.lastIndexOf), ht = g(Array.prototype.pop), q = g(Array.prototype.push), un = g(Array.prototype.splice), b = Array.isArray, ae = g(String.prototype.toLowerCase), Ue = g(String.prototype.toString), St = g(String.prototype.match), K = g(String.prototype.replace), yt = g(String.prototype.indexOf), mn = g(String.prototype.trim), pn = g(Number.prototype.toString), dn = g(Boolean.prototype.toString), Ot = typeof BigInt > "u" ? null : g(BigInt.prototype.toString), bt = typeof Symbol > "u" ? null : g(Symbol.prototype.toString), m = g(Object.prototype.hasOwnProperty), ie = g(Object.prototype.toString), S = g(RegExp.prototype.test), Se = Tn(TypeError);
|
|
61
|
+
function g(n) {
|
|
62
|
+
return function(o) {
|
|
63
|
+
o instanceof RegExp && (o.lastIndex = 0);
|
|
64
|
+
for (var a = arguments.length, s = new Array(a > 1 ? a - 1 : 0), f = 1; f < a; f++)
|
|
65
|
+
s[f - 1] = arguments[f];
|
|
66
|
+
return Be(n, o, s);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function Tn(n) {
|
|
70
|
+
return function() {
|
|
71
|
+
for (var o = arguments.length, a = new Array(o), s = 0; s < o; s++)
|
|
72
|
+
a[s] = arguments[s];
|
|
73
|
+
return je(n, a);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function l(n, o) {
|
|
77
|
+
let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ae;
|
|
78
|
+
if (At && At(n, null), !b(o))
|
|
79
|
+
return n;
|
|
80
|
+
let s = o.length;
|
|
81
|
+
for (; s--; ) {
|
|
82
|
+
let f = o[s];
|
|
83
|
+
if (typeof f == "string") {
|
|
84
|
+
const u = a(f);
|
|
85
|
+
u !== f && (sn(o) || (o[s] = u), f = u);
|
|
86
|
+
}
|
|
87
|
+
n[f] = !0;
|
|
88
|
+
}
|
|
89
|
+
return n;
|
|
90
|
+
}
|
|
91
|
+
function gn(n) {
|
|
92
|
+
for (let o = 0; o < n.length; o++)
|
|
93
|
+
m(n, o) || (n[o] = null);
|
|
94
|
+
return n;
|
|
95
|
+
}
|
|
96
|
+
function I(n) {
|
|
97
|
+
const o = J(null);
|
|
98
|
+
for (const s of Mt(n)) {
|
|
99
|
+
var a = rn(s, 2);
|
|
100
|
+
const f = a[0], u = a[1];
|
|
101
|
+
m(n, f) && (b(u) ? o[f] = gn(u) : u && typeof u == "object" && u.constructor === Object ? o[f] = I(u) : o[f] = u);
|
|
102
|
+
}
|
|
103
|
+
return o;
|
|
104
|
+
}
|
|
105
|
+
function _n(n) {
|
|
106
|
+
switch (typeof n) {
|
|
107
|
+
case "string":
|
|
108
|
+
return n;
|
|
109
|
+
case "number":
|
|
110
|
+
return pn(n);
|
|
111
|
+
case "boolean":
|
|
112
|
+
return dn(n);
|
|
113
|
+
case "bigint":
|
|
114
|
+
return Ot ? Ot(n) : "0";
|
|
115
|
+
case "symbol":
|
|
116
|
+
return bt ? bt(n) : "Symbol()";
|
|
117
|
+
case "undefined":
|
|
118
|
+
return ie(n);
|
|
119
|
+
case "function":
|
|
120
|
+
case "object": {
|
|
121
|
+
if (n === null)
|
|
122
|
+
return ie(n);
|
|
123
|
+
const o = n, a = W(o, "toString");
|
|
124
|
+
if (typeof a == "function") {
|
|
125
|
+
const s = a(o);
|
|
126
|
+
return typeof s == "string" ? s : ie(s);
|
|
127
|
+
}
|
|
128
|
+
return ie(n);
|
|
129
|
+
}
|
|
130
|
+
default:
|
|
131
|
+
return ie(n);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function W(n, o) {
|
|
135
|
+
for (; n !== null; ) {
|
|
136
|
+
const s = cn(n, o);
|
|
137
|
+
if (s) {
|
|
138
|
+
if (s.get)
|
|
139
|
+
return g(s.get);
|
|
140
|
+
if (typeof s.value == "function")
|
|
141
|
+
return g(s.value);
|
|
142
|
+
}
|
|
143
|
+
n = ln(n);
|
|
144
|
+
}
|
|
145
|
+
function a() {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
return a;
|
|
149
|
+
}
|
|
150
|
+
function En(n) {
|
|
151
|
+
try {
|
|
152
|
+
return S(n, ""), !0;
|
|
153
|
+
} catch {
|
|
154
|
+
return !1;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const Rt = R(["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"]), He = R(["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"]), ze = R(["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"]), An = R(["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"]), Ge = R(["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"]), hn = R(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Dt = R(["#text"]), It = R(["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"]), We = R(["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"]), Nt = R(["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"]), ye = R(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Sn = L(/{{[\w\W]*|^[\w\W]*}}/g), yn = L(/<%[\w\W]*|^[\w\W]*%>/g), On = L(/\${[\w\W]*/g), bn = L(/^data-[\-\w.\u00B7-\uFFFF]+$/), Rn = L(/^aria-[\-\w]+$/), Lt = L(
|
|
158
|
+
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
159
|
+
// eslint-disable-line no-useless-escape
|
|
160
|
+
), Dn = L(/^(?:\w+script|data):/i), In = L(
|
|
161
|
+
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
162
|
+
// eslint-disable-line no-control-regex
|
|
163
|
+
), Nn = L(/^html$/i), Ln = L(/^[a-z][.\w]*(-[.\w]+)+$/i), Z = {
|
|
164
|
+
element: 1,
|
|
165
|
+
text: 3,
|
|
166
|
+
// Deprecated
|
|
167
|
+
progressingInstruction: 7,
|
|
168
|
+
comment: 8,
|
|
169
|
+
document: 9
|
|
170
|
+
}, Cn = function() {
|
|
171
|
+
return typeof window > "u" ? null : window;
|
|
172
|
+
}, Mn = function(o, a) {
|
|
173
|
+
if (typeof o != "object" || typeof o.createPolicy != "function")
|
|
174
|
+
return null;
|
|
175
|
+
let s = null;
|
|
176
|
+
const f = "data-tt-policy-suffix";
|
|
177
|
+
a && a.hasAttribute(f) && (s = a.getAttribute(f));
|
|
178
|
+
const u = "dompurify" + (s ? "#" + s : "");
|
|
179
|
+
try {
|
|
180
|
+
return o.createPolicy(u, {
|
|
181
|
+
createHTML(C) {
|
|
182
|
+
return C;
|
|
183
|
+
},
|
|
184
|
+
createScriptURL(C) {
|
|
185
|
+
return C;
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
} catch {
|
|
189
|
+
return console.warn("TrustedTypes policy " + u + " could not be created."), null;
|
|
190
|
+
}
|
|
191
|
+
}, Ct = function() {
|
|
192
|
+
return {
|
|
193
|
+
afterSanitizeAttributes: [],
|
|
194
|
+
afterSanitizeElements: [],
|
|
195
|
+
afterSanitizeShadowDOM: [],
|
|
196
|
+
beforeSanitizeAttributes: [],
|
|
197
|
+
beforeSanitizeElements: [],
|
|
198
|
+
beforeSanitizeShadowDOM: [],
|
|
199
|
+
uponSanitizeAttribute: [],
|
|
200
|
+
uponSanitizeElement: [],
|
|
201
|
+
uponSanitizeShadowNode: []
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
function xt() {
|
|
205
|
+
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Cn();
|
|
206
|
+
const o = (i) => xt(i);
|
|
207
|
+
if (o.version = "3.4.5", o.removed = [], !n || !n.document || n.document.nodeType !== Z.document || !n.Element)
|
|
208
|
+
return o.isSupported = !1, o;
|
|
209
|
+
let a = n.document;
|
|
210
|
+
const s = a, f = s.currentScript, u = n.DocumentFragment, C = n.HTMLTemplateElement, H = n.Node, B = n.Element, N = n.NodeFilter, se = n.NamedNodeMap, Pt = se === void 0 ? n.NamedNodeMap || n.MozNamedAttrMap : se, kt = n.HTMLFormElement, vt = n.DOMParser, le = n.trustedTypes, Q = B.prototype, Ft = W(Q, "cloneNode"), Ut = W(Q, "remove"), Ht = W(Q, "nextSibling"), zt = W(Q, "childNodes"), ce = W(Q, "parentNode"), Ye = H && H.prototype ? W(H.prototype, "nodeType") : null;
|
|
211
|
+
if (typeof C == "function") {
|
|
212
|
+
const i = a.createElement("template");
|
|
213
|
+
i.content && i.content.ownerDocument && (a = i.content.ownerDocument);
|
|
214
|
+
}
|
|
215
|
+
let y, ee = "";
|
|
216
|
+
const fe = a, Oe = fe.implementation, $e = fe.createNodeIterator, Gt = fe.createDocumentFragment, Wt = fe.getElementsByTagName, Bt = s.importNode;
|
|
217
|
+
let O = Ct();
|
|
218
|
+
o.isSupported = typeof Mt == "function" && typeof ce == "function" && Oe && Oe.createHTMLDocument !== void 0;
|
|
219
|
+
const ue = Sn, me = yn, pe = On, jt = bn, Yt = Rn, $t = Dn, Xe = In, Xt = Ln;
|
|
220
|
+
let Ve = Lt, E = null;
|
|
221
|
+
const qe = l({}, [...Rt, ...He, ...ze, ...Ge, ...Dt]);
|
|
222
|
+
let h = null;
|
|
223
|
+
const Ke = l({}, [...It, ...We, ...Nt, ...ye]);
|
|
224
|
+
let p = Object.seal(J(null, {
|
|
225
|
+
tagNameCheck: {
|
|
226
|
+
writable: !0,
|
|
227
|
+
configurable: !1,
|
|
228
|
+
enumerable: !0,
|
|
229
|
+
value: null
|
|
230
|
+
},
|
|
231
|
+
attributeNameCheck: {
|
|
232
|
+
writable: !0,
|
|
233
|
+
configurable: !1,
|
|
234
|
+
enumerable: !0,
|
|
235
|
+
value: null
|
|
236
|
+
},
|
|
237
|
+
allowCustomizedBuiltInElements: {
|
|
238
|
+
writable: !0,
|
|
239
|
+
configurable: !1,
|
|
240
|
+
enumerable: !0,
|
|
241
|
+
value: !1
|
|
242
|
+
}
|
|
243
|
+
})), te = null, de = null;
|
|
244
|
+
const v = Object.seal(J(null, {
|
|
245
|
+
tagCheck: {
|
|
246
|
+
writable: !0,
|
|
247
|
+
configurable: !1,
|
|
248
|
+
enumerable: !0,
|
|
249
|
+
value: null
|
|
250
|
+
},
|
|
251
|
+
attributeCheck: {
|
|
252
|
+
writable: !0,
|
|
253
|
+
configurable: !1,
|
|
254
|
+
enumerable: !0,
|
|
255
|
+
value: null
|
|
256
|
+
}
|
|
257
|
+
}));
|
|
258
|
+
let Ze = !0, be = !0, Je = !1, Qe = !0, F = !1, ne = !0, z = !1, Re = !1, De = !1, j = !1, Te = !1, ge = !1, et = !0, tt = !1;
|
|
259
|
+
const nt = "user-content-";
|
|
260
|
+
let Ie = !0, oe = !1, Y = {}, w = null;
|
|
261
|
+
const Ne = 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"]);
|
|
262
|
+
let ot = null;
|
|
263
|
+
const rt = l({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
264
|
+
let Le = null;
|
|
265
|
+
const it = l({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), _e = "http://www.w3.org/1998/Math/MathML", Ee = "http://www.w3.org/2000/svg", x = "http://www.w3.org/1999/xhtml";
|
|
266
|
+
let $ = x, Ce = !1, Me = null;
|
|
267
|
+
const Vt = l({}, [_e, Ee, x], Ue);
|
|
268
|
+
let we = l({}, ["mi", "mo", "mn", "ms", "mtext"]), xe = l({}, ["annotation-xml"]);
|
|
269
|
+
const qt = l({}, ["title", "style", "font", "a", "script"]);
|
|
270
|
+
let re = null;
|
|
271
|
+
const Kt = ["application/xhtml+xml", "text/html"], Zt = "text/html";
|
|
272
|
+
let _ = null, X = null;
|
|
273
|
+
const Jt = a.createElement("form"), at = function(e) {
|
|
274
|
+
return e instanceof RegExp || e instanceof Function;
|
|
275
|
+
}, Pe = function() {
|
|
276
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
277
|
+
if (X && X === e)
|
|
278
|
+
return;
|
|
279
|
+
(!e || typeof e != "object") && (e = {}), e = I(e), re = // eslint-disable-next-line unicorn/prefer-includes
|
|
280
|
+
Kt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? Zt : e.PARSER_MEDIA_TYPE, _ = re === "application/xhtml+xml" ? Ue : ae, E = m(e, "ALLOWED_TAGS") && b(e.ALLOWED_TAGS) ? l({}, e.ALLOWED_TAGS, _) : qe, h = m(e, "ALLOWED_ATTR") && b(e.ALLOWED_ATTR) ? l({}, e.ALLOWED_ATTR, _) : Ke, Me = m(e, "ALLOWED_NAMESPACES") && b(e.ALLOWED_NAMESPACES) ? l({}, e.ALLOWED_NAMESPACES, Ue) : Vt, Le = m(e, "ADD_URI_SAFE_ATTR") && b(e.ADD_URI_SAFE_ATTR) ? l(I(it), e.ADD_URI_SAFE_ATTR, _) : it, ot = m(e, "ADD_DATA_URI_TAGS") && b(e.ADD_DATA_URI_TAGS) ? l(I(rt), e.ADD_DATA_URI_TAGS, _) : rt, w = m(e, "FORBID_CONTENTS") && b(e.FORBID_CONTENTS) ? l({}, e.FORBID_CONTENTS, _) : Ne, te = m(e, "FORBID_TAGS") && b(e.FORBID_TAGS) ? l({}, e.FORBID_TAGS, _) : I({}), de = m(e, "FORBID_ATTR") && b(e.FORBID_ATTR) ? l({}, e.FORBID_ATTR, _) : I({}), Y = m(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? I(e.USE_PROFILES) : e.USE_PROFILES : !1, Ze = e.ALLOW_ARIA_ATTR !== !1, be = e.ALLOW_DATA_ATTR !== !1, Je = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Qe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, F = e.SAFE_FOR_TEMPLATES || !1, ne = e.SAFE_FOR_XML !== !1, z = e.WHOLE_DOCUMENT || !1, j = e.RETURN_DOM || !1, Te = e.RETURN_DOM_FRAGMENT || !1, ge = e.RETURN_TRUSTED_TYPE || !1, De = e.FORCE_BODY || !1, et = e.SANITIZE_DOM !== !1, tt = e.SANITIZE_NAMED_PROPS || !1, Ie = e.KEEP_CONTENT !== !1, oe = e.IN_PLACE || !1, Ve = En(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Lt, $ = typeof e.NAMESPACE == "string" ? e.NAMESPACE : x, we = m(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? I(e.MATHML_TEXT_INTEGRATION_POINTS) : l({}, ["mi", "mo", "mn", "ms", "mtext"]), xe = m(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? I(e.HTML_INTEGRATION_POINTS) : l({}, ["annotation-xml"]);
|
|
281
|
+
const t = m(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? I(e.CUSTOM_ELEMENT_HANDLING) : J(null);
|
|
282
|
+
if (p = J(null), m(t, "tagNameCheck") && at(t.tagNameCheck) && (p.tagNameCheck = t.tagNameCheck), m(t, "attributeNameCheck") && at(t.attributeNameCheck) && (p.attributeNameCheck = t.attributeNameCheck), m(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (p.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), F && (be = !1), Te && (j = !0), Y && (E = l({}, Dt), h = J(null), Y.html === !0 && (l(E, Rt), l(h, It)), Y.svg === !0 && (l(E, He), l(h, We), l(h, ye)), Y.svgFilters === !0 && (l(E, ze), l(h, We), l(h, ye)), Y.mathMl === !0 && (l(E, Ge), l(h, Nt), l(h, ye))), v.tagCheck = null, v.attributeCheck = null, m(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? v.tagCheck = e.ADD_TAGS : b(e.ADD_TAGS) && (E === qe && (E = I(E)), l(E, e.ADD_TAGS, _))), m(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? v.attributeCheck = e.ADD_ATTR : b(e.ADD_ATTR) && (h === Ke && (h = I(h)), l(h, e.ADD_ATTR, _))), m(e, "ADD_URI_SAFE_ATTR") && b(e.ADD_URI_SAFE_ATTR) && l(Le, e.ADD_URI_SAFE_ATTR, _), m(e, "FORBID_CONTENTS") && b(e.FORBID_CONTENTS) && (w === Ne && (w = I(w)), l(w, e.FORBID_CONTENTS, _)), m(e, "ADD_FORBID_CONTENTS") && b(e.ADD_FORBID_CONTENTS) && (w === Ne && (w = I(w)), l(w, e.ADD_FORBID_CONTENTS, _)), Ie && (E["#text"] = !0), z && l(E, ["html", "head", "body"]), E.table && (l(E, ["tbody"]), delete te.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
283
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
284
|
+
throw Se('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
285
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
286
|
+
throw Se('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
287
|
+
y = e.TRUSTED_TYPES_POLICY, ee = y.createHTML("");
|
|
288
|
+
} else
|
|
289
|
+
y === void 0 && (y = Mn(le, f)), y !== null && typeof ee == "string" && (ee = y.createHTML(""));
|
|
290
|
+
R && R(e), X = e;
|
|
291
|
+
}, st = l({}, [...He, ...ze, ...An]), lt = l({}, [...Ge, ...hn]), Qt = function(e) {
|
|
292
|
+
let t = ce(e);
|
|
293
|
+
(!t || !t.tagName) && (t = {
|
|
294
|
+
namespaceURI: $,
|
|
295
|
+
tagName: "template"
|
|
296
|
+
});
|
|
297
|
+
const r = ae(e.tagName), c = ae(t.tagName);
|
|
298
|
+
return Me[e.namespaceURI] ? e.namespaceURI === Ee ? t.namespaceURI === x ? r === "svg" : t.namespaceURI === _e ? r === "svg" && (c === "annotation-xml" || we[c]) : !!st[r] : e.namespaceURI === _e ? t.namespaceURI === x ? r === "math" : t.namespaceURI === Ee ? r === "math" && xe[c] : !!lt[r] : e.namespaceURI === x ? t.namespaceURI === Ee && !xe[c] || t.namespaceURI === _e && !we[c] ? !1 : !lt[r] && (qt[r] || !st[r]) : !!(re === "application/xhtml+xml" && Me[e.namespaceURI]) : !1;
|
|
299
|
+
}, M = function(e) {
|
|
300
|
+
q(o.removed, {
|
|
301
|
+
element: e
|
|
302
|
+
});
|
|
303
|
+
try {
|
|
304
|
+
ce(e).removeChild(e);
|
|
305
|
+
} catch {
|
|
306
|
+
Ut(e);
|
|
307
|
+
}
|
|
308
|
+
}, G = function(e, t) {
|
|
309
|
+
try {
|
|
310
|
+
q(o.removed, {
|
|
311
|
+
attribute: t.getAttributeNode(e),
|
|
312
|
+
from: t
|
|
313
|
+
});
|
|
314
|
+
} catch {
|
|
315
|
+
q(o.removed, {
|
|
316
|
+
attribute: null,
|
|
317
|
+
from: t
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
if (t.removeAttribute(e), e === "is")
|
|
321
|
+
if (j || Te)
|
|
322
|
+
try {
|
|
323
|
+
M(t);
|
|
324
|
+
} catch {
|
|
325
|
+
}
|
|
326
|
+
else
|
|
327
|
+
try {
|
|
328
|
+
t.setAttribute(e, "");
|
|
329
|
+
} catch {
|
|
330
|
+
}
|
|
331
|
+
}, ct = function(e) {
|
|
332
|
+
let t = null, r = null;
|
|
333
|
+
if (De)
|
|
334
|
+
e = "<remove></remove>" + e;
|
|
335
|
+
else {
|
|
336
|
+
const T = St(e, /^[\r\n\t ]+/);
|
|
337
|
+
r = T && T[0];
|
|
338
|
+
}
|
|
339
|
+
re === "application/xhtml+xml" && $ === x && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
|
|
340
|
+
const c = y ? y.createHTML(e) : e;
|
|
341
|
+
if ($ === x)
|
|
342
|
+
try {
|
|
343
|
+
t = new vt().parseFromString(c, re);
|
|
344
|
+
} catch {
|
|
345
|
+
}
|
|
346
|
+
if (!t || !t.documentElement) {
|
|
347
|
+
t = Oe.createDocument($, "template", null);
|
|
348
|
+
try {
|
|
349
|
+
t.documentElement.innerHTML = Ce ? ee : c;
|
|
350
|
+
} catch {
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
const d = t.body || t.documentElement;
|
|
354
|
+
return e && r && d.insertBefore(a.createTextNode(r), d.childNodes[0] || null), $ === x ? Wt.call(t, z ? "html" : "body")[0] : z ? t.documentElement : d;
|
|
355
|
+
}, ft = function(e) {
|
|
356
|
+
return $e.call(
|
|
357
|
+
e.ownerDocument || e,
|
|
358
|
+
e,
|
|
359
|
+
// eslint-disable-next-line no-bitwise
|
|
360
|
+
N.SHOW_ELEMENT | N.SHOW_COMMENT | N.SHOW_TEXT | N.SHOW_PROCESSING_INSTRUCTION | N.SHOW_CDATA_SECTION,
|
|
361
|
+
null
|
|
362
|
+
);
|
|
363
|
+
}, ut = function(e) {
|
|
364
|
+
e.normalize();
|
|
365
|
+
const t = $e.call(
|
|
366
|
+
e.ownerDocument || e,
|
|
367
|
+
e,
|
|
368
|
+
// eslint-disable-next-line no-bitwise
|
|
369
|
+
N.SHOW_TEXT | N.SHOW_COMMENT | N.SHOW_CDATA_SECTION | N.SHOW_PROCESSING_INSTRUCTION,
|
|
370
|
+
null
|
|
371
|
+
);
|
|
372
|
+
let r = t.nextNode();
|
|
373
|
+
for (; r; ) {
|
|
374
|
+
let c = r.data;
|
|
375
|
+
V([ue, me, pe], (d) => {
|
|
376
|
+
c = K(c, d, " ");
|
|
377
|
+
}), r.data = c, r = t.nextNode();
|
|
378
|
+
}
|
|
379
|
+
}, ke = function(e) {
|
|
380
|
+
return e instanceof kt && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof Pt) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
|
|
381
|
+
}, Ae = function(e) {
|
|
382
|
+
if (!Ye || typeof e != "object" || e === null)
|
|
383
|
+
return !1;
|
|
384
|
+
try {
|
|
385
|
+
return typeof Ye(e) == "number";
|
|
386
|
+
} catch {
|
|
387
|
+
return !1;
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
function P(i, e, t) {
|
|
391
|
+
V(i, (r) => {
|
|
392
|
+
r.call(o, e, t, X);
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
const mt = function(e) {
|
|
396
|
+
let t = null;
|
|
397
|
+
if (P(O.beforeSanitizeElements, e, null), ke(e))
|
|
398
|
+
return M(e), !0;
|
|
399
|
+
const r = _(e.nodeName);
|
|
400
|
+
if (P(O.uponSanitizeElement, e, {
|
|
401
|
+
tagName: r,
|
|
402
|
+
allowedTags: E
|
|
403
|
+
}), ne && e.hasChildNodes() && !Ae(e.firstElementChild) && S(/<[/\w!]/g, e.innerHTML) && S(/<[/\w!]/g, e.textContent) || ne && e.namespaceURI === x && r === "style" && Ae(e.firstElementChild) || e.nodeType === Z.progressingInstruction || ne && e.nodeType === Z.comment && S(/<[/\w]/g, e.data))
|
|
404
|
+
return M(e), !0;
|
|
405
|
+
if (te[r] || !(v.tagCheck instanceof Function && v.tagCheck(r)) && !E[r]) {
|
|
406
|
+
if (!te[r] && dt(r) && (p.tagNameCheck instanceof RegExp && S(p.tagNameCheck, r) || p.tagNameCheck instanceof Function && p.tagNameCheck(r)))
|
|
407
|
+
return !1;
|
|
408
|
+
if (Ie && !w[r]) {
|
|
409
|
+
const c = ce(e) || e.parentNode, d = zt(e) || e.childNodes;
|
|
410
|
+
if (d && c) {
|
|
411
|
+
const T = d.length;
|
|
412
|
+
for (let D = T - 1; D >= 0; --D) {
|
|
413
|
+
const U = Ft(d[D], !0);
|
|
414
|
+
c.insertBefore(U, Ht(e));
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
return M(e), !0;
|
|
419
|
+
}
|
|
420
|
+
return e instanceof B && !Qt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && S(/<\/no(script|embed|frames)/i, e.innerHTML) ? (M(e), !0) : (F && e.nodeType === Z.text && (t = e.textContent, V([ue, me, pe], (c) => {
|
|
421
|
+
t = K(t, c, " ");
|
|
422
|
+
}), e.textContent !== t && (q(o.removed, {
|
|
423
|
+
element: e.cloneNode()
|
|
424
|
+
}), e.textContent = t)), P(O.afterSanitizeElements, e, null), !1);
|
|
425
|
+
}, pt = function(e, t, r) {
|
|
426
|
+
if (de[t] || et && (t === "id" || t === "name") && (r in a || r in Jt))
|
|
427
|
+
return !1;
|
|
428
|
+
const c = h[t] || v.attributeCheck instanceof Function && v.attributeCheck(t, e);
|
|
429
|
+
if (!(be && !de[t] && S(jt, t))) {
|
|
430
|
+
if (!(Ze && S(Yt, t))) {
|
|
431
|
+
if (!c || de[t]) {
|
|
432
|
+
if (
|
|
433
|
+
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
434
|
+
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
435
|
+
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
436
|
+
!(dt(e) && (p.tagNameCheck instanceof RegExp && S(p.tagNameCheck, e) || p.tagNameCheck instanceof Function && p.tagNameCheck(e)) && (p.attributeNameCheck instanceof RegExp && S(p.attributeNameCheck, t) || p.attributeNameCheck instanceof Function && p.attributeNameCheck(t, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
437
|
+
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
438
|
+
t === "is" && p.allowCustomizedBuiltInElements && (p.tagNameCheck instanceof RegExp && S(p.tagNameCheck, r) || p.tagNameCheck instanceof Function && p.tagNameCheck(r)))
|
|
439
|
+
) return !1;
|
|
440
|
+
} else if (!Le[t]) {
|
|
441
|
+
if (!S(Ve, K(r, Xe, ""))) {
|
|
442
|
+
if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && yt(r, "data:") === 0 && ot[e])) {
|
|
443
|
+
if (!(Je && !S($t, K(r, Xe, "")))) {
|
|
444
|
+
if (r)
|
|
445
|
+
return !1;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
return !0;
|
|
453
|
+
}, en = l({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), dt = function(e) {
|
|
454
|
+
return !en[ae(e)] && S(Xt, e);
|
|
455
|
+
}, Tt = function(e) {
|
|
456
|
+
P(O.beforeSanitizeAttributes, e, null);
|
|
457
|
+
const t = e.attributes;
|
|
458
|
+
if (!t || ke(e))
|
|
459
|
+
return;
|
|
460
|
+
const r = {
|
|
461
|
+
attrName: "",
|
|
462
|
+
attrValue: "",
|
|
463
|
+
keepAttr: !0,
|
|
464
|
+
allowedAttributes: h,
|
|
465
|
+
forceKeepAttr: void 0
|
|
466
|
+
};
|
|
467
|
+
let c = t.length;
|
|
468
|
+
for (; c--; ) {
|
|
469
|
+
const d = t[c], T = d.name, D = d.namespaceURI, U = d.value, k = _(T), Fe = U;
|
|
470
|
+
let A = T === "value" ? Fe : mn(Fe);
|
|
471
|
+
if (r.attrName = k, r.attrValue = A, r.keepAttr = !0, r.forceKeepAttr = void 0, P(O.uponSanitizeAttribute, e, r), A = r.attrValue, tt && (k === "id" || k === "name") && yt(A, nt) !== 0 && (G(T, e), A = nt + A), ne && S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, A)) {
|
|
472
|
+
G(T, e);
|
|
473
|
+
continue;
|
|
474
|
+
}
|
|
475
|
+
if (k === "attributename" && St(A, "href")) {
|
|
476
|
+
G(T, e);
|
|
477
|
+
continue;
|
|
478
|
+
}
|
|
479
|
+
if (r.forceKeepAttr)
|
|
480
|
+
continue;
|
|
481
|
+
if (!r.keepAttr) {
|
|
482
|
+
G(T, e);
|
|
483
|
+
continue;
|
|
484
|
+
}
|
|
485
|
+
if (!Qe && S(/\/>/i, A)) {
|
|
486
|
+
G(T, e);
|
|
487
|
+
continue;
|
|
488
|
+
}
|
|
489
|
+
F && V([ue, me, pe], (_t) => {
|
|
490
|
+
A = K(A, _t, " ");
|
|
491
|
+
});
|
|
492
|
+
const gt = _(e.nodeName);
|
|
493
|
+
if (!pt(gt, k, A)) {
|
|
494
|
+
G(T, e);
|
|
495
|
+
continue;
|
|
496
|
+
}
|
|
497
|
+
if (y && typeof le == "object" && typeof le.getAttributeType == "function" && !D)
|
|
498
|
+
switch (le.getAttributeType(gt, k)) {
|
|
499
|
+
case "TrustedHTML": {
|
|
500
|
+
A = y.createHTML(A);
|
|
501
|
+
break;
|
|
502
|
+
}
|
|
503
|
+
case "TrustedScriptURL": {
|
|
504
|
+
A = y.createScriptURL(A);
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
if (A !== Fe)
|
|
509
|
+
try {
|
|
510
|
+
D ? e.setAttributeNS(D, T, A) : e.setAttribute(T, A), ke(e) ? M(e) : ht(o.removed);
|
|
511
|
+
} catch {
|
|
512
|
+
G(T, e);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
P(O.afterSanitizeAttributes, e, null);
|
|
516
|
+
}, ve = function(e) {
|
|
517
|
+
let t = null;
|
|
518
|
+
const r = ft(e);
|
|
519
|
+
for (P(O.beforeSanitizeShadowDOM, e, null); t = r.nextNode(); )
|
|
520
|
+
P(O.uponSanitizeShadowNode, t, null), mt(t), Tt(t), t.content instanceof u && ve(t.content);
|
|
521
|
+
P(O.afterSanitizeShadowDOM, e, null);
|
|
522
|
+
}, he = function(e) {
|
|
523
|
+
if (e.nodeType === Z.element && e.shadowRoot instanceof u) {
|
|
524
|
+
const c = e.shadowRoot;
|
|
525
|
+
he(c), ve(c);
|
|
526
|
+
}
|
|
527
|
+
const t = e.childNodes;
|
|
528
|
+
if (!t)
|
|
529
|
+
return;
|
|
530
|
+
const r = [];
|
|
531
|
+
V(t, (c) => {
|
|
532
|
+
q(r, c);
|
|
533
|
+
});
|
|
534
|
+
for (const c of r)
|
|
535
|
+
he(c);
|
|
536
|
+
};
|
|
537
|
+
return o.sanitize = function(i) {
|
|
538
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, r = null, c = null, d = null;
|
|
539
|
+
if (Ce = !i, Ce && (i = "<!-->"), typeof i != "string" && !Ae(i) && (i = _n(i), typeof i != "string"))
|
|
540
|
+
throw Se("dirty is not a string, aborting");
|
|
541
|
+
if (!o.isSupported)
|
|
542
|
+
return i;
|
|
543
|
+
if (Re || Pe(e), o.removed = [], typeof i == "string" && (oe = !1), oe) {
|
|
544
|
+
const U = i.nodeName;
|
|
545
|
+
if (typeof U == "string") {
|
|
546
|
+
const k = _(U);
|
|
547
|
+
if (!E[k] || te[k])
|
|
548
|
+
throw Se("root node is forbidden and cannot be sanitized in-place");
|
|
549
|
+
}
|
|
550
|
+
he(i);
|
|
551
|
+
} else if (Ae(i))
|
|
552
|
+
t = ct("<!---->"), r = t.ownerDocument.importNode(i, !0), r.nodeType === Z.element && r.nodeName === "BODY" || r.nodeName === "HTML" ? t = r : t.appendChild(r), he(r);
|
|
553
|
+
else {
|
|
554
|
+
if (!j && !F && !z && // eslint-disable-next-line unicorn/prefer-includes
|
|
555
|
+
i.indexOf("<") === -1)
|
|
556
|
+
return y && ge ? y.createHTML(i) : i;
|
|
557
|
+
if (t = ct(i), !t)
|
|
558
|
+
return j ? null : ge ? ee : "";
|
|
559
|
+
}
|
|
560
|
+
t && De && M(t.firstChild);
|
|
561
|
+
const T = ft(oe ? i : t);
|
|
562
|
+
for (; c = T.nextNode(); )
|
|
563
|
+
mt(c), Tt(c), c.content instanceof u && ve(c.content);
|
|
564
|
+
if (oe)
|
|
565
|
+
return F && ut(i), i;
|
|
566
|
+
if (j) {
|
|
567
|
+
if (F && ut(t), Te)
|
|
568
|
+
for (d = Gt.call(t.ownerDocument); t.firstChild; )
|
|
569
|
+
d.appendChild(t.firstChild);
|
|
570
|
+
else
|
|
571
|
+
d = t;
|
|
572
|
+
return (h.shadowroot || h.shadowrootmode) && (d = Bt.call(s, d, !0)), d;
|
|
573
|
+
}
|
|
574
|
+
let D = z ? t.outerHTML : t.innerHTML;
|
|
575
|
+
return z && E["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && S(Nn, t.ownerDocument.doctype.name) && (D = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
|
|
576
|
+
` + D), F && V([ue, me, pe], (U) => {
|
|
577
|
+
D = K(D, U, " ");
|
|
578
|
+
}), y && ge ? y.createHTML(D) : D;
|
|
579
|
+
}, o.setConfig = function() {
|
|
580
|
+
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
581
|
+
Pe(i), Re = !0;
|
|
582
|
+
}, o.clearConfig = function() {
|
|
583
|
+
X = null, Re = !1;
|
|
584
|
+
}, o.isValidAttribute = function(i, e, t) {
|
|
585
|
+
X || Pe({});
|
|
586
|
+
const r = _(i), c = _(e);
|
|
587
|
+
return pt(r, c, t);
|
|
588
|
+
}, o.addHook = function(i, e) {
|
|
589
|
+
typeof e == "function" && q(O[i], e);
|
|
590
|
+
}, o.removeHook = function(i, e) {
|
|
591
|
+
if (e !== void 0) {
|
|
592
|
+
const t = fn(O[i], e);
|
|
593
|
+
return t === -1 ? void 0 : un(O[i], t, 1)[0];
|
|
594
|
+
}
|
|
595
|
+
return ht(O[i]);
|
|
596
|
+
}, o.removeHooks = function(i) {
|
|
597
|
+
O[i] = [];
|
|
598
|
+
}, o.removeAllHooks = function() {
|
|
599
|
+
O = Ct();
|
|
600
|
+
}, o;
|
|
601
|
+
}
|
|
602
|
+
var wn = xt();
|
|
603
|
+
export {
|
|
604
|
+
wn as default
|
|
605
|
+
};
|