@mgdis/stencil-helpers 2.2.1 → 2.2.3

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,17 @@
1
- var ve = Object.defineProperty;
2
- var X = (e) => {
1
+ var he = Object.defineProperty;
2
+ var G = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var he = (e, t, s) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
6
- var g = (e, t, s) => he(e, typeof t != "symbol" ? t + "" : t, s), ye = (e, t, s) => t.has(e) || X("Cannot " + s);
7
- var k = (e, t, s) => (ye(e, t, "read from private field"), s ? s.call(e) : t.get(e)), P = (e, t, s) => t.has(e) ? X("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s);
8
- const qe = (e = "", t = 10) => {
5
+ var ye = (e, t, s) => t in e ? he(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
6
+ var g = (e, t, s) => ye(e, typeof t != "symbol" ? t + "" : t, s), ve = (e, t, s) => t.has(e) || G("Cannot " + s);
7
+ var T = (e, t, s) => (ve(e, t, "read from private field"), s ? s.call(e) : t.get(e)), B = (e, t, s) => t.has(e) ? G("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s);
8
+ const Ge = (e = "", t = 10) => {
9
9
  const s = new Uint8Array(t);
10
10
  crypto.getRandomValues(s);
11
- const r = Array.from(s).map((o) => o.toString(16).padStart(2, "0")).join("").slice(0, t);
11
+ const r = Array.from(s).map((n) => n.toString(16).padStart(2, "0")).join("").slice(0, t);
12
12
  return e !== "" ? `${e}-${r}` : r;
13
- }, Ge = (e) => me(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;
14
- class Xe {
13
+ }, Xe = (e) => me(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;
14
+ class Ke {
15
15
  constructor(t = []) {
16
16
  /**
17
17
  * Available classes
@@ -46,25 +46,25 @@ class Xe {
46
46
  this.classes = t;
47
47
  }
48
48
  }
49
- const Je = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Ke = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Qe = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Ze = (e) => {
50
- const t = te(e), s = se(e);
49
+ const Qe = (e) => Array.isArray(e) && e.every((t) => typeof t == "string"), Ze = (e, t) => t.includes(e == null ? void 0 : e.tagName.toLowerCase()), Je = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]), [identifier], mg-button', Ye = (e) => {
50
+ const t = V(e), s = ee(e);
51
51
  return [e, ...t, ...s];
52
- }, te = (e, t = []) => {
52
+ }, V = (e, t = []) => {
53
53
  if (e.self !== e.top)
54
54
  try {
55
55
  const s = e.parent;
56
- return s ? (t.push(s), te(s, t)) : t;
56
+ return s ? (t.push(s), V(s, t)) : t;
57
57
  } catch (s) {
58
58
  return console.error("Different hosts between iframes:", s), t;
59
59
  }
60
60
  return t;
61
- }, se = (e, t = []) => {
61
+ }, ee = (e, t = []) => {
62
62
  if (e.frames.length > 0)
63
63
  for (const s of Array.from(e.frames))
64
- t.push(s), se(s, t);
64
+ t.push(s), ee(s, t);
65
65
  return t;
66
- }, me = (e) => typeof e == "string" && e.trim() !== "", Ye = (e) => typeof e == "object" ? JSON.stringify(e) : `${e}`, Ve = (e) => typeof e == "number" && !Number.isNaN(e), et = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, tt = async (e) => e();
67
- var E = {
66
+ }, me = (e) => typeof e == "string" && e.trim() !== "", Ve = (e) => typeof e == "object" ? JSON.stringify(e) : `${e}`, et = (e) => typeof e == "number" && !Number.isNaN(e), tt = (e) => typeof e == "string" ? e.toLocaleLowerCase().normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "") : e, st = async (e) => e();
67
+ var w = {
68
68
  allRenderFn: !1,
69
69
  cmpDidLoad: !0,
70
70
  cmpDidUnload: !1,
@@ -156,9 +156,9 @@ var E = {
156
156
  }, be = Object.defineProperty, Se = (e, t) => {
157
157
  for (var s in t)
158
158
  be(e, s, { get: t[s], enumerable: !0 });
159
- }, J = (e, t) => t in e, K = "http://www.w3.org/1999/xlink", B = typeof window < "u" ? window : {}, M = B.document || { head: {} };
160
- B.HTMLElement;
161
- var j = {
159
+ }, ke = "http://www.w3.org/2000/svg", Te = "http://www.w3.org/1999/xhtml", X = (e, t) => t in e, K = "http://www.w3.org/1999/xlink", z = typeof window < "u" ? window : {}, R = z.document || { head: {} };
160
+ z.HTMLElement;
161
+ var A = {
162
162
  $flags$: 0,
163
163
  $resourcesUrl$: "",
164
164
  jmp: (e) => e(),
@@ -166,19 +166,19 @@ var j = {
166
166
  ael: (e, t, s, r) => e.addEventListener(t, s, r),
167
167
  rel: (e, t, s, r) => e.removeEventListener(t, s, r),
168
168
  ce: (e, t) => new CustomEvent(e, t)
169
- }, Q = {}, Te = "http://www.w3.org/2000/svg", ke = "http://www.w3.org/1999/xhtml", xe = (e) => e != null, re = (e) => (e = typeof e, e === "object" || e === "function"), Ae = {};
169
+ }, xe = (e) => e != null && e !== void 0, te = (e) => (e = typeof e, e === "object" || e === "function"), Ae = {};
170
170
  Se(Ae, {
171
- err: () => oe,
171
+ err: () => se,
172
172
  map: () => Ee,
173
- ok: () => U,
174
- unwrap: () => je,
175
- unwrapErr: () => Re
173
+ ok: () => P,
174
+ unwrap: () => _e,
175
+ unwrapErr: () => je
176
176
  });
177
- var U = (e) => ({
177
+ var P = (e) => ({
178
178
  isOk: !0,
179
179
  isErr: !1,
180
180
  value: e
181
- }), oe = (e) => ({
181
+ }), se = (e) => ({
182
182
  isOk: !1,
183
183
  isErr: !0,
184
184
  value: e
@@ -186,32 +186,52 @@ var U = (e) => ({
186
186
  function Ee(e, t) {
187
187
  if (e.isOk) {
188
188
  const s = t(e.value);
189
- return s instanceof Promise ? s.then((r) => U(r)) : U(s);
189
+ return s instanceof Promise ? s.then((r) => P(r)) : P(s);
190
190
  }
191
191
  if (e.isErr) {
192
192
  const s = e.value;
193
- return oe(s);
193
+ return se(s);
194
194
  }
195
195
  throw "should never get here";
196
196
  }
197
- var je = (e) => {
197
+ var _e = (e) => {
198
198
  if (e.isOk)
199
199
  return e.value;
200
200
  throw e.value;
201
- }, Re = (e) => {
201
+ }, je = (e) => {
202
202
  if (e.isErr)
203
203
  return e.value;
204
204
  throw e.value;
205
- }, Le = (e, t, ...s) => {
206
- let r = null, o = null, n = null, i = !1, a = !1;
207
- const c = [], d = (l) => {
205
+ }, re = (e) => {
206
+ const t = e.__childNodes || e.childNodes;
207
+ e.tagName && e.tagName.includes("-") && e["s-cr"] && e.tagName !== "SLOT-FB" && ne(t, e.tagName).forEach((s) => {
208
+ var r;
209
+ s.nodeType === 1 && s.tagName === "SLOT-FB" && ((r = Le(s, s["s-sn"], !1)) != null && r.length ? s.hidden = !0 : s.hidden = !1);
210
+ });
211
+ for (const s of t)
212
+ s.nodeType === 1 && (s.__childNodes || s.childNodes).length && re(s);
213
+ };
214
+ function ne(e, t, s) {
215
+ let r = 0, n = [], i;
216
+ for (; r < e.length; r++)
217
+ i = e[r], i["s-sr"] && i["s-hn"] === t && s === void 0 && n.push(i), n = [...n, ...ne(i.childNodes, t, s)];
218
+ return n;
219
+ }
220
+ var Le = (e, t, s = !0) => {
221
+ const r = [];
222
+ for ((s && e["s-sr"] || !e["s-sr"]) && r.push(e); (e = e.nextSibling) && e["s-sn"] === t; )
223
+ r.push(e);
224
+ return r;
225
+ }, Q = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", Oe = (e, t, ...s) => {
226
+ let r = null, n = null, i = null, o = !1, f = !1;
227
+ const c = [], u = (l) => {
208
228
  for (let $ = 0; $ < l.length; $++)
209
- r = l[$], Array.isArray(r) ? d(r) : r != null && typeof r != "boolean" && ((i = !re(r)) && (r = String(r)), i && a ? c[c.length - 1].$text$ += r : c.push(i ? W(null, r) : r), a = i);
229
+ r = l[$], Array.isArray(r) ? u(r) : r != null && typeof r != "boolean" && ((o = !te(r)) && (r = String(r)), o && f ? c[c.length - 1].$text$ += r : c.push(o ? q(null, r) : r), f = o);
210
230
  };
211
- d(s);
212
- const f = W(e, null);
213
- return f.$attrs$ = t, c.length > 0 && (f.$children$ = c), f.$key$ = o, f.$name$ = n, f;
214
- }, W = (e, t) => {
231
+ u(s);
232
+ const d = q(e, null);
233
+ return d.$attrs$ = t, c.length > 0 && (d.$children$ = c), d.$key$ = n, d.$name$ = i, d;
234
+ }, q = (e, t) => {
215
235
  const s = {
216
236
  $flags$: 0,
217
237
  $tag$: e,
@@ -220,48 +240,63 @@ var je = (e) => {
220
240
  $children$: null
221
241
  };
222
242
  return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;
223
- }, Oe = {}, Ne = (e) => e && e.$tag$ === Oe, Z = (e, t, s, r, o, n) => {
243
+ }, Re = {}, Fe = (e) => e && e.$tag$ === Re, Z = (e, t, s, r, n, i, o) => {
224
244
  if (s !== r) {
225
- let i = J(e, t), a = t.toLowerCase();
245
+ let f = X(e, t), c = t.toLowerCase();
226
246
  if (t === "class") {
227
- const c = e.classList, d = Y(s), f = Y(r);
228
- c.remove(...d.filter((l) => l && !f.includes(l))), c.add(...f.filter((l) => l && !d.includes(l)));
247
+ const u = e.classList, d = J(s);
248
+ let l = J(r);
249
+ u.remove(...d.filter(($) => $ && !l.includes($))), u.add(...l.filter(($) => $ && !d.includes($)));
229
250
  } else if (t === "style") {
230
- for (const c in s)
231
- (!r || r[c] == null) && (c.includes("-") ? e.style.removeProperty(c) : e.style[c] = "");
232
- for (const c in r)
233
- (!s || r[c] !== s[c]) && (c.includes("-") ? e.style.setProperty(c, r[c]) : e.style[c] = r[c]);
251
+ for (const u in s)
252
+ (!r || r[u] == null) && (u.includes("-") ? e.style.removeProperty(u) : e.style[u] = "");
253
+ for (const u in r)
254
+ (!s || r[u] !== s[u]) && (u.includes("-") ? e.style.setProperty(u, r[u]) : e.style[u] = r[u]);
234
255
  } else if (t !== "key") if (t === "ref")
235
256
  r && r(e);
236
257
  else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
237
- if (t[2] === "-" ? t = t.slice(3) : J(B, a) ? t = a.slice(2) : t = a[2] + t.slice(3), s || r) {
238
- const c = t.endsWith(ne);
239
- t = t.replace(Fe, ""), s && j.rel(e, t, s, c), r && j.ael(e, t, r, c);
258
+ if (t[2] === "-" ? t = t.slice(3) : X(z, c) ? t = c.slice(2) : t = c[2] + t.slice(3), s || r) {
259
+ const u = t.endsWith(ie);
260
+ t = t.replace(Ne, ""), s && A.rel(e, t, s, u), r && A.ael(e, t, r, u);
240
261
  }
241
262
  } else {
242
- const c = re(r);
243
- if ((i || c && r !== null) && !o)
263
+ const u = te(r);
264
+ if ((f || u && r !== null) && !n)
244
265
  try {
245
266
  if (e.tagName.includes("-"))
246
- e[t] = r;
267
+ e[t] !== r && (e[t] = r);
247
268
  else {
248
- const f = r ?? "";
249
- t === "list" ? i = !1 : (s == null || e[t] != f) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = f : e.setAttribute(t, f));
269
+ const l = r ?? "";
270
+ t === "list" ? f = !1 : (s == null || e[t] != l) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = l : e.setAttribute(t, l));
250
271
  }
251
272
  } catch {
252
273
  }
253
274
  let d = !1;
254
- a !== (a = a.replace(/^xlink\:?/, "")) && (t = a, d = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (d ? e.removeAttributeNS(K, t) : e.removeAttribute(t)) : (!i || n & 4 || o) && !c && (r = r === !0 ? "" : r, d ? e.setAttributeNS(K, t, r) : e.setAttribute(t, r));
275
+ c !== (c = c.replace(/^xlink\:?/, "")) && (t = c, d = !0), r == null || r === !1 ? (r !== !1 || e.getAttribute(t) === "") && (d ? e.removeAttributeNS(K, t) : e.removeAttribute(t)) : (!f || i & 4 || n) && !u && (r = r === !0 ? "" : r, d ? e.setAttributeNS(K, t, r) : e.setAttribute(t, r));
255
276
  }
256
277
  }
257
- }, Me = /\s/, Y = (e) => e ? e.split(Me) : [], ne = "Capture", Fe = new RegExp(ne + "$"), ie = (e, t, s) => {
258
- const r = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, o = e && e.$attrs$ || Q, n = t.$attrs$ || Q;
259
- for (const i of V(Object.keys(o)))
260
- i in n || Z(r, i, o[i], void 0, s, t.$flags$);
261
- for (const i of V(Object.keys(n)))
262
- Z(r, i, o[i], n[i], s, t.$flags$);
278
+ }, Me = /\s/, J = (e) => (typeof e == "object" && e && "baseVal" in e && (e = e.baseVal), !e || typeof e != "string" ? [] : e.split(Me)), ie = "Capture", Ne = new RegExp(ie + "$"), oe = (e, t, s, r) => {
279
+ const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, i = e && e.$attrs$ || {}, o = t.$attrs$ || {};
280
+ for (const f of Y(Object.keys(i)))
281
+ f in o || Z(
282
+ n,
283
+ f,
284
+ i[f],
285
+ void 0,
286
+ s,
287
+ t.$flags$
288
+ );
289
+ for (const f of Y(Object.keys(o)))
290
+ Z(
291
+ n,
292
+ f,
293
+ i[f],
294
+ o[f],
295
+ s,
296
+ t.$flags$
297
+ );
263
298
  };
264
- function V(e) {
299
+ function Y(e) {
265
300
  return e.includes("ref") ? (
266
301
  // we need to sort these to ensure that `'ref'` is the last attr
267
302
  [...e.filter((t) => t !== "ref"), "ref"]
@@ -270,11 +305,11 @@ function V(e) {
270
305
  e
271
306
  );
272
307
  }
273
- var x, H, R, F = !1, _ = !1, I = !1, h = !1, D = (e, t, s, r) => {
274
- var o;
308
+ var F, M, E, N = !1, D = !1, I = !1, y = !1, C = (e, t, s) => {
309
+ var r;
275
310
  const n = t.$children$[s];
276
- let i = 0, a, c, d;
277
- if (F || (I = !0, n.$tag$ === "slot" && (x && r.classList.add(x + "-s"), n.$flags$ |= n.$children$ ? (
311
+ let i = 0, o, f, c;
312
+ if (N || (I = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
278
313
  // slot element has fallback content
279
314
  // still create an element that "mocks" the slot element
280
315
  2
@@ -284,235 +319,211 @@ var x, H, R, F = !1, _ = !1, I = !1, h = !1, D = (e, t, s, r) => {
284
319
  // where actual slot content should sit next to
285
320
  1
286
321
  ))), n.$text$ !== null)
287
- a = n.$elm$ = M.createTextNode(n.$text$);
322
+ o = n.$elm$ = R.createTextNode(n.$text$);
288
323
  else if (n.$flags$ & 1)
289
- a = n.$elm$ = M.createTextNode("");
324
+ o = n.$elm$ = R.createTextNode("");
290
325
  else {
291
- if (h || (h = n.$tag$ === "svg"), a = n.$elm$ = M.createElementNS(
292
- h ? Te : ke,
293
- !F && E.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
294
- ), h && n.$tag$ === "foreignObject" && (h = !1), ie(null, n, h), !!a.getRootNode().querySelector("body") && E.scoped && xe(x) && a["s-si"] !== x && a.classList.add(a["s-si"] = x), G(a, r), n.$children$)
326
+ if (y || (y = n.$tag$ === "svg"), o = n.$elm$ = R.createElementNS(
327
+ y ? ke : Te,
328
+ !N && w.slotRelocation && n.$flags$ & 2 ? "slot-fb" : n.$tag$
329
+ ), y && n.$tag$ === "foreignObject" && (y = !1), oe(null, n, y), xe(F) && o["s-si"] !== F && o.classList.add(o["s-si"] = F), n.$children$)
295
330
  for (i = 0; i < n.$children$.length; ++i)
296
- c = D(e, n, i, a), c && a.appendChild(c);
297
- n.$tag$ === "svg" ? h = !1 : a.tagName === "foreignObject" && (h = !0);
298
- }
299
- return a["s-hn"] = R, n.$flags$ & 3 && (a["s-sr"] = !0, a["s-cr"] = H, a["s-sn"] = n.$name$ || "", a["s-rf"] = (o = n.$attrs$) == null ? void 0 : o.ref, d = e && e.$children$ && e.$children$[s], d && d.$tag$ === n.$tag$ && e.$elm$ && L(e.$elm$, !1)), a;
300
- }, L = (e, t) => {
301
- j.$flags$ |= 1;
302
- const s = Array.from(e.childNodes);
303
- if (e["s-sr"] && E.experimentalSlotFixes) {
304
- let r = e;
305
- for (; r = r.nextSibling; )
306
- r && r["s-sn"] === e["s-sn"] && r["s-sh"] === R && s.push(r);
331
+ f = C(e, n, i), f && o.appendChild(f);
332
+ n.$tag$ === "svg" ? y = !1 : o.tagName === "foreignObject" && (y = !0);
307
333
  }
334
+ return o["s-hn"] = E, n.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = M, o["s-sn"] = n.$name$ || "", o["s-rf"] = (r = n.$attrs$) == null ? void 0 : r.ref, c = e && e.$children$ && e.$children$[s], c && c.$tag$ === n.$tag$ && e.$elm$ && _(e.$elm$, !1), ue(M, o, t.$elm$, e == null ? void 0 : e.$elm$)), o;
335
+ }, _ = (e, t) => {
336
+ A.$flags$ |= 1;
337
+ const s = Array.from(e.__childNodes || e.childNodes);
338
+ e["s-sr"] && w.experimentalSlotFixes;
308
339
  for (let r = s.length - 1; r >= 0; r--) {
309
- const o = s[r];
310
- o["s-hn"] !== R && o["s-ol"] && (T(ce(o), o, q(o)), o["s-ol"].remove(), o["s-ol"] = void 0, o["s-sh"] = void 0, I = !0), t && L(o, t);
340
+ const n = s[r];
341
+ n["s-hn"] !== E && n["s-ol"] && (k(j(n).parentNode, n, j(n)), n["s-ol"].remove(), n["s-ol"] = void 0, n["s-sh"] = void 0, I = !0), t && _(n, t);
311
342
  }
312
- j.$flags$ &= -2;
313
- }, le = (e, t, s, r, o, n) => {
314
- let i = e["s-cr"] && e["s-cr"].parentNode || e, a;
315
- for (i.shadowRoot && i.tagName === R && (i = i.shadowRoot); o <= n; ++o)
316
- r[o] && (a = D(null, s, o, e), a && (r[o].$elm$ = a, T(i, a, q(t))));
343
+ A.$flags$ &= -2;
344
+ }, le = (e, t, s, r, n, i) => {
345
+ let o = e["s-cr"] && e["s-cr"].parentNode || e, f;
346
+ for (o.shadowRoot && o.tagName === E && (o = o.shadowRoot); n <= i; ++n)
347
+ r[n] && (f = C(null, s, n), f && (r[n].$elm$ = f, k(o, f, j(t))));
317
348
  }, ae = (e, t, s) => {
318
349
  for (let r = t; r <= s; ++r) {
319
- const o = e[r];
320
- if (o) {
321
- const n = o.$elm$;
322
- $e(o), n && (_ = !0, n["s-ol"] ? n["s-ol"].remove() : L(n, !0), n.remove());
350
+ const n = e[r];
351
+ if (n) {
352
+ const i = n.$elm$;
353
+ fe(n), i && (D = !0, i["s-ol"] ? i["s-ol"].remove() : _(i, !0), i.remove());
323
354
  }
324
355
  }
325
- }, _e = (e, t, s, r, o = !1) => {
326
- let n = 0, i = 0, a = 0, c = 0, d = t.length - 1, f = t[0], l = t[d], $ = r.length - 1, u = r[0], p = r[$], m, y;
327
- for (; n <= d && i <= $; )
328
- if (f == null)
329
- f = t[++n];
356
+ }, De = (e, t, s, r, n = !1) => {
357
+ let i = 0, o = 0, f = 0, c = 0, u = t.length - 1, d = t[0], l = t[u], $ = r.length - 1, a = r[0], p = r[$], m, v;
358
+ for (; i <= u && o <= $; )
359
+ if (d == null)
360
+ d = t[++i];
330
361
  else if (l == null)
331
- l = t[--d];
332
- else if (u == null)
333
- u = r[++i];
362
+ l = t[--u];
363
+ else if (a == null)
364
+ a = r[++o];
334
365
  else if (p == null)
335
366
  p = r[--$];
336
- else if (N(f, u, o))
337
- A(f, u, o), f = t[++n], u = r[++i];
338
- else if (N(l, p, o))
339
- A(l, p, o), l = t[--d], p = r[--$];
340
- else if (N(f, p, o))
341
- (f.$tag$ === "slot" || p.$tag$ === "slot") && L(f.$elm$.parentNode, !1), A(f, p, o), T(e, f.$elm$, l.$elm$.nextSibling), f = t[++n], p = r[--$];
342
- else if (N(l, u, o))
343
- (f.$tag$ === "slot" || p.$tag$ === "slot") && L(l.$elm$.parentNode, !1), A(l, u, o), T(e, l.$elm$, f.$elm$), l = t[--d], u = r[++i];
367
+ else if (O(d, a, n))
368
+ x(d, a, n), d = t[++i], a = r[++o];
369
+ else if (O(l, p, n))
370
+ x(l, p, n), l = t[--u], p = r[--$];
371
+ else if (O(d, p, n))
372
+ (d.$tag$ === "slot" || p.$tag$ === "slot") && _(d.$elm$.parentNode, !1), x(d, p, n), k(e, d.$elm$, l.$elm$.nextSibling), d = t[++i], p = r[--$];
373
+ else if (O(l, a, n))
374
+ (d.$tag$ === "slot" || p.$tag$ === "slot") && _(l.$elm$.parentNode, !1), x(l, a, n), k(e, l.$elm$, d.$elm$), l = t[--u], a = r[++o];
344
375
  else {
345
- for (a = -1, c = n; c <= d; ++c)
346
- if (t[c] && t[c].$key$ !== null && t[c].$key$ === u.$key$) {
347
- a = c;
376
+ for (f = -1, c = i; c <= u; ++c)
377
+ if (t[c] && t[c].$key$ !== null && t[c].$key$ === a.$key$) {
378
+ f = c;
348
379
  break;
349
380
  }
350
- a >= 0 ? (y = t[a], y.$tag$ !== u.$tag$ ? m = D(t && t[i], s, a, e) : (A(y, u, o), t[a] = void 0, m = y.$elm$), u = r[++i]) : (m = D(t && t[i], s, i, e), u = r[++i]), m && T(ce(f.$elm$), m, q(f.$elm$));
381
+ f >= 0 ? (v = t[f], v.$tag$ !== a.$tag$ ? m = C(t && t[o], s, f) : (x(v, a, n), t[f] = void 0, m = v.$elm$), a = r[++o]) : (m = C(t && t[o], s, o), a = r[++o]), m && k(
382
+ j(d.$elm$).parentNode,
383
+ m,
384
+ j(d.$elm$)
385
+ );
351
386
  }
352
- n > d ? le(
387
+ i > u ? le(
353
388
  e,
354
389
  r[$ + 1] == null ? null : r[$ + 1].$elm$,
355
390
  s,
356
391
  r,
357
- i,
392
+ o,
358
393
  $
359
- ) : i > $ && ae(t, n, d);
360
- }, N = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? (
361
- // The component gets hydrated and no VDOM has been initialized.
362
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
363
- "$nodeId$" in e && s && // `leftNode` is not from type HTMLComment which would cause many
364
- // hydration comments to be removed
365
- e.$elm$.nodeType !== 8 ? !1 : e.$name$ === t.$name$
366
- ) : s ? !0 : e.$key$ === t.$key$ : !1, q = (e) => e && e["s-ol"] || e, ce = (e) => (e["s-ol"] ? e["s-ol"] : e).parentNode, A = (e, t, s = !1) => {
367
- const r = t.$elm$ = e.$elm$, o = e.$children$, n = t.$children$, i = t.$tag$, a = t.$text$;
394
+ ) : o > $ && ae(t, i, u);
395
+ }, O = (e, t, s = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : s ? (s && !e.$key$ && t.$key$ && (e.$key$ = t.$key$), !0) : e.$key$ === t.$key$ : !1, j = (e) => e && e["s-ol"] || e, x = (e, t, s = !1) => {
396
+ const r = t.$elm$ = e.$elm$, n = e.$children$, i = t.$children$, o = t.$tag$, f = t.$text$;
368
397
  let c;
369
- a === null ? (h = i === "svg" ? !0 : i === "foreignObject" ? !1 : h, i === "slot" && !F || ie(e, t, h), o !== null && n !== null ? _e(r, o, t, n, s) : n !== null ? (e.$text$ !== null && (r.textContent = ""), le(r, null, t, n, 0, n.length - 1)) : (
398
+ f === null ? (y = o === "svg" ? !0 : o === "foreignObject" ? !1 : y, o === "slot" && !N || oe(e, t, y), n !== null && i !== null ? De(r, n, t, i, s) : i !== null ? (e.$text$ !== null && (r.textContent = ""), le(r, null, t, i, 0, i.length - 1)) : (
370
399
  // don't do this on initial render as it can cause non-hydrated content to be removed
371
- !s && E.updatable && o !== null && ae(o, 0, o.length - 1)
372
- ), h && i === "svg" && (h = !1)) : (c = r["s-cr"]) ? c.parentNode.textContent = a : e.$text$ !== a && (r.data = a);
373
- }, fe = (e) => {
374
- const t = e.childNodes;
375
- for (const s of t)
376
- if (s.nodeType === 1) {
377
- if (s["s-sr"]) {
378
- const r = s["s-sn"];
379
- s.hidden = !1;
380
- for (const o of t)
381
- if (o !== s) {
382
- if (o["s-hn"] !== s["s-hn"] || r !== "") {
383
- if (o.nodeType === 1 && (r === o.getAttribute("slot") || r === o["s-sn"]) || o.nodeType === 3 && r === o["s-sn"]) {
384
- s.hidden = !0;
385
- break;
386
- }
387
- } else if (o.nodeType === 1 || o.nodeType === 3 && o.textContent.trim() !== "") {
388
- s.hidden = !0;
389
- break;
390
- }
391
- }
392
- }
393
- fe(s);
394
- }
395
- }, b = [], ue = (e) => {
400
+ !s && w.updatable && n !== null && ae(n, 0, n.length - 1)
401
+ ), y && o === "svg" && (y = !1)) : (c = r["s-cr"]) ? c.parentNode.textContent = f : e.$text$ !== f && (r.data = f);
402
+ }, b = [], ce = (e) => {
396
403
  let t, s, r;
397
- for (const o of e.childNodes) {
398
- if (o["s-sr"] && (t = o["s-cr"]) && t.parentNode) {
399
- s = t.parentNode.childNodes;
400
- const n = o["s-sn"];
404
+ const n = e.__childNodes || e.childNodes;
405
+ for (const i of n) {
406
+ if (i["s-sr"] && (t = i["s-cr"]) && t.parentNode) {
407
+ s = t.parentNode.__childNodes || t.parentNode.childNodes;
408
+ const o = i["s-sn"];
401
409
  for (r = s.length - 1; r >= 0; r--)
402
- if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== o["s-hn"] && !E.experimentalSlotFixes)
403
- if (ee(t, n)) {
404
- let i = b.find((a) => a.$nodeToRelocate$ === t);
405
- _ = !0, t["s-sn"] = t["s-sn"] || n, i ? (i.$nodeToRelocate$["s-sh"] = o["s-hn"], i.$slotRefNode$ = o) : (t["s-sh"] = o["s-hn"], b.push({
406
- $slotRefNode$: o,
410
+ if (t = s[r], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== i["s-hn"])
411
+ if (Q(t, o)) {
412
+ let f = b.find((c) => c.$nodeToRelocate$ === t);
413
+ D = !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"], b.push({
414
+ $slotRefNode$: i,
407
415
  $nodeToRelocate$: t
408
- })), t["s-sr"] && b.map((a) => {
409
- ee(a.$nodeToRelocate$, t["s-sn"]) && (i = b.find((c) => c.$nodeToRelocate$ === t), i && !a.$slotRefNode$ && (a.$slotRefNode$ = i.$slotRefNode$));
416
+ })), t["s-sr"] && b.map((c) => {
417
+ Q(c.$nodeToRelocate$, t["s-sn"]) && (f = b.find((u) => u.$nodeToRelocate$ === t), f && !c.$slotRefNode$ && (c.$slotRefNode$ = f.$slotRefNode$));
410
418
  });
411
- } else b.some((i) => i.$nodeToRelocate$ === t) || b.push({
419
+ } else b.some((f) => f.$nodeToRelocate$ === t) || b.push({
412
420
  $nodeToRelocate$: t
413
421
  });
414
422
  }
415
- o.nodeType === 1 && ue(o);
423
+ i.nodeType === 1 && ce(i);
416
424
  }
417
- }, ee = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", $e = (e) => {
418
- e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map($e);
419
- }, T = (e, t, s) => {
420
- const r = e == null ? void 0 : e.insertBefore(t, s);
421
- return G(t, e), r;
422
- }, de = (e) => {
423
- const t = [];
424
- return e && t.push(
425
- ...e["s-scs"] || [],
426
- e["s-si"],
427
- e["s-sc"],
428
- ...de(e.parentElement)
429
- ), t;
430
- }, G = (e, t, s = !1) => {
431
- var r;
432
- if (e && t && e.nodeType === 1) {
433
- const o = new Set(de(t).filter(Boolean));
434
- if (o.size && ((r = e.classList) == null || r.add(...e["s-scs"] = Array.from(o)), e["s-ol"] || s))
435
- for (const n of Array.from(e.childNodes))
436
- G(n, e, !0);
425
+ }, fe = (e) => {
426
+ e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(fe);
427
+ }, k = (e, t, s) => (typeof t["s-sn"] == "string" && t["s-sr"] && t["s-cr"] && ue(t["s-cr"], t, e, t.parentElement), e == null ? void 0 : e.insertBefore(t, s));
428
+ function ue(e, t, s, r) {
429
+ var n;
430
+ let i;
431
+ if (e && typeof t["s-sn"] == "string" && t["s-sr"] && e.parentNode && e.parentNode["s-sc"] && (i = t["s-si"] || e.parentNode["s-sc"])) {
432
+ const o = t["s-sn"], f = t["s-hn"];
433
+ if ((n = s.classList) == null || n.add(i + "-s"), r && r.classList.contains(i + "-s")) {
434
+ let c = (r.__childNodes || r.childNodes)[0], u = !1;
435
+ for (; c; ) {
436
+ if (c["s-sn"] !== o && c["s-hn"] === f && c["s-sr"]) {
437
+ u = !0;
438
+ break;
439
+ }
440
+ c = c.nextSibling;
441
+ }
442
+ u || r.classList.remove(i + "-s");
443
+ }
437
444
  }
438
- }, De = (e, t, s = !1) => {
439
- var r, o, n, i, a;
440
- const c = e.$hostElement$, d = e.$cmpMeta$, f = e.$vnode$ || W(null, null), l = Ne(t) ? t : Le(null, null, t);
441
- if (R = c.tagName, d.$attrsToReflect$ && (l.$attrs$ = l.$attrs$ || {}, d.$attrsToReflect$.map(
442
- ([$, u]) => l.$attrs$[u] = c[$]
445
+ }
446
+ var Ce = (e, t, s = !1) => {
447
+ var r, n, i, o, f;
448
+ const c = e.$hostElement$, u = e.$cmpMeta$, d = e.$vnode$ || q(null, null), l = Fe(t) ? t : Oe(null, null, t);
449
+ if (E = c.tagName, u.$attrsToReflect$ && (l.$attrs$ = l.$attrs$ || {}, u.$attrsToReflect$.map(
450
+ ([$, a]) => l.$attrs$[a] = c[$]
443
451
  )), s && l.$attrs$)
444
452
  for (const $ of Object.keys(l.$attrs$))
445
453
  c.hasAttribute($) && !["key", "ref", "style", "class"].includes($) && (l.$attrs$[$] = c[$]);
446
- l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = f.$elm$ = c.shadowRoot || c, x = c["s-sc"], F = (d.$flags$ & 1) !== 0, H = c["s-cr"], _ = !1, A(f, l, s);
454
+ l.$tag$ = null, l.$flags$ |= 4, e.$vnode$ = l, l.$elm$ = d.$elm$ = c.shadowRoot || c, F = c["s-sc"], N = (u.$flags$ & 1) !== 0, M = c["s-cr"], D = !1, x(d, l, s);
447
455
  {
448
- if (j.$flags$ |= 1, I) {
449
- ue(l.$elm$);
456
+ if (A.$flags$ |= 1, I) {
457
+ ce(l.$elm$);
450
458
  for (const $ of b) {
451
- const u = $.$nodeToRelocate$;
452
- if (!u["s-ol"]) {
453
- const p = M.createTextNode("");
454
- p["s-nr"] = u, T(u.parentNode, u["s-ol"] = p, u);
459
+ const a = $.$nodeToRelocate$;
460
+ if (!a["s-ol"]) {
461
+ const p = R.createTextNode("");
462
+ p["s-nr"] = a, k(a.parentNode, a["s-ol"] = p, a);
455
463
  }
456
464
  }
457
465
  for (const $ of b) {
458
- const u = $.$nodeToRelocate$, p = $.$slotRefNode$;
466
+ const a = $.$nodeToRelocate$, p = $.$slotRefNode$;
459
467
  if (p) {
460
468
  const m = p.parentNode;
461
- let y = p.nextSibling;
469
+ let v = p.nextSibling;
462
470
  {
463
- let O = (r = u["s-ol"]) == null ? void 0 : r.previousSibling;
464
- for (; O; ) {
465
- let v = (o = O["s-nr"]) != null ? o : null;
466
- if (v && v["s-sn"] === u["s-sn"] && m === v.parentNode) {
467
- for (v = v.nextSibling; v === u || v != null && v["s-sr"]; )
468
- v = v == null ? void 0 : v.nextSibling;
469
- if (!v || !v["s-nr"]) {
470
- y = v;
471
+ let L = (r = a["s-ol"]) == null ? void 0 : r.previousSibling;
472
+ for (; L; ) {
473
+ let h = (n = L["s-nr"]) != null ? n : null;
474
+ if (h && h["s-sn"] === a["s-sn"] && m === (h.__parentNode || h.parentNode)) {
475
+ for (h = h.nextSibling; h === a || h != null && h["s-sr"]; )
476
+ h = h == null ? void 0 : h.nextSibling;
477
+ if (!h || !h["s-nr"]) {
478
+ v = h;
471
479
  break;
472
480
  }
473
481
  }
474
- O = O.previousSibling;
482
+ L = L.previousSibling;
475
483
  }
476
484
  }
477
- (!y && m !== u.parentNode || u.nextSibling !== y) && u !== y && (!u["s-hn"] && u["s-ol"] && (u["s-hn"] = u["s-ol"].parentNode.nodeName), T(m, u, y), u.nodeType === 1 && (u.hidden = (n = u["s-ih"]) != null ? n : !1)), u && typeof p["s-rf"] == "function" && p["s-rf"](u);
485
+ const pe = a.__parentNode || a.parentNode, ge = a.__nextSibling || a.nextSibling;
486
+ (!v && m !== pe || ge !== v) && a !== v && (!a["s-hn"] && a["s-ol"] && (a["s-hn"] = a["s-ol"].parentNode.nodeName), k(m, a, v), a.nodeType === 1 && a.tagName !== "SLOT-FB" && (a.hidden = (i = a["s-ih"]) != null ? i : !1)), a && typeof p["s-rf"] == "function" && p["s-rf"](a);
478
487
  } else
479
- u.nodeType === 1 && (s && (u["s-ih"] = (i = u.hidden) != null ? i : !1), u.hidden = !0);
488
+ a.nodeType === 1 && (s && (a["s-ih"] = (o = a.hidden) != null ? o : !1), a.hidden = !0);
480
489
  }
481
490
  }
482
- _ && fe(l.$elm$), j.$flags$ &= -2, b.length = 0;
491
+ D && re(l.$elm$), A.$flags$ &= -2, b.length = 0;
492
+ }
493
+ if (w.experimentalScopedSlotChanges && u.$flags$ & 2) {
494
+ const $ = l.$elm$.__childNodes || l.$elm$.childNodes;
495
+ for (const a of $)
496
+ a["s-hn"] !== E && !a["s-sh"] && (s && a["s-ih"] == null && (a["s-ih"] = (f = a.hidden) != null ? f : !1), a.hidden = !0);
483
497
  }
484
- if (E.experimentalScopedSlotChanges && d.$flags$ & 2)
485
- for (const $ of l.$elm$.childNodes)
486
- $["s-hn"] !== R && !$["s-sh"] && (s && $["s-ih"] == null && ($["s-ih"] = (a = $.hidden) != null ? a : !1), $.hidden = !0);
487
- H = void 0;
498
+ M = void 0;
488
499
  };
489
- const Ce = (e, t, s) => {
500
+ const Ue = (e, t, s) => {
490
501
  [null, void 0, "", !1].includes(s) || ["innerHTML", "style"].includes(t) || e.setAttribute(t, ["object", "function"].includes(typeof s) ? "/!\\ Object props are not rendered in the code example" : s);
491
- }, pe = (e, t, s, r, o) => {
502
+ }, de = (e, t, s, r, n) => {
492
503
  if (t && typeof t == "string") {
493
- const n = document.createElement(t);
494
- Object.keys(s || {}).forEach((i) => {
495
- Ce(n, i, s[i]);
496
- }), r == null || r.forEach((i) => {
497
- pe(n, i.$tag$, i.$attrs$, i.$children$, i.$text$);
498
- }), s != null && s.innerHTML && (n.innerHTML = s.innerHTML), e.appendChild(n);
504
+ const i = document.createElement(t);
505
+ Object.keys(s || {}).forEach((o) => {
506
+ Ue(i, o, s[o]);
507
+ }), r == null || r.forEach((o) => {
508
+ de(i, o.$tag$, o.$attrs$, o.$children$, o.$text$);
509
+ }), s != null && s.innerHTML && (i.innerHTML = s.innerHTML), e.appendChild(i);
499
510
  }
500
- o && (e.innerHTML = o);
501
- }, st = (e, t) => {
511
+ n && (e.innerHTML = n);
512
+ }, rt = (e, t) => {
502
513
  const s = {};
503
514
  if (typeof e != "object")
504
515
  throw new Error("filterArgs - args isn't an object.");
505
516
  for (const r in e)
506
517
  if (!r.startsWith("slot")) {
507
- const o = e[r], n = r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
508
- (!t || !Object.keys(t).includes(r) || t[r] !== o) && (s[n] = o);
518
+ const n = e[r], i = r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
519
+ (!t || !Object.keys(t).includes(r) || t[r] !== n) && (s[i] = n);
509
520
  }
510
521
  return s;
511
- }, rt = (e, t) => {
512
- var r, o;
522
+ }, nt = (e, t) => {
523
+ var r, n;
513
524
  const s = document.getElementById("storybook-root");
514
525
  if (s !== null)
515
- return (o = document.querySelector("[lang]")) == null || o.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"), De(
526
+ return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"), Ce(
516
527
  {
517
528
  $ancestorComponent$: void 0,
518
529
  $flags$: 0,
@@ -525,17 +536,17 @@ const Ce = (e, t, s) => {
525
536
  },
526
537
  e(t)
527
538
  ), s.children[s.children.length - 1];
528
- }, ot = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {
529
- const o = document.createElement("div");
530
- return pe(o, e, t, s, r), o.innerHTML;
531
- }, C = (e, t) => {
539
+ }, it = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {
540
+ const n = document.createElement("div");
541
+ return de(n, e, t, s, r), n.innerHTML;
542
+ }, U = (e, t) => {
532
543
  if (!t)
533
544
  return;
534
545
  const s = t.split("/");
535
546
  return `${e}${s.slice(2, s.length - 1).join("-")}--docs`;
536
547
  };
537
- var S, w;
538
- class nt {
548
+ var S, H;
549
+ class ot {
539
550
  constructor(t) {
540
551
  /**
541
552
  * JsonDocs
@@ -546,14 +557,14 @@ class nt {
546
557
  * @param tagName - tag name we want to get the data from
547
558
  * @returns component data
548
559
  */
549
- P(this, S, (t) => this.jsonDoc.components.find((s) => s.tag === t));
560
+ B(this, S, (t) => this.jsonDoc.components.find((s) => s.tag === t));
550
561
  /**
551
562
  * Get the control for the given prop
552
563
  * Based on https://storybook.js.org/docs/api/arg-types#controltype
553
564
  * @param prop - prop to get control for
554
565
  * @returns control type and options if applicable
555
566
  */
556
- P(this, w, (t) => {
567
+ B(this, H, (t) => {
557
568
  const s = t.type.replace(/"([^"]+)"/g, "$1").replace(/\s/g, "").replace(/\(.*?\)/g, (r) => r.replace(/\|/g, " OR ")).split("|").map((r) => r.trim().replace(/ OR /g, "|"));
558
569
  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" } } : s.length > 1 ? s.includes("string") ? { control: { type: "text" } } : s.every((r) => r == null ? void 0 : r.includes("[]")) ? { control: { type: "object" } } : (s.unshift(void 0), { control: { type: "select" }, options: s }) : { control: { type: "object" } };
559
570
  });
@@ -563,10 +574,10 @@ class nt {
563
574
  * @returns component arg types
564
575
  */
565
576
  g(this, "extractArgTypes", (t) => {
566
- const s = k(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((f, l) => {
567
- const { control: $, options: u } = k(this, w).call(this, l);
577
+ const s = T(this, S).call(this, t), r = s == null ? void 0 : s.props.reduce((d, l) => {
578
+ const { control: $, options: a } = T(this, H).call(this, l);
568
579
  return {
569
- ...f,
580
+ ...d,
570
581
  [l.name]: {
571
582
  name: l.attr || l.name,
572
583
  description: l.docs,
@@ -577,12 +588,12 @@ class nt {
577
588
  defaultValue: { summary: l.default }
578
589
  },
579
590
  control: $,
580
- options: u
591
+ options: a
581
592
  }
582
593
  };
583
- }, {}), o = s == null ? void 0 : s.events.reduce(
584
- (f, l) => ({
585
- ...f,
594
+ }, {}), n = s == null ? void 0 : s.events.reduce(
595
+ (d, l) => ({
596
+ ...d,
586
597
  [l.event]: {
587
598
  name: l.event,
588
599
  description: l.docs,
@@ -593,9 +604,9 @@ class nt {
593
604
  }
594
605
  }),
595
606
  {}
596
- ), n = s == null ? void 0 : s.methods.reduce(
597
- (f, l) => ({
598
- ...f,
607
+ ), i = s == null ? void 0 : s.methods.reduce(
608
+ (d, l) => ({
609
+ ...d,
599
610
  [l.name]: {
600
611
  name: l.name,
601
612
  description: l.docs,
@@ -606,9 +617,9 @@ class nt {
606
617
  }
607
618
  }),
608
619
  {}
609
- ), i = s == null ? void 0 : s.slots.reduce(
610
- (f, l) => ({
611
- ...f,
620
+ ), o = s == null ? void 0 : s.slots.reduce(
621
+ (d, l) => ({
622
+ ...d,
612
623
  [l.name]: {
613
624
  name: l.name !== "" ? l.name : "default",
614
625
  // default slot are unnamed
@@ -620,9 +631,9 @@ class nt {
620
631
  }
621
632
  }),
622
633
  {}
623
- ), a = s == null ? void 0 : s.styles.reduce(
624
- (f, l) => ({
625
- ...f,
634
+ ), f = s == null ? void 0 : s.styles.reduce(
635
+ (d, l) => ({
636
+ ...d,
626
637
  [l.name]: {
627
638
  name: l.name,
628
639
  description: l.docs,
@@ -633,26 +644,26 @@ class nt {
633
644
  }
634
645
  }),
635
646
  {}
636
- ), c = s == null ? void 0 : s.dependencies.reduce((f, l) => {
637
- const $ = k(this, S).call(this, l);
647
+ ), c = s == null ? void 0 : s.dependencies.reduce((d, l) => {
648
+ const $ = T(this, S).call(this, l);
638
649
  return {
639
- ...f,
650
+ ...d,
640
651
  [l]: {
641
652
  name: l,
642
- description: `<a href="./?path=/docs/${C("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
653
+ description: `<a href="./?path=/docs/${U("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
643
654
  table: {
644
655
  category: "depends on",
645
656
  type: { summary: void 0 }
646
657
  }
647
658
  }
648
659
  };
649
- }, {}), d = s == null ? void 0 : s.dependents.reduce((f, l) => {
650
- const $ = k(this, S).call(this, l);
660
+ }, {}), u = s == null ? void 0 : s.dependents.reduce((d, l) => {
661
+ const $ = T(this, S).call(this, l);
651
662
  return {
652
- ...f,
663
+ ...d,
653
664
  [l]: {
654
665
  name: l,
655
- description: `<a href="./?path=/docs/${C("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
666
+ description: `<a href="./?path=/docs/${U("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
656
667
  table: {
657
668
  category: "used by",
658
669
  type: { summary: void 0 }
@@ -662,12 +673,12 @@ class nt {
662
673
  }, {});
663
674
  return {
664
675
  ...r,
665
- ...o,
666
676
  ...n,
667
677
  ...i,
668
- ...a,
678
+ ...o,
679
+ ...f,
669
680
  ...c,
670
- ...d
681
+ ...u
671
682
  };
672
683
  });
673
684
  /**
@@ -676,118 +687,118 @@ class nt {
676
687
  * @returns component description
677
688
  */
678
689
  g(this, "extractComponentDescription", (t) => {
679
- const s = k(this, S).call(this, t);
690
+ const s = T(this, S).call(this, t);
680
691
  return (s == null ? void 0 : s.readme) || (s == null ? void 0 : s.docs);
681
692
  });
682
693
  this.jsonDoc = t;
683
694
  }
684
695
  }
685
- S = new WeakMap(), w = new WeakMap();
686
- const we = (e, t) => {
696
+ S = new WeakMap(), H = new WeakMap();
697
+ const He = (e, t) => {
687
698
  if (t)
688
699
  return `${e}${t}`;
689
- }, ge = (e) => {
700
+ }, $e = (e) => {
690
701
  let t = e.overview ? `${e.overview}
691
702
 
692
703
  ` : "";
693
- const s = e.props.filter(({ attr: o }) => o !== void 0);
704
+ const s = e.props.filter(({ attr: n }) => n !== void 0);
694
705
  s.length && (t += `Attributes:
695
- `, t += s.map(({ attr: o, docs: n }) => `- \`${o}\`: ${n}
706
+ `, t += s.map(({ attr: n, docs: i }) => `- \`${n}\`: ${i}
696
707
  `).join(""), t += `
697
708
  `);
698
- const r = e.props.filter(({ attr: o }) => o === void 0);
709
+ const r = e.props.filter(({ attr: n }) => n === void 0);
699
710
  return r.length && (t += `Properties:
700
- `, t += r.map(({ name: o, docs: n }) => `- \`${o}\`: ${n}
711
+ `, t += r.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
701
712
  `).join(""), t += `
702
713
  `), e.methods.length && (t += `Methods:
703
- `, t += e.methods.map(({ name: o, docs: n }) => `- \`${o}\`: ${n}
714
+ `, t += e.methods.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
704
715
  `).join(""), t += `
705
716
  `), e.events.length && (t += `Events:
706
- `, t += e.events.map(({ event: o, docs: n }) => `- \`${o}\`: ${n}
717
+ `, t += e.events.map(({ event: n, docs: i }) => `- \`${n}\`: ${i}
707
718
  `).join(""), t += `
708
719
  `), e.listeners.length && (t += `Listeners:
709
- `, t += e.listeners.map(({ event: o }) => `- \`${o}\`
720
+ `, t += e.listeners.map(({ event: n }) => `- \`${n}\`
710
721
  `).join(""), t += `
711
722
  `), e.slots.length && (t += `Slots:
712
- `, t += e.slots.map(({ name: o, docs: n }) => `- \`${o}\`: ${n}
723
+ `, t += e.slots.map(({ name: n, docs: i }) => `- \`${n}\`: ${i}
713
724
  `).join(""), t += `
714
725
  `), t;
715
- }, z = (e) => `${e.docs}
726
+ }, W = (e) => `${e.docs}
716
727
 
717
- Type: \`${e.type}\``, it = (e, t, s, r) => ({
728
+ Type: \`${e.type}\``, lt = (e, t, s, r) => ({
718
729
  $schema: "https://json.schemastore.org/web-types",
719
730
  name: e,
720
731
  version: t,
721
732
  "description-markup": "markdown",
722
733
  contributions: {
723
734
  html: {
724
- elements: s.components.map((o) => {
725
- const n = C(r, o.filePath);
735
+ elements: s.components.map((n) => {
736
+ const i = U(r, n.filePath);
726
737
  return {
727
- name: o.tag,
728
- description: ge(o),
729
- "doc-url": n,
730
- attributes: o.props.filter((i) => i.attr).map((i) => ({
731
- name: i.attr,
732
- description: z(i),
733
- "doc-url": n,
738
+ name: n.tag,
739
+ description: $e(n),
740
+ "doc-url": i,
741
+ attributes: n.props.filter((o) => o.attr).map((o) => ({
742
+ name: o.attr,
743
+ description: W(o),
744
+ "doc-url": i,
734
745
  value: {
735
- type: i.type,
736
- default: i.default,
737
- required: i.required
746
+ type: o.type,
747
+ default: o.default,
748
+ required: o.required
738
749
  }
739
750
  })),
740
751
  js: {
741
- properties: o.props.map((i) => ({
742
- name: i.name,
743
- description: z(i),
744
- "doc-url": n,
752
+ properties: n.props.map((o) => ({
753
+ name: o.name,
754
+ description: W(o),
755
+ "doc-url": i,
745
756
  value: {
746
- type: i.type,
747
- default: i.default,
748
- required: i.required
757
+ type: o.type,
758
+ default: o.default,
759
+ required: o.required
749
760
  }
750
761
  })),
751
- events: o.events.map((i) => ({
752
- name: i.event,
753
- description: i.docs
762
+ events: n.events.map((o) => ({
763
+ name: o.event,
764
+ description: o.docs
754
765
  }))
755
766
  },
756
767
  css: {
757
- properties: o.styles.map((i) => ({
758
- name: i.name,
759
- description: i.docs
768
+ properties: n.styles.map((o) => ({
769
+ name: o.name,
770
+ description: o.docs
760
771
  }))
761
772
  }
762
773
  };
763
774
  })
764
775
  }
765
776
  }
766
- }), Pe = (e, t, s) => [
767
- { name: "Storybook", url: C(e, s) },
768
- { name: "Sources", url: we(t, s) }
769
- ], Ue = (e) => {
777
+ }), we = (e, t, s) => [
778
+ { name: "Storybook", url: U(e, s) },
779
+ { name: "Sources", url: He(t, s) }
780
+ ], Be = (e) => {
770
781
  if (!e.values.some(({ value: t }) => t === void 0))
771
782
  return e.values.map(({ value: t }) => ({ name: t }));
772
- }, lt = (e, t, s) => ({
783
+ }, at = (e, t, s) => ({
773
784
  version: 1.1,
774
785
  tags: e.components.map((r) => {
775
- const o = Pe(t, s, r.filePath);
786
+ const n = we(t, s, r.filePath);
776
787
  return {
777
788
  name: r.tag,
778
- description: ge(r),
779
- attributes: r.props.map((n) => ({
780
- name: n.attr || n.name,
781
- description: z(n),
782
- values: Ue(n),
783
- references: o
789
+ description: $e(r),
790
+ attributes: r.props.map((i) => ({
791
+ name: i.attr || i.name,
792
+ description: W(i),
793
+ values: Be(i),
794
+ references: n
784
795
  })),
785
- references: o
796
+ references: n
786
797
  };
787
798
  }),
788
799
  globalAttributes: [],
789
800
  valueSets: []
790
- }), at = (e) => ({
801
+ }), ct = (e) => ({
791
802
  version: 1.1,
792
803
  properties: e.components.flatMap(
793
804
  (t) => t.styles.map((s) => ({
@@ -795,31 +806,31 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
795
806
  description: s.docs
796
807
  }))
797
808
  )
798
- }), ct = (e) => {
809
+ }), ft = (e) => {
799
810
  const t = { value: "2023", pattern: "yyyy" }, s = { value: "12", pattern: "mm" }, r = { value: "24", pattern: "dd" };
800
- return ze([t.value, s.value, r.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
801
- }, ft = (e) => e.toISOString().split("T")[0], We = (e, t, s) => {
802
- const r = e.closest("[lang]"), o = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), n = o.length > 0 && typeof o[0] == "string" ? o[0] : navigator.language || s, i = n.split("-").shift();
811
+ return We([t.value, s.value, r.value].join("-"), e, { timeZone: "UTC" }).replace(t.value, t.pattern).replace(s.value, s.pattern).replace(r.value, r.pattern);
812
+ }, ut = (e) => e.toISOString().split("T")[0], Pe = (e, t, s) => {
813
+ const r = e.closest("[lang]"), n = Intl.NumberFormat.supportedLocalesOf(r == null ? void 0 : r.lang), i = n.length > 0 && typeof n[0] == "string" ? n[0] : navigator.language || s, o = i.split("-").shift();
803
814
  return Object.keys(t).length === 0 ? {
804
- locale: n,
815
+ locale: i,
805
816
  messages: { lang: s }
806
817
  } : {
807
- locale: n,
808
- messages: t[i] || t[s] || { lang: s }
818
+ locale: i,
819
+ messages: t[o] || t[s] || { lang: s }
809
820
  };
810
- }, ut = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), $t = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), dt = (e, t, s = 0) => new Intl.NumberFormat(t, {
821
+ }, dt = (e, t, s) => new Intl.NumberFormat(t, { style: "currency", currency: s }).format(e), $t = (e, t, s = 0) => new Intl.NumberFormat(t, { minimumFractionDigits: s }).format(s > 0 ? Number(e == null ? void 0 : e.toFixed(s)) : e), pt = (e, t, s = 0) => new Intl.NumberFormat(t, {
811
822
  style: "percent",
812
823
  minimumFractionDigits: s,
813
824
  maximumFractionDigits: s
814
- }).format(e), pt = (e, t, s, r = "short", o = 0) => new Intl.NumberFormat(t, {
825
+ }).format(e), gt = (e, t, s, r = "short", n = 0) => new Intl.NumberFormat(t, {
815
826
  style: "unit",
816
827
  unit: s,
817
828
  unitDisplay: r,
818
- minimumFractionDigits: o,
819
- maximumFractionDigits: o
820
- }).format(e), He = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, ze = (e, t, s) => typeof e != "string" || e === "" || !He.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), gt = (e, t) => (s) => We(s, e, t), vt = ({ disconnect: e, observe: t, takeRecords: s }) => {
829
+ minimumFractionDigits: n,
830
+ maximumFractionDigits: n
831
+ }).format(e), qe = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, We = (e, t, s) => typeof e != "string" || e === "" || !qe.test(e) ? "" : new Intl.DateTimeFormat(t, s).format(new Date(e)), ht = (e, t) => (s) => Pe(s, e, t), yt = ({ disconnect: e, observe: t, takeRecords: s }) => {
821
832
  class r {
822
- constructor(n) {
833
+ constructor(i) {
823
834
  /**
824
835
  *
825
836
  */
@@ -836,19 +847,19 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
836
847
  *
837
848
  */
838
849
  g(this, "cb");
839
- this.cb = n;
850
+ this.cb = i;
840
851
  }
841
852
  }
842
- return [window, global].forEach((o) => {
843
- Object.defineProperty(o, "MutationObserver", {
853
+ return [window, global].forEach((n) => {
854
+ Object.defineProperty(n, "MutationObserver", {
844
855
  writable: !0,
845
856
  configurable: !0,
846
857
  value: r
847
858
  });
848
859
  }), r;
849
- }, ht = ({ disconnect: e, observe: t }) => {
860
+ }, vt = ({ disconnect: e, observe: t }) => {
850
861
  class s {
851
- constructor(o) {
862
+ constructor(n) {
852
863
  /**
853
864
  *
854
865
  */
@@ -865,7 +876,7 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
865
876
  *
866
877
  */
867
878
  g(this, "cb");
868
- this.cb = o;
879
+ this.cb = n;
869
880
  }
870
881
  }
871
882
  return [window, global].forEach((r) => {
@@ -876,7 +887,7 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
876
887
  });
877
888
  }), s;
878
889
  };
879
- class Be extends Event {
890
+ class ze extends Event {
880
891
  constructor() {
881
892
  super(...arguments);
882
893
  /**
@@ -886,8 +897,8 @@ class Be extends Event {
886
897
  }
887
898
  // eslint-disable-line @typescript-eslint/no-explicit-any
888
899
  }
889
- const yt = () => {
890
- class e extends Be {
900
+ const mt = () => {
901
+ class e extends ze {
891
902
  }
892
903
  return [window, global].forEach((t) => {
893
904
  Object.defineProperty(t, "SubmitEvent", {
@@ -896,40 +907,50 @@ const yt = () => {
896
907
  value: e
897
908
  });
898
909
  }), e;
910
+ }, bt = (e) => {
911
+ const t = (s) => (setTimeout(s, 1), e(), 0);
912
+ return [window, global].forEach((s) => {
913
+ Object.defineProperty(s, "requestAnimationFrame", {
914
+ writable: !0,
915
+ configurable: !0,
916
+ value: t
917
+ });
918
+ }), t;
899
919
  };
900
920
  export {
901
- Xe as ClassList,
902
- nt as StorybookPreview,
903
- Je as allItemsAreString,
904
- et as cleanString,
905
- qe as createID,
906
- He as dateRegExp,
907
- ft as dateToString,
908
- gt as defineLocales,
909
- st as filterArgs,
910
- Qe as focusableElements,
911
- ct as getLocaleDatePattern,
912
- te as getParentWindows,
913
- ot as getStoryHTML,
914
- C as getStorybookUrl,
915
- Ze as getWindows,
916
- Ke as isTagName,
917
- Ve as isValidNumber,
921
+ Ke as ClassList,
922
+ ot as StorybookPreview,
923
+ Qe as allItemsAreString,
924
+ tt as cleanString,
925
+ Ge as createID,
926
+ qe as dateRegExp,
927
+ ut as dateToString,
928
+ ht as defineLocales,
929
+ rt as filterArgs,
930
+ Je as focusableElements,
931
+ ft as getLocaleDatePattern,
932
+ V as getParentWindows,
933
+ it as getStoryHTML,
934
+ U as getStorybookUrl,
935
+ Ye as getWindows,
936
+ Ze as isTagName,
937
+ et as isValidNumber,
918
938
  me as isValidString,
919
- Ge as isValideID,
920
- ut as localeCurrency,
921
- ze as localeDate,
939
+ Xe as isValideID,
940
+ dt as localeCurrency,
941
+ We as localeDate,
922
942
  $t as localeNumber,
923
- dt as localePercent,
924
- pt as localeUnit,
925
- tt as nextTick,
926
- vt as setupMutationObserverMock,
927
- ht as setupResizeObserverMock,
928
- yt as setupSubmitEventMock,
929
- rt as stencilWrapper,
930
- Ye as toString,
931
- at as vsCodeCssGenerator,
932
- lt as vsCodeGenerator,
933
- it as webTypesGenerator
943
+ pt as localePercent,
944
+ gt as localeUnit,
945
+ st as nextTick,
946
+ bt as setUpRequestAnimationFrameMock,
947
+ yt as setupMutationObserverMock,
948
+ vt as setupResizeObserverMock,
949
+ mt as setupSubmitEventMock,
950
+ nt as stencilWrapper,
951
+ Ve as toString,
952
+ ct as vsCodeCssGenerator,
953
+ at as vsCodeGenerator,
954
+ lt as webTypesGenerator
934
955
  };
935
956
  //# sourceMappingURL=index.es.js.map