@webority/ui-react 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/types/components/AppAsyncBlock.d.ts +32 -0
  2. package/dist/types/components/AppAutocomplete.d.ts +12 -3
  3. package/dist/types/components/AppCheckbox.d.ts +2 -0
  4. package/dist/types/components/AppChip.d.ts +1 -1
  5. package/dist/types/components/AppConfirmDialog.d.ts +11 -1
  6. package/dist/types/components/AppDataTable.d.ts +2 -2
  7. package/dist/types/components/AppDropdown.d.ts +2 -1
  8. package/dist/types/components/AppEmptyState.d.ts +1 -1
  9. package/dist/types/components/AppFileAttachment.d.ts +19 -11
  10. package/dist/types/components/AppFilePicker.d.ts +23 -8
  11. package/dist/types/components/AppInfoTip.d.ts +2 -1
  12. package/dist/types/components/AppKpiTile.d.ts +4 -1
  13. package/dist/types/components/AppLogoPicker.d.ts +19 -22
  14. package/dist/types/components/AppModal.d.ts +20 -13
  15. package/dist/types/components/AppRadio.d.ts +2 -0
  16. package/dist/types/components/AppScrollbar.d.ts +22 -0
  17. package/dist/types/components/AppSegmented.d.ts +5 -1
  18. package/dist/types/components/AppSelect.d.ts +4 -1
  19. package/dist/types/components/AppShell.d.ts +43 -10
  20. package/dist/types/components/AppSidebarMenu.d.ts +2 -1
  21. package/dist/types/components/AppSpinner.d.ts +15 -3
  22. package/dist/types/components/AppSplash.d.ts +30 -6
  23. package/dist/types/components/AppSwitch.d.ts +2 -0
  24. package/dist/types/components/AppTablePagination.d.ts +5 -1
  25. package/dist/types/components/AppTabs.d.ts +6 -1
  26. package/dist/types/components/AppToastContainer.d.ts +13 -0
  27. package/dist/types/components/Icon.d.ts +15 -1
  28. package/dist/types/components/toastStore.d.ts +9 -0
  29. package/dist/types/index.d.ts +4 -1
  30. package/dist/types/lib/pageWindow.d.ts +10 -0
  31. package/dist/ui-react.js +1605 -1015
  32. package/package.json +4 -5
package/dist/ui-react.js CHANGED
@@ -1,34 +1,24 @@
1
1
  import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
2
  import { forwardRef as r, useCallback as i, useEffect as a, useId as o, useLayoutEffect as s, useMemo as c, useRef as l, useState as u } from "react";
3
- import d from "react-bootstrap/Alert";
4
- import f from "react-bootstrap/Badge";
5
- import p from "react-bootstrap/Button";
6
- import m from "react-bootstrap/Card";
7
- import h from "react-bootstrap/Form";
8
- import { createPortal as g } from "react-dom";
9
- import _ from "react-bootstrap/Modal";
10
- import v from "react-bootstrap/Dropdown";
11
- import { toast as y } from "react-toastify";
12
- import b from "react-bootstrap/Offcanvas";
13
- import x from "react-bootstrap/Nav";
3
+ import { Alert as d, Badge as f, Button as p, Card as m, Dropdown as h, Form as g, Modal as _, Nav as v, Offcanvas as y, OverlayTrigger as b, Popover as x, Toast as S, ToastContainer as C } from "react-bootstrap";
14
4
  //#region src/components/warnUnknownProps.js
