@mgdis/stencil-helpers 3.1.1 → 3.2.1

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