@mgdis/stencil-helpers 2.2.1 → 2.2.2

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 pe = 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 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) => {
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
+ }, Ie = (e) => ye(e) && /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/.exec(e) !== null;
14
+ class Ge {
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 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) => {
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
+ }, 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 = {
68
68
  allRenderFn: !1,
69
69
  cmpDidLoad: !0,
70
70
  cmpDidUnload: !1,
@@ -153,12 +153,12 @@ var E = {
153
153
  attachStyles: !0,
154
154
  // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
155
155
  experimentalSlotFixes: !1
156
- }, be = Object.defineProperty, Se = (e, t) => {
156
+ }, ve = Object.defineProperty, me = (e, t) => {
157
157
  for (var s in t)
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 = {
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: {} };
160
+ z.HTMLElement;
161
+ var A = {
162
162
  $flags$: 0,
163
163
  $resourcesUrl$: "",
164
164
  jmp: (e) => e(),
@@ -166,51 +166,69 @@ 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 = {};
170
- Se(Ae, {
171
- err: () => oe,
172
- map: () => Ee,
173
- ok: () => U,
174
- unwrap: () => je,
175
- unwrapErr: () => Re
169
+ }, ke = (e) => e != null && e !== void 0, te = (e) => (e = typeof e, e === "object" || e === "function"), Te = {};
170
+ me(Te, {
171
+ err: () => se,
172
+ map: () => xe,
173
+ ok: () => P,
174
+ unwrap: () => Ae,
175
+ unwrapErr: () => Ee
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
185
185
  });
186
- function Ee(e, t) {
186
+ function xe(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 Ae = (e) => {
198
198
  if (e.isOk)
199
199
  return e.value;
200
200
  throw e.value;
201
- }, Re = (e) => {
201
+ }, Ee = (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) => {
208
- 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);
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 = je(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
+ }, ne = (e, t, s) => {
214
+ let r = 0, n = [], o;
215
+ 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
+ return n;
218
+ }, je = (e, t, s = !0) => {
219
+ const r = [];
220
+ for ((s && e["s-sr"] || !e["s-sr"]) && r.push(e); (e = e.nextSibling) && e["s-sn"] === t; )
221
+ r.push(e);
222
+ 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);
210
228
  };
211
- d(s);
229
+ $(s);
212
230
  const f = W(e, null);
213
- return f.$attrs$ = t, c.length > 0 && (f.$children$ = c), f.$key$ = o, f.$name$ = n, f;
231
+ return f.$attrs$ = t, a.length > 0 && (f.$children$ = a), f.$key$ = n, f.$name$ = o, f;
214
232
  }, W = (e, t) => {
215
233
  const s = {
216
234
  $flags$: 0,
@@ -220,27 +238,30 @@ var je = (e) => {
220
238
  $children$: null
221
239
  };
222
240
  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) => {
241
+ }, Le = {}, Oe = (e) => e && e.$tag$ === Le, Z = (e, t, s, r, n, o) => {
224
242
  if (s !== r) {
225
- let i = J(e, t), a = t.toLowerCase();
243
+ let i = X(e, t), u = t.toLowerCase();
226
244
  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)));
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))));
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 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]);
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, 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);
240
261
  }
241
262
  } else {
242
- const c = re(r);
243
- if ((i || c && r !== null) && !o)
263
+ const a = te(r);
264
+ if ((i || a && r !== null) && !n)
244
265
  try {
245
266
  if (e.tagName.includes("-"))
246
267
  e[t] = r;
@@ -250,18 +271,18 @@ var je = (e) => {
250
271
  }
251
272
  } catch {
252
273
  }
253
- 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));
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));
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
+ }, 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$);
263
284
  };