15
- var S = /* @__PURE__ */ new Set(/* @__PURE__ */ "id.title.role.style.className.class.tabIndex.lang.dir.hidden.slot.part.draggable.spellCheck.translate.inert.popover.name.type.value.defaultValue.checked.defaultChecked.placeholder.disabled.readOnly.required.autoFocus.autoComplete.form.formAction.formMethod.formNoValidate.formTarget.min.max.step.minLength.maxLength.pattern.multiple.accept.capture.rows.cols.wrap.list.htmlFor.inputMode.enterKeyHint.href.target.rel.download.ping.referrerPolicy.src.srcSet.alt.width.height.loading.decoding.sizes.crossOrigin.useMap.colSpan.rowSpan.headers.scope.span.key.ref.children.dangerouslySetInnerHTML.suppressHydrationWarning".split(".")), C = () => {
5
+ var w = /* @__PURE__ */ new Set(/* @__PURE__ */ "id.title.role.style.className.class.tabIndex.lang.dir.hidden.slot.part.draggable.spellCheck.translate.inert.popover.name.type.value.defaultValue.checked.defaultChecked.placeholder.disabled.readOnly.required.autoFocus.autoComplete.form.formAction.formMethod.formNoValidate.formTarget.min.max.step.minLength.maxLength.pattern.multiple.accept.capture.rows.cols.wrap.list.htmlFor.inputMode.enterKeyHint.href.target.rel.download.ping.referrerPolicy.src.srcSet.alt.width.height.loading.decoding.sizes.crossOrigin.useMap.colSpan.rowSpan.headers.scope.span.key.ref.children.dangerouslySetInnerHTML.suppressHydrationWarning".split(".")), T = () => {
16
6
  try {
17
7
  return process.env.NODE_ENV !== "production";
18
8
  } catch {
19
9
  return !0;
20
10
  }
21
- }, w = (e) => e.startsWith("data-") || e.startsWith("aria-") || /^on[A-Z]/.test(e), T = /* @__PURE__ */ new Set();
22
- function E(e, t) {
23
- if (!(!C() || !t) && !("as" in t)) for (let n of Object.keys(t)) {
24
- if (w(n) || S.has(n)) continue;
11
+ }, E = (e) => e.startsWith("data-") || e.startsWith("aria-") || /^on[A-Z]/.test(e), D = /* @__PURE__ */ new Set();
12
+ function O(e, t) {
13
+ if (!(!T() || !t) && !("as" in t)) for (let n of Object.keys(t)) {
14
+ if (E(n) || w.has(n)) continue;
25
15
  let t = `${e}.${n}`;
26
- T.has(t) || (T.add(t), console.warn(`[@webority/ui-react] <${e}> received an unknown prop "${n}". It is not part of the component's API and is not a valid HTML attribute, so it will either be dropped or land on the DOM — check the prop name against the component catalogue at https://ui.webority.dev.`));
16
+ D.has(t) || (D.add(t), console.warn(`[@webority/ui-react] <${e}> received an unknown prop "${n}". It is not part of the component's API and is not a valid HTML attribute, so it will either be dropped or land on the DOM — check the prop name against the component catalogue at https://ui.webority.dev.`));
27
17
  }
28
18
  }
29
19
  //#endregion
30
20
  //#region src/components/Icon.jsx
31
- var D = {
21
+ var k = {
32
22
  activity: "activity",
33
23
  "alert-circle": "exclamation-circle",
34
24
  "alert-triangle": "exclamation-triangle",
@@ -36,15 +26,20 @@ var D = {
36
26
  "arrow-right": "arrow-right",
37
27
  "rotate-ccw": "arrow-counterclockwise",
38
28
  "arrow-up-right": "arrow-up-right",
29
+ "arrow-down-up": "arrow-down-up",
39
30
  "badge-check": "patch-check",
40
31
  bell: "bell",
32
+ "box-seam": "box-seam",
41
33
  briefcase: "briefcase",
34
+ bug: "bug",
42
35
  building: "building",
43
36
  "building-2": "buildings",
37
+ bullseye: "bullseye",
44
38
  calculator: "calculator",
45
39
  calendar: "calendar",
46
40
  "calendar-check": "calendar-check",
47
41
  "calendar-dots": "calendar3",
42
+ "cash-stack": "cash-stack",
48
43
  "chart-column": "bar-chart",
49
44
  check: "check-lg",
50
45
  "check-check": "check-all",
@@ -55,12 +50,17 @@ var D = {
55
50
  circle: "circle-fill",
56
51
  "circle-help": "question-circle",
57
52
  "clipboard-check": "clipboard-check",
53
+ clock: "clock",
54
+ cloud: "cloud",
58
55
  coins: "coin",
59
56
  contact: "person-vcard",
60
57
  copy: "copy",
61
58
  "credit-card": "credit-card",
59
+ "diagram-3": "diagram-3",
60
+ display: "display",
62
61
  download: "download",
63
62
  edit: "pencil-square",
63
+ "emoji-smile": "emoji-smile",
64
64
  "external-link": "box-arrow-up-right",
65
65
  eye: "eye",
66
66
  "eye-off": "eye-slash",
@@ -73,10 +73,13 @@ var D = {
73
73
  gauge: "speedometer2",
74
74
  gift: "gift",
75
75
  globe: "globe2",
76
+ globe2: "globe2",
77
+ grid: "grid",
76
78
  history: "clock-history",
77
79
  house: "house",
78
80
  image: "image",
79
81
  info: "info-circle",
82
+ key: "key",
80
83
  "layout-dashboard": "grid-1x2",
81
84
  "layout-grid": "grid-3x3-gap",
82
85
  lightbulb: "lightbulb",
@@ -102,6 +105,7 @@ var D = {
102
105
  "zoom-out": "zoom-out",
103
106
  "two-page": "layout-split",
104
107
  "plus-circle": "plus-circle",
108
+ receipt: "receipt",
105
109
  "refresh-cw": "arrow-clockwise",
106
110
  repeat: "arrow-repeat",
107
111
  search: "search",
@@ -111,9 +115,13 @@ var D = {
111
115
  "share-2": "share",
112
116
  shield: "shield",
113
117
  "shield-check": "shield-check",
118
+ "shield-lock": "shield-lock",
114
119
  "shield-plus": "shield-plus",
120
+ shop: "shop",
115
121
  sparkles: "stars",
122
+ stars: "stars",
116
123
  sun: "sun",
124
+ telephone: "telephone",
117
125
  "trash-2": "trash",
118
126
  "trending-up": "graph-up-arrow",
119
127
  triangle: "triangle",
@@ -123,12 +131,24 @@ var D = {
123
131
  "user-minus": "person-dash",
124
132
  "user-plus": "person-plus",
125
133
  users: "people",
134
+ wallet2: "wallet2",
126
135
  "wand-sparkles": "magic",
127
136
  x: "x-lg",
128
137
  zap: "lightning-charge"
129
- }, O = [...Object.keys(D), "hard-hat"].sort();
130
- function k({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
131
- if (E("Icon", s), e === "hard-hat") return /* @__PURE__ */ t("svg", {
138
+ }, A = [...Object.keys(k), "hard-hat"].sort(), j = /* @__PURE__ */ new Map();
139
+ function M(e) {
140
+ for (let [t, n] of Object.entries(e)) j.set(t, n);
141
+ }
142
+ function N({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
143
+ O("Icon", s);
144
+ let c = j.get(e);
145
+ if (c) return c({
146
+ size: r,
147
+ color: a,
148
+ className: i,
149
+ style: o
150
+ });
151
+ if (e === "hard-hat") return /* @__PURE__ */ t("svg", {
132
152
  width: r,
133
153
  height: r,
134
154
  viewBox: "0 0 24 24",
@@ -150,9 +170,9 @@ function k({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
150
170
  }), /* @__PURE__ */ t("path", { d: "M3.2 22.5C3.2 17.4 7.5 14.9 11 14.7L12 17.4l1-2.7C16.5 14.9 20.8 17.4 20.8 22.5z" })]
151
171
  })
152
172
  });
153
- let c = D[e] || e;
154
- return c ? /* @__PURE__ */ t("i", {
155
- className: `bi bi-${c}${i ? ` ${i}` : ""}`,
173
+ let l = k[e] || e;
174
+ return l ? /* @__PURE__ */ t("i", {
175
+ className: `bi bi-${l}${i ? ` ${i}` : ""}`,
156
176
  "data-icon": e,
157
177
  "aria-hidden": "true",
158
178
  style: {
@@ -165,8 +185,8 @@ function k({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
165
185
  }
166
186
  //#endregion
167
187
  //#region src/components/ActionIcon.jsx
168
- function A({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20, onClick: o, className: s = "", as: c, href: l, ...u }) {
169
- E("ActionIcon", u);
188
+ function ee({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20, onClick: o, className: s = "", as: c, href: l, ...u }) {
189
+ O("ActionIcon", u);
170
190
  let d = [
171
191
  "u-action",
172
192
  r ? "danger" : "",
@@ -183,7 +203,7 @@ function A({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
183
203
  role: !p && i ? "link" : void 0,
184
204
  onClick: o,
185
205
  ...u,
186
- children: /* @__PURE__ */ t(k, {
206
+ children: /* @__PURE__ */ t(N, {
187
207
  name: e,
188
208
  size: a
189
209
  })
@@ -191,8 +211,8 @@ function A({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
191
211
  }
192
212
  //#endregion
193
213
  //#region src/components/AppAccordion.jsx
194
- function j({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s }) {
195
- E("AppAccordion", s);
214
+ function P({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s }) {
215
+ O("AppAccordion", s);
196
216
  let c = o(), l = i || c, [d, f] = u(() => {
197
217
  let t = e.filter((e) => e.open).map((e, t) => e.key ?? String(t));
198
218
  return new Set(r ? t : t.slice(0, 1));
@@ -217,7 +237,7 @@ function j({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s })
217
237
  onClick: () => m(i),
218
238
  children: [e.title, /* @__PURE__ */ t("span", {
219
239
  className: "faq-q-icon",
220
- children: /* @__PURE__ */ t(k, {
240
+ children: /* @__PURE__ */ t(N, {
221
241
  name: "chevron-down",
222
242
  size: 18
223
243
  })
@@ -237,8 +257,8 @@ function j({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s })
237
257
  }
238
258
  //#endregion
239
259
  //#region src/components/AppAlert.jsx
240
- function M({ variant: e = "info", children: n, className: r = "", onClose: i, dismissible: a, role: o = "alert", ...s }) {
241
- return E("AppAlert", s), /* @__PURE__ */ t(d, {
260
+ function te({ variant: e = "info", children: n, className: r = "", onClose: i, dismissible: a, role: o = "alert", ...s }) {
261
+ return O("AppAlert", s), /* @__PURE__ */ t(d, {
242
262
  variant: e,
243
263
  className: r || void 0,
244
264
  onClose: i,
@@ -250,16 +270,148 @@ function M({ variant: e = "info", children: n, className: r = "", onClose: i, di
250
270
  });
251
271
  }
252
272
  //#endregion
273
+ //#region src/components/AppButton.jsx
274
+ var F = {
275
+ primary: "primary",
276
+ secondary: "secondary",
277
+ outline: "outline-primary",
278
+ ghost: "ghost",
279
+ danger: "danger",
280
+ "outline-danger": "outline-danger",
281
+ light: "light",
282
+ warning: "warning"
283
+ };
284
+ function I(e, n) {
285
+ if (!e) return null;
286
+ let r = n === "left" ? "me-2" : "ms-2";
287
+ return typeof e == "string" ? /* @__PURE__ */ t(N, {
288
+ name: e,
289
+ size: 16,
290
+ className: r
291
+ }) : /* @__PURE__ */ t("span", {
292
+ className: `d-inline-flex ${r}`,
293
+ children: e
294
+ });
295
+ }
296
+ function L({ children: e, variant: r = "primary", size: i = "md", type: a = "button", loading: o = !1, disabled: s = !1, block: c = !1, leftIcon: l = null, rightIcon: u = null, className: d = "", ...f }) {
297
+ O("AppButton", f);
298
+ let m = [c ? "w-100" : "", d].filter(Boolean).join(" ");
299
+ return /* @__PURE__ */ n(p, {
300
+ type: (f.as === void 0 || f.as === "button") && f.href === void 0 ? a : void 0,
301
+ variant: F[r] ?? "primary",
302
+ size: i === "md" ? void 0 : i,
303
+ disabled: s || o,
304
+ className: m || void 0,
305
+ ...f,
306
+ children: [
307
+ o && /* @__PURE__ */ t("span", {
308
+ className: "spinner-border spinner-border-sm me-2",
309
+ "aria-hidden": "true"
310
+ }),
311
+ !o && I(l, "left"),
312
+ e,
313
+ !o && I(u, "right")
314
+ ]
315
+ });
316
+ }
317
+ //#endregion
318
+ //#region src/components/AppEmptyState.jsx
319
+ function R({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
320
+ return O("AppEmptyState", u), /* @__PURE__ */ n("div", {
321
+ className: [
322
+ "empty-state",
323
+ i === "sm" ? "empty-state-sm" : "",
324
+ c
325
+ ].filter(Boolean).join(" "),
326
+ style: l,
327
+ children: [
328
+ e ? /* @__PURE__ */ t("div", {
329
+ className: "empty-state-icon",
330
+ children: /* @__PURE__ */ t(N, {
331
+ name: e,
332
+ size: r
333
+ })
334
+ }) : null,
335
+ a != null && /* @__PURE__ */ t("div", {
336
+ className: "empty-state-title",
337
+ children: a
338
+ }),
339
+ o != null && /* @__PURE__ */ t("div", {
340
+ className: "empty-state-message",
341
+ children: o
342
+ }),
343
+ s && /* @__PURE__ */ t("div", {
344
+ className: "empty-state-action",
345
+ children: s
346
+ })
347
+ ]
348
+ });
349
+ }
350
+ //#endregion
351
+ //#region src/components/AppSpinner.jsx
352
+ function ne({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
353
+ O("AppSpinner", i);
354
+ let a = Number(e), o = Number.isFinite(a) && a > 0;
355
+ return /* @__PURE__ */ t("span", {
356
+ className: `spinner-border${!o && e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
357
+ role: "status",
358
+ "aria-label": n,
359
+ style: o ? {
360
+ width: `${a}px`,
361
+ height: `${a}px`,
362
+ borderWidth: `${Math.max(2, Math.round(a / 8))}px`
363
+ } : void 0
364
+ });
365
+ }
366
+ //#endregion
367
+ //#region src/components/AppAsyncBlock.jsx
368
+ function re({ loading: e = !1, error: n = null, empty: r = !1, children: i, onRetry: a, skeleton: o, className: s = "", ...c }) {
369
+ O("AppAsyncBlock", c);
370
+ let l = `async-block${s ? ` ${s}` : ""}`;
371
+ return e ? /* @__PURE__ */ t("div", {
372
+ className: l,
373
+ "data-state": "loading",
374
+ children: o ?? /* @__PURE__ */ t("div", {
375
+ className: "d-flex align-items-center justify-content-center py-5",
376
+ children: /* @__PURE__ */ t(ne, { label: "Loading" })
377
+ })
378
+ }) : n ? /* @__PURE__ */ t("div", {
379
+ className: l,
380
+ "data-state": "error",
381
+ children: /* @__PURE__ */ t(R, {
382
+ icon: "alert-circle",
383
+ title: "Something went wrong",
384
+ text: n,
385
+ action: a ? /* @__PURE__ */ t(L, {
386
+ variant: "secondary",
387
+ onClick: a,
388
+ children: "Retry"
389
+ }) : null
390
+ })
391
+ }) : r ? /* @__PURE__ */ t("div", {
392
+ className: l,
393
+ "data-state": "empty",
394
+ children: /* @__PURE__ */ t(R, {
395
+ icon: "inbox",
396
+ title: "Nothing to show yet"
397
+ })
398
+ }) : /* @__PURE__ */ t("div", {
399
+ className: l,
400
+ "data-state": "content",
401
+ children: i
402
+ });
403
+ }
404
+ //#endregion
253
405
  //#region ../elements/dist/ui-elements.js
254
- var N = {
406
+ var ie = {
255
407
  success: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-success-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-success-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_success_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-success-active)\"/>\n<rect x=\"108.758\" y=\"67.5986\" width=\"75.5044\" height=\"49.155\" transform=\"rotate(45 108.758 67.5986)\" fill=\"var(--wui-success)\"/>\n<path d=\"M87.895 96.1046C89.7154 97.9249 89.7154 101.046 87.895 102.866L84.1243 106.637C82.3039 108.457 79.1833 108.457 77.3629 106.637L60.8496 89.9934C59.0293 88.173 59.0293 85.0524 60.8496 83.232L64.6204 79.4613C66.4408 77.6409 69.5614 77.6409 71.3817 79.4613L87.895 96.1046Z\" fill=\"white\"/>\n<path d=\"M102.324 67.3672C104.144 65.5469 107.265 65.5469 109.085 67.3672L112.856 71.138C114.676 72.9583 114.676 76.079 112.856 77.8993L84.2499 106.375C82.4296 108.195 79.3089 108.195 77.4886 106.375L73.7178 102.604C71.8975 100.784 71.8975 97.6633 73.7178 95.8429L102.324 67.3672Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_success_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
256
408
  error: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_error_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<rect x=\"110.758\" y=\"62\" width=\"75.5044\" height=\"69.9535\" transform=\"rotate(45 110.758 62)\" fill=\"var(--wui-danger-active)\"/>\n<g clip-path=\"url(#wui_error_clip1)\">\n<path d=\"M95.9285 87.0037L112.943 69.9887C114.823 68.1087 114.823 65.0608 112.943 63.1838L110.675 60.9155C108.795 59.0349 105.747 59.0349 103.87 60.9155L86.8552 77.9298L69.8403 60.9119C67.9603 59.032 64.9124 59.032 63.0353 60.9119L60.7635 63.1802C58.8835 65.0608 58.8835 68.1087 60.7635 69.9858L77.7814 87.0037L60.767 104.018C58.8865 105.899 58.8865 108.947 60.767 110.824L63.0353 113.092C64.9153 114.972 67.9632 114.972 69.8403 113.092L86.8552 96.0769L103.87 113.092C105.75 114.972 108.798 114.972 110.675 113.092L112.943 110.824C114.823 108.943 114.823 105.895 112.943 104.018L95.9285 87.0037Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_error_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_error_clip1\"><rect width=\"55\" height=\"55\" fill=\"white\" transform=\"translate(59.3535 59.502)\"/></clipPath></defs>",
257
409
  warning: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-warning-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-warning-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_warning_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-warning)\"/>\n<path d=\"M93.7812 60.9731L156.173 123.365L113.082 166.456L60 113.5L97 109L93.7812 60.9731Z\" fill=\"var(--wui-warning-active)\"/>\n<path d=\"M116.145 101.611L96.0431 62.7255C94.8912 60.6967 93.0607 59.1479 90.8656 58.3543C88.6768 57.5543 86.2768 57.5607 84.0945 58.3671C83.0001 58.7767 81.9953 59.3655 81.125 60.1079C80.2545 60.8567 79.5122 61.7527 78.9425 62.7703L57.8933 101.554C56.1525 104.594 56.1717 108.331 57.9317 111.358C59.6981 114.392 62.9427 116.248 66.4435 116.242H107.563C111.051 116.248 114.283 114.398 116.049 111.39C116.952 109.854 117.4 108.133 117.4 106.418C117.4 104.76 116.984 103.102 116.145 101.611ZM87.0064 105.714C85.0672 105.714 83.4929 104.146 83.4929 102.207C83.4929 100.267 85.0672 98.6993 87.0064 98.6993C88.9392 98.6993 90.5136 100.267 90.5136 102.207C90.5136 104.146 88.9392 105.714 87.0064 105.714ZM90.9104 78.098L88.0432 95.3266C88.0049 95.8706 87.5504 96.2994 87.0064 96.2994C86.4561 96.2994 86.0016 95.8706 85.9633 95.3266L83.0961 78.098C83.0385 77.8101 83.0065 77.522 83.0065 77.2405C83.0065 76.3125 83.3137 75.4037 83.8833 74.6485C84.6321 73.6629 85.7713 73.0549 87.0064 72.9717C88.2352 73.0549 89.3744 73.6629 90.1232 74.6485C90.872 75.6341 91.16 76.8885 90.9104 78.098Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_warning_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
258
410
  info: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-info-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-info-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_info_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-info)\"/>\n<path d=\"M104.999 67.5L111.454 64L163.495 116.041L115.739 163.797L62.999 111L101.897 104.102L104.999 67.5Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M87 121C105.778 121 121 105.778 121 87C121 68.2223 105.778 53 87 53C68.2223 53 53 68.2223 53 87C53 105.778 68.2223 121 87 121Z\" fill=\"white\"/>\n<path d=\"M87 75.542C89.3472 75.542 91.25 73.6392 91.25 71.292C91.25 68.9448 89.3472 67.042 87 67.042C84.6528 67.042 82.75 68.9448 82.75 71.292C82.75 73.6392 84.6528 75.542 87 75.542Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M86.9992 106.992C86.0975 106.992 85.2327 106.634 84.5951 105.996C83.9574 105.359 83.5992 104.494 83.5992 103.592V86.592C82.6975 86.592 81.8327 86.2338 81.1951 85.5962C80.5574 84.9585 80.1992 84.0937 80.1992 83.192C80.1992 82.2903 80.5574 81.4255 81.1951 80.7878C81.8327 80.1502 82.6975 79.792 83.5992 79.792H86.9992C87.901 79.792 88.7658 80.1502 89.4034 80.7878C90.041 81.4255 90.3992 82.2903 90.3992 83.192V103.592C90.3992 104.494 90.041 105.359 89.4034 105.996C88.7658 106.634 87.901 106.992 86.9992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M90.3992 106.992H83.5992C82.6975 106.992 81.8327 106.634 81.1951 105.996C80.5574 105.358 80.1992 104.494 80.1992 103.592C80.1992 102.69 80.5574 101.825 81.1951 101.188C81.8327 100.55 82.6975 100.192 83.5992 100.192H90.3992C91.301 100.192 92.1658 100.55 92.8034 101.188C93.441 101.825 93.7992 102.69 93.7992 103.592C93.7992 104.494 93.441 105.358 92.8034 105.996C92.1658 106.634 91.301 106.992 90.3992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n</g>\n<defs><clipPath id=\"wui_info_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
259
411
  delete: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_delete_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<path d=\"M114.529 67.5672L163.249 116.287L116.354 163.183L67.6336 114.463L100.999 81.0975L64.999 77.5L58.999 69.5L114.529 67.5672Z\" fill=\"var(--wui-danger-active)\"/>\n<path d=\"M103.5 79L100.5 105.5L76 113L69.5 83.5L103.5 79Z\" fill=\"var(--wui-danger)\"/>\n<g clip-path=\"url(#wui_delete_clip1)\">\n<path d=\"M113.652 66.9993C108.895 66.5266 104.139 66.1721 99.3522 65.9061V65.8766L98.7022 62.0357C98.259 59.3175 97.609 55.2402 90.6954 55.2402H82.9545C76.0704 55.2402 75.4204 59.1402 74.9477 62.0061L74.3272 65.788C71.5795 65.9652 68.8318 66.1425 66.084 66.4084L60.0568 66.9993C58.8159 67.1175 57.9295 68.2107 58.0477 69.4221C58.1659 70.6334 59.2295 71.5198 60.4704 71.4016L66.4977 70.8107C81.9795 69.2743 97.5795 69.8652 113.239 71.4311C113.327 71.4311 113.386 71.4311 113.475 71.4311C114.598 71.4311 115.573 70.5743 115.691 69.4221C115.779 68.2107 114.893 67.1175 113.652 66.9993Z\" fill=\"white\"/>\n<path d=\"M108.216 75.5971C107.507 74.8585 106.532 74.4448 105.527 74.4448H68.1816C67.177 74.4448 66.1725 74.8585 65.4929 75.5971C64.8134 76.3357 64.4293 77.3403 64.4884 78.3744L66.3202 108.688C66.6452 113.179 67.0588 118.793 77.3702 118.793H96.3384C106.65 118.793 107.063 113.208 107.388 108.688L109.22 78.4039C109.279 77.3403 108.895 76.3357 108.216 75.5971ZM91.7588 103.99H81.9202C80.7088 103.99 79.7043 102.986 79.7043 101.774C79.7043 100.563 80.7088 99.5585 81.9202 99.5585H91.7588C92.9702 99.5585 93.9747 100.563 93.9747 101.774C93.9747 102.986 92.9702 103.99 91.7588 103.99ZM94.2406 92.1721H79.4679C78.2566 92.1721 77.252 91.1676 77.252 89.9562C77.252 88.7448 78.2566 87.7403 79.4679 87.7403H94.2406C95.452 87.7403 96.4566 88.7448 96.4566 89.9562C96.4566 91.1676 95.452 92.1721 94.2406 92.1721Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_delete_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_delete_clip1\"><rect width=\"65\" height=\"65\" fill=\"white\" transform=\"translate(54.3535 54.502)\"/></clipPath></defs>"
260
412
  };
261
- Object.keys(N);
262
- var ee = class extends HTMLElement {
413
+ Object.keys(ie);
414
+ var ae = class extends HTMLElement {
263
415
  static get observedAttributes() {
264
416
  return ["tone", "size"];
265
417
  }
@@ -270,43 +422,43 @@ var ee = class extends HTMLElement {
270
422
  this.isConnected && this.render();
271
423
  }
272
424
  render() {
273
- let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = N[e] || N.info;
425
+ let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = ie[e] || ie.info;
274
426
  this.innerHTML = `<svg width="${t}" height="${t}" viewBox="0 0 174 174" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${n}</svg>`;
275
427
  }
276
- }, P = 4;
277
- function F(e, t, n = {}) {
428
+ }, z = 4;
429
+ function B(e, t, n = {}) {
278
430
  if (!e || !t) return;
279
- let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + P && r.top > a;
280
- t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(P, r.top - i - P)}px` : `${r.bottom + P}px`, n.matchWidth && (t.style.width = `${r.width}px`);
281
- let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - P);
282
- t.style.left = `${Math.max(P, c)}px`;
431
+ let r = e.getBoundingClientRect(), i = t.offsetHeight, a = window.innerHeight - r.bottom, o = a < i + z && r.top > a;
432
+ t.classList.toggle("drop-up", o), t.style.position = "fixed", t.style.top = o ? `${Math.max(z, r.top - i - z)}px` : `${r.bottom + z}px`, n.matchWidth && (t.style.width = `${r.width}px`);
433
+ let s = t.offsetWidth, c = Math.min(r.left, window.innerWidth - s - z);
434
+ t.style.left = `${Math.max(z, c)}px`;
283
435
  }
284
- function I(e, t) {
285
- L(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
436
+ function V(e, t) {
437
+ H(e), e._reanchor = t, window.addEventListener("resize", e._reanchor), window.addEventListener("scroll", e._reanchor, !0);
286
438
  }
287
- function L(e) {
439
+ function H(e) {
288
440
  e?._reanchor && (window.removeEventListener("resize", e._reanchor), window.removeEventListener("scroll", e._reanchor, !0), e._reanchor = null);
289
441
  }
290
- var te = "data-wui-mirror";
291
- function R(e, t) {
292
- let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${te}]`);
442
+ var U = "data-wui-mirror";
443
+ function W(e, t) {
444
+ let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${U}]`);
293
445
  if (!n) {
294
446
  r?.remove();
295
447
  return;
296
448
  }
297
- r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(te, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
449
+ r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(U, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
298
450
  for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
299
451
  r.disabled = e.hasAttribute("disabled");
300
452
  }
301
- var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), ne = (e) => {
453
+ var oe = Symbol("wui.trustedHtml"), G = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), K = (e) => {
302
454
  if (!e) return "";
303
455
  let t = String(e).toLowerCase().replace(/[^a-z0-9-]/g, "");
304
456
  return t ? `<i class="bi bi-${t}" aria-hidden="true"></i>` : "";
305
- }, V = (e) => {
457
+ }, q = (e) => {
306
458
  if (e == null) return "";
307
- let t = e[z] ? String(e.label ?? "") : B(e.label), n = ne(e.icon);
459
+ let t = e[oe] ? String(e.label ?? "") : G(e.label), n = K(e.icon);
308
460
  return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
309
- }, re = class extends HTMLElement {
461
+ }, se = class extends HTMLElement {
310
462
  _accessibleName() {
311
463
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
312
464
  }
@@ -319,7 +471,8 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
319
471
  "debounce",
320
472
  "remote",
321
473
  "size",
322
- "aria-label"
474
+ "aria-label",
475
+ "allow-custom"
323
476
  ];
324
477
  }
325
478
  constructor() {
@@ -335,14 +488,14 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
335
488
  return this._value;
336
489
  }
337
490
  set value(e) {
338
- this._value = e == null ? "" : String(e), R(this, this._value);
491
+ this._value = e == null ? "" : String(e), W(this, this._value);
339
492
  let t = this._readOptions().find((e) => String(e.value) === this._value);
340
- this._label = t ? ae(t.label) : "", this._syncInput(), this._renderOptions("");
493
+ this._label = t ? le(t.label) : "", this._syncInput(), this._renderOptions("");
341
494
  }
342
495
  set options(e) {
343
496
  this._optionsProp = Array.isArray(e) ? e : [];
344
497
  let t = this._readOptions().find((e) => String(e.value) === this._value);
345
- t && (this._label = ae(t.label)), this._renderOptions(), this._syncInput();
498
+ t && (this._label = le(t.label)), this._renderOptions(), this._syncInput();
346
499
  }
347
500
  get options() {
348
501
  return this._readOptions();
@@ -356,6 +509,13 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
356
509
  get _remote() {
357
510
  return this.hasAttribute("remote");
358
511
  }
512
+ get _allowCustom() {
513
+ return this.hasAttribute("allow-custom");
514
+ }
515
+ _matchesKnownOption(e) {
516
+ let t = e.toLowerCase();
517
+ return this._readOptions().some((e) => le(e.label).toLowerCase() === t || String(e.value ?? "").toLowerCase() === t);
518
+ }
359
519
  get _minChars() {
360
520
  return Math.max(0, Number(this.getAttribute("min-chars")) || +!!this._remote);
361
521
  }
@@ -372,7 +532,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
372
532
  value: e.getAttribute("value") ?? e.textContent.trim(),
373
533
  label: e.innerHTML,
374
534
  icon: e.getAttribute("icon") || void 0,
375
- [z]: !0,
535
+ [oe]: !0,
376
536
  selected: e.hasAttribute("selected")
377
537
  })));
378
538
  }
@@ -384,8 +544,8 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
384
544
  let e = this.getAttribute("placeholder") || "Search…", t = this.getAttribute("size"), n = t === "sm" ? " search-select-sm" : t === "lg" ? " search-select-lg" : "";
385
545
  this.innerHTML = `
386
546
  <div class="search-select${n}">
387
- <div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${ie(this._accessibleName())}">
388
- <input class="search-select-input search-select-ac-input" placeholder="${ie(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
547
+ <div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${ce(this._accessibleName())}">
548
+ <input class="search-select-input search-select-ac-input" placeholder="${ce(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
389
549
  <span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
390
550
  <button type="button" class="search-select-clear" aria-label="Clear" hidden><i class="bi bi-x" aria-hidden="true"></i></button>
391
551
  </div>
@@ -394,7 +554,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
394
554
  <div class="search-select-empty" hidden>No matches</div>
395
555
  <div class="search-select-hint" hidden>Type to search…</div>
396
556
  </div>
397
- </div>`, this._rendered = !0, R(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
557
+ </div>`, this._rendered = !0, W(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
398
558
  }
399
559
  _refs() {
400
560
  return {
@@ -422,18 +582,27 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
422
582
  _renderOptions(e) {
423
583
  let t = this._refs();
424
584
  if (!t.optionsWrap) return;
425
- let n = (e ?? (t.input ? t.input.value : "")).trim().toLowerCase(), r = this._readOptions();
426
- !this._remote && n && (r = r.filter((e) => ae(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
585
+ let n = e ?? (t.input ? t.input.value : ""), r = n.trim().toLowerCase(), i = this._readOptions();
586
+ !this._remote && r && (i = i.filter((e) => le(e.label).toLowerCase().includes(r)));
587
+ let a = n.trim(), o = this._allowCustom && a && !this._matchesKnownOption(a) ? [...i, {
588
+ value: a,
589
+ custom: !0
590
+ }] : i;
591
+ t.optionsWrap.innerHTML = o.map((e) => {
592
+ if (e.custom) {
593
+ let t = `Add “${G(e.value)}”`;
594
+ return `<button type="button" role="option" class="search-select-option search-select-option-custom" data-value="${ce(e.value)}" data-custom="true" aria-selected="false">${t}</button>`;
595
+ }
427
596
  let t = String(e.value) === String(this._value);
428
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${ie(e.value)}" aria-selected="${t}">${V(e)}</button>`;
597
+ return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${ce(e.value)}" aria-selected="${t}">${q(e)}</button>`;
429
598
  }).join(""), this._active = -1;
430
- let i = n.length < this._minChars;
431
- t.hint && (t.hint.hidden = !(this._remote && i && !r.length)), t.empty && (t.empty.hidden = this._loading || r.length > 0 || this._remote && i);
599
+ let s = r.length < this._minChars;
600
+ t.hint && (t.hint.hidden = !(this._remote && s && !i.length)), t.empty && (t.empty.hidden = this._loading || o.length > 0 || this._remote && s);
432
601
  }
433
602
  _wire() {
434
603
  let e = this._refs();
435
604
  if (!e.control || !e.input) return;
436
- let t = () => F(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (e) => {
605
+ let t = () => B(e.control, e.menu, { matchWidth: !0 }), n = () => this._optionEls().filter((e) => !e.hidden), r = (e) => {
437
606
  let t = n();
438
607
  this._active = e;
439
608
  for (let e of this._optionEls()) e.classList.remove("is-active");
@@ -443,7 +612,16 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
443
612
  }, o = () => {
444
613
  e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), this._syncInput();
445
614
  }, s = (t) => {
446
- this._value = t.dataset.value, this._label = ae(t.innerHTML), R(this, this._value), e.input.value = this._label, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.input.focus();
615
+ let n = t.dataset.custom === "true";
616
+ this._value = t.dataset.value, this._label = n ? t.dataset.value : le(t.innerHTML), W(this, this._value), e.input.value = this._label, this.dispatchEvent(new CustomEvent("change", {
617
+ bubbles: !0,
618
+ detail: { isCustom: n }
619
+ })), o(), e.input.focus();
620
+ }, c = (t) => {
621
+ this._value = t, this._label = t, W(this, t), e.input.value = t, this.dispatchEvent(new CustomEvent("change", {
622
+ bubbles: !0,
623
+ detail: { isCustom: !0 }
624
+ })), o();
447
625
  };
448
626
  e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", () => {
449
627
  let t = e.input.value;
@@ -456,9 +634,21 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
456
634
  }));
457
635
  }, this._debounceMs);
458
636
  } else this._renderOptions(t);
459
- }), e.input.addEventListener("keydown", (e) => {
460
- let t = n();
461
- e.key === "ArrowDown" ? (e.preventDefault(), i() || a(), r(Math.min(this._active + 1, t.length - 1))) : e.key === "ArrowUp" ? (e.preventDefault(), r(Math.max(this._active - 1, 0))) : e.key === "Enter" ? t[this._active] && (e.preventDefault(), s(t[this._active])) : e.key === "Escape" && o();
637
+ }), e.input.addEventListener("keydown", (t) => {
638
+ let l = n();
639
+ if (t.key === "ArrowDown") t.preventDefault(), i() || a(), r(Math.min(this._active + 1, l.length - 1));
640
+ else if (t.key === "ArrowUp") t.preventDefault(), r(Math.max(this._active - 1, 0));
641
+ else if (t.key === "Enter") {
642
+ if (l[this._active]) t.preventDefault(), s(l[this._active]);
643
+ else if (this._allowCustom) {
644
+ let n = e.input.value.trim();
645
+ n && !this._matchesKnownOption(n) && (t.preventDefault(), c(n));
646
+ }
647
+ } else t.key === "Escape" && o();
648
+ }), e.input.addEventListener("blur", (t) => {
649
+ if (!this._allowCustom || t.relatedTarget && this.contains(t.relatedTarget)) return;
650
+ let n = e.input.value.trim();
651
+ !n || n === this._label || this._matchesKnownOption(n) || c(n);
462
652
  }), e.optionsWrap.addEventListener("click", (e) => {
463
653
  let t = e.target.closest(".search-select-option");
464
654
  t && s(t);
@@ -466,17 +656,17 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
466
656
  let t = e.target.closest(".search-select-option");
467
657
  t && r(this._optionEls().indexOf(t));
468
658
  }), e.optionsWrap.addEventListener("mouseleave", () => r(-1)), e.clear?.addEventListener("click", () => {
469
- this._value = "", this._label = "", R(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
659
+ this._value = "", this._label = "", W(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
470
660
  }), this._onDocClick = (e) => {
471
661
  i() && !this.contains(e.target) && o();
472
- }, document.addEventListener("click", this._onDocClick), I(this, () => {
662
+ }, document.addEventListener("click", this._onDocClick), V(this, () => {
473
663
  i() && t();
474
664
  });
475
665
  }
476
666
  disconnectedCallback() {
477
- this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this), clearTimeout(this._timer);
667
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), H(this), clearTimeout(this._timer);
478
668
  }
479
- }, ie = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ae = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), oe = [
669
+ }, ce = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), le = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ue = [
480
670
  "January",
481
671
  "February",
482
672
  "March",
@@ -489,7 +679,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
489
679
  "October",
490
680
  "November",
491
681
  "December"
492
- ], se = [
682
+ ], de = [
493
683
  "Su",
494
684
  "Mo",
495
685
  "Tu",
@@ -497,24 +687,24 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
497
687
  "Th",
498
688
  "Fr",
499
689
  "Sa"
500
- ], H = (e) => String(e).padStart(2, "0"), U = (e, t, n) => `${e}-${H(t + 1)}-${H(n)}`, W = (e) => {
690
+ ], fe = (e) => String(e).padStart(2, "0"), pe = (e, t, n) => `${e}-${fe(t + 1)}-${fe(n)}`, J = (e) => {
501
691
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
502
692
  return t ? {
503
693
  y: +t[1],
504
694
  m: t[2] - 1,
505
695
  d: +t[3]
506
696
  } : null;
507
- }, ce = (e) => {
508
- let t = W(e);
509
- return t ? `${H(t.d)} ${oe[t.m].slice(0, 3)} ${t.y}` : "";
510
- }, G = (e, t) => new Date(e, t + 1, 0).getDate(), K = (e, t) => {
697
+ }, me = (e) => {
698
+ let t = J(e);
699
+ return t ? `${fe(t.d)} ${ue[t.m].slice(0, 3)} ${t.y}` : "";
700
+ }, he = (e, t) => new Date(e, t + 1, 0).getDate(), Y = (e, t) => {
511
701
  for (; t < 0;) t += 12, --e;
512
702
  for (; t > 11;) t -= 12, e += 1;
513
703
  return {
514
704
  y: e,
515
705
  m: t
516
706
  };
517
- }, le = class extends HTMLElement {
707
+ }, ge = class extends HTMLElement {
518
708
  static get observedAttributes() {
519
709
  return [
520
710
  "value",
@@ -541,7 +731,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
541
731
  return this._value;
542
732
  }
543
733
  set value(e) {
544
- this._value = e || "", R(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
734
+ this._value = e || "", W(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
545
735
  }
546
736
  _firstDay() {
547
737
  let e = Number.parseInt(this.getAttribute("first-day") ?? "", 10);
@@ -549,29 +739,29 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
549
739
  }
550
740
  render() {
551
741
  this._value = this.getAttribute("value") || this._value;
552
- let e = this.getAttribute("placeholder") || "Enter Date", t = W(this._value);
742
+ let e = this.getAttribute("placeholder") || "Enter Date", t = J(this._value);
553
743
  t && (this._viewY = t.y, this._viewM = t.m);
554
744
  let n = this.getAttribute("size"), r = n === "sm" ? " input-sm" : n === "lg" ? " input-lg" : "";
555
745
  this.innerHTML = `
556
746
  <div class="datepicker">
557
747
  <button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
558
- <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? ce(this._value) : e}</span>
748
+ <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? me(this._value) : e}</span>
559
749
  <i class="bi bi-calendar3" aria-hidden="true"></i>
560
750
  </button>
561
751
  <div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
562
- </div>`, this._rendered = !0, R(this, this._value), this._wire();
752
+ </div>`, this._rendered = !0, W(this, this._value), this._wire();
563
753
  }
564
754
  _syncFormValue() {
565
- R(this, this._value);
755
+ W(this, this._value);
566
756
  }
567
757
  _syncTrigger() {
568
758
  let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
569
759
  if (!t) return;
570
- let n = W(this._value);
571
- t.textContent = n ? ce(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
760
+ let n = J(this._value);
761
+ t.textContent = n ? me(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
572
762
  }
573
763
  _limits() {
574
- let e = W(this.getAttribute("min")), t = W(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
764
+ let e = J(this.getAttribute("min")), t = J(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
575
765
  return {
576
766
  dayDisabled: (e, t, i) => {
577
767
  let a = new Date(e, t, i).getTime();
@@ -579,7 +769,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
579
769
  },
580
770
  monthDisabled: (e, t) => {
581
771
  let i = new Date(e, t, 1).getTime();
582
- return new Date(e, t, G(e, t)).getTime() < n || i > r;
772
+ return new Date(e, t, he(e, t)).getTime() < n || i > r;
583
773
  },
584
774
  yearDisabled: (e) => {
585
775
  let t = new Date(e, 0, 1).getTime();
@@ -592,28 +782,28 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
592
782
  e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
593
783
  }
594
784
  _daysHtml() {
595
- let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = G(this._viewY, this._viewM), r = W(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
785
+ let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = he(this._viewY, this._viewM), r = J(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
596
786
  y: this._viewY,
597
787
  m: this._viewM,
598
788
  d: 1
599
789
  }, s = (e, t, n, s) => {
600
- let c = U(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
790
+ let c = pe(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
601
791
  return `<button type="button" class="${[
602
792
  "datepicker-day",
603
793
  s ? "is-outside" : "",
604
794
  u ? "is-today" : "",
605
795
  l ? "is-selected" : ""
606
796
  ].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
607
- }, c = "", l = K(this._viewY, this._viewM - 1), u = G(l.y, l.m);
797
+ }, c = "", l = Y(this._viewY, this._viewM - 1), u = he(l.y, l.m);
608
798
  for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
609
799
  for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
610
- let d = K(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
800
+ let d = Y(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
611
801
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
612
- let p = se.map((t, n) => se[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
802
+ let p = de.map((t, n) => de[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
613
803
  return `
614
804
  <div class="datepicker-head">
615
805
  <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month"><i class="bi bi-chevron-left" aria-hidden="true"></i></button>
616
- <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${oe[this._viewM]} ${this._viewY}</button>
806
+ <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${ue[this._viewM]} ${this._viewY}</button>
617
807
  <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month"><i class="bi bi-chevron-right" aria-hidden="true"></i></button>
618
808
  </div>
619
809
  <div class="datepicker-weekdays">${p}</div>
@@ -624,14 +814,14 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
624
814
  </div>`;
625
815
  }
626
816
  _monthsHtml() {
627
- let e = W(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
817
+ let e = J(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
628
818
  for (let i = 0; i < 12; i++) {
629
819
  let a = e && e.y === this._viewY && e.m === i, o = t.getFullYear() === this._viewY && t.getMonth() === i, s = n(this._viewY, i), c = [
630
820
  "datepicker-cell",
631
821
  o ? "is-today" : "",
632
822
  a ? "is-selected" : ""
633
823
  ].filter(Boolean).join(" ");
634
- r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${oe[i].slice(0, 3)}</button>`;
824
+ r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${ue[i].slice(0, 3)}</button>`;
635
825
  }
636
826
  return `
637
827
  <div class="datepicker-head">
@@ -642,7 +832,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
642
832
  <div class="datepicker-cells">${r}</div>`;
643
833
  }
644
834
  _yearsHtml() {
645
- let e = W(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
835
+ let e = J(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
646
836
  for (let a = 0; a < 12; a++) {
647
837
  let o = r + a, s = e && e.y === o, c = t === o, l = n(o), u = [
648
838
  "datepicker-cell",
@@ -664,24 +854,24 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
664
854
  t && e.contains(document.activeElement) && t.focus();
665
855
  }
666
856
  _position(e, t) {
667
- F(e, t);
857
+ B(e, t);
668
858
  }
669
859
  _setFocus(e, t, n, r) {
670
- let { y: i, m: a } = K(e, t);
860
+ let { y: i, m: a } = Y(e, t);
671
861
  this._focus = {
672
862
  y: i,
673
863
  m: a,
674
864
  d: n
675
865
  };
676
866
  let o = i !== this._viewY || a !== this._viewM;
677
- this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${U(i, a, n)}"]`)?.focus();
867
+ this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${pe(i, a, n)}"]`)?.focus();
678
868
  }
679
869
  _onKey(e) {
680
870
  if (this._mode !== "days") {
681
871
  e.key === "Escape" && this._close();
682
872
  return;
683
873
  }
684
- let t = this._focus || W(this._value) || {
874
+ let t = this._focus || J(this._value) || {
685
875
  y: this._viewY,
686
876
  m: this._viewM,
687
877
  d: 1
@@ -699,17 +889,17 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
699
889
  case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
700
890
  case "PageUp": {
701
891
  e.preventDefault();
702
- let n = K(t.y, t.m - (e.shiftKey ? 12 : 1));
703
- return this._setFocus(n.y, n.m, Math.min(t.d, G(n.y, n.m)), "slide-prev");
892
+ let n = Y(t.y, t.m - (e.shiftKey ? 12 : 1));
893
+ return this._setFocus(n.y, n.m, Math.min(t.d, he(n.y, n.m)), "slide-prev");
704
894
  }
705
895
  case "PageDown": {
706
896
  e.preventDefault();
707
- let n = K(t.y, t.m + (e.shiftKey ? 12 : 1));
708
- return this._setFocus(n.y, n.m, Math.min(t.d, G(n.y, n.m)), "slide-next");
897
+ let n = Y(t.y, t.m + (e.shiftKey ? 12 : 1));
898
+ return this._setFocus(n.y, n.m, Math.min(t.d, he(n.y, n.m)), "slide-next");
709
899
  }
710
900
  case "Enter":
711
901
  case " ":
712
- e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = U(t.y, t.m, t.d), this._close());
902
+ e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = pe(t.y, t.m, t.d), this._close());
713
903
  return;
714
904
  case "Escape": return this._close();
715
905
  default:
@@ -720,11 +910,11 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
720
910
  if (!e || !t) return;
721
911
  let r = () => !t.hidden;
722
912
  this._open = () => {
723
- if (!W(this._value) && !this._viewNavigated) {
913
+ if (!J(this._value) && !this._viewNavigated) {
724
914
  let e = /* @__PURE__ */ new Date();
725
915
  this._viewY = e.getFullYear(), this._viewM = e.getMonth();
726
916
  }
727
- let r = W(this._value), i = /* @__PURE__ */ new Date();
917
+ let r = J(this._value), i = /* @__PURE__ */ new Date();
728
918
  this._mode = "days", this._focus = r || {
729
919
  y: this._viewY,
730
920
  m: this._viewM,
@@ -737,7 +927,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
737
927
  let t = e.target.closest("[data-nav]");
738
928
  if (t) {
739
929
  this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
740
- let e = K(this._viewY, this._viewM + Number(t.dataset.nav));
930
+ let e = Y(this._viewY, this._viewM + Number(t.dataset.nav));
741
931
  this._viewY = e.y, this._viewM = e.m, this._focus = {
742
932
  y: e.y,
743
933
  m: e.m,
@@ -776,7 +966,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
776
966
  }
777
967
  if (e.target.closest("[data-today]")) {
778
968
  let e = /* @__PURE__ */ new Date();
779
- this.value = U(e.getFullYear(), e.getMonth(), e.getDate()), this._close();
969
+ this.value = pe(e.getFullYear(), e.getMonth(), e.getDate()), this._close();
780
970
  return;
781
971
  }
782
972
  if (e.target.closest("[data-clear]")) {
@@ -790,14 +980,14 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
790
980
  }, t.addEventListener("keydown", this._onKeyBound), this._onDocClick = (e) => {
791
981
  let t = this._popClick;
792
982
  this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
793
- }, document.addEventListener("click", this._onDocClick), I(this, () => {
983
+ }, document.addEventListener("click", this._onDocClick), V(this, () => {
794
984
  r() && this._position(e, t);
795
985
  }), this._syncFormValue();
796
986
  }
797
987
  disconnectedCallback() {
798
- this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this);
988
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), H(this);
799
989
  }
800
- }, ue = [
990
+ }, _e = [
801
991
  "January",
802
992
  "February",
803
993
  "March",
@@ -810,7 +1000,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
810
1000
  "October",
811
1001
  "November",
812
1002
  "December"
813
- ], de = [
1003
+ ], ve = [
814
1004
  "Su",
815
1005
  "Mo",
816
1006
  "Tu",
@@ -818,24 +1008,24 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
818
1008
  "Th",
819
1009
  "Fr",
820
1010
  "Sa"
821
- ], fe = (e) => String(e).padStart(2, "0"), pe = (e, t, n) => `${e}-${fe(t + 1)}-${fe(n)}`, q = (e) => {
1011
+ ], ye = (e) => String(e).padStart(2, "0"), be = (e, t, n) => `${e}-${ye(t + 1)}-${ye(n)}`, xe = (e) => {
822
1012
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
823
1013
  return t ? {
824
1014
  y: +t[1],
825
1015
  m: t[2] - 1,
826
1016
  d: +t[3]
827
1017
  } : null;
828
- }, me = (e) => {
829
- let t = q(e);
830
- return t ? `${fe(t.d)} ${ue[t.m].slice(0, 3)} ${t.y}` : "";
831
- }, he = (e, t) => new Date(e, t + 1, 0).getDate(), ge = (e, t) => {
1018
+ }, Se = (e) => {
1019
+ let t = xe(e);
1020
+ return t ? `${ye(t.d)} ${_e[t.m].slice(0, 3)} ${t.y}` : "";
1021
+ }, Ce = (e, t) => new Date(e, t + 1, 0).getDate(), we = (e, t) => {
832
1022
  for (; t < 0;) t += 12, --e;
833
1023
  for (; t > 11;) t -= 12, e += 1;
834
1024
  return {
835
1025
  y: e,
836
1026
  m: t
837
1027
  };
838
- }, _e = class extends HTMLElement {
1028
+ }, Te = class extends HTMLElement {
839
1029
  static get observedAttributes() {
840
1030
  return [
841
1031
  "start",
@@ -878,13 +1068,13 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
878
1068
  text: e,
879
1069
  empty: !0
880
1070
  } : {
881
- text: `${me(this._start) || "Start"} – ${me(this._end) || "End"}`,
1071
+ text: `${Se(this._start) || "Start"} – ${Se(this._end) || "End"}`,
882
1072
  empty: !1
883
1073
  };
884
1074
  }
885
1075
  render() {
886
1076
  this._start = this.getAttribute("start") || this._start, this._end = this.getAttribute("end") || this._end;
887
- let e = q(this._start);
1077
+ let e = xe(this._start);
888
1078
  e && (this._viewY = e.y, this._viewM = e.m);
889
1079
  let t = this.getAttribute("size"), n = t === "sm" ? " input-sm" : t === "lg" ? " input-lg" : "", { text: r, empty: i } = this._label();
890
1080
  this.innerHTML = `
@@ -912,24 +1102,24 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
912
1102
  r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute("data-range-mirror", e), this.appendChild(r)), r.name = t, r.value = n || "";
913
1103
  }
914
1104
  _limits() {
915
- let e = q(this.getAttribute("min")), t = q(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
1105
+ let e = xe(this.getAttribute("min")), t = xe(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
916
1106
  return (e, t, i) => {
917
1107
  let a = new Date(e, t, i).getTime();
918
1108
  return a < n || a > r;
919
1109
  };
920
1110
  }
921
1111
  _monthHtml(e, t) {
922
- let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = he(e, t), a = this._limits(), o = de.map((e, t) => de[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
923
- let i = pe(e, t, n), o = a(e, t, n);
1112
+ let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = Ce(e, t), a = this._limits(), o = ve.map((e, t) => ve[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
1113
+ let i = be(e, t, n), o = a(e, t, n);
924
1114
  return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
925
- }, c = "", l = ge(e, t - 1), u = he(l.y, l.m);
1115
+ }, c = "", l = we(e, t - 1), u = Ce(l.y, l.m);
926
1116
  for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
927
1117
  for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
928
- let d = ge(e, t + 1), f = (7 - (r + i) % 7) % 7;
1118
+ let d = we(e, t + 1), f = (7 - (r + i) % 7) % 7;
929
1119
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
930
1120
  return `
931
1121
  <div class="daterange-cal">
932
- <div class="datepicker-month-label">${ue[t]} ${e}</div>
1122
+ <div class="datepicker-month-label">${_e[t]} ${e}</div>
933
1123
  <div class="datepicker-weekdays">${o}</div>
934
1124
  <div class="datepicker-grid" role="grid">${c}</div>
935
1125
  </div>`;
@@ -937,7 +1127,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
937
1127
  _renderView() {
938
1128
  let e = this.querySelector(".daterange-pop");
939
1129
  if (!e) return;
940
- let t = ge(this._viewY, this._viewM + 1);
1130
+ let t = we(this._viewY, this._viewM + 1);
941
1131
  e.innerHTML = `
942
1132
  <div class="daterange-head">
943
1133
  <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month"><i class="bi bi-chevron-left" aria-hidden="true"></i></button>
@@ -963,10 +1153,10 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
963
1153
  n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
964
1154
  }
965
1155
  let i = e.querySelector("[data-range-hint]");
966
- i && (i.textContent = this._start ? this._end ? `${me(this._start)} – ${me(this._end)}` : "Pick an end date" : "Pick a start date");
1156
+ i && (i.textContent = this._start ? this._end ? `${Se(this._start)} – ${Se(this._end)}` : "Pick an end date" : "Pick a start date");
967
1157
  }
968
1158
  _position(e, t) {
969
- F(e, t);
1159
+ B(e, t);
970
1160
  }
971
1161
  _pick(e) {
972
1162
  if (!this._start || this._start && this._end) {
@@ -984,7 +1174,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
984
1174
  if (!e || !t) return;
985
1175
  let r = () => !t.hidden;
986
1176
  this._open = () => {
987
- let r = q(this._start);
1177
+ let r = xe(this._start);
988
1178
  if (r) this._viewY = r.y, this._viewM = r.m;
989
1179
  else {
990
1180
  let e = /* @__PURE__ */ new Date();
@@ -997,7 +1187,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
997
1187
  this._popClick = !0;
998
1188
  let t = e.target.closest("[data-nav]");
999
1189
  if (t) {
1000
- let e = ge(this._viewY, this._viewM + Number(t.dataset.nav));
1190
+ let e = we(this._viewY, this._viewM + Number(t.dataset.nav));
1001
1191
  this._viewY = e.y, this._viewM = e.m, this._renderView();
1002
1192
  return;
1003
1193
  }
@@ -1015,14 +1205,14 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
1015
1205
  this._popClick = !1, r() && !t && !this.contains(e.target) && this._close();
1016
1206
  }, document.addEventListener("click", this._onDocClick), this._onDocKey = (e) => {
1017
1207
  r() && e.key === "Escape" && this._close();
1018
- }, document.addEventListener("keydown", this._onDocKey), I(this, () => {
1208
+ }, document.addEventListener("keydown", this._onDocKey), V(this, () => {
1019
1209
  r() && this._position(e, t);
1020
1210
  }), this._syncMirrors();
1021
1211
  }
1022
1212
  disconnectedCallback() {
1023
- this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey), L(this);
1213
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey), H(this);
1024
1214
  }
1025
- }, ve = class extends HTMLElement {
1215
+ }, Ee = class extends HTMLElement {
1026
1216
  _accessibleName() {
1027
1217
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
1028
1218
  }
@@ -1057,7 +1247,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
1057
1247
  return this._values.slice();
1058
1248
  }
1059
1249
  set values(e) {
1060
- this._values = Array.isArray(e) ? e.map(String) : [], R(this, this._values.join(",")), this._rendered && this._renderControl();
1250
+ this._values = Array.isArray(e) ? e.map(String) : [], W(this, this._values.join(",")), this._rendered && this._renderControl();
1061
1251
  }
1062
1252
  set options(e) {
1063
1253
  this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
@@ -1072,7 +1262,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
1072
1262
  value: e.getAttribute("value") ?? e.textContent.trim(),
1073
1263
  label: e.innerHTML,
1074
1264
  icon: e.getAttribute("icon") || void 0,
1075
- [z]: !0,
1265
+ [oe]: !0,
1076
1266
  selected: e.hasAttribute("selected")
1077
1267
  })));
1078
1268
  }
@@ -1085,34 +1275,34 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
1085
1275
  }
1086
1276
  _labelHtmlFor(e) {
1087
1277
  let t = this._readOptions().find((t) => String(t.value) === String(e));
1088
- return t ? V(t) : B(e);
1278
+ return t ? q(t) : G(e);
1089
1279
  }
1090
1280
  render() {
1091
1281
  this._snapshotDeclared();
1092
1282
  let e = this.hasAttribute("searchable"), t = this.getAttribute("search-placeholder") || "Search…", n = this.getAttribute("icon"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "";
1093
- R(this, this._values.join(",")), this.innerHTML = `
1283
+ W(this, this._values.join(",")), this.innerHTML = `
1094
1284
  <div class="search-select${i}">
1095
- <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${J(this._accessibleName())}"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
1096
- ${n ? `<i class="bi bi-${J(n)} search-select-icon" aria-hidden="true"></i>` : ""}
1285
+ <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${De(this._accessibleName())}"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
1286
+ ${n ? `<i class="bi bi-${De(n)} search-select-icon" aria-hidden="true"></i>` : ""}
1097
1287
  <div class="ms-chips" data-chips></div>
1098
1288
  <i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
1099
1289
  </div>
1100
1290
  <div class="search-select-menu search-select-menu-fixed" role="listbox" aria-multiselectable="true" tabindex="-1" hidden>
1101
- ${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${J(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
1291
+ ${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${De(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
1102
1292
  <div class="search-select-options"></div>
1103
1293
  <div class="search-select-empty" hidden>No matches</div>
1104
1294
  </div>
1105
- </div>`, this._rendered = !0, R(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
1295
+ </div>`, this._rendered = !0, W(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
1106
1296
  }
1107
1297
  _renderControl() {
1108
1298
  let e = this.querySelector("[data-chips]");
1109
1299
  if (!e) return;
1110
1300
  let t = this.getAttribute("placeholder") || "Select…";
1111
1301
  if (!this._values.length) {
1112
- e.innerHTML = `<span class="search-select-placeholder">${B(t)}</span>`;
1302
+ e.innerHTML = `<span class="search-select-placeholder">${G(t)}</span>`;
1113
1303
  return;
1114
1304
  }
1115
- e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${J(e)}" aria-label="Remove"><i class="bi bi-x" aria-hidden="true"></i></button></span>`).join(""), this._collapseChips();
1305
+ e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${De(e)}" aria-label="Remove"><i class="bi bi-x" aria-hidden="true"></i></button></span>`).join(""), this._collapseChips();
1116
1306
  }
1117
1307
  _collapseChips() {
1118
1308
  let e = this.querySelector("[data-chips]");
@@ -1136,9 +1326,9 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
1136
1326
  let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
1137
1327
  if (!t) return;
1138
1328
  let r = (e || "").trim().toLowerCase(), i = this._readOptions();
1139
- r && (i = i.filter((e) => ye(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
1329
+ r && (i = i.filter((e) => Oe(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
1140
1330
  let t = this._values.includes(String(e.value));
1141
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${J(e.value)}" aria-selected="${t}"><span class="ms-opt-label">${V(e)}</span><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span></button>`;
1331
+ return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${De(e.value)}" aria-selected="${t}"><span class="ms-opt-label">${q(e)}</span><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span></button>`;
1142
1332
  }).join(""), n && (n.hidden = i.length > 0), this._active = -1;
1143
1333
  }
1144
1334
  _wire() {
@@ -1146,7 +1336,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
1146
1336
  if (!e || !t) return;
1147
1337
  let a = () => this.hasAttribute("disabled");
1148
1338
  !this._ro && typeof ResizeObserver < "u" && (this._ro = new ResizeObserver(() => this._collapseChips()), this._ro.observe(this));
1149
- let o = () => F(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (e) => {
1339
+ let o = () => B(e, t, { matchWidth: !0 }), s = () => [...this.querySelectorAll(".search-select-option")], c = () => s().filter((e) => !e.hidden), l = (e) => {
1150
1340
  let t = c();
1151
1341
  this._active = e;
1152
1342
  for (let e of s()) e.classList.remove("is-active");
@@ -1156,7 +1346,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
1156
1346
  }, f = () => {
1157
1347
  t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1);
1158
1348
  }, p = () => {
1159
- R(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1349
+ W(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1160
1350
  }, m = (e) => {
1161
1351
  let t = String(e);
1162
1352
  this._values.includes(t) ? this._values = this._values.filter((e) => e !== t) : this._values = [...this._values, t], this._renderControl(), this._renderOptions(n ? n.value : ""), p();
@@ -1193,14 +1383,14 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
1193
1383
  (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), d());
1194
1384
  }), this._onDocClick = (e) => {
1195
1385
  u() && !this.contains(e.target) && f();
1196
- }, document.addEventListener("click", this._onDocClick), I(this, () => {
1386
+ }, document.addEventListener("click", this._onDocClick), V(this, () => {
1197
1387
  u() && o();
1198
1388
  });
1199
1389
  }
1200
1390
  disconnectedCallback() {
1201
- this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this), this._ro?.disconnect(), this._ro = null;
1391
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), H(this), this._ro?.disconnect(), this._ro = null;
1202
1392
  }
1203
- }, J = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ye = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), be = /[^0-9]/g, xe = /[^0-9a-zA-Z]/g, Se = class extends HTMLElement {
1393
+ }, De = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Oe = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ke = /[^0-9]/g, Ae = /[^0-9a-zA-Z]/g, je = class extends HTMLElement {
1204
1394
  static get observedAttributes() {
1205
1395
  return [
1206
1396
  "value",
@@ -1227,16 +1417,16 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
1227
1417
  return this._value ?? "";
1228
1418
  }
1229
1419
  set value(e) {
1230
- this._value = this._clean(e), R(this, this._value), this._paint();
1420
+ this._value = this._clean(e), W(this, this._value), this._paint();
1231
1421
  }
1232
1422
  _clean(e) {
1233
- return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? xe : be, "").slice(0, this.length);
1423
+ return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? Ae : ke, "").slice(0, this.length);
1234
1424
  }
1235
1425
  connectedCallback() {
1236
1426
  this._rendered || this.render();
1237
1427
  }
1238
1428
  attributeChangedCallback(e, t, n) {
1239
- this._rendered && (e === "value" ? (this._value = this._clean(n), R(this, this._value), this._paint()) : this.render());
1429
+ this._rendered && (e === "value" ? (this._value = this._clean(n), W(this, this._value), this._paint()) : this.render());
1240
1430
  }
1241
1431
  render() {
1242
1432
  this._value = this._clean(this.getAttribute("value") ?? this._value);
@@ -1254,7 +1444,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
1254
1444
  spellcheck="false"
1255
1445
  ${n ? "disabled" : ""} />
1256
1446
  <div class="otp-slots" aria-hidden="true">${r}</div>
1257
- </div>`, this._rendered = !0, R(this, this._value), this._wire(), this._paint();
1447
+ </div>`, this._rendered = !0, W(this, this._value), this._wire(), this._paint();
1258
1448
  }
1259
1449
  _refs() {
1260
1450
  return {
@@ -1276,7 +1466,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
1276
1466
  if (!e) return;
1277
1467
  let t = (e) => {
1278
1468
  let t = this._clean(e), n = t !== this._value;
1279
- this._value = t, R(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
1469
+ this._value = t, W(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
1280
1470
  bubbles: !0,
1281
1471
  detail: t
1282
1472
  }));
@@ -1296,7 +1486,7 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
1296
1486
  document.activeElement === e && this._paint();
1297
1487
  });
1298
1488
  }
1299
- }, Ce = [
1489
+ }, Me = [
1300
1490
  [
1301
1491
  "AF",
1302
1492
  "Afghanistan",
@@ -2522,56 +2712,56 @@ var z = Symbol("wui.trustedHtml"), B = (e) => String(e ?? "").replace(/&/g, "&am
2522
2712
  "Zimbabwe",
2523
2713
  "263"
2524
2714
  ]
2525
- ], we = (e) => (Ce.find((t) => t[0] === e) || [
2715
+ ], Ne = (e) => (Me.find((t) => t[0] === e) || [
2526
2716
  "",
2527
2717
  "",
2528
2718
  ""
2529
- ])[2], Te = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, Y = null, Ee = null;
2530
- function De() {
2531
- return Y ? Promise.resolve(Y) : (Ee ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (Y = {
2719
+ ])[2], Pe = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, X = null, Fe = null;
2720
+ function Ie() {
2721
+ return X ? Promise.resolve(X) : (Fe ||= Promise.all([import("./libphonenumber-js-BcNT8oq0-DMpMlice.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (X = {
2532
2722
  AsYouType: e.AsYouType,
2533
2723
  getExampleNumber: e.getExampleNumber,
2534
2724
  isValidPhoneNumber: e.isValidPhoneNumber,
2535
2725
  examples: t.default || t
2536
- }, Y)).catch(() => null), Ee);
2726
+ }, X)).catch(() => null), Fe);
2537
2727
  }
2538
- function Oe(e, t) {
2539
- if (!Y || !t) return t;
2728
+ function Le(e, t) {
2729
+ if (!X || !t) return t;
2540
2730
  try {
2541
- return new Y.AsYouType(e).input(t);
2731
+ return new X.AsYouType(e).input(t);
2542
2732
  } catch {
2543
2733
  return t;
2544
2734
  }
2545
2735
  }
2546
- function ke(e) {
2547
- if (!Y) return null;
2736
+ function Re(e) {
2737
+ if (!X) return null;
2548
2738
  try {
2549
- return Y.getExampleNumber(e, Y.examples)?.formatNational() || null;
2739
+ return X.getExampleNumber(e, X.examples)?.formatNational() || null;
2550
2740
  } catch {
2551
2741
  return null;
2552
2742
  }
2553
2743
  }
2554
- function Ae(e) {
2555
- if (!Y || !e) return null;
2744
+ function ze(e) {
2745
+ if (!X || !e) return null;
2556
2746
  try {
2557
- return Y.isValidPhoneNumber(e);
2747
+ return X.isValidPhoneNumber(e);
2558
2748
  } catch {
2559
2749
  return null;
2560
2750
  }
2561
2751
  }
2562
- function je(e) {
2563
- if (!Y) return null;
2752
+ function Be(e) {
2753
+ if (!X) return null;
2564
2754
  try {
2565
- let t = Y.getExampleNumber(e, Y.examples);
2755
+ let t = X.getExampleNumber(e, X.examples);
2566
2756
  return t?.nationalNumber ? t.nationalNumber.length : null;
2567
2757
  } catch {
2568
2758
  return null;
2569
2759
  }
2570
2760
  }
2571
- function Me(e) {
2572
- if (!Y || !e?.trim().startsWith("+")) return null;
2761
+ function Ve(e) {
2762
+ if (!X || !e?.trim().startsWith("+")) return null;
2573
2763
  try {
2574
- let t = new Y.AsYouType();
2764
+ let t = new X.AsYouType();
2575
2765
  t.input(e.trim());
2576
2766
  let n = t.getCountry();
2577
2767
  return n ? {
@@ -2582,7 +2772,7 @@ function Me(e) {
2582
2772
  return null;
2583
2773
  }
2584
2774
  }
2585
- var Ne = class extends HTMLElement {
2775
+ var He = class extends HTMLElement {
2586
2776
  static get observedAttributes() {
2587
2777
  return [
2588
2778
  "value",
@@ -2601,40 +2791,40 @@ var Ne = class extends HTMLElement {
2601
2791
  this._rendered && (e === "country" && (this._country = n || "IN"), this.render());
2602
2792
  }
2603
2793
  get value() {
2604
- return `+${we(this._country)}${this._national}`;
2794
+ return `+${Ne(this._country)}${this._national}`;
2605
2795
  }
2606
2796
  set value(e) {
2607
- let t = String(e ?? "").trim(), n = Me(t);
2797
+ let t = String(e ?? "").trim(), n = Ve(t);
2608
2798
  if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
2609
2799
  else if (t.startsWith("+")) {
2610
- let e = t.replace(/[^0-9]/g, ""), n = String(we(this._country));
2800
+ let e = t.replace(/[^0-9]/g, ""), n = String(Ne(this._country));
2611
2801
  n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
2612
2802
  } else this._national = t.replace(/[^0-9]/g, "");
2613
2803
  n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._commit();
2614
2804
  }
2615
2805
  _commit() {
2616
- R(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
2806
+ W(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
2617
2807
  }
2618
2808
  render() {
2619
- let e = this.getAttribute("placeholder") || ke(this._country) || "Enter phone number";
2809
+ let e = this.getAttribute("placeholder") || Re(this._country) || "Enter phone number";
2620
2810
  this._country = this.getAttribute("country") || this._country;
2621
- let t = Ce.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${Te(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
2811
+ let t = Me.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${Pe(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
2622
2812
  this.innerHTML = `
2623
2813
  <div class="phone-input-wrap">
2624
2814
  <div class="phone-country-adornment">
2625
2815
  <button type="button" class="country-toggle" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
2626
- <span class="${Te(this._country)}" data-flag aria-hidden="true"></span>
2816
+ <span class="${Pe(this._country)}" data-flag aria-hidden="true"></span>
2627
2817
  <i class="bi bi-chevron-down phone-chevron" aria-hidden="true"></i>
2628
- <span class="phone-dial" data-dial>+${we(this._country)}</span>
2818
+ <span class="phone-dial" data-dial>+${Ne(this._country)}</span>
2629
2819
  </button>
2630
2820
  <div class="country-dropdown-menu" role="listbox" hidden>
2631
2821
  <div class="dropdown-search-wrapper"><span class="dropdown-search-icon"><i class="bi bi-search" aria-hidden="true"></i></span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" /></div>
2632
2822
  <div class="country-list-scroll">${t}<div class="country-empty" hidden>No countries found</div></div>
2633
2823
  </div>
2634
2824
  </div>
2635
- <input type="tel" class="input" placeholder="${Pe(e)}" value="${Pe(Oe(this._country, this._national))}"${this.hasAttribute("disabled") ? " disabled" : ""} />
2825
+ <input type="tel" class="input" placeholder="${Ue(e)}" value="${Ue(Le(this._country, this._national))}"${this.hasAttribute("disabled") ? " disabled" : ""} />
2636
2826
  </div>
2637
- <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, R(this, this.value), this._wire();
2827
+ <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, W(this, this.value), this._wire();
2638
2828
  }
2639
2829
  _wire() {
2640
2830
  let e = this.querySelector(".country-toggle"), t = this.querySelector(".phone-input-wrap"), n = this.querySelector(".country-dropdown-menu"), r = this.querySelector(".dropdown-search-input"), i = this.querySelector(".country-list-scroll"), a = this.querySelector(".country-empty"), o = this.querySelector("input[type=tel]"), s = this.querySelector("[data-flag]"), c = this.querySelector("[data-dial]");
@@ -2658,7 +2848,7 @@ var Ne = class extends HTMLElement {
2658
2848
  }
2659
2849
  a && (a.hidden = n > 0);
2660
2850
  }, m = (e) => {
2661
- this._country = e, this.setAttribute("country", e), s && (s.className = Te(e)), c && (c.textContent = `+${we(e)}`);
2851
+ this._country = e, this.setAttribute("country", e), s && (s.className = Pe(e)), c && (c.textContent = `+${Ne(e)}`);
2662
2852
  for (let t of i.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
2663
2853
  f(), this._commit();
2664
2854
  };
@@ -2669,35 +2859,35 @@ var Ne = class extends HTMLElement {
2669
2859
  let h = this.querySelector("[data-phone-error]"), g = (e) => {
2670
2860
  if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), h) {
2671
2861
  if (e) {
2672
- let e = ke(this._country);
2862
+ let e = Re(this._country);
2673
2863
  h.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
2674
2864
  }
2675
2865
  h.hidden = !e;
2676
2866
  }
2677
2867
  };
2678
2868
  o.addEventListener("input", () => {
2679
- let e = o.value.replace(/[^0-9]/g, ""), t = je(this._country);
2869
+ let e = o.value.replace(/[^0-9]/g, ""), t = Be(this._country);
2680
2870
  t && e.length > t && (e = e.slice(0, t)), this._national = e;
2681
- let n = Oe(this._country, this._national);
2682
- o.value !== n && (o.value = n), this._commit(), o.classList.contains("is-invalid") && (!this._national || Ae(this.value) === !0) && g(!1);
2871
+ let n = Le(this._country, this._national);
2872
+ o.value !== n && (o.value = n), this._commit(), o.classList.contains("is-invalid") && (!this._national || ze(this.value) === !0) && g(!1);
2683
2873
  }), o.addEventListener("blur", () => {
2684
- g(this._national.length > 0 && Ae(this.value) === !1);
2874
+ g(this._national.length > 0 && ze(this.value) === !1);
2685
2875
  }), o.addEventListener("paste", (e) => {
2686
- let t = Me(e.clipboardData?.getData("text"));
2687
- t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = Oe(this._country, this._national) : this.setAttribute("country", t.country), this._commit(), this.querySelector("input[type=tel]")?.focus());
2876
+ let t = Ve(e.clipboardData?.getData("text"));
2877
+ t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = Le(this._country, this._national) : this.setAttribute("country", t.country), this._commit(), this.querySelector("input[type=tel]")?.focus());
2688
2878
  }), this._onDocClick = (e) => {
2689
2879
  l() && !this.contains(e.target) && f();
2690
- }, document.addEventListener("click", this._onDocClick), De().then((e) => {
2691
- if (!(!e || !o) && (this._national && (o.value = Oe(this._country, this._national)), !this.getAttribute("placeholder"))) {
2692
- let e = ke(this._country);
2880
+ }, document.addEventListener("click", this._onDocClick), Ie().then((e) => {
2881
+ if (!(!e || !o) && (this._national && (o.value = Le(this._country, this._national)), !this.getAttribute("placeholder"))) {
2882
+ let e = Re(this._country);
2693
2883
  e && (o.placeholder = e);
2694
2884
  }
2695
- }), R(this, this.value);
2885
+ }), W(this, this.value);
2696
2886
  }
2697
2887
  disconnectedCallback() {
2698
2888
  this._reposition && (window.removeEventListener("scroll", this._reposition, !0), window.removeEventListener("resize", this._reposition)), this._onDocClick && document.removeEventListener("click", this._onDocClick);
2699
2889
  }
2700
- }, Pe = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Fe = class extends HTMLElement {
2890
+ }, Ue = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), We = class extends HTMLElement {
2701
2891
  static get observedAttributes() {
2702
2892
  return [
2703
2893
  "value",
@@ -2733,7 +2923,7 @@ var Ne = class extends HTMLElement {
2733
2923
  return this._value;
2734
2924
  }
2735
2925
  set value(e) {
2736
- this._value = e == null ? "" : String(e), R(this, this._value), this._syncSelected(), this._syncReset();
2926
+ this._value = e == null ? "" : String(e), W(this, this._value), this._syncSelected(), this._syncReset();
2737
2927
  }
2738
2928
  set options(e) {
2739
2929
  this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
@@ -2748,7 +2938,7 @@ var Ne = class extends HTMLElement {
2748
2938
  value: e.getAttribute("value") ?? e.textContent.trim(),
2749
2939
  label: e.innerHTML,
2750
2940
  icon: e.getAttribute("icon") || void 0,
2751
- [z]: !0,
2941
+ [oe]: !0,
2752
2942
  selected: e.hasAttribute("selected")
2753
2943
  })));
2754
2944
  }
@@ -2758,25 +2948,25 @@ var Ne = class extends HTMLElement {
2758
2948
  render() {
2759
2949
  this._snapshotDeclared();
2760
2950
  let e = this._readOptions(), t = this.hasAttribute("searchable"), n = this.hasAttribute("clearable"), r = this.getAttribute("size"), i = r === "sm" ? " search-select-sm" : r === "lg" ? " search-select-lg" : "", a = this.getAttribute("icon"), o = this.getAttribute("prefix"), s = this.getAttribute("placeholder") || "Select...", c = this.getAttribute("search-placeholder") || "Search...", l = e.find((e) => String(e.value) === String(this._value)) || e.find((e) => e.selected);
2761
- l && (this._value = String(l.value)), R(this, this._value);
2951
+ l && (this._value = String(l.value)), W(this, this._value);
2762
2952
  let u = e.map((e) => {
2763
2953
  let t = String(e.value) === String(this._value);
2764
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${Ie(e.value)}" aria-selected="${t}">${V(e)}</button>`;
2954
+ return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${Ge(e.value)}" aria-selected="${t}">${q(e)}</button>`;
2765
2955
  }).join("");
2766
2956
  this.innerHTML = `
2767
2957
  <div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
2768
- <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${Ie(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
2769
- ${a ? `<i class="bi bi-${Ie(a)} search-select-icon" aria-hidden="true"></i>` : ""}
2770
- ${o ? `<span class="search-select-prefix">${B(o)}</span>` : ""}
2771
- <span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? V(l) : B(s)}</span>
2958
+ <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${Ge(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
2959
+ ${a ? `<i class="bi bi-${Ge(a)} search-select-icon" aria-hidden="true"></i>` : ""}
2960
+ ${o ? `<span class="search-select-prefix">${G(o)}</span>` : ""}
2961
+ <span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? q(l) : G(s)}</span>
2772
2962
  ${n ? "<span class=\"search-select-reset\" role=\"button\" aria-label=\"Clear selection\" hidden><i class=\"bi bi-x-lg\" aria-hidden=\"true\"></i></span>" : ""}
2773
2963
  <i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
2774
2964
  </button>
2775
2965
  <div class="search-select-menu search-select-menu-fixed" role="listbox" tabindex="-1" hidden>
2776
- ${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${Ie(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
2966
+ ${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${Ge(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
2777
2967
  <div class="search-select-options">${u}<div class="search-select-empty" hidden>No matches</div></div>
2778
2968
  </div>
2779
- </div>`, this._rendered = !0, R(this, this._value), this._wire(), this._syncReset();
2969
+ </div>`, this._rendered = !0, W(this, this._value), this._wire(), this._syncReset();
2780
2970
  }
2781
2971
  _refs() {
2782
2972
  return {
@@ -2802,7 +2992,7 @@ var Ne = class extends HTMLElement {
2802
2992
  let t = e.dataset.value === String(this._value);
2803
2993
  e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
2804
2994
  }
2805
- e && (e.innerHTML = t ? V(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
2995
+ e && (e.innerHTML = t ? q(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
2806
2996
  }
2807
2997
  _syncReset() {
2808
2998
  let { reset: e } = this._refs();
@@ -2814,8 +3004,8 @@ var Ne = class extends HTMLElement {
2814
3004
  let t = () => {
2815
3005
  if (this.hasAttribute("compact")) {
2816
3006
  let t = e.control.getBoundingClientRect();
2817
- e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", F(e.control, e.menu);
2818
- } else F(e.control, e.menu, { matchWidth: !0 });
3007
+ e.menu.style.width = "max-content", e.menu.style.minWidth = `${t.width}px`, e.menu.style.maxWidth = "280px", B(e.control, e.menu);
3008
+ } else B(e.control, e.menu, { matchWidth: !0 });
2819
3009
  }, n = (e) => {
2820
3010
  let t = this._visible();
2821
3011
  this._active = e;
@@ -2858,21 +3048,21 @@ var Ne = class extends HTMLElement {
2858
3048
  e.search.value = "", r(""), e.search.focus();
2859
3049
  }), e.menu.addEventListener("keydown", c), this._onDocClick = (e) => {
2860
3050
  i() && !this.contains(e.target) && o();
2861
- }, document.addEventListener("click", this._onDocClick), I(this, () => {
3051
+ }, document.addEventListener("click", this._onDocClick), V(this, () => {
2862
3052
  i() && t();
2863
3053
  });
2864
3054
  }
2865
3055
  disconnectedCallback() {
2866
- this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this);
3056
+ this._onDocClick && document.removeEventListener("click", this._onDocClick), H(this);
2867
3057
  }
2868
- }, Ie = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Le = "image/png,image/jpeg,image/webp", Re = {
3058
+ }, Ge = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ke = "image/png,image/jpeg,image/webp", qe = {
2869
3059
  "image/png": [".png"],
2870
3060
  "image/jpeg": [".jpg", ".jpeg"],
2871
3061
  "image/webp": [".webp"],
2872
3062
  "image/gif": [".gif"],
2873
3063
  "image/svg+xml": [".svg"],
2874
3064
  "application/pdf": [".pdf"]
2875
- }, ze = {
3065
+ }, Je = {
2876
3066
  "image/png": "PNG",
2877
3067
  "image/jpeg": "JPG",
2878
3068
  "image/webp": "WEBP",
@@ -2886,36 +3076,57 @@ var Ne = class extends HTMLElement {
2886
3076
  ".gif": "GIF",
2887
3077
  ".svg": "SVG",
2888
3078
  ".pdf": "PDF"
2889
- }, Be = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
2890
- function Ve(e) {
3079
+ }, Ye = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), Xe = [
3080
+ ".png",
3081
+ ".jpg",
3082
+ ".jpeg",
3083
+ ".webp",
3084
+ ".gif",
3085
+ ".svg",
3086
+ ".bmp",
3087
+ ".avif",
3088
+ ".heic"
3089
+ ];
3090
+ function Ze(e) {
3091
+ if (!e) return !1;
3092
+ let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
3093
+ if (t) return t.startsWith("image/");
3094
+ let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
3095
+ return Xe.some((e) => r.endsWith(e));
3096
+ }
3097
+ function Qe(e) {
3098
+ let t = Ye(e);
3099
+ return t.length ? t.every((e) => e.startsWith(".") ? Xe.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
3100
+ }
3101
+ function $e(e) {
2891
3102
  let t = [];
2892
- for (let n of Be(e)) {
2893
- let e = ze[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
3103
+ for (let n of Ye(e)) {
3104
+ let e = Je[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
2894
3105
  t.includes(e) || t.push(e);
2895
3106
  }
2896
3107
  return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
2897
3108
  }
2898
- function He(e, t) {
2899
- let n = Be(t);
3109
+ function et(e, t) {
3110
+ let n = Ye(t);
2900
3111
  if (!n.length) return !0;
2901
3112
  let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
2902
- return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Re[e] || []).some((e) => i.endsWith(e)));
3113
+ return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (qe[e] || []).some((e) => i.endsWith(e)));
2903
3114
  }
2904
- function Ue(e, t = {}) {
3115
+ function tt(e, t = {}) {
2905
3116
  if (!e) return null;
2906
- let n = t.accept === void 0 ? Le : t.accept, r = t.maxSizeMb || 5;
2907
- return He(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Ve(n)} file.`;
3117
+ let n = t.accept === void 0 ? Ke : t.accept, r = t.maxSizeMb || 5;
3118
+ return et(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${$e(n)} file.`;
2908
3119
  }
2909
- var X = (e, t) => {
3120
+ var Z = (e, t) => {
2910
3121
  typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
2911
3122
  };
2912
- function We() {
2913
- X("wui-select", Fe), X("wui-phone", Ne), X("wui-datepicker", le), X("wui-date-range", _e), X("wui-autocomplete", re), X("wui-multiselect", ve), X("wui-otp", Se), X("wui-status-icon", ee);
3123
+ function nt() {
3124
+ Z("wui-select", We), Z("wui-phone", He), Z("wui-datepicker", ge), Z("wui-date-range", Te), Z("wui-autocomplete", se), Z("wui-multiselect", Ee), Z("wui-otp", je), Z("wui-status-icon", ae);
2914
3125
  }
2915
- We();
3126
+ nt();
2916
3127
  //#endregion
2917
3128
  //#region src/components/RequiredMark.jsx
2918
- function Z() {
3129
+ function Q() {
2919
3130
  return /* @__PURE__ */ t("span", {
2920
3131
  className: "required",
2921
3132
  "aria-hidden": "true",
@@ -2924,23 +3135,23 @@ function Z() {
2924
3135
  }
2925
3136
  //#endregion
2926
3137
  //#region src/components/AppAutocomplete.jsx
2927
- function Ge({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s = "Search…", minChars: c, debounce: u, disabled: d = !1, size: f, name: p, label: m, error: h, hint: g, required: _ = !1, fieldClassName: v = "", ...y }) {
2928
- E("AppAutocomplete", y);
2929
- let b = l(null), x = typeof o == "function";
3138
+ function rt({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s = "Search…", minChars: c, debounce: u, disabled: d = !1, size: f, allowCustom: p = !1, name: m, label: h, error: g, hint: _, required: v = !1, fieldClassName: y = "", ...b }) {
3139
+ O("AppAutocomplete", b);
3140
+ let x = l(null), S = typeof o == "function";
2930
3141
  return a(() => {
2931
- let e = b.current;
2932
- e && !x && (e.options = i || []);
2933
- }, [i, x]), a(() => {
2934
- let t = b.current;
3142
+ let e = x.current;
3143
+ e && !S && (e.options = i || []);
3144
+ }, [i, S]), a(() => {
3145
+ let t = x.current;
2935
3146
  t && t.value !== (e ?? "") && (t.value = e ?? "");
2936
3147
  }, [e]), a(() => {
2937
- let e = b.current;
3148
+ let e = x.current;
2938
3149
  if (!e) return;
2939
- let t = () => r?.(e.value);
3150
+ let t = (t) => r?.(e.value, { isCustom: !!t.detail?.isCustom });
2940
3151
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
2941
3152
  }, [r]), a(() => {
2942
- let e = b.current;
2943
- if (!e || !x) return;
3153
+ let e = x.current;
3154
+ if (!e || !S) return;
2944
3155
  let t = !1, n = async (n) => {
2945
3156
  e.loading = !0;
2946
3157
  try {
@@ -2953,47 +3164,48 @@ function Ge({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s
2953
3164
  return e.addEventListener("search", n), () => {
2954
3165
  t = !0, e.removeEventListener("search", n);
2955
3166
  };
2956
- }, [x, o]), /* @__PURE__ */ n("div", {
2957
- className: `field${v ? ` ${v}` : ""}`,
3167
+ }, [S, o]), /* @__PURE__ */ n("div", {
3168
+ className: `field${y ? ` ${y}` : ""}`,
2958
3169
  children: [
2959
- m && /* @__PURE__ */ n("label", {
3170
+ h && /* @__PURE__ */ n("label", {
2960
3171
  className: "label",
2961
- htmlFor: p,
2962
- children: [m, _ && /* @__PURE__ */ t(Z, {})]
3172
+ htmlFor: m,
3173
+ children: [h, v && /* @__PURE__ */ t(Q, {})]
2963
3174
  }),
2964
3175
  /* @__PURE__ */ t("wui-autocomplete", {
2965
- "aria-label": typeof m == "string" ? m : void 0,
2966
- id: p,
2967
- ref: b,
2968
- name: p,
3176
+ "aria-label": typeof h == "string" ? h : void 0,
3177
+ id: m,
3178
+ ref: x,
3179
+ name: m,
2969
3180
  placeholder: s,
2970
- remote: x ? "" : void 0,
3181
+ remote: S ? "" : void 0,
2971
3182
  "min-chars": c == null ? void 0 : String(c),
2972
3183
  debounce: u == null ? void 0 : String(u),
2973
3184
  size: f || void 0,
3185
+ "allow-custom": p ? "" : void 0,
2974
3186
  disabled: d ? "" : void 0,
2975
- required: _ ? "" : void 0
3187
+ required: v ? "" : void 0
2976
3188
  }),
2977
- h ? /* @__PURE__ */ t("div", {
3189
+ g ? /* @__PURE__ */ t("div", {
2978
3190
  className: "field-error",
2979
- children: h
2980
- }) : g ? /* @__PURE__ */ t("div", {
2981
- className: "field-hint",
2982
3191
  children: g
3192
+ }) : _ ? /* @__PURE__ */ t("div", {
3193
+ className: "field-hint",
3194
+ children: _
2983
3195
  }) : null
2984
3196
  ]
2985
3197
  });
2986
3198
  }
2987
3199
  //#endregion
2988
3200
  //#region src/components/AppAvatar.jsx
2989
- function Ke(e) {
3201
+ function it(e) {
2990
3202
  let t = (e || "").trim();
2991
3203
  if (!t) return "?";
2992
3204
  let n = t.split(/\s+/).filter(Boolean);
2993
3205
  return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
2994
3206
  }
2995
- function qe({ name: e, src: n, className: r = "", ...i }) {
2996
- E("AppAvatar", i);
3207
+ function at({ name: e, src: n, className: r = "", ...i }) {
3208
+ O("AppAvatar", i);
2997
3209
  let a = ["avatar", r].filter(Boolean).join(" ");
2998
3210
  return n ? /* @__PURE__ */ t("span", {
2999
3211
  className: a,
@@ -3006,13 +3218,13 @@ function qe({ name: e, src: n, className: r = "", ...i }) {
3006
3218
  className: a,
3007
3219
  role: "img",
3008
3220
  "aria-label": e,
3009
- children: Ke(e)
3221
+ children: it(e)
3010
3222
  });
3011
3223
  }
3012
3224
  //#endregion
3013
3225
  //#region src/components/AppBadge.jsx
3014
- function Je({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
3015
- return E("AppBadge", a), /* @__PURE__ */ t(f, {
3226
+ function ot({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
3227
+ return O("AppBadge", a), /* @__PURE__ */ t(f, {
3016
3228
  bg: !1,
3017
3229
  className: [
3018
3230
  n ? `badge-${n}` : "",
@@ -3024,55 +3236,13 @@ function Je({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
3024
3236
  });
3025
3237
  }
3026
3238
  //#endregion
3027
- //#region src/components/AppButton.jsx
3028
- var Ye = {
3029
- primary: "primary",
3030
- secondary: "secondary",
3031
- outline: "outline-primary",
3032
- ghost: "link",
3033
- danger: "danger"
3034
- };
3035
- function Xe(e, n) {
3036
- if (!e) return null;
3037
- let r = n === "left" ? "me-2" : "ms-2";
3038
- return typeof e == "string" ? /* @__PURE__ */ t(k, {
3039
- name: e,
3040
- size: 16,
3041
- className: r
3042
- }) : /* @__PURE__ */ t("span", {
3043
- className: `d-inline-flex ${r}`,
3044
- children: e
3045
- });
3046
- }
3047
- function Q({ children: e, variant: r = "primary", size: i = "md", type: a = "button", loading: o = !1, disabled: s = !1, block: c = !1, leftIcon: l = null, rightIcon: u = null, className: d = "", ...f }) {
3048
- E("AppButton", f);
3049
- let m = [c ? "w-100" : "", d].filter(Boolean).join(" ");
3050
- return /* @__PURE__ */ n(p, {
3051
- type: (f.as === void 0 || f.as === "button") && f.href === void 0 ? a : void 0,
3052
- variant: Ye[r] ?? "primary",
3053
- size: i === "md" ? void 0 : i,
3054
- disabled: s || o,
3055
- className: m || void 0,
3056
- ...f,
3057
- children: [
3058
- o && /* @__PURE__ */ t("span", {
3059
- className: "spinner-border spinner-border-sm me-2",
3060
- "aria-hidden": "true"
3061
- }),
3062
- !o && Xe(l, "left"),
3063
- e,
3064
- !o && Xe(u, "right")
3065
- ]
3066
- });
3067
- }
3068
- //#endregion
3069
3239
  //#region src/components/AppCallout.jsx
3070
- function Ze({ children: e, icon: r = "info", className: i = "", ...a }) {
3071
- return E("AppCallout", a), /* @__PURE__ */ n("div", {
3240
+ function st({ children: e, icon: r = "info", className: i = "", ...a }) {
3241
+ return O("AppCallout", a), /* @__PURE__ */ n("div", {
3072
3242
  className: `info-callout${i ? ` ${i}` : ""}`,
3073
3243
  children: [r && /* @__PURE__ */ t("span", {
3074
3244
  className: "info-callout-icon",
3075
- children: /* @__PURE__ */ t(k, {
3245
+ children: /* @__PURE__ */ t(N, {
3076
3246
  name: r,
3077
3247
  size: 18
3078
3248
  })
@@ -3081,8 +3251,8 @@ function Ze({ children: e, icon: r = "info", className: i = "", ...a }) {
3081
3251
  }
3082
3252
  //#endregion
3083
3253
  //#region src/components/AppCard.jsx
3084
- function Qe({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body: f = !0, lifted: p = !1, ...h }) {
3085
- E("AppCard", h);
3254
+ function ct({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body: f = !0, lifted: p = !1, ...h }) {
3255
+ O("AppCard", h);
3086
3256
  let g = a != null || r != null || o != null || s != null;
3087
3257
  return /* @__PURE__ */ n(m, {
3088
3258
  className: [p ? "card-lifted" : "", l].filter(Boolean).join(" ") || void 0,
@@ -3109,29 +3279,40 @@ function Qe({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
3109
3279
  }
3110
3280
  //#endregion
3111
3281
  //#region src/components/AppCheckbox.jsx
3112
- var $e = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
3113
- E("AppCheckbox", s);
3114
- let l = o(), u = r || i || l;
3282
+ var lt = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c = "", ...l }, u) {
3283
+ O("AppCheckbox", l);
3284
+ let d = o(), f = r || i || d;
3115
3285
  return /* @__PURE__ */ n("div", {
3116
- className: `form-check${a ? ` ${a}` : ""}`,
3117
- children: [/* @__PURE__ */ t("input", {
3118
- type: "checkbox",
3119
- className: "form-check-input",
3120
- id: u,
3121
- name: i,
3122
- ref: c,
3123
- ...s
3124
- }), e != null && /* @__PURE__ */ t("label", {
3125
- className: "form-check-label",
3126
- htmlFor: u,
3127
- children: e
3128
- })]
3286
+ className: `form-check${c ? ` ${c}` : ""}`,
3287
+ children: [
3288
+ /* @__PURE__ */ t("input", {
3289
+ type: "checkbox",
3290
+ className: "form-check-input",
3291
+ id: f,
3292
+ name: i,
3293
+ ref: u,
3294
+ "aria-invalid": a ? "true" : "false",
3295
+ ...l
3296
+ }),
3297
+ e != null && /* @__PURE__ */ t("label", {
3298
+ className: "form-check-label",
3299
+ htmlFor: f,
3300
+ children: e
3301
+ }),
3302
+ a ? /* @__PURE__ */ t("div", {
3303
+ className: "field-error",
3304
+ children: a
3305
+ }) : s ? /* @__PURE__ */ t("div", {
3306
+ className: "field-hint",
3307
+ children: s
3308
+ }) : null
3309
+ ]
3129
3310
  });
3130
3311
  });
3131
3312
  //#endregion
3132
3313
  //#region src/components/AppChip.jsx
3133
- function et({ label: r, children: i, tone: a = "neutral", size: o = "md", leadingIcon: s, avatar: c, onRemove: l, onClick: u, disabled: d = !1, removeLabel: f, className: p = "", ...m }) {
3134
- E("AppChip", m);
3314
+ function ut({ label: r, children: i, tone: a = "neutral", size: o = "md", leadingIcon: s, avatar: c, onRemove: l, onClick: u, disabled: d = !1, removeLabel: f, className: p = "", ...m }) {
3315
+ O("AppChip", m);
3135
3316
  let h = r ?? i, g = [
3136
3317
  "chip",
3137
3318
  a && a !== "neutral" ? a : "",
@@ -3148,7 +3329,7 @@ function et({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3148
3329
  }) : c
3149
3330
  }) : s ? /* @__PURE__ */ t("span", {
3150
3331
  className: "chip-ic",
3151
- children: /* @__PURE__ */ t(k, {
3332
+ children: /* @__PURE__ */ t(N, {
3152
3333
  name: s,
3153
3334
  size: o === "sm" ? 12 : 14
3154
3335
  })
@@ -3173,7 +3354,7 @@ function et({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3173
3354
  onClick: l,
3174
3355
  disabled: d,
3175
3356
  "aria-label": f || (typeof h == "string" ? `Remove ${h}` : "Remove"),
3176
- children: /* @__PURE__ */ t(k, {
3357
+ children: /* @__PURE__ */ t(N, {
3177
3358
  name: "x",
3178
3359
  size: o === "sm" ? 12 : 14
3179
3360
  })
@@ -3182,8 +3363,8 @@ function et({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3182
3363
  }
3183
3364
  //#endregion
3184
3365
  //#region src/components/AppChoiceCard.jsx
3185
- function tt({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon: c, iconNode: l, iconSize: u = 18, image: d, imageAlt: f = "", children: p, title: m, description: h, checkIcon: g = "check", checkSize: _ = 12, className: v = "", ...y }) {
3186
- return E("AppChoiceCard", y), /* @__PURE__ */ n("label", {
3366
+ function dt({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon: c, iconNode: l, iconSize: u = 18, image: d, imageAlt: f = "", children: p, title: m, description: h, checkIcon: g = "check", checkSize: _ = 12, className: v = "", ...y }) {
3367
+ return O("AppChoiceCard", y), /* @__PURE__ */ n("label", {
3187
3368
  className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${v ? ` ${v}` : ""}`,
3188
3369
  children: [
3189
3370
  /* @__PURE__ */ t("input", {
@@ -3203,7 +3384,7 @@ function tt({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3203
3384
  })
3204
3385
  }) : l || c ? /* @__PURE__ */ t("span", {
3205
3386
  className: "struct-card-ic",
3206
- children: l || /* @__PURE__ */ t(k, {
3387
+ children: l || /* @__PURE__ */ t(N, {
3207
3388
  name: c,
3208
3389
  size: u
3209
3390
  })
@@ -3220,7 +3401,7 @@ function tt({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3220
3401
  }),
3221
3402
  /* @__PURE__ */ t("span", {
3222
3403
  className: "struct-card-check",
3223
- children: /* @__PURE__ */ t(k, {
3404
+ children: /* @__PURE__ */ t(N, {
3224
3405
  name: g,
3225
3406
  size: _
3226
3407
  })
@@ -3230,8 +3411,8 @@ function tt({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3230
3411
  }
3231
3412
  //#endregion
3232
3413
  //#region src/components/AppChoiceChip.jsx
3233
- function nt({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
3234
- return E("AppChoiceChip", d), /* @__PURE__ */ n("label", {
3414
+ function ft({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
3415
+ return O("AppChoiceChip", d), /* @__PURE__ */ n("label", {
3235
3416
  className: `choice-chip${o ? " checked" : ""}${u ? ` ${u}` : ""}`,
3236
3417
  children: [
3237
3418
  /* @__PURE__ */ t("input", {
@@ -3251,8 +3432,8 @@ function nt({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChang
3251
3432
  }
3252
3433
  //#endregion
3253
3434
  //#region src/components/AppColorField.jsx
3254
- function rt({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: s, hint: c, name: l, id: u, disabled: d = !1, size: f = "md", className: p = "", ...m }) {
3255
- E("AppColorField", m);
3435
+ function pt({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: s, hint: c, name: l, id: u, disabled: d = !1, size: f = "md", className: p = "", ...m }) {
3436
+ O("AppColorField", m);
3256
3437
  let h = o(), g = u || l || h, _ = (e) => /^#[0-9a-f]{6}$/i.test(e), v = f === "sm" ? " color-field-sm" : f === "lg" ? " color-field-lg" : "", y = f === "sm" ? " input-sm" : f === "lg" ? " input-lg" : "";
3257
3438
  return /* @__PURE__ */ n("div", {
3258
3439
  className: `field${p ? ` ${p}` : ""}`,
@@ -3260,7 +3441,7 @@ function rt({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
3260
3441
  i && /* @__PURE__ */ n("label", {
3261
3442
  className: "label",
3262
3443
  htmlFor: g,
3263
- children: [i, a && /* @__PURE__ */ t(Z, {})]
3444
+ children: [i, a && /* @__PURE__ */ t(Q, {})]
3264
3445
  }),
3265
3446
  /* @__PURE__ */ n("div", {
3266
3447
  className: `color-field${v}`,
@@ -3299,11 +3480,11 @@ function rt({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
3299
3480
  }
3300
3481
  //#endregion
3301
3482
  //#region src/components/AppCompareTable.jsx
3302
- function it({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
3303
- E("AppCompareTable", o);
3483
+ function mt({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
3484
+ O("AppCompareTable", o);
3304
3485
  let s = (e) => e === !0 ? /* @__PURE__ */ t("span", {
3305
3486
  className: "compare-yes",
3306
- children: /* @__PURE__ */ t(k, {
3487
+ children: /* @__PURE__ */ t(N, {
3307
3488
  name: "check",
3308
3489
  size: 16
3309
3490
  })
@@ -3335,157 +3516,132 @@ function it({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o
3335
3516
  }
3336
3517
  //#endregion
3337
3518
  //#region src/components/AppInfoTip.jsx
3338
- function at({ label: e, children: r, ...i }) {
3339
- E("AppInfoTip", i);
3340
- let [a, c] = u(!1), [d, f] = u(null), p = l(null), m = l(null), h = o(), _ = l(!1);
3341
- return s(() => {
3342
- if (!a || !p.current || !m.current) return;
3343
- let e = p.current.getBoundingClientRect(), t = m.current.offsetWidth, n = m.current.offsetHeight, r = e.left + e.width / 2 - t / 2;
3344
- r = Math.max(8, Math.min(r, window.innerWidth - t - 8));
3345
- let i = e.top - n - 8;
3346
- i < 8 && (i = e.bottom + 8), f({
3347
- top: i,
3348
- left: r
3349
- });
3350
- }, [a]), r ? /* @__PURE__ */ n("span", {
3519
+ function ht({ label: e, children: r, placement: i = "auto", ...a }) {
3520
+ O("AppInfoTip", a);
3521
+ let s = o(), [c, l] = u(!1), d = !!e, f = !!r;
3522
+ return !d && !f ? null : /* @__PURE__ */ t("span", {
3351
3523
  className: "infotip",
3352
- onMouseLeave: () => c(!1),
3353
- children: [/* @__PURE__ */ t("button", {
3354
- type: "button",
3355
- ref: p,
3356
- className: "infotip-btn",
3357
- "aria-label": e,
3358
- "aria-expanded": a,
3359
- "aria-describedby": a ? h : void 0,
3360
- onMouseEnter: () => c(!0),
3361
- onClick: () => {
3362
- if (_.current) {
3363
- _.current = !1;
3364
- return;
3365
- }
3366
- c((e) => !e);
3367
- },
3368
- onFocus: () => {
3369
- _.current = !0, c(!0);
3370
- },
3371
- onBlur: () => {
3372
- _.current = !1, c(!1);
3373
- },
3374
- children: /* @__PURE__ */ t(k, {
3375
- name: "info",
3376
- size: 16
3524
+ children: /* @__PURE__ */ t(b, {
3525
+ trigger: ["hover", "focus"],
3526
+ placement: i,
3527
+ overlay: /* @__PURE__ */ n(x, {
3528
+ id: s,
3529
+ children: [d && /* @__PURE__ */ t(x.Header, {
3530
+ as: "h3",
3531
+ children: e
3532
+ }), f && /* @__PURE__ */ t(x.Body, { children: r })]
3533
+ }),
3534
+ onToggle: l,
3535
+ children: /* @__PURE__ */ t("button", {
3536
+ type: "button",
3537
+ className: "infotip-btn",
3538
+ "aria-label": e || "More information",
3539
+ "aria-expanded": c,
3540
+ children: /* @__PURE__ */ t(N, {
3541
+ name: "info",
3542
+ size: 16
3543
+ })
3377
3544
  })
3378
- }), a && g(/* @__PURE__ */ t("span", {
3379
- ref: m,
3380
- className: "infotip-pop is-portal",
3381
- role: "tooltip",
3382
- id: h,
3383
- style: {
3384
- position: "fixed",
3385
- top: d ? d.top : 0,
3386
- left: d ? d.left : 0,
3387
- visibility: d ? "visible" : "hidden"
3388
- },
3389
- children: r
3390
- }), document.body)]
3391
- }) : null;
3545
+ })
3546
+ });
3392
3547
  }
3393
3548
  //#endregion
3394
3549
  //#region src/components/AppInput.jsx
3395
- var ot = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", type: c = "text", size: d = "md", leftIcon: f, rightIcon: p, onRightIconClick: m, rightIconLabel: g, unit: _, id: v, name: y, className: b = "", fieldClassName: x = "", disabled: S = !1, clearable: C = !1, showCount: w = !1, maxLength: T, prefix: D, suffix: O, floatingLabel: A = !1, ...j }, M) {
3396
- E("AppInput", j);
3397
- let [N, ee] = u(!1), P = v || y, F = c === "password", I = F && N ? "text" : c, L = l(null), te = (e) => {
3398
- L.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
3399
- }, R = String(j.value ?? j.defaultValue ?? ""), [z, B] = u(() => !!R), [ne, V] = u(() => R.length), re = C && !S, ie = C || w, ae = (e) => {
3400
- B(!!e.target.value), V(e.target.value.length), j.onInput?.(e);
3401
- }, oe = re ? /* @__PURE__ */ t("button", {
3550
+ var gt = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", type: c = "text", size: d = "md", leftIcon: f, rightIcon: p, onRightIconClick: m, rightIconLabel: h, unit: _, id: v, name: y, className: b = "", fieldClassName: x = "", disabled: S = !1, clearable: C = !1, showCount: w = !1, maxLength: T, prefix: E, suffix: D, floatingLabel: k = !1, ...A }, j) {
3551
+ O("AppInput", A);
3552
+ let [M, ee] = u(!1), P = v || y, te = c === "password", F = te && M ? "text" : c, I = l(null), L = (e) => {
3553
+ I.current = e, typeof j == "function" ? j(e) : j && (j.current = e);
3554
+ }, R = String(A.value ?? A.defaultValue ?? ""), [ne, re] = u(() => !!R), [ie, ae] = u(() => R.length), z = C && !S, B = C || w, V = (e) => {
3555
+ re(!!e.target.value), ae(e.target.value.length), A.onInput?.(e);
3556
+ }, H = z ? /* @__PURE__ */ t("button", {
3402
3557
  type: "button",
3403
3558
  className: "input-clear",
3404
3559
  onClick: () => {
3405
- let e = L.current;
3560
+ let e = I.current;
3406
3561
  if (!e) return;
3407
3562
  let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
3408
- t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), B(!1), e.focus();
3563
+ t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), re(!1), e.focus();
3409
3564
  },
3410
3565
  "aria-label": "Clear",
3411
3566
  tabIndex: -1,
3412
- hidden: !z,
3413
- children: /* @__PURE__ */ t(k, {
3567
+ hidden: !ne,
3568
+ children: /* @__PURE__ */ t(N, {
3414
3569
  name: "x",
3415
3570
  size: 16
3416
3571
  })
3417
- }) : null, se = [
3572
+ }) : null, U = i && P ? `${P}-error` : void 0, W = a && P ? `${P}-hint` : void 0, oe = U || W, G = [
3418
3573
  "input",
3419
3574
  d === "sm" ? "input-sm" : "",
3420
3575
  d === "lg" ? "input-lg" : "",
3421
3576
  i ? "error" : "",
3422
- F ? "pw" : "",
3577
+ te ? "pw" : "",
3423
3578
  _ ? "num-input" : "",
3424
3579
  C ? "has-clear" : "",
3425
3580
  b
3426
- ].filter(Boolean).join(" "), H = /* @__PURE__ */ t(h.Control, {
3581
+ ].filter(Boolean).join(" "), K = /* @__PURE__ */ t(g.Control, {
3427
3582
  id: P,
3428
3583
  name: y,
3429
- type: I,
3430
- className: se,
3584
+ type: F,
3585
+ className: G,
3431
3586
  disabled: S,
3432
3587
  required: r,
3433
3588
  "aria-invalid": i ? "true" : "false",
3589
+ "aria-describedby": oe,
3434
3590
  maxLength: T,
3435
- ...j,
3436
- placeholder: A ? " " : j.placeholder,
3437
- ref: te,
3438
- onInput: ie ? ae : j.onInput
3439
- }), U;
3440
- return U = A && e ? /* @__PURE__ */ n("div", {
3591
+ ...A,
3592
+ placeholder: k ? " " : A.placeholder,
3593
+ ref: L,
3594
+ onInput: B ? V : A.onInput
3595
+ }), q;
3596
+ return q = k && e ? /* @__PURE__ */ n("div", {
3441
3597
  className: "field-float",
3442
- children: [H, /* @__PURE__ */ n("label", {
3598
+ children: [K, /* @__PURE__ */ n("label", {
3443
3599
  className: "float-label",
3444
3600
  htmlFor: P,
3445
- children: [e, r && /* @__PURE__ */ t(Z, {})]
3601
+ children: [e, r && /* @__PURE__ */ t(Q, {})]
3446
3602
  })]
3447
- }) : D || O ? /* @__PURE__ */ n("div", {
3603
+ }) : E || D ? /* @__PURE__ */ n("div", {
3448
3604
  className: "input-affixed",
3449
3605
  children: [
3450
- D != null && /* @__PURE__ */ t("span", {
3606
+ E != null && /* @__PURE__ */ t("span", {
3451
3607
  className: "affix affix-pre",
3452
- children: D
3608
+ children: E
3453
3609
  }),
3454
- H,
3455
- O != null && /* @__PURE__ */ t("span", {
3610
+ K,
3611
+ D != null && /* @__PURE__ */ t("span", {
3456
3612
  className: "affix affix-suf",
3457
- children: O
3613
+ children: D
3458
3614
  })
3459
3615
  ]
3460
3616
  }) : _ ? /* @__PURE__ */ n("div", {
3461
3617
  className: "input-with-unit",
3462
- children: [H, /* @__PURE__ */ t("span", {
3618
+ children: [K, /* @__PURE__ */ t("span", {
3463
3619
  className: "unit",
3464
3620
  children: _
3465
3621
  })]
3466
- }) : F ? /* @__PURE__ */ n("div", {
3622
+ }) : te ? /* @__PURE__ */ n("div", {
3467
3623
  className: "input-wrap",
3468
- children: [H, /* @__PURE__ */ t("button", {
3624
+ children: [K, /* @__PURE__ */ t("button", {
3469
3625
  type: "button",
3470
3626
  className: "pw-toggle",
3471
3627
  onClick: () => ee((e) => !e),
3472
- "aria-label": N ? "Hide password" : "Show password",
3628
+ "aria-label": M ? "Hide password" : "Show password",
3473
3629
  tabIndex: -1,
3474
- children: /* @__PURE__ */ t(k, {
3475
- name: N ? "eye-off" : "eye",
3630
+ children: /* @__PURE__ */ t(N, {
3631
+ name: M ? "eye-off" : "eye",
3476
3632
  size: 18
3477
3633
  })
3478
3634
  })]
3479
3635
  }) : p ? /* @__PURE__ */ n("div", {
3480
3636
  className: "input-wrap",
3481
- children: [H, /* @__PURE__ */ t("button", {
3637
+ children: [K, /* @__PURE__ */ t("button", {
3482
3638
  type: "button",
3483
3639
  className: "pw-toggle",
3484
3640
  onClick: m,
3485
3641
  disabled: !m,
3486
3642
  tabIndex: -1,
3487
- "aria-label": g || p,
3488
- children: /* @__PURE__ */ t(k, {
3643
+ "aria-label": h || p,
3644
+ children: /* @__PURE__ */ t(N, {
3489
3645
  name: p,
3490
3646
  size: 18
3491
3647
  })
@@ -3495,111 +3651,122 @@ var ot = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
3495
3651
  children: [
3496
3652
  f && /* @__PURE__ */ t("span", {
3497
3653
  className: "ic",
3498
- children: /* @__PURE__ */ t(k, {
3654
+ children: /* @__PURE__ */ t(N, {
3499
3655
  name: f,
3500
3656
  size: 16
3501
3657
  })
3502
3658
  }),
3503
- H,
3504
- oe
3659
+ K,
3660
+ H
3505
3661
  ]
3506
3662
  }) : f ? /* @__PURE__ */ n("div", {
3507
3663
  className: "input-icon",
3508
3664
  children: [/* @__PURE__ */ t("span", {
3509
3665
  className: "ic",
3510
- children: /* @__PURE__ */ t(k, {
3666
+ children: /* @__PURE__ */ t(N, {
3511
3667
  name: f,
3512
3668
  size: 16
3513
3669
  })
3514
- }), H]
3515
- }) : H, /* @__PURE__ */ n(h.Group, {
3670
+ }), K]
3671
+ }) : K, /* @__PURE__ */ n(g.Group, {
3516
3672
  className: `field${x ? ` ${x}` : ""}`,
3517
3673
  children: [
3518
- e && !A && /* @__PURE__ */ n(h.Label, {
3674
+ e && !k && /* @__PURE__ */ n(g.Label, {
3519
3675
  className: "label",
3520
3676
  htmlFor: P,
3521
3677
  children: [
3522
3678
  e,
3523
- r && /* @__PURE__ */ t(Z, {}),
3524
- o && /* @__PURE__ */ t(at, {
3679
+ r && /* @__PURE__ */ t(Q, {}),
3680
+ o && /* @__PURE__ */ t(ht, {
3525
3681
  label: s,
3526
3682
  children: o
3527
3683
  })
3528
3684
  ]
3529
3685
  }),
3530
- U,
3686
+ q,
3531
3687
  i ? /* @__PURE__ */ t("div", {
3532
3688
  className: "field-error",
3689
+ id: U,
3533
3690
  children: i
3534
3691
  }) : a ? /* @__PURE__ */ t("div", {
3535
3692
  className: "field-hint",
3693
+ id: W,
3536
3694
  children: a
3537
3695
  }) : null,
3538
3696
  w && /* @__PURE__ */ n("div", {
3539
- className: `field-count${T && ne >= T ? " at-limit" : ""}`,
3540
- children: [ne, T ? ` / ${T}` : ""]
3697
+ className: `field-count${T && ie >= T ? " at-limit" : ""}`,
3698
+ children: [ie, T ? ` / ${T}` : ""]
3541
3699
  })
3542
3700
  ]
3543
3701
  });
3544
- }), st = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
3545
- function ct({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer: c, size: u, wide: d = !1, side: f = !1, maxWidth: p, hideHeader: m = !1, className: h = "", children: g, ...v }) {
3546
- E("AppModal", v);
3547
- let y = l(null);
3702
+ }), _t = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])", vt = {
3703
+ sm: 380,
3704
+ md: 440,
3705
+ lg: 640,
3706
+ xl: 880
3707
+ };
3708
+ function yt({ open: e, eyebrow: r, title: i, subtitle: o, headerIcon: s, tone: c = "default", dismissible: u = !0, onClose: d, footer: f, size: p = "md", placement: m = "center", hideHeader: h = !1, staticBackdrop: g = !1, className: v = "", children: y, ...b }) {
3709
+ O("AppModal", b);
3710
+ let x = l(null);
3548
3711
  a(() => {
3549
3712
  if (!e) return;
3550
- let t = y.current?.closest(".modal-content");
3713
+ let t = x.current?.closest(".modal-content");
3551
3714
  if (!t) return;
3552
- let n = () => Array.from(t.querySelectorAll(st));
3715
+ let n = () => Array.from(t.querySelectorAll(_t));
3553
3716
  (t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
3554
3717
  }, [e]);
3555
- let b = ["wui-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), x = [
3718
+ let S = typeof p == "number" ? p : vt[p] ?? vt.md, C = [
3556
3719
  "wui-modal",
3557
- d ? "wui-modal-wide" : "",
3558
- f ? "wui-modal-side" : "",
3559
- h
3720
+ c === "default" ? "" : `tone-${c}`,
3721
+ v
3560
3722
  ].filter(Boolean).join(" ");
3561
3723
  return /* @__PURE__ */ n(_, {
3562
3724
  show: e,
3563
- onHide: s,
3564
- animation: !1,
3565
- backdrop: !0,
3566
- keyboard: !0,
3725
+ onHide: d,
3726
+ backdrop: !g || "static",
3727
+ keyboard: !g,
3567
3728
  autoFocus: !1,
3568
3729
  enforceFocus: !0,
3569
3730
  restoreFocus: !0,
3570
- size: u,
3571
- centered: !f,
3572
- className: b,
3573
- style: p == null ? void 0 : { "--wui-modal-max-width": typeof p == "number" ? `${p}px` : p },
3731
+ centered: m !== "top",
3732
+ className: "wui-modal-shell",
3733
+ style: { "--wui-modal-max-width": `${S}px` },
3574
3734
  dialogClassName: "wui-rb-dialog",
3575
- contentClassName: x,
3735
+ contentClassName: C,
3576
3736
  backdropClassName: "wui-modal-dim",
3577
- "aria-label": typeof r == "string" ? r : void 0,
3737
+ "aria-label": typeof i == "string" ? i : void 0,
3578
3738
  children: [
3579
- !m && /* @__PURE__ */ n("div", {
3739
+ !h && /* @__PURE__ */ n("div", {
3580
3740
  className: "wui-modal-header",
3581
3741
  children: [/* @__PURE__ */ n("div", {
3582
3742
  className: "wui-modal-heading",
3583
- children: [o && /* @__PURE__ */ t("span", {
3743
+ children: [s && /* @__PURE__ */ t("span", {
3584
3744
  className: "wui-modal-headicon",
3585
- children: /* @__PURE__ */ t(k, {
3586
- name: o,
3745
+ children: /* @__PURE__ */ t(N, {
3746
+ name: s,
3587
3747
  size: 18
3588
3748
  })
3589
3749
  }), /* @__PURE__ */ n("div", {
3590
3750
  className: "wui-modal-headtext",
3591
- children: [/* @__PURE__ */ t("div", {
3592
- className: "wui-modal-title",
3593
- children: r
3594
- }), i && /* @__PURE__ */ t("div", {
3595
- className: "wui-modal-subtitle",
3596
- children: i
3597
- })]
3751
+ children: [
3752
+ r && /* @__PURE__ */ t("div", {
3753
+ className: "wui-modal-eyebrow",
3754
+ children: r
3755
+ }),
3756
+ /* @__PURE__ */ t("div", {
3757
+ className: "wui-modal-title",
3758
+ children: i
3759
+ }),
3760
+ o && /* @__PURE__ */ t("div", {
3761
+ className: "wui-modal-subtitle",
3762
+ children: o
3763
+ })
3764
+ ]
3598
3765
  })]
3599
- }), /* @__PURE__ */ t("button", {
3766
+ }), u && /* @__PURE__ */ t("button", {
3600
3767
  type: "button",
3601
3768
  className: "wui-modal-close",
3602
- onClick: s,
3769
+ onClick: d,
3603
3770
  "aria-label": "Close",
3604
3771
  children: /* @__PURE__ */ t("svg", {
3605
3772
  width: "18",
@@ -3617,54 +3784,60 @@ function ct({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer:
3617
3784
  }),
3618
3785
  /* @__PURE__ */ t("div", {
3619
3786
  className: "wui-modal-body",
3620
- ref: y,
3621
- children: g
3787
+ ref: x,
3788
+ children: y
3622
3789
  }),
3623
- c && /* @__PURE__ */ t("div", {
3790
+ f && /* @__PURE__ */ t("div", {
3624
3791
  className: "wui-modal-footer",
3625
- children: c
3792
+ children: f
3626
3793
  })
3627
3794
  ]
3628
3795
  });
3629
3796
  }
3630
3797
  //#endregion
3631
3798
  //#region src/components/ModalIcons.jsx
3632
- var $ = (e) => function({ size: n = 72 }) {
3799
+ var bt = (e) => function({ size: n = 72 }) {
3633
3800
  return /* @__PURE__ */ t("wui-status-icon", {
3634
3801
  tone: e,
3635
3802
  size: n
3636
3803
  });
3637
- }, lt = {
3638
- success: $("success"),
3639
- error: $("error"),
3640
- warning: $("warning"),
3641
- info: $("info"),
3642
- delete: $("delete")
3804
+ }, xt = {
3805
+ success: bt("success"),
3806
+ error: bt("error"),
3807
+ warning: bt("warning"),
3808
+ info: bt("info"),
3809
+ delete: bt("delete")
3643
3810
  };
3644
3811
  //#endregion
3645
3812
  //#region src/components/AppConfirmDialog.jsx
3646
- function ut({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancelLabel: c = "Cancel", danger: l = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m, ...h }) {
3647
- E("AppConfirmDialog", h);
3648
- let [g, _] = u("");
3813
+ function St({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancelLabel: c = "Cancel", danger: l = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m, loading: h = !1, staticBackdrop: g = !1, placement: _ = "center", ...v }) {
3814
+ O("AppConfirmDialog", v);
3815
+ let [y, b] = u("");
3649
3816
  if (a(() => {
3650
- r || _("");
3817
+ r || b("");
3651
3818
  }, [r]), !r) return null;
3652
- let v = !!f && g.trim() !== f, y = lt[d || (l ? "delete" : "info")];
3653
- return /* @__PURE__ */ t(ct, {
3819
+ let x = !!f && y.trim() !== f, S = xt[d || (l ? "delete" : "info")], C = () => {
3820
+ h || m?.();
3821
+ };
3822
+ return /* @__PURE__ */ t(yt, {
3654
3823
  open: r,
3655
3824
  hideHeader: !0,
3656
3825
  title: i,
3657
- onClose: m,
3826
+ onClose: C,
3827
+ staticBackdrop: g,
3828
+ placement: _,
3658
3829
  className: "wui-confirm",
3659
3830
  footer: /* @__PURE__ */ n("div", {
3660
3831
  className: "wui-confirm-actions",
3661
- children: [/* @__PURE__ */ t(Q, {
3832
+ children: [/* @__PURE__ */ t(L, {
3662
3833
  variant: "secondary",
3663
- onClick: m,
3834
+ disabled: h,
3835
+ onClick: C,
3664
3836
  children: c
3665
- }), /* @__PURE__ */ t(Q, {
3837
+ }), /* @__PURE__ */ t(L, {
3666
3838
  variant: l ? "danger" : "primary",
3667
- disabled: v,
3839
+ disabled: x,
3840
+ loading: h,
3668
3841
  onClick: p,
3669
3842
  children: s
3670
3843
  })]
@@ -3672,9 +3845,9 @@ function ut({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
3672
3845
  children: /* @__PURE__ */ n("div", {
3673
3846
  className: "wui-confirm-content",
3674
3847
  children: [
3675
- y && /* @__PURE__ */ t("span", {
3848
+ S && /* @__PURE__ */ t("span", {
3676
3849
  className: "wui-confirm-icon",
3677
- children: /* @__PURE__ */ t(y, { size: 104 })
3850
+ children: /* @__PURE__ */ t(S, { size: 104 })
3678
3851
  }),
3679
3852
  /* @__PURE__ */ t("h3", {
3680
3853
  className: "wui-confirm-title",
@@ -3686,16 +3859,17 @@ function ut({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
3686
3859
  className: "wui-confirm-msg",
3687
3860
  children: o
3688
3861
  }),
3689
- f && /* @__PURE__ */ t(ot, {
3862
+ f && /* @__PURE__ */ t(gt, {
3690
3863
  fieldClassName: "mt-3 mb-0 w-100 text-start",
3691
3864
  label: /* @__PURE__ */ n(e, { children: [
3692
3865
  "Type ",
3693
3866
  /* @__PURE__ */ t("strong", { children: f }),
3694
3867
  " to confirm"
3695
3868
  ] }),
3696
- value: g,
3697
- onChange: (e) => _(e.target.value),
3698
- "aria-label": `Type ${f} to confirm`
3869
+ value: y,
3870
+ onChange: (e) => b(e.target.value),
3871
+ "aria-label": `Type ${f} to confirm`,
3872
+ disabled: h
3699
3873
  })
3700
3874
  ]
3701
3875
  })
@@ -3703,8 +3877,8 @@ function ut({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
3703
3877
  }
3704
3878
  //#endregion
3705
3879
  //#region src/components/AppSkeleton.jsx
3706
- function dt({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
3707
- return E("AppSkeleton", o), /* @__PURE__ */ t("span", {
3880
+ function Ct({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
3881
+ return O("AppSkeleton", o), /* @__PURE__ */ t("span", {
3708
3882
  className: `skeleton${i ? ` ${i}` : ""}`,
3709
3883
  "aria-hidden": "true",
3710
3884
  style: {
@@ -3716,7 +3890,7 @@ function dt({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "
3716
3890
  ...o
3717
3891
  });
3718
3892
  }
3719
- var ft = [
3893
+ var wt = [
3720
3894
  "r0",
3721
3895
  "r1",
3722
3896
  "r2",
@@ -3725,7 +3899,7 @@ var ft = [
3725
3899
  "r5",
3726
3900
  "r6",
3727
3901
  "r7"
3728
- ], pt = [
3902
+ ], Tt = [
3729
3903
  "c0",
3730
3904
  "c1",
3731
3905
  "c2",
@@ -3735,16 +3909,29 @@ var ft = [
3735
3909
  "c6",
3736
3910
  "c7"
3737
3911
  ];
3738
- function mt({ rows: e = 4, cols: n = 5 }) {
3739
- return ft.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: pt.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(dt, {
3912
+ function Et({ rows: e = 4, cols: n = 5 }) {
3913
+ return wt.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: Tt.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(Ct, {
3740
3914
  width: n === 0 ? "70%" : "50%",
3741
3915
  height: 12
3742
3916
  }) }, e)) }, e));
3743
3917
  }
3744
3918
  //#endregion
3919
+ //#region src/lib/pageWindow.js
3920
+ var Dt = (e, t) => {
3921
+ let n = [];
3922
+ for (let r = e; r <= t; r += 1) n.push(r);
3923
+ return n;
3924
+ };
3925
+ function Ot(e, t, { siblingCount: n = 2, boundaryCount: r = 1 } = {}) {
3926
+ let i = Math.max(1, t), a = Math.min(Math.max(1, e), i);
3927
+ if (i <= n * 2 + 3 + r * 2) return Dt(1, i);
3928
+ let o = Math.max(a - n, r + 2), s = Math.min(a + n, i - r - 1), c = o > r + 2, l = s < i - r - 1, u = Dt(1, r);
3929
+ return u.push(...c ? ["ellipsis-left"] : Dt(r + 1, o - 1)), u.push(...Dt(o, s)), u.push(...l ? ["ellipsis-right"] : Dt(s + 1, i - r)), u.push(...Dt(i - r + 1, i)), u;
3930
+ }
3931
+ //#endregion
3745
3932
  //#region src/components/AppSelectMini.jsx
3746
- function ht({ value: e, onChange: n, options: r = [], placeholder: i = "Select...", name: o, ariaLabel: s, id: c, disabled: u, size: d, icon: f, prefix: p, className: m, ...h }) {
3747
- E("AppSelectMini", h);
3933
+ function kt({ value: e, onChange: n, options: r = [], placeholder: i = "Select...", name: o, ariaLabel: s, id: c, disabled: u, size: d, icon: f, prefix: p, className: m, ...h }) {
3934
+ O("AppSelectMini", h);
3748
3935
  let g = l(null);
3749
3936
  return a(() => {
3750
3937
  g.current && (g.current.options = r.map((e) => ({
@@ -3777,19 +3964,21 @@ function ht({ value: e, onChange: n, options: r = [], placeholder: i = "Select..
3777
3964
  }
3778
3965
  //#endregion
3779
3966
  //#region src/components/AppTablePagination.jsx
3780
- var gt = [
3967
+ var At = [
3781
3968
  5,
3782
3969
  10,
3783
3970
  25,
3784
3971
  50
3785
3972
  ];
3786
- function _t({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = gt, ...d }) {
3787
- return E("AppTablePagination", d), /* @__PURE__ */ n("div", {
3973
+ function jt({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = At, mode: d = "prev-next", ...f }) {
3974
+ O("AppTablePagination", f);
3975
+ let p = d === "numbered", m = p ? Ot(e, r) : null;
3976
+ return /* @__PURE__ */ n("div", {
3788
3977
  className: "table-pagination",
3789
3978
  children: [
3790
3979
  /* @__PURE__ */ n("span", {
3791
3980
  className: "tpg-rows",
3792
- children: ["Rows per page:", /* @__PURE__ */ t(ht, {
3981
+ children: ["Rows per page:", /* @__PURE__ */ t(kt, {
3793
3982
  value: i,
3794
3983
  onChange: (e) => l(Number(e)),
3795
3984
  ariaLabel: "Rows per page",
@@ -3811,44 +4000,59 @@ function _t({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
3811
4000
  }),
3812
4001
  /* @__PURE__ */ n("div", {
3813
4002
  className: "tpg-nav",
3814
- children: [/* @__PURE__ */ t("button", {
3815
- type: "button",
3816
- className: "tpg-arrow",
3817
- onClick: () => c(Math.max(1, e - 1)),
3818
- disabled: e <= 1,
3819
- "aria-label": "Previous page",
3820
- children: /* @__PURE__ */ t(k, {
3821
- name: "arrow-left",
3822
- size: 18
3823
- })
3824
- }), /* @__PURE__ */ t("button", {
3825
- type: "button",
3826
- className: "tpg-arrow",
3827
- onClick: () => c(Math.min(r, e + 1)),
3828
- disabled: e >= r,
3829
- "aria-label": "Next page",
3830
- children: /* @__PURE__ */ t(k, {
3831
- name: "arrow-right",
3832
- size: 18
4003
+ children: [
4004
+ /* @__PURE__ */ t("button", {
4005
+ type: "button",
4006
+ className: "tpg-arrow",
4007
+ onClick: () => c(Math.max(1, e - 1)),
4008
+ disabled: e <= 1,
4009
+ "aria-label": "Previous page",
4010
+ children: /* @__PURE__ */ t(N, {
4011
+ name: "arrow-left",
4012
+ size: 18
4013
+ })
4014
+ }),
4015
+ p && m.map((n) => typeof n == "number" ? /* @__PURE__ */ t("button", {
4016
+ type: "button",
4017
+ className: `tpg-page${n === e ? " is-active" : ""}`,
4018
+ onClick: () => c(n),
4019
+ "aria-current": n === e ? "page" : void 0,
4020
+ "aria-label": `Page ${n}`,
4021
+ children: n
4022
+ }, n) : /* @__PURE__ */ t("span", {
4023
+ className: "tpg-ellipsis",
4024
+ "aria-hidden": "true",
4025
+ children: "…"
4026
+ }, n)),
4027
+ /* @__PURE__ */ t("button", {
4028
+ type: "button",
4029
+ className: "tpg-arrow",
4030
+ onClick: () => c(Math.min(r, e + 1)),
4031
+ disabled: e >= r,
4032
+ "aria-label": "Next page",
4033
+ children: /* @__PURE__ */ t(N, {
4034
+ name: "arrow-right",
4035
+ size: 18
4036
+ })
3833
4037
  })
3834
- })]
4038
+ ]
3835
4039
  })
3836
4040
  ]
3837
4041
  });
3838
4042
  }
3839
4043
  //#endregion
3840
4044
  //#region src/components/AppDataTable.jsx
3841
- function vt(e) {
4045
+ function Mt(e) {
3842
4046
  return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
3843
4047
  }
3844
- function yt(e) {
4048
+ function Nt(e) {
3845
4049
  return e == null || e === "" ? "—" : typeof e == "boolean" ? String(e) : e;
3846
4050
  }
3847
- function bt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s, loading: c = !1, skeletonRows: l = 5, empty: u = "No records found.", emptyFiltered: d, sourceCount: f, rowActions: p, rowActionsLabel: m, pagination: h, ariaLabel: g, className: _ = "", selectable: v = !1, selectedIds: y, onToggleRow: b, onToggleAll: x, ...S }) {
3848
- E("AppDataTable", S);
3849
- let C = Math.max(1, r.length + +!!p + +!!v), w = v && i ? i.reduce((e, t) => e + +!!y?.has(a(t)), 0) : 0, T = v && i && i.length > 0 && w === i.length, D = w > 0 && !T, O = (e) => {
3850
- e && (e.indeterminate = D);
3851
- }, A = d !== void 0 && f > 0 ? d : u;
4051
+ function Pt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s, loading: c = !1, skeletonRows: l = 5, empty: u = "No records found.", emptyFiltered: d, sourceCount: f, rowActions: p, rowActionsLabel: m, pagination: h, ariaLabel: g, className: _ = "", selectable: v = !1, selectedIds: y, onToggleRow: b, onToggleAll: x, ...S }) {
4052
+ O("AppDataTable", S);
4053
+ let C = Math.max(1, r.length + +!!p + +!!v), w = v && i ? i.reduce((e, t, n) => e + +!!y?.has(a(t, n)), 0) : 0, T = v && i && i.length > 0 && w === i.length, E = w > 0 && !T, D = (e) => {
4054
+ e && (e.indeterminate = E);
4055
+ }, k = d !== void 0 && f > 0 ? d : u;
3852
4056
  return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
3853
4057
  className: "table-wrap",
3854
4058
  children: /* @__PURE__ */ n("table", {
@@ -3858,7 +4062,7 @@ function bt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3858
4062
  v && /* @__PURE__ */ t("th", {
3859
4063
  className: "wui-select-cell",
3860
4064
  children: /* @__PURE__ */ t("input", {
3861
- ref: O,
4065
+ ref: D,
3862
4066
  type: "checkbox",
3863
4067
  className: "wui-check",
3864
4068
  checked: T,
@@ -3869,7 +4073,7 @@ function bt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3869
4073
  r.map((e, r) => {
3870
4074
  let i = !!(e.sortable && s), a = o && o.key === e.key;
3871
4075
  return /* @__PURE__ */ n("th", {
3872
- className: (i ? "sortable " : "") + (r === 0 ? "wui-name-cell " : "") + vt(e.align),
4076
+ className: (i ? "sortable " : "") + (r === 0 ? "wui-name-cell " : "") + Mt(e.align),
3873
4077
  style: e.width ? { width: e.width } : void 0,
3874
4078
  tabIndex: i ? 0 : void 0,
3875
4079
  "aria-sort": a ? o.dir === "asc" ? "ascending" : "descending" : i ? "none" : void 0,
@@ -3879,7 +4083,7 @@ function bt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3879
4083
  } : void 0,
3880
4084
  children: [e.label, i && /* @__PURE__ */ t("span", {
3881
4085
  className: "sort-icon",
3882
- children: /* @__PURE__ */ t(k, {
4086
+ children: /* @__PURE__ */ t(N, {
3883
4087
  name: "chevrons-up-down",
3884
4088
  size: 14
3885
4089
  })
@@ -3896,41 +4100,41 @@ function bt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3896
4100
  children: "Actions"
3897
4101
  })
3898
4102
  }))
3899
- ] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(mt, {
4103
+ ] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(Et, {
3900
4104
  rows: l,
3901
4105
  cols: C
3902
- }) : i?.length ? i.map((e) => {
3903
- let i = a(e);
4106
+ }) : i?.length ? i.map((e, i) => {
4107
+ let o = a(e, i);
3904
4108
  return /* @__PURE__ */ n("tr", {
3905
- className: v && y?.has(i) ? "is-selected" : void 0,
4109
+ className: v && y?.has(o) ? "is-selected" : void 0,
3906
4110
  children: [
3907
4111
  v && /* @__PURE__ */ t("td", {
3908
4112
  className: "wui-select-cell",
3909
4113
  children: /* @__PURE__ */ t("input", {
3910
4114
  type: "checkbox",
3911
4115
  className: "wui-check",
3912
- checked: y?.has(i) || !1,
3913
- onChange: () => b?.(i),
4116
+ checked: y?.has(o) || !1,
4117
+ onChange: () => b?.(o),
3914
4118
  "aria-label": "Select row"
3915
4119
  })
3916
4120
  }),
3917
4121
  r.map((n, r) => /* @__PURE__ */ t("td", {
3918
- className: (r === 0 ? "wui-name-cell " : "") + vt(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
3919
- children: n.render ? n.render(e) : yt(e[n.key])
4122
+ className: (r === 0 ? "wui-name-cell " : "") + Mt(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
4123
+ children: n.render ? n.render(e) : Nt(e[n.key])
3920
4124
  }, n.key)),
3921
4125
  p && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", {
3922
4126
  className: "u-row-actions",
3923
4127
  children: p(e)
3924
4128
  }) })
3925
4129
  ]
3926
- }, i);
4130
+ }, o);
3927
4131
  }) : /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
3928
4132
  colSpan: C,
3929
4133
  className: "wui-table-empty",
3930
- children: A
4134
+ children: k
3931
4135
  }) }) })]
3932
4136
  })
3933
- }), h && !c && h.total > 0 && /* @__PURE__ */ t(_t, {
4137
+ }), h && !c && h.total > 0 && /* @__PURE__ */ t(jt, {
3934
4138
  page: h.page,
3935
4139
  totalPages: h.totalPages,
3936
4140
  pageSize: h.pageSize,
@@ -3943,8 +4147,8 @@ function bt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3943
4147
  }
3944
4148
  //#endregion
3945
4149
  //#region src/components/AppDatePicker.jsx
3946
- function xt({ value: e, onChange: r, label: i, required: s = !1, hint: c, error: u, name: d, min: f, max: p, placeholder: m = "Enter Date", disabled: h, size: g, firstDay: _, id: v, ariaLabel: y, className: b = "", ...x }) {
3947
- E("AppDatePicker", x);
4150
+ function Ft({ value: e, onChange: r, label: i, required: s = !1, hint: c, error: u, name: d, min: f, max: p, placeholder: m = "Enter Date", disabled: h, size: g, firstDay: _, id: v, ariaLabel: y, className: b = "", ...x }) {
4151
+ O("AppDatePicker", x);
3948
4152
  let S = l(null), C = o(), w = v || d || C;
3949
4153
  a(() => {
3950
4154
  let t = S.current;
@@ -3955,7 +4159,7 @@ function xt({ value: e, onChange: r, label: i, required: s = !1, hint: c, error:
3955
4159
  let t = () => r?.(e.value);
3956
4160
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
3957
4161
  }, [r]);
3958
- let T = !i && !u && !c, D = /* @__PURE__ */ t("wui-datepicker", {
4162
+ let T = !i && !u && !c, E = /* @__PURE__ */ t("wui-datepicker", {
3959
4163
  ref: S,
3960
4164
  id: w,
3961
4165
  name: d,
@@ -3970,7 +4174,7 @@ function xt({ value: e, onChange: r, label: i, required: s = !1, hint: c, error:
3970
4174
  required: s ? "" : void 0,
3971
4175
  className: T && b || void 0
3972
4176
  });
3973
- return T ? D : /* @__PURE__ */ n("div", {
4177
+ return T ? E : /* @__PURE__ */ n("div", {
3974
4178
  className: `field${b ? ` ${b}` : ""}`,
3975
4179
  children: [
3976
4180
  i && /* @__PURE__ */ n("label", {
@@ -3982,7 +4186,7 @@ function xt({ value: e, onChange: r, label: i, required: s = !1, hint: c, error:
3982
4186
  children: "*"
3983
4187
  })]
3984
4188
  }),
3985
- D,
4189
+ E,
3986
4190
  u && /* @__PURE__ */ t("div", {
3987
4191
  className: "field-error",
3988
4192
  children: u
@@ -3996,9 +4200,9 @@ function xt({ value: e, onChange: r, label: i, required: s = !1, hint: c, error:
3996
4200
  }
3997
4201
  //#endregion
3998
4202
  //#region src/components/AppDateRangePicker.jsx
3999
- function St({ start: e, end: r, onChange: i, label: s, required: c = !1, hint: u, error: d, startName: f, endName: p, min: m, max: h, placeholder: g = "Start – End", disabled: _, size: v, firstDay: y, id: b, ariaLabel: x, className: S = "", ...C }) {
4000
- E("AppDateRangePicker", C);
4001
- let w = l(null), T = o(), D = b || f || T;
4203
+ function It({ start: e, end: r, onChange: i, label: s, required: c = !1, hint: u, error: d, startName: f, endName: p, min: m, max: h, placeholder: g = "Start – End", disabled: _, size: v, firstDay: y, id: b, ariaLabel: x, className: S = "", ...C }) {
4204
+ O("AppDateRangePicker", C);
4205
+ let w = l(null), T = o(), E = b || f || T;
4002
4206
  a(() => {
4003
4207
  let t = w.current;
4004
4208
  t && t.value.start !== (e ?? "") && t.setAttribute("start", e ?? "");
@@ -4011,9 +4215,9 @@ function St({ start: e, end: r, onChange: i, label: s, required: c = !1, hint: u
4011
4215
  let t = () => i?.(e.value);
4012
4216
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
4013
4217
  }, [i]);
4014
- let O = !s && !d && !u, k = /* @__PURE__ */ t("wui-date-range", {
4218
+ let D = !s && !d && !u, k = /* @__PURE__ */ t("wui-date-range", {
4015
4219
  ref: w,
4016
- id: D,
4220
+ id: E,
4017
4221
  "start-name": f,
4018
4222
  "end-name": p,
4019
4223
  min: m,
@@ -4025,14 +4229,14 @@ function St({ start: e, end: r, onChange: i, label: s, required: c = !1, hint: u
4025
4229
  "aria-invalid": d ? "true" : void 0,
4026
4230
  disabled: _ ? "" : void 0,
4027
4231
  required: c ? "" : void 0,
4028
- className: O && S || void 0
4232
+ className: D && S || void 0
4029
4233
  });
4030
- return O ? k : /* @__PURE__ */ n("div", {
4234
+ return D ? k : /* @__PURE__ */ n("div", {
4031
4235
  className: `field${S ? ` ${S}` : ""}`,
4032
4236
  children: [
4033
4237
  s && /* @__PURE__ */ n("label", {
4034
4238
  className: "label",
4035
- htmlFor: D,
4239
+ htmlFor: E,
4036
4240
  children: [s, c && /* @__PURE__ */ t("span", {
4037
4241
  className: "required",
4038
4242
  "aria-hidden": "true",
@@ -4053,7 +4257,7 @@ function St({ start: e, end: r, onChange: i, label: s, required: c = !1, hint: u
4053
4257
  }
4054
4258
  //#endregion
4055
4259
  //#region src/components/AppDropdown.jsx
4056
- var Ct = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
4260
+ var Lt = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
4057
4261
  return /* @__PURE__ */ t("button", {
4058
4262
  ref: l,
4059
4263
  type: "button",
@@ -4061,26 +4265,27 @@ var Ct = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-
4061
4265
  title: i,
4062
4266
  "aria-label": o,
4063
4267
  ...c,
4064
- children: /* @__PURE__ */ t(k, {
4268
+ children: /* @__PURE__ */ t(N, {
4065
4269
  name: e,
4066
4270
  size: n
4067
4271
  })
4068
4272
  });
4069
4273
  });
4070
- function wt({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u, ...d }) {
4071
- return E("AppDropdown", d), /* @__PURE__ */ n(v, {
4274
+ function Rt({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u, children: d, ...f }) {
4275
+ return O("AppDropdown", f), /* @__PURE__ */ n(h, {
4072
4276
  align: s,
4073
- children: [/* @__PURE__ */ t(v.Toggle, {
4074
- as: Ct,
4277
+ children: [/* @__PURE__ */ t(h.Toggle, {
4278
+ as: Lt,
4075
4279
  icon: e,
4076
4280
  iconSize: r,
4077
4281
  btnClassName: i,
4078
4282
  title: a,
4079
4283
  "aria-label": o
4080
- }), /* @__PURE__ */ t(v.Menu, {
4284
+ }), /* @__PURE__ */ t(h.Menu, {
4081
4285
  className: l,
4082
4286
  renderOnMount: !0,
4083
- children: c.map((e) => {
4287
+ children: d ?? c.map((e) => {
4288
+ if (e.divider) return /* @__PURE__ */ t(h.Divider, {}, e.key);
4084
4289
  let r = e.to ? u ? {
4085
4290
  as: u,
4086
4291
  to: e.to
@@ -4091,14 +4296,14 @@ function wt({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
4091
4296
  as: "button",
4092
4297
  type: "button"
4093
4298
  };
4094
- return /* @__PURE__ */ n(v.Item, {
4299
+ return /* @__PURE__ */ n(h.Item, {
4095
4300
  ...r,
4096
4301
  onClick: e.onClick,
4097
4302
  className: e.danger ? "danger" : void 0,
4098
4303
  children: [e.image ? /* @__PURE__ */ t("img", {
4099
4304
  src: e.image,
4100
4305
  alt: ""
4101
- }) : e.icon && /* @__PURE__ */ t(k, {
4306
+ }) : e.icon && /* @__PURE__ */ t(N, {
4102
4307
  name: e.icon,
4103
4308
  size: 16
4104
4309
  }), e.label]
@@ -4108,69 +4313,36 @@ function wt({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
4108
4313
  });
4109
4314
  }
4110
4315
  //#endregion
4111
- //#region src/components/AppEmptyState.jsx
4112
- function Tt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
4113
- return E("AppEmptyState", u), /* @__PURE__ */ n("div", {
4114
- className: [
4115
- "empty-state",
4116
- i === "sm" ? "empty-state-sm" : "",
4117
- c
4118
- ].filter(Boolean).join(" "),
4119
- style: l,
4120
- children: [
4121
- e ? /* @__PURE__ */ t("div", {
4122
- className: "empty-state-icon",
4123
- children: /* @__PURE__ */ t(k, {
4124
- name: e,
4125
- size: r
4126
- })
4127
- }) : null,
4128
- a != null && /* @__PURE__ */ t("div", {
4129
- className: "empty-state-title",
4130
- children: a
4131
- }),
4132
- o != null && /* @__PURE__ */ t("div", {
4133
- className: "empty-state-message",
4134
- children: o
4135
- }),
4136
- s && /* @__PURE__ */ t("div", {
4137
- className: "empty-state-action",
4138
- children: s
4139
- })
4140
- ]
4141
- });
4142
- }
4143
- //#endregion
4144
- //#region src/components/AppFileAttachment.jsx
4145
- function Et({ label: r = "Attachment", value: i, name: s, onChange: c, accept: l = Le, maxSizeMb: d = 5, optional: f = !1, error: p, id: m, ...h }) {
4146
- E("AppFileAttachment", h);
4147
- let g = o(), _ = m || s || g, [v, y] = u(null), [b, x] = u("");
4148
- a(() => {
4149
- if (i instanceof File) {
4150
- let e = URL.createObjectURL(i);
4151
- return y(e), () => URL.revokeObjectURL(e);
4152
- }
4153
- y(i?.url || null);
4154
- }, [i]);
4155
- function S(e) {
4156
- let t = e.target.files?.[0];
4157
- if (e.target.value = "", !t) return;
4158
- let n = Ue(t, {
4159
- accept: l,
4160
- maxSizeMb: d
4161
- });
4162
- if (n) {
4163
- x(n);
4164
- return;
4165
- }
4166
- x(""), c(t);
4167
- }
4168
- function C() {
4169
- x(""), c(null);
4170
- }
4171
- let w = i instanceof File ? i.name : i?.name, T = i instanceof File ? `${(i.size / 1024).toFixed(0)} KB` : null, D = p || b;
4172
- return /* @__PURE__ */ n("div", {
4173
- className: "field",
4316
+ //#region src/components/AppFileAttachment.jsx
4317
+ function zt({ label: r = "Attachment", value: i, name: a, onChange: s, multiple: c = !1, accept: l = Ke, maxSizeMb: d = 5, optional: f = !1, error: p, id: m, ...h }) {
4318
+ O("AppFileAttachment", h);
4319
+ let g = o(), _ = m || a || g, [v, y] = u(""), b = c && Array.isArray(i) ? i : i ? [i] : [], x = Qe(l), S = (e) => e instanceof File ? Ze(e) : x || Ze(e), C = !c && b.length === 1 && S(b[0]);
4320
+ function w(e) {
4321
+ let t = Array.from(e.target.files || []);
4322
+ if (e.target.value = "", !t.length) return;
4323
+ let n = [], r = "";
4324
+ for (let e of t) {
4325
+ let t = tt(e, {
4326
+ accept: l,
4327
+ maxSizeMb: d
4328
+ });
4329
+ if (t) {
4330
+ r ||= t;
4331
+ continue;
4332
+ }
4333
+ n.push(e);
4334
+ }
4335
+ if (y(r), n.length) if (c) {
4336
+ let e = Array.isArray(i) ? i : i ? [i] : [], t = new Set(e.map(Bt));
4337
+ s(e.concat(n.filter((e) => !t.has(Bt(e)))));
4338
+ } else s(n[0]);
4339
+ }
4340
+ function T(e) {
4341
+ y(""), s(c ? b.filter((t, n) => n !== e) : null);
4342
+ }
4343
+ let E = p || v, D = c || b.length === 0, k = x ? "image" : "file", A = c ? `Add ${k}s` : `Add ${x ? "an" : "a"} ${k}`;
4344
+ return /* @__PURE__ */ n("div", {
4345
+ className: "field",
4174
4346
  children: [
4175
4347
  /* @__PURE__ */ n("label", {
4176
4348
  className: "label",
@@ -4180,41 +4352,14 @@ function Et({ label: r = "Attachment", value: i, name: s, onChange: c, accept: l
4180
4352
  children: " (optional)"
4181
4353
  })]
4182
4354
  }),
4183
- i ? /* @__PURE__ */ n("div", {
4184
- className: "attach-preview",
4185
- children: [/* @__PURE__ */ n("div", {
4186
- className: "attach-figure",
4187
- children: [/* @__PURE__ */ t("img", {
4188
- src: v,
4189
- alt: w
4190
- }), /* @__PURE__ */ t("button", {
4191
- type: "button",
4192
- className: "attach-remove",
4193
- "aria-label": "Remove attachment",
4194
- onClick: C,
4195
- children: /* @__PURE__ */ t(k, {
4196
- name: "x",
4197
- size: 18
4198
- })
4199
- })]
4200
- }), /* @__PURE__ */ n("div", {
4201
- className: "attach-meta",
4202
- children: [/* @__PURE__ */ t("div", {
4203
- className: "attach-name",
4204
- children: w
4205
- }), T && /* @__PURE__ */ t("div", {
4206
- className: "attach-size",
4207
- children: T
4208
- })]
4209
- })]
4210
- }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("label", {
4355
+ D && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("label", {
4211
4356
  className: "attach-drop",
4212
4357
  htmlFor: _,
4213
4358
  children: [
4214
4359
  /* @__PURE__ */ t("span", {
4215
4360
  className: "attach-drop-icon",
4216
- children: /* @__PURE__ */ t(k, {
4217
- name: "image",
4361
+ children: /* @__PURE__ */ t(N, {
4362
+ name: x ? "image" : "file-text",
4218
4363
  size: 18
4219
4364
  })
4220
4365
  }),
@@ -4222,11 +4367,12 @@ function Et({ label: r = "Attachment", value: i, name: s, onChange: c, accept: l
4222
4367
  className: "attach-drop-copy",
4223
4368
  children: [/* @__PURE__ */ t("span", {
4224
4369
  className: "attach-drop-title",
4225
- children: "Add an image"
4370
+ children: A
4226
4371
  }), /* @__PURE__ */ n("span", {
4227
4372
  className: "attach-drop-hint",
4228
4373
  children: [
4229
- "PNG, JPG or WEBP, up to ",
4374
+ $e(l),
4375
+ ", up to ",
4230
4376
  d,
4231
4377
  " MB"
4232
4378
  ]
@@ -4240,95 +4386,209 @@ function Et({ label: r = "Attachment", value: i, name: s, onChange: c, accept: l
4240
4386
  }), /* @__PURE__ */ t("input", {
4241
4387
  id: _,
4242
4388
  type: "file",
4243
- className: "visually-hidden-input",
4244
- name: s,
4389
+ hidden: !0,
4390
+ name: a,
4245
4391
  accept: l,
4246
- onChange: S
4392
+ multiple: c || void 0,
4393
+ onChange: w
4247
4394
  })] }),
4248
- D && /* @__PURE__ */ t("div", {
4395
+ C ? /* @__PURE__ */ t(Ut, {
4396
+ item: b[0],
4397
+ isImage: !0,
4398
+ onRemove: () => T(0)
4399
+ }) : b.length > 0 && /* @__PURE__ */ t("div", {
4400
+ className: "attach-list",
4401
+ children: b.map((e, n) => /* @__PURE__ */ t(Wt, {
4402
+ item: e,
4403
+ isImage: S(e),
4404
+ onRemove: () => T(n)
4405
+ }, Bt(e)))
4406
+ }),
4407
+ E && /* @__PURE__ */ t("div", {
4249
4408
  className: "field-error",
4250
- children: D
4409
+ children: E
4251
4410
  })
4252
4411
  ]
4253
4412
  });
4254
4413
  }
4255
- //#endregion
4256
- //#region src/components/toast.js
4257
- var Dt = /* @__PURE__ */ new Set([
4258
- "success",
4259
- "info",
4260
- "warning",
4261
- "error"
4262
- ]);
4263
- function Ot(e, t = "success") {
4264
- let n = Dt.has(t) ? t : "success";
4265
- y[n](e, { toastId: `${n}:${e}` });
4414
+ function Bt(e) {
4415
+ return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
4416
+ }
4417
+ function Vt(e) {
4418
+ return e instanceof File ? e.name : e?.name;
4266
4419
  }
4267
- function kt(e) {
4268
- y.error(e, { toastId: `error:${e}` });
4420
+ function Ht(e, t) {
4421
+ let [n, r] = u(null);
4422
+ return a(() => {
4423
+ if (!t) {
4424
+ r(null);
4425
+ return;
4426
+ }
4427
+ if (e instanceof File) {
4428
+ let t = URL.createObjectURL(e);
4429
+ return r(t), () => URL.revokeObjectURL(t);
4430
+ }
4431
+ r(e?.url || null);
4432
+ }, [e, t]), n;
4433
+ }
4434
+ function Ut({ item: e, isImage: r, onRemove: i }) {
4435
+ let a = Ht(e, r), o = Vt(e), s = e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
4436
+ return /* @__PURE__ */ n("div", {
4437
+ className: "attach-preview",
4438
+ children: [/* @__PURE__ */ n("div", {
4439
+ className: "attach-figure",
4440
+ children: [/* @__PURE__ */ t("img", {
4441
+ src: a,
4442
+ alt: o
4443
+ }), /* @__PURE__ */ t("button", {
4444
+ type: "button",
4445
+ className: "attach-remove",
4446
+ "aria-label": "Remove attachment",
4447
+ onClick: i,
4448
+ children: /* @__PURE__ */ t(N, {
4449
+ name: "x",
4450
+ size: 18
4451
+ })
4452
+ })]
4453
+ }), /* @__PURE__ */ n("div", {
4454
+ className: "attach-meta",
4455
+ children: [/* @__PURE__ */ t("div", {
4456
+ className: "attach-name",
4457
+ children: o
4458
+ }), s && /* @__PURE__ */ t("div", {
4459
+ className: "attach-size",
4460
+ children: s
4461
+ })]
4462
+ })]
4463
+ });
4464
+ }
4465
+ function Wt({ item: e, isImage: r, onRemove: i }) {
4466
+ let a = Ht(e, r), o = Vt(e), s = e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
4467
+ return /* @__PURE__ */ n("div", {
4468
+ className: "attach-item",
4469
+ children: [
4470
+ /* @__PURE__ */ t("span", {
4471
+ className: "attach-item-media",
4472
+ children: a ? /* @__PURE__ */ t("img", {
4473
+ src: a,
4474
+ alt: o
4475
+ }) : /* @__PURE__ */ t(N, {
4476
+ name: "file-text",
4477
+ size: 18
4478
+ })
4479
+ }),
4480
+ /* @__PURE__ */ n("span", {
4481
+ className: "attach-item-info",
4482
+ children: [/* @__PURE__ */ t("span", {
4483
+ className: "attach-name",
4484
+ children: o
4485
+ }), s && /* @__PURE__ */ t("span", {
4486
+ className: "attach-size",
4487
+ children: s
4488
+ })]
4489
+ }),
4490
+ /* @__PURE__ */ t("button", {
4491
+ type: "button",
4492
+ className: "attach-item-remove",
4493
+ "aria-label": `Remove ${o || "attachment"}`,
4494
+ onClick: i,
4495
+ children: /* @__PURE__ */ t(N, {
4496
+ name: "x",
4497
+ size: 16
4498
+ })
4499
+ })
4500
+ ]
4501
+ });
4269
4502
  }
4270
4503
  //#endregion
4271
4504
  //#region src/components/AppFilePicker.jsx
4272
- function At({ label: e, value: r, name: i, onPick: s, accept: c = ".jpg,.jpeg,.png", maxSizeMb: d = 5, required: f, error: p, ...m }) {
4273
- E("AppFilePicker", m);
4274
- let [h, g] = u(null), [_, v] = u(!1), y = l(null), b = o(), x = i || b;
4505
+ function Gt({ label: e, value: r, name: i, onPick: s, multiple: c = !1, maxFiles: d, accept: f = ".jpg,.jpeg,.png", maxSizeMb: p = 5, required: m, error: h, className: g = "", ..._ }) {
4506
+ O("AppFilePicker", _);
4507
+ let [v, y] = u(null), [b, x] = u(!1), [S, C] = u(""), w = l(null), T = o(), E = i || T;
4275
4508
  a(() => {
4276
- if (r instanceof File) {
4509
+ if (!c && r instanceof File) {
4277
4510
  let e = URL.createObjectURL(r);
4278
- return g(e), () => URL.revokeObjectURL(e);
4511
+ return y(e), () => URL.revokeObjectURL(e);
4279
4512
  }
4280
- g(null);
4281
- }, [r]);
4282
- let S = r?.url || h, C = (e) => {
4283
- let t = Ue(e, {
4284
- accept: c,
4285
- maxSizeMb: d
4513
+ y(null);
4514
+ }, [r, c]);
4515
+ let D = c ? Array.isArray(r) ? r : r ? [r] : [] : [], k = c ? null : r?.url || v, A = h || S, j = Qe(f), M = (e) => {
4516
+ let t = tt(e, {
4517
+ accept: f,
4518
+ maxSizeMb: p
4286
4519
  });
4287
- return t ? (Ot(t, "error"), !1) : (s(e), !0);
4288
- }, w = (e) => {
4520
+ return t ? (C(t), !1) : (C(""), s(e), !0);
4521
+ }, ee = (e) => {
4522
+ let t = Array.from(e || []);
4523
+ if (!t.length) return;
4524
+ let n = Array.isArray(r) ? r : r ? [r] : [], i = new Set(n.map(Kt)), a = "", o = [];
4525
+ for (let e of t) {
4526
+ let t = tt(e, {
4527
+ accept: f,
4528
+ maxSizeMb: p
4529
+ });
4530
+ if (t) {
4531
+ a ||= t;
4532
+ continue;
4533
+ }
4534
+ i.has(Kt(e)) || (i.add(Kt(e)), o.push(e));
4535
+ }
4536
+ let c = n.concat(o);
4537
+ d && c.length > d && (c = c.slice(0, d), a ||= `Up to ${d} files.`), C(a), s(c);
4538
+ }, P = (e) => {
4539
+ if (c) {
4540
+ ee(e.target.files);
4541
+ return;
4542
+ }
4289
4543
  let t = e.target.files?.[0] || null;
4290
- t && (C(t) || (e.target.value = ""));
4291
- }, T = (e) => {
4292
- e.preventDefault(), v(!1);
4544
+ t && (M(t) || (e.target.value = ""));
4545
+ }, te = (e) => {
4546
+ if (e.preventDefault(), x(!1), c) {
4547
+ ee(e.dataTransfer.files);
4548
+ return;
4549
+ }
4293
4550
  let t = e.dataTransfer.files?.[0];
4294
- t && C(t);
4295
- }, D = () => y.current?.click(), O = /* @__PURE__ */ t("input", {
4296
- id: x,
4551
+ t && M(t);
4552
+ }, F = (e) => {
4553
+ C(""), s(D.filter((t, n) => n !== e));
4554
+ }, I = () => w.current?.click(), L = /* @__PURE__ */ t("input", {
4555
+ id: E,
4297
4556
  name: i,
4298
- ref: y,
4557
+ ref: w,
4299
4558
  type: "file",
4300
- accept: c,
4559
+ accept: f,
4560
+ multiple: c || void 0,
4301
4561
  hidden: !0,
4302
4562
  onClick: (e) => {
4303
4563
  e.currentTarget.value = "";
4304
4564
  },
4305
- onChange: w
4565
+ onChange: P
4306
4566
  });
4307
4567
  return /* @__PURE__ */ n("div", {
4308
- className: "field",
4568
+ className: `field${g ? ` ${g}` : ""}`,
4309
4569
  children: [
4310
4570
  /* @__PURE__ */ n("label", {
4311
4571
  className: "label",
4312
- htmlFor: x,
4313
- children: [e, f && /* @__PURE__ */ t(Z, {})]
4572
+ htmlFor: E,
4573
+ children: [e, m && /* @__PURE__ */ t(Q, {})]
4314
4574
  }),
4315
- S ? /* @__PURE__ */ n("div", {
4316
- className: `file-preview${p ? " error" : ""}`,
4575
+ k ? /* @__PURE__ */ n("div", {
4576
+ className: `file-preview${A ? " error" : ""}`,
4317
4577
  children: [
4318
4578
  /* @__PURE__ */ n("button", {
4319
4579
  type: "button",
4320
4580
  className: "file-preview-open",
4321
4581
  "aria-label": `Change ${e}`,
4322
- onClick: D,
4582
+ onClick: I,
4323
4583
  children: [/* @__PURE__ */ t("img", {
4324
- src: S,
4584
+ src: k,
4325
4585
  alt: `${e} preview`,
4326
4586
  className: "file-preview-img"
4327
4587
  }), /* @__PURE__ */ t("span", {
4328
4588
  className: "file-preview-overlay",
4329
4589
  children: /* @__PURE__ */ n("span", {
4330
4590
  className: "file-preview-cta",
4331
- children: [/* @__PURE__ */ t(k, {
4591
+ children: [/* @__PURE__ */ t(N, {
4332
4592
  name: "image",
4333
4593
  size: 16
4334
4594
  }), " Change image"]
@@ -4341,67 +4601,132 @@ function At({ label: e, value: r, name: i, onPick: s, accept: c = ".jpg,.jpeg,.p
4341
4601
  "aria-label": `Remove ${e}`,
4342
4602
  title: "Remove image",
4343
4603
  onClick: () => s(null),
4344
- children: /* @__PURE__ */ t(k, {
4604
+ children: /* @__PURE__ */ t(N, {
4345
4605
  name: "x",
4346
4606
  size: 16
4347
4607
  })
4348
4608
  }),
4349
- O
4609
+ L
4350
4610
  ]
4351
4611
  }) : /* @__PURE__ */ n("div", {
4352
- className: `file-input file-input-tall${_ ? " dragging" : ""}${p ? " error" : ""}`,
4612
+ className: `file-input file-input-tall${b ? " dragging" : ""}${A ? " error" : ""}${c && D.length > 0 ? " has-files" : ""}`,
4353
4613
  onDragOver: (e) => {
4354
- e.preventDefault(), _ || v(!0);
4614
+ e.preventDefault(), b || x(!0);
4355
4615
  },
4356
4616
  onDragLeave: (e) => {
4357
- e.preventDefault(), v(!1);
4617
+ e.preventDefault(), x(!1);
4358
4618
  },
4359
- onDrop: T,
4360
- children: [/* @__PURE__ */ n("label", {
4361
- htmlFor: x,
4362
- className: "file-input-zone-label",
4363
- children: [
4364
- /* @__PURE__ */ t("span", {
4365
- className: "file-input-icon",
4366
- children: /* @__PURE__ */ t(k, {
4367
- name: "upload",
4368
- size: 24
4619
+ onDrop: te,
4620
+ children: [
4621
+ /* @__PURE__ */ n("label", {
4622
+ htmlFor: E,
4623
+ className: "file-input-zone-label",
4624
+ children: [
4625
+ /* @__PURE__ */ t("span", {
4626
+ className: "file-input-icon",
4627
+ children: /* @__PURE__ */ t(N, {
4628
+ name: "upload",
4629
+ size: 24
4630
+ })
4631
+ }),
4632
+ /* @__PURE__ */ n("span", {
4633
+ className: "file-input-title",
4634
+ children: [/* @__PURE__ */ t("span", {
4635
+ className: "browse",
4636
+ children: "Click to upload"
4637
+ }), " or drag & drop"]
4638
+ }),
4639
+ /* @__PURE__ */ n("span", {
4640
+ className: "file-input-text",
4641
+ children: [
4642
+ $e(f),
4643
+ " · up to ",
4644
+ p,
4645
+ " MB"
4646
+ ]
4369
4647
  })
4370
- }),
4371
- /* @__PURE__ */ n("span", {
4372
- className: "file-input-title",
4373
- children: [/* @__PURE__ */ t("span", {
4374
- className: "browse",
4375
- children: "Click to upload"
4376
- }), " or drag & drop"]
4377
- }),
4378
- /* @__PURE__ */ n("span", {
4379
- className: "file-input-text",
4380
- children: [
4381
- "JPG, JPEG or PNG · up to ",
4382
- d,
4383
- " MB"
4384
- ]
4385
- })
4386
- ]
4387
- }), O]
4648
+ ]
4649
+ }),
4650
+ L,
4651
+ c && D.length > 0 && /* @__PURE__ */ t("div", {
4652
+ className: "attach-list",
4653
+ children: D.map((e, n) => /* @__PURE__ */ t(qt, {
4654
+ item: e,
4655
+ isImage: e instanceof File ? Ze(e) : j || Ze(e),
4656
+ onRemove: () => F(n)
4657
+ }, Kt(e)))
4658
+ })
4659
+ ]
4388
4660
  }),
4389
- p && /* @__PURE__ */ t("div", {
4661
+ A && /* @__PURE__ */ t("div", {
4390
4662
  className: "field-error",
4391
- children: p
4663
+ children: A
4664
+ })
4665
+ ]
4666
+ });
4667
+ }
4668
+ function Kt(e) {
4669
+ return e instanceof File ? `${e.name}:${e.size}` : e?.url || e?.name || "item";
4670
+ }
4671
+ function qt({ item: e, isImage: r, onRemove: i }) {
4672
+ let [o, s] = u(null);
4673
+ a(() => {
4674
+ if (!r) {
4675
+ s(null);
4676
+ return;
4677
+ }
4678
+ if (e instanceof File) {
4679
+ let t = URL.createObjectURL(e);
4680
+ return s(t), () => URL.revokeObjectURL(t);
4681
+ }
4682
+ s(e?.url || null);
4683
+ }, [e, r]);
4684
+ let c = e instanceof File ? e.name : e?.name, l = e instanceof File ? `${(e.size / 1024).toFixed(0)} KB` : null;
4685
+ return /* @__PURE__ */ n("div", {
4686
+ className: "attach-item",
4687
+ children: [
4688
+ /* @__PURE__ */ t("span", {
4689
+ className: "attach-item-media",
4690
+ children: o ? /* @__PURE__ */ t("img", {
4691
+ src: o,
4692
+ alt: c
4693
+ }) : /* @__PURE__ */ t(N, {
4694
+ name: "file-text",
4695
+ size: 18
4696
+ })
4697
+ }),
4698
+ /* @__PURE__ */ n("span", {
4699
+ className: "attach-item-info",
4700
+ children: [/* @__PURE__ */ t("span", {
4701
+ className: "attach-name",
4702
+ children: c
4703
+ }), l && /* @__PURE__ */ t("span", {
4704
+ className: "attach-size",
4705
+ children: l
4706
+ })]
4707
+ }),
4708
+ /* @__PURE__ */ t("button", {
4709
+ type: "button",
4710
+ className: "attach-item-remove",
4711
+ "aria-label": `Remove ${c || "file"}`,
4712
+ onClick: i,
4713
+ children: /* @__PURE__ */ t(N, {
4714
+ name: "x",
4715
+ size: 16
4716
+ })
4392
4717
  })
4393
4718
  ]
4394
4719
  });
4395
4720
  }
4396
4721
  //#endregion
4397
4722
  //#region src/components/AppInfoList.jsx
4398
- function jt({ items: r = [], className: i = "", ...a }) {
4399
- return E("AppInfoList", a), /* @__PURE__ */ t("div", {
4723
+ function Jt({ items: r = [], className: i = "", ...a }) {
4724
+ return O("AppInfoList", a), /* @__PURE__ */ t("div", {
4400
4725
  className: `info-list${i ? ` ${i}` : ""}`,
4401
4726
  children: r.map((r, i) => {
4402
4727
  let a = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
4403
4728
  className: "info-icon",
4404
- children: /* @__PURE__ */ t(k, {
4729
+ children: /* @__PURE__ */ t(N, {
4405
4730
  name: r.icon,
4406
4731
  size: 16
4407
4732
  })
@@ -4428,15 +4753,15 @@ function jt({ items: r = [], className: i = "", ...a }) {
4428
4753
  }
4429
4754
  //#endregion
4430
4755
  //#region src/components/AppKpiTile.jsx
4431
- function Mt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
4432
- E("AppKpiTile", l);
4433
- let u = `kpi${s ? " kpi-inline" : ""}${c ? ` ${c}` : ""}`, d = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
4756
+ function Yt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", variant: s = "plain", inline: c = !1, className: l = "", ...u }) {
4757
+ O("AppKpiTile", u);
4758
+ let d = `kpi${c ? " kpi-inline" : ""}${s === "filled" ? " kpi-filled" : s === "accent" ? " kpi-accent" : ""}${l ? ` ${l}` : ""}`, f = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
4434
4759
  return /* @__PURE__ */ n("div", {
4435
- className: u,
4760
+ className: d,
4436
4761
  children: [
4437
4762
  i && /* @__PURE__ */ t("span", {
4438
4763
  className: "kpi-icon",
4439
- children: /* @__PURE__ */ t(k, {
4764
+ children: /* @__PURE__ */ t(N, {
4440
4765
  name: i,
4441
4766
  size: 20
4442
4767
  })
@@ -4451,8 +4776,8 @@ function Mt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
4451
4776
  }),
4452
4777
  a && /* @__PURE__ */ n("div", {
4453
4778
  className: `kpi-delta${o === "flat" ? "" : ` ${o}`}`,
4454
- children: [d && /* @__PURE__ */ t(k, {
4455
- name: d,
4779
+ children: [f && /* @__PURE__ */ t(N, {
4780
+ name: f,
4456
4781
  size: 13
4457
4782
  }), a]
4458
4783
  })
@@ -4461,69 +4786,139 @@ function Mt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
4461
4786
  }
4462
4787
  //#endregion
4463
4788
  //#region src/components/AppLogoPicker.jsx
4464
- function Nt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept: c = "image/png,image/jpeg", maxSizeMb: u = 5, overlayIcon: d = "image", overlayLabel: f = "Update photo", ariaLabel: p = "Upload photo", ...m }) {
4465
- E("AppLogoPicker", m);
4466
- let h = l(null);
4467
- return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("button", {
4468
- type: "button",
4469
- className: "set-uploader",
4470
- "aria-busy": s || void 0,
4471
- disabled: s,
4472
- onClick: () => {
4473
- s || h.current?.click();
4474
- },
4475
- "aria-label": p,
4476
- children: /* @__PURE__ */ n("span", {
4477
- className: "set-uploader-ring",
4478
- children: [r ? /* @__PURE__ */ t("img", {
4479
- className: "set-uploader-img",
4480
- src: r,
4481
- alt: ""
4482
- }) : /* @__PURE__ */ t("span", {
4483
- className: "set-uploader-logo",
4484
- children: i
4485
- }), s ? /* @__PURE__ */ t("span", {
4486
- className: "set-uploader-overlay is-loading",
4487
- "aria-hidden": "true",
4488
- children: /* @__PURE__ */ t(k, {
4489
- name: "refresh-cw",
4490
- size: 22,
4491
- className: "wui-spin"
4492
- })
4493
- }) : /* @__PURE__ */ n("span", {
4494
- className: "set-uploader-overlay",
4495
- children: [/* @__PURE__ */ t(k, {
4496
- name: d,
4497
- size: 22
4498
- }), /* @__PURE__ */ t("span", { children: f })]
4499
- })]
4500
- })
4501
- }), /* @__PURE__ */ t("input", {
4502
- ref: h,
4503
- type: "file",
4504
- name: a,
4505
- hidden: !0,
4506
- accept: c,
4507
- onChange: (e) => {
4508
- let t = e.target.files?.[0];
4509
- if (e.target.value = "", !t) return;
4510
- let n = Ue(t, {
4511
- accept: c,
4512
- maxSizeMb: u
4513
- });
4514
- if (n) {
4515
- Ot(n, "error");
4516
- return;
4517
- }
4518
- o(t);
4519
- },
4520
- disabled: s
4521
- })] });
4789
+ var Xt = {
4790
+ sm: 72,
4791
+ md: 120,
4792
+ lg: 160
4793
+ };
4794
+ function Zt({ value: e, fallback: r, name: i, onPick: s, onRemove: c, loading: d = !1, disabled: f = !1, accept: p = "image/png,image/jpeg,image/webp", maxSizeMb: m = 5, overlayIcon: h = "image", overlayLabel: g = "Update photo", ariaLabel: _ = "Upload photo", label: v, hint: y, error: b, required: x = !1, variant: S = "initials", size: C = "md", shape: w = "circle", className: T = "", ...E }) {
4795
+ O("AppLogoPicker", E);
4796
+ let D = l(null), k = o(), A = i || k, [j, M] = u(null), [ee, P] = u(""), [te, F] = u(!1), [I, L] = u(!1);
4797
+ a(() => () => j && URL.revokeObjectURL(j), [j]), a(() => {
4798
+ M(null), F(!1);
4799
+ }, [e]);
4800
+ let R = d || f, ne = j || (e && !te ? e : null), re = b || ee, ie = !R && (!!j || !!ne && !!c), ae = () => {
4801
+ R || D.current?.click();
4802
+ }, z = (e) => {
4803
+ let t = tt(e, {
4804
+ accept: p,
4805
+ maxSizeMb: m
4806
+ });
4807
+ if (t) {
4808
+ P(t);
4809
+ return;
4810
+ }
4811
+ P(""), F(!1), M(URL.createObjectURL(e)), s(e);
4812
+ }, B = (e) => {
4813
+ let t = e.target.files?.[0];
4814
+ e.target.value = "", t && z(t);
4815
+ }, V = (e) => {
4816
+ if (e.preventDefault(), L(!1), R) return;
4817
+ let t = e.dataTransfer.files?.[0];
4818
+ t && z(t);
4819
+ }, H = () => {
4820
+ M(null), P(""), F(!1), D.current && (D.current.value = ""), c?.();
4821
+ }, U = typeof C == "number" ? C : Xt[C] ?? Xt.md, W = Math.max(14, Math.round(U * .18)), oe = Math.round(U * .5), G = [
4822
+ "set-uploader",
4823
+ S === "avatar" ? "set-uploader--avatar" : "",
4824
+ w === "rounded" ? "set-uploader--rounded" : w === "square" ? "set-uploader--square" : "",
4825
+ I && "is-dragging"
4826
+ ].filter(Boolean).join(" ");
4827
+ return /* @__PURE__ */ n("div", {
4828
+ className: `field set-uploader-field${T ? ` ${T}` : ""}`,
4829
+ children: [
4830
+ v && /* @__PURE__ */ n("label", {
4831
+ className: "label",
4832
+ htmlFor: A,
4833
+ children: [v, x && /* @__PURE__ */ t(Q, {})]
4834
+ }),
4835
+ /* @__PURE__ */ n("div", {
4836
+ className: "set-uploader-shell",
4837
+ children: [
4838
+ /* @__PURE__ */ t("button", {
4839
+ type: "button",
4840
+ className: G,
4841
+ style: { "--wui-logo-size": `${U}px` },
4842
+ "aria-busy": d || void 0,
4843
+ disabled: R,
4844
+ onClick: ae,
4845
+ "aria-label": _,
4846
+ onDragOver: (e) => {
4847
+ e.preventDefault(), !R && !I && L(!0);
4848
+ },
4849
+ onDragLeave: (e) => {
4850
+ e.preventDefault(), L(!1);
4851
+ },
4852
+ onDrop: V,
4853
+ children: /* @__PURE__ */ n("span", {
4854
+ className: "set-uploader-ring",
4855
+ children: [ne ? /* @__PURE__ */ t("img", {
4856
+ className: "set-uploader-img",
4857
+ src: ne,
4858
+ alt: "",
4859
+ onError: () => F(!0)
4860
+ }) : /* @__PURE__ */ t("span", {
4861
+ className: "set-uploader-logo",
4862
+ children: r || S === "avatar" && /* @__PURE__ */ t(N, {
4863
+ name: "person",
4864
+ size: oe
4865
+ })
4866
+ }), d ? /* @__PURE__ */ t("span", {
4867
+ className: "set-uploader-overlay is-loading",
4868
+ "aria-hidden": "true",
4869
+ children: /* @__PURE__ */ t(N, {
4870
+ name: "refresh-cw",
4871
+ size: W,
4872
+ className: "wui-spin"
4873
+ })
4874
+ }) : !f && /* @__PURE__ */ n("span", {
4875
+ className: "set-uploader-overlay",
4876
+ children: [/* @__PURE__ */ t(N, {
4877
+ name: h,
4878
+ size: W
4879
+ }), /* @__PURE__ */ t("span", { children: g })]
4880
+ })]
4881
+ })
4882
+ }),
4883
+ /* @__PURE__ */ t("button", {
4884
+ type: "button",
4885
+ className: "set-uploader-remove",
4886
+ hidden: !ie,
4887
+ "aria-label": "Remove photo",
4888
+ title: "Remove photo",
4889
+ onClick: H,
4890
+ children: /* @__PURE__ */ t(N, {
4891
+ name: "x",
4892
+ size: 14
4893
+ })
4894
+ }),
4895
+ /* @__PURE__ */ t("input", {
4896
+ id: A,
4897
+ ref: D,
4898
+ type: "file",
4899
+ name: i,
4900
+ hidden: !0,
4901
+ accept: p,
4902
+ onChange: B,
4903
+ disabled: R
4904
+ })
4905
+ ]
4906
+ }),
4907
+ y && !re && /* @__PURE__ */ t("div", {
4908
+ className: "set-uploader-hint",
4909
+ children: y
4910
+ }),
4911
+ re && /* @__PURE__ */ t("div", {
4912
+ className: "field-error",
4913
+ children: re
4914
+ })
4915
+ ]
4916
+ });
4522
4917
  }
4523
4918
  //#endregion
4524
4919
  //#region src/components/AppMultiSelect.jsx
4525
- function Pt({ values: e, onChange: r, options: i, placeholder: o = "Select…", searchPlaceholder: s = "Search…", searchable: c = !0, disabled: u = !1, icon: d, size: f, collapseChips: p = !1, name: m, label: h, error: g, hint: _, required: v = !1, fieldClassName: y = "", ...b }) {
4526
- E("AppMultiSelect", b);
4920
+ function Qt({ values: e, onChange: r, options: i, placeholder: o = "Select…", searchPlaceholder: s = "Search…", searchable: c = !0, disabled: u = !1, icon: d, size: f, collapseChips: p = !1, name: m, label: h, error: g, hint: _, required: v = !1, fieldClassName: y = "", ...b }) {
4921
+ O("AppMultiSelect", b);
4527
4922
  let x = l(null);
4528
4923
  return a(() => {
4529
4924
  let e = x.current;
@@ -4544,7 +4939,7 @@ function Pt({ values: e, onChange: r, options: i, placeholder: o = "Select…",
4544
4939
  h && /* @__PURE__ */ n("label", {
4545
4940
  className: "label",
4546
4941
  htmlFor: m,
4547
- children: [h, v && /* @__PURE__ */ t(Z, {})]
4942
+ children: [h, v && /* @__PURE__ */ t(Q, {})]
4548
4943
  }),
4549
4944
  /* @__PURE__ */ t("wui-multiselect", {
4550
4945
  "aria-label": typeof h == "string" ? h : void 0,
@@ -4572,8 +4967,8 @@ function Pt({ values: e, onChange: r, options: i, placeholder: o = "Select…",
4572
4967
  }
4573
4968
  //#endregion
4574
4969
  //#region src/components/AppOtpInput.jsx
4575
- var Ft = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode: c = "numeric", label: u, required: d = !1, hint: f, error: p, disabled: m = !1, name: h, id: g, className: _ = "", ...v }, y) {
4576
- E("AppOtpInput", v);
4970
+ var $t = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode: c = "numeric", label: u, required: d = !1, hint: f, error: p, disabled: m = !1, name: h, id: g, className: _ = "", ...v }, y) {
4971
+ O("AppOtpInput", v);
4577
4972
  let b = l(null), x = o(), S = g || h || x, C = (e) => {
4578
4973
  b.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
4579
4974
  };
@@ -4625,8 +5020,8 @@ var Ft = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode:
4625
5020
  });
4626
5021
  //#endregion
4627
5022
  //#region src/components/AppPageHeader.jsx
4628
- function It({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
4629
- return E("AppPageHeader", o), /* @__PURE__ */ n("div", {
5023
+ function en({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
5024
+ return O("AppPageHeader", o), /* @__PURE__ */ n("div", {
4630
5025
  className: `page-header${i ? " d-flex align-items-end justify-content-between" : ""}${a ? ` ${a}` : ""}`,
4631
5026
  children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("div", {
4632
5027
  className: "page-title",
@@ -4642,8 +5037,8 @@ function It({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
4642
5037
  }
4643
5038
  //#endregion
4644
5039
  //#region src/components/AppPhoneNumberInput.jsx
4645
- function Lt({ value: e, onChange: r, country: i, disabled: o = !1, name: s, label: c = "Phone number", placeholder: u, required: d = !1, error: f, fieldClassName: p = "", ...m }) {
4646
- E("AppPhoneNumberInput", m);
5040
+ function tn({ value: e, onChange: r, country: i, disabled: o = !1, name: s, label: c = "Phone number", placeholder: u, required: d = !1, error: f, fieldClassName: p = "", ...m }) {
5041
+ O("AppPhoneNumberInput", m);
4647
5042
  let h = l(null);
4648
5043
  return a(() => {
4649
5044
  let t = h.current;
@@ -4659,7 +5054,7 @@ function Lt({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
4659
5054
  c && /* @__PURE__ */ n("label", {
4660
5055
  className: "label",
4661
5056
  htmlFor: s,
4662
- children: [c, d && /* @__PURE__ */ t(Z, {})]
5057
+ children: [c, d && /* @__PURE__ */ t(Q, {})]
4663
5058
  }),
4664
5059
  /* @__PURE__ */ t("wui-phone", {
4665
5060
  ref: h,
@@ -4677,8 +5072,8 @@ function Lt({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
4677
5072
  }
4678
5073
  //#endregion
4679
5074
  //#region src/components/AppPricingCard.jsx
4680
- function Rt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s, featured: c = !1, current: l = !1, badge: u = "Most popular", className: d = "", ...f }) {
4681
- return E("AppPricingCard", f), /* @__PURE__ */ n("div", {
5075
+ function nn({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s, featured: c = !1, current: l = !1, badge: u = "Most popular", className: d = "", ...f }) {
5076
+ return O("AppPricingCard", f), /* @__PURE__ */ n("div", {
4682
5077
  className: [
4683
5078
  "plan-card",
4684
5079
  c ? "featured" : "",
@@ -4713,7 +5108,7 @@ function Rt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
4713
5108
  className: r ? void 0 : "excluded",
4714
5109
  children: [/* @__PURE__ */ t("span", {
4715
5110
  className: "plan-feature-icon",
4716
- children: /* @__PURE__ */ t(k, {
5111
+ children: /* @__PURE__ */ t(N, {
4717
5112
  name: r ? "check" : "x",
4718
5113
  size: 16
4719
5114
  })
@@ -4730,29 +5125,40 @@ function Rt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
4730
5125
  }
4731
5126
  //#endregion
4732
5127
  //#region src/components/AppRadio.jsx
4733
- var zt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
4734
- E("AppRadio", s);
4735
- let l = o(), u = r || l;
5128
+ var rn = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c = "", ...l }, u) {
5129
+ O("AppRadio", l);
5130
+ let d = o(), f = r || d;
4736
5131
  return /* @__PURE__ */ n("div", {
4737
- className: `form-check${a ? ` ${a}` : ""}`,
4738
- children: [/* @__PURE__ */ t("input", {
4739
- type: "radio",
4740
- className: "form-check-input",
4741
- id: u,
4742
- name: i,
4743
- ref: c,
4744
- ...s
4745
- }), e != null && /* @__PURE__ */ t("label", {
4746
- className: "form-check-label",
4747
- htmlFor: u,
4748
- children: e
4749
- })]
5132
+ className: `form-check${c ? ` ${c}` : ""}`,
5133
+ children: [
5134
+ /* @__PURE__ */ t("input", {
5135
+ type: "radio",
5136
+ className: "form-check-input",
5137
+ id: f,
5138
+ name: i,
5139
+ ref: u,
5140
+ "aria-invalid": a ? "true" : "false",
5141
+ ...l
5142
+ }),
5143
+ e != null && /* @__PURE__ */ t("label", {
5144
+ className: "form-check-label",
5145
+ htmlFor: f,
5146
+ children: e
5147
+ }),
5148
+ a ? /* @__PURE__ */ t("div", {
5149
+ className: "field-error",
5150
+ children: a
5151
+ }) : s ? /* @__PURE__ */ t("div", {
5152
+ className: "field-hint",
5153
+ children: s
5154
+ }) : null
5155
+ ]
4750
5156
  });
4751
5157
  });
4752
5158
  //#endregion
4753
5159
  //#region src/components/AppRepeater.jsx
4754
- function Bt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "Add another", removeLabel: s = "Remove row", emptyText: c, min: l = 0, max: u, numbered: d = !0, className: f = "", ...p }) {
4755
- E("AppRepeater", p);
5160
+ function an({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "Add another", removeLabel: s = "Remove row", emptyText: c, min: l = 0, max: u, numbered: d = !0, className: f = "", ...p }) {
5161
+ O("AppRepeater", p);
4756
5162
  let m = typeof u == "number" && e.length >= u, h = !!a && e.length > l;
4757
5163
  return /* @__PURE__ */ n("div", {
4758
5164
  className: `repeater${f ? ` ${f}` : ""}`,
@@ -4772,7 +5178,7 @@ function Bt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
4772
5178
  className: "repeater-body",
4773
5179
  children: r(e, i)
4774
5180
  }),
4775
- h && /* @__PURE__ */ t(A, {
5181
+ h && /* @__PURE__ */ t(ee, {
4776
5182
  icon: "trash-2",
4777
5183
  label: `${s} ${i + 1}`,
4778
5184
  danger: !0,
@@ -4781,7 +5187,7 @@ function Bt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
4781
5187
  })
4782
5188
  ]
4783
5189
  }, e.id ?? i)),
4784
- /* @__PURE__ */ t(Q, {
5190
+ /* @__PURE__ */ t(L, {
4785
5191
  variant: "secondary",
4786
5192
  size: "sm",
4787
5193
  leftIcon: "plus",
@@ -4795,11 +5201,11 @@ function Bt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
4795
5201
  }
4796
5202
  //#endregion
4797
5203
  //#region src/components/AppResourceCard.jsx
4798
- function Vt({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
4799
- E("AppResourceCard", u);
5204
+ function on({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
5205
+ O("AppResourceCard", u);
4800
5206
  let d = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
4801
5207
  className: "res-card-icon",
4802
- children: /* @__PURE__ */ t(k, {
5208
+ children: /* @__PURE__ */ t(N, {
4803
5209
  name: r,
4804
5210
  size: 18
4805
5211
  })
@@ -4826,9 +5232,21 @@ function Vt({ icon: r, title: i, text: a, href: o, external: s = !1, linkCompone
4826
5232
  });
4827
5233
  }
4828
5234
  //#endregion
5235
+ //#region src/components/AppScrollbar.jsx
5236
+ function sn({ children: e, className: n = "", maxHeight: r, style: i, ...a }) {
5237
+ return O("AppScrollbar", a), /* @__PURE__ */ t("div", {
5238
+ className: n ? `wui-scroll ${n}` : "wui-scroll",
5239
+ style: r == null ? i : {
5240
+ maxHeight: r,
5241
+ ...i
5242
+ },
5243
+ children: e
5244
+ });
5245
+ }
5246
+ //#endregion
4829
5247
  //#region src/components/AppSearch.jsx
4830
- function Ht({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabel: a, iconSize: o = 18, size: s, loading: c = !1, disabled: l = !1, className: u = "", ...d }) {
4831
- return E("AppSearch", d), /* @__PURE__ */ n("div", {
5248
+ function cn({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabel: a, iconSize: o = 18, size: s, loading: c = !1, disabled: l = !1, className: u = "", ...d }) {
5249
+ return O("AppSearch", d), /* @__PURE__ */ n("div", {
4832
5250
  className: [
4833
5251
  "search-wrap",
4834
5252
  e ? "has-value" : "",
@@ -4841,12 +5259,12 @@ function Ht({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
4841
5259
  className: "search-spinner",
4842
5260
  "aria-hidden": "true"
4843
5261
  }),
4844
- /* @__PURE__ */ t(k, {
5262
+ /* @__PURE__ */ t(N, {
4845
5263
  name: "search",
4846
5264
  size: o,
4847
5265
  className: "search-icon"
4848
5266
  }),
4849
- /* @__PURE__ */ t(h.Control, {
5267
+ /* @__PURE__ */ t(g.Control, {
4850
5268
  type: "search",
4851
5269
  className: "input search-input",
4852
5270
  placeholder: i,
@@ -4861,7 +5279,7 @@ function Ht({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
4861
5279
  className: "search-clear",
4862
5280
  "aria-label": "Clear search",
4863
5281
  onClick: () => r(""),
4864
- children: /* @__PURE__ */ t(k, {
5282
+ children: /* @__PURE__ */ t(N, {
4865
5283
  name: "x",
4866
5284
  size: 16
4867
5285
  })
@@ -4871,8 +5289,8 @@ function Ht({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
4871
5289
  }
4872
5290
  //#endregion
4873
5291
  //#region src/components/AppSegmented.jsx
4874
- function Ut({ options: e = [], value: r, onChange: i, label: c, name: u, size: d = "md", fullWidth: f = !1, disabled: p = !1, className: m = "", ...h }) {
4875
- E("AppSegmented", h);
5292
+ function ln({ options: e = [], value: r, onChange: i, label: c, name: u, size: d = "md", fullWidth: f = !1, disabled: p = !1, className: m = "", ...h }) {
5293
+ O("AppSegmented", h);
4876
5294
  let g = o(), _ = u || g, v = l(null), y = l(null), b = [
4877
5295
  "segmented",
4878
5296
  d === "sm" ? "segmented-sm" : d === "lg" ? "segmented-lg" : "",
@@ -4925,39 +5343,50 @@ function Ut({ options: e = [], value: r, onChange: i, label: c, name: u, size: d
4925
5343
  disabled: p || e.disabled,
4926
5344
  onChange: () => i?.(e.value)
4927
5345
  }),
4928
- e.icon && /* @__PURE__ */ t(k, {
5346
+ e.icon && /* @__PURE__ */ t(N, {
4929
5347
  name: e.icon,
4930
5348
  size: 13
4931
5349
  }),
4932
- e.label
5350
+ e.note ? /* @__PURE__ */ n("span", {
5351
+ className: "segmented-option-text",
5352
+ children: [/* @__PURE__ */ t("span", {
5353
+ className: "segmented-option-label",
5354
+ children: e.label
5355
+ }), /* @__PURE__ */ t("span", {
5356
+ className: "segmented-option-note",
5357
+ children: e.note
5358
+ })]
5359
+ }) : e.label
4933
5360
  ]
4934
5361
  }, e.value))]
4935
5362
  });
4936
5363
  }
4937
5364
  //#endregion
4938
5365
  //#region src/components/AppSelect.jsx
4939
- var Wt = (e) => e == null ? "" : e.label ?? e.text ?? "";
4940
- function Gt({ value: e, onChange: r, options: i = [], placeholder: o = "Select...", searchPlaceholder: s = "Search...", searchable: c = !1, clearable: u = !1, size: d, icon: f, floatingLabel: p = !1, disabled: m, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", ...T }) {
4941
- E("AppSelect", T);
4942
- let D = l(null);
5366
+ var un = (e) => e == null ? "" : e.label ?? e.text ?? "";
5367
+ function dn({ value: e, onChange: r, options: i = [], placeholder: o = "Select...", searchPlaceholder: s = "Search...", searchable: c = !1, clearable: u = !1, size: d, icon: f, floatingLabel: p = !1, disabled: m, label: h, required: g = !1, error: _, hint: v, help: y, helpLabel: b = "More information", id: x, name: S, className: C = "", fieldClassName: w = "", "aria-label": T, "aria-labelledby": E, "aria-describedby": D, ...k }) {
5368
+ O("AppSelect", k);
5369
+ let A = l(null);
4943
5370
  a(() => {
4944
- D.current && (D.current.options = i.map((e) => ({
5371
+ A.current && (A.current.options = i.map((e) => ({
4945
5372
  value: e.value,
4946
- label: Wt(e),
5373
+ label: un(e),
4947
5374
  icon: e.icon
4948
5375
  })));
4949
5376
  }, [i]), a(() => {
4950
- let t = D.current;
5377
+ let t = A.current;
4951
5378
  t && String(t.value ?? "") !== String(e ?? "") && (t.value = e ?? "");
4952
5379
  }, [e]), a(() => {
4953
- let e = D.current;
5380
+ let e = A.current;
4954
5381
  if (!e) return;
4955
5382
  let t = () => r?.(e.value);
4956
5383
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
4957
5384
  }, [r]);
4958
- let O = /* @__PURE__ */ t("wui-select", {
4959
- "aria-label": typeof h == "string" ? h : void 0,
4960
- ref: D,
5385
+ let j = /* @__PURE__ */ t("wui-select", {
5386
+ "aria-label": T || (typeof h == "string" ? h : void 0),
5387
+ "aria-labelledby": E || void 0,
5388
+ "aria-describedby": D || void 0,
5389
+ ref: A,
4961
5390
  id: x || S,
4962
5391
  name: S,
4963
5392
  placeholder: p && h ? " " : o,
@@ -4969,8 +5398,8 @@ function Gt({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
4969
5398
  disabled: m ? "" : void 0,
4970
5399
  required: g ? "" : void 0
4971
5400
  });
4972
- if (!h && !_ && !v) return O;
4973
- let k = x || S, A = p && h;
5401
+ if (!h && !_ && !v) return j;
5402
+ let M = x || S, N = p && h;
4974
5403
  return /* @__PURE__ */ n("div", {
4975
5404
  className: [
4976
5405
  "field",
@@ -4978,26 +5407,26 @@ function Gt({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
4978
5407
  w
4979
5408
  ].filter(Boolean).join(" "),
4980
5409
  children: [
4981
- h && !A && /* @__PURE__ */ n("label", {
5410
+ h && !N && /* @__PURE__ */ n("label", {
4982
5411
  className: "label",
4983
- htmlFor: k,
5412
+ htmlFor: M,
4984
5413
  children: [
4985
5414
  h,
4986
- g && /* @__PURE__ */ t(Z, {}),
4987
- y && /* @__PURE__ */ t(at, {
5415
+ g && /* @__PURE__ */ t(Q, {}),
5416
+ y && /* @__PURE__ */ t(ht, {
4988
5417
  label: b,
4989
5418
  children: y
4990
5419
  })
4991
5420
  ]
4992
5421
  }),
4993
- A ? /* @__PURE__ */ n("div", {
5422
+ N ? /* @__PURE__ */ n("div", {
4994
5423
  className: "field-float",
4995
- children: [O, /* @__PURE__ */ n("label", {
5424
+ children: [j, /* @__PURE__ */ n("label", {
4996
5425
  className: "float-label",
4997
- htmlFor: k,
4998
- children: [h, g && /* @__PURE__ */ t(Z, {})]
5426
+ htmlFor: M,
5427
+ children: [h, g && /* @__PURE__ */ t(Q, {})]
4999
5428
  })]
5000
- }) : O,
5429
+ }) : j,
5001
5430
  _ ? /* @__PURE__ */ t("div", {
5002
5431
  className: "field-error",
5003
5432
  children: _
@@ -5010,8 +5439,8 @@ function Gt({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
5010
5439
  }
5011
5440
  //#endregion
5012
5441
  //#region src/components/AppShell.jsx
5013
- function Kt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbarEnd: s, footer: c, children: l, collapsed: d, onCollapsedChange: f, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
5014
- E("AppShell", _);
5442
+ function fn({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbarEnd: s, footer: c, children: l, collapsed: d, onCollapsedChange: f, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
5443
+ O("AppShell", _);
5015
5444
  let [v, y] = u(!1), [b, x] = u(!1), [S, C] = u(!1), w = d ?? v;
5016
5445
  return a(() => {
5017
5446
  let e = () => C(window.scrollY > 4);
@@ -5046,7 +5475,7 @@ function Kt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5046
5475
  children: [e.label && /* @__PURE__ */ t("div", {
5047
5476
  className: "app-nav-group-label",
5048
5477
  children: e.label
5049
- }), e.items.map((e) => /* @__PURE__ */ t(qt, {
5478
+ }), e.items.map((e) => /* @__PURE__ */ t(pn, {
5050
5479
  item: e,
5051
5480
  linkComponent: h,
5052
5481
  onNavigate: () => x(!1)
@@ -5068,7 +5497,7 @@ function Kt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5068
5497
  },
5069
5498
  "aria-label": w ? "Expand navigation" : "Collapse navigation",
5070
5499
  "aria-expanded": !w,
5071
- children: /* @__PURE__ */ t(k, {
5500
+ children: /* @__PURE__ */ t(N, {
5072
5501
  name: "chevron-left",
5073
5502
  size: 14
5074
5503
  })
@@ -5086,7 +5515,7 @@ function Kt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5086
5515
  onClick: () => x(!0),
5087
5516
  "aria-label": "Open navigation",
5088
5517
  "aria-expanded": b,
5089
- children: /* @__PURE__ */ t(k, {
5518
+ children: /* @__PURE__ */ t(N, {
5090
5519
  name: "menu",
5091
5520
  size: 18
5092
5521
  })
@@ -5116,41 +5545,84 @@ function Kt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5116
5545
  ]
5117
5546
  });
5118
5547
  }
5119
- function qt({ item: r, linkComponent: i, onNavigate: a }) {
5120
- let o = `app-nav-item${r.active ? " active" : ""}`, s = /* @__PURE__ */ n(e, { children: [
5121
- r.icon && /* @__PURE__ */ t("span", {
5122
- className: "app-nav-icon",
5123
- children: /* @__PURE__ */ t(k, {
5124
- name: r.icon,
5125
- size: 22
5548
+ function pn({ item: r, linkComponent: i, onNavigate: a, sub: o = !1 }) {
5549
+ let s = Array.isArray(r.children) && r.children.length > 0, c = s && r.children.some((e) => e.active), [l, d] = u(c), f = typeof r.label == "string" ? r.label : void 0, p = !o && r.icon && /* @__PURE__ */ t("span", {
5550
+ className: "app-nav-icon",
5551
+ children: /* @__PURE__ */ t(N, {
5552
+ name: r.icon,
5553
+ size: 22
5554
+ })
5555
+ }), m = r.badge != null && /* @__PURE__ */ t("span", {
5556
+ className: `app-nav-badge${r.badgeTone ? ` tone-${r.badgeTone}` : ""}`,
5557
+ children: r.badge
5558
+ });
5559
+ if (s) return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("button", {
5560
+ type: "button",
5561
+ className: `app-nav-item has-children${c ? " active" : ""}`,
5562
+ "aria-expanded": l,
5563
+ "data-label": f,
5564
+ onClick: () => d((e) => !e),
5565
+ children: [
5566
+ p,
5567
+ /* @__PURE__ */ t("span", {
5568
+ className: "app-nav-text",
5569
+ children: r.label
5570
+ }),
5571
+ m,
5572
+ /* @__PURE__ */ t("span", {
5573
+ className: "app-nav-caret",
5574
+ children: /* @__PURE__ */ t(N, {
5575
+ name: "chevron-right",
5576
+ size: 16
5577
+ })
5126
5578
  })
5127
- }),
5579
+ ]
5580
+ }), /* @__PURE__ */ t("div", {
5581
+ className: `app-nav-sub${l ? " expanded" : ""}`,
5582
+ children: /* @__PURE__ */ t("div", {
5583
+ className: "app-nav-sub-inner",
5584
+ children: r.children.map((e) => /* @__PURE__ */ t(pn, {
5585
+ item: e,
5586
+ linkComponent: i,
5587
+ onNavigate: a,
5588
+ sub: !0
5589
+ }, e.key ?? e.href))
5590
+ })
5591
+ })] });
5592
+ let h = `app-nav-item${o ? " app-nav-subitem" : ""}${r.active ? " active" : ""}`, g = /* @__PURE__ */ n(e, { children: [
5593
+ p,
5128
5594
  /* @__PURE__ */ t("span", {
5129
5595
  className: "app-nav-text",
5130
5596
  children: r.label
5131
5597
  }),
5132
- r.badge != null && /* @__PURE__ */ t("span", {
5133
- className: "app-nav-badge",
5134
- children: r.badge
5598
+ m,
5599
+ r.trailingIcon && /* @__PURE__ */ t("span", {
5600
+ className: "app-nav-trailing",
5601
+ children: /* @__PURE__ */ t(N, {
5602
+ name: r.trailingIcon,
5603
+ size: 16
5604
+ })
5135
5605
  })
5136
- ] }), c = r.active ? "page" : void 0;
5606
+ ] }), _ = r.active ? "page" : void 0;
5137
5607
  return i ? /* @__PURE__ */ t(i, {
5138
- className: o,
5608
+ className: h,
5139
5609
  to: r.href,
5140
- "aria-current": c,
5610
+ "aria-current": _,
5611
+ "data-label": f,
5141
5612
  onClick: a,
5142
- children: s
5613
+ children: g
5143
5614
  }) : /* @__PURE__ */ t("a", {
5144
- className: o,
5615
+ className: h,
5145
5616
  href: r.href,
5146
- "aria-current": c,
5617
+ "aria-current": _,
5618
+ "data-label": f,
5147
5619
  onClick: a,
5148
- children: s
5620
+ children: g
5149
5621
  });
5150
5622
  }
5151
5623
  //#endregion
5152
5624
  //#region src/components/AppSidebarMenu.jsx
5153
- var Jt = {
5625
+ var mn = {
5154
5626
  left: "start",
5155
5627
  right: "end",
5156
5628
  start: "start",
@@ -5158,43 +5630,46 @@ var Jt = {
5158
5630
  top: "top",
5159
5631
  bottom: "bottom"
5160
5632
  };
5161
- function Yt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, header: s, children: c, footer: l, width: u, backdrop: d = !0, scroll: f = !1, keyboard: p = !0, closeButton: m = !0, responsive: h, className: g = "", bodyClassName: _ = "", ariaLabel: v, ...y }) {
5162
- return E("AppSidebarMenu", y), /* @__PURE__ */ n(b, {
5633
+ function hn({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, header: s, children: c, footer: l, width: u, maxWidth: d, backdrop: f = !0, scroll: p = !1, keyboard: m = !0, closeButton: h = !0, responsive: g, className: _ = "", bodyClassName: v = "", ariaLabel: b, ...x }) {
5634
+ return O("AppSidebarMenu", x), /* @__PURE__ */ n(y, {
5163
5635
  show: e,
5164
5636
  onHide: r,
5165
- placement: Jt[i] || "end",
5166
- backdrop: d,
5167
- scroll: f,
5168
- keyboard: p,
5169
- responsive: h,
5170
- style: u ? { "--asm-width": u } : void 0,
5171
- className: `app-sidebar-menu${g ? ` ${g}` : ""}`,
5172
- "aria-label": v || (typeof a == "string" ? a : void 0),
5637
+ placement: mn[i] || "end",
5638
+ backdrop: f,
5639
+ scroll: p,
5640
+ keyboard: m,
5641
+ responsive: g,
5642
+ style: u || d ? {
5643
+ ...u && { "--asm-width": u },
5644
+ ...d && { "--asm-max-width": d }
5645
+ } : void 0,
5646
+ className: `app-sidebar-menu${_ ? ` ${_}` : ""}`,
5647
+ "aria-label": b || (typeof a == "string" ? a : void 0),
5173
5648
  children: [
5174
- s === void 0 ? (a != null || m) && /* @__PURE__ */ n("div", {
5649
+ s === void 0 ? (a != null || h) && /* @__PURE__ */ n("div", {
5175
5650
  className: "drawer-header",
5176
5651
  children: [a != null && /* @__PURE__ */ n("div", {
5177
5652
  className: "drawer-title",
5178
5653
  children: [o && /* @__PURE__ */ t("span", {
5179
5654
  className: "drawer-title-ic",
5180
- children: /* @__PURE__ */ t(k, {
5655
+ children: /* @__PURE__ */ t(N, {
5181
5656
  name: o,
5182
5657
  size: 18
5183
5658
  })
5184
5659
  }), a]
5185
- }), m && /* @__PURE__ */ t(Q, {
5660
+ }), h && /* @__PURE__ */ t(L, {
5186
5661
  variant: "ghost",
5187
5662
  className: "btn-icon",
5188
5663
  onClick: r,
5189
5664
  "aria-label": "Close",
5190
- children: /* @__PURE__ */ t(k, {
5665
+ children: /* @__PURE__ */ t(N, {
5191
5666
  name: "x",
5192
5667
  size: 16
5193
5668
  })
5194
5669
  })]
5195
5670
  }) : s,
5196
- /* @__PURE__ */ t(b.Body, {
5197
- className: _,
5671
+ /* @__PURE__ */ t(y.Body, {
5672
+ className: v,
5198
5673
  children: c
5199
5674
  }),
5200
5675
  l && /* @__PURE__ */ t("div", {
@@ -5205,22 +5680,35 @@ function Yt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
5205
5680
  });
5206
5681
  }
5207
5682
  //#endregion
5208
- //#region src/components/AppSpinner.jsx
5209
- function Xt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
5210
- return E("AppSpinner", i), /* @__PURE__ */ t("span", {
5211
- className: `spinner-border${e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
5212
- role: "status",
5213
- "aria-label": n
5214
- });
5215
- }
5216
- //#endregion
5217
5683
  //#region src/components/AppSplash.jsx
5218
- function Zt({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
5219
- return E("AppSplash", s), /* @__PURE__ */ t("div", {
5220
- className: `splash${o ? ` ${o}` : ""}`,
5684
+ var gn = {
5685
+ sm: 44,
5686
+ md: 56,
5687
+ lg: 72
5688
+ };
5689
+ function _n({ logo: e, initials: r, text: i, subtext: a, variant: o = "bar", size: s = "md", label: c = "Loading", className: l = "", ...u }) {
5690
+ O("AppSplash", u);
5691
+ let d = typeof s == "number" ? s : gn[s] ?? gn.md, f = o === "ring" ? /* @__PURE__ */ t("span", {
5692
+ className: "splash-ring",
5693
+ "aria-hidden": "true"
5694
+ }) : o === "dots" ? /* @__PURE__ */ n("span", {
5695
+ className: "splash-dots",
5696
+ "aria-hidden": "true",
5697
+ children: [
5698
+ /* @__PURE__ */ t("i", {}),
5699
+ /* @__PURE__ */ t("i", {}),
5700
+ /* @__PURE__ */ t("i", {})
5701
+ ]
5702
+ }) : /* @__PURE__ */ t("span", {
5703
+ className: "splash-bar",
5704
+ "aria-hidden": "true"
5705
+ });
5706
+ return /* @__PURE__ */ t("div", {
5707
+ className: `splash${l ? ` ${l}` : ""}`,
5221
5708
  role: "status",
5222
5709
  "aria-live": "polite",
5223
- "aria-label": a,
5710
+ "aria-label": c,
5711
+ style: { "--wui-splash-size": `${d}px` },
5224
5712
  children: /* @__PURE__ */ n("div", {
5225
5713
  className: "splash-inner",
5226
5714
  children: [
@@ -5228,13 +5716,14 @@ function Zt({ logo: e, initials: r, text: i, label: a = "Loading", className: o
5228
5716
  className: "splash-mark",
5229
5717
  children: r
5230
5718
  }),
5231
- /* @__PURE__ */ t("span", {
5232
- className: "splash-bar",
5233
- "aria-hidden": "true"
5234
- }),
5719
+ f,
5235
5720
  i && /* @__PURE__ */ t("span", {
5236
5721
  className: "splash-text",
5237
5722
  children: i
5723
+ }),
5724
+ a && /* @__PURE__ */ t("span", {
5725
+ className: "splash-subtext",
5726
+ children: a
5238
5727
  })
5239
5728
  ]
5240
5729
  })
@@ -5242,8 +5731,8 @@ function Zt({ logo: e, initials: r, text: i, label: a = "Loading", className: o
5242
5731
  }
5243
5732
  //#endregion
5244
5733
  //#region src/components/AppStatusBadge.jsx
5245
- function Qt({ label: e, tone: n = "neutral", className: r = "", ...i }) {
5246
- return E("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
5734
+ function vn({ label: e, tone: n = "neutral", className: r = "", ...i }) {
5735
+ return O("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
5247
5736
  className: `status-label ${n}${r ? ` ${r}` : ""}`,
5248
5737
  ...i,
5249
5738
  children: e
@@ -5251,14 +5740,14 @@ function Qt({ label: e, tone: n = "neutral", className: r = "", ...i }) {
5251
5740
  }
5252
5741
  //#endregion
5253
5742
  //#region src/components/AppStepper.jsx
5254
- function $t({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
5255
- return E("AppStepper", c), /* @__PURE__ */ t("nav", {
5743
+ function yn({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
5744
+ return O("AppStepper", c), /* @__PURE__ */ t("nav", {
5256
5745
  className: [i === "journey" ? "stepper stepper-journey" : "stepper", s].filter(Boolean).join(" "),
5257
5746
  "aria-label": a,
5258
5747
  children: r.map((a, s) => {
5259
5748
  let c = a.status || "pending", l = `step${c === "pending" ? "" : ` ${c}`}`, u = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
5260
5749
  className: "step-circle",
5261
- children: c === "done" ? /* @__PURE__ */ t(k, {
5750
+ children: c === "done" ? /* @__PURE__ */ t(N, {
5262
5751
  name: "check",
5263
5752
  size: 14
5264
5753
  }) : s + 1
@@ -5298,34 +5787,45 @@ function $t({ steps: r = [], variant: i = "steps", label: a = "Progress", linkCo
5298
5787
  }
5299
5788
  //#endregion
5300
5789
  //#region src/components/AppSwitch.jsx
5301
- var en = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
5302
- E("AppSwitch", s);
5303
- let l = o(), u = r || i || l;
5790
+ var bn = r(function({ label: e, id: r, name: i, error: a, hint: s, className: c = "", ...l }, u) {
5791
+ O("AppSwitch", l);
5792
+ let d = o(), f = r || i || d;
5304
5793
  return /* @__PURE__ */ n("div", {
5305
- className: `form-check form-switch${a ? ` ${a}` : ""}`,
5306
- children: [/* @__PURE__ */ t("input", {
5307
- type: "checkbox",
5308
- className: "form-check-input",
5309
- id: u,
5310
- name: i,
5311
- ref: c,
5312
- ...s
5313
- }), e != null && /* @__PURE__ */ t("label", {
5314
- className: "form-check-label",
5315
- htmlFor: u,
5316
- children: e
5317
- })]
5794
+ className: `form-check form-switch${c ? ` ${c}` : ""}`,
5795
+ children: [
5796
+ /* @__PURE__ */ t("input", {
5797
+ type: "checkbox",
5798
+ className: "form-check-input",
5799
+ id: f,
5800
+ name: i,
5801
+ ref: u,
5802
+ "aria-invalid": a ? "true" : "false",
5803
+ ...l
5804
+ }),
5805
+ e != null && /* @__PURE__ */ t("label", {
5806
+ className: "form-check-label",
5807
+ htmlFor: f,
5808
+ children: e
5809
+ }),
5810
+ a ? /* @__PURE__ */ t("div", {
5811
+ className: "field-error",
5812
+ children: a
5813
+ }) : s ? /* @__PURE__ */ t("div", {
5814
+ className: "field-hint",
5815
+ children: s
5816
+ }) : null
5817
+ ]
5318
5818
  });
5319
5819
  });
5320
5820
  //#endregion
5321
5821
  //#region src/components/AppTableEmptyState.jsx
5322
- function tn({ icon: e, title: r, text: i, action: a, ...o }) {
5323
- return E("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
5822
+ function xn({ icon: e, title: r, text: i, action: a, ...o }) {
5823
+ return O("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
5324
5824
  className: "tbl-empty",
5325
5825
  children: [
5326
5826
  /* @__PURE__ */ t("span", {
5327
5827
  className: "tbl-empty-icon",
5328
- children: /* @__PURE__ */ t(k, {
5828
+ children: /* @__PURE__ */ t(N, {
5329
5829
  name: e,
5330
5830
  size: 24
5331
5831
  })
@@ -5347,10 +5847,10 @@ function tn({ icon: e, title: r, text: i, action: a, ...o }) {
5347
5847
  }
5348
5848
  //#endregion
5349
5849
  //#region src/components/AppTabs.jsx
5350
- function nn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", ...c }) {
5351
- E("AppTabs", c);
5352
- let u = l(null);
5353
- function d(t) {
5850
+ function Sn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", style: c, ...u }) {
5851
+ O("AppTabs", u);
5852
+ let d = l(null);
5853
+ function f(t) {
5354
5854
  let n = e.findIndex((e) => e.key === r);
5355
5855
  if (n < 0) return;
5356
5856
  let a = e.length, o = (t, n) => {
@@ -5363,21 +5863,22 @@ function nn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
5363
5863
  if (t.key === "ArrowRight" ? s = o(n, 1) : t.key === "ArrowLeft" ? s = o(n, -1) : t.key === "Home" ? s = e.find((e) => !e.disabled) ?? null : t.key === "End" && (s = [...e].reverse().find((e) => !e.disabled) ?? null), !s) return;
5364
5864
  t.preventDefault(), i(s.key);
5365
5865
  let c = CSS.escape(String(s.key));
5366
- u.current?.querySelector(`[data-rr-ui-event-key="${c}"]`)?.focus();
5866
+ d.current?.querySelector(`[data-rr-ui-event-key="${c}"]`)?.focus();
5367
5867
  }
5368
- return /* @__PURE__ */ t(x, {
5868
+ return /* @__PURE__ */ t(v, {
5369
5869
  as: "div",
5370
5870
  role: "tablist",
5371
- ref: u,
5871
+ ref: d,
5372
5872
  activeKey: r,
5373
5873
  onSelect: (e) => {
5374
5874
  e != null && i(e);
5375
5875
  },
5376
- onKeyDown: d,
5876
+ onKeyDown: f,
5377
5877
  bsPrefix: "app-tabs",
5378
5878
  className: [a === "pills" ? "app-tabs-pills" : "", s].filter(Boolean).join(" "),
5879
+ style: c,
5379
5880
  "aria-label": o,
5380
- children: e.map((e) => /* @__PURE__ */ n(x.Link, {
5881
+ children: e.map((e) => /* @__PURE__ */ n(v.Link, {
5381
5882
  as: "button",
5382
5883
  type: "button",
5383
5884
  eventKey: e.key,
@@ -5398,61 +5899,64 @@ function nn({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
5398
5899
  }
5399
5900
  //#endregion
5400
5901
  //#region src/components/AppTextarea.jsx
5401
- var rn = r(function({ label: e, required: r = !1, error: a, hint: o, help: c, helpLabel: u = "More information", id: d, name: f, rows: p = 4, autoGrow: m = !1, className: g = "", fieldClassName: _ = "", ...v }, y) {
5402
- E("AppTextarea", v);
5902
+ var Cn = r(function({ label: e, required: r = !1, error: a, hint: o, help: c, helpLabel: u = "More information", id: d, name: f, rows: p = 4, autoGrow: m = !1, className: h = "", fieldClassName: _ = "", ...v }, y) {
5903
+ O("AppTextarea", v);
5403
5904
  let b = d || f, x = [
5404
5905
  "textarea",
5405
5906
  m ? "autosize" : "",
5406
5907
  a ? "error" : "",
5407
- g
5408
- ].filter(Boolean).join(" "), S = l(null), C = (e) => {
5409
- S.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
5410
- }, w = i(() => {
5411
- let e = S.current;
5908
+ h
5909
+ ].filter(Boolean).join(" "), S = a && b ? `${b}-error` : void 0, C = o && b ? `${b}-hint` : void 0, w = S || C, T = l(null), E = (e) => {
5910
+ T.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
5911
+ }, D = i(() => {
5912
+ let e = T.current;
5412
5913
  e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
5413
5914
  }, []);
5414
5915
  s(() => {
5415
- m && w();
5916
+ m && D();
5416
5917
  }, [
5417
5918
  m,
5418
- w,
5919
+ D,
5419
5920
  v.value
5420
5921
  ]);
5421
- let T = (e) => {
5422
- m && w(), v.onInput?.(e);
5922
+ let k = (e) => {
5923
+ m && D(), v.onInput?.(e);
5423
5924
  };
5424
- return /* @__PURE__ */ n(h.Group, {
5925
+ return /* @__PURE__ */ n(g.Group, {
5425
5926
  className: `field${_ ? ` ${_}` : ""}`,
5426
5927
  children: [
5427
- e && /* @__PURE__ */ n(h.Label, {
5928
+ e && /* @__PURE__ */ n(g.Label, {
5428
5929
  className: "label",
5429
5930
  htmlFor: b,
5430
5931
  children: [
5431
5932
  e,
5432
- r && /* @__PURE__ */ t(Z, {}),
5433
- c && /* @__PURE__ */ t(at, {
5933
+ r && /* @__PURE__ */ t(Q, {}),
5934
+ c && /* @__PURE__ */ t(ht, {
5434
5935
  label: u,
5435
5936
  children: c
5436
5937
  })
5437
5938
  ]
5438
5939
  }),
5439
- /* @__PURE__ */ t(h.Control, {
5940
+ /* @__PURE__ */ t(g.Control, {
5440
5941
  as: "textarea",
5441
5942
  id: b,
5442
5943
  name: f,
5443
5944
  rows: p,
5444
5945
  className: x,
5445
5946
  "aria-invalid": a ? "true" : "false",
5947
+ "aria-describedby": w,
5446
5948
  required: r,
5447
5949
  ...v,
5448
- ref: C,
5449
- onInput: T
5950
+ ref: E,
5951
+ onInput: k
5450
5952
  }),
5451
5953
  a ? /* @__PURE__ */ t("div", {
5452
5954
  className: "field-error",
5955
+ id: S,
5453
5956
  children: a
5454
5957
  }) : o ? /* @__PURE__ */ t("div", {
5455
5958
  className: "field-hint",
5959
+ id: C,
5456
5960
  children: o
5457
5961
  }) : null
5458
5962
  ]
@@ -5460,14 +5964,14 @@ var rn = r(function({ label: e, required: r = !1, error: a, hint: o, help: c, he
5460
5964
  });
5461
5965
  //#endregion
5462
5966
  //#region src/components/AppTimeline.jsx
5463
- function an({ items: e = [], className: r = "", ...i }) {
5464
- return E("AppTimeline", i), /* @__PURE__ */ t("ol", {
5967
+ function wn({ items: e = [], className: r = "", ...i }) {
5968
+ return O("AppTimeline", i), /* @__PURE__ */ t("ol", {
5465
5969
  className: `timeline${r ? ` ${r}` : ""}`,
5466
5970
  children: e.map((e, r) => /* @__PURE__ */ n("li", {
5467
5971
  className: `timeline-item${e.tone && e.tone !== "neutral" ? ` ${e.tone}` : ""}`,
5468
5972
  children: [/* @__PURE__ */ t("span", {
5469
5973
  className: "timeline-dot",
5470
- children: /* @__PURE__ */ t(k, {
5974
+ children: /* @__PURE__ */ t(N, {
5471
5975
  name: e.icon || "circle",
5472
5976
  size: 12
5473
5977
  })
@@ -5498,8 +6002,94 @@ function an({ items: e = [], className: r = "", ...i }) {
5498
6002
  });
5499
6003
  }
5500
6004
  //#endregion
6005
+ //#region src/components/toastStore.js
6006
+ var $ = [], Tn = /* @__PURE__ */ new Set(), En = 0;
6007
+ function Dn() {
6008
+ for (let e of Tn) e($);
6009
+ }
6010
+ function On(e) {
6011
+ return Tn.add(e), e($), () => Tn.delete(e);
6012
+ }
6013
+ function kn(e, t) {
6014
+ let n = `${t}:${e}`;
6015
+ $.some((e) => e.key === n) || ($ = [...$, {
6016
+ id: ++En,
6017
+ message: e,
6018
+ variant: t,
6019
+ key: n
6020
+ }], Dn());
6021
+ }
6022
+ function An(e) {
6023
+ let t = $.filter((t) => t.id !== e);
6024
+ t.length !== $.length && ($ = t, Dn());
6025
+ }
6026
+ //#endregion
6027
+ //#region src/components/AppToastContainer.jsx
6028
+ var jn = {
6029
+ success: {
6030
+ cls: "text-bg-success",
6031
+ closeWhite: !0
6032
+ },
6033
+ info: {
6034
+ cls: "text-bg-info",
6035
+ closeWhite: !1
6036
+ },
6037
+ warning: {
6038
+ cls: "text-bg-warning",
6039
+ closeWhite: !1
6040
+ },
6041
+ error: {
6042
+ cls: "text-bg-danger",
6043
+ closeWhite: !0
6044
+ }
6045
+ };
6046
+ function Mn({ position: e = "bottom-end", autoDismiss: r = 5e3 }) {
6047
+ let [i, o] = u([]);
6048
+ return a(() => On(o), []), /* @__PURE__ */ t(C, {
6049
+ position: e,
6050
+ containerPosition: "fixed",
6051
+ className: "p-3",
6052
+ children: i.map((e) => {
6053
+ let i = jn[e.variant] ?? jn.success;
6054
+ return /* @__PURE__ */ t(S, {
6055
+ className: i.cls,
6056
+ onClose: () => An(e.id),
6057
+ show: !0,
6058
+ delay: r,
6059
+ autohide: !0,
6060
+ children: /* @__PURE__ */ n(S.Body, {
6061
+ className: "d-flex align-items-center gap-3",
6062
+ children: [/* @__PURE__ */ t("span", {
6063
+ className: "flex-grow-1",
6064
+ children: e.message
6065
+ }), /* @__PURE__ */ t("button", {
6066
+ type: "button",
6067
+ className: i.closeWhite ? "btn-close btn-close-white" : "btn-close",
6068
+ "aria-label": "Close",
6069
+ onClick: () => An(e.id)
6070
+ })]
6071
+ })
6072
+ }, e.id);
6073
+ })
6074
+ });
6075
+ }
6076
+ //#endregion
6077
+ //#region src/components/toast.js
6078
+ var Nn = /* @__PURE__ */ new Set([
6079
+ "success",
6080
+ "info",
6081
+ "warning",
6082
+ "error"
6083
+ ]);
6084
+ function Pn(e, t = "success") {
6085
+ kn(e, Nn.has(t) ? t : "success");
6086
+ }
6087
+ function Fn(e) {
6088
+ kn(e, "error");
6089
+ }
6090
+ //#endregion
5501
6091
  //#region src/lib/usePagination.js
5502
- function on(e, t = 10) {
6092
+ function In(e, t = 10) {
5503
6093
  let [n, r] = u(1), [i, o] = u(t), s = e.length, l = Math.max(1, Math.ceil(s / i));
5504
6094
  a(() => {
5505
6095
  n > l && r(l);
@@ -5525,4 +6115,4 @@ function on(e, t = 10) {
5525
6115
  };
5526
6116
  }
5527
6117
  //#endregion
5528
- export { A as ActionIcon, j as AppAccordion, M as AppAlert, Ge as AppAutocomplete, qe as AppAvatar, Je as AppBadge, Q as AppButton, Ze as AppCallout, Qe as AppCard, $e as AppCheckbox, et as AppChip, tt as AppChoiceCard, nt as AppChoiceChip, rt as AppColorField, it as AppCompareTable, ut as AppConfirmDialog, bt as AppDataTable, xt as AppDatePicker, St as AppDateRangePicker, wt as AppDropdown, Tt as AppEmptyState, Et as AppFileAttachment, At as AppFilePicker, jt as AppInfoList, at as AppInfoTip, ot as AppInput, Mt as AppKpiTile, Nt as AppLogoPicker, ct as AppModal, Pt as AppMultiSelect, Ft as AppOtpInput, It as AppPageHeader, Lt as AppPhoneNumberInput, Rt as AppPricingCard, zt as AppRadio, Bt as AppRepeater, Vt as AppResourceCard, Ht as AppSearch, Ut as AppSegmented, Gt as AppSelect, ht as AppSelectMini, Kt as AppShell, Yt as AppSidebarMenu, dt as AppSkeleton, mt as AppSkeletonRows, Xt as AppSpinner, Zt as AppSplash, Qt as AppStatusBadge, $t as AppStepper, en as AppSwitch, tn as AppTableEmptyState, _t as AppTablePagination, nn as AppTabs, rn as AppTextarea, an as AppTimeline, k as Icon, lt as MODAL_ICONS, Z as RequiredMark, kt as errorToast, O as iconNames, Ot as toast, on as usePagination };
6118
+ export { ee as ActionIcon, P as AppAccordion, te as AppAlert, re as AppAsyncBlock, rt as AppAutocomplete, at as AppAvatar, ot as AppBadge, L as AppButton, st as AppCallout, ct as AppCard, lt as AppCheckbox, ut as AppChip, dt as AppChoiceCard, ft as AppChoiceChip, pt as AppColorField, mt as AppCompareTable, St as AppConfirmDialog, Pt as AppDataTable, Ft as AppDatePicker, It as AppDateRangePicker, Rt as AppDropdown, R as AppEmptyState, zt as AppFileAttachment, Gt as AppFilePicker, Jt as AppInfoList, ht as AppInfoTip, gt as AppInput, Yt as AppKpiTile, Zt as AppLogoPicker, yt as AppModal, Qt as AppMultiSelect, $t as AppOtpInput, en as AppPageHeader, tn as AppPhoneNumberInput, nn as AppPricingCard, rn as AppRadio, an as AppRepeater, on as AppResourceCard, sn as AppScrollbar, cn as AppSearch, ln as AppSegmented, dn as AppSelect, kt as AppSelectMini, fn as AppShell, hn as AppSidebarMenu, Ct as AppSkeleton, Et as AppSkeletonRows, ne as AppSpinner, _n as AppSplash, vn as AppStatusBadge, yn as AppStepper, bn as AppSwitch, xn as AppTableEmptyState, jt as AppTablePagination, Sn as AppTabs, Cn as AppTextarea, wn as AppTimeline, Mn as AppToastContainer, N as Icon, xt as MODAL_ICONS, Q as RequiredMark, Fn as errorToast, A as iconNames, M as registerIcons, Pn as toast, In as usePagination };