@mgdis/stencil-helpers 3.2.3 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +684 -650
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +13 -13
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
package/dist/index.es.js
CHANGED
|
@@ -1,213 +1,214 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var $ = (e, t, r) => Qe(e, typeof t != "symbol" ? t + "" : t, r), ge = (e, t, r) => t.has(e) || pe("Cannot " + r);
|
|
7
|
-
var v = (e, t, r) => (ge(e, t, "read from private field"), r ? r.call(e) : t.get(e)), N = (e, t, r) => t.has(e) ? pe("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), D = (e, t, r, s) => (ge(e, t, "write to private field"), s ? s.call(e, r) : t.set(e, r), r);
|
|
8
|
-
class ir {
|
|
1
|
+
class Yt {
|
|
2
|
+
/**
|
|
3
|
+
* Available classes
|
|
4
|
+
*/
|
|
5
|
+
classes;
|
|
9
6
|
constructor(t = []) {
|
|
10
|
-
/**
|
|
11
|
-
* Available classes
|
|
12
|
-
*/
|
|
13
|
-
$(this, "classes");
|
|
14
|
-
/**
|
|
15
|
-
* Add class
|
|
16
|
-
* @param className - class name to add
|
|
17
|
-
*/
|
|
18
|
-
$(this, "add", (t) => {
|
|
19
|
-
this.has(t) || this.classes.push(t);
|
|
20
|
-
});
|
|
21
|
-
/**
|
|
22
|
-
* Delete class
|
|
23
|
-
* @param className - class name to delete
|
|
24
|
-
*/
|
|
25
|
-
$(this, "delete", (t) => {
|
|
26
|
-
const r = this.classes.indexOf(t);
|
|
27
|
-
r > -1 && this.classes.splice(r, 1);
|
|
28
|
-
});
|
|
29
|
-
/**
|
|
30
|
-
* Check if class exist in list
|
|
31
|
-
* @param className - class name to check
|
|
32
|
-
* @returns class name is in the list
|
|
33
|
-
*/
|
|
34
|
-
$(this, "has", (t) => this.classes.includes(t));
|
|
35
|
-
/**
|
|
36
|
-
* Join classes seperated by spaces
|
|
37
|
-
* @returns joined values
|
|
38
|
-
*/
|
|
39
|
-
$(this, "join", () => this.classes.join(" "));
|
|
40
7
|
this.classes = t;
|
|
41
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Add class
|
|
11
|
+
* @param className - class name to add
|
|
12
|
+
*/
|
|
13
|
+
add = (t) => {
|
|
14
|
+
this.has(t) || this.classes.push(t);
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Delete class
|
|
18
|
+
* @param className - class name to delete
|
|
19
|
+
*/
|
|
20
|
+
delete = (t) => {
|
|
21
|
+
const r = this.classes.indexOf(t);
|
|
22
|
+
r > -1 && this.classes.splice(r, 1);
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Check if class exist in list
|
|
26
|
+
* @param className - class name to check
|
|
27
|
+
* @returns class name is in the list
|
|
28
|
+
*/
|
|
29
|
+
has = (t) => this.classes.includes(t);
|
|
30
|
+
/**
|
|
31
|
+
* Join classes seperated by spaces
|
|
32
|
+
* @returns joined values
|
|
33
|
+
*/
|
|
34
|
+
join = () => this.classes.join(" ");
|
|
42
35
|
}
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
if (!Q(e) || typeof t != "string")
|
|
36
|
+
const U = (e) => typeof e == "object" && !Array.isArray(e) && e !== null, qe = (e, t, r) => {
|
|
37
|
+
if (!U(e) || typeof t != "string")
|
|
46
38
|
return r;
|
|
47
|
-
const [n, ...i] = t.split(
|
|
48
|
-
return i.length ?
|
|
49
|
-
},
|
|
39
|
+
const [n, ...i] = t.split(".");
|
|
40
|
+
return i.length ? qe(e[n], i.join("."), r) : e[n] ?? r;
|
|
41
|
+
}, Qt = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Ge = (e) => typeof e == "string" && e.trim() !== "", Vt = (e) => typeof e == "object" ? JSON.stringify(e) : String(e), er = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, Je = (e) => e.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, r) => (r > 0 ? "-" : "") + t.toLowerCase()).replace(/[^a-z0-9-]+/g, "-").replace(/--+/g, "-").replace(/(?:^-)|(?:-$)/g, ""), tr = (e = "", t = 10) => {
|
|
50
42
|
const r = new Uint8Array(t);
|
|
51
43
|
crypto.getRandomValues(r);
|
|
52
44
|
const s = Array.from(r).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, t);
|
|
53
45
|
return e !== "" ? `${e}-${s}` : s;
|
|
54
|
-
},
|
|
46
|
+
}, rr = (e) => Ge(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null, sr = (e) => {
|
|
55
47
|
let t;
|
|
56
|
-
return typeof e == "string" ? t = e : e && typeof e == "object" && (
|
|
57
|
-
},
|
|
48
|
+
return typeof e == "string" ? t = e : e && typeof e == "object" && (U(e) || Array.isArray(e)) ? t = JSON.stringify(e) : e != null && typeof e != "boolean" && typeof e != "object" && (t = String(e)), t && Je(t);
|
|
49
|
+
}, nr = async (e) => {
|
|
58
50
|
if (e)
|
|
59
51
|
return e();
|
|
60
|
-
},
|
|
52
|
+
}, ir = {
|
|
61
53
|
FIRST: "first",
|
|
62
54
|
NEXT: "next",
|
|
63
55
|
PREVIOUS: "previous",
|
|
64
56
|
LAST: "last"
|
|
65
|
-
},
|
|
66
|
-
class
|
|
57
|
+
}, $e = 10;
|
|
58
|
+
class Ke {
|
|
59
|
+
/**
|
|
60
|
+
* Define items
|
|
61
|
+
*/
|
|
62
|
+
items = [];
|
|
63
|
+
/**
|
|
64
|
+
* Define total
|
|
65
|
+
*/
|
|
66
|
+
total;
|
|
67
|
+
/**
|
|
68
|
+
* Define top
|
|
69
|
+
*/
|
|
70
|
+
top = $e;
|
|
71
|
+
/**
|
|
72
|
+
* Define next
|
|
73
|
+
*/
|
|
74
|
+
next;
|
|
75
|
+
/**
|
|
76
|
+
* Define base index
|
|
77
|
+
*/
|
|
78
|
+
baseIndex = 1;
|
|
67
79
|
constructor(t) {
|
|
68
|
-
|
|
69
|
-
* Define items
|
|
70
|
-
*/
|
|
71
|
-
$(this, "items", []);
|
|
72
|
-
/**
|
|
73
|
-
* Define total
|
|
74
|
-
*/
|
|
75
|
-
$(this, "total");
|
|
76
|
-
/**
|
|
77
|
-
* Define top
|
|
78
|
-
*/
|
|
79
|
-
$(this, "top", xe);
|
|
80
|
-
/**
|
|
81
|
-
* Define next
|
|
82
|
-
*/
|
|
83
|
-
$(this, "next");
|
|
84
|
-
/**
|
|
85
|
-
* Define base index
|
|
86
|
-
*/
|
|
87
|
-
$(this, "baseIndex", 1);
|
|
88
|
-
/**
|
|
89
|
-
* Get index of items from cursor
|
|
90
|
-
* @param cursor - cursor to find
|
|
91
|
-
* @param oldItem - previous item
|
|
92
|
-
* @returns item index
|
|
93
|
-
*/
|
|
94
|
-
$(this, "getIndexFromCursor", (t = "first", r) => {
|
|
95
|
-
if (!Array.isArray(this.items) || !this.items.length)
|
|
96
|
-
return null;
|
|
97
|
-
const n = this.items.length - this.baseIndex;
|
|
98
|
-
let i, o = 0;
|
|
99
|
-
if (["previous", "next"].includes(t) && r) {
|
|
100
|
-
const c = this.items.findIndex((l) => JSON.stringify(l) === JSON.stringify(r));
|
|
101
|
-
if (c === -1)
|
|
102
|
-
return 0;
|
|
103
|
-
o = c;
|
|
104
|
-
}
|
|
105
|
-
return t === "first" ? i = 0 : t === "last" ? i = n : t === "previous" ? i = JSON.stringify(this.items[o]) === JSON.stringify(this.items[0]) ? n : o - this.baseIndex : t === "next" ? i = JSON.stringify(this.items[o]) === JSON.stringify(this.items[n]) ? 0 : o + this.baseIndex : i = 0, i;
|
|
106
|
-
});
|
|
107
|
-
if (Q(t))
|
|
80
|
+
if (U(t))
|
|
108
81
|
Array.isArray(t.items) && (this.items = t.items), typeof t.top == "number" && (this.top = t.top), this.total = typeof t.total == "number" ? t.total : this.items.length, this.next = t.next;
|
|
109
82
|
else
|
|
110
83
|
throw new Error("Page - init must match IPage type.");
|
|
111
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Get index of items from cursor
|
|
87
|
+
* @param cursor - cursor to find
|
|
88
|
+
* @param oldItem - previous item
|
|
89
|
+
* @returns item index
|
|
90
|
+
*/
|
|
91
|
+
getIndexFromCursor = (t = "first", r) => {
|
|
92
|
+
if (!Array.isArray(this.items) || !this.items.length)
|
|
93
|
+
return null;
|
|
94
|
+
const n = this.items.length - this.baseIndex;
|
|
95
|
+
let i, o = 0;
|
|
96
|
+
if (["previous", "next"].includes(t) && r) {
|
|
97
|
+
const c = this.items.findIndex((l) => JSON.stringify(l) === JSON.stringify(r));
|
|
98
|
+
if (c === -1)
|
|
99
|
+
return 0;
|
|
100
|
+
o = c;
|
|
101
|
+
}
|
|
102
|
+
return t === "first" ? i = 0 : t === "last" ? i = n : t === "previous" ? i = JSON.stringify(this.items[o]) === JSON.stringify(this.items[0]) ? n : o - this.baseIndex : t === "next" ? i = JSON.stringify(this.items[o]) === JSON.stringify(this.items[n]) ? 0 : o + this.baseIndex : i = 0, i;
|
|
103
|
+
};
|
|
112
104
|
}
|
|
113
|
-
|
|
114
|
-
|
|
105
|
+
class or {
|
|
106
|
+
/**
|
|
107
|
+
* Define paginated items
|
|
108
|
+
*/
|
|
109
|
+
items = [];
|
|
110
|
+
/* Privates */
|
|
111
|
+
#e = $e;
|
|
112
|
+
#t;
|
|
113
|
+
#r;
|
|
115
114
|
constructor(t, r) {
|
|
116
|
-
|
|
117
|
-
* Define paginated items
|
|
118
|
-
*/
|
|
119
|
-
$(this, "items", []);
|
|
120
|
-
/* Privates */
|
|
121
|
-
N(this, O, xe);
|
|
122
|
-
N(this, I);
|
|
123
|
-
N(this, U);
|
|
124
|
-
/**
|
|
125
|
-
* Get page
|
|
126
|
-
* @param offset - pagiantion offset
|
|
127
|
-
* @param filter - filter methode
|
|
128
|
-
* @returns formated page
|
|
129
|
-
*/
|
|
130
|
-
$(this, "getPage", (t = 0, r) => {
|
|
131
|
-
const s = typeof r == "function" ? this.items.filter(r) : this.items;
|
|
132
|
-
let n;
|
|
133
|
-
return v(this, I) ? n = v(this, I) : s.length > t + v(this, O) && (n = () => this.getPage(t + v(this, O), r)), new rt({
|
|
134
|
-
items: s.slice(t, t + v(this, O)),
|
|
135
|
-
total: v(this, U),
|
|
136
|
-
top: v(this, O),
|
|
137
|
-
next: n
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
Array.isArray(t) && (this.items = t), r && (["string", "function"].includes(typeof r.next) || Q(r.next) && URL.canParse(r.next)) && D(this, I, r.next), typeof (r == null ? void 0 : r.top) == "number" && D(this, O, r.top), typeof (r == null ? void 0 : r.total) == "number" && D(this, U, r.total);
|
|
115
|
+
Array.isArray(t) && (this.items = t), r && (["string", "function"].includes(typeof r.next) || U(r.next) && URL.canParse(r.next)) && (this.#t = r.next), typeof r?.top == "number" && (this.#e = r.top), typeof r?.total == "number" && (this.#r = r.total);
|
|
141
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Get page
|
|
119
|
+
* @param offset - pagiantion offset
|
|
120
|
+
* @param filter - filter methode
|
|
121
|
+
* @returns formated page
|
|
122
|
+
*/
|
|
123
|
+
getPage = (t = 0, r) => {
|
|
124
|
+
const s = typeof r == "function" ? this.items.filter(r) : this.items;
|
|
125
|
+
let n;
|
|
126
|
+
return this.#t ? n = this.#t : s.length > t + this.#e && (n = () => this.getPage(t + this.#e, r)), new Ke({
|
|
127
|
+
items: s.slice(t, t + this.#e),
|
|
128
|
+
total: this.#r,
|
|
129
|
+
top: this.#e,
|
|
130
|
+
next: n
|
|
131
|
+
});
|
|
132
|
+
};
|
|
142
133
|
}
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
const t = Ee(e), r = Se(e);
|
|
134
|
+
const ar = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, lr = (e) => e.toISOString().split("T")[0], cr = (e, t) => t.includes(e?.tagName.toLowerCase()), fr = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', ur = (e) => typeof e == "number" && !Number.isNaN(e), pr = (e) => {
|
|
135
|
+
const t = he(e), r = _e(e);
|
|
146
136
|
return [e, ...t, ...r];
|
|
147
|
-
},
|
|
137
|
+
}, he = (e, t = []) => {
|
|
148
138
|
if (e.self !== e.top)
|
|
149
139
|
try {
|
|
150
140
|
const r = e.parent;
|
|
151
|
-
return r ? (t.push(r),
|
|
141
|
+
return r ? (t.push(r), he(r, t)) : t;
|
|
152
142
|
} catch (r) {
|
|
153
143
|
return console.error("Different hosts between iframes:", r), t;
|
|
154
144
|
}
|
|
155
145
|
return t;
|
|
156
|
-
},
|
|
146
|
+
}, _e = (e, t = []) => {
|
|
157
147
|
if (e.frames.length > 0)
|
|
158
148
|
for (const r of Array.from(e.frames))
|
|
159
|
-
t.push(r),
|
|
149
|
+
t.push(r), _e(r, t);
|
|
160
150
|
return t;
|
|
161
151
|
};
|
|
162
|
-
var
|
|
152
|
+
var Xe = Object.defineProperty, Ye = (e, t) => {
|
|
163
153
|
for (var r in t)
|
|
164
|
-
|
|
165
|
-
},
|
|
166
|
-
|
|
167
|
-
err: () =>
|
|
168
|
-
map: () =>
|
|
169
|
-
ok: () =>
|
|
170
|
-
unwrap: () =>
|
|
171
|
-
unwrapErr: () =>
|
|
154
|
+
Xe(e, r, { get: t[r], enumerable: !0 });
|
|
155
|
+
}, Qe = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Ve = {};
|
|
156
|
+
Ye(Ve, {
|
|
157
|
+
err: () => ye,
|
|
158
|
+
map: () => et,
|
|
159
|
+
ok: () => B,
|
|
160
|
+
unwrap: () => tt,
|
|
161
|
+
unwrapErr: () => rt
|
|
172
162
|
});
|
|
173
|
-
var
|
|
163
|
+
var B = (e) => ({
|
|
174
164
|
isOk: !0,
|
|
175
165
|
isErr: !1,
|
|
176
166
|
value: e
|
|
177
|
-
}),
|
|
167
|
+
}), ye = (e) => ({
|
|
178
168
|
isOk: !1,
|
|
179
169
|
isErr: !0,
|
|
180
170
|
value: e
|
|
181
171
|
});
|
|
182
|
-
function
|
|
172
|
+
function et(e, t) {
|
|
183
173
|
if (e.isOk) {
|
|
184
174
|
const r = t(e.value);
|
|
185
|
-
return r instanceof Promise ? r.then((s) =>
|
|
175
|
+
return r instanceof Promise ? r.then((s) => B(s)) : B(r);
|
|
186
176
|
}
|
|
187
177
|
if (e.isErr) {
|
|
188
178
|
const r = e.value;
|
|
189
|
-
return
|
|
179
|
+
return ye(r);
|
|
190
180
|
}
|
|
191
181
|
throw "should never get here";
|
|
192
182
|
}
|
|
193
|
-
var
|
|
183
|
+
var tt = (e) => {
|
|
194
184
|
if (e.isOk)
|
|
195
185
|
return e.value;
|
|
196
186
|
throw e.value;
|
|
197
|
-
},
|
|
187
|
+
}, rt = (e) => {
|
|
198
188
|
if (e.isErr)
|
|
199
189
|
return e.value;
|
|
200
190
|
throw e.value;
|
|
191
|
+
}, Y = (e) => {
|
|
192
|
+
const t = Qe(e);
|
|
193
|
+
return new RegExp(
|
|
194
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
195
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
196
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,
|
|
197
|
+
"g"
|
|
198
|
+
);
|
|
201
199
|
};
|
|
202
|
-
|
|
200
|
+
Y("::slotted");
|
|
201
|
+
Y(":host");
|
|
202
|
+
Y(":host-context");
|
|
203
|
+
const be = (e, t) => {
|
|
203
204
|
if (!t)
|
|
204
205
|
return;
|
|
205
206
|
const r = t.split("/");
|
|
206
207
|
return `${e}${r.slice(2, r.length - 1).join("-")}--docs`;
|
|
207
|
-
},
|
|
208
|
+
}, st = (e, t) => {
|
|
208
209
|
if (t)
|
|
209
210
|
return `${e}${t}`;
|
|
210
|
-
},
|
|
211
|
+
}, me = (e) => {
|
|
211
212
|
let t = e.overview ? `${e.overview}
|
|
212
213
|
|
|
213
214
|
` : "";
|
|
@@ -233,9 +234,9 @@ const Ae = (e, t) => {
|
|
|
233
234
|
`, t += e.slots.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
|
|
234
235
|
`).join(""), t += `
|
|
235
236
|
`), t;
|
|
236
|
-
},
|
|
237
|
+
}, q = (e) => `${e.docs}
|
|
237
238
|
|
|
238
|
-
Type: \`${e.type}\``,
|
|
239
|
+
Type: \`${e.type}\``, gr = (e, t, r, s) => ({
|
|
239
240
|
$schema: "https://json.schemastore.org/web-types",
|
|
240
241
|
name: e,
|
|
241
242
|
version: t,
|
|
@@ -243,14 +244,14 @@ Type: \`${e.type}\``, wr = (e, t, r, s) => ({
|
|
|
243
244
|
contributions: {
|
|
244
245
|
html: {
|
|
245
246
|
elements: r.components.map((n) => {
|
|
246
|
-
const i =
|
|
247
|
+
const i = be(s, n.filePath);
|
|
247
248
|
return {
|
|
248
249
|
name: n.tag,
|
|
249
|
-
description:
|
|
250
|
+
description: me(n),
|
|
250
251
|
"doc-url": i,
|
|
251
252
|
attributes: n.props.filter((o) => o.attr).map((o) => ({
|
|
252
253
|
name: o.attr,
|
|
253
|
-
description:
|
|
254
|
+
description: q(o),
|
|
254
255
|
"doc-url": i,
|
|
255
256
|
value: {
|
|
256
257
|
type: o.type,
|
|
@@ -261,7 +262,7 @@ Type: \`${e.type}\``, wr = (e, t, r, s) => ({
|
|
|
261
262
|
js: {
|
|
262
263
|
properties: n.props.map((o) => ({
|
|
263
264
|
name: o.name,
|
|
264
|
-
description:
|
|
265
|
+
description: q(o),
|
|
265
266
|
"doc-url": i,
|
|
266
267
|
value: {
|
|
267
268
|
type: o.type,
|
|
@@ -284,23 +285,23 @@ Type: \`${e.type}\``, wr = (e, t, r, s) => ({
|
|
|
284
285
|
})
|
|
285
286
|
}
|
|
286
287
|
}
|
|
287
|
-
}),
|
|
288
|
-
{ name: "Storybook", url:
|
|
289
|
-
{ name: "Sources", url:
|
|
290
|
-
],
|
|
288
|
+
}), nt = (e, t, r) => [
|
|
289
|
+
{ name: "Storybook", url: be(e, r) },
|
|
290
|
+
{ name: "Sources", url: st(t, r) }
|
|
291
|
+
], it = (e) => {
|
|
291
292
|
if (!e.values.some(({ value: t }) => t === void 0))
|
|
292
293
|
return e.values.map(({ value: t }) => ({ name: t }));
|
|
293
|
-
},
|
|
294
|
+
}, dr = (e, t, r) => ({
|
|
294
295
|
version: 1.1,
|
|
295
296
|
tags: e.components.map((s) => {
|
|
296
|
-
const n =
|
|
297
|
+
const n = nt(t, r, s.filePath);
|
|
297
298
|
return {
|
|
298
299
|
name: s.tag,
|
|
299
|
-
description:
|
|
300
|
+
description: me(s),
|
|
300
301
|
attributes: s.props.map((i) => ({
|
|
301
302
|
name: i.attr ?? i.name,
|
|
302
|
-
description:
|
|
303
|
-
values:
|
|
303
|
+
description: q(i),
|
|
304
|
+
values: it(i),
|
|
304
305
|
references: n
|
|
305
306
|
})),
|
|
306
307
|
references: n
|
|
@@ -308,17 +309,17 @@ Type: \`${e.type}\``, wr = (e, t, r, s) => ({
|
|
|
308
309
|
}),
|
|
309
310
|
globalAttributes: [],
|
|
310
311
|
valueSets: []
|
|
311
|
-
}),
|
|
312
|
+
}), $r = (e) => ({
|
|
312
313
|
version: 1.1,
|
|
313
314
|
properties: e.components.flatMap((t) => t.styles.map((r) => ({
|
|
314
315
|
name: r.name,
|
|
315
316
|
description: r.docs
|
|
316
317
|
})))
|
|
317
|
-
}),
|
|
318
|
+
}), ot = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, hr = (e) => {
|
|
318
319
|
const t = { value: "2023", pattern: "yyyy" }, r = { value: "12", pattern: "mm" }, s = { value: "24", pattern: "dd" };
|
|
319
|
-
return
|
|
320
|
-
},
|
|
321
|
-
const s = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(s
|
|
320
|
+
return lt([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);
|
|
321
|
+
}, at = (e, t, r) => {
|
|
322
|
+
const s = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(s?.lang), i = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || r, o = i.split("-").shift();
|
|
322
323
|
return Object.keys(t).length === 0 ? {
|
|
323
324
|
locale: i,
|
|
324
325
|
messages: { lang: r }
|
|
@@ -326,26 +327,26 @@ Type: \`${e.type}\``, wr = (e, t, r, s) => ({
|
|
|
326
327
|
locale: i,
|
|
327
328
|
messages: t[o] ?? t[r] ?? { lang: r }
|
|
328
329
|
};
|
|
329
|
-
},
|
|
330
|
+
}, _r = (e, t, r) => new Intl.NumberFormat(t, { style: "currency", currency: r }).format(e), yr = (e, t, r = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: r }).format(Number(e)), br = (e, t, r = 0) => new Intl.NumberFormat(t, {
|
|
330
331
|
style: "percent",
|
|
331
332
|
minimumFractionDigits: r,
|
|
332
333
|
maximumFractionDigits: r
|
|
333
|
-
}).format(e),
|
|
334
|
+
}).format(e), mr = (e, t, r, s = "short", n = 0) => new Intl.NumberFormat(t, {
|
|
334
335
|
style: "unit",
|
|
335
336
|
unit: r,
|
|
336
337
|
unitDisplay: s,
|
|
337
338
|
minimumFractionDigits: n,
|
|
338
339
|
maximumFractionDigits: n
|
|
339
|
-
}).format(e),
|
|
340
|
-
var
|
|
340
|
+
}).format(e), lt = (e, t, r) => typeof e != "string" || e === "" || !ot.test(e) ? "" : new Intl.DateTimeFormat(t, r).format(new Date(e)), vr = (e, t) => (r) => at(r, e, t);
|
|
341
|
+
var Z = {
|
|
341
342
|
updatable: !0,
|
|
342
343
|
slotRelocation: !0,
|
|
343
344
|
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
|
|
344
345
|
experimentalSlotFixes: !1
|
|
345
|
-
},
|
|
346
|
+
}, ct = Object.defineProperty, ft = (e, t) => {
|
|
346
347
|
for (var r in t)
|
|
347
|
-
|
|
348
|
-
},
|
|
348
|
+
ct(e, r, { get: t[r], enumerable: !0 });
|
|
349
|
+
}, ut = "http://www.w3.org/2000/svg", pt = "http://www.w3.org/1999/xhtml", ie = (e, t) => t in e, oe = "http://www.w3.org/1999/xlink", S = typeof window < "u" ? window : {}, j = {
|
|
349
350
|
$flags$: 0,
|
|
350
351
|
$resourcesUrl$: "",
|
|
351
352
|
jmp: (e) => e(),
|
|
@@ -353,53 +354,53 @@ var V = {
|
|
|
353
354
|
ael: (e, t, r, s) => e.addEventListener(t, r, s),
|
|
354
355
|
rel: (e, t, r, s) => e.removeEventListener(t, r, s),
|
|
355
356
|
ce: (e, t) => new CustomEvent(e, t)
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
err: () =>
|
|
359
|
-
map: () =>
|
|
360
|
-
ok: () =>
|
|
361
|
-
unwrap: () =>
|
|
362
|
-
unwrapErr: () =>
|
|
357
|
+
}, gt = (e) => e != null && e !== void 0, ve = (e) => (e = typeof e, e === "object" || e === "function"), dt = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), $t = {};
|
|
358
|
+
ft($t, {
|
|
359
|
+
err: () => we,
|
|
360
|
+
map: () => ht,
|
|
361
|
+
ok: () => G,
|
|
362
|
+
unwrap: () => _t,
|
|
363
|
+
unwrapErr: () => yt
|
|
363
364
|
});
|
|
364
|
-
var
|
|
365
|
+
var G = (e) => ({
|
|
365
366
|
isOk: !0,
|
|
366
367
|
isErr: !1,
|
|
367
368
|
value: e
|
|
368
|
-
}),
|
|
369
|
+
}), we = (e) => ({
|
|
369
370
|
isOk: !1,
|
|
370
371
|
isErr: !0,
|
|
371
372
|
value: e
|
|
372
373
|
});
|
|
373
|
-
function
|
|
374
|
+
function ht(e, t) {
|
|
374
375
|
if (e.isOk) {
|
|
375
376
|
const r = t(e.value);
|
|
376
|
-
return r instanceof Promise ? r.then((s) =>
|
|
377
|
+
return r instanceof Promise ? r.then((s) => G(s)) : G(r);
|
|
377
378
|
}
|
|
378
379
|
if (e.isErr) {
|
|
379
380
|
const r = e.value;
|
|
380
|
-
return
|
|
381
|
+
return we(r);
|
|
381
382
|
}
|
|
382
383
|
throw "should never get here";
|
|
383
384
|
}
|
|
384
|
-
var
|
|
385
|
+
var _t = (e) => {
|
|
385
386
|
if (e.isOk)
|
|
386
387
|
return e.value;
|
|
387
388
|
throw e.value;
|
|
388
|
-
},
|
|
389
|
+
}, yt = (e) => {
|
|
389
390
|
if (e.isErr)
|
|
390
391
|
return e.value;
|
|
391
392
|
throw e.value;
|
|
392
|
-
},
|
|
393
|
-
const t =
|
|
394
|
-
e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" &&
|
|
395
|
-
s.nodeType === 1 && s.tagName === "SLOT-FB" && (
|
|
393
|
+
}, xe = (e) => {
|
|
394
|
+
const t = le(e, "childNodes");
|
|
395
|
+
e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" && Ee(t, e.tagName).forEach((s) => {
|
|
396
|
+
s.nodeType === 1 && s.tagName === "SLOT-FB" && (mt(s, Q(s), !1).length ? s.hidden = !0 : s.hidden = !1);
|
|
396
397
|
});
|
|
397
398
|
let r = 0;
|
|
398
399
|
for (r = 0; r < t.length; r++) {
|
|
399
400
|
const s = t[r];
|
|
400
|
-
s.nodeType === 1 &&
|
|
401
|
+
s.nodeType === 1 && le(s, "childNodes").length && xe(s);
|
|
401
402
|
}
|
|
402
|
-
},
|
|
403
|
+
}, bt = (e) => {
|
|
403
404
|
const t = [];
|
|
404
405
|
for (let r = 0; r < e.length; r++) {
|
|
405
406
|
const s = e[r]["s-nr"] || void 0;
|
|
@@ -407,32 +408,32 @@ var mt = (e) => {
|
|
|
407
408
|
}
|
|
408
409
|
return t;
|
|
409
410
|
};
|
|
410
|
-
function
|
|
411
|
+
function Ee(e, t, r) {
|
|
411
412
|
let s = 0, n = [], i;
|
|
412
413
|
for (; s < e.length; s++)
|
|
413
|
-
i = e[s], i["s-sr"] && (!t || i["s-hn"] === t) && r === void 0 && n.push(i), n = [...n, ...
|
|
414
|
+
i = e[s], i["s-sr"] && (!t || i["s-hn"] === t) && r === void 0 && n.push(i), n = [...n, ...Ee(i.childNodes, t, r)];
|
|
414
415
|
return n;
|
|
415
416
|
}
|
|
416
|
-
var
|
|
417
|
+
var mt = (e, t, r = !0) => {
|
|
417
418
|
const s = [];
|
|
418
419
|
(r && e["s-sr"] || !e["s-sr"]) && s.push(e);
|
|
419
420
|
let n = e;
|
|
420
421
|
for (; n = n.nextSibling; )
|
|
421
|
-
|
|
422
|
+
Q(n) === t && (r || !n["s-sr"]) && s.push(n);
|
|
422
423
|
return s;
|
|
423
|
-
},
|
|
424
|
-
function
|
|
424
|
+
}, ae = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", Q = (e) => typeof e["s-sn"] == "string" ? e["s-sn"] : e.nodeType === 1 && e.getAttribute("slot") || void 0;
|
|
425
|
+
function vt(e) {
|
|
425
426
|
if (e.assignedElements || e.assignedNodes || !e["s-sr"]) return;
|
|
426
427
|
const t = (r) => (function(s) {
|
|
427
428
|
const n = [], i = this["s-sn"];
|
|
428
|
-
s
|
|
429
|
-
Flattening is not supported for Stencil non-shadow slots.
|
|
429
|
+
s?.flatten && console.error(`
|
|
430
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
430
431
|
You can use \`.childNodes\` to nested slot fallback content.
|
|
431
432
|
If you have a particular use case, please open an issue on the Stencil repo.
|
|
432
433
|
`);
|
|
433
434
|
const o = this["s-cr"].parentElement;
|
|
434
|
-
return (o.__childNodes ? o.childNodes :
|
|
435
|
-
i ===
|
|
435
|
+
return (o.__childNodes ? o.childNodes : bt(o.childNodes)).forEach((l) => {
|
|
436
|
+
i === Q(l) && n.push(l);
|
|
436
437
|
}), r ? n.filter(
|
|
437
438
|
(l) => l.nodeType === 1
|
|
438
439
|
/* ElementNode */
|
|
@@ -440,23 +441,23 @@ function Ot(e) {
|
|
|
440
441
|
}).bind(e);
|
|
441
442
|
e.assignedElements = t(!0), e.assignedNodes = t(!1);
|
|
442
443
|
}
|
|
443
|
-
function
|
|
444
|
+
function le(e, t) {
|
|
444
445
|
if ("__" + t in e) {
|
|
445
446
|
const r = e["__" + t];
|
|
446
447
|
return typeof r != "function" ? r : r.bind(e);
|
|
447
448
|
} else
|
|
448
449
|
return typeof e[t] != "function" ? e[t] : e[t].bind(e);
|
|
449
450
|
}
|
|
450
|
-
var
|
|
451
|
+
var wt = (e, t, ...r) => {
|
|
451
452
|
let s = null, n = null, i = null, o = !1, c = !1;
|
|
452
|
-
const l = [],
|
|
453
|
+
const l = [], u = (a) => {
|
|
453
454
|
for (let g = 0; g < a.length; g++)
|
|
454
|
-
s = a[g], Array.isArray(s) ?
|
|
455
|
+
s = a[g], Array.isArray(s) ? u(s) : s != null && typeof s != "boolean" && ((o = !ve(s)) && (s = String(s)), o && c ? l[l.length - 1].$text$ += s : l.push(o ? J(null, s) : s), c = o);
|
|
455
456
|
};
|
|
456
|
-
|
|
457
|
-
const
|
|
458
|
-
return
|
|
459
|
-
},
|
|
457
|
+
u(r);
|
|
458
|
+
const p = J(e, null);
|
|
459
|
+
return p.$attrs$ = t, l.length > 0 && (p.$children$ = l), p.$key$ = n, p.$name$ = i, p;
|
|
460
|
+
}, J = (e, t) => {
|
|
460
461
|
const r = {
|
|
461
462
|
$flags$: 0,
|
|
462
463
|
$tag$: e,
|
|
@@ -465,29 +466,41 @@ var At = (e, t, ...r) => {
|
|
|
465
466
|
$children$: null
|
|
466
467
|
};
|
|
467
468
|
return r.$attrs$ = null, r.$key$ = null, r.$name$ = null, r;
|
|
468
|
-
},
|
|
469
|
+
}, xt = {}, Et = (e) => e && e.$tag$ === xt, V = (e) => {
|
|
470
|
+
const t = dt(e);
|
|
471
|
+
return new RegExp(
|
|
472
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
473
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
474
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,
|
|
475
|
+
"g"
|
|
476
|
+
);
|
|
477
|
+
};
|
|
478
|
+
V("::slotted");
|
|
479
|
+
V(":host");
|
|
480
|
+
V(":host-context");
|
|
481
|
+
var ce = (e, t, r, s, n, i, o) => {
|
|
469
482
|
if (r === s)
|
|
470
483
|
return;
|
|
471
|
-
let c =
|
|
484
|
+
let c = ie(e, t), l = t.toLowerCase();
|
|
472
485
|
if (t === "class") {
|
|
473
|
-
const
|
|
474
|
-
let a =
|
|
475
|
-
|
|
486
|
+
const u = e.classList, p = fe(r);
|
|
487
|
+
let a = fe(s);
|
|
488
|
+
u.remove(...p.filter((g) => g && !a.includes(g))), u.add(...a.filter((g) => g && !p.includes(g)));
|
|
476
489
|
} else if (t === "style") {
|
|
477
|
-
for (const
|
|
478
|
-
(!s || s[
|
|
479
|
-
for (const
|
|
480
|
-
(!r || s[
|
|
490
|
+
for (const u in r)
|
|
491
|
+
(!s || s[u] == null) && (u.includes("-") ? e.style.removeProperty(u) : e.style[u] = "");
|
|
492
|
+
for (const u in s)
|
|
493
|
+
(!r || s[u] !== r[u]) && (u.includes("-") ? e.style.setProperty(u, s[u]) : e.style[u] = s[u]);
|
|
481
494
|
} else if (t !== "key") if (t === "ref")
|
|
482
495
|
s && s(e);
|
|
483
496
|
else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
|
|
484
|
-
if (t[2] === "-" ? t = t.slice(3) :
|
|
485
|
-
const
|
|
486
|
-
t = t.replace(
|
|
497
|
+
if (t[2] === "-" ? t = t.slice(3) : ie(S, l) ? t = l.slice(2) : t = l[2] + t.slice(3), r || s) {
|
|
498
|
+
const u = t.endsWith(Se);
|
|
499
|
+
t = t.replace(Ot, ""), r && j.rel(e, t, r, u), s && j.ael(e, t, s, u);
|
|
487
500
|
}
|
|
488
501
|
} else {
|
|
489
|
-
const
|
|
490
|
-
if ((c ||
|
|
502
|
+
const u = ve(s);
|
|
503
|
+
if ((c || u && s !== null) && !n)
|
|
491
504
|
try {
|
|
492
505
|
if (e.tagName.includes("-"))
|
|
493
506
|
e[t] !== s && (e[t] = s);
|
|
@@ -497,13 +510,13 @@ var At = (e, t, ...r) => {
|
|
|
497
510
|
}
|
|
498
511
|
} catch {
|
|
499
512
|
}
|
|
500
|
-
let
|
|
501
|
-
l !== (l = l.replace(/^xlink\:?/, "")) && (t = l,
|
|
513
|
+
let p = !1;
|
|
514
|
+
l !== (l = l.replace(/^xlink\:?/, "")) && (t = l, p = !0), s == null || s === !1 ? (s !== !1 || e.getAttribute(t) === "") && (p ? e.removeAttributeNS(oe, t) : e.removeAttribute(t)) : (!c || i & 4 || n) && !u && e.nodeType === 1 && (s = s === !0 ? "" : s, p ? e.setAttributeNS(oe, t, s) : e.setAttribute(t, s));
|
|
502
515
|
}
|
|
503
|
-
},
|
|
516
|
+
}, St = /\s/, fe = (e) => (typeof e == "object" && e && "baseVal" in e && (e = e.baseVal), !e || typeof e != "string" ? [] : e.split(St)), Se = "Capture", Ot = new RegExp(Se + "$"), K = (e, t, r, s) => {
|
|
504
517
|
const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, i = e && e.$attrs$ || {}, o = t.$attrs$ || {};
|
|
505
|
-
for (const c of
|
|
506
|
-
c in o ||
|
|
518
|
+
for (const c of ue(Object.keys(i)))
|
|
519
|
+
c in o || ce(
|
|
507
520
|
n,
|
|
508
521
|
c,
|
|
509
522
|
i[c],
|
|
@@ -511,8 +524,8 @@ var At = (e, t, ...r) => {
|
|
|
511
524
|
r,
|
|
512
525
|
t.$flags$
|
|
513
526
|
);
|
|
514
|
-
for (const c of
|
|
515
|
-
|
|
527
|
+
for (const c of ue(Object.keys(o)))
|
|
528
|
+
ce(
|
|
516
529
|
n,
|
|
517
530
|
c,
|
|
518
531
|
i[c],
|
|
@@ -521,7 +534,7 @@ var At = (e, t, ...r) => {
|
|
|
521
534
|
t.$flags$
|
|
522
535
|
);
|
|
523
536
|
};
|
|
524
|
-
function
|
|
537
|
+
function ue(e) {
|
|
525
538
|
return e.includes("ref") ? (
|
|
526
539
|
// we need to sort these to ensure that `'ref'` is the last attr
|
|
527
540
|
[...e.filter((t) => t !== "ref"), "ref"]
|
|
@@ -530,11 +543,11 @@ function ve(e) {
|
|
|
530
543
|
e
|
|
531
544
|
);
|
|
532
545
|
}
|
|
533
|
-
var
|
|
546
|
+
var F, C, T, X = !1, P = !1, ee = !1, y = !1, W = (e, t, r) => {
|
|
534
547
|
var s;
|
|
535
548
|
const n = t.$children$[r];
|
|
536
549
|
let i = 0, o, c, l;
|
|
537
|
-
if (
|
|
550
|
+
if (X || (ee = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
|
|
538
551
|
// slot element has fallback content
|
|
539
552
|
// still create an element that "mocks" the slot element
|
|
540
553
|
2
|
|
@@ -544,91 +557,91 @@ var H, J, C, oe = !1, K = !1, ce = !1, y = !1, X = (e, t, r) => {
|
|
|
544
557
|
// where actual slot content should sit next to
|
|
545
558
|
1
|
|
546
559
|
))), n.$text$ !== null)
|
|
547
|
-
o = n.$elm$ =
|
|
560
|
+
o = n.$elm$ = S.document.createTextNode(n.$text$);
|
|
548
561
|
else if (n.$flags$ & 1)
|
|
549
|
-
o = n.$elm$ =
|
|
562
|
+
o = n.$elm$ = S.document.createTextNode(""), K(null, n, y);
|
|
550
563
|
else {
|
|
551
|
-
if (y || (y = n.$tag$ === "svg"), !
|
|
564
|
+
if (y || (y = n.$tag$ === "svg"), !S.document)
|
|
552
565
|
throw new Error(
|
|
553
566
|
"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."
|
|
554
567
|
);
|
|
555
|
-
if (o = n.$elm$ =
|
|
556
|
-
y ?
|
|
557
|
-
!
|
|
558
|
-
), y && n.$tag$ === "foreignObject" && (y = !1),
|
|
568
|
+
if (o = n.$elm$ = S.document.createElementNS(
|
|
569
|
+
y ? ut : pt,
|
|
570
|
+
!X && Z.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
|
|
571
|
+
), y && n.$tag$ === "foreignObject" && (y = !1), K(null, n, y), gt(F) && o["s-si"] !== F && o.classList.add(o["s-si"] = F), n.$children$)
|
|
559
572
|
for (i = 0; i < n.$children$.length; ++i)
|
|
560
|
-
c =
|
|
573
|
+
c = W(e, n, i), c && o.appendChild(c);
|
|
561
574
|
n.$tag$ === "svg" ? y = !1 : o.tagName === "foreignObject" && (y = !0);
|
|
562
575
|
}
|
|
563
|
-
return o["s-hn"] =
|
|
564
|
-
},
|
|
565
|
-
|
|
576
|
+
return o["s-hn"] = T, 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, vt(o), l = e && e.$children$ && e.$children$[r], l && l.$tag$ === n.$tag$ && e.$elm$ && N(e.$elm$, !1), Re(C, o, t.$elm$, e?.$elm$)), o;
|
|
577
|
+
}, N = (e, t) => {
|
|
578
|
+
j.$flags$ |= 1;
|
|
566
579
|
const r = Array.from(e.__childNodes || e.childNodes);
|
|
567
|
-
e["s-sr"] &&
|
|
580
|
+
e["s-sr"] && Z.experimentalSlotFixes;
|
|
568
581
|
for (let s = r.length - 1; s >= 0; s--) {
|
|
569
582
|
const n = r[s];
|
|
570
|
-
n["s-hn"] !==
|
|
583
|
+
n["s-hn"] !== T && n["s-ol"] && (O(z(n).parentNode, n, z(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, ee = !0), t && N(n, t);
|
|
571
584
|
}
|
|
572
|
-
|
|
573
|
-
},
|
|
585
|
+
j.$flags$ &= -2;
|
|
586
|
+
}, Oe = (e, t, r, s, n, i) => {
|
|
574
587
|
let o = e["s-cr"] && e["s-cr"].parentNode || e, c;
|
|
575
|
-
for (o.shadowRoot && o.tagName ===
|
|
576
|
-
s[n] && (c =
|
|
577
|
-
},
|
|
588
|
+
for (o.shadowRoot && o.tagName === T && (o = o.shadowRoot); n <= i; ++n)
|
|
589
|
+
s[n] && (c = W(null, r, n), c && (s[n].$elm$ = c, O(o, c, z(t))));
|
|
590
|
+
}, Ae = (e, t, r) => {
|
|
578
591
|
for (let s = t; s <= r; ++s) {
|
|
579
592
|
const n = e[s];
|
|
580
593
|
if (n) {
|
|
581
594
|
const i = n.$elm$;
|
|
582
|
-
|
|
595
|
+
je(n), i && (P = !0, i["s-ol"] ? i["s-ol"].remove() : N(i, !0), i.remove());
|
|
583
596
|
}
|
|
584
597
|
}
|
|
585
|
-
},
|
|
586
|
-
let i = 0, o = 0, c = 0, l = 0,
|
|
587
|
-
for (; i <=
|
|
588
|
-
if (
|
|
589
|
-
|
|
598
|
+
}, At = (e, t, r, s, n = !1) => {
|
|
599
|
+
let i = 0, o = 0, c = 0, l = 0, u = t.length - 1, p = t[0], a = t[u], g = s.length - 1, d = s[0], f = s[g], h, _;
|
|
600
|
+
for (; i <= u && o <= g; )
|
|
601
|
+
if (p == null)
|
|
602
|
+
p = t[++i];
|
|
590
603
|
else if (a == null)
|
|
591
|
-
a = t[--
|
|
592
|
-
else if (p == null)
|
|
593
|
-
p = s[++o];
|
|
604
|
+
a = t[--u];
|
|
594
605
|
else if (d == null)
|
|
595
|
-
d = s[
|
|
596
|
-
else if (
|
|
597
|
-
|
|
598
|
-
else if (
|
|
599
|
-
|
|
600
|
-
else if (
|
|
601
|
-
(
|
|
602
|
-
else if (
|
|
603
|
-
(
|
|
606
|
+
d = s[++o];
|
|
607
|
+
else if (f == null)
|
|
608
|
+
f = s[--g];
|
|
609
|
+
else if (M(p, d, n))
|
|
610
|
+
k(p, d, n), p = t[++i], d = s[++o];
|
|
611
|
+
else if (M(a, f, n))
|
|
612
|
+
k(a, f, n), a = t[--u], f = s[--g];
|
|
613
|
+
else if (M(p, f, n))
|
|
614
|
+
(p.$tag$ === "slot" || f.$tag$ === "slot") && N(p.$elm$.parentNode, !1), k(p, f, n), O(e, p.$elm$, a.$elm$.nextSibling), p = t[++i], f = s[--g];
|
|
615
|
+
else if (M(a, d, n))
|
|
616
|
+
(p.$tag$ === "slot" || f.$tag$ === "slot") && N(a.$elm$.parentNode, !1), k(a, d, n), O(e, a.$elm$, p.$elm$), a = t[--u], d = s[++o];
|
|
604
617
|
else {
|
|
605
|
-
for (c = -1, l = i; l <=
|
|
606
|
-
if (t[l] && t[l].$key$ !== null && t[l].$key$ ===
|
|
618
|
+
for (c = -1, l = i; l <= u; ++l)
|
|
619
|
+
if (t[l] && t[l].$key$ !== null && t[l].$key$ === d.$key$) {
|
|
607
620
|
c = l;
|
|
608
621
|
break;
|
|
609
622
|
}
|
|
610
|
-
c >= 0 ? (
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
623
|
+
c >= 0 ? (_ = t[c], _.$tag$ !== d.$tag$ ? h = W(t && t[o], r, c) : (k(_, d, n), t[c] = void 0, h = _.$elm$), d = s[++o]) : (h = W(t && t[o], r, o), d = s[++o]), h && O(
|
|
624
|
+
z(p.$elm$).parentNode,
|
|
625
|
+
h,
|
|
626
|
+
z(p.$elm$)
|
|
614
627
|
);
|
|
615
628
|
}
|
|
616
|
-
i >
|
|
629
|
+
i > u ? Oe(
|
|
617
630
|
e,
|
|
618
631
|
s[g + 1] == null ? null : s[g + 1].$elm$,
|
|
619
632
|
r,
|
|
620
633
|
s,
|
|
621
634
|
o,
|
|
622
635
|
g
|
|
623
|
-
) : o > g &&
|
|
624
|
-
},
|
|
636
|
+
) : o > g && Ae(t, i, u);
|
|
637
|
+
}, 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) => {
|
|
625
638
|
const s = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$, o = t.$tag$, c = t.$text$;
|
|
626
639
|
let l;
|
|
627
|
-
c === null ? (y = o === "svg" ? !0 : o === "foreignObject" ? !1 : y,
|
|
640
|
+
c === null ? (y = o === "svg" ? !0 : o === "foreignObject" ? !1 : y, K(e, t, y), n !== null && i !== null ? At(s, n, t, i, r) : i !== null ? (e.$text$ !== null && (s.textContent = ""), Oe(s, null, t, i, 0, i.length - 1)) : (
|
|
628
641
|
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
629
|
-
!r &&
|
|
642
|
+
!r && Z.updatable && n !== null && Ae(n, 0, n.length - 1)
|
|
630
643
|
), y && o === "svg" && (y = !1)) : (l = s["s-cr"]) ? l.parentNode.textContent = c : e.$text$ !== c && (s.data = c);
|
|
631
|
-
}, m = [],
|
|
644
|
+
}, m = [], ke = (e) => {
|
|
632
645
|
let t, r, s;
|
|
633
646
|
const n = e.__childNodes || e.childNodes;
|
|
634
647
|
for (const i of n) {
|
|
@@ -637,96 +650,96 @@ var H, J, C, oe = !1, K = !1, ce = !1, y = !1, X = (e, t, r) => {
|
|
|
637
650
|
const o = i["s-sn"];
|
|
638
651
|
for (s = r.length - 1; s >= 0; s--)
|
|
639
652
|
if (t = r[s], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== i["s-hn"])
|
|
640
|
-
if (
|
|
653
|
+
if (ae(t, o)) {
|
|
641
654
|
let c = m.find((l) => l.$nodeToRelocate$ === t);
|
|
642
|
-
|
|
655
|
+
P = !0, t["s-sn"] = t["s-sn"] || o, c ? (c.$nodeToRelocate$["s-sh"] = i["s-hn"], c.$slotRefNode$ = i) : (t["s-sh"] = i["s-hn"], m.push({
|
|
643
656
|
$slotRefNode$: i,
|
|
644
657
|
$nodeToRelocate$: t
|
|
645
658
|
})), t["s-sr"] && m.map((l) => {
|
|
646
|
-
|
|
659
|
+
ae(l.$nodeToRelocate$, t["s-sn"]) && (c = m.find((u) => u.$nodeToRelocate$ === t), c && !l.$slotRefNode$ && (l.$slotRefNode$ = c.$slotRefNode$));
|
|
647
660
|
});
|
|
648
661
|
} else m.some((c) => c.$nodeToRelocate$ === t) || m.push({
|
|
649
662
|
$nodeToRelocate$: t
|
|
650
663
|
});
|
|
651
664
|
}
|
|
652
|
-
i.nodeType === 1 &&
|
|
665
|
+
i.nodeType === 1 && ke(i);
|
|
653
666
|
}
|
|
654
|
-
},
|
|
655
|
-
e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(
|
|
656
|
-
},
|
|
657
|
-
function
|
|
667
|
+
}, je = (e) => {
|
|
668
|
+
e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(je);
|
|
669
|
+
}, O = (e, t, r) => (typeof t["s-sn"] == "string" && t["s-sr"] && t["s-cr"] && Re(t["s-cr"], t, e, t.parentElement), e?.insertBefore(t, r));
|
|
670
|
+
function Re(e, t, r, s) {
|
|
658
671
|
var n, i;
|
|
659
672
|
let o;
|
|
660
673
|
if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (o = t["s-si"] || e.parentNode["s-sc"])) {
|
|
661
674
|
const c = t["s-sn"], l = t["s-hn"];
|
|
662
675
|
if ((n = r.classList) == null || n.add(o + "-s"), s && ((i = s.classList) != null && i.contains(o + "-s"))) {
|
|
663
|
-
let
|
|
664
|
-
for (;
|
|
665
|
-
if (
|
|
666
|
-
|
|
676
|
+
let u = (s.__childNodes || s.childNodes)[0], p = !1;
|
|
677
|
+
for (; u; ) {
|
|
678
|
+
if (u["s-sn"] !== c && u["s-hn"] === l && u["s-sr"]) {
|
|
679
|
+
p = !0;
|
|
667
680
|
break;
|
|
668
681
|
}
|
|
669
|
-
|
|
682
|
+
u = u.nextSibling;
|
|
670
683
|
}
|
|
671
|
-
|
|
684
|
+
p || s.classList.remove(o + "-s");
|
|
672
685
|
}
|
|
673
686
|
}
|
|
674
687
|
}
|
|
675
|
-
var
|
|
688
|
+
var kt = (e, t, r = !1) => {
|
|
676
689
|
var s, n, i, o, c;
|
|
677
|
-
const l = e.$hostElement$,
|
|
678
|
-
if (
|
|
679
|
-
([
|
|
680
|
-
)), r &&
|
|
681
|
-
for (const
|
|
682
|
-
l.hasAttribute(
|
|
683
|
-
|
|
690
|
+
const l = e.$hostElement$, u = e.$cmpMeta$, p = e.$vnode$ || J(null, null), g = Et(t) ? t : wt(null, null, t);
|
|
691
|
+
if (T = l.tagName, u.$attrsToReflect$ && (g.$attrs$ = g.$attrs$ || {}, u.$attrsToReflect$.map(
|
|
692
|
+
([d, f]) => g.$attrs$[f] = l[d]
|
|
693
|
+
)), r && g.$attrs$)
|
|
694
|
+
for (const d of Object.keys(g.$attrs$))
|
|
695
|
+
l.hasAttribute(d) && !["key", "ref", "style", "class"].includes(d) && (g.$attrs$[d] = l[d]);
|
|
696
|
+
g.$tag$ = null, g.$flags$ |= 4, e.$vnode$ = g, g.$elm$ = p.$elm$ = l.shadowRoot || l, F = l["s-sc"], X = !!(u.$flags$ & 1) && !(u.$flags$ & 128), C = l["s-cr"], P = !1, k(p, g, r);
|
|
684
697
|
{
|
|
685
|
-
if (
|
|
686
|
-
|
|
687
|
-
for (const
|
|
688
|
-
const
|
|
689
|
-
if (!
|
|
690
|
-
const
|
|
691
|
-
|
|
698
|
+
if (j.$flags$ |= 1, ee) {
|
|
699
|
+
ke(g.$elm$);
|
|
700
|
+
for (const d of m) {
|
|
701
|
+
const f = d.$nodeToRelocate$;
|
|
702
|
+
if (!f["s-ol"] && S.document) {
|
|
703
|
+
const h = S.document.createTextNode("");
|
|
704
|
+
h["s-nr"] = f, O(f.parentNode, f["s-ol"] = h, f);
|
|
692
705
|
}
|
|
693
706
|
}
|
|
694
|
-
for (const
|
|
695
|
-
const
|
|
696
|
-
if (
|
|
697
|
-
const
|
|
698
|
-
let
|
|
707
|
+
for (const d of m) {
|
|
708
|
+
const f = d.$nodeToRelocate$, h = d.$slotRefNode$;
|
|
709
|
+
if (h) {
|
|
710
|
+
const _ = h.parentNode;
|
|
711
|
+
let x = h.nextSibling;
|
|
699
712
|
{
|
|
700
|
-
let
|
|
701
|
-
for (;
|
|
702
|
-
let
|
|
703
|
-
if (
|
|
704
|
-
for (
|
|
705
|
-
|
|
706
|
-
if (
|
|
707
|
-
|
|
713
|
+
let E = (s = f["s-ol"]) == null ? void 0 : s.previousSibling;
|
|
714
|
+
for (; E; ) {
|
|
715
|
+
let $ = (n = E["s-nr"]) != null ? n : null;
|
|
716
|
+
if ($ && $["s-sn"] === f["s-sn"] && _ === ($.__parentNode || $.parentNode)) {
|
|
717
|
+
for ($ = $.nextSibling; $ === f || $?.["s-sr"]; )
|
|
718
|
+
$ = $?.nextSibling;
|
|
719
|
+
if (!$ || !$["s-nr"]) {
|
|
720
|
+
x = $;
|
|
708
721
|
break;
|
|
709
722
|
}
|
|
710
723
|
}
|
|
711
|
-
|
|
724
|
+
E = E.previousSibling;
|
|
712
725
|
}
|
|
713
726
|
}
|
|
714
|
-
const
|
|
715
|
-
(!
|
|
727
|
+
const A = f.__parentNode || f.parentNode, se = f.__nextSibling || f.nextSibling;
|
|
728
|
+
(!x && _ !== A || se !== x) && f !== x && (!f["s-hn"] && f["s-ol"] && (f["s-hn"] = f["s-ol"].parentNode.nodeName), O(_, f, x), f.nodeType === 1 && f.tagName !== "SLOT-FB" && (f.hidden = (i = f["s-ih"]) != null ? i : !1)), f && typeof h["s-rf"] == "function" && h["s-rf"](h);
|
|
716
729
|
} else
|
|
717
|
-
|
|
730
|
+
f.nodeType === 1 && (r && (f["s-ih"] = (o = f.hidden) != null ? o : !1), f.hidden = !0);
|
|
718
731
|
}
|
|
719
732
|
}
|
|
720
|
-
|
|
733
|
+
P && xe(g.$elm$), j.$flags$ &= -2, m.length = 0;
|
|
721
734
|
}
|
|
722
|
-
if (
|
|
723
|
-
const
|
|
724
|
-
for (const
|
|
725
|
-
|
|
735
|
+
if (Z.experimentalScopedSlotChanges && u.$flags$ & 2) {
|
|
736
|
+
const d = g.$elm$.__childNodes || g.$elm$.childNodes;
|
|
737
|
+
for (const f of d)
|
|
738
|
+
f["s-hn"] !== T && !f["s-sh"] && (r && f["s-ih"] == null && (f["s-ih"] = (c = f.hidden) != null ? c : !1), f.hidden = !0);
|
|
726
739
|
}
|
|
727
|
-
|
|
740
|
+
C = void 0;
|
|
728
741
|
};
|
|
729
|
-
const
|
|
742
|
+
const te = {
|
|
730
743
|
content_wrap: 0,
|
|
731
744
|
ignore: [],
|
|
732
745
|
ignore_with: "_!i-£___£%_",
|
|
@@ -735,7 +748,7 @@ const q = {
|
|
|
735
748
|
tag_wrap: 0,
|
|
736
749
|
tag_wrap_width: 80,
|
|
737
750
|
trim: []
|
|
738
|
-
},
|
|
751
|
+
}, v = "__!i-£___£%__", w = "!i-£___£%_", Te = [
|
|
739
752
|
"area",
|
|
740
753
|
"base",
|
|
741
754
|
"br",
|
|
@@ -750,7 +763,11 @@ const q = {
|
|
|
750
763
|
"source",
|
|
751
764
|
"track",
|
|
752
765
|
"wbr"
|
|
753
|
-
],
|
|
766
|
+
], Ne = {
|
|
767
|
+
checked_html: !1,
|
|
768
|
+
config: { ...te },
|
|
769
|
+
ignored: !1
|
|
770
|
+
}, I = () => Ne, D = (e) => Object.assign(Ne, e), re = (e) => (D({ checked_html: !0 }), /<(?:[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)), ze = (e, t) => {
|
|
754
771
|
if (!e || !t)
|
|
755
772
|
throw new Error("Both 'current' and 'updates' must be passed-in to mergeObjects()");
|
|
756
773
|
let r;
|
|
@@ -759,68 +776,72 @@ const q = {
|
|
|
759
776
|
else if (typeof e == "object") {
|
|
760
777
|
r = { ...e };
|
|
761
778
|
for (let s of Object.keys(t))
|
|
762
|
-
typeof t[s] != "object" ? r[s] = t[s] : r[s] =
|
|
779
|
+
typeof t[s] != "object" ? r[s] = t[s] : r[s] = ze(r[s] || {}, t[s]);
|
|
763
780
|
}
|
|
764
781
|
return r;
|
|
765
|
-
},
|
|
782
|
+
}, jt = (e, t) => {
|
|
783
|
+
const r = ze(e, t);
|
|
784
|
+
return D({ config: r }), r;
|
|
785
|
+
}, Rt = (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), Tt = (e) => e.replace(/\n/g, v + "nl!").replace(/\r/g, v + "cr!").replace(/\s/g, v + "ws!"), Nt = (e) => {
|
|
766
786
|
const t = /\s*<([a-zA-Z0-9:-]+)[^>]*>\n\s*<\/\1>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n)|<([a-zA-Z0-9:-]+)[^>]*>(?=\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n)(\n[ ]*\S[^\n]*\n\s*)<\/\3>/g;
|
|
767
787
|
return e.replace(t, (r, s, n, i, o) => {
|
|
768
788
|
const c = n || o;
|
|
769
789
|
if (!c)
|
|
770
790
|
return r;
|
|
771
|
-
const l = c.replace(/\n/g,
|
|
791
|
+
const l = c.replace(/\n/g, v + "nl!").replace(/\r/g, v + "cr!").replace(/\s/g, v + "ws!");
|
|
772
792
|
return r.replace(c, l);
|
|
773
793
|
});
|
|
774
|
-
},
|
|
794
|
+
}, zt = (e) => {
|
|
775
795
|
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;
|
|
776
|
-
return e = e.replace(t, (r, s, n) => r.replace(n, (i) => i.replace(/</g,
|
|
777
|
-
},
|
|
796
|
+
return e = e.replace(t, (r, s, n) => r.replace(n, (i) => i.replace(/</g, w + "lt!").replace(/>/g, w + "gt!"))), e;
|
|
797
|
+
}, It = (e, t) => {
|
|
778
798
|
for (let r = 0; r < t.length; r++) {
|
|
779
799
|
const s = new RegExp(`(<${t[r]}[^>]*>)\\s+`, "g"), n = new RegExp(`\\s+(</${t[r]}>)`, "g");
|
|
780
800
|
e = e.replace(s, "$1").replace(n, "$1");
|
|
781
801
|
}
|
|
782
802
|
return e;
|
|
783
|
-
},
|
|
784
|
-
`).replace(new RegExp(
|
|
785
|
-
`).replace(new RegExp(
|
|
803
|
+
}, Dt = (e) => (e = e.replace(/<[\w:\-]+([^>]*[^\/])>/g, (t, r) => t.replace(r, (s) => s.replace(new RegExp(w + "nl!", "g"), `
|
|
804
|
+
`).replace(new RegExp(w + "cr!", "g"), "\r").replace(new RegExp(w + "ws!", "g"), " "))), e), Lt = (e) => (e = e.replace(/.*__!i-£___£%__[a-z]{2}!.*/g, (t) => t.replace(/__!i-£___£%__[a-z]{2}!/g, (r) => r.replace(new RegExp(v + "nl!", "g"), `
|
|
805
|
+
`).replace(new RegExp(v + "cr!", "g"), "\r").replace(new RegExp(v + "ws!", "g"), " "))), e), Ie = w.replace(
|
|
786
806
|
/[-\/\\^$*+?.()|[\]{}]/g,
|
|
787
807
|
"\\$&"
|
|
788
|
-
),
|
|
808
|
+
), Mt = new RegExp(Ie + "lt!", "g"), Ft = new RegExp(Ie + "gt!", "g"), Ct = (e) => {
|
|
789
809
|
const t = /<([\w:\-]+)([^>]*)>/g;
|
|
790
810
|
return e.replace(
|
|
791
811
|
t,
|
|
792
812
|
(r, s, n) => {
|
|
793
|
-
const i = n.replace(
|
|
813
|
+
const i = n.replace(Mt, "<").replace(Ft, ">");
|
|
794
814
|
return `<${s}${i}>`;
|
|
795
815
|
}
|
|
796
816
|
);
|
|
797
|
-
},
|
|
798
|
-
var s, n;
|
|
817
|
+
}, Pt = (e) => {
|
|
799
818
|
if (typeof e != "object") throw new Error("Config must be an object.");
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
if (
|
|
806
|
-
|
|
819
|
+
const t = { ...te };
|
|
820
|
+
if (!(Object.hasOwn(e, "content_wrap") || 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")))
|
|
821
|
+
return D({ config: t }), t;
|
|
822
|
+
let s = e.tab_size;
|
|
823
|
+
if (s) {
|
|
824
|
+
if (typeof s != "number") throw new Error(`tab_size must be a number, not ${typeof e.tab_size}.`);
|
|
825
|
+
if (!Number.isSafeInteger(s)) throw new Error(`Tab size ${s} is not safe. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger for more info.`);
|
|
826
|
+
if (s = Math.floor(s), s < 1 || s > 16) throw new Error("Tab size out of range. Expecting 1 to 16.");
|
|
827
|
+
e.tab_size = s;
|
|
807
828
|
}
|
|
808
829
|
if (Object.hasOwn(e, "content_wrap") && typeof e.content_wrap != "number")
|
|
809
830
|
throw new Error(`content_wrap config must be a number, not ${typeof e.tag_wrap_width}.`);
|
|
810
|
-
if (Object.hasOwn(e, "ignore") && (!Array.isArray(e.ignore) || !
|
|
831
|
+
if (Object.hasOwn(e, "ignore") && (!Array.isArray(e.ignore) || !e.ignore?.every((n) => typeof n == "string")))
|
|
811
832
|
throw new Error("Ignore config must be an array of strings.");
|
|
812
833
|
if (Object.hasOwn(e, "ignore_with") && typeof e.ignore_with != "string")
|
|
813
834
|
throw new Error(`Ignore_with config must be a string, not ${typeof e.ignore_with}.`);
|
|
814
835
|
if (Object.hasOwn(e, "strict") && typeof e.strict != "boolean")
|
|
815
836
|
throw new Error(`Strict config must be a boolean, not ${typeof e.strict}.`);
|
|
816
|
-
if (Object.hasOwn(e, "tag_wrap") && typeof e.tag_wrap == "boolean" && (console.warn("tag_wrap as a boolean is deprecated, and will not be supported in v0.9.0+. Use `tag_wrap: <number>` instead; where <number> is the max character width acceptable before wrapping attributes."), e.tag_wrap_width ? e.tag_wrap = e.tag_wrap_width : e.tag_wrap =
|
|
837
|
+
if (Object.hasOwn(e, "tag_wrap") && typeof e.tag_wrap == "boolean" && (console.warn("tag_wrap as a boolean is deprecated, and will not be supported in v0.9.0+. Use `tag_wrap: <number>` instead; where <number> is the max character width acceptable before wrapping attributes."), e.tag_wrap_width ? e.tag_wrap = e.tag_wrap_width : e.tag_wrap = t.tag_wrap_width), Object.hasOwn(e, "tag_wrap") && typeof e.tag_wrap != "number")
|
|
817
838
|
throw new Error(`tag_wrap config must be a number, not ${typeof e.tag_wrap}.`);
|
|
818
839
|
if (Object.hasOwn(e, "tag_wrap_width") && console.warn("tag_wrap_width is deprecated, and will not be supported in v0.9.0+. Use `tag_wrap: <number>` instead; where <number> is the max character width acceptable before wrapping attributes."), Object.hasOwn(e, "tag_wrap_width") && typeof e.tag_wrap_width != "number")
|
|
819
840
|
throw new Error(`tag_wrap_width config must be a number, not ${typeof e.tag_wrap_width}.`);
|
|
820
|
-
if (Object.hasOwn(e, "trim") && (!Array.isArray(e.trim) || !
|
|
841
|
+
if (Object.hasOwn(e, "trim") && (!Array.isArray(e.trim) || !e.trim?.every((n) => typeof n == "string")))
|
|
821
842
|
throw new Error("Trim config must be an array of strings.");
|
|
822
|
-
return
|
|
823
|
-
},
|
|
843
|
+
return jt(t, e);
|
|
844
|
+
}, Wt = (e, t, r) => {
|
|
824
845
|
const s = e.trim().split(/\s+/);
|
|
825
846
|
if (s.length === 0 || s.length === 1 && s[0] === "")
|
|
826
847
|
return "";
|
|
@@ -833,14 +854,15 @@ const q = {
|
|
|
833
854
|
i !== "" && n.push(n.length === 0 ? r + i : o + i), n.push(n.length === 0 ? r + l : o + l), i = "";
|
|
834
855
|
return;
|
|
835
856
|
}
|
|
836
|
-
const
|
|
837
|
-
|
|
857
|
+
const u = i === "" ? l : i + " " + l;
|
|
858
|
+
u.length <= t ? i = u : (i !== "" && n.push(n.length === 0 ? r + i : o + i), i = l);
|
|
838
859
|
}), i !== "" && n.push(n.length === 0 ? r + i : o + i);
|
|
839
860
|
const c = n.join(`
|
|
840
861
|
`);
|
|
841
|
-
return
|
|
862
|
+
return Tt(c);
|
|
842
863
|
};
|
|
843
|
-
function
|
|
864
|
+
function De(e, t) {
|
|
865
|
+
D({ ignored: !0 });
|
|
844
866
|
let r = e;
|
|
845
867
|
const s = /* @__PURE__ */ new Map();
|
|
846
868
|
let n = 0;
|
|
@@ -851,126 +873,144 @@ function Gt(e, t) {
|
|
|
851
873
|
"gs"
|
|
852
874
|
// global and dotAll
|
|
853
875
|
);
|
|
854
|
-
let
|
|
855
|
-
const
|
|
856
|
-
for (; (
|
|
876
|
+
let u;
|
|
877
|
+
const p = [];
|
|
878
|
+
for (; (u = l.exec(r)) !== null; ) {
|
|
857
879
|
const a = `${i}${n++}___`;
|
|
858
|
-
s.set(a,
|
|
859
|
-
start:
|
|
880
|
+
s.set(a, u[0]), p.push({
|
|
881
|
+
start: u.index,
|
|
860
882
|
end: l.lastIndex,
|
|
861
883
|
marker: a
|
|
862
884
|
});
|
|
863
885
|
}
|
|
864
|
-
for (let a =
|
|
865
|
-
const g =
|
|
886
|
+
for (let a = p.length - 1; a >= 0; a--) {
|
|
887
|
+
const g = p[a];
|
|
866
888
|
r = r.substring(0, g.start) + g.marker + r.substring(g.end);
|
|
867
889
|
}
|
|
868
890
|
}
|
|
869
891
|
return { html_with_markers: r, extracted_map: s };
|
|
870
892
|
}
|
|
871
|
-
function
|
|
893
|
+
function Le(e, t) {
|
|
894
|
+
D({ ignored: !1 });
|
|
872
895
|
let r = e;
|
|
873
896
|
for (const [s, n] of t)
|
|
874
897
|
r = r.split(s).join(n);
|
|
875
898
|
return r;
|
|
876
899
|
}
|
|
877
|
-
const
|
|
878
|
-
|
|
879
|
-
(r, s,
|
|
880
|
-
|
|
881
|
-
|
|
900
|
+
const Ut = (e) => {
|
|
901
|
+
const { checked_html: t } = I();
|
|
902
|
+
return !t && !re(e) ? e : e.replace(/<([a-zA-Z\-0-9:]+)[^>]*>/g, (r, s) => Te.indexOf(s) > -1 ? `${r.substring(0, r.length - 1)} />`.replace(/\/\s\//g, "/") : r.replace(/[\s]?\/>/g, `></${s}>`));
|
|
903
|
+
}, Zt = (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);
|
|
904
|
+
let pe;
|
|
905
|
+
const Ht = (e, t) => {
|
|
906
|
+
let r = !1;
|
|
907
|
+
const { checked_html: s, ignored: n } = I();
|
|
908
|
+
if (!s && !re(e)) return e;
|
|
909
|
+
const i = I().config, o = i.ignore.length > 0;
|
|
910
|
+
if (!n && o) {
|
|
911
|
+
const { html_with_markers: c, extracted_map: l } = De(e, i);
|
|
912
|
+
e = c, pe = l, r = !0;
|
|
882
913
|
}
|
|
883
|
-
), e = e.
|
|
884
|
-
|
|
885
|
-
|
|
914
|
+
return e = Zt(e), e = e.replace(/\n|\t/g, ""), e = e.replace(/>\s+</g, "><"), e = e.replace(/ {2,}/g, " "), e = e.replace(/ >/g, ">"), e = e.replace(/ </g, "<"), e = e.replace(/> /g, ">"), e = e.replace(/<\s*\//g, "</"), e = e.replace(/ = /g, "="), e = e.replace(
|
|
915
|
+
/([a-zA-Z0-9_-]+)=(['"])(.*?)\2/g,
|
|
916
|
+
(c, l, u, p) => {
|
|
917
|
+
const a = p.trim();
|
|
918
|
+
return `${l}=${u}${a}${u}`;
|
|
919
|
+
}
|
|
920
|
+
), e = e.trim(), r && (e = Le(e, pe)), e;
|
|
921
|
+
}, R = {
|
|
886
922
|
line: []
|
|
887
923
|
};
|
|
888
|
-
let
|
|
889
|
-
const
|
|
890
|
-
|
|
924
|
+
let ge;
|
|
925
|
+
const Bt = (e) => {
|
|
926
|
+
R.line = [];
|
|
891
927
|
let t = -1;
|
|
892
928
|
const r = /(<[^>]+>)|([^<]+)/g;
|
|
893
|
-
return e = e.replace(r, (s, n, i) => (n ?
|
|
929
|
+
return e = e.replace(r, (s, n, i) => (n ? R.line.push({ type: "tag", value: s }) : i && i.trim().length > 0 && R.line.push({ type: "text", value: s }), t++, `
|
|
894
930
|
[#-# : ${t} : ${s} : #-#]
|
|
895
931
|
`)), e;
|
|
896
|
-
},
|
|
897
|
-
|
|
932
|
+
}, qt = (e) => {
|
|
933
|
+
e = Ut(e);
|
|
934
|
+
const { config: t } = I();
|
|
935
|
+
return t.trim.length > 0 && (e = It(e, t.trim)), e = Ht(e), e = Bt(e), e;
|
|
936
|
+
}, Gt = (e) => {
|
|
937
|
+
const t = " ".repeat(e.tab_size), r = e.tag_wrap, s = e.content_wrap, i = `-${e.ignore_with}`, o = e.strict;
|
|
898
938
|
let c = "";
|
|
899
|
-
const l = [],
|
|
900
|
-
|
|
901
|
-
let
|
|
902
|
-
const
|
|
903
|
-
let
|
|
904
|
-
const
|
|
905
|
-
c += "0",
|
|
906
|
-
const
|
|
907
|
-
if (c = c.substring(0,
|
|
908
|
-
if (
|
|
909
|
-
l[l.length - 1] = l.at(-1) +
|
|
939
|
+
const l = [], u = /<[A-Za-z]+\b[^>]*(?:.|\n)*?\/?>/g, p = /\s{1}[A-Za-z-]+(?:=".*?")?/g;
|
|
940
|
+
R.line.forEach((g, d) => {
|
|
941
|
+
let f = g.value;
|
|
942
|
+
const h = f.startsWith(i + "lt--") || f.startsWith(i + "gt--") || f.startsWith(i + "nl--") || f.startsWith(i + "cr--") || f.startsWith(i + "ws--") || f.startsWith(i + "tab--");
|
|
943
|
+
let _ = 0;
|
|
944
|
+
const x = R.line[d - 1], A = x?.value ?? "";
|
|
945
|
+
c += "0", d === 0 && _++, f.trim().startsWith("</") && _++, A.trim().startsWith("<!doctype") && _++, A.trim().startsWith("<!--") && _++, A.trim().endsWith("/>") && _++, A.trim().startsWith("</") && _++, x?.type === "text" && _++;
|
|
946
|
+
const E = Math.max(0, c.length - _);
|
|
947
|
+
if (c = c.substring(0, E), g.type === "text" && /^[!,;\.]/.test(f))
|
|
948
|
+
if (f.length === 1) {
|
|
949
|
+
l[l.length - 1] = l.at(-1) + f;
|
|
910
950
|
return;
|
|
911
951
|
} else
|
|
912
|
-
l[l.length - 1] = l.at(-1) +
|
|
913
|
-
const
|
|
914
|
-
if (
|
|
915
|
-
l.push(
|
|
952
|
+
l[l.length - 1] = l.at(-1) + f.charAt(0), f = f.slice(1).trim();
|
|
953
|
+
const $ = t.repeat(E);
|
|
954
|
+
if (h)
|
|
955
|
+
l.push(f);
|
|
916
956
|
else {
|
|
917
|
-
if (
|
|
957
|
+
if (o && f.trim().startsWith("<!--"))
|
|
918
958
|
return;
|
|
919
|
-
let b =
|
|
920
|
-
if (g.type === "text" &&
|
|
921
|
-
b =
|
|
922
|
-
else if (
|
|
923
|
-
|
|
924
|
-
const
|
|
925
|
-
if (
|
|
926
|
-
const
|
|
927
|
-
let
|
|
959
|
+
let b = f;
|
|
960
|
+
if (g.type === "text" && s > 0 && b.length >= s)
|
|
961
|
+
b = Wt(b, s, $);
|
|
962
|
+
else if (r > 0 && b.length > r && u.test(b)) {
|
|
963
|
+
u.lastIndex = 0, p.lastIndex = 0;
|
|
964
|
+
const L = b.split(p).filter(Boolean);
|
|
965
|
+
if (L.length >= 2) {
|
|
966
|
+
const Fe = b.matchAll(p), Ce = $ + t;
|
|
967
|
+
let H = $ + L[0] + `
|
|
928
968
|
`;
|
|
929
|
-
for (const
|
|
930
|
-
const
|
|
931
|
-
|
|
969
|
+
for (const He of Fe) {
|
|
970
|
+
const Be = He[0].trim();
|
|
971
|
+
H += Ce + Be + `
|
|
932
972
|
`;
|
|
933
973
|
}
|
|
934
|
-
const
|
|
935
|
-
|
|
974
|
+
const ne = L[0].match(/<([A-Za-z_:-]+)/), Pe = ne ? ne[1] : "", We = Te.includes(Pe), Ue = L[1].trim(), Ze = $ + (o && We ? " " : "");
|
|
975
|
+
H += Ze + Ue, b = H;
|
|
936
976
|
} else
|
|
937
|
-
b =
|
|
977
|
+
b = $ + b;
|
|
938
978
|
} else
|
|
939
|
-
b =
|
|
979
|
+
b = $ + b;
|
|
940
980
|
l.push(b);
|
|
941
981
|
}
|
|
942
982
|
});
|
|
943
983
|
let a = l.join(`
|
|
944
984
|
`);
|
|
945
|
-
return
|
|
985
|
+
return r > 0 && (a = Rt(a)), s > 0 && /\n[ ]*[^\n]*__!i-£___£%__[^\n]*\n/.test(a) && (a = Nt(a)), a = a.replace(
|
|
946
986
|
/<(?<Element>.+).*>[^<]*?[^><\/\s][^<]*?<\/{1}\k<Element>|<script[^>]*>\s+<\/script>|<(\w+)>\s+<\/(\w+)|<(?:([\w:\._-]+)|([\w:\._-]+)[^>]*[^\/])>\s+<\/([\w:\._-]+)>/g,
|
|
947
987
|
(g) => g.replace(/\n|\t|\s{2,}/g, "")
|
|
948
|
-
),
|
|
988
|
+
), s > 0 && (a = Lt(a)), r > 0 && (a = Dt(a)), o && (a = a.replace(/\s\/>|\/>/g, ">")), a.startsWith(`
|
|
949
989
|
`) && (a = a.substring(1)), a.endsWith(`
|
|
950
990
|
`) && (a = a.substring(0, a.length - 1)), a;
|
|
951
|
-
},
|
|
952
|
-
|
|
953
|
-
const
|
|
954
|
-
|
|
955
|
-
const
|
|
956
|
-
if (
|
|
957
|
-
const { html_with_markers:
|
|
958
|
-
e =
|
|
991
|
+
}, Jt = (e, t) => {
|
|
992
|
+
let r = !1;
|
|
993
|
+
const { checked_html: s, ignored: n } = I();
|
|
994
|
+
if (!s && !re(e)) return e;
|
|
995
|
+
const i = t ? Pt(t) : { ...te }, o = i.ignore.length > 0;
|
|
996
|
+
if (!n && o) {
|
|
997
|
+
const { html_with_markers: c, extracted_map: l } = De(e, i);
|
|
998
|
+
e = c, ge = l, r = !0;
|
|
959
999
|
}
|
|
960
|
-
return e =
|
|
961
|
-
},
|
|
1000
|
+
return e = zt(e), e = qt(e), e = Gt(i), e = Ct(e), r && (e = Le(e, ge)), e;
|
|
1001
|
+
}, Kt = (e, t, r) => {
|
|
962
1002
|
[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);
|
|
963
|
-
},
|
|
1003
|
+
}, Me = (e, t, r, s, n) => {
|
|
964
1004
|
if (t && typeof t == "string") {
|
|
965
1005
|
const i = document.createElement(t);
|
|
966
1006
|
Object.keys(r || {}).forEach((o) => {
|
|
967
|
-
|
|
968
|
-
}), s
|
|
969
|
-
|
|
970
|
-
}), r
|
|
1007
|
+
Kt(i, o, r[o]);
|
|
1008
|
+
}), s?.forEach((o) => {
|
|
1009
|
+
Me(i, o.$tag$, o.$attrs$, o.$children$, o.$text$);
|
|
1010
|
+
}), r?.innerHTML && (i.innerHTML = r.innerHTML), e.appendChild(i);
|
|
971
1011
|
}
|
|
972
1012
|
n && (e.innerHTML = n);
|
|
973
|
-
},
|
|
1013
|
+
}, wr = (e, t, r = []) => {
|
|
974
1014
|
const s = {};
|
|
975
1015
|
if (typeof e != "object")
|
|
976
1016
|
throw new Error("filterArgs - args isn't an object.");
|
|
@@ -980,185 +1020,182 @@ const Qt = (e) => {
|
|
|
980
1020
|
(!t || !Object.keys(t).includes(n) || t[n] !== i) && (s[o] = i);
|
|
981
1021
|
}
|
|
982
1022
|
return s;
|
|
983
|
-
},
|
|
984
|
-
var s, n;
|
|
1023
|
+
}, xr = (e, t) => {
|
|
985
1024
|
const r = document.getElementById("storybook-root");
|
|
986
1025
|
if (r !== null)
|
|
987
|
-
return
|
|
1026
|
+
return document.querySelector("[lang]")?.setAttribute("lang", t.globals?.locale || "en"), kt({
|
|
988
1027
|
$cmpMeta$: {
|
|
989
1028
|
$flags$: 0,
|
|
990
1029
|
$tagName$: r.tagName
|
|
991
1030
|
},
|
|
992
1031
|
$hostElement$: r
|
|
993
1032
|
}, e(t)), r.children[r.children.length - 1];
|
|
994
|
-
},
|
|
1033
|
+
}, Er = ({ $tag$: e, $attrs$: t, $children$: r, $text$: s }) => {
|
|
995
1034
|
const n = document.createElement("div");
|
|
996
|
-
return
|
|
1035
|
+
return Me(n, e, t, r, s), Jt(n.innerHTML, {
|
|
997
1036
|
tag_wrap: 40,
|
|
998
1037
|
content_wrap: 120
|
|
999
1038
|
}).replace(/="true"/g, "");
|
|
1000
|
-
},
|
|
1039
|
+
}, de = (e, t) => {
|
|
1001
1040
|
if (!t)
|
|
1002
1041
|
return;
|
|
1003
1042
|
const r = t.split("/");
|
|
1004
1043
|
return `${e}${r.slice(2, r.length - 1).join("-")}--docs`;
|
|
1005
1044
|
};
|
|
1006
|
-
|
|
1007
|
-
|
|
1045
|
+
class Sr {
|
|
1046
|
+
/**
|
|
1047
|
+
* JsonDocs
|
|
1048
|
+
*/
|
|
1049
|
+
jsonDoc;
|
|
1008
1050
|
constructor(t) {
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
return {
|
|
1038
|
-
...u,
|
|
1039
|
-
[a.name]: {
|
|
1040
|
-
name: a.attr || a.name,
|
|
1041
|
-
description: a.docs,
|
|
1042
|
-
type: { required: a.required },
|
|
1043
|
-
table: {
|
|
1044
|
-
category: "props",
|
|
1045
|
-
type: { summary: a.type },
|
|
1046
|
-
defaultValue: { summary: a.default }
|
|
1047
|
-
},
|
|
1048
|
-
control: g,
|
|
1049
|
-
options: p
|
|
1050
|
-
}
|
|
1051
|
-
};
|
|
1052
|
-
}, {}), n = r == null ? void 0 : r.events.reduce((u, a) => ({
|
|
1053
|
-
...u,
|
|
1054
|
-
[a.event]: {
|
|
1055
|
-
name: a.event,
|
|
1056
|
-
description: a.docs,
|
|
1057
|
-
table: {
|
|
1058
|
-
category: "events",
|
|
1059
|
-
type: { summary: a.detail }
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
}), {}), i = r == null ? void 0 : r.methods.reduce((u, a) => ({
|
|
1063
|
-
...u,
|
|
1051
|
+
this.jsonDoc = t;
|
|
1052
|
+
}
|
|
1053
|
+
/**
|
|
1054
|
+
* Get component data from the jsonDoc
|
|
1055
|
+
* @param tagName - tag name we want to get the data from
|
|
1056
|
+
* @returns component data
|
|
1057
|
+
*/
|
|
1058
|
+
#e = (t) => this.jsonDoc.components.find((r) => r.tag === t);
|
|
1059
|
+
/**
|
|
1060
|
+
* Get the control for the given prop
|
|
1061
|
+
* Based on https://storybook.js.org/docs/api/arg-types#controltype
|
|
1062
|
+
* @param prop - prop to get control for
|
|
1063
|
+
* @returns control type and options if applicable
|
|
1064
|
+
*/
|
|
1065
|
+
#t = (t) => {
|
|
1066
|
+
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, "|"));
|
|
1067
|
+
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?.includes("[]")) ? { control: { type: "object" } } : (r.unshift(void 0), { control: { type: "select" }, options: r }) : { control: { type: "object" } };
|
|
1068
|
+
};
|
|
1069
|
+
/**
|
|
1070
|
+
* Extract component arg types from the component data
|
|
1071
|
+
* @param tagName - tag name we want to extract the arg types from
|
|
1072
|
+
* @returns component arg types
|
|
1073
|
+
*/
|
|
1074
|
+
extractArgTypes = (t) => {
|
|
1075
|
+
const r = this.#e(t), s = r?.props.reduce((p, a) => {
|
|
1076
|
+
const { control: g, options: d } = this.#t(a);
|
|
1077
|
+
return {
|
|
1078
|
+
...p,
|
|
1064
1079
|
[a.name]: {
|
|
1065
|
-
name: a.name,
|
|
1080
|
+
name: a.attr || a.name,
|
|
1066
1081
|
description: a.docs,
|
|
1082
|
+
type: { required: a.required },
|
|
1067
1083
|
table: {
|
|
1068
|
-
category: "
|
|
1069
|
-
type: { summary: a.
|
|
1070
|
-
|
|
1084
|
+
category: "props",
|
|
1085
|
+
type: { summary: a.type },
|
|
1086
|
+
defaultValue: { summary: a.default }
|
|
1087
|
+
},
|
|
1088
|
+
control: g,
|
|
1089
|
+
options: d
|
|
1071
1090
|
}
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1091
|
+
};
|
|
1092
|
+
}, {}), n = r?.events.reduce((p, a) => ({
|
|
1093
|
+
...p,
|
|
1094
|
+
[a.event]: {
|
|
1095
|
+
name: a.event,
|
|
1096
|
+
description: a.docs,
|
|
1097
|
+
table: {
|
|
1098
|
+
category: "events",
|
|
1099
|
+
type: { summary: a.detail }
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
}), {}), i = r?.methods.reduce((p, a) => ({
|
|
1103
|
+
...p,
|
|
1104
|
+
[a.name]: {
|
|
1105
|
+
name: a.name,
|
|
1106
|
+
description: a.docs,
|
|
1107
|
+
table: {
|
|
1108
|
+
category: "methods",
|
|
1109
|
+
type: { summary: a.signature }
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}), {}), o = r?.slots.reduce((p, a) => ({
|
|
1113
|
+
...p,
|
|
1114
|
+
[a.name]: {
|
|
1115
|
+
name: a.name !== "" ? a.name : "default",
|
|
1116
|
+
// default slot are unnamed
|
|
1117
|
+
description: a.docs,
|
|
1118
|
+
table: {
|
|
1119
|
+
category: "slots",
|
|
1120
|
+
type: { summary: void 0 }
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}), {}), c = r?.styles.reduce((p, a) => ({
|
|
1124
|
+
...p,
|
|
1125
|
+
[a.name]: {
|
|
1126
|
+
name: a.name,
|
|
1127
|
+
description: a.docs,
|
|
1128
|
+
table: {
|
|
1129
|
+
category: "custom properties",
|
|
1130
|
+
type: { summary: void 0 }
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
}), {}), l = r?.dependencies.reduce((p, a) => {
|
|
1134
|
+
const g = this.#e(a);
|
|
1135
|
+
return g ? {
|
|
1136
|
+
...p,
|
|
1137
|
+
[a]: {
|
|
1138
|
+
name: a,
|
|
1139
|
+
description: `<a href="./?path=/docs/${de("", g?.filePath)}">View Component Documentation</a>`,
|
|
1078
1140
|
table: {
|
|
1079
|
-
category: "
|
|
1141
|
+
category: "depends on",
|
|
1080
1142
|
type: { summary: void 0 }
|
|
1081
1143
|
}
|
|
1082
1144
|
}
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1145
|
+
} : p;
|
|
1146
|
+
}, {}), u = r?.dependents.reduce((p, a) => {
|
|
1147
|
+
const g = this.#e(a);
|
|
1148
|
+
return g ? {
|
|
1149
|
+
...p,
|
|
1150
|
+
[a]: {
|
|
1151
|
+
name: a,
|
|
1152
|
+
description: `<a href="./?path=/docs/${de("", g?.filePath)}">View Component Documentation</a>`,
|
|
1088
1153
|
table: {
|
|
1089
|
-
category: "
|
|
1154
|
+
category: "used by",
|
|
1090
1155
|
type: { summary: void 0 }
|
|
1091
1156
|
}
|
|
1092
1157
|
}
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
category: "used by",
|
|
1115
|
-
type: { summary: void 0 }
|
|
1116
|
-
}
|
|
1117
|
-
}
|
|
1118
|
-
} : u;
|
|
1119
|
-
}, {});
|
|
1120
|
-
return {
|
|
1121
|
-
...s,
|
|
1122
|
-
...n,
|
|
1123
|
-
...i,
|
|
1124
|
-
...o,
|
|
1125
|
-
...c,
|
|
1126
|
-
...l,
|
|
1127
|
-
...f
|
|
1128
|
-
};
|
|
1129
|
-
});
|
|
1130
|
-
/**
|
|
1131
|
-
* Extract component description from the component data
|
|
1132
|
-
* @param tagName - tag name we want to extract the description from
|
|
1133
|
-
* @returns component description
|
|
1134
|
-
*/
|
|
1135
|
-
$(this, "extractComponentDescription", (t) => {
|
|
1136
|
-
const r = v(this, k).call(this, t);
|
|
1137
|
-
return (r == null ? void 0 : r.readme) || (r == null ? void 0 : r.docs);
|
|
1138
|
-
});
|
|
1139
|
-
this.jsonDoc = t;
|
|
1140
|
-
}
|
|
1158
|
+
} : p;
|
|
1159
|
+
}, {});
|
|
1160
|
+
return {
|
|
1161
|
+
...s,
|
|
1162
|
+
...n,
|
|
1163
|
+
...i,
|
|
1164
|
+
...o,
|
|
1165
|
+
...c,
|
|
1166
|
+
...l,
|
|
1167
|
+
...u
|
|
1168
|
+
};
|
|
1169
|
+
};
|
|
1170
|
+
/**
|
|
1171
|
+
* Extract component description from the component data
|
|
1172
|
+
* @param tagName - tag name we want to extract the description from
|
|
1173
|
+
* @returns component description
|
|
1174
|
+
*/
|
|
1175
|
+
extractComponentDescription = (t) => {
|
|
1176
|
+
const r = this.#e(t);
|
|
1177
|
+
return r?.readme || r?.docs;
|
|
1178
|
+
};
|
|
1141
1179
|
}
|
|
1142
|
-
|
|
1143
|
-
const Ir = ({ disconnect: e, observe: t, takeRecords: r }) => {
|
|
1180
|
+
const Or = ({ disconnect: e, observe: t, takeRecords: r }) => {
|
|
1144
1181
|
class s {
|
|
1182
|
+
/**
|
|
1183
|
+
*
|
|
1184
|
+
*/
|
|
1185
|
+
disconnect = e;
|
|
1186
|
+
/**
|
|
1187
|
+
*
|
|
1188
|
+
*/
|
|
1189
|
+
observe = t;
|
|
1190
|
+
/**
|
|
1191
|
+
*
|
|
1192
|
+
*/
|
|
1193
|
+
takeRecords = r;
|
|
1194
|
+
/**
|
|
1195
|
+
*
|
|
1196
|
+
*/
|
|
1197
|
+
cb;
|
|
1145
1198
|
constructor(i) {
|
|
1146
|
-
/**
|
|
1147
|
-
*
|
|
1148
|
-
*/
|
|
1149
|
-
$(this, "disconnect", e);
|
|
1150
|
-
/**
|
|
1151
|
-
*
|
|
1152
|
-
*/
|
|
1153
|
-
$(this, "observe", t);
|
|
1154
|
-
/**
|
|
1155
|
-
*
|
|
1156
|
-
*/
|
|
1157
|
-
$(this, "takeRecords", r);
|
|
1158
|
-
/**
|
|
1159
|
-
*
|
|
1160
|
-
*/
|
|
1161
|
-
$(this, "cb");
|
|
1162
1199
|
this.cb = i;
|
|
1163
1200
|
}
|
|
1164
1201
|
}
|
|
@@ -1169,25 +1206,25 @@ const Ir = ({ disconnect: e, observe: t, takeRecords: r }) => {
|
|
|
1169
1206
|
value: s
|
|
1170
1207
|
});
|
|
1171
1208
|
}), s;
|
|
1172
|
-
},
|
|
1209
|
+
}, Ar = ({ disconnect: e, observe: t }) => {
|
|
1173
1210
|
class r {
|
|
1211
|
+
/**
|
|
1212
|
+
*
|
|
1213
|
+
*/
|
|
1214
|
+
disconnect = e;
|
|
1215
|
+
/**
|
|
1216
|
+
*
|
|
1217
|
+
*/
|
|
1218
|
+
observe = t;
|
|
1219
|
+
/**
|
|
1220
|
+
*
|
|
1221
|
+
*/
|
|
1222
|
+
unobserve;
|
|
1223
|
+
/**
|
|
1224
|
+
*
|
|
1225
|
+
*/
|
|
1226
|
+
cb;
|
|
1174
1227
|
constructor(n) {
|
|
1175
|
-
/**
|
|
1176
|
-
*
|
|
1177
|
-
*/
|
|
1178
|
-
$(this, "disconnect", e);
|
|
1179
|
-
/**
|
|
1180
|
-
*
|
|
1181
|
-
*/
|
|
1182
|
-
$(this, "observe", t);
|
|
1183
|
-
/**
|
|
1184
|
-
*
|
|
1185
|
-
*/
|
|
1186
|
-
$(this, "unobserve");
|
|
1187
|
-
/**
|
|
1188
|
-
*
|
|
1189
|
-
*/
|
|
1190
|
-
$(this, "cb");
|
|
1191
1228
|
this.cb = n;
|
|
1192
1229
|
}
|
|
1193
1230
|
}
|
|
@@ -1199,18 +1236,15 @@ const Ir = ({ disconnect: e, observe: t, takeRecords: r }) => {
|
|
|
1199
1236
|
});
|
|
1200
1237
|
}), r;
|
|
1201
1238
|
};
|
|
1202
|
-
class
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
*/
|
|
1208
|
-
$(this, "detail");
|
|
1209
|
-
}
|
|
1239
|
+
class Xt extends Event {
|
|
1240
|
+
/**
|
|
1241
|
+
*
|
|
1242
|
+
*/
|
|
1243
|
+
detail;
|
|
1210
1244
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
1211
1245
|
}
|
|
1212
|
-
const
|
|
1213
|
-
class e extends
|
|
1246
|
+
const kr = () => {
|
|
1247
|
+
class e extends Xt {
|
|
1214
1248
|
}
|
|
1215
1249
|
return [window, global].forEach((t) => {
|
|
1216
1250
|
Object.defineProperty(t, "SubmitEvent", {
|
|
@@ -1219,7 +1253,7 @@ const Lr = () => {
|
|
|
1219
1253
|
value: e
|
|
1220
1254
|
});
|
|
1221
1255
|
}), e;
|
|
1222
|
-
},
|
|
1256
|
+
}, jr = (e) => {
|
|
1223
1257
|
const t = (r) => (setTimeout(r, 1), e(), 0);
|
|
1224
1258
|
return [window, global].forEach((r) => {
|
|
1225
1259
|
Object.defineProperty(r, "requestAnimationFrame", {
|
|
@@ -1230,45 +1264,45 @@ const Lr = () => {
|
|
|
1230
1264
|
}), t;
|
|
1231
1265
|
};
|
|
1232
1266
|
export {
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1267
|
+
Yt as ClassList,
|
|
1268
|
+
ir as Cursor,
|
|
1269
|
+
Ke as Page,
|
|
1270
|
+
or as Paginate,
|
|
1271
|
+
Sr as StorybookPreview,
|
|
1272
|
+
Qt as allItemsAreString,
|
|
1273
|
+
er as cleanString,
|
|
1274
|
+
tr as createID,
|
|
1275
|
+
ar as dateRegExp,
|
|
1276
|
+
lr as dateToString,
|
|
1277
|
+
vr as defineLocales,
|
|
1278
|
+
wr as filterArgs,
|
|
1279
|
+
fr as focusableElements,
|
|
1280
|
+
sr as formatID,
|
|
1281
|
+
hr as getLocaleDatePattern,
|
|
1282
|
+
qe as getObjectValueFromKey,
|
|
1283
|
+
he as getParentWindows,
|
|
1284
|
+
Er as getStoryHTML,
|
|
1285
|
+
de as getStorybookUrl,
|
|
1286
|
+
pr as getWindows,
|
|
1287
|
+
U as isObject,
|
|
1288
|
+
cr as isTagName,
|
|
1289
|
+
ur as isValidNumber,
|
|
1290
|
+
Ge as isValidString,
|
|
1291
|
+
rr as isValideID,
|
|
1292
|
+
_r as localeCurrency,
|
|
1293
|
+
lt as localeDate,
|
|
1294
|
+
yr as localeNumber,
|
|
1295
|
+
br as localePercent,
|
|
1296
|
+
mr as localeUnit,
|
|
1297
|
+
nr as nextTick,
|
|
1298
|
+
jr as setUpRequestAnimationFrameMock,
|
|
1299
|
+
Or as setupMutationObserverMock,
|
|
1300
|
+
Ar as setupResizeObserverMock,
|
|
1301
|
+
kr as setupSubmitEventMock,
|
|
1302
|
+
xr as stencilWrapper,
|
|
1303
|
+
Vt as toString,
|
|
1304
|
+
$r as vsCodeCssGenerator,
|
|
1305
|
+
dr as vsCodeGenerator,
|
|
1306
|
+
gr as webTypesGenerator
|
|
1273
1307
|
};
|
|
1274
1308
|
//# sourceMappingURL=index.es.js.map
|