264
- function V(e) {
285
+ function Y(e) {
265
286
  return e.includes("ref") ? (
266
287
  // we need to sort these to ensure that `'ref'` is the last attr
267
288
  [...e.filter((t) => t !== "ref"), "ref"]
@@ -270,11 +291,11 @@ function V(e) {
270
291
  e
271
292
  );
272
293
  }
273
- var x, H, R, F = !1, _ = !1, I = !1, h = !1, D = (e, t, s, r) => {
274
- var o;
294
+ var F, N, E, M = !1, D = !1, I = !1, y = !1, C = (e, t, s) => {
295
+ var r;
275
296
  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$ ? (
297
+ let o = 0, i, u, a;
298
+ if (M || (I = !0, n.$tag$ === "slot" && (n.$flags$ |= n.$children$ ? (
278
299
  // slot element has fallback content
279
300
  // still create an element that "mocks" the slot element
280
301
  2
@@ -284,235 +305,210 @@ var x, H, R, F = !1, _ = !1, I = !1, h = !1, D = (e, t, s, r) => {
284
305
  // where actual slot content should sit next to
285
306
  1
286
307
  ))), n.$text$ !== null)
287
- a = n.$elm$ = M.createTextNode(n.$text$);
308
+ i = n.$elm$ = R.createTextNode(n.$text$);
288
309
  else if (n.$flags$ & 1)
289
- a = n.$elm$ = M.createTextNode("");
310
+ i = n.$elm$ = R.createTextNode("");
290
311
  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$)
295
- 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);
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);
307
319
  }
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) => {
322
+ A.$flags$ |= 1;
323
+ const s = Array.from(e.__childNodes || e.childNodes);
324
+ e["s-sr"] && H.experimentalSlotFixes;
308
325
  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);
326
+ 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);
311
328
  }
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))));
329
+ 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))));
317
334
  }, ae = (e, t, s) => {
318
335
  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());
336
+ const n = e[r];
337
+ 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());
323
340
  }
324
341
  }
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 <= $; )
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; )
328
345
  if (f == null)
329
- f = t[++n];
346
+ f = t[++o];
330
347
  else if (l == null)
331
- l = t[--d];
332
- else if (u == null)
333
- u = r[++i];
348
+ l = t[--$];
349
+ else if (c == null)
350
+ c = r[++i];
334
351
  else if (p == null)
335
- 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];
352
+ p = r[--d];
353
+ else if (O(f, c, n))
354
+ x(f, c, n), f = t[++o], c = r[++i];
355
+ 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];
344
361
  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;
362
+ for (u = -1, a = o; a <= $; ++a)
363
+ if (t[a] && t[a].$key$ !== null && t[a].$key$ === c.$key$) {
364
+ u = a;
348
365
  break;
349
366
  }
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$));
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,
369
+ m,
370
+ _(f.$elm$)
371
+ );
351
372
  }
352
- n > d ? le(
373
+ o > $ ? le(
353
374
  e,
354
- r[$ + 1] == null ? null : r[$ + 1].$elm$,
375
+ r[d + 1] == null ? null : r[d + 1].$elm$,
355
376
  s,
356
377
  r,
357
378
  i,
358
- $
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$;
368
- 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)) : (
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)) : (
370
385
  // 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) => {
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);
388
+ }, b = [], ce = (e) => {
396
389
  let t, s, r;
397
- for (const o of e.childNodes) {
390
+ const n = e.__childNodes || e.childNodes;
391
+ for (const o of n) {
398
392
  if (o["s-sr"] && (t = o["s-cr"]) && t.parentNode) {
399
- s = t.parentNode.childNodes;
400
- const n = o["s-sn"];
393
+ s = t.parentNode.__childNodes || t.parentNode.childNodes;
394
+ const i = o["s-sn"];
401
395
  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({
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({
406
400
  $slotRefNode$: o,
407
401
  $nodeToRelocate$: t
408
402
  })), 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$));
403
+ Q(a.$nodeToRelocate$, t["s-sn"]) && (u = b.find(($) => $.$nodeToRelocate$ === t), u && !a.$slotRefNode$ && (a.$slotRefNode$ = u.$slotRefNode$));
410
404
  });
411
- } else b.some((i) => i.$nodeToRelocate$ === t) || b.push({
405
+ } else b.some((u) => u.$nodeToRelocate$ === t) || b.push({
412
406
  $nodeToRelocate$: t
413
407
  });
414
408
  }
