@mgdis/stencil-helpers 3.2.3 → 3.2.5

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