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