@moondreamsdev/dreamer-ui 1.7.10-test.71 → 1.7.10-test.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Toast-BQd9qUvu.cjs +2 -0
- package/dist/Toast-BQd9qUvu.cjs.map +1 -0
- package/dist/{Toast-wij4-47b.js → Toast-B_wskXW1.js} +11 -10
- package/dist/Toast-B_wskXW1.js.map +1 -0
- package/dist/components.cjs.js +2 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +69 -69
- package/dist/components.esm.js.map +1 -1
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.esm.js +1 -1
- package/dist/src/components/dropdown-menu/DropdownContext.d.ts +16 -0
- package/dist/src/components/dropdown-menu/DropdownMenu.d.ts +9 -0
- package/dist/src/components/dropdown-menu/DropdownMenuBody.d.ts +6 -0
- package/dist/src/components/dropdown-menu/DropdownMenuOption.d.ts +7 -0
- package/dist/src/components/dropdown-menu/DropdownMenuSub.d.ts +6 -0
- package/dist/src/components/dropdown-menu/factories.d.ts +5 -0
- package/dist/src/components/dropdown-menu/hooks.d.ts +12 -0
- package/dist/src/components/dropdown-menu/index.d.ts +3 -0
- package/dist/src/components/dropdown-menu/types.d.ts +26 -0
- package/package.json +1 -1
- package/dist/Toast-Bz9EDB8J.cjs +0 -2
- package/dist/Toast-Bz9EDB8J.cjs.map +0 -1
- package/dist/Toast-wij4-47b.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),e=require("react"),O=require("react-dom"),C=require("./X-CgjeP2OI.cjs"),S=require("./join-BVMUUvyP.cjs");function g(...t){return t.filter(r=>typeof r=="string"&&r).join(" ").trim()||void 0}function B({size:t=15,color:r="currentColor",className:a="inline",...l}){return n.jsx("svg",{...l,width:t,height:t,className:a,viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{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",fill:r,fillRule:"evenodd",clipRule:"evenodd"})})}function h(...t){return t.filter(r=>typeof r=="string"&&r).join(" ").trim()||void 0}e.createContext(void 0);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(void 0);e.createContext(void 0);e.createContext(null);e.createContext(void 0);e.createContext(void 0);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);e.createContext(null);function M(){const[t,r]=e.useState(0);return e.useEffect(()=>{const a=setInterval(()=>{r(l=>(l+1)%3)},500);return()=>clearInterval(a)},[]),n.jsx("div",{className:"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle",children:[0,1,2].map(a=>n.jsx("div",{className:g("rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",t===a&&"transform -translate-y-1")},a))})}const D={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"},H={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"},P={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},p={variant:"primary",size:"md",rounded:"md"};function V({variant:t=p.variant,size:r,rounded:a=p.rounded,loading:l,linkTo:o,linkProps:s,type:i="button",className:u,...c}){let d;t==="link"&&!r?d="fitted":d=r||p.size;const x=g("appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",D[t],H[d],P[a],l&&"relative pointer-events-none",o&&"relative",u);return n.jsxs("button",{...c,role:o?"link":c.role,"aria-label":c["aria-label"]||(s==null?void 0:s["aria-label"]),"aria-description":c["aria-description"]||(s==null?void 0:s["aria-description"]),"aria-disabled":c.disabled||l,"aria-busy":l,type:i,className:x,children:[l&&n.jsx(M,{}),n.jsx("span",{className:g(l&&"invisible"),children:c.children}),o&&!c.disabled&&n.jsx("a",{...s,"aria-hidden":!0,href:o,rel:(s==null?void 0:s.rel)||"noreferrer",className:"absolute inset-0"})]})}function X(t){const[r,a]=e.useState(!1),[l,o]=e.useState(!1);return e.useEffect(()=>{t?(o(!0),setTimeout(()=>a(!0),10)):(a(!1),setTimeout(()=>o(!1),150))},[t]),{show:r,shouldRender:l}}function F(t,r){e.useEffect(()=>{const a=l=>{l.key==="Escape"&&t&&r()};return document.addEventListener("keydown",a),t&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",a),document.body.style.overflow="auto"}},[t,r])}function K(t,r){const a=e.useRef(null),l=e.useCallback(()=>{const o=document.getElementById(t);if(!o)return;const s=o.querySelectorAll('[data-modal-action="true"]');if(s.length>0){s[0].focus();return}const i=o.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(i.length>0){const u=Array.from(i).filter(c=>!(c instanceof HTMLButtonElement&&c.getAttribute("data-modal-close-button")==="true"));if(u.length>0){u[0].focus();return}i[0].focus();return}o.focus()},[t]);e.useEffect(()=>(r&&(a.current=document.activeElement,l()),()=>{document.body.style.overflow="auto",a.current instanceof HTMLElement&&a.current.focus()}),[r,l])}function Z({id:t,isOpen:r,onClose:a,title:l,children:o,contentOnly:s=!1,className:i,overlayClassName:u,hideCloseButton:c=!1,actions:d=[],disableCloseOnOverlayClick:x=!1,ariaLabelledBy:m,ariaDescribedBy:f}){const b=e.useId(),y=t||`modal-${b}`,j=t?`${t}-title`:`modal-title-${b}`,{show:k,shouldRender:v}=X(r);if(K(y,v),F(v,a),!v)return null;const E=()=>l?e.isValidElement(l)?n.jsx("div",{className:"mb-4",children:l}):n.jsx("h2",{className:"mb-4 text-xl font-semibold",id:j,children:l}):null,T=()=>d.length===0?null:n.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:d.map((L,z)=>{const{label:q,className:A,...I}=L;return n.jsx(V,{className:A,type:"button",...I,"data-modal-action":"true",children:q},z)})});return n.jsx(n.Fragment,{children:O.createPortal(n.jsx("div",{"aria-labelledby":m??l?j:void 0,"aria-describedby":f,role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] overflow-y-auto",children:n.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4",children:[n.jsx("div",{className:h("fixed inset-0 bg-black/20 transition-all",u),onClick:()=>{x||a()}}),s&&n.jsx("div",{className:h("relative w-fit",i),children:o}),!s&&n.jsxs("div",{id:y,tabIndex:-1,className:h("relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover text-popover-foreground transition-all p-6 focus:ring ease-in duration-75",k?"opacity-100 scale-100":"opacity-0 scale-90",i),children:[!c&&n.jsx("button",{type:"button",onClick:a,"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:n.jsx(B,{size:18})}),E(),o,T()]})]})}),document.body)})}function G({type:t,message:r,cancelText:a,confirmText:l,onConfirm:o,onClose:s,destructive:i=!1,title:u,...c}){const d=e.useMemo(()=>t==="confirm"?{confirm:l||"Confirm",cancel:a||"Cancel",defaultTitle:u||"Confirm Action"}:{confirm:l||"OK",cancel:null,defaultTitle:u||"Alert"},[t,l,u,a]),x=e.useMemo(()=>[...d.cancel?[{label:d.cancel,variant:"secondary",onClick:s}]:[],{label:d.confirm,variant:i?"destructive":"primary",onClick:()=>{o==null||o(),s()}}],[d,i,o,s]);return n.jsx(Z,{...c,title:u||d.defaultTitle,onClose:s,actions:x,disableCloseOnOverlayClick:t==="confirm",hideCloseButton:t==="confirm",children:typeof r=="string"?n.jsx("p",{className:"text-sm",children:r}):r})}const N=e.createContext(null),J=()=>{const t=e.useContext(N);if(!t)throw new Error("Tabs components must be used within a Tabs component");return t},w={info:{className:"bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",icon:n.jsx(C.InfoCircled,{size:20})},warning:{className:"bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",icon:n.jsx(C.ExclamationTriangle,{size:20})},error:{className:"bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",icon:n.jsx(C.CrossCircled,{size:20})}};function Q({id:t,title:r,description:a,type:l="info",action:o,duration:s=5e3,onRemove:i,customTypes:u,customComponent:c}){const[d,x]=e.useState(!1),m=e.useCallback(()=>{x(!0),setTimeout(()=>{i==null||i(t)},150)},[t,i]);if(e.useEffect(()=>{if(s>0){const b=setTimeout(()=>{m()},s);return()=>clearTimeout(b)}},[s,t,i,m]),c)return n.jsx(c,{id:t,title:r,description:a,type:l,action:o,duration:s,onRemove:i});const f=(u==null?void 0:u[l])||w[l]||w.info;return n.jsxs("div",{role:l==="error"?"alert":"status","aria-live":l==="error"?void 0:"polite",className:S.join("relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",o&&"pb-3",f.className,d?"opacity-0 translate-x-full":"opacity-100 translate-x-0"),children:[n.jsx("div",{className:"flex-shrink-0 mr-3",children:f.icon}),n.jsxs("div",{className:"flex-grow min-w-0",children:[n.jsx("div",{className:"font-medium text-sm leading-5",children:r}),a&&n.jsx("div",{className:"mt-1 text-sm opacity-90 leading-5",children:a}),o&&n.jsx("div",{className:"mt-1.5",children:n.jsx("button",{onClick:o.onClick,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",children:o.label})})]}),n.jsx("button",{onClick:m,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",children:n.jsx(C.X,{size:16})})]})}exports.ActionModal=G;exports.TabsContext=N;exports.Toast=Q;exports.n=g;exports.useTabsContext=J;
|
|
2
|
+
//# sourceMappingURL=Toast-BQd9qUvu.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast-BQd9qUvu.cjs","sources":["join-BmgR_f4v.js","X-CIoyLewf.js","Toast-wij4-47b.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 j\n};\n//# sourceMappingURL=join-BmgR_f4v.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 t, Fragment as q, jsxs as b } from \"react/jsx-runtime\";\nimport D, { createContext as e, useId as H, useState as h, useEffect as g, useRef as K, useCallback as z, useMemo as E, useContext as P } from \"react\";\nimport { createPortal as V } from \"react-dom\";\nimport { X as F, C as X, E as Z, I as G } from \"./X-CIoyLewf.js\";\nimport { j as J } from \"./join-BmgR_f4v.js\";\nfunction N(...l) {\n return l.filter((r) => typeof r == \"string\" && r).join(\" \").trim() || void 0;\n}\nfunction Q({ size: l = 15, color: r = \"currentColor\", className: i = \"inline\", ...n }) {\n return /* @__PURE__ */ t(\n \"svg\",\n {\n ...n,\n width: l,\n height: l,\n className: i,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ t(\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: r,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction x(...l) {\n return l.filter((r) => typeof r == \"string\" && r).join(\" \").trim() || void 0;\n}\ne(void 0);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(void 0);\ne(void 0);\ne(null);\ne(void 0);\ne(void 0);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\nfunction U() {\n const [l, r] = h(0);\n return g(() => {\n const i = setInterval(() => {\n r((n) => (n + 1) % 3);\n }, 500);\n return () => clearInterval(i);\n }, []), /* @__PURE__ */ t(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((i) => /* @__PURE__ */ t(\n \"div\",\n {\n className: N(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n l === i && \"transform -translate-y-1\"\n )\n },\n i\n )) });\n}\nconst W = {\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}, Y = {\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 R({\n variant: l = w.variant,\n size: r,\n rounded: i = w.rounded,\n loading: n,\n linkTo: a,\n linkProps: o,\n type: s = \"button\",\n className: d,\n ...u\n}) {\n let c;\n l === \"link\" && !r ? c = \"fitted\" : c = r || 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 W[l],\n Y[c],\n _[i],\n n && \"relative pointer-events-none\",\n a && \"relative\",\n d\n );\n return /* @__PURE__ */ b(\n \"button\",\n {\n ...u,\n role: a ? \"link\" : u.role,\n \"aria-label\": u[\"aria-label\"] || (o == null ? void 0 : o[\"aria-label\"]),\n \"aria-description\": u[\"aria-description\"] || (o == null ? void 0 : o[\"aria-description\"]),\n \"aria-disabled\": u.disabled || n,\n \"aria-busy\": n,\n type: s,\n className: m,\n children: [\n n && /* @__PURE__ */ t(U, {}),\n /* @__PURE__ */ t(\"span\", { className: N(n && \"invisible\"), children: u.children }),\n a && !u.disabled && /* @__PURE__ */ t(\n \"a\",\n {\n ...o,\n \"aria-hidden\": !0,\n href: a,\n rel: (o == null ? void 0 : o.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction $(l) {\n const [r, i] = h(!1), [n, a] = h(!1);\n return g(() => {\n l ? (a(!0), setTimeout(() => i(!0), 10)) : (i(!1), setTimeout(() => a(!1), 150));\n }, [l]), { show: r, shouldRender: n };\n}\nfunction ee(l, r) {\n g(() => {\n const i = (n) => {\n n.key === \"Escape\" && l && r();\n };\n return document.addEventListener(\"keydown\", i), l && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", i), document.body.style.overflow = \"auto\";\n };\n }, [l, r]);\n}\nfunction le(l, r) {\n const i = K(null), n = z(() => {\n const a = document.getElementById(l);\n if (!a) return;\n const o = a.querySelectorAll('[data-modal-action=\"true\"]');\n if (o.length > 0) {\n o[0].focus();\n return;\n }\n const s = a.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const d = Array.from(s).filter((u) => !(u instanceof HTMLButtonElement && u.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (d.length > 0) {\n d[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n a.focus();\n }, [l]);\n g(() => (r && (i.current = document.activeElement, n()), () => {\n document.body.style.overflow = \"auto\", i.current instanceof HTMLElement && i.current.focus();\n }), [r, n]);\n}\nfunction ne({\n id: l,\n isOpen: r,\n onClose: i,\n title: n,\n children: a,\n contentOnly: o = !1,\n className: s,\n overlayClassName: d,\n hideCloseButton: u = !1,\n actions: c = [],\n disableCloseOnOverlayClick: m = !1,\n ariaLabelledBy: f,\n ariaDescribedBy: p\n}) {\n const v = H(), k = l || `modal-${v}`, C = l ? `${l}-title` : `modal-title-${v}`, { show: T, shouldRender: y } = $(r);\n if (le(k, y), ee(y, i), !y) return null;\n const j = () => n ? D.isValidElement(n) ? /* @__PURE__ */ t(\"div\", { className: \"mb-4\", children: n }) : /* @__PURE__ */ t(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: C, children: n }) : null, I = () => c.length === 0 ? null : /* @__PURE__ */ t(\"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((A, O) => {\n const { label: B, className: M, ...S } = A;\n return /* @__PURE__ */ t(R, { className: M, type: \"button\", ...S, \"data-modal-action\": \"true\", children: B }, O);\n }) });\n return /* @__PURE__ */ t(q, { children: V(\n /* @__PURE__ */ t(\n \"div\",\n {\n \"aria-labelledby\": f ?? n ? C : void 0,\n \"aria-describedby\": p,\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__ */ t(\n \"div\",\n {\n className: x(\"fixed inset-0 bg-black/20 transition-all\", d),\n onClick: () => {\n m || i();\n }\n }\n ),\n o && /* @__PURE__ */ t(\"div\", { className: x(\"relative w-fit\", s), children: a }),\n !o && /* @__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 text-popover-foreground transition-all p-6 focus:ring ease-in duration-75\",\n T ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !u && /* @__PURE__ */ t(\n \"button\",\n {\n type: \"button\",\n onClick: i,\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__ */ t(Q, { size: 18 })\n }\n ),\n j(),\n a,\n I()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction ue({\n type: l,\n message: r,\n cancelText: i,\n confirmText: n,\n onConfirm: a,\n onClose: o,\n destructive: s = !1,\n title: d,\n ...u\n}) {\n const c = E(() => l === \"confirm\" ? {\n confirm: n || \"Confirm\",\n cancel: i || \"Cancel\",\n defaultTitle: d || \"Confirm Action\"\n } : {\n confirm: n || \"OK\",\n cancel: null,\n defaultTitle: d || \"Alert\"\n }, [l, n, d, i]), m = E(\n () => [\n ...c.cancel ? [\n {\n label: c.cancel,\n variant: \"secondary\",\n onClick: o\n }\n ] : [],\n {\n label: c.confirm,\n variant: s ? \"destructive\" : \"primary\",\n onClick: () => {\n a == null || a(), o();\n }\n }\n ],\n [c, s, a, o]\n );\n return /* @__PURE__ */ t(\n ne,\n {\n ...u,\n title: d || c.defaultTitle,\n onClose: o,\n actions: m,\n disableCloseOnOverlayClick: l === \"confirm\",\n hideCloseButton: l === \"confirm\",\n children: typeof r == \"string\" ? /* @__PURE__ */ t(\"p\", { className: \"text-sm\", children: r }) : r\n }\n );\n}\nconst te = e(null), de = () => {\n const l = P(te);\n if (!l)\n throw new Error(\"Tabs components must be used within a Tabs component\");\n return l;\n}, L = {\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__ */ t(G, { 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__ */ t(Z, { 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__ */ t(X, { size: 20 })\n }\n};\nfunction ce({\n id: l,\n title: r,\n description: i,\n type: n = \"info\",\n action: a,\n duration: o = 5e3,\n onRemove: s,\n customTypes: d,\n customComponent: u\n}) {\n const [c, m] = h(!1), f = z(() => {\n m(!0), setTimeout(() => {\n s == null || s(l);\n }, 150);\n }, [l, s]);\n if (g(() => {\n if (o > 0) {\n const v = setTimeout(() => {\n f();\n }, o);\n return () => clearTimeout(v);\n }\n }, [o, l, s, f]), u)\n return /* @__PURE__ */ t(\n u,\n {\n id: l,\n title: r,\n description: i,\n type: n,\n action: a,\n duration: o,\n onRemove: s\n }\n );\n const p = (d == null ? void 0 : d[n]) || L[n] || L.info;\n return /* @__PURE__ */ b(\n \"div\",\n {\n role: n === \"error\" ? \"alert\" : \"status\",\n \"aria-live\": n === \"error\" ? void 0 : \"polite\",\n className: J(\n \"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out\",\n a && \"pb-3\",\n p.className,\n c ? \"opacity-0 translate-x-full\" : \"opacity-100 translate-x-0\"\n ),\n children: [\n /* @__PURE__ */ t(\"div\", { className: \"flex-shrink-0 mr-3\", children: p.icon }),\n /* @__PURE__ */ b(\"div\", { className: \"flex-grow min-w-0\", children: [\n /* @__PURE__ */ t(\"div\", { className: \"font-medium text-sm leading-5\", children: r }),\n i && /* @__PURE__ */ t(\"div\", { className: \"mt-1 text-sm opacity-90 leading-5\", children: i }),\n a && /* @__PURE__ */ t(\"div\", { className: \"mt-1.5\", children: /* @__PURE__ */ t(\n \"button\",\n {\n onClick: a.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: a.label\n }\n ) })\n ] }),\n /* @__PURE__ */ t(\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__ */ t(F, { size: 16 })\n }\n )\n ]\n }\n );\n}\nexport {\n ue as A,\n ce as T,\n te as a,\n N as n,\n de as u\n};\n//# sourceMappingURL=Toast-wij4-47b.js.map\n","import { jsxs as k, jsx as i, Fragment as Q } from \"react/jsx-runtime\";\nimport H, { useId as F, useState as $, createElement as ze, useEffect as A, useRef as V, useCallback as S, useMemo as G, isValidElement as Le, cloneElement as je } from \"react\";\nimport { j as N } from \"./join-BmgR_f4v.js\";\nimport { f as $e, j as Ve, c as Se, g as Ae, h as Ie, b as ve, D as Be, W as Me, k as We, i as Ke, C as Fe, a as He, l as Pe, E as Ze, Q as _e, d as qe, e as Ge } from \"./Window-uX5BuBwi.js\";\nimport { n as B, a as Ye, u as ge } from \"./Toast-wij4-47b.js\";\nimport { A as Jr, T as Qr } from \"./Toast-wij4-47b.js\";\nimport { X as oe, E as De, C as Ue, I as Xe } from \"./X-CIoyLewf.js\";\nimport { createPortal as ae } from \"react-dom\";\nimport { downloadFile as Je, mergeRefs as Qe } from \"./utils.esm.js\";\nfunction he({\n id: a,\n title: o,\n content: t,\n children: r,\n className: e = \"\",\n disabled: n = !1,\n isOpen: s = !1,\n onToggle: l,\n triggerClassName: c = \"\",\n bodyClassName: m = \"\"\n}) {\n const f = F(), d = a || `accordion-item-${f}`, h = `${d}-header`, u = `${d}-panel`, v = () => {\n !n && l && l();\n }, b = (p) => {\n (p.key === \"Enter\" || p.key === \" \") && (p.preventDefault(), v());\n };\n return /* @__PURE__ */ k(\"div\", { className: N(\"border-b border-gray-200\", n && \"opacity-60 cursor-not-allowed\", e), children: [\n /* @__PURE__ */ k(\n \"button\",\n {\n id: h,\n type: \"button\",\n className: N(\n \"w-full text-left py-3 px-4 flex justify-between items-center focus:outline focus:outline-secondary\",\n n ? \"cursor-not-allowed\" : \"hover:bg-gray-50/10 cursor-pointer\",\n c\n ),\n \"aria-expanded\": s,\n \"aria-controls\": u,\n disabled: n,\n onClick: v,\n onKeyDown: b,\n children: [\n /* @__PURE__ */ i(\"span\", { children: o }),\n /* @__PURE__ */ i(\n \"span\",\n {\n className: N(\n \"transform transition-transform duration-300 ease-linear\",\n s ? \"rotate-180\" : \"rotate-0\"\n ),\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ i($e, { size: 18 })\n }\n )\n ]\n }\n ),\n /* @__PURE__ */ i(\n \"div\",\n {\n id: u,\n role: \"region\",\n \"aria-labelledby\": h,\n className: N(\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 m\n ),\n children: s && (r || t)\n }\n )\n ] });\n}\nfunction yr({\n id: a,\n items: o = [],\n children: t,\n className: r = \"\",\n itemClassName: e = \"\",\n allowMultiple: n = !1,\n defaultOpenItems: s = [],\n triggersClassName: l = \"\",\n bodiesClassName: c = \"\"\n}) {\n const m = F(), f = a || `accordion-group-${m}`, [d, h] = $(new Set(s)), u = (p) => {\n h((y) => {\n const g = new Set(y);\n return g.has(p) ? g.delete(p) : (n || g.clear(), g.add(p)), g;\n });\n }, v = (p) => `${m}-item-${p}`, b = (p) => d.has(p);\n return /* @__PURE__ */ k(\"div\", { id: f, className: r, children: [\n o.length > 0 && o.map((p, y) => {\n const g = p.id || v(y);\n return /* @__PURE__ */ i(\n he,\n {\n id: g,\n title: p.title,\n content: p.content,\n disabled: p.disabled,\n isOpen: b(g),\n onToggle: () => u(g),\n className: e,\n triggerClassName: l,\n bodyClassName: c\n },\n g\n );\n }),\n o.length === 0 && t && H.Children.map(t, (p, y) => {\n if (H.isValidElement(p) && p.type === he) {\n const g = p.props.id || v(y);\n return /* @__PURE__ */ ze(\n he,\n {\n ...p.props,\n key: g,\n id: g,\n className: N(e, p.props.className),\n isOpen: b(g),\n onToggle: () => u(g),\n triggerClassName: N(l, p.props.triggerClassName),\n bodyClassName: N(c, p.props.bodyClassName)\n }\n );\n }\n return null;\n })\n ] });\n}\nfunction Oe() {\n const [a, o] = $(0);\n return A(() => {\n const t = setInterval(() => {\n o((r) => (r + 1) % 3);\n }, 500);\n return () => clearInterval(t);\n }, []), /* @__PURE__ */ i(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((t) => /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n a === t && \"transform -translate-y-1\"\n )\n },\n t\n )) });\n}\nconst et = {\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}, tt = {\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}, rt = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, pe = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction nt({\n variant: a = pe.variant,\n size: o,\n rounded: t = pe.rounded,\n loading: r,\n linkTo: e,\n linkProps: n,\n type: s = \"button\",\n className: l,\n ...c\n}) {\n let m;\n a === \"link\" && !o ? m = \"fitted\" : m = o || pe.size;\n const d = N(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n et[a],\n tt[m],\n rt[t],\n r && \"relative pointer-events-none\",\n e && \"relative\",\n l\n );\n return /* @__PURE__ */ k(\n \"button\",\n {\n ...c,\n role: e ? \"link\" : c.role,\n \"aria-label\": c[\"aria-label\"] || (n == null ? void 0 : n[\"aria-label\"]),\n \"aria-description\": c[\"aria-description\"] || (n == null ? void 0 : n[\"aria-description\"]),\n \"aria-disabled\": c.disabled || r,\n \"aria-busy\": r,\n type: s,\n className: d,\n children: [\n r && /* @__PURE__ */ i(Oe, {}),\n /* @__PURE__ */ i(\"span\", { className: N(r && \"invisible\"), children: c.children }),\n e && !c.disabled && /* @__PURE__ */ i(\n \"a\",\n {\n ...n,\n \"aria-hidden\": !0,\n href: e,\n rel: (n == null ? void 0 : n.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nconst ot = {\n info: {\n border: \"border-blue-600\",\n interior: \"bg-blue-800/20\",\n core: \"text-blue-400\",\n description: \"text-blue-200\"\n },\n destructive: {\n border: \"border-destructive\",\n interior: \"bg-destructive/10\",\n core: \"text-destructive\",\n description: \"text-destructive\"\n },\n success: {\n border: \"border-success\",\n interior: \"bg-success/10\",\n core: \"text-success\",\n description: \"text-success\"\n },\n warning: {\n border: \"border-yellow-700\",\n interior: \"bg-yellow-800/20\",\n core: \"text-yellow-400\",\n description: \"text-yellow-200\"\n },\n base: {\n border: \"\",\n interior: \"\",\n core: \"\",\n description: \"opacity-90\"\n }\n}, at = {\n info: /* @__PURE__ */ i(Xe, { size: 22 }),\n destructive: /* @__PURE__ */ i(Ue, { size: 22 }),\n success: /* @__PURE__ */ i(Se, { size: 22 }),\n warning: /* @__PURE__ */ i(De, { size: 20 }),\n base: /* @__PURE__ */ i(Ve, { size: 22 })\n};\nfunction wr({\n id: a,\n ref: o,\n variant: t = \"base\",\n icon: r,\n title: e,\n description: n,\n className: s,\n dismissible: l = !1,\n onDismiss: c\n}) {\n const m = F(), f = a || `callout-${m}`, [d, h] = $(!1), u = ot[t], v = at[t], b = () => {\n h(!0), c && c();\n };\n return d ? null : /* @__PURE__ */ k(\n \"div\",\n {\n id: f,\n ref: o,\n className: N(\"relative rounded-lg p-2 sm:p-4 border\", u.border, u.interior, s),\n \"data-variant\": t,\n role: \"note\",\n \"aria-describedby\": n ? `${f}-description` : void 0,\n \"aria-labelledby\": e ? `${f}-title` : void 0,\n children: [\n /* @__PURE__ */ k(\"div\", { className: \"flex items-start gap-x-2\", children: [\n r && /* @__PURE__ */ i(\"span\", { className: u.core, children: r === \"default\" ? v : r }),\n (e || n) && /* @__PURE__ */ k(\"div\", { className: \"flex-1\", children: [\n e && /* @__PURE__ */ i(\"div\", { id: `${f}-title`, className: N(\"font-medium\", u.core), children: e }),\n n && /* @__PURE__ */ i(\"div\", { id: `${f}-description`, className: N(\"mt-0.5 font-light\", u.description), children: n })\n ] })\n ] }),\n l && /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: b,\n \"data-callout-close-button\": \"true\",\n className: N(\n u.core,\n \"rounded-md p-0.5 top-2.5 right-2.5 absolute focus:outline-none hover:ring focus:ring-2 focus:ring-current leading-0\"\n ),\n \"aria-label\": \"Close callout\",\n children: /* @__PURE__ */ i(oe, { size: 18 })\n }\n )\n ]\n }\n );\n}\nfunction st({\n totalItems: a,\n itemsToShow: o,\n infinite: t,\n autoScroll: r,\n scrollInterval: e,\n pauseScrollOnHover: n,\n currentIndex: s,\n onIndexChange: l\n}) {\n const [c, m] = $(s || 0), [f, d] = $(!1), h = V(null), u = Math.ceil(a / o), v = t || c > 0, b = t || c < u - 1, p = S(\n (w) => {\n const x = Math.max(0, Math.min(w, u - 1));\n m(x), l == null || l(x);\n },\n [u, l]\n ), y = S(() => {\n if (v) {\n const w = c === 0 && t ? u - 1 : c - 1;\n p(w);\n }\n }, [c, v, t, u, p]), g = S(() => {\n if (b) {\n const w = c === u - 1 && t ? 0 : c + 1;\n p(w);\n }\n }, [c, b, t, u, p]);\n return A(() => {\n s !== void 0 && s !== c && m(s);\n }, [s, c]), A(() => {\n if (!r) return;\n const w = () => {\n h.current = setInterval(() => {\n n && f || g();\n }, e);\n }, x = () => {\n h.current && (clearInterval(h.current), h.current = null);\n };\n return !f || !n ? w() : x(), x;\n }, [r, e, n, f, g]), A(() => {\n m(0);\n }, [o]), {\n currentSlide: c,\n canGoPrev: v,\n canGoNext: b,\n goToPrev: y,\n goToNext: g,\n goToSlide: p,\n isHovered: f,\n setIsHovered: d\n };\n}\nconst te = {\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 it() {\n const [a, o] = $(), [t, r] = $(0), e = (n) => te[n];\n return A(() => {\n const n = (l) => l >= te[\"2xl\"] ? \"2xl\" : l >= te.xl ? \"xl\" : l >= te.lg ? \"lg\" : l >= te.md ? \"md\" : l >= te.sm ? \"sm\" : \"xs\";\n o(n(window.innerWidth)), r(window.innerWidth);\n const s = () => {\n o(n(window.innerWidth)), r(window.innerWidth);\n };\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, []), { screenSize: a, screenWidth: t, getBreakpoint: e };\n}\nconst se = {\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}, xe = {\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}, ie = {\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 Nr({\n children: a,\n id: o,\n ref: t,\n className: r,\n autoScroll: e = !1,\n scrollInterval: n = 3e3,\n pauseScrollOnHover: s = !0,\n currentIndex: l,\n onIndexChange: c,\n hidePrevNext: m = !1,\n hideDots: f = !1,\n itemsToShow: d = 1,\n buttonSize: h = \"md\",\n buttonVariant: u = \"default\",\n buttonPosition: v = \"exterior\",\n infinite: b = !0,\n prevButton: p,\n nextButton: y,\n itemsClassName: g,\n containerClassName: w,\n dotsClassName: x,\n gap: E = 8\n}) {\n var W, re;\n const I = V(null), C = H.Children.toArray(a).filter(H.isValidElement), z = C.length, { screenSize: L } = it(), j = G(() => {\n if (typeof d == \"number\")\n return d;\n if (typeof d == \"object\" && d && L) {\n const J = [\"2xl\", \"xl\", \"lg\", \"md\", \"sm\", \"xs\"], P = J.indexOf(L);\n for (let ee = P; ee < J.length; ee++) {\n const ne = J[ee];\n if (d[ne] !== void 0)\n return d[ne];\n }\n }\n return 1;\n }, [d, L]), { currentSlide: Z, canGoPrev: K, canGoNext: R, goToPrev: D, goToNext: M, goToSlide: _, setIsHovered: Y } = st({\n totalItems: z,\n itemsToShow: j,\n infinite: b,\n autoScroll: e,\n scrollInterval: n,\n pauseScrollOnHover: s,\n currentIndex: l,\n onIndexChange: c\n }), X = S(\n (J) => {\n if (j === 1)\n return { leftWidth: 0, rightWidth: 0, widthReduction: 0 };\n const P = E * (j - 1) / j;\n return J % j === 0 ? { leftWidth: 0, rightWidth: E / 2, widthReduction: P } : J % j === j - 1 ? { leftWidth: E / 2, rightWidth: 0, widthReduction: P } : { leftWidth: E / 2, rightWidth: E / 2, widthReduction: P };\n },\n [j, E]\n ), q = () => {\n D();\n }, O = () => {\n M();\n }, ue = () => {\n s && Y(!0);\n }, fe = () => {\n s && Y(!1);\n }, me = -(Z * (100 / z) * j), T = N(\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 v === \"aligned\" ? \"disabled:opacity-90\" : \"disabled:opacity-50\"\n );\n return /* @__PURE__ */ k(\"div\", { className: N(\"relative\", r), \"data-carousel-wrapper\": \"true\", children: [\n !m && /* @__PURE__ */ i(Q, { children: p ? H.cloneElement(\n p,\n {\n onClick: q,\n disabled: !K,\n className: N(\n ((W = p.props) == null ? void 0 : W.className) || \"\",\n ie[v].prev\n ),\n role: \"button\",\n \"aria-disabled\": !K,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\"\n }\n ) : /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: q,\n disabled: !K,\n className: N(\n T,\n se[h].button,\n xe[u],\n ie[v].prev\n ),\n \"aria-disabled\": !K,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\",\n children: /* @__PURE__ */ i(Ae, { className: se[h].icon })\n }\n ) }),\n /* @__PURE__ */ k(\n \"div\",\n {\n id: o,\n ref: t,\n className: N(\"relative overflow-hidden\", w),\n onMouseEnter: ue,\n onMouseLeave: fe,\n \"data-carousel\": \"true\",\n \"data-current-index\": Z,\n \"data-items-to-show\": j,\n \"data-auto-scroll\": e,\n \"data-button-position\": v,\n children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n ref: I,\n className: \"flex transition-transform duration-300 ease-in-out\",\n style: {\n transform: `translateX(${me}%)`,\n width: `${z / j * 100}%`\n },\n children: C.map((J, P) => {\n const { leftWidth: ee, rightWidth: ne, widthReduction: Re } = X(P);\n return /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\"flex-shrink-0\", g),\n style: {\n width: `calc(${100 / z}% - ${Re}px)`,\n marginRight: ne > 0 ? `${ne}px` : void 0,\n marginLeft: ee > 0 ? `${ee}px` : void 0\n },\n \"data-slide-index\": P,\n children: J\n },\n P\n );\n })\n }\n ),\n !f && /* @__PURE__ */ i(\"div\", { className: \"absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2\", children: Array.from({ length: Math.ceil(z / j) }).map((J, P) => /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: () => _(P),\n className: N(\n \"w-2 h-2 rounded-full transition-colors duration-200\",\n P === Z ? \"bg-accent\" : \"bg-muted hover:bg-muted-foreground/50\",\n x\n ),\n \"aria-label\": `Go to slide ${P + 1}`,\n \"data-carousel-dot\": P\n },\n P\n )) })\n ]\n }\n ),\n !m && /* @__PURE__ */ i(Q, { children: y ? H.cloneElement(\n y,\n {\n onClick: O,\n disabled: !R,\n className: N(\n ((re = y.props) == null ? void 0 : re.className) || \"\",\n ie[v].next\n ),\n role: \"button\",\n \"aria-disabled\": !R,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\"\n }\n ) : /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: O,\n disabled: !R,\n className: N(\n T,\n se[h].button,\n xe[u],\n ie[v].next\n ),\n \"aria-disabled\": !R,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\",\n children: /* @__PURE__ */ i(Ie, { className: se[h].icon })\n }\n ) })\n ] });\n}\nfunction lt(a) {\n const [o, t] = $(\"\"), r = S((e) => {\n let n = e, s = \"\";\n for (; n && !s; ) {\n const l = window.getComputedStyle(n).backgroundColor;\n l && l !== \"transparent\" && l !== \"rgba(0, 0, 0, 0)\" && (s = l), n = n.parentElement;\n }\n return s || \"transparent\";\n }, []);\n return A(() => {\n const e = document.getElementById(a);\n if (e) {\n const n = r(e.parentElement);\n t(n);\n }\n }, [a, r]), o;\n}\nfunction Er({\n ref: a,\n id: o,\n size: t = 20,\n color: r,\n filled: e = !1,\n rounded: n = !0,\n checked: s = !1,\n onCheckedChange: l,\n disabled: c,\n className: m = \"\",\n ...f\n}) {\n const d = F(), h = G(() => o || `checkbox-${d}`, [o, d]), u = lt(h), [v, b] = $(s);\n A(() => {\n b(s);\n }, [s]);\n const p = () => {\n c || (b(!v), l == null || l(!v));\n }, y = (w) => {\n w.key === \" \" && (w.preventDefault(), p());\n }, g = N(\n \"flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2\",\n n && \"rounded\",\n c && \"opacity-40 cursor-not-allowed\",\n !c && \"cursor-pointer\",\n m\n );\n return /* @__PURE__ */ i(\n \"button\",\n {\n id: h,\n type: \"button\",\n ref: a,\n tabIndex: 0,\n role: \"checkbox\",\n onClick: p,\n \"aria-checked\": v,\n \"aria-disabled\": c,\n onKeyDownCapture: y,\n style: {\n width: t,\n height: t,\n color: r,\n backgroundColor: v && e ? \"currentcolor\" : \"transparent\"\n },\n className: g,\n ...f,\n children: v && /* @__PURE__ */ i(ve, { size: t, color: e ? u : void 0 })\n }\n );\n}\nfunction kr({\n children: a,\n className: o,\n linkTo: t,\n linkProps: r,\n onButtonClick: e,\n buttonProps: n,\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: N(\"relative w-fit\", o), ...s, children: [\n a,\n t && /* @__PURE__ */ i(\n \"a\",\n {\n ...r,\n rel: (r == null ? void 0 : r.rel) || \"noreferrer\",\n href: t,\n className: N(\"absolute inset-0\", r == null ? void 0 : r.className)\n }\n ),\n !t && e && /* @__PURE__ */ i(\n \"button\",\n {\n ...n,\n type: \"button\",\n onClick: e,\n className: N(\"absolute inset-0 cursor-pointer\", n == null ? void 0 : n.className)\n }\n )\n ] });\n}\nfunction ct(a) {\n const [o, t] = $(null);\n return A(() => {\n var l;\n const r = (l = document.getElementById(a)) == null ? void 0 : l.parentElement;\n if (!r) return;\n const e = () => {\n const c = window.getComputedStyle(r), m = parseFloat(c.fontSize), f = c.lineHeight === \"normal\" ? m * 1.2 : parseFloat(c.lineHeight), d = m - 2, h = d / m, u = f * h;\n t({\n fontSize: m,\n lineHeight: f,\n smallerFontSize: d,\n smallerLineHeight: u\n });\n };\n e();\n const n = new ResizeObserver(e);\n n.observe(r);\n const s = new MutationObserver(e);\n return s.observe(r, {\n attributes: !0,\n attributeFilter: [\"style\", \"class\"],\n subtree: !1\n }), () => {\n n.disconnect(), s.disconnect();\n };\n }, [a]), o;\n}\nconst dt = {\n base: \"\",\n modest: \"opacity-90 bg-muted/10\",\n accent: \"text-accent bg-muted/10\",\n current: \"text-current bg-current/10\"\n};\nfunction Cr({ id: a, ref: o, content: t, variant: r = \"accent\", className: e, style: n, ...s }) {\n const l = F(), c = a || `code-${l}`, m = ct(c);\n return /* @__PURE__ */ i(\n \"code\",\n {\n id: c,\n ref: o,\n className: N(\"px-2 py-1 rounded\", dt[r], e),\n \"data-variant\": r,\n style: {\n fontSize: m ? `${m.smallerFontSize}px` : void 0,\n lineHeight: m ? `${m.smallerLineHeight}px` : void 0,\n ...n\n },\n ...s,\n children: t\n }\n );\n}\nconst ut = {\n keyword: \"text-rose-400\",\n runner: \"text-amber-400\",\n comment: \"text-gray-500/80\",\n command: \"text-gray-100\",\n variable: \"text-blue-400\",\n string: \"text-white/70\",\n option: \"text-purple-400\",\n plain: \"text-gray-200\",\n operator: \"text-pink-500\",\n substitution: \"text-green-300\"\n}, ft = {\n selector: \"text-blue-400 font-medium\",\n property: \"text-purple-400\",\n value: \"text-green-400\",\n punctuation: \"text-gray-400\",\n atRule: \"text-pink-400 font-semibold\",\n comment: \"text-gray-500 italic\",\n string: \"text-green-400\",\n number: \"text-green-400\",\n plain: \"text-gray-100\",\n function: \"text-cyan-400\"\n}, mt = {\n key: \"text-purple-400 font-semibold\",\n string: \"text-green-400\",\n number: \"text-orange-400 font-medium\",\n boolean: \"text-cyan-400 font-medium\",\n punctuation: \"text-gray-400\",\n plain: \"text-gray-100\"\n}, ht = {\n keyword: \"text-purple-400 font-semibold\",\n type: \"text-cyan-400 font-medium\",\n string: \"text-green-400\",\n \"jsx-bracket\": \"text-gray-400\",\n \"jsx-tag\": \"text-blue-400 font-medium\",\n \"jsx-attribute\": \"text-amber-400\",\n \"jsx-brace\": \"text-yellow-400\",\n jsx: \"text-blue-400 font-medium\",\n // fallback for old jsx type\n property: \"text-amber-400\",\n number: \"text-orange-400 font-medium\",\n comment: \"text-gray-500 italic\",\n function: \"text-rose-400 font-semibold\",\n hook: \"text-rose-400 font-semibold\",\n operator: \"text-gray-300\",\n plain: \"text-gray-100\"\n}, pt = /* @__PURE__ */ new Set([\n \"for\",\n \"in\",\n \"do\",\n \"done\",\n \"else\",\n \"if\",\n \"fi\",\n \"then\",\n \"while\",\n \"until\",\n \"case\",\n \"esac\"\n]), bt = /* @__PURE__ */ new Set([\"npm\", \"npx\", \"pnpm\", \"yarn\", \"vite\"]);\nfunction Te(a) {\n const o = [];\n if (a.trim() === \"\")\n return o.push({ text: \" \", type: \"plain\" }), o;\n if (a.trim().startsWith(\"#\"))\n return o.push({ text: a, type: \"comment\" }), o;\n const t = /(\\$\\([^)]*\\)|\"[^\"]*\"|'[^']*'|\\$[\\w_]+|[a-zA-Z_]\\w*=|--?[a-zA-Z0-9][\\w-]*(?:=.*)?|>>|>|#.*|\\s+|[^\\s]+)/g, r = (n) => {\n if (/^\\$\\([^)]*\\)$/.test(n)) {\n const s = n.slice(2, -1);\n return [{ text: \"$(\", type: \"operator\" }, ...Te(s), { text: \")\", type: \"operator\" }];\n }\n if (/^\".*\"$/.test(n)) {\n const s = n.slice(1, -1), l = [];\n let c = 0;\n const m = /\\$[\\w_]+/g;\n let f;\n for (; (f = m.exec(s)) !== null; )\n f.index > c && l.push({\n text: s.slice(c, f.index),\n type: \"string\"\n }), l.push({ text: f[0], type: \"variable\" }), c = f.index + f[0].length;\n return c < s.length && l.push({ text: s.slice(c), type: \"string\" }), [{ text: '\"', type: \"string\" }, ...l, { text: '\"', type: \"string\" }];\n }\n return /^'.*'$/.test(n) ? [{ text: n, type: \"string\" }] : /^\\$[\\w_]+$/.test(n) ? [{ text: n, type: \"variable\" }] : /^[a-zA-Z_]\\w*=$/.test(n) ? [{ text: n, type: \"variable\" }] : /^--?[a-zA-Z0-9][\\w-]*(=.*)?$/.test(n) ? [{ text: n, type: \"option\" }] : /^>>|>$/.test(n) ? [{ text: n, type: \"operator\" }] : /^#.*$/.test(n) ? [{ text: n, type: \"comment\" }] : /^\\s+$/.test(n) ? [{ text: n, type: \"plain\" }] : pt.has(n) ? [{ text: n, type: \"keyword\" }] : bt.has(n) ? [{ text: n, type: \"runner\" }] : [{ text: n, type: \"command\" }];\n };\n let e;\n for (; (e = t.exec(a)) !== null; )\n o.push(...r(e[0]));\n return o;\n}\nfunction vt(a, o = !1) {\n const t = [];\n let r = o;\n if (a.trim() === \"\")\n return t.push({ text: \" \", type: \"plain\" }), { tokens: t, inComment: r };\n let e = \"selector\", n = 0;\n a.match(/^\\s+/) && a.includes(\":\") && !a.includes(\"{\") && (e = \"property\", n = 1);\n const s = /(\\/\\*[\\s\\S]*?\\*\\/|\\/\\*[\\s\\S]*$|\\*\\/)|(@[a-zA-Z-]+)|(\\{|\\}|:|;|,|\\(|\\))|(\"(?:[^\"]*)\"|'(?:[^']*)')|([a-zA-Z-]+)(?=\\()|([0-9.]+(?:px|rem|em|%|vh|vw|deg|s|ms|fr)?)|(#[a-fA-F0-9]{3,8})|([a-zA-Z0-9_-]+|[.#][a-zA-Z0-9_-]+)|(\\s+)|(\\S+)/g;\n let l;\n for (; l = s.exec(a); ) {\n const [, c, m, f, d, h, u, v, b, p, y] = l;\n if (c)\n c.includes(\"/*\") && !c.includes(\"*/\") ? r = !0 : c.includes(\"*/\") && (r = !1), t.push({ text: c, type: \"comment\" });\n else if (r)\n l[0].includes(\"*/\") && (r = !1), t.push({ text: l[0], type: \"comment\" });\n else if (m)\n t.push({ text: m, type: \"atRule\" });\n else if (h)\n t.push({ text: h, type: \"function\" });\n else if (f)\n f === \"{\" ? (n++, e = \"property\") : f === \"}\" ? (n--, e = n > 0 ? \"property\" : \"selector\") : f === \":\" ? e === \"property\" && (e = \"value\") : f === \";\" ? n > 0 && (e = \"property\") : f === \",\" && n === 0 && (e = \"selector\"), t.push({ text: f, type: \"punctuation\" });\n else if (d)\n t.push({ text: d, type: \"string\" });\n else if (u)\n t.push({ text: u, type: \"number\" });\n else if (v)\n t.push({ text: v, type: \"value\" });\n else if (b) {\n let g;\n b.startsWith(\".\") || b.startsWith(\"#\") || e === \"selector\" ? g = \"selector\" : e === \"property\" ? g = \"property\" : g = \"value\", t.push({ text: b, type: g });\n } else if (p)\n t.push({ text: p.replace(/ /g, \" \"), type: \"plain\" });\n else if (y) {\n const g = e === \"value\" ? \"value\" : \"plain\";\n t.push({ text: y, type: g });\n }\n }\n return { tokens: t, inComment: r };\n}\nfunction gt(a) {\n const o = /(\"[^\"]*\")\\s*(:)|(\"[^\"]*\")|(\\d+)|(true|false|null)|(\\{|\\}|\\[|\\]|,)/g, t = [];\n let r = 0, e;\n for (; (e = o.exec(a)) !== null; )\n e.index > r && t.push({ text: a.slice(r, e.index), type: \"plain\" }), e[1] && e[2] ? (t.push({ text: e[1], type: \"key\" }), t.push({ text: e[2], type: \"punctuation\" })) : e[3] ? t.push({ text: e[3], type: \"string\" }) : e[4] ? t.push({ text: e[4], type: \"number\" }) : e[5] ? t.push({ text: e[5], type: \"boolean\" }) : e[6] && t.push({ text: e[6], type: \"punctuation\" }), r = o.lastIndex;\n return r < a.length && t.push({ text: a.slice(r), type: \"plain\" }), t;\n}\nfunction xt(a, o = !1, t = 0) {\n const r = [];\n let e = a, n = o, s = t;\n for (; e.length > 0; ) {\n const l = e.match(/^\\/\\*[\\s\\S]*?\\*\\//);\n if (l) {\n r.push({ text: l[0], type: \"comment\" }), e = e.slice(l[0].length);\n continue;\n }\n const c = e.match(/^\\/\\/.*$/m);\n if (c) {\n r.push({ text: c[0], type: \"comment\" }), e = e.slice(c[0].length);\n continue;\n }\n const m = e.match(/^(`[^`]*`|\"[^\"]*\"|'[^']*')/);\n if (m) {\n r.push({ text: m[0], type: \"string\" }), e = e.slice(m[0].length);\n continue;\n }\n const f = e.match(/^<([a-zA-Z][a-zA-Z0-9]*)/);\n if (f) {\n r.push({ text: \"<\", type: \"jsx-bracket\" }), r.push({ text: f[1], type: \"jsx-tag\" }), e = e.slice(f[0].length), n = !0;\n continue;\n }\n const d = e.match(/^<\\/([a-zA-Z][a-zA-Z0-9]*)>/);\n if (d) {\n r.push({ text: \"</\", type: \"jsx-bracket\" }), r.push({ text: d[1], type: \"jsx-tag\" }), r.push({ text: \">\", type: \"jsx-bracket\" }), e = e.slice(d[0].length), n = !1;\n continue;\n }\n if (e.match(/^\\/?>/)) {\n const I = e.match(/^(\\/?>\\s*)/);\n if (I) {\n r.push({ text: I[1].trim(), type: \"jsx-bracket\" }), e = e.slice(I[1].length), I[1].includes(\">\") && (n = !1);\n continue;\n }\n }\n const h = e.match(/^([a-zA-Z][a-zA-Z0-9]*)(\\s*)(=)/);\n if (h && n && s === 0) {\n r.push({ text: h[1], type: \"jsx-attribute\" }), h[2] && r.push({ text: h[2], type: \"plain\" }), r.push({ text: \"=\", type: \"plain\" }), e = e.slice(h[0].length);\n continue;\n }\n const u = e.match(/^[{}]/);\n if (u) {\n r.push({ text: u[0], type: \"jsx-brace\" }), u[0] === \"{\" ? s++ : u[0] === \"}\" && s--, e = e.slice(1);\n continue;\n }\n const v = e.match(/^\\s+/);\n if (v) {\n r.push({ text: v[0], type: \"plain\" }), e = e.slice(v[0].length);\n continue;\n }\n const b = e.match(/^(=>|===|!==|==|!=|<=|>=|&&|\\|\\||[+\\-*/%=<>!&|^~?:;,()[\\]{}.])/);\n if (b) {\n r.push({ text: b[0], type: \"operator\" }), e = e.slice(b[0].length);\n continue;\n }\n const p = e.match(\n /^(const|let|var|function|if|else|for|while|return|import|export|class|extends|interface|type|enum|async|await|public|private|protected|static|from|as|default|new|this|super|try|catch|finally|throw|break|continue|switch|case|typeof|instanceof)\\b/\n );\n if (p) {\n r.push({ text: p[0], type: \"keyword\" }), e = e.slice(p[0].length);\n continue;\n }\n const y = e.match(/^(use[A-Z][a-zA-Z]*)\\b/);\n if (y) {\n r.push({ text: y[0], type: \"hook\" }), e = e.slice(y[0].length);\n continue;\n }\n const g = e.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)\\s*(?=(\\?\\.)?\\()/);\n if (g) {\n r.push({ text: g[1], type: \"function\" }), e = e.slice(g[1].length);\n continue;\n }\n const w = e.match(\n /^(string|number|boolean|object|any|void|never|unknown|null|undefined|Promise|Array|React\\.FC|FC|JSX\\.Element|HTMLElement|Event|MouseEvent|KeyboardEvent|ChangeEvent)\\b/\n );\n if (w) {\n r.push({ text: w[0], type: \"type\" }), e = e.slice(w[0].length);\n continue;\n }\n const x = e.match(/^(\\d+\\.?\\d*)/);\n if (x) {\n r.push({ text: x[0], type: \"number\" }), e = e.slice(x[0].length);\n continue;\n }\n const E = e.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)\\s*(?=:)/);\n if (E && !n) {\n r.push({ text: E[1], type: \"property\" }), e = e.slice(E[1].length);\n continue;\n }\n r.push({ text: e[0], type: \"plain\" }), e = e.slice(1);\n }\n return r;\n}\nfunction yt(a, o) {\n const t = {\n ...ut,\n ...o\n };\n return a.map((r, e) => {\n const n = Te(r);\n return /* @__PURE__ */ i(\"div\", { className: \"leading-6\", children: n.map((s, l) => /* @__PURE__ */ i(\"span\", { className: t[s.type] || \"text-gray-100\", children: s.text }, l)) }, e);\n });\n}\nfunction wt(a, o) {\n const t = { ...ft, ...o };\n let r = !1;\n return a.map((e, n) => {\n const { tokens: s, inComment: l } = vt(e, r);\n return r = l, /* @__PURE__ */ i(\"div\", { className: \"leading-6\", children: s.map((c, m) => /* @__PURE__ */ i(\"span\", { className: t[c.type] || \"text-gray-100\", children: c.text }, m)) }, n);\n });\n}\nfunction Nt(a, o) {\n const t = { ...mt, ...o };\n return a.map((r, e) => /* @__PURE__ */ i(\"div\", { className: \"leading-6\", children: gt(r).map((n, s) => /* @__PURE__ */ i(\"span\", { className: t[n.type] || \"text-gray-100\", children: n.text }, s)) }, e));\n}\nfunction Et(a, o) {\n const t = { ...ht, ...o };\n let r = !1, e = 0;\n return a.map((n, s) => {\n if (n.trim() === \"\")\n return /* @__PURE__ */ i(\"div\", { className: \"leading-6\", children: \" \" }, s);\n const l = xt(n, r, e);\n n.includes(\"<\") && n.match(/<[a-zA-Z]/) && (r = !0), n.includes(\">\") && !n.includes(\"<\") && (r = !1, e = 0);\n const c = (n.match(/\\{/g) || []).length, m = (n.match(/\\}/g) || []).length;\n return e += c - m, e < 0 && (e = 0), /* @__PURE__ */ i(\"div\", { className: \"leading-6\", children: l.map((f, d) => /* @__PURE__ */ i(\"span\", { className: t[f.type] || \"text-gray-100\", children: f.text }, d)) }, s);\n });\n}\nfunction kt(a) {\n const [o, t] = $(!1), r = S(async () => {\n try {\n await navigator.clipboard.writeText(a), t(!0), setTimeout(() => t(!1), 3e3);\n } catch (e) {\n console.error(\"Failed to copy code:\", e);\n }\n }, [a]);\n return { copied: o, handleCopy: r };\n}\nfunction Ct(a, o) {\n const t = V(null), r = V(null);\n return A(() => {\n if (a) {\n t.current = document.activeElement, document.body.style.overflow = \"hidden\", setTimeout(() => {\n var n;\n (n = r.current) == null || n.focus();\n }, 100);\n const e = (n) => {\n n.key === \"Escape\" && o(!1);\n };\n return document.addEventListener(\"keydown\", e), () => {\n document.removeEventListener(\"keydown\", e), document.body.style.overflow = \"\";\n };\n } else t.current && (t.current.focus(), t.current = null);\n }, [a, o]), { containerRef: r };\n}\nfunction zt(a, o, t, r) {\n return { handleKeyDown: S(\n (n) => {\n n.key === \"c\" && (n.metaKey || n.ctrlKey) && a ? (n.preventDefault(), t()) : n.key === \"f\" && o && (n.preventDefault(), r());\n },\n [a, o, t, r]\n ) };\n}\nfunction $t(a) {\n switch (a) {\n case \"typescript\":\n case \"ts\":\n return \"ts\";\n case \"tsx\":\n return \"tsx\";\n case \"json\":\n return \"json\";\n case \"bash\":\n case \"sh\":\n return \"sh\";\n default:\n return \"txt\";\n }\n}\nfunction zr({\n code: a,\n language: o = \"typescript\",\n allowCopy: t = !0,\n allowDownload: r = !1,\n allowFullscreen: e = !1,\n filename: n,\n showTrafficLights: s = !0,\n showLineNumbers: l = !1,\n hideHeader: c = !1,\n hideFiletype: m = !1,\n maxHeight: f,\n tokenClasses: d,\n className: h,\n id: u,\n ref: v,\n ...b\n}) {\n const [p, y] = $(!1), { containerRef: g } = Ct(p, y), { copied: w, handleCopy: x } = kt(a), E = S(() => {\n const D = n || `code.${$t(o)}`;\n Je(a, D);\n }, [a, n, o]), I = S(() => {\n y((D) => !D);\n }, []), { handleKeyDown: C } = zt(t, e, x, I), z = G(() => a.split(`\n`), [a]), L = S(\n (D = !0) => /* @__PURE__ */ k(\"div\", { className: N(\"flex items-center space-x-2\", !D && \"absolute top-2 right-2 z-10\"), children: [\n !m && /* @__PURE__ */ i(\n \"span\",\n {\n className: \"text-xs text-gray-400 uppercase tracking-wide font-medium\",\n \"aria-label\": `Code language: ${o}`,\n children: o\n }\n ),\n e && /* @__PURE__ */ i(\n \"button\",\n {\n onClick: I,\n className: \"p-1.5 leading-0 text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors motion-reduce:transition-none min-h-[44px] min-w-[44px] flex items-center justify-center md:min-h-auto md:min-w-auto md:p-1.5\",\n title: p ? \"Exit fullscreen\" : \"Fullscreen\",\n \"aria-label\": p ? \"Exit fullscreen mode\" : \"Enter fullscreen mode\",\n \"aria-pressed\": p,\n type: \"button\",\n children: p ? /* @__PURE__ */ i(Be, { size: 14 }) : /* @__PURE__ */ i(Me, { size: 14 })\n }\n ),\n r && /* @__PURE__ */ i(\n \"button\",\n {\n onClick: E,\n className: \"p-1.5 leading-0 text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors motion-reduce:transition-none min-h-[44px] min-w-[44px] flex items-center justify-center md:min-h-auto md:min-w-auto md:p-1.5\",\n title: \"Download code\",\n \"aria-label\": \"Download code as file\",\n type: \"button\",\n children: /* @__PURE__ */ i(We, { size: 14 })\n }\n ),\n t && /* @__PURE__ */ i(\n \"button\",\n {\n onClick: x,\n className: \"p-1.5 leading-0 text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors motion-reduce:transition-none min-h-[44px] min-w-[44px] flex items-center justify-center md:min-h-auto md:min-w-auto md:p-1.5\",\n title: w ? \"Code copied!\" : \"Copy code\",\n \"aria-label\": w ? \"Code copied to clipboard\" : \"Copy code to clipboard\",\n \"aria-live\": \"polite\",\n type: \"button\",\n children: w ? /* @__PURE__ */ i(ve, { size: 14, className: \"text-green-400\" }) : /* @__PURE__ */ i(Ke, { size: 14 })\n }\n )\n ] }),\n [\n m,\n o,\n e,\n p,\n r,\n E,\n t,\n x,\n w,\n I\n ]\n ), j = G(() => o === \"json\" ? Nt(z, d) : o === \"tsx\" || o === \"ts\" || o === \"typescript\" ? Et(z, d) : o === \"bash\" || o === \"sh\" ? yt(z, d) : o === \"css\" ? wt(z, d) : [\n /* @__PURE__ */ i(\"span\", { className: \"text-gray-400\", children: \"Unsupported language\" }, 0)\n ], [z, d, o]), Z = G(() => l ? z.map((D, M) => /* @__PURE__ */ i(\n \"div\",\n {\n className: \"text-gray-500 text-right pl-3 pr-1 select-none min-w-8 text-sm font-mono leading-6\",\n \"aria-hidden\": \"true\",\n role: \"presentation\",\n children: M + 1\n },\n M\n )) : null, [l, z]), K = G(\n () => ({\n maxHeight: f && !p ? `${f}px` : p ? c ? \"calc(100vh - 5px)\" : \"calc(100vh - 45px)\" : void 0,\n overflow: f || p ? \"auto\" : \"visible\"\n }),\n [f, p, c]\n ), R = /* @__PURE__ */ k(\n \"div\",\n {\n id: u,\n ref: (D) => {\n g.current = D, typeof v == \"function\" ? v(D) : v && (v.current = D);\n },\n className: N(\n \"bg-gray-900 rounded-lg border border-gray-700 overflow-hidden motion-reduce:transition-none\",\n p && \"fixed inset-0 z-[9999] max-h-fit\",\n h\n ),\n \"data-language\": o,\n \"data-filename\": n,\n \"data-fullscreen\": p,\n role: \"region\",\n \"aria-label\": `Code block${n ? ` for ${n}` : \"\"} in ${o}`,\n \"aria-describedby\": l ? `${u}-description` : void 0,\n tabIndex: 0,\n onKeyDown: C,\n ...b,\n children: [\n l && /* @__PURE__ */ k(\"div\", { id: `${u}-description`, className: \"sr-only\", children: [\n \"Code block with line numbers. Use Cmd+C or Ctrl+C to copy code.\",\n e && \" Press F to toggle fullscreen.\"\n ] }),\n /* @__PURE__ */ i(\"div\", { \"aria-live\": \"polite\", \"aria-atomic\": \"true\", className: \"sr-only\", children: w && \"Code copied to clipboard\" }),\n !c && /* @__PURE__ */ k(\"div\", { className: \"flex items-center justify-between px-4 py-2 bg-gray-800 border-b border-gray-700\", children: [\n /* @__PURE__ */ k(\"div\", { className: \"flex items-center space-x-3\", children: [\n s && /* @__PURE__ */ k(\"div\", { className: \"flex space-x-2\", children: [\n /* @__PURE__ */ i(\"div\", { className: \"w-3 h-3 bg-red-500 rounded-full\" }),\n /* @__PURE__ */ i(\"div\", { className: \"w-3 h-3 bg-yellow-500 rounded-full\" }),\n /* @__PURE__ */ i(\"div\", { className: \"w-3 h-3 bg-green-500 rounded-full\" })\n ] }),\n n && /* @__PURE__ */ i(\"span\", { className: \"text-sm text-gray-300 font-medium\", children: n })\n ] }),\n L(!0)\n ] }),\n /* @__PURE__ */ k(\"div\", { className: N(\"flex overflow-hidden\", c && \"relative\"), style: K, children: [\n c && L(!1),\n /* @__PURE__ */ i(\"div\", { className: \"flex-1 overflow-x-auto\", children: /* @__PURE__ */ k(\"div\", { className: \"flex\", children: [\n l && /* @__PURE__ */ i(\n \"div\",\n {\n className: \"bg-gray-800 py-4 border-r border-gray-700 flex flex-col flex-shrink-0\",\n \"aria-hidden\": \"true\",\n role: \"presentation\",\n children: Z\n }\n ),\n /* @__PURE__ */ i(\"div\", { className: \"flex-1 p-4\", children: /* @__PURE__ */ i(\n \"pre\",\n {\n className: \"text-sm font-mono focus:outline-none\",\n role: \"code\",\n \"aria-label\": `${o} code content`,\n tabIndex: -1,\n children: /* @__PURE__ */ i(\"code\", { children: j })\n }\n ) })\n ] }) })\n ] })\n ]\n }\n );\n return /* @__PURE__ */ k(Q, { children: [\n !p && R,\n p && ae(\n /* @__PURE__ */ k(Q, { children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: \"fixed inset-0 bg-black z-[9998]\",\n onClick: () => y(!1),\n \"aria-hidden\": \"true\"\n }\n ),\n R\n ] }),\n document.body\n )\n ] });\n}\nfunction $r({\n children: a,\n label: o,\n isOpen: t,\n onToggle: r,\n id: e,\n ref: n,\n disabled: s = !1,\n className: l,\n buttonClassName: c\n}) {\n const m = F(), f = e ?? m, [d, h] = $(!1), u = t !== void 0 ? t : d, v = () => {\n s || (t === void 0 && h((b) => !b), r == null || r(!u));\n };\n return A(() => {\n h(t ?? !1);\n }, [t]), /* @__PURE__ */ k(\"div\", { ref: n, id: f, \"data-open\": u, className: N(\"overflow-hidden\", l), children: [\n /* @__PURE__ */ i(\n \"button\",\n {\n id: `${f}-button`,\n type: \"button\",\n \"aria-expanded\": u,\n \"aria-controls\": `${f}-panel`,\n disabled: s,\n tabIndex: 0,\n className: N(\n \"w-full px-4 py-3 font-medium hover:bg-primary/10 disabled:opacity-50 disabled:cursor-not-allowed\",\n c\n ),\n onClick: v,\n onKeyDown: (b) => {\n (b.key === \"Enter\" || b.key === \" \") && (b.preventDefault(), v());\n },\n \"data-open\": u,\n \"data-label\": typeof o == \"string\" ? o : void 0,\n children: /* @__PURE__ */ k(\"div\", { className: \"flex items-center w-full gap-2\", children: [\n /* @__PURE__ */ i(\"span\", { className: \"flex-1 text-left\", children: o }),\n u ? /* @__PURE__ */ i(Fe, { className: \"size-5\", \"aria-hidden\": \"true\" }) : /* @__PURE__ */ i(He, { className: \"size-5\", \"aria-hidden\": \"true\" })\n ] })\n }\n ),\n /* @__PURE__ */ i(\"div\", { id: `${f}-panel`, role: \"region\", \"aria-labelledby\": f, \"aria-live\": \"polite\", hidden: !u, children: a })\n ] });\n}\nfunction St(a) {\n const [o, t] = $(!1), [r, e] = $(!1);\n return A(() => {\n if (a) {\n e(!0);\n const n = setTimeout(() => t(!0), 10);\n return () => clearTimeout(n);\n } else {\n t(!1);\n const n = setTimeout(() => e(!1), 300);\n return () => clearTimeout(n);\n }\n }, [a]), { show: o, shouldRender: r };\n}\nfunction At({\n isOpen: a,\n onClose: o,\n enabled: t = !0\n}) {\n const [r, e] = $(!1), [n, s] = $(0), [l, c] = $(0), m = S((x) => {\n !t || !a || (e(!0), c(x), document.body.style.userSelect = \"none\");\n }, [t, a]), f = S((x) => {\n if (!r || !t) return;\n const E = x - l, I = Math.max(0, E);\n s(I);\n }, [r, t, l]), d = S(() => {\n if (!r || !t) return;\n e(!1), document.body.style.userSelect = \"\", n > 100 && o(), s(0);\n }, [r, t, n, o]), h = S((x) => {\n x.preventDefault(), m(x.clientY);\n }, [m]), u = S((x) => {\n f(x.clientY);\n }, [f]), v = S(() => {\n d();\n }, [d]), b = S((x) => {\n x.preventDefault(), m(x.touches[0].clientY);\n }, [m]), p = S((x) => {\n x.preventDefault(), f(x.touches[0].clientY);\n }, [f]), y = S(() => {\n d();\n }, [d]);\n A(() => {\n if (r)\n return document.addEventListener(\"mousemove\", u), document.addEventListener(\"mouseup\", v), document.addEventListener(\"touchmove\", p, { passive: !1 }), document.addEventListener(\"touchend\", y), () => {\n document.removeEventListener(\"mousemove\", u), document.removeEventListener(\"mouseup\", v), document.removeEventListener(\"touchmove\", p), document.removeEventListener(\"touchend\", y);\n };\n }, [r, u, v, p, y]);\n const g = S((x) => {\n t && (x.key === \"ArrowDown\" || x.key === \"Escape\") && (x.preventDefault(), o());\n }, [t, o]);\n return {\n dragHandlers: t ? {\n onMouseDown: h,\n onTouchStart: b,\n onKeyDown: g\n } : {},\n translateY: n,\n isDragging: r\n };\n}\nfunction It(a, o) {\n const t = V(null);\n A(() => {\n if (!o) return;\n t.current = document.activeElement;\n const r = document.getElementById(a);\n r && r.focus();\n const e = (n) => {\n if (n.key !== \"Tab\") return;\n const s = document.getElementById(a);\n if (!s) return;\n const l = s.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n ), c = l[0], m = l[l.length - 1];\n n.shiftKey && document.activeElement === c ? (n.preventDefault(), m == null || m.focus()) : !n.shiftKey && document.activeElement === m && (n.preventDefault(), c == null || c.focus());\n };\n return document.addEventListener(\"keydown\", e), () => {\n document.removeEventListener(\"keydown\", e), t.current && typeof t.current.focus == \"function\" && t.current.focus();\n };\n }, [a, o]);\n}\nfunction Dt(a, o) {\n A(() => {\n if (!a) return;\n const t = window.getComputedStyle(document.body).overflow;\n document.body.style.overflow = \"hidden\";\n const r = (e) => {\n e.key === \"Escape\" && o();\n };\n return document.addEventListener(\"keydown\", r), () => {\n document.body.style.overflow = t, document.removeEventListener(\"keydown\", r);\n };\n }, [a, o]);\n}\nfunction Sr({\n ref: a,\n id: o,\n isOpen: t,\n onClose: r,\n title: e,\n children: n,\n footer: s,\n className: l,\n overlayClassName: c,\n showCloseButton: m = !1,\n disableCloseOnOverlayClick: f = !1,\n enableDragGestures: d = !0,\n ariaLabelledBy: h,\n ariaDescribedBy: u\n}) {\n const v = F(), b = o || `drawer-${v}`, p = `${v}-title`, { show: y, shouldRender: g } = St(t), { dragHandlers: w, translateY: x, isDragging: E } = At({\n isOpen: t,\n onClose: r,\n enabled: d\n });\n if (It(b, g), Dt(g, r), !g) return null;\n const I = () => e ? H.isValidElement(e) ? /* @__PURE__ */ i(\"div\", { children: e }) : /* @__PURE__ */ i(\"h2\", { className: \"text-2xl font-semibold\", id: p, children: e }) : null, C = () => {\n if (!s) return null;\n if (H.isValidElement(s)) {\n const z = s, L = z.props.className || \"\";\n return H.cloneElement(z, { className: N(\"px-6 py-4\", L) });\n }\n return /* @__PURE__ */ i(\"div\", { className: \"px-6 py-4\", children: s });\n };\n return /* @__PURE__ */ i(Q, { children: ae(\n /* @__PURE__ */ k(\n \"div\",\n {\n \"aria-labelledby\": h ?? 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-drawer-open\": t,\n children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\n \"fixed inset-0 bg-black/40 transition-opacity duration-300\",\n y ? \"opacity-100\" : \"opacity-0\",\n c\n ),\n onClick: () => {\n f || r();\n }\n }\n ),\n /* @__PURE__ */ i(\"div\", { className: \"fixed inset-x-0 bottom-0 flex max-h-full\", children: /* @__PURE__ */ i(\n \"div\",\n {\n id: b,\n ref: a,\n tabIndex: -1,\n className: N(\n \"relative w-screen transform shadow-xl bg-popover text-popover-foreground transition-transform duration-300 ease-in-out border-t border-border rounded-t-lg\",\n y ? \"translate-y-0\" : \"translate-y-full\",\n l\n ),\n style: {\n transform: d && x !== 0 ? `translateY(${x}px)` : void 0,\n transition: x !== 0 ? \"none\" : void 0\n },\n children: /* @__PURE__ */ k(\"div\", { className: \"flex h-full flex-col\", children: [\n d && /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\n \"flex justify-center pt-3 pb-2 cursor-grab active:cursor-grabbing\",\n d && \"select-none\"\n ),\n ...w,\n role: d ? \"button\" : void 0,\n tabIndex: d ? 0 : void 0,\n \"aria-label\": d ? \"Drag to resize drawer\" : void 0,\n children: /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\n \"w-12 h-1.5 bg-popover-foreground/25 rounded-full transition-colors\",\n d && \"hover:bg-popover-foreground/50\",\n E && \"bg-popover-foreground/50\"\n )\n }\n )\n }\n ),\n e && /* @__PURE__ */ i(\"div\", { className: \"px-6 pt-4\", children: I() }),\n m && /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: r,\n \"data-drawer-close-button\": \"true\",\n \"aria-label\": \"Close drawer\",\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__ */ i(oe, { size: 18 })\n }\n ),\n /* @__PURE__ */ i(\"div\", { className: N(\"flex-1 overflow-y-auto px-6 pb-6\", e ? \"pt-6\" : \"pt-4\"), children: n }),\n C()\n ] })\n }\n ) })\n ]\n }\n ),\n document.body\n ) });\n}\nfunction de({ elementId: a, type: o, message: t }) {\n return A(() => {\n const r = document.getElementById(a);\n if (r) {\n if (!t && o === \"error\") {\n r.removeAttribute(\"data-error\");\n return;\n }\n if (!t && o === \"success\") {\n r.removeAttribute(\"data-success\");\n return;\n }\n return r.setAttribute(\"aria-describedby\", `${a}-${o}-message`), r.setAttribute(\"aria-invalid\", o === \"error\" ? \"true\" : \"false\"), o === \"error\" && r.setAttribute(\"data-error\", \"true\"), o === \"success\" && r.setAttribute(\"data-success\", \"true\"), () => {\n r.removeAttribute(\"aria-describedby\"), r.removeAttribute(\"aria-invalid\"), r.removeAttribute(\"data-error\"), r.removeAttribute(\"data-success\");\n };\n }\n }, [a, o, t]), t ? /* @__PURE__ */ k(\n \"small\",\n {\n className: N(\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__ */ i(De, {}) : /* @__PURE__ */ i(Se, {}),\n /* @__PURE__ */ i(\"span\", { id: `${a}-${o}-message`, children: t })\n ]\n }\n ) : null;\n}\nconst Tt = {\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}, Rt = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, ye = {\n variant: \"default\",\n rounded: \"none\"\n};\nfunction Ar({\n variant: a = ye.variant,\n rounded: o,\n displayOnlyMode: t = !1,\n errorMessage: r,\n successMessage: e,\n type: n = \"text\",\n className: s,\n ...l\n}) {\n const c = F(), [m, f] = $(!1);\n let d = o;\n a === \"outline\" && !o && (d = \"md\"), d = d || ye.rounded;\n const v = N(\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 && Tt[a],\n !t && Rt[d],\n n === \"password\" && \"pr-10\",\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n s\n );\n return /* @__PURE__ */ k(\"div\", { className: N(t && \"cursor-text\"), style: { height: l.height, width: l.width }, children: [\n /* @__PURE__ */ k(\"div\", { className: N(n === \"password\" && \"relative\"), children: [\n /* @__PURE__ */ i(\n \"input\",\n {\n ...l,\n id: c,\n type: n === \"password\" && m ? \"text\" : n,\n \"aria-disabled\": l.disabled,\n readOnly: t,\n \"aria-readonly\": t || l[\"aria-readonly\"],\n \"data-error\": r ? !0 : void 0,\n \"data-success\": e ? !0 : void 0,\n className: v\n }\n ),\n n === \"password\" && /* @__PURE__ */ i(\n \"button\",\n {\n onClick: () => f(!m),\n className: \"absolute inset-y-0 right-0 px-2 hover:cursor-pointer\",\n \"aria-label\": \"Toggle password visibility\",\n \"data-state\": m ? \"visible\" : \"hidden\",\n children: m ? /* @__PURE__ */ i(Pe, { size: 20 }) : /* @__PURE__ */ i(Ze, { size: 20 })\n }\n )\n ] }),\n !t && /* @__PURE__ */ i(de, { elementId: c, type: \"error\", message: r }),\n !t && /* @__PURE__ */ i(de, { elementId: c, type: \"success\", message: e })\n ] });\n}\nfunction Ir({\n display: a = \"inline\",\n width: o = \"fit-content\",\n className: t = \"\",\n required: r,\n helpMessage: e,\n suffix: n,\n htmlFor: s,\n children: l,\n description: c,\n ...m\n}) {\n var b, p;\n const f = F(), d = (((b = e == null ? void 0 : e.trim()) == null ? void 0 : b.length) || 0) > 0, h = (((p = c == null ? void 0 : c.trim()) == null ? void 0 : p.length) || 0) > 0, u = d ? `${s ?? f}-help` : void 0, v = h ? `${s ?? f}-description` : void 0;\n return /* @__PURE__ */ k(\n \"div\",\n {\n style: { display: a === \"inline\" ? \"inline-block\" : \"block\", width: o },\n className: N(\"mb-0.5\", t),\n children: [\n /* @__PURE__ */ k(\"div\", { className: \"relative flex\", children: [\n /* @__PURE__ */ k(\"label\", { className: \"font-medium\", htmlFor: s, ...m, children: [\n l,\n r && /* @__PURE__ */ i(\"span\", { className: \"text-red-500 font-medium ml-1\", \"aria-label\": \"required\", children: \"*\" })\n ] }),\n d && /* @__PURE__ */ i(\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__ */ i(_e, {})\n }\n ),\n d && /* @__PURE__ */ i(\"div\", { id: u, className: \"sr-only\", children: e }),\n n && /* @__PURE__ */ i(\"span\", { className: \"ml-1\", children: n })\n ] }),\n h && /* @__PURE__ */ i(\"small\", { id: v, className: \"block opacity-80 mt-0.5\", role: \"note\", children: c })\n ]\n }\n );\n}\nfunction Lt(a) {\n const [o, t] = $(!1), [r, e] = $(!1);\n return A(() => {\n a ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));\n }, [a]), { show: o, shouldRender: r };\n}\nfunction jt(a, o) {\n A(() => {\n const t = (r) => {\n r.key === \"Escape\" && a && o();\n };\n return document.addEventListener(\"keydown\", t), a && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", t), document.body.style.overflow = \"auto\";\n };\n }, [a, o]);\n}\nfunction Vt(a, o) {\n const t = V(null), r = S(() => {\n const e = document.getElementById(a);\n if (!e) return;\n const n = e.querySelectorAll('[data-modal-action=\"true\"]');\n if (n.length > 0) {\n n[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 l = Array.from(s).filter((c) => !(c instanceof HTMLButtonElement && c.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (l.length > 0) {\n l[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [a]);\n A(() => (o && (t.current = document.activeElement, r()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [o, r]);\n}\nfunction Dr({\n id: a,\n isOpen: o,\n onClose: t,\n title: r,\n children: e,\n contentOnly: n = !1,\n className: s,\n overlayClassName: l,\n hideCloseButton: c = !1,\n actions: m = [],\n disableCloseOnOverlayClick: f = !1,\n ariaLabelledBy: d,\n ariaDescribedBy: h\n}) {\n const u = F(), v = a || `modal-${u}`, b = a ? `${a}-title` : `modal-title-${u}`, { show: p, shouldRender: y } = Lt(o);\n if (Vt(v, y), jt(y, t), !y) return null;\n const g = () => r ? H.isValidElement(r) ? /* @__PURE__ */ i(\"div\", { className: \"mb-4\", children: r }) : /* @__PURE__ */ i(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: b, children: r }) : null, w = () => m.length === 0 ? null : /* @__PURE__ */ i(\"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((x, E) => {\n const { label: I, className: C, ...z } = x;\n return /* @__PURE__ */ i(nt, { className: C, type: \"button\", ...z, \"data-modal-action\": \"true\", children: I }, E);\n }) });\n return /* @__PURE__ */ i(Q, { children: ae(\n /* @__PURE__ */ i(\n \"div\",\n {\n \"aria-labelledby\": d ?? r ? b : 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__ */ k(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: B(\"fixed inset-0 bg-black/20 transition-all\", l),\n onClick: () => {\n f || t();\n }\n }\n ),\n n && /* @__PURE__ */ i(\"div\", { className: B(\"relative w-fit\", s), children: e }),\n !n && /* @__PURE__ */ k(\n \"div\",\n {\n id: v,\n tabIndex: -1,\n className: B(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover text-popover-foreground 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 !c && /* @__PURE__ */ i(\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__ */ i(oe, { size: 18 })\n }\n ),\n g(),\n e,\n w()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nconst Bt = {\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}, Mt = {\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 Tr({\n page: a,\n pageCount: o = 5,\n maxVisiblePages: t = 5,\n showFirstLast: r = !0,\n onPageChange: e,\n size: n = \"md\",\n variant: s = \"link\",\n className: l,\n ref: c,\n buttonsClassName: m,\n ...f\n}) {\n const d = o === 1 / 0, u = S(() => {\n if (d) return [];\n const x = o, E = Math.min(t, x);\n if (x <= E)\n return Array.from({ length: x }, (L, j) => j + 1);\n const I = Math.floor(E / 2);\n let C = Math.max(1, a - I), z = Math.min(x, C + E - 1);\n return z - C + 1 < E && (C = Math.max(1, z - E + 1), z = Math.min(x, C + E - 1)), Array.from({ length: z - C + 1 }, (L, j) => C + j);\n }, [d, t, a, o])(), v = a > 1, b = d || a < o, p = r && !d, y = r && !d, g = (x) => {\n x >= 1 && (d || x <= o) && e(x);\n }, w = S(() => {\n const x = B(\n \"flex items-center justify-center min-w-fit\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n Mt[n],\n \"rounded-md\"\n );\n return B(x, Bt[s], m);\n }, [s, n, m]);\n return /* @__PURE__ */ k(\n \"nav\",\n {\n ref: c,\n className: B(\"flex items-center justify-center gap-1\", l),\n role: \"navigation\",\n \"aria-label\": \"Pagination\",\n \"data-page\": a,\n \"data-page-count\": d ? \"infinite\" : o,\n ...f,\n children: [\n p && /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(1),\n className: w(),\n disabled: a === 1,\n \"aria-label\": \"Go to first page\",\n children: [\n /* @__PURE__ */ i(qe, { size: n === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ i(\"span\", { className: \"ml-1\", children: \"First\" })\n ]\n }\n ),\n /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(a - 1),\n className: w(),\n disabled: !v,\n \"aria-label\": \"Go to previous page\",\n children: [\n /* @__PURE__ */ i(Ae, { size: n === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ i(\"span\", { className: \"ml-1\", children: \"Previous\" })\n ]\n }\n ),\n !d && u.map((x) => /* @__PURE__ */ i(\n \"button\",\n {\n onClick: () => g(x),\n className: B(w(), \"aspect-square\"),\n \"aria-label\": `Go to page ${x}`,\n \"aria-current\": x === a ? !0 : void 0,\n children: x\n },\n x\n )),\n /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(a + 1),\n className: w(),\n disabled: !b,\n \"aria-label\": \"Go to next page\",\n children: [\n /* @__PURE__ */ i(\"span\", { className: \"mr-1\", children: \"Next\" }),\n /* @__PURE__ */ i(Ie, { size: n === \"sm\" ? 12 : 15 })\n ]\n }\n ),\n y && /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(o),\n className: w(),\n disabled: a === o,\n \"aria-label\": \"Go to last page\",\n children: [\n /* @__PURE__ */ i(\"span\", { className: \"mr-1\", children: \"Last\" }),\n /* @__PURE__ */ i(Ge, { size: n === \"sm\" ? 12 : 15 })\n ]\n }\n )\n ]\n }\n );\n}\nfunction Wt(a) {\n const [o, t] = $(!1), [r, e] = $(!1);\n return A(() => {\n a ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 300));\n }, [a]), { show: o, shouldRender: r };\n}\nfunction Kt(a, o) {\n A(() => {\n const t = (r) => {\n r.key === \"Escape\" && a && o();\n };\n return document.addEventListener(\"keydown\", t), a && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", t), document.body.style.overflow = \"auto\";\n };\n }, [a, o]);\n}\nfunction Ft(a, o) {\n const t = V(null), r = S(() => {\n const e = document.getElementById(a);\n if (!e) return;\n const n = e.querySelectorAll('[data-panel-action=\"true\"]');\n if (n.length > 0) {\n n[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 l = Array.from(s).filter((c) => !(c instanceof HTMLButtonElement && c.getAttribute(\"data-panel-close-button\") === \"true\"));\n if (l.length > 0) {\n l[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [a]);\n A(() => (o && (t.current = document.activeElement, r()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [o, r]);\n}\nconst Ht = {\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 Rr({\n ref: a,\n id: o,\n isOpen: t,\n onClose: r,\n title: e,\n children: n,\n footer: s,\n size: l = \"md\",\n className: c,\n overlayClassName: m,\n hideCloseButton: f = !1,\n disableCloseOnOverlayClick: d = !1,\n ariaLabelledBy: h,\n ariaDescribedBy: u\n}) {\n const v = F(), b = o || `panel-${v}`, p = o ? `${o}-title` : `panel-title-${v}`, { show: y, shouldRender: g } = Wt(t);\n if (Ft(b, g), Kt(g, r), !g) return null;\n const w = () => e ? H.isValidElement(e) ? /* @__PURE__ */ i(\"div\", { children: e }) : /* @__PURE__ */ i(\"h2\", { className: \"text-2xl font-semibold\", id: p, children: e }) : null, x = () => {\n if (!s) return null;\n if (H.isValidElement(s)) {\n const E = s, I = E.props.className || \"\";\n return H.cloneElement(E, { className: B(\"px-6 py-4\", I) });\n }\n return /* @__PURE__ */ i(\"div\", { className: \"px-6 py-4\", children: s });\n };\n return /* @__PURE__ */ i(Q, { children: ae(\n /* @__PURE__ */ k(\n \"div\",\n {\n \"aria-labelledby\": h ?? 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__ */ i(\n \"div\",\n {\n className: B(\n \"fixed inset-0 bg-black/40 transition-opacity duration-300\",\n y ? \"opacity-100\" : \"opacity-0\",\n m\n ),\n onClick: () => {\n d || r();\n }\n }\n ),\n /* @__PURE__ */ i(\"div\", { className: \"fixed inset-y-0 right-0 flex max-w-full\", children: /* @__PURE__ */ i(\n \"div\",\n {\n id: b,\n ref: a,\n tabIndex: -1,\n className: B(\n \"relative h-full transform shadow-xl bg-popover text-popover-foreground transition-transform duration-300 ease-in-out\",\n l !== \"screen\" && \"border-l border-border\",\n Ht.size[l],\n y ? \"translate-x-0\" : \"translate-x-full\",\n c\n ),\n \"data-panel-size\": l,\n children: /* @__PURE__ */ k(\"div\", { className: \"flex h-full flex-col\", children: [\n e && /* @__PURE__ */ i(\"div\", { className: \"px-6 pt-6\", children: w() }),\n !f && /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: r,\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__ */ i(oe, { size: 18 })\n }\n ),\n /* @__PURE__ */ i(\"div\", { className: B(\"flex-1 overflow-y-auto px-6 pb-6\", e ? \"pt-6\" : \"pt-10\"), children: n }),\n x()\n ] })\n }\n ) })\n ]\n }\n ),\n document.body\n ) });\n}\nfunction Pt(a) {\n switch (a) {\n case \"top\":\n return \"bottom\";\n case \"bottom\":\n return \"top\";\n case \"left\":\n return \"right\";\n case \"right\":\n return \"left\";\n }\n}\nfunction Zt({\n internalIsOpen: a,\n autoSwitchPlacement: o,\n placement: t,\n offset: r,\n triggerRef: e,\n popoverRef: n\n}) {\n const [s, l] = $(t);\n return A(() => {\n if (!a || !o) return;\n const c = () => {\n if (!e.current || !n.current) return;\n const d = e.current.getBoundingClientRect(), h = n.current.getBoundingClientRect(), u = window.innerWidth, v = window.innerHeight;\n let b = t;\n const p = Pt(t);\n if (t === \"top\" || t === \"bottom\") {\n const y = t === \"top\" ? d.top >= h.height + r : v - d.bottom >= h.height + r, g = p === \"top\" ? d.top >= h.height + r : v - d.bottom >= h.height + r;\n !y && g && (b = p);\n } else {\n const y = t === \"left\" ? d.left >= h.width + r : u - d.right >= h.width + r, g = p === \"left\" ? d.left >= h.width + r : u - d.right >= h.width + r;\n !y && g && (b = p);\n }\n l(b);\n };\n c();\n const m = () => c();\n window.addEventListener(\"scroll\", m, !0), window.addEventListener(\"resize\", m);\n const f = new ResizeObserver(c);\n return e.current && f.observe(e.current), n.current && f.observe(n.current), () => {\n window.removeEventListener(\"scroll\", m, !0), window.removeEventListener(\"resize\", m), f.disconnect();\n };\n }, [a, t, r, o, e, n]), s;\n}\nconst _t = {\n bottom: {\n start: \"top-full left-0 origin-top-left\",\n center: \"top-full left-1/2 -translate-x-1/2 origin-top\",\n end: \"top-full right-0 origin-top-right\"\n },\n top: {\n start: \"bottom-full left-0 origin-bottom-left\",\n center: \"bottom-full left-1/2 -translate-x-1/2 origin-bottom\",\n end: \"bottom-full right-0 origin-bottom-right\"\n },\n left: {\n start: \"right-full top-0 origin-top-right\",\n center: \"right-full top-1/2 -translate-y-1/2 origin-right\",\n end: \"right-full bottom-0 origin-bottom-right\"\n },\n right: {\n start: \"left-full top-0 origin-top-left\",\n center: \"left-full top-1/2 -translate-y-1/2 origin-left\",\n end: \"left-full bottom-0 origin-bottom-left\"\n }\n};\nfunction qt(a, o) {\n switch (a) {\n case \"top\":\n return { marginBottom: `${o}px` };\n case \"bottom\":\n return { marginTop: `${o}px` };\n case \"left\":\n return { marginRight: `${o}px` };\n case \"right\":\n return { marginLeft: `${o}px` };\n default:\n return {};\n }\n}\nfunction Lr({\n id: a,\n ref: o,\n isOpen: t,\n onOpenChange: r,\n children: e,\n className: n,\n closeOnOverlayClick: s = !0,\n trigger: l,\n placement: c = \"bottom\",\n alignment: m = \"center\",\n closeOnTriggerClick: f = !0,\n offset: d = 8,\n autoSwitchPlacement: h = !0\n}) {\n const [u, v] = $(t ?? !1), b = V(null), p = V(null), y = V(null), g = F(), w = Zt({\n internalIsOpen: u,\n autoSwitchPlacement: h,\n placement: c,\n offset: d,\n triggerRef: p,\n popoverRef: b\n }), x = S(\n (C) => {\n t === void 0 && v(C), r && r(C);\n },\n [t, r]\n );\n A(() => {\n t !== void 0 && v(t);\n }, [t]), A(() => {\n if (!u) return;\n const C = (z) => {\n z.key === \"Escape\" && x(!1);\n };\n return document.addEventListener(\"keydown\", C), () => document.removeEventListener(\"keydown\", C);\n }, [u, x]), A(() => {\n if (!u || !s) return;\n const C = (z) => {\n const L = z.target;\n b.current && !b.current.contains(L) && p.current && !p.current.contains(L) && x(!1);\n };\n return document.addEventListener(\"mousedown\", C), () => document.removeEventListener(\"mousedown\", C);\n }, [u, s, x]), A(() => {\n var C, z;\n u ? (y.current = document.activeElement, (C = b.current) == null || C.focus()) : ((z = y.current) == null || z.focus(), y.current = null);\n }, [u]);\n const E = l.props, I = H.cloneElement(l, {\n \"aria-expanded\": u,\n \"aria-haspopup\": \"dialog\",\n \"aria-controls\": g,\n ref: Qe(p, E.ref),\n onClick: (C) => {\n var z, L;\n if ((z = E.onClick) == null || z.call(E, C), !(!f && u) && t === void 0) {\n if (C.defaultPrevented || (L = b.current) != null && L.contains(C.target)) return;\n x(!u);\n }\n }\n });\n return /* @__PURE__ */ k(\"div\", { id: a, ref: o, className: \"relative inline-block\", children: [\n I,\n /* @__PURE__ */ i(\n \"div\",\n {\n id: g,\n ref: b,\n className: N(\n \"absolute z-[90] transform rounded-md shadow-lg bg-popover text-popover-foreground transition-all ease-out\",\n u ? \"opacity-100 scale-100\" : \"opacity-0 scale-75 pointer-events-none\",\n _t[w][m],\n n\n ),\n style: qt(w, d),\n role: \"dialog\",\n \"aria-modal\": \"true\",\n tabIndex: -1,\n inert: u ? void 0 : !0,\n \"aria-hidden\": u ? void 0 : !0,\n children: e\n }\n )\n ] });\n}\nfunction Gt({ itemId: a, checked: o, onChange: t, name: r, disabled: e = !1, className: n = \"\" }) {\n const s = \"relative inline-flex items-center justify-center rounded-full\", l = () => {\n e || t();\n }, c = N(\n s,\n !o && \"hover:border-current/60\",\n !e && \"border-current cursor-pointer\",\n e && \"border-muted/60 cursor-not-allowed\",\n n\n );\n return /* @__PURE__ */ i(\n \"div\",\n {\n id: a,\n role: \"radio\",\n tabIndex: -1,\n \"aria-checked\": o,\n \"aria-disabled\": e,\n \"aria-description\": `Radio button for ${r}`,\n \"aria-labelledby\": `${a}-label`,\n onClick: l,\n className: c,\n style: {\n width: \"1em\",\n height: \"1em\",\n padding: \"0.1em\",\n borderWidth: \"0.06em\"\n },\n children: o && /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\"size-full aspect-square rounded-full\", e && \"bg-muted/60\", !e && \"bg-current\")\n }\n )\n }\n );\n}\nfunction be({\n value: a,\n children: o,\n className: t = \"\",\n isSelected: r = !1,\n onChange: e,\n disabled: n = !1,\n hideInput: s = !1,\n description: l,\n name: c\n}) {\n const f = `radio-${F()}-${a}`, d = () => {\n n || e == null || e(a);\n };\n return /* @__PURE__ */ k(\n \"div\",\n {\n title: l,\n className: N(\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:${n ? \"border-current/50\" : \"border-current/80\"}`,\n s && !r && `border-transparent ${n ? \"\" : \"not-focus-within:hover:border-border/60\"}`,\n s && r && \"border-border\",\n n && \"opacity-60 cursor-not-allowed\"\n ),\n style: {\n gap: \"0.5em\"\n },\n children: [\n !s && /* @__PURE__ */ i(\n Gt,\n {\n itemId: f,\n name: c || \"\",\n checked: r,\n onChange: d,\n disabled: n,\n className: N(s && \"\")\n }\n ),\n /* @__PURE__ */ i(\n \"div\",\n {\n id: s ? f : void 0,\n tabIndex: s ? -1 : void 0,\n role: s ? \"radio\" : void 0,\n onClick: s ? d : void 0,\n \"aria-checked\": s ? r ? \"true\" : \"false\" : void 0,\n \"aria-disabled\": s ? n : void 0,\n \"aria-description\": s ? l || `Radio button for ${c}` : void 0,\n \"aria-labelledby\": s ? `${f}-label` : void 0,\n className: N(s && \"size-full\", typeof o == \"object\" && \"grow focus:outline-none\"),\n children: /* @__PURE__ */ i(\n \"label\",\n {\n id: `${f}-label`,\n onClick: s ? void 0 : d,\n className: N(n && \"cursor-not-allowed\", !n && \"cursor-pointer\"),\n children: o\n }\n )\n }\n )\n ]\n }\n );\n}\nfunction Yt(a, o) {\n const [t, r] = $(o), [e, n] = $(-1), [s, l] = $(!1), c = S((u, v) => {\n var y;\n const b = u[v];\n b.hasAttribute(\"disabled\") || b.getAttribute(\"aria-disabled\") === \"true\" || ((y = u[v]) == null || y.click(), n(v));\n }, []), m = S(\n (u, v) => {\n var p;\n if (u.preventDefault(), s || !v.length) return;\n const b = o !== -1 ? o : 0;\n (p = v[b]) == null || p.focus(), r(b), o !== -1 && c(v, b);\n },\n [o, s, c]\n ), f = S(\n (u) => {\n var y;\n if (!u.shiftKey)\n return;\n u.preventDefault();\n const v = 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), b = v.findIndex((g) => g.id === a), p = b > 0 ? b - 1 : v.length - 1;\n (y = v[p]) == null || y.focus();\n },\n [a]\n ), d = S(\n (u, v) => {\n var w;\n if (!v.length) return;\n const b = u.target;\n if (!v.some((x) => x.id === b.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 : v.length - 1;\n break;\n case \"ArrowDown\":\n case \"ArrowRight\":\n u.preventDefault(), g = (y + 1) % v.length;\n break;\n // Select the option when the space key is pressed\n case \" \":\n u.preventDefault(), c(v, y);\n return;\n case \"Tab\":\n f(u);\n return;\n default:\n return;\n }\n (w = v[g]) == null || w.focus(), r(g), e !== -1 && c(v, g);\n },\n [t, e, f, c]\n ), h = S(() => {\n const u = document.querySelector(`[id=\"${a}\"][role=\"radiogroup\"]`);\n return u ? Array.from(u.querySelectorAll('[role=\"radio\"]')) : [];\n }, [a]);\n A(() => {\n const u = document.querySelector(`[id=\"${a}\"][role=\"radiogroup\"]`);\n if (!u) return;\n const v = h(), b = (w) => m(w, v), p = (w) => d(w, v), y = () => l(!0), g = () => l(!1);\n return document.addEventListener(\"keydown\", p), u.addEventListener(\"focus\", b), u.addEventListener(\"mousedown\", y), document.addEventListener(\"mouseup\", g), () => {\n document.removeEventListener(\"keydown\", p), u.removeEventListener(\"focus\", b), u.removeEventListener(\"mousedown\", y), document.removeEventListener(\"mouseup\", g);\n };\n }, [a, h, m, d]);\n}\nfunction jr({\n options: a = [],\n value: o,\n onChange: t,\n id: r,\n children: e,\n className: n = \"\",\n childrenClassName: s = \"\",\n hideInputs: l = !1\n}) {\n const c = F(), m = r || `radio-group-${c}`;\n Yt(\n m,\n a.findIndex((d) => d === o)\n );\n const f = G(() => a.reduce((d, h) => (typeof h == \"string\" ? d.some((u) => u.value === h) || d.push({ label: h, value: h }) : d.push(h), d), []), [a]);\n return /* @__PURE__ */ k(\"div\", { id: m, role: \"radiogroup\", tabIndex: 0, className: N(n, \"focus:outline-none\"), children: [\n f.length > 0 && f.map((d, h) => /* @__PURE__ */ i(\n be,\n {\n value: d.value,\n isSelected: o === d.value,\n onChange: t,\n name: m,\n disabled: d.disabled,\n description: d.description,\n hideInput: l,\n className: s,\n children: d.label\n },\n `${d.value}-${h}`\n )),\n f.length === 0 && e && H.Children.map(e, (d) => H.isValidElement(d) && d.type === be ? /* @__PURE__ */ i(\n be,\n {\n ...d.props,\n className: N(s, d.props.className),\n hideInput: d.props.hideInput || l,\n isSelected: o === d.props.value,\n onChange: t,\n name: m,\n children: d.props.children\n }\n ) : null)\n ] });\n}\nfunction Ut(a) {\n const o = V(null), t = V(null), r = V(null), [e, n] = $(!1), [s, l] = $(!1), [c, m] = $({\n vertical: !1,\n horizontal: !1\n }), f = V(null), d = V(null), h = S(() => {\n const b = o.current;\n if (!b) return;\n const p = b.scrollHeight > b.clientHeight, y = b.scrollWidth > b.clientWidth;\n m({\n vertical: p,\n horizontal: y\n });\n }, []), u = S(() => {\n const b = o.current, p = t.current, y = r.current;\n if (b) {\n if (p && c.vertical) {\n const w = (c.horizontal ? b.clientHeight - a : b.clientHeight) / b.scrollHeight, x = Math.max(w * 100, 10), E = b.scrollHeight - b.clientHeight, I = E > 0 ? b.scrollTop / E : 0, C = 100 - x, z = I * C;\n p.style.height = `${x}%`, p.style.top = `${z}%`, p.style.transform = \"none\";\n }\n if (y && c.horizontal) {\n const w = (c.vertical ? b.clientWidth - a : b.clientWidth) / b.scrollWidth, x = Math.max(w * 100, 10), E = b.scrollWidth - b.clientWidth, I = E > 0 ? b.scrollLeft / E : 0, C = 100 - x, z = I * C;\n y.style.width = `${x}%`, y.style.left = `${z}%`, y.style.transform = \"none\";\n }\n }\n }, [c, a]), v = S(() => {\n f.current && clearTimeout(f.current), d.current && clearTimeout(d.current), n(!0), l(!1), u(), f.current = setTimeout(() => {\n l(!0), d.current = setTimeout(() => {\n n(!1), l(!1);\n }, 300);\n }, 1e3);\n }, [u]);\n return A(() => {\n const b = o.current;\n if (!b) return;\n h();\n const p = new ResizeObserver(h);\n p.observe(b);\n const y = new MutationObserver(h);\n return y.observe(b, {\n childList: !0,\n subtree: !0,\n attributes: !0\n }), () => {\n p.disconnect(), y.disconnect();\n };\n }, [h]), A(() => {\n u();\n }, [c, u]), A(() => () => {\n f.current && clearTimeout(f.current), d.current && clearTimeout(d.current);\n }, []), {\n viewportRef: o,\n verticalThumbRef: t,\n horizontalThumbRef: r,\n isScrolling: e,\n isFadingOut: s,\n scrollbarVisible: c,\n handleScroll: v\n };\n}\nfunction Vr({\n className: a,\n thumbClassName: o,\n viewportClassName: t,\n scrollbarClassName: r,\n scrollbarThickness: e = 10,\n children: n,\n id: s,\n ref: l,\n ...c\n}) {\n const { viewportRef: m, verticalThumbRef: f, horizontalThumbRef: d, isScrolling: h, isFadingOut: u, scrollbarVisible: v, handleScroll: b } = Ut(e), p = B(\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: l, id: s, className: B(\"relative overflow-hidden\", a), \"data-scroll-area-root\": \"\", ...c, children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n ref: m,\n className: B(\n \"h-full w-full overflow-auto rounded-[inherit] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\",\n t\n ),\n onScroll: b,\n \"data-scroll-area-viewport\": \"\",\n children: n\n }\n ),\n v.vertical && (h || u) && /* @__PURE__ */ i(\n \"div\",\n {\n className: B(\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 r\n ),\n \"data-scroll-area-scrollbar\": \"vertical\",\n \"data-state\": h ? \"visible\" : \"hidden\",\n style: {\n width: `${e}px`,\n height: v.horizontal ? `calc(100% - ${e}px)` : \"100%\"\n },\n children: /* @__PURE__ */ i(\n \"div\",\n {\n ref: f,\n className: B(\"absolute rounded-full\", p),\n \"data-scroll-area-thumb\": \"\",\n style: { height: \"20%\", top: \"0%\", width: \"100%\" }\n }\n )\n }\n ),\n v.horizontal && (h || u) && /* @__PURE__ */ i(\n \"div\",\n {\n className: B(\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 r\n ),\n \"data-scroll-area-scrollbar\": \"horizontal\",\n \"data-state\": h ? \"visible\" : \"hidden\",\n style: {\n height: `${e}px`,\n width: v.vertical ? `calc(100% - ${e}px)` : \"100%\"\n },\n children: /* @__PURE__ */ i(\n \"div\",\n {\n ref: d,\n className: B(\"absolute rounded-full\", p),\n \"data-scroll-area-thumb\": \"\",\n style: { width: \"20%\", left: \"0%\", height: \"100%\" }\n }\n )\n }\n ),\n v.vertical && v.horizontal && /* @__PURE__ */ i(\n \"div\",\n {\n className: B(\"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 Xt(a) {\n const [o, t] = $(!1), [r, e] = $(!1);\n return A(() => {\n a ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));\n }, [a]), { show: o, shouldRender: r };\n}\nfunction Jt({\n isOpen: a,\n setIsOpen: o,\n filteredOptions: t,\n highlightedIndex: r,\n setHighlightedIndex: e,\n onSelect: n,\n triggerRef: s\n}) {\n return { handleKeyDown: S(\n (c) => {\n var m;\n switch (c.key) {\n case \"ArrowDown\":\n if (c.preventDefault(), !a)\n o(!0);\n else {\n const f = r < t.length - 1 ? r + 1 : 0;\n let d = f;\n for (let h = 0; h < t.length; h++) {\n const u = (f + h) % t.length;\n if (!t[u].disabled) {\n d = u;\n break;\n }\n }\n e(d);\n }\n break;\n case \"ArrowUp\":\n if (c.preventDefault(), !a)\n o(!0);\n else {\n const f = r > 0 ? r - 1 : t.length - 1;\n let d = f;\n for (let h = 0; h < t.length; h++) {\n const u = (f - h + t.length) % t.length;\n if (!t[u].disabled) {\n d = u;\n break;\n }\n }\n e(d);\n }\n break;\n case \"Enter\":\n case \" \":\n if (c.preventDefault(), !a)\n o(!0);\n else if (r >= 0 && r < t.length) {\n const f = t[r];\n f.disabled || n(f);\n }\n break;\n case \"Escape\":\n c.preventDefault(), a && (o(!1), (m = s.current) == null || m.focus());\n break;\n case \"Tab\":\n a && o(!1);\n break;\n }\n },\n [a, o, t, r, e, n, s]\n ) };\n}\nfunction Qt({\n isOpen: a,\n filteredOptions: o,\n selectedOption: t,\n shouldRender: r,\n optionsContainerRef: e\n}) {\n const [n, s] = $(-1), l = G(() => t ? o.findIndex((c) => c.value === t.value) : -1, [o, t]);\n return A(() => {\n a && o.length > 0 ? s(t && l >= 0 ? l : 0) : s(-1);\n }, [o, a, t, l]), A(() => {\n if (n >= 0 && e.current && r) {\n const c = () => {\n const m = e.current, f = m == null ? void 0 : m.querySelector(`[data-option-index=\"${n}\"]`);\n if (f) {\n const d = a && t && n === l ? \"auto\" : \"smooth\";\n f.scrollIntoView({\n behavior: d,\n block: \"nearest\"\n });\n }\n };\n a && r && t ? setTimeout(c, 10) : c();\n }\n }, [n, r, a, t, o, e, l]), { highlightedIndex: n, setHighlightedIndex: s };\n}\nconst we = {\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 Br({\n options: a,\n value: o,\n placeholder: t = \"Select an option...\",\n searchable: r = !1,\n disabled: e = !1,\n clearable: n = !1,\n size: s = \"md\",\n className: l,\n triggerClassName: c,\n dropdownClassName: m,\n id: f,\n ref: d,\n onChange: h,\n onSearch: u,\n searchPlaceholder: v = \"Search options...\"\n}) {\n const b = F(), y = `${f ?? b}-listbox`, g = (T) => `${y}-option-${T}`, [w, x] = $(!1), [E, I] = $(\"\"), C = V(null), z = V(null), L = V(null), j = V(null), { show: Z, shouldRender: K } = Xt(w), R = G(() => !r || !E ? a : a.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 ), [a, r, E]), D = G(() => a.find((T) => T.value === o), [a, o]), { highlightedIndex: M, setHighlightedIndex: _ } = Qt({\n isOpen: w,\n filteredOptions: R,\n selectedOption: D,\n shouldRender: K,\n optionsContainerRef: j\n }), Y = M >= 0 ? g(M) : void 0;\n A(() => {\n w && K && r && z.current && z.current.focus();\n }, [w, r, K]);\n const X = S(\n (T) => {\n var W;\n T.disabled || (h == null || h(T.value), x(!1), I(\"\"), (W = C.current) == null || W.focus());\n },\n [h]\n ), { handleKeyDown: q } = Jt({\n isOpen: w,\n setIsOpen: x,\n filteredOptions: R,\n highlightedIndex: M,\n setHighlightedIndex: _,\n onSelect: X,\n triggerRef: C\n });\n A(() => {\n if (!w)\n return;\n const T = (W) => {\n var re;\n L.current && !L.current.contains(W.target) && !((re = C.current) != null && re.contains(W.target)) && (x(!1), I(\"\"));\n };\n return document.addEventListener(\"mousedown\", T), () => document.removeEventListener(\"mousedown\", T);\n }, [w]);\n const O = () => {\n e || (x(!w), w || (I(\"\"), _(-1)));\n }, ue = (T) => {\n T.disabled || (h == null || h(T.value), x(!1), I(\"\"));\n }, fe = (T) => {\n const W = T.target.value;\n I(W), u == null || u(W), _(-1);\n }, me = (T) => {\n T.preventDefault(), T.stopPropagation(), h == null || h(\"\");\n };\n return /* @__PURE__ */ k(\n \"div\",\n {\n className: N(\"relative\", l),\n id: f,\n ref: d,\n \"data-select\": \"true\",\n \"data-value\": o,\n \"data-searchable\": r,\n \"data-disabled\": e,\n \"data-clearable\": n,\n children: [\n /* @__PURE__ */ k(\"div\", { className: \"relative\", children: [\n /* @__PURE__ */ k(\n \"button\",\n {\n ref: C,\n type: \"button\",\n className: N(\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 w && \"border-primary ring-1 ring-primary\",\n we[s].trigger,\n c\n ),\n onClick: O,\n onKeyDown: q,\n disabled: e,\n \"aria-disabled\": e,\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": w,\n \"aria-controls\": w ? y : void 0,\n \"aria-activedescendant\": w && !r ? Y : void 0,\n \"aria-label\": D ? D.text : t,\n \"data-select-trigger\": \"true\",\n children: [\n /* @__PURE__ */ i(\"span\", { className: N(\"block truncate\", !D && \"opacity-70\"), children: D ? D.text : t }),\n /* @__PURE__ */ i(\"div\", { className: \"flex items-center ml-2\", children: /* @__PURE__ */ i($e, { size: 16, className: N(\"transition-transform duration-200\", w && \"rotate-180\") }) })\n ]\n }\n ),\n n && D && /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: me,\n className: \"absolute right-8 top-1/2 -translate-y-1/2 p-0.5 rounded hover:bg-accent/20 transition-colors group z-10\",\n \"aria-label\": \"Clear selection\",\n \"data-select-clear\": \"true\",\n children: /* @__PURE__ */ i(oe, { size: 14, className: \"opacity-70 group-hover:opacity-100 transition-opacity\" })\n }\n )\n ] }),\n K && /* @__PURE__ */ k(\n \"div\",\n {\n ref: L,\n className: N(\n \"absolute z-50 w-full mt-1 bg-popover text-popover-foreground border border-border rounded-md shadow-lg transition-all duration-150\",\n Z ? \"opacity-100 translate-y-0\" : \"opacity-0 -translate-y-2\",\n m\n ),\n id: y,\n role: \"listbox\",\n \"data-select-content\": \"true\",\n children: [\n r && /* @__PURE__ */ i(\"div\", { className: \"border-b border-border\", children: /* @__PURE__ */ i(\n \"input\",\n {\n ref: z,\n type: \"text\",\n value: E,\n onChange: fe,\n onKeyDown: q,\n placeholder: v,\n className: \"w-full px-2 py-2 text-inherit focus:outline-none\",\n \"aria-autocomplete\": \"list\",\n \"aria-controls\": y,\n \"aria-activedescendant\": Y,\n \"data-select-search\": \"true\"\n }\n ) }),\n /* @__PURE__ */ i(\"div\", { ref: j, className: \"max-h-60 overflow-auto\", children: R.length > 0 ? R.map((T, W) => /* @__PURE__ */ k(\n \"div\",\n {\n id: g(W),\n className: N(\n \"flex items-center cursor-pointer transition-colors\",\n \"hover:bg-accent/10 focus:bg-accent/10\",\n we[s].options,\n T.disabled && \"opacity-50 cursor-not-allowed\",\n W === M && \"bg-accent/20\",\n o === T.value && \"bg-accent/30\"\n ),\n onClick: () => ue(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 === M,\n \"data-option-index\": W,\n children: [\n /* @__PURE__ */ k(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ i(\"div\", { className: \"font-medium\", children: T.text }),\n T.description && /* @__PURE__ */ i(\"div\", { className: \"text-xs opacity-70 mt-0.5\", children: T.description })\n ] }),\n o === T.value && /* @__PURE__ */ i(ve, { size: 16, className: \"ml-2 text-primary flex-shrink-0\" })\n ]\n },\n T.value\n )) : /* @__PURE__ */ i(\"div\", { className: \"px-3 py-2 text-sm opacity-70 text-center\", children: r && E ? \"No results found\" : \"No options available\" }) })\n ]\n }\n )\n ]\n }\n );\n}\nconst Ot = {\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}, er = {\n horizontal: \"w-full\",\n vertical: \"min-h-4 h-full\"\n};\nfunction Mr({\n orientation: a = \"horizontal\",\n decorative: o = !1,\n thickness: t = \"thin\",\n className: r,\n ...e\n}) {\n const n = N(\n \"shrink-0 bg-border\",\n er[a],\n Ot[t][a],\n r\n );\n return /* @__PURE__ */ i(\n \"div\",\n {\n ...e,\n className: n,\n role: o ? \"presentation\" : \"separator\",\n \"aria-orientation\": o ? void 0 : a,\n \"aria-hidden\": o,\n \"data-orientation\": a,\n \"data-thickness\": t\n }\n );\n}\nconst Ne = {\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 Wr({\n shape: a = \"rectangle\",\n lineSpacing: o = \"sm\",\n className: t,\n lines: r = 1,\n animate: e = !0,\n ref: n,\n ...s\n}) {\n const l = N(\"bg-muted/70\", e && \"animate-pulse\", Ne.shape[a], t);\n return r > 1 ? /* @__PURE__ */ i(\n \"div\",\n {\n ref: n,\n className: Ne.lineSpacing[o],\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-container\",\n \"data-lines\": r,\n \"data-shape\": a,\n \"data-animate\": e,\n ...s,\n children: Array.from({ length: r }, (c, m) => /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\n l,\n // Make last line shorter for a more natural text appearance\n m === r - 1 && \"w-3/4\"\n ),\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-line\",\n \"data-line-index\": m\n },\n m\n ))\n }\n ) : /* @__PURE__ */ i(\n \"div\",\n {\n ref: n,\n className: l,\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton\",\n \"data-shape\": a,\n \"data-animate\": e,\n ...s\n }\n );\n}\nfunction Kr({\n id: a,\n value: o,\n defaultValue: t = 0,\n onValueChange: r,\n min: e = 0,\n max: n = 100,\n step: s = 1,\n disabled: l = !1,\n trackClassName: c,\n rangeClassName: m,\n thumbClassName: f,\n className: d,\n ref: h,\n ariaLabel: u,\n ariaLabelledBy: v,\n ...b\n}) {\n const [p, y] = $(t), g = o !== void 0, w = g ? o : p, x = V(null), E = V(!1), I = V(0), C = S(\n (R) => {\n const D = Math.max(e, Math.min(n, R)), M = Math.round(D / s) * s;\n g || y(M), r == null || r(M);\n },\n [e, n, s, g, r]\n ), z = S(\n (R, D = !1) => {\n var X;\n const M = (X = x.current) == null ? void 0 : X.getBoundingClientRect();\n if (!M) return w;\n let _ = R.clientX;\n D && (_ = _ - I.current);\n const Y = Math.max(0, Math.min(1, (_ - M.left) / M.width));\n return e + (n - e) * Y;\n },\n [e, n, w]\n ), L = S(\n (R) => {\n if (l || R.target !== R.currentTarget) return;\n const D = z(R);\n C(D);\n },\n [l, z, C]\n ), j = S(\n (R) => {\n var X;\n if (l) return;\n R.stopPropagation(), E.current = !0;\n const D = (X = x.current) == null ? void 0 : X.getBoundingClientRect(), M = R.currentTarget.getBoundingClientRect();\n if (D && M) {\n const q = M.left + M.width / 2;\n I.current = R.clientX - q;\n }\n R.currentTarget.setPointerCapture(R.pointerId);\n const _ = (q) => {\n if (!E.current) return;\n const O = z(q, !0);\n C(O);\n }, Y = (q) => {\n if (q.pointerId === R.pointerId) {\n E.current = !1, I.current = 0;\n try {\n R.currentTarget.releasePointerCapture(q.pointerId);\n } catch {\n }\n document.removeEventListener(\"pointermove\", _), document.removeEventListener(\"pointerup\", Y);\n }\n };\n document.addEventListener(\"pointermove\", _), document.addEventListener(\"pointerup\", Y);\n },\n [l, z, C]\n ), Z = S(\n (R) => {\n if (l) return;\n let D = w;\n switch (R.key) {\n case \"ArrowRight\":\n case \"ArrowUp\":\n D = w + s;\n break;\n case \"ArrowLeft\":\n case \"ArrowDown\":\n D = w - s;\n break;\n case \"Home\":\n D = e;\n break;\n case \"End\":\n D = n;\n break;\n case \"PageUp\":\n D = w + s * 10;\n break;\n case \"PageDown\":\n D = w - s * 10;\n break;\n default:\n return;\n }\n R.preventDefault(), C(D);\n },\n [l, w, s, e, n, C]\n ), K = n === e ? 0 : (w - e) / (n - e) * 100;\n return /* @__PURE__ */ i(\n \"div\",\n {\n id: a,\n ref: h,\n className: B(\n \"relative flex items-center w-full touch-none select-none\",\n l && \"opacity-50 cursor-not-allowed\",\n d\n ),\n \"data-disabled\": l,\n \"data-value\": w,\n \"data-min\": e,\n \"data-max\": n,\n \"data-step\": s,\n ...b,\n children: /* @__PURE__ */ k(\n \"div\",\n {\n ref: x,\n className: B(\n \"relative h-1.5 w-full rounded-full bg-muted cursor-pointer\",\n l && \"cursor-not-allowed\",\n c\n ),\n onPointerDown: L,\n children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: B(\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 m\n ),\n style: { width: `${K}%` }\n }\n ),\n /* @__PURE__ */ i(\n \"div\",\n {\n className: B(\n \"absolute size-5 -top-2 rounded-full shadow-md cursor-grab\",\n l && \"cursor-not-allowed\",\n !l && \"cursor-grab focus:outline-none focus:ring-2\",\n E.current ? \"cursor-grabbing scale-110\" : \"transition-all\",\n f\n ),\n style: { left: `calc(${K}% - 10px)` },\n tabIndex: l ? -1 : 0,\n role: \"slider\",\n \"aria-valuemin\": e,\n \"aria-valuemax\": n,\n \"aria-valuenow\": w,\n \"aria-label\": u,\n \"aria-labelledby\": v,\n \"aria-disabled\": l,\n onKeyDown: Z,\n onPointerDown: j\n }\n )\n ]\n }\n )\n }\n );\n}\nfunction Fr({ children: a, ref: o, ...t }) {\n if (Le(a)) {\n let r = { ...t };\n return a.props && (r = { ...r, ...a.props }), je(a, {\n ...r,\n ref: (e) => {\n typeof o == \"function\" ? o(e) : o && (o.current = e);\n }\n });\n }\n return ze(\"div\", { ...t, ref: o }, a);\n}\nconst tr = ({ defaultValue: a, value: o, onValueChange: t } = {}) => {\n const [r, e] = $(a || \"\"), n = o !== void 0, s = n ? o : r, l = S((c) => {\n n || e(c), t == null || t(c);\n }, [n, t]);\n return {\n value: s,\n onValueChange: l\n };\n};\nfunction Hr({\n defaultValue: a,\n value: o,\n onValueChange: t,\n tabsWidth: r = \"fit\",\n variant: e = \"underline\",\n className: n,\n children: s,\n ref: l,\n id: c,\n triggersClassName: m,\n contentClassName: f\n}) {\n const { value: d, onValueChange: h } = tr({\n defaultValue: a,\n value: o,\n onValueChange: t\n }), u = {\n selectedValue: d,\n onValueChange: h,\n tabsWidth: r,\n variant: e,\n triggersClassName: m,\n contentClassName: f\n };\n return /* @__PURE__ */ i(Ye.Provider, { value: u, children: /* @__PURE__ */ i(\"div\", { id: c, ref: l, className: n, \"data-tabs-width\": r, \"data-variant\": e, children: s }) });\n}\nfunction Pr({ value: a, className: o, children: t, ref: r }) {\n const { selectedValue: e, contentClassName: n } = ge(), s = e === a;\n return s ? /* @__PURE__ */ i(\n \"div\",\n {\n ref: r,\n role: \"tabpanel\",\n id: `tabs-content-${a}`,\n \"aria-labelledby\": `tabs-trigger-${a}`,\n \"data-state\": s ? \"active\" : \"inactive\",\n \"data-value\": a,\n className: N(\"mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2\", n, o),\n tabIndex: 0,\n children: t\n }\n ) : null;\n}\nconst Ee = {\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}, rr = {\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 Zr({ children: a, className: o, id: t, ref: r }) {\n const { tabsWidth: e, variant: n } = ge();\n return /* @__PURE__ */ i(\n \"div\",\n {\n id: t,\n ref: r,\n role: \"tablist\",\n className: N(\"flex\", Ee.width[e], Ee.variant[n], o),\n \"data-tabs-width\": e,\n \"data-variant\": n,\n children: a\n }\n );\n}\nfunction _r({ value: a, disabled: o = !1, className: t, children: r, onClick: e, id: n, ref: s }) {\n const { selectedValue: l, onValueChange: c, variant: m, triggersClassName: f } = ge(), d = l === a, h = (v) => {\n o || c(a), e == null || e(v);\n };\n return /* @__PURE__ */ i(\n \"button\",\n {\n id: n,\n ref: s,\n role: \"tab\",\n type: \"button\",\n \"aria-selected\": d,\n \"aria-controls\": `tabs-content-${a}`,\n \"data-state\": d ? \"active\" : \"inactive\",\n \"data-value\": a,\n disabled: o,\n className: N(\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 d ? \"font-medium\" : \"font-light\",\n rr[m],\n f,\n t\n ),\n onClick: h,\n children: r\n }\n );\n}\nfunction nr({ elementId: a, maxLength: o }) {\n const [t, r] = $(0);\n return A(() => {\n const e = document.getElementById(a);\n if (!e)\n return;\n const n = () => {\n const s = e.value.length;\n r(s);\n const l = s >= o;\n e.setAttribute(\"aria-describedby\", `${a}-character-count`), e.setAttribute(\"aria-invalid\", l ? \"true\" : \"false\"), l ? e.setAttribute(\"data-error\", \"true\") : e.removeAttribute(\"data-error\");\n };\n return n(), e.addEventListener(\"input\", n), e.setAttribute(\"maxlength\", String(o)), () => {\n e.removeEventListener(\"input\", n), e.removeAttribute(\"maxlength\"), e.removeAttribute(\"aria-describedby\"), e.removeAttribute(\"aria-invalid\"), e.removeAttribute(\"data-error\");\n };\n }, [a, o]), /* @__PURE__ */ i(\n \"small\",\n {\n className: N(\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: `${a}-character-count`, children: [\n t,\n \" / \",\n o,\n \" characters\"\n ] })\n }\n );\n}\nfunction or(a, o) {\n A(() => {\n const t = document.getElementById(a);\n if (!t)\n return;\n if (!o) {\n t.style.height = \"auto\";\n return;\n }\n const r = () => {\n t.style.height = \"auto\", t.style.height = `${t.scrollHeight}px`;\n };\n return r(), t.addEventListener(\"input\", r), t.addEventListener(\"resize\", r), window.addEventListener(\"resize\", r), () => {\n t.removeEventListener(\"input\", r), t.removeEventListener(\"resize\", r), window.removeEventListener(\"resize\", r);\n };\n }, [a, o]);\n}\nconst ar = {\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}, sr = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, ke = {\n variant: \"outline\",\n rounded: \"none\"\n};\nfunction qr({\n variant: a = ke.variant,\n rounded: o,\n displayOnlyMode: t = !1,\n errorMessage: r,\n successMessage: e,\n hideResizeHandle: n = !1,\n autoExpand: s = !1,\n characterLimit: l = 0,\n className: c,\n ...m\n}) {\n const f = F();\n or(f, s || t);\n let d = o;\n a === \"outline\" && !o && (d = \"md\"), d = d || ke.rounded;\n let h = n;\n (t || a === \"left-line\" && !n) && (h = !0);\n const v = N(\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 && ar[a],\n !t && sr[d],\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n h && \"no-resize-handle\",\n c\n );\n return /* @__PURE__ */ k(\"div\", { className: N(\"-space-y-1.5\", t && \"cursor-text\"), children: [\n /* @__PURE__ */ i(\n \"textarea\",\n {\n ...m,\n id: f,\n \"aria-disabled\": m.disabled,\n readOnly: t,\n \"aria-readonly\": t || m[\"aria-readonly\"],\n style: {\n resize: s ? \"none\" : void 0\n },\n className: v\n }\n ),\n l > 0 && /* @__PURE__ */ i(nr, { elementId: f, maxLength: l }),\n !t && /* @__PURE__ */ i(de, { elementId: f, type: \"error\", message: r }),\n !t && /* @__PURE__ */ i(de, { elementId: f, type: \"success\", message: e })\n ] });\n}\nconst ir = {\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}, lr = {\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}, Ce = {\n variant: \"default\",\n size: \"md\"\n};\nfunction Gr({\n ref: a,\n id: o,\n size: t = Ce.size,\n variant: r = Ce.variant,\n checked: e,\n onCheckedChange: n,\n disabled: s = !1,\n className: l,\n thumbClassName: c,\n backgroundClassNames: m,\n ...f\n}) {\n const d = F(), h = G(() => o || `toggle-${d}`, [o, d]), [u, v] = $(e);\n A(() => {\n v(e);\n }, [e]);\n const b = () => {\n if (!s) {\n const E = !u;\n e === void 0 && v(E), n == null || n(E);\n }\n }, p = (E) => {\n (E.key === \" \" || E.key === \"Enter\") && (E.preventDefault(), b());\n }, y = ir[t], g = lr[r], w = N(\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 ? (m == null ? void 0 : m.checked) || g.checked : (m == null ? void 0 : m.unchecked) || g.unchecked,\n // Disabled state\n s && \"opacity-50 cursor-not-allowed\",\n !s && \"cursor-pointer\",\n l\n ), x = N(\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 c\n );\n return /* @__PURE__ */ k(\n \"button\",\n {\n ref: a,\n id: h,\n type: \"button\",\n role: \"switch\",\n tabIndex: 0,\n \"aria-checked\": u,\n \"aria-disabled\": s,\n disabled: s,\n onClick: b,\n onKeyDown: p,\n className: w,\n ...f,\n children: [\n /* @__PURE__ */ i(\"span\", { className: x }),\n /* @__PURE__ */ i(\"span\", { className: \"sr-only\", children: u ? \"Enabled\" : \"Disabled\" })\n ]\n }\n );\n}\nconst le = 8, ce = 4, U = 6;\nfunction cr(a) {\n return { calculatePosition: S(\n (t, r) => {\n const e = t.getBoundingClientRect(), n = r.getBoundingClientRect(), s = {\n width: window.innerWidth,\n height: window.innerHeight\n }, l = (h, u, v, b) => h < 0 || u < 0 || h + v > s.width || u + b > s.height, c = {\n top: {\n x: e.left + e.width / 2 - n.width / 2,\n y: e.top - n.height - ce,\n arrow: {\n x: n.width / 2 - U,\n y: n.height\n }\n },\n bottom: {\n x: e.left + e.width / 2 - n.width / 2,\n y: e.bottom + ce,\n arrow: {\n x: n.width / 2 - U,\n y: -6\n }\n },\n left: {\n x: e.left - n.width - ce,\n y: e.top + e.height / 2 - n.height / 2,\n arrow: {\n x: n.width,\n y: n.height / 2 - U\n }\n },\n right: {\n x: e.right + ce,\n y: e.top + e.height / 2 - n.height / 2,\n arrow: {\n x: -6,\n y: n.height / 2 - U\n }\n }\n };\n let m = a, f = c[a];\n if (l(f.x, f.y, n.width, n.height)) {\n const h = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n }, u = c[h[a]];\n if (!l(u.x, u.y, n.width, n.height))\n m = h[a], f = u;\n else {\n const v = [\"top\", \"bottom\", \"left\", \"right\"].filter(\n (b) => b !== a && b !== h[a]\n );\n for (const b of v) {\n const p = c[b];\n if (!l(p.x, p.y, n.width, n.height)) {\n m = b, f = p;\n break;\n }\n }\n }\n }\n f.x = Math.max(\n le,\n Math.min(f.x, s.width - n.width - le)\n ), f.y = Math.max(\n le,\n Math.min(f.y, s.height - n.height - le)\n );\n const d = {\n x: e.left + e.width / 2,\n y: e.top + e.height / 2\n };\n return m === \"top\" || m === \"bottom\" ? f.arrow.x = Math.max(\n U,\n Math.min(d.x - f.x - U, n.width - U * 2)\n ) : f.arrow.y = Math.max(\n U,\n Math.min(d.y - f.y - U, n.height - U * 2)\n ), {\n ...f,\n placement: m\n };\n },\n [a]\n ) };\n}\nfunction dr(a, o, t) {\n const r = V(null), e = V(null), n = S(() => {\n if (!r.current || !e.current) return;\n const s = a(r.current, e.current);\n t(s);\n }, [a, t]);\n return A(() => {\n if (!o) return;\n const s = () => n();\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, [o, n]), {\n triggerRef: r,\n tooltipRef: e,\n updatePosition: n\n };\n}\nfunction ur(a, o, t, r, e, n, s, l, c) {\n const m = V(null), f = S(() => {\n a || (m.current && clearTimeout(m.current), m.current = window.setTimeout(() => {\n t(!0), requestAnimationFrame(() => {\n e(), r(!0);\n });\n }, o));\n }, [a, o, t, e, r]), d = S(\n (h = !1) => {\n if (m.current && clearTimeout(m.current), h) {\n r(!1), setTimeout(() => t(!1), 150);\n return;\n }\n m.current = window.setTimeout(() => {\n r(!1), setTimeout(() => t(!1), 150);\n }, 100);\n },\n [r, t]\n );\n return A(() => {\n !n && !s && !l && c && d();\n }, [n, s, l, c, d]), A(() => () => {\n m.current && clearTimeout(m.current);\n }, []), {\n showTooltip: f,\n hideTooltip: d,\n timeoutRef: m\n };\n}\nfunction Yr({\n id: a,\n children: o,\n message: t,\n placement: r = \"top\",\n disabled: e = !1,\n delay: n = 200,\n className: s\n}) {\n const [l, c] = $(!1), [m, f] = $(!1), [d, h] = $(null), [u, v] = $(!1), [b, p] = $(!1), [y, g] = $(!1), { calculatePosition: w } = cr(r), { triggerRef: x, tooltipRef: E, updatePosition: I } = dr(w, m, h), { showTooltip: C, hideTooltip: z, timeoutRef: L } = ur(\n e,\n n,\n f,\n c,\n I,\n u,\n b,\n y,\n l\n ), j = F(), Z = a ?? j;\n return /* @__PURE__ */ k(Q, { children: [\n H.cloneElement(o, {\n ref: (K) => {\n x.current = K;\n },\n onMouseEnter: () => {\n v(!0), C();\n },\n onMouseLeave: () => {\n v(!1);\n },\n onFocus: () => {\n g(!0), C();\n },\n onBlur: () => {\n g(!1), z(!0);\n },\n onKeyDown: (K) => {\n K.key === \"Escape\" && z(!0);\n },\n \"aria-describedby\": e ? void 0 : Z\n }),\n m && ae(\n /* @__PURE__ */ i(\n \"div\",\n {\n ref: E,\n id: Z,\n role: \"tooltip\",\n className: N(\n \"fixed z-50 px-2 py-1 text-sm rounded shadow-lg bg-popover text-popover-foreground pointer-events-auto transition-all duration-150 ease-out\",\n l ? \"opacity-100\" : \"opacity-0\",\n s\n ),\n style: d ? { left: d.x, top: d.y } : { opacity: 0 },\n onMouseEnter: () => {\n p(!0), L.current && clearTimeout(L.current);\n },\n onMouseLeave: () => {\n p(!1);\n },\n children: t\n }\n ),\n document.body\n )\n ] });\n}\nexport {\n yr as Accordion,\n he as AccordionItem,\n Jr as ActionModal,\n nt as Button,\n wr as Callout,\n Nr as Carousel,\n Er as Checkbox,\n kr as Clickable,\n Cr as Code,\n zr as CodeBlock,\n $r as Disclosure,\n Sr as Drawer,\n Ar as Input,\n Ir as Label,\n Oe as LoadingDots,\n Dr as Modal,\n Tr as Pagination,\n Rr as Panel,\n Lr as Popover,\n jr as RadioGroup,\n be as RadioGroupItem,\n Gt as RadioInput,\n Vr as ScrollArea,\n Br as Select,\n Mr as Separator,\n Wr as Skeleton,\n Kr as Slider,\n Fr as Slot,\n Hr as Tabs,\n Pr as TabsContent,\n Zr as TabsList,\n _r as TabsTrigger,\n qr as Textarea,\n Qr as Toast,\n Gr as Toggle,\n Yr 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\n/** Data for a toast notification */\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","s","h","C","l","i","e","N","Oe","a","o","$","A","t","r","et","tt","rt","pe","nt","m","d","k","Lt","jt","Vt","V","S","Dr","f","u","F","v","b","p","y","g","H","w","x","E","I","z","Q","ae","B","oe","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":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, Fragment as q, jsxs as b } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { X as
|
|
2
|
+
import H, { createContext as e, useId as D, useState as h, useEffect as g, useRef as P, useCallback as z, useMemo as E, useContext as V } from "react";
|
|
3
|
+
import { createPortal as F } from "react-dom";
|
|
4
|
+
import { X as K, C as X, E as Z, I as G } from "./X-CIoyLewf.js";
|
|
5
5
|
import { j as J } from "./join-BmgR_f4v.js";
|
|
6
6
|
function N(...l) {
|
|
7
7
|
return l.filter((r) => typeof r == "string" && r).join(" ").trim() || void 0;
|
|
@@ -107,6 +107,7 @@ e(null);
|
|
|
107
107
|
e(null);
|
|
108
108
|
e(null);
|
|
109
109
|
e(null);
|
|
110
|
+
e(null);
|
|
110
111
|
function U() {
|
|
111
112
|
const [l, r] = h(0);
|
|
112
113
|
return g(() => {
|
|
@@ -219,7 +220,7 @@ function ee(l, r) {
|
|
|
219
220
|
}, [l, r]);
|
|
220
221
|
}
|
|
221
222
|
function le(l, r) {
|
|
222
|
-
const i =
|
|
223
|
+
const i = P(null), n = z(() => {
|
|
223
224
|
const a = document.getElementById(l);
|
|
224
225
|
if (!a) return;
|
|
225
226
|
const o = a.querySelectorAll('[data-modal-action="true"]');
|
|
@@ -260,13 +261,13 @@ function ne({
|
|
|
260
261
|
ariaLabelledBy: f,
|
|
261
262
|
ariaDescribedBy: p
|
|
262
263
|
}) {
|
|
263
|
-
const v =
|
|
264
|
+
const v = D(), k = l || `modal-${v}`, C = l ? `${l}-title` : `modal-title-${v}`, { show: T, shouldRender: y } = $(r);
|
|
264
265
|
if (le(k, y), ee(y, i), !y) return null;
|
|
265
|
-
const j = () => n ?
|
|
266
|
+
const j = () => n ? H.isValidElement(n) ? /* @__PURE__ */ t("div", { className: "mb-4", children: n }) : /* @__PURE__ */ t("h2", { className: "mb-4 text-xl font-semibold", id: C, children: n }) : null, I = () => c.length === 0 ? null : /* @__PURE__ */ t("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((A, O) => {
|
|
266
267
|
const { label: B, className: M, ...S } = A;
|
|
267
268
|
return /* @__PURE__ */ t(R, { className: M, type: "button", ...S, "data-modal-action": "true", children: B }, O);
|
|
268
269
|
}) });
|
|
269
|
-
return /* @__PURE__ */ t(q, { children:
|
|
270
|
+
return /* @__PURE__ */ t(q, { children: F(
|
|
270
271
|
/* @__PURE__ */ t(
|
|
271
272
|
"div",
|
|
272
273
|
{
|
|
@@ -371,7 +372,7 @@ function ue({
|
|
|
371
372
|
);
|
|
372
373
|
}
|
|
373
374
|
const te = e(null), de = () => {
|
|
374
|
-
const l =
|
|
375
|
+
const l = V(te);
|
|
375
376
|
if (!l)
|
|
376
377
|
throw new Error("Tabs components must be used within a Tabs component");
|
|
377
378
|
return l;
|
|
@@ -456,7 +457,7 @@ function ce({
|
|
|
456
457
|
{
|
|
457
458
|
onClick: f,
|
|
458
459
|
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",
|
|
459
|
-
children: /* @__PURE__ */ t(
|
|
460
|
+
children: /* @__PURE__ */ t(K, { size: 16 })
|
|
460
461
|
}
|
|
461
462
|
)
|
|
462
463
|
]
|
|
@@ -470,4 +471,4 @@ export {
|
|
|
470
471
|
N as n,
|
|
471
472
|
de as u
|
|
472
473
|
};
|
|
473
|
-
//# sourceMappingURL=Toast-
|
|
474
|
+
//# sourceMappingURL=Toast-B_wskXW1.js.map
|