@webority/ui-react 0.6.12 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui-react.js CHANGED
@@ -1,34 +1,34 @@
1
1
  import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { forwardRef as r, useCallback as i, useEffect as a, useId as o, useLayoutEffect as s, useRef as c, useState as l } from "react";
3
- import u from "react-bootstrap/Alert";
4
- import d from "react-bootstrap/Badge";
5
- import f from "react-bootstrap/Button";
6
- import p from "react-bootstrap/Card";
7
- import m from "react-bootstrap/Form";
8
- import { createPortal as h } from "react-dom";
9
- import g from "react-bootstrap/Modal";
10
- import _ from "react-bootstrap/Dropdown";
11
- import { toast as v } from "react-toastify";
12
- import y from "react-bootstrap/Offcanvas";
13
- import b from "react-bootstrap/Nav";
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";
14
14
  //#region src/components/warnUnknownProps.js
15
- var x = /* @__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(".")), S = () => {
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 = () => {
16
16
  try {
17
17
  return process.env.NODE_ENV !== "production";
18
18
  } catch {
19
19
  return !0;
20
20
  }
21
- }, C = (e) => e.startsWith("data-") || e.startsWith("aria-") || /^on[A-Z]/.test(e), w = /* @__PURE__ */ new Set();
22
- function T(e, t) {
23
- if (!(!S() || !t) && !("as" in t)) for (let n of Object.keys(t)) {
24
- if (C(n) || x.has(n)) continue;
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;
25
25
  let t = `${e}.${n}`;
26
- w.has(t) || (w.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.`));
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.`));
27
27
  }
28
28
  }
29
29
  //#endregion
30
30
  //#region src/components/Icon.jsx
