@mgdis/stencil-helpers 2.2.5 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/dist/components/index.d.ts.map +1 -1
- package/dist/ide/index.d.ts.map +1 -1
- package/dist/index.es.js +630 -448
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +22 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/locale/index.d.ts.map +1 -1
- package/dist/storybook/index.d.ts +6 -5
- package/dist/storybook/index.d.ts.map +1 -1
- package/dist/tests/unit.d.ts.map +1 -1
- package/package.json +13 -12
package/dist/index.es.js
CHANGED
|
@@ -1,216 +1,254 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Re = Object.defineProperty;
|
|
2
|
+
var ne = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
crypto.getRandomValues(
|
|
11
|
-
const
|
|
12
|
-
return e !== "" ? `${e}-${
|
|
13
|
-
},
|
|
14
|
-
class
|
|
5
|
+
var ze = (e, t, r) => t in e ? Re(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
6
|
+
var d = (e, t, r) => ze(e, typeof t != "symbol" ? t + "" : t, r), Ne = (e, t, r) => t.has(e) || ne("Cannot " + r);
|
|
7
|
+
var O = (e, t, r) => (Ne(e, t, "read from private field"), r ? r.call(e) : t.get(e)), G = (e, t, r) => t.has(e) ? ne("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r);
|
|
8
|
+
const xt = (e = "", t = 10) => {
|
|
9
|
+
const r = new Uint8Array(t);
|
|
10
|
+
crypto.getRandomValues(r);
|
|
11
|
+
const s = Array.from(r).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, t);
|
|
12
|
+
return e !== "" ? `${e}-${s}` : s;
|
|
13
|
+
}, Ot = (e) => Le(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;
|
|
14
|
+
class kt {
|
|
15
15
|
constructor(t = []) {
|
|
16
16
|
/**
|
|
17
17
|
* Available classes
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
d(this, "classes");
|
|
20
20
|
/**
|
|
21
21
|
* Add class
|
|
22
22
|
* @param className - class name to add
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
d(this, "add", (t) => {
|
|
25
25
|
this.has(t) || this.classes.push(t);
|
|
26
26
|
});
|
|
27
27
|
/**
|
|
28
28
|
* Delete class
|
|
29
29
|
* @param className - class name to delete
|
|
30
30
|
*/
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
31
|
+
d(this, "delete", (t) => {
|
|
32
|
+
const r = this.classes.indexOf(t);
|
|
33
|
+
r > -1 && this.classes.splice(r, 1);
|
|
34
34
|
});
|
|
35
35
|
/**
|
|
36
36
|
* Check if class exist in list
|
|
37
37
|
* @param className - class name to check
|
|
38
38
|
* @returns class name is in the list
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
d(this, "has", (t) => this.classes.includes(t));
|
|
41
41
|
/**
|
|
42
42
|
* Join classes seperated by spaces
|
|
43
43
|
* @returns joined values
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
d(this, "join", () => this.classes.join(" "));
|
|
46
46
|
this.classes = t;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
const
|
|
50
|
-
const t =
|
|
51
|
-
return [e, ...t, ...
|
|
52
|
-
},
|
|
49
|
+
const At = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Tt = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), jt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Rt = (e) => {
|
|
50
|
+
const t = ge(e), r = pe(e);
|
|
51
|
+
return [e, ...t, ...r];
|
|
52
|
+
}, ge = (e, t = []) => {
|
|
53
53
|
if (e.self !== e.top)
|
|
54
54
|
try {
|
|
55
|
-
const
|
|
56
|
-
return
|
|
57
|
-
} catch (
|
|
58
|
-
return console.error("Different hosts between iframes:",
|
|
55
|
+
const r = e.parent;
|
|
56
|
+
return r ? (t.push(r), ge(r, t)) : t;
|
|
57
|
+
} catch (r) {
|
|
58
|
+
return console.error("Different hosts between iframes:", r), t;
|
|
59
59
|
}
|
|
60
60
|
return t;
|
|
61
|
-
},
|
|
61
|
+
}, pe = (e, t = []) => {
|
|
62
62
|
if (e.frames.length > 0)
|
|
63
|
-
for (const
|
|
64
|
-
t.push(
|
|
63
|
+
for (const r of Array.from(e.frames))
|
|
64
|
+
t.push(r), pe(r, t);
|
|
65
65
|
return t;
|
|
66
|
-
},
|
|
67
|
-
var
|
|
66
|
+
}, Le = (e) => typeof e == "string" && e.trim() !== "", zt = (e) => typeof e == "object" ? JSON.stringify(e) : `${e}`, Nt = (e) => typeof e == "number" && !Number.isNaN(e), Lt = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, Mt = async (e) => e();
|
|
67
|
+
var B = {
|
|
68
68
|
updatable: !0,
|
|
69
69
|
slotRelocation: !0,
|
|
70
70
|
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
71
71
|
experimentalSlotFixes: !1
|
|
72
|
-
},
|
|
73
|
-
for (var
|
|
74
|
-
|
|
75
|
-
},
|
|
72
|
+
}, Me = Object.defineProperty, Fe = (e, t) => {
|
|
73
|
+
for (var r in t)
|
|
74
|
+
Me(e, r, { get: t[r], enumerable: !0 });
|
|
75
|
+
}, Ie = "http://www.w3.org/2000/svg", Ce = "http://www.w3.org/1999/xhtml", ie = (e, t) => t in e, oe = "http://www.w3.org/1999/xlink", S = typeof window < "u" ? window : {}, T = {
|
|
76
76
|
$flags$: 0,
|
|
77
77
|
$resourcesUrl$: "",
|
|
78
78
|
jmp: (e) => e(),
|
|
79
79
|
raf: (e) => requestAnimationFrame(e),
|
|
80
|
-
ael: (e, t,
|
|
81
|
-
rel: (e, t,
|
|
80
|
+
ael: (e, t, r, s) => e.addEventListener(t, r, s),
|
|
81
|
+
rel: (e, t, r, s) => e.removeEventListener(t, r, s),
|
|
82
82
|
ce: (e, t) => new CustomEvent(e, t)
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
err: () =>
|
|
86
|
-
map: () =>
|
|
87
|
-
ok: () =>
|
|
88
|
-
unwrap: () =>
|
|
89
|
-
unwrapErr: () =>
|
|
83
|
+
}, Ue = (e) => e != null && e !== void 0, $e = (e) => (e = typeof e, e === "object" || e === "function"), De = {};
|
|
84
|
+
Fe(De, {
|
|
85
|
+
err: () => de,
|
|
86
|
+
map: () => Ze,
|
|
87
|
+
ok: () => W,
|
|
88
|
+
unwrap: () => qe,
|
|
89
|
+
unwrapErr: () => Be
|
|
90
90
|
});
|
|
91
|
-
var
|
|
91
|
+
var W = (e) => ({
|
|
92
92
|
isOk: !0,
|
|
93
93
|
isErr: !1,
|
|
94
94
|
value: e
|
|
95
|
-
}),
|
|
95
|
+
}), de = (e) => ({
|
|
96
96
|
isOk: !1,
|
|
97
97
|
isErr: !0,
|
|
98
98
|
value: e
|
|
99
99
|
});
|
|
100
|
-
function
|
|
100
|
+
function Ze(e, t) {
|
|
101
101
|
if (e.isOk) {
|
|
102
|
-
const
|
|
103
|
-
return
|
|
102
|
+
const r = t(e.value);
|
|
103
|
+
return r instanceof Promise ? r.then((s) => W(s)) : W(r);
|
|
104
104
|
}
|
|
105
105
|
if (e.isErr) {
|
|
106
|
-
const
|
|
107
|
-
return
|
|
106
|
+
const r = e.value;
|
|
107
|
+
return de(r);
|
|
108
108
|
}
|
|
109
109
|
throw "should never get here";
|
|
110
110
|
}
|
|
111
|
-
var
|
|
111
|
+
var qe = (e) => {
|
|
112
112
|
if (e.isOk)
|
|
113
113
|
return e.value;
|
|
114
114
|
throw e.value;
|
|
115
|
-
},
|
|
115
|
+
}, Be = (e) => {
|
|
116
116
|
if (e.isErr)
|
|
117
117
|
return e.value;
|
|
118
118
|
throw e.value;
|
|
119
|
-
},
|
|
120
|
-
const t = e
|
|
121
|
-
e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" &&
|
|
122
|
-
|
|
123
|
-
s.nodeType === 1 && s.tagName === "SLOT-FB" && ((r = Oe(s, s["s-sn"], !1)) != null && r.length ? s.hidden = !0 : s.hidden = !1);
|
|
119
|
+
}, ye = (e) => {
|
|
120
|
+
const t = le(e, "childNodes");
|
|
121
|
+
e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" && be(t, e.tagName).forEach((s) => {
|
|
122
|
+
s.nodeType === 1 && s.tagName === "SLOT-FB" && (Pe(s, ee(s), !1).length ? s.hidden = !0 : s.hidden = !1);
|
|
124
123
|
});
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
let r = 0;
|
|
125
|
+
for (r = 0; r < t.length; r++) {
|
|
126
|
+
const s = t[r];
|
|
127
|
+
s.nodeType === 1 && le(s, "childNodes").length && ye(s);
|
|
128
|
+
}
|
|
129
|
+
}, He = (e) => {
|
|
130
|
+
const t = [];
|
|
131
|
+
for (let r = 0; r < e.length; r++) {
|
|
132
|
+
const s = e[r]["s-nr"] || void 0;
|
|
133
|
+
s && s.isConnected && t.push(s);
|
|
134
|
+
}
|
|
135
|
+
return t;
|
|
127
136
|
};
|
|
128
|
-
function
|
|
129
|
-
let
|
|
130
|
-
for (;
|
|
131
|
-
i = e[
|
|
137
|
+
function be(e, t, r) {
|
|
138
|
+
let s = 0, n = [], i;
|
|
139
|
+
for (; s < e.length; s++)
|
|
140
|
+
i = e[s], i["s-sr"] && (!t || i["s-hn"] === t) && r === void 0 && n.push(i), n = [...n, ...be(i.childNodes, t, r)];
|
|
132
141
|
return n;
|
|
133
142
|
}
|
|
134
|
-
var
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
var Pe = (e, t, r = !0) => {
|
|
144
|
+
const s = [];
|
|
145
|
+
(r && e["s-sr"] || !e["s-sr"]) && s.push(e);
|
|
146
|
+
let n = e;
|
|
147
|
+
for (; n = n.nextSibling; )
|
|
148
|
+
ee(n) === t && (r || !n["s-sr"]) && s.push(n);
|
|
149
|
+
return s;
|
|
150
|
+
}, ae = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", ee = (e) => typeof e["s-sn"] == "string" ? e["s-sn"] : e.nodeType === 1 && e.getAttribute("slot") || void 0;
|
|
151
|
+
function Ge(e) {
|
|
152
|
+
if (e.assignedElements || e.assignedNodes || !e["s-sr"]) return;
|
|
153
|
+
const t = (r) => (function(s) {
|
|
154
|
+
const n = [], i = this["s-sn"];
|
|
155
|
+
s != null && s.flatten && console.error(`
|
|
156
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
157
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
158
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
159
|
+
`);
|
|
160
|
+
const o = this["s-cr"].parentElement;
|
|
161
|
+
return (o.__childNodes ? o.childNodes : He(o.childNodes)).forEach((l) => {
|
|
162
|
+
i === ee(l) && n.push(l);
|
|
163
|
+
}), r ? n.filter(
|
|
164
|
+
(l) => l.nodeType === 1
|
|
165
|
+
/* ElementNode */
|
|
166
|
+
) : n;
|
|
167
|
+
}).bind(e);
|
|
168
|
+
e.assignedElements = t(!0), e.assignedNodes = t(!1);
|
|
169
|
+
}
|
|
170
|
+
function le(e, t) {
|
|
171
|
+
if ("__" + t in e) {
|
|
172
|
+
const r = e["__" + t];
|
|
173
|
+
return typeof r != "function" ? r : r.bind(e);
|
|
174
|
+
} else
|
|
175
|
+
return typeof e[t] != "function" ? e[t] : e[t].bind(e);
|
|
176
|
+
}
|
|
177
|
+
var We = (e, t, ...r) => {
|
|
178
|
+
let s = null, n = null, i = null, o = !1, f = !1;
|
|
179
|
+
const l = [], c = (a) => {
|
|
180
|
+
for (let p = 0; p < a.length; p++)
|
|
181
|
+
s = a[p], Array.isArray(s) ? c(s) : s != null && typeof s != "boolean" && ((o = !$e(s)) && (s = String(s)), o && f ? l[l.length - 1].$text$ += s : l.push(o ? X(null, s) : s), f = o);
|
|
144
182
|
};
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
return
|
|
148
|
-
},
|
|
149
|
-
const
|
|
183
|
+
c(r);
|
|
184
|
+
const g = X(e, null);
|
|
185
|
+
return g.$attrs$ = t, l.length > 0 && (g.$children$ = l), g.$key$ = n, g.$name$ = i, g;
|
|
186
|
+
}, X = (e, t) => {
|
|
187
|
+
const r = {
|
|
150
188
|
$flags$: 0,
|
|
151
189
|
$tag$: e,
|
|
152
190
|
$text$: t,
|
|
153
191
|
$elm$: null,
|
|
154
192
|
$children$: null
|
|
155
193
|
};
|
|
156
|
-
return
|
|
157
|
-
},
|
|
158
|
-
if (
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
} else {
|
|
177
|
-
const $ = te(r);
|
|
178
|
-
if ((f || $ && r !== null) && !n)
|
|
179
|
-
try {
|
|
180
|
-
if (e.tagName.includes("-"))
|
|
181
|
-
e[t] !== r && (e[t] = r);
|
|
182
|
-
else {
|
|
183
|
-
const l = r ?? "";
|
|
184
|
-
t === "list" ? f = !1 : (s == null || e[t] != l) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = l : e.setAttribute(t, l));
|
|
185
|
-
}
|
|
186
|
-
} catch {
|
|
187
|
-
}
|
|
188
|
-
let u = !1;
|
|
189
|
-
c !== (c = c.replace(/^xlink\:?/, "")) && (t = c, u = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (u ? e.removeAttributeNS(X, t) : e.removeAttribute(t)) : (!f || i & 4 || n) && !$ && (r = r === !0 ? "" : r, u ? e.setAttributeNS(X, t, r) : e.setAttribute(t, r));
|
|
194
|
+
return r.$attrs$ = null, r.$key$ = null, r.$name$ = null, r;
|
|
195
|
+
}, Xe = {}, Je = (e) => e && e.$tag$ === Xe, ce = (e, t, r, s, n, i, o) => {
|
|
196
|
+
if (r === s)
|
|
197
|
+
return;
|
|
198
|
+
let f = ie(e, t), l = t.toLowerCase();
|
|
199
|
+
if (t === "class") {
|
|
200
|
+
const c = e.classList, g = fe(r);
|
|
201
|
+
let a = fe(s);
|
|
202
|
+
c.remove(...g.filter((p) => p && !a.includes(p))), c.add(...a.filter((p) => p && !g.includes(p)));
|
|
203
|
+
} else if (t === "style") {
|
|
204
|
+
for (const c in r)
|
|
205
|
+
(!s || s[c] == null) && (c.includes("-") ? e.style.removeProperty(c) : e.style[c] = "");
|
|
206
|
+
for (const c in s)
|
|
207
|
+
(!r || s[c] !== r[c]) && (c.includes("-") ? e.style.setProperty(c, s[c]) : e.style[c] = s[c]);
|
|
208
|
+
} else if (t !== "key") if (t === "ref")
|
|
209
|
+
s && s(e);
|
|
210
|
+
else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
|
|
211
|
+
if (t[2] === "-" ? t = t.slice(3) : ie(S, l) ? t = l.slice(2) : t = l[2] + t.slice(3), r || s) {
|
|
212
|
+
const c = t.endsWith(ve);
|
|
213
|
+
t = t.replace(Ke, ""), r && T.rel(e, t, r, c), s && T.ael(e, t, s, c);
|
|
190
214
|
}
|
|
215
|
+
} else {
|
|
216
|
+
const c = $e(s);
|
|
217
|
+
if ((f || c && s !== null) && !n)
|
|
218
|
+
try {
|
|
219
|
+
if (e.tagName.includes("-"))
|
|
220
|
+
e[t] !== s && (e[t] = s);
|
|
221
|
+
else {
|
|
222
|
+
const a = s ?? "";
|
|
223
|
+
t === "list" ? f = !1 : (r == null || e[t] != a) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = a : e.setAttribute(t, a));
|
|
224
|
+
}
|
|
225
|
+
} catch {
|
|
226
|
+
}
|
|
227
|
+
let g = !1;
|
|
228
|
+
l !== (l = l.replace(/^xlink\:?/, "")) && (t = l, g = !0), s == null || s === !1 ? (s !== !1 || e.getAttribute(t) === "") && (g ? e.removeAttributeNS(oe, t) : e.removeAttribute(t)) : (!f || i & 4 || n) && !c && e.nodeType === 1 && (s = s === !0 ? "" : s, g ? e.setAttributeNS(oe, t, s) : e.setAttribute(t, s));
|
|
191
229
|
}
|
|
192
|
-
},
|
|
230
|
+
}, Ye = /\s/, fe = (e) => (typeof e == "object" && e && "baseVal" in e && (e = e.baseVal), !e || typeof e != "string" ? [] : e.split(Ye)), ve = "Capture", Ke = new RegExp(ve + "$"), J = (e, t, r, s) => {
|
|
193
231
|
const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, i = e && e.$attrs$ || {}, o = t.$attrs$ || {};
|
|
194
|
-
for (const f of
|
|
195
|
-
f in o ||
|
|
232
|
+
for (const f of ue(Object.keys(i)))
|
|
233
|
+
f in o || ce(
|
|
196
234
|
n,
|
|
197
235
|
f,
|
|
198
236
|
i[f],
|
|
199
237
|
void 0,
|
|
200
|
-
|
|
238
|
+
r,
|
|
201
239
|
t.$flags$
|
|
202
240
|
);
|
|
203
|
-
for (const f of
|
|
204
|
-
|
|
241
|
+
for (const f of ue(Object.keys(o)))
|
|
242
|
+
ce(
|
|
205
243
|
n,
|
|
206
244
|
f,
|
|
207
245
|
i[f],
|
|
208
246
|
o[f],
|
|
209
|
-
|
|
247
|
+
r,
|
|
210
248
|
t.$flags$
|
|
211
249
|
);
|
|
212
250
|
};
|
|
213
|
-
function
|
|
251
|
+
function ue(e) {
|
|
214
252
|
return e.includes("ref") ? (
|
|
215
253
|
// we need to sort these to ensure that `'ref'` is the last attr
|
|
216
254
|
[...e.filter((t) => t !== "ref"), "ref"]
|
|
@@ -219,11 +257,11 @@ function Q(e) {
|
|
|
219
257
|
e
|
|
220
258
|
);
|
|
221
259
|
}
|
|
222
|
-
var
|
|
223
|
-
var
|
|
224
|
-
const n = t.$children$[
|
|
225
|
-
let i = 0, o, f,
|
|
226
|
-
if (
|
|
260
|
+
var F, C, j, Y = !1, U = !1, te = !1, b = !1, D = (e, t, r) => {
|
|
261
|
+
var s;
|
|
262
|
+
const n = t.$children$[r];
|
|
263
|
+
let i = 0, o, f, l;
|
|
264
|
+
if (Y || (te = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
|
|
227
265
|
// slot element has fallback content
|
|
228
266
|
// still create an element that "mocks" the slot element
|
|
229
267
|
2
|
|
@@ -233,308 +271,452 @@ var M, F, E, N = !1, H = !1, I = !1, v = !1, D = (e, t, s) => {
|
|
|
233
271
|
// where actual slot content should sit next to
|
|
234
272
|
1
|
|
235
273
|
))), n.$text$ !== null)
|
|
236
|
-
o = n.$elm$ =
|
|
274
|
+
o = n.$elm$ = S.document.createTextNode(n.$text$);
|
|
237
275
|
else if (n.$flags$ & 1)
|
|
238
|
-
o = n.$elm$ =
|
|
276
|
+
o = n.$elm$ = S.document.createTextNode(""), J(null, n, b);
|
|
239
277
|
else {
|
|
240
|
-
if (
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
278
|
+
if (b || (b = n.$tag$ === "svg"), !S.document)
|
|
279
|
+
throw new Error(
|
|
280
|
+
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
281
|
+
);
|
|
282
|
+
if (o = n.$elm$ = S.document.createElementNS(
|
|
283
|
+
b ? Ie : Ce,
|
|
284
|
+
!Y && B.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
|
|
285
|
+
), b && n.$tag$ === "foreignObject" && (b = !1), J(null, n, b), Ue(F) && o["s-si"] !== F && o.classList.add(o["s-si"] = F), n.$children$)
|
|
244
286
|
for (i = 0; i < n.$children$.length; ++i)
|
|
245
287
|
f = D(e, n, i), f && o.appendChild(f);
|
|
246
|
-
n.$tag$ === "svg" ?
|
|
288
|
+
n.$tag$ === "svg" ? b = !1 : o.tagName === "foreignObject" && (b = !0);
|
|
247
289
|
}
|
|
248
|
-
return o["s-hn"] =
|
|
249
|
-
},
|
|
250
|
-
|
|
251
|
-
const
|
|
252
|
-
e["s-sr"] &&
|
|
253
|
-
for (let
|
|
254
|
-
const n = s
|
|
255
|
-
n["s-hn"] !==
|
|
290
|
+
return o["s-hn"] = j, n.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = C, o["s-sn"] = n.$name$ || "", o["s-rf"] = (s = n.$attrs$) == null ? void 0 : s.ref, Ge(o), l = e && e.$children$ && e.$children$[r], l && l.$tag$ === n.$tag$ && e.$elm$ && R(e.$elm$, !1), Se(C, o, t.$elm$, e == null ? void 0 : e.$elm$)), o;
|
|
291
|
+
}, R = (e, t) => {
|
|
292
|
+
T.$flags$ |= 1;
|
|
293
|
+
const r = Array.from(e.__childNodes || e.childNodes);
|
|
294
|
+
e["s-sr"] && B.experimentalSlotFixes;
|
|
295
|
+
for (let s = r.length - 1; s >= 0; s--) {
|
|
296
|
+
const n = r[s];
|
|
297
|
+
n["s-hn"] !== j && n["s-ol"] && (x(z(n).parentNode, n, z(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, te = !0), t && R(n, t);
|
|
256
298
|
}
|
|
257
|
-
|
|
258
|
-
},
|
|
299
|
+
T.$flags$ &= -2;
|
|
300
|
+
}, he = (e, t, r, s, n, i) => {
|
|
259
301
|
let o = e["s-cr"] && e["s-cr"].parentNode || e, f;
|
|
260
|
-
for (o.shadowRoot && o.tagName ===
|
|
261
|
-
|
|
262
|
-
},
|
|
263
|
-
for (let
|
|
264
|
-
const n = e[
|
|
302
|
+
for (o.shadowRoot && o.tagName === j && (o = o.shadowRoot); n <= i; ++n)
|
|
303
|
+
s[n] && (f = D(null, r, n), f && (s[n].$elm$ = f, x(o, f, z(t))));
|
|
304
|
+
}, _e = (e, t, r) => {
|
|
305
|
+
for (let s = t; s <= r; ++s) {
|
|
306
|
+
const n = e[s];
|
|
265
307
|
if (n) {
|
|
266
308
|
const i = n.$elm$;
|
|
267
|
-
|
|
309
|
+
Ee(n), i && (U = !0, i["s-ol"] ? i["s-ol"].remove() : R(i, !0), i.remove());
|
|
268
310
|
}
|
|
269
311
|
}
|
|
270
|
-
},
|
|
271
|
-
let i = 0, o = 0, f = 0,
|
|
272
|
-
for (; i <=
|
|
273
|
-
if (
|
|
274
|
-
|
|
275
|
-
else if (l == null)
|
|
276
|
-
l = t[--$];
|
|
312
|
+
}, Qe = (e, t, r, s, n = !1) => {
|
|
313
|
+
let i = 0, o = 0, f = 0, l = 0, c = t.length - 1, g = t[0], a = t[c], p = s.length - 1, u = s[0], $ = s[p], h, v;
|
|
314
|
+
for (; i <= c && o <= p; )
|
|
315
|
+
if (g == null)
|
|
316
|
+
g = t[++i];
|
|
277
317
|
else if (a == null)
|
|
278
|
-
a =
|
|
279
|
-
else if (
|
|
280
|
-
|
|
281
|
-
else if (
|
|
282
|
-
|
|
283
|
-
else if (
|
|
284
|
-
|
|
285
|
-
else if (
|
|
286
|
-
|
|
287
|
-
else if (
|
|
288
|
-
(
|
|
318
|
+
a = t[--c];
|
|
319
|
+
else if (u == null)
|
|
320
|
+
u = s[++o];
|
|
321
|
+
else if ($ == null)
|
|
322
|
+
$ = s[--p];
|
|
323
|
+
else if (M(g, u, n))
|
|
324
|
+
k(g, u, n), g = t[++i], u = s[++o];
|
|
325
|
+
else if (M(a, $, n))
|
|
326
|
+
k(a, $, n), a = t[--c], $ = s[--p];
|
|
327
|
+
else if (M(g, $, n))
|
|
328
|
+
(g.$tag$ === "slot" || $.$tag$ === "slot") && R(g.$elm$.parentNode, !1), k(g, $, n), x(e, g.$elm$, a.$elm$.nextSibling), g = t[++i], $ = s[--p];
|
|
329
|
+
else if (M(a, u, n))
|
|
330
|
+
(g.$tag$ === "slot" || $.$tag$ === "slot") && R(a.$elm$.parentNode, !1), k(a, u, n), x(e, a.$elm$, g.$elm$), a = t[--c], u = s[++o];
|
|
289
331
|
else {
|
|
290
|
-
for (f = -1,
|
|
291
|
-
if (t[
|
|
292
|
-
f =
|
|
332
|
+
for (f = -1, l = i; l <= c; ++l)
|
|
333
|
+
if (t[l] && t[l].$key$ !== null && t[l].$key$ === u.$key$) {
|
|
334
|
+
f = l;
|
|
293
335
|
break;
|
|
294
336
|
}
|
|
295
|
-
f >= 0 ? (
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
337
|
+
f >= 0 ? (v = t[f], v.$tag$ !== u.$tag$ ? h = D(t && t[o], r, f) : (k(v, u, n), t[f] = void 0, h = v.$elm$), u = s[++o]) : (h = D(t && t[o], r, o), u = s[++o]), h && x(
|
|
338
|
+
z(g.$elm$).parentNode,
|
|
339
|
+
h,
|
|
340
|
+
z(g.$elm$)
|
|
299
341
|
);
|
|
300
342
|
}
|
|
301
|
-
i >
|
|
343
|
+
i > c ? he(
|
|
302
344
|
e,
|
|
303
|
-
|
|
304
|
-
s,
|
|
345
|
+
s[p + 1] == null ? null : s[p + 1].$elm$,
|
|
305
346
|
r,
|
|
347
|
+
s,
|
|
306
348
|
o,
|
|
307
|
-
|
|
308
|
-
) : o >
|
|
309
|
-
},
|
|
310
|
-
const
|
|
311
|
-
let
|
|
312
|
-
f === null ? (
|
|
349
|
+
p
|
|
350
|
+
) : o > p && _e(t, i, c);
|
|
351
|
+
}, M = (e, t, r = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : r ? (r && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, z = (e) => e && e["s-ol"] || e, k = (e, t, r = !1) => {
|
|
352
|
+
const s = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$, o = t.$tag$, f = t.$text$;
|
|
353
|
+
let l;
|
|
354
|
+
f === null ? (b = o === "svg" ? !0 : o === "foreignObject" ? !1 : b, J(e, t, b), n !== null && i !== null ? Qe(s, n, t, i, r) : i !== null ? (e.$text$ !== null && (s.textContent = ""), he(s, null, t, i, 0, i.length - 1)) : (
|
|
313
355
|
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
314
|
-
!
|
|
315
|
-
),
|
|
316
|
-
},
|
|
317
|
-
let t,
|
|
356
|
+
!r && B.updatable && n !== null && _e(n, 0, n.length - 1)
|
|
357
|
+
), b && o === "svg" && (b = !1)) : (l = s["s-cr"]) ? l.parentNode.textContent = f : e.$text$ !== f && (s.data = f);
|
|
358
|
+
}, E = [], we = (e) => {
|
|
359
|
+
let t, r, s;
|
|
318
360
|
const n = e.__childNodes || e.childNodes;
|
|
319
361
|
for (const i of n) {
|
|
320
362
|
if (i["s-sr"] && (t = i["s-cr"]) && t.parentNode) {
|
|
321
|
-
|
|
363
|
+
r = t.parentNode.__childNodes || t.parentNode.childNodes;
|
|
322
364
|
const o = i["s-sn"];
|
|
323
|
-
for (
|
|
324
|
-
if (t = s
|
|
325
|
-
if (
|
|
326
|
-
let f =
|
|
327
|
-
|
|
365
|
+
for (s = r.length - 1; s >= 0; s--)
|
|
366
|
+
if (t = r[s], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== i["s-hn"])
|
|
367
|
+
if (ae(t, o)) {
|
|
368
|
+
let f = E.find((l) => l.$nodeToRelocate$ === t);
|
|
369
|
+
U = !0, t["s-sn"] = t["s-sn"] || o, f ? (f.$nodeToRelocate$["s-sh"] = i["s-hn"], f.$slotRefNode$ = i) : (t["s-sh"] = i["s-hn"], E.push({
|
|
328
370
|
$slotRefNode$: i,
|
|
329
371
|
$nodeToRelocate$: t
|
|
330
|
-
})), t["s-sr"] &&
|
|
331
|
-
|
|
372
|
+
})), t["s-sr"] && E.map((l) => {
|
|
373
|
+
ae(l.$nodeToRelocate$, t["s-sn"]) && (f = E.find((c) => c.$nodeToRelocate$ === t), f && !l.$slotRefNode$ && (l.$slotRefNode$ = f.$slotRefNode$));
|
|
332
374
|
});
|
|
333
|
-
} else
|
|
375
|
+
} else E.some((f) => f.$nodeToRelocate$ === t) || E.push({
|
|
334
376
|
$nodeToRelocate$: t
|
|
335
377
|
});
|
|
336
378
|
}
|
|
337
|
-
i.nodeType === 1 &&
|
|
379
|
+
i.nodeType === 1 && we(i);
|
|
338
380
|
}
|
|
339
|
-
},
|
|
340
|
-
e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(
|
|
341
|
-
},
|
|
342
|
-
function
|
|
343
|
-
var n;
|
|
344
|
-
let
|
|
345
|
-
if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (
|
|
346
|
-
const
|
|
347
|
-
if ((n =
|
|
348
|
-
let c = (
|
|
381
|
+
}, Ee = (e) => {
|
|
382
|
+
e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(Ee);
|
|
383
|
+
}, x = (e, t, r) => (typeof t["s-sn"] == "string" && t["s-sr"] && t["s-cr"] && Se(t["s-cr"], t, e, t.parentElement), e == null ? void 0 : e.insertBefore(t, r));
|
|
384
|
+
function Se(e, t, r, s) {
|
|
385
|
+
var n, i;
|
|
386
|
+
let o;
|
|
387
|
+
if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (o = t["s-si"] || e.parentNode["s-sc"])) {
|
|
388
|
+
const f = t["s-sn"], l = t["s-hn"];
|
|
389
|
+
if ((n = r.classList) == null || n.add(o + "-s"), s && ((i = s.classList) != null && i.contains(o + "-s"))) {
|
|
390
|
+
let c = (s.__childNodes || s.childNodes)[0], g = !1;
|
|
349
391
|
for (; c; ) {
|
|
350
|
-
if (c["s-sn"] !==
|
|
351
|
-
|
|
392
|
+
if (c["s-sn"] !== f && c["s-hn"] === l && c["s-sr"]) {
|
|
393
|
+
g = !0;
|
|
352
394
|
break;
|
|
353
395
|
}
|
|
354
396
|
c = c.nextSibling;
|
|
355
397
|
}
|
|
356
|
-
|
|
398
|
+
g || s.classList.remove(o + "-s");
|
|
357
399
|
}
|
|
358
400
|
}
|
|
359
401
|
}
|
|
360
|
-
var
|
|
361
|
-
var
|
|
362
|
-
const
|
|
363
|
-
if (
|
|
364
|
-
([
|
|
365
|
-
)),
|
|
366
|
-
for (const
|
|
367
|
-
|
|
368
|
-
|
|
402
|
+
var Ve = (e, t, r = !1) => {
|
|
403
|
+
var s, n, i, o, f;
|
|
404
|
+
const l = e.$hostElement$, c = e.$cmpMeta$, g = e.$vnode$ || X(null, null), a = Je(t) ? t : We(null, null, t);
|
|
405
|
+
if (j = l.tagName, c.$attrsToReflect$ && (a.$attrs$ = a.$attrs$ || {}, c.$attrsToReflect$.map(
|
|
406
|
+
([p, u]) => a.$attrs$[u] = l[p]
|
|
407
|
+
)), r && a.$attrs$)
|
|
408
|
+
for (const p of Object.keys(a.$attrs$))
|
|
409
|
+
l.hasAttribute(p) && !["key", "ref", "style", "class"].includes(p) && (a.$attrs$[p] = l[p]);
|
|
410
|
+
a.$tag$ = null, a.$flags$ |= 4, e.$vnode$ = a, a.$elm$ = g.$elm$ = l.shadowRoot || l, F = l["s-sc"], Y = !!(c.$flags$ & 1) && !(c.$flags$ & 128), C = l["s-cr"], U = !1, k(g, a, r);
|
|
369
411
|
{
|
|
370
|
-
if (
|
|
371
|
-
|
|
372
|
-
for (const
|
|
373
|
-
const
|
|
374
|
-
if (!
|
|
375
|
-
const
|
|
376
|
-
|
|
412
|
+
if (T.$flags$ |= 1, te) {
|
|
413
|
+
we(a.$elm$);
|
|
414
|
+
for (const p of E) {
|
|
415
|
+
const u = p.$nodeToRelocate$;
|
|
416
|
+
if (!u["s-ol"] && S.document) {
|
|
417
|
+
const $ = S.document.createTextNode("");
|
|
418
|
+
$["s-nr"] = u, x(u.parentNode, u["s-ol"] = $, u);
|
|
377
419
|
}
|
|
378
420
|
}
|
|
379
|
-
for (const
|
|
380
|
-
const
|
|
381
|
-
if (
|
|
382
|
-
const
|
|
383
|
-
let
|
|
421
|
+
for (const p of E) {
|
|
422
|
+
const u = p.$nodeToRelocate$, $ = p.$slotRefNode$;
|
|
423
|
+
if ($) {
|
|
424
|
+
const h = $.parentNode;
|
|
425
|
+
let v = $.nextSibling;
|
|
384
426
|
{
|
|
385
|
-
let
|
|
386
|
-
for (;
|
|
387
|
-
let
|
|
388
|
-
if (
|
|
389
|
-
for (
|
|
390
|
-
|
|
391
|
-
if (!
|
|
392
|
-
|
|
427
|
+
let _ = (s = u["s-ol"]) == null ? void 0 : s.previousSibling;
|
|
428
|
+
for (; _; ) {
|
|
429
|
+
let y = (n = _["s-nr"]) != null ? n : null;
|
|
430
|
+
if (y && y["s-sn"] === u["s-sn"] && h === (y.__parentNode || y.parentNode)) {
|
|
431
|
+
for (y = y.nextSibling; y === u || y != null && y["s-sr"]; )
|
|
432
|
+
y = y == null ? void 0 : y.nextSibling;
|
|
433
|
+
if (!y || !y["s-nr"]) {
|
|
434
|
+
v = y;
|
|
393
435
|
break;
|
|
394
436
|
}
|
|
395
437
|
}
|
|
396
|
-
|
|
438
|
+
_ = _.previousSibling;
|
|
397
439
|
}
|
|
398
440
|
}
|
|
399
|
-
const
|
|
400
|
-
(!
|
|
441
|
+
const N = u.__parentNode || u.parentNode, L = u.__nextSibling || u.nextSibling;
|
|
442
|
+
(!v && h !== N || L !== v) && u !== v && (!u["s-hn"] && u["s-ol"] && (u["s-hn"] = u["s-ol"].parentNode.nodeName), x(h, u, v), u.nodeType === 1 && u.tagName !== "SLOT-FB" && (u.hidden = (i = u["s-ih"]) != null ? i : !1)), u && typeof $["s-rf"] == "function" && $["s-rf"]($);
|
|
401
443
|
} else
|
|
402
|
-
|
|
444
|
+
u.nodeType === 1 && (r && (u["s-ih"] = (o = u.hidden) != null ? o : !1), u.hidden = !0);
|
|
403
445
|
}
|
|
404
446
|
}
|
|
405
|
-
|
|
447
|
+
U && ye(a.$elm$), T.$flags$ &= -2, E.length = 0;
|
|
406
448
|
}
|
|
407
|
-
if (
|
|
408
|
-
const
|
|
409
|
-
for (const
|
|
410
|
-
|
|
449
|
+
if (B.experimentalScopedSlotChanges && c.$flags$ & 2) {
|
|
450
|
+
const p = a.$elm$.__childNodes || a.$elm$.childNodes;
|
|
451
|
+
for (const u of p)
|
|
452
|
+
u["s-hn"] !== j && !u["s-sh"] && (r && u["s-ih"] == null && (u["s-ih"] = (f = u.hidden) != null ? f : !1), u.hidden = !0);
|
|
411
453
|
}
|
|
412
|
-
|
|
454
|
+
C = void 0;
|
|
413
455
|
};
|
|
414
|
-
const
|
|
415
|
-
|
|
416
|
-
|
|
456
|
+
const K = {
|
|
457
|
+
ignore: [],
|
|
458
|
+
ignore_with: "_!i-£___£%_",
|
|
459
|
+
strict: !1,
|
|
460
|
+
tab_size: 2,
|
|
461
|
+
tag_wrap: !1,
|
|
462
|
+
tag_wrap_width: 80,
|
|
463
|
+
trim: []
|
|
464
|
+
}, w = "!i-£___£%_", me = [
|
|
465
|
+
"area",
|
|
466
|
+
"base",
|
|
467
|
+
"br",
|
|
468
|
+
"col",
|
|
469
|
+
"embed",
|
|
470
|
+
"hr",
|
|
471
|
+
"img",
|
|
472
|
+
"input",
|
|
473
|
+
"link",
|
|
474
|
+
"meta",
|
|
475
|
+
"param",
|
|
476
|
+
"source",
|
|
477
|
+
"track",
|
|
478
|
+
"wbr"
|
|
479
|
+
], re = (e) => /<(?:[A-Za-z]+[A-Za-z0-9]*)(?:\s+.*?)*?\/{0,1}>/.test(e) || /<(?<Element>(?:[A-Za-z]+[A-Za-z0-9]*:)?(?:[A-Za-z]+[A-Za-z0-9]*))(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e) || /<(?<Element>(?:[a-z][a-z0-9._]*:)?[a-z][a-z0-9._]*-[a-z0-9._-]+)(?:\s+.*?)*?>(?:.|\n)*?<\/{1}\k<Element>>/.test(e), xe = (e, t) => {
|
|
480
|
+
if (!e || !t)
|
|
481
|
+
throw new Error("Both 'current' and 'updates' must be passed-in to mergeObjects()");
|
|
482
|
+
let r;
|
|
483
|
+
if (Array.isArray(e))
|
|
484
|
+
r = structuredClone(e).concat(t);
|
|
485
|
+
else if (typeof e == "object") {
|
|
486
|
+
r = { ...e };
|
|
487
|
+
for (let s of Object.keys(t))
|
|
488
|
+
typeof t[s] != "object" ? r[s] = t[s] : r[s] = xe(r[s] || {}, t[s]);
|
|
489
|
+
}
|
|
490
|
+
return r;
|
|
491
|
+
}, et = (e, t) => xe(structuredClone(e), t), tt = (e) => (e = e.replace(/<[\w:\-]+([^>]*[^\/])>/g, (t, r) => t.replace(r, (s) => s.replace(/\n/g, w + "nl!").replace(/\r/g, w + "cr!").replace(/\s/g, w + "ws!"))), e), rt = (e) => {
|
|
492
|
+
const t = /<([A-Za-z][A-Za-z0-9]*|[a-z][a-z0-9._]*-[a-z0-9._-]+)((?:\s+[A-Za-z0-9_-]+="[^"]*"|\s*[a-z]*)*)>/g;
|
|
493
|
+
return e = e.replace(t, (r, s, n) => r.replace(n, (i) => i.replace(/</g, w + "lt!").replace(/>/g, w + "gt!"))), e;
|
|
494
|
+
}, st = (e, t) => {
|
|
495
|
+
const r = t.ignore, s = t.ignore_with;
|
|
496
|
+
for (let n = 0; n < r.length; n++) {
|
|
497
|
+
const i = new RegExp(`<${r[n]}[^>]*>((.|
|
|
498
|
+
)*?)</${r[n]}>`, "g");
|
|
499
|
+
e = e.replace(i, (o, f) => o.replace(f, (l) => l.replace(/</g, "-" + s + "lt-").replace(/>/g, "-" + s + "gt-").replace(/\n/g, "-" + s + "nl-").replace(/\r/g, "-" + s + "cr-").replace(/\s/g, "-" + s + "ws-")));
|
|
500
|
+
}
|
|
501
|
+
return e;
|
|
502
|
+
}, nt = (e, t) => {
|
|
503
|
+
for (let r = 0; r < t.length; r++) {
|
|
504
|
+
const s = new RegExp(`(<${t[r]}[^>]*>)\\s+`, "g"), n = new RegExp(`\\s+(</${t[r]}>)`, "g");
|
|
505
|
+
e = e.replace(s, "$1").replace(n, "$1");
|
|
506
|
+
}
|
|
507
|
+
return e;
|
|
508
|
+
}, it = (e) => (e = e.replace(/<[\w:\-]+([^>]*[^\/])>/g, (t, r) => t.replace(r, (s) => s.replace(new RegExp(w + "nl!", "g"), `
|
|
509
|
+
`).replace(new RegExp(w + "cr!", "g"), "\r").replace(new RegExp(w + "ws!", "g"), " "))), e), ot = (e) => (e = e.replace(/<[\w:\-]+([^>]*)>/g, (t, r) => t.replace(r, (s) => s.replace(new RegExp(w + "lt!", "g"), "<").replace(new RegExp(w + "gt!", "g"), ">"))), e), at = (e, t) => {
|
|
510
|
+
const r = t.ignore, s = t.ignore_with;
|
|
511
|
+
for (let n = 0; n < r.length; n++) {
|
|
512
|
+
const i = new RegExp(`<${r[n]}[^>]*>((.|
|
|
513
|
+
)*?)</${r[n]}>`, "g");
|
|
514
|
+
e = e.replace(i, (o, f) => o.replace(f, (l) => l.replace(new RegExp("-" + s + "lt-", "g"), "<").replace(new RegExp("-" + s + "gt-", "g"), ">").replace(new RegExp("-" + s + "nl-", "g"), `
|
|
515
|
+
`).replace(new RegExp("-" + s + "cr-", "g"), "\r").replace(new RegExp("-" + s + "ws-", "g"), " ")));
|
|
516
|
+
}
|
|
517
|
+
return e;
|
|
518
|
+
}, lt = (e) => {
|
|
519
|
+
var s, n;
|
|
520
|
+
if (typeof e != "object") throw new Error("Config must be an object.");
|
|
521
|
+
if (!(Object.hasOwn(e, "ignore") || Object.hasOwn(e, "ignore_with") || Object.hasOwn(e, "strict") || Object.hasOwn(e, "tab_size") || Object.hasOwn(e, "tag_wrap") || Object.hasOwn(e, "tag_wrap_width") || Object.hasOwn(e, "trim"))) return K;
|
|
522
|
+
let r = e.tab_size;
|
|
523
|
+
if (r) {
|
|
524
|
+
if (typeof r != "number") throw new Error(`tab_size must be a number, not ${typeof e.tab_size}.`);
|
|
525
|
+
if (!Number.isSafeInteger(r)) throw new Error(`Tab size ${r} is not safe. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger for more info.`);
|
|
526
|
+
if (r = Math.floor(r), r < 1 || r > 16) throw new Error("Tab size out of range. Expecting 1 to 16.");
|
|
527
|
+
e.tab_size = r;
|
|
528
|
+
}
|
|
529
|
+
if (Object.hasOwn(e, "ignore") && (!Array.isArray(e.ignore) || !((s = e.ignore) != null && s.every((i) => typeof i == "string"))))
|
|
530
|
+
throw new Error("Ignore config must be an array of strings.");
|
|
531
|
+
if (Object.hasOwn(e, "ignore_with") && typeof e.ignore_with != "string")
|
|
532
|
+
throw new Error(`Ignore_with config must be a string, not ${typeof e.ignore_with}.`);
|
|
533
|
+
if (Object.hasOwn(e, "strict") && typeof e.strict != "boolean")
|
|
534
|
+
throw new Error(`Strict config must be a boolean, not ${typeof e.strict}.`);
|
|
535
|
+
if (Object.hasOwn(e, "tag_wrap") && typeof e.tag_wrap != "boolean")
|
|
536
|
+
throw new Error(`tag_wrap config must be a boolean, not ${typeof e.tag_wrap}.`);
|
|
537
|
+
if (Object.hasOwn(e, "tag_wrap_width") && typeof e.tag_wrap_width != "number")
|
|
538
|
+
throw new Error(`tag_wrap_width config must be a number, not ${typeof e.tag_wrap_width}.`);
|
|
539
|
+
if (Object.hasOwn(e, "trim") && (!Array.isArray(e.trim) || !((n = e.trim) != null && n.every((i) => typeof i == "string"))))
|
|
540
|
+
throw new Error("Trim config must be an array of strings.");
|
|
541
|
+
return et(K, e);
|
|
542
|
+
}, ct = (e, t = !0) => t && !re(e) ? e : e.replace(/<([a-zA-Z\-0-9:]+)[^>]*>/g, (r, s) => me.indexOf(s) > -1 ? `${r.substring(0, r.length - 1)} />`.replace(/\/\s\//g, "/") : r.replace(/[\s]?\/>/g, `></${s}>`)), ft = (e, t = !1) => (e = e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g, (r, s) => r.replace(s, (n) => n.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\n/g, " ").replace(/\r/g, " ").replace(/\s/g, " "))), t && (e = e.replace(/<textarea[^>]*>((.|\n)*?)<\/textarea>/g, (r, s) => (r = r.replace(s, (n) => n.replace(/\n|\t/g, "").replace(/[a-z]+="\s*"/ig, "").replace(/>\s+</g, "><").replace(/\s+/g, " ")), r = r.replace(/\s+/g, " ").replace(/\s>/g, ">").replace(/>\s/g, ">").replace(/\s</g, "<").replace(/class=["']\s/g, (n) => n.replace(/\s/g, "")).replace(/(class=.*)\s(["'])/g, "$1$2"), r))), e), ut = (e, t = !0) => t && !re(e) ? e : (e = ft(e), e.replace(/\n|\t/g, "").replace(/>\s+</g, "><").replace(/\s+/g, " ").replace(/(.+=)"\s+"/ig, '$1""').replace(/(.+=)'\s+'/ig, "$1''").replace(/\s>/g, ">").replace(/<\s\//g, "</").replace(/class=["']\s/g, (r) => r.replace(/\s/g, "")).replace(/(class=.*)\s(["'])/g, "$1$2"));
|
|
543
|
+
let I, Q;
|
|
544
|
+
const A = {
|
|
545
|
+
line: []
|
|
546
|
+
}, gt = (e) => {
|
|
547
|
+
A.line = [];
|
|
548
|
+
let t = -1;
|
|
549
|
+
const r = /(<[^>]+>)|([^<]+)/g;
|
|
550
|
+
return e = e.replace(r, (s, n, i) => (n ? A.line.push({ type: "tag", value: s }) : i && i.trim().length > 0 && A.line.push({ type: "text", value: s }), t++, `
|
|
551
|
+
[#-# : ${t} : ${s} : #-#]
|
|
552
|
+
`)), e;
|
|
553
|
+
}, pt = (e) => (e = ct(e, !1), Q.length > 0 && (e = nt(e, Q)), e = ut(e, !1), e = gt(e), e), $t = (e, t) => {
|
|
554
|
+
const r = t.tab_size, s = t.tag_wrap, n = t.tag_wrap_width;
|
|
555
|
+
let i = "";
|
|
556
|
+
A.line.forEach((l, c) => {
|
|
557
|
+
e = e.replace(/\n+/g, `
|
|
558
|
+
`).replace(`[#-# : ${c} : ${l.value} : #-#]`, (g) => {
|
|
559
|
+
var v, N;
|
|
560
|
+
let a = 0;
|
|
561
|
+
const p = `[#-# : ${c - 1} : ${(v = A.line[c - 1]) == null ? void 0 : v.value} : #-#]`;
|
|
562
|
+
i += "0", c === 0 && a++, g.indexOf(`#-# : ${c} : </`) > -1 && a++, p.indexOf("<!doctype") > -1 && a++, p.indexOf("<!--") > -1 && a++, p.indexOf("/> : #-#") > -1 && a++, p.indexOf(`#-# : ${c - 1} : </`) > -1 && a++, ((N = A.line[c - 1]) == null ? void 0 : N.type) === "text" && a++;
|
|
563
|
+
const u = i.length - a;
|
|
564
|
+
if (i = i.substring(0, u), I && g.indexOf("<!--") > -1) return "";
|
|
565
|
+
const $ = g.replace(`[#-# : ${c} : `, "").replace(" : #-#]", "");
|
|
566
|
+
if (s && /<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g.test(l.value) && l.value.length > n) {
|
|
567
|
+
const L = /\s{1}[A-Za-z-]+(?:=".*?")?/g, _ = l.value.split(L).filter(Boolean), y = l.value.matchAll(L), H = r * u, Ae = H + r;
|
|
568
|
+
let P = _[0].padStart(_[0].length + H) + `
|
|
569
|
+
`;
|
|
570
|
+
for (const se of y) {
|
|
571
|
+
const je = se[0].trim().padStart(se[0].trim().length + Ae) + `
|
|
572
|
+
`;
|
|
573
|
+
P += je;
|
|
574
|
+
}
|
|
575
|
+
const Te = _[1].padStart(
|
|
576
|
+
_[1].trim().length + H + (I && me.includes(_[0].slice(1)) ? 1 : 0)
|
|
577
|
+
);
|
|
578
|
+
return P += Te, P;
|
|
579
|
+
} else
|
|
580
|
+
return $.padStart($.length + r * u);
|
|
581
|
+
});
|
|
582
|
+
}), s && (e = tt(e)), e = e.replace(
|
|
583
|
+
/<(?<Element>.+).*>[^<]*?[^><\/\s][^<]*?<\/{1}\k<Element>|<script[^>]*>\s+<\/script>|<(\w+)>\s+<\/(\w+)|<(?:([\w:\._-]+)|([\w:\._-]+)[^>]*[^\/])>\s+<\/([\w:\._-]+)>/g,
|
|
584
|
+
(l) => l.replace(/\n|\t|\s{2,}/g, "")
|
|
585
|
+
), s && (e = it(e)), I && (e = e.replace(/\s\/>|\/>/g, ">"));
|
|
586
|
+
const o = e.substring(0, 1), f = e.substring(e.length - 1);
|
|
587
|
+
return o === `
|
|
588
|
+
` && (e = e.substring(1, e.length)), f === `
|
|
589
|
+
` && (e = e.substring(0, e.length - 1)), e;
|
|
590
|
+
}, dt = (e, t) => {
|
|
591
|
+
if (!re(e)) return e;
|
|
592
|
+
const r = t ? lt(t) : K;
|
|
593
|
+
I = r.strict;
|
|
594
|
+
const s = r.ignore.length > 0;
|
|
595
|
+
return Q = r.trim, s && (e = st(e, r)), e = rt(e), e = pt(e), e = $t(e, r), e = ot(e), s && (e = at(e, r)), e;
|
|
596
|
+
}, yt = (e, t, r) => {
|
|
597
|
+
[null, void 0, "", !1].includes(r) || ["innerHTML", "style", ""].includes(t) || e.setAttribute(t, ["object", "function"].includes(typeof r) ? "⚠️ Property must be set through a script or a framework-specific syntax." : r);
|
|
598
|
+
}, Oe = (e, t, r, s, n) => {
|
|
417
599
|
if (t && typeof t == "string") {
|
|
418
600
|
const i = document.createElement(t);
|
|
419
|
-
Object.keys(
|
|
420
|
-
|
|
421
|
-
}),
|
|
422
|
-
|
|
423
|
-
}),
|
|
601
|
+
Object.keys(r || {}).forEach((o) => {
|
|
602
|
+
yt(i, o, r[o]);
|
|
603
|
+
}), s == null || s.forEach((o) => {
|
|
604
|
+
Oe(i, o.$tag$, o.$attrs$, o.$children$, o.$text$);
|
|
605
|
+
}), r != null && r.innerHTML && (i.innerHTML = r.innerHTML), e.appendChild(i);
|
|
424
606
|
}
|
|
425
607
|
n && (e.innerHTML = n);
|
|
426
|
-
},
|
|
608
|
+
}, Ft = (e, t, r = []) => {
|
|
427
609
|
const s = {};
|
|
428
610
|
if (typeof e != "object")
|
|
429
611
|
throw new Error("filterArgs - args isn't an object.");
|
|
430
|
-
for (const
|
|
431
|
-
if (!r.
|
|
432
|
-
const
|
|
433
|
-
(!t || !Object.keys(t).includes(
|
|
612
|
+
for (const n in e)
|
|
613
|
+
if (!r.includes(n)) {
|
|
614
|
+
const i = e[n], o = n.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
615
|
+
(!t || !Object.keys(t).includes(n) || t[n] !== i) && (s[o] = i);
|
|
434
616
|
}
|
|
435
617
|
return s;
|
|
436
|
-
},
|
|
437
|
-
var
|
|
438
|
-
const
|
|
439
|
-
if (
|
|
440
|
-
return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((
|
|
618
|
+
}, It = (e, t) => {
|
|
619
|
+
var s, n;
|
|
620
|
+
const r = document.getElementById("storybook-root");
|
|
621
|
+
if (r !== null)
|
|
622
|
+
return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((s = t.globals) == null ? void 0 : s.locale) || "en"), Ve(
|
|
441
623
|
{
|
|
442
624
|
$cmpMeta$: {
|
|
443
625
|
$flags$: 0,
|
|
444
|
-
$tagName$:
|
|
626
|
+
$tagName$: r.tagName
|
|
445
627
|
},
|
|
446
|
-
$hostElement$:
|
|
628
|
+
$hostElement$: r
|
|
447
629
|
},
|
|
448
630
|
e(t)
|
|
449
|
-
),
|
|
450
|
-
},
|
|
631
|
+
), r.children[r.children.length - 1];
|
|
632
|
+
}, Ct = ({ $tag$: e, $attrs$: t, $children$: r, $text$: s }) => {
|
|
451
633
|
const n = document.createElement("div");
|
|
452
|
-
return
|
|
453
|
-
},
|
|
634
|
+
return Oe(n, e, t, r, s), dt(n.innerHTML, { tag_wrap: !0 }).replace(/="true"/g, "");
|
|
635
|
+
}, Z = (e, t) => {
|
|
454
636
|
if (!t)
|
|
455
637
|
return;
|
|
456
|
-
const
|
|
457
|
-
return `${e}${
|
|
638
|
+
const r = t.split("/");
|
|
639
|
+
return `${e}${r.slice(2, r.length - 1).join("-")}--docs`;
|
|
458
640
|
};
|
|
459
|
-
var
|
|
460
|
-
class
|
|
641
|
+
var m, q;
|
|
642
|
+
class Ut {
|
|
461
643
|
constructor(t) {
|
|
462
644
|
/**
|
|
463
645
|
* JsonDocs
|
|
464
646
|
*/
|
|
465
|
-
|
|
647
|
+
d(this, "jsonDoc");
|
|
466
648
|
/**
|
|
467
649
|
* Get component data from the jsonDoc
|
|
468
650
|
* @param tagName - tag name we want to get the data from
|
|
469
651
|
* @returns component data
|
|
470
652
|
*/
|
|
471
|
-
|
|
653
|
+
G(this, m, (t) => this.jsonDoc.components.find((r) => r.tag === t));
|
|
472
654
|
/**
|
|
473
655
|
* Get the control for the given prop
|
|
474
656
|
* Based on https://storybook.js.org/docs/api/arg-types#controltype
|
|
475
657
|
* @param prop - prop to get control for
|
|
476
658
|
* @returns control type and options if applicable
|
|
477
659
|
*/
|
|
478
|
-
|
|
479
|
-
const
|
|
480
|
-
return t.type === "string" ? { control: { type: "text" } } : t.type === "number" ? { control: { type: "number" } } : t.type === "boolean" ? { control: { type: "boolean" } } : t.type.startsWith("{") && t.type.endsWith("}") ? { control: { type: "object" } } :
|
|
660
|
+
G(this, q, (t) => {
|
|
661
|
+
const r = t.type.replace(/"([^"]+)"/g, "$1").replace(/\s/g, "").replace(/\(.*?\)/g, (s) => s.replace(/\|/g, " OR ")).split("|").map((s) => s.trim().replace(/ OR /g, "|"));
|
|
662
|
+
return t.type === "string" ? { control: { type: "text" } } : t.type === "number" ? { control: { type: "number" } } : t.type === "boolean" ? { control: { type: "boolean" } } : t.type.startsWith("{") && t.type.endsWith("}") ? { control: { type: "object" } } : r.length > 1 ? r.includes("string") ? { control: { type: "text" } } : r.every((s) => s == null ? void 0 : s.includes("[]")) ? { control: { type: "object" } } : (r.unshift(void 0), { control: { type: "select" }, options: r }) : { control: { type: "object" } };
|
|
481
663
|
});
|
|
482
664
|
/**
|
|
483
665
|
* Extract component arg types from the component data
|
|
484
666
|
* @param tagName - tag name we want to extract the arg types from
|
|
485
667
|
* @returns component arg types
|
|
486
668
|
*/
|
|
487
|
-
|
|
488
|
-
const
|
|
489
|
-
const { control:
|
|
669
|
+
d(this, "extractArgTypes", (t) => {
|
|
670
|
+
const r = O(this, m).call(this, t), s = r == null ? void 0 : r.props.reduce((g, a) => {
|
|
671
|
+
const { control: p, options: u } = O(this, q).call(this, a);
|
|
490
672
|
return {
|
|
491
|
-
...
|
|
492
|
-
[
|
|
493
|
-
name:
|
|
494
|
-
description:
|
|
495
|
-
type: { required:
|
|
673
|
+
...g,
|
|
674
|
+
[a.name]: {
|
|
675
|
+
name: a.attr || a.name,
|
|
676
|
+
description: a.docs,
|
|
677
|
+
type: { required: a.required },
|
|
496
678
|
table: {
|
|
497
679
|
category: "props",
|
|
498
|
-
type: { summary:
|
|
499
|
-
defaultValue: { summary:
|
|
680
|
+
type: { summary: a.type },
|
|
681
|
+
defaultValue: { summary: a.default }
|
|
500
682
|
},
|
|
501
|
-
control:
|
|
502
|
-
options:
|
|
683
|
+
control: p,
|
|
684
|
+
options: u
|
|
503
685
|
}
|
|
504
686
|
};
|
|
505
|
-
}, {}), n =
|
|
506
|
-
(
|
|
507
|
-
...
|
|
508
|
-
[
|
|
509
|
-
name:
|
|
510
|
-
description:
|
|
687
|
+
}, {}), n = r == null ? void 0 : r.events.reduce(
|
|
688
|
+
(g, a) => ({
|
|
689
|
+
...g,
|
|
690
|
+
[a.event]: {
|
|
691
|
+
name: a.event,
|
|
692
|
+
description: a.docs,
|
|
511
693
|
table: {
|
|
512
694
|
category: "events",
|
|
513
|
-
type: { summary:
|
|
695
|
+
type: { summary: a.detail }
|
|
514
696
|
}
|
|
515
697
|
}
|
|
516
698
|
}),
|
|
517
699
|
{}
|
|
518
|
-
), i =
|
|
519
|
-
(
|
|
520
|
-
...
|
|
521
|
-
[
|
|
522
|
-
name:
|
|
523
|
-
description:
|
|
700
|
+
), i = r == null ? void 0 : r.methods.reduce(
|
|
701
|
+
(g, a) => ({
|
|
702
|
+
...g,
|
|
703
|
+
[a.name]: {
|
|
704
|
+
name: a.name,
|
|
705
|
+
description: a.docs,
|
|
524
706
|
table: {
|
|
525
707
|
category: "methods",
|
|
526
|
-
type: { summary:
|
|
708
|
+
type: { summary: a.signature }
|
|
527
709
|
}
|
|
528
710
|
}
|
|
529
711
|
}),
|
|
530
712
|
{}
|
|
531
|
-
), o =
|
|
532
|
-
(
|
|
533
|
-
...
|
|
534
|
-
[
|
|
535
|
-
name:
|
|
713
|
+
), o = r == null ? void 0 : r.slots.reduce(
|
|
714
|
+
(g, a) => ({
|
|
715
|
+
...g,
|
|
716
|
+
[a.name]: {
|
|
717
|
+
name: a.name !== "" ? a.name : "default",
|
|
536
718
|
// default slot are unnamed
|
|
537
|
-
description:
|
|
719
|
+
description: a.docs,
|
|
538
720
|
table: {
|
|
539
721
|
category: "slots",
|
|
540
722
|
type: { summary: void 0 }
|
|
@@ -542,12 +724,12 @@ class ot {
|
|
|
542
724
|
}
|
|
543
725
|
}),
|
|
544
726
|
{}
|
|
545
|
-
), f =
|
|
546
|
-
(
|
|
547
|
-
...
|
|
548
|
-
[
|
|
549
|
-
name:
|
|
550
|
-
description:
|
|
727
|
+
), f = r == null ? void 0 : r.styles.reduce(
|
|
728
|
+
(g, a) => ({
|
|
729
|
+
...g,
|
|
730
|
+
[a.name]: {
|
|
731
|
+
name: a.name,
|
|
732
|
+
description: a.docs,
|
|
551
733
|
table: {
|
|
552
734
|
category: "custom properties",
|
|
553
735
|
type: { summary: void 0 }
|
|
@@ -555,41 +737,41 @@ class ot {
|
|
|
555
737
|
}
|
|
556
738
|
}),
|
|
557
739
|
{}
|
|
558
|
-
),
|
|
559
|
-
const
|
|
560
|
-
return {
|
|
561
|
-
...
|
|
562
|
-
[
|
|
563
|
-
name:
|
|
564
|
-
description: `<a href="./?path=/docs/${
|
|
740
|
+
), l = r == null ? void 0 : r.dependencies.reduce((g, a) => {
|
|
741
|
+
const p = O(this, m).call(this, a);
|
|
742
|
+
return p ? {
|
|
743
|
+
...g,
|
|
744
|
+
[a]: {
|
|
745
|
+
name: a,
|
|
746
|
+
description: `<a href="./?path=/docs/${Z("", p == null ? void 0 : p.filePath)}">View Component Documentation</a>`,
|
|
565
747
|
table: {
|
|
566
748
|
category: "depends on",
|
|
567
749
|
type: { summary: void 0 }
|
|
568
750
|
}
|
|
569
751
|
}
|
|
570
|
-
};
|
|
571
|
-
}, {}),
|
|
572
|
-
const
|
|
573
|
-
return {
|
|
574
|
-
...
|
|
575
|
-
[
|
|
576
|
-
name:
|
|
577
|
-
description: `<a href="./?path=/docs/${
|
|
752
|
+
} : g;
|
|
753
|
+
}, {}), c = r == null ? void 0 : r.dependents.reduce((g, a) => {
|
|
754
|
+
const p = O(this, m).call(this, a);
|
|
755
|
+
return p ? {
|
|
756
|
+
...g,
|
|
757
|
+
[a]: {
|
|
758
|
+
name: a,
|
|
759
|
+
description: `<a href="./?path=/docs/${Z("", p == null ? void 0 : p.filePath)}">View Component Documentation</a>`,
|
|
578
760
|
table: {
|
|
579
761
|
category: "used by",
|
|
580
762
|
type: { summary: void 0 }
|
|
581
763
|
}
|
|
582
764
|
}
|
|
583
|
-
};
|
|
765
|
+
} : g;
|
|
584
766
|
}, {});
|
|
585
767
|
return {
|
|
586
|
-
...
|
|
768
|
+
...s,
|
|
587
769
|
...n,
|
|
588
770
|
...i,
|
|
589
771
|
...o,
|
|
590
772
|
...f,
|
|
591
|
-
...
|
|
592
|
-
|
|
773
|
+
...l,
|
|
774
|
+
...c
|
|
593
775
|
};
|
|
594
776
|
});
|
|
595
777
|
/**
|
|
@@ -597,29 +779,29 @@ class ot {
|
|
|
597
779
|
* @param tagName - tag name we want to extract the description from
|
|
598
780
|
* @returns component description
|
|
599
781
|
*/
|
|
600
|
-
|
|
601
|
-
const
|
|
602
|
-
return (
|
|
782
|
+
d(this, "extractComponentDescription", (t) => {
|
|
783
|
+
const r = O(this, m).call(this, t);
|
|
784
|
+
return (r == null ? void 0 : r.readme) || (r == null ? void 0 : r.docs);
|
|
603
785
|
});
|
|
604
786
|
this.jsonDoc = t;
|
|
605
787
|
}
|
|
606
788
|
}
|
|
607
|
-
|
|
608
|
-
const
|
|
789
|
+
m = new WeakMap(), q = new WeakMap();
|
|
790
|
+
const bt = (e, t) => {
|
|
609
791
|
if (t)
|
|
610
792
|
return `${e}${t}`;
|
|
611
|
-
},
|
|
793
|
+
}, ke = (e) => {
|
|
612
794
|
let t = e.overview ? `${e.overview}
|
|
613
795
|
|
|
614
796
|
` : "";
|
|
615
|
-
const
|
|
616
|
-
|
|
617
|
-
`, t +=
|
|
797
|
+
const r = e.props.filter(({ attr: n }) => n !== void 0);
|
|
798
|
+
r.length && (t += `Attributes:
|
|
799
|
+
`, t += r.map(({ attr: n, docs: i }) => `- \`${n}\`: ${i}
|
|
618
800
|
`).join(""), t += `
|
|
619
801
|
`);
|
|
620
|
-
const
|
|
621
|
-
return
|
|
622
|
-
`, t +=
|
|
802
|
+
const s = e.props.filter(({ attr: n }) => n === void 0);
|
|
803
|
+
return s.length && (t += `Properties:
|
|
804
|
+
`, t += s.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
623
805
|
`).join(""), t += `
|
|
624
806
|
`), e.methods.length && (t += `Methods:
|
|
625
807
|
`, t += e.methods.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
@@ -634,24 +816,24 @@ const qe = (e, t) => {
|
|
|
634
816
|
`, t += e.slots.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
635
817
|
`).join(""), t += `
|
|
636
818
|
`), t;
|
|
637
|
-
},
|
|
819
|
+
}, V = (e) => `${e.docs}
|
|
638
820
|
|
|
639
|
-
Type: \`${e.type}\``,
|
|
821
|
+
Type: \`${e.type}\``, Dt = (e, t, r, s) => ({
|
|
640
822
|
$schema: "https://json.schemastore.org/web-types",
|
|
641
823
|
name: e,
|
|
642
824
|
version: t,
|
|
643
825
|
"description-markup": "markdown",
|
|
644
826
|
contributions: {
|
|
645
827
|
html: {
|
|
646
|
-
elements:
|
|
647
|
-
const i =
|
|
828
|
+
elements: r.components.map((n) => {
|
|
829
|
+
const i = Z(s, n.filePath);
|
|
648
830
|
return {
|
|
649
831
|
name: n.tag,
|
|
650
|
-
description:
|
|
832
|
+
description: ke(n),
|
|
651
833
|
"doc-url": i,
|
|
652
834
|
attributes: n.props.filter((o) => o.attr).map((o) => ({
|
|
653
835
|
name: o.attr,
|
|
654
|
-
description:
|
|
836
|
+
description: V(o),
|
|
655
837
|
"doc-url": i,
|
|
656
838
|
value: {
|
|
657
839
|
type: o.type,
|
|
@@ -662,7 +844,7 @@ Type: \`${e.type}\``, lt = (e, t, s, r) => ({
|
|
|
662
844
|
js: {
|
|
663
845
|
properties: n.props.map((o) => ({
|
|
664
846
|
name: o.name,
|
|
665
|
-
description:
|
|
847
|
+
description: V(o),
|
|
666
848
|
"doc-url": i,
|
|
667
849
|
value: {
|
|
668
850
|
type: o.type,
|
|
@@ -685,23 +867,23 @@ Type: \`${e.type}\``, lt = (e, t, s, r) => ({
|
|
|
685
867
|
})
|
|
686
868
|
}
|
|
687
869
|
}
|
|
688
|
-
}),
|
|
689
|
-
{ name: "Storybook", url:
|
|
690
|
-
{ name: "Sources", url:
|
|
691
|
-
],
|
|
870
|
+
}), vt = (e, t, r) => [
|
|
871
|
+
{ name: "Storybook", url: Z(e, r) },
|
|
872
|
+
{ name: "Sources", url: bt(t, r) }
|
|
873
|
+
], ht = (e) => {
|
|
692
874
|
if (!e.values.some(({ value: t }) => t === void 0))
|
|
693
875
|
return e.values.map(({ value: t }) => ({ name: t }));
|
|
694
|
-
},
|
|
876
|
+
}, Zt = (e, t, r) => ({
|
|
695
877
|
version: 1.1,
|
|
696
|
-
tags: e.components.map((
|
|
697
|
-
const n =
|
|
878
|
+
tags: e.components.map((s) => {
|
|
879
|
+
const n = vt(t, r, s.filePath);
|
|
698
880
|
return {
|
|
699
|
-
name:
|
|
700
|
-
description:
|
|
701
|
-
attributes:
|
|
881
|
+
name: s.tag,
|
|
882
|
+
description: ke(s),
|
|
883
|
+
attributes: s.props.map((i) => ({
|
|
702
884
|
name: i.attr || i.name,
|
|
703
|
-
description:
|
|
704
|
-
values:
|
|
885
|
+
description: V(i),
|
|
886
|
+
values: ht(i),
|
|
705
887
|
references: n
|
|
706
888
|
})),
|
|
707
889
|
references: n
|
|
@@ -709,55 +891,55 @@ Type: \`${e.type}\``, lt = (e, t, s, r) => ({
|
|
|
709
891
|
}),
|
|
710
892
|
globalAttributes: [],
|
|
711
893
|
valueSets: []
|
|
712
|
-
}),
|
|
894
|
+
}), qt = (e) => ({
|
|
713
895
|
version: 1.1,
|
|
714
896
|
properties: e.components.flatMap(
|
|
715
|
-
(t) => t.styles.map((
|
|
716
|
-
name:
|
|
717
|
-
description:
|
|
897
|
+
(t) => t.styles.map((r) => ({
|
|
898
|
+
name: r.name,
|
|
899
|
+
description: r.docs
|
|
718
900
|
}))
|
|
719
901
|
)
|
|
720
|
-
}),
|
|
721
|
-
const t = { value: "2023", pattern: "yyyy" },
|
|
722
|
-
return
|
|
723
|
-
},
|
|
724
|
-
const
|
|
902
|
+
}), Bt = (e) => {
|
|
903
|
+
const t = { value: "2023", pattern: "yyyy" }, r = { value: "12", pattern: "mm" }, s = { value: "24", pattern: "dd" };
|
|
904
|
+
return Et([t.value, r.value, s.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(r.value, r.pattern).replace(s.value, s.pattern);
|
|
905
|
+
}, Ht = (e) => e.toISOString().split("T")[0], _t = (e, t, r) => {
|
|
906
|
+
const s = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(s == null ? void 0 : s.lang), i = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || r, o = i.split("-").shift();
|
|
725
907
|
return Object.keys(t).length === 0 ? {
|
|
726
908
|
locale: i,
|
|
727
|
-
messages: { lang:
|
|
909
|
+
messages: { lang: r }
|
|
728
910
|
} : {
|
|
729
911
|
locale: i,
|
|
730
|
-
messages: t[o] || t[
|
|
912
|
+
messages: t[o] || t[r] || { lang: r }
|
|
731
913
|
};
|
|
732
|
-
},
|
|
914
|
+
}, Pt = (e, t, r) => new Intl.NumberFormat(t, { style: "currency", currency: r }).format(e), Gt = (e, t, r = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: r }).format(Number(e)), Wt = (e, t, r = 0) => new Intl.NumberFormat(t, {
|
|
733
915
|
style: "percent",
|
|
734
|
-
minimumFractionDigits:
|
|
735
|
-
maximumFractionDigits:
|
|
736
|
-
}).format(e),
|
|
916
|
+
minimumFractionDigits: r,
|
|
917
|
+
maximumFractionDigits: r
|
|
918
|
+
}).format(e), Xt = (e, t, r, s = "short", n = 0) => new Intl.NumberFormat(t, {
|
|
737
919
|
style: "unit",
|
|
738
|
-
unit:
|
|
739
|
-
unitDisplay:
|
|
920
|
+
unit: r,
|
|
921
|
+
unitDisplay: s,
|
|
740
922
|
minimumFractionDigits: n,
|
|
741
923
|
maximumFractionDigits: n
|
|
742
|
-
}).format(e),
|
|
743
|
-
class
|
|
924
|
+
}).format(e), wt = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, Et = (e, t, r) => typeof e != "string" || e === "" || !wt.test(e) ? "" : new Intl.DateTimeFormat(t, r).format(new Date(e)), Jt = (e, t) => (r) => _t(r, e, t), Yt = ({ disconnect: e, observe: t, takeRecords: r }) => {
|
|
925
|
+
class s {
|
|
744
926
|
constructor(i) {
|
|
745
927
|
/**
|
|
746
928
|
*
|
|
747
929
|
*/
|
|
748
|
-
|
|
930
|
+
d(this, "disconnect", e);
|
|
749
931
|
/**
|
|
750
932
|
*
|
|
751
933
|
*/
|
|
752
|
-
|
|
934
|
+
d(this, "observe", t);
|
|
753
935
|
/**
|
|
754
936
|
*
|
|
755
937
|
*/
|
|
756
|
-
|
|
938
|
+
d(this, "takeRecords", r);
|
|
757
939
|
/**
|
|
758
940
|
*
|
|
759
941
|
*/
|
|
760
|
-
|
|
942
|
+
d(this, "cb");
|
|
761
943
|
this.cb = i;
|
|
762
944
|
}
|
|
763
945
|
}
|
|
@@ -765,51 +947,51 @@ Type: \`${e.type}\``, lt = (e, t, s, r) => ({
|
|
|
765
947
|
Object.defineProperty(n, "MutationObserver", {
|
|
766
948
|
writable: !0,
|
|
767
949
|
configurable: !0,
|
|
768
|
-
value:
|
|
950
|
+
value: s
|
|
769
951
|
});
|
|
770
|
-
}),
|
|
771
|
-
},
|
|
772
|
-
class
|
|
952
|
+
}), s;
|
|
953
|
+
}, Kt = ({ disconnect: e, observe: t }) => {
|
|
954
|
+
class r {
|
|
773
955
|
constructor(n) {
|
|
774
956
|
/**
|
|
775
957
|
*
|
|
776
958
|
*/
|
|
777
|
-
|
|
959
|
+
d(this, "disconnect", e);
|
|
778
960
|
/**
|
|
779
961
|
*
|
|
780
962
|
*/
|
|
781
|
-
|
|
963
|
+
d(this, "observe", t);
|
|
782
964
|
/**
|
|
783
965
|
*
|
|
784
966
|
*/
|
|
785
|
-
|
|
967
|
+
d(this, "unobserve");
|
|
786
968
|
/**
|
|
787
969
|
*
|
|
788
970
|
*/
|
|
789
|
-
|
|
971
|
+
d(this, "cb");
|
|
790
972
|
this.cb = n;
|
|
791
973
|
}
|
|
792
974
|
}
|
|
793
|
-
return [window, global].forEach((
|
|
794
|
-
Object.defineProperty(
|
|
975
|
+
return [window, global].forEach((s) => {
|
|
976
|
+
Object.defineProperty(s, "ResizeObserver", {
|
|
795
977
|
writable: !0,
|
|
796
978
|
configurable: !0,
|
|
797
|
-
value:
|
|
979
|
+
value: r
|
|
798
980
|
});
|
|
799
|
-
}),
|
|
981
|
+
}), r;
|
|
800
982
|
};
|
|
801
|
-
class
|
|
983
|
+
class St extends Event {
|
|
802
984
|
constructor() {
|
|
803
985
|
super(...arguments);
|
|
804
986
|
/**
|
|
805
987
|
*
|
|
806
988
|
*/
|
|
807
|
-
|
|
989
|
+
d(this, "detail");
|
|
808
990
|
}
|
|
809
991
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
810
992
|
}
|
|
811
|
-
const
|
|
812
|
-
class e extends
|
|
993
|
+
const Qt = () => {
|
|
994
|
+
class e extends St {
|
|
813
995
|
}
|
|
814
996
|
return [window, global].forEach((t) => {
|
|
815
997
|
Object.defineProperty(t, "SubmitEvent", {
|
|
@@ -818,10 +1000,10 @@ const mt = () => {
|
|
|
818
1000
|
value: e
|
|
819
1001
|
});
|
|
820
1002
|
}), e;
|
|
821
|
-
},
|
|
822
|
-
const t = (
|
|
823
|
-
return [window, global].forEach((
|
|
824
|
-
Object.defineProperty(
|
|
1003
|
+
}, Vt = (e) => {
|
|
1004
|
+
const t = (r) => (setTimeout(r, 1), e(), 0);
|
|
1005
|
+
return [window, global].forEach((r) => {
|
|
1006
|
+
Object.defineProperty(r, "requestAnimationFrame", {
|
|
825
1007
|
writable: !0,
|
|
826
1008
|
configurable: !0,
|
|
827
1009
|
value: t
|
|
@@ -829,39 +1011,39 @@ const mt = () => {
|
|
|
829
1011
|
}), t;
|
|
830
1012
|
};
|
|
831
1013
|
export {
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
1014
|
+
kt as ClassList,
|
|
1015
|
+
Ut as StorybookPreview,
|
|
1016
|
+
At as allItemsAreString,
|
|
1017
|
+
Lt as cleanString,
|
|
1018
|
+
xt as createID,
|
|
1019
|
+
wt as dateRegExp,
|
|
1020
|
+
Ht as dateToString,
|
|
1021
|
+
Jt as defineLocales,
|
|
1022
|
+
Ft as filterArgs,
|
|
1023
|
+
jt as focusableElements,
|
|
1024
|
+
Bt as getLocaleDatePattern,
|
|
1025
|
+
ge as getParentWindows,
|
|
1026
|
+
Ct as getStoryHTML,
|
|
1027
|
+
Z as getStorybookUrl,
|
|
1028
|
+
Rt as getWindows,
|
|
1029
|
+
Tt as isTagName,
|
|
1030
|
+
Nt as isValidNumber,
|
|
1031
|
+
Le as isValidString,
|
|
1032
|
+
Ot as isValideID,
|
|
1033
|
+
Pt as localeCurrency,
|
|
1034
|
+
Et as localeDate,
|
|
1035
|
+
Gt as localeNumber,
|
|
1036
|
+
Wt as localePercent,
|
|
1037
|
+
Xt as localeUnit,
|
|
1038
|
+
Mt as nextTick,
|
|
1039
|
+
Vt as setUpRequestAnimationFrameMock,
|
|
1040
|
+
Yt as setupMutationObserverMock,
|
|
1041
|
+
Kt as setupResizeObserverMock,
|
|
1042
|
+
Qt as setupSubmitEventMock,
|
|
1043
|
+
It as stencilWrapper,
|
|
1044
|
+
zt as toString,
|
|
1045
|
+
qt as vsCodeCssGenerator,
|
|
1046
|
+
Zt as vsCodeGenerator,
|
|
1047
|
+
Dt as webTypesGenerator
|
|
866
1048
|
};
|
|
867
1049
|
//# sourceMappingURL=index.es.js.map
|