@moondreamsdev/dreamer-ui 1.7.7-test.2 → 1.7.7-test.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +13 -0
  2. package/dist/QuestionMarkCircled-BaSE7iv0.cjs +2 -0
  3. package/dist/QuestionMarkCircled-BaSE7iv0.cjs.map +1 -0
  4. package/dist/{QuestionMarkCircled-BVBF3skB.js → QuestionMarkCircled-CY81euqP.js} +119 -7
  5. package/dist/QuestionMarkCircled-CY81euqP.js.map +1 -0
  6. package/dist/Toast-B-Zu6Kp_.cjs +2 -0
  7. package/dist/Toast-B-Zu6Kp_.cjs.map +1 -0
  8. package/dist/{Toast-C5BwqBkw.js → Toast-BFQrI1bB.js} +129 -100
  9. package/dist/Toast-BFQrI1bB.js.map +1 -0
  10. package/dist/components.cjs.js +1 -1
  11. package/dist/components.cjs.js.map +1 -1
  12. package/dist/components.esm.js +2117 -684
  13. package/dist/components.esm.js.map +1 -1
  14. package/dist/providers.cjs.js +1 -1
  15. package/dist/providers.esm.js +1 -1
  16. package/dist/src/components/accordion/AccordionItem.d.ts +0 -1
  17. package/dist/src/components/carousel/Carousel.d.ts +46 -0
  18. package/dist/src/components/carousel/hooks.d.ts +20 -0
  19. package/dist/src/components/carousel/index.d.ts +2 -0
  20. package/dist/src/components/carousel/useScreenSize.d.ts +15 -0
  21. package/dist/src/components/carousel/variants.d.ts +36 -0
  22. package/dist/src/components/clickable/Clickable.d.ts +0 -1
  23. package/dist/src/components/index.d.ts +9 -0
  24. package/dist/src/components/label/Label.d.ts +2 -1
  25. package/dist/src/components/pagination/Pagination.d.ts +24 -0
  26. package/dist/src/components/pagination/index.d.ts +1 -0
  27. package/dist/src/components/pagination/variants.d.ts +15 -0
  28. package/dist/src/components/panel/Panel.d.ts +36 -0
  29. package/dist/src/components/panel/hooks.d.ts +6 -0
  30. package/dist/src/components/panel/index.d.ts +3 -0
  31. package/dist/src/components/panel/variants.d.ts +12 -0
  32. package/dist/src/components/radiogroup/RadioGroupItem.d.ts +0 -1
  33. package/dist/src/components/scroll-area/ScrollArea.d.ts +20 -0
  34. package/dist/src/components/scroll-area/hooks.d.ts +12 -0
  35. package/dist/src/components/scroll-area/index.d.ts +2 -0
  36. package/dist/src/components/select/Select.d.ts +22 -0
  37. package/dist/src/components/select/hooks.d.ts +35 -0
  38. package/dist/src/components/select/index.d.ts +2 -0
  39. package/dist/src/components/select/variants.d.ts +15 -0
  40. package/dist/src/components/separator/Separator.d.ts +15 -0
  41. package/dist/src/components/separator/index.d.ts +2 -0
  42. package/dist/src/components/separator/variants.d.ts +7 -0
  43. package/dist/src/components/skeleton/Skeleton.d.ts +13 -0
  44. package/dist/src/components/skeleton/index.d.ts +1 -0
  45. package/dist/src/components/skeleton/variants.d.ts +18 -0
  46. package/dist/src/components/slider/Slider.d.ts +33 -0
  47. package/dist/src/components/slider/hooks.d.ts +30 -0
  48. package/dist/src/components/slider/index.d.ts +2 -0
  49. package/dist/src/components/slider/variants.d.ts +49 -0
  50. package/dist/src/components/tabs/Tabs.d.ts +26 -0
  51. package/dist/src/components/tabs/TabsContent.d.ts +10 -0
  52. package/dist/src/components/tabs/TabsContext.d.ts +11 -0
  53. package/dist/src/components/tabs/TabsList.d.ts +7 -0
  54. package/dist/src/components/tabs/TabsTrigger.d.ts +15 -0
  55. package/dist/src/components/tabs/hooks.d.ts +9 -0
  56. package/dist/src/components/tabs/index.d.ts +4 -0
  57. package/dist/src/components/tabs/variants.d.ts +18 -0
  58. package/dist/src/components/tooltip/hooks.d.ts +0 -1
  59. package/dist/src/hooks/useActionModal.d.ts +0 -1
  60. package/dist/src/hooks/useToast.d.ts +0 -1
  61. package/dist/src/symbols/ChevronDoubleLeft.d.ts +2 -0
  62. package/dist/src/symbols/ChevronDoubleRight.d.ts +2 -0
  63. package/dist/src/symbols/ChevronLeft.d.ts +2 -0
  64. package/dist/src/symbols/ChevronRight.d.ts +2 -0
  65. package/dist/src/symbols/index.d.ts +4 -1
  66. package/dist/symbols.cjs.js +1 -1
  67. package/dist/symbols.esm.js +14 -10
  68. package/dist/theme.css +4 -0
  69. package/package.json +3 -3
  70. package/dist/QuestionMarkCircled-BVBF3skB.js.map +0 -1
  71. package/dist/QuestionMarkCircled-D5cHmQp1.cjs +0 -2
  72. package/dist/QuestionMarkCircled-D5cHmQp1.cjs.map +0 -1
  73. package/dist/Toast-C5BwqBkw.js.map +0 -1
  74. package/dist/Toast-FzI16Fnl.cjs +0 -2
  75. package/dist/Toast-FzI16Fnl.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast-BFQrI1bB.js","sources":["utils.esm.js","X-CIoyLewf.js","Toast-CS2X7KvK.js","components.esm.js","../src/components/actionmodal/ActionModal.tsx","../src/components/tabs/TabsContext.tsx","../src/components/toast/Toast.tsx"],"sourcesContent":["function n(...t) {\n return t.filter((s) => typeof s == \"string\" && s).join(\" \").trim() || void 0;\n}\nexport {\n n as join\n};\n//# sourceMappingURL=utils.esm.js.map\n","import { jsx as e } from \"react/jsx-runtime\";\nfunction t({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction o({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction d({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction h({ size: C = 15, color: l = \"currentColor\", className: n = \"inline\", ...i }) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nexport {\n t as C,\n o as E,\n d as I,\n h as X\n};\n//# sourceMappingURL=X-CIoyLewf.js.map\n","import { jsx as r, Fragment as q, jsxs as b } from \"react/jsx-runtime\";\nimport H, { createContext as c, useId as P, useState as v, useEffect as g, useRef as F, useCallback as L, useMemo as E, useContext as G } from \"react\";\nimport { createPortal as K } from \"react-dom\";\nimport { X as D, C as J, E as V, I as X } from \"./X-CIoyLewf.js\";\nimport { join as Y } from \"./utils.esm.js\";\nfunction N(...e) {\n return e.filter((l) => typeof l == \"string\" && l).join(\" \").trim() || void 0;\n}\nfunction Z({ size: e = 15, color: l = \"currentColor\", className: n = \"inline\", ...t }) {\n return /* @__PURE__ */ r(\n \"svg\",\n {\n ...t,\n width: e,\n height: e,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ r(\n \"path\",\n {\n d: \"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction x(...e) {\n return e.filter((l) => typeof l == \"string\" && l).join(\" \").trim() || void 0;\n}\nc(void 0);\nc(null);\nc(null);\nc(null);\nc(null);\nc(null);\nc(null);\nc(null);\nc(null);\nc(null);\nc(null);\nfunction Q() {\n const [e, l] = v(0);\n return g(() => {\n const n = setInterval(() => {\n l((t) => (t + 1) % 3);\n }, 500);\n return () => clearInterval(n);\n }, []), /* @__PURE__ */ r(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((n) => /* @__PURE__ */ r(\n \"div\",\n {\n className: N(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n e === n && \"transform -translate-y-1\"\n )\n },\n n\n )) });\n}\nconst U = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary-foreground disabled:text-muted\",\n outline: \"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground\"\n}, W = {\n stripped: \"\",\n fitted: \"size-fit\",\n sm: \"px-2 py-1 text-sm\",\n md: \"px-4 py-2 text-base\",\n lg: \"px-6 py-3 text-lg\",\n icon: \"p-1 w-fit aspect-square\",\n full: \"p-2 w-full\"\n}, _ = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, w = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction $({\n variant: e = w.variant,\n size: l,\n rounded: n = w.rounded,\n loading: t,\n linkTo: i,\n linkProps: a,\n type: o = \"button\",\n className: d,\n ...s\n}) {\n let u;\n e === \"link\" && !l ? u = \"fitted\" : u = l || w.size;\n const m = N(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n U[e],\n W[u],\n _[n],\n t && \"relative pointer-events-none\",\n i && \"relative\",\n d\n );\n return /* @__PURE__ */ b(\n \"button\",\n {\n ...s,\n role: i ? \"link\" : s.role,\n \"aria-label\": s[\"aria-label\"] || (a == null ? void 0 : a[\"aria-label\"]),\n \"aria-description\": s[\"aria-description\"] || (a == null ? void 0 : a[\"aria-description\"]),\n \"aria-disabled\": s.disabled || t,\n \"aria-busy\": t,\n type: o,\n className: m,\n children: [\n t && /* @__PURE__ */ r(Q, {}),\n /* @__PURE__ */ r(\"span\", { className: N(t && \"invisible\"), children: s.children }),\n i && !s.disabled && /* @__PURE__ */ r(\n \"a\",\n {\n ...a,\n \"aria-hidden\": !0,\n href: i,\n rel: (a == null ? void 0 : a.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction R(e) {\n const [l, n] = v(!1), [t, i] = v(!1);\n return g(() => {\n e ? (i(!0), setTimeout(() => n(!0), 10)) : (n(!1), setTimeout(() => i(!1), 150));\n }, [e]), { show: l, shouldRender: t };\n}\nfunction ee(e, l) {\n g(() => {\n const n = (t) => {\n t.key === \"Escape\" && e && l();\n };\n return document.addEventListener(\"keydown\", n), e && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", n), document.body.style.overflow = \"auto\";\n };\n }, [e, l]);\n}\nfunction te(e, l) {\n const n = F(null), t = L(() => {\n const i = document.getElementById(e);\n if (!i) return;\n const a = i.querySelectorAll('[data-modal-action=\"true\"]');\n if (a.length > 0) {\n a[0].focus();\n return;\n }\n const o = i.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (o.length > 0) {\n const d = Array.from(o).filter((s) => !(s instanceof HTMLButtonElement && s.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (d.length > 0) {\n d[0].focus();\n return;\n }\n o[0].focus();\n return;\n }\n i.focus();\n }, [e]);\n g(() => (l && (n.current = document.activeElement, t()), () => {\n document.body.style.overflow = \"auto\", n.current instanceof HTMLElement && n.current.focus();\n }), [l, t]);\n}\nfunction re({\n id: e,\n isOpen: l,\n onClose: n,\n title: t,\n children: i,\n contentOnly: a = !1,\n className: o,\n overlayClassName: d,\n hideCloseButton: s = !1,\n actions: u = [],\n disableCloseOnOverlayClick: m = !1,\n ariaLabelledBy: f,\n ariaDescribedBy: h\n}) {\n const p = P(), k = e || `modal-${p}`, C = e ? `${e}-title` : `modal-title-${p}`, { show: T, shouldRender: y } = R(l);\n if (te(k, y), ee(y, n), !y) return null;\n const I = () => t ? H.isValidElement(t) ? /* @__PURE__ */ r(\"div\", { className: \"mb-4\", children: t }) : /* @__PURE__ */ r(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: C, children: t }) : null, j = () => u.length === 0 ? null : /* @__PURE__ */ r(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: u.map((A, O) => {\n const { label: B, className: S, ...M } = A;\n return /* @__PURE__ */ r($, { className: S, type: \"button\", ...M, \"data-modal-action\": \"true\", children: B }, O);\n }) });\n return /* @__PURE__ */ r(q, { children: K(\n /* @__PURE__ */ r(\n \"div\",\n {\n \"aria-labelledby\": f ?? t ? C : void 0,\n \"aria-describedby\": h,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ b(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ r(\n \"div\",\n {\n className: x(\"fixed inset-0 bg-black/20 transition-all\", d),\n onClick: () => {\n m || n();\n }\n }\n ),\n a && /* @__PURE__ */ r(\"div\", { className: x(\"relative w-fit\", o), children: i }),\n !a && /* @__PURE__ */ b(\n \"div\",\n {\n id: k,\n tabIndex: -1,\n className: x(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75\",\n T ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n o\n ),\n children: [\n !s && /* @__PURE__ */ r(\n \"button\",\n {\n type: \"button\",\n onClick: n,\n \"data-modal-close-button\": \"true\",\n className: \"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ r(Z, { size: 18 })\n }\n ),\n I(),\n i,\n j()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction de({\n type: e,\n message: l,\n cancelText: n,\n confirmText: t,\n onConfirm: i,\n onClose: a,\n destructive: o = !1,\n title: d,\n ...s\n}) {\n const u = E(() => e === \"confirm\" ? {\n confirm: t || \"Confirm\",\n cancel: n || \"Cancel\",\n defaultTitle: d || \"Confirm Action\"\n } : {\n confirm: t || \"OK\",\n cancel: null,\n defaultTitle: d || \"Alert\"\n }, [e, t, d, n]), m = E(\n () => [\n ...u.cancel ? [\n {\n label: u.cancel,\n variant: \"secondary\",\n onClick: a\n }\n ] : [],\n {\n label: u.confirm,\n variant: o ? \"destructive\" : \"primary\",\n onClick: () => {\n i == null || i(), a();\n }\n }\n ],\n [u, o, i, a]\n );\n return /* @__PURE__ */ r(\n re,\n {\n ...s,\n title: d || u.defaultTitle,\n onClose: a,\n actions: m,\n disableCloseOnOverlayClick: e === \"confirm\",\n hideCloseButton: e === \"confirm\",\n children: typeof l == \"string\" ? /* @__PURE__ */ r(\"p\", { className: \"text-sm\", children: l }) : l\n }\n );\n}\nconst le = c(null), ue = () => {\n const e = G(le);\n if (!e)\n throw new Error(\"Tabs components must be used within a Tabs component\");\n return e;\n}, z = {\n info: {\n className: \"bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100\",\n icon: /* @__PURE__ */ r(X, { size: 20 })\n },\n warning: {\n className: \"bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100\",\n icon: /* @__PURE__ */ r(V, { size: 20 })\n },\n error: {\n className: \"bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100\",\n icon: /* @__PURE__ */ r(J, { size: 20 })\n }\n};\nfunction ce({\n id: e,\n title: l,\n description: n,\n type: t = \"info\",\n action: i,\n duration: a = 5e3,\n onRemove: o,\n customTypes: d,\n customComponent: s\n}) {\n const [u, m] = v(!1), f = L(() => {\n m(!0), setTimeout(() => {\n o == null || o(e);\n }, 150);\n }, [e, o]);\n if (g(() => {\n if (a > 0) {\n const p = setTimeout(() => {\n f();\n }, a);\n return () => clearTimeout(p);\n }\n }, [a, e, o, f]), s)\n return /* @__PURE__ */ r(\n s,\n {\n id: e,\n title: l,\n description: n,\n type: t,\n action: i,\n duration: a,\n onRemove: o\n }\n );\n const h = (d == null ? void 0 : d[t]) || z[t] || z.info;\n return /* @__PURE__ */ b(\n \"div\",\n {\n role: t === \"error\" ? \"alert\" : \"status\",\n \"aria-live\": t === \"error\" ? void 0 : \"polite\",\n className: Y(\n \"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out\",\n i && \"pb-3\",\n h.className,\n u ? \"opacity-0 translate-x-full\" : \"opacity-100 translate-x-0\"\n ),\n children: [\n /* @__PURE__ */ r(\"div\", { className: \"flex-shrink-0 mr-3\", children: h.icon }),\n /* @__PURE__ */ b(\"div\", { className: \"flex-grow min-w-0\", children: [\n /* @__PURE__ */ r(\"div\", { className: \"font-medium text-sm leading-5\", children: l }),\n n && /* @__PURE__ */ r(\"div\", { className: \"mt-1 text-sm opacity-90 leading-5\", children: n }),\n i && /* @__PURE__ */ r(\"div\", { className: \"mt-1.5\", children: /* @__PURE__ */ r(\n \"button\",\n {\n onClick: i.onClick,\n className: \"text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer\",\n children: i.label\n }\n ) })\n ] }),\n /* @__PURE__ */ r(\n \"button\",\n {\n onClick: f,\n className: \"flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0\",\n children: /* @__PURE__ */ r(D, { size: 16 })\n }\n )\n ]\n }\n );\n}\nexport {\n de as A,\n ce as T,\n le as a,\n N as n,\n ue as u\n};\n//# sourceMappingURL=Toast-CS2X7KvK.js.map\n","import { jsxs as k, jsx as c, Fragment as ne } from \"react/jsx-runtime\";\nimport F, { useId as P, useState as A, createElement as Te, useEffect as $, useRef as B, useCallback as C, useMemo as J, isValidElement as De, cloneElement as Re } from \"react\";\nimport { join as w } from \"./utils.esm.js\";\nimport { d as Ae, e as Ie, f as Ce, C as $e, a as Se, g as Le, E as Ve, Q as We, b as Be, c as He } from \"./QuestionMarkCircled-CY81euqP.js\";\nimport { n as V, a as je, u as he } from \"./Toast-CS2X7KvK.js\";\nimport { A as nr, T as ar } from \"./Toast-CS2X7KvK.js\";\nimport { E as Ge, X as ve } from \"./X-CIoyLewf.js\";\nimport { createPortal as pe } from \"react-dom\";\nfunction fe({\n id: r,\n title: o,\n content: t,\n children: n,\n className: e = \"\",\n disabled: a = !1,\n isOpen: s = !1,\n onToggle: i,\n triggerClassName: d = \"\",\n bodyClassName: f = \"\"\n}) {\n const m = P(), l = r || `accordion-item-${m}`, b = `${l}-header`, u = `${l}-panel`, h = () => {\n !a && i && i();\n }, v = (p) => {\n (p.key === \"Enter\" || p.key === \" \") && (p.preventDefault(), h());\n };\n return /* @__PURE__ */ k(\"div\", { className: w(\"border-b border-gray-200\", a && \"opacity-60 cursor-not-allowed\", e), children: [\n /* @__PURE__ */ k(\n \"button\",\n {\n id: b,\n type: \"button\",\n className: w(\n \"w-full text-left py-3 px-4 flex justify-between items-center focus:outline focus:outline-secondary\",\n a ? \"cursor-not-allowed\" : \"hover:bg-gray-50/10 cursor-pointer\",\n d\n ),\n \"aria-expanded\": s,\n \"aria-controls\": u,\n disabled: a,\n onClick: h,\n onKeyDown: v,\n children: [\n /* @__PURE__ */ c(\"span\", { children: o }),\n /* @__PURE__ */ c(\n \"span\",\n {\n className: w(\n \"transform transition-transform duration-300 ease-linear\",\n s ? \"rotate-180\" : \"rotate-0\"\n ),\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ c(Ae, { size: 18 })\n }\n )\n ]\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n id: u,\n role: \"region\",\n \"aria-labelledby\": b,\n className: w(\n \"transition-all duration-300 ease-linear px-4\",\n s ? \"max-h-96 opacity-100 overflow-auto py-3\" : \"max-h-0 opacity-0 overflow-hidden\",\n f\n ),\n children: s && (n || t)\n }\n )\n ] });\n}\nfunction Rt({\n id: r,\n items: o = [],\n children: t,\n className: n = \"\",\n itemClassName: e = \"\",\n allowMultiple: a = !1,\n defaultOpenItems: s = [],\n triggersClassName: i = \"\",\n bodiesClassName: d = \"\"\n}) {\n const f = P(), m = r || `accordion-group-${f}`, [l, b] = A(new Set(s)), u = (p) => {\n b((y) => {\n const g = new Set(y);\n return g.has(p) ? g.delete(p) : (a || g.clear(), g.add(p)), g;\n });\n }, h = (p) => `${f}-item-${p}`, v = (p) => l.has(p);\n return /* @__PURE__ */ k(\"div\", { id: m, className: n, children: [\n o.length > 0 && o.map((p, y) => {\n const g = p.id || h(y);\n return /* @__PURE__ */ c(\n fe,\n {\n id: g,\n title: p.title,\n content: p.content,\n disabled: p.disabled,\n isOpen: v(g),\n onToggle: () => u(g),\n className: e,\n triggerClassName: i,\n bodyClassName: d\n },\n g\n );\n }),\n o.length === 0 && t && F.Children.map(t, (p, y) => {\n if (F.isValidElement(p) && p.type === fe) {\n const g = p.props.id || h(y);\n return /* @__PURE__ */ Te(\n fe,\n {\n ...p.props,\n key: g,\n id: g,\n className: w(e, p.props.className),\n isOpen: v(g),\n onToggle: () => u(g),\n triggerClassName: w(i, p.props.triggerClassName),\n bodyClassName: w(d, p.props.bodyClassName)\n }\n );\n }\n return null;\n })\n ] });\n}\nfunction Me() {\n const [r, o] = A(0);\n return $(() => {\n const t = setInterval(() => {\n o((n) => (n + 1) % 3);\n }, 500);\n return () => clearInterval(t);\n }, []), /* @__PURE__ */ c(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((t) => /* @__PURE__ */ c(\n \"div\",\n {\n className: w(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n r === t && \"transform -translate-y-1\"\n )\n },\n t\n )) });\n}\nconst Fe = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary-foreground disabled:text-muted\",\n outline: \"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground\"\n}, Pe = {\n stripped: \"\",\n fitted: \"size-fit\",\n sm: \"px-2 py-1 text-sm\",\n md: \"px-4 py-2 text-base\",\n lg: \"px-6 py-3 text-lg\",\n icon: \"p-1 w-fit aspect-square\",\n full: \"p-2 w-full\"\n}, Ke = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, me = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction qe({\n variant: r = me.variant,\n size: o,\n rounded: t = me.rounded,\n loading: n,\n linkTo: e,\n linkProps: a,\n type: s = \"button\",\n className: i,\n ...d\n}) {\n let f;\n r === \"link\" && !o ? f = \"fitted\" : f = o || me.size;\n const l = w(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n Fe[r],\n Pe[f],\n Ke[t],\n n && \"relative pointer-events-none\",\n e && \"relative\",\n i\n );\n return /* @__PURE__ */ k(\n \"button\",\n {\n ...d,\n role: e ? \"link\" : d.role,\n \"aria-label\": d[\"aria-label\"] || (a == null ? void 0 : a[\"aria-label\"]),\n \"aria-description\": d[\"aria-description\"] || (a == null ? void 0 : a[\"aria-description\"]),\n \"aria-disabled\": d.disabled || n,\n \"aria-busy\": n,\n type: s,\n className: l,\n children: [\n n && /* @__PURE__ */ c(Me, {}),\n /* @__PURE__ */ c(\"span\", { className: w(n && \"invisible\"), children: d.children }),\n e && !d.disabled && /* @__PURE__ */ c(\n \"a\",\n {\n ...a,\n \"aria-hidden\": !0,\n href: e,\n rel: (a == null ? void 0 : a.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction Ue({\n totalItems: r,\n itemsToShow: o,\n infinite: t,\n autoScroll: n,\n scrollInterval: e,\n pauseScrollOnHover: a,\n currentIndex: s,\n onIndexChange: i\n}) {\n const [d, f] = A(s || 0), [m, l] = A(!1), b = B(null), u = Math.ceil(r / o), h = t || d > 0, v = t || d < u - 1, p = C(\n (x) => {\n const N = Math.max(0, Math.min(x, u - 1));\n f(N), i == null || i(N);\n },\n [u, i]\n ), y = C(() => {\n if (h) {\n const x = d === 0 && t ? u - 1 : d - 1;\n p(x);\n }\n }, [d, h, t, u, p]), g = C(() => {\n if (v) {\n const x = d === u - 1 && t ? 0 : d + 1;\n p(x);\n }\n }, [d, v, t, u, p]);\n return $(() => {\n s !== void 0 && s !== d && f(s);\n }, [s, d]), $(() => {\n if (!n) return;\n const x = () => {\n b.current = setInterval(() => {\n a && m || g();\n }, e);\n }, N = () => {\n b.current && (clearInterval(b.current), b.current = null);\n };\n return !m || !a ? x() : N(), N;\n }, [n, e, a, m, g]), $(() => {\n f(0);\n }, [o]), {\n currentSlide: d,\n canGoPrev: h,\n canGoNext: v,\n goToPrev: y,\n goToNext: g,\n goToSlide: p,\n isHovered: m,\n setIsHovered: l\n };\n}\nconst ee = {\n xs: 0,\n // Smaller than `sm`\n sm: 640,\n // Tailwind's `sm` breakpoint: `@media (min-width: 640px)`\n md: 768,\n // Tailwind's `md` breakpoint: `@media (min-width: 768px)`\n lg: 1024,\n // Tailwind's `lg` breakpoint: `@media (min-width: 1024px)`\n xl: 1280,\n // Tailwind's `xl` breakpoint: `@media (min-width: 1280px)`\n \"2xl\": 1536\n // Tailwind's `2xl` breakpoint: `@media (min-width: 1536px)`\n};\nfunction _e() {\n const [r, o] = A(), [t, n] = A(0), e = (a) => ee[a];\n return $(() => {\n const a = (i) => i >= ee[\"2xl\"] ? \"2xl\" : i >= ee.xl ? \"xl\" : i >= ee.lg ? \"lg\" : i >= ee.md ? \"md\" : i >= ee.sm ? \"sm\" : \"xs\";\n o(a(window.innerWidth)), n(window.innerWidth);\n const s = () => {\n o(a(window.innerWidth)), n(window.innerWidth);\n };\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, []), { screenSize: r, screenWidth: t, getBreakpoint: e };\n}\nconst ae = {\n sm: {\n button: \"h-6 w-6 text-xs\",\n icon: \"size-3\"\n },\n md: {\n button: \"h-8 w-8 text-sm\",\n icon: \"size-4\"\n },\n lg: {\n button: \"h-10 w-10 text-lg\",\n icon: \"size-5\"\n }\n}, ge = {\n default: \"bg-accent text-accent-foreground hover:bg-accent-foreground hover:text-accent\",\n outline: \"border border-border bg-background hover:bg-accent hover:text-accent-foreground hover:border-accent\",\n ghost: \"hover:text-accent\"\n}, oe = {\n aligned: {\n prev: \"absolute top-1/2 -translate-x-1/2 -translate-y-1/2 z-10\",\n next: \"absolute right-0 top-1/2 translate-x-1/2 -translate-y-1/2 z-10\"\n },\n exterior: {\n prev: \"absolute -left-10 top-1/2 -translate-y-1/2 z-10\",\n next: \"absolute -right-10 top-1/2 -translate-y-1/2 z-10\"\n },\n interior: {\n prev: \"absolute left-2 top-1/2 -translate-y-1/2 z-10\",\n next: \"absolute right-2 top-1/2 -translate-y-1/2 z-10\"\n }\n};\nfunction St({\n children: r,\n id: o,\n ref: t,\n className: n,\n autoScroll: e = !1,\n scrollInterval: a = 3e3,\n pauseScrollOnHover: s = !0,\n currentIndex: i,\n onIndexChange: d,\n hidePrevNext: f = !1,\n hideDots: m = !1,\n itemsToShow: l = 1,\n buttonSize: b = \"md\",\n buttonVariant: u = \"default\",\n buttonPosition: h = \"exterior\",\n infinite: v = !0,\n prevButton: p,\n nextButton: y,\n itemsClassName: g,\n containerClassName: x,\n dotsClassName: N,\n gap: E = 8\n}) {\n var W, te;\n const S = B(null), I = F.Children.toArray(r).filter(F.isValidElement), z = I.length, { screenSize: M } = _e(), L = J(() => {\n if (typeof l == \"number\")\n return l;\n if (typeof l == \"object\" && l && M) {\n const Z = [\"2xl\", \"xl\", \"lg\", \"md\", \"sm\", \"xs\"], G = Z.indexOf(M);\n for (let O = G; O < Z.length; O++) {\n const re = Z[O];\n if (l[re] !== void 0)\n return l[re];\n }\n }\n return 1;\n }, [l, M]), { currentSlide: U, canGoPrev: j, canGoNext: D, goToPrev: R, goToNext: H, goToSlide: K, setIsHovered: _ } = Ue({\n totalItems: z,\n itemsToShow: L,\n infinite: v,\n autoScroll: e,\n scrollInterval: a,\n pauseScrollOnHover: s,\n currentIndex: i,\n onIndexChange: d\n }), Q = C(\n (Z) => {\n if (L === 1)\n return { leftWidth: 0, rightWidth: 0, widthReduction: 0 };\n const G = E * (L - 1) / L;\n return Z % L === 0 ? { leftWidth: 0, rightWidth: E / 2, widthReduction: G } : Z % L === L - 1 ? { leftWidth: E / 2, rightWidth: 0, widthReduction: G } : { leftWidth: E / 2, rightWidth: E / 2, widthReduction: G };\n },\n [L, E]\n ), q = () => {\n R();\n }, Y = () => {\n H();\n }, ce = () => {\n s && _(!0);\n }, de = () => {\n s && _(!1);\n }, ue = -(U * (100 / z) * L), T = w(\n \"inline-flex items-center justify-center rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring focus-visible:ring-ring disabled:pointer-events-none\",\n h === \"aligned\" ? \"disabled:opacity-90\" : \"disabled:opacity-50\"\n );\n return /* @__PURE__ */ k(\"div\", { className: w(\"relative\", n), \"data-carousel-wrapper\": \"true\", children: [\n !f && /* @__PURE__ */ c(ne, { children: p ? F.cloneElement(\n p,\n {\n onClick: q,\n disabled: !j,\n className: w(\n ((W = p.props) == null ? void 0 : W.className) || \"\",\n oe[h].prev\n ),\n role: \"button\",\n \"aria-disabled\": !j,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\"\n }\n ) : /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: q,\n disabled: !j,\n className: w(\n T,\n ae[b].button,\n ge[u],\n oe[h].prev\n ),\n \"aria-disabled\": !j,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\",\n children: /* @__PURE__ */ c(Ie, { className: ae[b].icon })\n }\n ) }),\n /* @__PURE__ */ k(\n \"div\",\n {\n id: o,\n ref: t,\n className: w(\"relative overflow-hidden\", x),\n onMouseEnter: ce,\n onMouseLeave: de,\n \"data-carousel\": \"true\",\n \"data-current-index\": U,\n \"data-items-to-show\": L,\n \"data-auto-scroll\": e,\n \"data-button-position\": h,\n children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n ref: S,\n className: \"flex transition-transform duration-300 ease-in-out\",\n style: {\n transform: `translateX(${ue}%)`,\n width: `${z / L * 100}%`\n },\n children: I.map((Z, G) => {\n const { leftWidth: O, rightWidth: re, widthReduction: ze } = Q(G);\n return /* @__PURE__ */ c(\n \"div\",\n {\n className: w(\"flex-shrink-0\", g),\n style: {\n width: `calc(${100 / z}% - ${ze}px)`,\n marginRight: re > 0 ? `${re}px` : void 0,\n marginLeft: O > 0 ? `${O}px` : void 0\n },\n \"data-slide-index\": G,\n children: Z\n },\n G\n );\n })\n }\n ),\n !m && /* @__PURE__ */ c(\"div\", { className: \"absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2\", children: Array.from({ length: Math.ceil(z / L) }).map((Z, G) => /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: () => K(G),\n className: w(\n \"w-2 h-2 rounded-full transition-colors duration-200\",\n G === U ? \"bg-accent\" : \"bg-muted hover:bg-muted-foreground/50\",\n N\n ),\n \"aria-label\": `Go to slide ${G + 1}`,\n \"data-carousel-dot\": G\n },\n G\n )) })\n ]\n }\n ),\n !f && /* @__PURE__ */ c(ne, { children: y ? F.cloneElement(\n y,\n {\n onClick: Y,\n disabled: !D,\n className: w(\n ((te = y.props) == null ? void 0 : te.className) || \"\",\n oe[h].next\n ),\n role: \"button\",\n \"aria-disabled\": !D,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\"\n }\n ) : /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: Y,\n disabled: !D,\n className: w(\n T,\n ae[b].button,\n ge[u],\n oe[h].next\n ),\n \"aria-disabled\": !D,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\",\n children: /* @__PURE__ */ c(Ce, { className: ae[b].icon })\n }\n ) })\n ] });\n}\nfunction Xe(r) {\n const [o, t] = A(\"\"), n = C((e) => {\n let a = e, s = \"\";\n for (; a && !s; ) {\n const i = window.getComputedStyle(a).backgroundColor;\n i && i !== \"transparent\" && i !== \"rgba(0, 0, 0, 0)\" && (s = i), a = a.parentElement;\n }\n return s || \"transparent\";\n }, []);\n return $(() => {\n const e = document.getElementById(r);\n if (e) {\n const a = n(e.parentElement);\n t(a);\n }\n }, [r, n]), o;\n}\nfunction Lt({\n ref: r,\n id: o,\n size: t = 20,\n color: n,\n filled: e = !1,\n rounded: a = !0,\n checked: s = !1,\n onCheckedChange: i,\n disabled: d,\n className: f = \"\",\n ...m\n}) {\n const l = P(), b = J(() => o || `checkbox-${l}`, [o, l]), u = Xe(b), [h, v] = A(s);\n $(() => {\n v(s);\n }, [s]);\n const p = () => {\n d || (v(!h), i == null || i(!h));\n }, y = (x) => {\n x.key === \" \" && (x.preventDefault(), p());\n }, g = w(\n \"flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2\",\n a && \"rounded\",\n d && \"opacity-40 cursor-not-allowed\",\n !d && \"cursor-pointer\",\n f\n );\n return /* @__PURE__ */ c(\n \"button\",\n {\n id: b,\n type: \"button\",\n ref: r,\n tabIndex: 0,\n role: \"checkbox\",\n onClick: p,\n \"aria-checked\": h,\n \"aria-disabled\": d,\n onKeyDownCapture: y,\n style: {\n width: t,\n height: t,\n color: n,\n backgroundColor: h && e ? \"currentcolor\" : \"transparent\"\n },\n className: g,\n ...m,\n children: h && /* @__PURE__ */ c($e, { size: t, color: e ? u : void 0 })\n }\n );\n}\nfunction Vt({\n children: r,\n className: o,\n linkTo: t,\n linkProps: n,\n onButtonClick: e,\n buttonProps: a,\n ...s\n}) {\n return t && e && console.warn('Clickable: Both \"linkTo\" and \"onButtonClick\" props are provided. Only \"linkTo\" will be used.'), /* @__PURE__ */ k(\"div\", { className: w(\"relative w-fit\", o), ...s, children: [\n r,\n t && /* @__PURE__ */ c(\n \"a\",\n {\n ...n,\n rel: (n == null ? void 0 : n.rel) || \"noreferrer\",\n href: t,\n className: w(\"absolute inset-0\", n == null ? void 0 : n.className)\n }\n ),\n !t && e && /* @__PURE__ */ c(\n \"button\",\n {\n ...a,\n type: \"button\",\n onClick: e,\n className: w(\"absolute inset-0 cursor-pointer\", a == null ? void 0 : a.className)\n }\n )\n ] });\n}\nfunction le({ elementId: r, type: o, message: t }) {\n return $(() => {\n const n = document.getElementById(r);\n if (n) {\n if (!t && o === \"error\") {\n n.removeAttribute(\"data-error\");\n return;\n }\n if (!t && o === \"success\") {\n n.removeAttribute(\"data-success\");\n return;\n }\n return n.setAttribute(\"aria-describedby\", `${r}-${o}-message`), n.setAttribute(\"aria-invalid\", o === \"error\" ? \"true\" : \"false\"), o === \"error\" && n.setAttribute(\"data-error\", \"true\"), o === \"success\" && n.setAttribute(\"data-success\", \"true\"), () => {\n n.removeAttribute(\"aria-describedby\"), n.removeAttribute(\"aria-invalid\"), n.removeAttribute(\"data-error\"), n.removeAttribute(\"data-success\");\n };\n }\n }, [r, o, t]), t ? /* @__PURE__ */ k(\n \"small\",\n {\n className: w(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start\",\n o === \"error\" && \"text-destructive\",\n o === \"success\" && \"text-success\"\n ),\n role: \"status\",\n children: [\n o === \"error\" ? /* @__PURE__ */ c(Ge, {}) : /* @__PURE__ */ c(Se, {}),\n /* @__PURE__ */ c(\"span\", { id: `${r}-${o}-message`, children: t })\n ]\n }\n ) : null;\n}\nconst Qe = {\n base: \"\",\n default: \"ring ring-transparent focus:ring-primary-foreground not-disabled:data-error:ring-destructive not-disabled:data-success:ring-success\",\n underline: \"border-b border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n outline: \"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\"\n}, Ze = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, xe = {\n variant: \"default\",\n rounded: \"none\"\n};\nfunction Wt({\n variant: r = xe.variant,\n rounded: o,\n displayOnlyMode: t = !1,\n errorMessage: n,\n successMessage: e,\n type: a = \"text\",\n className: s,\n ...i\n}) {\n const d = P(), [f, m] = A(!1);\n let l = o;\n r === \"outline\" && !o && (l = \"md\"), l = l || xe.rounded;\n const h = w(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n \"file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors\",\n !t && Qe[r],\n !t && Ze[l],\n a === \"password\" && \"pr-10\",\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n s\n );\n return /* @__PURE__ */ k(\"div\", { className: w(t && \"cursor-text\"), style: { height: i.height, width: i.width }, children: [\n /* @__PURE__ */ k(\"div\", { className: w(a === \"password\" && \"relative\"), children: [\n /* @__PURE__ */ c(\n \"input\",\n {\n ...i,\n id: d,\n type: a === \"password\" && f ? \"text\" : a,\n \"aria-disabled\": i.disabled,\n readOnly: t,\n \"aria-readonly\": t || i[\"aria-readonly\"],\n \"data-error\": n ? !0 : void 0,\n \"data-success\": e ? !0 : void 0,\n className: h\n }\n ),\n a === \"password\" && /* @__PURE__ */ c(\n \"button\",\n {\n onClick: () => m(!f),\n className: \"absolute inset-y-0 right-0 px-2 hover:cursor-pointer\",\n \"aria-label\": \"Toggle password visibility\",\n \"data-state\": f ? \"visible\" : \"hidden\",\n children: f ? /* @__PURE__ */ c(Le, { size: 20 }) : /* @__PURE__ */ c(Ve, { size: 20 })\n }\n )\n ] }),\n !t && /* @__PURE__ */ c(le, { elementId: d, type: \"error\", message: n }),\n !t && /* @__PURE__ */ c(le, { elementId: d, type: \"success\", message: e })\n ] });\n}\nfunction Bt({\n display: r = \"inline\",\n width: o = \"fit-content\",\n className: t = \"\",\n required: n,\n helpMessage: e,\n suffix: a,\n htmlFor: s,\n children: i,\n description: d,\n ...f\n}) {\n var v, p;\n const m = P(), l = (((v = e == null ? void 0 : e.trim()) == null ? void 0 : v.length) || 0) > 0, b = (((p = d == null ? void 0 : d.trim()) == null ? void 0 : p.length) || 0) > 0, u = l ? `${s ?? m}-help` : void 0, h = b ? `${s ?? m}-description` : void 0;\n return /* @__PURE__ */ k(\n \"div\",\n {\n style: { display: r === \"inline\" ? \"inline-block\" : \"block\", width: o },\n className: w(\"mb-0.5\", t),\n children: [\n /* @__PURE__ */ k(\"div\", { className: \"relative flex\", children: [\n /* @__PURE__ */ k(\"label\", { className: \"font-medium\", htmlFor: s, ...f, children: [\n i,\n n && /* @__PURE__ */ c(\"span\", { className: \"text-red-500 font-medium ml-1\", \"aria-label\": \"required\", children: \"*\" })\n ] }),\n l && /* @__PURE__ */ c(\n \"span\",\n {\n className: \"text-gray-500 ml-1 size-fit -translate-y-1/3\",\n \"aria-describedby\": u,\n \"aria-label\": \"Help information\",\n title: e,\n children: /* @__PURE__ */ c(We, {})\n }\n ),\n l && /* @__PURE__ */ c(\"div\", { id: u, className: \"sr-only\", children: e }),\n a && /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: a })\n ] }),\n b && /* @__PURE__ */ c(\"small\", { id: h, className: \"block opacity-80 mt-0.5\", role: \"note\", children: d })\n ]\n }\n );\n}\nfunction Je(r) {\n const [o, t] = A(!1), [n, e] = A(!1);\n return $(() => {\n r ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));\n }, [r]), { show: o, shouldRender: n };\n}\nfunction Ye(r, o) {\n $(() => {\n const t = (n) => {\n n.key === \"Escape\" && r && o();\n };\n return document.addEventListener(\"keydown\", t), r && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", t), document.body.style.overflow = \"auto\";\n };\n }, [r, o]);\n}\nfunction Oe(r, o) {\n const t = B(null), n = C(() => {\n const e = document.getElementById(r);\n if (!e) return;\n const a = e.querySelectorAll('[data-modal-action=\"true\"]');\n if (a.length > 0) {\n a[0].focus();\n return;\n }\n const s = e.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const i = Array.from(s).filter((d) => !(d instanceof HTMLButtonElement && d.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (i.length > 0) {\n i[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [r]);\n $(() => (o && (t.current = document.activeElement, n()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [o, n]);\n}\nfunction Ht({\n id: r,\n isOpen: o,\n onClose: t,\n title: n,\n children: e,\n contentOnly: a = !1,\n className: s,\n overlayClassName: i,\n hideCloseButton: d = !1,\n actions: f = [],\n disableCloseOnOverlayClick: m = !1,\n ariaLabelledBy: l,\n ariaDescribedBy: b\n}) {\n const u = P(), h = r || `modal-${u}`, v = r ? `${r}-title` : `modal-title-${u}`, { show: p, shouldRender: y } = Je(o);\n if (Oe(h, y), Ye(y, t), !y) return null;\n const g = () => n ? F.isValidElement(n) ? /* @__PURE__ */ c(\"div\", { className: \"mb-4\", children: n }) : /* @__PURE__ */ c(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: v, children: n }) : null, x = () => f.length === 0 ? null : /* @__PURE__ */ c(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: f.map((N, E) => {\n const { label: S, className: I, ...z } = N;\n return /* @__PURE__ */ c(qe, { className: I, type: \"button\", ...z, \"data-modal-action\": \"true\", children: S }, E);\n }) });\n return /* @__PURE__ */ c(ne, { children: pe(\n /* @__PURE__ */ c(\n \"div\",\n {\n \"aria-labelledby\": l ?? n ? v : void 0,\n \"aria-describedby\": b,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ k(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\"fixed inset-0 bg-black/20 transition-all\", i),\n onClick: () => {\n m || t();\n }\n }\n ),\n a && /* @__PURE__ */ c(\"div\", { className: V(\"relative w-fit\", s), children: e }),\n !a && /* @__PURE__ */ k(\n \"div\",\n {\n id: h,\n tabIndex: -1,\n className: V(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75\",\n p ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !d && /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: t,\n \"data-modal-close-button\": \"true\",\n className: \"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ c(ve, { size: 18 })\n }\n ),\n g(),\n e,\n x()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nconst et = {\n link: \"text-primary hover:text-primary-foreground hover:bg-primary/10 aria-current:text-primary-foreground aria-current:bg-primary\",\n outline: \"border border-primary text-primary hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground aria-current:border-primary\",\n filled: \"bg-secondary text-secondary-foreground hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground\"\n}, tt = {\n sm: \"px-2 py-1 text-sm min-w-[32px] min-h-8\",\n md: \"px-2 py-1 text-base min-w-[40px] min-h-10\"\n};\nfunction jt({\n page: r,\n pageCount: o = 5,\n maxVisiblePages: t = 5,\n showFirstLast: n = !0,\n onPageChange: e,\n size: a = \"md\",\n variant: s = \"link\",\n className: i,\n ref: d,\n buttonsClassName: f,\n ...m\n}) {\n const l = o === 1 / 0, u = C(() => {\n if (l) return [];\n const N = o, E = Math.min(t, N);\n if (N <= E)\n return Array.from({ length: N }, (M, L) => L + 1);\n const S = Math.floor(E / 2);\n let I = Math.max(1, r - S), z = Math.min(N, I + E - 1);\n return z - I + 1 < E && (I = Math.max(1, z - E + 1), z = Math.min(N, I + E - 1)), Array.from({ length: z - I + 1 }, (M, L) => I + L);\n }, [l, t, r, o])(), h = r > 1, v = l || r < o, p = n && !l, y = n && !l, g = (N) => {\n N >= 1 && (l || N <= o) && e(N);\n }, x = C(() => {\n const N = V(\n \"flex items-center justify-center min-w-fit\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n tt[a],\n \"rounded-md\"\n );\n return V(N, et[s], f);\n }, [s, a, f]);\n return /* @__PURE__ */ k(\n \"nav\",\n {\n ref: d,\n className: V(\"flex items-center justify-center gap-1\", i),\n role: \"navigation\",\n \"aria-label\": \"Pagination\",\n \"data-page\": r,\n \"data-page-count\": l ? \"infinite\" : o,\n ...m,\n children: [\n p && /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(1),\n className: x(),\n disabled: r === 1,\n \"aria-label\": \"Go to first page\",\n children: [\n /* @__PURE__ */ c(Be, { size: a === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: \"First\" })\n ]\n }\n ),\n /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(r - 1),\n className: x(),\n disabled: !h,\n \"aria-label\": \"Go to previous page\",\n children: [\n /* @__PURE__ */ c(Ie, { size: a === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: \"Previous\" })\n ]\n }\n ),\n !l && u.map((N) => /* @__PURE__ */ c(\n \"button\",\n {\n onClick: () => g(N),\n className: V(x(), \"aspect-square\"),\n \"aria-label\": `Go to page ${N}`,\n \"aria-current\": N === r ? !0 : void 0,\n children: N\n },\n N\n )),\n /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(r + 1),\n className: x(),\n disabled: !v,\n \"aria-label\": \"Go to next page\",\n children: [\n /* @__PURE__ */ c(\"span\", { className: \"mr-1\", children: \"Next\" }),\n /* @__PURE__ */ c(Ce, { size: a === \"sm\" ? 12 : 15 })\n ]\n }\n ),\n y && /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(o),\n className: x(),\n disabled: r === o,\n \"aria-label\": \"Go to last page\",\n children: [\n /* @__PURE__ */ c(\"span\", { className: \"mr-1\", children: \"Last\" }),\n /* @__PURE__ */ c(He, { size: a === \"sm\" ? 12 : 15 })\n ]\n }\n )\n ]\n }\n );\n}\nfunction rt(r) {\n const [o, t] = A(!1), [n, e] = A(!1);\n return $(() => {\n r ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 300));\n }, [r]), { show: o, shouldRender: n };\n}\nfunction nt(r, o) {\n $(() => {\n const t = (n) => {\n n.key === \"Escape\" && r && o();\n };\n return document.addEventListener(\"keydown\", t), r && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", t), document.body.style.overflow = \"auto\";\n };\n }, [r, o]);\n}\nfunction at(r, o) {\n const t = B(null), n = C(() => {\n const e = document.getElementById(r);\n if (!e) return;\n const a = e.querySelectorAll('[data-panel-action=\"true\"]');\n if (a.length > 0) {\n a[0].focus();\n return;\n }\n const s = e.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const i = Array.from(s).filter((d) => !(d instanceof HTMLButtonElement && d.getAttribute(\"data-panel-close-button\") === \"true\"));\n if (i.length > 0) {\n i[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [r]);\n $(() => (o && (t.current = document.activeElement, n()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [o, n]);\n}\nconst ot = {\n size: {\n sm: \"max-w-sm\",\n md: \"max-w-md\",\n lg: \"max-w-lg\",\n xl: \"max-w-xl\",\n \"2xl\": \"max-w-2xl\",\n full: \"w-full\",\n screen: \"w-screen\"\n }\n};\nfunction Gt({\n ref: r,\n id: o,\n isOpen: t,\n onClose: n,\n title: e,\n children: a,\n footer: s,\n size: i = \"md\",\n className: d,\n overlayClassName: f,\n hideCloseButton: m = !1,\n disableCloseOnOverlayClick: l = !1,\n ariaLabelledBy: b,\n ariaDescribedBy: u\n}) {\n const h = P(), v = o || `panel-${h}`, p = o ? `${o}-title` : `panel-title-${h}`, { show: y, shouldRender: g } = rt(t);\n if (at(v, g), nt(g, n), !g) return null;\n const x = () => e ? F.isValidElement(e) ? /* @__PURE__ */ c(\"div\", { children: e }) : /* @__PURE__ */ c(\"h2\", { className: \"text-2xl font-semibold\", id: p, children: e }) : null, N = () => {\n if (!s) return null;\n if (F.isValidElement(s)) {\n const E = s, S = E.props.className || \"\";\n return F.cloneElement(E, { className: V(\"px-6 py-4\", S) });\n }\n return /* @__PURE__ */ c(\"div\", { className: \"px-6 py-4\", children: s });\n };\n return /* @__PURE__ */ c(ne, { children: pe(\n /* @__PURE__ */ k(\n \"div\",\n {\n \"aria-labelledby\": b ?? e ? p : void 0,\n \"aria-describedby\": u,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-hidden\",\n \"data-panel-open\": t,\n children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\n \"fixed inset-0 bg-black/40 transition-opacity duration-300\",\n y ? \"opacity-100\" : \"opacity-0\",\n f\n ),\n onClick: () => {\n l || n();\n }\n }\n ),\n /* @__PURE__ */ c(\"div\", { className: \"fixed inset-y-0 right-0 flex max-w-full\", children: /* @__PURE__ */ c(\n \"div\",\n {\n id: v,\n ref: r,\n tabIndex: -1,\n className: V(\n \"relative h-full transform shadow-xl bg-popover transition-transform duration-300 ease-in-out\",\n i !== \"screen\" && \"border-l border-border\",\n ot.size[i],\n y ? \"translate-x-0\" : \"translate-x-full\",\n d\n ),\n \"data-panel-size\": i,\n children: /* @__PURE__ */ k(\"div\", { className: \"flex h-full flex-col\", children: [\n e && /* @__PURE__ */ c(\"div\", { className: \"px-6 pt-6\", children: x() }),\n !m && /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: n,\n \"data-panel-close-button\": \"true\",\n \"aria-label\": \"Close panel\",\n className: \"rounded-md p-0.5 top-3 right-3 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ c(ve, { size: 18 })\n }\n ),\n /* @__PURE__ */ c(\"div\", { className: V(\"flex-1 overflow-y-auto px-6 pb-6\", e ? \"pt-6\" : \"pt-10\"), children: a }),\n N()\n ] })\n }\n ) })\n ]\n }\n ),\n document.body\n ) });\n}\nfunction st({ itemId: r, checked: o, onChange: t, name: n, disabled: e = !1, className: a = \"\" }) {\n const s = \"relative inline-flex items-center justify-center rounded-full\", i = () => {\n e || t();\n }, d = w(\n s,\n !o && \"hover:border-current/60\",\n !e && \"border-current cursor-pointer\",\n e && \"border-muted/60 cursor-not-allowed\",\n a\n );\n return /* @__PURE__ */ c(\n \"div\",\n {\n id: r,\n role: \"radio\",\n tabIndex: -1,\n \"aria-checked\": o,\n \"aria-disabled\": e,\n \"aria-description\": `Radio button for ${n}`,\n \"aria-labelledby\": `${r}-label`,\n onClick: i,\n className: d,\n style: {\n width: \"1em\",\n height: \"1em\",\n padding: \"0.1em\",\n borderWidth: \"0.06em\"\n },\n children: o && /* @__PURE__ */ c(\n \"div\",\n {\n className: w(\"size-full aspect-square rounded-full\", e && \"bg-muted/60\", !e && \"bg-current\")\n }\n )\n }\n );\n}\nfunction be({\n value: r,\n children: o,\n className: t = \"\",\n isSelected: n = !1,\n onChange: e,\n disabled: a = !1,\n hideInput: s = !1,\n description: i,\n name: d\n}) {\n const m = `radio-${P()}-${r}`, l = () => {\n a || e == null || e(r);\n };\n return /* @__PURE__ */ k(\n \"div\",\n {\n title: i,\n className: w(\n \"relative flex items-center\",\n t,\n // Uses text color for borders\n s && `p-2 border-2 focus-within:border-dashed focus-within:${a ? \"border-current/50\" : \"border-current/80\"}`,\n s && !n && `border-transparent ${a ? \"\" : \"not-focus-within:hover:border-border/60\"}`,\n s && n && \"border-border\",\n a && \"opacity-60 cursor-not-allowed\"\n ),\n style: {\n gap: \"0.5em\"\n },\n children: [\n !s && /* @__PURE__ */ c(\n st,\n {\n itemId: m,\n name: d || \"\",\n checked: n,\n onChange: l,\n disabled: a,\n className: w(s && \"\")\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n id: s ? m : void 0,\n tabIndex: s ? -1 : void 0,\n role: s ? \"radio\" : void 0,\n onClick: s ? l : void 0,\n \"aria-checked\": s ? n ? \"true\" : \"false\" : void 0,\n \"aria-disabled\": s ? a : void 0,\n \"aria-description\": s ? i || `Radio button for ${d}` : void 0,\n \"aria-labelledby\": s ? `${m}-label` : void 0,\n className: w(s && \"size-full\", typeof o == \"object\" && \"grow focus:outline-none\"),\n children: /* @__PURE__ */ c(\n \"label\",\n {\n id: `${m}-label`,\n onClick: s ? void 0 : l,\n className: w(a && \"cursor-not-allowed\", !a && \"cursor-pointer\"),\n children: o\n }\n )\n }\n )\n ]\n }\n );\n}\nfunction it(r, o) {\n const [t, n] = A(o), [e, a] = A(-1), [s, i] = A(!1), d = C((u, h) => {\n var y;\n const v = u[h];\n v.hasAttribute(\"disabled\") || v.getAttribute(\"aria-disabled\") === \"true\" || ((y = u[h]) == null || y.click(), a(h));\n }, []), f = C(\n (u, h) => {\n var p;\n if (u.preventDefault(), s || !h.length) return;\n const v = o !== -1 ? o : 0;\n (p = h[v]) == null || p.focus(), n(v), o !== -1 && d(h, v);\n },\n [o, s, d]\n ), m = C(\n (u) => {\n var y;\n if (!u.shiftKey)\n return;\n u.preventDefault();\n const h = Array.from(\n document.querySelectorAll(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])'\n )\n ).filter((g) => !g.hasAttribute(\"disabled\") && g.tabIndex >= 0), v = h.findIndex((g) => g.id === r), p = v > 0 ? v - 1 : h.length - 1;\n (y = h[p]) == null || y.focus();\n },\n [r]\n ), l = C(\n (u, h) => {\n var x;\n if (!h.length) return;\n const v = u.target;\n if (!h.some((N) => N.id === v.id)) return;\n const y = t !== -1 ? t : 0;\n let g = y;\n switch (u.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n u.preventDefault(), g = y > 0 ? y - 1 : h.length - 1;\n break;\n case \"ArrowDown\":\n case \"ArrowRight\":\n u.preventDefault(), g = (y + 1) % h.length;\n break;\n // Select the option when the space key is pressed\n case \" \":\n u.preventDefault(), d(h, y);\n return;\n case \"Tab\":\n m(u);\n return;\n default:\n return;\n }\n (x = h[g]) == null || x.focus(), n(g), e !== -1 && d(h, g);\n },\n [t, e, m, d]\n ), b = C(() => {\n const u = document.querySelector(`[id=\"${r}\"][role=\"radiogroup\"]`);\n return u ? Array.from(u.querySelectorAll('[role=\"radio\"]')) : [];\n }, [r]);\n $(() => {\n const u = document.querySelector(`[id=\"${r}\"][role=\"radiogroup\"]`);\n if (!u) return;\n const h = b(), v = (x) => f(x, h), p = (x) => l(x, h), y = () => i(!0), g = () => i(!1);\n return document.addEventListener(\"keydown\", p), u.addEventListener(\"focus\", v), u.addEventListener(\"mousedown\", y), document.addEventListener(\"mouseup\", g), () => {\n document.removeEventListener(\"keydown\", p), u.removeEventListener(\"focus\", v), u.removeEventListener(\"mousedown\", y), document.removeEventListener(\"mouseup\", g);\n };\n }, [r, b, f, l]);\n}\nfunction Mt({\n options: r = [],\n value: o,\n onChange: t,\n id: n,\n children: e,\n className: a = \"\",\n childrenClassName: s = \"\",\n hideInputs: i = !1\n}) {\n const d = P(), f = n || `radio-group-${d}`;\n it(\n f,\n r.findIndex((l) => l === o)\n );\n const m = J(() => r.reduce((l, b) => (typeof b == \"string\" ? l.some((u) => u.value === b) || l.push({ label: b, value: b }) : l.push(b), l), []), [r]);\n return /* @__PURE__ */ k(\"div\", { id: f, role: \"radiogroup\", tabIndex: 0, className: w(a, \"focus:outline-none\"), children: [\n m.length > 0 && m.map((l, b) => /* @__PURE__ */ c(\n be,\n {\n value: l.value,\n isSelected: o === l.value,\n onChange: t,\n name: f,\n disabled: l.disabled,\n description: l.description,\n hideInput: i,\n className: s,\n children: l.label\n },\n `${l.value}-${b}`\n )),\n m.length === 0 && e && F.Children.map(e, (l) => F.isValidElement(l) && l.type === be ? /* @__PURE__ */ c(\n be,\n {\n ...l.props,\n className: w(s, l.props.className),\n hideInput: l.props.hideInput || i,\n isSelected: o === l.props.value,\n onChange: t,\n name: f,\n children: l.props.children\n }\n ) : null)\n ] });\n}\nfunction lt(r) {\n const o = B(null), t = B(null), n = B(null), [e, a] = A(!1), [s, i] = A(!1), [d, f] = A({\n vertical: !1,\n horizontal: !1\n }), m = B(null), l = B(null), b = C(() => {\n const v = o.current;\n if (!v) return;\n const p = v.scrollHeight > v.clientHeight, y = v.scrollWidth > v.clientWidth;\n f({\n vertical: p,\n horizontal: y\n });\n }, []), u = C(() => {\n const v = o.current, p = t.current, y = n.current;\n if (v) {\n if (p && d.vertical) {\n const x = (d.horizontal ? v.clientHeight - r : v.clientHeight) / v.scrollHeight, N = Math.max(x * 100, 10), E = v.scrollHeight - v.clientHeight, S = E > 0 ? v.scrollTop / E : 0, I = 100 - N, z = S * I;\n p.style.height = `${N}%`, p.style.top = `${z}%`, p.style.transform = \"none\";\n }\n if (y && d.horizontal) {\n const x = (d.vertical ? v.clientWidth - r : v.clientWidth) / v.scrollWidth, N = Math.max(x * 100, 10), E = v.scrollWidth - v.clientWidth, S = E > 0 ? v.scrollLeft / E : 0, I = 100 - N, z = S * I;\n y.style.width = `${N}%`, y.style.left = `${z}%`, y.style.transform = \"none\";\n }\n }\n }, [d, r]), h = C(() => {\n m.current && clearTimeout(m.current), l.current && clearTimeout(l.current), a(!0), i(!1), u(), m.current = setTimeout(() => {\n i(!0), l.current = setTimeout(() => {\n a(!1), i(!1);\n }, 300);\n }, 1e3);\n }, [u]);\n return $(() => {\n const v = o.current;\n if (!v) return;\n b();\n const p = new ResizeObserver(b);\n p.observe(v);\n const y = new MutationObserver(b);\n return y.observe(v, {\n childList: !0,\n subtree: !0,\n attributes: !0\n }), () => {\n p.disconnect(), y.disconnect();\n };\n }, [b]), $(() => {\n u();\n }, [d, u]), $(() => () => {\n m.current && clearTimeout(m.current), l.current && clearTimeout(l.current);\n }, []), {\n viewportRef: o,\n verticalThumbRef: t,\n horizontalThumbRef: n,\n isScrolling: e,\n isFadingOut: s,\n scrollbarVisible: d,\n handleScroll: h\n };\n}\nfunction Ft({\n className: r,\n thumbClassName: o,\n viewportClassName: t,\n scrollbarClassName: n,\n scrollbarThickness: e = 10,\n children: a,\n id: s,\n ref: i,\n ...d\n}) {\n const { viewportRef: f, verticalThumbRef: m, horizontalThumbRef: l, isScrolling: b, isFadingOut: u, scrollbarVisible: h, handleScroll: v } = lt(e), p = V(\n \"relative flex-1 rounded-full bg-slate-400/60 hover:bg-slate-400/80 active:bg-slate-400\",\n o\n );\n return /* @__PURE__ */ k(\"div\", { ref: i, id: s, className: V(\"relative overflow-hidden\", r), \"data-scroll-area-root\": \"\", ...d, children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n ref: f,\n className: V(\n \"h-full w-full overflow-auto rounded-[inherit] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\",\n t\n ),\n onScroll: v,\n \"data-scroll-area-viewport\": \"\",\n children: a\n }\n ),\n h.vertical && (b || u) && /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\n \"touch-none select-none transition-all duration-300\",\n \"p-[1px]\",\n \"absolute right-0 top-0\",\n u ? \"opacity-0\" : \"opacity-100\",\n n\n ),\n \"data-scroll-area-scrollbar\": \"vertical\",\n \"data-state\": b ? \"visible\" : \"hidden\",\n style: {\n width: `${e}px`,\n height: h.horizontal ? `calc(100% - ${e}px)` : \"100%\"\n },\n children: /* @__PURE__ */ c(\n \"div\",\n {\n ref: m,\n className: V(\"absolute rounded-full\", p),\n \"data-scroll-area-thumb\": \"\",\n style: { height: \"20%\", top: \"0%\", width: \"100%\" }\n }\n )\n }\n ),\n h.horizontal && (b || u) && /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\n \"touch-none select-none transition-all duration-300\",\n \"p-[1px]\",\n \"absolute bottom-0 left-0\",\n u ? \"opacity-0\" : \"opacity-100\",\n n\n ),\n \"data-scroll-area-scrollbar\": \"horizontal\",\n \"data-state\": b ? \"visible\" : \"hidden\",\n style: {\n height: `${e}px`,\n width: h.vertical ? `calc(100% - ${e}px)` : \"100%\"\n },\n children: /* @__PURE__ */ c(\n \"div\",\n {\n ref: l,\n className: V(\"absolute rounded-full\", p),\n \"data-scroll-area-thumb\": \"\",\n style: { width: \"20%\", left: \"0%\", height: \"100%\" }\n }\n )\n }\n ),\n h.vertical && h.horizontal && /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\"bg-transparent\", \"absolute bottom-0 right-0\"),\n \"data-scroll-area-corner\": \"\",\n style: {\n height: `${e}px`,\n width: `${e}px`\n }\n }\n )\n ] });\n}\nfunction ct(r) {\n const [o, t] = A(!1), [n, e] = A(!1);\n return $(() => {\n r ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));\n }, [r]), { show: o, shouldRender: n };\n}\nfunction dt({\n isOpen: r,\n setIsOpen: o,\n filteredOptions: t,\n highlightedIndex: n,\n setHighlightedIndex: e,\n onSelect: a,\n triggerRef: s\n}) {\n return { handleKeyDown: C(\n (d) => {\n var f;\n switch (d.key) {\n case \"ArrowDown\":\n if (d.preventDefault(), !r)\n o(!0);\n else {\n const m = n < t.length - 1 ? n + 1 : 0;\n let l = m;\n for (let b = 0; b < t.length; b++) {\n const u = (m + b) % t.length;\n if (!t[u].disabled) {\n l = u;\n break;\n }\n }\n e(l);\n }\n break;\n case \"ArrowUp\":\n if (d.preventDefault(), !r)\n o(!0);\n else {\n const m = n > 0 ? n - 1 : t.length - 1;\n let l = m;\n for (let b = 0; b < t.length; b++) {\n const u = (m - b + t.length) % t.length;\n if (!t[u].disabled) {\n l = u;\n break;\n }\n }\n e(l);\n }\n break;\n case \"Enter\":\n case \" \":\n if (d.preventDefault(), !r)\n o(!0);\n else if (n >= 0 && n < t.length) {\n const m = t[n];\n m.disabled || a(m);\n }\n break;\n case \"Escape\":\n d.preventDefault(), r && (o(!1), (f = s.current) == null || f.focus());\n break;\n case \"Tab\":\n r && o(!1);\n break;\n }\n },\n [r, o, t, n, e, a, s]\n ) };\n}\nfunction ut({\n isOpen: r,\n filteredOptions: o,\n selectedOption: t,\n shouldRender: n,\n optionsContainerRef: e\n}) {\n const [a, s] = A(-1), i = J(() => t ? o.findIndex((d) => d.value === t.value) : -1, [o, t]);\n return $(() => {\n r && o.length > 0 ? s(t && i >= 0 ? i : 0) : s(-1);\n }, [o, r, t, i]), $(() => {\n if (a >= 0 && e.current && n) {\n const d = () => {\n const f = e.current, m = f == null ? void 0 : f.querySelector(`[data-option-index=\"${a}\"]`);\n if (m) {\n const l = r && t && a === i ? \"auto\" : \"smooth\";\n m.scrollIntoView({\n behavior: l,\n block: \"nearest\"\n });\n }\n };\n r && n && t ? setTimeout(d, 10) : d();\n }\n }, [a, n, r, t, o, e, i]), { highlightedIndex: a, setHighlightedIndex: s };\n}\nconst ye = {\n sm: {\n trigger: \"px-2 py-1 text-sm\",\n options: \"px-2 py-2 text-xs\"\n },\n md: {\n trigger: \"px-3 py-2 text-base\",\n options: \"px-3 py-2.5 text-sm\"\n },\n lg: {\n trigger: \"px-4 py-3 text-lg\",\n options: \"px-4 py-3 text-base\"\n }\n};\nfunction Pt({\n options: r,\n value: o,\n placeholder: t = \"Select an option...\",\n searchable: n = !1,\n disabled: e = !1,\n clearable: a = !1,\n size: s = \"md\",\n className: i,\n triggerClassName: d,\n dropdownClassName: f,\n id: m,\n ref: l,\n onChange: b,\n onSearch: u,\n searchPlaceholder: h = \"Search options...\"\n}) {\n const v = P(), y = `${m ?? v}-listbox`, g = (T) => `${y}-option-${T}`, [x, N] = A(!1), [E, S] = A(\"\"), I = B(null), z = B(null), M = B(null), L = B(null), { show: U, shouldRender: j } = ct(x), D = J(() => !n || !E ? r : r.filter(\n (T) => {\n var W;\n return T.text.toLowerCase().includes(E.toLowerCase()) || ((W = T.description) == null ? void 0 : W.toLowerCase().includes(E.toLowerCase()));\n }\n ), [r, n, E]), R = J(() => r.find((T) => T.value === o), [r, o]), { highlightedIndex: H, setHighlightedIndex: K } = ut({\n isOpen: x,\n filteredOptions: D,\n selectedOption: R,\n shouldRender: j,\n optionsContainerRef: L\n }), _ = H >= 0 ? g(H) : void 0;\n $(() => {\n x && j && n && z.current && z.current.focus();\n }, [x, n, j]);\n const Q = C(\n (T) => {\n var W;\n T.disabled || (b == null || b(T.value), N(!1), S(\"\"), (W = I.current) == null || W.focus());\n },\n [b]\n ), { handleKeyDown: q } = dt({\n isOpen: x,\n setIsOpen: N,\n filteredOptions: D,\n highlightedIndex: H,\n setHighlightedIndex: K,\n onSelect: Q,\n triggerRef: I\n });\n $(() => {\n if (!x)\n return;\n const T = (W) => {\n var te;\n M.current && !M.current.contains(W.target) && !((te = I.current) != null && te.contains(W.target)) && (N(!1), S(\"\"));\n };\n return document.addEventListener(\"mousedown\", T), () => document.removeEventListener(\"mousedown\", T);\n }, [x]);\n const Y = () => {\n e || (N(!x), x || (S(\"\"), K(-1)));\n }, ce = (T) => {\n T.disabled || (b == null || b(T.value), N(!1), S(\"\"));\n }, de = (T) => {\n const W = T.target.value;\n S(W), u == null || u(W), K(-1);\n }, ue = (T) => {\n T.preventDefault(), T.stopPropagation(), b == null || b(\"\");\n };\n return /* @__PURE__ */ k(\n \"div\",\n {\n className: w(\"relative\", i),\n id: m,\n ref: l,\n \"data-select\": \"true\",\n \"data-value\": o,\n \"data-searchable\": n,\n \"data-disabled\": e,\n \"data-clearable\": a,\n children: [\n /* @__PURE__ */ k(\n \"button\",\n {\n ref: I,\n type: \"button\",\n className: w(\n \"flex items-center justify-between w-full text-left bg-inherit border border-border rounded-md transition-colors\",\n \"hover:border-primary focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary\",\n e && \"opacity-50 cursor-not-allowed hover:border-border\",\n x && \"border-primary ring-1 ring-primary\",\n ye[s].trigger,\n d\n ),\n onClick: Y,\n onKeyDown: q,\n disabled: e,\n \"aria-disabled\": e,\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": x,\n \"aria-controls\": x ? y : void 0,\n \"aria-activedescendant\": x && !n ? _ : void 0,\n \"aria-label\": R ? R.text : t,\n \"data-select-trigger\": \"true\",\n children: [\n /* @__PURE__ */ c(\"span\", { className: w(\"block truncate\", !R && \"opacity-70\"), children: R ? R.text : t }),\n /* @__PURE__ */ k(\"div\", { className: \"flex items-center ml-2\", children: [\n a && R && /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: ue,\n className: \"p-0.5 rounded hover:bg-accent/20 transition-colors mr-1 group\",\n \"aria-label\": \"Clear selection\",\n \"data-select-clear\": \"true\",\n children: /* @__PURE__ */ c(ve, { size: 14, className: \"opacity-70 group-hover:opacity-100 transition-opacity\" })\n }\n ),\n /* @__PURE__ */ c(Ae, { size: 16, className: w(\"transition-transform duration-200\", x && \"rotate-180\") })\n ] })\n ]\n }\n ),\n j && /* @__PURE__ */ k(\n \"div\",\n {\n ref: M,\n className: w(\n \"absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg transition-all duration-150\",\n U ? \"opacity-100 translate-y-0\" : \"opacity-0 -translate-y-2\",\n f\n ),\n id: y,\n role: \"listbox\",\n \"data-select-content\": \"true\",\n children: [\n n && /* @__PURE__ */ c(\"div\", { className: \"border-b border-border\", children: /* @__PURE__ */ c(\n \"input\",\n {\n ref: z,\n type: \"text\",\n value: E,\n onChange: de,\n onKeyDown: q,\n placeholder: h,\n className: \"w-full px-2 py-2 text-inherit focus:outline-none\",\n \"aria-autocomplete\": \"list\",\n \"aria-controls\": y,\n \"aria-activedescendant\": _,\n \"data-select-search\": \"true\"\n }\n ) }),\n /* @__PURE__ */ c(\"div\", { ref: L, className: \"max-h-60 overflow-auto\", children: D.length > 0 ? D.map((T, W) => /* @__PURE__ */ k(\n \"div\",\n {\n id: g(W),\n className: w(\n \"flex items-center cursor-pointer transition-colors\",\n \"hover:bg-accent/10 focus:bg-accent/10\",\n ye[s].options,\n T.disabled && \"opacity-50 cursor-not-allowed\",\n W === H && \"bg-accent/20\",\n o === T.value && \"bg-accent/30\"\n ),\n onClick: () => ce(T),\n role: \"option\",\n \"aria-selected\": o === T.value,\n \"aria-disabled\": T.disabled,\n \"data-select-option\": \"true\",\n \"data-value\": T.value,\n \"data-highlighted\": W === H,\n \"data-option-index\": W,\n children: [\n /* @__PURE__ */ k(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ c(\"div\", { className: \"font-medium\", children: T.text }),\n T.description && /* @__PURE__ */ c(\"div\", { className: \"text-xs opacity-70 mt-0.5\", children: T.description })\n ] }),\n o === T.value && /* @__PURE__ */ c($e, { size: 16, className: \"ml-2 text-primary flex-shrink-0\" })\n ]\n },\n T.value\n )) : /* @__PURE__ */ c(\"div\", { className: \"px-3 py-2 text-sm opacity-70 text-center\", children: n && E ? \"No results found\" : \"No options available\" }) })\n ]\n }\n )\n ]\n }\n );\n}\nconst ft = {\n thin: {\n horizontal: \"h-px\",\n vertical: \"w-px\"\n },\n medium: {\n horizontal: \"h-0.5\",\n vertical: \"w-0.5\"\n },\n thick: {\n horizontal: \"h-1\",\n vertical: \"w-1\"\n },\n \"extra-thick\": {\n horizontal: \"h-2\",\n vertical: \"w-2\"\n }\n}, mt = {\n horizontal: \"w-full\",\n vertical: \"min-h-4 h-full\"\n};\nfunction Kt({\n orientation: r = \"horizontal\",\n decorative: o = !1,\n thickness: t = \"thin\",\n className: n,\n ...e\n}) {\n const a = w(\n \"shrink-0 bg-border\",\n mt[r],\n ft[t][r],\n n\n );\n return /* @__PURE__ */ c(\n \"div\",\n {\n ...e,\n className: a,\n role: o ? \"presentation\" : \"separator\",\n \"aria-orientation\": o ? void 0 : r,\n \"aria-hidden\": o,\n \"data-orientation\": r,\n \"data-thickness\": t\n }\n );\n}\nconst we = {\n shape: {\n rectangle: \"rounded-md min-h-1\",\n circle: \"rounded-full aspect-square min-h-1\",\n text: \"rounded-sm min-h-1 h-4\"\n },\n lineSpacing: {\n xs: \"space-y-1\",\n sm: \"space-y-2\",\n md: \"space-y-3\",\n lg: \"space-y-4\",\n xl: \"space-y-6\"\n }\n};\nfunction qt({\n shape: r = \"rectangle\",\n lineSpacing: o = \"sm\",\n className: t,\n lines: n = 1,\n animate: e = !0,\n ref: a,\n ...s\n}) {\n const i = w(\"bg-muted/70\", e && \"animate-pulse\", we.shape[r], t);\n return n > 1 ? /* @__PURE__ */ c(\n \"div\",\n {\n ref: a,\n className: we.lineSpacing[o],\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-container\",\n \"data-lines\": n,\n \"data-shape\": r,\n \"data-animate\": e,\n ...s,\n children: Array.from({ length: n }, (d, f) => /* @__PURE__ */ c(\n \"div\",\n {\n className: w(\n i,\n // Make last line shorter for a more natural text appearance\n f === n - 1 && \"w-3/4\"\n ),\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-line\",\n \"data-line-index\": f\n },\n f\n ))\n }\n ) : /* @__PURE__ */ c(\n \"div\",\n {\n ref: a,\n className: i,\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton\",\n \"data-shape\": r,\n \"data-animate\": e,\n ...s\n }\n );\n}\nfunction Ut({\n id: r,\n value: o,\n defaultValue: t = 0,\n onValueChange: n,\n min: e = 0,\n max: a = 100,\n step: s = 1,\n disabled: i = !1,\n trackClassName: d,\n rangeClassName: f,\n thumbClassName: m,\n className: l,\n ref: b,\n ariaLabel: u,\n ariaLabelledBy: h,\n ...v\n}) {\n const [p, y] = A(t), g = o !== void 0, x = g ? o : p, N = B(null), E = B(!1), S = B(0), I = C(\n (D) => {\n const R = Math.max(e, Math.min(a, D)), H = Math.round(R / s) * s;\n g || y(H), n == null || n(H);\n },\n [e, a, s, g, n]\n ), z = C(\n (D, R = !1) => {\n var Q;\n const H = (Q = N.current) == null ? void 0 : Q.getBoundingClientRect();\n if (!H) return x;\n let K = D.clientX;\n R && (K = K - S.current);\n const _ = Math.max(0, Math.min(1, (K - H.left) / H.width));\n return e + (a - e) * _;\n },\n [e, a, x]\n ), M = C(\n (D) => {\n if (i || D.target !== D.currentTarget) return;\n const R = z(D);\n I(R);\n },\n [i, z, I]\n ), L = C(\n (D) => {\n var Q;\n if (i) return;\n D.stopPropagation(), E.current = !0;\n const R = (Q = N.current) == null ? void 0 : Q.getBoundingClientRect(), H = D.currentTarget.getBoundingClientRect();\n if (R && H) {\n const q = H.left + H.width / 2;\n S.current = D.clientX - q;\n }\n D.currentTarget.setPointerCapture(D.pointerId);\n const K = (q) => {\n if (!E.current) return;\n const Y = z(q, !0);\n I(Y);\n }, _ = (q) => {\n if (q.pointerId === D.pointerId) {\n E.current = !1, S.current = 0;\n try {\n D.currentTarget.releasePointerCapture(q.pointerId);\n } catch {\n }\n document.removeEventListener(\"pointermove\", K), document.removeEventListener(\"pointerup\", _);\n }\n };\n document.addEventListener(\"pointermove\", K), document.addEventListener(\"pointerup\", _);\n },\n [i, z, I]\n ), U = C(\n (D) => {\n if (i) return;\n let R = x;\n switch (D.key) {\n case \"ArrowRight\":\n case \"ArrowUp\":\n R = x + s;\n break;\n case \"ArrowLeft\":\n case \"ArrowDown\":\n R = x - s;\n break;\n case \"Home\":\n R = e;\n break;\n case \"End\":\n R = a;\n break;\n case \"PageUp\":\n R = x + s * 10;\n break;\n case \"PageDown\":\n R = x - s * 10;\n break;\n default:\n return;\n }\n D.preventDefault(), I(R);\n },\n [i, x, s, e, a, I]\n ), j = a === e ? 0 : (x - e) / (a - e) * 100;\n return /* @__PURE__ */ c(\n \"div\",\n {\n id: r,\n ref: b,\n className: V(\n \"relative flex items-center w-full touch-none select-none\",\n i && \"opacity-50 cursor-not-allowed\",\n l\n ),\n \"data-disabled\": i,\n \"data-value\": x,\n \"data-min\": e,\n \"data-max\": a,\n \"data-step\": s,\n ...v,\n children: /* @__PURE__ */ k(\n \"div\",\n {\n ref: N,\n className: V(\n \"relative h-1.5 w-full rounded-full bg-muted cursor-pointer\",\n i && \"cursor-not-allowed\",\n d\n ),\n onPointerDown: M,\n children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\n \"absolute h-full rounded-full pointer-events-none\",\n // pointer-events are disabled so that user interactions are handled by the track element, enabling correct slider behavior\n !E.current && \"transition-all\",\n f\n ),\n style: { width: `${j}%` }\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n className: V(\n \"absolute size-5 -top-2 rounded-full shadow-md cursor-grab\",\n i && \"cursor-not-allowed\",\n !i && \"cursor-grab focus:outline-none focus:ring-2\",\n E.current ? \"cursor-grabbing scale-110\" : \"transition-all\",\n m\n ),\n style: { left: `calc(${j}% - 10px)` },\n tabIndex: i ? -1 : 0,\n role: \"slider\",\n \"aria-valuemin\": e,\n \"aria-valuemax\": a,\n \"aria-valuenow\": x,\n \"aria-label\": u,\n \"aria-labelledby\": h,\n \"aria-disabled\": i,\n onKeyDown: U,\n onPointerDown: L\n }\n )\n ]\n }\n )\n }\n );\n}\nfunction _t({ children: r, ref: o, ...t }) {\n if (De(r)) {\n let n = { ...t };\n return r.props && (n = { ...n, ...r.props }), Re(r, {\n ...n,\n ref: (e) => {\n typeof o == \"function\" ? o(e) : o && (o.current = e);\n }\n });\n }\n return Te(\"div\", { ...t, ref: o }, r);\n}\nconst bt = ({ defaultValue: r, value: o, onValueChange: t } = {}) => {\n const [n, e] = A(r || \"\"), a = o !== void 0, s = a ? o : n, i = C((d) => {\n a || e(d), t == null || t(d);\n }, [a, t]);\n return {\n value: s,\n onValueChange: i\n };\n};\nfunction Xt({\n defaultValue: r,\n value: o,\n onValueChange: t,\n tabsWidth: n = \"fit\",\n variant: e = \"underline\",\n className: a,\n children: s,\n ref: i,\n id: d,\n triggersClassName: f,\n contentClassName: m\n}) {\n const { value: l, onValueChange: b } = bt({\n defaultValue: r,\n value: o,\n onValueChange: t\n }), u = {\n selectedValue: l,\n onValueChange: b,\n tabsWidth: n,\n variant: e,\n triggersClassName: f,\n contentClassName: m\n };\n return /* @__PURE__ */ c(je.Provider, { value: u, children: /* @__PURE__ */ c(\"div\", { id: d, ref: i, className: a, \"data-tabs-width\": n, \"data-variant\": e, children: s }) });\n}\nfunction Qt({ value: r, className: o, children: t, ref: n }) {\n const { selectedValue: e, contentClassName: a } = he(), s = e === r;\n return s ? /* @__PURE__ */ c(\n \"div\",\n {\n ref: n,\n role: \"tabpanel\",\n id: `tabs-content-${r}`,\n \"aria-labelledby\": `tabs-trigger-${r}`,\n \"data-state\": s ? \"active\" : \"inactive\",\n \"data-value\": r,\n className: w(\"mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2\", a, o),\n tabIndex: 0,\n children: t\n }\n ) : null;\n}\nconst Ne = {\n width: {\n fit: \"w-fit\",\n full: \"w-full *:flex-1\"\n },\n variant: {\n underline: \"border-b border-border\",\n pills: \"\",\n bordered: \"border border-border rounded-lg p-1\"\n }\n}, ht = {\n underline: \"border-b-2 border-transparent data-[state=active]:border-accent data-[state=active]:text-accent hover:text-accent-foreground\",\n pills: \"rounded-md data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30\",\n bordered: \"rounded data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30\"\n};\nfunction Zt({ children: r, className: o, id: t, ref: n }) {\n const { tabsWidth: e, variant: a } = he();\n return /* @__PURE__ */ c(\n \"div\",\n {\n id: t,\n ref: n,\n role: \"tablist\",\n className: w(\"flex\", Ne.width[e], Ne.variant[a], o),\n \"data-tabs-width\": e,\n \"data-variant\": a,\n children: r\n }\n );\n}\nfunction Jt({ value: r, disabled: o = !1, className: t, children: n, onClick: e, id: a, ref: s }) {\n const { selectedValue: i, onValueChange: d, variant: f, triggersClassName: m } = he(), l = i === r, b = (h) => {\n o || d(r), e == null || e(h);\n };\n return /* @__PURE__ */ c(\n \"button\",\n {\n id: a,\n ref: s,\n role: \"tab\",\n type: \"button\",\n \"aria-selected\": l,\n \"aria-controls\": `tabs-content-${r}`,\n \"data-state\": l ? \"active\" : \"inactive\",\n \"data-value\": r,\n disabled: o,\n className: w(\n \"inline-flex items-center justify-center whitespace-nowrap px-3 py-2 text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n l ? \"font-medium\" : \"font-light\",\n ht[f],\n m,\n t\n ),\n onClick: b,\n children: n\n }\n );\n}\nfunction vt({ elementId: r, maxLength: o }) {\n const [t, n] = A(0);\n return $(() => {\n const e = document.getElementById(r);\n if (!e)\n return;\n const a = () => {\n const s = e.value.length;\n n(s);\n const i = s >= o;\n e.setAttribute(\"aria-describedby\", `${r}-character-count`), e.setAttribute(\"aria-invalid\", i ? \"true\" : \"false\"), i ? e.setAttribute(\"data-error\", \"true\") : e.removeAttribute(\"data-error\");\n };\n return a(), e.addEventListener(\"input\", a), e.setAttribute(\"maxlength\", String(o)), () => {\n e.removeEventListener(\"input\", a), e.removeAttribute(\"maxlength\"), e.removeAttribute(\"aria-describedby\"), e.removeAttribute(\"aria-invalid\"), e.removeAttribute(\"data-error\");\n };\n }, [r, o]), /* @__PURE__ */ c(\n \"small\",\n {\n className: w(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end\",\n t >= o && \"text-destructive\",\n t < o && \"text-current\"\n ),\n role: \"status\",\n children: /* @__PURE__ */ k(\"span\", { id: `${r}-character-count`, children: [\n t,\n \" / \",\n o,\n \" characters\"\n ] })\n }\n );\n}\nfunction pt(r, o) {\n $(() => {\n const t = document.getElementById(r);\n if (!t)\n return;\n if (!o) {\n t.style.height = \"auto\";\n return;\n }\n const n = () => {\n t.style.height = \"auto\", t.style.height = `${t.scrollHeight}px`;\n };\n return n(), t.addEventListener(\"input\", n), t.addEventListener(\"resize\", n), window.addEventListener(\"resize\", n), () => {\n t.removeEventListener(\"input\", n), t.removeEventListener(\"resize\", n), window.removeEventListener(\"resize\", n);\n };\n }, [r, o]);\n}\nconst gt = {\n base: \"\",\n \"left-line\": \"border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n outline: \"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\"\n}, xt = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, Ee = {\n variant: \"outline\",\n rounded: \"none\"\n};\nfunction Yt({\n variant: r = Ee.variant,\n rounded: o,\n displayOnlyMode: t = !1,\n errorMessage: n,\n successMessage: e,\n hideResizeHandle: a = !1,\n autoExpand: s = !1,\n characterLimit: i = 0,\n className: d,\n ...f\n}) {\n const m = P();\n pt(m, s || t);\n let l = o;\n r === \"outline\" && !o && (l = \"md\"), l = l || Ee.rounded;\n let b = a;\n (t || r === \"left-line\" && !a) && (b = !0);\n const h = w(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n !t && gt[r],\n !t && xt[l],\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n b && \"no-resize-handle\",\n d\n );\n return /* @__PURE__ */ k(\"div\", { className: w(\"-space-y-1.5\", t && \"cursor-text\"), children: [\n /* @__PURE__ */ c(\n \"textarea\",\n {\n ...f,\n id: m,\n \"aria-disabled\": f.disabled,\n readOnly: t,\n \"aria-readonly\": t || f[\"aria-readonly\"],\n style: {\n resize: s ? \"none\" : void 0\n },\n className: h\n }\n ),\n i > 0 && /* @__PURE__ */ c(vt, { elementId: m, maxLength: i }),\n !t && /* @__PURE__ */ c(le, { elementId: m, type: \"error\", message: n }),\n !t && /* @__PURE__ */ c(le, { elementId: m, type: \"success\", message: e })\n ] });\n}\nconst yt = {\n sm: {\n container: \"h-5 min-w-9 w-9\",\n thumb: \"h-4 w-4\",\n translate: \"translate-x-4\"\n },\n md: {\n container: \"h-6 min-w-11 w-11\",\n thumb: \"h-5 w-5\",\n translate: \"translate-x-5\"\n },\n lg: {\n container: \"h-7 min-w-13 w-13\",\n thumb: \"h-6 w-6\",\n translate: \"translate-x-6\"\n }\n}, wt = {\n default: {\n unchecked: \"bg-muted\",\n checked: \"bg-primary\"\n },\n success: {\n unchecked: \"bg-muted\",\n checked: \"bg-success\"\n },\n destructive: {\n unchecked: \"bg-muted\",\n checked: \"bg-destructive\"\n }\n}, ke = {\n variant: \"default\",\n size: \"md\"\n};\nfunction Ot({\n ref: r,\n id: o,\n size: t = ke.size,\n variant: n = ke.variant,\n checked: e,\n onCheckedChange: a,\n disabled: s = !1,\n className: i,\n thumbClassName: d,\n backgroundClassNames: f,\n ...m\n}) {\n const l = P(), b = J(() => o || `toggle-${l}`, [o, l]), [u, h] = A(e);\n $(() => {\n h(e);\n }, [e]);\n const v = () => {\n if (!s) {\n const E = !u;\n e === void 0 && h(E), a == null || a(E);\n }\n }, p = (E) => {\n (E.key === \" \" || E.key === \"Enter\") && (E.preventDefault(), v());\n }, y = yt[t], g = wt[n], x = w(\n // Base styles\n \"relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out\",\n \"focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2\",\n // Size\n y.container,\n // Variant and state\n u ? (f == null ? void 0 : f.checked) || g.checked : (f == null ? void 0 : f.unchecked) || g.unchecked,\n // Disabled state\n s && \"opacity-50 cursor-not-allowed\",\n !s && \"cursor-pointer\",\n i\n ), N = w(\n // Base thumb styles\n \"absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out\",\n // Size\n y.thumb,\n // Position based on state\n u && y.translate,\n d\n );\n return /* @__PURE__ */ k(\n \"button\",\n {\n ref: r,\n id: b,\n type: \"button\",\n role: \"switch\",\n tabIndex: 0,\n \"aria-checked\": u,\n \"aria-disabled\": s,\n disabled: s,\n onClick: v,\n onKeyDown: p,\n className: x,\n ...m,\n children: [\n /* @__PURE__ */ c(\"span\", { className: N }),\n /* @__PURE__ */ c(\"span\", { className: \"sr-only\", children: u ? \"Enabled\" : \"Disabled\" })\n ]\n }\n );\n}\nconst se = 8, ie = 4, X = 6;\nfunction Nt(r) {\n return { calculatePosition: C(\n (t, n) => {\n const e = t.getBoundingClientRect(), a = n.getBoundingClientRect(), s = {\n width: window.innerWidth,\n height: window.innerHeight\n }, i = (b, u, h, v) => b < 0 || u < 0 || b + h > s.width || u + v > s.height, d = {\n top: {\n x: e.left + e.width / 2 - a.width / 2,\n y: e.top - a.height - ie,\n arrow: {\n x: a.width / 2 - X,\n y: a.height\n }\n },\n bottom: {\n x: e.left + e.width / 2 - a.width / 2,\n y: e.bottom + ie,\n arrow: {\n x: a.width / 2 - X,\n y: -6\n }\n },\n left: {\n x: e.left - a.width - ie,\n y: e.top + e.height / 2 - a.height / 2,\n arrow: {\n x: a.width,\n y: a.height / 2 - X\n }\n },\n right: {\n x: e.right + ie,\n y: e.top + e.height / 2 - a.height / 2,\n arrow: {\n x: -6,\n y: a.height / 2 - X\n }\n }\n };\n let f = r, m = d[r];\n if (i(m.x, m.y, a.width, a.height)) {\n const b = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n }, u = d[b[r]];\n if (!i(u.x, u.y, a.width, a.height))\n f = b[r], m = u;\n else {\n const h = [\"top\", \"bottom\", \"left\", \"right\"].filter(\n (v) => v !== r && v !== b[r]\n );\n for (const v of h) {\n const p = d[v];\n if (!i(p.x, p.y, a.width, a.height)) {\n f = v, m = p;\n break;\n }\n }\n }\n }\n m.x = Math.max(\n se,\n Math.min(m.x, s.width - a.width - se)\n ), m.y = Math.max(\n se,\n Math.min(m.y, s.height - a.height - se)\n );\n const l = {\n x: e.left + e.width / 2,\n y: e.top + e.height / 2\n };\n return f === \"top\" || f === \"bottom\" ? m.arrow.x = Math.max(\n X,\n Math.min(l.x - m.x - X, a.width - X * 2)\n ) : m.arrow.y = Math.max(\n X,\n Math.min(l.y - m.y - X, a.height - X * 2)\n ), {\n ...m,\n placement: f\n };\n },\n [r]\n ) };\n}\nfunction Et(r, o, t) {\n const n = B(null), e = B(null), a = C(() => {\n if (!n.current || !e.current) return;\n const s = r(n.current, e.current);\n t(s);\n }, [r, t]);\n return $(() => {\n if (!o) return;\n const s = () => a();\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, [o, a]), {\n triggerRef: n,\n tooltipRef: e,\n updatePosition: a\n };\n}\nfunction kt(r, o, t, n, e, a, s, i, d) {\n const f = B(null), m = C(() => {\n r || (f.current && clearTimeout(f.current), f.current = window.setTimeout(() => {\n t(!0), requestAnimationFrame(() => {\n e(), n(!0);\n });\n }, o));\n }, [r, o, t, e, n]), l = C(\n (b = !1) => {\n if (f.current && clearTimeout(f.current), b) {\n n(!1), setTimeout(() => t(!1), 150);\n return;\n }\n f.current = window.setTimeout(() => {\n n(!1), setTimeout(() => t(!1), 150);\n }, 100);\n },\n [n, t]\n );\n return $(() => {\n !a && !s && !i && d && l();\n }, [a, s, i, d, l]), $(() => () => {\n f.current && clearTimeout(f.current);\n }, []), {\n showTooltip: m,\n hideTooltip: l,\n timeoutRef: f\n };\n}\nfunction er({\n id: r,\n children: o,\n message: t,\n placement: n = \"top\",\n disabled: e = !1,\n delay: a = 200,\n className: s\n}) {\n const [i, d] = A(!1), [f, m] = A(!1), [l, b] = A(null), [u, h] = A(!1), [v, p] = A(!1), [y, g] = A(!1), { calculatePosition: x } = Nt(n), { triggerRef: N, tooltipRef: E, updatePosition: S } = Et(x, f, b), { showTooltip: I, hideTooltip: z, timeoutRef: M } = kt(\n e,\n a,\n m,\n d,\n S,\n u,\n v,\n y,\n i\n ), L = P(), U = r ?? L;\n return /* @__PURE__ */ k(ne, { children: [\n F.cloneElement(o, {\n ref: (j) => {\n N.current = j;\n },\n onMouseEnter: () => {\n h(!0), I();\n },\n onMouseLeave: () => {\n h(!1);\n },\n onFocus: () => {\n g(!0), I();\n },\n onBlur: () => {\n g(!1), z(!0);\n },\n onKeyDown: (j) => {\n j.key === \"Escape\" && z(!0);\n },\n \"aria-describedby\": e ? void 0 : U\n }),\n f && pe(\n /* @__PURE__ */ c(\n \"div\",\n {\n ref: E,\n id: U,\n role: \"tooltip\",\n className: w(\n \"fixed z-50 px-2 py-1 text-sm rounded shadow-lg bg-popover pointer-events-auto transition-all duration-150 ease-out\",\n i ? \"opacity-100\" : \"opacity-0\",\n s\n ),\n style: l ? { left: l.x, top: l.y } : { opacity: 0 },\n onMouseEnter: () => {\n p(!0), M.current && clearTimeout(M.current);\n },\n onMouseLeave: () => {\n p(!1);\n },\n children: t\n }\n ),\n document.body\n )\n ] });\n}\nexport {\n Rt as Accordion,\n fe as AccordionItem,\n nr as ActionModal,\n qe as Button,\n Me as ButtonLoadingDots,\n St as Carousel,\n Lt as Checkbox,\n Vt as Clickable,\n Wt as Input,\n Bt as Label,\n Ht as Modal,\n jt as Pagination,\n Gt as Panel,\n Mt as RadioGroup,\n be as RadioGroupItem,\n st as RadioInput,\n Ft as ScrollArea,\n Pt as Select,\n Kt as Separator,\n qt as Skeleton,\n Ut as Slider,\n _t as Slot,\n Xt as Tabs,\n Qt as TabsContent,\n Zt as TabsList,\n Jt as TabsTrigger,\n Yt as Textarea,\n ar as Toast,\n Ot as Toggle,\n er as Tooltip\n};\n//# sourceMappingURL=components.esm.js.map\n","import { Modal, ModalProps } from '@moondreamsdev/dreamer-ui/components';\nimport React, { useMemo } from 'react';\n\ninterface BaseActionModalProps extends Omit<ModalProps, 'children' | 'actions'> {\n message: React.ReactNode;\n destructive?: boolean;\n}\n\ninterface AlertModalProps extends BaseActionModalProps {\n type: 'alert';\n confirmText?: string;\n onConfirm?: () => void;\n // Cancel-related props are not allowed for alerts\n cancelText?: never;\n}\n\ninterface ConfirmModalProps extends BaseActionModalProps {\n type: 'confirm';\n confirmText?: string;\n cancelText?: string;\n onConfirm?: () => void;\n}\n\nexport type ActionModalProps = AlertModalProps | ConfirmModalProps;\n\nexport function ActionModal({\n type,\n message,\n cancelText,\n confirmText,\n onConfirm,\n onClose,\n destructive = false,\n title,\n ...modalProps\n}: ActionModalProps) {\n const defaultTexts = useMemo(() => {\n if (type === 'confirm') {\n return {\n confirm: confirmText || 'Confirm',\n cancel: cancelText || 'Cancel',\n defaultTitle: title || 'Confirm Action',\n };\n }\n return {\n confirm: confirmText || 'OK',\n cancel: null,\n defaultTitle: title || 'Alert',\n };\n }, [type, confirmText, title, cancelText]);\n\n const actions: ModalProps['actions'] = useMemo(\n () => [\n ...(defaultTexts.cancel\n ? [\n {\n label: defaultTexts.cancel,\n variant: 'secondary' as const,\n onClick: onClose,\n },\n ]\n : []),\n {\n label: defaultTexts.confirm,\n variant: destructive ? 'destructive' : 'primary',\n onClick: () => {\n onConfirm?.();\n onClose();\n },\n },\n ],\n [defaultTexts, destructive, onConfirm, onClose]\n );\n\n return (\n <Modal\n {...modalProps}\n title={title || defaultTexts.defaultTitle}\n onClose={onClose}\n actions={actions}\n disableCloseOnOverlayClick={type === 'confirm'}\n hideCloseButton={type === 'confirm'}\n >\n {typeof message === 'string' ? <p className='text-sm'>{message}</p> : message}\n </Modal>\n );\n}\n","import { createContext, useContext } from 'react';\nimport { TabsVariant, TabsWidth } from './variants';\n\nexport interface TabsContextValue {\n selectedValue: string;\n onValueChange: (value: string) => void;\n tabsWidth: TabsWidth;\n variant: TabsVariant;\n triggersClassName?: string;\n contentClassName?: string;\n}\n\nexport const TabsContext = createContext<TabsContextValue | null>(null);\n\nexport const useTabsContext = () => {\n const context = useContext(TabsContext);\n if (!context) {\n throw new Error('Tabs components must be used within a Tabs component');\n }\n return context;\n};\n","import { ReactNode, useCallback, useEffect, useState } from 'react';\nimport { CrossCircled, ExclamationTriangle, InfoCircled, X } from '../../symbols';\nimport { join } from '../../utils';\nexport type ToastType = 'info' | 'warning' | 'error';\n\nexport interface ToastAction {\n label: string;\n onClick: () => void;\n}\n\nexport interface ToastData {\n id: string;\n title: string;\n description?: string;\n type?: ToastType;\n action?: ToastAction;\n duration?: number;\n onRemove?: (id: string) => void;\n}\n\ninterface ToastProps extends ToastData {\n customTypes?: Record<string, { className: string; icon?: ReactNode }>;\n customComponent?: React.ComponentType<ToastData>;\n}\n\nconst defaultTypeStyles: Record<ToastType, { className: string; icon: ReactNode }> = {\n info: {\n className: 'bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100',\n icon: <InfoCircled size={20} />,\n },\n warning: {\n className:\n 'bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100',\n icon: <ExclamationTriangle size={20} />,\n },\n error: {\n className: 'bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100',\n icon: <CrossCircled size={20} />,\n },\n};\n\nexport function Toast({\n id,\n title,\n description,\n type = 'info',\n action,\n duration = 5000,\n onRemove,\n customTypes,\n customComponent: CustomComponent,\n}: ToastProps) {\n const [isExiting, setIsExiting] = useState(false);\n\n const handleRemove = useCallback(() => {\n setIsExiting(true);\n setTimeout(() => {\n onRemove?.(id);\n }, 150); // Match animation duration\n }, [id, onRemove]);\n\n useEffect(() => {\n if (duration > 0) {\n const timer = setTimeout(() => {\n handleRemove();\n }, duration);\n\n return () => clearTimeout(timer);\n }\n }, [duration, id, onRemove, handleRemove]);\n\n if (CustomComponent) {\n return (\n <CustomComponent\n id={id}\n title={title}\n description={description}\n type={type}\n action={action}\n duration={duration}\n onRemove={onRemove}\n />\n );\n }\n\n // Check custom types first, then fall back to default\n const typeStyle = customTypes?.[type] || defaultTypeStyles[type as ToastType] || defaultTypeStyles.info;\n\n return (\n <div\n role={type === 'error' ? 'alert' : 'status'}\n aria-live={type === 'error' ? undefined : 'polite'}\n className={join(\n 'relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out',\n action && 'pb-3',\n typeStyle.className,\n isExiting ? 'opacity-0 translate-x-full' : 'opacity-100 translate-x-0'\n )}\n >\n {/* Icon */}\n <div className='flex-shrink-0 mr-3'>{typeStyle.icon}</div>\n\n {/* Content */}\n <div className='flex-grow min-w-0'>\n <div className='font-medium text-sm leading-5'>{title}</div>\n {description && <div className='mt-1 text-sm opacity-90 leading-5'>{description}</div>}\n {action && (\n <div className='mt-1.5'>\n <button\n onClick={action.onClick}\n className='text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer'\n >\n {action.label}\n </button>\n </div>\n )}\n </div>\n\n {/* Close button */}\n <button\n onClick={handleRemove}\n className='flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0'\n >\n <X size={16} />\n </button>\n </div>\n );\n}\n"],"names":["n","t","s","h","C","i","e","N","c","Me","r","o","A","$","w","Fe","Pe","Ke","me","qe","d","f","l","k","Je","Ye","Oe","B","Ht","b","u","P","v","p","g","x","E","S","I","z","ne","pe","V","ve","ActionModal","type","message","cancelText","confirmText","onConfirm","onClose","destructive","title","modalProps","defaultTexts","useMemo","actions","jsx","Modal","TabsContext","createContext","useTabsContext","context","useContext","defaultTypeStyles","InfoCircled","ExclamationTriangle","CrossCircled","Toast","id","description","action","duration","onRemove","customTypes","CustomComponent","isExiting","setIsExiting","useState","handleRemove","useCallback","useEffect","timer","typeStyle","jsxs","join","X"],"mappings":";;;;;AAAA,SAASA,KAAKC,GAAG;AACf,SAAOA,EAAE,OAAO,CAACC,MAAM,OAAOA,KAAK,YAAYA,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,KAAI;AACxE;ACgFA,SAASC,EAAE,EAAE,MAAMC,IAAI,IAAI,OAAO,IAAI,gBAAgB,WAAW,IAAI,UAAU,GAAGC,EAAC,GAAI;AACrF,SAAuBC,gBAAAA;AAAAA,IACrB;AAAA,IACA;AAAA,MACE,GAAGD;AAAA,MACH,OAAOD;AAAA,MACP,QAAQA;AAAA,MACR,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,MACP,UAA0BE,gBAAAA;AAAAA,QACxB;AAAA,QACA;AAAA,UACE,GAAG;AAAA,UACH,MAAM;AAAA,UACN,UAAU;AAAA,UACV,UAAU;AAAA,QACpB;AAAA,MACA;AAAA,IACA;AAAA,EACG;AACH;AClGA,SAASC,KAAK,GAAG;AACf,SAAO,EAAE,OAAO,CAAC,MAAM,OAAO,KAAK,YAAY,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,KAAI;AACxE;AA0BAC,EAAE,MAAM;AACRA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AAwQKA,EAAE,IAAI;ACjLjB,SAASC,IAAK;AACZ,QAAM,CAACC,GAAGC,CAAC,IAAIC,EAAE,CAAC;AAClB,SAAOC,EAAE,MAAM;AACb,UAAMZ,IAAI,YAAY,MAAM;AAC1B,MAAAU,EAAE,CAACX,OAAOA,IAAI,KAAK,CAAC;AAAA,IACrB,GAAE,GAAG;AACN,WAAO,MAAM,cAAcC,CAAC;AAAA,EAChC,GAAK,CAAA,CAAE,GAAmBO,gBAAAA,EAAE,OAAO,EAAE,WAAW,iFAAiF,UAAU,CAAC,GAAG,GAAG,CAAC,EAAE,IAAI,CAACP,MAAsBO,gBAAAA;AAAAA,IAC5K;AAAA,IACA;AAAA,MACE,WAAWM;AAAAA,QACT;AAAA,QACAJ,MAAMT,KAAK;AAAA,MACnB;AAAA,IACK;AAAA,IACDA;AAAA,EACD,CAAA,GAAG;AACN;AACA,MAAMc,IAAK;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,SAAS;AAAA,EACT,MAAM;AAAA,EACN,aAAa;AACf,GAAGC,IAAK;AAAA,EACN,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AACR,GAAGC,IAAK;AAAA,EACN,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,MAAM;AACR,GAAGC,IAAK;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AACX;AACA,SAASC,EAAG;AAAA,EACV,SAAST,IAAIQ,EAAG;AAAA,EAChB,MAAMP;AAAA,EACN,SAASV,IAAIiB,EAAG;AAAA,EAChB,SAASlB;AAAAA,EACT,QAAQM;AAAA,EACR,WAAW;AAAA,EACX,MAAMJ,IAAI;AAAA,EACV,WAAWG;AAAA,EACX,GAAGe;AACL,GAAG;AACD,MAAIC;AACJ,EAAAX,MAAM,UAAU,CAACC,IAAIU,IAAI,WAAWA,IAAIV,KAAKO,EAAG;AAChD,QAAMI,IAAIR;AAAAA,IACR;AAAA,IACAC,EAAGL,CAAC;AAAA,IACJM,EAAGK,CAAC;AAAA,IACJJ,EAAGhB,CAAC;AAAA,IACJD,KAAK;AAAA,IACLM,KAAK;AAAA,IACLD;AAAA,EACD;AACD,SAAuBkB,gBAAAA;AAAAA,IACrB;AAAA,IACA;AAAA,MACE,GAAGH;AAAA,MACH,MAAMd,IAAI,SAASc,EAAE;AAAA,MACrB,cAAcA,EAAE,YAAY,MAAM,KAAK,OAAO,SAAS,EAAE,YAAY;AAAA,MACrE,oBAAoBA,EAAE,kBAAkB,MAAM,KAAK,OAAO,SAAS,EAAE,kBAAkB;AAAA,MACvF,iBAAiBA,EAAE,YAAYpB;AAAAA,MAC/B,aAAaA;AAAAA,MACb,MAAME;AAAA,MACN,WAAWoB;AAAA,MACX,UAAU;AAAA,QACRtB,KAAqBQ,gBAAAA,EAAEC,GAAI,EAAE;AAAA,QACbD,gBAAAA,EAAE,QAAQ,EAAE,WAAWM,EAAEd,KAAK,WAAW,GAAG,UAAUoB,EAAE,UAAU;AAAA,QAClFd,KAAK,CAACc,EAAE,YAA4BZ,gBAAAA;AAAAA,UAClC;AAAA,UACA;AAAA,YACE,GAAG;AAAA,YACH,eAAe;AAAA,YACf,MAAMF;AAAA,YACN,MAAM,KAAK,OAAO,SAAS,EAAE,QAAQ;AAAA,YACrC,WAAW;AAAA,UACvB;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACG;AACH;AAoiBA,SAASkB,EAAGd,GAAG;AACb,QAAM,CAACC,GAAGV,CAAC,IAAIW,EAAE,EAAE,GAAG,CAACZ,GAAGM,CAAC,IAAIM,EAAE,EAAE;AACnC,SAAOC,EAAE,MAAM;AACb,IAAAH,KAAKJ,EAAE,EAAE,GAAG,WAAW,MAAML,EAAE,EAAE,GAAG,EAAE,MAAMA,EAAE,EAAE,GAAG,WAAW,MAAMK,EAAE,EAAE,GAAG,GAAG;AAAA,EAClF,GAAK,CAACI,CAAC,CAAC,GAAG,EAAE,MAAMC,GAAG,cAAcX,EAAG;AACvC;AACA,SAASyB,GAAGf,GAAGC,GAAG;AAChBE,EAAAA,EAAE,MAAM;AACN,UAAMZ,IAAI,CAACD,MAAM;AACf,MAAAA,EAAE,QAAQ,YAAYU,KAAKC,EAAG;AAAA,IAC/B;AACD,WAAO,SAAS,iBAAiB,WAAWV,CAAC,GAAGS,MAAM,SAAS,KAAK,MAAM,WAAW,WAAW,MAAM;AACpG,eAAS,oBAAoB,WAAWT,CAAC,GAAG,SAAS,KAAK,MAAM,WAAW;AAAA,IAC5E;AAAA,EACL,GAAK,CAACS,GAAGC,CAAC,CAAC;AACX;AACA,SAASe,GAAGhB,GAAGC,GAAG;AAChB,QAAMV,IAAI0B,EAAE,IAAI,GAAG3B,IAAII,EAAE,MAAM;AAC7B,UAAME,IAAI,SAAS,eAAeI,CAAC;AACnC,QAAI,CAACJ,EAAG;AACR,UAAM,IAAIA,EAAE,iBAAiB,4BAA4B;AACzD,QAAI,EAAE,SAAS,GAAG;AAChB,QAAE,CAAC,EAAE,MAAO;AACZ;AAAA,IACN;AACI,UAAMJ,IAAII,EAAE;AAAA,MACV;AAAA,IACD;AACD,QAAIJ,EAAE,SAAS,GAAG;AAChB,YAAMG,IAAI,MAAM,KAAKH,CAAC,EAAE,OAAO,CAACkB,MAAM,EAAEA,aAAa,qBAAqBA,EAAE,aAAa,yBAAyB,MAAM,OAAO;AAC/H,UAAIf,EAAE,SAAS,GAAG;AAChB,QAAAA,EAAE,CAAC,EAAE,MAAO;AACZ;AAAA,MACR;AACM,MAAAH,EAAE,CAAC,EAAE,MAAO;AACZ;AAAA,IACN;AACI,IAAAI,EAAE,MAAO;AAAA,EACb,GAAK,CAACI,CAAC,CAAC;AACNG,EAAAA,EAAE,OAAOF,MAAMV,EAAE,UAAU,SAAS,eAAeD,EAAG,IAAG,MAAM;AAC7D,aAAS,KAAK,MAAM,WAAW,QAAQC,EAAE,mBAAmB,eAAeA,EAAE,QAAQ,MAAO;AAAA,EAChG,IAAM,CAACU,GAAGX,CAAC,CAAC;AACZ;AACA,SAAS4B,GAAG;AAAA,EACV,IAAIlB;AAAA,EACJ,QAAQC;AAAA,EACR,SAASV;AAAA,EACT,OAAOD;AAAA,EACP,UAAUM;AAAA,EACV,aAAa,IAAI;AAAA,EACjB,WAAWJ;AAAA,EACX,kBAAkBG;AAAA,EAClB,iBAAiBe,IAAI;AAAA,EACrB,SAASC,IAAI,CAAE;AAAA,EACf,4BAA4B,IAAI;AAAA,EAChC,gBAAgBC;AAAA,EAChB,iBAAiBO;AACnB,GAAG;AACD,QAAMC,IAAIC,KAAK5B,IAAIO,KAAK,SAASoB,CAAC,IAAIE,IAAItB,IAAI,GAAGA,CAAC,WAAW,eAAeoB,CAAC,IAAI,EAAE,MAAMG,GAAG,cAAc,MAAMT,EAAGb,CAAC;AACpH,MAAIe,GAAGvB,GAAG,CAAC,GAAGsB,GAAG,GAAGxB,CAAC,GAAG,CAAC,EAAG,QAAO;AACnC,QAAMiC,IAAI,MAAMlC,IAAI,EAAE,eAAeA,CAAC,IAAoBQ,gBAAAA,EAAE,OAAO,EAAE,WAAW,QAAQ,UAAUR,GAAG,IAAoBQ,gBAAAA,EAAE,MAAM,EAAE,WAAW,8BAA8B,IAAIwB,GAAG,UAAUhC,EAAG,CAAA,IAAI,MAAMmC,IAAI,MAAMd,EAAE,WAAW,IAAI,OAAuBb,gBAAAA,EAAE,OAAO,EAAE,WAAW,oFAAoF,UAAUa,EAAE,IAAI,CAACd,GAAG6B,MAAM;AAC9X,UAAM,EAAE,OAAOC,GAAG,WAAWC,GAAG,GAAGC,EAAC,IAAKhC;AACzC,WAAuBC,gBAAAA,EAAEW,GAAI,EAAE,WAAWmB,GAAG,MAAM,UAAU,GAAGC,GAAG,qBAAqB,QAAQ,UAAUF,EAAC,GAAID,CAAC;AAAA,EACjH,CAAA,GAAG;AACJ,SAAuB5B,gBAAAA,EAAEgC,GAAI,EAAE,UAAUC;AAAAA,IACvBjC,gBAAAA;AAAAA,MACd;AAAA,MACA;AAAA,QACE,mBAAmBc,KAAKtB,IAAIgC,IAAI;AAAA,QAChC,oBAAoBH;AAAA,QACpB,MAAM;AAAA,QACN,cAAc;AAAA,QACd,WAAW;AAAA,QACX,UAA0BN,gBAAAA,EAAE,OAAO,EAAE,WAAW,qDAAqD,UAAU;AAAA,UAC7Ff,gBAAAA;AAAAA,YACd;AAAA,YACA;AAAA,cACE,WAAWkC,EAAE,4CAA4CrC,CAAC;AAAA,cAC1D,SAAS,MAAM;AACb,qBAAKJ,EAAG;AAAA,cACxB;AAAA,YACA;AAAA,UACW;AAAA,UACD,KAAqBO,gBAAAA,EAAE,OAAO,EAAE,WAAWkC,EAAE,kBAAkBxC,CAAC,GAAG,UAAUI,GAAG;AAAA,UAChF,CAAC,KAAqBiB,gBAAAA;AAAAA,YACpB;AAAA,YACA;AAAA,cACE,IAAIpB;AAAAA,cACJ,UAAU;AAAA,cACV,WAAWuC;AAAAA,gBACT;AAAA,gBACAT,IAAI,0BAA0B;AAAA,gBAC9B/B;AAAA,cACD;AAAA,cACD,UAAU;AAAA,gBACR,CAACkB,KAAqBZ,gBAAAA;AAAAA,kBACpB;AAAA,kBACA;AAAA,oBACE,MAAM;AAAA,oBACN,SAASP;AAAA,oBACT,2BAA2B;AAAA,oBAC3B,WAAW;AAAA,oBACX,UAA0BO,gBAAAA,EAAEmC,GAAI,EAAE,MAAM,GAAI,CAAA;AAAA,kBAChE;AAAA,gBACiB;AAAA,gBACDT,EAAG;AAAA,gBACH5B;AAAA,gBACA6B,EAAC;AAAA,cACjB;AAAA,YACA;AAAA,UACA;AAAA,QACA,EAAW,CAAA;AAAA,MACX;AAAA,IACK;AAAA,IACD,SAAS;AAAA,EACb,GAAK;AACL;AC/1BO,SAASS,GAAY;AAAA,EAC1B,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,OAAAC;AAAA,EACA,GAAGC;AACL,GAAqB;AACb,QAAAC,IAAeC,EAAQ,MACvBV,MAAS,YACJ;AAAA,IACL,SAASG,KAAe;AAAA,IACxB,QAAQD,KAAc;AAAA,IACtB,cAAcK,KAAS;AAAA,EACzB,IAEK;AAAA,IACL,SAASJ,KAAe;AAAA,IACxB,QAAQ;AAAA,IACR,cAAcI,KAAS;AAAA,EACzB,GACC,CAACP,GAAMG,GAAaI,GAAOL,CAAU,CAAC,GAEnCS,IAAiCD;AAAA,IACrC,MAAM;AAAA,MACJ,GAAID,EAAa,SACb;AAAA,QACE;AAAA,UACE,OAAOA,EAAa;AAAA,UACpB,SAAS;AAAA,UACT,SAASJ;AAAA,QAAA;AAAA,MACX,IAEF,CAAC;AAAA,MACL;AAAA,QACE,OAAOI,EAAa;AAAA,QACpB,SAASH,IAAc,gBAAgB;AAAA,QACvC,SAAS,MAAM;AACD,UAAAF,KAAA,QAAAA,KACJC,EAAA;AAAA,QAAA;AAAA,MACV;AAAA,IAEJ;AAAA,IACA,CAACI,GAAcH,GAAaF,GAAWC,CAAO;AAAA,EAChD;AAGE,SAAA,gBAAAO;AAAA,IAACC;AAAAA,IAAA;AAAA,MACE,GAAGL;AAAA,MACJ,OAAOD,KAASE,EAAa;AAAA,MAC7B,SAAAJ;AAAA,MACA,SAAAM;AAAA,MACA,4BAA4BX,MAAS;AAAA,MACrC,iBAAiBA,MAAS;AAAA,MAEzB,UAAA,OAAOC,KAAY,WAAW,gBAAAW,EAAC,OAAE,WAAU,WAAW,YAAQ,CAAA,IAAOX;AAAA,IAAA;AAAA,EACxE;AAEJ;AC1Ea,MAAAa,KAAcC,EAAuC,IAAI,GAEzDC,KAAiB,MAAM;AAC5B,QAAAC,IAAUC,EAAWJ,EAAW;AACtC,MAAI,CAACG;AACG,UAAA,IAAI,MAAM,sDAAsD;AAEjE,SAAAA;AACT,GCKME,IAA+E;AAAA,EACnF,MAAM;AAAA,IACJ,WAAW;AAAA,IACX,MAAM,gBAAAP,EAACQ,GAAY,EAAA,MAAM,GAAI,CAAA;AAAA,EAC/B;AAAA,EACA,SAAS;AAAA,IACP,WACE;AAAA,IACF,MAAM,gBAAAR,EAACS,GAAoB,EAAA,MAAM,GAAI,CAAA;AAAA,EACvC;AAAA,EACA,OAAO;AAAA,IACL,WAAW;AAAA,IACX,MAAM,gBAAAT,EAACU,GAAa,EAAA,MAAM,GAAI,CAAA;AAAA,EAAA;AAElC;AAEO,SAASC,GAAM;AAAA,EACpB,IAAAC;AAAA,EACA,OAAAjB;AAAA,EACA,aAAAkB;AAAA,EACA,MAAAzB,IAAO;AAAA,EACP,QAAA0B;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,iBAAiBC;AACnB,GAAe;AACb,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAE1CC,IAAeC,EAAY,MAAM;AACrC,IAAAH,EAAa,EAAI,GACjB,WAAW,MAAM;AACf,MAAAJ,KAAA,QAAAA,EAAWJ;AAAA,OACV,GAAG;AAAA,EAAA,GACL,CAACA,GAAII,CAAQ,CAAC;AAYjB,MAVAQ,EAAU,MAAM;AACd,QAAIT,IAAW,GAAG;AACV,YAAAU,IAAQ,WAAW,MAAM;AAChB,QAAAH,EAAA;AAAA,SACZP,CAAQ;AAEJ,aAAA,MAAM,aAAaU,CAAK;AAAA,IAAA;AAAA,KAEhC,CAACV,GAAUH,GAAII,GAAUM,CAAY,CAAC,GAErCJ;AAEA,WAAA,gBAAAlB;AAAA,MAACkB;AAAA,MAAA;AAAA,QACC,IAAAN;AAAA,QACA,OAAAjB;AAAA,QACA,aAAAkB;AAAA,QACA,MAAAzB;AAAA,QACA,QAAA0B;AAAA,QACA,UAAAC;AAAA,QACA,UAAAC;AAAA,MAAA;AAAA,IACF;AAKJ,QAAMU,KAAYT,KAAA,gBAAAA,EAAc7B,OAASmB,EAAkBnB,CAAiB,KAAKmB,EAAkB;AAGjG,SAAA,gBAAAoB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAMvC,MAAS,UAAU,UAAU;AAAA,MACnC,aAAWA,MAAS,UAAU,SAAY;AAAA,MAC1C,WAAWwC;AAAA,QACT;AAAA,QACAd,KAAU;AAAA,QACVY,EAAU;AAAA,QACVP,IAAY,+BAA+B;AAAA,MAC7C;AAAA,MAGA,UAAA;AAAA,QAAA,gBAAAnB,EAAC,OAAI,EAAA,WAAU,sBAAsB,UAAA0B,EAAU,MAAK;AAAA,QAGpD,gBAAAC,EAAC,OAAI,EAAA,WAAU,qBACb,UAAA;AAAA,UAAC,gBAAA3B,EAAA,OAAA,EAAI,WAAU,iCAAiC,UAAML,GAAA;AAAA,UACrDkB,KAAe,gBAAAb,EAAC,OAAI,EAAA,WAAU,qCAAqC,UAAYa,GAAA;AAAA,UAC/EC,KACC,gBAAAd,EAAC,OAAI,EAAA,WAAU,UACb,UAAA,gBAAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAASc,EAAO;AAAA,cAChB,WAAU;AAAA,cAET,UAAOA,EAAA;AAAA,YAAA;AAAA,UAAA,EAEZ,CAAA;AAAA,QAAA,GAEJ;AAAA,QAGA,gBAAAd;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,SAASsB;AAAA,YACT,WAAU;AAAA,YAEV,UAAA,gBAAAtB,EAAC6B,GAAE,EAAA,MAAM,GAAI,CAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACf;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),u=require("react"),w=require("./utils.cjs.js"),N=require("./QuestionMarkCircled-D5cHmQp1.cjs"),A=require("./Toast-FzI16Fnl.cjs"),M=require("./X-CgjeP2OI.cjs"),W=require("react-dom");function D({id:o,title:s,content:e,children:n,className:t="",disabled:r=!1,isOpen:a=!1,onToggle:d,triggerClassName:f="",bodyClassName:c=""}){const h=u.useId(),l=o||`accordion-item-${h}`,v=`${l}-header`,m=`${l}-panel`,b=()=>{!r&&d&&d()},p=x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),b())};return i.jsxs("div",{className:w.join("border-b border-gray-200",r&&"opacity-60 cursor-not-allowed",t),children:[i.jsxs("button",{id:v,type:"button",className:w.join("w-full text-left py-3 px-4 flex justify-between items-center focus:outline focus:outline-secondary",r?"cursor-not-allowed":"hover:bg-gray-50/10 cursor-pointer",f),"aria-expanded":a,"aria-controls":m,disabled:r,onClick:b,onKeyDown:p,children:[i.jsx("span",{children:s}),i.jsx("span",{className:w.join("transform transition-transform duration-300 ease-linear",a?"rotate-180":"rotate-0"),"aria-hidden":"true",children:i.jsx(N.ChevronDown,{size:18})})]}),i.jsx("div",{id:m,role:"region","aria-labelledby":v,className:w.join("transition-all duration-300 ease-linear px-4",a?"max-h-96 opacity-100 overflow-auto py-3":"max-h-0 opacity-0 overflow-hidden",c),children:a&&(n||e)})]})}function Z({id:o,items:s=[],children:e,className:n="",itemClassName:t="",allowMultiple:r=!1,defaultOpenItems:a=[],triggersClassName:d="",bodiesClassName:f=""}){const c=u.useId(),h=o||`accordion-group-${c}`,[l,v]=u.useState(new Set(a)),m=x=>{v(y=>{const g=new Set(y);return g.has(x)?g.delete(x):(r||g.clear(),g.add(x)),g})},b=x=>`${c}-item-${x}`,p=x=>l.has(x);return i.jsxs("div",{id:h,className:n,children:[s.length>0&&s.map((x,y)=>{const g=x.id||b(y);return i.jsx(D,{id:g,title:x.title,content:x.content,disabled:x.disabled,isOpen:p(g),onToggle:()=>m(g),className:t,triggerClassName:d,bodyClassName:f},g)}),s.length===0&&e&&u.Children.map(e,(x,y)=>{if(u.isValidElement(x)&&x.type===D){const g=x.props.id||b(y);return u.createElement(D,{...x.props,key:g,id:g,className:w.join(t,x.props.className),isOpen:p(g),onToggle:()=>m(g),triggerClassName:w.join(d,x.props.triggerClassName),bodyClassName:w.join(f,x.props.bodyClassName)})}return null})]})}function U(){const[o,s]=u.useState(0);return u.useEffect(()=>{const e=setInterval(()=>{s(n=>(n+1)%3)},500);return()=>clearInterval(e)},[]),i.jsx("div",{className:"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle",children:[0,1,2].map(e=>i.jsx("div",{className:w.join("rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",o===e&&"transform -translate-y-1")},e))})}const J={base:"",primary:"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",tertiary:"text-primary hover:text-primary-foreground disabled:text-muted",outline:"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",link:"underline-offset-4 hover:underline disabled:underline disabled:text-muted",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"},Y={stripped:"",fitted:"size-fit",sm:"px-2 py-1 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg",icon:"p-1 w-fit aspect-square",full:"p-2 w-full"},O={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},q={variant:"primary",size:"md",rounded:"md"};function _({variant:o=q.variant,size:s,rounded:e=q.rounded,loading:n,linkTo:t,linkProps:r,type:a="button",className:d,...f}){let c;o==="link"&&!s?c="fitted":c=s||q.size;const l=w.join("appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",J[o],Y[c],O[e],n&&"relative pointer-events-none",t&&"relative",d);return i.jsxs("button",{...f,role:t?"link":f.role,"aria-label":f["aria-label"]||(r==null?void 0:r["aria-label"]),"aria-description":f["aria-description"]||(r==null?void 0:r["aria-description"]),"aria-disabled":f.disabled||n,"aria-busy":n,type:a,className:l,children:[n&&i.jsx(U,{}),i.jsx("span",{className:w.join(n&&"invisible"),children:f.children}),t&&!f.disabled&&i.jsx("a",{...r,"aria-hidden":!0,href:t,rel:(r==null?void 0:r.rel)||"noreferrer",className:"absolute inset-0"})]})}function P(o){const[s,e]=u.useState(""),n=u.useCallback(t=>{let r=t,a="";for(;r&&!a;){const d=window.getComputedStyle(r).backgroundColor;d&&d!=="transparent"&&d!=="rgba(0, 0, 0, 0)"&&(a=d),r=r.parentElement}return a||"transparent"},[]);return u.useEffect(()=>{const t=document.getElementById(o);if(t){const r=n(t.parentElement);e(r)}},[o,n]),s}function ee({ref:o,id:s,size:e=20,color:n,filled:t=!1,rounded:r=!0,checked:a=!1,onCheckedChange:d,disabled:f,className:c="",...h}){const l=u.useId(),v=u.useMemo(()=>s||`checkbox-${l}`,[s,l]),m=P(v),[b,p]=u.useState(a);u.useEffect(()=>{p(a)},[a]);const x=()=>{f||(p(!b),d==null||d(!b))},y=j=>{j.key===" "&&(j.preventDefault(),x())},g=w.join("flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2",r&&"rounded",f&&"opacity-40 cursor-not-allowed",!f&&"cursor-pointer",c);return i.jsx("button",{id:v,type:"button",ref:o,tabIndex:0,role:"checkbox",onClick:x,"aria-checked":b,"aria-disabled":f,onKeyDownCapture:y,style:{width:e,height:e,color:n,backgroundColor:b&&t?"currentcolor":"transparent"},className:g,...h,children:b&&i.jsx(N.Check,{size:e,color:t?m:void 0})})}function te({children:o,className:s,linkTo:e,linkProps:n,onButtonClick:t,buttonProps:r,...a}){return e&&t&&console.warn('Clickable: Both "linkTo" and "onButtonClick" props are provided. Only "linkTo" will be used.'),i.jsxs("div",{className:w.join("relative w-fit",s),...a,children:[o,e&&i.jsx("a",{...n,rel:(n==null?void 0:n.rel)||"noreferrer",href:e,className:w.join("absolute inset-0",n==null?void 0:n.className)}),!e&&t&&i.jsx("button",{...r,type:"button",onClick:t,className:w.join("absolute inset-0 cursor-pointer",r==null?void 0:r.className)})]})}function L({elementId:o,type:s,message:e}){return u.useEffect(()=>{const n=document.getElementById(o);if(n){if(!e&&s==="error"){n.removeAttribute("data-error");return}if(!e&&s==="success"){n.removeAttribute("data-success");return}return n.setAttribute("aria-describedby",`${o}-${s}-message`),n.setAttribute("aria-invalid",s==="error"?"true":"false"),s==="error"&&n.setAttribute("data-error","true"),s==="success"&&n.setAttribute("data-success","true"),()=>{n.removeAttribute("aria-describedby"),n.removeAttribute("aria-invalid"),n.removeAttribute("data-error"),n.removeAttribute("data-success")}}},[o,s,e]),e?i.jsxs("small",{className:w.join("mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start",s==="error"&&"text-destructive",s==="success"&&"text-success"),role:"status",children:[s==="error"?i.jsx(M.ExclamationTriangle,{}):i.jsx(N.CheckCircled,{}),i.jsx("span",{id:`${o}-${s}-message`,children:e})]}):null}const re={base:"",default:"ring ring-transparent focus:ring-primary-foreground not-disabled:data-error:ring-destructive not-disabled:data-success:ring-success",underline:"border-b border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success",outline:"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success"},ne={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"px-3 rounded-full"},K={variant:"default",rounded:"none"};function oe({variant:o=K.variant,rounded:s,displayOnlyMode:e=!1,errorMessage:n,successMessage:t,type:r="text",className:a,...d}){const f=u.useId(),[c,h]=u.useState(!1);let l=s;o==="outline"&&!s&&(l="md"),l=l||K.rounded;const b=w.join("appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all","file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors",!e&&re[o],!e&&ne[l],r==="password"&&"pr-10",!e&&"px-2 py-1",e&&"pointer-events-none",a);return i.jsxs("div",{className:w.join(e&&"cursor-text"),style:{height:d.height,width:d.width},children:[i.jsxs("div",{className:w.join(r==="password"&&"relative"),children:[i.jsx("input",{...d,id:f,type:r==="password"&&c?"text":r,"aria-disabled":d.disabled,readOnly:e,"aria-readonly":e||d["aria-readonly"],"data-error":n?!0:void 0,"data-success":t?!0:void 0,className:b}),r==="password"&&i.jsx("button",{onClick:()=>h(!c),className:"absolute inset-y-0 right-0 px-2 hover:cursor-pointer","aria-label":"Toggle password visibility","data-state":c?"visible":"hidden",children:c?i.jsx(N.EyeClosed$1,{size:20}):i.jsx(N.EyeClosed,{size:20})})]}),!e&&i.jsx(L,{elementId:f,type:"error",message:n}),!e&&i.jsx(L,{elementId:f,type:"success",message:t})]})}function se({display:o="inline",width:s="fit-content",className:e="",required:n,helpMessage:t,suffix:r,htmlFor:a,children:d,...f}){const c=u.useId(),h=w.join("font-medium",o,e),l=t?`${a??c}-help`:void 0;return i.jsxs("div",{style:{display:o==="inline"?"inline-flex":"flex",width:s},className:"relative",children:[i.jsxs("label",{className:h,htmlFor:a,...f,children:[d,n&&i.jsx("span",{className:"text-red-500 font-medium ml-1","aria-label":"required",children:"*"})]}),t&&i.jsx("span",{className:"text-gray-500 ml-1 size-fit -translate-y-1/3","aria-describedby":l,"aria-label":"Help information",title:t,children:i.jsx(N.QuestionMarkCircled,{})}),t&&i.jsx("div",{id:l,className:"sr-only",children:t}),r&&i.jsx("span",{className:"ml-1",children:r})]})}function ae(o){const[s,e]=u.useState(!1),[n,t]=u.useState(!1);return u.useEffect(()=>{o?(t(!0),setTimeout(()=>e(!0),10)):(e(!1),setTimeout(()=>t(!1),150))},[o]),{show:s,shouldRender:n}}function ie(o,s){u.useEffect(()=>{const e=n=>{n.key==="Escape"&&o&&s()};return document.addEventListener("keydown",e),o&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",e),document.body.style.overflow="auto"}},[o,s])}function ue(o,s){const e=u.useRef(null),n=u.useCallback(()=>{const t=document.getElementById(o);if(!t)return;const r=t.querySelectorAll('[data-modal-action="true"]');if(r.length>0){r[0].focus();return}const a=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(a.length>0){const d=Array.from(a).filter(f=>!(f instanceof HTMLButtonElement&&f.getAttribute("data-modal-close-button")==="true"));if(d.length>0){d[0].focus();return}a[0].focus();return}t.focus()},[o]);u.useEffect(()=>(s&&(e.current=document.activeElement,n()),()=>{document.body.style.overflow="auto",e.current instanceof HTMLElement&&e.current.focus()}),[s,n])}function le({id:o,isOpen:s,onClose:e,title:n,children:t,contentOnly:r=!1,className:a,overlayClassName:d,hideCloseButton:f=!1,actions:c=[],disableCloseOnOverlayClick:h=!1,ariaLabelledBy:l,ariaDescribedBy:v}){const m=u.useId(),b=o||`modal-${m}`,p=o?`${o}-title`:`modal-title-${m}`,{show:x,shouldRender:y}=ae(s);if(ue(b,y),ie(y,e),!y)return null;const g=()=>n?u.isValidElement(n)?i.jsx("div",{className:"mb-4",children:n}):i.jsx("h2",{className:"mb-4 text-xl font-semibold",id:p,children:n}):null,j=()=>c.length===0?null:i.jsx("div",{className:"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3",children:c.map((I,E)=>{const{label:z,className:T,...$}=I;return i.jsx(_,{className:T,type:"button",...$,"data-modal-action":"true",children:z},E)})});return i.jsx(i.Fragment,{children:W.createPortal(i.jsx("div",{"aria-labelledby":l??n?p:void 0,"aria-describedby":v,role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] overflow-y-auto",children:i.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4",children:[i.jsx("div",{className:A.n("fixed inset-0 bg-black/20 transition-all",d),onClick:()=>{h||e()}}),r&&i.jsx("div",{className:A.n("relative w-fit",a),children:t}),!r&&i.jsxs("div",{id:b,tabIndex:-1,className:A.n("relative w-full max-w-xl transform rounded-lg shadow-xl transition-all p-6 bg-inherit focus:ring ease-in duration-75",x?"opacity-100 scale-100":"opacity-0 scale-90",a),children:[!f&&i.jsx("button",{type:"button",onClick:e,"data-modal-close-button":"true",className:"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",children:i.jsx(M.X,{size:18})}),g(),t,j()]})]})}),document.body)})}function Q({itemId:o,checked:s,onChange:e,name:n,disabled:t=!1,className:r=""}){const a="relative inline-flex items-center justify-center rounded-full",d=()=>{t||e()},f=w.join(a,!s&&"hover:border-current/60",!t&&"border-current cursor-pointer",t&&"border-muted/60 cursor-not-allowed",r);return i.jsx("div",{id:o,role:"radio",tabIndex:-1,"aria-checked":s,"aria-disabled":t,"aria-description":`Radio button for ${n}`,"aria-labelledby":`${o}-label`,onClick:d,className:f,style:{width:"1em",height:"1em",padding:"0.1em",borderWidth:"0.06em"},children:s&&i.jsx("div",{className:w.join("size-full aspect-square rounded-full",t&&"bg-muted/60",!t&&"bg-current")})})}function R({value:o,children:s,className:e="",isSelected:n=!1,onChange:t,disabled:r=!1,hideInput:a=!1,description:d,name:f}){const h=`radio-${u.useId()}-${o}`,l=()=>{r||t==null||t(o)};return i.jsxs("div",{title:d,className:w.join("relative flex items-center",e,a&&`p-2 border-2 focus-within:border-dashed focus-within:${r?"border-current/50":"border-current/80"}`,a&&!n&&`border-transparent ${r?"":"not-focus-within:hover:border-border/60"}`,a&&n&&"border-border",r&&"opacity-60 cursor-not-allowed"),style:{gap:"0.5em"},children:[!a&&i.jsx(Q,{itemId:h,name:f||"",checked:n,onChange:l,disabled:r,className:w.join(a&&"")}),i.jsx("div",{id:a?h:void 0,tabIndex:a?-1:void 0,role:a?"radio":void 0,onClick:a?l:void 0,"aria-checked":a?n?"true":"false":void 0,"aria-disabled":a?r:void 0,"aria-description":a?d||`Radio button for ${f}`:void 0,"aria-labelledby":a?`${h}-label`:void 0,className:w.join(a&&"size-full",typeof s=="object"&&"grow focus:outline-none"),children:i.jsx("label",{id:`${h}-label`,onClick:a?void 0:l,className:w.join(r&&"cursor-not-allowed",!r&&"cursor-pointer"),children:s})})]})}function ce(o,s){const[e,n]=u.useState(s),[t,r]=u.useState(-1),[a,d]=u.useState(!1),f=u.useCallback((m,b)=>{var y;const p=m[b];p.hasAttribute("disabled")||p.getAttribute("aria-disabled")==="true"||((y=m[b])==null||y.click(),r(b))},[]),c=u.useCallback((m,b)=>{var x;if(m.preventDefault(),a||!b.length)return;const p=s!==-1?s:0;(x=b[p])==null||x.focus(),n(p),s!==-1&&f(b,p)},[s,a,f]),h=u.useCallback(m=>{var y;if(!m.shiftKey)return;m.preventDefault();const b=Array.from(document.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).filter(g=>!g.hasAttribute("disabled")&&g.tabIndex>=0),p=b.findIndex(g=>g.id===o),x=p>0?p-1:b.length-1;(y=b[x])==null||y.focus()},[o]),l=u.useCallback((m,b)=>{var j;if(!b.length)return;const p=m.target;if(!b.some(I=>I.id===p.id))return;const y=e!==-1?e:0;let g=y;switch(m.key){case"ArrowUp":case"ArrowLeft":m.preventDefault(),g=y>0?y-1:b.length-1;break;case"ArrowDown":case"ArrowRight":m.preventDefault(),g=(y+1)%b.length;break;case" ":m.preventDefault(),f(b,y);return;case"Tab":h(m);return;default:return}(j=b[g])==null||j.focus(),n(g),t!==-1&&f(b,g)},[e,t,h,f]),v=u.useCallback(()=>{const m=document.querySelector(`[id="${o}"][role="radiogroup"]`);return m?Array.from(m.querySelectorAll('[role="radio"]')):[]},[o]);u.useEffect(()=>{const m=document.querySelector(`[id="${o}"][role="radiogroup"]`);if(!m)return;const b=v(),p=j=>c(j,b),x=j=>l(j,b),y=()=>d(!0),g=()=>d(!1);return document.addEventListener("keydown",x),m.addEventListener("focus",p),m.addEventListener("mousedown",y),document.addEventListener("mouseup",g),()=>{document.removeEventListener("keydown",x),m.removeEventListener("focus",p),m.removeEventListener("mousedown",y),document.removeEventListener("mouseup",g)}},[o,v,c,l])}function de({options:o=[],value:s,onChange:e,id:n,children:t,className:r="",childrenClassName:a="",hideInputs:d=!1}){const f=u.useId(),c=n||`radio-group-${f}`;ce(c,o.findIndex(l=>l===s));const h=u.useMemo(()=>o.reduce((l,v)=>(typeof v=="string"?l.some(m=>m.value===v)||l.push({label:v,value:v}):l.push(v),l),[]),[o]);return i.jsxs("div",{id:c,role:"radiogroup",tabIndex:0,className:w.join(r,"focus:outline-none"),children:[h.length>0&&h.map((l,v)=>i.jsx(R,{value:l.value,isSelected:s===l.value,onChange:e,name:c,disabled:l.disabled,description:l.description,hideInput:d,className:a,children:l.label},`${l.value}-${v}`)),h.length===0&&t&&u.Children.map(t,l=>u.isValidElement(l)&&l.type===R?i.jsx(R,{...l.props,className:w.join(a,l.props.className),hideInput:l.props.hideInput||d,isSelected:s===l.props.value,onChange:e,name:c,children:l.props.children}):null)]})}function fe({children:o,ref:s,...e}){if(u.isValidElement(o)){let n={...e};return o.props&&(n={...n,...o.props}),u.cloneElement(o,{...n,ref:t=>{typeof s=="function"?s(t):s&&(s.current=t)}})}return u.createElement("div",{...e,ref:s},o)}function me({elementId:o,maxLength:s}){const[e,n]=u.useState(0);return u.useEffect(()=>{const t=document.getElementById(o);if(!t)return;const r=()=>{const a=t.value.length;n(a);const d=a>=s;t.setAttribute("aria-describedby",`${o}-character-count`),t.setAttribute("aria-invalid",d?"true":"false"),d?t.setAttribute("data-error","true"):t.removeAttribute("data-error")};return r(),t.addEventListener("input",r),t.setAttribute("maxlength",String(s)),()=>{t.removeEventListener("input",r),t.removeAttribute("maxlength"),t.removeAttribute("aria-describedby"),t.removeAttribute("aria-invalid"),t.removeAttribute("data-error")}},[o,s]),i.jsx("small",{className:w.join("mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end",e>=s&&"text-destructive",e<s&&"text-current"),role:"status",children:i.jsxs("span",{id:`${o}-character-count`,children:[e," / ",s," characters"]})})}function be(o,s){u.useEffect(()=>{const e=document.getElementById(o);if(!e)return;if(!s){e.style.height="auto";return}const n=()=>{e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return n(),e.addEventListener("input",n),e.addEventListener("resize",n),window.addEventListener("resize",n),()=>{e.removeEventListener("input",n),e.removeEventListener("resize",n),window.removeEventListener("resize",n)}},[o,s])}const he={base:"","left-line":"border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success",outline:"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success"},xe={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"px-3 rounded-full"},V={variant:"outline",rounded:"none"};function ge({variant:o=V.variant,rounded:s,displayOnlyMode:e=!1,errorMessage:n,successMessage:t,hideResizeHandle:r=!1,autoExpand:a=!1,characterLimit:d=0,className:f,...c}){const h=u.useId();be(h,a||e);let l=s;o==="outline"&&!s&&(l="md"),l=l||V.rounded;let v=r;(e||o==="left-line"&&!r)&&(v=!0);const b=w.join("appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all",!e&&he[o],!e&&xe[l],!e&&"px-2 py-1",e&&"pointer-events-none",v&&"no-resize-handle",f);return i.jsxs("div",{className:w.join("-space-y-1.5",e&&"cursor-text"),children:[i.jsx("textarea",{...c,id:h,"aria-disabled":c.disabled,readOnly:e,"aria-readonly":e||c["aria-readonly"],style:{resize:a?"none":void 0},className:b}),d>0&&i.jsx(me,{elementId:h,maxLength:d}),!e&&i.jsx(L,{elementId:h,type:"error",message:n}),!e&&i.jsx(L,{elementId:h,type:"success",message:t})]})}const pe={sm:{container:"h-5 min-w-9 w-9",thumb:"h-4 w-4",translate:"translate-x-4"},md:{container:"h-6 min-w-11 w-11",thumb:"h-5 w-5",translate:"translate-x-5"},lg:{container:"h-7 min-w-13 w-13",thumb:"h-6 w-6",translate:"translate-x-6"}},ve={default:{unchecked:"bg-muted",checked:"bg-primary"},success:{unchecked:"bg-muted",checked:"bg-success"},destructive:{unchecked:"bg-muted",checked:"bg-destructive"}},G={variant:"default",size:"md"};function we({ref:o,id:s,size:e=G.size,variant:n=G.variant,checked:t,onCheckedChange:r,disabled:a=!1,className:d,thumbClassName:f,backgroundClassNames:c,...h}){const l=u.useId(),v=u.useMemo(()=>s||`toggle-${l}`,[s,l]),[m,b]=u.useState(t);u.useEffect(()=>{b(t)},[t]);const p=()=>{if(!a){const E=!m;t===void 0&&b(E),r==null||r(E)}},x=E=>{(E.key===" "||E.key==="Enter")&&(E.preventDefault(),p())},y=pe[e],g=ve[n],j=w.join("relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out","focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",y.container,m?(c==null?void 0:c.checked)||g.checked:(c==null?void 0:c.unchecked)||g.unchecked,a&&"opacity-50 cursor-not-allowed",!a&&"cursor-pointer",d),I=w.join("absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out",y.thumb,m&&y.translate,f);return i.jsxs("button",{ref:o,id:v,type:"button",role:"switch",tabIndex:0,"aria-checked":m,"aria-disabled":a,disabled:a,onClick:p,onKeyDown:x,className:j,...h,children:[i.jsx("span",{className:I}),i.jsx("span",{className:"sr-only",children:m?"Enabled":"Disabled"})]})}const k=8,S=4,C=6;function ye(o){return{calculatePosition:u.useCallback((e,n)=>{const t=e.getBoundingClientRect(),r=n.getBoundingClientRect(),a={width:window.innerWidth,height:window.innerHeight},d=(v,m,b,p)=>v<0||m<0||v+b>a.width||m+p>a.height,f={top:{x:t.left+t.width/2-r.width/2,y:t.top-r.height-S,arrow:{x:r.width/2-C,y:r.height}},bottom:{x:t.left+t.width/2-r.width/2,y:t.bottom+S,arrow:{x:r.width/2-C,y:-6}},left:{x:t.left-r.width-S,y:t.top+t.height/2-r.height/2,arrow:{x:r.width,y:r.height/2-C}},right:{x:t.right+S,y:t.top+t.height/2-r.height/2,arrow:{x:-6,y:r.height/2-C}}};let c=o,h=f[o];if(d(h.x,h.y,r.width,r.height)){const v={top:"bottom",bottom:"top",left:"right",right:"left"},m=f[v[o]];if(!d(m.x,m.y,r.width,r.height))c=v[o],h=m;else{const b=["top","bottom","left","right"].filter(p=>p!==o&&p!==v[o]);for(const p of b){const x=f[p];if(!d(x.x,x.y,r.width,r.height)){c=p,h=x;break}}}}h.x=Math.max(k,Math.min(h.x,a.width-r.width-k)),h.y=Math.max(k,Math.min(h.y,a.height-r.height-k));const l={x:t.left+t.width/2,y:t.top+t.height/2};return c==="top"||c==="bottom"?h.arrow.x=Math.max(C,Math.min(l.x-h.x-C,r.width-C*2)):h.arrow.y=Math.max(C,Math.min(l.y-h.y-C,r.height-C*2)),{...h,placement:c}},[o])}}function je(o,s,e){const n=u.useRef(null),t=u.useRef(null),r=u.useCallback(()=>{if(!n.current||!t.current)return;const a=o(n.current,t.current);e(a)},[o,e]);return u.useEffect(()=>{if(!s)return;const a=()=>r();return window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[s,r]),{triggerRef:n,tooltipRef:t,updatePosition:r}}function Ee(o,s,e,n,t,r,a,d,f){const c=u.useRef(null),h=u.useCallback(()=>{o||(c.current&&clearTimeout(c.current),c.current=window.setTimeout(()=>{e(!0),requestAnimationFrame(()=>{t(),n(!0)})},s))},[o,s,e,t,n]),l=u.useCallback((v=!1)=>{if(c.current&&clearTimeout(c.current),v){n(!1),setTimeout(()=>e(!1),150);return}c.current=window.setTimeout(()=>{n(!1),setTimeout(()=>e(!1),150)},100)},[n,e]);return u.useEffect(()=>{!r&&!a&&!d&&f&&l()},[r,a,d,f,l]),u.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]),{showTooltip:h,hideTooltip:l,timeoutRef:c}}function Ce({id:o,children:s,message:e,placement:n="top",disabled:t=!1,delay:r=200,className:a}){const[d,f]=u.useState(!1),[c,h]=u.useState(!1),[l,v]=u.useState(null),[m,b]=u.useState(!1),[p,x]=u.useState(!1),[y,g]=u.useState(!1),{calculatePosition:j}=ye(n),{triggerRef:I,tooltipRef:E,updatePosition:z}=je(j,c,v),{showTooltip:T,hideTooltip:$,timeoutRef:F}=Ee(t,r,h,f,z,m,p,y,d),X=u.useId(),H=o??X;return i.jsxs(i.Fragment,{children:[u.cloneElement(s,{ref:B=>{I.current=B},onMouseEnter:()=>{b(!0),T()},onMouseLeave:()=>{b(!1)},onFocus:()=>{g(!0),T()},onBlur:()=>{g(!1),$(!0)},onKeyDown:B=>{B.key==="Escape"&&$(!0)},"aria-describedby":t?void 0:H}),c&&W.createPortal(i.jsx("div",{ref:E,id:H,role:"tooltip",className:w.join("fixed z-50 px-2 py-1 text-sm rounded shadow-lg pointer-events-auto transition-all duration-150 ease-out",d?"opacity-100":"opacity-0",a),style:l?{left:l.x,top:l.y}:{opacity:0},onMouseEnter:()=>{x(!0),F.current&&clearTimeout(F.current)},onMouseLeave:()=>{x(!1)},children:e}),document.body)]})}exports.ActionModal=A.ActionModal;exports.Toast=A.Toast;exports.Accordion=Z;exports.AccordionItem=D;exports.Button=_;exports.ButtonLoadingDots=U;exports.Checkbox=ee;exports.Clickable=te;exports.Input=oe;exports.Label=se;exports.Modal=le;exports.RadioGroup=de;exports.RadioGroupItem=R;exports.RadioInput=Q;exports.Slot=fe;exports.Textarea=ge;exports.Toggle=we;exports.Tooltip=Ce;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("react"),j=require("./utils.cjs.js"),W=require("./QuestionMarkCircled-BaSE7iv0.cjs"),S=require("./Toast-B-Zu6Kp_.cjs"),ae=require("./X-CgjeP2OI.cjs"),ce=require("react-dom");function te({id:r,title:s,content:t,children:n,className:e="",disabled:a=!1,isOpen:l=!1,onToggle:c,triggerClassName:d="",bodyClassName:m=""}){const b=i.useId(),u=r||`accordion-item-${b}`,h=`${u}-header`,f=`${u}-panel`,x=()=>{!a&&c&&c()},v=g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),x())};return o.jsxs("div",{className:j.join("border-b border-gray-200",a&&"opacity-60 cursor-not-allowed",e),children:[o.jsxs("button",{id:h,type:"button",className:j.join("w-full text-left py-3 px-4 flex justify-between items-center focus:outline focus:outline-secondary",a?"cursor-not-allowed":"hover:bg-gray-50/10 cursor-pointer",d),"aria-expanded":l,"aria-controls":f,disabled:a,onClick:x,onKeyDown:v,children:[o.jsx("span",{children:s}),o.jsx("span",{className:j.join("transform transition-transform duration-300 ease-linear",l?"rotate-180":"rotate-0"),"aria-hidden":"true",children:o.jsx(W.ChevronDown,{size:18})})]}),o.jsx("div",{id:f,role:"region","aria-labelledby":h,className:j.join("transition-all duration-300 ease-linear px-4",l?"max-h-96 opacity-100 overflow-auto py-3":"max-h-0 opacity-0 overflow-hidden",m),children:l&&(n||t)})]})}function we({id:r,items:s=[],children:t,className:n="",itemClassName:e="",allowMultiple:a=!1,defaultOpenItems:l=[],triggersClassName:c="",bodiesClassName:d=""}){const m=i.useId(),b=r||`accordion-group-${m}`,[u,h]=i.useState(new Set(l)),f=g=>{h(w=>{const p=new Set(w);return p.has(g)?p.delete(g):(a||p.clear(),p.add(g)),p})},x=g=>`${m}-item-${g}`,v=g=>u.has(g);return o.jsxs("div",{id:b,className:n,children:[s.length>0&&s.map((g,w)=>{const p=g.id||x(w);return o.jsx(te,{id:p,title:g.title,content:g.content,disabled:g.disabled,isOpen:v(p),onToggle:()=>f(p),className:e,triggerClassName:c,bodyClassName:d},p)}),s.length===0&&t&&i.Children.map(t,(g,w)=>{if(i.isValidElement(g)&&g.type===te){const p=g.props.id||x(w);return i.createElement(te,{...g.props,key:p,id:p,className:j.join(e,g.props.className),isOpen:v(p),onToggle:()=>f(p),triggerClassName:j.join(c,g.props.triggerClassName),bodyClassName:j.join(d,g.props.bodyClassName)})}return null})]})}function ve(){const[r,s]=i.useState(0);return i.useEffect(()=>{const t=setInterval(()=>{s(n=>(n+1)%3)},500);return()=>clearInterval(t)},[]),o.jsx("div",{className:"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle",children:[0,1,2].map(t=>o.jsx("div",{className:j.join("rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",r===t&&"transform -translate-y-1")},t))})}const je={base:"",primary:"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",tertiary:"text-primary hover:text-primary-foreground disabled:text-muted",outline:"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",link:"underline-offset-4 hover:underline disabled:underline disabled:text-muted",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"},Ne={stripped:"",fitted:"size-fit",sm:"px-2 py-1 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg",icon:"p-1 w-fit aspect-square",full:"p-2 w-full"},Ee={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},le={variant:"primary",size:"md",rounded:"md"};function ge({variant:r=le.variant,size:s,rounded:t=le.rounded,loading:n,linkTo:e,linkProps:a,type:l="button",className:c,...d}){let m;r==="link"&&!s?m="fitted":m=s||le.size;const u=j.join("appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",je[r],Ne[m],Ee[t],n&&"relative pointer-events-none",e&&"relative",c);return o.jsxs("button",{...d,role:e?"link":d.role,"aria-label":d["aria-label"]||(a==null?void 0:a["aria-label"]),"aria-description":d["aria-description"]||(a==null?void 0:a["aria-description"]),"aria-disabled":d.disabled||n,"aria-busy":n,type:l,className:u,children:[n&&o.jsx(ve,{}),o.jsx("span",{className:j.join(n&&"invisible"),children:d.children}),e&&!d.disabled&&o.jsx("a",{...a,"aria-hidden":!0,href:e,rel:(a==null?void 0:a.rel)||"noreferrer",className:"absolute inset-0"})]})}function ke({totalItems:r,itemsToShow:s,infinite:t,autoScroll:n,scrollInterval:e,pauseScrollOnHover:a,currentIndex:l,onIndexChange:c}){const[d,m]=i.useState(l||0),[b,u]=i.useState(!1),h=i.useRef(null),f=Math.ceil(r/s),x=t||d>0,v=t||d<f-1,g=i.useCallback(y=>{const N=Math.max(0,Math.min(y,f-1));m(N),c==null||c(N)},[f,c]),w=i.useCallback(()=>{if(x){const y=d===0&&t?f-1:d-1;g(y)}},[d,x,t,f,g]),p=i.useCallback(()=>{if(v){const y=d===f-1&&t?0:d+1;g(y)}},[d,v,t,f,g]);return i.useEffect(()=>{l!==void 0&&l!==d&&m(l)},[l,d]),i.useEffect(()=>{if(!n)return;const y=()=>{h.current=setInterval(()=>{a&&b||p()},e)},N=()=>{h.current&&(clearInterval(h.current),h.current=null)};return!b||!a?y():N(),N},[n,e,a,b,p]),i.useEffect(()=>{m(0)},[s]),{currentSlide:d,canGoPrev:x,canGoNext:v,goToPrev:w,goToNext:p,goToSlide:g,isHovered:b,setIsHovered:u}}const _={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function Ce(){const[r,s]=i.useState(),[t,n]=i.useState(0),e=a=>_[a];return i.useEffect(()=>{const a=c=>c>=_["2xl"]?"2xl":c>=_.xl?"xl":c>=_.lg?"lg":c>=_.md?"md":c>=_.sm?"sm":"xs";s(a(window.innerWidth)),n(window.innerWidth);const l=()=>{s(a(window.innerWidth)),n(window.innerWidth)};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[]),{screenSize:r,screenWidth:t,getBreakpoint:e}}const J={sm:{button:"h-6 w-6 text-xs",icon:"size-3"},md:{button:"h-8 w-8 text-sm",icon:"size-4"},lg:{button:"h-10 w-10 text-lg",icon:"size-5"}},ue={default:"bg-accent text-accent-foreground hover:bg-accent-foreground hover:text-accent",outline:"border border-border bg-background hover:bg-accent hover:text-accent-foreground hover:border-accent",ghost:"hover:text-accent"},Y={aligned:{prev:"absolute top-1/2 -translate-x-1/2 -translate-y-1/2 z-10",next:"absolute right-0 top-1/2 translate-x-1/2 -translate-y-1/2 z-10"},exterior:{prev:"absolute -left-10 top-1/2 -translate-y-1/2 z-10",next:"absolute -right-10 top-1/2 -translate-y-1/2 z-10"},interior:{prev:"absolute left-2 top-1/2 -translate-y-1/2 z-10",next:"absolute right-2 top-1/2 -translate-y-1/2 z-10"}};function Se({children:r,id:s,ref:t,className:n,autoScroll:e=!1,scrollInterval:a=3e3,pauseScrollOnHover:l=!0,currentIndex:c,onIndexChange:d,hidePrevNext:m=!1,hideDots:b=!1,itemsToShow:u=1,buttonSize:h="md",buttonVariant:f="default",buttonPosition:x="exterior",infinite:v=!0,prevButton:g,nextButton:w,itemsClassName:p,containerClassName:y,dotsClassName:N,gap:E=8}){var $,Q;const A=i.useRef(null),C=i.Children.toArray(r).filter(i.isValidElement),I=C.length,{screenSize:M}=Ce(),z=i.useMemo(()=>{if(typeof u=="number")return u;if(typeof u=="object"&&u&&M){const K=["2xl","xl","lg","md","sm","xs"],V=K.indexOf(M);for(let U=V;U<K.length;U++){const Z=K[U];if(u[Z]!==void 0)return u[Z]}}return 1},[u,M]),{currentSlide:H,canGoPrev:L,canGoNext:T,goToPrev:R,goToNext:D,goToSlide:B,setIsHovered:P}=ke({totalItems:I,itemsToShow:z,infinite:v,autoScroll:e,scrollInterval:a,pauseScrollOnHover:l,currentIndex:c,onIndexChange:d}),q=i.useCallback(K=>{if(z===1)return{leftWidth:0,rightWidth:0,widthReduction:0};const V=E*(z-1)/z;return K%z===0?{leftWidth:0,rightWidth:E/2,widthReduction:V}:K%z===z-1?{leftWidth:E/2,rightWidth:0,widthReduction:V}:{leftWidth:E/2,rightWidth:E/2,widthReduction:V}},[z,E]),F=()=>{R()},X=()=>{D()},se=()=>{l&&P(!0)},oe=()=>{l&&P(!1)},ie=-(H*(100/I)*z),k=j.join("inline-flex items-center justify-center rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring focus-visible:ring-ring disabled:pointer-events-none",x==="aligned"?"disabled:opacity-90":"disabled:opacity-50");return o.jsxs("div",{className:j.join("relative",n),"data-carousel-wrapper":"true",children:[!m&&o.jsx(o.Fragment,{children:g?i.cloneElement(g,{onClick:F,disabled:!L,className:j.join((($=g.props)==null?void 0:$.className)||"",Y[x].prev),role:"button","aria-disabled":!L,"aria-label":"Previous slide","data-carousel-prev":"true"}):o.jsx("button",{type:"button",onClick:F,disabled:!L,className:j.join(k,J[h].button,ue[f],Y[x].prev),"aria-disabled":!L,"aria-label":"Previous slide","data-carousel-prev":"true",children:o.jsx(W.ChevronLeft,{className:J[h].icon})})}),o.jsxs("div",{id:s,ref:t,className:j.join("relative overflow-hidden",y),onMouseEnter:se,onMouseLeave:oe,"data-carousel":"true","data-current-index":H,"data-items-to-show":z,"data-auto-scroll":e,"data-button-position":x,children:[o.jsx("div",{ref:A,className:"flex transition-transform duration-300 ease-in-out",style:{transform:`translateX(${ie}%)`,width:`${I/z*100}%`},children:C.map((K,V)=>{const{leftWidth:U,rightWidth:Z,widthReduction:ye}=q(V);return o.jsx("div",{className:j.join("flex-shrink-0",p),style:{width:`calc(${100/I}% - ${ye}px)`,marginRight:Z>0?`${Z}px`:void 0,marginLeft:U>0?`${U}px`:void 0},"data-slide-index":V,children:K},V)})}),!b&&o.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2",children:Array.from({length:Math.ceil(I/z)}).map((K,V)=>o.jsx("button",{type:"button",onClick:()=>B(V),className:j.join("w-2 h-2 rounded-full transition-colors duration-200",V===H?"bg-accent":"bg-muted hover:bg-muted-foreground/50",N),"aria-label":`Go to slide ${V+1}`,"data-carousel-dot":V},V))})]}),!m&&o.jsx(o.Fragment,{children:w?i.cloneElement(w,{onClick:X,disabled:!T,className:j.join(((Q=w.props)==null?void 0:Q.className)||"",Y[x].next),role:"button","aria-disabled":!T,"aria-label":"Next slide","data-carousel-next":"true"}):o.jsx("button",{type:"button",onClick:X,disabled:!T,className:j.join(k,J[h].button,ue[f],Y[x].next),"aria-disabled":!T,"aria-label":"Next slide","data-carousel-next":"true",children:o.jsx(W.ChevronRight,{className:J[h].icon})})})]})}function Ie(r){const[s,t]=i.useState(""),n=i.useCallback(e=>{let a=e,l="";for(;a&&!l;){const c=window.getComputedStyle(a).backgroundColor;c&&c!=="transparent"&&c!=="rgba(0, 0, 0, 0)"&&(l=c),a=a.parentElement}return l||"transparent"},[]);return i.useEffect(()=>{const e=document.getElementById(r);if(e){const a=n(e.parentElement);t(a)}},[r,n]),s}function Te({ref:r,id:s,size:t=20,color:n,filled:e=!1,rounded:a=!0,checked:l=!1,onCheckedChange:c,disabled:d,className:m="",...b}){const u=i.useId(),h=i.useMemo(()=>s||`checkbox-${u}`,[s,u]),f=Ie(h),[x,v]=i.useState(l);i.useEffect(()=>{v(l)},[l]);const g=()=>{d||(v(!x),c==null||c(!x))},w=y=>{y.key===" "&&(y.preventDefault(),g())},p=j.join("flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2",a&&"rounded",d&&"opacity-40 cursor-not-allowed",!d&&"cursor-pointer",m);return o.jsx("button",{id:h,type:"button",ref:r,tabIndex:0,role:"checkbox",onClick:g,"aria-checked":x,"aria-disabled":d,onKeyDownCapture:w,style:{width:t,height:t,color:n,backgroundColor:x&&e?"currentcolor":"transparent"},className:p,...b,children:x&&o.jsx(W.Check,{size:t,color:e?f:void 0})})}function Re({children:r,className:s,linkTo:t,linkProps:n,onButtonClick:e,buttonProps:a,...l}){return t&&e&&console.warn('Clickable: Both "linkTo" and "onButtonClick" props are provided. Only "linkTo" will be used.'),o.jsxs("div",{className:j.join("relative w-fit",s),...l,children:[r,t&&o.jsx("a",{...n,rel:(n==null?void 0:n.rel)||"noreferrer",href:t,className:j.join("absolute inset-0",n==null?void 0:n.className)}),!t&&e&&o.jsx("button",{...a,type:"button",onClick:e,className:j.join("absolute inset-0 cursor-pointer",a==null?void 0:a.className)})]})}function ne({elementId:r,type:s,message:t}){return i.useEffect(()=>{const n=document.getElementById(r);if(n){if(!t&&s==="error"){n.removeAttribute("data-error");return}if(!t&&s==="success"){n.removeAttribute("data-success");return}return n.setAttribute("aria-describedby",`${r}-${s}-message`),n.setAttribute("aria-invalid",s==="error"?"true":"false"),s==="error"&&n.setAttribute("data-error","true"),s==="success"&&n.setAttribute("data-success","true"),()=>{n.removeAttribute("aria-describedby"),n.removeAttribute("aria-invalid"),n.removeAttribute("data-error"),n.removeAttribute("data-success")}}},[r,s,t]),t?o.jsxs("small",{className:j.join("mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start",s==="error"&&"text-destructive",s==="success"&&"text-success"),role:"status",children:[s==="error"?o.jsx(ae.ExclamationTriangle,{}):o.jsx(W.CheckCircled,{}),o.jsx("span",{id:`${r}-${s}-message`,children:t})]}):null}const Ae={base:"",default:"ring ring-transparent focus:ring-primary-foreground not-disabled:data-error:ring-destructive not-disabled:data-success:ring-success",underline:"border-b border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success",outline:"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success"},ze={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"px-3 rounded-full"},de={variant:"default",rounded:"none"};function $e({variant:r=de.variant,rounded:s,displayOnlyMode:t=!1,errorMessage:n,successMessage:e,type:a="text",className:l,...c}){const d=i.useId(),[m,b]=i.useState(!1);let u=s;r==="outline"&&!s&&(u="md"),u=u||de.rounded;const x=j.join("appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all","file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors",!t&&Ae[r],!t&&ze[u],a==="password"&&"pr-10",!t&&"px-2 py-1",t&&"pointer-events-none",l);return o.jsxs("div",{className:j.join(t&&"cursor-text"),style:{height:c.height,width:c.width},children:[o.jsxs("div",{className:j.join(a==="password"&&"relative"),children:[o.jsx("input",{...c,id:d,type:a==="password"&&m?"text":a,"aria-disabled":c.disabled,readOnly:t,"aria-readonly":t||c["aria-readonly"],"data-error":n?!0:void 0,"data-success":e?!0:void 0,className:x}),a==="password"&&o.jsx("button",{onClick:()=>b(!m),className:"absolute inset-y-0 right-0 px-2 hover:cursor-pointer","aria-label":"Toggle password visibility","data-state":m?"visible":"hidden",children:m?o.jsx(W.EyeClosed$1,{size:20}):o.jsx(W.EyeClosed,{size:20})})]}),!t&&o.jsx(ne,{elementId:d,type:"error",message:n}),!t&&o.jsx(ne,{elementId:d,type:"success",message:e})]})}function De({display:r="inline",width:s="fit-content",className:t="",required:n,helpMessage:e,suffix:a,htmlFor:l,children:c,description:d,...m}){var v,g;const b=i.useId(),u=(((v=e==null?void 0:e.trim())==null?void 0:v.length)||0)>0,h=(((g=d==null?void 0:d.trim())==null?void 0:g.length)||0)>0,f=u?`${l??b}-help`:void 0,x=h?`${l??b}-description`:void 0;return o.jsxs("div",{style:{display:r==="inline"?"inline-block":"block",width:s},className:j.join("mb-0.5",t),children:[o.jsxs("div",{className:"relative flex",children:[o.jsxs("label",{className:"font-medium",htmlFor:l,...m,children:[c,n&&o.jsx("span",{className:"text-red-500 font-medium ml-1","aria-label":"required",children:"*"})]}),u&&o.jsx("span",{className:"text-gray-500 ml-1 size-fit -translate-y-1/3","aria-describedby":f,"aria-label":"Help information",title:e,children:o.jsx(W.QuestionMarkCircled,{})}),u&&o.jsx("div",{id:f,className:"sr-only",children:e}),a&&o.jsx("span",{className:"ml-1",children:a})]}),h&&o.jsx("small",{id:x,className:"block opacity-80 mt-0.5",role:"note",children:d})]})}function Le(r){const[s,t]=i.useState(!1),[n,e]=i.useState(!1);return i.useEffect(()=>{r?(e(!0),setTimeout(()=>t(!0),10)):(t(!1),setTimeout(()=>e(!1),150))},[r]),{show:s,shouldRender:n}}function Ve(r,s){i.useEffect(()=>{const t=n=>{n.key==="Escape"&&r&&s()};return document.addEventListener("keydown",t),r&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",t),document.body.style.overflow="auto"}},[r,s])}function Me(r,s){const t=i.useRef(null),n=i.useCallback(()=>{const e=document.getElementById(r);if(!e)return;const a=e.querySelectorAll('[data-modal-action="true"]');if(a.length>0){a[0].focus();return}const l=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(l.length>0){const c=Array.from(l).filter(d=>!(d instanceof HTMLButtonElement&&d.getAttribute("data-modal-close-button")==="true"));if(c.length>0){c[0].focus();return}l[0].focus();return}e.focus()},[r]);i.useEffect(()=>(s&&(t.current=document.activeElement,n()),()=>{document.body.style.overflow="auto",t.current instanceof HTMLElement&&t.current.focus()}),[s,n])}function We({id:r,isOpen:s,onClose:t,title:n,children:e,contentOnly:a=!1,className:l,overlayClassName:c,hideCloseButton:d=!1,actions:m=[],disableCloseOnOverlayClick:b=!1,ariaLabelledBy:u,ariaDescribedBy:h}){const f=i.useId(),x=r||`modal-${f}`,v=r?`${r}-title`:`modal-title-${f}`,{show:g,shouldRender:w}=Le(s);if(Me(x,w),Ve(w,t),!w)return null;const p=()=>n?i.isValidElement(n)?o.jsx("div",{className:"mb-4",children:n}):o.jsx("h2",{className:"mb-4 text-xl font-semibold",id:v,children:n}):null,y=()=>m.length===0?null:o.jsx("div",{className:"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3",children:m.map((N,E)=>{const{label:A,className:C,...I}=N;return o.jsx(ge,{className:C,type:"button",...I,"data-modal-action":"true",children:A},E)})});return o.jsx(o.Fragment,{children:ce.createPortal(o.jsx("div",{"aria-labelledby":u??n?v:void 0,"aria-describedby":h,role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] overflow-y-auto",children:o.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4",children:[o.jsx("div",{className:S.n("fixed inset-0 bg-black/20 transition-all",c),onClick:()=>{b||t()}}),a&&o.jsx("div",{className:S.n("relative w-fit",l),children:e}),!a&&o.jsxs("div",{id:x,tabIndex:-1,className:S.n("relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",g?"opacity-100 scale-100":"opacity-0 scale-90",l),children:[!d&&o.jsx("button",{type:"button",onClick:t,"data-modal-close-button":"true",className:"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",children:o.jsx(ae.X,{size:18})}),p(),e,y()]})]})}),document.body)})}const Be={link:"text-primary hover:text-primary-foreground hover:bg-primary/10 aria-current:text-primary-foreground aria-current:bg-primary",outline:"border border-primary text-primary hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground aria-current:border-primary",filled:"bg-secondary text-secondary-foreground hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground"},Fe={sm:"px-2 py-1 text-sm min-w-[32px] min-h-8",md:"px-2 py-1 text-base min-w-[40px] min-h-10"};function He({page:r,pageCount:s=5,maxVisiblePages:t=5,showFirstLast:n=!0,onPageChange:e,size:a="md",variant:l="link",className:c,ref:d,buttonsClassName:m,...b}){const u=s===1/0,f=i.useCallback(()=>{if(u)return[];const N=s,E=Math.min(t,N);if(N<=E)return Array.from({length:N},(M,z)=>z+1);const A=Math.floor(E/2);let C=Math.max(1,r-A),I=Math.min(N,C+E-1);return I-C+1<E&&(C=Math.max(1,I-E+1),I=Math.min(N,C+E-1)),Array.from({length:I-C+1},(M,z)=>C+z)},[u,t,r,s])(),x=r>1,v=u||r<s,g=n&&!u,w=n&&!u,p=N=>{N>=1&&(u||N<=s)&&e(N)},y=i.useCallback(()=>{const N=S.n("flex items-center justify-center min-w-fit","disabled:opacity-50 disabled:cursor-not-allowed",Fe[a],"rounded-md");return S.n(N,Be[l],m)},[l,a,m]);return o.jsxs("nav",{ref:d,className:S.n("flex items-center justify-center gap-1",c),role:"navigation","aria-label":"Pagination","data-page":r,"data-page-count":u?"infinite":s,...b,children:[g&&o.jsxs("button",{onClick:()=>p(1),className:y(),disabled:r===1,"aria-label":"Go to first page",children:[o.jsx(W.ChevronDoubleLeft,{size:a==="sm"?12:15}),o.jsx("span",{className:"ml-1",children:"First"})]}),o.jsxs("button",{onClick:()=>p(r-1),className:y(),disabled:!x,"aria-label":"Go to previous page",children:[o.jsx(W.ChevronLeft,{size:a==="sm"?12:15}),o.jsx("span",{className:"ml-1",children:"Previous"})]}),!u&&f.map(N=>o.jsx("button",{onClick:()=>p(N),className:S.n(y(),"aspect-square"),"aria-label":`Go to page ${N}`,"aria-current":N===r?!0:void 0,children:N},N)),o.jsxs("button",{onClick:()=>p(r+1),className:y(),disabled:!v,"aria-label":"Go to next page",children:[o.jsx("span",{className:"mr-1",children:"Next"}),o.jsx(W.ChevronRight,{size:a==="sm"?12:15})]}),w&&o.jsxs("button",{onClick:()=>p(s),className:y(),disabled:r===s,"aria-label":"Go to last page",children:[o.jsx("span",{className:"mr-1",children:"Last"}),o.jsx(W.ChevronDoubleRight,{size:a==="sm"?12:15})]})]})}function Pe(r){const[s,t]=i.useState(!1),[n,e]=i.useState(!1);return i.useEffect(()=>{r?(e(!0),setTimeout(()=>t(!0),10)):(t(!1),setTimeout(()=>e(!1),300))},[r]),{show:s,shouldRender:n}}function Ge(r,s){i.useEffect(()=>{const t=n=>{n.key==="Escape"&&r&&s()};return document.addEventListener("keydown",t),r&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",t),document.body.style.overflow="auto"}},[r,s])}function qe(r,s){const t=i.useRef(null),n=i.useCallback(()=>{const e=document.getElementById(r);if(!e)return;const a=e.querySelectorAll('[data-panel-action="true"]');if(a.length>0){a[0].focus();return}const l=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(l.length>0){const c=Array.from(l).filter(d=>!(d instanceof HTMLButtonElement&&d.getAttribute("data-panel-close-button")==="true"));if(c.length>0){c[0].focus();return}l[0].focus();return}e.focus()},[r]);i.useEffect(()=>(s&&(t.current=document.activeElement,n()),()=>{document.body.style.overflow="auto",t.current instanceof HTMLElement&&t.current.focus()}),[s,n])}const Ke={size:{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl",full:"w-full",screen:"w-screen"}};function Xe({ref:r,id:s,isOpen:t,onClose:n,title:e,children:a,footer:l,size:c="md",className:d,overlayClassName:m,hideCloseButton:b=!1,disableCloseOnOverlayClick:u=!1,ariaLabelledBy:h,ariaDescribedBy:f}){const x=i.useId(),v=s||`panel-${x}`,g=s?`${s}-title`:`panel-title-${x}`,{show:w,shouldRender:p}=Pe(t);if(qe(v,p),Ge(p,n),!p)return null;const y=()=>e?i.isValidElement(e)?o.jsx("div",{children:e}):o.jsx("h2",{className:"text-2xl font-semibold",id:g,children:e}):null,N=()=>{if(!l)return null;if(i.isValidElement(l)){const E=l,A=E.props.className||"";return i.cloneElement(E,{className:S.n("px-6 py-4",A)})}return o.jsx("div",{className:"px-6 py-4",children:l})};return o.jsx(o.Fragment,{children:ce.createPortal(o.jsxs("div",{"aria-labelledby":h??e?g:void 0,"aria-describedby":f,role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] overflow-hidden","data-panel-open":t,children:[o.jsx("div",{className:S.n("fixed inset-0 bg-black/40 transition-opacity duration-300",w?"opacity-100":"opacity-0",m),onClick:()=>{u||n()}}),o.jsx("div",{className:"fixed inset-y-0 right-0 flex max-w-full",children:o.jsx("div",{id:v,ref:r,tabIndex:-1,className:S.n("relative h-full transform shadow-xl bg-popover transition-transform duration-300 ease-in-out",c!=="screen"&&"border-l border-border",Ke.size[c],w?"translate-x-0":"translate-x-full",d),"data-panel-size":c,children:o.jsxs("div",{className:"flex h-full flex-col",children:[e&&o.jsx("div",{className:"px-6 pt-6",children:y()}),!b&&o.jsx("button",{type:"button",onClick:n,"data-panel-close-button":"true","aria-label":"Close panel",className:"rounded-md p-0.5 top-3 right-3 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",children:o.jsx(ae.X,{size:18})}),o.jsx("div",{className:S.n("flex-1 overflow-y-auto px-6 pb-6",e?"pt-6":"pt-10"),children:a}),N()]})})})]}),document.body)})}function pe({itemId:r,checked:s,onChange:t,name:n,disabled:e=!1,className:a=""}){const l="relative inline-flex items-center justify-center rounded-full",c=()=>{e||t()},d=j.join(l,!s&&"hover:border-current/60",!e&&"border-current cursor-pointer",e&&"border-muted/60 cursor-not-allowed",a);return o.jsx("div",{id:r,role:"radio",tabIndex:-1,"aria-checked":s,"aria-disabled":e,"aria-description":`Radio button for ${n}`,"aria-labelledby":`${r}-label`,onClick:c,className:d,style:{width:"1em",height:"1em",padding:"0.1em",borderWidth:"0.06em"},children:s&&o.jsx("div",{className:j.join("size-full aspect-square rounded-full",e&&"bg-muted/60",!e&&"bg-current")})})}function re({value:r,children:s,className:t="",isSelected:n=!1,onChange:e,disabled:a=!1,hideInput:l=!1,description:c,name:d}){const b=`radio-${i.useId()}-${r}`,u=()=>{a||e==null||e(r)};return o.jsxs("div",{title:c,className:j.join("relative flex items-center",t,l&&`p-2 border-2 focus-within:border-dashed focus-within:${a?"border-current/50":"border-current/80"}`,l&&!n&&`border-transparent ${a?"":"not-focus-within:hover:border-border/60"}`,l&&n&&"border-border",a&&"opacity-60 cursor-not-allowed"),style:{gap:"0.5em"},children:[!l&&o.jsx(pe,{itemId:b,name:d||"",checked:n,onChange:u,disabled:a,className:j.join(l&&"")}),o.jsx("div",{id:l?b:void 0,tabIndex:l?-1:void 0,role:l?"radio":void 0,onClick:l?u:void 0,"aria-checked":l?n?"true":"false":void 0,"aria-disabled":l?a:void 0,"aria-description":l?c||`Radio button for ${d}`:void 0,"aria-labelledby":l?`${b}-label`:void 0,className:j.join(l&&"size-full",typeof s=="object"&&"grow focus:outline-none"),children:o.jsx("label",{id:`${b}-label`,onClick:l?void 0:u,className:j.join(a&&"cursor-not-allowed",!a&&"cursor-pointer"),children:s})})]})}function Ue(r,s){const[t,n]=i.useState(s),[e,a]=i.useState(-1),[l,c]=i.useState(!1),d=i.useCallback((f,x)=>{var w;const v=f[x];v.hasAttribute("disabled")||v.getAttribute("aria-disabled")==="true"||((w=f[x])==null||w.click(),a(x))},[]),m=i.useCallback((f,x)=>{var g;if(f.preventDefault(),l||!x.length)return;const v=s!==-1?s:0;(g=x[v])==null||g.focus(),n(v),s!==-1&&d(x,v)},[s,l,d]),b=i.useCallback(f=>{var w;if(!f.shiftKey)return;f.preventDefault();const x=Array.from(document.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).filter(p=>!p.hasAttribute("disabled")&&p.tabIndex>=0),v=x.findIndex(p=>p.id===r),g=v>0?v-1:x.length-1;(w=x[g])==null||w.focus()},[r]),u=i.useCallback((f,x)=>{var y;if(!x.length)return;const v=f.target;if(!x.some(N=>N.id===v.id))return;const w=t!==-1?t:0;let p=w;switch(f.key){case"ArrowUp":case"ArrowLeft":f.preventDefault(),p=w>0?w-1:x.length-1;break;case"ArrowDown":case"ArrowRight":f.preventDefault(),p=(w+1)%x.length;break;case" ":f.preventDefault(),d(x,w);return;case"Tab":b(f);return;default:return}(y=x[p])==null||y.focus(),n(p),e!==-1&&d(x,p)},[t,e,b,d]),h=i.useCallback(()=>{const f=document.querySelector(`[id="${r}"][role="radiogroup"]`);return f?Array.from(f.querySelectorAll('[role="radio"]')):[]},[r]);i.useEffect(()=>{const f=document.querySelector(`[id="${r}"][role="radiogroup"]`);if(!f)return;const x=h(),v=y=>m(y,x),g=y=>u(y,x),w=()=>c(!0),p=()=>c(!1);return document.addEventListener("keydown",g),f.addEventListener("focus",v),f.addEventListener("mousedown",w),document.addEventListener("mouseup",p),()=>{document.removeEventListener("keydown",g),f.removeEventListener("focus",v),f.removeEventListener("mousedown",w),document.removeEventListener("mouseup",p)}},[r,h,m,u])}function _e({options:r=[],value:s,onChange:t,id:n,children:e,className:a="",childrenClassName:l="",hideInputs:c=!1}){const d=i.useId(),m=n||`radio-group-${d}`;Ue(m,r.findIndex(u=>u===s));const b=i.useMemo(()=>r.reduce((u,h)=>(typeof h=="string"?u.some(f=>f.value===h)||u.push({label:h,value:h}):u.push(h),u),[]),[r]);return o.jsxs("div",{id:m,role:"radiogroup",tabIndex:0,className:j.join(a,"focus:outline-none"),children:[b.length>0&&b.map((u,h)=>o.jsx(re,{value:u.value,isSelected:s===u.value,onChange:t,name:m,disabled:u.disabled,description:u.description,hideInput:c,className:l,children:u.label},`${u.value}-${h}`)),b.length===0&&e&&i.Children.map(e,u=>i.isValidElement(u)&&u.type===re?o.jsx(re,{...u.props,className:j.join(l,u.props.className),hideInput:u.props.hideInput||c,isSelected:s===u.props.value,onChange:t,name:m,children:u.props.children}):null)]})}function Qe(r){const s=i.useRef(null),t=i.useRef(null),n=i.useRef(null),[e,a]=i.useState(!1),[l,c]=i.useState(!1),[d,m]=i.useState({vertical:!1,horizontal:!1}),b=i.useRef(null),u=i.useRef(null),h=i.useCallback(()=>{const v=s.current;if(!v)return;const g=v.scrollHeight>v.clientHeight,w=v.scrollWidth>v.clientWidth;m({vertical:g,horizontal:w})},[]),f=i.useCallback(()=>{const v=s.current,g=t.current,w=n.current;if(v){if(g&&d.vertical){const y=(d.horizontal?v.clientHeight-r:v.clientHeight)/v.scrollHeight,N=Math.max(y*100,10),E=v.scrollHeight-v.clientHeight,A=E>0?v.scrollTop/E:0,C=100-N,I=A*C;g.style.height=`${N}%`,g.style.top=`${I}%`,g.style.transform="none"}if(w&&d.horizontal){const y=(d.vertical?v.clientWidth-r:v.clientWidth)/v.scrollWidth,N=Math.max(y*100,10),E=v.scrollWidth-v.clientWidth,A=E>0?v.scrollLeft/E:0,C=100-N,I=A*C;w.style.width=`${N}%`,w.style.left=`${I}%`,w.style.transform="none"}}},[d,r]),x=i.useCallback(()=>{b.current&&clearTimeout(b.current),u.current&&clearTimeout(u.current),a(!0),c(!1),f(),b.current=setTimeout(()=>{c(!0),u.current=setTimeout(()=>{a(!1),c(!1)},300)},1e3)},[f]);return i.useEffect(()=>{const v=s.current;if(!v)return;h();const g=new ResizeObserver(h);g.observe(v);const w=new MutationObserver(h);return w.observe(v,{childList:!0,subtree:!0,attributes:!0}),()=>{g.disconnect(),w.disconnect()}},[h]),i.useEffect(()=>{f()},[d,f]),i.useEffect(()=>()=>{b.current&&clearTimeout(b.current),u.current&&clearTimeout(u.current)},[]),{viewportRef:s,verticalThumbRef:t,horizontalThumbRef:n,isScrolling:e,isFadingOut:l,scrollbarVisible:d,handleScroll:x}}function Ze({className:r,thumbClassName:s,viewportClassName:t,scrollbarClassName:n,scrollbarThickness:e=10,children:a,id:l,ref:c,...d}){const{viewportRef:m,verticalThumbRef:b,horizontalThumbRef:u,isScrolling:h,isFadingOut:f,scrollbarVisible:x,handleScroll:v}=Qe(e),g=S.n("relative flex-1 rounded-full bg-slate-400/60 hover:bg-slate-400/80 active:bg-slate-400",s);return o.jsxs("div",{ref:c,id:l,className:S.n("relative overflow-hidden",r),"data-scroll-area-root":"",...d,children:[o.jsx("div",{ref:m,className:S.n("h-full w-full overflow-auto rounded-[inherit] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",t),onScroll:v,"data-scroll-area-viewport":"",children:a}),x.vertical&&(h||f)&&o.jsx("div",{className:S.n("touch-none select-none transition-all duration-300","p-[1px]","absolute right-0 top-0",f?"opacity-0":"opacity-100",n),"data-scroll-area-scrollbar":"vertical","data-state":h?"visible":"hidden",style:{width:`${e}px`,height:x.horizontal?`calc(100% - ${e}px)`:"100%"},children:o.jsx("div",{ref:b,className:S.n("absolute rounded-full",g),"data-scroll-area-thumb":"",style:{height:"20%",top:"0%",width:"100%"}})}),x.horizontal&&(h||f)&&o.jsx("div",{className:S.n("touch-none select-none transition-all duration-300","p-[1px]","absolute bottom-0 left-0",f?"opacity-0":"opacity-100",n),"data-scroll-area-scrollbar":"horizontal","data-state":h?"visible":"hidden",style:{height:`${e}px`,width:x.vertical?`calc(100% - ${e}px)`:"100%"},children:o.jsx("div",{ref:u,className:S.n("absolute rounded-full",g),"data-scroll-area-thumb":"",style:{width:"20%",left:"0%",height:"100%"}})}),x.vertical&&x.horizontal&&o.jsx("div",{className:S.n("bg-transparent","absolute bottom-0 right-0"),"data-scroll-area-corner":"",style:{height:`${e}px`,width:`${e}px`}})]})}function Je(r){const[s,t]=i.useState(!1),[n,e]=i.useState(!1);return i.useEffect(()=>{r?(e(!0),setTimeout(()=>t(!0),10)):(t(!1),setTimeout(()=>e(!1),150))},[r]),{show:s,shouldRender:n}}function Ye({isOpen:r,setIsOpen:s,filteredOptions:t,highlightedIndex:n,setHighlightedIndex:e,onSelect:a,triggerRef:l}){return{handleKeyDown:i.useCallback(d=>{var m;switch(d.key){case"ArrowDown":if(d.preventDefault(),!r)s(!0);else{const b=n<t.length-1?n+1:0;let u=b;for(let h=0;h<t.length;h++){const f=(b+h)%t.length;if(!t[f].disabled){u=f;break}}e(u)}break;case"ArrowUp":if(d.preventDefault(),!r)s(!0);else{const b=n>0?n-1:t.length-1;let u=b;for(let h=0;h<t.length;h++){const f=(b-h+t.length)%t.length;if(!t[f].disabled){u=f;break}}e(u)}break;case"Enter":case" ":if(d.preventDefault(),!r)s(!0);else if(n>=0&&n<t.length){const b=t[n];b.disabled||a(b)}break;case"Escape":d.preventDefault(),r&&(s(!1),(m=l.current)==null||m.focus());break;case"Tab":r&&s(!1);break}},[r,s,t,n,e,a,l])}}function Oe({isOpen:r,filteredOptions:s,selectedOption:t,shouldRender:n,optionsContainerRef:e}){const[a,l]=i.useState(-1),c=i.useMemo(()=>t?s.findIndex(d=>d.value===t.value):-1,[s,t]);return i.useEffect(()=>{r&&s.length>0?l(t&&c>=0?c:0):l(-1)},[s,r,t,c]),i.useEffect(()=>{if(a>=0&&e.current&&n){const d=()=>{const m=e.current,b=m==null?void 0:m.querySelector(`[data-option-index="${a}"]`);if(b){const u=r&&t&&a===c?"auto":"smooth";b.scrollIntoView({behavior:u,block:"nearest"})}};r&&n&&t?setTimeout(d,10):d()}},[a,n,r,t,s,e,c]),{highlightedIndex:a,setHighlightedIndex:l}}const fe={sm:{trigger:"px-2 py-1 text-sm",options:"px-2 py-2 text-xs"},md:{trigger:"px-3 py-2 text-base",options:"px-3 py-2.5 text-sm"},lg:{trigger:"px-4 py-3 text-lg",options:"px-4 py-3 text-base"}};function et({options:r,value:s,placeholder:t="Select an option...",searchable:n=!1,disabled:e=!1,clearable:a=!1,size:l="md",className:c,triggerClassName:d,dropdownClassName:m,id:b,ref:u,onChange:h,onSearch:f,searchPlaceholder:x="Search options..."}){const v=i.useId(),w=`${b??v}-listbox`,p=k=>`${w}-option-${k}`,[y,N]=i.useState(!1),[E,A]=i.useState(""),C=i.useRef(null),I=i.useRef(null),M=i.useRef(null),z=i.useRef(null),{show:H,shouldRender:L}=Je(y),T=i.useMemo(()=>!n||!E?r:r.filter(k=>{var $;return k.text.toLowerCase().includes(E.toLowerCase())||(($=k.description)==null?void 0:$.toLowerCase().includes(E.toLowerCase()))}),[r,n,E]),R=i.useMemo(()=>r.find(k=>k.value===s),[r,s]),{highlightedIndex:D,setHighlightedIndex:B}=Oe({isOpen:y,filteredOptions:T,selectedOption:R,shouldRender:L,optionsContainerRef:z}),P=D>=0?p(D):void 0;i.useEffect(()=>{y&&L&&n&&I.current&&I.current.focus()},[y,n,L]);const q=i.useCallback(k=>{var $;k.disabled||(h==null||h(k.value),N(!1),A(""),($=C.current)==null||$.focus())},[h]),{handleKeyDown:F}=Ye({isOpen:y,setIsOpen:N,filteredOptions:T,highlightedIndex:D,setHighlightedIndex:B,onSelect:q,triggerRef:C});i.useEffect(()=>{if(!y)return;const k=$=>{var Q;M.current&&!M.current.contains($.target)&&!((Q=C.current)!=null&&Q.contains($.target))&&(N(!1),A(""))};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[y]);const X=()=>{e||(N(!y),y||(A(""),B(-1)))},se=k=>{k.disabled||(h==null||h(k.value),N(!1),A(""))},oe=k=>{const $=k.target.value;A($),f==null||f($),B(-1)},ie=k=>{k.preventDefault(),k.stopPropagation(),h==null||h("")};return o.jsxs("div",{className:j.join("relative",c),id:b,ref:u,"data-select":"true","data-value":s,"data-searchable":n,"data-disabled":e,"data-clearable":a,children:[o.jsxs("div",{className:"relative",children:[o.jsxs("button",{ref:C,type:"button",className:j.join("flex items-center justify-between w-full text-left bg-inherit border border-border rounded-md transition-colors","hover:border-primary focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",e&&"opacity-50 cursor-not-allowed hover:border-border",y&&"border-primary ring-1 ring-primary",fe[l].trigger,d),onClick:X,onKeyDown:F,disabled:e,"aria-disabled":e,"aria-haspopup":"listbox","aria-expanded":y,"aria-controls":y?w:void 0,"aria-activedescendant":y&&!n?P:void 0,"aria-label":R?R.text:t,"data-select-trigger":"true",children:[o.jsx("span",{className:j.join("block truncate",!R&&"opacity-70"),children:R?R.text:t}),o.jsx("div",{className:"flex items-center ml-2",children:o.jsx(W.ChevronDown,{size:16,className:j.join("transition-transform duration-200",y&&"rotate-180")})})]}),a&&R&&o.jsx("button",{type:"button",onClick:ie,className:"absolute right-8 top-1/2 -translate-y-1/2 p-0.5 rounded hover:bg-accent/20 transition-colors group z-10","aria-label":"Clear selection","data-select-clear":"true",children:o.jsx(ae.X,{size:14,className:"opacity-70 group-hover:opacity-100 transition-opacity"})})]}),L&&o.jsxs("div",{ref:M,className:j.join("absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg transition-all duration-150",H?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",m),id:w,role:"listbox","data-select-content":"true",children:[n&&o.jsx("div",{className:"border-b border-border",children:o.jsx("input",{ref:I,type:"text",value:E,onChange:oe,onKeyDown:F,placeholder:x,className:"w-full px-2 py-2 text-inherit focus:outline-none","aria-autocomplete":"list","aria-controls":w,"aria-activedescendant":P,"data-select-search":"true"})}),o.jsx("div",{ref:z,className:"max-h-60 overflow-auto",children:T.length>0?T.map((k,$)=>o.jsxs("div",{id:p($),className:j.join("flex items-center cursor-pointer transition-colors","hover:bg-accent/10 focus:bg-accent/10",fe[l].options,k.disabled&&"opacity-50 cursor-not-allowed",$===D&&"bg-accent/20",s===k.value&&"bg-accent/30"),onClick:()=>se(k),role:"option","aria-selected":s===k.value,"aria-disabled":k.disabled,"data-select-option":"true","data-value":k.value,"data-highlighted":$===D,"data-option-index":$,children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium",children:k.text}),k.description&&o.jsx("div",{className:"text-xs opacity-70 mt-0.5",children:k.description})]}),s===k.value&&o.jsx(W.Check,{size:16,className:"ml-2 text-primary flex-shrink-0"})]},k.value)):o.jsx("div",{className:"px-3 py-2 text-sm opacity-70 text-center",children:n&&E?"No results found":"No options available"})})]})]})}const tt={thin:{horizontal:"h-px",vertical:"w-px"},medium:{horizontal:"h-0.5",vertical:"w-0.5"},thick:{horizontal:"h-1",vertical:"w-1"},"extra-thick":{horizontal:"h-2",vertical:"w-2"}},rt={horizontal:"w-full",vertical:"min-h-4 h-full"};function nt({orientation:r="horizontal",decorative:s=!1,thickness:t="thin",className:n,...e}){const a=j.join("shrink-0 bg-border",rt[r],tt[t][r],n);return o.jsx("div",{...e,className:a,role:s?"presentation":"separator","aria-orientation":s?void 0:r,"aria-hidden":s,"data-orientation":r,"data-thickness":t})}const me={shape:{rectangle:"rounded-md min-h-1",circle:"rounded-full aspect-square min-h-1",text:"rounded-sm min-h-1 h-4"},lineSpacing:{xs:"space-y-1",sm:"space-y-2",md:"space-y-3",lg:"space-y-4",xl:"space-y-6"}};function at({shape:r="rectangle",lineSpacing:s="sm",className:t,lines:n=1,animate:e=!0,ref:a,...l}){const c=j.join("bg-muted/70",e&&"animate-pulse",me.shape[r],t);return n>1?o.jsx("div",{ref:a,className:me.lineSpacing[s],role:"presentation","aria-hidden":"true","data-testid":"skeleton-container","data-lines":n,"data-shape":r,"data-animate":e,...l,children:Array.from({length:n},(d,m)=>o.jsx("div",{className:j.join(c,m===n-1&&"w-3/4"),role:"presentation","aria-hidden":"true","data-testid":"skeleton-line","data-line-index":m},m))}):o.jsx("div",{ref:a,className:c,role:"presentation","aria-hidden":"true","data-testid":"skeleton","data-shape":r,"data-animate":e,...l})}function st({id:r,value:s,defaultValue:t=0,onValueChange:n,min:e=0,max:a=100,step:l=1,disabled:c=!1,trackClassName:d,rangeClassName:m,thumbClassName:b,className:u,ref:h,ariaLabel:f,ariaLabelledBy:x,...v}){const[g,w]=i.useState(t),p=s!==void 0,y=p?s:g,N=i.useRef(null),E=i.useRef(!1),A=i.useRef(0),C=i.useCallback(T=>{const R=Math.max(e,Math.min(a,T)),D=Math.round(R/l)*l;p||w(D),n==null||n(D)},[e,a,l,p,n]),I=i.useCallback((T,R=!1)=>{var q;const D=(q=N.current)==null?void 0:q.getBoundingClientRect();if(!D)return y;let B=T.clientX;R&&(B=B-A.current);const P=Math.max(0,Math.min(1,(B-D.left)/D.width));return e+(a-e)*P},[e,a,y]),M=i.useCallback(T=>{if(c||T.target!==T.currentTarget)return;const R=I(T);C(R)},[c,I,C]),z=i.useCallback(T=>{var q;if(c)return;T.stopPropagation(),E.current=!0;const R=(q=N.current)==null?void 0:q.getBoundingClientRect(),D=T.currentTarget.getBoundingClientRect();if(R&&D){const F=D.left+D.width/2;A.current=T.clientX-F}T.currentTarget.setPointerCapture(T.pointerId);const B=F=>{if(!E.current)return;const X=I(F,!0);C(X)},P=F=>{if(F.pointerId===T.pointerId){E.current=!1,A.current=0;try{T.currentTarget.releasePointerCapture(F.pointerId)}catch{}document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",P)}};document.addEventListener("pointermove",B),document.addEventListener("pointerup",P)},[c,I,C]),H=i.useCallback(T=>{if(c)return;let R=y;switch(T.key){case"ArrowRight":case"ArrowUp":R=y+l;break;case"ArrowLeft":case"ArrowDown":R=y-l;break;case"Home":R=e;break;case"End":R=a;break;case"PageUp":R=y+l*10;break;case"PageDown":R=y-l*10;break;default:return}T.preventDefault(),C(R)},[c,y,l,e,a,C]),L=a===e?0:(y-e)/(a-e)*100;return o.jsx("div",{id:r,ref:h,className:S.n("relative flex items-center w-full touch-none select-none",c&&"opacity-50 cursor-not-allowed",u),"data-disabled":c,"data-value":y,"data-min":e,"data-max":a,"data-step":l,...v,children:o.jsxs("div",{ref:N,className:S.n("relative h-1.5 w-full rounded-full bg-muted cursor-pointer",c&&"cursor-not-allowed",d),onPointerDown:M,children:[o.jsx("div",{className:S.n("absolute h-full rounded-full pointer-events-none",!E.current&&"transition-all",m),style:{width:`${L}%`}}),o.jsx("div",{className:S.n("absolute size-5 -top-2 rounded-full shadow-md cursor-grab",c&&"cursor-not-allowed",!c&&"cursor-grab focus:outline-none focus:ring-2",E.current?"cursor-grabbing scale-110":"transition-all",b),style:{left:`calc(${L}% - 10px)`},tabIndex:c?-1:0,role:"slider","aria-valuemin":e,"aria-valuemax":a,"aria-valuenow":y,"aria-label":f,"aria-labelledby":x,"aria-disabled":c,onKeyDown:H,onPointerDown:z})]})})}function ot({children:r,ref:s,...t}){if(i.isValidElement(r)){let n={...t};return r.props&&(n={...n,...r.props}),i.cloneElement(r,{...n,ref:e=>{typeof s=="function"?s(e):s&&(s.current=e)}})}return i.createElement("div",{...t,ref:s},r)}const it=({defaultValue:r,value:s,onValueChange:t}={})=>{const[n,e]=i.useState(r||""),a=s!==void 0,l=a?s:n,c=i.useCallback(d=>{a||e(d),t==null||t(d)},[a,t]);return{value:l,onValueChange:c}};function lt({defaultValue:r,value:s,onValueChange:t,tabsWidth:n="fit",variant:e="underline",className:a,children:l,ref:c,id:d,triggersClassName:m,contentClassName:b}){const{value:u,onValueChange:h}=it({defaultValue:r,value:s,onValueChange:t}),f={selectedValue:u,onValueChange:h,tabsWidth:n,variant:e,triggersClassName:m,contentClassName:b};return o.jsx(S.TabsContext.Provider,{value:f,children:o.jsx("div",{id:d,ref:c,className:a,"data-tabs-width":n,"data-variant":e,children:l})})}function ct({value:r,className:s,children:t,ref:n}){const{selectedValue:e,contentClassName:a}=S.useTabsContext(),l=e===r;return l?o.jsx("div",{ref:n,role:"tabpanel",id:`tabs-content-${r}`,"aria-labelledby":`tabs-trigger-${r}`,"data-state":l?"active":"inactive","data-value":r,className:j.join("mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2",a,s),tabIndex:0,children:t}):null}const be={width:{fit:"w-fit",full:"w-full *:flex-1"},variant:{underline:"border-b border-border",pills:"",bordered:"border border-border rounded-lg p-1"}},ut={underline:"border-b-2 border-transparent data-[state=active]:border-accent data-[state=active]:text-accent hover:text-accent-foreground",pills:"rounded-md data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30",bordered:"rounded data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30"};function dt({children:r,className:s,id:t,ref:n}){const{tabsWidth:e,variant:a}=S.useTabsContext();return o.jsx("div",{id:t,ref:n,role:"tablist",className:j.join("flex",be.width[e],be.variant[a],s),"data-tabs-width":e,"data-variant":a,children:r})}function ft({value:r,disabled:s=!1,className:t,children:n,onClick:e,id:a,ref:l}){const{selectedValue:c,onValueChange:d,variant:m,triggersClassName:b}=S.useTabsContext(),u=c===r,h=x=>{s||d(r),e==null||e(x)};return o.jsx("button",{id:a,ref:l,role:"tab",type:"button","aria-selected":u,"aria-controls":`tabs-content-${r}`,"data-state":u?"active":"inactive","data-value":r,disabled:s,className:j.join("inline-flex items-center justify-center whitespace-nowrap px-3 py-2 text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",u?"font-medium":"font-light",ut[m],b,t),onClick:h,children:n})}function mt({elementId:r,maxLength:s}){const[t,n]=i.useState(0);return i.useEffect(()=>{const e=document.getElementById(r);if(!e)return;const a=()=>{const l=e.value.length;n(l);const c=l>=s;e.setAttribute("aria-describedby",`${r}-character-count`),e.setAttribute("aria-invalid",c?"true":"false"),c?e.setAttribute("data-error","true"):e.removeAttribute("data-error")};return a(),e.addEventListener("input",a),e.setAttribute("maxlength",String(s)),()=>{e.removeEventListener("input",a),e.removeAttribute("maxlength"),e.removeAttribute("aria-describedby"),e.removeAttribute("aria-invalid"),e.removeAttribute("data-error")}},[r,s]),o.jsx("small",{className:j.join("mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end",t>=s&&"text-destructive",t<s&&"text-current"),role:"status",children:o.jsxs("span",{id:`${r}-character-count`,children:[t," / ",s," characters"]})})}function bt(r,s){i.useEffect(()=>{const t=document.getElementById(r);if(!t)return;if(!s){t.style.height="auto";return}const n=()=>{t.style.height="auto",t.style.height=`${t.scrollHeight}px`};return n(),t.addEventListener("input",n),t.addEventListener("resize",n),window.addEventListener("resize",n),()=>{t.removeEventListener("input",n),t.removeEventListener("resize",n),window.removeEventListener("resize",n)}},[r,s])}const ht={base:"","left-line":"border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success",outline:"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success"},xt={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"px-3 rounded-full"},he={variant:"outline",rounded:"none"};function vt({variant:r=he.variant,rounded:s,displayOnlyMode:t=!1,errorMessage:n,successMessage:e,hideResizeHandle:a=!1,autoExpand:l=!1,characterLimit:c=0,className:d,...m}){const b=i.useId();bt(b,l||t);let u=s;r==="outline"&&!s&&(u="md"),u=u||he.rounded;let h=a;(t||r==="left-line"&&!a)&&(h=!0);const x=j.join("appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all",!t&&ht[r],!t&&xt[u],!t&&"px-2 py-1",t&&"pointer-events-none",h&&"no-resize-handle",d);return o.jsxs("div",{className:j.join("-space-y-1.5",t&&"cursor-text"),children:[o.jsx("textarea",{...m,id:b,"aria-disabled":m.disabled,readOnly:t,"aria-readonly":t||m["aria-readonly"],style:{resize:l?"none":void 0},className:x}),c>0&&o.jsx(mt,{elementId:b,maxLength:c}),!t&&o.jsx(ne,{elementId:b,type:"error",message:n}),!t&&o.jsx(ne,{elementId:b,type:"success",message:e})]})}const gt={sm:{container:"h-5 min-w-9 w-9",thumb:"h-4 w-4",translate:"translate-x-4"},md:{container:"h-6 min-w-11 w-11",thumb:"h-5 w-5",translate:"translate-x-5"},lg:{container:"h-7 min-w-13 w-13",thumb:"h-6 w-6",translate:"translate-x-6"}},pt={default:{unchecked:"bg-muted",checked:"bg-primary"},success:{unchecked:"bg-muted",checked:"bg-success"},destructive:{unchecked:"bg-muted",checked:"bg-destructive"}},xe={variant:"default",size:"md"};function yt({ref:r,id:s,size:t=xe.size,variant:n=xe.variant,checked:e,onCheckedChange:a,disabled:l=!1,className:c,thumbClassName:d,backgroundClassNames:m,...b}){const u=i.useId(),h=i.useMemo(()=>s||`toggle-${u}`,[s,u]),[f,x]=i.useState(e);i.useEffect(()=>{x(e)},[e]);const v=()=>{if(!l){const E=!f;e===void 0&&x(E),a==null||a(E)}},g=E=>{(E.key===" "||E.key==="Enter")&&(E.preventDefault(),v())},w=gt[t],p=pt[n],y=j.join("relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out","focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",w.container,f?(m==null?void 0:m.checked)||p.checked:(m==null?void 0:m.unchecked)||p.unchecked,l&&"opacity-50 cursor-not-allowed",!l&&"cursor-pointer",c),N=j.join("absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out",w.thumb,f&&w.translate,d);return o.jsxs("button",{ref:r,id:h,type:"button",role:"switch",tabIndex:0,"aria-checked":f,"aria-disabled":l,disabled:l,onClick:v,onKeyDown:g,className:y,...b,children:[o.jsx("span",{className:N}),o.jsx("span",{className:"sr-only",children:f?"Enabled":"Disabled"})]})}const O=8,ee=4,G=6;function wt(r){return{calculatePosition:i.useCallback((t,n)=>{const e=t.getBoundingClientRect(),a=n.getBoundingClientRect(),l={width:window.innerWidth,height:window.innerHeight},c=(h,f,x,v)=>h<0||f<0||h+x>l.width||f+v>l.height,d={top:{x:e.left+e.width/2-a.width/2,y:e.top-a.height-ee,arrow:{x:a.width/2-G,y:a.height}},bottom:{x:e.left+e.width/2-a.width/2,y:e.bottom+ee,arrow:{x:a.width/2-G,y:-6}},left:{x:e.left-a.width-ee,y:e.top+e.height/2-a.height/2,arrow:{x:a.width,y:a.height/2-G}},right:{x:e.right+ee,y:e.top+e.height/2-a.height/2,arrow:{x:-6,y:a.height/2-G}}};let m=r,b=d[r];if(c(b.x,b.y,a.width,a.height)){const h={top:"bottom",bottom:"top",left:"right",right:"left"},f=d[h[r]];if(!c(f.x,f.y,a.width,a.height))m=h[r],b=f;else{const x=["top","bottom","left","right"].filter(v=>v!==r&&v!==h[r]);for(const v of x){const g=d[v];if(!c(g.x,g.y,a.width,a.height)){m=v,b=g;break}}}}b.x=Math.max(O,Math.min(b.x,l.width-a.width-O)),b.y=Math.max(O,Math.min(b.y,l.height-a.height-O));const u={x:e.left+e.width/2,y:e.top+e.height/2};return m==="top"||m==="bottom"?b.arrow.x=Math.max(G,Math.min(u.x-b.x-G,a.width-G*2)):b.arrow.y=Math.max(G,Math.min(u.y-b.y-G,a.height-G*2)),{...b,placement:m}},[r])}}function jt(r,s,t){const n=i.useRef(null),e=i.useRef(null),a=i.useCallback(()=>{if(!n.current||!e.current)return;const l=r(n.current,e.current);t(l)},[r,t]);return i.useEffect(()=>{if(!s)return;const l=()=>a();return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[s,a]),{triggerRef:n,tooltipRef:e,updatePosition:a}}function Nt(r,s,t,n,e,a,l,c,d){const m=i.useRef(null),b=i.useCallback(()=>{r||(m.current&&clearTimeout(m.current),m.current=window.setTimeout(()=>{t(!0),requestAnimationFrame(()=>{e(),n(!0)})},s))},[r,s,t,e,n]),u=i.useCallback((h=!1)=>{if(m.current&&clearTimeout(m.current),h){n(!1),setTimeout(()=>t(!1),150);return}m.current=window.setTimeout(()=>{n(!1),setTimeout(()=>t(!1),150)},100)},[n,t]);return i.useEffect(()=>{!a&&!l&&!c&&d&&u()},[a,l,c,d,u]),i.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]),{showTooltip:b,hideTooltip:u,timeoutRef:m}}function Et({id:r,children:s,message:t,placement:n="top",disabled:e=!1,delay:a=200,className:l}){const[c,d]=i.useState(!1),[m,b]=i.useState(!1),[u,h]=i.useState(null),[f,x]=i.useState(!1),[v,g]=i.useState(!1),[w,p]=i.useState(!1),{calculatePosition:y}=wt(n),{triggerRef:N,tooltipRef:E,updatePosition:A}=jt(y,m,h),{showTooltip:C,hideTooltip:I,timeoutRef:M}=Nt(e,a,b,d,A,f,v,w,c),z=i.useId(),H=r??z;return o.jsxs(o.Fragment,{children:[i.cloneElement(s,{ref:L=>{N.current=L},onMouseEnter:()=>{x(!0),C()},onMouseLeave:()=>{x(!1)},onFocus:()=>{p(!0),C()},onBlur:()=>{p(!1),I(!0)},onKeyDown:L=>{L.key==="Escape"&&I(!0)},"aria-describedby":e?void 0:H}),m&&ce.createPortal(o.jsx("div",{ref:E,id:H,role:"tooltip",className:j.join("fixed z-50 px-2 py-1 text-sm rounded shadow-lg bg-popover pointer-events-auto transition-all duration-150 ease-out",c?"opacity-100":"opacity-0",l),style:u?{left:u.x,top:u.y}:{opacity:0},onMouseEnter:()=>{g(!0),M.current&&clearTimeout(M.current)},onMouseLeave:()=>{g(!1)},children:t}),document.body)]})}exports.ActionModal=S.ActionModal;exports.Toast=S.Toast;exports.Accordion=we;exports.AccordionItem=te;exports.Button=ge;exports.ButtonLoadingDots=ve;exports.Carousel=Se;exports.Checkbox=Te;exports.Clickable=Re;exports.Input=$e;exports.Label=De;exports.Modal=We;exports.Pagination=He;exports.Panel=Xe;exports.RadioGroup=_e;exports.RadioGroupItem=re;exports.RadioInput=pe;exports.ScrollArea=Ze;exports.Select=et;exports.Separator=nt;exports.Skeleton=at;exports.Slider=st;exports.Slot=ot;exports.Tabs=lt;exports.TabsContent=ct;exports.TabsList=dt;exports.TabsTrigger=ft;exports.Textarea=vt;exports.Toggle=yt;exports.Tooltip=Et;
2
2
  //# sourceMappingURL=components.cjs.js.map