31
- var E = {
31
+ var D = {
32
32
  activity: "activity",
33
33
  "alert-circle": "exclamation-circle",
34
34
  "alert-triangle": "exclamation-triangle",
@@ -126,9 +126,9 @@ var E = {
126
126
  "wand-sparkles": "magic",
127
127
  x: "x-lg",
128
128
  zap: "lightning-charge"
129
- }, D = [...Object.keys(E), "hard-hat"].sort();
130
- function O({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
131
- if (T("Icon", s), e === "hard-hat") return /* @__PURE__ */ t("svg", {
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", {
132
132
  width: r,
133
133
  height: r,
134
134
  viewBox: "0 0 24 24",
@@ -150,7 +150,7 @@ function O({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
150
150
  }), /* @__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
151
  })
152
152
  });
153
- let c = E[e] || e;
153
+ let c = D[e] || e;
154
154
  return c ? /* @__PURE__ */ t("i", {
155
155
  className: `bi bi-${c}${i ? ` ${i}` : ""}`,
156
156
  "data-icon": e,
@@ -165,8 +165,8 @@ function O({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
165
165
  }
166
166
  //#endregion
167
167
  //#region src/components/ActionIcon.jsx
168
- function k({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20, onClick: o, className: s = "", as: c, href: l, ...u }) {
169
- T("ActionIcon", u);
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);
170
170
  let d = [
171
171
  "u-action",
172
172
  r ? "danger" : "",
@@ -183,7 +183,7 @@ function k({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
183
183
  role: !p && i ? "link" : void 0,
184
184
  onClick: o,
185
185
  ...u,
186
- children: /* @__PURE__ */ t(O, {
186
+ children: /* @__PURE__ */ t(k, {
187
187
  name: e,
188
188
  size: a
189
189
  })
@@ -191,9 +191,9 @@ function k({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
191
191
  }
192
192
  //#endregion
193
193
  //#region src/components/AppAccordion.jsx
194
- function A({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s }) {
195
- T("AppAccordion", s);
196
- let c = o(), u = i || c, [d, f] = l(() => {
194
+ function j({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s }) {
195
+ E("AppAccordion", s);
196
+ let c = o(), l = i || c, [d, f] = u(() => {
197
197
  let t = e.filter((e) => e.open).map((e, t) => e.key ?? String(t));
198
198
  return new Set(r ? t : t.slice(0, 1));
199
199
  }), p = (e, t) => e.key ?? String(t), m = (e) => {
@@ -205,7 +205,7 @@ function A({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s })
205
205
  return /* @__PURE__ */ t("div", {
206
206
  className: `faq-list${a ? ` ${a}` : ""}`,
207
207
  children: e.map((e, r) => {
208
- let i = p(e, r), a = d.has(i), o = `${u}-${r}`, s = `${o}-q`;
208
+ let i = p(e, r), a = d.has(i), o = `${l}-${r}`, s = `${o}-q`;
209
209
  return /* @__PURE__ */ n("div", {
210
210
  className: `faq-item${a ? " open" : ""}`,
211
211
  children: [/* @__PURE__ */ n("button", {
@@ -217,7 +217,7 @@ function A({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s })
217
217
  onClick: () => m(i),
218
218
  children: [e.title, /* @__PURE__ */ t("span", {
219
219
  className: "faq-q-icon",
220
- children: /* @__PURE__ */ t(O, {
220
+ children: /* @__PURE__ */ t(k, {
221
221
  name: "chevron-down",
222
222
  size: 18
223
223
  })
@@ -237,8 +237,8 @@ function A({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s })
237
237
  }
238
238
  //#endregion
239
239
  //#region src/components/AppAlert.jsx
240
- function j({ variant: e = "info", children: n, className: r = "", onClose: i, dismissible: a, role: o = "alert", ...s }) {
241
- return T("AppAlert", s), /* @__PURE__ */ t(u, {
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, {
242
242
  variant: e,
243
243
  className: r || void 0,
244
244
  onClose: i,
@@ -251,15 +251,15 @@ function j({ variant: e = "info", children: n, className: r = "", onClose: i, di
251
251
  }
252
252
  //#endregion
253
253
  //#region ../elements/dist/ui-elements.js
254
- var M = {
254
+ var N = {
255
255
  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
256
  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
257
  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
258
  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
259
  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
260
  };
261
- Object.keys(M);
262
- var N = class extends HTMLElement {
261
+ Object.keys(N);
262
+ var ee = class extends HTMLElement {
263
263
  static get observedAttributes() {
264
264
  return ["tone", "size"];
265
265
  }
@@ -270,7 +270,7 @@ var N = class extends HTMLElement {
270
270
  this.isConnected && this.render();
271
271
  }
272
272
  render() {
273
- let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = M[e] || M.info;
273
+ let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = N[e] || N.info;
274
274
  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
275
  }
276
276
  }, P = 4;
@@ -287,26 +287,26 @@ function I(e, t) {
287
287
  function L(e) {
288
288
  e?._reanchor && (window.removeEventListener("resize", e._reanchor), window.removeEventListener("scroll", e._reanchor, !0), e._reanchor = null);
289
289
  }
290
- var R = "data-wui-mirror";
291
- function z(e, t) {
292
- let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${R}]`);
290
+ var te = "data-wui-mirror";
291
+ function R(e, t) {
292
+ let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${te}]`);
293
293
  if (!n) {
294
294
  r?.remove();
295
295
  return;
296
296
  }
297
- r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(R, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
297
+ r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(te, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
298
298
  for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
299
299
  r.disabled = e.hasAttribute("disabled");
300
300
  }
301
- var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), ee = (e) => {
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) => {
302
302
  if (!e) return "";
303
303
  let t = String(e).toLowerCase().replace(/[^a-z0-9-]/g, "");
304
304
  return t ? `<i class="bi bi-${t}" aria-hidden="true"></i>` : "";
305
- }, H = (e) => {
305
+ }, V = (e) => {
306
306
  if (e == null) return "";
307
- let t = e[B] ? String(e.label ?? "") : V(e.label), n = ee(e.icon);
307
+ let t = e[z] ? String(e.label ?? "") : B(e.label), n = ne(e.icon);
308
308
  return n ? `<span class="wui-opt-label">${n}${t}</span>` : t;
309
- }, te = class extends HTMLElement {
309
+ }, re = class extends HTMLElement {
310
310
  _accessibleName() {
311
311
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
312
312
  }
@@ -335,18 +335,20 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
335
335
  return this._value;
336
336
  }
337
337
  set value(e) {
338
- this._value = e == null ? "" : String(e), z(this, this._value);
338
+ this._value = e == null ? "" : String(e), R(this, this._value);
339
339
  let t = this._readOptions().find((e) => String(e.value) === this._value);
340
- t && (this._label = re(t.label)), this._syncInput();
340
+ this._label = t ? ae(t.label) : "", this._syncInput(), this._renderOptions("");
341
341
  }
342
342
  set options(e) {
343
- this._optionsProp = Array.isArray(e) ? e : [], this._renderOptions();
343
+ this._optionsProp = Array.isArray(e) ? e : [];
344
+ let t = this._readOptions().find((e) => String(e.value) === this._value);
345
+ t && (this._label = ae(t.label)), this._renderOptions(), this._syncInput();
344
346
  }
345
347
  get options() {
346
348
  return this._readOptions();
347
349
  }
348
350
  set loading(e) {
349
- this._loading = !!e, this._renderLoading();
351
+ this._loading = !!e, this._renderLoading(), this._renderOptions();
350
352
  }
351
353
  get loading() {
352
354
  return this._loading;
@@ -358,8 +360,10 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
358
360
  return Math.max(0, Number(this.getAttribute("min-chars")) || +!!this._remote);
359
361
  }
360
362
  get _debounceMs() {
361
- let e = Number(this.getAttribute("debounce"));
362
- return Number.isFinite(e) && e >= 0 ? e : 250;
363
+ let e = this.getAttribute("debounce");
364
+ if (e == null || e === "") return 250;
365
+ let t = Number(e);
366
+ return Number.isFinite(t) && t >= 0 ? t : 250;
363
367
  }
364
368
  _snapshotDeclared() {
365
369
  if (this._declared) return;
@@ -368,7 +372,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
368
372
  value: e.getAttribute("value") ?? e.textContent.trim(),
369
373
  label: e.innerHTML,
370
374
  icon: e.getAttribute("icon") || void 0,
371
- [B]: !0,
375
+ [z]: !0,
372
376
  selected: e.hasAttribute("selected")
373
377
  })));
374
378
  }
@@ -380,8 +384,8 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
380
384
  let e = this.getAttribute("placeholder") || "Search…", t = this.getAttribute("size"), n = t === "sm" ? " search-select-sm" : t === "lg" ? " search-select-lg" : "";
381
385
  this.innerHTML = `
382
386
  <div class="search-select${n}">
383
- <div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${ne(this._accessibleName())}">
384
- <input class="search-select-input search-select-ac-input" placeholder="${ne(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
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" : ""} />
385
389
  <span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
386
390
  <button type="button" class="search-select-clear" aria-label="Clear" hidden><i class="bi bi-x" aria-hidden="true"></i></button>
387
391
  </div>
@@ -390,7 +394,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
390
394
  <div class="search-select-empty" hidden>No matches</div>
391
395
  <div class="search-select-hint" hidden>Type to search…</div>
392
396
  </div>
393
- </div>`, this._rendered = !0, z(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
397
+ </div>`, this._rendered = !0, R(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
394
398
  }
395
399
  _refs() {
396
400
  return {
@@ -419,9 +423,9 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
419
423
  let t = this._refs();
420
424
  if (!t.optionsWrap) return;
421
425
  let n = (e ?? (t.input ? t.input.value : "")).trim().toLowerCase(), r = this._readOptions();
422
- !this._remote && n && (r = r.filter((e) => re(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
426
+ !this._remote && n && (r = r.filter((e) => ae(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
423
427
  let t = String(e.value) === String(this._value);
424
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${ne(e.value)}" aria-selected="${t}">${H(e)}</button>`;
428
+ return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${ie(e.value)}" aria-selected="${t}">${V(e)}</button>`;
425
429
  }).join(""), this._active = -1;
426
430
  let i = n.length < this._minChars;
427
431
  t.hint && (t.hint.hidden = !(this._remote && i && !r.length)), t.empty && (t.empty.hidden = this._loading || r.length > 0 || this._remote && i);
@@ -439,7 +443,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
439
443
  }, o = () => {
440
444
  e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), this._syncInput();
441
445
  }, s = (t) => {
442
- this._value = t.dataset.value, this._label = re(t.innerHTML), z(this, this._value), e.input.value = this._label, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.input.focus();
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();
443
447
  };
444
448
  e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", () => {
445
449
  let t = e.input.value;
@@ -462,7 +466,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
462
466
  let t = e.target.closest(".search-select-option");
463
467
  t && r(this._optionEls().indexOf(t));
464
468
  }), e.optionsWrap.addEventListener("mouseleave", () => r(-1)), e.clear?.addEventListener("click", () => {
465
- this._value = "", this._label = "", z(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
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();
466
470
  }), this._onDocClick = (e) => {
467
471
  i() && !this.contains(e.target) && o();
468
472
  }, document.addEventListener("click", this._onDocClick), I(this, () => {
@@ -472,7 +476,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
472
476
  disconnectedCallback() {
473
477
  this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this), clearTimeout(this._timer);
474
478
  }
475
- }, ne = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), re = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ie = [
479
+ }, ie = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ae = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), oe = [
476
480
  "January",
477
481
  "February",
478
482
  "March",
@@ -485,7 +489,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
485
489
  "October",
486
490
  "November",
487
491
  "December"
488
- ], ae = [
492
+ ], se = [
489
493
  "Su",
490
494
  "Mo",
491
495
  "Tu",
@@ -493,24 +497,24 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
493
497
  "Th",
494
498
  "Fr",
495
499
  "Sa"
496
- ], U = (e) => String(e).padStart(2, "0"), W = (e, t, n) => `${e}-${U(t + 1)}-${U(n)}`, G = (e) => {
500
+ ], H = (e) => String(e).padStart(2, "0"), U = (e, t, n) => `${e}-${H(t + 1)}-${H(n)}`, W = (e) => {
497
501
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
498
502
  return t ? {
499
503
  y: +t[1],
500
504
  m: t[2] - 1,
501
505
  d: +t[3]
502
506
  } : null;
503
- }, oe = (e) => {
504
- let t = G(e);
505
- return t ? `${U(t.d)} ${ie[t.m].slice(0, 3)} ${t.y}` : "";
506
- }, K = (e, t) => new Date(e, t + 1, 0).getDate(), q = (e, t) => {
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) => {
507
511
  for (; t < 0;) t += 12, --e;
508
512
  for (; t > 11;) t -= 12, e += 1;
509
513
  return {
510
514
  y: e,
511
515
  m: t
512
516
  };
513
- }, se = class extends HTMLElement {
517
+ }, le = class extends HTMLElement {
514
518
  static get observedAttributes() {
515
519
  return [
516
520
  "value",
@@ -537,7 +541,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
537
541
  return this._value;
538
542
  }
539
543
  set value(e) {
540
- this._value = e || "", z(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
544
+ this._value = e || "", R(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
541
545
  }
542
546
  _firstDay() {
543
547
  let e = Number.parseInt(this.getAttribute("first-day") ?? "", 10);
@@ -545,29 +549,29 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
545
549
  }
546
550
  render() {
547
551
  this._value = this.getAttribute("value") || this._value;
548
- let e = this.getAttribute("placeholder") || "Enter Date", t = G(this._value);
552
+ let e = this.getAttribute("placeholder") || "Enter Date", t = W(this._value);
549
553
  t && (this._viewY = t.y, this._viewM = t.m);
550
554
  let n = this.getAttribute("size"), r = n === "sm" ? " input-sm" : n === "lg" ? " input-lg" : "";
551
555
  this.innerHTML = `
552
556
  <div class="datepicker">
553
557
  <button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
554
- <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? oe(this._value) : e}</span>
558
+ <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? ce(this._value) : e}</span>
555
559
  <i class="bi bi-calendar3" aria-hidden="true"></i>
556
560
  </button>
557
561
  <div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
558
- </div>`, this._rendered = !0, z(this, this._value), this._wire();
562
+ </div>`, this._rendered = !0, R(this, this._value), this._wire();
559
563
  }
560
564
  _syncFormValue() {
561
- z(this, this._value);
565
+ R(this, this._value);
562
566
  }
563
567
  _syncTrigger() {
564
568
  let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
565
569
  if (!t) return;
566
- let n = G(this._value);
567
- t.textContent = n ? oe(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
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);
568
572
  }
569
573
  _limits() {
570
- let e = G(this.getAttribute("min")), t = G(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;
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;
571
575
  return {
572
576
  dayDisabled: (e, t, i) => {
573
577
  let a = new Date(e, t, i).getTime();
@@ -575,7 +579,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
575
579
  },
576
580
  monthDisabled: (e, t) => {
577
581
  let i = new Date(e, t, 1).getTime();
578
- return new Date(e, t, K(e, t)).getTime() < n || i > r;
582
+ return new Date(e, t, G(e, t)).getTime() < n || i > r;
579
583
  },
580
584
  yearDisabled: (e) => {
581
585
  let t = new Date(e, 0, 1).getTime();
@@ -588,28 +592,28 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
588
592
  e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
589
593
  }
590
594
  _daysHtml() {
591
- let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = K(this._viewY, this._viewM), r = G(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
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 || {
592
596
  y: this._viewY,
593
597
  m: this._viewM,
594
598
  d: 1
595
599
  }, s = (e, t, n, s) => {
596
- let c = W(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);
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);
597
601
  return `<button type="button" class="${[
598
602
  "datepicker-day",
599
603
  s ? "is-outside" : "",
600
604
  u ? "is-today" : "",
601
605
  l ? "is-selected" : ""
602
606
  ].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
603
- }, c = "", l = q(this._viewY, this._viewM - 1), u = K(l.y, l.m);
607
+ }, c = "", l = K(this._viewY, this._viewM - 1), u = G(l.y, l.m);
604
608
  for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
605
609
  for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
606
- let d = q(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
610
+ let d = K(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
607
611
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
608
- let p = ae.map((t, n) => ae[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
612
+ let p = se.map((t, n) => se[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
609
613
  return `
610
614
  <div class="datepicker-head">
611
615
  <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>
612
- <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${ie[this._viewM]} ${this._viewY}</button>
616
+ <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${oe[this._viewM]} ${this._viewY}</button>
613
617
  <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>
614
618
  </div>
615
619
  <div class="datepicker-weekdays">${p}</div>
@@ -620,14 +624,14 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
620
624
  </div>`;
621
625
  }
622
626
  _monthsHtml() {
623
- let e = G(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
627
+ let e = W(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
624
628
  for (let i = 0; i < 12; i++) {
625
629
  let a = e && e.y === this._viewY && e.m === i, o = t.getFullYear() === this._viewY && t.getMonth() === i, s = n(this._viewY, i), c = [
626
630
  "datepicker-cell",
627
631
  o ? "is-today" : "",
628
632
  a ? "is-selected" : ""
629
633
  ].filter(Boolean).join(" ");
630
- r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${ie[i].slice(0, 3)}</button>`;
634
+ r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${oe[i].slice(0, 3)}</button>`;
631
635
  }
632
636
  return `
633
637
  <div class="datepicker-head">
@@ -638,7 +642,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
638
642
  <div class="datepicker-cells">${r}</div>`;
639
643
  }
640
644
  _yearsHtml() {
641
- let e = G(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
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 = "";
642
646
  for (let a = 0; a < 12; a++) {
643
647
  let o = r + a, s = e && e.y === o, c = t === o, l = n(o), u = [
644
648
  "datepicker-cell",
@@ -663,21 +667,21 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
663
667
  F(e, t);
664
668
  }
665
669
  _setFocus(e, t, n, r) {
666
- let { y: i, m: a } = q(e, t);
670
+ let { y: i, m: a } = K(e, t);
667
671
  this._focus = {
668
672
  y: i,
669
673
  m: a,
670
674
  d: n
671
675
  };
672
676
  let o = i !== this._viewY || a !== this._viewM;
673
- this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${W(i, a, n)}"]`)?.focus();
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();
674
678
  }
675
679
  _onKey(e) {
676
680
  if (this._mode !== "days") {
677
681
  e.key === "Escape" && this._close();
678
682
  return;
679
683
  }
680
- let t = this._focus || G(this._value) || {
684
+ let t = this._focus || W(this._value) || {
681
685
  y: this._viewY,
682
686
  m: this._viewM,
683
687
  d: 1
@@ -695,17 +699,17 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
695
699
  case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
696
700
  case "PageUp": {
697
701
  e.preventDefault();
698
- let n = q(t.y, t.m - (e.shiftKey ? 12 : 1));
699
- return this._setFocus(n.y, n.m, Math.min(t.d, K(n.y, n.m)), "slide-prev");
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");
700
704
  }
701
705
  case "PageDown": {
702
706
  e.preventDefault();
703
- let n = q(t.y, t.m + (e.shiftKey ? 12 : 1));
704
- return this._setFocus(n.y, n.m, Math.min(t.d, K(n.y, n.m)), "slide-next");
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");
705
709
  }
706
710
  case "Enter":
707
711
  case " ":
708
- e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = W(t.y, t.m, t.d), this._close());
712
+ e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = U(t.y, t.m, t.d), this._close());
709
713
  return;
710
714
  case "Escape": return this._close();
711
715
  default:
@@ -716,11 +720,11 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
716
720
  if (!e || !t) return;
717
721
  let r = () => !t.hidden;
718
722
  this._open = () => {
719
- if (!G(this._value) && !this._viewNavigated) {
723
+ if (!W(this._value) && !this._viewNavigated) {
720
724
  let e = /* @__PURE__ */ new Date();
721
725
  this._viewY = e.getFullYear(), this._viewM = e.getMonth();
722
726
  }
723
- let r = G(this._value), i = /* @__PURE__ */ new Date();
727
+ let r = W(this._value), i = /* @__PURE__ */ new Date();
724
728
  this._mode = "days", this._focus = r || {
725
729
  y: this._viewY,
726
730
  m: this._viewM,
@@ -733,7 +737,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
733
737
  let t = e.target.closest("[data-nav]");
734
738
  if (t) {
735
739
  this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
736
- let e = q(this._viewY, this._viewM + Number(t.dataset.nav));
740
+ let e = K(this._viewY, this._viewM + Number(t.dataset.nav));
737
741
  this._viewY = e.y, this._viewM = e.m, this._focus = {
738
742
  y: e.y,
739
743
  m: e.m,
@@ -772,7 +776,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
772
776
  }
773
777
  if (e.target.closest("[data-today]")) {
774
778
  let e = /* @__PURE__ */ new Date();
775
- this.value = W(e.getFullYear(), e.getMonth(), e.getDate()), this._close();
779
+ this.value = U(e.getFullYear(), e.getMonth(), e.getDate()), this._close();
776
780
  return;
777
781
  }
778
782
  if (e.target.closest("[data-clear]")) {
@@ -793,7 +797,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
793
797
  disconnectedCallback() {
794
798
  this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this);
795
799
  }
796
- }, ce = [
800
+ }, ue = [
797
801
  "January",
798
802
  "February",
799
803
  "March",
@@ -806,7 +810,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
806
810
  "October",
807
811
  "November",
808
812
  "December"
809
- ], le = [
813
+ ], de = [
810
814
  "Su",
811
815
  "Mo",
812
816
  "Tu",
@@ -814,24 +818,24 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
814
818
  "Th",
815
819
  "Fr",
816
820
  "Sa"
817
- ], ue = (e) => String(e).padStart(2, "0"), de = (e, t, n) => `${e}-${ue(t + 1)}-${ue(n)}`, J = (e) => {
821
+ ], fe = (e) => String(e).padStart(2, "0"), pe = (e, t, n) => `${e}-${fe(t + 1)}-${fe(n)}`, q = (e) => {
818
822
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
819
823
  return t ? {
820
824
  y: +t[1],
821
825
  m: t[2] - 1,
822
826
  d: +t[3]
823
827
  } : null;
824
- }, fe = (e) => {
825
- let t = J(e);
826
- return t ? `${ue(t.d)} ${ce[t.m].slice(0, 3)} ${t.y}` : "";
827
- }, pe = (e, t) => new Date(e, t + 1, 0).getDate(), me = (e, t) => {
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) => {
828
832
  for (; t < 0;) t += 12, --e;
829
833
  for (; t > 11;) t -= 12, e += 1;
830
834
  return {
831
835
  y: e,
832
836
  m: t
833
837
  };
834
- }, he = class extends HTMLElement {
838
+ }, _e = class extends HTMLElement {
835
839
  static get observedAttributes() {
836
840
  return [
837
841
  "start",
@@ -874,13 +878,13 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
874
878
  text: e,
875
879
  empty: !0
876
880
  } : {
877
- text: `${fe(this._start) || "Start"} – ${fe(this._end) || "End"}`,
881
+ text: `${me(this._start) || "Start"} – ${me(this._end) || "End"}`,
878
882
  empty: !1
879
883
  };
880
884
  }
881
885
  render() {
882
886
  this._start = this.getAttribute("start") || this._start, this._end = this.getAttribute("end") || this._end;
883
- let e = J(this._start);
887
+ let e = q(this._start);
884
888
  e && (this._viewY = e.y, this._viewM = e.m);
885
889
  let t = this.getAttribute("size"), n = t === "sm" ? " input-sm" : t === "lg" ? " input-lg" : "", { text: r, empty: i } = this._label();
886
890
  this.innerHTML = `
@@ -908,24 +912,24 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
908
912
  r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute("data-range-mirror", e), this.appendChild(r)), r.name = t, r.value = n || "";
909
913
  }
910
914
  _limits() {
911
- 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;
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;
912
916
  return (e, t, i) => {
913
917
  let a = new Date(e, t, i).getTime();
914
918
  return a < n || a > r;
915
919
  };
916
920
  }
917
921
  _monthHtml(e, t) {
918
- let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = pe(e, t), a = this._limits(), o = le.map((e, t) => le[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
919
- let i = de(e, t, n), o = a(e, t, n);
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);
920
924
  return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
921
- }, c = "", l = me(e, t - 1), u = pe(l.y, l.m);
925
+ }, c = "", l = ge(e, t - 1), u = he(l.y, l.m);
922
926
  for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
923
927
  for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
924
- let d = me(e, t + 1), f = (7 - (r + i) % 7) % 7;
928
+ let d = ge(e, t + 1), f = (7 - (r + i) % 7) % 7;
925
929
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
926
930
  return `
927
931
  <div class="daterange-cal">
928
- <div class="datepicker-month-label">${ce[t]} ${e}</div>
932
+ <div class="datepicker-month-label">${ue[t]} ${e}</div>
929
933
  <div class="datepicker-weekdays">${o}</div>
930
934
  <div class="datepicker-grid" role="grid">${c}</div>
931
935
  </div>`;
@@ -933,7 +937,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
933
937
  _renderView() {
934
938
  let e = this.querySelector(".daterange-pop");
935
939
  if (!e) return;
936
- let t = me(this._viewY, this._viewM + 1);
940
+ let t = ge(this._viewY, this._viewM + 1);
937
941
  e.innerHTML = `
938
942
  <div class="daterange-head">
939
943
  <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>
@@ -959,7 +963,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
959
963
  n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
960
964
  }
961
965
  let i = e.querySelector("[data-range-hint]");
962
- i && (i.textContent = this._start ? this._end ? `${fe(this._start)} – ${fe(this._end)}` : "Pick an end date" : "Pick a start date");
966
+ i && (i.textContent = this._start ? this._end ? `${me(this._start)} – ${me(this._end)}` : "Pick an end date" : "Pick a start date");
963
967
  }
964
968
  _position(e, t) {
965
969
  F(e, t);
@@ -980,7 +984,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
980
984
  if (!e || !t) return;
981
985
  let r = () => !t.hidden;
982
986
  this._open = () => {
983
- let r = J(this._start);
987
+ let r = q(this._start);
984
988
  if (r) this._viewY = r.y, this._viewM = r.m;
985
989
  else {
986
990
  let e = /* @__PURE__ */ new Date();
@@ -993,7 +997,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
993
997
  this._popClick = !0;
994
998
  let t = e.target.closest("[data-nav]");
995
999
  if (t) {
996
- let e = me(this._viewY, this._viewM + Number(t.dataset.nav));
1000
+ let e = ge(this._viewY, this._viewM + Number(t.dataset.nav));
997
1001
  this._viewY = e.y, this._viewM = e.m, this._renderView();
998
1002
  return;
999
1003
  }
@@ -1018,7 +1022,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1018
1022
  disconnectedCallback() {
1019
1023
  this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey), L(this);
1020
1024
  }
1021
- }, ge = class extends HTMLElement {
1025
+ }, ve = class extends HTMLElement {
1022
1026
  _accessibleName() {
1023
1027
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
1024
1028
  }
@@ -1053,7 +1057,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1053
1057
  return this._values.slice();
1054
1058
  }
1055
1059
  set values(e) {
1056
- this._values = Array.isArray(e) ? e.map(String) : [], z(this, this._values.join(",")), this._rendered && this._renderControl();
1060
+ this._values = Array.isArray(e) ? e.map(String) : [], R(this, this._values.join(",")), this._rendered && this._renderControl();
1057
1061
  }
1058
1062
  set options(e) {
1059
1063
  this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
@@ -1068,7 +1072,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1068
1072
  value: e.getAttribute("value") ?? e.textContent.trim(),
1069
1073
  label: e.innerHTML,
1070
1074
  icon: e.getAttribute("icon") || void 0,
1071
- [B]: !0,
1075
+ [z]: !0,
1072
1076
  selected: e.hasAttribute("selected")
1073
1077
  })));
1074
1078
  }
@@ -1081,34 +1085,34 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1081
1085
  }
1082
1086
  _labelHtmlFor(e) {
1083
1087
  let t = this._readOptions().find((t) => String(t.value) === String(e));
1084
- return t ? H(t) : V(e);
1088
+ return t ? V(t) : B(e);
1085
1089
  }
1086
1090
  render() {
1087
1091
  this._snapshotDeclared();
1088
1092
  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" : "";
1089
- z(this, this._values.join(",")), this.innerHTML = `
1093
+ R(this, this._values.join(",")), this.innerHTML = `
1090
1094
  <div class="search-select${i}">
1091
- <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${Y(this._accessibleName())}"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
1092
- ${n ? `<i class="bi bi-${Y(n)} search-select-icon" aria-hidden="true"></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>` : ""}
1093
1097
  <div class="ms-chips" data-chips></div>
1094
1098
  <i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
1095
1099
  </div>
1096
1100
  <div class="search-select-menu search-select-menu-fixed" role="listbox" aria-multiselectable="true" tabindex="-1" hidden>
1097
- ${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${Y(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>` : ""}
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>` : ""}
1098
1102
  <div class="search-select-options"></div>
1099
1103
  <div class="search-select-empty" hidden>No matches</div>
1100
1104
  </div>
1101
- </div>`, this._rendered = !0, z(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
1105
+ </div>`, this._rendered = !0, R(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
1102
1106
  }
1103
1107
  _renderControl() {
1104
1108
  let e = this.querySelector("[data-chips]");
1105
1109
  if (!e) return;
1106
1110
  let t = this.getAttribute("placeholder") || "Select…";
1107
1111
  if (!this._values.length) {
1108
- e.innerHTML = `<span class="search-select-placeholder">${V(t)}</span>`;
1112
+ e.innerHTML = `<span class="search-select-placeholder">${B(t)}</span>`;
1109
1113
  return;
1110
1114
  }
1111
- 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="${Y(e)}" aria-label="Remove"><i class="bi bi-x" aria-hidden="true"></i></button></span>`).join(""), this._collapseChips();
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();
1112
1116
  }
1113
1117
  _collapseChips() {
1114
1118
  let e = this.querySelector("[data-chips]");
@@ -1132,9 +1136,9 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1132
1136
  let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
1133
1137
  if (!t) return;
1134
1138
  let r = (e || "").trim().toLowerCase(), i = this._readOptions();
1135
- r && (i = i.filter((e) => _e(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
1139
+ r && (i = i.filter((e) => ye(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
1136
1140
  let t = this._values.includes(String(e.value));
1137
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${Y(e.value)}" aria-selected="${t}"><span class="ms-opt-label">${H(e)}</span><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span></button>`;
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>`;
1138
1142
  }).join(""), n && (n.hidden = i.length > 0), this._active = -1;
1139
1143
  }
1140
1144
  _wire() {
@@ -1152,7 +1156,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1152
1156
  }, f = () => {
1153
1157
  t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1);
1154
1158
  }, p = () => {
1155
- z(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1159
+ R(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1156
1160
  }, m = (e) => {
1157
1161
  let t = String(e);
1158
1162
  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();
@@ -1196,7 +1200,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1196
1200
  disconnectedCallback() {
1197
1201
  this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this), this._ro?.disconnect(), this._ro = null;
1198
1202
  }
1199
- }, Y = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), _e = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ve = /[^0-9]/g, ye = /[^0-9a-zA-Z]/g, be = class extends HTMLElement {
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 {
1200
1204
  static get observedAttributes() {
1201
1205
  return [
1202
1206
  "value",
@@ -1223,16 +1227,16 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1223
1227
  return this._value ?? "";
1224
1228
  }
1225
1229
  set value(e) {
1226
- this._value = this._clean(e), z(this, this._value), this._paint();
1230
+ this._value = this._clean(e), R(this, this._value), this._paint();
1227
1231
  }
1228
1232
  _clean(e) {
1229
- return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? ye : ve, "").slice(0, this.length);
1233
+ return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? xe : be, "").slice(0, this.length);
1230
1234
  }
1231
1235
  connectedCallback() {
1232
1236
  this._rendered || this.render();
1233
1237
  }
1234
1238
  attributeChangedCallback(e, t, n) {
1235
- this._rendered && (e === "value" ? (this._value = this._clean(n), z(this, this._value), this._paint()) : this.render());
1239
+ this._rendered && (e === "value" ? (this._value = this._clean(n), R(this, this._value), this._paint()) : this.render());
1236
1240
  }
1237
1241
  render() {
1238
1242
  this._value = this._clean(this.getAttribute("value") ?? this._value);
@@ -1250,7 +1254,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1250
1254
  spellcheck="false"
1251
1255
  ${n ? "disabled" : ""} />
1252
1256
  <div class="otp-slots" aria-hidden="true">${r}</div>
1253
- </div>`, this._rendered = !0, z(this, this._value), this._wire(), this._paint();
1257
+ </div>`, this._rendered = !0, R(this, this._value), this._wire(), this._paint();
1254
1258
  }
1255
1259
  _refs() {
1256
1260
  return {
@@ -1272,7 +1276,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1272
1276
  if (!e) return;
1273
1277
  let t = (e) => {
1274
1278
  let t = this._clean(e), n = t !== this._value;
1275
- this._value = t, z(this, this._value), this._paint(), n && this.dispatchEvent(new Event("change", { bubbles: !0 })), n && t.length === this.length && this.dispatchEvent(new CustomEvent("complete", {
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", {
1276
1280
  bubbles: !0,
1277
1281
  detail: t
1278
1282
  }));
@@ -1292,7 +1296,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
1292
1296
  document.activeElement === e && this._paint();
1293
1297
  });
1294
1298
  }
1295
- }, xe = [
1299
+ }, Ce = [
1296
1300
  [
1297
1301
  "AF",
1298
1302
  "Afghanistan",
@@ -2518,11 +2522,67 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
2518
2522
  "Zimbabwe",
2519
2523
  "263"
2520
2524
  ]
2521
- ], Se = (e) => (xe.find((t) => t[0] === e) || [
2525
+ ], we = (e) => (Ce.find((t) => t[0] === e) || [
2522
2526
  "",
2523
2527
  "",
2524
2528
  ""
2525
- ])[2], Ce = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, we = class extends HTMLElement {
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 = {
2532
+ AsYouType: e.AsYouType,
2533
+ getExampleNumber: e.getExampleNumber,
2534
+ isValidPhoneNumber: e.isValidPhoneNumber,
2535
+ examples: t.default || t
2536
+ }, Y)).catch(() => null), Ee);
2537
+ }
2538
+ function Oe(e, t) {
2539
+ if (!Y || !t) return t;
2540
+ try {
2541
+ return new Y.AsYouType(e).input(t);
2542
+ } catch {
2543
+ return t;
2544
+ }
2545
+ }
2546
+ function ke(e) {
2547
+ if (!Y) return null;
2548
+ try {
2549
+ return Y.getExampleNumber(e, Y.examples)?.formatNational() || null;
2550
+ } catch {
2551
+ return null;
2552
+ }
2553
+ }
2554
+ function Ae(e) {
2555
+ if (!Y || !e) return null;
2556
+ try {
2557
+ return Y.isValidPhoneNumber(e);
2558
+ } catch {
2559
+ return null;
2560
+ }
2561
+ }
2562
+ function je(e) {
2563
+ if (!Y) return null;
2564
+ try {
2565
+ let t = Y.getExampleNumber(e, Y.examples);
2566
+ return t?.nationalNumber ? t.nationalNumber.length : null;
2567
+ } catch {
2568
+ return null;
2569
+ }
2570
+ }
2571
+ function Me(e) {
2572
+ if (!Y || !e?.trim().startsWith("+")) return null;
2573
+ try {
2574
+ let t = new Y.AsYouType();
2575
+ t.input(e.trim());
2576
+ let n = t.getCountry();
2577
+ return n ? {
2578
+ country: n,
2579
+ national: t.getNationalNumber() || ""
2580
+ } : null;
2581
+ } catch {
2582
+ return null;
2583
+ }
2584
+ }
2585
+ var Ne = class extends HTMLElement {
2526
2586
  static get observedAttributes() {
2527
2587
  return [
2528
2588
  "value",
@@ -2541,73 +2601,103 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
2541
2601
  this._rendered && (e === "country" && (this._country = n || "IN"), this.render());
2542
2602
  }
2543
2603
  get value() {
2544
- return `+${Se(this._country)}${this._national}`;
2604
+ return `+${we(this._country)}${this._national}`;
2545
2605
  }
2546
2606
  set value(e) {
2547
- this._national = String(e ?? "").replace(/[^0-9]/g, ""), this._commit();
2607
+ let t = String(e ?? "").trim(), n = Me(t);
2608
+ if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
2609
+ else if (t.startsWith("+")) {
2610
+ let e = t.replace(/[^0-9]/g, ""), n = String(we(this._country));
2611
+ n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
2612
+ } else this._national = t.replace(/[^0-9]/g, "");
2613
+ n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._commit();
2548
2614
  }
2549
2615
  _commit() {
2550
- z(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
2616
+ R(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
2551
2617
  }
2552
2618
  render() {
2553
- let e = this.getAttribute("placeholder") || "Enter phone number";
2619
+ let e = this.getAttribute("placeholder") || ke(this._country) || "Enter phone number";
2554
2620
  this._country = this.getAttribute("country") || this._country;
2555
- let t = xe.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${Ce(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
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("");
2556
2622
  this.innerHTML = `
2557
2623
  <div class="phone-input-wrap">
2558
2624
  <div class="phone-country-adornment">
2559
2625
  <button type="button" class="country-toggle" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
2560
- <span class="${Ce(this._country)}" data-flag aria-hidden="true"></span>
2626
+ <span class="${Te(this._country)}" data-flag aria-hidden="true"></span>
2561
2627
  <i class="bi bi-chevron-down phone-chevron" aria-hidden="true"></i>
2562
- <span class="phone-dial" data-dial>+${Se(this._country)}</span>
2628
+ <span class="phone-dial" data-dial>+${we(this._country)}</span>
2563
2629
  </button>
2564
2630
  <div class="country-dropdown-menu" role="listbox" hidden>
2565
2631
  <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>
2566
2632
  <div class="country-list-scroll">${t}<div class="country-empty" hidden>No countries found</div></div>
2567
2633
  </div>
2568
2634
  </div>
2569
- <input type="tel" class="input" placeholder="${Te(e)}" value="${Te(this._national)}"${this.hasAttribute("disabled") ? " disabled" : ""} />
2570
- </div>`, this._rendered = !0, z(this, this.value), this._wire();
2635
+ <input type="tel" class="input" placeholder="${Pe(e)}" value="${Pe(Oe(this._country, this._national))}"${this.hasAttribute("disabled") ? " disabled" : ""} />
2636
+ </div>
2637
+ <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, R(this, this.value), this._wire();
2571
2638
  }
2572
2639
  _wire() {
2573
- let e = this.querySelector(".country-toggle"), t = this.querySelector(".country-dropdown-menu"), n = this.querySelector(".dropdown-search-input"), r = this.querySelector(".country-list-scroll"), i = this.querySelector(".country-empty"), a = this.querySelector("input[type=tel]"), o = this.querySelector("[data-flag]"), s = this.querySelector("[data-dial]");
2574
- if (!e || !t) return;
2575
- let c = () => !t.hidden, l = () => {
2576
- let n = e.getBoundingClientRect(), r = t.offsetWidth || 320, i = t.offsetHeight || 320, a = window.innerHeight - n.bottom, o = a < i + 6 && n.top > a ? n.top - i - 6 : n.bottom + 6, s = Math.min(Math.max(8, n.left), Math.max(8, window.innerWidth - r - 8));
2577
- t.style.top = `${Math.max(8, o)}px`, t.style.left = `${s}px`;
2578
- }, u = () => {
2579
- t.hidden = !1, e.setAttribute("aria-expanded", "true"), n.value = "", f(""), l(), n.focus();
2640
+ 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]");
2641
+ if (!e || !n) return;
2642
+ let l = () => !n.hidden, u = () => {
2643
+ let r = (t || e).getBoundingClientRect(), i = n.offsetWidth || 320, a = n.offsetHeight || 320, o = window.innerHeight - r.bottom, s = o < a + 6 && r.top > o ? r.top - a - 6 : r.bottom + 6, c = Math.min(Math.max(8, r.left), Math.max(8, window.innerWidth - i - 8));
2644
+ n.style.top = `${Math.max(8, s)}px`, n.style.left = `${c}px`;
2580
2645
  }, d = () => {
2581
- t.hidden = !0, e.setAttribute("aria-expanded", "false");
2646
+ n.hidden = !1, e.setAttribute("aria-expanded", "true"), r.value = "", p(""), u(), r.focus();
2647
+ }, f = () => {
2648
+ n.hidden = !0, e.setAttribute("aria-expanded", "false");
2582
2649
  };
2583
2650
  this._reposition = () => {
2584
- c() && l();
2651
+ l() && u();
2585
2652
  }, window.addEventListener("scroll", this._reposition, !0), window.addEventListener("resize", this._reposition);
2586
- let f = (e) => {
2653
+ let p = (e) => {
2587
2654
  let t = e.trim().toLowerCase(), n = 0;
2588
- for (let e of r.querySelectorAll(".country-dropdown-item")) {
2655
+ for (let e of i.querySelectorAll(".country-dropdown-item")) {
2589
2656
  let r = !t || e.textContent.toLowerCase().includes(t);
2590
2657
  e.hidden = !r, r && (n += 1);
2591
2658
  }
2592
- i && (i.hidden = n > 0);
2593
- }, p = (e) => {
2594
- this._country = e, this.setAttribute("country", e), o && (o.className = Ce(e)), s && (s.textContent = `+${Se(e)}`);
2595
- for (let t of r.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
2596
- d(), this._commit();
2659
+ a && (a.hidden = n > 0);
2660
+ }, m = (e) => {
2661
+ this._country = e, this.setAttribute("country", e), s && (s.className = Te(e)), c && (c.textContent = `+${we(e)}`);
2662
+ for (let t of i.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
2663
+ f(), this._commit();
2597
2664
  };
2598
- e.addEventListener("click", () => c() ? d() : u()), n.addEventListener("input", () => f(n.value)), r.addEventListener("click", (e) => {
2665
+ e.addEventListener("click", () => l() ? f() : d()), r.addEventListener("input", () => p(r.value)), i.addEventListener("click", (e) => {
2599
2666
  let t = e.target.closest(".country-dropdown-item");
2600
- t && p(t.dataset.iso);
2601
- }), a.addEventListener("input", () => {
2602
- this._national = a.value.replace(/[^0-9]/g, ""), this._commit();
2667
+ t && m(t.dataset.iso);
2668
+ });
2669
+ let h = this.querySelector("[data-phone-error]"), g = (e) => {
2670
+ if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), h) {
2671
+ if (e) {
2672
+ let e = ke(this._country);
2673
+ h.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
2674
+ }
2675
+ h.hidden = !e;
2676
+ }
2677
+ };
2678
+ o.addEventListener("input", () => {
2679
+ let e = o.value.replace(/[^0-9]/g, ""), t = je(this._country);
2680
+ 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);
2683
+ }), o.addEventListener("blur", () => {
2684
+ g(this._national.length > 0 && Ae(this.value) === !1);
2685
+ }), 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());
2603
2688
  }), this._onDocClick = (e) => {
2604
- c() && !this.contains(e.target) && d();
2605
- }, document.addEventListener("click", this._onDocClick), z(this, this.value);
2689
+ 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);
2693
+ e && (o.placeholder = e);
2694
+ }
2695
+ }), R(this, this.value);
2606
2696
  }
2607
2697
  disconnectedCallback() {
2608
2698
  this._reposition && (window.removeEventListener("scroll", this._reposition, !0), window.removeEventListener("resize", this._reposition)), this._onDocClick && document.removeEventListener("click", this._onDocClick);
2609
2699
  }
2610
- }, Te = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ee = class extends HTMLElement {
2700
+ }, Pe = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Fe = class extends HTMLElement {
2611
2701
  static get observedAttributes() {
2612
2702
  return [
2613
2703
  "value",
@@ -2633,13 +2723,17 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
2633
2723
  this._rendered || this.render();
2634
2724
  }
2635
2725
  attributeChangedCallback(e, t, n) {
2636
- this._rendered && (e === "value" ? this.value = n : this.render());
2726
+ if (e === "value") {
2727
+ this.value = n;
2728
+ return;
2729
+ }
2730
+ this._rendered && this.render();
2637
2731
  }
2638
2732
  get value() {
2639
2733
  return this._value;
2640
2734
  }
2641
2735
  set value(e) {
2642
- this._value = e == null ? "" : String(e), z(this, this._value), this._syncSelected(), this._syncReset();
2736
+ this._value = e == null ? "" : String(e), R(this, this._value), this._syncSelected(), this._syncReset();
2643
2737
  }
2644
2738
  set options(e) {
2645
2739
  this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
@@ -2654,7 +2748,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
2654
2748
  value: e.getAttribute("value") ?? e.textContent.trim(),
2655
2749
  label: e.innerHTML,
2656
2750
  icon: e.getAttribute("icon") || void 0,
2657
- [B]: !0,
2751
+ [z]: !0,
2658
2752
  selected: e.hasAttribute("selected")
2659
2753
  })));
2660
2754
  }
@@ -2664,25 +2758,25 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
2664
2758
  render() {
2665
2759
  this._snapshotDeclared();
2666
2760
  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);
2667
- l && (this._value = String(l.value)), z(this, this._value);
2761
+ l && (this._value = String(l.value)), R(this, this._value);
2668
2762
  let u = e.map((e) => {
2669
2763
  let t = String(e.value) === String(this._value);
2670
- return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${De(e.value)}" aria-selected="${t}">${H(e)}</button>`;
2764
+ return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${Ie(e.value)}" aria-selected="${t}">${V(e)}</button>`;
2671
2765
  }).join("");
2672
2766
  this.innerHTML = `
2673
2767
  <div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
2674
- <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${De(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
2675
- ${a ? `<i class="bi bi-${De(a)} search-select-icon" aria-hidden="true"></i>` : ""}
2676
- ${o ? `<span class="search-select-prefix">${V(o)}</span>` : ""}
2677
- <span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? H(l) : V(s)}</span>
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>
2678
2772
  ${n ? "<span class=\"search-select-reset\" role=\"button\" aria-label=\"Clear selection\" hidden><i class=\"bi bi-x-lg\" aria-hidden=\"true\"></i></span>" : ""}
2679
2773
  <i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
2680
2774
  </button>
2681
2775
  <div class="search-select-menu search-select-menu-fixed" role="listbox" tabindex="-1" hidden>
2682
- ${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${De(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>` : ""}
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>` : ""}
2683
2777
  <div class="search-select-options">${u}<div class="search-select-empty" hidden>No matches</div></div>
2684
2778
  </div>
2685
- </div>`, this._rendered = !0, z(this, this._value), this._wire(), this._syncReset();
2779
+ </div>`, this._rendered = !0, R(this, this._value), this._wire(), this._syncReset();
2686
2780
  }
2687
2781
  _refs() {
2688
2782
  return {
@@ -2708,7 +2802,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
2708
2802
  let t = e.dataset.value === String(this._value);
2709
2803
  e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
2710
2804
  }
2711
- e && (e.innerHTML = t ? H(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
2805
+ e && (e.innerHTML = t ? V(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
2712
2806
  }
2713
2807
  _syncReset() {
2714
2808
  let { reset: e } = this._refs();
@@ -2760,7 +2854,7 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
2760
2854
  t && n(this._visible().indexOf(t));
2761
2855
  }), e.optionsWrap.addEventListener("mouseleave", () => n(-1)), e.search?.addEventListener("input", () => {
2762
2856
  r(e.search.value), n(-1);
2763
- }), e.search?.addEventListener("keydown", c), e.clear?.addEventListener("click", () => {
2857
+ }), e.clear?.addEventListener("click", () => {
2764
2858
  e.search.value = "", r(""), e.search.focus();
2765
2859
  }), e.menu.addEventListener("keydown", c), this._onDocClick = (e) => {
2766
2860
  i() && !this.contains(e.target) && o();
@@ -2771,14 +2865,14 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
2771
2865
  disconnectedCallback() {
2772
2866
  this._onDocClick && document.removeEventListener("click", this._onDocClick), L(this);
2773
2867
  }
2774
- }, De = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Oe = "image/png,image/jpeg,image/webp", ke = {
2868
+ }, Ie = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Le = "image/png,image/jpeg,image/webp", Re = {
2775
2869
  "image/png": [".png"],
2776
2870
  "image/jpeg": [".jpg", ".jpeg"],
2777
2871
  "image/webp": [".webp"],
2778
2872
  "image/gif": [".gif"],
2779
2873
  "image/svg+xml": [".svg"],
2780
2874
  "application/pdf": [".pdf"]
2781
- }, Ae = {
2875
+ }, ze = {
2782
2876
  "image/png": "PNG",
2783
2877
  "image/jpeg": "JPG",
2784
2878
  "image/webp": "WEBP",
@@ -2792,33 +2886,33 @@ var B = Symbol("wui.trustedHtml"), V = (e) => String(e ?? "").replace(/&/g, "&am
2792
2886
  ".gif": "GIF",
2793
2887
  ".svg": "SVG",
2794
2888
  ".pdf": "PDF"
2795
- }, je = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
2796
- function Me(e) {
2889
+ }, Be = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
2890
+ function Ve(e) {
2797
2891
  let t = [];
2798
- for (let n of je(e)) {
2799
- let e = Ae[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
2892
+ for (let n of Be(e)) {
2893
+ let e = ze[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
2800
2894
  t.includes(e) || t.push(e);
2801
2895
  }
2802
2896
  return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
2803
2897
  }
2804
- function Ne(e, t) {
2805
- let n = je(t);
2898
+ function He(e, t) {
2899
+ let n = Be(t);
2806
2900
  if (!n.length) return !0;
2807
2901
  let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
2808
- return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (ke[e] || []).some((e) => i.endsWith(e)));
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)));
2809
2903
  }
2810
- function Pe(e, t = {}) {
2904
+ function Ue(e, t = {}) {
2811
2905
  if (!e) return null;
2812
- let n = t.accept === void 0 ? Oe : t.accept, r = t.maxSizeMb || 5;
2813
- return Ne(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Me(n)} file.`;
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.`;
2814
2908
  }
2815
2909
  var X = (e, t) => {
2816
2910
  typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
2817
2911
  };
2818
- function Fe() {
2819
- X("wui-select", Ee), X("wui-phone", we), X("wui-datepicker", se), X("wui-date-range", he), X("wui-autocomplete", te), X("wui-multiselect", ge), X("wui-otp", be), X("wui-status-icon", N);
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);
2820
2914
  }
2821
- Fe();
2915
+ We();
2822
2916
  //#endregion
2823
2917
  //#region src/components/RequiredMark.jsx
2824
2918
  function Z() {
@@ -2830,9 +2924,9 @@ function Z() {
2830
2924
  }
2831
2925
  //#endregion
2832
2926
  //#region src/components/AppAutocomplete.jsx
2833
- function Ie({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s = "Search…", minChars: l, debounce: u, disabled: d = !1, size: f, name: p, label: m, error: h, hint: g, required: _ = !1, fieldClassName: v = "", ...y }) {
2834
- T("AppAutocomplete", y);
2835
- let b = c(null), x = typeof o == "function";
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";
2836
2930
  return a(() => {
2837
2931
  let e = b.current;
2838
2932
  e && !x && (e.options = i || []);
@@ -2874,7 +2968,7 @@ function Ie({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s
2874
2968
  name: p,
2875
2969
  placeholder: s,
2876
2970
  remote: x ? "" : void 0,
2877
- "min-chars": l == null ? void 0 : String(l),
2971
+ "min-chars": c == null ? void 0 : String(c),
2878
2972
  debounce: u == null ? void 0 : String(u),
2879
2973
  size: f || void 0,
2880
2974
  disabled: d ? "" : void 0,
@@ -2892,14 +2986,14 @@ function Ie({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s
2892
2986
  }
2893
2987
  //#endregion
2894
2988
  //#region src/components/AppAvatar.jsx
2895
- function Le(e) {
2989
+ function Ke(e) {
2896
2990
  let t = (e || "").trim();
2897
2991
  if (!t) return "?";
2898
2992
  let n = t.split(/\s+/).filter(Boolean);
2899
2993
  return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
2900
2994
  }
2901
- function Re({ name: e, src: n, className: r = "", ...i }) {
2902
- T("AppAvatar", i);
2995
+ function qe({ name: e, src: n, className: r = "", ...i }) {
2996
+ E("AppAvatar", i);
2903
2997
  let a = ["avatar", r].filter(Boolean).join(" ");
2904
2998
  return n ? /* @__PURE__ */ t("span", {
2905
2999
  className: a,
@@ -2912,13 +3006,13 @@ function Re({ name: e, src: n, className: r = "", ...i }) {
2912
3006
  className: a,
2913
3007
  role: "img",
2914
3008
  "aria-label": e,
2915
- children: Le(e)
3009
+ children: Ke(e)
2916
3010
  });
2917
3011
  }
2918
3012
  //#endregion
2919
3013
  //#region src/components/AppBadge.jsx
2920
- function ze({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
2921
- return T("AppBadge", a), /* @__PURE__ */ t(d, {
3014
+ function Je({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
3015
+ return E("AppBadge", a), /* @__PURE__ */ t(f, {
2922
3016
  bg: !1,
2923
3017
  className: [
2924
3018
  n ? `badge-${n}` : "",
@@ -2931,17 +3025,17 @@ function ze({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
2931
3025
  }
2932
3026
  //#endregion
2933
3027
  //#region src/components/AppButton.jsx
2934
- var Be = {
3028
+ var Ye = {
2935
3029
  primary: "primary",
2936
3030
  secondary: "secondary",
2937
3031
  outline: "outline-primary",
2938
3032
  ghost: "link",
2939
3033
  danger: "danger"
2940
3034
  };
2941
- function Ve(e, n) {
3035
+ function Xe(e, n) {
2942
3036
  if (!e) return null;
2943
3037
  let r = n === "left" ? "me-2" : "ms-2";
2944
- return typeof e == "string" ? /* @__PURE__ */ t(O, {
3038
+ return typeof e == "string" ? /* @__PURE__ */ t(k, {
2945
3039
  name: e,
2946
3040
  size: 16,
2947
3041
  className: r
@@ -2950,35 +3044,35 @@ function Ve(e, n) {
2950
3044
  children: e
2951
3045
  });
2952
3046
  }
2953
- 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 = "", ...p }) {
2954
- T("AppButton", p);
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);
2955
3049
  let m = [c ? "w-100" : "", d].filter(Boolean).join(" ");
2956
- return /* @__PURE__ */ n(f, {
2957
- type: (p.as === void 0 || p.as === "button") && p.href === void 0 ? a : void 0,
2958
- variant: Be[r] ?? "primary",
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",
2959
3053
  size: i === "md" ? void 0 : i,
2960
3054
  disabled: s || o,
2961
3055
  className: m || void 0,
2962
- ...p,
3056
+ ...f,
2963
3057
  children: [
2964
3058
  o && /* @__PURE__ */ t("span", {
2965
3059
  className: "spinner-border spinner-border-sm me-2",
2966
3060
  "aria-hidden": "true"
2967
3061
  }),
2968
- !o && Ve(l, "left"),
3062
+ !o && Xe(l, "left"),
2969
3063
  e,
2970
- !o && Ve(u, "right")
3064
+ !o && Xe(u, "right")
2971
3065
  ]
2972
3066
  });
2973
3067
  }
2974
3068
  //#endregion
2975
3069
  //#region src/components/AppCallout.jsx
2976
- function He({ children: e, icon: r = "info", className: i = "", ...a }) {
2977
- return T("AppCallout", a), /* @__PURE__ */ n("div", {
3070
+ function Ze({ children: e, icon: r = "info", className: i = "", ...a }) {
3071
+ return E("AppCallout", a), /* @__PURE__ */ n("div", {
2978
3072
  className: `info-callout${i ? ` ${i}` : ""}`,
2979
3073
  children: [r && /* @__PURE__ */ t("span", {
2980
3074
  className: "info-callout-icon",
2981
- children: /* @__PURE__ */ t(O, {
3075
+ children: /* @__PURE__ */ t(k, {
2982
3076
  name: r,
2983
3077
  size: 18
2984
3078
  })
@@ -2987,24 +3081,27 @@ function He({ children: e, icon: r = "info", className: i = "", ...a }) {
2987
3081
  }
2988
3082
  //#endregion
2989
3083
  //#region src/components/AppCard.jsx
2990
- function Ue({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body: f = !0, lifted: m = !1, ...h }) {
2991
- T("AppCard", h);
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);
2992
3086
  let g = a != null || r != null || o != null || s != null;
2993
- return /* @__PURE__ */ n(p, {
2994
- className: [m ? "card-lifted" : "", l].filter(Boolean).join(" ") || void 0,
3087
+ return /* @__PURE__ */ n(m, {
3088
+ className: [p ? "card-lifted" : "", l].filter(Boolean).join(" ") || void 0,
2995
3089
  ...h,
2996
- children: [g && /* @__PURE__ */ t(p.Header, {
3090
+ children: [g && /* @__PURE__ */ t(m.Header, {
2997
3091
  className: d || void 0,
2998
3092
  children: a ?? /* @__PURE__ */ n(e, { children: [
2999
- r != null && /* @__PURE__ */ t(p.Title, {
3093
+ r != null && /* @__PURE__ */ t(m.Title, {
3000
3094
  as: "div",
3001
3095
  className: i || void 0,
3002
3096
  children: r
3003
3097
  }),
3004
3098
  o,
3005
- s
3099
+ s != null && /* @__PURE__ */ t("div", {
3100
+ className: "card-header-actions",
3101
+ children: s
3102
+ })
3006
3103
  ] })
3007
- }), f ? /* @__PURE__ */ t(p.Body, {
3104
+ }), f ? /* @__PURE__ */ t(m.Body, {
3008
3105
  className: u || void 0,
3009
3106
  children: c
3010
3107
  }) : c]
@@ -3012,8 +3109,8 @@ function Ue({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
3012
3109
  }
3013
3110
  //#endregion
3014
3111
  //#region src/components/AppCheckbox.jsx
3015
- var We = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
3016
- T("AppCheckbox", s);
3112
+ var $e = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
3113
+ E("AppCheckbox", s);
3017
3114
  let l = o(), u = r || i || l;
3018
3115
  return /* @__PURE__ */ n("div", {
3019
3116
  className: `form-check${a ? ` ${a}` : ""}`,
@@ -3033,8 +3130,8 @@ var We = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
3033
3130
  });
3034
3131
  //#endregion
3035
3132
  //#region src/components/AppChip.jsx
3036
- function Ge({ 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 }) {
3037
- T("AppChip", m);
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);
3038
3135
  let h = r ?? i, g = [
3039
3136
  "chip",
3040
3137
  a && a !== "neutral" ? a : "",
@@ -3051,7 +3148,7 @@ function Ge({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3051
3148
  }) : c
3052
3149
  }) : s ? /* @__PURE__ */ t("span", {
3053
3150
  className: "chip-ic",
3054
- children: /* @__PURE__ */ t(O, {
3151
+ children: /* @__PURE__ */ t(k, {
3055
3152
  name: s,
3056
3153
  size: o === "sm" ? 12 : 14
3057
3154
  })
@@ -3076,7 +3173,7 @@ function Ge({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3076
3173
  onClick: l,
3077
3174
  disabled: d,
3078
3175
  "aria-label": f || (typeof h == "string" ? `Remove ${h}` : "Remove"),
3079
- children: /* @__PURE__ */ t(O, {
3176
+ children: /* @__PURE__ */ t(k, {
3080
3177
  name: "x",
3081
3178
  size: o === "sm" ? 12 : 14
3082
3179
  })
@@ -3085,8 +3182,8 @@ function Ge({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
3085
3182
  }
3086
3183
  //#endregion
3087
3184
  //#region src/components/AppChoiceCard.jsx
3088
- function Ke({ 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 }) {
3089
- return T("AppChoiceCard", y), /* @__PURE__ */ n("label", {
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", {
3090
3187
  className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${v ? ` ${v}` : ""}`,
3091
3188
  children: [
3092
3189
  /* @__PURE__ */ t("input", {
@@ -3106,7 +3203,7 @@ function Ke({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3106
3203
  })
3107
3204
  }) : l || c ? /* @__PURE__ */ t("span", {
3108
3205
  className: "struct-card-ic",
3109
- children: l || /* @__PURE__ */ t(O, {
3206
+ children: l || /* @__PURE__ */ t(k, {
3110
3207
  name: c,
3111
3208
  size: u
3112
3209
  })
@@ -3123,7 +3220,7 @@ function Ke({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3123
3220
  }),
3124
3221
  /* @__PURE__ */ t("span", {
3125
3222
  className: "struct-card-check",
3126
- children: /* @__PURE__ */ t(O, {
3223
+ children: /* @__PURE__ */ t(k, {
3127
3224
  name: g,
3128
3225
  size: _
3129
3226
  })
@@ -3133,8 +3230,8 @@ function Ke({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
3133
3230
  }
3134
3231
  //#endregion
3135
3232
  //#region src/components/AppChoiceChip.jsx
3136
- function qe({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
3137
- return T("AppChoiceChip", d), /* @__PURE__ */ n("label", {
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", {
3138
3235
  className: `choice-chip${o ? " checked" : ""}${u ? ` ${u}` : ""}`,
3139
3236
  children: [
3140
3237
  /* @__PURE__ */ t("input", {
@@ -3154,59 +3251,59 @@ function qe({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChang
3154
3251
  }
3155
3252
  //#endregion
3156
3253
  //#region src/components/AppColorField.jsx
3157
- function Je({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: o, hint: s, name: c, id: l, disabled: u = !1, className: d = "", ...f }) {
3158
- T("AppColorField", f);
3159
- let p = l || c;
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);
3256
+ 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" : "";
3160
3257
  return /* @__PURE__ */ n("div", {
3161
- className: `field${d ? ` ${d}` : ""}`,
3258
+ className: `field${p ? ` ${p}` : ""}`,
3162
3259
  children: [
3163
3260
  i && /* @__PURE__ */ n("label", {
3164
3261
  className: "label",
3165
- htmlFor: p,
3262
+ htmlFor: g,
3166
3263
  children: [i, a && /* @__PURE__ */ t(Z, {})]
3167
3264
  }),
3168
3265
  /* @__PURE__ */ n("div", {
3169
- className: "color-field",
3266
+ className: `color-field${v}`,
3170
3267
  children: [/* @__PURE__ */ t("input", {
3171
3268
  type: "color",
3172
3269
  className: "color-field-swatch",
3173
- value: ((e) => /^#[0-9a-f]{6}$/i.test(e))(e) ? e : "#000000",
3270
+ value: _(e) ? e : "#000000",
3174
3271
  onChange: (e) => r?.(e.target.value),
3175
- disabled: u,
3272
+ disabled: d,
3176
3273
  "aria-label": `${i || "Colour"} — colour picker`,
3177
3274
  tabIndex: -1
3178
3275
  }), /* @__PURE__ */ t("input", {
3179
3276
  type: "text",
3180
- className: `input color-field-hex${o ? " error" : ""}`,
3181
- id: p,
3182
- name: c,
3277
+ className: `input color-field-hex${y}${s ? " error" : ""}`,
3278
+ id: g,
3279
+ name: l,
3183
3280
  value: e,
3184
3281
  onChange: (e) => r?.(e.target.value),
3185
3282
  placeholder: "#4F46E5",
3186
3283
  spellCheck: !1,
3187
3284
  maxLength: 7,
3188
3285
  required: a,
3189
- disabled: u,
3190
- "aria-invalid": o ? "true" : "false"
3286
+ disabled: d,
3287
+ "aria-invalid": s ? "true" : "false"
3191
3288
  })]
3192
3289
  }),
3193
- o ? /* @__PURE__ */ t("div", {
3290
+ s ? /* @__PURE__ */ t("div", {
3194
3291
  className: "field-error",
3195
- children: o
3196
- }) : s ? /* @__PURE__ */ t("div", {
3197
- className: "field-hint",
3198
3292
  children: s
3293
+ }) : c ? /* @__PURE__ */ t("div", {
3294
+ className: "field-hint",
3295
+ children: c
3199
3296
  }) : null
3200
3297
  ]
3201
3298
  });
3202
3299
  }
3203
3300
  //#endregion
3204
3301
  //#region src/components/AppCompareTable.jsx
3205
- function Ye({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
3206
- T("AppCompareTable", o);
3302
+ function it({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
3303
+ E("AppCompareTable", o);
3207
3304
  let s = (e) => e === !0 ? /* @__PURE__ */ t("span", {
3208
3305
  className: "compare-yes",
3209
- children: /* @__PURE__ */ t(O, {
3306
+ children: /* @__PURE__ */ t(k, {
3210
3307
  name: "check",
3211
3308
  size: 16
3212
3309
  })
@@ -3238,9 +3335,9 @@ function Ye({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o
3238
3335
  }
3239
3336
  //#endregion
3240
3337
  //#region src/components/AppInfoTip.jsx
3241
- function Xe({ label: e, children: r, ...i }) {
3242
- T("AppInfoTip", i);
3243
- let [a, u] = l(!1), [d, f] = l(null), p = c(null), m = c(null), g = o();
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);
3244
3341
  return s(() => {
3245
3342
  if (!a || !p.current || !m.current) return;
3246
3343
  let e = p.current.getBoundingClientRect(), t = m.current.offsetWidth, n = m.current.offsetHeight, r = e.left + e.width / 2 - t / 2;
@@ -3252,27 +3349,37 @@ function Xe({ label: e, children: r, ...i }) {
3252
3349
  });
3253
3350
  }, [a]), r ? /* @__PURE__ */ n("span", {
3254
3351
  className: "infotip",
3255
- onMouseLeave: () => u(!1),
3352
+ onMouseLeave: () => c(!1),
3256
3353
  children: [/* @__PURE__ */ t("button", {
3257
3354
  type: "button",
3258
3355
  ref: p,
3259
3356
  className: "infotip-btn",
3260
3357
  "aria-label": e,
3261
3358
  "aria-expanded": a,
3262
- "aria-describedby": a ? g : void 0,
3263
- onMouseEnter: () => u(!0),
3264
- onClick: () => u((e) => !e),
3265
- onFocus: () => u(!0),
3266
- onBlur: () => u(!1),
3267
- children: /* @__PURE__ */ t(O, {
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, {
3268
3375
  name: "info",
3269
3376
  size: 16
3270
3377
  })
3271
- }), a && h(/* @__PURE__ */ t("span", {
3378
+ }), a && g(/* @__PURE__ */ t("span", {
3272
3379
  ref: m,
3273
3380
  className: "infotip-pop is-portal",
3274
3381
  role: "tooltip",
3275
- id: g,
3382
+ id: h,
3276
3383
  style: {
3277
3384
  position: "fixed",
3278
3385
  top: d ? d.top : 0,
@@ -3285,100 +3392,100 @@ function Xe({ label: e, children: r, ...i }) {
3285
3392
  }
3286
3393
  //#endregion
3287
3394
  //#region src/components/AppInput.jsx
3288
- var Ze = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", type: u = "text", size: d = "md", leftIcon: f, rightIcon: p, onRightIconClick: h, rightIconLabel: g, unit: _, id: v, name: y, className: b = "", fieldClassName: x = "", disabled: S = !1, clearable: C = !1, showCount: w = !1, maxLength: E, prefix: D, suffix: k, floatingLabel: A = !1, ...j }, M) {
3289
- T("AppInput", j);
3290
- let [N, P] = l(!1), F = v || y, I = u === "password", L = I && N ? "text" : u, R = c(null), z = (e) => {
3291
- R.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
3292
- }, B = String(j.value ?? j.defaultValue ?? ""), [V, ee] = l(() => !!B), [H, te] = l(() => B.length), ne = C && !S, re = C || w, ie = (e) => {
3293
- ee(!!e.target.value), te(e.target.value.length), j.onInput?.(e);
3294
- }, ae = ne ? /* @__PURE__ */ t("button", {
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", {
3295
3402
  type: "button",
3296
3403
  className: "input-clear",
3297
3404
  onClick: () => {
3298
- let e = R.current;
3405
+ let e = L.current;
3299
3406
  if (!e) return;
3300
3407
  let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
3301
- t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), ee(!1), e.focus();
3408
+ t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), B(!1), e.focus();
3302
3409
  },
3303
3410
  "aria-label": "Clear",
3304
3411
  tabIndex: -1,
3305
- hidden: !V,
3306
- children: /* @__PURE__ */ t(O, {
3412
+ hidden: !z,
3413
+ children: /* @__PURE__ */ t(k, {
3307
3414
  name: "x",
3308
3415
  size: 16
3309
3416
  })
3310
- }) : null, U = [
3417
+ }) : null, se = [
3311
3418
  "input",
3312
3419
  d === "sm" ? "input-sm" : "",
3313
3420
  d === "lg" ? "input-lg" : "",
3314
3421
  i ? "error" : "",
3315
- I ? "pw" : "",
3422
+ F ? "pw" : "",
3316
3423
  _ ? "num-input" : "",
3317
3424
  C ? "has-clear" : "",
3318
3425
  b
3319
- ].filter(Boolean).join(" "), W = /* @__PURE__ */ t(m.Control, {
3320
- id: F,
3426
+ ].filter(Boolean).join(" "), H = /* @__PURE__ */ t(h.Control, {
3427
+ id: P,
3321
3428
  name: y,
3322
- type: L,
3323
- className: U,
3429
+ type: I,
3430
+ className: se,
3324
3431
  disabled: S,
3325
3432
  required: r,
3326
3433
  "aria-invalid": i ? "true" : "false",
3327
- maxLength: E,
3434
+ maxLength: T,
3328
3435
  ...j,
3329
3436
  placeholder: A ? " " : j.placeholder,
3330
- ref: z,
3331
- onInput: re ? ie : j.onInput
3332
- }), G;
3333
- return G = A && e ? /* @__PURE__ */ n("div", {
3437
+ ref: te,
3438
+ onInput: ie ? ae : j.onInput
3439
+ }), U;
3440
+ return U = A && e ? /* @__PURE__ */ n("div", {
3334
3441
  className: "field-float",
3335
- children: [W, /* @__PURE__ */ n("label", {
3442
+ children: [H, /* @__PURE__ */ n("label", {
3336
3443
  className: "float-label",
3337
- htmlFor: F,
3444
+ htmlFor: P,
3338
3445
  children: [e, r && /* @__PURE__ */ t(Z, {})]
3339
3446
  })]
3340
- }) : D || k ? /* @__PURE__ */ n("div", {
3447
+ }) : D || O ? /* @__PURE__ */ n("div", {
3341
3448
  className: "input-affixed",
3342
3449
  children: [
3343
3450
  D != null && /* @__PURE__ */ t("span", {
3344
3451
  className: "affix affix-pre",
3345
3452
  children: D
3346
3453
  }),
3347
- W,
3348
- k != null && /* @__PURE__ */ t("span", {
3454
+ H,
3455
+ O != null && /* @__PURE__ */ t("span", {
3349
3456
  className: "affix affix-suf",
3350
- children: k
3457
+ children: O
3351
3458
  })
3352
3459
  ]
3353
3460
  }) : _ ? /* @__PURE__ */ n("div", {
3354
3461
  className: "input-with-unit",
3355
- children: [W, /* @__PURE__ */ t("span", {
3462
+ children: [H, /* @__PURE__ */ t("span", {
3356
3463
  className: "unit",
3357
3464
  children: _
3358
3465
  })]
3359
- }) : I ? /* @__PURE__ */ n("div", {
3466
+ }) : F ? /* @__PURE__ */ n("div", {
3360
3467
  className: "input-wrap",
3361
- children: [W, /* @__PURE__ */ t("button", {
3468
+ children: [H, /* @__PURE__ */ t("button", {
3362
3469
  type: "button",
3363
3470
  className: "pw-toggle",
3364
- onClick: () => P((e) => !e),
3471
+ onClick: () => ee((e) => !e),
3365
3472
  "aria-label": N ? "Hide password" : "Show password",
3366
3473
  tabIndex: -1,
3367
- children: /* @__PURE__ */ t(O, {
3474
+ children: /* @__PURE__ */ t(k, {
3368
3475
  name: N ? "eye-off" : "eye",
3369
3476
  size: 18
3370
3477
  })
3371
3478
  })]
3372
3479
  }) : p ? /* @__PURE__ */ n("div", {
3373
3480
  className: "input-wrap",
3374
- children: [W, /* @__PURE__ */ t("button", {
3481
+ children: [H, /* @__PURE__ */ t("button", {
3375
3482
  type: "button",
3376
3483
  className: "pw-toggle",
3377
- onClick: h,
3378
- disabled: !h,
3484
+ onClick: m,
3485
+ disabled: !m,
3379
3486
  tabIndex: -1,
3380
3487
  "aria-label": g || p,
3381
- children: /* @__PURE__ */ t(O, {
3488
+ children: /* @__PURE__ */ t(k, {
3382
3489
  name: p,
3383
3490
  size: 18
3384
3491
  })
@@ -3388,39 +3495,39 @@ var Ze = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
3388
3495
  children: [
3389
3496
  f && /* @__PURE__ */ t("span", {
3390
3497
  className: "ic",
3391
- children: /* @__PURE__ */ t(O, {
3498
+ children: /* @__PURE__ */ t(k, {
3392
3499
  name: f,
3393
3500
  size: 16
3394
3501
  })
3395
3502
  }),
3396
- W,
3397
- ae
3503
+ H,
3504
+ oe
3398
3505
  ]
3399
3506
  }) : f ? /* @__PURE__ */ n("div", {
3400
3507
  className: "input-icon",
3401
3508
  children: [/* @__PURE__ */ t("span", {
3402
3509
  className: "ic",
3403
- children: /* @__PURE__ */ t(O, {
3510
+ children: /* @__PURE__ */ t(k, {
3404
3511
  name: f,
3405
3512
  size: 16
3406
3513
  })
3407
- }), W]
3408
- }) : W, /* @__PURE__ */ n(m.Group, {
3514
+ }), H]
3515
+ }) : H, /* @__PURE__ */ n(h.Group, {
3409
3516
  className: `field${x ? ` ${x}` : ""}`,
3410
3517
  children: [
3411
- e && !A && /* @__PURE__ */ n(m.Label, {
3518
+ e && !A && /* @__PURE__ */ n(h.Label, {
3412
3519
  className: "label",
3413
- htmlFor: F,
3520
+ htmlFor: P,
3414
3521
  children: [
3415
3522
  e,
3416
3523
  r && /* @__PURE__ */ t(Z, {}),
3417
- o && /* @__PURE__ */ t(Xe, {
3524
+ o && /* @__PURE__ */ t(at, {
3418
3525
  label: s,
3419
3526
  children: o
3420
3527
  })
3421
3528
  ]
3422
3529
  }),
3423
- G,
3530
+ U,
3424
3531
  i ? /* @__PURE__ */ t("div", {
3425
3532
  className: "field-error",
3426
3533
  children: i
@@ -3429,29 +3536,29 @@ var Ze = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
3429
3536
  children: a
3430
3537
  }) : null,
3431
3538
  w && /* @__PURE__ */ n("div", {
3432
- className: `field-count${E && H >= E ? " at-limit" : ""}`,
3433
- children: [H, E ? ` / ${E}` : ""]
3539
+ className: `field-count${T && ne >= T ? " at-limit" : ""}`,
3540
+ children: [ne, T ? ` / ${T}` : ""]
3434
3541
  })
3435
3542
  ]
3436
3543
  });
3437
- }), Qe = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
3438
- function $e({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer: l, size: u, wide: d = !1, side: f = !1, maxWidth: p, hideHeader: m = !1, className: h = "", children: _, ...v }) {
3439
- T("AppModal", v);
3440
- let y = c(null);
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);
3441
3548
  a(() => {
3442
3549
  if (!e) return;
3443
3550
  let t = y.current?.closest(".modal-content");
3444
3551
  if (!t) return;
3445
- let n = () => Array.from(t.querySelectorAll(Qe));
3446
- (t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("lx-modal-close")) || n()[0] || t).focus?.();
3552
+ let n = () => Array.from(t.querySelectorAll(st));
3553
+ (t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("wui-modal-close")) || n()[0] || t).focus?.();
3447
3554
  }, [e]);
3448
- let b = ["lx-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), x = [
3449
- "lx-modal",
3450
- d ? "lx-modal-wide" : "",
3451
- f ? "lx-modal-side" : "",
3555
+ let b = ["wui-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), x = [
3556
+ "wui-modal",
3557
+ d ? "wui-modal-wide" : "",
3558
+ f ? "wui-modal-side" : "",
3452
3559
  h
3453
3560
  ].filter(Boolean).join(" ");
3454
- return /* @__PURE__ */ n(g, {
3561
+ return /* @__PURE__ */ n(_, {
3455
3562
  show: e,
3456
3563
  onHide: s,
3457
3564
  animation: !1,
@@ -3463,35 +3570,35 @@ function $e({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer:
3463
3570
  size: u,
3464
3571
  centered: !f,
3465
3572
  className: b,
3466
- style: p == null ? void 0 : { "--lx-modal-max-width": typeof p == "number" ? `${p}px` : p },
3467
- dialogClassName: "lx-rb-dialog",
3573
+ style: p == null ? void 0 : { "--wui-modal-max-width": typeof p == "number" ? `${p}px` : p },
3574
+ dialogClassName: "wui-rb-dialog",
3468
3575
  contentClassName: x,
3469
- backdropClassName: "lx-modal-dim",
3576
+ backdropClassName: "wui-modal-dim",
3470
3577
  "aria-label": typeof r == "string" ? r : void 0,
3471
3578
  children: [
3472
3579
  !m && /* @__PURE__ */ n("div", {
3473
- className: "lx-modal-header",
3580
+ className: "wui-modal-header",
3474
3581
  children: [/* @__PURE__ */ n("div", {
3475
- className: "lx-modal-heading",
3582
+ className: "wui-modal-heading",
3476
3583
  children: [o && /* @__PURE__ */ t("span", {
3477
- className: "lx-modal-headicon",
3478
- children: /* @__PURE__ */ t(O, {
3584
+ className: "wui-modal-headicon",
3585
+ children: /* @__PURE__ */ t(k, {
3479
3586
  name: o,
3480
3587
  size: 18
3481
3588
  })
3482
3589
  }), /* @__PURE__ */ n("div", {
3483
- className: "lx-modal-headtext",
3590
+ className: "wui-modal-headtext",
3484
3591
  children: [/* @__PURE__ */ t("div", {
3485
- className: "lx-modal-title",
3592
+ className: "wui-modal-title",
3486
3593
  children: r
3487
3594
  }), i && /* @__PURE__ */ t("div", {
3488
- className: "lx-modal-subtitle",
3595
+ className: "wui-modal-subtitle",
3489
3596
  children: i
3490
3597
  })]
3491
3598
  })]
3492
3599
  }), /* @__PURE__ */ t("button", {
3493
3600
  type: "button",
3494
- className: "lx-modal-close",
3601
+ className: "wui-modal-close",
3495
3602
  onClick: s,
3496
3603
  "aria-label": "Close",
3497
3604
  children: /* @__PURE__ */ t("svg", {
@@ -3509,13 +3616,13 @@ function $e({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer:
3509
3616
  })]
3510
3617
  }),
3511
3618
  /* @__PURE__ */ t("div", {
3512
- className: "lx-modal-body",
3619
+ className: "wui-modal-body",
3513
3620
  ref: y,
3514
- children: _
3621
+ children: g
3515
3622
  }),
3516
- l && /* @__PURE__ */ t("div", {
3517
- className: "lx-modal-footer",
3518
- children: l
3623
+ c && /* @__PURE__ */ t("div", {
3624
+ className: "wui-modal-footer",
3625
+ children: c
3519
3626
  })
3520
3627
  ]
3521
3628
  });
@@ -3527,7 +3634,7 @@ var $ = (e) => function({ size: n = 72 }) {
3527
3634
  tone: e,
3528
3635
  size: n
3529
3636
  });
3530
- }, et = {
3637
+ }, lt = {
3531
3638
  success: $("success"),
3532
3639
  error: $("error"),
3533
3640
  warning: $("warning"),
@@ -3536,50 +3643,50 @@ var $ = (e) => function({ size: n = 72 }) {
3536
3643
  };
3537
3644
  //#endregion
3538
3645
  //#region src/components/AppConfirmDialog.jsx
3539
- function tt({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancelLabel: c = "Cancel", danger: u = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m, ...h }) {
3540
- T("AppConfirmDialog", h);
3541
- let [g, _] = l("");
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("");
3542
3649
  if (a(() => {
3543
3650
  r || _("");
3544
3651
  }, [r]), !r) return null;
3545
- let v = !!f && g.trim() !== f, y = et[d || (u ? "delete" : "info")];
3546
- return /* @__PURE__ */ t($e, {
3652
+ let v = !!f && g.trim() !== f, y = lt[d || (l ? "delete" : "info")];
3653
+ return /* @__PURE__ */ t(ct, {
3547
3654
  open: r,
3548
3655
  hideHeader: !0,
3549
3656
  title: i,
3550
3657
  onClose: m,
3551
- className: "lx-confirm",
3658
+ className: "wui-confirm",
3552
3659
  footer: /* @__PURE__ */ n("div", {
3553
- className: "lx-confirm-actions",
3660
+ className: "wui-confirm-actions",
3554
3661
  children: [/* @__PURE__ */ t(Q, {
3555
3662
  variant: "secondary",
3556
3663
  onClick: m,
3557
3664
  children: c
3558
3665
  }), /* @__PURE__ */ t(Q, {
3559
- variant: u ? "danger" : "primary",
3666
+ variant: l ? "danger" : "primary",
3560
3667
  disabled: v,
3561
3668
  onClick: p,
3562
3669
  children: s
3563
3670
  })]
3564
3671
  }),
3565
3672
  children: /* @__PURE__ */ n("div", {
3566
- className: "lx-confirm-content",
3673
+ className: "wui-confirm-content",
3567
3674
  children: [
3568
3675
  y && /* @__PURE__ */ t("span", {
3569
- className: "lx-confirm-icon",
3676
+ className: "wui-confirm-icon",
3570
3677
  children: /* @__PURE__ */ t(y, { size: 104 })
3571
3678
  }),
3572
3679
  /* @__PURE__ */ t("h3", {
3573
- className: "lx-confirm-title",
3680
+ className: "wui-confirm-title",
3574
3681
  tabIndex: -1,
3575
3682
  "data-autofocus": !0,
3576
3683
  children: i
3577
3684
  }),
3578
3685
  o && /* @__PURE__ */ t("p", {
3579
- className: "lx-confirm-msg",
3686
+ className: "wui-confirm-msg",
3580
3687
  children: o
3581
3688
  }),
3582
- f && /* @__PURE__ */ t(Ze, {
3689
+ f && /* @__PURE__ */ t(ot, {
3583
3690
  fieldClassName: "mt-3 mb-0 w-100 text-start",
3584
3691
  label: /* @__PURE__ */ n(e, { children: [
3585
3692
  "Type ",
@@ -3596,8 +3703,8 @@ function tt({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancel
3596
3703
  }
3597
3704
  //#endregion
3598
3705
  //#region src/components/AppSkeleton.jsx
3599
- function nt({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
3600
- return T("AppSkeleton", o), /* @__PURE__ */ t("span", {
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", {
3601
3708
  className: `skeleton${i ? ` ${i}` : ""}`,
3602
3709
  "aria-hidden": "true",
3603
3710
  style: {
@@ -3605,10 +3712,11 @@ function nt({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "
3605
3712
  height: n,
3606
3713
  borderRadius: r,
3607
3714
  ...a
3608
- }
3715
+ },
3716
+ ...o
3609
3717
  });
3610
3718
  }
3611
- var rt = [
3719
+ var ft = [
3612
3720
  "r0",
3613
3721
  "r1",
3614
3722
  "r2",
@@ -3617,7 +3725,7 @@ var rt = [
3617
3725
  "r5",
3618
3726
  "r6",
3619
3727
  "r7"
3620
- ], it = [
3728
+ ], pt = [
3621
3729
  "c0",
3622
3730
  "c1",
3623
3731
  "c2",
@@ -3627,17 +3735,17 @@ var rt = [
3627
3735
  "c6",
3628
3736
  "c7"
3629
3737
  ];
3630
- function at({ rows: e = 4, cols: n = 5 }) {
3631
- return rt.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: it.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(nt, {
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, {
3632
3740
  width: n === 0 ? "70%" : "50%",
3633
3741
  height: 12
3634
3742
  }) }, e)) }, e));
3635
3743
  }
3636
3744
  //#endregion
3637
3745
  //#region src/components/AppSelectMini.jsx
3638
- function ot({ value: e, onChange: n, options: r = [], placeholder: i = "Select...", name: o, ariaLabel: s, id: l, disabled: u, size: d, icon: f, prefix: p, className: m, ...h }) {
3639
- T("AppSelectMini", h);
3640
- let g = c(null);
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);
3748
+ let g = l(null);
3641
3749
  return a(() => {
3642
3750
  g.current && (g.current.options = r.map((e) => ({
3643
3751
  value: e.value,
@@ -3659,7 +3767,7 @@ function ot({ value: e, onChange: n, options: r = [], placeholder: i = "Select..
3659
3767
  ref: g,
3660
3768
  name: o,
3661
3769
  compact: "",
3662
- id: l,
3770
+ id: c,
3663
3771
  placeholder: i,
3664
3772
  "aria-label": s,
3665
3773
  size: d || void 0,
@@ -3669,19 +3777,19 @@ function ot({ value: e, onChange: n, options: r = [], placeholder: i = "Select..
3669
3777
  }
3670
3778
  //#endregion
3671
3779
  //#region src/components/AppTablePagination.jsx
3672
- var st = [
3780
+ var gt = [
3673
3781
  5,
3674
3782
  10,
3675
3783
  25,
3676
3784
  50
3677
3785
  ];
3678
- function ct({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = st, ...d }) {
3679
- return T("AppTablePagination", d), /* @__PURE__ */ n("div", {
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", {
3680
3788
  className: "table-pagination",
3681
3789
  children: [
3682
3790
  /* @__PURE__ */ n("span", {
3683
3791
  className: "tpg-rows",
3684
- children: ["Rows per page:", /* @__PURE__ */ t(ot, {
3792
+ children: ["Rows per page:", /* @__PURE__ */ t(ht, {
3685
3793
  value: i,
3686
3794
  onChange: (e) => l(Number(e)),
3687
3795
  ariaLabel: "Rows per page",
@@ -3709,7 +3817,7 @@ function ct({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
3709
3817
  onClick: () => c(Math.max(1, e - 1)),
3710
3818
  disabled: e <= 1,
3711
3819
  "aria-label": "Previous page",
3712
- children: /* @__PURE__ */ t(O, {
3820
+ children: /* @__PURE__ */ t(k, {
3713
3821
  name: "arrow-left",
3714
3822
  size: 18
3715
3823
  })
@@ -3719,7 +3827,7 @@ function ct({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
3719
3827
  onClick: () => c(Math.min(r, e + 1)),
3720
3828
  disabled: e >= r,
3721
3829
  "aria-label": "Next page",
3722
- children: /* @__PURE__ */ t(O, {
3830
+ children: /* @__PURE__ */ t(k, {
3723
3831
  name: "arrow-right",
3724
3832
  size: 18
3725
3833
  })
@@ -3730,15 +3838,15 @@ function ct({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
3730
3838
  }
3731
3839
  //#endregion
3732
3840
  //#region src/components/AppDataTable.jsx
3733
- function lt(e) {
3734
- return e === "end" ? "lx-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
3841
+ function vt(e) {
3842
+ return e === "end" ? "wui-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
3735
3843
  }
3736
- function ut(e) {
3737
- return e == null || e === "" ? "—" : e;
3844
+ function yt(e) {
3845
+ return e == null || e === "" ? "—" : typeof e == "boolean" ? String(e) : e;
3738
3846
  }
3739
- function dt({ 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 }) {
3740
- T("AppDataTable", S);
3741
- let C = Math.max(1, r.length + +!!p + +!!v), w = v && i ? i.reduce((e, t) => e + +!!y?.has(a(t)), 0) : 0, E = v && i && i.length > 0 && w === i.length, D = w > 0 && !E, k = (e) => {
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) => {
3742
3850
  e && (e.indeterminate = D);
3743
3851
  }, A = d !== void 0 && f > 0 ? d : u;
3744
3852
  return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
@@ -3748,12 +3856,12 @@ function dt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3748
3856
  "aria-label": g,
3749
3857
  children: [/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ n("tr", { children: [
3750
3858
  v && /* @__PURE__ */ t("th", {
3751
- className: "lx-select-cell",
3859
+ className: "wui-select-cell",
3752
3860
  children: /* @__PURE__ */ t("input", {
3753
- ref: k,
3861
+ ref: O,
3754
3862
  type: "checkbox",
3755
- className: "lx-check",
3756
- checked: E,
3863
+ className: "wui-check",
3864
+ checked: T,
3757
3865
  onChange: (e) => x?.(e.target.checked),
3758
3866
  "aria-label": "Select all rows"
3759
3867
  })
@@ -3761,7 +3869,7 @@ function dt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3761
3869
  r.map((e, r) => {
3762
3870
  let i = !!(e.sortable && s), a = o && o.key === e.key;
3763
3871
  return /* @__PURE__ */ n("th", {
3764
- className: (i ? "sortable " : "") + (r === 0 ? "lx-name-cell " : "") + lt(e.align),
3872
+ className: (i ? "sortable " : "") + (r === 0 ? "wui-name-cell " : "") + vt(e.align),
3765
3873
  style: e.width ? { width: e.width } : void 0,
3766
3874
  tabIndex: i ? 0 : void 0,
3767
3875
  "aria-sort": a ? o.dir === "asc" ? "ascending" : "descending" : i ? "none" : void 0,
@@ -3771,7 +3879,7 @@ function dt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3771
3879
  } : void 0,
3772
3880
  children: [e.label, i && /* @__PURE__ */ t("span", {
3773
3881
  className: "sort-icon",
3774
- children: /* @__PURE__ */ t(O, {
3882
+ children: /* @__PURE__ */ t(k, {
3775
3883
  name: "chevrons-up-down",
3776
3884
  size: 14
3777
3885
  })
@@ -3779,16 +3887,16 @@ function dt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3779
3887
  }, e.key);
3780
3888
  }),
3781
3889
  p && (m ? /* @__PURE__ */ t("th", {
3782
- className: "lx-cell-end",
3890
+ className: "wui-cell-end",
3783
3891
  children: m
3784
3892
  }) : /* @__PURE__ */ t("th", {
3785
- className: "lx-cell-end",
3893
+ className: "wui-cell-end",
3786
3894
  children: /* @__PURE__ */ t("span", {
3787
3895
  className: "visually-hidden",
3788
3896
  children: "Actions"
3789
3897
  })
3790
3898
  }))
3791
- ] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(at, {
3899
+ ] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(mt, {
3792
3900
  rows: l,
3793
3901
  cols: C
3794
3902
  }) : i?.length ? i.map((e) => {
@@ -3797,18 +3905,18 @@ function dt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3797
3905
  className: v && y?.has(i) ? "is-selected" : void 0,
3798
3906
  children: [
3799
3907
  v && /* @__PURE__ */ t("td", {
3800
- className: "lx-select-cell",
3908
+ className: "wui-select-cell",
3801
3909
  children: /* @__PURE__ */ t("input", {
3802
3910
  type: "checkbox",
3803
- className: "lx-check",
3911
+ className: "wui-check",
3804
3912
  checked: y?.has(i) || !1,
3805
3913
  onChange: () => b?.(i),
3806
3914
  "aria-label": "Select row"
3807
3915
  })
3808
3916
  }),
3809
3917
  r.map((n, r) => /* @__PURE__ */ t("td", {
3810
- className: (r === 0 ? "lx-name-cell " : "") + lt(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
3811
- children: n.render ? n.render(e) : ut(e[n.key])
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])
3812
3920
  }, n.key)),
3813
3921
  p && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", {
3814
3922
  className: "u-row-actions",
@@ -3818,11 +3926,11 @@ function dt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3818
3926
  }, i);
3819
3927
  }) : /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
3820
3928
  colSpan: C,
3821
- className: "lx-table-empty",
3929
+ className: "wui-table-empty",
3822
3930
  children: A
3823
3931
  }) }) })]
3824
3932
  })
3825
- }), h && !c && h.total > 0 && /* @__PURE__ */ t(ct, {
3933
+ }), h && !c && h.total > 0 && /* @__PURE__ */ t(_t, {
3826
3934
  page: h.page,
3827
3935
  totalPages: h.totalPages,
3828
3936
  pageSize: h.pageSize,
@@ -3835,9 +3943,9 @@ function dt({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
3835
3943
  }
3836
3944
  //#endregion
3837
3945
  //#region src/components/AppDatePicker.jsx
3838
- function ft({ value: e, onChange: r, label: i, required: s = !1, hint: l, error: u, name: d, min: f, max: p, placeholder: m = "Enter Date", disabled: h, size: g, firstDay: _, id: v, ariaLabel: y, className: b = "", ...x }) {
3839
- T("AppDatePicker", x);
3840
- let S = c(null), C = o(), w = v || d || C;
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);
3948
+ let S = l(null), C = o(), w = v || d || C;
3841
3949
  a(() => {
3842
3950
  let t = S.current;
3843
3951
  t && t.value !== (e ?? "") && (t.value = e ?? "");
@@ -3847,7 +3955,7 @@ function ft({ value: e, onChange: r, label: i, required: s = !1, hint: l, error:
3847
3955
  let t = () => r?.(e.value);
3848
3956
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
3849
3957
  }, [r]);
3850
- let E = !i && !u && !l, D = /* @__PURE__ */ t("wui-datepicker", {
3958
+ let T = !i && !u && !c, D = /* @__PURE__ */ t("wui-datepicker", {
3851
3959
  ref: S,
3852
3960
  id: w,
3853
3961
  name: d,
@@ -3860,9 +3968,9 @@ function ft({ value: e, onChange: r, label: i, required: s = !1, hint: l, error:
3860
3968
  "aria-invalid": u ? "true" : void 0,
3861
3969
  disabled: h ? "" : void 0,
3862
3970
  required: s ? "" : void 0,
3863
- className: E && b || void 0
3971
+ className: T && b || void 0
3864
3972
  });
3865
- return E ? D : /* @__PURE__ */ n("div", {
3973
+ return T ? D : /* @__PURE__ */ n("div", {
3866
3974
  className: `field${b ? ` ${b}` : ""}`,
3867
3975
  children: [
3868
3976
  i && /* @__PURE__ */ n("label", {
@@ -3879,18 +3987,18 @@ function ft({ value: e, onChange: r, label: i, required: s = !1, hint: l, error:
3879
3987
  className: "field-error",
3880
3988
  children: u
3881
3989
  }),
3882
- !u && l && /* @__PURE__ */ t("div", {
3990
+ !u && c && /* @__PURE__ */ t("div", {
3883
3991
  className: "field-hint",
3884
- children: l
3992
+ children: c
3885
3993
  })
3886
3994
  ]
3887
3995
  });
3888
3996
  }
3889
3997
  //#endregion
3890
3998
  //#region src/components/AppDateRangePicker.jsx
3891
- function pt({ start: e, end: r, onChange: i, label: s, required: l = !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 }) {
3892
- T("AppDateRangePicker", C);
3893
- let w = c(null), E = o(), D = b || f || E;
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;
3894
4002
  a(() => {
3895
4003
  let t = w.current;
3896
4004
  t && t.value.start !== (e ?? "") && t.setAttribute("start", e ?? "");
@@ -3916,7 +4024,7 @@ function pt({ start: e, end: r, onChange: i, label: s, required: l = !1, hint: u
3916
4024
  "aria-label": x,
3917
4025
  "aria-invalid": d ? "true" : void 0,
3918
4026
  disabled: _ ? "" : void 0,
3919
- required: l ? "" : void 0,
4027
+ required: c ? "" : void 0,
3920
4028
  className: O && S || void 0
3921
4029
  });
3922
4030
  return O ? k : /* @__PURE__ */ n("div", {
@@ -3925,7 +4033,7 @@ function pt({ start: e, end: r, onChange: i, label: s, required: l = !1, hint: u
3925
4033
  s && /* @__PURE__ */ n("label", {
3926
4034
  className: "label",
3927
4035
  htmlFor: D,
3928
- children: [s, l && /* @__PURE__ */ t("span", {
4036
+ children: [s, c && /* @__PURE__ */ t("span", {
3929
4037
  className: "required",
3930
4038
  "aria-hidden": "true",
3931
4039
  children: "*"
@@ -3945,7 +4053,7 @@ function pt({ start: e, end: r, onChange: i, label: s, required: l = !1, hint: u
3945
4053
  }
3946
4054
  //#endregion
3947
4055
  //#region src/components/AppDropdown.jsx
3948
- var mt = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
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) {
3949
4057
  return /* @__PURE__ */ t("button", {
3950
4058
  ref: l,
3951
4059
  type: "button",
@@ -3953,23 +4061,23 @@ var mt = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-
3953
4061
  title: i,
3954
4062
  "aria-label": o,
3955
4063
  ...c,
3956
- children: /* @__PURE__ */ t(O, {
4064
+ children: /* @__PURE__ */ t(k, {
3957
4065
  name: e,
3958
4066
  size: n
3959
4067
  })
3960
4068
  });
3961
4069
  });
3962
- function ht({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u, ...d }) {
3963
- return T("AppDropdown", d), /* @__PURE__ */ n(_, {
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, {
3964
4072
  align: s,
3965
- children: [/* @__PURE__ */ t(_.Toggle, {
3966
- as: mt,
4073
+ children: [/* @__PURE__ */ t(v.Toggle, {
4074
+ as: Ct,
3967
4075
  icon: e,
3968
4076
  iconSize: r,
3969
4077
  btnClassName: i,
3970
4078
  title: a,
3971
4079
  "aria-label": o
3972
- }), /* @__PURE__ */ t(_.Menu, {
4080
+ }), /* @__PURE__ */ t(v.Menu, {
3973
4081
  className: l,
3974
4082
  renderOnMount: !0,
3975
4083
  children: c.map((e) => {
@@ -3983,14 +4091,14 @@ function ht({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
3983
4091
  as: "button",
3984
4092
  type: "button"
3985
4093
  };
3986
- return /* @__PURE__ */ n(_.Item, {
4094
+ return /* @__PURE__ */ n(v.Item, {
3987
4095
  ...r,
3988
4096
  onClick: e.onClick,
3989
4097
  className: e.danger ? "danger" : void 0,
3990
4098
  children: [e.image ? /* @__PURE__ */ t("img", {
3991
4099
  src: e.image,
3992
4100
  alt: ""
3993
- }) : e.icon && /* @__PURE__ */ t(O, {
4101
+ }) : e.icon && /* @__PURE__ */ t(k, {
3994
4102
  name: e.icon,
3995
4103
  size: 16
3996
4104
  }), e.label]
@@ -4001,8 +4109,8 @@ function ht({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
4001
4109
  }
4002
4110
  //#endregion
4003
4111
  //#region src/components/AppEmptyState.jsx
4004
- function gt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
4005
- return T("AppEmptyState", u), /* @__PURE__ */ n("div", {
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", {
4006
4114
  className: [
4007
4115
  "empty-state",
4008
4116
  i === "sm" ? "empty-state-sm" : "",
@@ -4012,7 +4120,7 @@ function gt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
4012
4120
  children: [
4013
4121
  e ? /* @__PURE__ */ t("div", {
4014
4122
  className: "empty-state-icon",
4015
- children: /* @__PURE__ */ t(O, {
4123
+ children: /* @__PURE__ */ t(k, {
4016
4124
  name: e,
4017
4125
  size: r
4018
4126
  })
@@ -4034,9 +4142,9 @@ function gt({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
4034
4142
  }
4035
4143
  //#endregion
4036
4144
  //#region src/components/AppFileAttachment.jsx
4037
- function _t({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u = Oe, maxSizeMb: d = 5, optional: f = !1, error: p, id: m, ...h }) {
4038
- T("AppFileAttachment", h);
4039
- let g = o(), _ = m || s || g, [v, y] = l(null), [b, x] = l("");
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("");
4040
4148
  a(() => {
4041
4149
  if (i instanceof File) {
4042
4150
  let e = URL.createObjectURL(i);
@@ -4047,8 +4155,8 @@ function _t({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4047
4155
  function S(e) {
4048
4156
  let t = e.target.files?.[0];
4049
4157
  if (e.target.value = "", !t) return;
4050
- let n = Pe(t, {
4051
- accept: u,
4158
+ let n = Ue(t, {
4159
+ accept: l,
4052
4160
  maxSizeMb: d
4053
4161
  });
4054
4162
  if (n) {
@@ -4060,7 +4168,7 @@ function _t({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4060
4168
  function C() {
4061
4169
  x(""), c(null);
4062
4170
  }
4063
- let w = i instanceof File ? i.name : i?.name, E = i instanceof File ? `${(i.size / 1024).toFixed(0)} KB` : null, D = p || b;
4171
+ let w = i instanceof File ? i.name : i?.name, T = i instanceof File ? `${(i.size / 1024).toFixed(0)} KB` : null, D = p || b;
4064
4172
  return /* @__PURE__ */ n("div", {
4065
4173
  className: "field",
4066
4174
  children: [
@@ -4084,7 +4192,7 @@ function _t({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4084
4192
  className: "attach-remove",
4085
4193
  "aria-label": "Remove attachment",
4086
4194
  onClick: C,
4087
- children: /* @__PURE__ */ t(O, {
4195
+ children: /* @__PURE__ */ t(k, {
4088
4196
  name: "x",
4089
4197
  size: 18
4090
4198
  })
@@ -4094,9 +4202,9 @@ function _t({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4094
4202
  children: [/* @__PURE__ */ t("div", {
4095
4203
  className: "attach-name",
4096
4204
  children: w
4097
- }), E && /* @__PURE__ */ t("div", {
4205
+ }), T && /* @__PURE__ */ t("div", {
4098
4206
  className: "attach-size",
4099
- children: E
4207
+ children: T
4100
4208
  })]
4101
4209
  })]
4102
4210
  }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("label", {
@@ -4105,7 +4213,7 @@ function _t({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4105
4213
  children: [
4106
4214
  /* @__PURE__ */ t("span", {
4107
4215
  className: "attach-drop-icon",
4108
- children: /* @__PURE__ */ t(O, {
4216
+ children: /* @__PURE__ */ t(k, {
4109
4217
  name: "image",
4110
4218
  size: 18
4111
4219
  })
@@ -4134,7 +4242,7 @@ function _t({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4134
4242
  type: "file",
4135
4243
  className: "visually-hidden-input",
4136
4244
  name: s,
4137
- accept: u,
4245
+ accept: l,
4138
4246
  onChange: S
4139
4247
  })] }),
4140
4248
  D && /* @__PURE__ */ t("div", {
@@ -4146,24 +4254,24 @@ function _t({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u
4146
4254
  }
4147
4255
  //#endregion
4148
4256
  //#region src/components/toast.js
4149
- var vt = /* @__PURE__ */ new Set([
4257
+ var Dt = /* @__PURE__ */ new Set([
4150
4258
  "success",
4151
4259
  "info",
4152
4260
  "warning",
4153
4261
  "error"
4154
4262
  ]);
4155
- function yt(e, t = "success") {
4156
- let n = vt.has(t) ? t : "success";
4157
- v[n](e, { toastId: `${n}:${e}` });
4263
+ function Ot(e, t = "success") {
4264
+ let n = Dt.has(t) ? t : "success";
4265
+ y[n](e, { toastId: `${n}:${e}` });
4158
4266
  }
4159
- function bt(e) {
4160
- v.error(e, { toastId: `error:${e}` });
4267
+ function kt(e) {
4268
+ y.error(e, { toastId: `error:${e}` });
4161
4269
  }
4162
4270
  //#endregion
4163
4271
  //#region src/components/AppFilePicker.jsx
4164
- function xt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.png", maxSizeMb: d = 5, required: f, error: p, ...m }) {
4165
- T("AppFilePicker", m);
4166
- let [h, g] = l(null), [_, v] = l(!1), y = c(null), b = o(), x = i || b;
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;
4167
4275
  a(() => {
4168
4276
  if (r instanceof File) {
4169
4277
  let e = URL.createObjectURL(r);
@@ -4172,24 +4280,24 @@ function xt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
4172
4280
  g(null);
4173
4281
  }, [r]);
4174
4282
  let S = r?.url || h, C = (e) => {
4175
- let t = Pe(e, {
4176
- accept: u,
4283
+ let t = Ue(e, {
4284
+ accept: c,
4177
4285
  maxSizeMb: d
4178
4286
  });
4179
- return t ? (yt(t, "error"), !1) : (s(e), !0);
4287
+ return t ? (Ot(t, "error"), !1) : (s(e), !0);
4180
4288
  }, w = (e) => {
4181
4289
  let t = e.target.files?.[0] || null;
4182
4290
  t && (C(t) || (e.target.value = ""));
4183
- }, E = (e) => {
4291
+ }, T = (e) => {
4184
4292
  e.preventDefault(), v(!1);
4185
4293
  let t = e.dataTransfer.files?.[0];
4186
4294
  t && C(t);
4187
- }, D = () => y.current?.click(), k = /* @__PURE__ */ t("input", {
4295
+ }, D = () => y.current?.click(), O = /* @__PURE__ */ t("input", {
4188
4296
  id: x,
4189
4297
  name: i,
4190
4298
  ref: y,
4191
4299
  type: "file",
4192
- accept: u,
4300
+ accept: c,
4193
4301
  hidden: !0,
4194
4302
  onClick: (e) => {
4195
4303
  e.currentTarget.value = "";
@@ -4220,7 +4328,7 @@ function xt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
4220
4328
  className: "file-preview-overlay",
4221
4329
  children: /* @__PURE__ */ n("span", {
4222
4330
  className: "file-preview-cta",
4223
- children: [/* @__PURE__ */ t(O, {
4331
+ children: [/* @__PURE__ */ t(k, {
4224
4332
  name: "image",
4225
4333
  size: 16
4226
4334
  }), " Change image"]
@@ -4233,12 +4341,12 @@ function xt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
4233
4341
  "aria-label": `Remove ${e}`,
4234
4342
  title: "Remove image",
4235
4343
  onClick: () => s(null),
4236
- children: /* @__PURE__ */ t(O, {
4344
+ children: /* @__PURE__ */ t(k, {
4237
4345
  name: "x",
4238
4346
  size: 16
4239
4347
  })
4240
4348
  }),
4241
- k
4349
+ O
4242
4350
  ]
4243
4351
  }) : /* @__PURE__ */ n("div", {
4244
4352
  className: `file-input file-input-tall${_ ? " dragging" : ""}${p ? " error" : ""}`,
@@ -4248,14 +4356,14 @@ function xt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
4248
4356
  onDragLeave: (e) => {
4249
4357
  e.preventDefault(), v(!1);
4250
4358
  },
4251
- onDrop: E,
4359
+ onDrop: T,
4252
4360
  children: [/* @__PURE__ */ n("label", {
4253
4361
  htmlFor: x,
4254
4362
  className: "file-input-zone-label",
4255
4363
  children: [
4256
4364
  /* @__PURE__ */ t("span", {
4257
4365
  className: "file-input-icon",
4258
- children: /* @__PURE__ */ t(O, {
4366
+ children: /* @__PURE__ */ t(k, {
4259
4367
  name: "upload",
4260
4368
  size: 24
4261
4369
  })
@@ -4276,7 +4384,7 @@ function xt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
4276
4384
  ]
4277
4385
  })
4278
4386
  ]
4279
- }), k]
4387
+ }), O]
4280
4388
  }),
4281
4389
  p && /* @__PURE__ */ t("div", {
4282
4390
  className: "field-error",
@@ -4287,13 +4395,13 @@ function xt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.p
4287
4395
  }
4288
4396
  //#endregion
4289
4397
  //#region src/components/AppInfoList.jsx
4290
- function St({ items: r = [], className: i = "", ...a }) {
4291
- return T("AppInfoList", a), /* @__PURE__ */ t("div", {
4398
+ function jt({ items: r = [], className: i = "", ...a }) {
4399
+ return E("AppInfoList", a), /* @__PURE__ */ t("div", {
4292
4400
  className: `info-list${i ? ` ${i}` : ""}`,
4293
4401
  children: r.map((r, i) => {
4294
4402
  let a = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
4295
4403
  className: "info-icon",
4296
- children: /* @__PURE__ */ t(O, {
4404
+ children: /* @__PURE__ */ t(k, {
4297
4405
  name: r.icon,
4298
4406
  size: 16
4299
4407
  })
@@ -4320,15 +4428,15 @@ function St({ items: r = [], className: i = "", ...a }) {
4320
4428
  }
4321
4429
  //#endregion
4322
4430
  //#region src/components/AppKpiTile.jsx
4323
- function Ct({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
4324
- T("AppKpiTile", l);
4431
+ function Mt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
4432
+ E("AppKpiTile", l);
4325
4433
  let u = `kpi${s ? " kpi-inline" : ""}${c ? ` ${c}` : ""}`, d = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
4326
4434
  return /* @__PURE__ */ n("div", {
4327
4435
  className: u,
4328
4436
  children: [
4329
4437
  i && /* @__PURE__ */ t("span", {
4330
4438
  className: "kpi-icon",
4331
- children: /* @__PURE__ */ t(O, {
4439
+ children: /* @__PURE__ */ t(k, {
4332
4440
  name: i,
4333
4441
  size: 20
4334
4442
  })
@@ -4343,7 +4451,7 @@ function Ct({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
4343
4451
  }),
4344
4452
  a && /* @__PURE__ */ n("div", {
4345
4453
  className: `kpi-delta${o === "flat" ? "" : ` ${o}`}`,
4346
- children: [d && /* @__PURE__ */ t(O, {
4454
+ children: [d && /* @__PURE__ */ t(k, {
4347
4455
  name: d,
4348
4456
  size: 13
4349
4457
  }), a]
@@ -4353,9 +4461,9 @@ function Ct({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
4353
4461
  }
4354
4462
  //#endregion
4355
4463
  //#region src/components/AppLogoPicker.jsx
4356
- function wt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept: l = "image/png,image/jpeg", maxSizeMb: u = 5, overlayIcon: d = "image", overlayLabel: f = "Update photo", ariaLabel: p = "Upload photo", ...m }) {
4357
- T("AppLogoPicker", m);
4358
- let h = c(null);
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);
4359
4467
  return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("button", {
4360
4468
  type: "button",
4361
4469
  className: "set-uploader",
@@ -4377,14 +4485,14 @@ function wt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
4377
4485
  }), s ? /* @__PURE__ */ t("span", {
4378
4486
  className: "set-uploader-overlay is-loading",
4379
4487
  "aria-hidden": "true",
4380
- children: /* @__PURE__ */ t(O, {
4488
+ children: /* @__PURE__ */ t(k, {
4381
4489
  name: "refresh-cw",
4382
4490
  size: 22,
4383
- className: "lx-spin"
4491
+ className: "wui-spin"
4384
4492
  })
4385
4493
  }) : /* @__PURE__ */ n("span", {
4386
4494
  className: "set-uploader-overlay",
4387
- children: [/* @__PURE__ */ t(O, {
4495
+ children: [/* @__PURE__ */ t(k, {
4388
4496
  name: d,
4389
4497
  size: 22
4390
4498
  }), /* @__PURE__ */ t("span", { children: f })]
@@ -4395,16 +4503,16 @@ function wt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
4395
4503
  type: "file",
4396
4504
  name: a,
4397
4505
  hidden: !0,
4398
- accept: l,
4506
+ accept: c,
4399
4507
  onChange: (e) => {
4400
4508
  let t = e.target.files?.[0];
4401
4509
  if (e.target.value = "", !t) return;
4402
- let n = Pe(t, {
4403
- accept: l,
4510
+ let n = Ue(t, {
4511
+ accept: c,
4404
4512
  maxSizeMb: u
4405
4513
  });
4406
4514
  if (n) {
4407
- yt(n, "error");
4515
+ Ot(n, "error");
4408
4516
  return;
4409
4517
  }
4410
4518
  o(t);
@@ -4414,9 +4522,9 @@ function wt({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept
4414
4522
  }
4415
4523
  //#endregion
4416
4524
  //#region src/components/AppMultiSelect.jsx
4417
- function Tt({ values: e, onChange: r, options: i, placeholder: o = "Select…", searchPlaceholder: s = "Search…", searchable: l = !0, disabled: u = !1, icon: d, size: f, collapseChips: p = !1, name: m, label: h, error: g, hint: _, required: v = !1, fieldClassName: y = "", ...b }) {
4418
- T("AppMultiSelect", b);
4419
- let x = c(null);
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);
4527
+ let x = l(null);
4420
4528
  return a(() => {
4421
4529
  let e = x.current;
4422
4530
  e && (e.options = i || []);
@@ -4448,7 +4556,7 @@ function Tt({ values: e, onChange: r, options: i, placeholder: o = "Select…",
4448
4556
  icon: d || void 0,
4449
4557
  size: f || void 0,
4450
4558
  "collapse-chips": p ? "" : void 0,
4451
- searchable: l ? "" : void 0,
4559
+ searchable: c ? "" : void 0,
4452
4560
  disabled: u ? "" : void 0,
4453
4561
  required: v ? "" : void 0
4454
4562
  }),
@@ -4464,9 +4572,9 @@ function Tt({ values: e, onChange: r, options: i, placeholder: o = "Select…",
4464
4572
  }
4465
4573
  //#endregion
4466
4574
  //#region src/components/AppOtpInput.jsx
4467
- var Et = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode: l = "numeric", label: u, required: d = !1, hint: f, error: p, disabled: m = !1, name: h, id: g, className: _ = "", ...v }, y) {
4468
- T("AppOtpInput", v);
4469
- let b = c(null), x = o(), S = g || h || x, C = (e) => {
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);
4577
+ let b = l(null), x = o(), S = g || h || x, C = (e) => {
4470
4578
  b.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
4471
4579
  };
4472
4580
  a(() => {
@@ -4486,7 +4594,7 @@ var Et = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode:
4486
4594
  id: S,
4487
4595
  name: h,
4488
4596
  length: String(s),
4489
- mode: l,
4597
+ mode: c,
4490
4598
  "aria-invalid": p ? "true" : void 0,
4491
4599
  disabled: m ? "" : void 0,
4492
4600
  required: d ? "" : void 0
@@ -4517,8 +4625,8 @@ var Et = r(function({ value: e, onChange: r, onComplete: i, length: s = 6, mode:
4517
4625
  });
4518
4626
  //#endregion
4519
4627
  //#region src/components/AppPageHeader.jsx
4520
- function Dt({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
4521
- return T("AppPageHeader", o), /* @__PURE__ */ n("div", {
4628
+ function It({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
4629
+ return E("AppPageHeader", o), /* @__PURE__ */ n("div", {
4522
4630
  className: `page-header${i ? " d-flex align-items-end justify-content-between" : ""}${a ? ` ${a}` : ""}`,
4523
4631
  children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("div", {
4524
4632
  className: "page-title",
@@ -4534,9 +4642,9 @@ function Dt({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
4534
4642
  }
4535
4643
  //#endregion
4536
4644
  //#region src/components/AppPhoneNumberInput.jsx
4537
- function Ot({ value: e, onChange: r, country: i, disabled: o = !1, name: s, label: l = "Phone number", placeholder: u = "Enter phone number", required: d = !1, error: f, fieldClassName: p = "", ...m }) {
4538
- T("AppPhoneNumberInput", m);
4539
- let h = c(null);
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);
4647
+ let h = l(null);
4540
4648
  return a(() => {
4541
4649
  let t = h.current;
4542
4650
  t && t.value !== (e ?? "") && (t.value = e ?? "");
@@ -4548,10 +4656,10 @@ function Ot({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
4548
4656
  }, [r]), /* @__PURE__ */ n("div", {
4549
4657
  className: `field app-phone-number-input${p ? ` ${p}` : ""}`,
4550
4658
  children: [
4551
- l && /* @__PURE__ */ n("label", {
4659
+ c && /* @__PURE__ */ n("label", {
4552
4660
  className: "label",
4553
4661
  htmlFor: s,
4554
- children: [l, d && /* @__PURE__ */ t(Z, {})]
4662
+ children: [c, d && /* @__PURE__ */ t(Z, {})]
4555
4663
  }),
4556
4664
  /* @__PURE__ */ t("wui-phone", {
4557
4665
  ref: h,
@@ -4569,8 +4677,8 @@ function Ot({ value: e, onChange: r, country: i, disabled: o = !1, name: s, labe
4569
4677
  }
4570
4678
  //#endregion
4571
4679
  //#region src/components/AppPricingCard.jsx
4572
- function kt({ 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 }) {
4573
- return T("AppPricingCard", f), /* @__PURE__ */ n("div", {
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", {
4574
4682
  className: [
4575
4683
  "plan-card",
4576
4684
  c ? "featured" : "",
@@ -4605,7 +4713,7 @@ function kt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
4605
4713
  className: r ? void 0 : "excluded",
4606
4714
  children: [/* @__PURE__ */ t("span", {
4607
4715
  className: "plan-feature-icon",
4608
- children: /* @__PURE__ */ t(O, {
4716
+ children: /* @__PURE__ */ t(k, {
4609
4717
  name: r ? "check" : "x",
4610
4718
  size: 16
4611
4719
  })
@@ -4622,8 +4730,8 @@ function kt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
4622
4730
  }
4623
4731
  //#endregion
4624
4732
  //#region src/components/AppRadio.jsx
4625
- var At = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
4626
- T("AppRadio", s);
4733
+ var zt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
4734
+ E("AppRadio", s);
4627
4735
  let l = o(), u = r || l;
4628
4736
  return /* @__PURE__ */ n("div", {
4629
4737
  className: `form-check${a ? ` ${a}` : ""}`,
@@ -4643,8 +4751,8 @@ var At = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
4643
4751
  });
4644
4752
  //#endregion
4645
4753
  //#region src/components/AppRepeater.jsx
4646
- function jt({ 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 }) {
4647
- T("AppRepeater", p);
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);
4648
4756
  let m = typeof u == "number" && e.length >= u, h = !!a && e.length > l;
4649
4757
  return /* @__PURE__ */ n("div", {
4650
4758
  className: `repeater${f ? ` ${f}` : ""}`,
@@ -4664,7 +4772,7 @@ function jt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
4664
4772
  className: "repeater-body",
4665
4773
  children: r(e, i)
4666
4774
  }),
4667
- h && /* @__PURE__ */ t(k, {
4775
+ h && /* @__PURE__ */ t(A, {
4668
4776
  icon: "trash-2",
4669
4777
  label: `${s} ${i + 1}`,
4670
4778
  danger: !0,
@@ -4687,11 +4795,11 @@ function jt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
4687
4795
  }
4688
4796
  //#endregion
4689
4797
  //#region src/components/AppResourceCard.jsx
4690
- function Mt({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
4691
- T("AppResourceCard", u);
4798
+ function Vt({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
4799
+ E("AppResourceCard", u);
4692
4800
  let d = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
4693
4801
  className: "res-card-icon",
4694
- children: /* @__PURE__ */ t(O, {
4802
+ children: /* @__PURE__ */ t(k, {
4695
4803
  name: r,
4696
4804
  size: 18
4697
4805
  })
@@ -4719,8 +4827,8 @@ function Mt({ icon: r, title: i, text: a, href: o, external: s = !1, linkCompone
4719
4827
  }
4720
4828
  //#endregion
4721
4829
  //#region src/components/AppSearch.jsx
4722
- function Nt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabel: a, iconSize: o = 18, size: s, loading: c = !1, disabled: l = !1, className: u = "", ...d }) {
4723
- return T("AppSearch", d), /* @__PURE__ */ n("div", {
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", {
4724
4832
  className: [
4725
4833
  "search-wrap",
4726
4834
  e ? "has-value" : "",
@@ -4733,12 +4841,12 @@ function Nt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
4733
4841
  className: "search-spinner",
4734
4842
  "aria-hidden": "true"
4735
4843
  }),
4736
- /* @__PURE__ */ t(O, {
4844
+ /* @__PURE__ */ t(k, {
4737
4845
  name: "search",
4738
4846
  size: o,
4739
4847
  className: "search-icon"
4740
4848
  }),
4741
- /* @__PURE__ */ t(m.Control, {
4849
+ /* @__PURE__ */ t(h.Control, {
4742
4850
  type: "search",
4743
4851
  className: "input search-input",
4744
4852
  placeholder: i,
@@ -4753,7 +4861,7 @@ function Nt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
4753
4861
  className: "search-clear",
4754
4862
  "aria-label": "Clear search",
4755
4863
  onClick: () => r(""),
4756
- children: /* @__PURE__ */ t(O, {
4864
+ children: /* @__PURE__ */ t(k, {
4757
4865
  name: "x",
4758
4866
  size: 16
4759
4867
  })
@@ -4763,9 +4871,9 @@ function Nt({ value: e, onValueChange: r, placeholder: i = "Search…", ariaLabe
4763
4871
  }
4764
4872
  //#endregion
4765
4873
  //#region src/components/AppSegmented.jsx
4766
- function Pt({ options: e = [], value: r, onChange: i, label: l, name: u, size: d = "md", fullWidth: f = !1, disabled: p = !1, className: m = "", ...h }) {
4767
- T("AppSegmented", h);
4768
- let g = o(), _ = u || g, v = c(null), y = c(null), b = [
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);
4876
+ let g = o(), _ = u || g, v = l(null), y = l(null), b = [
4769
4877
  "segmented",
4770
4878
  d === "sm" ? "segmented-sm" : d === "lg" ? "segmented-lg" : "",
4771
4879
  f ? "segmented-full" : "",
@@ -4799,7 +4907,7 @@ function Pt({ options: e = [], value: r, onChange: i, label: l, name: u, size: d
4799
4907
  ref: v,
4800
4908
  className: b,
4801
4909
  role: "radiogroup",
4802
- "aria-label": l,
4910
+ "aria-label": c,
4803
4911
  "aria-disabled": p || void 0,
4804
4912
  children: [/* @__PURE__ */ t("span", {
4805
4913
  className: "segmented-thumb",
@@ -4817,7 +4925,7 @@ function Pt({ options: e = [], value: r, onChange: i, label: l, name: u, size: d
4817
4925
  disabled: p || e.disabled,
4818
4926
  onChange: () => i?.(e.value)
4819
4927
  }),
4820
- e.icon && /* @__PURE__ */ t(O, {
4928
+ e.icon && /* @__PURE__ */ t(k, {
4821
4929
  name: e.icon,
4822
4930
  size: 13
4823
4931
  }),
@@ -4828,14 +4936,14 @@ function Pt({ options: e = [], value: r, onChange: i, label: l, name: u, size: d
4828
4936
  }
4829
4937
  //#endregion
4830
4938
  //#region src/components/AppSelect.jsx
4831
- var Ft = (e) => e == null ? "" : e.label ?? e.text ?? "";
4832
- function It({ value: e, onChange: r, options: i = [], placeholder: o = "Select...", searchPlaceholder: s = "Search...", searchable: l = !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 = "", ...E }) {
4833
- T("AppSelect", E);
4834
- let D = c(null);
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);
4835
4943
  a(() => {
4836
4944
  D.current && (D.current.options = i.map((e) => ({
4837
4945
  value: e.value,
4838
- label: Ft(e),
4946
+ label: Wt(e),
4839
4947
  icon: e.icon
4840
4948
  })));
4841
4949
  }, [i]), a(() => {
@@ -4852,9 +4960,9 @@ function It({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
4852
4960
  ref: D,
4853
4961
  id: x || S,
4854
4962
  name: S,
4855
- placeholder: p ? " " : o,
4963
+ placeholder: p && h ? " " : o,
4856
4964
  "search-placeholder": s,
4857
- searchable: l ? "" : void 0,
4965
+ searchable: c ? "" : void 0,
4858
4966
  clearable: u ? "" : void 0,
4859
4967
  size: d || void 0,
4860
4968
  icon: f || void 0,
@@ -4876,7 +4984,7 @@ function It({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
4876
4984
  children: [
4877
4985
  h,
4878
4986
  g && /* @__PURE__ */ t(Z, {}),
4879
- y && /* @__PURE__ */ t(Xe, {
4987
+ y && /* @__PURE__ */ t(at, {
4880
4988
  label: b,
4881
4989
  children: y
4882
4990
  })
@@ -4902,9 +5010,9 @@ function It({ value: e, onChange: r, options: i = [], placeholder: o = "Select..
4902
5010
  }
4903
5011
  //#endregion
4904
5012
  //#region src/components/AppShell.jsx
4905
- function Lt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbarEnd: s, footer: c, children: u, collapsed: d, onCollapsedChange: f, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
4906
- T("AppShell", _);
4907
- let [v, y] = l(!1), [b, x] = l(!1), [S, C] = l(!1), w = d ?? v;
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", _);
5015
+ let [v, y] = u(!1), [b, x] = u(!1), [S, C] = u(!1), w = d ?? v;
4908
5016
  return a(() => {
4909
5017
  let e = () => C(window.scrollY > 4);
4910
5018
  return e(), window.addEventListener("scroll", e, { passive: !0 }), () => window.removeEventListener("scroll", e);
@@ -4938,7 +5046,7 @@ function Lt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
4938
5046
  children: [e.label && /* @__PURE__ */ t("div", {
4939
5047
  className: "app-nav-group-label",
4940
5048
  children: e.label
4941
- }), e.items.map((e) => /* @__PURE__ */ t(Rt, {
5049
+ }), e.items.map((e) => /* @__PURE__ */ t(qt, {
4942
5050
  item: e,
4943
5051
  linkComponent: h,
4944
5052
  onNavigate: () => x(!1)
@@ -4960,7 +5068,7 @@ function Lt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
4960
5068
  },
4961
5069
  "aria-label": w ? "Expand navigation" : "Collapse navigation",
4962
5070
  "aria-expanded": !w,
4963
- children: /* @__PURE__ */ t(O, {
5071
+ children: /* @__PURE__ */ t(k, {
4964
5072
  name: "chevron-left",
4965
5073
  size: 14
4966
5074
  })
@@ -4978,7 +5086,7 @@ function Lt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
4978
5086
  onClick: () => x(!0),
4979
5087
  "aria-label": "Open navigation",
4980
5088
  "aria-expanded": b,
4981
- children: /* @__PURE__ */ t(O, {
5089
+ children: /* @__PURE__ */ t(k, {
4982
5090
  name: "menu",
4983
5091
  size: 18
4984
5092
  })
@@ -4990,7 +5098,7 @@ function Lt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
4990
5098
  }),
4991
5099
  /* @__PURE__ */ t("main", {
4992
5100
  className: "app-content",
4993
- children: u
5101
+ children: l
4994
5102
  }),
4995
5103
  c && /* @__PURE__ */ t("footer", {
4996
5104
  className: "app-footer",
@@ -5008,11 +5116,11 @@ function Lt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbar
5008
5116
  ]
5009
5117
  });
5010
5118
  }
5011
- function Rt({ item: r, linkComponent: i, onNavigate: a }) {
5119
+ function qt({ item: r, linkComponent: i, onNavigate: a }) {
5012
5120
  let o = `app-nav-item${r.active ? " active" : ""}`, s = /* @__PURE__ */ n(e, { children: [
5013
5121
  r.icon && /* @__PURE__ */ t("span", {
5014
5122
  className: "app-nav-icon",
5015
- children: /* @__PURE__ */ t(O, {
5123
+ children: /* @__PURE__ */ t(k, {
5016
5124
  name: r.icon,
5017
5125
  size: 22
5018
5126
  })
@@ -5042,7 +5150,7 @@ function Rt({ item: r, linkComponent: i, onNavigate: a }) {
5042
5150
  }
5043
5151
  //#endregion
5044
5152
  //#region src/components/AppSidebarMenu.jsx
5045
- var zt = {
5153
+ var Jt = {
5046
5154
  left: "start",
5047
5155
  right: "end",
5048
5156
  start: "start",
@@ -5050,11 +5158,11 @@ var zt = {
5050
5158
  top: "top",
5051
5159
  bottom: "bottom"
5052
5160
  };
5053
- function Bt({ 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, ...b }) {
5054
- return T("AppSidebarMenu", b), /* @__PURE__ */ n(y, {
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, {
5055
5163
  show: e,
5056
5164
  onHide: r,
5057
- placement: zt[i] || "end",
5165
+ placement: Jt[i] || "end",
5058
5166
  backdrop: d,
5059
5167
  scroll: f,
5060
5168
  keyboard: p,
@@ -5069,7 +5177,7 @@ function Bt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
5069
5177
  className: "drawer-title",
5070
5178
  children: [o && /* @__PURE__ */ t("span", {
5071
5179
  className: "drawer-title-ic",
5072
- children: /* @__PURE__ */ t(O, {
5180
+ children: /* @__PURE__ */ t(k, {
5073
5181
  name: o,
5074
5182
  size: 18
5075
5183
  })
@@ -5079,13 +5187,13 @@ function Bt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
5079
5187
  className: "btn-icon",
5080
5188
  onClick: r,
5081
5189
  "aria-label": "Close",
5082
- children: /* @__PURE__ */ t(O, {
5190
+ children: /* @__PURE__ */ t(k, {
5083
5191
  name: "x",
5084
5192
  size: 16
5085
5193
  })
5086
5194
  })]
5087
5195
  }) : s,
5088
- /* @__PURE__ */ t(y.Body, {
5196
+ /* @__PURE__ */ t(b.Body, {
5089
5197
  className: _,
5090
5198
  children: c
5091
5199
  }),
@@ -5098,8 +5206,8 @@ function Bt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
5098
5206
  }
5099
5207
  //#endregion
5100
5208
  //#region src/components/AppSpinner.jsx
5101
- function Vt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
5102
- return T("AppSpinner", i), /* @__PURE__ */ t("span", {
5209
+ function Xt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
5210
+ return E("AppSpinner", i), /* @__PURE__ */ t("span", {
5103
5211
  className: `spinner-border${e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
5104
5212
  role: "status",
5105
5213
  "aria-label": n
@@ -5107,8 +5215,8 @@ function Vt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
5107
5215
  }
5108
5216
  //#endregion
5109
5217
  //#region src/components/AppSplash.jsx
5110
- function Ht({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
5111
- return T("AppSplash", s), /* @__PURE__ */ t("div", {
5218
+ function Zt({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
5219
+ return E("AppSplash", s), /* @__PURE__ */ t("div", {
5112
5220
  className: `splash${o ? ` ${o}` : ""}`,
5113
5221
  role: "status",
5114
5222
  "aria-live": "polite",
@@ -5134,22 +5242,23 @@ function Ht({ logo: e, initials: r, text: i, label: a = "Loading", className: o
5134
5242
  }
5135
5243
  //#endregion
5136
5244
  //#region src/components/AppStatusBadge.jsx
5137
- function Ut({ label: e, tone: n = "neutral", className: r = "", ...i }) {
5138
- return T("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
5245
+ function Qt({ label: e, tone: n = "neutral", className: r = "", ...i }) {
5246
+ return E("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
5139
5247
  className: `status-label ${n}${r ? ` ${r}` : ""}`,
5248
+ ...i,
5140
5249
  children: e
5141
5250
  });
5142
5251
  }
5143
5252
  //#endregion
5144
5253
  //#region src/components/AppStepper.jsx
5145
- function Wt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
5146
- return T("AppStepper", c), /* @__PURE__ */ t("nav", {
5254
+ function $t({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
5255
+ return E("AppStepper", c), /* @__PURE__ */ t("nav", {
5147
5256
  className: [i === "journey" ? "stepper stepper-journey" : "stepper", s].filter(Boolean).join(" "),
5148
5257
  "aria-label": a,
5149
5258
  children: r.map((a, s) => {
5150
5259
  let c = a.status || "pending", l = `step${c === "pending" ? "" : ` ${c}`}`, u = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
5151
5260
  className: "step-circle",
5152
- children: c === "done" ? /* @__PURE__ */ t(O, {
5261
+ children: c === "done" ? /* @__PURE__ */ t(k, {
5153
5262
  name: "check",
5154
5263
  size: 14
5155
5264
  }) : s + 1
@@ -5189,8 +5298,8 @@ function Wt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkCo
5189
5298
  }
5190
5299
  //#endregion
5191
5300
  //#region src/components/AppSwitch.jsx
5192
- var Gt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
5193
- T("AppSwitch", s);
5301
+ var en = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
5302
+ E("AppSwitch", s);
5194
5303
  let l = o(), u = r || i || l;
5195
5304
  return /* @__PURE__ */ n("div", {
5196
5305
  className: `form-check form-switch${a ? ` ${a}` : ""}`,
@@ -5210,13 +5319,13 @@ var Gt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
5210
5319
  });
5211
5320
  //#endregion
5212
5321
  //#region src/components/AppTableEmptyState.jsx
5213
- function Kt({ icon: e, title: r, text: i, action: a, ...o }) {
5214
- return T("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
5322
+ function tn({ icon: e, title: r, text: i, action: a, ...o }) {
5323
+ return E("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
5215
5324
  className: "tbl-empty",
5216
5325
  children: [
5217
5326
  /* @__PURE__ */ t("span", {
5218
5327
  className: "tbl-empty-icon",
5219
- children: /* @__PURE__ */ t(O, {
5328
+ children: /* @__PURE__ */ t(k, {
5220
5329
  name: e,
5221
5330
  size: 24
5222
5331
  })
@@ -5238,19 +5347,25 @@ function Kt({ icon: e, title: r, text: i, action: a, ...o }) {
5238
5347
  }
5239
5348
  //#endregion
5240
5349
  //#region src/components/AppTabs.jsx
5241
- function qt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", ...l }) {
5242
- T("AppTabs", l);
5243
- let u = c(null);
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);
5244
5353
  function d(t) {
5245
5354
  let n = e.findIndex((e) => e.key === r);
5246
5355
  if (n < 0) return;
5247
- let a = null;
5248
- if (t.key === "ArrowRight" ? a = e[(n + 1) % e.length] : t.key === "ArrowLeft" ? a = e[(n - 1 + e.length) % e.length] : t.key === "Home" ? a = e[0] : t.key === "End" && (a = e[e.length - 1]), !a) return;
5249
- t.preventDefault(), i(a.key);
5250
- let o = CSS.escape(String(a.key));
5251
- u.current?.querySelector(`[data-rr-ui-event-key="${o}"]`)?.focus();
5252
- }
5253
- return /* @__PURE__ */ t(b, {
5356
+ let a = e.length, o = (t, n) => {
5357
+ for (let r = 1; r <= a; r++) {
5358
+ let i = e[((t + n * r) % a + a) % a];
5359
+ if (!i.disabled) return i;
5360
+ }
5361
+ return null;
5362
+ }, s = null;
5363
+ 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
+ t.preventDefault(), i(s.key);
5365
+ let c = CSS.escape(String(s.key));
5366
+ u.current?.querySelector(`[data-rr-ui-event-key="${c}"]`)?.focus();
5367
+ }
5368
+ return /* @__PURE__ */ t(x, {
5254
5369
  as: "div",
5255
5370
  role: "tablist",
5256
5371
  ref: u,
@@ -5262,11 +5377,12 @@ function qt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
5262
5377
  bsPrefix: "app-tabs",
5263
5378
  className: [a === "pills" ? "app-tabs-pills" : "", s].filter(Boolean).join(" "),
5264
5379
  "aria-label": o,
5265
- children: e.map((e) => /* @__PURE__ */ n(b.Link, {
5380
+ children: e.map((e) => /* @__PURE__ */ n(x.Link, {
5266
5381
  as: "button",
5267
5382
  type: "button",
5268
5383
  eventKey: e.key,
5269
5384
  role: "tab",
5385
+ disabled: e.disabled,
5270
5386
  bsPrefix: "app-tab",
5271
5387
  className: e.danger ? "danger" : void 0,
5272
5388
  children: [
@@ -5282,45 +5398,45 @@ function qt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
5282
5398
  }
5283
5399
  //#endregion
5284
5400
  //#region src/components/AppTextarea.jsx
5285
- var Jt = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, helpLabel: u = "More information", id: d, name: f, rows: p = 4, autoGrow: h = !1, className: g = "", fieldClassName: _ = "", ...v }, y) {
5286
- T("AppTextarea", v);
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);
5287
5403
  let b = d || f, x = [
5288
5404
  "textarea",
5289
- h ? "autosize" : "",
5405
+ m ? "autosize" : "",
5290
5406
  a ? "error" : "",
5291
5407
  g
5292
- ].filter(Boolean).join(" "), S = c(null), C = (e) => {
5408
+ ].filter(Boolean).join(" "), S = l(null), C = (e) => {
5293
5409
  S.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
5294
5410
  }, w = i(() => {
5295
5411
  let e = S.current;
5296
5412
  e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
5297
5413
  }, []);
5298
5414
  s(() => {
5299
- h && w();
5415
+ m && w();
5300
5416
  }, [
5301
- h,
5417
+ m,
5302
5418
  w,
5303
5419
  v.value
5304
5420
  ]);
5305
- let E = (e) => {
5306
- h && w(), v.onInput?.(e);
5421
+ let T = (e) => {
5422
+ m && w(), v.onInput?.(e);
5307
5423
  };
5308
- return /* @__PURE__ */ n(m.Group, {
5424
+ return /* @__PURE__ */ n(h.Group, {
5309
5425
  className: `field${_ ? ` ${_}` : ""}`,
5310
5426
  children: [
5311
- e && /* @__PURE__ */ n(m.Label, {
5427
+ e && /* @__PURE__ */ n(h.Label, {
5312
5428
  className: "label",
5313
5429
  htmlFor: b,
5314
5430
  children: [
5315
5431
  e,
5316
5432
  r && /* @__PURE__ */ t(Z, {}),
5317
- l && /* @__PURE__ */ t(Xe, {
5433
+ c && /* @__PURE__ */ t(at, {
5318
5434
  label: u,
5319
- children: l
5435
+ children: c
5320
5436
  })
5321
5437
  ]
5322
5438
  }),
5323
- /* @__PURE__ */ t(m.Control, {
5439
+ /* @__PURE__ */ t(h.Control, {
5324
5440
  as: "textarea",
5325
5441
  id: b,
5326
5442
  name: f,
@@ -5330,7 +5446,7 @@ var Jt = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, he
5330
5446
  required: r,
5331
5447
  ...v,
5332
5448
  ref: C,
5333
- onInput: E
5449
+ onInput: T
5334
5450
  }),
5335
5451
  a ? /* @__PURE__ */ t("div", {
5336
5452
  className: "field-error",
@@ -5344,14 +5460,14 @@ var Jt = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, he
5344
5460
  });
5345
5461
  //#endregion
5346
5462
  //#region src/components/AppTimeline.jsx
5347
- function Yt({ items: e = [], className: r = "", ...i }) {
5348
- return T("AppTimeline", i), /* @__PURE__ */ t("ol", {
5463
+ function an({ items: e = [], className: r = "", ...i }) {
5464
+ return E("AppTimeline", i), /* @__PURE__ */ t("ol", {
5349
5465
  className: `timeline${r ? ` ${r}` : ""}`,
5350
5466
  children: e.map((e, r) => /* @__PURE__ */ n("li", {
5351
5467
  className: `timeline-item${e.tone && e.tone !== "neutral" ? ` ${e.tone}` : ""}`,
5352
5468
  children: [/* @__PURE__ */ t("span", {
5353
5469
  className: "timeline-dot",
5354
- children: /* @__PURE__ */ t(O, {
5470
+ children: /* @__PURE__ */ t(k, {
5355
5471
  name: e.icon || "circle",
5356
5472
  size: 12
5357
5473
  })
@@ -5382,4 +5498,31 @@ function Yt({ items: e = [], className: r = "", ...i }) {
5382
5498
  });
5383
5499
  }
5384
5500
  //#endregion
5385
- export { k as ActionIcon, A as AppAccordion, j as AppAlert, Ie as AppAutocomplete, Re as AppAvatar, ze as AppBadge, Q as AppButton, He as AppCallout, Ue as AppCard, We as AppCheckbox, Ge as AppChip, Ke as AppChoiceCard, qe as AppChoiceChip, Je as AppColorField, Ye as AppCompareTable, tt as AppConfirmDialog, dt as AppDataTable, ft as AppDatePicker, pt as AppDateRangePicker, ht as AppDropdown, gt as AppEmptyState, _t as AppFileAttachment, xt as AppFilePicker, St as AppInfoList, Xe as AppInfoTip, Ze as AppInput, Ct as AppKpiTile, wt as AppLogoPicker, $e as AppModal, Tt as AppMultiSelect, Et as AppOtpInput, Dt as AppPageHeader, Ot as AppPhoneNumberInput, kt as AppPricingCard, At as AppRadio, jt as AppRepeater, Mt as AppResourceCard, Nt as AppSearch, Pt as AppSegmented, It as AppSelect, ot as AppSelectMini, Lt as AppShell, Bt as AppSidebarMenu, nt as AppSkeleton, at as AppSkeletonRows, Vt as AppSpinner, Ht as AppSplash, Ut as AppStatusBadge, Wt as AppStepper, Gt as AppSwitch, Kt as AppTableEmptyState, ct as AppTablePagination, qt as AppTabs, Jt as AppTextarea, Yt as AppTimeline, O as Icon, et as MODAL_ICONS, Z as RequiredMark, bt as errorToast, D as iconNames, yt as toast };
5501
+ //#region src/lib/usePagination.js
5502
+ function on(e, t = 10) {
5503
+ let [n, r] = u(1), [i, o] = u(t), s = e.length, l = Math.max(1, Math.ceil(s / i));
5504
+ a(() => {
5505
+ n > l && r(l);
5506
+ }, [n, l]);
5507
+ let d = (n - 1) * i, f = c(() => e.slice(d, d + i), [
5508
+ e,
5509
+ d,
5510
+ i
5511
+ ]);
5512
+ function p(e) {
5513
+ o(e), r(1);
5514
+ }
5515
+ return {
5516
+ page: n,
5517
+ setPage: r,
5518
+ pageSize: i,
5519
+ setPageSize: p,
5520
+ totalPages: l,
5521
+ pageRows: f,
5522
+ total: s,
5523
+ firstRow: s === 0 ? 0 : d + 1,
5524
+ lastRow: Math.min(s, d + i)
5525
+ };
5526
+ }
5527
+ //#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 };