@leaflink/stash 45.1.8 → 45.1.10
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/Select.js +2 -2
- package/dist/Select.js.map +1 -1
- package/dist/Toast.js +251 -248
- package/dist/Toast.js.map +1 -1
- package/dist/Toasts.js +5 -4
- package/dist/Toasts.js.map +1 -1
- package/dist/ToastsPlugin.js +5 -4
- package/dist/ToastsPlugin.js.map +1 -1
- package/dist/components.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/Toast.js
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import Zt from "./
|
|
5
|
-
import Jt from "./
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as Vt, useCssModule as jt, computed as at, openBlock as Se, createElementBlock as Re, normalizeClass as $t, unref as ye, createVNode as st, isVNode as qt } from "vue";
|
|
2
|
+
import lt from "@leaflink/snitch";
|
|
3
|
+
import Kt from "lodash-es/capitalize";
|
|
4
|
+
import { S as ct, b as Zt } from "./statusLevels-a8b041f4.js";
|
|
5
|
+
import Jt from "./CustomRender.js";
|
|
6
|
+
import Qt from "./Icon.js";
|
|
7
|
+
import { _ as en } from "./_plugin-vue_export-helper-dad06003.js";
|
|
7
8
|
import "lodash-es/uniqueId";
|
|
8
9
|
import "./index-79ce320f.js";
|
|
9
10
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
10
11
|
/*! @license DOMPurify 3.1.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.0/LICENSE */
|
|
11
12
|
const {
|
|
12
|
-
entries:
|
|
13
|
-
setPrototypeOf:
|
|
14
|
-
isFrozen:
|
|
15
|
-
getPrototypeOf:
|
|
16
|
-
getOwnPropertyDescriptor:
|
|
13
|
+
entries: ht,
|
|
14
|
+
setPrototypeOf: ut,
|
|
15
|
+
isFrozen: tn,
|
|
16
|
+
getPrototypeOf: nn,
|
|
17
|
+
getOwnPropertyDescriptor: on
|
|
17
18
|
} = Object;
|
|
18
19
|
let {
|
|
19
20
|
freeze: h,
|
|
20
|
-
seal:
|
|
21
|
-
create:
|
|
21
|
+
seal: y,
|
|
22
|
+
create: gt
|
|
22
23
|
} = Object, {
|
|
23
24
|
apply: Me,
|
|
24
|
-
construct:
|
|
25
|
+
construct: Ie
|
|
25
26
|
} = typeof Reflect < "u" && Reflect;
|
|
26
27
|
h || (h = function(n) {
|
|
27
28
|
return n;
|
|
28
29
|
});
|
|
29
|
-
|
|
30
|
+
y || (y = function(n) {
|
|
30
31
|
return n;
|
|
31
32
|
});
|
|
32
33
|
Me || (Me = function(n, l, r) {
|
|
33
34
|
return n.apply(l, r);
|
|
34
35
|
});
|
|
35
|
-
|
|
36
|
+
Ie || (Ie = function(n, l) {
|
|
36
37
|
return new n(...l);
|
|
37
38
|
});
|
|
38
|
-
const ne = R(Array.prototype.forEach),
|
|
39
|
+
const ne = R(Array.prototype.forEach), ft = R(Array.prototype.pop), V = R(Array.prototype.push), re = R(String.prototype.toLowerCase), Le = R(String.prototype.toString), mt = R(String.prototype.match), j = R(String.prototype.replace), rn = R(String.prototype.indexOf), an = R(String.prototype.trim), N = R(Object.prototype.hasOwnProperty), S = R(RegExp.prototype.test), $ = sn(TypeError);
|
|
39
40
|
function R(s) {
|
|
40
41
|
return function(n) {
|
|
41
42
|
for (var l = arguments.length, r = new Array(l > 1 ? l - 1 : 0), f = 1; f < l; f++)
|
|
@@ -43,147 +44,147 @@ function R(s) {
|
|
|
43
44
|
return Me(s, n, r);
|
|
44
45
|
};
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function sn(s) {
|
|
47
48
|
return function() {
|
|
48
49
|
for (var n = arguments.length, l = new Array(n), r = 0; r < n; r++)
|
|
49
50
|
l[r] = arguments[r];
|
|
50
|
-
return
|
|
51
|
+
return Ie(s, l);
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
54
|
function a(s, n) {
|
|
54
55
|
let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : re;
|
|
55
|
-
|
|
56
|
+
ut && ut(s, null);
|
|
56
57
|
let r = n.length;
|
|
57
58
|
for (; r--; ) {
|
|
58
59
|
let f = n[r];
|
|
59
60
|
if (typeof f == "string") {
|
|
60
|
-
const
|
|
61
|
-
|
|
61
|
+
const L = l(f);
|
|
62
|
+
L !== f && (tn(n) || (n[r] = L), f = L);
|
|
62
63
|
}
|
|
63
64
|
s[f] = !0;
|
|
64
65
|
}
|
|
65
66
|
return s;
|
|
66
67
|
}
|
|
67
|
-
function
|
|
68
|
+
function ln(s) {
|
|
68
69
|
for (let n = 0; n < s.length; n++)
|
|
69
|
-
|
|
70
|
+
N(s, n) || (s[n] = null);
|
|
70
71
|
return s;
|
|
71
72
|
}
|
|
72
|
-
function
|
|
73
|
-
const n =
|
|
74
|
-
for (const [l, r] of
|
|
75
|
-
|
|
73
|
+
function x(s) {
|
|
74
|
+
const n = gt(null);
|
|
75
|
+
for (const [l, r] of ht(s))
|
|
76
|
+
N(s, l) && (Array.isArray(r) ? n[l] = ln(r) : r && typeof r == "object" && r.constructor === Object ? n[l] = x(r) : n[l] = r);
|
|
76
77
|
return n;
|
|
77
78
|
}
|
|
78
79
|
function oe(s, n) {
|
|
79
80
|
for (; s !== null; ) {
|
|
80
|
-
const r =
|
|
81
|
+
const r = on(s, n);
|
|
81
82
|
if (r) {
|
|
82
83
|
if (r.get)
|
|
83
84
|
return R(r.get);
|
|
84
85
|
if (typeof r.value == "function")
|
|
85
86
|
return R(r.value);
|
|
86
87
|
}
|
|
87
|
-
s =
|
|
88
|
+
s = nn(s);
|
|
88
89
|
}
|
|
89
90
|
function l() {
|
|
90
91
|
return null;
|
|
91
92
|
}
|
|
92
93
|
return l;
|
|
93
94
|
}
|
|
94
|
-
const
|
|
95
|
+
const pt = h(["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"]), Oe = h(["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"]), Ne = h(["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"]), cn = h(["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"]), De = h(["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"]), un = h(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), dt = h(["#text"]), _t = h(["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", "wrap", "xmlns", "slot"]), be = h(["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"]), Tt = h(["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"]), ie = h(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), fn = y(/\{\{[\w\W]*|[\w\W]*\}\}/gm), mn = y(/<%[\w\W]*|[\w\W]*%>/gm), pn = y(/\${[\w\W]*}/gm), dn = y(/^data-[\-\w.\u00B7-\uFFFF]/), _n = y(/^aria-[\-\w]+$/), At = y(
|
|
95
96
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
96
97
|
// eslint-disable-line no-useless-escape
|
|
97
|
-
),
|
|
98
|
+
), Tn = y(/^(?:\w+script|data):/i), En = y(
|
|
98
99
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
99
100
|
// eslint-disable-line no-control-regex
|
|
100
|
-
),
|
|
101
|
-
var
|
|
101
|
+
), St = y(/^html$/i), hn = y(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
102
|
+
var Et = /* @__PURE__ */ Object.freeze({
|
|
102
103
|
__proto__: null,
|
|
103
|
-
MUSTACHE_EXPR:
|
|
104
|
-
ERB_EXPR:
|
|
105
|
-
TMPLIT_EXPR:
|
|
106
|
-
DATA_ATTR:
|
|
107
|
-
ARIA_ATTR:
|
|
108
|
-
IS_ALLOWED_URI:
|
|
109
|
-
IS_SCRIPT_OR_DATA:
|
|
110
|
-
ATTR_WHITESPACE:
|
|
111
|
-
DOCTYPE_NAME:
|
|
112
|
-
CUSTOM_ELEMENT:
|
|
104
|
+
MUSTACHE_EXPR: fn,
|
|
105
|
+
ERB_EXPR: mn,
|
|
106
|
+
TMPLIT_EXPR: pn,
|
|
107
|
+
DATA_ATTR: dn,
|
|
108
|
+
ARIA_ATTR: _n,
|
|
109
|
+
IS_ALLOWED_URI: At,
|
|
110
|
+
IS_SCRIPT_OR_DATA: Tn,
|
|
111
|
+
ATTR_WHITESPACE: En,
|
|
112
|
+
DOCTYPE_NAME: St,
|
|
113
|
+
CUSTOM_ELEMENT: hn
|
|
113
114
|
});
|
|
114
|
-
const
|
|
115
|
+
const gn = function() {
|
|
115
116
|
return typeof window > "u" ? null : window;
|
|
116
|
-
},
|
|
117
|
+
}, An = function(n, l) {
|
|
117
118
|
if (typeof n != "object" || typeof n.createPolicy != "function")
|
|
118
119
|
return null;
|
|
119
120
|
let r = null;
|
|
120
121
|
const f = "data-tt-policy-suffix";
|
|
121
122
|
l && l.hasAttribute(f) && (r = l.getAttribute(f));
|
|
122
|
-
const
|
|
123
|
+
const L = "dompurify" + (r ? "#" + r : "");
|
|
123
124
|
try {
|
|
124
|
-
return n.createPolicy(
|
|
125
|
-
createHTML(
|
|
126
|
-
return
|
|
125
|
+
return n.createPolicy(L, {
|
|
126
|
+
createHTML(O) {
|
|
127
|
+
return O;
|
|
127
128
|
},
|
|
128
|
-
createScriptURL(
|
|
129
|
-
return
|
|
129
|
+
createScriptURL(O) {
|
|
130
|
+
return O;
|
|
130
131
|
}
|
|
131
132
|
});
|
|
132
133
|
} catch {
|
|
133
|
-
return console.warn("TrustedTypes policy " +
|
|
134
|
+
return console.warn("TrustedTypes policy " + L + " could not be created."), null;
|
|
134
135
|
}
|
|
135
136
|
};
|
|
136
|
-
function
|
|
137
|
-
let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
138
|
-
const n = (i) =>
|
|
137
|
+
function Rt() {
|
|
138
|
+
let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : gn();
|
|
139
|
+
const n = (i) => Rt(i);
|
|
139
140
|
if (n.version = "3.1.0", n.removed = [], !s || !s.document || s.document.nodeType !== 9)
|
|
140
141
|
return n.isSupported = !1, n;
|
|
141
142
|
let {
|
|
142
143
|
document: l
|
|
143
144
|
} = s;
|
|
144
145
|
const r = l, f = r.currentScript, {
|
|
145
|
-
DocumentFragment:
|
|
146
|
-
HTMLTemplateElement:
|
|
147
|
-
Node:
|
|
148
|
-
Element:
|
|
149
|
-
NodeFilter:
|
|
150
|
-
NamedNodeMap:
|
|
151
|
-
HTMLFormElement:
|
|
152
|
-
DOMParser:
|
|
146
|
+
DocumentFragment: L,
|
|
147
|
+
HTMLTemplateElement: O,
|
|
148
|
+
Node: q,
|
|
149
|
+
Element: Ce,
|
|
150
|
+
NodeFilter: z,
|
|
151
|
+
NamedNodeMap: yt = s.NamedNodeMap || s.MozNamedAttrMap,
|
|
152
|
+
HTMLFormElement: Lt,
|
|
153
|
+
DOMParser: Ot,
|
|
153
154
|
trustedTypes: K
|
|
154
|
-
} = s, Z =
|
|
155
|
-
if (typeof
|
|
155
|
+
} = s, Z = Ce.prototype, Nt = oe(Z, "cloneNode"), Dt = oe(Z, "nextSibling"), bt = oe(Z, "childNodes"), ae = oe(Z, "parentNode");
|
|
156
|
+
if (typeof O == "function") {
|
|
156
157
|
const i = l.createElement("template");
|
|
157
158
|
i.content && i.content.ownerDocument && (l = i.content.ownerDocument);
|
|
158
159
|
}
|
|
159
|
-
let E,
|
|
160
|
+
let E, W = "";
|
|
160
161
|
const {
|
|
161
|
-
implementation:
|
|
162
|
-
createNodeIterator:
|
|
163
|
-
createDocumentFragment:
|
|
164
|
-
getElementsByTagName:
|
|
162
|
+
implementation: se,
|
|
163
|
+
createNodeIterator: Mt,
|
|
164
|
+
createDocumentFragment: It,
|
|
165
|
+
getElementsByTagName: Ct
|
|
165
166
|
} = l, {
|
|
166
|
-
importNode:
|
|
167
|
+
importNode: wt
|
|
167
168
|
} = r;
|
|
168
|
-
let
|
|
169
|
-
n.isSupported = typeof
|
|
169
|
+
let D = {};
|
|
170
|
+
n.isSupported = typeof ht == "function" && typeof ae == "function" && se && se.createHTMLDocument !== void 0;
|
|
170
171
|
const {
|
|
171
|
-
MUSTACHE_EXPR:
|
|
172
|
-
ERB_EXPR:
|
|
173
|
-
TMPLIT_EXPR:
|
|
174
|
-
DATA_ATTR:
|
|
175
|
-
ARIA_ATTR:
|
|
176
|
-
IS_SCRIPT_OR_DATA:
|
|
177
|
-
ATTR_WHITESPACE:
|
|
178
|
-
CUSTOM_ELEMENT:
|
|
179
|
-
} =
|
|
172
|
+
MUSTACHE_EXPR: le,
|
|
173
|
+
ERB_EXPR: ce,
|
|
174
|
+
TMPLIT_EXPR: ue,
|
|
175
|
+
DATA_ATTR: xt,
|
|
176
|
+
ARIA_ATTR: Pt,
|
|
177
|
+
IS_SCRIPT_OR_DATA: kt,
|
|
178
|
+
ATTR_WHITESPACE: we,
|
|
179
|
+
CUSTOM_ELEMENT: vt
|
|
180
|
+
} = Et;
|
|
180
181
|
let {
|
|
181
|
-
IS_ALLOWED_URI:
|
|
182
|
-
} =
|
|
183
|
-
const
|
|
182
|
+
IS_ALLOWED_URI: xe
|
|
183
|
+
} = Et, m = null;
|
|
184
|
+
const Pe = a({}, [...pt, ...Oe, ...Ne, ...De, ...dt]);
|
|
184
185
|
let p = null;
|
|
185
|
-
const
|
|
186
|
-
let u = Object.seal(
|
|
186
|
+
const ke = a({}, [..._t, ...be, ...Tt, ...ie]);
|
|
187
|
+
let u = Object.seal(gt(null, {
|
|
187
188
|
tagNameCheck: {
|
|
188
189
|
writable: !0,
|
|
189
190
|
configurable: !1,
|
|
@@ -202,59 +203,59 @@ function St() {
|
|
|
202
203
|
enumerable: !0,
|
|
203
204
|
value: !1
|
|
204
205
|
}
|
|
205
|
-
})),
|
|
206
|
-
const
|
|
207
|
-
let
|
|
208
|
-
const
|
|
209
|
-
let
|
|
210
|
-
const
|
|
211
|
-
let
|
|
212
|
-
const
|
|
213
|
-
let
|
|
214
|
-
const
|
|
215
|
-
let
|
|
216
|
-
const
|
|
217
|
-
let d = null,
|
|
218
|
-
const
|
|
206
|
+
})), G = null, fe = null, ve = !0, me = !0, Ue = !1, Fe = !0, P = !1, He = !0, C = !1, pe = !1, de = !1, k = !1, J = !1, Q = !1, ze = !0, We = !1;
|
|
207
|
+
const Ut = "user-content-";
|
|
208
|
+
let _e = !0, B = !1, v = {}, U = null;
|
|
209
|
+
const Ge = a({}, ["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"]);
|
|
210
|
+
let Be = null;
|
|
211
|
+
const Ye = a({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
212
|
+
let Te = null;
|
|
213
|
+
const Xe = a({}, ["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", b = "http://www.w3.org/1999/xhtml";
|
|
214
|
+
let F = b, Ee = !1, he = null;
|
|
215
|
+
const Ft = a({}, [ee, te, b], Le);
|
|
216
|
+
let Y = null;
|
|
217
|
+
const Ht = ["application/xhtml+xml", "text/html"], zt = "text/html";
|
|
218
|
+
let d = null, H = null;
|
|
219
|
+
const Wt = l.createElement("form"), Ve = function(e) {
|
|
219
220
|
return e instanceof RegExp || e instanceof Function;
|
|
220
|
-
},
|
|
221
|
+
}, ge = function() {
|
|
221
222
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
222
|
-
if (!(
|
|
223
|
-
if ((!e || typeof e != "object") && (e = {}), e =
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
if (!(H && H === e)) {
|
|
224
|
+
if ((!e || typeof e != "object") && (e = {}), e = x(e), Y = // eslint-disable-next-line unicorn/prefer-includes
|
|
225
|
+
Ht.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? zt : e.PARSER_MEDIA_TYPE, d = Y === "application/xhtml+xml" ? Le : re, m = N(e, "ALLOWED_TAGS") ? a({}, e.ALLOWED_TAGS, d) : Pe, p = N(e, "ALLOWED_ATTR") ? a({}, e.ALLOWED_ATTR, d) : ke, he = N(e, "ALLOWED_NAMESPACES") ? a({}, e.ALLOWED_NAMESPACES, Le) : Ft, Te = N(e, "ADD_URI_SAFE_ATTR") ? a(
|
|
226
|
+
x(Xe),
|
|
226
227
|
// eslint-disable-line indent
|
|
227
228
|
e.ADD_URI_SAFE_ATTR,
|
|
228
229
|
// eslint-disable-line indent
|
|
229
230
|
d
|
|
230
231
|
// eslint-disable-line indent
|
|
231
|
-
) :
|
|
232
|
-
|
|
232
|
+
) : Xe, Be = N(e, "ADD_DATA_URI_TAGS") ? a(
|
|
233
|
+
x(Ye),
|
|
233
234
|
// eslint-disable-line indent
|
|
234
235
|
e.ADD_DATA_URI_TAGS,
|
|
235
236
|
// eslint-disable-line indent
|
|
236
237
|
d
|
|
237
238
|
// eslint-disable-line indent
|
|
238
|
-
) :
|
|
239
|
+
) : Ye, U = N(e, "FORBID_CONTENTS") ? a({}, e.FORBID_CONTENTS, d) : Ge, G = N(e, "FORBID_TAGS") ? a({}, e.FORBID_TAGS, d) : {}, fe = N(e, "FORBID_ATTR") ? a({}, e.FORBID_ATTR, d) : {}, v = N(e, "USE_PROFILES") ? e.USE_PROFILES : !1, ve = e.ALLOW_ARIA_ATTR !== !1, me = e.ALLOW_DATA_ATTR !== !1, Ue = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Fe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, P = e.SAFE_FOR_TEMPLATES || !1, He = e.SAFE_FOR_XML !== !1, C = e.WHOLE_DOCUMENT || !1, k = e.RETURN_DOM || !1, J = e.RETURN_DOM_FRAGMENT || !1, Q = e.RETURN_TRUSTED_TYPE || !1, de = e.FORCE_BODY || !1, ze = e.SANITIZE_DOM !== !1, We = e.SANITIZE_NAMED_PROPS || !1, _e = e.KEEP_CONTENT !== !1, B = e.IN_PLACE || !1, xe = e.ALLOWED_URI_REGEXP || At, F = e.NAMESPACE || b, u = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Ve(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (u.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Ve(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (u.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (u.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), P && (me = !1), J && (k = !0), v && (m = a({}, dt), p = [], v.html === !0 && (a(m, pt), a(p, _t)), v.svg === !0 && (a(m, Oe), a(p, be), a(p, ie)), v.svgFilters === !0 && (a(m, Ne), a(p, be), a(p, ie)), v.mathMl === !0 && (a(m, De), a(p, Tt), a(p, ie))), e.ADD_TAGS && (m === Pe && (m = x(m)), a(m, e.ADD_TAGS, d)), e.ADD_ATTR && (p === ke && (p = x(p)), a(p, e.ADD_ATTR, d)), e.ADD_URI_SAFE_ATTR && a(Te, e.ADD_URI_SAFE_ATTR, d), e.FORBID_CONTENTS && (U === Ge && (U = x(U)), a(U, e.FORBID_CONTENTS, d)), _e && (m["#text"] = !0), C && a(m, ["html", "head", "body"]), m.table && (a(m, ["tbody"]), delete G.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
239
240
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
240
|
-
throw
|
|
241
|
+
throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
241
242
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
242
|
-
throw
|
|
243
|
-
E = e.TRUSTED_TYPES_POLICY,
|
|
243
|
+
throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
244
|
+
E = e.TRUSTED_TYPES_POLICY, W = E.createHTML("");
|
|
244
245
|
} else
|
|
245
|
-
E === void 0 && (E =
|
|
246
|
-
h && h(e),
|
|
246
|
+
E === void 0 && (E = An(K, f)), E !== null && typeof W == "string" && (W = E.createHTML(""));
|
|
247
|
+
h && h(e), H = e;
|
|
247
248
|
}
|
|
248
|
-
},
|
|
249
|
-
let t =
|
|
249
|
+
}, je = a({}, ["mi", "mo", "mn", "ms", "mtext"]), $e = a({}, ["foreignobject", "desc", "title", "annotation-xml"]), Gt = a({}, ["title", "style", "font", "a", "script"]), qe = a({}, [...Oe, ...Ne, ...cn]), Ke = a({}, [...De, ...un]), Bt = function(e) {
|
|
250
|
+
let t = ae(e);
|
|
250
251
|
(!t || !t.tagName) && (t = {
|
|
251
|
-
namespaceURI:
|
|
252
|
+
namespaceURI: F,
|
|
252
253
|
tagName: "template"
|
|
253
254
|
});
|
|
254
255
|
const o = re(e.tagName), c = re(t.tagName);
|
|
255
|
-
return
|
|
256
|
-
},
|
|
257
|
-
|
|
256
|
+
return he[e.namespaceURI] ? e.namespaceURI === te ? t.namespaceURI === b ? o === "svg" : t.namespaceURI === ee ? o === "svg" && (c === "annotation-xml" || je[c]) : !!qe[o] : e.namespaceURI === ee ? t.namespaceURI === b ? o === "math" : t.namespaceURI === te ? o === "math" && $e[c] : !!Ke[o] : e.namespaceURI === b ? t.namespaceURI === te && !$e[c] || t.namespaceURI === ee && !je[c] ? !1 : !Ke[o] && (Gt[o] || !qe[o]) : !!(Y === "application/xhtml+xml" && he[e.namespaceURI]) : !1;
|
|
257
|
+
}, M = function(e) {
|
|
258
|
+
V(n.removed, {
|
|
258
259
|
element: e
|
|
259
260
|
});
|
|
260
261
|
try {
|
|
@@ -262,22 +263,22 @@ function St() {
|
|
|
262
263
|
} catch {
|
|
263
264
|
e.remove();
|
|
264
265
|
}
|
|
265
|
-
},
|
|
266
|
+
}, Ae = function(e, t) {
|
|
266
267
|
try {
|
|
267
|
-
|
|
268
|
+
V(n.removed, {
|
|
268
269
|
attribute: t.getAttributeNode(e),
|
|
269
270
|
from: t
|
|
270
271
|
});
|
|
271
272
|
} catch {
|
|
272
|
-
|
|
273
|
+
V(n.removed, {
|
|
273
274
|
attribute: null,
|
|
274
275
|
from: t
|
|
275
276
|
});
|
|
276
277
|
}
|
|
277
278
|
if (t.removeAttribute(e), e === "is" && !p[e])
|
|
278
|
-
if (
|
|
279
|
+
if (k || J)
|
|
279
280
|
try {
|
|
280
|
-
|
|
281
|
+
M(t);
|
|
281
282
|
} catch {
|
|
282
283
|
}
|
|
283
284
|
else
|
|
@@ -285,93 +286,93 @@ function St() {
|
|
|
285
286
|
t.setAttribute(e, "");
|
|
286
287
|
} catch {
|
|
287
288
|
}
|
|
288
|
-
},
|
|
289
|
+
}, Ze = function(e) {
|
|
289
290
|
let t = null, o = null;
|
|
290
|
-
if (
|
|
291
|
+
if (de)
|
|
291
292
|
e = "<remove></remove>" + e;
|
|
292
293
|
else {
|
|
293
|
-
const T =
|
|
294
|
+
const T = mt(e, /^[\r\n\t ]+/);
|
|
294
295
|
o = T && T[0];
|
|
295
296
|
}
|
|
296
|
-
|
|
297
|
+
Y === "application/xhtml+xml" && F === b && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
|
|
297
298
|
const c = E ? E.createHTML(e) : e;
|
|
298
|
-
if (
|
|
299
|
+
if (F === b)
|
|
299
300
|
try {
|
|
300
|
-
t = new
|
|
301
|
+
t = new Ot().parseFromString(c, Y);
|
|
301
302
|
} catch {
|
|
302
303
|
}
|
|
303
304
|
if (!t || !t.documentElement) {
|
|
304
|
-
t =
|
|
305
|
+
t = se.createDocument(F, "template", null);
|
|
305
306
|
try {
|
|
306
|
-
t.documentElement.innerHTML =
|
|
307
|
+
t.documentElement.innerHTML = Ee ? W : c;
|
|
307
308
|
} catch {
|
|
308
309
|
}
|
|
309
310
|
}
|
|
310
311
|
const _ = t.body || t.documentElement;
|
|
311
|
-
return e && o && _.insertBefore(l.createTextNode(o), _.childNodes[0] || null),
|
|
312
|
-
},
|
|
313
|
-
return
|
|
312
|
+
return e && o && _.insertBefore(l.createTextNode(o), _.childNodes[0] || null), F === b ? Ct.call(t, C ? "html" : "body")[0] : C ? t.documentElement : _;
|
|
313
|
+
}, Je = function(e) {
|
|
314
|
+
return Mt.call(
|
|
314
315
|
e.ownerDocument || e,
|
|
315
316
|
e,
|
|
316
317
|
// eslint-disable-next-line no-bitwise
|
|
317
|
-
|
|
318
|
+
z.SHOW_ELEMENT | z.SHOW_COMMENT | z.SHOW_TEXT | z.SHOW_PROCESSING_INSTRUCTION | z.SHOW_CDATA_SECTION,
|
|
318
319
|
null
|
|
319
320
|
);
|
|
320
|
-
},
|
|
321
|
-
return e instanceof
|
|
322
|
-
},
|
|
323
|
-
return typeof
|
|
324
|
-
},
|
|
325
|
-
|
|
326
|
-
c.call(n, t, o,
|
|
321
|
+
}, Yt = function(e) {
|
|
322
|
+
return e instanceof Lt && (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");
|
|
323
|
+
}, Qe = function(e) {
|
|
324
|
+
return typeof q == "function" && e instanceof q;
|
|
325
|
+
}, I = function(e, t, o) {
|
|
326
|
+
D[e] && ne(D[e], (c) => {
|
|
327
|
+
c.call(n, t, o, H);
|
|
327
328
|
});
|
|
328
|
-
},
|
|
329
|
+
}, et = function(e) {
|
|
329
330
|
let t = null;
|
|
330
|
-
if (
|
|
331
|
-
return
|
|
331
|
+
if (I("beforeSanitizeElements", e, null), Yt(e))
|
|
332
|
+
return M(e), !0;
|
|
332
333
|
const o = d(e.nodeName);
|
|
333
|
-
if (
|
|
334
|
+
if (I("uponSanitizeElement", e, {
|
|
334
335
|
tagName: o,
|
|
335
336
|
allowedTags: m
|
|
336
|
-
}), e.hasChildNodes() && !
|
|
337
|
-
return
|
|
338
|
-
if (!m[o] ||
|
|
339
|
-
if (!
|
|
337
|
+
}), e.hasChildNodes() && !Qe(e.firstElementChild) && S(/<[/\w]/g, e.innerHTML) && S(/<[/\w]/g, e.textContent) || e.nodeType === 7 || He && e.nodeType === 8 && S(/<[/\w]/g, e.data))
|
|
338
|
+
return M(e), !0;
|
|
339
|
+
if (!m[o] || G[o]) {
|
|
340
|
+
if (!G[o] && nt(o) && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, o) || u.tagNameCheck instanceof Function && u.tagNameCheck(o)))
|
|
340
341
|
return !1;
|
|
341
|
-
if (
|
|
342
|
-
const c =
|
|
342
|
+
if (_e && !U[o]) {
|
|
343
|
+
const c = ae(e) || e.parentNode, _ = bt(e) || e.childNodes;
|
|
343
344
|
if (_ && c) {
|
|
344
345
|
const T = _.length;
|
|
345
346
|
for (let g = T - 1; g >= 0; --g)
|
|
346
|
-
c.insertBefore(
|
|
347
|
+
c.insertBefore(Nt(_[g], !0), Dt(e));
|
|
347
348
|
}
|
|
348
349
|
}
|
|
349
|
-
return
|
|
350
|
+
return M(e), !0;
|
|
350
351
|
}
|
|
351
|
-
return e instanceof
|
|
352
|
-
t =
|
|
353
|
-
}), e.textContent !== t && (
|
|
352
|
+
return e instanceof Ce && !Bt(e) || (o === "noscript" || o === "noembed" || o === "noframes") && S(/<\/no(script|embed|frames)/i, e.innerHTML) ? (M(e), !0) : (P && e.nodeType === 3 && (t = e.textContent, ne([le, ce, ue], (c) => {
|
|
353
|
+
t = j(t, c, " ");
|
|
354
|
+
}), e.textContent !== t && (V(n.removed, {
|
|
354
355
|
element: e.cloneNode()
|
|
355
|
-
}), e.textContent = t)),
|
|
356
|
-
},
|
|
357
|
-
if (
|
|
356
|
+
}), e.textContent = t)), I("afterSanitizeElements", e, null), !1);
|
|
357
|
+
}, tt = function(e, t, o) {
|
|
358
|
+
if (ze && (t === "id" || t === "name") && (o in l || o in Wt))
|
|
358
359
|
return !1;
|
|
359
|
-
if (!(
|
|
360
|
-
if (!(
|
|
361
|
-
if (!p[t] ||
|
|
360
|
+
if (!(me && !fe[t] && S(xt, t))) {
|
|
361
|
+
if (!(ve && S(Pt, t))) {
|
|
362
|
+
if (!p[t] || fe[t]) {
|
|
362
363
|
if (
|
|
363
364
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
364
365
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
365
366
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
366
|
-
!(
|
|
367
|
+
!(nt(e) && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, e) || u.tagNameCheck instanceof Function && u.tagNameCheck(e)) && (u.attributeNameCheck instanceof RegExp && S(u.attributeNameCheck, t) || u.attributeNameCheck instanceof Function && u.attributeNameCheck(t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
367
368
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
368
369
|
t === "is" && u.allowCustomizedBuiltInElements && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, o) || u.tagNameCheck instanceof Function && u.tagNameCheck(o)))
|
|
369
370
|
)
|
|
370
371
|
return !1;
|
|
371
|
-
} else if (!
|
|
372
|
-
if (!S(
|
|
373
|
-
if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" &&
|
|
374
|
-
if (!(
|
|
372
|
+
} else if (!Te[t]) {
|
|
373
|
+
if (!S(xe, j(o, we, ""))) {
|
|
374
|
+
if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && rn(o, "data:") === 0 && Be[e])) {
|
|
375
|
+
if (!(Ue && !S(kt, j(o, we, "")))) {
|
|
375
376
|
if (o)
|
|
376
377
|
return !1;
|
|
377
378
|
}
|
|
@@ -381,10 +382,10 @@ function St() {
|
|
|
381
382
|
}
|
|
382
383
|
}
|
|
383
384
|
return !0;
|
|
385
|
+
}, nt = function(e) {
|
|
386
|
+
return e !== "annotation-xml" && mt(e, vt);
|
|
384
387
|
}, ot = function(e) {
|
|
385
|
-
|
|
386
|
-
}, it = function(e) {
|
|
387
|
-
C("beforeSanitizeAttributes", e, null);
|
|
388
|
+
I("beforeSanitizeAttributes", e, null);
|
|
388
389
|
const {
|
|
389
390
|
attributes: t
|
|
390
391
|
} = e;
|
|
@@ -401,22 +402,22 @@ function St() {
|
|
|
401
402
|
const _ = t[c], {
|
|
402
403
|
name: T,
|
|
403
404
|
namespaceURI: g,
|
|
404
|
-
value:
|
|
405
|
-
} = _,
|
|
406
|
-
let A = T === "value" ?
|
|
407
|
-
if (o.attrName =
|
|
405
|
+
value: w
|
|
406
|
+
} = _, X = d(T);
|
|
407
|
+
let A = T === "value" ? w : an(w);
|
|
408
|
+
if (o.attrName = X, o.attrValue = A, o.keepAttr = !0, o.forceKeepAttr = void 0, I("uponSanitizeAttribute", e, o), A = o.attrValue, o.forceKeepAttr || (Ae(T, e), !o.keepAttr))
|
|
408
409
|
continue;
|
|
409
|
-
if (!
|
|
410
|
-
|
|
410
|
+
if (!Fe && S(/\/>/i, A)) {
|
|
411
|
+
Ae(T, e);
|
|
411
412
|
continue;
|
|
412
413
|
}
|
|
413
|
-
|
|
414
|
-
A =
|
|
414
|
+
P && ne([le, ce, ue], (rt) => {
|
|
415
|
+
A = j(A, rt, " ");
|
|
415
416
|
});
|
|
416
|
-
const
|
|
417
|
-
if (
|
|
418
|
-
if (
|
|
419
|
-
switch (K.getAttributeType(
|
|
417
|
+
const it = d(e.nodeName);
|
|
418
|
+
if (tt(it, X, A)) {
|
|
419
|
+
if (We && (X === "id" || X === "name") && (Ae(T, e), A = Ut + A), E && typeof K == "object" && typeof K.getAttributeType == "function" && !g)
|
|
420
|
+
switch (K.getAttributeType(it, X)) {
|
|
420
421
|
case "TrustedHTML": {
|
|
421
422
|
A = E.createHTML(A);
|
|
422
423
|
break;
|
|
@@ -427,123 +428,125 @@ function St() {
|
|
|
427
428
|
}
|
|
428
429
|
}
|
|
429
430
|
try {
|
|
430
|
-
g ? e.setAttributeNS(g, T, A) : e.setAttribute(T, A),
|
|
431
|
+
g ? e.setAttributeNS(g, T, A) : e.setAttribute(T, A), ft(n.removed);
|
|
431
432
|
} catch {
|
|
432
433
|
}
|
|
433
434
|
}
|
|
434
435
|
}
|
|
435
|
-
|
|
436
|
-
},
|
|
436
|
+
I("afterSanitizeAttributes", e, null);
|
|
437
|
+
}, Xt = function i(e) {
|
|
437
438
|
let t = null;
|
|
438
|
-
const o =
|
|
439
|
-
for (
|
|
440
|
-
|
|
441
|
-
|
|
439
|
+
const o = Je(e);
|
|
440
|
+
for (I("beforeSanitizeShadowDOM", e, null); t = o.nextNode(); )
|
|
441
|
+
I("uponSanitizeShadowNode", t, null), !et(t) && (t.content instanceof L && i(t.content), ot(t));
|
|
442
|
+
I("afterSanitizeShadowDOM", e, null);
|
|
442
443
|
};
|
|
443
444
|
return n.sanitize = function(i) {
|
|
444
445
|
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, o = null, c = null, _ = null;
|
|
445
|
-
if (
|
|
446
|
+
if (Ee = !i, Ee && (i = "<!-->"), typeof i != "string" && !Qe(i))
|
|
446
447
|
if (typeof i.toString == "function") {
|
|
447
448
|
if (i = i.toString(), typeof i != "string")
|
|
448
|
-
throw
|
|
449
|
+
throw $("dirty is not a string, aborting");
|
|
449
450
|
} else
|
|
450
|
-
throw
|
|
451
|
+
throw $("toString is not a function");
|
|
451
452
|
if (!n.isSupported)
|
|
452
453
|
return i;
|
|
453
|
-
if (
|
|
454
|
+
if (pe || ge(e), n.removed = [], typeof i == "string" && (B = !1), B) {
|
|
454
455
|
if (i.nodeName) {
|
|
455
|
-
const
|
|
456
|
-
if (!m[
|
|
457
|
-
throw
|
|
456
|
+
const w = d(i.nodeName);
|
|
457
|
+
if (!m[w] || G[w])
|
|
458
|
+
throw $("root node is forbidden and cannot be sanitized in-place");
|
|
458
459
|
}
|
|
459
|
-
} else if (i instanceof
|
|
460
|
-
t =
|
|
460
|
+
} else if (i instanceof q)
|
|
461
|
+
t = Ze("<!---->"), o = t.ownerDocument.importNode(i, !0), o.nodeType === 1 && o.nodeName === "BODY" || o.nodeName === "HTML" ? t = o : t.appendChild(o);
|
|
461
462
|
else {
|
|
462
|
-
if (!
|
|
463
|
+
if (!k && !P && !C && // eslint-disable-next-line unicorn/prefer-includes
|
|
463
464
|
i.indexOf("<") === -1)
|
|
464
465
|
return E && Q ? E.createHTML(i) : i;
|
|
465
|
-
if (t =
|
|
466
|
-
return
|
|
466
|
+
if (t = Ze(i), !t)
|
|
467
|
+
return k ? null : Q ? W : "";
|
|
467
468
|
}
|
|
468
|
-
t &&
|
|
469
|
-
const T =
|
|
469
|
+
t && de && M(t.firstChild);
|
|
470
|
+
const T = Je(B ? i : t);
|
|
470
471
|
for (; c = T.nextNode(); )
|
|
471
|
-
|
|
472
|
-
if (
|
|
472
|
+
et(c) || (c.content instanceof L && Xt(c.content), ot(c));
|
|
473
|
+
if (B)
|
|
473
474
|
return i;
|
|
474
|
-
if (
|
|
475
|
+
if (k) {
|
|
475
476
|
if (J)
|
|
476
|
-
for (_ =
|
|
477
|
+
for (_ = It.call(t.ownerDocument); t.firstChild; )
|
|
477
478
|
_.appendChild(t.firstChild);
|
|
478
479
|
else
|
|
479
480
|
_ = t;
|
|
480
|
-
return (p.shadowroot || p.shadowrootmode) && (_ =
|
|
481
|
+
return (p.shadowroot || p.shadowrootmode) && (_ = wt.call(r, _, !0)), _;
|
|
481
482
|
}
|
|
482
|
-
let g =
|
|
483
|
-
return
|
|
484
|
-
` + g),
|
|
485
|
-
g =
|
|
483
|
+
let g = C ? t.outerHTML : t.innerHTML;
|
|
484
|
+
return C && m["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && S(St, t.ownerDocument.doctype.name) && (g = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
|
|
485
|
+
` + g), P && ne([le, ce, ue], (w) => {
|
|
486
|
+
g = j(g, w, " ");
|
|
486
487
|
}), E && Q ? E.createHTML(g) : g;
|
|
487
488
|
}, n.setConfig = function() {
|
|
488
489
|
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
489
|
-
|
|
490
|
+
ge(i), pe = !0;
|
|
490
491
|
}, n.clearConfig = function() {
|
|
491
|
-
|
|
492
|
+
H = null, pe = !1;
|
|
492
493
|
}, n.isValidAttribute = function(i, e, t) {
|
|
493
|
-
|
|
494
|
+
H || ge({});
|
|
494
495
|
const o = d(i), c = d(e);
|
|
495
|
-
return
|
|
496
|
+
return tt(o, c, t);
|
|
496
497
|
}, n.addHook = function(i, e) {
|
|
497
|
-
typeof e == "function" && (
|
|
498
|
+
typeof e == "function" && (D[i] = D[i] || [], V(D[i], e));
|
|
498
499
|
}, n.removeHook = function(i) {
|
|
499
|
-
if (
|
|
500
|
-
return
|
|
500
|
+
if (D[i])
|
|
501
|
+
return ft(D[i]);
|
|
501
502
|
}, n.removeHooks = function(i) {
|
|
502
|
-
|
|
503
|
+
D[i] && (D[i] = []);
|
|
503
504
|
}, n.removeAllHooks = function() {
|
|
504
|
-
|
|
505
|
+
D = {};
|
|
505
506
|
}, n;
|
|
506
507
|
}
|
|
507
|
-
var
|
|
508
|
-
const
|
|
508
|
+
var Sn = Rt();
|
|
509
|
+
const Rn = ["role"], yn = ["innerHTML"], Ln = { key: 1 }, On = /* @__PURE__ */ Vt({
|
|
509
510
|
__name: "Toast",
|
|
510
511
|
props: {
|
|
511
512
|
text: {},
|
|
512
513
|
status: { default: "info" }
|
|
513
514
|
},
|
|
514
515
|
setup(s) {
|
|
515
|
-
const n = s, l =
|
|
516
|
-
() => n.status ?
|
|
517
|
-
), f =
|
|
518
|
-
if (
|
|
519
|
-
return
|
|
520
|
-
|
|
521
|
-
|
|
516
|
+
const n = s, l = jt(), r = at(
|
|
517
|
+
() => n.status ? ct[Kt(n.status)] : ct.Info
|
|
518
|
+
), f = at(() => n.status === Zt.Error ? "alert" : "status"), L = () => {
|
|
519
|
+
if (typeof n.text != "function")
|
|
520
|
+
return lt.error(
|
|
521
|
+
`Toast: ${n.text} is not a valid text prop value. Must be either a render function or a string.`
|
|
522
|
+
), null;
|
|
523
|
+
const O = n.text();
|
|
524
|
+
return qt(O) ? O : (lt.error("Toast: The text prop must return a VNode."), null);
|
|
522
525
|
};
|
|
523
|
-
return (
|
|
526
|
+
return (O, q) => (Se(), Re("li", {
|
|
524
527
|
role: f.value,
|
|
525
|
-
class:
|
|
528
|
+
class: $t([[ye(l).root, ye(l)[`status--${n.status}`]], "stash-toast"]),
|
|
526
529
|
"data-test": "stash-toast"
|
|
527
530
|
}, [
|
|
528
|
-
st(
|
|
529
|
-
|
|
531
|
+
st(Qt, { name: r.value }, null, 8, ["name"]),
|
|
532
|
+
typeof n.text == "string" ? (Se(), Re("div", {
|
|
530
533
|
key: 0,
|
|
531
|
-
innerHTML:
|
|
532
|
-
}, null, 8,
|
|
533
|
-
st(
|
|
534
|
+
innerHTML: ye(Sn).sanitize(O.text)
|
|
535
|
+
}, null, 8, yn)) : (Se(), Re("div", Ln, [
|
|
536
|
+
st(Jt, { render: L })
|
|
534
537
|
]))
|
|
535
|
-
], 10,
|
|
538
|
+
], 10, Rn));
|
|
536
539
|
}
|
|
537
|
-
}),
|
|
538
|
-
root:
|
|
540
|
+
}), Nn = "_root_p3yhd_2", Dn = {
|
|
541
|
+
root: Nn,
|
|
539
542
|
"status--success": "_status--success_p3yhd_22",
|
|
540
543
|
"status--error": "_status--error_p3yhd_31",
|
|
541
544
|
"status--info": "_status--info_p3yhd_40",
|
|
542
545
|
"status--warning": "_status--warning_p3yhd_49"
|
|
543
|
-
},
|
|
544
|
-
$style:
|
|
545
|
-
},
|
|
546
|
+
}, bn = {
|
|
547
|
+
$style: Dn
|
|
548
|
+
}, Hn = /* @__PURE__ */ en(On, [["__cssModules", bn]]);
|
|
546
549
|
export {
|
|
547
|
-
|
|
550
|
+
Hn as default
|
|
548
551
|
};
|
|
549
552
|
//# sourceMappingURL=Toast.js.map
|