easy-component-ui 3.0.13 → 3.0.15
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 +162 -162
- package/dist/components/Base.js +380 -313
- package/dist/components/ea-calendar2.js +159 -159
- package/dist/components/ea-icon.js +37 -36
- package/dist/components/ea-input.js +13 -13
- package/dist/components/ea-message.js +0 -1
- package/dist/components/ea-table.js +29 -27
- package/dist/components/ea-tabs.js +16 -14
- package/dist/core/FormBase.js +17 -17
- package/package.json +8 -2
package/dist/components/Base.js
CHANGED
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Qe = Object.defineProperty;
|
|
2
|
+
var Te = (a) => {
|
|
3
3
|
throw TypeError(a);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
import { v as
|
|
5
|
+
var Ve = (a, r, e) => r in a ? Qe(a, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[r] = e;
|
|
6
|
+
var V = (a, r, e) => Ve(a, typeof r != "symbol" ? r + "" : r, e), tn = (a, r, e) => r.has(a) || Te("Cannot " + e);
|
|
7
|
+
var Y = (a, r, e) => (tn(a, r, "read from private field"), e ? e.call(a) : r.get(a)), ge = (a, r, e) => r.has(a) ? Te("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(a) : r.set(a, e);
|
|
8
|
+
import { v as Ee } from "../css/ea-ui-component.style.js";
|
|
9
9
|
import "./ea-icon.js";
|
|
10
10
|
import { E as Ae } from "../utils/Utils.js";
|
|
11
11
|
/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
|
|
12
12
|
const {
|
|
13
|
-
entries:
|
|
14
|
-
setPrototypeOf:
|
|
15
|
-
isFrozen:
|
|
16
|
-
getPrototypeOf:
|
|
17
|
-
getOwnPropertyDescriptor:
|
|
13
|
+
entries: Ce,
|
|
14
|
+
setPrototypeOf: _e,
|
|
15
|
+
isFrozen: en,
|
|
16
|
+
getPrototypeOf: nn,
|
|
17
|
+
getOwnPropertyDescriptor: rn
|
|
18
18
|
} = Object;
|
|
19
19
|
let {
|
|
20
|
-
freeze:
|
|
20
|
+
freeze: C,
|
|
21
21
|
seal: w,
|
|
22
|
-
create:
|
|
22
|
+
create: Wt
|
|
23
23
|
} = Object, {
|
|
24
|
-
apply:
|
|
24
|
+
apply: jt,
|
|
25
25
|
construct: Yt
|
|
26
26
|
} = typeof Reflect < "u" && Reflect;
|
|
27
|
-
|
|
27
|
+
C || (C = function(r) {
|
|
28
28
|
return r;
|
|
29
29
|
});
|
|
30
30
|
w || (w = function(r) {
|
|
31
31
|
return r;
|
|
32
32
|
});
|
|
33
|
-
|
|
34
|
-
for (var i = arguments.length,
|
|
35
|
-
|
|
36
|
-
return r.apply(e,
|
|
33
|
+
jt || (jt = function(r, e) {
|
|
34
|
+
for (var i = arguments.length, o = new Array(i > 2 ? i - 2 : 0), m = 2; m < i; m++)
|
|
35
|
+
o[m - 2] = arguments[m];
|
|
36
|
+
return r.apply(e, o);
|
|
37
37
|
});
|
|
38
38
|
Yt || (Yt = function(r) {
|
|
39
|
-
for (var e = arguments.length, i = new Array(e > 1 ? e - 1 : 0),
|
|
40
|
-
i[
|
|
39
|
+
for (var e = arguments.length, i = new Array(e > 1 ? e - 1 : 0), o = 1; o < e; o++)
|
|
40
|
+
i[o - 1] = arguments[o];
|
|
41
41
|
return new r(...i);
|
|
42
42
|
});
|
|
43
|
-
const
|
|
44
|
-
function
|
|
43
|
+
const gt = L(Array.prototype.forEach), on = L(Array.prototype.lastIndexOf), Se = L(Array.prototype.pop), it = L(Array.prototype.push), sn = L(Array.prototype.splice), At = L(String.prototype.toLowerCase), kt = L(String.prototype.toString), Ut = L(String.prototype.match), ot = L(String.prototype.replace), an = L(String.prototype.indexOf), ln = L(String.prototype.trim), P = L(Object.prototype.hasOwnProperty), D = L(RegExp.prototype.test), st = cn(TypeError);
|
|
44
|
+
function L(a) {
|
|
45
45
|
return function(r) {
|
|
46
46
|
r instanceof RegExp && (r.lastIndex = 0);
|
|
47
|
-
for (var e = arguments.length, i = new Array(e > 1 ? e - 1 : 0),
|
|
48
|
-
i[
|
|
49
|
-
return
|
|
47
|
+
for (var e = arguments.length, i = new Array(e > 1 ? e - 1 : 0), o = 1; o < e; o++)
|
|
48
|
+
i[o - 1] = arguments[o];
|
|
49
|
+
return jt(a, r, i);
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function cn(a) {
|
|
53
53
|
return function() {
|
|
54
54
|
for (var r = arguments.length, e = new Array(r), i = 0; i < r; i++)
|
|
55
55
|
e[i] = arguments[i];
|
|
56
56
|
return Yt(a, e);
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
61
|
-
|
|
59
|
+
function p(a, r) {
|
|
60
|
+
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : At;
|
|
61
|
+
_e && _e(a, null);
|
|
62
62
|
let i = r.length;
|
|
63
63
|
for (; i--; ) {
|
|
64
|
-
let
|
|
65
|
-
if (typeof
|
|
66
|
-
const
|
|
67
|
-
|
|
64
|
+
let o = r[i];
|
|
65
|
+
if (typeof o == "string") {
|
|
66
|
+
const m = e(o);
|
|
67
|
+
m !== o && (en(r) || (r[i] = m), o = m);
|
|
68
68
|
}
|
|
69
|
-
a[
|
|
69
|
+
a[o] = !0;
|
|
70
70
|
}
|
|
71
71
|
return a;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function un(a) {
|
|
74
74
|
for (let r = 0; r < a.length; r++)
|
|
75
75
|
P(a, r) || (a[r] = null);
|
|
76
76
|
return a;
|
|
77
77
|
}
|
|
78
78
|
function U(a) {
|
|
79
|
-
const r =
|
|
80
|
-
for (const [e, i] of
|
|
81
|
-
P(a, e) && (Array.isArray(i) ? r[e] =
|
|
79
|
+
const r = Wt(null);
|
|
80
|
+
for (const [e, i] of Ce(a))
|
|
81
|
+
P(a, e) && (Array.isArray(i) ? r[e] = un(i) : i && typeof i == "object" && i.constructor === Object ? r[e] = U(i) : r[e] = i);
|
|
82
82
|
return r;
|
|
83
83
|
}
|
|
84
84
|
function at(a, r) {
|
|
85
85
|
for (; a !== null; ) {
|
|
86
|
-
const i =
|
|
86
|
+
const i = rn(a, r);
|
|
87
87
|
if (i) {
|
|
88
88
|
if (i.get)
|
|
89
|
-
return
|
|
89
|
+
return L(i.get);
|
|
90
90
|
if (typeof i.value == "function")
|
|
91
|
-
return
|
|
91
|
+
return L(i.value);
|
|
92
92
|
}
|
|
93
|
-
a =
|
|
93
|
+
a = nn(a);
|
|
94
94
|
}
|
|
95
95
|
function e() {
|
|
96
96
|
return null;
|
|
97
97
|
}
|
|
98
98
|
return e;
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const be = C(["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"]), Ft = C(["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"]), Ht = C(["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"]), fn = C(["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"]), zt = C(["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"]), pn = C(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ye = C(["#text"]), Re = C(["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", "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", "slot"]), Bt = C(["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"]), Oe = C(["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"]), Et = C(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), mn = w(/\{\{[\w\W]*|[\w\W]*\}\}/gm), dn = w(/<%[\w\W]*|[\w\W]*%>/gm), hn = w(/\$\{[\w\W]*/gm), Tn = w(/^data-[\-\w.\u00B7-\uFFFF]+$/), gn = w(/^aria-[\-\w]+$/), Le = w(
|
|
101
101
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
102
102
|
// eslint-disable-line no-useless-escape
|
|
103
|
-
),
|
|
103
|
+
), En = w(/^(?:\w+script|data):/i), An = w(
|
|
104
104
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
105
105
|
// eslint-disable-line no-control-regex
|
|
106
|
-
),
|
|
107
|
-
var
|
|
106
|
+
), Ie = w(/^html$/i), _n = w(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
107
|
+
var Ne = /* @__PURE__ */ Object.freeze({
|
|
108
108
|
__proto__: null,
|
|
109
|
-
ARIA_ATTR:
|
|
110
|
-
ATTR_WHITESPACE:
|
|
111
|
-
CUSTOM_ELEMENT:
|
|
112
|
-
DATA_ATTR:
|
|
113
|
-
DOCTYPE_NAME:
|
|
114
|
-
ERB_EXPR:
|
|
115
|
-
IS_ALLOWED_URI:
|
|
116
|
-
IS_SCRIPT_OR_DATA:
|
|
117
|
-
MUSTACHE_EXPR:
|
|
118
|
-
TMPLIT_EXPR:
|
|
109
|
+
ARIA_ATTR: gn,
|
|
110
|
+
ATTR_WHITESPACE: An,
|
|
111
|
+
CUSTOM_ELEMENT: _n,
|
|
112
|
+
DATA_ATTR: Tn,
|
|
113
|
+
DOCTYPE_NAME: Ie,
|
|
114
|
+
ERB_EXPR: dn,
|
|
115
|
+
IS_ALLOWED_URI: Le,
|
|
116
|
+
IS_SCRIPT_OR_DATA: En,
|
|
117
|
+
MUSTACHE_EXPR: mn,
|
|
118
|
+
TMPLIT_EXPR: hn
|
|
119
119
|
});
|
|
120
120
|
const lt = {
|
|
121
121
|
element: 1,
|
|
@@ -124,28 +124,28 @@ const lt = {
|
|
|
124
124
|
progressingInstruction: 7,
|
|
125
125
|
comment: 8,
|
|
126
126
|
document: 9
|
|
127
|
-
},
|
|
127
|
+
}, Sn = function() {
|
|
128
128
|
return typeof window > "u" ? null : window;
|
|
129
|
-
},
|
|
129
|
+
}, bn = function(r, e) {
|
|
130
130
|
if (typeof r != "object" || typeof r.createPolicy != "function")
|
|
131
131
|
return null;
|
|
132
132
|
let i = null;
|
|
133
|
-
const
|
|
134
|
-
e && e.hasAttribute(
|
|
135
|
-
const
|
|
133
|
+
const o = "data-tt-policy-suffix";
|
|
134
|
+
e && e.hasAttribute(o) && (i = e.getAttribute(o));
|
|
135
|
+
const m = "dompurify" + (i ? "#" + i : "");
|
|
136
136
|
try {
|
|
137
|
-
return r.createPolicy(
|
|
138
|
-
createHTML(
|
|
139
|
-
return
|
|
137
|
+
return r.createPolicy(m, {
|
|
138
|
+
createHTML(c) {
|
|
139
|
+
return c;
|
|
140
140
|
},
|
|
141
|
-
createScriptURL(
|
|
142
|
-
return
|
|
141
|
+
createScriptURL(c) {
|
|
142
|
+
return c;
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
} catch {
|
|
146
|
-
return console.warn("TrustedTypes policy " +
|
|
146
|
+
return console.warn("TrustedTypes policy " + m + " could not be created."), null;
|
|
147
147
|
}
|
|
148
|
-
},
|
|
148
|
+
}, De = function() {
|
|
149
149
|
return {
|
|
150
150
|
afterSanitizeAttributes: [],
|
|
151
151
|
afterSanitizeElements: [],
|
|
@@ -158,57 +158,57 @@ const lt = {
|
|
|
158
158
|
uponSanitizeShadowNode: []
|
|
159
159
|
};
|
|
160
160
|
};
|
|
161
|
-
function
|
|
162
|
-
let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
163
|
-
const r = (l) =>
|
|
161
|
+
function Me() {
|
|
162
|
+
let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Sn();
|
|
163
|
+
const r = (l) => Me(l);
|
|
164
164
|
if (r.version = "3.3.1", r.removed = [], !a || !a.document || a.document.nodeType !== lt.document || !a.Element)
|
|
165
165
|
return r.isSupported = !1, r;
|
|
166
166
|
let {
|
|
167
167
|
document: e
|
|
168
168
|
} = a;
|
|
169
|
-
const i = e,
|
|
170
|
-
DocumentFragment:
|
|
171
|
-
HTMLTemplateElement:
|
|
172
|
-
Node:
|
|
173
|
-
Element:
|
|
174
|
-
NodeFilter:
|
|
169
|
+
const i = e, o = i.currentScript, {
|
|
170
|
+
DocumentFragment: m,
|
|
171
|
+
HTMLTemplateElement: c,
|
|
172
|
+
Node: u,
|
|
173
|
+
Element: f,
|
|
174
|
+
NodeFilter: d,
|
|
175
175
|
NamedNodeMap: R = a.NamedNodeMap || a.MozNamedAttrMap,
|
|
176
176
|
HTMLFormElement: _,
|
|
177
177
|
DOMParser: I,
|
|
178
178
|
trustedTypes: x
|
|
179
|
-
} = a, G =
|
|
180
|
-
if (typeof
|
|
179
|
+
} = a, G = f.prototype, xe = at(G, "cloneNode"), we = at(G, "remove"), Pe = at(G, "nextSibling"), ve = at(G, "childNodes"), ct = at(G, "parentNode");
|
|
180
|
+
if (typeof c == "function") {
|
|
181
181
|
const l = e.createElement("template");
|
|
182
182
|
l.content && l.content.ownerDocument && (e = l.content.ownerDocument);
|
|
183
183
|
}
|
|
184
|
-
let O,
|
|
184
|
+
let O, tt = "";
|
|
185
185
|
const {
|
|
186
186
|
implementation: _t,
|
|
187
|
-
createNodeIterator:
|
|
188
|
-
createDocumentFragment:
|
|
189
|
-
getElementsByTagName:
|
|
187
|
+
createNodeIterator: ke,
|
|
188
|
+
createDocumentFragment: Ue,
|
|
189
|
+
getElementsByTagName: Fe
|
|
190
190
|
} = e, {
|
|
191
|
-
importNode:
|
|
191
|
+
importNode: He
|
|
192
192
|
} = i;
|
|
193
|
-
let N =
|
|
194
|
-
r.isSupported = typeof
|
|
193
|
+
let N = De();
|
|
194
|
+
r.isSupported = typeof Ce == "function" && typeof ct == "function" && _t && _t.createHTMLDocument !== void 0;
|
|
195
195
|
const {
|
|
196
196
|
MUSTACHE_EXPR: St,
|
|
197
197
|
ERB_EXPR: bt,
|
|
198
198
|
TMPLIT_EXPR: yt,
|
|
199
|
-
DATA_ATTR:
|
|
200
|
-
ARIA_ATTR:
|
|
201
|
-
IS_SCRIPT_OR_DATA:
|
|
202
|
-
ATTR_WHITESPACE:
|
|
203
|
-
CUSTOM_ELEMENT:
|
|
204
|
-
} =
|
|
199
|
+
DATA_ATTR: ze,
|
|
200
|
+
ARIA_ATTR: Be,
|
|
201
|
+
IS_SCRIPT_OR_DATA: Ge,
|
|
202
|
+
ATTR_WHITESPACE: $t,
|
|
203
|
+
CUSTOM_ELEMENT: We
|
|
204
|
+
} = Ne;
|
|
205
205
|
let {
|
|
206
|
-
IS_ALLOWED_URI:
|
|
207
|
-
} =
|
|
208
|
-
const
|
|
206
|
+
IS_ALLOWED_URI: Xt
|
|
207
|
+
} = Ne, A = null;
|
|
208
|
+
const qt = p({}, [...be, ...Ft, ...Ht, ...zt, ...ye]);
|
|
209
209
|
let S = null;
|
|
210
|
-
const
|
|
211
|
-
let T = Object.seal(
|
|
210
|
+
const Kt = p({}, [...Re, ...Bt, ...Oe, ...Et]);
|
|
211
|
+
let T = Object.seal(Wt(null, {
|
|
212
212
|
tagNameCheck: {
|
|
213
213
|
writable: !0,
|
|
214
214
|
configurable: !1,
|
|
@@ -227,8 +227,8 @@ function Ce() {
|
|
|
227
227
|
enumerable: !0,
|
|
228
228
|
value: !1
|
|
229
229
|
}
|
|
230
|
-
})),
|
|
231
|
-
const $ = Object.seal(
|
|
230
|
+
})), et = null, Rt = null;
|
|
231
|
+
const $ = Object.seal(Wt(null, {
|
|
232
232
|
tagCheck: {
|
|
233
233
|
writable: !0,
|
|
234
234
|
configurable: !1,
|
|
@@ -242,62 +242,62 @@ function Ce() {
|
|
|
242
242
|
value: null
|
|
243
243
|
}
|
|
244
244
|
}));
|
|
245
|
-
let
|
|
246
|
-
const
|
|
247
|
-
let
|
|
248
|
-
const
|
|
249
|
-
let
|
|
250
|
-
const
|
|
245
|
+
let Zt = !0, Ot = !0, Jt = !1, Qt = !0, X = !1, ut = !0, W = !1, Nt = !1, Dt = !1, q = !1, ft = !1, pt = !1, Vt = !0, te = !1;
|
|
246
|
+
const je = "user-content-";
|
|
247
|
+
let Ct = !0, nt = !1, K = {}, v = null;
|
|
248
|
+
const Lt = p({}, ["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"]);
|
|
249
|
+
let ee = null;
|
|
250
|
+
const ne = p({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
251
251
|
let It = null;
|
|
252
|
-
const
|
|
252
|
+
const re = p({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), mt = "http://www.w3.org/1998/Math/MathML", dt = "http://www.w3.org/2000/svg", F = "http://www.w3.org/1999/xhtml";
|
|
253
253
|
let Z = F, Mt = !1, xt = null;
|
|
254
|
-
const
|
|
255
|
-
let ht =
|
|
256
|
-
const
|
|
257
|
-
let
|
|
258
|
-
const
|
|
259
|
-
let
|
|
260
|
-
const
|
|
254
|
+
const Ye = p({}, [mt, dt, F], kt);
|
|
255
|
+
let ht = p({}, ["mi", "mo", "mn", "ms", "mtext"]), Tt = p({}, ["annotation-xml"]);
|
|
256
|
+
const $e = p({}, ["title", "style", "font", "a", "script"]);
|
|
257
|
+
let rt = null;
|
|
258
|
+
const Xe = ["application/xhtml+xml", "text/html"], qe = "text/html";
|
|
259
|
+
let E = null, J = null;
|
|
260
|
+
const Ke = e.createElement("form"), ie = function(t) {
|
|
261
261
|
return t instanceof RegExp || t instanceof Function;
|
|
262
262
|
}, wt = function() {
|
|
263
263
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
264
264
|
if (!(J && J === t)) {
|
|
265
|
-
if ((!t || typeof t != "object") && (t = {}), t = U(t),
|
|
266
|
-
|
|
265
|
+
if ((!t || typeof t != "object") && (t = {}), t = U(t), rt = // eslint-disable-next-line unicorn/prefer-includes
|
|
266
|
+
Xe.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? qe : t.PARSER_MEDIA_TYPE, E = rt === "application/xhtml+xml" ? kt : At, A = P(t, "ALLOWED_TAGS") ? p({}, t.ALLOWED_TAGS, E) : qt, S = P(t, "ALLOWED_ATTR") ? p({}, t.ALLOWED_ATTR, E) : Kt, xt = P(t, "ALLOWED_NAMESPACES") ? p({}, t.ALLOWED_NAMESPACES, kt) : Ye, It = P(t, "ADD_URI_SAFE_ATTR") ? p(U(re), t.ADD_URI_SAFE_ATTR, E) : re, ee = P(t, "ADD_DATA_URI_TAGS") ? p(U(ne), t.ADD_DATA_URI_TAGS, E) : ne, v = P(t, "FORBID_CONTENTS") ? p({}, t.FORBID_CONTENTS, E) : Lt, et = P(t, "FORBID_TAGS") ? p({}, t.FORBID_TAGS, E) : U({}), Rt = P(t, "FORBID_ATTR") ? p({}, t.FORBID_ATTR, E) : U({}), K = P(t, "USE_PROFILES") ? t.USE_PROFILES : !1, Zt = t.ALLOW_ARIA_ATTR !== !1, Ot = t.ALLOW_DATA_ATTR !== !1, Jt = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Qt = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, X = t.SAFE_FOR_TEMPLATES || !1, ut = t.SAFE_FOR_XML !== !1, W = t.WHOLE_DOCUMENT || !1, q = t.RETURN_DOM || !1, ft = t.RETURN_DOM_FRAGMENT || !1, pt = t.RETURN_TRUSTED_TYPE || !1, Dt = t.FORCE_BODY || !1, Vt = t.SANITIZE_DOM !== !1, te = t.SANITIZE_NAMED_PROPS || !1, Ct = t.KEEP_CONTENT !== !1, nt = t.IN_PLACE || !1, Xt = t.ALLOWED_URI_REGEXP || Le, Z = t.NAMESPACE || F, ht = t.MATHML_TEXT_INTEGRATION_POINTS || ht, Tt = t.HTML_INTEGRATION_POINTS || Tt, T = t.CUSTOM_ELEMENT_HANDLING || {}, t.CUSTOM_ELEMENT_HANDLING && ie(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (T.tagNameCheck = t.CUSTOM_ELEMENT_HANDLING.tagNameCheck), t.CUSTOM_ELEMENT_HANDLING && ie(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (T.attributeNameCheck = t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (T.allowCustomizedBuiltInElements = t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), X && (Ot = !1), ft && (q = !0), K && (A = p({}, ye), S = [], K.html === !0 && (p(A, be), p(S, Re)), K.svg === !0 && (p(A, Ft), p(S, Bt), p(S, Et)), K.svgFilters === !0 && (p(A, Ht), p(S, Bt), p(S, Et)), K.mathMl === !0 && (p(A, zt), p(S, Oe), p(S, Et))), t.ADD_TAGS && (typeof t.ADD_TAGS == "function" ? $.tagCheck = t.ADD_TAGS : (A === qt && (A = U(A)), p(A, t.ADD_TAGS, E))), t.ADD_ATTR && (typeof t.ADD_ATTR == "function" ? $.attributeCheck = t.ADD_ATTR : (S === Kt && (S = U(S)), p(S, t.ADD_ATTR, E))), t.ADD_URI_SAFE_ATTR && p(It, t.ADD_URI_SAFE_ATTR, E), t.FORBID_CONTENTS && (v === Lt && (v = U(v)), p(v, t.FORBID_CONTENTS, E)), t.ADD_FORBID_CONTENTS && (v === Lt && (v = U(v)), p(v, t.ADD_FORBID_CONTENTS, E)), Ct && (A["#text"] = !0), W && p(A, ["html", "head", "body"]), A.table && (p(A, ["tbody"]), delete et.tbody), t.TRUSTED_TYPES_POLICY) {
|
|
267
267
|
if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
268
268
|
throw st('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
269
269
|
if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
270
270
|
throw st('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
271
|
-
O = t.TRUSTED_TYPES_POLICY,
|
|
271
|
+
O = t.TRUSTED_TYPES_POLICY, tt = O.createHTML("");
|
|
272
272
|
} else
|
|
273
|
-
O === void 0 && (O =
|
|
274
|
-
|
|
273
|
+
O === void 0 && (O = bn(x, o)), O !== null && typeof tt == "string" && (tt = O.createHTML(""));
|
|
274
|
+
C && C(t), J = t;
|
|
275
275
|
}
|
|
276
|
-
},
|
|
276
|
+
}, oe = p({}, [...Ft, ...Ht, ...fn]), se = p({}, [...zt, ...pn]), Ze = function(t) {
|
|
277
277
|
let n = ct(t);
|
|
278
278
|
(!n || !n.tagName) && (n = {
|
|
279
279
|
namespaceURI: Z,
|
|
280
280
|
tagName: "template"
|
|
281
281
|
});
|
|
282
|
-
const
|
|
283
|
-
return xt[t.namespaceURI] ? t.namespaceURI === dt ? n.namespaceURI === F ?
|
|
282
|
+
const s = At(t.tagName), h = At(n.tagName);
|
|
283
|
+
return xt[t.namespaceURI] ? t.namespaceURI === dt ? n.namespaceURI === F ? s === "svg" : n.namespaceURI === mt ? s === "svg" && (h === "annotation-xml" || ht[h]) : !!oe[s] : t.namespaceURI === mt ? n.namespaceURI === F ? s === "math" : n.namespaceURI === dt ? s === "math" && Tt[h] : !!se[s] : t.namespaceURI === F ? n.namespaceURI === dt && !Tt[h] || n.namespaceURI === mt && !ht[h] ? !1 : !se[s] && ($e[s] || !oe[s]) : !!(rt === "application/xhtml+xml" && xt[t.namespaceURI]) : !1;
|
|
284
284
|
}, k = function(t) {
|
|
285
|
-
|
|
285
|
+
it(r.removed, {
|
|
286
286
|
element: t
|
|
287
287
|
});
|
|
288
288
|
try {
|
|
289
289
|
ct(t).removeChild(t);
|
|
290
290
|
} catch {
|
|
291
|
-
|
|
291
|
+
we(t);
|
|
292
292
|
}
|
|
293
|
-
},
|
|
293
|
+
}, j = function(t, n) {
|
|
294
294
|
try {
|
|
295
|
-
|
|
295
|
+
it(r.removed, {
|
|
296
296
|
attribute: n.getAttributeNode(t),
|
|
297
297
|
from: n
|
|
298
298
|
});
|
|
299
299
|
} catch {
|
|
300
|
-
|
|
300
|
+
it(r.removed, {
|
|
301
301
|
attribute: null,
|
|
302
302
|
from: n
|
|
303
303
|
});
|
|
@@ -313,98 +313,98 @@ function Ce() {
|
|
|
313
313
|
n.setAttribute(t, "");
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
|
-
},
|
|
317
|
-
let n = null,
|
|
316
|
+
}, ae = function(t) {
|
|
317
|
+
let n = null, s = null;
|
|
318
318
|
if (Dt)
|
|
319
319
|
t = "<remove></remove>" + t;
|
|
320
320
|
else {
|
|
321
|
-
const
|
|
322
|
-
|
|
321
|
+
const g = Ut(t, /^[\r\n\t ]+/);
|
|
322
|
+
s = g && g[0];
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
rt === "application/xhtml+xml" && Z === F && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
|
|
325
325
|
const h = O ? O.createHTML(t) : t;
|
|
326
326
|
if (Z === F)
|
|
327
327
|
try {
|
|
328
|
-
n = new I().parseFromString(h,
|
|
328
|
+
n = new I().parseFromString(h, rt);
|
|
329
329
|
} catch {
|
|
330
330
|
}
|
|
331
331
|
if (!n || !n.documentElement) {
|
|
332
332
|
n = _t.createDocument(Z, "template", null);
|
|
333
333
|
try {
|
|
334
|
-
n.documentElement.innerHTML = Mt ?
|
|
334
|
+
n.documentElement.innerHTML = Mt ? tt : h;
|
|
335
335
|
} catch {
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
const y = n.body || n.documentElement;
|
|
339
|
-
return t &&
|
|
340
|
-
},
|
|
341
|
-
return
|
|
339
|
+
return t && s && y.insertBefore(e.createTextNode(s), y.childNodes[0] || null), Z === F ? Fe.call(n, W ? "html" : "body")[0] : W ? n.documentElement : y;
|
|
340
|
+
}, le = function(t) {
|
|
341
|
+
return ke.call(
|
|
342
342
|
t.ownerDocument || t,
|
|
343
343
|
t,
|
|
344
344
|
// eslint-disable-next-line no-bitwise
|
|
345
|
-
|
|
345
|
+
d.SHOW_ELEMENT | d.SHOW_COMMENT | d.SHOW_TEXT | d.SHOW_PROCESSING_INSTRUCTION | d.SHOW_CDATA_SECTION,
|
|
346
346
|
null
|
|
347
347
|
);
|
|
348
348
|
}, Pt = function(t) {
|
|
349
349
|
return t instanceof _ && (typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || !(t.attributes instanceof R) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function");
|
|
350
|
-
},
|
|
351
|
-
return typeof
|
|
350
|
+
}, ce = function(t) {
|
|
351
|
+
return typeof u == "function" && t instanceof u;
|
|
352
352
|
};
|
|
353
353
|
function H(l, t, n) {
|
|
354
|
-
|
|
355
|
-
|
|
354
|
+
gt(l, (s) => {
|
|
355
|
+
s.call(r, t, n, J);
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
|
-
const
|
|
358
|
+
const ue = function(t) {
|
|
359
359
|
let n = null;
|
|
360
360
|
if (H(N.beforeSanitizeElements, t, null), Pt(t))
|
|
361
361
|
return k(t), !0;
|
|
362
|
-
const
|
|
362
|
+
const s = E(t.nodeName);
|
|
363
363
|
if (H(N.uponSanitizeElement, t, {
|
|
364
|
-
tagName:
|
|
365
|
-
allowedTags:
|
|
366
|
-
}), ut && t.hasChildNodes() && !
|
|
364
|
+
tagName: s,
|
|
365
|
+
allowedTags: A
|
|
366
|
+
}), ut && t.hasChildNodes() && !ce(t.firstElementChild) && D(/<[/\w!]/g, t.innerHTML) && D(/<[/\w!]/g, t.textContent) || t.nodeType === lt.progressingInstruction || ut && t.nodeType === lt.comment && D(/<[/\w]/g, t.data))
|
|
367
367
|
return k(t), !0;
|
|
368
|
-
if (!($.tagCheck instanceof Function && $.tagCheck(
|
|
369
|
-
if (!
|
|
368
|
+
if (!($.tagCheck instanceof Function && $.tagCheck(s)) && (!A[s] || et[s])) {
|
|
369
|
+
if (!et[s] && pe(s) && (T.tagNameCheck instanceof RegExp && D(T.tagNameCheck, s) || T.tagNameCheck instanceof Function && T.tagNameCheck(s)))
|
|
370
370
|
return !1;
|
|
371
|
-
if (
|
|
372
|
-
const h = ct(t) || t.parentNode, y =
|
|
371
|
+
if (Ct && !v[s]) {
|
|
372
|
+
const h = ct(t) || t.parentNode, y = ve(t) || t.childNodes;
|
|
373
373
|
if (y && h) {
|
|
374
|
-
const
|
|
375
|
-
for (let M =
|
|
376
|
-
const z =
|
|
377
|
-
z.__removalCount = (t.__removalCount || 0) + 1, h.insertBefore(z,
|
|
374
|
+
const g = y.length;
|
|
375
|
+
for (let M = g - 1; M >= 0; --M) {
|
|
376
|
+
const z = xe(y[M], !0);
|
|
377
|
+
z.__removalCount = (t.__removalCount || 0) + 1, h.insertBefore(z, Pe(t));
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
return k(t), !0;
|
|
382
382
|
}
|
|
383
|
-
return t instanceof
|
|
383
|
+
return t instanceof f && !Ze(t) || (s === "noscript" || s === "noembed" || s === "noframes") && D(/<\/no(script|embed|frames)/i, t.innerHTML) ? (k(t), !0) : (X && t.nodeType === lt.text && (n = t.textContent, gt([St, bt, yt], (h) => {
|
|
384
384
|
n = ot(n, h, " ");
|
|
385
|
-
}), t.textContent !== n && (
|
|
385
|
+
}), t.textContent !== n && (it(r.removed, {
|
|
386
386
|
element: t.cloneNode()
|
|
387
387
|
}), t.textContent = n)), H(N.afterSanitizeElements, t, null), !1);
|
|
388
|
-
},
|
|
389
|
-
if (
|
|
388
|
+
}, fe = function(t, n, s) {
|
|
389
|
+
if (Vt && (n === "id" || n === "name") && (s in e || s in Ke))
|
|
390
390
|
return !1;
|
|
391
|
-
if (!(Ot && !Rt[n] && D(
|
|
392
|
-
if (!(
|
|
391
|
+
if (!(Ot && !Rt[n] && D(ze, n))) {
|
|
392
|
+
if (!(Zt && D(Be, n))) {
|
|
393
393
|
if (!($.attributeCheck instanceof Function && $.attributeCheck(n, t))) {
|
|
394
394
|
if (!S[n] || Rt[n]) {
|
|
395
395
|
if (
|
|
396
396
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
397
397
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
398
398
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
399
|
-
!(
|
|
399
|
+
!(pe(t) && (T.tagNameCheck instanceof RegExp && D(T.tagNameCheck, t) || T.tagNameCheck instanceof Function && T.tagNameCheck(t)) && (T.attributeNameCheck instanceof RegExp && D(T.attributeNameCheck, n) || T.attributeNameCheck instanceof Function && T.attributeNameCheck(n, t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
400
400
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
401
|
-
n === "is" && T.allowCustomizedBuiltInElements && (T.tagNameCheck instanceof RegExp && D(T.tagNameCheck,
|
|
401
|
+
n === "is" && T.allowCustomizedBuiltInElements && (T.tagNameCheck instanceof RegExp && D(T.tagNameCheck, s) || T.tagNameCheck instanceof Function && T.tagNameCheck(s)))
|
|
402
402
|
) return !1;
|
|
403
403
|
} else if (!It[n]) {
|
|
404
|
-
if (!D(
|
|
405
|
-
if (!((n === "src" || n === "xlink:href" || n === "href") && t !== "script" &&
|
|
406
|
-
if (!(
|
|
407
|
-
if (
|
|
404
|
+
if (!D(Xt, ot(s, $t, ""))) {
|
|
405
|
+
if (!((n === "src" || n === "xlink:href" || n === "href") && t !== "script" && an(s, "data:") === 0 && ee[t])) {
|
|
406
|
+
if (!(Jt && !D(Ge, ot(s, $t, "")))) {
|
|
407
|
+
if (s)
|
|
408
408
|
return !1;
|
|
409
409
|
}
|
|
410
410
|
}
|
|
@@ -414,16 +414,16 @@ function Ce() {
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
return !0;
|
|
417
|
-
}, fe = function(t) {
|
|
418
|
-
return t !== "annotation-xml" && Ut(t, Be);
|
|
419
417
|
}, pe = function(t) {
|
|
418
|
+
return t !== "annotation-xml" && Ut(t, We);
|
|
419
|
+
}, me = function(t) {
|
|
420
420
|
H(N.beforeSanitizeAttributes, t, null);
|
|
421
421
|
const {
|
|
422
422
|
attributes: n
|
|
423
423
|
} = t;
|
|
424
424
|
if (!n || Pt(t))
|
|
425
425
|
return;
|
|
426
|
-
const
|
|
426
|
+
const s = {
|
|
427
427
|
attrName: "",
|
|
428
428
|
attrValue: "",
|
|
429
429
|
keepAttr: !0,
|
|
@@ -433,39 +433,39 @@ function Ce() {
|
|
|
433
433
|
let h = n.length;
|
|
434
434
|
for (; h--; ) {
|
|
435
435
|
const y = n[h], {
|
|
436
|
-
name:
|
|
436
|
+
name: g,
|
|
437
437
|
namespaceURI: M,
|
|
438
438
|
value: z
|
|
439
|
-
} = y, Q = g
|
|
440
|
-
let b =
|
|
441
|
-
if (
|
|
442
|
-
|
|
439
|
+
} = y, Q = E(g), vt = z;
|
|
440
|
+
let b = g === "value" ? vt : ln(vt);
|
|
441
|
+
if (s.attrName = Q, s.attrValue = b, s.keepAttr = !0, s.forceKeepAttr = void 0, H(N.uponSanitizeAttribute, t, s), b = s.attrValue, te && (Q === "id" || Q === "name") && (j(g, t), b = je + b), ut && D(/((--!?|])>)|<\/(style|title|textarea)/i, b)) {
|
|
442
|
+
j(g, t);
|
|
443
443
|
continue;
|
|
444
444
|
}
|
|
445
445
|
if (Q === "attributename" && Ut(b, "href")) {
|
|
446
|
-
|
|
446
|
+
j(g, t);
|
|
447
447
|
continue;
|
|
448
448
|
}
|
|
449
|
-
if (
|
|
449
|
+
if (s.forceKeepAttr)
|
|
450
450
|
continue;
|
|
451
|
-
if (!
|
|
452
|
-
|
|
451
|
+
if (!s.keepAttr) {
|
|
452
|
+
j(g, t);
|
|
453
453
|
continue;
|
|
454
454
|
}
|
|
455
|
-
if (!
|
|
456
|
-
|
|
455
|
+
if (!Qt && D(/\/>/i, b)) {
|
|
456
|
+
j(g, t);
|
|
457
457
|
continue;
|
|
458
458
|
}
|
|
459
|
-
X &&
|
|
460
|
-
b = ot(b,
|
|
459
|
+
X && gt([St, bt, yt], (he) => {
|
|
460
|
+
b = ot(b, he, " ");
|
|
461
461
|
});
|
|
462
|
-
const
|
|
463
|
-
if (!
|
|
464
|
-
|
|
462
|
+
const de = E(t.nodeName);
|
|
463
|
+
if (!fe(de, Q, b)) {
|
|
464
|
+
j(g, t);
|
|
465
465
|
continue;
|
|
466
466
|
}
|
|
467
467
|
if (O && typeof x == "object" && typeof x.getAttributeType == "function" && !M)
|
|
468
|
-
switch (x.getAttributeType(
|
|
468
|
+
switch (x.getAttributeType(de, Q)) {
|
|
469
469
|
case "TrustedHTML": {
|
|
470
470
|
b = O.createHTML(b);
|
|
471
471
|
break;
|
|
@@ -477,22 +477,22 @@ function Ce() {
|
|
|
477
477
|
}
|
|
478
478
|
if (b !== vt)
|
|
479
479
|
try {
|
|
480
|
-
M ? t.setAttributeNS(M,
|
|
480
|
+
M ? t.setAttributeNS(M, g, b) : t.setAttribute(g, b), Pt(t) ? k(t) : Se(r.removed);
|
|
481
481
|
} catch {
|
|
482
|
-
|
|
482
|
+
j(g, t);
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
H(N.afterSanitizeAttributes, t, null);
|
|
486
|
-
},
|
|
486
|
+
}, Je = function l(t) {
|
|
487
487
|
let n = null;
|
|
488
|
-
const
|
|
489
|
-
for (H(N.beforeSanitizeShadowDOM, t, null); n =
|
|
490
|
-
H(N.uponSanitizeShadowNode, n, null),
|
|
488
|
+
const s = le(t);
|
|
489
|
+
for (H(N.beforeSanitizeShadowDOM, t, null); n = s.nextNode(); )
|
|
490
|
+
H(N.uponSanitizeShadowNode, n, null), ue(n), me(n), n.content instanceof m && l(n.content);
|
|
491
491
|
H(N.afterSanitizeShadowDOM, t, null);
|
|
492
492
|
};
|
|
493
493
|
return r.sanitize = function(l) {
|
|
494
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = null,
|
|
495
|
-
if (Mt = !l, Mt && (l = "<!-->"), typeof l != "string" && !
|
|
494
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = null, s = null, h = null, y = null;
|
|
495
|
+
if (Mt = !l, Mt && (l = "<!-->"), typeof l != "string" && !ce(l))
|
|
496
496
|
if (typeof l.toString == "function") {
|
|
497
497
|
if (l = l.toString(), typeof l != "string")
|
|
498
498
|
throw st("dirty is not a string, aborting");
|
|
@@ -500,38 +500,38 @@ function Ce() {
|
|
|
500
500
|
throw st("toString is not a function");
|
|
501
501
|
if (!r.isSupported)
|
|
502
502
|
return l;
|
|
503
|
-
if (Nt || wt(t), r.removed = [], typeof l == "string" && (
|
|
503
|
+
if (Nt || wt(t), r.removed = [], typeof l == "string" && (nt = !1), nt) {
|
|
504
504
|
if (l.nodeName) {
|
|
505
|
-
const z =
|
|
506
|
-
if (!
|
|
505
|
+
const z = E(l.nodeName);
|
|
506
|
+
if (!A[z] || et[z])
|
|
507
507
|
throw st("root node is forbidden and cannot be sanitized in-place");
|
|
508
508
|
}
|
|
509
|
-
} else if (l instanceof
|
|
510
|
-
n =
|
|
509
|
+
} else if (l instanceof u)
|
|
510
|
+
n = ae("<!---->"), s = n.ownerDocument.importNode(l, !0), s.nodeType === lt.element && s.nodeName === "BODY" || s.nodeName === "HTML" ? n = s : n.appendChild(s);
|
|
511
511
|
else {
|
|
512
512
|
if (!q && !X && !W && // eslint-disable-next-line unicorn/prefer-includes
|
|
513
513
|
l.indexOf("<") === -1)
|
|
514
514
|
return O && pt ? O.createHTML(l) : l;
|
|
515
|
-
if (n =
|
|
516
|
-
return q ? null : pt ?
|
|
515
|
+
if (n = ae(l), !n)
|
|
516
|
+
return q ? null : pt ? tt : "";
|
|
517
517
|
}
|
|
518
518
|
n && Dt && k(n.firstChild);
|
|
519
|
-
const
|
|
520
|
-
for (; h =
|
|
521
|
-
|
|
522
|
-
if (
|
|
519
|
+
const g = le(nt ? l : n);
|
|
520
|
+
for (; h = g.nextNode(); )
|
|
521
|
+
ue(h), me(h), h.content instanceof m && Je(h.content);
|
|
522
|
+
if (nt)
|
|
523
523
|
return l;
|
|
524
524
|
if (q) {
|
|
525
525
|
if (ft)
|
|
526
|
-
for (y =
|
|
526
|
+
for (y = Ue.call(n.ownerDocument); n.firstChild; )
|
|
527
527
|
y.appendChild(n.firstChild);
|
|
528
528
|
else
|
|
529
529
|
y = n;
|
|
530
|
-
return (S.shadowroot || S.shadowrootmode) && (y =
|
|
530
|
+
return (S.shadowroot || S.shadowrootmode) && (y = He.call(i, y, !0)), y;
|
|
531
531
|
}
|
|
532
532
|
let M = W ? n.outerHTML : n.innerHTML;
|
|
533
|
-
return W &&
|
|
534
|
-
` + M), X &&
|
|
533
|
+
return W && A["!doctype"] && n.ownerDocument && n.ownerDocument.doctype && n.ownerDocument.doctype.name && D(Ie, n.ownerDocument.doctype.name) && (M = "<!DOCTYPE " + n.ownerDocument.doctype.name + `>
|
|
534
|
+
` + M), X && gt([St, bt, yt], (z) => {
|
|
535
535
|
M = ot(M, z, " ");
|
|
536
536
|
}), O && pt ? O.createHTML(M) : M;
|
|
537
537
|
}, r.setConfig = function() {
|
|
@@ -541,24 +541,24 @@ function Ce() {
|
|
|
541
541
|
J = null, Nt = !1;
|
|
542
542
|
}, r.isValidAttribute = function(l, t, n) {
|
|
543
543
|
J || wt({});
|
|
544
|
-
const
|
|
545
|
-
return
|
|
544
|
+
const s = E(l), h = E(t);
|
|
545
|
+
return fe(s, h, n);
|
|
546
546
|
}, r.addHook = function(l, t) {
|
|
547
|
-
typeof t == "function" &&
|
|
547
|
+
typeof t == "function" && it(N[l], t);
|
|
548
548
|
}, r.removeHook = function(l, t) {
|
|
549
549
|
if (t !== void 0) {
|
|
550
|
-
const n =
|
|
551
|
-
return n === -1 ? void 0 :
|
|
550
|
+
const n = on(N[l], t);
|
|
551
|
+
return n === -1 ? void 0 : sn(N[l], n, 1)[0];
|
|
552
552
|
}
|
|
553
|
-
return
|
|
553
|
+
return Se(N[l]);
|
|
554
554
|
}, r.removeHooks = function(l) {
|
|
555
555
|
N[l] = [];
|
|
556
556
|
}, r.removeAllHooks = function() {
|
|
557
|
-
N =
|
|
557
|
+
N = De();
|
|
558
558
|
}, r;
|
|
559
559
|
}
|
|
560
|
-
var
|
|
561
|
-
const
|
|
560
|
+
var yn = Me();
|
|
561
|
+
const Rn = yn(window), On = (a) => Rn.sanitize(a, {
|
|
562
562
|
RETURN_TRUSTED_TYPE: !0,
|
|
563
563
|
USE_PROFILES: { html: !0, svg: !0, svgFilters: !0 },
|
|
564
564
|
CUSTOM_ELEMENT_HANDLING: {
|
|
@@ -567,13 +567,47 @@ const yn = bn(window), Rn = (a) => yn.sanitize(a, {
|
|
|
567
567
|
allowCustomizedBuiltInElements: !0
|
|
568
568
|
}
|
|
569
569
|
});
|
|
570
|
+
class Nn {
|
|
571
|
+
constructor() {
|
|
572
|
+
/**
|
|
573
|
+
* @private
|
|
574
|
+
* @type {Map<string, CSSStyleSheet>}
|
|
575
|
+
*/
|
|
576
|
+
V(this, "cache", /* @__PURE__ */ new Map());
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* @param {string} css
|
|
580
|
+
* @returns {CSSStyleSheet}
|
|
581
|
+
*/
|
|
582
|
+
getOrCreate(r) {
|
|
583
|
+
let e = this.cache.get(r);
|
|
584
|
+
return e || (e = new CSSStyleSheet(), e.replaceSync(r), this.cache.set(r, e)), e;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* @returns {number}
|
|
588
|
+
*/
|
|
589
|
+
get size() {
|
|
590
|
+
return this.cache.size;
|
|
591
|
+
}
|
|
592
|
+
clear() {
|
|
593
|
+
this.cache.clear();
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* @param {string} css
|
|
597
|
+
* @returns {boolean}
|
|
598
|
+
*/
|
|
599
|
+
has(r) {
|
|
600
|
+
return this.cache.has(r);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
const Gt = new Nn();
|
|
570
604
|
var B;
|
|
571
|
-
class
|
|
605
|
+
class Mn extends HTMLElement {
|
|
572
606
|
constructor() {
|
|
573
607
|
super();
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
608
|
+
ge(this, B, {});
|
|
609
|
+
V(this, "isMounted", !0);
|
|
610
|
+
V(this, "props", {
|
|
577
611
|
locale: "en-US"
|
|
578
612
|
});
|
|
579
613
|
/**
|
|
@@ -588,85 +622,85 @@ class Cn extends HTMLElement {
|
|
|
588
622
|
* }>} states 配置对象,每个 key 是一个响应式字段名
|
|
589
623
|
* @returns {void}
|
|
590
624
|
*/
|
|
591
|
-
|
|
592
|
-
const i = (
|
|
593
|
-
if (
|
|
625
|
+
V(this, "properties", (e) => {
|
|
626
|
+
const i = (c) => {
|
|
627
|
+
if (c === Boolean)
|
|
594
628
|
return "Boolean";
|
|
595
|
-
if (
|
|
629
|
+
if (c === Number)
|
|
596
630
|
return "Number";
|
|
597
|
-
if (
|
|
631
|
+
if (c === String || Array.isArray(c))
|
|
598
632
|
return "String";
|
|
599
|
-
if (
|
|
633
|
+
if (c === RegExp)
|
|
600
634
|
return "RegExp";
|
|
601
|
-
if (
|
|
635
|
+
if (c === Date)
|
|
602
636
|
return "Date";
|
|
603
|
-
if (
|
|
637
|
+
if (c === Array)
|
|
604
638
|
return "Array";
|
|
605
|
-
if (typeof
|
|
639
|
+
if (typeof c == "object" && c !== null)
|
|
606
640
|
try {
|
|
607
|
-
return Object.entries(
|
|
608
|
-
(
|
|
641
|
+
return Object.entries(c).filter(
|
|
642
|
+
(f) => typeof f[1] == "function" ? f[1]() : !1
|
|
609
643
|
)[0][0];
|
|
610
644
|
} catch {
|
|
611
645
|
console.error(
|
|
612
646
|
`[${this.tagName}] Every "type" entry must be a function. Received:`,
|
|
613
|
-
|
|
647
|
+
c
|
|
614
648
|
);
|
|
615
649
|
}
|
|
616
|
-
return
|
|
617
|
-
},
|
|
618
|
-
const
|
|
619
|
-
if (
|
|
620
|
-
return
|
|
621
|
-
if (
|
|
622
|
-
return
|
|
623
|
-
if (
|
|
624
|
-
return
|
|
625
|
-
if (
|
|
626
|
-
const R = Number(
|
|
627
|
-
return isNaN(R) ?
|
|
650
|
+
return c || "String";
|
|
651
|
+
}, o = (c) => typeof c == "function" ? c() : c || null, m = (c, u) => {
|
|
652
|
+
const f = e[c], d = f == null ? void 0 : f.type;
|
|
653
|
+
if (c === "Function" || d === Function)
|
|
654
|
+
return f.rawFunction ? u : u == null ? void 0 : u();
|
|
655
|
+
if (c === "Array" || d === Array)
|
|
656
|
+
return u;
|
|
657
|
+
if (d === Boolean)
|
|
658
|
+
return u === "" || u === "true" || u === !0;
|
|
659
|
+
if (d === Number) {
|
|
660
|
+
const R = Number(u);
|
|
661
|
+
return isNaN(R) ? o(f == null ? void 0 : f.default) : R;
|
|
628
662
|
}
|
|
629
|
-
if (
|
|
630
|
-
return new Date(
|
|
631
|
-
if (Array.isArray(
|
|
632
|
-
return
|
|
633
|
-
if (
|
|
634
|
-
return
|
|
635
|
-
if (
|
|
636
|
-
return typeof
|
|
637
|
-
if (typeof
|
|
638
|
-
const R = Object.entries(
|
|
639
|
-
return R && (R != null && R.length) ?
|
|
663
|
+
if (d === Date)
|
|
664
|
+
return new Date(u);
|
|
665
|
+
if (Array.isArray(d))
|
|
666
|
+
return d.includes(u) ? u : o(f == null ? void 0 : f.default);
|
|
667
|
+
if (d === RegExp)
|
|
668
|
+
return u.match(d) ? JSON.stringify(u) : o(f == null ? void 0 : f.default);
|
|
669
|
+
if (d === String)
|
|
670
|
+
return typeof u == "function" ? u() : u;
|
|
671
|
+
if (typeof d == "object" && d !== null) {
|
|
672
|
+
const R = Object.entries(d).filter((_) => _[1]());
|
|
673
|
+
return R && (R != null && R.length) ? m(R[0][0], u) : o(f == null ? void 0 : f.default);
|
|
640
674
|
}
|
|
641
|
-
return
|
|
675
|
+
return u || (f == null ? void 0 : f.default);
|
|
642
676
|
};
|
|
643
|
-
for (const [
|
|
644
|
-
const
|
|
645
|
-
|
|
677
|
+
for (const [c, u] of Object.entries(e)) {
|
|
678
|
+
const f = Ae.String.toLowerCamelCase(c);
|
|
679
|
+
Y(this, B)[f] = u, Object.getOwnPropertyDescriptor(this, f) && delete this[f], Object.getOwnPropertyDescriptor(this, c) && delete this[c], u != null && u.props ? Object.defineProperty(this, c, {
|
|
646
680
|
get: () => {
|
|
647
|
-
var
|
|
648
|
-
return
|
|
649
|
-
|
|
650
|
-
((
|
|
681
|
+
var d;
|
|
682
|
+
return m(
|
|
683
|
+
c,
|
|
684
|
+
((d = this.props) == null ? void 0 : d[c]) || o(u.default)
|
|
651
685
|
);
|
|
652
686
|
},
|
|
653
|
-
set: (
|
|
687
|
+
set: (d) => {
|
|
654
688
|
var _, I;
|
|
655
|
-
const R = (_ = this.props) == null ? void 0 : _[
|
|
656
|
-
this.props[
|
|
689
|
+
const R = (_ = this.props) == null ? void 0 : _[c];
|
|
690
|
+
this.props[c] = d, (I = u == null ? void 0 : u.observer) == null || I.call(u, d, R);
|
|
657
691
|
},
|
|
658
692
|
configurable: !0,
|
|
659
693
|
enumerable: !0
|
|
660
|
-
}) : Object.defineProperty(this,
|
|
694
|
+
}) : Object.defineProperty(this, f, {
|
|
661
695
|
get: () => {
|
|
662
|
-
const
|
|
663
|
-
return this[`getAttr${
|
|
664
|
-
|
|
665
|
-
|
|
696
|
+
const d = i(u.type);
|
|
697
|
+
return this[`getAttr${d}`](
|
|
698
|
+
f,
|
|
699
|
+
o(u == null ? void 0 : u.default)
|
|
666
700
|
);
|
|
667
701
|
},
|
|
668
|
-
set: (
|
|
669
|
-
this.setAttr(
|
|
702
|
+
set: (d) => {
|
|
703
|
+
this.setAttr(f, m(f, d));
|
|
670
704
|
},
|
|
671
705
|
configurable: !0,
|
|
672
706
|
enumerable: !0
|
|
@@ -678,7 +712,7 @@ class Cn extends HTMLElement {
|
|
|
678
712
|
* @param {String} eventName
|
|
679
713
|
* @param {CustomEventInit} options
|
|
680
714
|
*/
|
|
681
|
-
|
|
715
|
+
V(this, "emit", (e, i) => {
|
|
682
716
|
super.dispatchEvent(new CustomEvent(e, i));
|
|
683
717
|
});
|
|
684
718
|
this.attachShadow({ mode: "open" }), this.shadowRoot;
|
|
@@ -701,15 +735,47 @@ class Cn extends HTMLElement {
|
|
|
701
735
|
* @param {string} stylesheet 静态样式(vite:`xxx.css?inline`)
|
|
702
736
|
*/
|
|
703
737
|
adoptedStyle(e) {
|
|
704
|
-
const i =
|
|
705
|
-
|
|
738
|
+
const i = [];
|
|
739
|
+
let o = this.constructor;
|
|
740
|
+
for (; o && o !== HTMLElement; ) {
|
|
741
|
+
const c = o.customElementOptions;
|
|
742
|
+
if (c != null && c.styles) {
|
|
743
|
+
const u = Array.isArray(c.styles) ? c.styles : [c.styles];
|
|
744
|
+
i.unshift(...u);
|
|
745
|
+
}
|
|
746
|
+
o = Object.getPrototypeOf(o);
|
|
747
|
+
}
|
|
748
|
+
e && i.push(e);
|
|
749
|
+
const m = [...new Set(i)];
|
|
750
|
+
if (m.length !== 0)
|
|
751
|
+
if ("adoptedStyleSheets" in this.shadowRoot) {
|
|
752
|
+
const c = m.map((f) => Gt.getOrCreate(f)), u = Gt.getOrCreate(Ee);
|
|
753
|
+
this.shadowRoot.adoptedStyleSheets = [u, ...c];
|
|
754
|
+
} else {
|
|
755
|
+
m.forEach((u) => {
|
|
756
|
+
const f = document.createElement("style");
|
|
757
|
+
f.textContent = u, this.shadowRoot.appendChild(f);
|
|
758
|
+
});
|
|
759
|
+
const c = document.createElement("style");
|
|
760
|
+
c.textContent = Ee, this.shadowRoot.appendChild(c);
|
|
761
|
+
}
|
|
706
762
|
}
|
|
763
|
+
/**
|
|
764
|
+
* 动态添加额外样式
|
|
765
|
+
* @param {string} stylesheet 静态样式(vite:`xxx.css?inline`)
|
|
766
|
+
*/
|
|
707
767
|
assignedStyle(e) {
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
768
|
+
if (e)
|
|
769
|
+
if ("adoptedStyleSheets" in this.shadowRoot) {
|
|
770
|
+
const i = Gt.getOrCreate(e);
|
|
771
|
+
this.shadowRoot.adoptedStyleSheets = [
|
|
772
|
+
...this.shadowRoot.adoptedStyleSheets,
|
|
773
|
+
i
|
|
774
|
+
];
|
|
775
|
+
} else {
|
|
776
|
+
const i = document.createElement("style");
|
|
777
|
+
i.textContent = e, this.shadowRoot.appendChild(i);
|
|
778
|
+
}
|
|
713
779
|
}
|
|
714
780
|
/**
|
|
715
781
|
* 计算classlist
|
|
@@ -718,24 +784,24 @@ class Cn extends HTMLElement {
|
|
|
718
784
|
* @param {object} stateClassListObj 状态classList对象
|
|
719
785
|
* @returns {string} classList
|
|
720
786
|
*/
|
|
721
|
-
computedClasslist(e = "", i = {},
|
|
787
|
+
computedClasslist(e = "", i = {}, o = {}) {
|
|
722
788
|
return [
|
|
723
789
|
e,
|
|
724
|
-
...Object.entries(i).filter(([,
|
|
725
|
-
...Object.entries(
|
|
790
|
+
...Object.entries(i).filter(([, m]) => m).map(([m]) => `${e}${m}`),
|
|
791
|
+
...Object.entries(o).filter(([, m]) => m).map(([m]) => `is-${m}`)
|
|
726
792
|
].join(" ");
|
|
727
793
|
}
|
|
728
|
-
attributeChangedCallback(e, i,
|
|
729
|
-
var
|
|
730
|
-
if (!((
|
|
794
|
+
attributeChangedCallback(e, i, o) {
|
|
795
|
+
var m, c, u, f;
|
|
796
|
+
if (!((o === i || !this.isMounted) && !((m = Y(this, B)[e]) != null && m.repeatable))) {
|
|
731
797
|
if (e === "locale") {
|
|
732
|
-
this.props.locale =
|
|
798
|
+
this.props.locale = o, this.$updateLocalization(o);
|
|
733
799
|
return;
|
|
734
800
|
}
|
|
735
801
|
try {
|
|
736
|
-
if ((
|
|
737
|
-
const
|
|
738
|
-
const I =
|
|
802
|
+
if ((c = Y(this, B)[e]) != null && c.props) return;
|
|
803
|
+
const d = (R, _) => {
|
|
804
|
+
const I = Y(this, B)[R], x = I == null ? void 0 : I.type;
|
|
739
805
|
if (R === "Array" || x === Array)
|
|
740
806
|
return _;
|
|
741
807
|
if (x === Boolean)
|
|
@@ -746,13 +812,13 @@ class Cn extends HTMLElement {
|
|
|
746
812
|
}
|
|
747
813
|
return Array.isArray(x) ? x.includes(_) ? _ : I.default : x === RegExp ? _.match(x) ? JSON.stringify(_) : I.default : _ || (I == null ? void 0 : I.default);
|
|
748
814
|
};
|
|
749
|
-
(
|
|
750
|
-
|
|
815
|
+
(f = (u = Y(this, B)[e]) == null ? void 0 : u.observer) == null || f.call(
|
|
816
|
+
u,
|
|
751
817
|
this[e],
|
|
752
|
-
|
|
818
|
+
d(e, i)
|
|
753
819
|
);
|
|
754
|
-
} catch (
|
|
755
|
-
process.env.NODE_ENV === "development" && this.isMounted && console.error(
|
|
820
|
+
} catch (d) {
|
|
821
|
+
process.env.NODE_ENV === "development" && this.isMounted && console.error(d, this);
|
|
756
822
|
}
|
|
757
823
|
}
|
|
758
824
|
}
|
|
@@ -767,7 +833,7 @@ class Cn extends HTMLElement {
|
|
|
767
833
|
// #endregion
|
|
768
834
|
// ------- end -------
|
|
769
835
|
html(e) {
|
|
770
|
-
return
|
|
836
|
+
return On(e);
|
|
771
837
|
}
|
|
772
838
|
/**
|
|
773
839
|
* @abstract 更新组件语言
|
|
@@ -836,8 +902,8 @@ class Cn extends HTMLElement {
|
|
|
836
902
|
* @returns {boolean}
|
|
837
903
|
*/
|
|
838
904
|
getAttrBoolean(e, i) {
|
|
839
|
-
const
|
|
840
|
-
return
|
|
905
|
+
const o = this.getAttribute(e);
|
|
906
|
+
return o === "true" || o === "" ? !0 : o === "false" ? !1 : i;
|
|
841
907
|
}
|
|
842
908
|
/**
|
|
843
909
|
* 获取属性值,并转换为数字
|
|
@@ -845,23 +911,23 @@ class Cn extends HTMLElement {
|
|
|
845
911
|
* @returns {number}
|
|
846
912
|
*/
|
|
847
913
|
getAttrNumber(e, i) {
|
|
848
|
-
const
|
|
849
|
-
return
|
|
914
|
+
const o = this.getAttribute(e);
|
|
915
|
+
return o ? Number(o) : i || 0;
|
|
850
916
|
}
|
|
851
917
|
getAttrString(e, i) {
|
|
852
|
-
const
|
|
853
|
-
return !
|
|
918
|
+
const o = this.getAttribute(e);
|
|
919
|
+
return !o || o === "null" ? i || "" : o;
|
|
854
920
|
}
|
|
855
921
|
getAttrDate(e, i) {
|
|
856
|
-
let
|
|
857
|
-
return (isNaN(
|
|
922
|
+
let o = this.getAttrNumber(e);
|
|
923
|
+
return (isNaN(o) || !o) && (o = this.getAttrString(e)), isNaN(new Date(o)) ? i || null : new Date(o);
|
|
858
924
|
}
|
|
859
925
|
setAttr(e, i) {
|
|
860
|
-
if (i ||
|
|
861
|
-
const
|
|
926
|
+
if (i || Y(this, B)[e].default || i === 0) {
|
|
927
|
+
const o = Ae.JSON.stringify(i);
|
|
862
928
|
this.setAttribute(
|
|
863
929
|
e,
|
|
864
|
-
Array.isArray(i) || typeof i == "object" && i !== null ?
|
|
930
|
+
Array.isArray(i) || typeof i == "object" && i !== null ? o : i
|
|
865
931
|
);
|
|
866
932
|
} else
|
|
867
933
|
this.removeAttribute(e);
|
|
@@ -869,6 +935,7 @@ class Cn extends HTMLElement {
|
|
|
869
935
|
}
|
|
870
936
|
B = new WeakMap();
|
|
871
937
|
export {
|
|
872
|
-
|
|
873
|
-
|
|
938
|
+
Mn as B,
|
|
939
|
+
Gt as S,
|
|
940
|
+
On as h
|
|
874
941
|
};
|