@tempots/beatui 0.24.0 → 0.26.0

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.
Files changed (81) hide show
  1. package/dist/{2019-7ojCcWUJ.cjs → 2019-BZdoHGOO.cjs} +1 -1
  2. package/dist/{2019-JwkYbae8.js → 2019-Bt_x1Mqh.js} +2 -2
  3. package/dist/{2020-BLYgDBO4.cjs → 2020-Bk0sGwzQ.cjs} +1 -1
  4. package/dist/{2020-kK0rQWn9.js → 2020-C2Ifu6RV.js} +2 -2
  5. package/dist/ar-CNSt2O6X.cjs +1 -0
  6. package/dist/{ar-BgrUqaxG.js → ar-CxLxXsxZ.js} +1 -1
  7. package/dist/auth/index.cjs.js +1 -1
  8. package/dist/auth/index.es.js +547 -529
  9. package/dist/de-BlQbCGWj.cjs +1 -0
  10. package/dist/{de-D_sdCcAw.js → de-C7iv8rS5.js} +1 -1
  11. package/dist/es-Chf24sm_.cjs +1 -0
  12. package/dist/{es-DczvLqEV.js → es-DyivIdRS.js} +1 -1
  13. package/dist/fa-DPDyDuq_.cjs +1 -0
  14. package/dist/{fa-DhPP5Tgo.js → fa-T2168lXR.js} +1 -1
  15. package/dist/fr-BnxbTKeV.cjs +1 -0
  16. package/dist/{fr-D3WwoeQg.js → fr-ehNjmGC4.js} +1 -1
  17. package/dist/he-B9YZGENc.cjs +1 -0
  18. package/dist/{he-CFhi-6Rs.js → he-TD57Y17Z.js} +1 -1
  19. package/dist/{hi-Cqy8JcS7.js → hi-B4NbRIf5.js} +1 -1
  20. package/dist/hi-ZyCUnzwK.cjs +1 -0
  21. package/dist/{index-BeoVum6H.js → index-C494pbos.js} +1 -1
  22. package/dist/{index-D1rYqvi5.cjs → index-CZn1Pgwz.cjs} +4 -4
  23. package/dist/{index-CgH6d8ie.cjs → index-DN_efvsJ.cjs} +1 -1
  24. package/dist/{index-DYmfX0jE.js → index-DvqD_Y1P.js} +481 -481
  25. package/dist/index.cjs.js +2 -2
  26. package/dist/index.es.js +187 -186
  27. package/dist/it-C5sp2CZC.cjs +1 -0
  28. package/dist/{it-CtMArqSp.js → it-D3x9ILJi.js} +1 -1
  29. package/dist/ja-31clSGC3.cjs +1 -0
  30. package/dist/{ja-UFqZT78C.js → ja-BSfyBDbo.js} +1 -1
  31. package/dist/json-schema/index.cjs.js +1 -1
  32. package/dist/json-schema/index.es.js +1 -1
  33. package/dist/{ko-B5LB1_X_.js → ko-DNahUn8W.js} +1 -1
  34. package/dist/ko-j4lOKHLl.cjs +1 -0
  35. package/dist/{modal-C2Aa-aVN.js → modal-5GSPw0e_.js} +1 -1
  36. package/dist/modal-CMuvQ7U-.cjs +1 -0
  37. package/dist/{nl-DCfHVqzQ.js → nl-DxveNtuq.js} +1 -1
  38. package/dist/nl-gQLaSMRt.cjs +1 -0
  39. package/dist/{translations-DpZ-btu9.cjs → notice-DTflcSdc.cjs} +2 -2
  40. package/dist/{translations-GO9sIajX.js → notice-DuvHeGyh.js} +476 -376
  41. package/dist/pl-BQTsowH4.cjs +1 -0
  42. package/dist/{pl-UcTv39q1.js → pl-DuKW800E.js} +1 -1
  43. package/dist/pt-DB-njyTA.cjs +1 -0
  44. package/dist/{pt-CXsgmVtb.js → pt-DPt1NyaL.js} +1 -1
  45. package/dist/ru-CIXDYJrr.cjs +1 -0
  46. package/dist/{ru-C0MvZW2g.js → ru-DwiRelVA.js} +1 -1
  47. package/dist/{tr-CIIkc1uL.js → tr-DQIURNMa.js} +1 -1
  48. package/dist/tr-Dx_9vMU9.cjs +1 -0
  49. package/dist/{translations-CB6iJ1Rn.js → translations-D4pKsgdi.js} +1 -1
  50. package/dist/translations-YkLfpjMl.cjs +1 -0
  51. package/dist/types/components/form/control/list-control.d.ts +4 -2
  52. package/dist/{ur-Cpx9oyTV.js → ur-ChuKCUVI.js} +1 -1
  53. package/dist/ur-DpGDKEUr.cjs +1 -0
  54. package/dist/{notice-c9Vbv45l.js → utils-CBZohCZi.js} +937 -1002
  55. package/dist/utils-Dz1qVHrn.cjs +1 -0
  56. package/dist/{vi-D24AUQ01.js → vi-CJ3gBepb.js} +1 -1
  57. package/dist/vi-CjpgcyEa.cjs +1 -0
  58. package/dist/zh-CLb0vdcx.cjs +1 -0
  59. package/dist/{zh-25YFRjoV.js → zh-DBCCiN2o.js} +1 -1
  60. package/package.json +1 -1
  61. package/dist/ar-BAb4yHZS.cjs +0 -1
  62. package/dist/de-Dn2CdXgD.cjs +0 -1
  63. package/dist/es-CEPxKSog.cjs +0 -1
  64. package/dist/fa-NvkKjIQ6.cjs +0 -1
  65. package/dist/fr-cR59lx1A.cjs +0 -1
  66. package/dist/he-CxSHPJMg.cjs +0 -1
  67. package/dist/hi-DLnz3lCX.cjs +0 -1
  68. package/dist/it-C7Kv6j-_.cjs +0 -1
  69. package/dist/ja-BPL80aw5.cjs +0 -1
  70. package/dist/ko-Cmt_34Xp.cjs +0 -1
  71. package/dist/modal-UsqvSvHy.cjs +0 -1
  72. package/dist/nl-B-WL9SX2.cjs +0 -1
  73. package/dist/notice-C7I6EmRh.cjs +0 -1
  74. package/dist/pl-TGqkSi2w.cjs +0 -1
  75. package/dist/pt-Ua_e-1JE.cjs +0 -1
  76. package/dist/ru-9YWCN6fR.cjs +0 -1
  77. package/dist/tr-D70Oy8aN.cjs +0 -1
  78. package/dist/translations-NYxsXjMT.cjs +0 -1
  79. package/dist/ur-DmxXuJ9O.cjs +0 -1
  80. package/dist/vi-Cboo_ueb.cjs +0 -1
  81. package/dist/zh-BXivX7rD.cjs +0 -1