415
- o.nodeType === 1 && ue(o);
409
+ o.nodeType === 1 && ce(o);
416
410
  }
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);
411
+ }, fe = (e) => {
412
+ e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(fe);
413
+ }, 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
+ function ue(e, t, s, r) {
415
+ 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;
424
+ break;
425
+ }
426
+ a = a.nextSibling;
427
+ }
428
+ $ || r.classList.remove(o + "-s");
429
+ }
437
430
  }
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[$]
431
+ }
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]
443
437
  )), s && l.$attrs$)
444
- for (const $ of Object.keys(l.$attrs$))
445
- 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);
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);
447
441
  {
448
- if (j.$flags$ |= 1, I) {
449
- ue(l.$elm$);
450
- 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);
442
+ if (A.$flags$ |= 1, I) {
443
+ ce(l.$elm$);
444
+ for (const d of b) {
445
+ const c = d.$nodeToRelocate$;
446
+ if (!c["s-ol"]) {
447
+ const p = R.createTextNode("");
448
+ p["s-nr"] = c, k(c.parentNode, c["s-ol"] = p, c);
455
449
  }
456
450
  }
457
- for (const $ of b) {
458
- const u = $.$nodeToRelocate$, p = $.$slotRefNode$;
451
+ for (const d of b) {
452
+ const c = d.$nodeToRelocate$, p = d.$slotRefNode$;
459
453
  if (p) {
460
454
  const m = p.parentNode;
461
- let y = p.nextSibling;
455
+ let v = p.nextSibling;
462
456
  {
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;
457
+ let L = (r = c["s-ol"]) == null ? void 0 : r.previousSibling;
458
+ for (; L; ) {
459
+ 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"]; )
462
+ h = h == null ? void 0 : h.nextSibling;
463
+ if (!h || !h["s-nr"]) {
464
+ v = h;
471
465
  break;
472
466
  }
473
467
  }
474
- O = O.previousSibling;
468
+ L = L.previousSibling;
475
469
  }
476
470
  }
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);
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);
478
472
  } else
479
- u.nodeType === 1 && (s && (u["s-ih"] = (i = u.hidden) != null ? i : !1), u.hidden = !0);
473
+ c.nodeType === 1 && (s && (c["s-ih"] = (i = c.hidden) != null ? i : !1), c.hidden = !0);
480
474
  }
481
475
  }
482
- _ && fe(l.$elm$), j.$flags$ &= -2, b.length = 0;
476
+ D && re(l.$elm$), A.$flags$ &= -2, b.length = 0;
483
477
  }
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;
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);
482
+ }
483
+ N = void 0;
488
484
  };
489
- const Ce = (e, t, s) => {
485
+ const De = (e, t, s) => {
490
486
  [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) => {
487
+ }, de = (e, t, s, r, n) => {
492
488
  if (t && typeof t == "string") {
493
- const n = document.createElement(t);
489
+ const o = document.createElement(t);
494
490
  Object.keys(s || {}).forEach((i) => {
495
- Ce(n, i, s[i]);
491
+ De(o, i, s[i]);
496
492
  }), 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);
493
+ de(o, i.$tag$, i.$attrs$, i.$children$, i.$text$);
494
+ }), s != null && s.innerHTML && (o.innerHTML = s.innerHTML), e.appendChild(o);
499
495
  }
500
- o && (e.innerHTML = o);
501
- }, st = (e, t) => {
496
+ n && (e.innerHTML = n);
497
+ }, tt = (e, t) => {
502
498
  const s = {};
503
499
  if (typeof e != "object")
504
500
  throw new Error("filterArgs - args isn't an object.");
505
501
  for (const r in e)
506
502
  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);
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);
509
505
  }
510
506
  return s;
