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