@@ -1,19 +1,19 @@
1
- import { Use as O, Value as i, prop as K, html as y, attr as a, on as C, WithElement as ie, OnDispose as Z, aria as N, bind as $e, computedOf as B, style as de, When as E, NotEmpty as Qe, Fragment as L, ForEach as fe, svg as Ae, svgAttr as ge, Empty as D, emitValue as j, coalesce as Je, Ensure as Oe, OneOfType as Ke, Repeat as je, signal as Fe, input as ee, emitValueAsNullableDate as et, emitValueAsNullableDateTime as tt, emitValueAsNumber as G, emit as nt, Task as Be, Unless as st } from "@tempots/dom";
2
- import { f as rt } from "./colors-WfmhQ5e1.js";
3
- import { g as lt } from "./timer-CQlK5LhW.js";
4
- import { ElementRect as He, AutoSelect as at } from "@tempots/ui";
5
- import { B as W, e as P, f as ot, C as me, I as z, g as H, h as ct, i as it, j as We, k as ye, T as ut, E as pt, P as dt, S as ne, s as ft, L as mt, l as ht, n as Ve, o as gt, a as be, p as ve, O as ae, q as Le } from "./translations-GO9sIajX.js";
6
- class bt extends Error {
1
+ import { Use as H, Value as u, prop as te, html as I, attr as a, on as C, WithElement as ie, OnDispose as W, aria as N, bind as _e, computedOf as V, style as de, When as E, NotEmpty as Ge, Fragment as L, ForEach as fe, svg as Ae, svgAttr as he, Empty as T, emitValue as P, coalesce as Qe, Ensure as Je, OneOfType as Ke, Repeat as Pe, signal as Fe, input as K, emitValueAsNullableDate as et, emitValueAsNullableDateTime as tt, emitValueAsNumber as G, emit as nt, Task as Be } from "@tempots/dom";
2
+ import { f as st } from "./colors-WfmhQ5e1.js";
3
+ import { g as rt } from "./timer-CQlK5LhW.js";
4
+ import { ElementRect as je, AutoSelect as lt } from "@tempots/ui";
5
+ import { B as X, e as O, f as at, C as $e, I as z, g as j, h as ot, i as ct, j as He, k as ke, T as it, E as ut, P as pt, S as ce, s as dt, L as ft, l as mt, n as Le, o as ht, a as ge, p as be, O as le, q as Ve } from "./notice-DuvHeGyh.js";
6
+ class gt extends Error {
7
7
  constructor(t = "Missing implementation") {
8
8
  super(t), this.name = "MissingImplementationError";
9
9
  }
10
10
  }
11
- const fn = (e) => vt(e).split("_").join(" "), vt = (e) => (e = e.replace(/::/g, "/"), e = e.replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2"), e = e.replace(/([a-z\d])([A-Z])/g, "$1_$2"), e = e.replace(/-/g, "_"), e.toLowerCase()), mn = (e) => e.substring(0, 1).toUpperCase() + e.substring(1), xt = (e) => {
11
+ const un = (e) => bt(e).split("_").join(" "), bt = (e) => (e = e.replace(/::/g, "/"), e = e.replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2"), e = e.replace(/([a-z\d])([A-Z])/g, "$1_$2"), e = e.replace(/-/g, "_"), e.toLowerCase()), pn = (e) => e.substring(0, 1).toUpperCase() + e.substring(1), vt = (e) => {
12
12
  if (typeof Buffer < "u")
13
13
  return Buffer.from(e, "base64").toString("utf8");
14
14
  if (typeof atob < "u")
15
15
  return atob(e);
16
- throw new bt(
16
+ throw new gt(
17
17
  "No implementation found for base64 decoding"
18
18
  );
19
19
  };
@@ -26,41 +26,41 @@ function Ee({
26
26
  disabled: o = !1,
27
27
  allowMultiple: l
28
28
  }) {
29
- return O(W, (u) => {
30
- const c = i.deriveProp(t ?? []), p = K(!1), m = (h) => {
31
- h.preventDefault(), h.stopPropagation(), p.value = !0;
32
- }, f = (h) => {
33
- h.preventDefault(), h.stopPropagation(), (!h.currentTarget || !h.currentTarget.contains(h.relatedTarget)) && (p.value = !1);
34
- }, x = (h) => {
35
- h.preventDefault(), h.stopPropagation(), p.value = !1;
36
- const v = Array.from(h.dataTransfer?.files || []);
37
- v.length > 0 && (c.value = v, e(v));
38
- }, d = (h) => {
39
- i.get(n) && h.currentTarget.querySelector(
29
+ return H(X, (i) => {
30
+ const c = u.deriveProp(t ?? []), p = te(!1), m = (g) => {
31
+ g.preventDefault(), g.stopPropagation(), p.value = !0;
32
+ }, f = (g) => {
33
+ g.preventDefault(), g.stopPropagation(), (!g.currentTarget || !g.currentTarget.contains(g.relatedTarget)) && (p.value = !1);
34
+ }, v = (g) => {
35
+ g.preventDefault(), g.stopPropagation(), p.value = !1;
36
+ const b = Array.from(g.dataTransfer?.files || []);
37
+ b.length > 0 && (c.value = b, e(b));
38
+ }, d = (g) => {
39
+ u.get(n) && g.currentTarget.querySelector(
40
40
  'input[type="file"]'
41
41
  )?.click();
42
42
  };
43
- let g = null;
44
- const b = () => {
45
- if (g == null) return;
46
- const h = Array.from(g.files ?? []);
47
- h.length > 0 && (c.value = h, e(h)), g.value = "";
48
- }, _ = (h) => {
49
- i.get(n) && (h.key === "Enter" || h.key === " ") && (h.preventDefault(), d(h));
43
+ let x = null;
44
+ const h = () => {
45
+ if (x == null) return;
46
+ const g = Array.from(x.files ?? []);
47
+ g.length > 0 && (c.value = g, e(g)), x.value = "";
48
+ }, $ = (g) => {
49
+ u.get(n) && (g.key === "Enter" || g.key === " ") && (g.preventDefault(), d(g));
50
50
  };
51
- return y.div(
51
+ return I.div(
52
52
  a.role("button"),
53
53
  a.tabindex(
54
- i.map(n, (h) => h ? 0 : -1)
54
+ u.map(n, (g) => g ? 0 : -1)
55
55
  ),
56
56
  a.style("position: relative;"),
57
57
  C.dragover(m),
58
58
  C.dragleave(f),
59
- C.drop(x),
59
+ C.drop(v),
60
60
  C.click(d),
61
- C.keydown(_),
61
+ C.keydown($),
62
62
  // Hidden file input
63
- y.input(
63
+ I.input(
64
64
  a.type("file"),
65
65
  a.disabled(o),
66
66
  a.accept(r),
@@ -68,103 +68,103 @@ function Ee({
68
68
  a.style(
69
69
  "position: absolute; left: -9999px; opacity: 0; pointer-events: none;"
70
70
  ),
71
- C.change(b),
72
- ie((h) => (g = h, Z(
73
- c.on((v) => {
74
- const T = globalThis.DataTransfer;
75
- if (T != null) {
76
- const I = new T();
77
- v.forEach(($) => I.items.add($)), h.files = I.files;
71
+ C.change(h),
72
+ ie((g) => (x = g, W(
73
+ c.on((b) => {
74
+ const D = globalThis.DataTransfer;
75
+ if (D != null) {
76
+ const y = new D();
77
+ b.forEach((_) => y.items.add(_)), g.files = y.files;
78
78
  }
79
79
  })
80
80
  )))
81
81
  ),
82
82
  // Screen reader instructions
83
- N.label($e(u.$.dropZoneInstructions)(n)),
83
+ N.label(_e(i.$.dropZoneInstructions)(n)),
84
84
  // Content
85
85
  s({ files: c, clear: () => c.value = [], change: c.set })
86
86
  );
87
87
  });
88
88
  }
89
- function wt(e, t) {
89
+ function xt(e, t) {
90
90
  return e.length === t.length && e.every((r, n) => r === t[n]);
91
91
  }
92
- function _t(e, t) {
92
+ function wt(e, t) {
93
93
  const r = ["bc-segmented-control", `bc-segmented-control--size-${e}`];
94
94
  return t && r.push("bc-segmented-control--disabled"), r.join(" ");
95
95
  }
96
- function hn({
96
+ function dn({
97
97
  options: e,
98
98
  value: t,
99
99
  onChange: r,
100
100
  size: n = "md",
101
101
  disabled: s = !1
102
102
  }, ...o) {
103
- const l = rt(e).map(([u, c]) => ({
104
- key: u,
103
+ const l = st(e).map(([i, c]) => ({
104
+ key: i,
105
105
  label: c
106
106
  }));
107
107
  return ie(() => {
108
- const u = Object.fromEntries(
108
+ const i = Object.fromEntries(
109
109
  l.map((p, m) => [p.key, m])
110
- ), c = K(
110
+ ), c = te(
111
111
  l.map(() => ({ left: 0, width: 0 })),
112
- wt
112
+ xt
113
113
  );
114
- return y.div(
114
+ return I.div(
115
115
  a.class(
116
- B(
116
+ V(
117
117
  n,
118
118
  s
119
119
  )(
120
- (p, m) => _t(p ?? "md", m ?? !1)
120
+ (p, m) => wt(p ?? "md", m ?? !1)
121
121
  )
122
122
  ),
123
- y.div(
123
+ I.div(
124
124
  a.class("bc-segmented-control__container"),
125
- y.div(
125
+ I.div(
126
126
  a.class("bc-segmented-control__indicator"),
127
127
  de.width(
128
- B(
128
+ V(
129
129
  t,
130
130
  c
131
131
  )((p, m) => {
132
- const { width: f } = m[u[p] ?? 0];
132
+ const { width: f } = m[i[p] ?? 0];
133
133
  return `${f}px`;
134
134
  })
135
135
  ),
136
136
  de.left(
137
- B(
137
+ V(
138
138
  t,
139
139
  c
140
140
  )((p, m) => {
141
- const { left: f } = m[u[p] ?? 0];
141
+ const { left: f } = m[i[p] ?? 0];
142
142
  return `${f}px`;
143
143
  })
144
144
  )
145
145
  ),
146
146
  // clickable buttons
147
- l.map(({ label: p, key: m }, f) => y.button(
148
- C.click((x) => {
149
- x.preventDefault(), i.get(s) || r?.(m);
147
+ l.map(({ label: p, key: m }, f) => I.button(
148
+ C.click((v) => {
149
+ v.preventDefault(), u.get(s) || r?.(m);
150
150
  }),
151
151
  a.disabled(s),
152
152
  a.class("bc-segmented-control__segment"),
153
153
  a.class(
154
- i.map(t, (x) => x === m ? "bc-segmented-control__segment--active" : "bc-segmented-control__segment--inactive")
154
+ u.map(t, (v) => v === m ? "bc-segmented-control__segment--active" : "bc-segmented-control__segment--inactive")
155
155
  ),
156
- He((x) => {
156
+ je((v) => {
157
157
  function d() {
158
- c.update((b) => {
159
- const _ = [...b];
160
- return _[f] = {
161
- width: x.value.width,
162
- left: x.value.localLeft
163
- }, _;
158
+ c.update((h) => {
159
+ const $ = [...h];
160
+ return $[f] = {
161
+ width: v.value.width,
162
+ left: v.value.localLeft
163
+ }, $;
164
164
  });
165
165
  }
166
- const g = lt(d);
167
- return Z(g, x.on(d));
166
+ const x = rt(d);
167
+ return W(x, v.on(d));
168
168
  }),
169
169
  p
170
170
  ))
@@ -173,83 +173,83 @@ function hn({
173
173
  );
174
174
  });
175
175
  }
176
- function $t(e) {
176
+ function _t(e) {
177
177
  const t = e.type.toLowerCase();
178
178
  return t.startsWith("image/") && (t.includes("jpeg") || t.includes("jpg") || t.includes("png") || t.includes("gif") || t.includes("webp") || t.includes("svg"));
179
179
  }
180
- function yt(e) {
180
+ function $t(e) {
181
181
  const t = e.type.toLowerCase();
182
182
  return t.startsWith("image/") ? "vscode-icons:file-type-image" : t.startsWith("video/") ? "vscode-icons:file-type-video" : t.startsWith("audio/") ? "vscode-icons:file-type-audio" : t.includes("pdf") ? "vscode-icons:file-type-pdf2" : t.includes("word") || t.includes("document") ? "vscode-icons:file-type-word" : t.includes("excel") || t.includes("spreadsheet") ? "vscode-icons:file-type-excel" : t.includes("powerpoint") || t.includes("presentation") ? "vscode-icons:file-type-powerpoint" : t.includes("zip") || t.includes("archive") ? "vscode-icons:file-type-zip" : t.includes("text") ? "vscode-icons:file-type-text" : t.includes("json") ? "vscode-icons:file-type-json-official" : t.includes("csv") ? "vscode-icons:file-type-csv" : t.includes("xml") ? "vscode-icons:file-type-xml" : t.includes("yaml") ? "vscode-icons:file-type-yaml-official" : "vscode-icons:file-type-binary";
183
183
  }
184
184
  function Ue(e) {
185
185
  return E(
186
- e.map($t),
186
+ e.map(_t),
187
187
  () => {
188
- const t = K(null);
188
+ const t = te(null);
189
189
  return e.on((r) => {
190
190
  t.value && URL.revokeObjectURL(t.value);
191
191
  const n = URL.createObjectURL(r);
192
192
  t.value = n;
193
- }), y.div(
193
+ }), I.div(
194
194
  a.class("bc-file-input__thumbnail-container"),
195
- y.img(
195
+ I.img(
196
196
  a.src(t),
197
197
  a.alt(e.map((r) => r.name)),
198
198
  a.class("bc-file-input__thumbnail"),
199
- Z(() => {
199
+ W(() => {
200
200
  t.value && URL.revokeObjectURL(t.value);
201
201
  })
202
202
  )
203
203
  );
204
204
  },
205
- () => z({ icon: e.map(yt) })
205
+ () => z({ icon: e.map($t) })
206
206
  );
207
207
  }
208
208
  const kt = (e, ...t) => {
209
209
  const {
210
- value: r = K([]),
210
+ value: r = te([]),
211
211
  accept: n = "*/*",
212
212
  maxFiles: s,
213
213
  maxFileSize: o,
214
214
  onChange: l,
215
- onBlur: u,
215
+ onBlur: i,
216
216
  disabled: c,
217
217
  hasError: p,
218
218
  mode: m = "default",
219
219
  showFileList: f = !0,
220
- ...x
221
- } = e, d = r, g = i.map(m, (I) => I === "compact"), b = (I) => {
222
- let $ = I;
220
+ ...v
221
+ } = e, d = r, x = u.map(m, (y) => y === "compact"), h = (y) => {
222
+ let _ = y;
223
223
  if (s != null) {
224
- const w = i.get(s);
225
- $ = $.slice(0, w);
224
+ const w = u.get(s);
225
+ _ = _.slice(0, w);
226
226
  }
227
227
  if (o) {
228
- const w = i.get(o);
229
- $ = $.filter((k) => k.size <= w);
228
+ const w = u.get(o);
229
+ _ = _.filter((k) => k.size <= w);
230
230
  }
231
- l?.($);
232
- }, _ = (I) => {
233
- const w = d.value.filter((k, M) => M !== I);
231
+ l?.(_);
232
+ }, $ = (y) => {
233
+ const w = d.value.filter((k, M) => M !== y);
234
234
  l?.(w);
235
- }, h = () => {
235
+ }, g = () => {
236
236
  l?.([]);
237
- }, v = ({
238
- files: I,
239
- clear: $,
237
+ }, b = ({
238
+ files: y,
239
+ clear: _,
240
240
  change: w
241
- }) => O(
242
- W,
243
- (k) => y.div(
241
+ }) => H(
242
+ X,
243
+ (k) => I.div(
244
244
  a.class("bc-file-input__drop-zone"),
245
- y.div(
245
+ I.div(
246
246
  a.class(
247
247
  "bc-file-input__drop-zone-content bc-file-input__drop-zone-content--empty"
248
248
  ),
249
249
  z({ icon: "mdi:cloud-upload-outline", size: "xl" }),
250
- y.div(
250
+ I.div(
251
251
  a.class("bc-file-input__drop-zone-text"),
252
- $e(k.$.filesInputInstructions)(
252
+ _e(k.$.filesInputInstructions)(
253
253
  s,
254
254
  o,
255
255
  k.$.fileSizeUnits.value
@@ -257,132 +257,132 @@ const kt = (e, ...t) => {
257
257
  )
258
258
  )
259
259
  )
260
- ), T = ({
261
- files: I
262
- }) => O(
263
- W,
264
- ($) => y.div(
260
+ ), D = ({
261
+ files: y
262
+ }) => H(
263
+ X,
264
+ (_) => I.div(
265
265
  a.class("bc-file-input__compact-input"),
266
266
  E(
267
- I.map((w) => w.length > 0),
268
- () => y.span(
267
+ y.map((w) => w.length > 0),
268
+ () => I.span(
269
269
  a.class("bc-file-input__compact-value"),
270
270
  fe(
271
- I,
272
- (w) => y.span(
271
+ y,
272
+ (w) => I.span(
273
273
  a.class("bc-file-input__compact-value-item"),
274
274
  Ue(w),
275
- y.span(
275
+ I.span(
276
276
  a.class("bc-file-input__compact-value-item-name"),
277
277
  w.$.name
278
278
  )
279
279
  )
280
280
  )
281
281
  ),
282
- () => y.span(
282
+ () => I.span(
283
283
  a.class("bc-file-input__compact-placeholder"),
284
284
  z({ icon: "mdi:cloud-upload-outline", size: "sm" }),
285
285
  " ",
286
- $e($.$.filesInputInstructions)(
286
+ _e(_.$.filesInputInstructions)(
287
287
  s,
288
288
  o,
289
- $.$.fileSizeUnits.value
289
+ _.$.fileSizeUnits.value
290
290
  )
291
291
  )
292
292
  )
293
293
  )
294
294
  );
295
- return O(
296
- W,
297
- (I) => P(
295
+ return H(
296
+ X,
297
+ (y) => O(
298
298
  {
299
- baseContainer: i.map(g, ($) => !$),
299
+ baseContainer: u.map(x, (_) => !_),
300
300
  disabled: c,
301
301
  hasError: p,
302
302
  after: E(
303
- g,
303
+ x,
304
304
  () => E(
305
- d.map(({ length: $ }) => $ > 0),
306
- () => me(
305
+ d.map(({ length: _ }) => _ > 0),
306
+ () => $e(
307
307
  {
308
308
  size: "sm",
309
- label: I.$.clearAllFiles,
309
+ label: y.$.clearAllFiles,
310
310
  disabled: c,
311
- onClick: h
311
+ onClick: g
312
312
  },
313
313
  a.class("bc-file-input__compact-clear")
314
314
  )
315
315
  )
316
316
  ),
317
- ...x,
317
+ ...v,
318
318
  input: E(
319
- g,
320
- () => y.div(
319
+ x,
320
+ () => I.div(
321
321
  a.class("bc-file-input bc-file-input--compact"),
322
322
  Ee({
323
323
  value: d,
324
324
  accept: n,
325
325
  enableClick: !0,
326
- allowMultiple: i.map(s ?? 1 / 0, ($) => $ > 1),
326
+ allowMultiple: u.map(s ?? 1 / 0, (_) => _ > 1),
327
327
  disabled: c,
328
- onChange: b,
329
- content: T
328
+ onChange: h,
329
+ content: D
330
330
  })
331
331
  ),
332
- () => y.div(
332
+ () => I.div(
333
333
  a.class("bc-file-input"),
334
334
  Ee({
335
335
  value: d,
336
336
  accept: n,
337
337
  enableClick: !0,
338
- allowMultiple: i.map(s ?? 1 / 0, ($) => $ > 1),
338
+ allowMultiple: u.map(s ?? 1 / 0, (_) => _ > 1),
339
339
  disabled: c,
340
- onChange: b,
341
- content: v
340
+ onChange: h,
341
+ content: b
342
342
  }),
343
343
  E(
344
344
  f,
345
- () => Qe(
345
+ () => Ge(
346
346
  d,
347
347
  () => L(
348
- y.div(
348
+ I.div(
349
349
  a.class("bc-file-input__file-list"),
350
- fe(d, ($, w) => {
350
+ fe(d, (_, w) => {
351
351
  const k = w.index;
352
- return y.div(
352
+ return I.div(
353
353
  a.class("bc-file-input__file-item"),
354
- y.div(
354
+ I.div(
355
355
  a.class("bc-file-input__file-icon"),
356
- Ue($)
356
+ Ue(_)
357
357
  ),
358
- y.div(
358
+ I.div(
359
359
  a.class("bc-file-input__file-info"),
360
- y.div(
360
+ I.div(
361
361
  a.class("bc-file-input__file-name"),
362
- a.title($.$.name),
363
- $.$.name
362
+ a.title(_.$.name),
363
+ _.$.name
364
364
  ),
365
- y.div(
365
+ I.div(
366
366
  a.class("bc-file-input__file-meta"),
367
- B(
368
- $.$.size,
369
- I.$.fileSizeUnits
367
+ V(
368
+ _.$.size,
369
+ y.$.fileSizeUnits
370
370
  )(
371
- (M, A) => ot(M, { units: A })
371
+ (M, A) => at(M, { units: A })
372
372
  ),
373
373
  " • ",
374
- B(
375
- $.$.type,
376
- I.$.unknownType
374
+ V(
375
+ _.$.type,
376
+ y.$.unknownType
377
377
  )((M, A) => M || A)
378
378
  )
379
379
  ),
380
- me(
380
+ $e(
381
381
  {
382
382
  size: "sm",
383
- label: I.$.removeFile,
383
+ label: y.$.removeFile,
384
384
  disabled: c,
385
- onClick: () => _(k)
385
+ onClick: () => $(k)
386
386
  },
387
387
  a.class("bc-file-input__remove-button")
388
388
  )
@@ -390,18 +390,18 @@ const kt = (e, ...t) => {
390
390
  })
391
391
  ),
392
392
  E(
393
- d.map(({ length: $ }) => $ > 1),
394
- () => y.div(
393
+ d.map(({ length: _ }) => _ > 1),
394
+ () => I.div(
395
395
  a.class(
396
396
  "bc-file-input__clear-all-button-container"
397
397
  ),
398
- y.button(
398
+ I.button(
399
399
  a.type("button"),
400
400
  a.class("bc-file-input__clear-all-button"),
401
401
  a.disabled(c),
402
- I.$.clearAllFiles,
403
- C.click(($) => {
404
- $.preventDefault(), $.stopPropagation(), h();
402
+ y.$.clearAllFiles,
403
+ C.click((_) => {
404
+ _.preventDefault(), _.stopPropagation(), g();
405
405
  })
406
406
  )
407
407
  )
@@ -416,7 +416,7 @@ const kt = (e, ...t) => {
416
416
  )
417
417
  );
418
418
  };
419
- async function It(e) {
419
+ async function yt(e) {
420
420
  return new Promise((t, r) => {
421
421
  const n = new FileReader();
422
422
  n.readAsDataURL(e), n.onload = () => {
@@ -425,10 +425,10 @@ async function It(e) {
425
425
  }, n.onerror = (s) => r(s);
426
426
  });
427
427
  }
428
- function Ct(e) {
429
- return Promise.all(e.map(It));
428
+ function It(e) {
429
+ return Promise.all(e.map(yt));
430
430
  }
431
- function Mt(e) {
431
+ function Ct(e) {
432
432
  if (e.length >= 4) {
433
433
  if (e[0] === 137 && e[1] === 80 && e[2] === 78 && e[3] === 71)
434
434
  return "image/png";
@@ -444,30 +444,30 @@ function Mt(e) {
444
444
  }
445
445
  return "application/octet-stream";
446
446
  }
447
- function Tt(e) {
448
- const t = xt(e ?? ""), r = t.length, n = new Uint8Array(r);
447
+ function Mt(e) {
448
+ const t = vt(e ?? ""), r = t.length, n = new Uint8Array(r);
449
449
  for (let s = 0; s < r; s++) n[s] = t.charCodeAt(s);
450
450
  return n;
451
451
  }
452
- function St(e) {
452
+ function Dt(e) {
453
453
  const {
454
454
  value: t,
455
455
  onChange: r,
456
456
  onInput: n,
457
457
  ...s
458
- } = e, o = /* @__PURE__ */ new Map(), l = i.toSignal(t).map((m) => m.map((f, x) => {
459
- const d = o.get(f), g = Tt(f ?? ""), b = d?.type || Mt(g), _ = d?.name ?? `file-${x}`, h = g.buffer.slice(
460
- g.byteOffset,
461
- g.byteOffset + g.byteLength
462
- ), v = new Blob([h], { type: b });
463
- return new File([v], _, { type: b });
464
- })), u = (m) => (f) => {
465
- m && Ct(f).then((x) => {
466
- for (const [d, g] of x.entries())
467
- o.set(g, { name: f[d].name, type: f[d].type });
468
- m(x);
458
+ } = e, o = /* @__PURE__ */ new Map(), l = u.toSignal(t).map((m) => m.map((f, v) => {
459
+ const d = o.get(f), x = Mt(f ?? ""), h = d?.type || Ct(x), $ = d?.name ?? `file-${v}`, g = x.buffer.slice(
460
+ x.byteOffset,
461
+ x.byteOffset + x.byteLength
462
+ ), b = new Blob([g], { type: h });
463
+ return new File([b], $, { type: h });
464
+ })), i = (m) => (f) => {
465
+ m && It(f).then((v) => {
466
+ for (const [d, x] of v.entries())
467
+ o.set(x, { name: f[d].name, type: f[d].type });
468
+ m(v);
469
469
  });
470
- }, c = u(r), p = u(n);
470
+ }, c = i(r), p = i(n);
471
471
  return kt({
472
472
  ...s,
473
473
  value: l,
@@ -475,17 +475,17 @@ function St(e) {
475
475
  onInput: p
476
476
  });
477
477
  }
478
- function gn(e) {
478
+ function fn(e) {
479
479
  const {
480
480
  value: t,
481
481
  onInput: r,
482
482
  onChange: n,
483
483
  ...s
484
484
  } = e;
485
- return St({
485
+ return Dt({
486
486
  ...s,
487
487
  maxFiles: 1,
488
- value: i.map(t, (o) => o == null ? [] : [o]),
488
+ value: u.map(t, (o) => o == null ? [] : [o]),
489
489
  onChange: (o) => {
490
490
  n?.(o[0]);
491
491
  },
@@ -494,7 +494,7 @@ function gn(e) {
494
494
  }
495
495
  });
496
496
  }
497
- function ke(e) {
497
+ function ye(e) {
498
498
  const t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
499
499
  return t ? [parseInt(t[1], 16), parseInt(t[2], 16), parseInt(t[3], 16)] : [0, 0, 0];
500
500
  }
@@ -504,7 +504,7 @@ function Ie(e, t, r) {
504
504
  Math.max(0, Math.min(255, t))
505
505
  )}${n(Math.max(0, Math.min(255, r)))}`;
506
506
  }
507
- function Dt(e) {
507
+ function St(e) {
508
508
  if (!e) return [0, 0, 0, 1];
509
509
  const r = e.trim().match(
510
510
  /^#?([a-fA-F0-9]{3,4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$/
@@ -512,8 +512,8 @@ function Dt(e) {
512
512
  if (r) {
513
513
  const f = r[1];
514
514
  if (f.length === 8) {
515
- const x = parseInt(f.slice(0, 2), 16), d = parseInt(f.slice(2, 4), 16), g = parseInt(f.slice(4, 6), 16), b = parseInt(f.slice(6, 8), 16) / 255;
516
- return [x, d, g, b];
515
+ const v = parseInt(f.slice(0, 2), 16), d = parseInt(f.slice(2, 4), 16), x = parseInt(f.slice(4, 6), 16), h = parseInt(f.slice(6, 8), 16) / 255;
516
+ return [v, d, x, h];
517
517
  }
518
518
  if (f.length === 6)
519
519
  return [
@@ -523,12 +523,12 @@ function Dt(e) {
523
523
  1
524
524
  ];
525
525
  if (f.length === 4) {
526
- const x = parseInt(f[0] + f[0], 16), d = parseInt(f[1] + f[1], 16), g = parseInt(f[2] + f[2], 16), b = parseInt(f[3] + f[3], 16) / 255;
527
- return [x, d, g, b];
526
+ const v = parseInt(f[0] + f[0], 16), d = parseInt(f[1] + f[1], 16), x = parseInt(f[2] + f[2], 16), h = parseInt(f[3] + f[3], 16) / 255;
527
+ return [v, d, x, h];
528
528
  }
529
529
  if (f.length === 3) {
530
- const x = parseInt(f[0] + f[0], 16), d = parseInt(f[1] + f[1], 16), g = parseInt(f[2] + f[2], 16);
531
- return [x, d, g, 1];
530
+ const v = parseInt(f[0] + f[0], 16), d = parseInt(f[1] + f[1], 16), x = parseInt(f[2] + f[2], 16);
531
+ return [v, d, x, 1];
532
532
  }
533
533
  }
534
534
  const n = e.match(
@@ -550,60 +550,60 @@ function Dt(e) {
550
550
  /^hsla?\(\s*([+-]?[\d.]+)(?:deg)?\s*[ ,]?\s*([\d.]+)%\s*[ ,]?\s*([\d.]+)%\s*(?:[/,]\s*(\d?(?:\.\d+)?))?\s*\)$/i
551
551
  );
552
552
  if (o) {
553
- const f = parseFloat(o[1]), x = parseFloat(o[2]), d = parseFloat(o[3]), g = o[4] != null ? parseFloat(o[4]) : 1, [b, _, h] = Ze(f, x / 100, d / 100);
554
- return [b, _, h, g];
553
+ const f = parseFloat(o[1]), v = parseFloat(o[2]), d = parseFloat(o[3]), x = o[4] != null ? parseFloat(o[4]) : 1, [h, $, g] = We(f, v / 100, d / 100);
554
+ return [h, $, g, x];
555
555
  }
556
556
  const l = e.match(
557
557
  /^hwb\(\s*([+-]?[\d.]+)(?:deg)?\s*[, ]\s*([\d.]+)%\s*[, ]\s*([\d.]+)%\s*(?:[/]\s*(\d?(?:\.\d+)?))?\s*\)$/i
558
558
  );
559
559
  if (l) {
560
- const f = parseFloat(l[1]), x = parseFloat(l[2]) / 100, d = parseFloat(l[3]) / 100, g = l[4] != null ? parseFloat(l[4]) : 1, [b, _, h] = Bt(f, x, d);
561
- return [b, _, h, g];
560
+ const f = parseFloat(l[1]), v = parseFloat(l[2]) / 100, d = parseFloat(l[3]) / 100, x = l[4] != null ? parseFloat(l[4]) : 1, [h, $, g] = Ft(f, v, d);
561
+ return [h, $, g, x];
562
562
  }
563
- const u = e.match(
563
+ const i = e.match(
564
564
  /^oklch\(\s*([+-]?[\d.]+%?)\s+([\d.]+)\s+([+-]?[\d.]+)(?:deg)?(?:\s*\/\s*(\d?(?:\.\d+)?))?\s*\)$/i
565
565
  );
566
- if (u) {
567
- const f = u[1], x = parseFloat(u[2]), d = parseFloat(u[3]), g = u[4] != null ? parseFloat(u[4]) : 1, b = f.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(f) / 100)) : Math.max(0, Math.min(1, parseFloat(f))), [_, h, v] = Lt(b, x, d);
568
- return [_, h, v, g];
566
+ if (i) {
567
+ const f = i[1], v = parseFloat(i[2]), d = parseFloat(i[3]), x = i[4] != null ? parseFloat(i[4]) : 1, h = f.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(f) / 100)) : Math.max(0, Math.min(1, parseFloat(f))), [$, g, b] = Lt(h, v, d);
568
+ return [$, g, b, x];
569
569
  }
570
- const [c, p, m] = ke(e);
570
+ const [c, p, m] = ye(e);
571
571
  return [c, p, m, 1];
572
572
  }
573
- const At = (e, t, r, n) => `rgba(${Math.round(e)}, ${Math.round(t)}, ${Math.round(r)}, ${Math.max(
573
+ const Tt = (e, t, r, n) => `rgba(${Math.round(e)}, ${Math.round(t)}, ${Math.round(r)}, ${Math.max(
574
574
  0,
575
575
  Math.min(1, Math.round(n * 100) / 100)
576
576
  )})`;
577
- function Ft(e) {
577
+ function At(e) {
578
578
  let t = e + 1831565813;
579
579
  return function() {
580
580
  return t = Math.imul(t ^ t >>> 15, t | 1), t ^= t + Math.imul(t ^ t >>> 7, t | 61), ((t ^ t >>> 14) >>> 0) / 4294967296;
581
581
  };
582
582
  }
583
- function Ze(e, t, r) {
583
+ function We(e, t, r) {
584
584
  e = (e % 360 + 360) % 360;
585
585
  const n = (1 - Math.abs(2 * r - 1)) * t, s = n * (1 - Math.abs(e / 60 % 2 - 1)), o = r - n / 2;
586
- let l = 0, u = 0, c = 0;
587
- return 0 <= e && e < 60 ? [l, u, c] = [n, s, 0] : 60 <= e && e < 120 ? [l, u, c] = [s, n, 0] : 120 <= e && e < 180 ? [l, u, c] = [0, n, s] : 180 <= e && e < 240 ? [l, u, c] = [0, s, n] : 240 <= e && e < 300 ? [l, u, c] = [s, 0, n] : [l, u, c] = [n, 0, s], [
586
+ let l = 0, i = 0, c = 0;
587
+ return 0 <= e && e < 60 ? [l, i, c] = [n, s, 0] : 60 <= e && e < 120 ? [l, i, c] = [s, n, 0] : 120 <= e && e < 180 ? [l, i, c] = [0, n, s] : 180 <= e && e < 240 ? [l, i, c] = [0, s, n] : 240 <= e && e < 300 ? [l, i, c] = [s, 0, n] : [l, i, c] = [n, 0, s], [
588
588
  Math.round((l + o) * 255),
589
- Math.round((u + o) * 255),
589
+ Math.round((i + o) * 255),
590
590
  Math.round((c + o) * 255)
591
591
  ];
592
592
  }
593
- function Bt(e, t, r) {
593
+ function Ft(e, t, r) {
594
594
  e = (e % 360 + 360) % 360;
595
595
  const n = t + r;
596
596
  n > 1 && (t /= n, r /= n);
597
- const [s, o, l] = Ze(e, 1, 0.5).map((f) => f / 255), u = 1 - t - r, c = s * u + t, p = o * u + t, m = l * u + t;
597
+ const [s, o, l] = We(e, 1, 0.5).map((f) => f / 255), i = 1 - t - r, c = s * i + t, p = o * i + t, m = l * i + t;
598
598
  return [Math.round(c * 255), Math.round(p * 255), Math.round(m * 255)];
599
599
  }
600
600
  function Ce(e, t, r) {
601
601
  e /= 255, t /= 255, r /= 255;
602
602
  const n = Math.max(e, t, r), s = Math.min(e, t, r);
603
603
  let o = 0, l = 0;
604
- const u = (n + s) / 2, c = n - s;
604
+ const i = (n + s) / 2, c = n - s;
605
605
  if (c !== 0) {
606
- switch (l = u > 0.5 ? c / (2 - n - s) : c / (n + s), n) {
606
+ switch (l = i > 0.5 ? c / (2 - n - s) : c / (n + s), n) {
607
607
  case e:
608
608
  o = (t - r) / c + (t < r ? 6 : 0);
609
609
  break;
@@ -615,35 +615,35 @@ function Ce(e, t, r) {
615
615
  }
616
616
  o *= 60;
617
617
  }
618
- return [Math.round(o), Math.round(l * 100), Math.round(u * 100)];
618
+ return [Math.round(o), Math.round(l * 100), Math.round(i * 100)];
619
619
  }
620
- function Vt(e, t, r) {
621
- const [n] = Ce(e, t, r), s = e / 255, o = t / 255, l = r / 255, u = Math.min(s, o, l), c = 1 - Math.max(s, o, l);
622
- return [n, Math.round(u * 100), Math.round(c * 100)];
620
+ function Bt(e, t, r) {
621
+ const [n] = Ce(e, t, r), s = e / 255, o = t / 255, l = r / 255, i = Math.min(s, o, l), c = 1 - Math.max(s, o, l);
622
+ return [n, Math.round(i * 100), Math.round(c * 100)];
623
623
  }
624
- function xe(e) {
624
+ function ve(e) {
625
625
  const t = e / 255;
626
626
  return t <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
627
627
  }
628
- function we(e) {
628
+ function xe(e) {
629
629
  const t = e <= 31308e-7 ? 12.92 * e : 1.055 * Math.pow(e, 0.4166666666666667) - 0.055;
630
630
  return Math.round(Math.max(0, Math.min(1, t)) * 255);
631
631
  }
632
632
  function Lt(e, t, r) {
633
- const n = r * Math.PI / 180, s = Math.cos(n) * t, o = Math.sin(n) * t, l = e + 0.3963377774 * s + 0.2158037573 * o, u = e - 0.1055613458 * s - 0.0638541728 * o, c = e - 0.0894841775 * s - 1.291485548 * o, p = l * l * l, m = u * u * u, f = c * c * c, x = 4.0767416621 * p - 3.3077115913 * m + 0.2309699292 * f, d = -1.2684380046 * p + 2.6097574011 * m - 0.3413193965 * f, g = -0.0041960863 * p - 0.7034186147 * m + 1.707614701 * f;
634
- return [we(x), we(d), we(g)];
633
+ const n = r * Math.PI / 180, s = Math.cos(n) * t, o = Math.sin(n) * t, l = e + 0.3963377774 * s + 0.2158037573 * o, i = e - 0.1055613458 * s - 0.0638541728 * o, c = e - 0.0894841775 * s - 1.291485548 * o, p = l * l * l, m = i * i * i, f = c * c * c, v = 4.0767416621 * p - 3.3077115913 * m + 0.2309699292 * f, d = -1.2684380046 * p + 2.6097574011 * m - 0.3413193965 * f, x = -0.0041960863 * p - 0.7034186147 * m + 1.707614701 * f;
634
+ return [xe(v), xe(d), xe(x)];
635
635
  }
636
- function Et(e, t, r) {
637
- const n = xe(e), s = xe(t), o = xe(r), l = 0.4122214708 * n + 0.5363325363 * s + 0.0514459929 * o, u = 0.2119034982 * n + 0.6806995451 * s + 0.1073969566 * o, c = 0.0883024619 * n + 0.2817188376 * s + 0.6299787005 * o, p = Math.cbrt(l), m = Math.cbrt(u), f = Math.cbrt(c), x = 0.2104542553 * p + 0.793617785 * m - 0.0040720468 * f, d = 1.9779984951 * p - 2.428592205 * m + 0.4505937099 * f, g = 0.0259040371 * p + 0.7827717662 * m - 0.808675766 * f, b = Math.sqrt(d * d + g * g);
638
- let _ = Math.atan2(g, d) * 180 / Math.PI;
639
- return _ < 0 && (_ += 360), [x, b, _];
636
+ function Vt(e, t, r) {
637
+ const n = ve(e), s = ve(t), o = ve(r), l = 0.4122214708 * n + 0.5363325363 * s + 0.0514459929 * o, i = 0.2119034982 * n + 0.6806995451 * s + 0.1073969566 * o, c = 0.0883024619 * n + 0.2817188376 * s + 0.6299787005 * o, p = Math.cbrt(l), m = Math.cbrt(i), f = Math.cbrt(c), v = 0.2104542553 * p + 0.793617785 * m - 0.0040720468 * f, d = 1.9779984951 * p - 2.428592205 * m + 0.4505937099 * f, x = 0.0259040371 * p + 0.7827717662 * m - 0.808675766 * f, h = Math.sqrt(d * d + x * x);
638
+ let $ = Math.atan2(x, d) * 180 / Math.PI;
639
+ return $ < 0 && ($ += 360), [v, h, $];
640
640
  }
641
- function oe(e, t, r, n, s, o) {
641
+ function ae(e, t, r, n, s, o) {
642
642
  switch (s) {
643
643
  case "hex":
644
644
  if (o) {
645
- const l = (c) => c.toString(16).padStart(2, "0"), u = Math.max(0, Math.min(255, Math.round(n * 255)));
646
- return `#${l(e)}${l(t)}${l(r)}${l(u)}`;
645
+ const l = (c) => c.toString(16).padStart(2, "0"), i = Math.max(0, Math.min(255, Math.round(n * 255)));
646
+ return `#${l(e)}${l(t)}${l(r)}${l(i)}`;
647
647
  }
648
648
  return Ie(e, t, r);
649
649
  case "rgb":
@@ -651,182 +651,184 @@ function oe(e, t, r, n, s, o) {
651
651
  case "rgba":
652
652
  return `rgba(${e}, ${t}, ${r}, ${Math.round(n * 100) / 100})`;
653
653
  case "hsl": {
654
- const [l, u, c] = Ce(e, t, r);
655
- return `hsl(${l}, ${u}%, ${c}%)`;
654
+ const [l, i, c] = Ce(e, t, r);
655
+ return `hsl(${l}, ${i}%, ${c}%)`;
656
656
  }
657
657
  case "hsla": {
658
- const [l, u, c] = Ce(e, t, r);
659
- return `hsla(${l}, ${u}%, ${c}%, ${Math.round(n * 100) / 100})`;
658
+ const [l, i, c] = Ce(e, t, r);
659
+ return `hsla(${l}, ${i}%, ${c}%, ${Math.round(n * 100) / 100})`;
660
660
  }
661
661
  case "hwb": {
662
- const [l, u, c] = Vt(e, t, r);
663
- return n < 1 ? `hwb(${l} ${u}% ${c}% / ${Math.round(n * 100) / 100})` : `hwb(${l} ${u}% ${c}%)`;
662
+ const [l, i, c] = Bt(e, t, r);
663
+ return n < 1 ? `hwb(${l} ${i}% ${c}% / ${Math.round(n * 100) / 100})` : `hwb(${l} ${i}% ${c}%)`;
664
664
  }
665
665
  case "oklch": {
666
- const [l, u, c] = Et(e, t, r), p = (Math.round(l * 1e3) / 1e3).toFixed(3), m = (Math.round(u * 1e3) / 1e3).toFixed(3), f = (Math.round(c * 10) / 10).toFixed(1), x = Math.round(n * 100) / 100;
667
- return o || n < 1 ? `oklch(${p} ${m} ${f} / ${x})` : `oklch(${p} ${m} ${f})`;
666
+ const [l, i, c] = Vt(e, t, r), p = (Math.round(l * 1e3) / 1e3).toFixed(3), m = (Math.round(i * 1e3) / 1e3).toFixed(3), f = (Math.round(c * 10) / 10).toFixed(1), v = Math.round(n * 100) / 100;
667
+ return o || n < 1 ? `oklch(${p} ${m} ${f} / ${v})` : `oklch(${p} ${m} ${f})`;
668
668
  }
669
669
  }
670
670
  }
671
- function ce(e, t) {
671
+ function oe(e, t) {
672
672
  return t ? e === "rgb" ? "rgba" : e === "hsl" ? "hsla" : e : e === "rgba" ? "rgb" : e === "hsla" ? "hsl" : e;
673
673
  }
674
- function Ut(e, t) {
675
- const [r, n, s] = e, o = r << 16 ^ n << 8 ^ s, l = Ft(o), u = 6 + Math.floor(l() * 5), c = 0.18 + l() * 0.06, p = [];
676
- for (let d = 0; d < u; d++) {
677
- const g = d / u * Math.PI * 2, b = t * (1 + (l() * 2 - 1) * c), _ = Math.cos(g) * b, h = Math.sin(g) * b;
678
- p.push({ x: _, y: h });
674
+ function Et(e, t) {
675
+ const [r, n, s] = e, o = r << 16 ^ n << 8 ^ s, l = At(o), i = 6 + Math.floor(l() * 5), c = 0.18 + l() * 0.06, p = [];
676
+ for (let d = 0; d < i; d++) {
677
+ const x = d / i * Math.PI * 2, h = t * (1 + (l() * 2 - 1) * c), $ = Math.cos(x) * h, g = Math.sin(x) * h;
678
+ p.push({ x: $, y: g });
679
679
  }
680
- const m = (p[0].x + p[u - 1].x) / 2, f = (p[0].y + p[u - 1].y) / 2;
681
- let x = `M ${m.toFixed(3)} ${f.toFixed(3)}`;
682
- for (let d = 0; d < u; d++) {
683
- const g = p[d], b = p[(d + 1) % u], _ = (g.x + b.x) / 2, h = (g.y + b.y) / 2;
684
- x += ` Q ${g.x.toFixed(3)} ${g.y.toFixed(3)} ${_.toFixed(3)} ${h.toFixed(3)}`;
680
+ const m = (p[0].x + p[i - 1].x) / 2, f = (p[0].y + p[i - 1].y) / 2;
681
+ let v = `M ${m.toFixed(3)} ${f.toFixed(3)}`;
682
+ for (let d = 0; d < i; d++) {
683
+ const x = p[d], h = p[(d + 1) % i], $ = (x.x + h.x) / 2, g = (x.y + h.y) / 2;
684
+ v += ` Q ${x.x.toFixed(3)} ${x.y.toFixed(3)} ${$.toFixed(3)} ${g.toFixed(3)}`;
685
685
  }
686
- return x += " Z", x;
686
+ return v += " Z", v;
687
687
  }
688
- const bn = (e) => {
689
- const { value: t, onBlur: r, onChange: n, onInput: s, displayValue: o, size: l, withAlpha: u } = e, c = i.map(l ?? 32, (w) => w), p = i.map(t, (w) => Dt(w ?? "#000000")), m = i.map(
688
+ const mn = (e) => {
689
+ const { value: t, onBlur: r, onChange: n, onInput: s, displayValue: o, size: l, withAlpha: i } = e, c = u.map(l ?? 32, (w) => w), p = u.map(t, (w) => St(w ?? "#000000")), m = u.map(
690
690
  p,
691
691
  ([w, k, M]) => [w, k, M]
692
- ), f = i.map(p, ([, , , w]) => w), x = K(i.get(f) ?? 1), d = i.map(u ?? !1, (w) => w), g = i.map(
692
+ ), f = u.map(p, ([, , , w]) => w), v = te(u.get(f) ?? 1), d = u.map(i ?? !1, (w) => w), x = u.map(
693
693
  e.colorTextFormat ?? "rgb",
694
694
  (w) => w
695
- ), b = B(
695
+ ), h = V(
696
696
  m,
697
+ v,
697
698
  x,
698
- g,
699
699
  d
700
700
  )(
701
- ([w, k, M], A, F, S) => oe(w, k, M, A ?? 1, ce(F, S), S)
702
- ), _ = i.map(
701
+ ([w, k, M], A, F, S) => ae(w, k, M, A ?? 1, oe(F, S), S)
702
+ ), $ = u.map(
703
703
  e.colorTextFormat ?? "hex",
704
704
  (w) => w
705
- ), h = i.map(c, (w) => `-${w / 2} -${w / 2} ${w} ${w}`), v = B(
705
+ ), g = u.map(c, (w) => `0 0 ${w} ${w}`), b = V(
706
706
  m,
707
707
  c
708
- )((w, k) => Ut(w, k / 2)), T = B(
708
+ )((w, k) => Et(w, k / 2)), D = V(
709
709
  m,
710
- x,
710
+ v,
711
711
  d
712
712
  )(
713
- ([w, k, M], A, F) => F || A < 1 ? At(w, k, M, A) : Ie(w, k, M)
714
- ), I = y.div(
713
+ ([w, k, M], A, F) => F || A < 1 ? Tt(w, k, M, A) : Ie(w, k, M)
714
+ ), y = I.div(
715
715
  a.class("bc-color-input__control"),
716
716
  a.class(
717
- i.map(
717
+ u.map(
718
718
  d,
719
719
  (w) => w ? "bc-color-input__control--alpha" : ""
720
720
  )
721
721
  ),
722
- a.style(B(c)((w) => `min-width:${w}px;height:${w}px`)),
722
+ a.style(
723
+ V(c)((w) => `min-width:${w + 2}px;height:${w + 2}px`)
724
+ ),
723
725
  // The SVG blob preview
724
726
  Ae.svg(
725
727
  a.class("bc-color-input__svg"),
726
- ge.viewBox(h),
727
- Ae.path(ge.d(v), ge.fill(T))
728
+ he.viewBox(g),
729
+ Ae.path(he.d(b), he.fill(D))
728
730
  ),
729
731
  // Invisible native input overlays the blob for picker and accessibility
730
- y.input(
732
+ I.input(
731
733
  a.type("color"),
732
- H(e),
734
+ j(e),
733
735
  // Native color input needs hex without alpha
734
- a.value(i.map(m, ([w, k, M]) => Ie(w, k, M))),
736
+ a.value(u.map(m, ([w, k, M]) => Ie(w, k, M))),
735
737
  a.class("bc-input bc-color-input bc-color-input__native"),
736
- r != null ? C.blur(r) : D,
738
+ r != null ? C.blur(r) : T,
737
739
  n != null ? C.change((w) => {
738
740
  const k = w.target.value;
739
741
  if (!n) return;
740
- const [M, A, F] = ke(k), S = i.get(x) ?? 1, V = ce(
741
- i.get(_),
742
- i.get(d)
743
- ), R = oe(M, A, F, S, V, i.get(d));
742
+ const [M, A, F] = ye(k), S = u.get(v) ?? 1, B = oe(
743
+ u.get($),
744
+ u.get(d)
745
+ ), R = ae(M, A, F, S, B, u.get(d));
744
746
  n(R);
745
- }) : D,
747
+ }) : T,
746
748
  s != null ? C.input((w) => {
747
749
  const k = w.target.value;
748
750
  if (!s) return;
749
- const [M, A, F] = ke(k), S = i.get(x) ?? 1, V = ce(
750
- i.get(_),
751
- i.get(d)
752
- ), R = oe(M, A, F, S, V, i.get(d));
751
+ const [M, A, F] = ye(k), S = u.get(v) ?? 1, B = oe(
752
+ u.get($),
753
+ u.get(d)
754
+ ), R = ae(M, A, F, S, B, u.get(d));
753
755
  s(R);
754
- }) : D
756
+ }) : T
755
757
  )
756
- ), $ = E(
758
+ ), _ = E(
757
759
  d,
758
- () => y.input(
760
+ () => I.input(
759
761
  a.type("range"),
760
762
  a.class("bc-color-input__alpha"),
761
763
  a.min(0),
762
764
  a.max(1),
763
765
  a.step(0.01),
764
- a.value(i.map(x, (w) => String(w ?? 1))),
766
+ a.value(u.map(v, (w) => String(w ?? 1))),
765
767
  a.disabled(e.disabled),
766
768
  C.input((w) => {
767
769
  const k = parseFloat(w.target.value);
768
- x.set(k);
769
- const [M, A, F] = i.get(m), S = ce(
770
- i.get(_),
771
- i.get(d)
772
- ), V = oe(M, A, F, k, S, i.get(d));
773
- s?.(V);
770
+ v.set(k);
771
+ const [M, A, F] = u.get(m), S = oe(
772
+ u.get($),
773
+ u.get(d)
774
+ ), B = ae(M, A, F, k, S, u.get(d));
775
+ s?.(B);
774
776
  }),
775
777
  C.change((w) => {
776
778
  const k = parseFloat(w.target.value);
777
- x.set(k);
778
- const [M, A, F] = i.get(m), S = ce(
779
- i.get(_),
780
- i.get(d)
781
- ), V = oe(M, A, F, k, S, i.get(d));
782
- n?.(V);
779
+ v.set(k);
780
+ const [M, A, F] = u.get(m), S = oe(
781
+ u.get($),
782
+ u.get(d)
783
+ ), B = ae(M, A, F, k, S, u.get(d));
784
+ n?.(B);
783
785
  })
784
786
  )
785
787
  );
786
- return P({
788
+ return O({
787
789
  baseContainer: !0,
788
790
  ...e,
789
791
  // ensure our control does not try to grow
790
792
  growInput: !1,
791
- input: I,
793
+ input: y,
792
794
  // If caller provided an `after`, append RGB before it
793
795
  after: L(
794
796
  E(
795
797
  o ?? !1,
796
- () => y.span(a.class("bc-color-input__rgb"), b)
798
+ () => I.span(a.class("bc-color-input__rgb"), h)
797
799
  ),
798
- $,
800
+ _,
799
801
  e.after
800
802
  )
801
803
  });
802
- }, Te = "$$tts-exp-", Nt = (e, t) => ie((r) => {
803
- const n = `${Te}${e}`;
804
- return Z(i.on(t, (s) => Reflect.set(r, n, s)));
805
- }), vn = (e, t) => {
806
- const r = `${Te}${e}`;
804
+ }, De = "$$tts-exp-", Ut = (e, t) => ie((r) => {
805
+ const n = `${De}${e}`;
806
+ return W(u.on(t, (s) => Reflect.set(r, n, s)));
807
+ }), hn = (e, t) => {
808
+ const r = `${De}${e}`;
807
809
  return (n) => {
808
810
  t(Reflect.get(n.target, r));
809
811
  };
810
- }, zt = (e, t) => {
811
- const r = `${Te}${e}`;
812
+ }, Nt = (e, t) => {
813
+ const r = `${De}${e}`;
812
814
  return (n) => {
813
815
  const s = n.target, o = s.selectedIndex, l = s.options[o];
814
816
  t(Reflect.get(l, r));
815
817
  };
816
818
  };
817
- function Rt(e, t, r) {
819
+ function zt(e, t, r) {
818
820
  const n = ["bc-card"];
819
821
  return e !== "default" && n.push(`bc-card--${e}`), t !== "md" && n.push(`bc-card--padding-${t}`), r !== "lg" && n.push(`bc-card--rounded-${r}`), n.join(" ");
820
822
  }
821
- function xn({ variant: e = "default", size: t = "md", roundedness: r = "lg" } = {}, ...n) {
822
- return y.div(
823
+ function gn({ variant: e = "default", size: t = "md", roundedness: r = "lg" } = {}, ...n) {
824
+ return I.div(
823
825
  a.class(
824
- B(
826
+ V(
825
827
  e,
826
828
  t,
827
829
  r
828
830
  )(
829
- (s, o, l) => Rt(
831
+ (s, o, l) => zt(
830
832
  s ?? "default",
831
833
  o ?? "md",
832
834
  l ?? "lg"
@@ -837,37 +839,37 @@ function xn({ variant: e = "default", size: t = "md", roundedness: r = "lg" } =
837
839
  );
838
840
  }
839
841
  function pe(...e) {
840
- return y.div(a.class("bc-group"), ...e);
842
+ return I.div(a.class("bc-group"), ...e);
841
843
  }
842
- const wn = ({
844
+ const bn = ({
843
845
  startEditing: e,
844
846
  value: t,
845
847
  onChange: r,
846
848
  placeholder: n,
847
849
  disabled: s
848
850
  }) => {
849
- const o = i.deriveProp(e ?? !1), l = K(!1), u = i.map(s ?? !1, (c) => c);
850
- return y.div(
851
+ const o = u.deriveProp(e ?? !1), l = te(!1), i = u.map(s ?? !1, (c) => c);
852
+ return I.div(
851
853
  a.class("bc-editable-text"),
852
854
  a.class(
853
- i.map(
854
- u,
855
+ u.map(
856
+ i,
855
857
  (c) => c ? "bc-editable-text--disabled" : ""
856
858
  )
857
859
  ),
858
- N.disabled(u),
860
+ N.disabled(i),
859
861
  E(
860
862
  o,
861
- () => y.input(
863
+ () => I.input(
862
864
  a.placeholder(n),
863
865
  a.value(t),
864
866
  a.class("bc-editable-text__input"),
865
- at(),
867
+ lt(),
866
868
  C.keydown((c) => {
867
869
  c.key === "Enter" ? o.set(!1) : c.key === "Escape" && (l.set(!0), o.set(!1));
868
870
  }),
869
871
  C.blur(
870
- j((c) => {
872
+ P((c) => {
871
873
  if (o.set(!1), l.value) {
872
874
  l.set(!1);
873
875
  return;
@@ -876,24 +878,24 @@ const wn = ({
876
878
  })
877
879
  )
878
880
  ),
879
- () => y.span(
881
+ () => I.span(
880
882
  C.click(() => {
881
- i.get(u) || o.set(!0);
883
+ u.get(i) || o.set(!0);
882
884
  }),
883
885
  a.class("bc-editable-text__display"),
884
886
  E(
885
- i.map(t, (c) => c != null && c.trim() !== ""),
886
- () => y.span(a.class("bc-editable-text__text"), t),
887
- () => y.span(
887
+ u.map(t, (c) => c != null && c.trim() !== ""),
888
+ () => I.span(a.class("bc-editable-text__text"), t),
889
+ () => I.span(
888
890
  a.class("bc-editable-text__placeholder"),
889
891
  n
890
892
  )
891
893
  ),
892
894
  E(
893
- i.map(u, (c) => !c),
894
- () => y.button(
895
+ u.map(i, (c) => !c),
896
+ () => I.button(
895
897
  a.class("bc-editable-text__edit-button"),
896
- O(W, (c) => N.label(c.$.editLabel)),
898
+ H(X, (c) => N.label(c.$.editLabel)),
897
899
  C.click(() => o.set(!0)),
898
900
  z({ icon: "line-md/pencil", color: "neutral" })
899
901
  )
@@ -901,35 +903,35 @@ const wn = ({
901
903
  )
902
904
  )
903
905
  );
904
- }, Ye = (e, t, r) => Oe(
906
+ }, Ze = (e, t, r) => Je(
905
907
  e,
906
908
  (n) => Ke(n, {
907
909
  value: (s) => {
908
- const o = B(
910
+ const o = V(
909
911
  s,
910
912
  r
911
- )((l, u) => t(l.value, u));
912
- return y.option(
913
- Z(o.dispose),
913
+ )((l, i) => t(l.value, i));
914
+ return I.option(
915
+ W(o.dispose),
914
916
  a.selected(o),
915
- Nt("value", s.$.value),
917
+ Ut("value", s.$.value),
916
918
  s.$.label
917
919
  );
918
920
  },
919
- group: (s) => y.optgroup(
921
+ group: (s) => I.optgroup(
920
922
  a.label(s.$.group),
921
923
  fe(
922
924
  s.$.options,
923
- (o) => Ye(
925
+ (o) => Ze(
924
926
  o,
925
927
  t,
926
928
  r
927
929
  )
928
930
  )
929
931
  ),
930
- break: () => y.hr()
932
+ break: () => I.hr()
931
933
  })
932
- ), Pt = (e) => {
934
+ ), Rt = (e) => {
933
935
  const {
934
936
  value: t,
935
937
  onBlur: r,
@@ -937,10 +939,10 @@ const wn = ({
937
939
  options: s,
938
940
  unselectedLabel: o,
939
941
  equality: l = (p, m) => p === m,
940
- after: u
942
+ after: i
941
943
  } = e;
942
944
  let c;
943
- return P(
945
+ return O(
944
946
  {
945
947
  ...e,
946
948
  after: L(
@@ -949,29 +951,29 @@ const wn = ({
949
951
  color: "neutral",
950
952
  size: "sm"
951
953
  }),
952
- u
954
+ i
953
955
  ),
954
- input: y.select(
956
+ input: I.select(
955
957
  ie((p) => {
956
958
  c = p;
957
959
  const m = new MutationObserver((f) => {
958
- const { removedNodes: x } = f[0];
959
- x.length > 0 && (c.selectedIndex = 0);
960
+ const { removedNodes: v } = f[0];
961
+ v.length > 0 && (c.selectedIndex = 0);
960
962
  });
961
- return m.observe(p, { childList: !0 }), Z(() => m.disconnect());
963
+ return m.observe(p, { childList: !0 }), W(() => m.disconnect());
962
964
  }),
963
- H(e),
965
+ j(e),
964
966
  a.class("bc-native-select bc-input"),
965
- O(
966
- W,
967
- (p) => y.option(
967
+ H(
968
+ X,
969
+ (p) => I.option(
968
970
  a.hidden("hidden"),
969
- Je(o, p.$.selectOne)
971
+ Qe(o, p.$.selectOne)
970
972
  )
971
973
  ),
972
- fe(s, (p) => Ye(p, l, t)),
973
- r != null ? C.blur(r) : D,
974
- n != null ? C.change(zt("value", (p) => n(p))) : D
974
+ fe(s, (p) => Ze(p, l, t)),
975
+ r != null ? C.blur(r) : T,
976
+ n != null ? C.change(Nt("value", (p) => n(p))) : T
975
977
  )
976
978
  },
977
979
  C.click(() => {
@@ -981,38 +983,38 @@ const wn = ({
981
983
  };
982
984
  function Ot(e) {
983
985
  const { controller: t, onChange: r, onBlur: n, ...s } = e;
984
- return Pt({
986
+ return Rt({
985
987
  ...s,
986
988
  value: t.value,
987
- onChange: it(t, r),
988
- onBlur: ct(t, n)
989
+ onChange: ct(t, r),
990
+ onBlur: ot(t, n)
989
991
  });
990
992
  }
991
- function _n(e) {
992
- return We({
993
+ function vn(e) {
994
+ return He({
993
995
  ...e,
994
996
  content: Ot(e)
995
997
  });
996
998
  }
997
- function jt(e, t, r) {
999
+ function Pt(e, t, r) {
998
1000
  const n = e.length.map((s) => s);
999
1001
  return L(
1000
- Z(() => n.dispose()),
1001
- je(
1002
+ W(() => n.dispose()),
1003
+ Pe(
1002
1004
  n,
1003
1005
  (s) => {
1004
1006
  const o = e.item(s.index), l = [];
1005
1007
  return L(
1006
- Z(() => {
1007
- o.dispose(), l.forEach((u) => u());
1008
+ W(() => {
1009
+ o.dispose(), l.forEach((i) => i());
1008
1010
  }),
1009
1011
  t({
1010
1012
  list: e,
1011
1013
  item: o,
1012
1014
  position: s,
1013
1015
  remove: () => e.removeAt(s.index),
1014
- move: (u) => {
1015
- switch (u) {
1016
+ move: (i) => {
1017
+ switch (i) {
1016
1018
  case "up":
1017
1019
  if (s.index === 0) return;
1018
1020
  e.move(s.index, s.index - 1);
@@ -1028,9 +1030,9 @@ function jt(e, t, r) {
1028
1030
  e.move(s.index, e.length.value - 1);
1029
1031
  }
1030
1032
  },
1031
- canMove: (u) => {
1033
+ canMove: (i) => {
1032
1034
  const c = (() => {
1033
- switch (u) {
1035
+ switch (i) {
1034
1036
  case "up":
1035
1037
  return Fe(s.index > 0);
1036
1038
  case "down":
@@ -1039,9 +1041,9 @@ function jt(e, t, r) {
1039
1041
  })();
1040
1042
  return l.push(() => c.dispose()), c;
1041
1043
  },
1042
- cannotMove: (u) => {
1044
+ cannotMove: (i) => {
1043
1045
  const c = (() => {
1044
- switch (u) {
1046
+ switch (i) {
1045
1047
  case "up":
1046
1048
  return Fe(s.index === 0);
1047
1049
  case "down":
@@ -1061,12 +1063,12 @@ const Ne = {
1061
1063
  9: { pattern: /^[0-9]$/ },
1062
1064
  A: { pattern: /^[A-Za-z]$/, transform: (e) => e.toUpperCase() },
1063
1065
  "*": { pattern: /^.$/ }
1064
- }, Ht = (e) => e instanceof RegExp;
1065
- function Xe(e, t, r) {
1066
+ }, jt = (e) => e instanceof RegExp;
1067
+ function Ye(e, t, r) {
1066
1068
  if (e == null) return [];
1067
- const n = r ? { ...Ne, ...t } : t ?? Ne, s = (l, u) => {
1068
- const c = n[u];
1069
- c ? l.push({ type: "pattern", name: u, ...c }) : l.push({ type: "literal", char: u });
1069
+ const n = r ? { ...Ne, ...t } : t ?? Ne, s = (l, i) => {
1070
+ const c = n[i];
1071
+ c ? l.push({ type: "pattern", name: i, ...c }) : l.push({ type: "literal", char: i });
1070
1072
  }, o = [];
1071
1073
  if (typeof e == "string") {
1072
1074
  for (const l of e) s(o, l);
@@ -1075,11 +1077,11 @@ function Xe(e, t, r) {
1075
1077
  for (const l of e)
1076
1078
  if (typeof l == "string")
1077
1079
  if (l.length <= 1) s(o, l);
1078
- else for (const u of l) s(o, u);
1079
- else Ht(l) ? o.push({ type: "pattern", pattern: l }) : typeof l == "object" && l && o.push(l);
1080
+ else for (const i of l) s(o, i);
1081
+ else jt(l) ? o.push({ type: "pattern", pattern: l }) : typeof l == "object" && l && o.push(l);
1080
1082
  return o;
1081
1083
  }
1082
- function Wt(e, t) {
1084
+ function Ht(e, t) {
1083
1085
  return (r) => {
1084
1086
  switch (e) {
1085
1087
  case "digits":
@@ -1101,58 +1103,58 @@ function ze(e, t, r, n, s, o) {
1101
1103
  previousConformed: t,
1102
1104
  cursor: s ?? e.length,
1103
1105
  completed: !1
1104
- }, u = n.definitions ?? {}, c = typeof r == "function" ? r(e, l) : r, p = Xe(
1106
+ }, i = n.definitions ?? {}, c = typeof r == "function" ? r(e, l) : r, p = Ye(
1105
1107
  c,
1106
- u,
1108
+ i,
1107
1109
  n.useDefaultDefinitions ?? !0
1108
- ), m = Wt(n.allowMode, n.allow), f = /* @__PURE__ */ new Set();
1110
+ ), m = Ht(n.allowMode, n.allow), f = /* @__PURE__ */ new Set();
1109
1111
  for (const S of p) S.type === "literal" && f.add(S.char);
1110
1112
  if (n.prefix) for (const S of n.prefix) f.add(S);
1111
1113
  if (n.suffix) for (const S of n.suffix) f.add(S);
1112
- const x = Array.from(e).filter((S) => m(S) && !f.has(S));
1113
- if (x.length === 0) return { value: "", cursor: 0, completed: !1 };
1114
- const d = [], g = [];
1115
- let b = 0, _ = 0, h = 0, v = -1;
1114
+ const v = Array.from(e).filter((S) => m(S) && !f.has(S));
1115
+ if (v.length === 0) return { value: "", cursor: 0, completed: !1 };
1116
+ const d = [], x = [];
1117
+ let h = 0, $ = 0, g = 0, b = -1;
1116
1118
  for (const S of p) {
1117
1119
  if (S.type === "literal") {
1118
- d.push(S.char), g.push({ kind: "literal", filled: !0 });
1120
+ d.push(S.char), x.push({ kind: "literal", filled: !0 });
1119
1121
  continue;
1120
1122
  }
1121
- _ += S.optional ? 0 : 1;
1122
- const V = x[b];
1123
- if (V == null)
1123
+ $ += S.optional ? 0 : 1;
1124
+ const B = v[h];
1125
+ if (B == null)
1124
1126
  break;
1125
1127
  if (S.type === "any") {
1126
- h++, d.push(S.transform ? S.transform(V) : V), g.push({ kind: "slot", filled: !0 }), v = g.length - 1, b++;
1128
+ g++, d.push(S.transform ? S.transform(B) : B), x.push({ kind: "slot", filled: !0 }), b = x.length - 1, h++;
1127
1129
  continue;
1128
1130
  }
1129
1131
  if (S.type === "pattern")
1130
- if (S.pattern.test(V)) {
1131
- h++;
1132
- const R = S.transform ? S.transform(V) : V;
1133
- d.push(R), g.push({ kind: "slot", filled: !0 }), v = g.length - 1, b++;
1132
+ if (S.pattern.test(B)) {
1133
+ g++;
1134
+ const R = S.transform ? S.transform(B) : B;
1135
+ d.push(R), x.push({ kind: "slot", filled: !0 }), b = x.length - 1, h++;
1134
1136
  } else {
1135
- b++;
1137
+ h++;
1136
1138
  continue;
1137
1139
  }
1138
1140
  }
1139
- const T = d.join(""), I = (n.prefix ?? "") + T + (n.suffix ?? "");
1141
+ const D = d.join(""), y = (n.prefix ?? "") + D + (n.suffix ?? "");
1140
1142
  let w = (n.prefix ?? "").length;
1141
- if (v >= 0) {
1142
- let S = v + 1;
1143
+ if (b >= 0) {
1144
+ let S = b + 1;
1143
1145
  if ((o?.policy ?? "smart") !== "sticky")
1144
- for (; S < g.length && g[S].kind === "literal"; ) S++;
1146
+ for (; S < x.length && x[S].kind === "literal"; ) S++;
1145
1147
  w += S;
1146
1148
  }
1147
- const k = n.completion?.mode === "min" ? (n.completion.minChars ?? 0) <= h : n.completion?.mode === "custom" ? !!n.completion.isComplete?.(I) : _ > 0 && h >= _, M = n.pipe?.(I, { ...l, completed: k });
1149
+ const k = n.completion?.mode === "min" ? (n.completion.minChars ?? 0) <= g : n.completion?.mode === "custom" ? !!n.completion.isComplete?.(y) : $ > 0 && g >= $, M = n.pipe?.(y, { ...l, completed: k });
1148
1150
  let A, F = w;
1149
- return M === !1 ? (A = t, F = t.length) : typeof M == "string" ? (A = M, F = M.length) : typeof M == "object" && M ? (A = M.value, F = M.cursor ?? M.value.length) : A = I, { value: A, cursor: F, completed: k };
1151
+ return M === !1 ? (A = t, F = t.length) : typeof M == "string" ? (A = M, F = M.length) : typeof M == "object" && M ? (A = M.value, F = M.cursor ?? M.value.length) : A = y, { value: A, cursor: F, completed: k };
1150
1152
  }
1151
- function Zt(e, t) {
1153
+ function Wt(e, t) {
1152
1154
  const r = t?.strategy ?? "none";
1153
1155
  return r === "custom" && t?.unmask ? t.unmask(e) : r === "strip" ? e.replace(/[^A-Za-z0-9]/g, "") : e;
1154
1156
  }
1155
- const qe = (e) => {
1157
+ const Xe = (e) => {
1156
1158
  const {
1157
1159
  value: t,
1158
1160
  onBlur: r,
@@ -1160,133 +1162,133 @@ const qe = (e) => {
1160
1162
  onInput: s,
1161
1163
  onAccept: o,
1162
1164
  onComplete: l,
1163
- mask: u,
1165
+ mask: i,
1164
1166
  definitions: c,
1165
1167
  useDefaultDefinitions: p,
1166
1168
  extraLiterals: m,
1167
1169
  prefix: f,
1168
- suffix: x,
1170
+ suffix: v,
1169
1171
  autofix: d,
1170
- pipe: g,
1171
- completion: b,
1172
- unmask: _,
1173
- allowMode: h,
1174
- allow: v,
1175
- placeholder: T,
1176
- placeholderOptions: I
1177
- } = e, $ = B(
1172
+ pipe: x,
1173
+ completion: h,
1174
+ unmask: $,
1175
+ allowMode: g,
1176
+ allow: b,
1177
+ placeholder: D,
1178
+ placeholderOptions: y
1179
+ } = e, _ = V(
1178
1180
  t,
1179
- u,
1181
+ i,
1180
1182
  c,
1181
1183
  p,
1182
1184
  m,
1183
1185
  f,
1184
- x,
1186
+ v,
1185
1187
  d,
1186
- b,
1187
- _,
1188
1188
  h,
1189
- T,
1190
- I
1191
- )((k, M, A, F, S, V, R, re, le, te, Q, ue, q) => M ? ze(k ?? "", "", M, {
1189
+ $,
1190
+ g,
1191
+ D,
1192
+ y
1193
+ )((k, M, A, F, S, B, R, se, re, ee, Q, ue, q) => M ? ze(k ?? "", "", M, {
1192
1194
  definitions: A ?? {},
1193
1195
  useDefaultDefinitions: F ?? !0,
1194
1196
  extraLiterals: S ?? [],
1195
- autofix: re ?? "none",
1196
- completion: le ?? { mode: "mask" },
1197
- pipe: g ?? ((U) => U),
1198
- unmask: te ?? { strategy: "none" },
1197
+ autofix: se ?? "none",
1198
+ completion: re ?? { mode: "mask" },
1199
+ pipe: x ?? ((U) => U),
1200
+ unmask: ee ?? { strategy: "none" },
1199
1201
  allowMode: Q ?? "all",
1200
- allow: v,
1201
- prefix: V,
1202
+ allow: b,
1203
+ prefix: B,
1202
1204
  suffix: R
1203
1205
  }).value : k ?? ""), w = (k, M) => {
1204
- const A = k.value ?? "", F = i.get(t) ?? "", S = u != null ? i.get(u) : null, V = c != null ? i.get(c) : void 0, R = p != null ? i.get(p) : void 0, re = m != null ? i.get(m) : void 0, le = d != null ? i.get(d) : void 0, te = b != null ? i.get(b) : void 0, Q = _ != null ? i.get(_) : void 0, ue = h != null ? i.get(h) : void 0, q = f != null ? i.get(f) : void 0, U = x != null ? i.get(x) : void 0, {
1206
+ const A = k.value ?? "", F = u.get(t) ?? "", S = i != null ? u.get(i) : null, B = c != null ? u.get(c) : void 0, R = p != null ? u.get(p) : void 0, se = m != null ? u.get(m) : void 0, re = d != null ? u.get(d) : void 0, ee = h != null ? u.get(h) : void 0, Q = $ != null ? u.get($) : void 0, ue = g != null ? u.get(g) : void 0, q = f != null ? u.get(f) : void 0, U = v != null ? u.get(v) : void 0, {
1205
1207
  value: J,
1206
- cursor: he,
1208
+ cursor: me,
1207
1209
  completed: Se
1208
1210
  } = S ? ze(
1209
1211
  A,
1210
1212
  F,
1211
1213
  S,
1212
1214
  {
1213
- definitions: V ?? {},
1215
+ definitions: B ?? {},
1214
1216
  useDefaultDefinitions: R ?? !0,
1215
- extraLiterals: re ?? [],
1216
- autofix: le ?? "none",
1217
- completion: te ?? { mode: "mask" },
1218
- pipe: g ?? ((Ge) => Ge),
1217
+ extraLiterals: se ?? [],
1218
+ autofix: re ?? "none",
1219
+ completion: ee ?? { mode: "mask" },
1220
+ pipe: x ?? ((qe) => qe),
1219
1221
  unmask: Q ?? { strategy: "none" },
1220
1222
  allowMode: ue ?? "all",
1221
- allow: v,
1223
+ allow: b,
1222
1224
  prefix: q,
1223
1225
  suffix: U
1224
1226
  },
1225
1227
  k.selectionStart ?? A.length,
1226
- e.cursor ? i.get(e.cursor) : void 0
1228
+ e.cursor ? u.get(e.cursor) : void 0
1227
1229
  ) : { value: A, cursor: A.length, completed: !0 };
1228
1230
  if (J !== A) {
1229
1231
  k.value = J;
1230
1232
  try {
1231
- k.setSelectionRange(he, he);
1233
+ k.setSelectionRange(me, me);
1232
1234
  } catch {
1233
1235
  }
1234
1236
  }
1235
- const De = Zt(J, Q);
1237
+ const Te = Wt(J, Q);
1236
1238
  o?.({
1237
- raw: De,
1239
+ raw: Te,
1238
1240
  conformed: J,
1239
1241
  completed: Se,
1240
- cursor: he
1241
- }), M === "input" ? s?.(J) : (n?.(J), Se && l?.({ raw: De, conformed: J }));
1242
+ cursor: me
1243
+ }), M === "input" ? s?.(J) : (n?.(J), Se && l?.({ raw: Te, conformed: J }));
1242
1244
  };
1243
- return P({
1245
+ return O({
1244
1246
  ...e,
1245
- input: ee.text(
1246
- H(e),
1247
- a.value($),
1247
+ input: K.text(
1248
+ j(e),
1249
+ a.value(_),
1248
1250
  a.class("bc-input"),
1249
- r != null ? C.blur(r) : D,
1251
+ r != null ? C.blur(r) : T,
1250
1252
  ie(
1251
1253
  (k) => k instanceof HTMLInputElement ? L(
1252
1254
  C.input(() => w(k, "input")),
1253
1255
  C.change(() => w(k, "change")),
1254
1256
  C.keydown((M) => {
1255
- if (M.key !== "Backspace" || !(e.cursor ? i.get(e.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
1257
+ if (M.key !== "Backspace" || !(e.cursor ? u.get(e.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
1256
1258
  const F = k.selectionStart ?? 0, S = k.selectionEnd ?? F;
1257
1259
  if (F !== S || F <= 0) return;
1258
- const V = k.value ?? "", R = u != null ? i.get(u) : null;
1260
+ const B = k.value ?? "", R = i != null ? u.get(i) : null;
1259
1261
  if (!R) return;
1260
- const re = c != null ? i.get(c) : void 0, le = p != null ? i.get(p) : !0, te = f != null ? i.get(f) : void 0, Q = x != null ? i.get(x) : void 0, ue = Xe(
1261
- typeof R == "function" ? R(V, {
1262
- raw: V,
1263
- previousConformed: V,
1262
+ const se = c != null ? u.get(c) : void 0, re = p != null ? u.get(p) : !0, ee = f != null ? u.get(f) : void 0, Q = v != null ? u.get(v) : void 0, ue = Ye(
1263
+ typeof R == "function" ? R(B, {
1264
+ raw: B,
1265
+ previousConformed: B,
1264
1266
  cursor: F,
1265
1267
  completed: !1
1266
1268
  }) : R,
1267
- re ?? {},
1268
- le ?? !0
1269
+ se ?? {},
1270
+ re ?? !0
1269
1271
  ), q = /* @__PURE__ */ new Set();
1270
1272
  for (const U of ue)
1271
1273
  U.type === "literal" && q.add(U.char);
1272
- if (te) for (const U of te) q.add(U);
1274
+ if (ee) for (const U of ee) q.add(U);
1273
1275
  if (Q) for (const U of Q) q.add(U);
1274
- if (q.has(V[F - 1])) {
1276
+ if (q.has(B[F - 1])) {
1275
1277
  let U = F - 1;
1276
- for (; U >= 0 && q.has(V[U]); ) U--;
1277
- U >= 0 && (M.preventDefault(), M.stopPropagation(), k.value = V.slice(0, U) + V.slice(U + 1), w(k, "input"));
1278
+ for (; U >= 0 && q.has(B[U]); ) U--;
1279
+ U >= 0 && (M.preventDefault(), M.stopPropagation(), k.value = B.slice(0, U) + B.slice(U + 1), w(k, "input"));
1278
1280
  }
1279
1281
  })
1280
- ) : D
1282
+ ) : T
1281
1283
  )
1282
1284
  )
1283
1285
  });
1284
1286
  };
1285
- function X(e, t, r) {
1286
- const n = i.map(e, (o) => o != null), s = ye.clearValue;
1287
+ function Y(e, t, r) {
1288
+ const n = u.map(e, (o) => o != null), s = ke.clearValue;
1287
1289
  return E(
1288
1290
  n,
1289
- () => y.button(
1291
+ () => I.button(
1290
1292
  a.type("button"),
1291
1293
  a.class("bc-input-container__reset"),
1292
1294
  N.label(s),
@@ -1299,179 +1301,179 @@ function X(e, t, r) {
1299
1301
  )
1300
1302
  );
1301
1303
  }
1302
- const $n = (e) => {
1303
- const { value: t, onBlur: r, onChange: n, after: s, disabled: o } = e, l = X(t, o, n);
1304
- return P({
1304
+ const xn = (e) => {
1305
+ const { value: t, onBlur: r, onChange: n, after: s, disabled: o } = e, l = Y(t, o, n);
1306
+ return O({
1305
1307
  ...e,
1306
- input: ee.date(
1307
- H(e),
1308
+ input: K.date(
1309
+ j(e),
1308
1310
  a.valueAsDate(t),
1309
1311
  a.class("bc-input"),
1310
- r != null ? C.blur(j(r)) : D,
1311
- n != null ? C.change(et(n)) : D
1312
+ r != null ? C.blur(P(r)) : T,
1313
+ n != null ? C.change(et(n)) : T
1312
1314
  ),
1313
1315
  after: s != null ? L(l, s) : l
1314
1316
  });
1315
- }, Yt = (e) => {
1317
+ }, Zt = (e) => {
1316
1318
  const t = e.getFullYear(), r = e.getMonth() + 1, n = e.getDate(), s = e.getHours(), o = e.getMinutes(), l = e.getSeconds();
1317
1319
  return `${t}-${r.toString().padStart(2, "0")}-${n.toString().padStart(2, "0")}T${s.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}`;
1318
- }, yn = (e) => {
1319
- const { value: t, onBlur: r, onChange: n, after: s, disabled: o } = e, l = i.map(t, (c) => c != null ? Yt(c) : null), u = X(t, o, n);
1320
- return P({
1320
+ }, wn = (e) => {
1321
+ const { value: t, onBlur: r, onChange: n, after: s, disabled: o } = e, l = u.map(t, (c) => c != null ? Zt(c) : null), i = Y(t, o, n);
1322
+ return O({
1321
1323
  ...e,
1322
- input: ee["datetime-local"](
1323
- H(e),
1324
- a.value(i.map(l, (c) => c ?? null)),
1324
+ input: K["datetime-local"](
1325
+ j(e),
1326
+ a.value(u.map(l, (c) => c ?? null)),
1325
1327
  a.class("bc-input"),
1326
- r != null ? C.blur(j(r)) : D,
1327
- n != null ? C.change(tt(n)) : D
1328
+ r != null ? C.blur(P(r)) : T,
1329
+ n != null ? C.change(tt(n)) : T
1328
1330
  ),
1329
- after: s != null ? L(u, s) : u
1331
+ after: s != null ? L(i, s) : i
1330
1332
  });
1331
- }, Y = (e) => typeof e == "string" && e.trim() === "" ? null : e, se = (e) => e ?? "", kn = (e) => {
1332
- const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...u } = e, c = X(t, l, n);
1333
- return ut({
1334
- ...u,
1335
- value: i.map(t, se),
1336
- onChange: n != null ? (p) => n(Y(p)) : void 0,
1337
- onInput: s != null ? (p) => s(Y(p)) : void 0,
1333
+ }, Z = (e) => typeof e == "string" && e.trim() === "" ? null : e, ne = (e) => e ?? "", _n = (e) => {
1334
+ const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...i } = e, c = Y(t, l, n);
1335
+ return it({
1336
+ ...i,
1337
+ value: u.map(t, ne),
1338
+ onChange: n != null ? (p) => n(Z(p)) : void 0,
1339
+ onInput: s != null ? (p) => s(Z(p)) : void 0,
1338
1340
  onBlur: r,
1339
1341
  after: o != null ? L(c, o) : c
1340
1342
  });
1341
- }, In = (e) => {
1342
- const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...u } = e, c = X(t, l, n);
1343
- return pt({
1344
- ...u,
1345
- value: i.map(t, se),
1346
- onChange: n != null ? (p) => n(Y(p)) : void 0,
1347
- onInput: s != null ? (p) => s(Y(p)) : void 0,
1343
+ }, $n = (e) => {
1344
+ const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...i } = e, c = Y(t, l, n);
1345
+ return ut({
1346
+ ...i,
1347
+ value: u.map(t, ne),
1348
+ onChange: n != null ? (p) => n(Z(p)) : void 0,
1349
+ onInput: s != null ? (p) => s(Z(p)) : void 0,
1348
1350
  onBlur: r,
1349
1351
  after: o != null ? L(c, o) : c
1350
1352
  });
1351
- }, Cn = (e) => {
1352
- const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...u } = e, c = X(t, l, n);
1353
- return dt({
1354
- ...u,
1355
- value: i.map(t, se),
1356
- onChange: n != null ? (p) => n(Y(p)) : void 0,
1357
- onInput: s != null ? (p) => s(Y(p)) : void 0,
1353
+ }, kn = (e) => {
1354
+ const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...i } = e, c = Y(t, l, n);
1355
+ return pt({
1356
+ ...i,
1357
+ value: u.map(t, ne),
1358
+ onChange: n != null ? (p) => n(Z(p)) : void 0,
1359
+ onInput: s != null ? (p) => s(Z(p)) : void 0,
1358
1360
  onBlur: r,
1359
1361
  after: o != null ? L(c, o) : c
1360
1362
  });
1361
- }, Xt = (e) => {
1363
+ }, Yt = (e) => {
1362
1364
  const { value: t, onBlur: r, onChange: n, onInput: s, rows: o } = e;
1363
- return P({
1365
+ return O({
1364
1366
  ...e,
1365
- input: y.textarea(
1366
- H(e),
1367
+ input: I.textarea(
1368
+ j(e),
1367
1369
  a.rows(o ?? 3),
1368
1370
  a.value(t),
1369
1371
  a.class("bc-input"),
1370
- r != null ? C.blur(j(r)) : D,
1371
- n != null ? C.change(j(n)) : D,
1372
- s != null ? C.input(j(s)) : D
1372
+ r != null ? C.blur(P(r)) : T,
1373
+ n != null ? C.change(P(n)) : T,
1374
+ s != null ? C.input(P(s)) : T
1373
1375
  )
1374
1376
  });
1375
- }, Mn = (e) => {
1376
- const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...u } = e, c = X(t, l, n);
1377
- return Xt({
1378
- ...u,
1379
- value: i.map(t, se),
1380
- onChange: n != null ? (p) => n(Y(p)) : void 0,
1381
- onInput: s != null ? (p) => s(Y(p)) : void 0,
1377
+ }, yn = (e) => {
1378
+ const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...i } = e, c = Y(t, l, n);
1379
+ return Yt({
1380
+ ...i,
1381
+ value: u.map(t, ne),
1382
+ onChange: n != null ? (p) => n(Z(p)) : void 0,
1383
+ onInput: s != null ? (p) => s(Z(p)) : void 0,
1382
1384
  onBlur: r,
1383
1385
  after: o != null ? L(c, o) : c
1384
1386
  });
1385
- }, Tn = (e) => {
1386
- const { value: t, step: r, min: n, max: s, onBlur: o, onChange: l, onInput: u, after: c } = e, p = (x) => {
1387
- const d = n != null ? i.get(n) : void 0, g = s != null ? i.get(s) : void 0;
1388
- return d != null && x < d ? d : g != null && x > g ? g : x;
1389
- }, m = r != null ? O(W, (x) => {
1390
- const d = B(
1387
+ }, In = (e) => {
1388
+ const { value: t, step: r, min: n, max: s, onBlur: o, onChange: l, onInput: i, after: c } = e, p = (v) => {
1389
+ const d = n != null ? u.get(n) : void 0, x = s != null ? u.get(s) : void 0;
1390
+ return d != null && v < d ? d : x != null && v > x ? x : v;
1391
+ }, m = r != null ? H(X, (v) => {
1392
+ const d = V(
1391
1393
  t,
1392
1394
  n
1393
- )((h, v) => v == null ? !0 : (h ?? 0) > v), g = B(
1395
+ )((g, b) => b == null ? !0 : (g ?? 0) > b), x = V(
1394
1396
  t,
1395
1397
  s
1396
- )((h, v) => v == null ? !0 : (h ?? 0) < v), b = (h) => {
1397
- const v = i.get(t) ?? 0, T = i.get(r), I = h?.shiftKey ? 10 : 1, $ = v - T * I, w = n != null ? i.get(n) : void 0;
1398
- if (w != null && $ < w)
1398
+ )((g, b) => b == null ? !0 : (g ?? 0) < b), h = (g) => {
1399
+ const b = u.get(t) ?? 0, D = u.get(r), y = g?.shiftKey ? 10 : 1, _ = b - D * y, w = n != null ? u.get(n) : void 0;
1400
+ if (w != null && _ < w)
1399
1401
  return;
1400
- const k = p($);
1401
- k !== v && l && l(k);
1402
- }, _ = (h) => {
1403
- const v = i.get(t) ?? 0, T = i.get(r), I = h?.shiftKey ? 10 : 1, $ = v + T * I, w = s != null ? i.get(s) : void 0;
1404
- if (w != null && $ > w)
1402
+ const k = p(_);
1403
+ k !== b && l && l(k);
1404
+ }, $ = (g) => {
1405
+ const b = u.get(t) ?? 0, D = u.get(r), y = g?.shiftKey ? 10 : 1, _ = b + D * y, w = s != null ? u.get(s) : void 0;
1406
+ if (w != null && _ > w)
1405
1407
  return;
1406
- const k = p($);
1407
- k !== v && l && l(k);
1408
+ const k = p(_);
1409
+ k !== b && l && l(k);
1408
1410
  };
1409
- return ne(
1411
+ return ce(
1410
1412
  a.class("bc-number-input-steppers"),
1411
1413
  // Increment second
1412
- y.button(
1414
+ I.button(
1413
1415
  a.class(
1414
1416
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1415
1417
  ),
1416
1418
  a.disabled(
1417
- B(
1418
- g,
1419
+ V(
1420
+ x,
1419
1421
  e.disabled ?? !1
1420
- )((h, v) => !h || v)
1422
+ )((g, b) => !g || b)
1421
1423
  ),
1422
- C.click((h) => _(h)),
1423
- N.label(x.$.incrementValue),
1424
+ C.click((g) => $(g)),
1425
+ N.label(v.$.incrementValue),
1424
1426
  z({ icon: "line-md:plus", size: "xs" })
1425
1427
  ),
1426
1428
  // Decrement first (matches tests expecting first button to be decrement)
1427
- y.button(
1429
+ I.button(
1428
1430
  a.class(
1429
1431
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1430
1432
  ),
1431
1433
  a.disabled(
1432
- B(
1434
+ V(
1433
1435
  d,
1434
1436
  e.disabled ?? !1
1435
- )((h, v) => !h || v)
1437
+ )((g, b) => !g || b)
1436
1438
  ),
1437
- C.click((h) => b(h)),
1438
- N.label(x.$.decrementValue),
1439
+ C.click((g) => h(g)),
1440
+ N.label(v.$.decrementValue),
1439
1441
  z({ icon: "line-md:minus", size: "xs" })
1440
1442
  )
1441
1443
  );
1442
1444
  }) : null, f = c != null && m != null ? L(m, c) : c ?? m;
1443
- return P({
1445
+ return O({
1444
1446
  ...e,
1445
- input: ee.number(
1447
+ input: K.number(
1446
1448
  n != null ? L(
1447
1449
  a.min(n),
1448
- Z(
1449
- i.on(n, (x) => {
1450
- x < i.get(t);
1450
+ W(
1451
+ u.on(n, (v) => {
1452
+ v < u.get(t);
1451
1453
  })
1452
1454
  )
1453
- ) : D,
1455
+ ) : T,
1454
1456
  s != null ? L(
1455
1457
  a.max(s),
1456
- Z(
1457
- i.on(s, (x) => {
1458
- x > i.get(t);
1458
+ W(
1459
+ u.on(s, (v) => {
1460
+ v > u.get(t);
1459
1461
  })
1460
1462
  )
1461
- ) : D,
1462
- H(e),
1463
+ ) : T,
1464
+ j(e),
1463
1465
  a.valueAsNumber(t),
1464
1466
  a.step(r),
1465
1467
  a.class("bc-input bc-number-input"),
1466
- o != null ? C.blur(j(o)) : D,
1467
- l != null ? C.change(G(l)) : D,
1468
- u != null ? C.input(G(u)) : D,
1468
+ o != null ? C.blur(P(o)) : T,
1469
+ l != null ? C.change(G(l)) : T,
1470
+ i != null ? C.input(G(i)) : T,
1469
1471
  // Add wheel event support when step is defined
1470
- r != null ? C.wheel((x) => {
1471
- x.preventDefault();
1472
- const d = i.get(t) ?? 0, g = i.get(r), b = x.shiftKey ? 10 : 1, _ = x.deltaY < 0 ? g * b : -g * b, h = p(d + _);
1473
- h !== d && l && l(h);
1474
- }) : D
1472
+ r != null ? C.wheel((v) => {
1473
+ v.preventDefault();
1474
+ const d = u.get(t) ?? 0, x = u.get(r), h = v.shiftKey ? 10 : 1, $ = v.deltaY < 0 ? x * h : -x * h, g = p(d + $);
1475
+ g !== d && l && l(g);
1476
+ }) : T
1475
1477
  ),
1476
1478
  after: f
1477
1479
  });
@@ -1479,116 +1481,116 @@ const $n = (e) => {
1479
1481
  if (e == null || e === "") return null;
1480
1482
  const t = Number(e);
1481
1483
  return Number.isNaN(t) ? null : t;
1482
- }, Sn = (e) => {
1483
- const { value: t, step: r, min: n, max: s, onBlur: o, onChange: l, onInput: u, after: c } = e, p = (d) => {
1484
- const g = n != null ? i.get(n) : void 0, b = s != null ? i.get(s) : void 0;
1485
- return g != null && d < g ? g : b != null && d > b ? b : d;
1484
+ }, Cn = (e) => {
1485
+ const { value: t, step: r, min: n, max: s, onBlur: o, onChange: l, onInput: i, after: c } = e, p = (d) => {
1486
+ const x = n != null ? u.get(n) : void 0, h = s != null ? u.get(s) : void 0;
1487
+ return x != null && d < x ? x : h != null && d > h ? h : d;
1486
1488
  }, m = (() => {
1487
1489
  if (r == null) return null;
1488
- const d = B(
1490
+ const d = V(
1489
1491
  t,
1490
1492
  n
1491
- )((v, T) => {
1492
- const I = v ?? 0;
1493
- return T == null ? !0 : I > T;
1494
- }), g = B(
1493
+ )((b, D) => {
1494
+ const y = b ?? 0;
1495
+ return D == null ? !0 : y > D;
1496
+ }), x = V(
1495
1497
  t,
1496
1498
  s
1497
- )((v, T) => {
1498
- const I = v ?? 0;
1499
- return T == null ? !0 : I < T;
1500
- }), b = (v) => {
1501
- const T = i.get(t) ?? 0, I = i.get(r), $ = v?.shiftKey ? 10 : 1, w = T - I * $, k = n != null ? i.get(n) : void 0;
1499
+ )((b, D) => {
1500
+ const y = b ?? 0;
1501
+ return D == null ? !0 : y < D;
1502
+ }), h = (b) => {
1503
+ const D = u.get(t) ?? 0, y = u.get(r), _ = b?.shiftKey ? 10 : 1, w = D - y * _, k = n != null ? u.get(n) : void 0;
1502
1504
  if (k != null && w < k) return;
1503
1505
  const M = p(w);
1504
- M !== T && l && l(M);
1505
- }, _ = (v) => {
1506
- const T = i.get(t) ?? 0, I = i.get(r), $ = v?.shiftKey ? 10 : 1, w = T + I * $, k = s != null ? i.get(s) : void 0;
1506
+ M !== D && l && l(M);
1507
+ }, $ = (b) => {
1508
+ const D = u.get(t) ?? 0, y = u.get(r), _ = b?.shiftKey ? 10 : 1, w = D + y * _, k = s != null ? u.get(s) : void 0;
1507
1509
  if (k != null && w > k) return;
1508
1510
  const M = p(w);
1509
- M !== T && l && l(M);
1511
+ M !== D && l && l(M);
1510
1512
  };
1511
- return ((v, T) => ne(
1513
+ return ((b, D) => ce(
1512
1514
  a.class("bc-number-input-steppers"),
1513
- y.button(
1515
+ I.button(
1514
1516
  a.class(
1515
1517
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1516
1518
  ),
1517
1519
  a.disabled(
1518
- B(
1519
- g,
1520
+ V(
1521
+ x,
1520
1522
  e.disabled ?? !1
1521
- )((I, $) => !I || $)
1523
+ )((y, _) => !y || _)
1522
1524
  ),
1523
- C.click((I) => _(I)),
1524
- N.label(v),
1525
+ C.click((y) => $(y)),
1526
+ N.label(b),
1525
1527
  z({ icon: "line-md:plus", size: "xs" })
1526
1528
  ),
1527
- y.button(
1529
+ I.button(
1528
1530
  a.class(
1529
1531
  "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1530
1532
  ),
1531
1533
  a.disabled(
1532
- B(
1534
+ V(
1533
1535
  d,
1534
1536
  e.disabled ?? !1
1535
- )((I, $) => !I || $)
1537
+ )((y, _) => !y || _)
1536
1538
  ),
1537
- C.click((I) => b(I)),
1538
- N.label(T),
1539
+ C.click((y) => h(y)),
1540
+ N.label(D),
1539
1541
  z({ icon: "line-md:minus", size: "xs" })
1540
1542
  )
1541
1543
  ))(
1542
- ye.incrementValue,
1543
- ye.decrementValue
1544
+ ke.incrementValue,
1545
+ ke.decrementValue
1544
1546
  );
1545
- })(), f = X(t, e.disabled, l), x = c != null && m != null ? L(m, f, c) : c != null ? L(f, c) : m != null ? L(m, f) : f;
1546
- return P({
1547
+ })(), f = Y(t, e.disabled, l), v = c != null && m != null ? L(m, f, c) : c != null ? L(f, c) : m != null ? L(m, f) : f;
1548
+ return O({
1547
1549
  ...e,
1548
- input: ee.number(
1550
+ input: K.number(
1549
1551
  // min/max attributes and reactive watchers (no forced correction)
1550
1552
  n != null ? L(
1551
1553
  a.min(n),
1552
- Z(
1553
- i.on(n, (d) => {
1554
+ W(
1555
+ u.on(n, (d) => {
1554
1556
  })
1555
1557
  )
1556
- ) : D,
1558
+ ) : T,
1557
1559
  s != null ? L(
1558
1560
  a.max(s),
1559
- Z(
1560
- i.on(s, (d) => {
1561
+ W(
1562
+ u.on(s, (d) => {
1561
1563
  })
1562
1564
  )
1563
- ) : D,
1564
- H(e),
1565
+ ) : T,
1566
+ j(e),
1565
1567
  // Represent null as empty string so the field can be cleared
1566
- a.value(i.map(t, (d) => d == null ? "" : String(d))),
1568
+ a.value(u.map(t, (d) => d == null ? "" : String(d))),
1567
1569
  a.step(r),
1568
1570
  a.class("bc-input bc-number-input"),
1569
- o != null ? C.blur(j(o)) : D,
1571
+ o != null ? C.blur(P(o)) : T,
1570
1572
  l != null ? C.change(
1571
- j((d) => {
1572
- const g = Re(d);
1573
- l(g);
1573
+ P((d) => {
1574
+ const x = Re(d);
1575
+ l(x);
1574
1576
  })
1575
- ) : D,
1576
- u != null ? C.input(
1577
- j((d) => {
1578
- const g = Re(d);
1579
- u(g);
1577
+ ) : T,
1578
+ i != null ? C.input(
1579
+ P((d) => {
1580
+ const x = Re(d);
1581
+ i(x);
1580
1582
  })
1581
- ) : D,
1583
+ ) : T,
1582
1584
  // Wheel support when step is defined
1583
1585
  r != null ? C.wheel((d) => {
1584
1586
  d.preventDefault();
1585
- const g = i.get(t) ?? 0, b = i.get(r), _ = d.shiftKey ? 10 : 1, h = d.deltaY < 0 ? b * _ : -b * _, v = p(g + h);
1586
- v !== g && l && l(v);
1587
- }) : D
1587
+ const x = u.get(t) ?? 0, h = u.get(r), $ = d.shiftKey ? 10 : 1, g = d.deltaY < 0 ? h * $ : -h * $, b = p(x + g);
1588
+ b !== x && l && l(b);
1589
+ }) : T
1588
1590
  ),
1589
- after: x
1591
+ after: v
1590
1592
  });
1591
- }, Dn = ({
1593
+ }, Mn = ({
1592
1594
  value: e,
1593
1595
  onChange: t,
1594
1596
  offLabel: r,
@@ -1596,110 +1598,110 @@ const $n = (e) => {
1596
1598
  label: s,
1597
1599
  disabled: o = !1,
1598
1600
  size: l = "md",
1599
- id: u,
1601
+ id: i,
1600
1602
  color: c = "primary"
1601
1603
  }) => {
1602
- const p = u ?? ft("switch"), m = `${p}-label`;
1603
- function f(b, _) {
1604
- const h = [
1604
+ const p = i ?? dt("switch"), m = `${p}-label`;
1605
+ function f(h, $) {
1606
+ const g = [
1605
1607
  "bc-switch",
1606
- `bc-switch--size-${_}`,
1607
- `bc-switch--${_}`
1608
+ `bc-switch--size-${$}`,
1609
+ `bc-switch--${$}`
1608
1610
  ];
1609
- return b && h.push("bc-switch--disabled"), h.join(" ");
1611
+ return h && g.push("bc-switch--disabled"), g.join(" ");
1610
1612
  }
1611
- function x(b) {
1612
- const _ = b ?? "primary", h = /* @__PURE__ */ new Map(), v = Ve(_, "solid", "light"), T = Ve(_, "solid", "dark");
1613
- return h.set("--switch-track-on-bg", v.backgroundColor), h.set("--switch-track-on-label", v.textColor), h.set("--switch-track-on-bg-dark", T.backgroundColor), h.set("--switch-track-on-label-dark", T.textColor), h.set(
1613
+ function v(h) {
1614
+ const $ = h ?? "primary", g = /* @__PURE__ */ new Map(), b = Le($, "solid", "light"), D = Le($, "solid", "dark");
1615
+ return g.set("--switch-track-on-bg", b.backgroundColor), g.set("--switch-track-on-label", b.textColor), g.set("--switch-track-on-bg-dark", D.backgroundColor), g.set("--switch-track-on-label-dark", D.textColor), g.set(
1614
1616
  "--switch-track-on-border-dark",
1615
- gt(_, "dark")
1616
- ), Array.from(h.entries()).map(([I, $]) => `${I}: ${$}`).join("; ");
1617
+ ht($, "dark")
1618
+ ), Array.from(g.entries()).map(([y, _]) => `${y}: ${_}`).join("; ");
1617
1619
  }
1618
1620
  const d = () => {
1619
- i.get(o) || t(!i.get(e));
1620
- }, g = (b) => {
1621
- i.get(o) || (b.key === " " || b.key === "Enter") && (b.preventDefault(), d());
1621
+ u.get(o) || t(!u.get(e));
1622
+ }, x = (h) => {
1623
+ u.get(o) || (h.key === " " || h.key === "Enter") && (h.preventDefault(), d());
1622
1624
  };
1623
- return y.div(
1625
+ return I.div(
1624
1626
  a.class(
1625
- B(
1627
+ V(
1626
1628
  o ?? !1,
1627
1629
  l
1628
1630
  )(
1629
- (b, _) => f(b ?? !1, _ ?? "md")
1631
+ (h, $) => f(h ?? !1, $ ?? "md")
1630
1632
  )
1631
1633
  ),
1632
1634
  a.style(
1633
- B(c)(
1634
- (b) => x(b)
1635
+ V(c)(
1636
+ (h) => v(h)
1635
1637
  )
1636
1638
  ),
1637
1639
  a.id(p),
1638
1640
  a.role("switch"),
1639
1641
  a.tabindex(
1640
- i.map(o, (b) => b ? -1 : 0)
1642
+ u.map(o, (h) => h ? -1 : 0)
1641
1643
  ),
1642
1644
  N.checked(e),
1643
1645
  N.disabled(o),
1644
1646
  N.labelledby(s != null ? m : void 0),
1645
1647
  C.click(d),
1646
- C.keydown(g),
1647
- s != null ? mt(
1648
+ C.keydown(x),
1649
+ s != null ? ft(
1648
1650
  a.id(m),
1649
1651
  a.class(
1650
1652
  `bc-switch__label bc-switch__label--size-${l} bc-switch__label--nowrap`
1651
1653
  ),
1652
1654
  s
1653
1655
  ) : null,
1654
- y.div(
1656
+ I.div(
1655
1657
  a.class("bc-switch__track"),
1656
1658
  a.class(
1657
- i.map(
1659
+ u.map(
1658
1660
  e,
1659
- (b) => b ? "bc-switch__track--on" : "bc-switch__track--off"
1661
+ (h) => h ? "bc-switch__track--on" : "bc-switch__track--off"
1660
1662
  )
1661
1663
  ),
1662
- r != null ? y.div(
1664
+ r != null ? I.div(
1663
1665
  N.hidden(!0),
1664
1666
  a.class("bc-switch__track-label bc-switch__track-label--off"),
1665
1667
  a.class(
1666
- i.map(
1668
+ u.map(
1667
1669
  e,
1668
- (b) => b ? "bc-switch__track-label--hidden" : "bc-switch__track-label--visible"
1670
+ (h) => h ? "bc-switch__track-label--hidden" : "bc-switch__track-label--visible"
1669
1671
  )
1670
1672
  ),
1671
1673
  r
1672
1674
  ) : null,
1673
- n != null ? y.div(
1675
+ n != null ? I.div(
1674
1676
  a.class("bc-switch__track-label bc-switch__track-label--on"),
1675
1677
  a.class(
1676
- i.map(
1678
+ u.map(
1677
1679
  e,
1678
- (b) => b ? "bc-switch__track-label--visible" : "bc-switch__track-label--hidden"
1680
+ (h) => h ? "bc-switch__track-label--visible" : "bc-switch__track-label--hidden"
1679
1681
  )
1680
1682
  ),
1681
1683
  n
1682
1684
  ) : null,
1683
- He(
1684
- (b) => O(
1685
- ht,
1686
- ({ direction: _ }) => y.div(
1685
+ je(
1686
+ (h) => H(
1687
+ mt,
1688
+ ({ direction: $ }) => I.div(
1687
1689
  a.class("bc-switch__thumb"),
1688
1690
  a.class(
1689
- i.map(
1691
+ u.map(
1690
1692
  e,
1691
- (h) => h ? "bc-switch__thumb--on" : "bc-switch__thumb--off"
1693
+ (g) => g ? "bc-switch__thumb--on" : "bc-switch__thumb--off"
1692
1694
  )
1693
1695
  ),
1694
1696
  de.transform(
1695
- B(
1697
+ V(
1696
1698
  e,
1697
- b,
1699
+ h,
1698
1700
  l,
1699
- _
1700
- )((h, { width: v }, T, I) => {
1701
- const $ = (() => {
1702
- switch (T) {
1701
+ $
1702
+ )((g, { width: b }, D, y) => {
1703
+ const _ = (() => {
1704
+ switch (D) {
1703
1705
  case "xs":
1704
1706
  return 5;
1705
1707
  case "sm":
@@ -1711,8 +1713,8 @@ const $n = (e) => {
1711
1713
  case "xl":
1712
1714
  return 8;
1713
1715
  }
1714
- })(), w = I === "rtl" ? `calc((var(--spacing-base) * ${$}) - ${v}px)` : `calc(${v}px - (var(--spacing-base) * ${$}))`;
1715
- return h ? `translateX(${w})` : "translateX(0)";
1716
+ })(), w = y === "rtl" ? `calc((var(--spacing-base) * ${_}) - ${b}px)` : `calc(${b}px - (var(--spacing-base) * ${_}))`;
1717
+ return g ? `translateX(${w})` : "translateX(0)";
1716
1718
  })
1717
1719
  )
1718
1720
  )
@@ -1720,13 +1722,13 @@ const $n = (e) => {
1720
1722
  )
1721
1723
  )
1722
1724
  );
1723
- }, qt = (e) => {
1725
+ }, Xt = (e) => {
1724
1726
  const t = {
1725
1727
  type: "pattern",
1726
1728
  pattern: /[0-9A-Fa-f]/,
1727
1729
  transform: (n) => n.toLowerCase()
1728
1730
  };
1729
- return qe({
1731
+ return Xe({
1730
1732
  ...e,
1731
1733
  mask: [
1732
1734
  t,
@@ -1769,17 +1771,17 @@ const $n = (e) => {
1769
1771
  // Sensible default placeholder; can be overridden via options.placeholder
1770
1772
  placeholder: e.placeholder ?? "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1771
1773
  });
1772
- }, An = (e) => {
1773
- const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...u } = e, c = X(t, l, n);
1774
- return qt({
1775
- ...u,
1776
- value: i.map(t, se),
1777
- onChange: n != null ? (p) => n(Y(p)) : void 0,
1778
- onInput: s != null ? (p) => s(Y(p)) : void 0,
1774
+ }, Dn = (e) => {
1775
+ const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...i } = e, c = Y(t, l, n);
1776
+ return Xt({
1777
+ ...i,
1778
+ value: u.map(t, ne),
1779
+ onChange: n != null ? (p) => n(Z(p)) : void 0,
1780
+ onInput: s != null ? (p) => s(Z(p)) : void 0,
1779
1781
  onBlur: r,
1780
1782
  after: o != null ? L(c, o) : c
1781
1783
  });
1782
- }, Gt = "line-md:star-alt-filled", Qt = "line-md:star-alt", Jt = (e) => {
1784
+ }, qt = "line-md:star-alt-filled", Gt = "line-md:star-alt", Qt = (e) => {
1783
1785
  const {
1784
1786
  value: t,
1785
1787
  onChange: r,
@@ -1787,196 +1789,196 @@ const $n = (e) => {
1787
1789
  max: s = 5,
1788
1790
  fullColor: o = "yellow",
1789
1791
  emptyColor: l = "neutral",
1790
- fullIcon: u = Gt,
1791
- emptyIcon: c = Qt,
1792
+ fullIcon: i = qt,
1793
+ emptyIcon: c = Gt,
1792
1794
  size: p = "md",
1793
1795
  onBlur: m,
1794
1796
  rounding: f = 1
1795
- } = e, x = () => {
1796
- const v = i.get(f);
1797
- return v > 0 ? v : 1;
1798
- }, d = (v) => Math.min(Math.max(v, 0), i.get(s)), g = (v, T) => {
1799
- if (i.get(n ?? !1)) return;
1800
- const $ = v.currentTarget.getBoundingClientRect(), w = (v.clientX - $.left) / $.width, k = T - 1 + w, M = x(), A = Math.ceil(k / M) * M, F = d(A);
1797
+ } = e, v = () => {
1798
+ const b = u.get(f);
1799
+ return b > 0 ? b : 1;
1800
+ }, d = (b) => Math.min(Math.max(b, 0), u.get(s)), x = (b, D) => {
1801
+ if (u.get(n ?? !1)) return;
1802
+ const _ = b.currentTarget.getBoundingClientRect(), w = (b.clientX - _.left) / _.width, k = D - 1 + w, M = v(), A = Math.ceil(k / M) * M, F = d(A);
1801
1803
  r?.(F);
1802
- }, b = (v) => {
1803
- if (i.get(n ?? !1)) return;
1804
- const T = x(), I = i.get(t) ?? 0;
1805
- let $;
1806
- switch (v.key) {
1804
+ }, h = (b) => {
1805
+ if (u.get(n ?? !1)) return;
1806
+ const D = v(), y = u.get(t) ?? 0;
1807
+ let _;
1808
+ switch (b.key) {
1807
1809
  case "ArrowRight":
1808
1810
  case "ArrowUp":
1809
- $ = d(I + T);
1811
+ _ = d(y + D);
1810
1812
  break;
1811
1813
  case "ArrowLeft":
1812
1814
  case "ArrowDown":
1813
- $ = d(I - T);
1815
+ _ = d(y - D);
1814
1816
  break;
1815
1817
  case "Home":
1816
- $ = 0;
1818
+ _ = 0;
1817
1819
  break;
1818
1820
  case "End":
1819
- $ = i.get(s);
1821
+ _ = u.get(s);
1820
1822
  break;
1821
1823
  default:
1822
1824
  return;
1823
1825
  }
1824
- v.preventDefault(), r?.($);
1825
- }, _ = i.map(p, (v) => `bc-icon--${v}`), h = ({ index: v, counter: T }) => y.span(
1826
+ b.preventDefault(), r?.(_);
1827
+ }, $ = u.map(p, (b) => `bc-icon--${b}`), g = ({ index: b, counter: D }) => I.span(
1826
1828
  a.class("bc-rating-input__icon-container"),
1827
- a.class(_),
1829
+ a.class($),
1828
1830
  z(
1829
1831
  { icon: c, size: p, color: l, tone: "soft" },
1830
1832
  a.class("bc-rating-input__icon-empty")
1831
1833
  ),
1832
- y.span(
1834
+ I.span(
1833
1835
  a.class("bc-rating-input__icon-clipper"),
1834
- a.class(_),
1836
+ a.class($),
1835
1837
  de.width(
1836
- i.map(t, (I) => {
1837
- const $ = Math.floor(I);
1838
- return $ > v ? "100%" : $ < v ? "0%" : `${(I - v) * 100}%`;
1838
+ u.map(t, (y) => {
1839
+ const _ = Math.floor(y);
1840
+ return _ > b ? "100%" : _ < b ? "0%" : `${(y - b) * 100}%`;
1839
1841
  })
1840
1842
  ),
1841
1843
  z(
1842
- { icon: u, size: p, color: o, tone: "soft" },
1844
+ { icon: i, size: p, color: o, tone: "soft" },
1843
1845
  a.class("bc-rating-input__icon-full")
1844
1846
  )
1845
1847
  ),
1846
1848
  C.click(
1847
- nt((I) => g(I, T), {
1849
+ nt((y) => x(y, D), {
1848
1850
  preventDefault: !0,
1849
1851
  stopPropagation: !0
1850
1852
  })
1851
1853
  )
1852
1854
  );
1853
- return P({
1855
+ return O({
1854
1856
  baseContainer: !0,
1855
1857
  growInput: !1,
1856
1858
  focusableSelector: '[role="slider"]',
1857
1859
  ...e,
1858
- input: y.div(
1860
+ input: I.div(
1859
1861
  // Common input attributes (id, required, invalid, custom classes, etc.)
1860
- H(e),
1862
+ j(e),
1861
1863
  a.class("bc-rating-input"),
1862
1864
  // ARIA slider semantics
1863
1865
  a.role("slider"),
1864
- a.tabindex(i.map(n ?? !1, (v) => v ? -1 : 0)),
1866
+ a.tabindex(u.map(n ?? !1, (b) => b ? -1 : 0)),
1865
1867
  N.disabled(n ?? !1),
1866
1868
  N.valuemin(0),
1867
- N.valuemax(i.map(s, (v) => v ?? 0)),
1868
- N.valuenow(i.map(t, (v) => v ?? 0)),
1869
+ N.valuemax(u.map(s, (b) => b ?? 0)),
1870
+ N.valuenow(u.map(t, (b) => b ?? 0)),
1869
1871
  N.valuetext(
1870
- B(
1872
+ V(
1871
1873
  t,
1872
1874
  s
1873
- )((v, T) => {
1874
- const I = v ?? 0, $ = T ?? 0;
1875
- return `${String(I)} / ${String($)}`;
1875
+ )((b, D) => {
1876
+ const y = b ?? 0, _ = D ?? 0;
1877
+ return `${String(y)} / ${String(_)}`;
1876
1878
  })
1877
1879
  ),
1878
1880
  // Keyboard & focus handlers
1879
- C.keydown(b),
1881
+ C.keydown(h),
1880
1882
  m != null ? C.blur(m) : null,
1881
- je(s, h)
1883
+ Pe(s, g)
1882
1884
  )
1883
1885
  });
1884
- }, Fn = (e) => {
1885
- const { value: t, onChange: r, onBlur: n, after: s, disabled: o, ...l } = e, u = X(t, o, r);
1886
- return Jt({
1886
+ }, Sn = (e) => {
1887
+ const { value: t, onChange: r, onBlur: n, after: s, disabled: o, ...l } = e, i = Y(t, o, r);
1888
+ return Qt({
1887
1889
  ...l,
1888
1890
  // Map null -> 0 for display so the control shows as empty when null
1889
- value: i.map(t, (c) => c ?? 0),
1891
+ value: u.map(t, (c) => c ?? 0),
1890
1892
  // Pass through numeric changes; clear button will call onChange(null)
1891
1893
  onChange: r,
1892
1894
  onBlur: n,
1893
- after: s != null ? L(u, s) : u
1895
+ after: s != null ? L(i, s) : i
1894
1896
  });
1895
- }, Bn = (e) => {
1896
- const { value: t, step: r, min: n, max: s, onBlur: o, onChange: l, onInput: u } = e;
1897
- return P({
1897
+ }, Tn = (e) => {
1898
+ const { value: t, step: r, min: n, max: s, onBlur: o, onChange: l, onInput: i } = e;
1899
+ return O({
1898
1900
  ...e,
1899
1901
  // Make sure clicks anywhere focus the range input
1900
1902
  focusableSelector: 'input[type="range"]',
1901
- input: y.input(
1903
+ input: I.input(
1902
1904
  a.type("range"),
1903
- H(e),
1905
+ j(e),
1904
1906
  a.min(n),
1905
1907
  a.max(s),
1906
1908
  a.step(r),
1907
1909
  // Using value as number to keep it in sync
1908
1910
  a.valueAsNumber(t),
1909
1911
  a.class("bc-input bc-slider-input"),
1910
- o != null ? C.blur(G(o)) : D,
1911
- l != null ? C.change(G(l)) : D,
1912
- u != null ? C.input(G(u)) : D
1912
+ o != null ? C.blur(G(o)) : T,
1913
+ l != null ? C.change(G(l)) : T,
1914
+ i != null ? C.input(G(i)) : T
1913
1915
  )
1914
1916
  });
1915
- }, Vn = (e) => {
1916
- const { value: t, step: r, min: n, max: s, onBlur: o, onChange: l, onInput: u } = e, c = i.map(t, (m) => {
1917
+ }, An = (e) => {
1918
+ const { value: t, step: r, min: n, max: s, onBlur: o, onChange: l, onInput: i } = e, c = u.map(t, (m) => {
1917
1919
  if (m != null) return m;
1918
- const f = n != null ? i.get(n) : void 0;
1920
+ const f = n != null ? u.get(n) : void 0;
1919
1921
  return typeof f == "number" ? f : 0;
1920
- }), p = X(t, e.disabled, (m) => {
1922
+ }), p = Y(t, e.disabled, (m) => {
1921
1923
  l?.(m);
1922
1924
  });
1923
- return P(
1925
+ return O(
1924
1926
  {
1925
1927
  ...e,
1926
1928
  focusableSelector: 'input[type="range"]',
1927
1929
  after: p,
1928
- input: y.input(
1930
+ input: I.input(
1929
1931
  a.type("range"),
1930
- H(e),
1932
+ j(e),
1931
1933
  a.min(n),
1932
1934
  a.max(s),
1933
1935
  a.step(r),
1934
1936
  a.valueAsNumber(c),
1935
1937
  a.class("bc-input bc-slider-input"),
1936
- o != null ? C.blur(G(o)) : D,
1938
+ o != null ? C.blur(G(o)) : T,
1937
1939
  l != null ? C.change(
1938
1940
  G((m) => {
1939
1941
  l(m);
1940
1942
  })
1941
- ) : D,
1942
- u != null ? C.input(
1943
+ ) : T,
1944
+ i != null ? C.input(
1943
1945
  G((m) => {
1944
- u(m);
1946
+ i(m);
1945
1947
  })
1946
- ) : D
1948
+ ) : T
1947
1949
  )
1948
1950
  },
1949
1951
  // Ensure container grows input naturally
1950
1952
  L()
1951
1953
  );
1952
1954
  };
1953
- let _e = null;
1955
+ let we = null;
1954
1956
  async function Me() {
1955
1957
  const e = globalThis;
1956
- return e.Temporal ? e.Temporal : (_e || (_e = import("./index.esm-DPNh6inz.js").then((t) => {
1958
+ return e.Temporal ? e.Temporal : (we || (we = import("./index.esm-DPNh6inz.js").then((t) => {
1957
1959
  const r = t.Temporal;
1958
1960
  return e.Temporal || (e.Temporal = r), r;
1959
- })), _e);
1961
+ })), we);
1960
1962
  }
1961
- const Kt = (e, t) => t ? Be(Me, {
1963
+ const Jt = (e, t) => t ? Be(Me, {
1962
1964
  then: e,
1963
1965
  pending: t.pending,
1964
1966
  error: t.error
1965
- }) : Be(Me, e), en = /^P(\d+([YMWD]|$)){0,4}(T(\d+([HMS]|$)){0,3})?$/i, tn = /^P(?:(\d+Y)?(\d+M)?(\d+W)?(\d+D)?)(T(\d+H)?(\d+M)?(\d+S)?)?$/i;
1966
- function nn(e) {
1967
+ }) : Be(Me, e), Kt = /^P(\d+([YMWD]|$)){0,4}(T(\d+([HMS]|$)){0,3})?$/i, en = /^P(?:(\d+Y)?(\d+M)?(\d+W)?(\d+D)?)(T(\d+H)?(\d+M)?(\d+S)?)?$/i;
1968
+ function tn(e) {
1967
1969
  return {
1968
1970
  mask: null,
1969
1971
  allowMode: "custom",
1970
1972
  allow: (t) => /[0-9ptwdhms]/i.test(t),
1971
1973
  pipe: (t) => {
1972
1974
  const r = t.toUpperCase();
1973
- return r.length === 0 ? r : !r.startsWith("P") || !en.test(r) ? !1 : r;
1975
+ return r.length === 0 ? r : !r.startsWith("P") || !Kt.test(r) ? !1 : r;
1974
1976
  },
1975
1977
  completion: {
1976
1978
  mode: "custom",
1977
1979
  isComplete: (t) => {
1978
1980
  const r = t.toUpperCase();
1979
- if (!tn.test(r)) return !1;
1981
+ if (!en.test(r)) return !1;
1980
1982
  try {
1981
1983
  return e(r), !0;
1982
1984
  } catch {
@@ -1986,262 +1988,293 @@ function nn(e) {
1986
1988
  }
1987
1989
  };
1988
1990
  }
1989
- const Pe = (e, t) => {
1991
+ const Oe = (e, t) => {
1990
1992
  if (e == null) return null;
1991
1993
  try {
1992
1994
  return e.Duration.from(t);
1993
1995
  } catch {
1994
1996
  return null;
1995
1997
  }
1996
- }, Ln = (e) => {
1998
+ }, Fn = (e) => {
1997
1999
  const { value: t, onChange: r, after: n, disabled: s, onBlur: o } = e, l = () => {
1998
- const p = X(t, s, r);
2000
+ const p = Y(t, s, r);
1999
2001
  return n != null ? L(p, n) : p;
2000
- }, u = e.placeholder != null ? D : a.placeholder("P0DT0H0M0S");
2001
- return Kt(
2002
- (p) => qe({
2002
+ }, i = e.placeholder != null ? T : a.placeholder("P0DT0H0M0S");
2003
+ return Jt(
2004
+ (p) => Xe({
2003
2005
  ...e,
2004
- value: i.map(t, (m) => m?.toString() ?? ""),
2006
+ value: u.map(t, (m) => m?.toString() ?? ""),
2005
2007
  onChange: r ? (m) => r(m === "" ? null : p.Duration.from(m)) : void 0,
2006
2008
  onInput: void 0,
2007
- ...nn(p.Duration.from),
2009
+ ...tn(p.Duration.from),
2008
2010
  placeholder: "P0DT0H0M0S",
2009
2011
  after: l()
2010
2012
  }),
2011
- { pending: () => P({
2013
+ { pending: () => O({
2012
2014
  ...e,
2013
- input: ee.text(
2014
- H(e),
2015
- a.value(i.map(t, (p) => p?.toString() ?? "")),
2015
+ input: K.text(
2016
+ j(e),
2017
+ a.value(u.map(t, (p) => p?.toString() ?? "")),
2016
2018
  a.class("bc-input"),
2017
- u,
2018
- o != null ? C.blur(() => o()) : D,
2019
+ i,
2020
+ o != null ? C.blur(() => o()) : T,
2019
2021
  r != null ? C.change((p) => {
2020
2022
  const f = p.currentTarget?.value ?? "";
2021
2023
  if (f === "") {
2022
2024
  r(null);
2023
2025
  return;
2024
2026
  }
2025
- const x = globalThis.Temporal, d = Pe(x, f);
2027
+ const v = globalThis.Temporal, d = Oe(v, f);
2026
2028
  if (d != null) {
2027
2029
  r(d);
2028
2030
  return;
2029
2031
  }
2030
- Me().then((g) => {
2031
- const b = Pe(g, f);
2032
- b != null && r(b);
2032
+ Me().then((x) => {
2033
+ const h = Oe(x, f);
2034
+ h != null && r(h);
2033
2035
  }).catch(() => {
2034
2036
  });
2035
- }) : D
2037
+ }) : T
2036
2038
  ),
2037
2039
  after: l()
2038
2040
  }) }
2039
2041
  );
2040
- }, sn = (e) => {
2042
+ }, nn = (e) => {
2041
2043
  const { value: t, onBlur: r, onChange: n, onInput: s } = e;
2042
- return P({
2044
+ return O({
2043
2045
  ...e,
2044
- input: ee.url(
2045
- H(e),
2046
+ input: K.url(
2047
+ j(e),
2046
2048
  a.value(t),
2047
2049
  a.class("bc-input"),
2048
- r != null ? C.blur(j(r)) : D,
2049
- n != null ? C.change(j(n)) : D,
2050
- s != null ? C.input(j(s)) : D
2050
+ r != null ? C.blur(P(r)) : T,
2051
+ n != null ? C.change(P(n)) : T,
2052
+ s != null ? C.input(P(s)) : T
2051
2053
  )
2052
2054
  });
2053
- }, En = (e) => {
2054
- const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...u } = e, c = X(t, l, n);
2055
- return sn({
2056
- ...u,
2057
- value: i.map(t, se),
2058
- onChange: n != null ? (p) => n(Y(p)) : void 0,
2059
- onInput: s != null ? (p) => s(Y(p)) : void 0,
2055
+ }, Bn = (e) => {
2056
+ const { value: t, onBlur: r, onChange: n, onInput: s, after: o, disabled: l, ...i } = e, c = Y(t, l, n);
2057
+ return nn({
2058
+ ...i,
2059
+ value: u.map(t, ne),
2060
+ onChange: n != null ? (p) => n(Z(p)) : void 0,
2061
+ onInput: s != null ? (p) => s(Z(p)) : void 0,
2060
2062
  onBlur: r,
2061
2063
  after: o != null ? L(c, o) : c
2062
2064
  });
2063
- }, Un = (e, ...t) => {
2065
+ }, sn = (e) => {
2064
2066
  const {
2067
+ controller: t,
2065
2068
  element: r,
2066
2069
  separator: n,
2067
2070
  showMove: s = !0,
2068
2071
  showRemove: o = !0,
2069
2072
  showAdd: l = !0,
2070
- createItem: u,
2073
+ createItem: i,
2071
2074
  addLabel: c,
2072
2075
  controlsLayout: p = "aside",
2073
- ...m
2074
- } = e, f = i.toSignal(p).map((g) => g === "aside"), x = (g) => {
2075
- const b = E(
2076
+ removeDisabled: m,
2077
+ addDisabled: f
2078
+ } = e, v = u.toSignal(p).map((h) => h === "aside"), d = (h) => {
2079
+ const $ = E(
2076
2080
  s ?? !1,
2077
- () => y.div(
2081
+ () => I.div(
2078
2082
  a.class("bc-group--align-center"),
2079
2083
  a.class(
2080
- f.map(
2081
- (h) => h ? "bc-group--direction-column bc-group--gap-1" : "bc-group--direction-row bc-group--gap-1"
2084
+ v.map(
2085
+ (b) => b ? "bc-group--direction-column bc-group--gap-1" : "bc-group--direction-row bc-group--gap-1"
2082
2086
  )
2083
2087
  ),
2084
- be(
2088
+ ge(
2085
2089
  {
2086
2090
  size: "xs",
2087
2091
  roundedness: "full",
2088
2092
  variant: "text",
2089
- onClick: () => g.move("up"),
2090
- disabled: g.cannotMove("up")
2093
+ onClick: () => h.move("up"),
2094
+ disabled: h.cannotMove("up")
2091
2095
  },
2092
- O(
2093
- W,
2094
- (h) => z({
2096
+ H(
2097
+ X,
2098
+ (b) => z({
2095
2099
  size: "xs",
2096
2100
  icon: "line-md:arrow-up",
2097
- title: h.$.incrementValue
2101
+ title: b.$.incrementValue
2098
2102
  })
2099
2103
  )
2100
2104
  ),
2101
- be(
2105
+ ge(
2102
2106
  {
2103
2107
  size: "xs",
2104
2108
  roundedness: "full",
2105
2109
  variant: "text",
2106
- onClick: () => g.move("down"),
2107
- disabled: g.cannotMove("down")
2110
+ onClick: () => h.move("down"),
2111
+ disabled: h.cannotMove("down")
2108
2112
  },
2109
- O(
2110
- W,
2111
- (h) => z({
2113
+ H(
2114
+ X,
2115
+ (b) => z({
2112
2116
  size: "xs",
2113
2117
  icon: "line-md:arrow-down",
2114
- title: h.$.decrementValue
2118
+ title: b.$.decrementValue
2115
2119
  })
2116
2120
  )
2117
2121
  )
2118
2122
  )
2119
- ), _ = E(
2123
+ ), g = E(
2120
2124
  o,
2121
- () => O(
2122
- W,
2123
- (h) => me({
2125
+ () => H(
2126
+ X,
2127
+ (b) => $e({
2124
2128
  size: "xs",
2125
2129
  // Use a lowercase label to satisfy tests that query with [aria-label*="remove"]
2126
- label: i.map(h.$.removeItem, (v) => v.toLowerCase()),
2130
+ label: u.map(b.$.removeItem, (D) => D.toLowerCase()),
2127
2131
  color: "danger",
2128
- disabled: e.removeDisabled,
2129
- onClick: g.remove
2132
+ disabled: m,
2133
+ onClick: h.remove
2130
2134
  })
2131
2135
  )
2132
2136
  );
2133
- return (h) => E(
2134
- f,
2137
+ return (b) => E(
2138
+ v,
2135
2139
  () => pe(
2136
2140
  a.class("bc-group--gap-1 bc-group--align-center"),
2137
- ne(a.class("bc-stack--grow"), h),
2138
- ne(
2141
+ ce(a.class("bc-stack--grow"), b),
2142
+ ce(
2139
2143
  a.class("bc-stack--align-center"),
2140
2144
  E(
2141
- e.controller.value.map((v) => v.length > 1),
2142
- () => b
2145
+ t.value.map((D) => D.length > 1),
2146
+ () => $
2143
2147
  ),
2144
- _
2148
+ g
2145
2149
  )
2146
2150
  ),
2147
- () => ne(
2151
+ () => ce(
2148
2152
  a.class("bc-stack--gap-2"),
2149
- h,
2153
+ b,
2150
2154
  pe(
2151
2155
  a.class("bc-group--gap-2 bc-group--justify-between"),
2152
2156
  E(
2153
- e.controller.value.map((v) => v.length > 1),
2154
- () => b,
2155
- () => y.div()
2157
+ t.value.map((D) => D.length > 1),
2158
+ () => $,
2159
+ () => I.div()
2156
2160
  ),
2157
- _
2161
+ g
2158
2162
  )
2159
2163
  )
2160
2164
  );
2161
- }, d = E(
2162
- B(l, u)((g, b) => g && b != null),
2165
+ }, x = E(
2166
+ V(l, i)((h, $) => h && $ != null),
2163
2167
  () => pe(
2164
2168
  a.class(
2165
2169
  "bc-group--gap-2 bc-group--align-center bc-group--justify-center"
2166
2170
  ),
2167
- be(
2171
+ ge(
2168
2172
  {
2169
2173
  size: "sm",
2170
2174
  variant: "filled",
2171
- onClick: () => m.controller.push(u()),
2172
- disabled: B(
2173
- m.controller.disabled,
2174
- e.addDisabled ?? !1
2175
- )((g, b) => g || b)
2175
+ onClick: () => t.push(i()),
2176
+ disabled: V(
2177
+ t.disabled,
2178
+ f ?? !1
2179
+ )(
2180
+ (h, $) => h || $
2181
+ )
2176
2182
  },
2177
- O(
2178
- W,
2179
- (g) => pe(
2183
+ H(
2184
+ X,
2185
+ (h) => pe(
2180
2186
  a.class("bc-group--gap-2"),
2181
2187
  z({ icon: "line-md:plus" }),
2182
- c ?? g.$.addLabel
2188
+ c ?? h.$.addLabel
2183
2189
  )
2184
2190
  )
2185
2191
  )
2186
2192
  )
2187
2193
  );
2188
- return We(
2194
+ return L(
2195
+ Pt(
2196
+ t,
2197
+ (h) => d(h)(r(h)),
2198
+ n
2199
+ ),
2200
+ x
2201
+ );
2202
+ }, Ln = (e, ...t) => {
2203
+ const {
2204
+ controller: r,
2205
+ element: n,
2206
+ separator: s,
2207
+ showMove: o,
2208
+ showRemove: l,
2209
+ showAdd: i,
2210
+ createItem: c,
2211
+ addLabel: p,
2212
+ controlsLayout: m,
2213
+ removeDisabled: f,
2214
+ addDisabled: v,
2215
+ ...d
2216
+ } = e;
2217
+ return He(
2189
2218
  {
2190
- ...m,
2191
- content: ne(
2192
- a.class("bc-stack--gap-2"),
2193
- jt(
2194
- m.controller,
2195
- (g) => x(g)(r(g)),
2196
- n
2197
- ),
2198
- d
2199
- )
2219
+ ...d,
2220
+ content: sn({
2221
+ controller: r,
2222
+ element: n,
2223
+ separator: s,
2224
+ showMove: o,
2225
+ showRemove: l,
2226
+ showAdd: i,
2227
+ createItem: c,
2228
+ addLabel: p,
2229
+ controlsLayout: m,
2230
+ removeDisabled: f,
2231
+ addDisabled: v
2232
+ })
2200
2233
  },
2201
2234
  ...t
2202
2235
  );
2203
2236
  };
2204
- class Nn extends ve {
2237
+ class Vn extends be {
2205
2238
  branches;
2206
2239
  activeBranch;
2207
2240
  #t;
2208
2241
  #e = /* @__PURE__ */ new Map();
2209
- constructor(t, r, n, s, o, l, u = ae) {
2210
- super(t, r, n, s, o, u), this.branches = l;
2242
+ constructor(t, r, n, s, o, l, i = le) {
2243
+ super(t, r, n, s, o, i), this.branches = l;
2211
2244
  const c = (m) => {
2212
2245
  for (const f of l)
2213
2246
  if (f.detect(m))
2214
2247
  return f.key;
2215
2248
  return l[0]?.key ?? "unknown";
2216
2249
  };
2217
- this.activeBranch = n.map(c, ae);
2250
+ this.activeBranch = n.map(c, le);
2218
2251
  const p = (m) => {
2219
2252
  if (this.#e.has(m))
2220
2253
  return this.#e.get(m);
2221
2254
  const f = l.find((d) => d.key === m);
2222
2255
  if (!f)
2223
2256
  throw new Error(`Unknown branch: ${m}`);
2224
- const x = new ve(
2257
+ const v = new be(
2225
2258
  [...t, m],
2226
2259
  (d) => {
2227
2260
  this.change(d);
2228
2261
  },
2229
2262
  n.map(
2230
2263
  (d) => f.detect(d) ? d : f.defaultValue(),
2231
- u
2264
+ i
2232
2265
  ),
2233
- s.map(Le([m])),
2266
+ s.map(Ve([m])),
2234
2267
  {
2235
2268
  disabled: this.disabled,
2236
2269
  validationMode: this.parent.validationMode
2237
2270
  },
2238
- u
2271
+ i
2239
2272
  );
2240
- return this.#e.set(m, x), x;
2273
+ return this.#e.set(m, v), v;
2241
2274
  };
2242
2275
  this.#t = this.activeBranch.map(
2243
2276
  (m) => p(m),
2244
- ae
2277
+ le
2245
2278
  ), this.onDispose(() => {
2246
2279
  for (const m of this.#e.values())
2247
2280
  m.dispose();
@@ -2252,7 +2285,7 @@ class Nn extends ve {
2252
2285
  * Get the controller for the currently active branch
2253
2286
  */
2254
2287
  get activeController() {
2255
- return i.get(this.#t);
2288
+ return u.get(this.#t);
2256
2289
  }
2257
2290
  /**
2258
2291
  * Get a controller for a specific branch
@@ -2263,21 +2296,21 @@ class Nn extends ve {
2263
2296
  throw new Error(`Unknown branch: ${t}`);
2264
2297
  if (this.#e.has(t))
2265
2298
  return this.#e.get(t);
2266
- const n = new ve(
2299
+ const n = new be(
2267
2300
  [...this.path, t],
2268
2301
  (s) => {
2269
2302
  this.change(s);
2270
2303
  },
2271
2304
  this.value.map(
2272
2305
  (s) => r.detect(s) ? s : r.defaultValue(),
2273
- ae
2306
+ le
2274
2307
  ),
2275
- this.status.map(Le([t])),
2308
+ this.status.map(Ve([t])),
2276
2309
  {
2277
2310
  disabled: this.disabled,
2278
2311
  validationMode: this.parent.validationMode
2279
2312
  },
2280
- ae
2313
+ le
2281
2314
  );
2282
2315
  return this.#e.set(t, n), n;
2283
2316
  }
@@ -2288,7 +2321,7 @@ class Nn extends ve {
2288
2321
  const n = this.branches.find((l) => l.key === t);
2289
2322
  if (!n)
2290
2323
  throw new Error(`Unknown branch: ${t}`);
2291
- const s = i.get(this.value);
2324
+ const s = u.get(this.value);
2292
2325
  if (n.detect(s))
2293
2326
  return !0;
2294
2327
  if (n.convert) {
@@ -2307,176 +2340,78 @@ class Nn extends ve {
2307
2340
  * Get the current active branch definition
2308
2341
  */
2309
2342
  get activeBranchDefinition() {
2310
- const t = i.get(this.activeBranch);
2343
+ const t = u.get(this.activeBranch);
2311
2344
  return this.branches.find((r) => r.key === t);
2312
2345
  }
2313
2346
  }
2314
- function zn(e) {
2347
+ function En(e) {
2315
2348
  return e.transform(
2316
2349
  (t) => t ?? null,
2317
2350
  (t) => t ?? void 0
2318
2351
  );
2319
2352
  }
2320
- function Rn(e) {
2353
+ function Un(e) {
2321
2354
  return e.transform(
2322
2355
  (t) => t ?? "",
2323
2356
  (t) => t === "" ? void 0 : t
2324
2357
  );
2325
2358
  }
2326
- function Pn(e) {
2359
+ function Nn(e) {
2327
2360
  return e.transform(
2328
2361
  (t) => t ?? void 0,
2329
2362
  (t) => t ?? null
2330
2363
  );
2331
2364
  }
2332
- function rn(e) {
2333
- switch (e) {
2334
- case "success":
2335
- return "material-symbols:check-circle-outline";
2336
- case "warning":
2337
- return "material-symbols:warning-outline";
2338
- case "danger":
2339
- return "material-symbols:error-outline";
2340
- case "info":
2341
- default:
2342
- return "material-symbols:info-outline";
2343
- }
2344
- }
2345
- function ln(e) {
2346
- switch (e) {
2347
- case "success":
2348
- return "success";
2349
- case "warning":
2350
- return "warning";
2351
- case "danger":
2352
- return "danger";
2353
- case "info":
2354
- default:
2355
- return "info";
2356
- }
2357
- }
2358
- function an(e, t, r, n) {
2359
- const s = [
2360
- "bc-notice",
2361
- `bc-notice--${e}`,
2362
- `bc-notice--tone-${t}`
2363
- ];
2364
- return r && s.push("bc-notice--dismissible"), n && n.length > 0 && s.push(n), s.join(" ");
2365
- }
2366
- function On({
2367
- variant: e = "info",
2368
- tone: t = "subtle",
2369
- role: r,
2370
- title: n,
2371
- icon: s,
2372
- closable: o = !1,
2373
- onDismiss: l,
2374
- class: u
2375
- }, ...c) {
2376
- const p = i.map(
2377
- o,
2378
- (b) => !!b || l != null
2379
- ), m = i.map(e, (b) => b ?? "info"), f = i.map(t, (b) => b ?? "subtle"), x = B(
2380
- r,
2381
- m
2382
- )(
2383
- (b, _) => b ?? (_ === "danger" ? "alert" : "status")
2384
- ), d = K(!0), g = O(
2385
- W,
2386
- (b) => y.div(
2387
- a.class(
2388
- B(
2389
- m,
2390
- f,
2391
- p,
2392
- u
2393
- )((_, h, v, T) => an(_, h, v, T))
2394
- ),
2395
- // Accessibility role mapping (always defined)
2396
- a.role(i.map(x, (_) => _)),
2397
- st(
2398
- i.map(s, (_) => _ === !1),
2399
- () => y.div(
2400
- a.class("bc-notice__icon"),
2401
- z({
2402
- icon: B(
2403
- s,
2404
- m
2405
- )((_, h) => _ === void 0 ? rn(h) : String(_)),
2406
- size: "md",
2407
- color: i.map(m, ln)
2408
- })
2409
- )
2410
- ),
2411
- y.div(
2412
- a.class("bc-notice__body"),
2413
- Oe(n, (_) => y.div(a.class("bc-notice__title"), _)),
2414
- y.div(a.class("bc-notice__content"), ...c)
2415
- ),
2416
- E(
2417
- p,
2418
- () => me({
2419
- size: "xs",
2420
- label: b.$.closeModal,
2421
- onClick: () => {
2422
- d.set(!1), l?.();
2423
- }
2424
- })
2425
- )
2426
- )
2427
- );
2428
- return E(d, () => g);
2429
- }
2430
2365
  export {
2431
- Bn as A,
2432
- gn as B,
2433
- bn as C,
2434
- Vn as D,
2435
- Nt as E,
2366
+ Sn as A,
2367
+ sn as B,
2368
+ mn as C,
2369
+ Tn as D,
2370
+ Ut as E,
2436
2371
  kt as F,
2437
2372
  pe as G,
2438
- Ln as H,
2439
- sn as I,
2440
- En as J,
2441
- xn as K,
2442
- Un as L,
2443
- qe as M,
2444
- Pt as N,
2445
- vn as O,
2446
- zt as P,
2447
- On as Q,
2448
- Jt as R,
2449
- hn as S,
2450
- Xt as T,
2373
+ An as H,
2374
+ Fn as I,
2375
+ nn as J,
2376
+ Bn as K,
2377
+ Ln as L,
2378
+ Xe as M,
2379
+ Rt as N,
2380
+ gn as O,
2381
+ hn as P,
2382
+ Nt as Q,
2383
+ Qt as R,
2384
+ dn as S,
2385
+ Yt as T,
2451
2386
  Ee as U,
2452
2387
  Me as V,
2453
- Kt as W,
2454
- fn as X,
2455
- mn as _,
2456
- X as a,
2457
- Nn as b,
2458
- Rn as c,
2459
- nn as d,
2460
- Y as e,
2461
- Pn as f,
2462
- It as g,
2463
- St as h,
2464
- wn as i,
2465
- jt as j,
2466
- Ot as k,
2467
- _n as l,
2468
- $n as m,
2469
- se as n,
2470
- yn as o,
2471
- In as p,
2472
- Cn as q,
2473
- Mn as r,
2474
- kn as s,
2475
- zn as t,
2476
- Tn as u,
2477
- Sn as v,
2478
- Dn as w,
2479
- qt as x,
2480
- An as y,
2481
- Fn as z
2388
+ Jt as W,
2389
+ un as X,
2390
+ pn as _,
2391
+ Y as a,
2392
+ Vn as b,
2393
+ Un as c,
2394
+ tn as d,
2395
+ Z as e,
2396
+ Nn as f,
2397
+ fn as g,
2398
+ yt as h,
2399
+ Dt as i,
2400
+ bn as j,
2401
+ Pt as k,
2402
+ Ot as l,
2403
+ vn as m,
2404
+ ne as n,
2405
+ xn as o,
2406
+ wn as p,
2407
+ $n as q,
2408
+ kn as r,
2409
+ yn as s,
2410
+ En as t,
2411
+ _n as u,
2412
+ In as v,
2413
+ Cn as w,
2414
+ Mn as x,
2415
+ Xt as y,
2416
+ Dn as z
2482
2417
  };