511
- }, rt = (e, t) => {
512
- var r, o;
507
+ }, st = (e, t) => {
508
+ var r, n;
513
509
  const s = document.getElementById("storybook-root");
514
510
  if (s !== null)
515
- return (o = document.querySelector("[lang]")) == null || o.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"), De(
511
+ return (n = document.querySelector("[lang]")) == null || n.setAttribute("lang", ((r = t.globals) == null ? void 0 : r.locale) || "en"), Me(
516
512
  {
517
513
  $ancestorComponent$: void 0,
518
514
  $flags$: 0,
@@ -525,10 +521,10 @@ const Ce = (e, t, s) => {
525
521
  },
526
522
  e(t)
527
523
  ), 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) => {
524
+ }, rt = ({ $tag$: e, $attrs$: t, $children$: s, $text$: r }) => {
525
+ const n = document.createElement("div");
526
+ return de(n, e, t, s, r), n.innerHTML;
527
+ }, U = (e, t) => {
532
528
  if (!t)
533
529
  return;
534
530
  const s = t.split("/");
@@ -546,14 +542,14 @@ class nt {
546
542
  * @param tagName - tag name we want to get the data from
547
543
  * @returns component data
548
544
  */
549
- P(this, S, (t) => this.jsonDoc.components.find((s) => s.tag === t));
545
+ B(this, S, (t) => this.jsonDoc.components.find((s) => s.tag === t));
550
546
  /**
551
547
  * Get the control for the given prop
552
548
  * Based on https://storybook.js.org/docs/api/arg-types#controltype
553
549
  * @param prop - prop to get control for
554
550
  * @returns control type and options if applicable
555
551
  */
556
- P(this, w, (t) => {
552
+ B(this, w, (t) => {
557
553
  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
554
  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
555
  });
@@ -563,8 +559,8 @@ class nt {
563
559
  * @returns component arg types
564
560
  */
565
561
  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);
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);
568
564
  return {
569
565
  ...f,
570
566
  [l.name]: {
@@ -576,11 +572,11 @@ class nt {
576
572
  type: { summary: l.type },
577
573
  defaultValue: { summary: l.default }
578
574
  },
579
- control: $,
580
- options: u
575
+ control: d,
576
+ options: c
581
577
  }
582
578
  };
583
- }, {}), o = s == null ? void 0 : s.events.reduce(
579
+ }, {}), n = s == null ? void 0 : s.events.reduce(
584
580
  (f, l) => ({
585
581
  ...f,
586
582
  [l.event]: {
@@ -593,7 +589,7 @@ class nt {
593
589
  }
594
590
  }),
595
591
  {}
596
- ), n = s == null ? void 0 : s.methods.reduce(
592
+ ), o = s == null ? void 0 : s.methods.reduce(
597
593
  (f, l) => ({
598
594
  ...f,
599
595
  [l.name]: {
@@ -620,7 +616,7 @@ class nt {
620
616
  }
621
617
  }),
622
618
  {}
623
- ), a = s == null ? void 0 : s.styles.reduce(
619
+ ), u = s == null ? void 0 : s.styles.reduce(
624
620
  (f, l) => ({
625
621
  ...f,
626
622
  [l.name]: {
@@ -633,26 +629,26 @@ class nt {
633
629
  }
634
630
  }),
635
631
  {}
636
- ), c = s == null ? void 0 : s.dependencies.reduce((f, l) => {
637
- const $ = k(this, S).call(this, l);
632
+ ), a = s == null ? void 0 : s.dependencies.reduce((f, l) => {
633
+ const d = T(this, S).call(this, l);
638
634
  return {
639
635
  ...f,
640
636
  [l]: {
641
637
  name: l,
642
- description: `<a href="./?path=/docs/${C("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
638
+ description: `<a href="./?path=/docs/${U("", d == null ? void 0 : d.filePath)}">View Component Documentation</a>`,
643
639
  table: {
644
640
  category: "depends on",
645
641
  type: { summary: void 0 }
646
642
  }
647
643
  }
648
644
  };
649
- }, {}), d = s == null ? void 0 : s.dependents.reduce((f, l) => {
650
- const $ = k(this, S).call(this, l);
645
+ }, {}), $ = s == null ? void 0 : s.dependents.reduce((f, l) => {
646
+ const d = T(this, S).call(this, l);
651
647
  return {
652
648
  ...f,
653
649
  [l]: {
654
650
  name: l,
655
- description: `<a href="./?path=/docs/${C("", $ == null ? void 0 : $.filePath)}">View Component Documentation</a>`,
651
+ description: `<a href="./?path=/docs/${U("", d == null ? void 0 : d.filePath)}">View Component Documentation</a>`,
656
652
  table: {
657
653
  category: "used by",
658
654
  type: { summary: void 0 }
@@ -662,12 +658,12 @@ class nt {
662
658
  }, {});
663
659
  return {
664
660
  ...r,
665
- ...o,
666
661
  ...n,
662
+ ...o,
667
663
  ...i,
664
+ ...u,
668
665
  ...a,
669
- ...c,
670
- ...d
666
+ ...$
671
667
  };
672
668
  });
673
669
  /**
@@ -676,43 +672,43 @@ class nt {
676
672
  * @returns component description
677
673
  */
678
674
  g(this, "extractComponentDescription", (t) => {
679
- const s = k(this, S).call(this, t);
675
+ const s = T(this, S).call(this, t);
680
676
  return (s == null ? void 0 : s.readme) || (s == null ? void 0 : s.docs);
681
677
  });
682
678
  this.jsonDoc = t;
683
679
  }
684
680
  }
685
681
  S = new WeakMap(), w = new WeakMap();
686
- const we = (e, t) => {
682
+ const Ce = (e, t) => {
687
683
  if (t)
688
684
  return `${e}${t}`;
689
- }, ge = (e) => {
685
+ }, $e = (e) => {
690
686
  let t = e.overview ? `${e.overview}
691
687
 
692
688
  ` : "";
693
- const s = e.props.filter(({ attr: o }) => o !== void 0);
689
+ const s = e.props.filter(({ attr: n }) => n !== void 0);
694
690
  s.length && (t += `Attributes:
695
- `, t += s.map(({ attr: o, docs: n }) => `- \`${o}\`: ${n}
691
+ `, t += s.map(({ attr: n, docs: o }) => `- \`${n}\`: ${o}
696
692
  `).join(""), t += `
697
693
  `);
698
- const r = e.props.filter(({ attr: o }) => o === void 0);
694
+ const r = e.props.filter(({ attr: n }) => n === void 0);
699
695
  return r.length && (t += `Properties:
700
- `, t += r.map(({ name: o, docs: n }) => `- \`${o}\`: ${n}
696
+ `, t += r.map(({ name: n, docs: o }) => `- \`${n}\`: ${o}
701
697
  `).join(""), t += `
702
698
  `), e.methods.length && (t += `Methods:
703
- `, t += e.methods.map(({ name: o, docs: n }) => `- \`${o}\`: ${n}
699
+ `, t += e.methods.map(({ name: n, docs: o }) => `- \`${n}\`: ${o}
704
700
  `).join(""), t += `
705
701
  `), e.events.length && (t += `Events:
706
- `, t += e.events.map(({ event: o, docs: n }) => `- \`${o}\`: ${n}
702
+ `, t += e.events.map(({ event: n, docs: o }) => `- \`${n}\`: ${o}
707
703
  `).join(""), t += `
708
704
  `), e.listeners.length && (t += `Listeners:
709
- `, t += e.listeners.map(({ event: o }) => `- \`${o}\`
705
+ `, t += e.listeners.map(({ event: n }) => `- \`${n}\`
710
706
  `).join(""), t += `
711
707
  `), e.slots.length && (t += `Slots:
712
- `, t += e.slots.map(({ name: o, docs: n }) => `- \`${o}\`: ${n}
708
+ `, t += e.slots.map(({ name: n, docs: o }) => `- \`${n}\`: ${o}
713
709
  `).join(""), t += `
714
710
  `), t;
715
- }, z = (e) => `${e.docs}
711
+ }, q = (e) => `${e.docs}
716
712
 
717
713
  Type: \`${e.type}\``, it = (e, t, s, r) => ({
718
714
  $schema: "https://json.schemastore.org/web-types",
@@ -721,16 +717,16 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
721
717
  "description-markup": "markdown",
722
718
  contributions: {
723
719
  html: {
724
- elements: s.components.map((o) => {
725
- const n = C(r, o.filePath);
720
+ elements: s.components.map((n) => {
721
+ const o = U(r, n.filePath);
726
722
  return {
727
- name: o.tag,
728
- description: ge(o),
729
- "doc-url": n,
730
- attributes: o.props.filter((i) => i.attr).map((i) => ({
723
+ name: n.tag,
724
+ description: $e(n),
725
+ "doc-url": o,
726
+ attributes: n.props.filter((i) => i.attr).map((i) => ({
731
727
  name: i.attr,
732
- description: z(i),
733
- "doc-url": n,
728
+ description: q(i),
729
+ "doc-url": o,
734
730
  value: {
735
731
  type: i.type,
736
732
  default: i.default,
@@ -738,23 +734,23 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
738
734
  }
739
735
  })),
740
736
  js: {
741
- properties: o.props.map((i) => ({
737
+ properties: n.props.map((i) => ({
742
738
  name: i.name,
743
- description: z(i),
744
- "doc-url": n,
739
+ description: q(i),
740
+ "doc-url": o,
745
741
  value: {
746
742
  type: i.type,
747
743
  default: i.default,
748
744
  required: i.required
749
745
  }
750
746
  })),
751
- events: o.events.map((i) => ({
747
+ events: n.events.map((i) => ({
752
748
  name: i.event,
753
749
  description: i.docs
754
750
  }))
755
751
  },
756
752
  css: {
757
- properties: o.styles.map((i) => ({
753
+ properties: n.styles.map((i) => ({
758
754
  name: i.name,
759
755
  description: i.docs
760
756
  }))
@@ -763,31 +759,31 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
763
759
  })
764
760
  }
765
761
  }
766
- }), Pe = (e, t, s) => [
767
- { name: "Storybook", url: C(e, s) },
768
- { name: "Sources", url: we(t, s) }
769
- ], Ue = (e) => {
762
+ }), Ue = (e, t, s) => [
763
+ { name: "Storybook", url: U(e, s) },
764
+ { name: "Sources", url: Ce(t, s) }
765
+ ], we = (e) => {
770
766
  if (!e.values.some(({ value: t }) => t === void 0))
771
767
  return e.values.map(({ value: t }) => ({ name: t }));
772
- }, lt = (e, t, s) => ({
768
+ }, ot = (e, t, s) => ({
773
769
  version: 1.1,
774
770
  tags: e.components.map((r) => {
775
- const o = Pe(t, s, r.filePath);
771
+ const n = Ue(t, s, r.filePath);
776
772
  return {
777
773
  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
774
+ description: $e(r),
775
+ attributes: r.props.map((o) => ({
776
+ name: o.attr || o.name,
777
+ description: q(o),
778
+ values: we(o),
779
+ references: n
784
780
  })),
785
- references: o
781
+ references: n
786
782
  };
787
783
  }),
788
784
  globalAttributes: [],
789
785
  valueSets: []
790
- }), at = (e) => ({
786
+ }), lt = (e) => ({
791
787
  version: 1.1,
792
788
  properties: e.components.flatMap(
793
789
  (t) => t.styles.map((s) => ({
@@ -795,31 +791,31 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
795
791
  description: s.docs
796
792
  }))
797
793
  )
798
- }), ct = (e) => {
794
+ }), at = (e) => {
799
795
  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();
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();
803
799
  return Object.keys(t).length === 0 ? {
804
- locale: n,
800
+ locale: o,
805
801
  messages: { lang: s }
806
802
  } : {
807
- locale: n,
803
+ locale: o,
808
804
  messages: t[i] || t[s] || { lang: s }
809
805
  };
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, {
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, {
811
807
  style: "percent",
812
808
  minimumFractionDigits: s,
813
809
  maximumFractionDigits: s
814
- }).format(e), pt = (e, t, s, r = "short", o = 0) => new Intl.NumberFormat(t, {
810
+ }).format(e), $t = (e, t, s, r = "short", n = 0) => new Intl.NumberFormat(t, {
815
811
  style: "unit",
816
812
  unit: s,
817
813
  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 }) => {
814
+ minimumFractionDigits: n,
815
+ 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 }) => {
821
817
  class r {
822
- constructor(n) {
818
+ constructor(o) {
823
819
  /**
824
820
  *
825
821
  */
@@ -836,11 +832,11 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
836
832
  *
837
833
  */
838
834
  g(this, "cb");
839
- this.cb = n;
835
+ this.cb = o;
840
836
  }
841
837
  }
842
- return [window, global].forEach((o) => {
843
- Object.defineProperty(o, "MutationObserver", {
838
+ return [window, global].forEach((n) => {
839
+ Object.defineProperty(n, "MutationObserver", {
844
840
  writable: !0,
845
841
  configurable: !0,
846
842
  value: r
@@ -848,7 +844,7 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
848
844
  }), r;
849
845
  }, ht = ({ disconnect: e, observe: t }) => {
850
846
  class s {
851
- constructor(o) {
847
+ constructor(n) {
852
848
  /**
853
849
  *
854
850
  */
@@ -865,7 +861,7 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
865
861
  *
866
862
  */
867
863
  g(this, "cb");
868
- this.cb = o;
864
+ this.cb = n;
869
865
  }
870
866
  }
871
867
  return [window, global].forEach((r) => {
@@ -876,7 +872,7 @@ Type: \`${e.type}\``, it = (e, t, s, r) => ({
876
872
  });
877
873
  }), s;
878
874
  };
879
- class Be extends Event {
875
+ class We extends Event {
880
876
  constructor() {
881
877
  super(...arguments);
882
878
  /**
@@ -887,7 +883,7 @@ class Be extends Event {
887
883
  // eslint-disable-line @typescript-eslint/no-explicit-any
888
884
  }
889
885
  const yt = () => {
890
- class e extends Be {
886
+ class e extends We {
891
887
  }
892
888
  return [window, global].forEach((t) => {
893
889
  Object.defineProperty(t, "SubmitEvent", {
@@ -896,40 +892,50 @@ const yt = () => {
896
892
  value: e
897
893
  });
898
894
  }), e;
895
+ }, vt = (e) => {
896
+ const t = (s) => (setTimeout(s, 1), e(), 0);
897
+ return [window, global].forEach((s) => {
898
+ Object.defineProperty(s, "requestAnimationFrame", {
899
+ writable: !0,
900
+ configurable: !0,
901
+ value: t
902
+ });
903
+ }), t;
899
904
  };
900
905
  export {
901
- Xe as ClassList,
906
+ Ge as ClassList,
902
907
  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,
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,
910
915
  Qe as focusableElements,
911
- ct as getLocaleDatePattern,
912
- te as getParentWindows,
913
- ot as getStoryHTML,
914
- C as getStorybookUrl,
916
+ at as getLocaleDatePattern,
917
+ V as getParentWindows,
918
+ rt as getStoryHTML,
919
+ U as getStorybookUrl,
915
920
  Ze as getWindows,
916
921
  Ke as isTagName,
917
- Ve as isValidNumber,
918
- me as isValidString,
919
- Ge as isValideID,
920
- ut as localeCurrency,
921
- ze as localeDate,
922
- $t as localeNumber,
922
+ Ye as isValidNumber,
923
+ ye as isValidString,
924
+ Ie as isValideID,
925
+ ft as localeCurrency,
926
+ Pe as localeDate,
927
+ ut as localeNumber,
923
928
  dt as localePercent,
924
- pt as localeUnit,
925
- tt as nextTick,
926
- vt as setupMutationObserverMock,
929
+ $t as localeUnit,
930
+ et as nextTick,
931
+ vt as setUpRequestAnimationFrameMock,
932
+ gt as setupMutationObserverMock,
927
933
  ht as setupResizeObserverMock,
928
934
  yt as setupSubmitEventMock,
929
- rt as stencilWrapper,
930
- Ye as toString,
931
- at as vsCodeCssGenerator,
932
- lt as vsCodeGenerator,
935
+ st as stencilWrapper,
936
+ Je as toString,
937
+ lt as vsCodeCssGenerator,
938
+ ot as vsCodeGenerator,
933
939
  it as webTypesGenerator
934
940
  };
935
941
  //# sourceMappingURL=index.es.js.map