@auldrant/ui 0.10.0 → 0.11.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.
@@ -1,66 +1,99 @@
1
- import { jsx as r, jsxs as m, Fragment as se } from "preact/jsx-runtime";
2
- import { useId as $, useRef as P, useEffect as H } from "preact/hooks";
3
- import { signal as U, useSignal as D, effect as le } from "@preact/signals";
4
- import { h as K, toChildArray as re } from "preact";
5
- function v(...t) {
1
+ import { jsx as l, jsxs as g, Fragment as ae } from "preact/jsx-runtime";
2
+ import { useId as j, useState as ce, useRef as H, useCallback as ie, useEffect as A } from "preact/hooks";
3
+ import { signal as V, useSignal as q, effect as de } from "@preact/signals";
4
+ import { h as K, toChildArray as ue } from "preact";
5
+ function m(...t) {
6
6
  return t.filter(Boolean).join(" ");
7
7
  }
8
- function N(...t) {
8
+ function E(...t) {
9
9
  return t.filter(Boolean).join(" ") || void 0;
10
10
  }
11
- const ae = "_button_4gn7y_1 _focus-ring_4u8pk_3 _disabled_4u8pk_8", oe = {
12
- button: ae
13
- }, W = (t) => {
14
- const { label: e, onClick: s, type: n = "button", disabled: l, class: a } = t;
15
- return /* @__PURE__ */ r("button", { type: n, class: v(oe.button, a), onClick: s, disabled: l, children: e });
16
- }, ce = "_card_awzw5_1", ie = {
17
- card: ce
18
- }, Pt = (t) => {
11
+ const _e = "_button_4gn7y_1 _focus-ring_4u8pk_3 _disabled_4u8pk_8", pe = {
12
+ button: _e
13
+ }, Z = (t) => {
14
+ const { label: e, onClick: s, type: n = "button", disabled: r, class: o } = t;
15
+ return /* @__PURE__ */ l("button", { type: n, class: m(pe.button, o), onClick: s, disabled: r, children: e });
16
+ }, he = "_card_awzw5_1", fe = {
17
+ card: he
18
+ }, Ut = (t) => {
19
19
  const { children: e, class: s } = t;
20
- return /* @__PURE__ */ r("div", { class: v(ie.card, s), children: e });
21
- }, de = "_field_17xwz_1", ue = "_input_17xwz_8 _check-input_4u8pk_32 _focus-ring_4u8pk_3 _disabled_4u8pk_8", _e = "_error_17xwz_12 _field-error_4u8pk_36", T = {
22
- field: de,
23
- input: ue,
24
- error: _e
25
- }, Tt = (t) => {
26
- const { label: e, name: s, checked: n, required: l, disabled: a, error: o, onChange: c, class: i } = t, h = $(), d = `${h}-error`;
27
- return /* @__PURE__ */ m("div", { class: v(T.field, i), children: [
28
- /* @__PURE__ */ r(
20
+ return /* @__PURE__ */ l("div", { class: m(fe.card, s), children: e });
21
+ }, ge = "_field_17xwz_1", me = "_input_17xwz_8 _check-input_4u8pk_32 _focus-ring_4u8pk_3 _disabled_4u8pk_8", be = "_error_17xwz_12 _field-error_4u8pk_36", z = {
22
+ field: ge,
23
+ input: me,
24
+ error: be
25
+ }, Kt = (t) => {
26
+ const { label: e, name: s, checked: n, required: r, disabled: o, error: i, onChange: a, class: c } = t, d = j(), h = `${d}-error`;
27
+ return /* @__PURE__ */ g("div", { class: m(z.field, c), children: [
28
+ /* @__PURE__ */ l(
29
29
  "input",
30
30
  {
31
- id: h,
32
- class: T.input,
31
+ id: d,
32
+ class: z.input,
33
33
  type: "checkbox",
34
34
  name: s,
35
35
  checked: n,
36
- required: l,
37
- disabled: a,
38
- "aria-invalid": !!o || void 0,
39
- "aria-describedby": N(o && d),
40
- onChange: c && ((f) => c(f.target.checked))
36
+ required: r,
37
+ disabled: o,
38
+ "aria-invalid": !!i || void 0,
39
+ "aria-describedby": E(i && h),
40
+ onChange: a && ((u) => a(u.target.checked))
41
41
  }
42
42
  ),
43
- /* @__PURE__ */ r("label", { for: h, children: e }),
44
- o && /* @__PURE__ */ r("p", { id: d, class: T.error, role: "alert", children: o })
43
+ /* @__PURE__ */ l("label", { for: d, children: e }),
44
+ i && /* @__PURE__ */ l("p", { id: h, class: z.error, role: "alert", children: i })
45
45
  ] });
46
- }, pe = "_dialog_1lxj9_1", he = "_panel_1lxj9_14", fe = "_header_1lxj9_23", me = "_title_1lxj9_30", be = "_close_1lxj9_35 _focus-ring_4u8pk_3", ve = "_body_1lxj9_51", ke = "_message_1lxj9_56", ge = "_footer_1lxj9_60", ye = "_action_1lxj9_67 _focus-ring_4u8pk_3 _disabled_4u8pk_8", we = "_primary_1lxj9_82", y = {
47
- dialog: pe,
48
- panel: he,
49
- header: fe,
50
- title: me,
51
- close: be,
52
- body: ve,
53
- message: ke,
54
- footer: ge,
55
- action: ye,
56
- primary: we
57
- }, R = {
46
+ };
47
+ function ve(t, e, s) {
48
+ const [n, r] = ce(!1), o = H({ x: 0, y: 0, offsetX: 0, offsetY: 0 }), i = ie(() => {
49
+ const a = e.current;
50
+ a && (a.style.removeProperty("--drag-x"), a.style.removeProperty("--drag-y"));
51
+ }, [e]);
52
+ return A(() => {
53
+ const a = t.current, c = e.current;
54
+ if (!a || !c || !s)
55
+ return;
56
+ const d = (h) => {
57
+ if (h.target.closest("button"))
58
+ return;
59
+ const u = c.getBoundingClientRect(), _ = Number.parseFloat(c.style.getPropertyValue("--drag-x") || "0"), p = Number.parseFloat(c.style.getPropertyValue("--drag-y") || "0");
60
+ o.current = {
61
+ x: h.clientX,
62
+ y: h.clientY,
63
+ offsetX: _,
64
+ offsetY: p
65
+ }, a.setPointerCapture(h.pointerId), r(!0);
66
+ const b = -(u.left - _), v = window.innerWidth - u.right + _, k = -(u.top - p), w = window.innerHeight - u.bottom + p, I = (L) => {
67
+ const D = L.clientX - o.current.x + o.current.offsetX, P = L.clientY - o.current.y + o.current.offsetY, f = Math.max(b, Math.min(v, D)), $ = Math.max(k, Math.min(w, P));
68
+ c.style.setProperty("--drag-x", `${f}px`), c.style.setProperty("--drag-y", `${$}px`);
69
+ }, x = () => {
70
+ a.removeEventListener("pointermove", I), a.removeEventListener("pointerup", x), r(!1);
71
+ };
72
+ a.addEventListener("pointermove", I), a.addEventListener("pointerup", x);
73
+ };
74
+ return a.addEventListener("pointerdown", d), () => a.removeEventListener("pointerdown", d);
75
+ }, [t, e, s]), { isDragging: n, reset: i };
76
+ }
77
+ const ye = "_dialog_rjj57_1", ke = "_panel_rjj57_21", we = "_header_rjj57_30", xe = "_title_rjj57_37", $e = "_close_rjj57_42 _focus-ring_4u8pk_3", Ce = "_body_rjj57_57", je = "_message_rjj57_62", Le = "_footer_rjj57_66", Ie = "_action_rjj57_73 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Ne = "_primary_rjj57_88", Ee = "_draggable_rjj57_99", De = "_dragging_rjj57_105", y = {
78
+ dialog: ye,
79
+ panel: ke,
80
+ header: we,
81
+ title: xe,
82
+ close: $e,
83
+ body: Ce,
84
+ message: je,
85
+ footer: Le,
86
+ action: Ie,
87
+ primary: Ne,
88
+ draggable: Ee,
89
+ dragging: De
90
+ }, F = {
58
91
  cancel: "Cancel",
59
92
  cancelDescription: "Dismiss this dialog",
60
93
  closeDescription: "Close this dialog"
61
94
  };
62
- function xe(t) {
63
- const e = t.split("+"), s = e.at(-1) ?? "", n = e.slice(0, -1).map((l) => l.toLowerCase());
95
+ function Pe(t) {
96
+ const e = t.split("+"), s = e.at(-1) ?? "", n = e.slice(0, -1).map((r) => r.toLowerCase());
64
97
  return {
65
98
  key: s.toLowerCase(),
66
99
  ctrl: n.includes("ctrl"),
@@ -68,132 +101,140 @@ function xe(t) {
68
101
  alt: n.includes("alt")
69
102
  };
70
103
  }
71
- function z(t) {
104
+ function O(t) {
72
105
  return `(${t})`;
73
106
  }
74
- const Y = (t) => {
107
+ const se = (t) => {
75
108
  const {
76
109
  open: e,
77
110
  title: s,
78
111
  alert: n,
79
- onDismiss: l,
80
- onBackdropClick: a,
81
- message: o,
112
+ draggable: r,
113
+ onDismiss: o,
114
+ onBackdropClick: i,
115
+ message: a,
82
116
  defaultAction: c,
83
- actions: i,
117
+ actions: d,
84
118
  cancelLabel: h,
85
- onCancel: d,
86
- focusCancel: f,
87
- children: _,
88
- class: u
89
- } = t, b = P(null), g = P(null), C = P(null), I = $();
90
- H(() => {
91
- const p = b.current;
92
- p && (e && !p.open ? (p.showModal(), f && C.current ? C.current.focus() : g.current && g.current.focus()) : !e && p.open && p.close());
93
- }, [e, f]), H(() => {
94
- const p = b.current;
95
- if (!p)
119
+ onCancel: u,
120
+ focusCancel: _,
121
+ children: p,
122
+ class: b
123
+ } = t, v = H(null), k = H(null), w = H(null), I = H(null), x = j(), { isDragging: L, reset: D } = ve(k, v, e && !!r);
124
+ A(() => {
125
+ const f = v.current;
126
+ f && (e && !f.open ? (f.showModal(), _ && I.current ? I.current.focus() : w.current && w.current.focus()) : !e && f.open && (f.close(), D()));
127
+ }, [e, _, D]), A(() => {
128
+ const f = v.current;
129
+ if (!f)
96
130
  return;
97
- const k = (L) => {
98
- L.preventDefault(), l();
131
+ const $ = (S) => {
132
+ S.preventDefault(), o();
99
133
  };
100
- return p.addEventListener("cancel", k), () => p.removeEventListener("cancel", k);
101
- }, [l]), H(() => {
102
- const p = b.current;
103
- if (!p || !e)
134
+ return f.addEventListener("cancel", $), () => f.removeEventListener("cancel", $);
135
+ }, [o]), A(() => {
136
+ const f = v.current;
137
+ if (!f || !e)
104
138
  return;
105
- const k = [...i ?? [], ...c ? [c] : []];
106
- if (k.length === 0)
139
+ const $ = [...d ?? [], ...c ? [c] : []];
140
+ if ($.length === 0)
107
141
  return;
108
- const L = k.map((w) => ({
109
- parsed: xe(w.shortcut),
110
- handler: w.onClick
111
- })), j = (w) => {
112
- for (const { parsed: A, handler: ne } of L)
113
- if (w.key.toLowerCase() === A.key && w.ctrlKey === A.ctrl && w.shiftKey === A.shift && w.altKey === A.alt) {
114
- w.preventDefault(), ne();
142
+ const S = $.map((N) => ({
143
+ parsed: Pe(N.shortcut),
144
+ handler: N.onClick
145
+ })), G = (N) => {
146
+ for (const { parsed: T, handler: oe } of S)
147
+ if (N.key.toLowerCase() === T.key && N.ctrlKey === T.ctrl && N.shiftKey === T.shift && N.altKey === T.alt) {
148
+ N.preventDefault(), oe();
115
149
  return;
116
150
  }
117
151
  };
118
- return p.addEventListener("keydown", j), () => p.removeEventListener("keydown", j);
119
- }, [e, i, c]), H(() => {
120
- const p = b.current;
121
- if (!p || !e || !a)
152
+ return f.addEventListener("keydown", G), () => f.removeEventListener("keydown", G);
153
+ }, [e, d, c]), A(() => {
154
+ const f = v.current;
155
+ if (!f || !e || !i)
122
156
  return;
123
- const k = (L) => {
124
- L.target === p && a();
157
+ const $ = (S) => {
158
+ S.target === f && i();
125
159
  };
126
- return p.addEventListener("click", k), () => p.removeEventListener("click", k);
127
- }, [e, a]);
128
- const q = c || d || i && i.length > 0;
129
- return /* @__PURE__ */ r(
160
+ return f.addEventListener("click", $), () => f.removeEventListener("click", $);
161
+ }, [e, i]);
162
+ const P = c || u || d && d.length > 0;
163
+ return /* @__PURE__ */ l(
130
164
  "dialog",
131
165
  {
132
- ref: b,
133
- class: v(y.dialog, u),
134
- "aria-labelledby": I,
166
+ ref: v,
167
+ class: m(y.dialog, b),
168
+ "aria-labelledby": x,
135
169
  role: n ? "alertdialog" : void 0,
136
- children: /* @__PURE__ */ m("div", { class: y.panel, children: [
137
- /* @__PURE__ */ m("header", { class: y.header, children: [
138
- /* @__PURE__ */ r("h2", { id: I, class: y.title, children: s }),
139
- !n && /* @__PURE__ */ r(
140
- "button",
141
- {
142
- type: "button",
143
- class: y.close,
144
- title: R.closeDescription,
145
- onClick: l,
146
- children: "×"
147
- }
148
- )
149
- ] }),
150
- /* @__PURE__ */ m("div", { class: y.body, children: [
151
- o && /* @__PURE__ */ r("p", { class: y.message, children: o }),
152
- _
170
+ children: /* @__PURE__ */ g("div", { class: y.panel, children: [
171
+ /* @__PURE__ */ g(
172
+ "header",
173
+ {
174
+ ref: k,
175
+ class: m(y.header, r && y.draggable, L && y.dragging),
176
+ children: [
177
+ /* @__PURE__ */ l("h2", { id: x, class: y.title, children: s }),
178
+ !n && /* @__PURE__ */ l(
179
+ "button",
180
+ {
181
+ type: "button",
182
+ class: y.close,
183
+ title: F.closeDescription,
184
+ onClick: o,
185
+ children: "×"
186
+ }
187
+ )
188
+ ]
189
+ }
190
+ ),
191
+ /* @__PURE__ */ g("div", { class: y.body, children: [
192
+ a && /* @__PURE__ */ l("p", { class: y.message, children: a }),
193
+ p
153
194
  ] }),
154
- q && /* @__PURE__ */ m("footer", { class: y.footer, children: [
155
- i?.map((p) => /* @__PURE__ */ m(
195
+ P && /* @__PURE__ */ g("footer", { class: y.footer, children: [
196
+ d?.map((f) => /* @__PURE__ */ g(
156
197
  "button",
157
198
  {
158
199
  type: "button",
159
200
  class: y.action,
160
- title: p.description,
161
- onClick: p.onClick,
201
+ title: f.description,
202
+ onClick: f.onClick,
162
203
  children: [
163
- p.label,
204
+ f.label,
164
205
  " ",
165
- z(p.shortcut)
206
+ O(f.shortcut)
166
207
  ]
167
208
  },
168
- p.label
209
+ f.label
169
210
  )),
170
- c && /* @__PURE__ */ m(
211
+ c && /* @__PURE__ */ g(
171
212
  "button",
172
213
  {
173
- ref: g,
214
+ ref: w,
174
215
  type: "button",
175
- class: v(y.action, y.primary),
216
+ class: m(y.action, y.primary),
176
217
  title: c.description,
177
218
  onClick: c.onClick,
178
219
  children: [
179
220
  c.label,
180
221
  " ",
181
- z(c.shortcut)
222
+ O(c.shortcut)
182
223
  ]
183
224
  }
184
225
  ),
185
- d && /* @__PURE__ */ m(
226
+ u && /* @__PURE__ */ g(
186
227
  "button",
187
228
  {
188
- ref: C,
229
+ ref: I,
189
230
  type: "button",
190
231
  class: y.action,
191
- title: R.cancelDescription,
192
- onClick: d,
232
+ title: F.cancelDescription,
233
+ onClick: u,
193
234
  children: [
194
- h ?? R.cancel,
235
+ h ?? F.cancel,
195
236
  " ",
196
- z("Esc")
237
+ O("Esc")
197
238
  ]
198
239
  }
199
240
  )
@@ -201,282 +242,286 @@ const Y = (t) => {
201
242
  ] })
202
243
  }
203
244
  );
204
- }, Rt = (t) => {
245
+ }, Vt = (t) => {
205
246
  const {
206
247
  open: e,
207
248
  title: s,
208
249
  onClose: n,
209
- message: l,
210
- defaultAction: a,
211
- actions: o,
250
+ message: r,
251
+ defaultAction: o,
252
+ actions: i,
253
+ draggable: a = !0,
212
254
  children: c,
213
- class: i
255
+ class: d
214
256
  } = t;
215
- return /* @__PURE__ */ r(
216
- Y,
257
+ return /* @__PURE__ */ l(
258
+ se,
217
259
  {
218
260
  open: e,
219
261
  title: s,
262
+ draggable: a,
220
263
  onDismiss: n,
221
264
  onBackdropClick: n,
222
- message: l,
223
- defaultAction: a,
224
- actions: o,
225
- class: i,
265
+ message: r,
266
+ defaultAction: o,
267
+ actions: i,
268
+ class: d,
226
269
  children: c
227
270
  }
228
271
  );
229
- }, $e = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", Ce = {
230
- link: $e
231
- }, zt = (t) => {
232
- const { href: e, fileName: s, label: n, class: l } = t;
233
- return /* @__PURE__ */ r("a", { href: e, download: s, class: v(Ce.link, l), children: n });
234
- }, Ie = "_form_jr324_1", Le = "_actions_jr324_6", Ne = "_status_jr324_13", O = {
235
- form: Ie,
236
- actions: Le,
237
- status: Ne
238
- }, Ot = (t) => {
272
+ }, Se = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", Be = {
273
+ link: Se
274
+ }, Wt = (t) => {
275
+ const { href: e, fileName: s, label: n, class: r } = t;
276
+ return /* @__PURE__ */ l("a", { href: e, download: s, class: m(Be.link, r), children: n });
277
+ }, He = "_form_jr324_1", Ae = "_actions_jr324_6", qe = "_status_jr324_13", X = {
278
+ form: He,
279
+ actions: Ae,
280
+ status: qe
281
+ }, Gt = (t) => {
239
282
  const {
240
283
  onSubmit: e,
241
284
  submitLabel: s = "Submit",
242
285
  resetLabel: n,
243
- status: l,
244
- children: a,
245
- class: o
286
+ status: r,
287
+ children: o,
288
+ class: i
246
289
  } = t;
247
- return /* @__PURE__ */ m(
290
+ return /* @__PURE__ */ g(
248
291
  "form",
249
292
  {
250
- class: v(O.form, o),
251
- onSubmit: (c) => {
252
- c.preventDefault();
253
- const i = new FormData(c.currentTarget);
254
- e(i);
293
+ class: m(X.form, i),
294
+ onSubmit: (a) => {
295
+ a.preventDefault();
296
+ const c = new FormData(a.currentTarget);
297
+ e(c);
255
298
  },
256
299
  children: [
257
- a,
258
- /* @__PURE__ */ m("div", { class: O.actions, children: [
259
- /* @__PURE__ */ r(W, { type: "submit", label: s }),
260
- n && /* @__PURE__ */ r(W, { type: "reset", label: n })
300
+ o,
301
+ /* @__PURE__ */ g("div", { class: X.actions, children: [
302
+ /* @__PURE__ */ l(Z, { type: "submit", label: s }),
303
+ n && /* @__PURE__ */ l(Z, { type: "reset", label: n })
261
304
  ] }),
262
- l && /* @__PURE__ */ r("output", { class: O.status, children: l })
305
+ r && /* @__PURE__ */ l("output", { class: X.status, children: r })
263
306
  ]
264
307
  }
265
308
  );
266
- }, je = "_field_7l9ux_1", Ee = "_label_7l9ux_8", De = "_required_7l9ux_12", Se = "_error_7l9ux_16 _field-error_4u8pk_36", B = {
267
- field: je,
268
- label: Ee,
269
- required: De,
270
- error: Se
271
- }, S = (t) => {
272
- const { for: e, label: s, required: n, error: l, errorId: a, children: o, class: c } = t;
273
- return /* @__PURE__ */ m("div", { class: v(B.field, c), children: [
274
- /* @__PURE__ */ m("label", { class: B.label, for: e, children: [
309
+ }, Me = "_field_7l9ux_1", Te = "_label_7l9ux_8", Re = "_required_7l9ux_12", ze = "_error_7l9ux_16 _field-error_4u8pk_36", R = {
310
+ field: Me,
311
+ label: Te,
312
+ required: Re,
313
+ error: ze
314
+ }, M = (t) => {
315
+ const { for: e, label: s, required: n, error: r, errorId: o, children: i, class: a } = t;
316
+ return /* @__PURE__ */ g("div", { class: m(R.field, a), children: [
317
+ /* @__PURE__ */ g("label", { class: R.label, for: e, children: [
275
318
  s,
276
319
  ":",
277
- n && /* @__PURE__ */ m("span", { class: B.required, "aria-hidden": "true", children: [
320
+ n && /* @__PURE__ */ g("span", { class: R.required, "aria-hidden": "true", children: [
278
321
  " ",
279
322
  "*"
280
323
  ] })
281
324
  ] }),
282
- o,
283
- l && /* @__PURE__ */ r("p", { id: a, class: B.error, role: "alert", children: l })
325
+ i,
326
+ r && /* @__PURE__ */ l("p", { id: o, class: R.error, role: "alert", children: r })
284
327
  ] });
285
- }, Ae = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", He = {
286
- input: Ae
287
- }, Be = {
328
+ }, Fe = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Oe = {
329
+ input: Fe
330
+ }, Xe = {
288
331
  email: "email",
289
332
  tel: "tel",
290
333
  url: "url"
291
- }, Ft = (t) => {
334
+ }, Zt = (t) => {
292
335
  const {
293
336
  label: e,
294
337
  name: s,
295
338
  type: n = "text",
296
- value: l,
297
- placeholder: a,
298
- maxLength: o,
299
- autocomplete: c,
300
- readOnly: i,
301
- pattern: h,
302
- required: d,
303
- disabled: f,
339
+ value: r,
340
+ placeholder: o,
341
+ maxLength: i,
342
+ autocomplete: a,
343
+ readOnly: c,
344
+ pattern: d,
345
+ required: h,
346
+ disabled: u,
304
347
  error: _,
305
- onInput: u,
348
+ onInput: p,
306
349
  class: b
307
- } = t, g = $(), C = `${g}-error`;
308
- return /* @__PURE__ */ r(
309
- S,
350
+ } = t, v = j(), k = `${v}-error`;
351
+ return /* @__PURE__ */ l(
352
+ M,
310
353
  {
311
354
  label: e,
312
- for: g,
313
- required: d,
355
+ for: v,
356
+ required: h,
314
357
  error: _,
315
- errorId: C,
358
+ errorId: k,
316
359
  class: b,
317
- children: /* @__PURE__ */ r(
360
+ children: /* @__PURE__ */ l(
318
361
  "input",
319
362
  {
320
- id: g,
321
- class: He.input,
363
+ id: v,
364
+ class: Oe.input,
322
365
  type: n,
323
366
  name: s,
324
- value: l,
325
- placeholder: a,
326
- maxLength: o,
327
- autoComplete: c ?? Be[n],
328
- readOnly: i,
329
- pattern: h,
330
- required: d,
331
- disabled: f,
367
+ value: r,
368
+ placeholder: o,
369
+ maxLength: i,
370
+ autoComplete: a ?? Xe[n],
371
+ readOnly: c,
372
+ pattern: d,
373
+ required: h,
374
+ disabled: u,
332
375
  "aria-invalid": !!_ || void 0,
333
- "aria-describedby": N(_ && C),
334
- onInput: u && ((I) => u(I.target.value))
376
+ "aria-describedby": E(_ && k),
377
+ onInput: p && ((w) => p(w.target.value))
335
378
  }
336
379
  )
337
380
  }
338
381
  );
339
- }, G = U(window.location.pathname), ee = U(window.location.hash.slice(1));
340
- function qe(t) {
382
+ }, W = V(window.location.pathname), re = V(window.location.hash.slice(1));
383
+ function Ye(t) {
341
384
  const e = t.indexOf("#");
342
385
  let s = "", n = t;
343
386
  e >= 0 && (s = t.slice(e + 1), n = t.slice(0, e));
344
- const l = n.indexOf("?");
345
- let a = "", o = n;
346
- return l >= 0 && (a = n.slice(l), o = n.slice(0, l)), { pathname: o || "/", search: a, hash: s };
387
+ const r = n.indexOf("?");
388
+ let o = "", i = n;
389
+ return r >= 0 && (o = n.slice(r), i = n.slice(0, r)), { pathname: i || "/", search: o, hash: s };
347
390
  }
348
- function Pe(t, e) {
349
- const { pathname: s, search: n, hash: l } = qe(t), a = s + n + (l ? `#${l}` : "");
350
- e?.replace ? history.replaceState(null, "", a) : history.pushState(null, "", a), G.value = s, ee.value = l;
391
+ function Ue(t, e) {
392
+ const { pathname: s, search: n, hash: r } = Ye(t), o = s + n + (r ? `#${r}` : "");
393
+ e?.replace ? history.replaceState(null, "", o) : history.pushState(null, "", o), W.value = s, re.value = r;
351
394
  }
352
395
  window.addEventListener("popstate", () => {
353
- G.value = window.location.pathname, ee.value = window.location.hash.slice(1);
396
+ W.value = window.location.pathname, re.value = window.location.hash.slice(1);
354
397
  });
355
- const Te = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", Z = {
356
- link: Te
398
+ const Ke = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", J = {
399
+ link: Ke
357
400
  };
358
- function Re(t) {
401
+ function Ve(t) {
359
402
  try {
360
403
  return new URL(t, window.location.href).origin !== window.location.origin;
361
404
  } catch {
362
405
  return !1;
363
406
  }
364
407
  }
365
- const Mt = (t) => {
366
- const { href: e, children: s, external: n, class: l } = t;
367
- return n ?? Re(e) ? /* @__PURE__ */ r("a", { href: e, class: v(Z.link, l), rel: "noopener noreferrer", children: s }) : /* @__PURE__ */ r(
408
+ const Jt = (t) => {
409
+ const { href: e, children: s, external: n, class: r } = t;
410
+ return n ?? Ve(e) ? /* @__PURE__ */ l("a", { href: e, class: m(J.link, r), rel: "noopener noreferrer", children: s }) : /* @__PURE__ */ l(
368
411
  "a",
369
412
  {
370
413
  href: e,
371
- class: v(Z.link, l),
372
- onClick: (o) => {
373
- o.preventDefault(), Pe(e);
414
+ class: m(J.link, r),
415
+ onClick: (i) => {
416
+ i.preventDefault(), Ue(e);
374
417
  },
375
418
  children: s
376
419
  }
377
420
  );
378
- }, Kt = (t) => {
421
+ }, Qt = (t) => {
379
422
  const {
380
423
  open: e,
381
424
  title: s,
382
425
  onCancel: n,
383
- cancelLabel: l,
384
- message: a,
385
- defaultAction: o,
386
- actions: c,
387
- focusCancel: i,
426
+ cancelLabel: r,
427
+ message: o,
428
+ defaultAction: i,
429
+ actions: a,
430
+ focusCancel: c,
431
+ draggable: d = !1,
388
432
  children: h,
389
- class: d
433
+ class: u
390
434
  } = t;
391
- return /* @__PURE__ */ r(
392
- Y,
435
+ return /* @__PURE__ */ l(
436
+ se,
393
437
  {
394
438
  open: e,
395
439
  title: s,
396
440
  alert: !0,
441
+ draggable: d,
397
442
  onDismiss: n,
398
443
  onCancel: n,
399
- cancelLabel: l,
400
- message: a,
401
- defaultAction: o,
402
- actions: c,
403
- focusCancel: i,
404
- class: d,
444
+ cancelLabel: r,
445
+ message: o,
446
+ defaultAction: i,
447
+ actions: a,
448
+ focusCancel: c,
449
+ class: u,
405
450
  children: h
406
451
  }
407
452
  );
408
- }, ze = "_nav_778nl_1", Oe = "_title_778nl_6", V = {
409
- nav: ze,
410
- title: Oe
411
- }, Ut = (t) => {
412
- const { title: e, children: s, class: n } = t, l = $();
413
- return /* @__PURE__ */ m("nav", { class: v(V.nav, n), "aria-labelledby": e ? l : void 0, children: [
414
- e && /* @__PURE__ */ r("h2", { id: l, class: V.title, children: e }),
453
+ }, We = "_nav_778nl_1", Ge = "_title_778nl_6", Q = {
454
+ nav: We,
455
+ title: Ge
456
+ }, en = (t) => {
457
+ const { title: e, children: s, class: n } = t, r = j();
458
+ return /* @__PURE__ */ g("nav", { class: m(Q.nav, n), "aria-labelledby": e ? r : void 0, children: [
459
+ e && /* @__PURE__ */ l("h2", { id: r, class: Q.title, children: e }),
415
460
  s
416
461
  ] });
417
- }, Fe = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Me = {
418
- input: Fe
419
- }, Gt = (t) => {
462
+ }, Ze = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Je = {
463
+ input: Ze
464
+ }, tn = (t) => {
420
465
  const {
421
466
  label: e,
422
467
  name: s,
423
468
  min: n,
424
- max: l,
425
- step: a,
426
- value: o,
427
- placeholder: c,
428
- required: i,
429
- disabled: h,
430
- error: d,
431
- onInput: f,
469
+ max: r,
470
+ step: o,
471
+ value: i,
472
+ placeholder: a,
473
+ required: c,
474
+ disabled: d,
475
+ error: h,
476
+ onInput: u,
432
477
  class: _
433
- } = t, u = $(), b = `${u}-error`;
434
- return /* @__PURE__ */ r(
435
- S,
478
+ } = t, p = j(), b = `${p}-error`;
479
+ return /* @__PURE__ */ l(
480
+ M,
436
481
  {
437
482
  label: e,
438
- for: u,
439
- required: i,
440
- error: d,
483
+ for: p,
484
+ required: c,
485
+ error: h,
441
486
  errorId: b,
442
487
  class: _,
443
- children: /* @__PURE__ */ r(
488
+ children: /* @__PURE__ */ l(
444
489
  "input",
445
490
  {
446
- id: u,
447
- class: Me.input,
491
+ id: p,
492
+ class: Je.input,
448
493
  type: "number",
449
494
  name: s,
450
495
  min: n,
451
- max: l,
452
- step: a,
453
- value: o,
454
- placeholder: c,
455
- required: i,
456
- disabled: h,
457
- "aria-invalid": !!d || void 0,
458
- "aria-describedby": N(d && b),
459
- onInput: f && ((g) => f(g.target.valueAsNumber))
496
+ max: r,
497
+ step: o,
498
+ value: i,
499
+ placeholder: a,
500
+ required: c,
501
+ disabled: d,
502
+ "aria-invalid": !!h || void 0,
503
+ "aria-describedby": E(h && b),
504
+ onInput: u && ((v) => u(v.target.valueAsNumber))
460
505
  }
461
506
  )
462
507
  }
463
508
  );
464
- }, Ke = "_wrapper_16zfv_1", Ue = "_input_16zfv_5 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Ge = "_toggle_16zfv_11 _focus-ring_4u8pk_3 _disabled_4u8pk_8", F = {
465
- wrapper: Ke,
466
- input: Ue,
467
- toggle: Ge
509
+ }, Qe = "_wrapper_16zfv_1", et = "_input_16zfv_5 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", tt = "_toggle_16zfv_11 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Y = {
510
+ wrapper: Qe,
511
+ input: et,
512
+ toggle: tt
468
513
  };
469
- const We = (...t) => t.filter((e, s, n) => !!e && e.trim() !== "" && n.indexOf(e) === s).join(" ").trim();
470
- const J = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
471
- const Ze = (t) => t.replace(
514
+ const nt = (...t) => t.filter((e, s, n) => !!e && e.trim() !== "" && n.indexOf(e) === s).join(" ").trim();
515
+ const ee = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
516
+ const st = (t) => t.replace(
472
517
  /^([A-Z])|[\s-_]+(\w)/g,
473
518
  (e, s, n) => n ? n.toUpperCase() : s.toLowerCase()
474
519
  );
475
- const Q = (t) => {
476
- const e = Ze(t);
520
+ const te = (t) => {
521
+ const e = st(t);
477
522
  return e.charAt(0).toUpperCase() + e.slice(1);
478
523
  };
479
- var Ve = {
524
+ var rt = {
480
525
  xmlns: "http://www.w3.org/2000/svg",
481
526
  width: 24,
482
527
  height: 24,
@@ -487,53 +532,53 @@ var Ve = {
487
532
  "stroke-linecap": "round",
488
533
  "stroke-linejoin": "round"
489
534
  };
490
- const Je = (t) => {
535
+ const lt = (t) => {
491
536
  for (const e in t)
492
537
  if (e.startsWith("aria-") || e === "role" || e === "title")
493
538
  return !0;
494
539
  return !1;
495
540
  };
496
- const Qe = ({
541
+ const ot = ({
497
542
  color: t = "currentColor",
498
543
  size: e = 24,
499
544
  strokeWidth: s = 2,
500
545
  absoluteStrokeWidth: n,
501
- children: l,
502
- iconNode: a,
503
- class: o = "",
504
- ...c
546
+ children: r,
547
+ iconNode: o,
548
+ class: i = "",
549
+ ...a
505
550
  }) => K(
506
551
  "svg",
507
552
  {
508
- ...Ve,
553
+ ...rt,
509
554
  width: String(e),
510
555
  height: e,
511
556
  stroke: t,
512
557
  "stroke-width": n ? Number(s) * 24 / Number(e) : s,
513
- class: ["lucide", o].join(" "),
514
- ...!l && !Je(c) && { "aria-hidden": "true" },
515
- ...c
558
+ class: ["lucide", i].join(" "),
559
+ ...!r && !lt(a) && { "aria-hidden": "true" },
560
+ ...a
516
561
  },
517
- [...a.map(([i, h]) => K(i, h)), ...re(l)]
562
+ [...o.map(([c, d]) => K(c, d)), ...ue(r)]
518
563
  );
519
- const te = (t, e) => {
520
- const s = ({ class: n = "", className: l = "", children: a, ...o }) => K(
521
- Qe,
564
+ const le = (t, e) => {
565
+ const s = ({ class: n = "", className: r = "", children: o, ...i }) => K(
566
+ ot,
522
567
  {
523
- ...o,
568
+ ...i,
524
569
  iconNode: e,
525
- class: We(
526
- `lucide-${J(Q(t))}`,
527
- `lucide-${J(t)}`,
570
+ class: nt(
571
+ `lucide-${ee(te(t))}`,
572
+ `lucide-${ee(t)}`,
528
573
  n,
529
- l
574
+ r
530
575
  )
531
576
  },
532
- a
577
+ o
533
578
  );
534
- return s.displayName = Q(t), s;
579
+ return s.displayName = te(t), s;
535
580
  };
536
- const Xe = te("eye", [
581
+ const at = le("eye", [
537
582
  [
538
583
  "path",
539
584
  {
@@ -543,7 +588,7 @@ const Xe = te("eye", [
543
588
  ],
544
589
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
545
590
  ]);
546
- const Ye = te("eye-off", [
591
+ const ct = le("eye-off", [
547
592
  [
548
593
  "path",
549
594
  {
@@ -560,324 +605,324 @@ const Ye = te("eye-off", [
560
605
  }
561
606
  ],
562
607
  ["path", { d: "m2 2 20 20", key: "1ooewy" }]
563
- ]), et = {
608
+ ]), it = {
564
609
  current: "current-password",
565
610
  new: "new-password"
566
- }, Wt = (t) => {
611
+ }, nn = (t) => {
567
612
  const {
568
613
  label: e,
569
614
  name: s,
570
615
  purpose: n,
571
- value: l,
572
- placeholder: a,
573
- required: o,
574
- disabled: c,
575
- error: i,
576
- onInput: h,
577
- class: d
578
- } = t, f = $(), _ = `${f}-error`, u = D(!1);
579
- return /* @__PURE__ */ r(
580
- S,
616
+ value: r,
617
+ placeholder: o,
618
+ required: i,
619
+ disabled: a,
620
+ error: c,
621
+ onInput: d,
622
+ class: h
623
+ } = t, u = j(), _ = `${u}-error`, p = q(!1);
624
+ return /* @__PURE__ */ l(
625
+ M,
581
626
  {
582
627
  label: e,
583
- for: f,
584
- required: o,
585
- error: i,
628
+ for: u,
629
+ required: i,
630
+ error: c,
586
631
  errorId: _,
587
- class: d,
588
- children: /* @__PURE__ */ m("div", { class: F.wrapper, children: [
589
- /* @__PURE__ */ r(
632
+ class: h,
633
+ children: /* @__PURE__ */ g("div", { class: Y.wrapper, children: [
634
+ /* @__PURE__ */ l(
590
635
  "input",
591
636
  {
592
- id: f,
593
- class: F.input,
594
- type: u.value ? "text" : "password",
637
+ id: u,
638
+ class: Y.input,
639
+ type: p.value ? "text" : "password",
595
640
  name: s,
596
- value: l,
597
- placeholder: a,
598
- autoComplete: et[n],
599
- required: o,
600
- disabled: c,
601
- "aria-invalid": !!i || void 0,
602
- "aria-describedby": N(i && _),
603
- onInput: h && ((b) => h(b.target.value))
641
+ value: r,
642
+ placeholder: o,
643
+ autoComplete: it[n],
644
+ required: i,
645
+ disabled: a,
646
+ "aria-invalid": !!c || void 0,
647
+ "aria-describedby": E(c && _),
648
+ onInput: d && ((b) => d(b.target.value))
604
649
  }
605
650
  ),
606
- /* @__PURE__ */ r(
651
+ /* @__PURE__ */ l(
607
652
  "button",
608
653
  {
609
654
  type: "button",
610
- class: F.toggle,
611
- disabled: c,
612
- "aria-label": u.value ? "Hide password" : "Show password",
655
+ class: Y.toggle,
656
+ disabled: a,
657
+ "aria-label": p.value ? "Hide password" : "Show password",
613
658
  onClick: () => {
614
- u.value = !u.value;
659
+ p.value = !p.value;
615
660
  },
616
- children: u.value ? /* @__PURE__ */ r(Ye, { size: "1em" }) : /* @__PURE__ */ r(Xe, { size: "1em" })
661
+ children: p.value ? /* @__PURE__ */ l(ct, { size: "1em" }) : /* @__PURE__ */ l(at, { size: "1em" })
617
662
  }
618
663
  )
619
664
  ] })
620
665
  }
621
666
  );
622
- }, tt = "_fieldset_lymkd_1", nt = "_legend_lymkd_6", st = "_option_lymkd_11", lt = "_input_lymkd_19 _check-input_4u8pk_32 _focus-ring_4u8pk_3", rt = "_error_lymkd_23 _field-error_4u8pk_36", E = {
623
- fieldset: tt,
624
- legend: nt,
625
- option: st,
626
- input: lt,
627
- error: rt
628
- }, Zt = (t) => {
667
+ }, dt = "_fieldset_lymkd_1", ut = "_legend_lymkd_6", _t = "_option_lymkd_11", pt = "_input_lymkd_19 _check-input_4u8pk_32 _focus-ring_4u8pk_3", ht = "_error_lymkd_23 _field-error_4u8pk_36", B = {
668
+ fieldset: dt,
669
+ legend: ut,
670
+ option: _t,
671
+ input: pt,
672
+ error: ht
673
+ }, sn = (t) => {
629
674
  const {
630
675
  legend: e,
631
676
  name: s,
632
677
  options: n,
633
- value: l,
634
- required: a,
635
- disabled: o,
636
- error: c,
637
- onChange: i,
638
- class: h
639
- } = t, d = $(), f = `${d}-error`;
640
- return /* @__PURE__ */ m(
678
+ value: r,
679
+ required: o,
680
+ disabled: i,
681
+ error: a,
682
+ onChange: c,
683
+ class: d
684
+ } = t, h = j(), u = `${h}-error`;
685
+ return /* @__PURE__ */ g(
641
686
  "fieldset",
642
687
  {
643
- class: v(E.fieldset, h),
644
- "aria-invalid": !!c || void 0,
645
- "aria-describedby": N(c && f),
688
+ class: m(B.fieldset, d),
689
+ "aria-invalid": !!a || void 0,
690
+ "aria-describedby": E(a && u),
646
691
  children: [
647
- /* @__PURE__ */ r("legend", { class: E.legend, children: e }),
692
+ /* @__PURE__ */ l("legend", { class: B.legend, children: e }),
648
693
  n.map((_) => {
649
- const u = `${d}-${_.value}`;
650
- return /* @__PURE__ */ m("div", { class: E.option, children: [
651
- /* @__PURE__ */ r(
694
+ const p = `${h}-${_.value}`;
695
+ return /* @__PURE__ */ g("div", { class: B.option, children: [
696
+ /* @__PURE__ */ l(
652
697
  "input",
653
698
  {
654
- id: u,
655
- class: E.input,
699
+ id: p,
700
+ class: B.input,
656
701
  type: "radio",
657
702
  name: s,
658
703
  value: _.value,
659
- checked: l === _.value,
660
- required: a,
661
- disabled: o,
662
- onChange: i && (() => i(_.value))
704
+ checked: r === _.value,
705
+ required: o,
706
+ disabled: i,
707
+ onChange: c && (() => c(_.value))
663
708
  }
664
709
  ),
665
- /* @__PURE__ */ r("label", { for: u, children: _.label })
710
+ /* @__PURE__ */ l("label", { for: p, children: _.label })
666
711
  ] }, _.value);
667
712
  }),
668
- c && /* @__PURE__ */ r("p", { id: f, class: E.error, role: "alert", children: c })
713
+ a && /* @__PURE__ */ l("p", { id: u, class: B.error, role: "alert", children: a })
669
714
  ]
670
715
  }
671
716
  );
672
- }, Vt = (t) => {
673
- const { path: e, children: s } = t, n = G.value;
717
+ }, rn = (t) => {
718
+ const { path: e, children: s } = t, n = W.value;
674
719
  if (e.endsWith("/*")) {
675
- const l = e.slice(0, -1);
676
- if (!n.startsWith(l) && n !== l.slice(0, -1))
720
+ const r = e.slice(0, -1);
721
+ if (!n.startsWith(r) && n !== r.slice(0, -1))
677
722
  return null;
678
723
  } else if (n !== e)
679
724
  return null;
680
- return /* @__PURE__ */ r(se, { children: s });
681
- }, at = "_section_4nogy_1", ot = {
682
- section: at
683
- }, Jt = (t) => {
684
- const { title: e, level: s = 2, children: n, class: l } = t, a = $(), o = `h${s}`;
685
- return /* @__PURE__ */ m("section", { class: v(ot.section, l), "aria-labelledby": a, children: [
686
- /* @__PURE__ */ r(o, { id: a, children: e }),
725
+ return /* @__PURE__ */ l(ae, { children: s });
726
+ }, ft = "_section_4nogy_1", gt = {
727
+ section: ft
728
+ }, ln = (t) => {
729
+ const { title: e, level: s = 2, children: n, class: r } = t, o = j(), i = `h${s}`;
730
+ return /* @__PURE__ */ g("section", { class: m(gt.section, r), "aria-labelledby": o, children: [
731
+ /* @__PURE__ */ l(i, { id: o, children: e }),
687
732
  n
688
733
  ] });
689
- }, ct = "_select_1cxnx_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", it = {
690
- select: ct
691
- }, dt = (t) => "options" in t, Qt = (t) => {
734
+ }, mt = "_select_1cxnx_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", bt = {
735
+ select: mt
736
+ }, vt = (t) => "options" in t, on = (t) => {
692
737
  const {
693
738
  label: e,
694
739
  name: s,
695
740
  value: n,
696
- placeholder: l,
697
- options: a,
698
- required: o,
699
- disabled: c,
700
- error: i,
701
- onChange: h,
702
- class: d
703
- } = t, f = $(), _ = `${f}-error`;
704
- return /* @__PURE__ */ r(
705
- S,
741
+ placeholder: r,
742
+ options: o,
743
+ required: i,
744
+ disabled: a,
745
+ error: c,
746
+ onChange: d,
747
+ class: h
748
+ } = t, u = j(), _ = `${u}-error`;
749
+ return /* @__PURE__ */ l(
750
+ M,
706
751
  {
707
752
  label: e,
708
- for: f,
709
- required: o,
710
- error: i,
753
+ for: u,
754
+ required: i,
755
+ error: c,
711
756
  errorId: _,
712
- class: d,
713
- children: /* @__PURE__ */ m(
757
+ class: h,
758
+ children: /* @__PURE__ */ g(
714
759
  "select",
715
760
  {
716
- id: f,
717
- class: it.select,
761
+ id: u,
762
+ class: bt.select,
718
763
  name: s,
719
764
  value: n,
720
- required: o,
721
- disabled: c,
722
- "aria-invalid": !!i || void 0,
723
- "aria-describedby": N(i && _),
724
- onChange: h && ((u) => h(u.target.value)),
765
+ required: i,
766
+ disabled: a,
767
+ "aria-invalid": !!c || void 0,
768
+ "aria-describedby": E(c && _),
769
+ onChange: d && ((p) => d(p.target.value)),
725
770
  children: [
726
- l && /* @__PURE__ */ r("option", { value: "", disabled: !0, children: l }),
727
- a.map(
728
- (u) => dt(u) ? /* @__PURE__ */ r("optgroup", { label: u.label, children: u.options.map((b) => /* @__PURE__ */ r("option", { value: b.value, children: b.label }, b.value)) }, u.label) : /* @__PURE__ */ r("option", { value: u.value, children: u.label }, u.value)
771
+ r && /* @__PURE__ */ l("option", { value: "", disabled: !0, children: r }),
772
+ o.map(
773
+ (p) => vt(p) ? /* @__PURE__ */ l("optgroup", { label: p.label, children: p.options.map((b) => /* @__PURE__ */ l("option", { value: b.value, children: b.label }, b.value)) }, p.label) : /* @__PURE__ */ l("option", { value: p.value, children: p.label }, p.value)
729
774
  )
730
775
  ]
731
776
  }
732
777
  )
733
778
  }
734
779
  );
735
- }, ut = "_skip_xbsul_1 _focus-ring_4u8pk_3", _t = {
736
- skip: ut
737
- }, Xt = (t) => {
780
+ }, yt = "_skip_xbsul_1 _focus-ring_4u8pk_3", kt = {
781
+ skip: yt
782
+ }, an = (t) => {
738
783
  const { target: e = "#main", label: s = "Skip to main content", class: n } = t;
739
- return /* @__PURE__ */ r("a", { href: e, class: v(_t.skip, n), children: s });
740
- }, pt = "_table_185y9_1", ht = "_caption_185y9_6", ft = "_captionHidden_185y9_12 _visually-hidden_4u8pk_42", mt = "_headerCell_185y9_16", bt = "_cell_185y9_17", vt = "_head_185y9_16", kt = "_row_185y9_41", gt = "_striped_185y9_45", yt = "_dense_185y9_53", x = {
741
- table: pt,
742
- caption: ht,
743
- captionHidden: ft,
744
- headerCell: mt,
745
- cell: bt,
746
- head: vt,
747
- row: kt,
748
- striped: gt,
749
- dense: yt
750
- }, Yt = (t) => {
784
+ return /* @__PURE__ */ l("a", { href: e, class: m(kt.skip, n), children: s });
785
+ }, wt = "_table_185y9_1", xt = "_caption_185y9_6", $t = "_captionHidden_185y9_12 _visually-hidden_4u8pk_42", Ct = "_headerCell_185y9_16", jt = "_cell_185y9_17", Lt = "_head_185y9_16", It = "_row_185y9_41", Nt = "_striped_185y9_45", Et = "_dense_185y9_53", C = {
786
+ table: wt,
787
+ caption: xt,
788
+ captionHidden: $t,
789
+ headerCell: Ct,
790
+ cell: jt,
791
+ head: Lt,
792
+ row: It,
793
+ striped: Nt,
794
+ dense: Et
795
+ }, cn = (t) => {
751
796
  const {
752
797
  caption: e,
753
798
  headers: s,
754
799
  data: n,
755
- rowHeader: l,
756
- striped: a,
757
- dense: o,
758
- captionHidden: c,
759
- class: i
800
+ rowHeader: r,
801
+ striped: o,
802
+ dense: i,
803
+ captionHidden: a,
804
+ class: c
760
805
  } = t;
761
- return /* @__PURE__ */ m("table", { class: v(x.table, a && x.striped, o && x.dense, i), children: [
762
- /* @__PURE__ */ r("caption", { class: v(x.caption, c && x.captionHidden), children: e }),
763
- /* @__PURE__ */ r("thead", { class: x.head, children: /* @__PURE__ */ r("tr", { children: s.map((h, d) => /* @__PURE__ */ r("th", { class: x.headerCell, scope: "col", children: h }, `${h}-${d}`)) }) }),
764
- /* @__PURE__ */ r("tbody", { children: n.map((h, d) => /* @__PURE__ */ r("tr", { class: x.row, children: h.map(
765
- (f, _) => l && _ === 0 ? /* @__PURE__ */ r("th", { class: x.headerCell, scope: "row", children: f }, `${s[_]}-${d}-${_}`) : /* @__PURE__ */ r("td", { class: x.cell, children: f }, `${s[_]}-${d}-${_}`)
766
- ) }, d)) })
806
+ return /* @__PURE__ */ g("table", { class: m(C.table, o && C.striped, i && C.dense, c), children: [
807
+ /* @__PURE__ */ l("caption", { class: m(C.caption, a && C.captionHidden), children: e }),
808
+ /* @__PURE__ */ l("thead", { class: C.head, children: /* @__PURE__ */ l("tr", { children: s.map((d, h) => /* @__PURE__ */ l("th", { class: C.headerCell, scope: "col", children: d }, `${d}-${h}`)) }) }),
809
+ /* @__PURE__ */ l("tbody", { children: n.map((d, h) => /* @__PURE__ */ l("tr", { class: C.row, children: d.map(
810
+ (u, _) => r && _ === 0 ? /* @__PURE__ */ l("th", { class: C.headerCell, scope: "row", children: u }, `${s[_]}-${h}-${_}`) : /* @__PURE__ */ l("td", { class: C.cell, children: u }, `${s[_]}-${h}-${_}`)
811
+ ) }, h)) })
767
812
  ] });
768
- }, wt = "_hidden_19nib_1 _visually-hidden_4u8pk_42", xt = {
769
- hidden: wt
770
- }, $t = (t) => {
813
+ }, Dt = "_hidden_19nib_1 _visually-hidden_4u8pk_42", Pt = {
814
+ hidden: Dt
815
+ }, St = (t) => {
771
816
  const { children: e } = t;
772
- return /* @__PURE__ */ r("span", { class: xt.hidden, children: e });
773
- }, Ct = "_wrapper_1kyv1_1", It = "_textarea_1kyv1_6 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Lt = "_counter_1kyv1_11", M = {
774
- wrapper: Ct,
775
- textarea: It,
776
- counter: Lt
777
- }, X = [75, 90, 100], Nt = 10;
778
- function jt(t) {
779
- for (let e = X.length - 1; e >= 0; e--) {
780
- const s = X[e];
817
+ return /* @__PURE__ */ l("span", { class: Pt.hidden, children: e });
818
+ }, Bt = "_wrapper_1kyv1_1", Ht = "_textarea_1kyv1_6 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", At = "_counter_1kyv1_11", U = {
819
+ wrapper: Bt,
820
+ textarea: Ht,
821
+ counter: At
822
+ }, ne = [75, 90, 100], qt = 10;
823
+ function Mt(t) {
824
+ for (let e = ne.length - 1; e >= 0; e--) {
825
+ const s = ne[e];
781
826
  if (s !== void 0 && t >= s)
782
827
  return s;
783
828
  }
784
829
  return 0;
785
830
  }
786
- const en = (t) => {
831
+ const dn = (t) => {
787
832
  const {
788
833
  label: e,
789
834
  name: s,
790
835
  maxChars: n,
791
- value: l,
792
- placeholder: a,
793
- required: o,
794
- disabled: c,
795
- error: i,
796
- onInput: h,
797
- class: d
798
- } = t, f = $(), _ = `${f}-error`, u = `${f}-counter`, b = D(l?.length ?? 0), g = D(""), C = D(0), I = D(!1);
799
- return /* @__PURE__ */ r(
800
- S,
836
+ value: r,
837
+ placeholder: o,
838
+ required: i,
839
+ disabled: a,
840
+ error: c,
841
+ onInput: d,
842
+ class: h
843
+ } = t, u = j(), _ = `${u}-error`, p = `${u}-counter`, b = q(r?.length ?? 0), v = q(""), k = q(0), w = q(!1);
844
+ return /* @__PURE__ */ l(
845
+ M,
801
846
  {
802
847
  label: e,
803
- for: f,
804
- required: o,
805
- error: i,
848
+ for: u,
849
+ required: i,
850
+ error: c,
806
851
  errorId: _,
807
- class: d,
808
- children: /* @__PURE__ */ m("div", { class: M.wrapper, children: [
809
- /* @__PURE__ */ r(
852
+ class: h,
853
+ children: /* @__PURE__ */ g("div", { class: U.wrapper, children: [
854
+ /* @__PURE__ */ l(
810
855
  "textarea",
811
856
  {
812
- id: f,
813
- class: M.textarea,
857
+ id: u,
858
+ class: U.textarea,
814
859
  name: s,
815
860
  maxLength: n,
816
- placeholder: a,
817
- required: o,
818
- disabled: c,
819
- "aria-invalid": !!i || void 0,
820
- "aria-describedby": N(i && _, u),
821
- onInput: (q) => {
822
- const p = q.target.value;
823
- b.value = p.length;
824
- const k = n - p.length, L = p.length / n * 100, j = jt(L), w = !I.value && k <= Nt && k > 0;
825
- (j > C.value || w) && (g.value = `${k} character${k === 1 ? "" : "s"} remaining`, C.value = j, w && (I.value = !0)), h?.(p);
861
+ placeholder: o,
862
+ required: i,
863
+ disabled: a,
864
+ "aria-invalid": !!c || void 0,
865
+ "aria-describedby": E(c && _, p),
866
+ onInput: (I) => {
867
+ const x = I.target.value;
868
+ b.value = x.length;
869
+ const L = n - x.length, D = x.length / n * 100, P = Mt(D), f = !w.value && L <= qt && L > 0;
870
+ (P > k.value || f) && (v.value = `${L} character${L === 1 ? "" : "s"} remaining`, k.value = P, f && (w.value = !0)), d?.(x);
826
871
  },
827
- children: l
872
+ children: r
828
873
  }
829
874
  ),
830
- /* @__PURE__ */ m("span", { id: u, class: M.counter, children: [
875
+ /* @__PURE__ */ g("span", { id: p, class: U.counter, children: [
831
876
  b,
832
877
  " / ",
833
878
  n
834
879
  ] }),
835
- /* @__PURE__ */ r($t, { children: /* @__PURE__ */ r("span", { "aria-live": "polite", children: g }) })
880
+ /* @__PURE__ */ l(St, { children: /* @__PURE__ */ l("span", { "aria-live": "polite", children: v }) })
836
881
  ] })
837
882
  }
838
883
  );
839
- }, Et = "_theme_1x47p_11", Dt = {
840
- theme: Et
841
- }, tn = {
884
+ }, Tt = "_theme_1x47p_11", Rt = {
885
+ theme: Tt
886
+ }, un = {
842
887
  blue: "aui-blue",
843
888
  purple: "aui-purple",
844
889
  teal: "aui-teal",
845
890
  red: "aui-red",
846
891
  orange: "aui-orange",
847
892
  yellow: "aui-yellow"
848
- }, nn = (t) => {
893
+ }, _n = (t) => {
849
894
  const { children: e, class: s } = t;
850
- return /* @__PURE__ */ r("div", { class: v(Dt.theme, s), children: e });
851
- }, St = U(document.title);
852
- le(() => {
853
- document.title = St.value;
895
+ return /* @__PURE__ */ l("div", { class: m(Rt.theme, s), children: e });
896
+ }, zt = V(document.title);
897
+ de(() => {
898
+ document.title = zt.value;
854
899
  });
855
900
  export {
856
- W as Button,
857
- Pt as Card,
858
- Tt as Checkbox,
859
- Rt as Dialog,
860
- zt as DownloadLink,
861
- Ot as Form,
862
- Ft as Input,
863
- Mt as Link,
864
- Kt as Modal,
865
- Ut as Nav,
866
- Gt as NumberInput,
867
- tn as Palette,
868
- Wt as PasswordInput,
869
- Zt as RadioGroup,
870
- Vt as Route,
871
- Jt as Section,
872
- Qt as Select,
873
- Xt as SkipLink,
874
- Yt as Table,
875
- en as Textarea,
876
- nn as Theme,
877
- $t as VisuallyHidden,
878
- v as cx,
879
- ee as hash,
880
- G as location,
881
- Pe as navigate,
882
- St as title
901
+ Z as Button,
902
+ Ut as Card,
903
+ Kt as Checkbox,
904
+ Vt as Dialog,
905
+ Wt as DownloadLink,
906
+ Gt as Form,
907
+ Zt as Input,
908
+ Jt as Link,
909
+ Qt as Modal,
910
+ en as Nav,
911
+ tn as NumberInput,
912
+ un as Palette,
913
+ nn as PasswordInput,
914
+ sn as RadioGroup,
915
+ rn as Route,
916
+ ln as Section,
917
+ on as Select,
918
+ an as SkipLink,
919
+ cn as Table,
920
+ dn as Textarea,
921
+ _n as Theme,
922
+ St as VisuallyHidden,
923
+ m as cx,
924
+ re as hash,
925
+ W as location,
926
+ Ue as navigate,
927
+ zt as title
883
928
  };