@reeverdev/ui 0.2.155 → 0.2.156
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/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -124
- package/dist/index.d.ts +87 -124
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as j from'react';import {createContext,useState,useEffect,useContext,useCallback,useRef,useMemo}from'react';import {cva}from'class-variance-authority';import {AlertCircle,AlertTriangle,CheckCircle2,Info,Minus,Check,X,ChevronDown,Search,ChevronRight,Circle,ChevronsUpDown,PanelLeft,PanelLeftOpen,PanelRightOpen,PanelLeftClose,PanelRightClose,EyeOff,Eye,Plus,Calendar,Heart,Star,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Loader2,Copy,RefreshCw,ZoomOut,ZoomIn,RotateCw,Download,Minimize2,Maximize2,ChevronLeft,GripVertical,Undo,Redo,Heading1,Heading2,Heading3,Bold,Italic,Underline,Strikethrough,List,ListOrdered,AlignLeft,AlignCenter,AlignRight,Quote,Code,Link,Unlink,Moon,Sun,Monitor,MoreHorizontal,HelpCircle,ArrowRight,Hash,User,Settings,Bell,CheckCircle,Trash2,Image as Image$1,FileVideo,FileAudio,FileText,FileArchive,ChevronUp,ArrowDown}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import*as $a from'react-dom';import {Toaster}from'sonner';export{toast}from'sonner';import {Drawer}from'vaul';import {DayPicker,useDayPicker}from'react-day-picker';import {format,getMonth,getYear,setMonth,setYear}from'date-fns';import {Command}from'cmdk';import {Panel,Group,Separator}from'react-resizable-panels';import {HexColorPicker,HexColorInput}from'react-colorful';import {themes,Highlight}from'prism-react-renderer';import {ResponsiveContainer,LineChart,CartesianGrid,XAxis,YAxis,Tooltip,Legend,Line,BarChart,Bar,PieChart,Pie,Cell,AreaChart,Area}from'recharts';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,DragOverlay}from'@dnd-kit/core';import {sortableKeyboardCoordinates,SortableContext,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import pN from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import wN from'@tiptap/starter-kit';import CN from'@tiptap/extension-link';import TN from'@tiptap/extension-underline';import MN from'@tiptap/extension-text-align';import NN from'@tiptap/extension-placeholder';import _N,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import tk from'react-qr-code';import {useTheme,ThemeProvider}from'next-themes';export{useTheme}from'next-themes';import {motion,AnimatePresence,useInView,useMotionValue,useTransform,animate,useScroll,useSpring}from'framer-motion';import Eo from'canvas-confetti';function u(...e){return twMerge(clsx(e))}var M0=cva("relative w-full p-4",{variants:{variant:{solid:"border",bordered:"border bg-transparent",flat:""},type:{default:"",success:"",warning:"",error:""},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",type:"default",className:"!border-primary bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"bordered",type:"default",className:"!border-primary text-primary [&>svg]:text-primary"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"!border-green-600 bg-green-600 text-white dark:!border-green-500 dark:bg-green-500 [&>svg]:text-white"},{variant:"bordered",type:"success",className:"!border-green-600 text-green-600 dark:!border-green-500 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"!border-amber-600 bg-amber-600 text-white dark:!border-amber-500 dark:bg-amber-500 [&>svg]:text-white"},{variant:"bordered",type:"warning",className:"!border-amber-600 text-amber-600 dark:!border-amber-500 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"!border-red-600 bg-red-600 text-white dark:!border-red-500 dark:bg-red-500 [&>svg]:text-white"},{variant:"bordered",type:"error",className:"!border-red-600 text-red-600 dark:!border-red-500 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",radius:"md"}}),N0={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},k0=j.forwardRef(({className:e,variant:t="solid",type:r="default",radius:n="md",icon:o,hideIcon:a=false,endContent:s,children:i,...l},c)=>{let d=N0[r],m=!a,f=o!==void 0?o:d?jsx(d,{className:"h-4 w-4"}):null;return jsxs("div",{ref:c,role:"alert",className:u(M0({variant:t,type:r,radius:n}),s&&"flex items-center justify-between",e),...l,children:[jsxs("div",{className:"flex items-start gap-3",children:[m&&f&&jsx("span",{className:"mt-0.5 shrink-0",children:f}),jsx("div",{children:i})]}),s&&jsx("div",{className:"shrink-0 ml-4",children:s})]})});k0.displayName="Alert";var P0=j.forwardRef(({className:e,...t},r)=>jsx("h5",{ref:r,className:u("mb-1 font-medium leading-none tracking-tight",e),...t}));P0.displayName="AlertTitle";var E0=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("text-sm [&_p]:leading-relaxed",e),...t}));E0.displayName="AlertDescription";var L0=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border-2"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"",md:"",lg:""},placement:{"top-right":"-top-1 -right-1","top-left":"-top-1 -left-1","bottom-right":"-bottom-1 -right-1","bottom-left":"-bottom-1 -left-1"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white dark:bg-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white dark:bg-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white dark:bg-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white dark:bg-blue-500"},{variant:"bordered",color:"default",className:"bg-white border-zinc-800 text-zinc-800 dark:bg-zinc-900 dark:border-zinc-200 dark:text-zinc-200"},{variant:"bordered",color:"success",className:"bg-white border-green-600 text-green-600 dark:bg-zinc-900 dark:border-green-500 dark:text-green-500"},{variant:"bordered",color:"warning",className:"bg-white border-amber-600 text-amber-600 dark:bg-zinc-900 dark:border-amber-500 dark:text-amber-500"},{variant:"bordered",color:"danger",className:"bg-white border-red-600 text-red-600 dark:bg-zinc-900 dark:border-red-500 dark:text-red-500"},{variant:"bordered",color:"info",className:"bg-white border-blue-600 text-blue-600 dark:bg-zinc-900 dark:border-blue-500 dark:text-blue-500"},{size:"sm",className:"min-w-4 h-4 text-[10px] px-1"},{size:"md",className:"min-w-5 h-5 text-xs px-1"},{size:"lg",className:"min-w-6 h-6 text-sm px-1.5"}],defaultVariants:{variant:"solid",color:"default",size:"md",placement:"top-right"}}),S0={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},D0=j.forwardRef(({className:e,children:t,content:r,variant:n="solid",color:o="default",size:a="md",placement:s="top-right",isDot:i=false,...l},c)=>jsxs("div",{ref:c,className:u("relative inline-flex",e),...l,children:[t,jsx("span",{className:u(L0({variant:n,color:o,size:i?void 0:a,placement:s}),i&&S0[a||"md"],i&&"min-w-0 p-0"),children:!i&&r})]}));D0.displayName="Badge";var H0=cva("inline-flex items-center gap-1 font-medium rounded-full",{variants:{color:{default:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white",success:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500",warning:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500",danger:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500",info:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},size:{sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-0.5 text-xs",lg:"px-3 py-1 text-sm"}},defaultVariants:{color:"default",size:"md"}}),I0=j.forwardRef(({className:e,color:t,size:r,...n},o)=>jsx("span",{ref:o,className:u(H0({color:t,size:r}),e),...n}));I0.displayName="TextBadge";var ad=cva("animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},color:{default:"text-foreground",primary:"text-primary",muted:"text-muted-foreground",success:"text-success",warning:"text-warning",danger:"text-danger",white:"text-white"}},defaultVariants:{size:"md",color:"default"}}),z0={sm:"text-xs",md:"text-sm",lg:"text-base"},Pa=j.forwardRef(({className:e,size:t="md",color:r,label:n="Loading",text:o,textPosition:a="right",customColor:s,...i},l)=>{let c=jsxs("svg",{className:u(ad({size:t,color:s?void 0:r})),style:s?{color:s}:void 0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",role:"status","aria-label":n,children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});if(!o)return jsx("div",{ref:l,className:u("inline-flex",e),...i,children:c});let d=jsx("span",{className:u("text-muted-foreground",z0[t]),children:o}),m=a==="top"||a==="bottom";return jsxs("div",{ref:l,className:u("inline-flex items-center",m?"flex-col gap-2":"flex-row gap-3",(a==="left"||a==="top")&&(m?"flex-col-reverse":"flex-row-reverse"),e),...i,children:[c,d]})});Pa.displayName="Spinner";var id=cva("inline-flex",{variants:{variant:{default:"",attached:""},orientation:{horizontal:"flex-row",vertical:"flex-col"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"},{variant:"attached",orientation:"horizontal",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},{variant:"attached",orientation:"vertical",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),ld=j.createContext({});function yi(){return j.useContext(ld)}var cd=j.forwardRef(({className:e,variant:t,orientation:r,spacing:n,disabled:o,children:a,...s},i)=>jsx(ld.Provider,{value:{disabled:o},children:jsx("div",{ref:i,role:"group",className:u(id({variant:t,orientation:r,spacing:n,className:e})),...s,children:a})}));cd.displayName="ButtonGroup";var Yn=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-all duration-200 ease-out cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{solid:"",bordered:"border-2 border-current bg-transparent hover:opacity-70",light:"bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800",flat:"bg-zinc-100 dark:bg-zinc-800 hover:opacity-70",ghost:"border-2 border-current bg-transparent"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-9 px-3 text-xs",md:"h-10 px-4",lg:"h-11 px-5 text-base",icon:"h-10 w-10"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white hover:bg-zinc-700 dark:bg-zinc-200 dark:text-zinc-900 dark:hover:bg-zinc-300"},{variant:"bordered",color:"default",className:"text-zinc-900 dark:text-white"},{variant:"light",color:"default",className:"text-zinc-900 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800"},{variant:"flat",color:"default",className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white"},{variant:"ghost",color:"default",className:"text-zinc-900 hover:bg-zinc-900 hover:text-white dark:text-white dark:hover:bg-white dark:hover:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:text-white dark:hover:bg-green-600"},{variant:"bordered",color:"success",className:"text-green-600 dark:text-green-500"},{variant:"light",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"flat",color:"success",className:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600 hover:text-white dark:text-green-500 dark:hover:bg-green-500 dark:hover:text-white"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:text-white dark:hover:bg-amber-600"},{variant:"bordered",color:"warning",className:"text-amber-600 dark:text-amber-500"},{variant:"light",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"flat",color:"warning",className:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600 hover:text-white dark:text-amber-500 dark:hover:bg-amber-500 dark:hover:text-white"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:text-white dark:hover:bg-red-600"},{variant:"bordered",color:"danger",className:"text-red-600 dark:text-red-500"},{variant:"light",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"flat",color:"danger",className:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600 hover:text-white dark:text-red-500 dark:hover:bg-red-500 dark:hover:text-white"},{variant:"solid",color:"info",className:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-700 dark:text-white dark:hover:bg-blue-600"},{variant:"bordered",color:"info",className:"text-blue-600 dark:text-blue-500"},{variant:"light",color:"info",className:"text-blue-600 hover:bg-blue-600/10 dark:text-blue-500 dark:hover:bg-blue-500/10"},{variant:"flat",color:"info",className:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},{variant:"ghost",color:"info",className:"text-blue-600 hover:bg-blue-600 hover:text-white dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),ae=j.forwardRef(({className:e,variant:t,color:r,size:n,radius:o,href:a,loading:s=false,startContent:i,endContent:l,children:c,disabled:d,style:m,isIconOnly:f,...p},g)=>{let h=yi(),b=d||h.disabled||s,v=m,w=f?n==="sm"?"!px-0 !w-9":n==="lg"?"!px-0 !w-11":"!px-0 !w-10":"",R=s?jsxs(Fragment,{children:[jsx(Pa,{size:"sm",color:t==="solid"?"white":"default"}),c]}):jsxs(Fragment,{children:[i,c,l]});return a?b?jsx("span",{role:"link","aria-disabled":"true",className:u(Yn({variant:t,color:r,size:n,radius:o,className:e}),w,"pointer-events-none opacity-50 cursor-not-allowed"),style:v,children:R}):jsx("a",{href:a,className:u(Yn({variant:t,color:r,size:n,radius:o,className:e}),w),style:v,...p,children:R}):jsx("button",{type:"button",className:u(Yn({variant:t,color:r,size:n,radius:o,className:e}),w),ref:g,disabled:b,style:v,...p,children:R})});ae.displayName="Button";var pd=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"lg"}}),fd=j.forwardRef(({className:e,radius:t,...r},n)=>jsx("div",{ref:n,className:u(pd({radius:t,className:e})),...r}));fd.displayName="Card";var gd=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex flex-col space-y-1.5 p-6",e),...t}));gd.displayName="CardHeader";var bd=j.forwardRef(({className:e,...t},r)=>jsx("h3",{ref:r,className:u("text-2xl font-semibold leading-none tracking-tight",e),...t}));bd.displayName="CardTitle";var vd=j.forwardRef(({className:e,...t},r)=>jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...t}));vd.displayName="CardDescription";var hd=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("p-6 pt-0",e),...t}));hd.displayName="CardContent";var xd=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex items-center p-6 pt-0",e),...t}));xd.displayName="CardFooter";var zo=j.forwardRef(({className:e,checked:t,defaultChecked:r=false,onCheckedChange:n,disabled:o,required:a,name:s,value:i="on",text:l,description:c,onKeyDown:d,...m},f)=>{let[p,g]=j.useState(r),h=t!==void 0,b=h?t:p,[v,w]=j.useState(false),x=j.useId(),R=()=>{if(o)return;let N=b==="indeterminate"?true:!b;h||g(N),n?.(N);},C=N=>{N.key==="Enter"&&N.preventDefault(),d?.(N);},y=b===true,k=b==="indeterminate",T=jsxs(Fragment,{children:[jsx("button",{type:"button",role:"checkbox",id:l?x:void 0,"aria-checked":k?"mixed":y,"aria-required":a,disabled:o,ref:f,className:u("peer h-4 w-4 shrink-0 rounded-sm border border-primary focus-visible:outline-none cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 transition-colors",y&&"bg-primary text-primary-foreground",k&&"bg-background text-foreground",!l&&e),style:{borderColor:v?"var(--color-foreground)":void 0},onClick:R,onKeyDown:C,onFocus:()=>w(true),onBlur:()=>w(false),...m,children:(y||k)&&jsx("span",{className:"flex items-center justify-center text-current",children:k?jsx(Minus,{className:"h-4 w-4"}):jsx(Check,{className:"h-4 w-4"})})}),s&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:s,value:i,checked:y,required:a,disabled:o,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]});return l?jsxs("div",{className:u("flex items-start gap-2",e),children:[T,jsxs("div",{className:"flex flex-col gap-0.5",children:[jsx("label",{htmlFor:x,className:u("text-sm font-medium leading-none cursor-pointer",o&&"cursor-not-allowed opacity-50"),children:l}),c&&jsx("p",{className:"text-xs text-muted-foreground",children:c})]})]}):T});zo.displayName="Checkbox";var Oo=0,wi=null;function Rt(){Oo===0&&(wi=document.body.style.overflow,document.body.style.overflow="hidden"),Oo++;}function wt(){Oo--,Oo<=0&&(Oo=0,document.body.style.overflow=wi??"",wi=null);}var wd=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),ct=j.forwardRef(({className:e,size:t,...r},n)=>{let a={sm:14,md:16,lg:20}[t??"md"];return jsx("button",{ref:n,type:"button",className:u(wd({size:t}),e),"aria-label":"Close",...r,children:jsx(X,{style:{width:a,height:a}})})});ct.displayName="CloseButton";var Md=j.createContext(null),Zn=()=>{let e=j.useContext(Md);if(!e)throw new Error("Dialog components must be used within a Dialog");return e},La=({children:e,open:t,defaultOpen:r=false,onOpenChange:n})=>{let[o,a]=j.useState(r),s=t!==void 0,i=s?t:o,l=j.useId(),c=j.useId(),d=j.useId(),m=j.useCallback(f=>{s||a(f),n?.(f);},[s,n]);return jsx(Md.Provider,{value:{open:i,onOpenChange:m,contentId:l,titleId:c,descriptionId:d},children:e})};La.displayName="Dialog";var Nd=j.forwardRef(({children:e,onClick:t,...r},n)=>{let{onOpenChange:o}=Zn();return jsx("button",{ref:n,type:"button",onClick:s=>{t?.(s),o(true);},...r,children:e})});Nd.displayName="DialogTrigger";var kd=j.forwardRef(({children:e,onClick:t,...r},n)=>{let{onOpenChange:o}=Zn();return jsx("button",{ref:n,type:"button",onClick:s=>{t?.(s),o(false);},...r,children:e})});kd.displayName="DialogClose";var Ci=({children:e,container:t})=>{let[r,n]=j.useState(false);return j.useEffect(()=>{n(true);},[]),r?$a.createPortal(e,t||document.body):null};Ci.displayName="DialogPortal";var Ti=j.forwardRef(({className:e,...t},r)=>{let{open:n,onOpenChange:o}=Zn();return n?jsx("div",{ref:r,"data-state":n?"open":"closed",className:u("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});Ti.displayName="DialogOverlay";var Sa=j.forwardRef(({className:e,children:t,onEscapeKeyDown:r,onInteractOutside:n,...o},a)=>{let{open:s,onOpenChange:i,contentId:l,titleId:c,descriptionId:d}=Zn(),[m,f]=j.useState(false);return j.useEffect(()=>{f(true);},[]),j.useEffect(()=>{if(s)return Rt(),()=>wt()},[s]),j.useEffect(()=>{if(!s)return;let p=g=>{g.key==="Escape"&&(r?.(),i(false));};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[s,i,r]),!m||!s?null:jsxs(Ci,{children:[jsx(Ti,{}),jsxs("div",{ref:a,id:l,role:"dialog","aria-modal":"true","aria-labelledby":c,"aria-describedby":d,"data-state":s?"open":"closed",className:u("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,jsx(ct,{size:"sm",onClick:()=>i(false),className:"absolute right-4 top-4"})]})]})});Sa.displayName="DialogContent";var Pd=({className:e,...t})=>jsx("div",{className:u("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Pd.displayName="DialogHeader";var Ed=({className:e,...t})=>jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ed.displayName="DialogFooter";var Ld=j.forwardRef(({className:e,...t},r)=>{let{titleId:n}=Zn();return jsx("h2",{ref:r,id:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});Ld.displayName="DialogTitle";var Sd=j.forwardRef(({className:e,...t},r)=>{let{descriptionId:n}=Zn();return jsx("p",{ref:r,id:n,className:u("text-sm text-muted-foreground",e),...t})});Sd.displayName="DialogDescription";var _0=cva("flex h-10 w-full border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Da=j.forwardRef(({className:e,type:t,radius:r,label:n,isRequired:o,description:a,errorMessage:s,isInvalid:i,onFocus:l,onBlur:c,style:d,...m},f)=>{let[p,g]=j.useState(false),h=j.useId(),b=m.id||h,v=i||!!s,w=jsx("input",{id:b,type:t,className:u(_0({radius:r}),v&&"border-danger focus:border-danger",!n&&e),ref:f,required:o,"aria-invalid":v,"aria-describedby":a||s?`${b}-description`:void 0,style:{...d,borderColor:v?void 0:p?"var(--color-foreground)":void 0},onFocus:x=>{g(true),l?.(x);},onBlur:x=>{g(false),c?.(x);},...m});return !n&&!a&&!s?w:jsxs("div",{className:u("flex flex-col gap-1.5",e),children:[n&&jsxs("label",{htmlFor:b,className:"text-sm font-medium leading-none",children:[n,o&&jsx("span",{className:"text-danger ml-1",children:"*"})]}),w,(a||s)&&jsx("p",{id:`${b}-description`,className:u("text-xs",v?"text-danger":"text-muted-foreground"),children:s||a})]})});Da.displayName="Input";var Y0=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Rn=j.forwardRef(({className:e,...t},r)=>jsx("label",{ref:r,className:u(Y0(),e),...t}));Rn.displayName="Label";var Kr=j.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,text:n,...o},a)=>{let s=r?{role:"none"}:{role:"separator","aria-orientation":t};return n&&t==="horizontal"?jsxs("div",{className:u("flex items-center gap-4",e),children:[jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"}),jsx("span",{className:"text-sm text-muted-foreground",children:n}),jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"})]}):jsx("div",{ref:a,...s,className:u("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o})});Kr.displayName="Separator";var Q0="peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",Ia={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},Vd={sm:{track:"h-5 w-9",thumb:"h-4 w-4",translate:"translate-x-4"},md:{track:"h-6 w-11",thumb:"h-5 w-5",translate:"translate-x-5"},lg:{track:"h-7 w-14",thumb:"h-6 w-6",translate:"translate-x-7"}},Ad=j.forwardRef(({className:e,color:t,size:r="md",customColor:n,checked:o,defaultChecked:a=false,onCheckedChange:s,disabled:i,required:l,name:c,value:d="on",onKeyDown:m,style:f,...p},g)=>{let[h,b]=j.useState(a),v=o!==void 0,w=v?o:h,x=()=>{if(i)return;let k=!w;v||b(k),s?.(k);},R=k=>{k.key==="Enter"&&k.preventDefault(),m?.(k);},C=t&&Ia[t]?Ia[t]:Ia.default,y=Vd[r]||Vd.md;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":w?"checked":"unchecked",disabled:i,ref:g,className:u(Q0,y.track,w?n?"":C:"bg-input",e),style:n&&w?{backgroundColor:n,...f}:f,onClick:x,onKeyDown:R,...p,children:jsx("span",{className:u("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",y.thumb,w?y.translate:"translate-x-0")})}),c&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:c,value:d,checked:w,required:l,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});Ad.displayName="Switch";var rR=cva("flex min-h-[80px] w-full border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"md"}}),zd=j.forwardRef(({className:e,radius:t,onFocus:r,onBlur:n,style:o,...a},s)=>{let[i,l]=j.useState(false);return jsx("textarea",{className:u(rR({radius:t,className:e})),ref:s,style:{...o,borderColor:i?"var(--color-foreground)":void 0},onFocus:c=>{l(true),r?.(c);},onBlur:c=>{l(false),n?.(c);},...a})});zd.displayName="Textarea";var Bd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),za=j.forwardRef(({className:e,variant:t,...r},n)=>jsx("div",{ref:n,className:u(Bd({variant:t,className:e})),...r}));za.displayName="Skeleton";var iR=cva("relative flex shrink-0 overflow-hidden cursor-pointer",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),Fd=j.createContext(null),Kd=()=>{let e=j.useContext(Fd);if(!e)throw new Error("Avatar components must be used within an Avatar");return e},wn=j.forwardRef(({className:e,size:t,radius:r,...n},o)=>{let[a,s]=j.useState("idle");return jsx(Fd.Provider,{value:{imageLoadingStatus:a,onImageLoadingStatusChange:s},children:jsx("span",{ref:o,className:u(iR({size:t,radius:r,className:e})),...n})})});wn.displayName="Avatar";var Jn=j.forwardRef(({className:e,src:t,alt:r,onLoadingStatusChange:n,...o},a)=>{let{imageLoadingStatus:s,onImageLoadingStatusChange:i}=Kd();return j.useEffect(()=>{if(!t){i("error");return}i("loading"),n?.("loading");let l=new Image;l.src=t,l.onload=()=>{i("loaded"),n?.("loaded");},l.onerror=()=>{i("error"),n?.("error");};},[t,i,n]),s!=="loaded"?null:jsx("img",{ref:a,src:t,alt:r,className:u("aspect-square h-full w-full object-cover",e),...o})});Jn.displayName="AvatarImage";var Cn=j.forwardRef(({className:e,delayMs:t=0,children:r,...n},o)=>{let{imageLoadingStatus:a}=Kd(),[s,i]=j.useState(t===0);return j.useEffect(()=>{if(t>0){let l=setTimeout(()=>i(true),t);return ()=>clearTimeout(l)}},[t]),a==="loaded"||!s?null:jsx("span",{ref:o,className:u("flex h-full w-full items-center justify-center bg-muted",e),...n,children:r})});Cn.displayName="AvatarFallback";var Gd=j.createContext({delayDuration:700,skipDelayDuration:300}),$r=({children:e,delayDuration:t=700,skipDelayDuration:r=300})=>jsx(Gd.Provider,{value:{delayDuration:t,skipDelayDuration:r},children:e});$r.displayName="TooltipProvider";var Ud=j.createContext(null),Wd=()=>{let e=j.useContext(Ud);if(!e)throw new Error("Tooltip components must be used within a Tooltip");return e},Gr=({children:e,open:t,defaultOpen:r=false,onOpenChange:n,delayDuration:o})=>{let a=j.useContext(Gd),[s,i]=j.useState(r),l=t!==void 0,c=l?t:s,d=j.useRef(null),m=j.useId(),f=j.useRef(null),p=o??a.delayDuration,g=j.useCallback(h=>{f.current&&clearTimeout(f.current),h?f.current=setTimeout(()=>{l||i(true),n?.(true);},p):(l||i(false),n?.(false));},[l,n,p]);return j.useEffect(()=>()=>{f.current&&clearTimeout(f.current);},[]),jsx(Ud.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentId:m},children:e})};Gr.displayName="Tooltip";var Ur=j.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:r,onFocus:n,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l,contentId:c,open:d}=Wd();return jsx("button",{ref:h=>{l.current=h,typeof s=="function"?s(h):s&&(s.current=h);},type:"button","aria-describedby":d?c:void 0,onMouseEnter:h=>{t?.(h),i(true);},onMouseLeave:h=>{r?.(h),i(false);},onFocus:h=>{n?.(h),i(true);},onBlur:h=>{o?.(h),i(false);},...a,children:e})});Ur.displayName="TooltipTrigger";var Wr=j.forwardRef(({className:e,side:t="top",sideOffset:r=4,align:n="center",alignOffset:o=0,children:a,...s},i)=>{let{open:l,triggerRef:c,contentId:d}=Wd(),[m,f]=j.useState({top:0,left:0}),[p,g]=j.useState(false),h=j.useRef(null);if(j.useEffect(()=>{g(true);},[]),j.useEffect(()=>{if(!l||!c.current||!h.current)return;let v=c.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),x=0,R=0;switch(t){case "top":x=v.top-w.height-r;break;case "bottom":x=v.bottom+r;break;case "left":R=v.left-w.width-r;break;case "right":R=v.right+r;break}if(t==="top"||t==="bottom")switch(n){case "start":R=v.left+o;break;case "center":R=v.left+v.width/2-w.width/2;break;case "end":R=v.right-w.width-o;break}else switch(n){case "start":x=v.top+o;break;case "center":x=v.top+v.height/2-w.height/2;break;case "end":x=v.bottom-w.height-o;break}f({top:x,left:R});},[l,t,r,n,o,c]),!p||!l)return null;let b={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return $a.createPortal(jsx("div",{ref:v=>{h.current=v,typeof i=="function"?i(v):i&&(i.current=v);},id:d,role:"tooltip","data-side":t,className:u("fixed z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",b,e),style:{top:m.top,left:m.left},...s,children:a}),document.body)});Wr.displayName="TooltipContent";var De=j.forwardRef(({className:e,orientation:t="vertical",visibility:r="visible",children:n,style:o,...a},s)=>{let[i,l]=j.useState(false),c=j.useId().replace(/:/g,""),d=r==="visible"||r==="hover"&&i,m=d?"rgba(0,0,0,0.3)":"transparent",f=d?"rgba(255,255,255,0.3)":"transparent",p=`
|
|
1
|
+
import*as j from'react';import {createContext,useState,useEffect,useContext,useCallback,useRef,useMemo}from'react';import {cva}from'class-variance-authority';import {AlertCircle,AlertTriangle,CheckCircle2,Info,Minus,Check,X,ChevronDown,Search,ChevronRight,Circle,ChevronsUpDown,PanelLeft,PanelLeftOpen,PanelRightOpen,PanelLeftClose,PanelRightClose,EyeOff,Eye,Plus,Calendar,Heart,Star,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Loader2,Copy,RefreshCw,ZoomOut,ZoomIn,RotateCw,Download,Minimize2,Maximize2,ChevronLeft,GripVertical,Undo,Redo,Heading1,Heading2,Heading3,Bold,Italic,Underline,Strikethrough,List,ListOrdered,AlignLeft,AlignCenter,AlignRight,Quote,Code,Link,Unlink,Moon,Sun,Monitor,MoreHorizontal,HelpCircle,ArrowRight,Hash,User,Settings,Bell,CheckCircle,Trash2,Image as Image$1,FileVideo,FileAudio,FileText,FileArchive,ChevronUp,ArrowDown}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import*as za from'react-dom';import {Toaster}from'sonner';export{toast}from'sonner';import {Drawer}from'vaul';import {DayPicker,useDayPicker}from'react-day-picker';import {format,getMonth,getYear,setMonth,setYear}from'date-fns';import {Command}from'cmdk';import {Panel,Group,Separator}from'react-resizable-panels';import {HexColorPicker,HexColorInput}from'react-colorful';import {themes,Highlight}from'prism-react-renderer';import {ResponsiveContainer,LineChart,CartesianGrid,XAxis,YAxis,Tooltip,Legend,Line,BarChart,Bar,PieChart,Pie,Cell,AreaChart,Area}from'recharts';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,DragOverlay}from'@dnd-kit/core';import {sortableKeyboardCoordinates,SortableContext,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import ZM from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import sN from'@tiptap/starter-kit';import iN from'@tiptap/extension-link';import lN from'@tiptap/extension-underline';import cN from'@tiptap/extension-text-align';import dN from'@tiptap/extension-placeholder';import SN,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import BN from'react-qr-code';import {useTheme,ThemeProvider}from'next-themes';export{useTheme}from'next-themes';import {motion,AnimatePresence,useInView,useMotionValue,useTransform,animate,useScroll,useSpring}from'framer-motion';import No from'canvas-confetti';function u(...e){return twMerge(clsx(e))}var c0=cva("relative w-full p-4",{variants:{variant:{solid:"border",bordered:"border bg-transparent",flat:""},type:{default:"",success:"",warning:"",error:""},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",type:"default",className:"!border-primary bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"bordered",type:"default",className:"!border-primary text-primary [&>svg]:text-primary"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"!border-green-600 bg-green-600 text-white dark:!border-green-500 dark:bg-green-500 [&>svg]:text-white"},{variant:"bordered",type:"success",className:"!border-green-600 text-green-600 dark:!border-green-500 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"!border-amber-600 bg-amber-600 text-white dark:!border-amber-500 dark:bg-amber-500 [&>svg]:text-white"},{variant:"bordered",type:"warning",className:"!border-amber-600 text-amber-600 dark:!border-amber-500 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"!border-red-600 bg-red-600 text-white dark:!border-red-500 dark:bg-red-500 [&>svg]:text-white"},{variant:"bordered",type:"error",className:"!border-red-600 text-red-600 dark:!border-red-500 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",radius:"md"}}),d0={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},u0=j.forwardRef(({className:e,variant:t="solid",type:r="default",radius:n="md",icon:o,hideIcon:a=false,endContent:s,children:i,...l},c)=>{let d=d0[r],m=!a,f=o!==void 0?o:d?jsx(d,{className:"h-4 w-4"}):null;return jsxs("div",{ref:c,role:"alert",className:u(c0({variant:t,type:r,radius:n}),s&&"flex items-center justify-between",e),...l,children:[jsxs("div",{className:"flex items-start gap-3",children:[m&&f&&jsx("span",{className:"mt-0.5 shrink-0",children:f}),jsx("div",{children:i})]}),s&&jsx("div",{className:"shrink-0 ml-4",children:s})]})});u0.displayName="Alert";var m0=j.forwardRef(({className:e,...t},r)=>jsx("h5",{ref:r,className:u("mb-1 font-medium leading-none tracking-tight",e),...t}));m0.displayName="AlertTitle";var p0=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("text-sm [&_p]:leading-relaxed",e),...t}));p0.displayName="AlertDescription";var f0=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border-2"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"",md:"",lg:""},placement:{"top-right":"-top-1 -right-1","top-left":"-top-1 -left-1","bottom-right":"-bottom-1 -right-1","bottom-left":"-bottom-1 -left-1"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white dark:bg-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white dark:bg-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white dark:bg-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white dark:bg-blue-500"},{variant:"bordered",color:"default",className:"bg-white border-zinc-800 text-zinc-800 dark:bg-zinc-900 dark:border-zinc-200 dark:text-zinc-200"},{variant:"bordered",color:"success",className:"bg-white border-green-600 text-green-600 dark:bg-zinc-900 dark:border-green-500 dark:text-green-500"},{variant:"bordered",color:"warning",className:"bg-white border-amber-600 text-amber-600 dark:bg-zinc-900 dark:border-amber-500 dark:text-amber-500"},{variant:"bordered",color:"danger",className:"bg-white border-red-600 text-red-600 dark:bg-zinc-900 dark:border-red-500 dark:text-red-500"},{variant:"bordered",color:"info",className:"bg-white border-blue-600 text-blue-600 dark:bg-zinc-900 dark:border-blue-500 dark:text-blue-500"},{size:"sm",className:"min-w-4 h-4 text-[10px] px-1"},{size:"md",className:"min-w-5 h-5 text-xs px-1"},{size:"lg",className:"min-w-6 h-6 text-sm px-1.5"}],defaultVariants:{variant:"solid",color:"default",size:"md",placement:"top-right"}}),g0={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},b0=j.forwardRef(({className:e,children:t,content:r,variant:n="solid",color:o="default",size:a="md",placement:s="top-right",isDot:i=false,...l},c)=>jsxs("div",{ref:c,className:u("relative inline-flex",e),...l,children:[t,jsx("span",{className:u(f0({variant:n,color:o,size:i?void 0:a,placement:s}),i&&g0[a||"md"],i&&"min-w-0 p-0"),children:!i&&r})]}));b0.displayName="Badge";var v0=cva("inline-flex items-center gap-1 font-medium rounded-full",{variants:{color:{default:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white",success:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500",warning:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500",danger:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500",info:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},size:{sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-0.5 text-xs",lg:"px-3 py-1 text-sm"}},defaultVariants:{color:"default",size:"md"}}),h0=j.forwardRef(({className:e,color:t,size:r,...n},o)=>jsx("span",{ref:o,className:u(v0({color:t,size:r}),e),...n}));h0.displayName="TextBadge";var ed=cva("animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},color:{default:"text-foreground",primary:"text-primary",muted:"text-muted-foreground",success:"text-success",warning:"text-warning",danger:"text-danger",white:"text-white"}},defaultVariants:{size:"md",color:"default"}}),R0={sm:"text-xs",md:"text-sm",lg:"text-base"},Ma=j.forwardRef(({className:e,size:t="md",color:r,label:n="Loading",text:o,textPosition:a="right",customColor:s,...i},l)=>{let c=jsxs("svg",{className:u(ed({size:t,color:s?void 0:r})),style:s?{color:s}:void 0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",role:"status","aria-label":n,children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});if(!o)return jsx("div",{ref:l,className:u("inline-flex",e),...i,children:c});let d=jsx("span",{className:u("text-muted-foreground",R0[t]),children:o}),m=a==="top"||a==="bottom";return jsxs("div",{ref:l,className:u("inline-flex items-center",m?"flex-col gap-2":"flex-row gap-3",(a==="left"||a==="top")&&(m?"flex-col-reverse":"flex-row-reverse"),e),...i,children:[c,d]})});Ma.displayName="Spinner";var rd=cva("inline-flex",{variants:{variant:{default:"",attached:""},orientation:{horizontal:"flex-row",vertical:"flex-col"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"},{variant:"attached",orientation:"horizontal",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},{variant:"attached",orientation:"vertical",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),nd=j.createContext({});function vi(){return j.useContext(nd)}var od=j.forwardRef(({className:e,variant:t,orientation:r,spacing:n,disabled:o,children:a,...s},i)=>jsx(nd.Provider,{value:{disabled:o},children:jsx("div",{ref:i,role:"group",className:u(rd({variant:t,orientation:r,spacing:n,className:e})),...s,children:a})}));od.displayName="ButtonGroup";var _n=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-all duration-200 ease-out cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{solid:"",bordered:"border-2 border-current bg-transparent hover:opacity-70",light:"bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800",flat:"bg-zinc-100 dark:bg-zinc-800 hover:opacity-70",ghost:"border-2 border-current bg-transparent"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-9 px-3 text-xs",md:"h-10 px-4",lg:"h-11 px-5 text-base",icon:"h-10 w-10"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white hover:bg-zinc-700 dark:bg-zinc-200 dark:text-zinc-900 dark:hover:bg-zinc-300"},{variant:"bordered",color:"default",className:"text-zinc-900 dark:text-white"},{variant:"light",color:"default",className:"text-zinc-900 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800"},{variant:"flat",color:"default",className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white"},{variant:"ghost",color:"default",className:"text-zinc-900 hover:bg-zinc-900 hover:text-white dark:text-white dark:hover:bg-white dark:hover:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:text-white dark:hover:bg-green-600"},{variant:"bordered",color:"success",className:"text-green-600 dark:text-green-500"},{variant:"light",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"flat",color:"success",className:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600 hover:text-white dark:text-green-500 dark:hover:bg-green-500 dark:hover:text-white"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:text-white dark:hover:bg-amber-600"},{variant:"bordered",color:"warning",className:"text-amber-600 dark:text-amber-500"},{variant:"light",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"flat",color:"warning",className:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600 hover:text-white dark:text-amber-500 dark:hover:bg-amber-500 dark:hover:text-white"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:text-white dark:hover:bg-red-600"},{variant:"bordered",color:"danger",className:"text-red-600 dark:text-red-500"},{variant:"light",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"flat",color:"danger",className:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600 hover:text-white dark:text-red-500 dark:hover:bg-red-500 dark:hover:text-white"},{variant:"solid",color:"info",className:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-700 dark:text-white dark:hover:bg-blue-600"},{variant:"bordered",color:"info",className:"text-blue-600 dark:text-blue-500"},{variant:"light",color:"info",className:"text-blue-600 hover:bg-blue-600/10 dark:text-blue-500 dark:hover:bg-blue-500/10"},{variant:"flat",color:"info",className:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},{variant:"ghost",color:"info",className:"text-blue-600 hover:bg-blue-600 hover:text-white dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),ae=j.forwardRef(({className:e,variant:t,color:r,size:n,radius:o,href:a,loading:s=false,startContent:i,endContent:l,children:c,disabled:d,style:m,isIconOnly:f,...p},g)=>{let h=vi(),b=d||h.disabled||s,v=m,w=f?n==="sm"?"!px-0 !w-9":n==="lg"?"!px-0 !w-11":"!px-0 !w-10":"",R=s?jsxs(Fragment,{children:[jsx(Ma,{size:"sm",color:t==="solid"?"white":"default"}),c]}):jsxs(Fragment,{children:[i,c,l]});return a?b?jsx("span",{role:"link","aria-disabled":"true",className:u(_n({variant:t,color:r,size:n,radius:o,className:e}),w,"pointer-events-none opacity-50 cursor-not-allowed"),style:v,children:R}):jsx("a",{href:a,className:u(_n({variant:t,color:r,size:n,radius:o,className:e}),w),style:v,...p,children:R}):jsx("button",{type:"button",className:u(_n({variant:t,color:r,size:n,radius:o,className:e}),w),ref:g,disabled:b,style:v,...p,children:R})});ae.displayName="Button";var ld=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"lg"}}),cd=j.forwardRef(({className:e,radius:t,...r},n)=>jsx("div",{ref:n,className:u(ld({radius:t,className:e})),...r}));cd.displayName="Card";var dd=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex flex-col space-y-1.5 p-6",e),...t}));dd.displayName="CardHeader";var ud=j.forwardRef(({className:e,...t},r)=>jsx("h3",{ref:r,className:u("text-2xl font-semibold leading-none tracking-tight",e),...t}));ud.displayName="CardTitle";var md=j.forwardRef(({className:e,...t},r)=>jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...t}));md.displayName="CardDescription";var pd=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("p-6 pt-0",e),...t}));pd.displayName="CardContent";var fd=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex items-center p-6 pt-0",e),...t}));fd.displayName="CardFooter";var Io=j.forwardRef(({className:e,checked:t,defaultChecked:r=false,onCheckedChange:n,disabled:o,required:a,name:s,value:i="on",text:l,description:c,onKeyDown:d,...m},f)=>{let[p,g]=j.useState(r),h=t!==void 0,b=h?t:p,[v,w]=j.useState(false),x=j.useId(),R=()=>{if(o)return;let N=b==="indeterminate"?true:!b;h||g(N),n?.(N);},C=N=>{N.key==="Enter"&&N.preventDefault(),d?.(N);},y=b===true,k=b==="indeterminate",T=jsxs(Fragment,{children:[jsx("button",{type:"button",role:"checkbox",id:l?x:void 0,"aria-checked":k?"mixed":y,"aria-required":a,disabled:o,ref:f,className:u("peer h-4 w-4 shrink-0 rounded-sm border border-primary focus-visible:outline-none cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 transition-colors",y&&"bg-primary text-primary-foreground",k&&"bg-background text-foreground",!l&&e),style:{borderColor:v?"var(--color-foreground)":void 0},onClick:R,onKeyDown:C,onFocus:()=>w(true),onBlur:()=>w(false),...m,children:(y||k)&&jsx("span",{className:"flex items-center justify-center text-current",children:k?jsx(Minus,{className:"h-4 w-4"}):jsx(Check,{className:"h-4 w-4"})})}),s&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:s,value:i,checked:y,required:a,disabled:o,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]});return l?jsxs("div",{className:u("flex items-start gap-2",e),children:[T,jsxs("div",{className:"flex flex-col gap-0.5",children:[jsx("label",{htmlFor:x,className:u("text-sm font-medium leading-none cursor-pointer",o&&"cursor-not-allowed opacity-50"),children:l}),c&&jsx("p",{className:"text-xs text-muted-foreground",children:c})]})]}):T});Io.displayName="Checkbox";var E0=cva("flex h-10 w-full border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),ka=j.forwardRef(({className:e,type:t,radius:r,label:n,isRequired:o,description:a,errorMessage:s,isInvalid:i,onFocus:l,onBlur:c,style:d,...m},f)=>{let[p,g]=j.useState(false),h=j.useId(),b=m.id||h,v=i||!!s,w=jsx("input",{id:b,type:t,className:u(E0({radius:r}),v&&"border-danger focus:border-danger",!n&&e),ref:f,required:o,"aria-invalid":v,"aria-describedby":a||s?`${b}-description`:void 0,style:{...d,borderColor:v?void 0:p?"var(--color-foreground)":void 0},onFocus:x=>{g(true),l?.(x);},onBlur:x=>{g(false),c?.(x);},...m});return !n&&!a&&!s?w:jsxs("div",{className:u("flex flex-col gap-1.5",e),children:[n&&jsxs("label",{htmlFor:b,className:"text-sm font-medium leading-none",children:[n,o&&jsx("span",{className:"text-danger ml-1",children:"*"})]}),w,(a||s)&&jsx("p",{id:`${b}-description`,className:u("text-xs",v?"text-danger":"text-muted-foreground"),children:s||a})]})});ka.displayName="Input";var S0=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),xn=j.forwardRef(({className:e,...t},r)=>jsx("label",{ref:r,className:u(S0(),e),...t}));xn.displayName="Label";var Br=j.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,text:n,...o},a)=>{let s=r?{role:"none"}:{role:"separator","aria-orientation":t};return n&&t==="horizontal"?jsxs("div",{className:u("flex items-center gap-4",e),children:[jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"}),jsx("span",{className:"text-sm text-muted-foreground",children:n}),jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"})]}):jsx("div",{ref:a,...s,className:u("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o})});Br.displayName="Separator";var I0="peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",Ea={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},hd={sm:{track:"h-5 w-9",thumb:"h-4 w-4",translate:"translate-x-4"},md:{track:"h-6 w-11",thumb:"h-5 w-5",translate:"translate-x-5"},lg:{track:"h-7 w-14",thumb:"h-6 w-6",translate:"translate-x-7"}},xd=j.forwardRef(({className:e,color:t,size:r="md",customColor:n,checked:o,defaultChecked:a=false,onCheckedChange:s,disabled:i,required:l,name:c,value:d="on",onKeyDown:m,style:f,...p},g)=>{let[h,b]=j.useState(a),v=o!==void 0,w=v?o:h,x=()=>{if(i)return;let k=!w;v||b(k),s?.(k);},R=k=>{k.key==="Enter"&&k.preventDefault(),m?.(k);},C=t&&Ea[t]?Ea[t]:Ea.default,y=hd[r]||hd.md;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":w?"checked":"unchecked",disabled:i,ref:g,className:u(I0,y.track,w?n?"":C:"bg-input",e),style:n&&w?{backgroundColor:n,...f}:f,onClick:x,onKeyDown:R,...p,children:jsx("span",{className:u("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",y.thumb,w?y.translate:"translate-x-0")})}),c&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:c,value:d,checked:w,required:l,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});xd.displayName="Switch";var O0=cva("flex min-h-[80px] w-full border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"md"}}),yd=j.forwardRef(({className:e,radius:t,onFocus:r,onBlur:n,style:o,...a},s)=>{let[i,l]=j.useState(false);return jsx("textarea",{className:u(O0({radius:t,className:e})),ref:s,style:{...o,borderColor:i?"var(--color-foreground)":void 0},onFocus:c=>{l(true),r?.(c);},onBlur:c=>{l(false),n?.(c);},...a})});yd.displayName="Textarea";var wd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),Da=j.forwardRef(({className:e,variant:t,...r},n)=>jsx("div",{ref:n,className:u(wd({variant:t,className:e})),...r}));Da.displayName="Skeleton";var G0=cva("relative flex shrink-0 overflow-hidden cursor-pointer",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),Cd=j.createContext(null),Td=()=>{let e=j.useContext(Cd);if(!e)throw new Error("Avatar components must be used within an Avatar");return e},yn=j.forwardRef(({className:e,size:t,radius:r,...n},o)=>{let[a,s]=j.useState("idle");return jsx(Cd.Provider,{value:{imageLoadingStatus:a,onImageLoadingStatusChange:s},children:jsx("span",{ref:o,className:u(G0({size:t,radius:r,className:e})),...n})})});yn.displayName="Avatar";var qn=j.forwardRef(({className:e,src:t,alt:r,onLoadingStatusChange:n,...o},a)=>{let{imageLoadingStatus:s,onImageLoadingStatusChange:i}=Td();return j.useEffect(()=>{if(!t){i("error");return}i("loading"),n?.("loading");let l=new Image;l.src=t,l.onload=()=>{i("loaded"),n?.("loaded");},l.onerror=()=>{i("error"),n?.("error");};},[t,i,n]),s!=="loaded"?null:jsx("img",{ref:a,src:t,alt:r,className:u("aspect-square h-full w-full object-cover",e),...o})});qn.displayName="AvatarImage";var Rn=j.forwardRef(({className:e,delayMs:t=0,children:r,...n},o)=>{let{imageLoadingStatus:a}=Td(),[s,i]=j.useState(t===0);return j.useEffect(()=>{if(t>0){let l=setTimeout(()=>i(true),t);return ()=>clearTimeout(l)}},[t]),a==="loaded"||!s?null:jsx("span",{ref:o,className:u("flex h-full w-full items-center justify-center bg-muted",e),...n,children:r})});Rn.displayName="AvatarFallback";var Nd=j.createContext({delayDuration:700,skipDelayDuration:300}),Fr=({children:e,delayDuration:t=700,skipDelayDuration:r=300})=>jsx(Nd.Provider,{value:{delayDuration:t,skipDelayDuration:r},children:e});Fr.displayName="TooltipProvider";var kd=j.createContext(null),Pd=()=>{let e=j.useContext(kd);if(!e)throw new Error("Tooltip components must be used within a Tooltip");return e},Kr=({children:e,open:t,defaultOpen:r=false,onOpenChange:n,delayDuration:o})=>{let a=j.useContext(Nd),[s,i]=j.useState(r),l=t!==void 0,c=l?t:s,d=j.useRef(null),m=j.useId(),f=j.useRef(null),p=o??a.delayDuration,g=j.useCallback(h=>{f.current&&clearTimeout(f.current),h?f.current=setTimeout(()=>{l||i(true),n?.(true);},p):(l||i(false),n?.(false));},[l,n,p]);return j.useEffect(()=>()=>{f.current&&clearTimeout(f.current);},[]),jsx(kd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentId:m},children:e})};Kr.displayName="Tooltip";var $r=j.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:r,onFocus:n,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l,contentId:c,open:d}=Pd();return jsx("button",{ref:h=>{l.current=h,typeof s=="function"?s(h):s&&(s.current=h);},type:"button","aria-describedby":d?c:void 0,onMouseEnter:h=>{t?.(h),i(true);},onMouseLeave:h=>{r?.(h),i(false);},onFocus:h=>{n?.(h),i(true);},onBlur:h=>{o?.(h),i(false);},...a,children:e})});$r.displayName="TooltipTrigger";var Gr=j.forwardRef(({className:e,side:t="top",sideOffset:r=4,align:n="center",alignOffset:o=0,children:a,...s},i)=>{let{open:l,triggerRef:c,contentId:d}=Pd(),[m,f]=j.useState({top:0,left:0}),[p,g]=j.useState(false),h=j.useRef(null);if(j.useEffect(()=>{g(true);},[]),j.useEffect(()=>{if(!l||!c.current||!h.current)return;let v=c.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),x=0,R=0;switch(t){case "top":x=v.top-w.height-r;break;case "bottom":x=v.bottom+r;break;case "left":R=v.left-w.width-r;break;case "right":R=v.right+r;break}if(t==="top"||t==="bottom")switch(n){case "start":R=v.left+o;break;case "center":R=v.left+v.width/2-w.width/2;break;case "end":R=v.right-w.width-o;break}else switch(n){case "start":x=v.top+o;break;case "center":x=v.top+v.height/2-w.height/2;break;case "end":x=v.bottom-w.height-o;break}f({top:x,left:R});},[l,t,r,n,o,c]),!p||!l)return null;let b={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return za.createPortal(jsx("div",{ref:v=>{h.current=v,typeof i=="function"?i(v):i&&(i.current=v);},id:d,role:"tooltip","data-side":t,className:u("fixed z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",b,e),style:{top:m.top,left:m.left},...s,children:a}),document.body)});Gr.displayName="TooltipContent";var Se=j.forwardRef(({className:e,orientation:t="vertical",visibility:r="visible",children:n,style:o,...a},s)=>{let[i,l]=j.useState(false),c=j.useId().replace(/:/g,""),d=r==="visible"||r==="hover"&&i,m=d?"rgba(0,0,0,0.3)":"transparent",f=d?"rgba(255,255,255,0.3)":"transparent",p=`
|
|
2
2
|
#${c} {
|
|
3
3
|
scrollbar-width: thin;
|
|
4
4
|
scrollbar-color: ${m} transparent;
|
|
@@ -40,19 +40,19 @@ import*as j from'react';import {createContext,useState,useEffect,useContext,useC
|
|
|
40
40
|
scrollbar-width: none;
|
|
41
41
|
}
|
|
42
42
|
`:""}
|
|
43
|
-
`;return jsxs(Fragment,{children:[jsx("style",{dangerouslySetInnerHTML:{__html:p}}),jsx("div",{ref:s,id:c,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),style:o,className:u("h-full w-full",t==="vertical"&&"overflow-y-auto overflow-x-hidden",t==="horizontal"&&"overflow-x-auto overflow-y-hidden",t==="both"&&"overflow-auto",e),...a,children:n})]})});De.displayName="ScrollArea";var qd=cva("flex min-h-10 w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 py-2 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Zd=j.forwardRef(({options:e,multiple:t=false,value:r,defaultValue:n,onValueChange:o,placeholder:a="Select...",searchable:s=false,searchPlaceholder:i="Search...",emptyText:l="No results found.",disabled:c=false,clearable:d=false,maxDisplayItems:m=3,maxDropdownHeight:f=240,radius:p,className:g,...h},b)=>{let[v,w]=j.useState(false),[x,R]=j.useState(""),[C,y]=j.useState(n||""),[k,T]=j.useState(n||[]),[N,M]=j.useState({top:0,left:0,width:0}),P=j.useRef(null),E=j.useRef(null),D=j.useRef(null),H=j.useRef(null),L=r!==void 0?r:C,S=r!==void 0?r:k,V=r!==void 0,A=z=>{d&&L===z?(V||y(""),o?.("")):(V||y(z),o?.(z)),w(false),R("");},B=z=>{let _=S.includes(z)?S.filter(Q=>Q!==z):[...S,z];V||T(_),o?.(_);},I=(z,_)=>{_.stopPropagation();let Q=S.filter(ue=>ue!==z);V||T(Q),o?.(Q);},F=z=>{z.stopPropagation(),t?(V||T([]),o?.([])):(V||y(""),o?.(""));},K=e.find(z=>z.value===L),Y=e.filter(z=>S.includes(z.value)),te=Y.slice(0,m),$=Y.length-m,O=s?e.filter(z=>z.label.toLowerCase().includes(x.toLowerCase())):e;j.useEffect(()=>{if(v&&E.current){let z=E.current.getBoundingClientRect();M({top:z.bottom+4,left:z.left,width:z.width}),s&&setTimeout(()=>H.current?.focus(),0);}v||R("");},[v,s]),j.useEffect(()=>{let z=_=>{let Q=_.target,ue=P.current&&!P.current.contains(Q),U=D.current&&!D.current.contains(Q);ue&&U&&(w(false),R(""));};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[]),j.useEffect(()=>{if(!v)return;let z=_=>{D.current?.contains(_.target)||(w(false),R(""));};return window.addEventListener("scroll",z,true),()=>window.removeEventListener("scroll",z,true)},[v]);let W=t?S.length>0:!!L;return jsxs("div",{ref:P,className:u("relative",g),...h,children:[jsxs("div",{ref:z=>{E.current=z,typeof b=="function"?b(z):b&&(b.current=z);},role:"combobox","aria-expanded":v,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&w(!v),className:u(qd({radius:p}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:u(!K&&"text-muted-foreground"),children:K?K.label:a}),t&&jsx(Fragment,{children:Y.length===0?jsx("span",{className:"text-muted-foreground",children:a}):jsxs(Fragment,{children:[te.map(z=>jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[z.label,jsx("span",{role:"button",tabIndex:0,onClick:_=>I(z.value,_),onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&I(z.value,_);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X,{className:"h-3 w-3"})})]},z.value)),$>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",$," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&W&&jsx("span",{role:"button",tabIndex:0,onClick:F,onKeyDown:z=>{(z.key==="Enter"||z.key===" ")&&F(z);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsx(X,{className:"h-4 w-4 opacity-50"})}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",v&&"rotate-180")})]})]}),v&&!c&&typeof document<"u"&&$a.createPortal(jsxs("div",{ref:D,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:N.top,left:N.left,minWidth:N.width},children:[s&&jsxs("div",{className:"flex items-center border-b border-zinc-300 dark:border-zinc-700 px-3",children:[jsx(Search,{className:"h-4 w-4 opacity-50 mr-2"}),jsx("input",{ref:H,type:"text",value:x,onChange:z=>R(z.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx(De,{style:{maxHeight:f},onWheel:z=>z.stopPropagation(),children:jsx("div",{className:"p-1",children:O.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):O.map(z=>{let _=t?S.includes(z.value):L===z.value;return jsxs("div",{role:"option","aria-selected":_,onClick:()=>{z.disabled||(t?B(z.value):A(z.value));},className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",z.disabled&&"pointer-events-none opacity-50"),children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:_&&jsx(Check,{className:"h-4 w-4"})}),z.label]},z.value)})})})]}),document.body)]})});Zd.displayName="Select";var Qd=j.createContext(null),Bo=()=>{let e=j.useContext(Qd);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},Pi=j.createContext({radius:"md"}),Ei=j.createContext(null),br=({children:e,open:t,defaultOpen:r=false,onOpenChange:n})=>{let[o,a]=j.useState(r),[s,i]=j.useState(-1),l=t!==void 0,c=l?t:o,d=j.useRef(null),m=j.useRef(null),f=j.useId(),p=j.useRef(new Map),g=j.useCallback(v=>{l||a(v),n?.(v),v||i(-1);},[l,n]),h=j.useCallback((v,w)=>{p.current.set(v,w);},[]),b=j.useCallback(v=>{p.current.delete(v);},[]);return jsx(Qd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:m,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:b},children:e})};br.displayName="Dropdown";var vr=j.forwardRef(({children:e,onClick:t,onKeyDown:r,...n},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Bo();return jsx("div",{ref:m=>{i.current=m,typeof o=="function"?o(m):o&&(o.current=m);},role:"button",tabIndex:0,"aria-expanded":a,"aria-haspopup":"menu","aria-controls":a?l:void 0,onClick:m=>{t?.(m),s(!a);},onKeyDown:m=>{r?.(m),(m.key==="ArrowDown"||m.key==="ArrowUp")&&(m.preventDefault(),s(true)),(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),s(!a));},className:"inline-flex",...n,children:e})});vr.displayName="DropdownTrigger";var gR={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-2xl"},hr=j.forwardRef(({className:e,side:t="bottom",sideOffset:r=4,align:n="start",alignOffset:o=0,collisionPadding:a=8,onInteractOutside:s,onEscapeKeyDown:i,loop:l=true,radius:c="md",children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentRef:b,contentId:v,activeIndex:w,setActiveIndex:x,items:R}=Bo(),[C,y]=j.useState({top:0,left:0}),[k,T]=j.useState(t),[N,M]=j.useState(false),P=j.useRef(0);if(j.useEffect(()=>{M(true);},[]),j.useEffect(()=>{p&&(P.current=R.current.size);},[p,R]),j.useEffect(()=>{if(!p||!h.current||!b.current)return;let D=()=>{if(!h.current||!b.current)return;let H=h.current.getBoundingClientRect(),L=b.current.getBoundingClientRect(),S=window.innerWidth,V=window.innerHeight,A=0,B=0,I=t;switch(t){case "top":A=H.top-L.height-r,A<a&&(A=H.bottom+r,I="bottom");break;case "bottom":A=H.bottom+r,A+L.height>V-a&&(A=H.top-L.height-r,I="top");break;case "left":B=H.left-L.width-r,B<a&&(B=H.right+r,I="right");break;case "right":B=H.right+r,B+L.width>S-a&&(B=H.left-L.width-r,I="left");break}if(I==="top"||I==="bottom"){switch(n){case "start":B=H.left+o;break;case "center":B=H.left+H.width/2-L.width/2;break;case "end":B=H.right-L.width-o;break}B<a?B=a:B+L.width>S-a&&(B=S-L.width-a);}else {switch(n){case "start":A=H.top+o;break;case "center":A=H.top+H.height/2-L.height/2;break;case "end":A=H.bottom-L.height-o;break}A<a?A=a:A+L.height>V-a&&(A=V-L.height-a);}y({top:A,left:B}),T(I);};return D(),window.addEventListener("resize",D),window.addEventListener("scroll",D,true),()=>{window.removeEventListener("resize",D),window.removeEventListener("scroll",D,true);}},[p,t,r,n,o,a,h]),j.useEffect(()=>{if(!p)return;let D=H=>{let L=H.target;b.current&&!b.current.contains(L)&&h.current&&!h.current.contains(L)&&(s?.(),g(false));};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[p,g,s,h,b]),j.useEffect(()=>{if(!p)return;let D=H=>{let L=Array.from(R.current.entries()).sort(([V],[A])=>V-A).map(([,V])=>V),S=L.length;if(S!==0)switch(H.key){case "Escape":H.preventDefault(),i?.(),g(false),h.current?.focus();break;case "ArrowDown":H.preventDefault(),w===-1||w>=S-1?x(l?0:Math.min(w+1,S-1)):x(w+1);break;case "ArrowUp":H.preventDefault(),w<=0?x(l?S-1:0):x(w-1);break;case "Home":H.preventDefault(),x(0);break;case "End":H.preventDefault(),x(S-1);break;case "Enter":case " ":H.preventDefault(),w>=0&&w<S&&L[w]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[p,g,i,w,x,R,l,h]),j.useEffect(()=>{p&&w>=0&&Array.from(R.current.entries()).sort(([H],[L])=>H-L).map(([,H])=>H)[w]?.focus();},[p,w,R]),!N||!p)return null;let E={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[k];return $a.createPortal(jsx("div",{ref:D=>{b.current=D,typeof f=="function"?f(D):f&&(f.current=D);},id:v,role:"menu","aria-orientation":"vertical","data-state":p?"open":"closed","data-side":k,"data-dropdown-content":"",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md outline-none",gR[c],E,e),style:{top:C.top,left:C.left},...m,children:jsx(Pi.Provider,{value:{radius:c},children:d})}),document.body)});hr.displayName="DropdownContent";var Jd=0,eu={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},$t=j.forwardRef(({className:e,inset:t,disabled:r,onSelect:n,onClick:o,onMouseEnter:a,startContent:s,endContent:i,children:l,...c},d)=>{let{onOpenChange:m,activeIndex:f,setActiveIndex:p,registerItem:g,unregisterItem:h}=Bo(),{radius:b}=j.useContext(Pi),[v]=j.useState(()=>Jd++),w=j.useRef(null);j.useEffect(()=>(!r&&w.current&&g(v,w.current),()=>{h(v);}),[r,v,g,h]);let x=y=>{if(r){y.preventDefault();return}o?.(y),n?.(),m(false);},R=y=>{a?.(y),r||p(v);};return jsxs("div",{ref:y=>{w.current=y,typeof d=="function"?d(y):d&&(d.current=y);},role:"menuitem",tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-highlighted":f===v?"":void 0,className:u("relative flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",eu[b],t&&"pl-8",!r&&"cursor-pointer",e),onClick:x,onMouseEnter:R,...c,children:[s,l&&jsx("span",{className:"flex-1",children:l}),i]})});$t.displayName="DropdownItem";var Li=j.forwardRef(({className:e,inset:t,...r},n)=>jsx("div",{ref:n,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...r}));Li.displayName="DropdownSection";var tu=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));tu.displayName="DropdownSeparator";var ru=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});ru.displayName="DropdownShortcut";var nu=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"group",className:e,...t}));nu.displayName="DropdownGroup";var ou=({children:e,open:t,defaultOpen:r=false,onOpenChange:n})=>{let[o,a]=j.useState(r),{contentRef:s}=Bo(),i=t!==void 0,l=i?t:o,c=j.useRef(null),d=j.useCallback(m=>{i||a(m),n?.(m);},[i,n]);return jsx(Ei.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};ou.displayName="DropdownSub";var au=j.forwardRef(({className:e,inset:t,disabled:r,children:n,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=j.useContext(Ei),{setActiveIndex:d,registerItem:m,unregisterItem:f}=Bo(),{radius:p}=j.useContext(Pi),[g]=j.useState(()=>Jd++),h=j.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:b,onOpenChange:v,triggerRef:w}=c;j.useEffect(()=>(!r&&h.current&&m(g,h.current),()=>{f(g);}),[r,g,m,f]);let x=y=>{o?.(y),r||(d(g),v(true));},R=y=>{a?.(y);},C=y=>{s?.(y),(y.key==="ArrowRight"||y.key==="Enter"||y.key===" ")&&(y.preventDefault(),v(true));};return jsxs("div",{ref:y=>{h.current=y,w.current=y,typeof l=="function"?l(y):l&&(l.current=y);},role:"menuitem","aria-haspopup":"menu","aria-expanded":b,tabIndex:r?-1:0,"aria-disabled":r,"data-state":b?"open":"closed","data-disabled":r?"":void 0,className:u("flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",eu[p],t&&"pl-8",!r&&"cursor-pointer",e),onMouseEnter:x,onMouseLeave:R,onKeyDown:C,...i,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});au.displayName="DropdownSubTrigger";var su=j.forwardRef(({className:e,sideOffset:t=2,alignOffset:r=-4,collisionPadding:n=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=j.useContext(Ei);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:m,parentMenuRef:f}=l,[p,g]=j.useState({top:0,left:0}),[h,b]=j.useState(false),v=j.useRef(null),w=j.useRef(null);j.useEffect(()=>{b(true);},[]),j.useEffect(()=>{if(!c||!m.current||!v.current)return;(()=>{if(!m.current||!v.current)return;let y=m.current.getBoundingClientRect(),k=v.current.getBoundingClientRect(),T=window.innerWidth,N=window.innerHeight,M=y.top+r,P=y.right+t;P+k.width>T-n&&(P=y.left-k.width-t),M+k.height>N-n&&(M=N-k.height-n),M<n&&(M=n),g({top:M,left:P});})();},[c,t,r,n,m]);let x=C=>{o?.(C),w.current&&(clearTimeout(w.current),w.current=null),d(true);},R=C=>{a?.(C);let y=C.relatedTarget;m.current?.contains(y)||f?.current?.contains(y)||(w.current=setTimeout(()=>{d(false);},100));};return j.useEffect(()=>()=>{w.current&&clearTimeout(w.current);},[]),!h||!c?null:$a.createPortal(jsx("div",{ref:C=>{v.current=C,typeof i=="function"?i(C):i&&(i.current=C);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:p.top,left:p.left},onMouseEnter:x,onMouseLeave:R,...s}),document.body)});su.displayName="DropdownSubContent";var bR=Li;var cu=j.createContext(null),Si=()=>{let e=j.useContext(cu);if(!e)throw new Error("Popover components must be used within a Popover");return e},_e=({children:e,open:t,defaultOpen:r=false,onOpenChange:n})=>{let[o,a]=j.useState(r),s=t!==void 0,i=s?t:o,l=j.useRef(null),c=j.useId(),d=j.useCallback(m=>{s||a(m),n?.(m);},[s,n]);return jsx(cu.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};_e.displayName="Popover";var Dt=j.forwardRef(({children:e,onClick:t,...r},n)=>{let{open:o,onOpenChange:a,triggerRef:s,contentId:i}=Si();return jsx("button",{ref:c=>{s.current=c,typeof n=="function"?n(c):n&&(n.current=c);},type:"button","aria-expanded":o,"aria-haspopup":"dialog","aria-controls":o?i:void 0,onClick:c=>{t?.(c),a(!o);},...r,children:e})});Dt.displayName="PopoverTrigger";var jr=j.forwardRef(({children:e,...t},r)=>{let{triggerRef:n}=Si();return jsx("div",{ref:o=>{n.current=o,typeof r=="function"?r(o):r&&(r.current=o);},...t,children:e})});jr.displayName="PopoverAnchor";var Xe=j.forwardRef(({className:e,style:t,side:r="bottom",sideOffset:n=4,align:o="center",alignOffset:a=0,onInteractOutside:s,onEscapeKeyDown:i,onOpenAutoFocus:l,onCloseAutoFocus:c,children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentId:b}=Si(),[v,w]=j.useState({top:0,left:0}),[x,R]=j.useState(false),[C,y]=j.useState(null);if(j.useEffect(()=>{R(true);},[]),j.useEffect(()=>{if(!p||!h.current||!C)return;let T=()=>{if(!h.current||!C)return;let N=h.current.getBoundingClientRect(),M=C.getBoundingClientRect(),P=0,E=0;switch(r){case "top":P=N.top-M.height-n;break;case "bottom":P=N.bottom+n;break;case "left":E=N.left-M.width-n;break;case "right":E=N.right+n;break}if(r==="top"||r==="bottom")switch(o){case "start":E=N.left+a;break;case "center":E=N.left+N.width/2-M.width/2;break;case "end":E=N.right-M.width-a;break}else switch(o){case "start":P=N.top+a;break;case "center":P=N.top+N.height/2-M.height/2;break;case "end":P=N.bottom-M.height-a;break}w({top:P,left:E});};return T(),window.addEventListener("resize",T),window.addEventListener("scroll",T,true),()=>{window.removeEventListener("resize",T),window.removeEventListener("scroll",T,true);}},[p,r,n,o,a,h,C]),j.useEffect(()=>{if(!p)return;let T=N=>{let M=N.target;C&&C.contains(M)||h.current&&h.current.contains(M)||M.closest?.("[data-dropdown-content], [data-popover-content]")||(s?.(),g(false));};return document.addEventListener("mouseup",T),()=>document.removeEventListener("mouseup",T)},[p,g,s,h,C]),j.useEffect(()=>{if(!p)return;let T=N=>{N.key==="Escape"&&(i?.(),g(false));};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[p,g,i]),!x||!p)return null;let k={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[r];return $a.createPortal(jsx("div",{ref:T=>{y(N=>N!==T?T:N),typeof f=="function"?f(T):f&&(f.current=T);},id:b,role:"dialog","data-state":p?"open":"closed","data-side":r,className:u("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",k,e),style:{...t,top:v.top,left:v.left},...m,children:d}),document.body)});Xe.displayName="PopoverContent";var du=j.createContext(null),Hi=()=>{let e=j.useContext(du);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},uu=j.forwardRef(({className:e,value:t,defaultValue:r="",onValueChange:n,variant:o="solid",radius:a="md",orientation:s="horizontal",children:i,...l},c)=>{let[d,m]=j.useState(r),f=t!==void 0,p=f?t:d,g=h=>{f||m(h),n?.(h);};return jsx(du.Provider,{value:{value:p,onValueChange:g,variant:o,radius:a,orientation:s},children:jsx("div",{ref:c,"data-orientation":s,className:u(s==="vertical"&&"flex gap-4",e),...l,children:i})})});uu.displayName="Tabs";var Di={none:{list:"rounded-none",trigger:"rounded-none",indicator:"rounded-none"},sm:{list:"rounded-md",trigger:"rounded-sm",indicator:"rounded-sm"},md:{list:"rounded-lg",trigger:"rounded-md",indicator:"rounded-md"},lg:{list:"rounded-xl",trigger:"rounded-lg",indicator:"rounded-lg"},full:{list:"rounded-full",trigger:"rounded-full",indicator:"rounded-full"}},mu=j.forwardRef(({className:e,children:t,...r},n)=>{let{variant:o,radius:a,orientation:s,value:i}=Hi(),l=j.useRef(null),[c,d]=j.useState({opacity:0});j.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let v=g.querySelector('[data-state="active"]');if(v){let w=g.getBoundingClientRect(),x=v.getBoundingClientRect(),R=s==="vertical";o==="underline"?d(R?{width:2,height:x.height,transform:`translateY(${x.top-w.top}px)`,opacity:1}:{width:x.width,height:2,transform:`translateX(${x.left-w.left}px)`,opacity:1}):o==="solid"&&d(R?{width:x.width,height:x.height,transform:`translateY(${x.top-w.top}px)`,opacity:1}:{width:x.width,height:x.height,transform:`translateX(${x.left-w.left}px)`,opacity:1});}};h();let b=new ResizeObserver(h);return b.observe(g),()=>{b.disconnect();}},[o,s,i]);let m={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",bordered:"bg-transparent p-0 gap-1 !rounded-none"},f=s==="vertical",p=()=>o==="solid"?f?"top-0 left-1 bg-background shadow":"top-1 left-1 bg-background shadow":o==="underline"?f?"top-0 left-0 bg-primary !rounded-full":"bottom-0 left-0 bg-primary !rounded-full":"";return jsxs("div",{ref:g=>{l.current=g,typeof n=="function"?n(g):n&&(n.current=g);},role:"tablist","aria-orientation":s,className:u("relative inline-flex h-9 items-center justify-center text-muted-foreground",f&&"flex-col h-auto w-auto",Di[a].list,m[o],e),...r,children:[(o==="solid"||o==="underline")&&jsx("span",{className:u("absolute transition-all duration-200 ease-out",Di[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});mu.displayName="TabsList";var pu=j.forwardRef(({className:e,value:t,disabled:r,onClick:n,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=Hi(),d=s===t,m={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",bordered:"border border-transparent data-[state=active]:border-current data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsx("button",{type:"button",role:"tab",ref:a,"aria-selected":d,"data-state":d?"active":"inactive",disabled:r,className:u("relative z-10 inline-flex items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background transition-all cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",Di[c].trigger,m[l],e),onClick:f=>{n?.(f),i(t);},...o})});pu.displayName="TabsTrigger";var fu=j.forwardRef(({className:e,value:t,children:r,...n},o)=>{let{value:a}=Hi(),s=a===t;return s?jsx("div",{ref:o,role:"tabpanel","data-state":s?"active":"inactive",className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...n,children:r}):null});fu.displayName="TabsContent";var gu=[{label:"At least 8 characters",test:e=>e.length>=8},{label:"Contains uppercase",test:e=>/[A-Z]/.test(e)},{label:"Contains lowercase",test:e=>/[a-z]/.test(e)},{label:"Contains number",test:e=>/[0-9]/.test(e)},{label:"Contains special character",test:e=>/[!@#$%^&*(),.?":{}|<>]/.test(e)}];function hR(e,t=gu){return e?t.filter(n=>n.test(e)).length/t.length:0}function xR(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function yR(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var vu=j.createContext(null),Ka=()=>{let e=j.useContext(vu);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},hu=({open:e,defaultOpen:t=false,onOpenChange:r,children:n})=>{let[o,a]=j.useState(t),s=e!==void 0,i=s?e:o,l=j.useCallback(c=>{s||a(c),r?.(c);},[s,r]);return jsx(vu.Provider,{value:{open:i,onOpenChange:l},children:n})};hu.displayName="Sheet";var xu=j.forwardRef(({onClick:e,children:t,...r},n)=>{let{onOpenChange:o}=Ka();return jsx("button",{ref:n,type:"button",onClick:s=>{e?.(s),o(true);},...r,children:t})});xu.displayName="SheetTrigger";var yu=j.forwardRef(({onClick:e,children:t,...r},n)=>{let{onOpenChange:o}=Ka();return jsx("button",{ref:n,type:"button",onClick:s=>{e?.(s),o(false);},...r,children:t})});yu.displayName="SheetClose";var Vi=({children:e,container:t})=>{let[r,n]=j.useState(false);return j.useEffect(()=>{n(true);},[]),r?$a.createPortal(e,t||document.body):null};Vi.displayName="SheetPortal";var Ru=j.forwardRef(({className:e,...t},r)=>{let{open:n,onOpenChange:o}=Ka();return n?jsx("div",{ref:r,className:u("fixed inset-0 z-50 bg-black/80",n?"animate-in fade-in-0":"animate-out fade-out-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});Ru.displayName="SheetOverlay";var wu=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),CR=(e,t)=>({top:t?"animate-in slide-in-from-top":"animate-out slide-out-to-top",bottom:t?"animate-in slide-in-from-bottom":"animate-out slide-out-to-bottom",left:t?"animate-in slide-in-from-left":"animate-out slide-out-to-left",right:t?"animate-in slide-in-from-right":"animate-out slide-out-to-right"})[e],Cu=j.forwardRef(({side:e="right",className:t,children:r,hideCloseButton:n,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=Ka(),[d,m]=j.useState(false),[,f]=j.useState(false);return j.useEffect(()=>{if(l)m(true),f(true),Rt();else {f(true);let p=setTimeout(()=>{m(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{wt();}},[l]),j.useEffect(()=>{let p=g=>{g.key==="Escape"&&l&&(o?.(),c(false));};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[l,c,o]),!d&&!l?null:jsxs(Vi,{children:[jsx("div",{className:u("fixed inset-0 z-50 bg-black/80 transition-opacity duration-300",l?"opacity-100":"opacity-0"),onClick:()=>{a?.(),c(false);},"aria-hidden":"true"}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true",className:u(wu({side:e}),CR(e,l),t),...s,children:[!n&&jsxs("button",{type:"button",onClick:()=>c(false),className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none cursor-pointer",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),r]})]})});Cu.displayName="SheetContent";var Tu=({className:e,...t})=>jsx("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});Tu.displayName="SheetHeader";var Mu=({className:e,...t})=>jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Mu.displayName="SheetFooter";var Nu=j.forwardRef(({className:e,...t},r)=>jsx("h2",{ref:r,className:u("text-lg font-semibold text-foreground",e),...t}));Nu.displayName="SheetTitle";var ku=j.forwardRef(({className:e,...t},r)=>jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...t}));ku.displayName="SheetDescription";var NR=({theme:e="system",...t})=>jsx(Toaster,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});var Pu=j.createContext(null),Ga=()=>{let e=j.useContext(Pu);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Ai=j.createContext(null),Eu=({children:e,onOpenChange:t})=>{let[r,n]=j.useState(false),[o,a]=j.useState({x:0,y:0}),s=j.useId(),i=j.useCallback(l=>{n(l),t?.(l);},[t]);return jsx(Pu.Provider,{value:{open:r,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};Eu.displayName="ContextMenu";var Lu=j.forwardRef(({children:e,onContextMenu:t,...r},n)=>{let{onOpenChange:o,setPosition:a}=Ga(),s=i=>{i.preventDefault(),a({x:i.clientX,y:i.clientY}),o(true);};return jsx("div",{ref:n,onContextMenu:i=>{t?.(i),s(i);},...r,children:e})});Lu.displayName="ContextMenuTrigger";var Su=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"group",className:e,...t}));Su.displayName="ContextMenuGroup";var Du=({children:e,container:t})=>{let[r,n]=j.useState(false);return j.useEffect(()=>{n(true);},[]),r?$a.createPortal(e,t||document.body):null};Du.displayName="ContextMenuPortal";var Hu=({children:e,open:t,defaultOpen:r=false,onOpenChange:n})=>{let[o,a]=j.useState(r),s=t!==void 0,i=s?t:o,l=j.useRef(null),c=j.useCallback(d=>{s||a(d),n?.(d);},[s,n]);return jsx(Ai.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};Hu.displayName="ContextMenuSub";var Iu=j.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:r,children:n,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Ga(),[d,m]=j.useState(false),[f,p]=j.useState(l),g=j.useRef(null);return j.useEffect(()=>{m(true);},[]),j.useEffect(()=>{if(!s||!g.current){p(l);return}let b=g.current.getBoundingClientRect(),{x:v,y:w}=l;v+b.width>window.innerWidth&&(v=window.innerWidth-b.width-8),w+b.height>window.innerHeight&&(w=window.innerHeight-b.height-8),p({x:v,y:w});},[s,l]),j.useEffect(()=>{if(!s)return;let h=b=>{let v=b.target;g.current&&!g.current.contains(v)&&(t?.(),i(false));};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,i,t]),j.useEffect(()=>{if(!s)return;let h=b=>{b.key==="Escape"&&(r?.(),i(false));};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s,i,r]),!d||!s?null:$a.createPortal(jsx("div",{ref:h=>{g.current=h,typeof a=="function"?a(h):a&&(a.current=h);},id:c,role:"menu","aria-orientation":"vertical","data-state":s?"open":"closed",className:u("fixed z-50 max-h-[calc(100vh-2rem)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-md","animate-in fade-in-0 zoom-in-95",e),style:{top:f.y,left:f.x},...o,children:n}),document.body)});Iu.displayName="ContextMenuContent";var Vu=j.forwardRef(({className:e,inset:t,children:r,onMouseEnter:n,onMouseLeave:o,...a},s)=>{let i=j.useContext(Ai);if(!i)throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");let{open:l,onOpenChange:c,triggerRef:d}=i,m=p=>{n?.(p),c(true);},f=p=>{o?.(p),c(false);};return jsxs("div",{ref:p=>{d.current=p,typeof s=="function"?s(p):s&&(s.current=p);},role:"menuitem","aria-haspopup":"menu","aria-expanded":l,"data-state":l?"open":"closed",className:u("flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[state=open]:bg-zinc-100 dark:data-[state=open]:bg-zinc-800",t&&"pl-8",e),onMouseEnter:m,onMouseLeave:f,...a,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Vu.displayName="ContextMenuSubTrigger";var Au=j.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:r,onMouseLeave:n,...o},a)=>{let s=j.useContext(Ai);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,m]=j.useState({top:0,left:0}),[f,p]=j.useState(false),g=j.useRef(null);j.useEffect(()=>{p(true);},[]),j.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let w=c.current.getBoundingClientRect(),x=g.current.getBoundingClientRect(),R=w.top,C=w.right+t;C+x.width>window.innerWidth&&(C=w.left-x.width-t),m({top:R,left:C});})();},[i,t,c]);let h=v=>{r?.(v),l(true);},b=v=>{n?.(v),l(false);};return !f||!i?null:$a.createPortal(jsx("div",{ref:v=>{g.current=v,typeof a=="function"?a(v):a&&(a.current=v);},role:"menu","data-state":i?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:d.top,left:d.left},onMouseEnter:h,onMouseLeave:b,...o}),document.body)});Au.displayName="ContextMenuSubContent";var zu=j.forwardRef(({className:e,inset:t,disabled:r,onSelect:n,onClick:o,...a},s)=>{let{onOpenChange:i}=Ga(),l=c=>{if(r){c.preventDefault();return}o?.(c),n?.(),i(false);};return jsx("div",{ref:s,role:"menuitem",tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,className:u("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",t&&"pl-8",e),onClick:l,...a})});zu.displayName="ContextMenuItem";var Ou=j.forwardRef(({className:e,children:t,checked:r=false,onCheckedChange:n,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Ga(),c=d=>{if(o){d.preventDefault();return}a?.(d),n?.(!r),l(false);};return jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":r,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":r?"checked":"unchecked",className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:c,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r&&jsx(Check,{className:"h-4 w-4"})}),t]})});Ou.displayName="ContextMenuCheckboxItem";var Bu=j.forwardRef(({className:e,inset:t,...r},n)=>jsx("div",{ref:n,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...r}));Bu.displayName="ContextMenuSection";var Fu=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"separator",className:u("-mx-1 my-1 h-px bg-border",e),...t}));Fu.displayName="ContextMenuSeparator";var Ku=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ku.displayName="ContextMenuShortcut";var Gu=j.createContext(null),SR=()=>{let e=j.useContext(Gu);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},Uu=j.forwardRef(({className:e,value:t,defaultValue:r="",onValueChange:n,name:o,disabled:a,required:s,orientation:i="vertical",children:l,...c},d)=>{let[m,f]=j.useState(r),p=t!==void 0,g=p?t:m,h=j.useId(),b=v=>{p||f(v),n?.(v);};return jsx("div",{ref:d,role:"radiogroup","aria-required":s,"aria-orientation":i,className:u(i==="vertical"?"grid gap-2":"flex gap-4",e),...c,children:jsx(Gu.Provider,{value:{name:o||h,value:g,onValueChange:b,disabled:a,required:s},children:l})})});Uu.displayName="RadioGroup";var Wu=j.forwardRef(({className:e,value:t,disabled:r,...n},o)=>{let a=SR(),s=a.value===t,i=r||a.disabled;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"radio","aria-checked":s,disabled:i,ref:o,className:u("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer",e),onClick:()=>a.onValueChange(t),...n,children:s&&jsx("span",{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}),jsx("input",{type:"radio","aria-hidden":true,tabIndex:-1,name:a.name,value:t,checked:s,required:a.required,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});Wu.displayName="RadioGroupItem";var Wa=cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{solid:"bg-transparent hover:bg-muted data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",bordered:"border border-current bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",ghost:"bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",soft:"bg-transparent hover:bg-primary/10 data-[state=on]:bg-primary/15 data-[state=on]:text-primary",surface:"bg-muted/50 hover:bg-muted data-[state=on]:bg-muted data-[state=on]:text-foreground"},size:{sm:"h-9 px-2.5 min-w-9",md:"h-10 px-3 min-w-10",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"solid",size:"md"}}),ju=j.forwardRef(({className:e,variant:t,size:r,pressed:n,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,m]=j.useState(o),f=n!==void 0,p=f?n:d,g=()=>{if(s)return;let b=!p;f||m(b),a?.(b);},h=b=>{b.key==="Enter"&&b.preventDefault(),i?.(b);};return jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:c,className:u(Wa({variant:t,size:r,className:e})),onClick:g,onKeyDown:h,...l})});ju.displayName="Toggle";var _u=j.createContext(null),AR=()=>{let e=j.useContext(_u);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},Xu=j.forwardRef(({className:e,variant:t,size:r,type:n,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[m,f]=j.useState(()=>n==="single"?a?[a]:[]:a||[]),p=o!==void 0,g=p?n==="single"?o?[o]:[]:o:m,h=b=>{if(n==="single"){let v=g.includes(b)?[]:[b];p||f(v),s?.(v[0]||"");}else {let v=g.includes(b)?g.filter(w=>w!==b):[...g,b];p||f(v),s?.(v);}};return jsx("div",{ref:d,role:"group",className:u("flex items-center justify-center gap-1",e),...c,children:jsx(_u.Provider,{value:{type:n,variant:t,size:r,value:g,onValueChange:h,disabled:i},children:l})})});Xu.displayName="ToggleGroup";var Yu=j.forwardRef(({className:e,children:t,variant:r,size:n,value:o,disabled:a,...s},i)=>{let l=AR(),c=l.value.includes(o),d=a||l.disabled;return jsx("button",{type:"button",role:"radio","aria-checked":c,"aria-pressed":c,"data-state":c?"on":"off",disabled:d,ref:i,className:u(Wa({variant:l.variant||r,size:l.size||n}),e),onClick:()=>l.onValueChange(o),...s,children:t})});Yu.displayName="ToggleGroupItem";var _a=j.forwardRef(({className:e,value:t,defaultValue:r=[0],onValueChange:n,onValueCommit:o,min:a=0,max:s=100,step:i=1,disabled:l=false,orientation:c="horizontal",name:d,...m},f)=>{let[p,g]=j.useState(r),h=t!==void 0,b=h?t:p,v=j.useRef(null),[w,x]=j.useState(false),[R,C]=j.useState(null),y=(H,L)=>{if(!v.current)return b[0];let S=v.current.getBoundingClientRect(),V;c==="horizontal"?V=(H-S.left)/S.width:V=1-(L-S.top)/S.height,V=Math.max(0,Math.min(1,V));let A=a+V*(s-a),B=Math.round(A/i)*i;return Math.max(a,Math.min(s,B))},k=(H,L)=>{let S=[...b];S[L]=H,L>0&&H<b[L-1]&&(S[L]=b[L-1]),L<b.length-1&&H>b[L+1]&&(S[L]=b[L+1]),h||g(S),n?.(S);},T=(H,L)=>{l||(H.preventDefault(),x(true),C(L),H.target.setPointerCapture(H.pointerId));},N=H=>{if(!w||R===null||l)return;let L=y(H.clientX,H.clientY);k(L,R);},M=()=>{w&&(x(false),C(null),o?.(b));},P=H=>{if(l)return;let L=y(H.clientX,H.clientY),S=0,V=Math.abs(b[0]-L);for(let A=1;A<b.length;A++){let B=Math.abs(b[A]-L);B<V&&(V=B,S=A);}k(L,S),o?.([...b.slice(0,S),L,...b.slice(S+1)]);},E=(H,L)=>{if(l)return;let S=b[L];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),S=Math.min(s,b[L]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),S=Math.max(a,b[L]-i);break;case "Home":H.preventDefault(),S=a;break;case "End":H.preventDefault(),S=s;break;default:return}k(S,L),o?.([...b.slice(0,L),S,...b.slice(L+1)]);},D=H=>(H-a)/(s-a)*100;return jsxs("div",{ref:f,className:u("relative flex touch-none select-none items-center",c==="vertical"&&"flex-col h-full w-5",l&&"opacity-50 pointer-events-none",e),...m,children:[jsx("div",{ref:v,className:u("relative grow overflow-hidden rounded-full bg-secondary",c==="horizontal"?"h-2 w-full":"h-full w-2"),onClick:P,children:jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:b.length>1?`${D(b[0])}%`:0,right:`${100-D(b[b.length-1])}%`,top:0,bottom:0}:{bottom:b.length>1?`${D(b[0])}%`:0,top:`${100-D(b[b.length-1])}%`,left:0,right:0}})}),b.map((H,L)=>jsx("div",{role:"slider",tabIndex:l?-1:0,"aria-valuemin":a,"aria-valuemax":s,"aria-valuenow":H,"aria-orientation":c,"aria-disabled":l,className:u("absolute block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-grab",w&&R===L&&"cursor-grabbing"),style:c==="horizontal"?{left:`calc(${D(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${D(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:S=>T(S,L),onPointerMove:N,onPointerUp:M,onPointerCancel:M,onKeyDown:S=>E(S,L)},L)),d&&b.map((H,L)=>jsx("input",{type:"hidden",name:b.length>1?`${d}[${L}]`:d,value:H},L))]})});_a.displayName="Slider";var qu=j.createContext(null),Zu=()=>{let e=j.useContext(qu);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Oi=j.createContext(null),Qu=()=>{let e=j.useContext(Oi);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},Ju=j.forwardRef(({className:e,type:t="multiple",value:r,defaultValue:n,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,m]=j.useState(()=>t==="single"?n?[n]:[]:n||[]),f=j.useRef(new Map),p=j.useRef([]),g=r!==void 0,h=g?t==="single"?r?[r]:[]:r:d,b=R=>{if(t==="single"){let y=h.includes(R)&&a?[]:[R];g||m(y),o?.(y[0]||"");}else {let C=h.includes(R)?h.filter(y=>y!==R):[...h,R];g||m(C),o?.(C);}},v=j.useCallback((R,C)=>{f.current.set(R,C),p.current.includes(R)||p.current.push(R);},[]),w=j.useCallback(R=>{f.current.delete(R),p.current=p.current.filter(C=>C!==R);},[]),x=j.useCallback(R=>{let C=p.current;if(C.length===0)return;let y=document.activeElement,k;f.current.forEach((E,D)=>{E===y&&(k=D);});let T=k?C.indexOf(k):-1,N;switch(R){case "first":N=0;break;case "last":N=C.length-1;break;case "next":N=T===-1?0:(T+1)%C.length;break;case "prev":N=T===-1?C.length-1:(T-1+C.length)%C.length;break}let M=C[N];f.current.get(M)?.focus();},[]);return jsx(qu.Provider,{value:{type:t,value:h,onValueChange:b,collapsible:a,disabled:s,registerTrigger:v,unregisterTrigger:w,focusTrigger:x},children:jsx("div",{ref:c,"data-orientation":"vertical",className:u("w-full",e),...l,children:i})})});Ju.displayName="Accordion";var em=j.forwardRef(({className:e,value:t,disabled:r,title:n,subtitle:o,startContent:a,children:s,...i},l)=>{let c=Zu(),d=c.value.includes(t),m=r||c.disabled||false,f=j.useId(),p=j.useId();return n!==void 0?jsx(Oi.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsxs("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:[jsx(tm,{children:jsxs("div",{className:"flex items-center gap-3",children:[a,jsxs("div",{className:"flex flex-col items-start",children:[jsx("span",{className:"text-sm font-medium",children:n}),o&&jsx("span",{className:"text-xs text-muted-foreground",children:o})]})]})}),jsx(rm,{children:s})]})}):jsx(Oi.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsx("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:s})})});em.displayName="AccordionItem";var tm=j.forwardRef(({className:e,children:t,onClick:r,onKeyDown:n,...o},a)=>{let s=Zu(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:m}=Qu(),f=j.useRef(null);j.useEffect(()=>{let g=f.current;return g&&!c&&s.registerTrigger(i,g),()=>{s.unregisterTrigger(i);}},[i,c,s]);let p=g=>{switch(n?.(g),g.key){case "ArrowDown":g.preventDefault(),s.focusTrigger("next");break;case "ArrowUp":g.preventDefault(),s.focusTrigger("prev");break;case "Home":g.preventDefault(),s.focusTrigger("first");break;case "End":g.preventDefault(),s.focusTrigger("last");break}};return jsx("h3",{className:"flex",children:jsxs("button",{type:"button",ref:g=>{f.current=g,typeof a=="function"?a(g):a&&(a.current=g);},id:m,"aria-controls":d,"aria-expanded":l,disabled:c,"data-state":l?"open":"closed",className:u("flex flex-1 items-center justify-between py-4 font-medium transition-all text-left cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),onClick:g=>{r?.(g),s.onValueChange(i);},onKeyDown:p,...o,children:[t,jsx(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});tm.displayName="AccordionTrigger";var rm=j.forwardRef(({className:e,children:t,style:r,...n},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=Qu();return jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("grid transition-[grid-template-rows] duration-200 ease-out",a?"grid-rows-[1fr]":"grid-rows-[0fr]",e),style:r,...n,children:jsx("div",{className:"overflow-hidden",children:jsx("div",{className:"pb-4 pt-0 text-sm",children:t})})})});rm.displayName="AccordionContent";var om=j.createContext(null),am=()=>{let e=j.useContext(om);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},sm=j.forwardRef(({className:e,open:t,defaultOpen:r=false,onOpenChange:n,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=j.useState(r),m=t!==void 0,f=m?t:c,p=j.useId(),g=j.useId(),h=b=>{o||(m||d(b),n?.(b));};return jsx(om.Provider,{value:{open:f,onOpenChange:h,disabled:o,contentId:p,triggerId:g},children:jsxs("div",{ref:l,"data-state":f?"open":"closed","data-disabled":o?"":void 0,className:u("space-y-2",e),...i,children:[a&&jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsx("h4",{className:"text-sm font-semibold",children:a}),jsx(Bi,{})]}),s]})})});sm.displayName="Collapsible";var Bi=j.forwardRef(({className:e,children:t,onClick:r,...n},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=am();return jsx(ae,{ref:o,id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,variant:"light",size:"sm",isIconOnly:true,className:e,onClick:d=>{r?.(d),s(!a);},...n,children:t??jsx(ChevronsUpDown,{className:u("h-4 w-4 transition-transform duration-200",a&&"rotate-180")})})});Bi.displayName="CollapsibleTrigger";var im=j.forwardRef(({className:e,children:t,style:r,...n},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=am(),c=j.useRef(null),[d,m]=j.useState(0),[f,p]=j.useState(false),[g,h]=j.useState(a);j.useEffect(()=>{a?(h(true),m(0),p(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.current&&m(c.current.scrollHeight);});})):(p(true),c.current?(m(c.current.scrollHeight),requestAnimationFrame(()=>{m(0);})):m(0));},[a]);let b=()=>{p(false),a||h(false);};return g?jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("overflow-hidden",e),style:{...r,height:f?d:a?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:a?1:0},onTransitionEnd:b,...n,children:jsx("div",{ref:c,className:"space-y-2",children:t})}):null});im.displayName="CollapsibleContent";var qa=j.forwardRef(({className:e,value:t=0,max:r=100,label:n,showPercentage:o=false,formatPercentage:a=l=>`${Math.round(l)}%`,...s},i)=>{let l=Math.min(Math.max(t/r*100,0),100);return jsxs("div",{ref:i,className:"w-full",children:[(n||o)&&jsxs("div",{className:"flex justify-between text-sm mb-2",children:[n&&jsx("span",{className:"text-muted-foreground",children:n}),o&&jsx("span",{className:u("text-muted-foreground",!n&&"ml-auto"),children:a(l)})]}),jsx("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":r,"aria-label":typeof n=="string"?n:void 0,className:u("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...s,children:jsx("div",{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-l}%)`}})})]})});qa.displayName="Progress";var um=j.createContext(null),mm=()=>{let e=j.useContext(um);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},pm=({children:e,open:t,defaultOpen:r=false,onOpenChange:n,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=j.useState(r),c=t!==void 0,d=c?t:i,m=j.useRef(null),f=j.useId(),p=j.useRef(null),g=j.useRef(null),h=j.useCallback(b=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),b?p.current=setTimeout(()=>{c||l(true),n?.(true);},o):g.current=setTimeout(()=>{c||l(false),n?.(false);},a);},[c,n,o,a]);return j.useEffect(()=>{if(!s||!d)return;let b=()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),c||l(false),n?.(false);};return window.addEventListener("scroll",b,true),()=>window.removeEventListener("scroll",b,true)},[s,d,c,n]),j.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsx(um.Provider,{value:{open:d,onOpenChange:h,triggerRef:m,contentId:f},children:e})};pm.displayName="HoverCard";var fm=j.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:r,onFocus:n,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=mm();return jsx("a",{ref:p=>{l.current=p,typeof s=="function"?s(p):s&&(s.current=p);},onMouseEnter:p=>{t?.(p),i(true);},onMouseLeave:p=>{r?.(p),i(false);},onFocus:p=>{n?.(p),i(true);},onBlur:p=>{o?.(p),i(false);},...a,children:e})});fm.displayName="HoverCardTrigger";var gm=j.forwardRef(({className:e,side:t="bottom",sideOffset:r=4,align:n="center",alignOffset:o=0,onMouseEnter:a,onMouseLeave:s,children:i,...l},c)=>{let{open:d,onOpenChange:m,triggerRef:f,contentId:p}=mm(),[g,h]=j.useState({top:0,left:0}),[b,v]=j.useState(false),w=j.useRef(null);j.useEffect(()=>{v(true);},[]),j.useEffect(()=>{if(!d||!f.current||!w.current)return;(()=>{if(!f.current||!w.current)return;let k=f.current.getBoundingClientRect(),T=w.current.getBoundingClientRect(),N=0,M=0;switch(t){case "top":N=k.top-T.height-r;break;case "bottom":N=k.bottom+r;break;case "left":M=k.left-T.width-r;break;case "right":M=k.right+r;break}if(t==="top"||t==="bottom")switch(n){case "start":M=k.left+o;break;case "center":M=k.left+k.width/2-T.width/2;break;case "end":M=k.right-T.width-o;break}else switch(n){case "start":N=k.top+o;break;case "center":N=k.top+k.height/2-T.height/2;break;case "end":N=k.bottom-T.height-o;break}h({top:N,left:M});})();},[d,t,r,n,o,f]);let x=y=>{a?.(y),m(true);},R=y=>{s?.(y),m(false);};if(!b||!d)return null;let C={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return $a.createPortal(jsx("div",{ref:y=>{w.current=y,typeof c=="function"?c(y):c&&(c.current=y);},id:p,"data-state":d?"open":"closed","data-side":t,className:u("fixed z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:g.top,left:g.left},onMouseEnter:x,onMouseLeave:R,...l,children:i}),document.body)});gm.displayName="HoverCardContent";var bm=j.createContext({size:"md",variant:"default",radius:"md"}),Qa=()=>j.useContext(bm);cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var $R=cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),GR=cva("",{variants:{size:{sm:"[&>svg]:h-3 [&>svg]:w-3",md:"[&>svg]:h-3.5 [&>svg]:w-3.5",lg:"[&>svg]:h-4 [&>svg]:w-4"}},defaultVariants:{size:"md"}}),UR=cva("flex items-center justify-center",{variants:{size:{sm:"h-6 w-6 [&>svg]:h-3 [&>svg]:w-3",md:"h-8 w-8 [&>svg]:h-4 [&>svg]:w-4",lg:"h-10 w-10 [&>svg]:h-5 [&>svg]:w-5"}},defaultVariants:{size:"md"}}),vm=j.forwardRef(({size:e="md",variant:t="default",radius:r="md",children:n,...o},a)=>jsx(bm.Provider,{value:{size:e,variant:t,radius:r},children:jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:n})}));vm.displayName="Breadcrumb";var hm=j.forwardRef(({className:e,...t},r)=>{let{size:n,variant:o,radius:a}=Qa();return jsx("ol",{ref:r,className:u($R({size:n,variant:o,radius:o==="default"?void 0:a}),e),...t})});hm.displayName="BreadcrumbList";var xm=j.forwardRef(({className:e,...t},r)=>{let{size:n}=Qa();return jsx("li",{ref:r,className:u("inline-flex items-center",n==="sm"&&"gap-1",n==="md"&&"gap-1.5",n==="lg"&&"gap-2",e),...t})});xm.displayName="BreadcrumbItem";var ym=j.forwardRef(({className:e,...t},r)=>jsx("a",{ref:r,className:u("transition-colors hover:text-foreground cursor-pointer",e),...t}));ym.displayName="BreadcrumbLink";var Rm=j.forwardRef(({className:e,...t},r)=>jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:u("font-medium text-foreground",e),...t}));Rm.displayName="BreadcrumbPage";var wm=({children:e,className:t,...r})=>{let{size:n}=Qa();return jsx("li",{role:"presentation","aria-hidden":"true",className:u(GR({size:n}),"text-muted-foreground/60",t),...r,children:e??jsx(ChevronRight,{})})};wm.displayName="BreadcrumbSeparator";var Cm=({className:e,...t})=>{let{size:r}=Qa();return jsxs("span",{role:"presentation","aria-hidden":"true",className:u(UR({size:r}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};Cm.displayName="BreadcrumbEllipsis";var Nm=j.forwardRef(({ratio:e=1,className:t,style:r,children:n,...o},a)=>jsx("div",{ref:a,className:u("relative w-full",t),style:{...r,paddingBottom:`${100/e}%`},...o,children:jsx("div",{className:"absolute inset-0",children:n})}));Nm.displayName="AspectRatio";var Em=j.createContext(null),Ki=()=>{let e=j.useContext(Em);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},Lm=j.createContext(null),Sm=()=>{let e=j.useContext(Lm);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},Dm=j.forwardRef(({className:e,orientation:t="horizontal",children:r,...n},o)=>{let[a,s]=j.useState(null);return jsx(Em.Provider,{value:{activeItem:a,setActiveItem:s,orientation:t},children:jsxs("nav",{ref:o,className:u("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[r,jsx($i,{})]})})});Dm.displayName="NavigationMenu";var Hm=j.forwardRef(({className:e,...t},r)=>{let{orientation:n}=Ki();return jsx("ul",{ref:r,className:u("group flex flex-1 list-none items-center justify-center gap-1",n==="vertical"&&"flex-col items-start",e),...t})});Hm.displayName="NavigationMenuList";var Im=j.forwardRef(({className:e,children:t,...r},n)=>{let{activeItem:o,setActiveItem:a}=Ki(),s=j.useId(),i=j.useRef(null),l=o===s,c=j.useCallback(d=>{a(d?s:null);},[s,a]);return jsx(Lm.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsx("li",{ref:n,className:u("relative",e),...r,children:t})})});Im.displayName="NavigationMenuItem";var Vm=cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50"),Am=j.forwardRef(({className:e,children:t,onMouseEnter:r,onClick:n,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=Sm(),c=m=>{r?.(m),l(true);},d=m=>{n?.(m),l(!i);};return jsxs("button",{ref:m=>{s.current=m,typeof a=="function"?a(m):a&&(a.current=m);},type:"button","data-state":i?"open":"closed",className:u(Vm(),"group",e),onMouseEnter:c,onClick:d,"aria-expanded":i,...o,children:[t,jsx(ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})});Am.displayName="NavigationMenuTrigger";var zm=j.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:r,...n},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=Sm(),l=j.useRef(null),[c,d]=j.useState({top:0,left:0});j.useEffect(()=>{if(!a||!i.current)return;let p=()=>{if(!i.current)return;let g=i.current.getBoundingClientRect();d({top:g.bottom+4,left:g.left});};return p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[a,i]);let m=p=>{t?.(p),s(true);},f=p=>{r?.(p),s(false);};return a?$a.createPortal(jsx("div",{ref:p=>{l.current=p,typeof o=="function"?o(p):o&&(o.current=p);},"data-state":a?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-4 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:c.top,left:c.left},onMouseEnter:m,onMouseLeave:f,...n}),document.body):null});zm.displayName="NavigationMenuContent";var Om=cva("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"),Bm=j.forwardRef(({className:e,active:t,...r},n)=>jsx("a",{ref:n,className:u(Om(),t&&"bg-accent text-accent-foreground",e),...r}));Bm.displayName="NavigationMenuLink";var $i=j.forwardRef((e,t)=>null);$i.displayName="NavigationMenuViewport";var Fm=j.forwardRef(({className:e,...t},r)=>{let{activeItem:n}=Ki();return n?jsx("div",{ref:r,className:u("top-full z-[1] flex h-2.5 items-end justify-center overflow-hidden","data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}):null});Fm.displayName="NavigationMenuIndicator";var Ja=j.createContext(null);function JR(){let e=j.useContext(Ja);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function Xr(){return j.useContext(Ja)}var ew="16rem",tw="18rem",rw="3rem",nw="b",ow={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},aw={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},Gi=j.forwardRef(({defaultOpen:e=false,open:t,onOpenChange:r,placement:n="left",size:o="md",backdrop:a="opaque",isDismissable:s=true,hideCloseButton:i=false,collapsible:l="offcanvas",mode:c,className:d,style:m,children:f,...p},g)=>{let h=c??"overlay",b=h==="overlay",[v,w]=j.useState(false),[x,R]=j.useState(false),[C,y]=j.useState(e),k=t??C,T=j.useCallback(E=>{let D=typeof E=="function"?E(k):E;r?r(D):y(D);},[r,k]);j.useEffect(()=>{let E=()=>{w(window.innerWidth<768);};return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);let N=j.useCallback(()=>b?T(E=>!E):v?R(E=>!E):T(E=>!E),[v,T,R,b]);j.useEffect(()=>{if(b)return;let E=D=>{D.key===nw&&(D.metaKey||D.ctrlKey)&&(D.preventDefault(),N());};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[N,b]);let M=k?"expanded":"collapsed",P=j.useMemo(()=>({placement:n,state:M,open:k,setOpen:T,isMobile:v,openMobile:x,setOpenMobile:R,toggleDrawer:N,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[n,M,k,T,v,x,R,N,l,h,o,a,s,i]);return b?jsx(Ja.Provider,{value:P,children:jsx(Drawer.Root,{open:k,onOpenChange:T,direction:n,dismissible:s,children:f})}):jsx(Ja.Provider,{value:P,children:jsx($r,{delayDuration:0,children:jsx("div",{ref:g,style:{"--drawer-width":ew,"--drawer-width-icon":rw,...m},className:u("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});Gi.displayName="Drawer";var Gm=j.forwardRef(({variant:e="default",embedded:t=false,className:r,children:n,...o},a)=>{let s=Xr();if(!s)return jsx("div",{ref:a,className:u("flex h-full flex-col bg-background text-foreground",r),...o,children:n});let{placement:i,collapsible:l,isMobile:c,state:d,openMobile:m,setOpenMobile:f}=s;if(i==="bottom"||i==="top")return jsx(Fragment,{children:n});if(l==="none")return jsx("div",{ref:a,className:u("flex h-full w-[--drawer-width] flex-col bg-background text-foreground border-r",i==="right"&&"border-l border-r-0",r),...o,children:n});if(c&&!t)return jsx(sw,{open:m,onOpenChange:f,placement:i,children:n});if(t){let g=d==="collapsed",h=l==="offcanvas",b=l==="icon";return jsx("div",{ref:a,className:u("group peer text-foreground relative"),"data-state":d,"data-collapsible":g?l:"","data-variant":e,"data-placement":i,"data-embedded":"true",children:jsx("div",{className:u("flex h-full flex-col overflow-hidden transition-[width,opacity] duration-200 ease-out",h?g?"w-0 opacity-0":"w-[--drawer-width] opacity-100":b&&g?"w-[--drawer-width-icon]":"w-[--drawer-width]",r),...o,children:jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background transition-opacity duration-200",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border",e==="default"&&i==="left"&&"border-r",e==="default"&&i==="right"&&"border-l"),children:n})})})}return jsxs("div",{ref:a,className:"group peer hidden md:block text-foreground","data-state":d,"data-collapsible":d==="collapsed"?l:"","data-variant":e,"data-placement":i,children:[jsx("div",{className:u("duration-200 relative h-svh w-[--drawer-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0",i==="right"&&"group-data-[placement=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--drawer-width-icon]")}),jsx("div",{className:u("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--drawer-width] transition-[left,right,width] ease-linear md:flex",i==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--drawer-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--drawer-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--drawer-width-icon] group-data-[placement=left]:border-r group-data-[placement=right]:border-l",r),...o,children:jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border"),children:n})})]})});Gm.displayName="DrawerSidebar";var sw=({children:e,open:t,onOpenChange:r,placement:n})=>{let[o,a]=j.useState(false);return j.useEffect(()=>{a(true);},[]),j.useEffect(()=>{if(t)return Rt(),()=>wt()},[t]),!o||!t?null:$a.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>r(false)}),jsx("div",{className:u("fixed z-50 bg-background p-0 text-foreground shadow-lg","animate-in",n==="left"&&"inset-y-0 left-0 h-full w-[--drawer-width] slide-in-from-left",n==="right"&&"inset-y-0 right-0 h-full w-[--drawer-width] slide-in-from-right"),style:{"--drawer-width":tw},children:jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},Um=j.forwardRef(({className:e,onClick:t,...r},n)=>{let o=Xr();if(o?.mode==="overlay")return jsx(Drawer.Trigger,{ref:n,className:e,onClick:t,...r});let a=o?.toggleDrawer;return jsxs("button",{ref:n,type:"button","data-drawer":"trigger",className:u("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-accent transition-colors cursor-pointer",e),onClick:s=>{t?.(s),a?.();},...r,children:[jsx(PanelLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle Drawer"})]})});Um.displayName="DrawerTrigger";var Wm=j.forwardRef(({className:e,children:t,...r},n)=>{let o=Xr(),a=o?.mode==="overlay",s=o?.placement||"left",i=o?.size||"md",l=o?.backdrop||"opaque",c=o?.hideCloseButton||false;if(a){let d=s==="top"||s==="bottom",m=s==="left"||s==="right",f=m?ow[i]:aw[i],p={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},g={top:"inset-x-0 top-0 rounded-b-[10px]",bottom:"inset-x-0 bottom-0 rounded-t-[10px]",left:"inset-y-0 left-0 rounded-r-[10px]",right:"inset-y-0 right-0 rounded-l-[10px]"};return jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:u("fixed inset-0 z-50",p[l])}),jsxs(Drawer.Content,{ref:n,className:u("fixed z-50 flex flex-col border bg-background",g[s],e),style:{...m?{width:f,height:"100%"}:{},...d?{maxHeight:f}:{},...r.style},...r,children:[m&&!c&&jsx(Drawer.Close,{asChild:true,children:jsx(ct,{className:"absolute right-4 top-4 z-10"})}),d&&jsx("div",{className:u("mx-auto h-2 w-[100px] rounded-full bg-muted",s==="top"?"mb-4 mt-auto":"mt-4")}),t]})]})}return jsx("div",{ref:n,className:u("flex flex-col h-full",e),...r,children:t})});Wm.displayName="DrawerContent";var jm=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-drawer":"header",className:u("flex flex-col gap-2 p-4",e),...t}));jm.displayName="DrawerHeader";var _m=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-drawer":"body",className:u("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-4 group-data-[collapsible=icon]:overflow-hidden",e),...t}));_m.displayName="DrawerBody";var Xm=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-drawer":"footer",className:u("flex flex-col gap-2 p-4 mt-auto",e),...t}));Xm.displayName="DrawerFooter";var Ym=j.forwardRef(({className:e,...t},r)=>Xr()?.mode==="overlay"?jsx(Drawer.Title,{ref:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}):jsx("h2",{ref:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}));Ym.displayName="DrawerTitle";var qm=j.forwardRef(({className:e,...t},r)=>Xr()?.mode==="overlay"?jsx(Drawer.Description,{ref:r,className:u("text-sm text-muted-foreground",e),...t}):jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...t}));qm.displayName="DrawerDescription";var Zm=j.forwardRef(({className:e,onClick:t,...r},n)=>{let o=Xr();return o?.mode==="overlay"?jsx(Drawer.Close,{ref:n,className:e,onClick:t,...r}):jsx(ct,{ref:n,className:e,onClick:s=>{t?.(s),o?.setOpen(false);},...r})});Zm.displayName="DrawerClose";var Qm=j.forwardRef(({className:e,onClick:t,showLabel:r=true,...n},o)=>{let a=Xr();if(!a)return null;let{toggleDrawer:s,state:i,placement:l}=a,c=i==="collapsed",d=l==="left",m=d?PanelLeftOpen:PanelRightOpen,f=d?PanelLeftClose:PanelRightClose;return jsxs("button",{ref:o,type:"button","data-drawer":"toggle","data-state":i,className:u("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-muted-foreground","hover:bg-accent hover:text-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),onClick:p=>{t?.(p),s();},...n,children:[c?jsx(m,{className:"h-4 w-4 shrink-0"}):jsx(f,{className:"h-4 w-4 shrink-0"}),r&&jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:c?"Expand":"Collapse"})]})});Qm.displayName="DrawerToggle";var Jm=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-drawer":"separator",className:u("mx-4 h-px bg-border",e),...t}));Jm.displayName="DrawerSeparator";var ep=j.forwardRef(({className:e,...t},r)=>jsx("ul",{ref:r,"data-drawer":"menu",className:u("flex w-full min-w-0 flex-col gap-1",e),...t}));ep.displayName="DrawerMenu";var tp=j.forwardRef(({className:e,...t},r)=>jsx("li",{ref:r,"data-drawer":"menu-item",className:u("group/menu-item relative",e),...t}));tp.displayName="DrawerMenuItem";var rp=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-ring transition-[width,height,padding] hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 active:bg-accent active:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-accent data-[active=true]:font-medium data-[active=true]:text-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-accent hover:text-accent-foreground",bordered:"bg-background shadow-[0_0_0_1px_currentColor] hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent/50 hover:text-accent-foreground"},size:{sm:"h-7 text-xs",md:"h-8 text-sm",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"md"}}),np=j.forwardRef(({isActive:e=false,variant:t="default",size:r="md",tooltip:n,className:o,children:a,...s},i)=>{let l=Xr(),c=l?.isMobile??false,d=l?.state??"expanded",m=jsx("button",{ref:i,type:"button","data-drawer":"menu-button","data-size":r,"data-active":e,className:u(rp({variant:t,size:r}),o),...s,children:a});return n?jsxs(Gr,{children:[jsx(Ur,{children:m}),jsx(Wr,{side:"right",align:"center",hidden:d!=="collapsed"||c,...typeof n=="string"?{children:n}:n})]}):m});np.displayName="DrawerMenuButton";var op=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-drawer":"group",className:u("relative flex w-full min-w-0 flex-col p-2",e),...t}));op.displayName="DrawerGroup";var ap=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-drawer":"group-label",className:u("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-muted-foreground outline-none transition-[margin,opacity] ease-linear","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...t}));ap.displayName="DrawerGroupLabel";var sp=j.forwardRef(({className:e,...t},r)=>jsx("main",{ref:r,className:u("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));sp.displayName="DrawerInset";var iw=Gi;var lp=j.forwardRef(({className:e,...t},r)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:r,className:u("w-full caption-bottom text-sm",e),...t})}));lp.displayName="Table";var cp=j.forwardRef(({className:e,...t},r)=>jsx("thead",{ref:r,className:u("[&_tr]:border-b",e),...t}));cp.displayName="TableHeader";var dp=j.forwardRef(({className:e,...t},r)=>jsx("tbody",{ref:r,className:u("[&_tr:last-child]:border-0",e),...t}));dp.displayName="TableBody";var up=j.forwardRef(({className:e,...t},r)=>jsx("tfoot",{ref:r,className:u("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));up.displayName="TableFooter";var mp=j.forwardRef(({className:e,...t},r)=>jsx("tr",{ref:r,className:u("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));mp.displayName="TableRow";var pp=j.forwardRef(({className:e,...t},r)=>jsx("th",{ref:r,className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));pp.displayName="TableHead";var fp=j.forwardRef(({className:e,...t},r)=>jsx("td",{ref:r,className:u("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));fp.displayName="TableCell";var gp=j.forwardRef(({className:e,...t},r)=>jsx("caption",{ref:r,className:u("mt-4 text-sm text-muted-foreground",e),...t}));gp.displayName="TableCaption";function pw({className:e,data:t,columns:r,selectable:n=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(R,C)=>String(C),sortable:i=false,sortState:l,onSortChange:c,paginated:d=false,pageSizeOptions:m=[10,20,50],paginationState:f,onPaginationChange:p,emptyContent:g="No data",loading:h=false,striped:b=false,hoverable:v=true,...w},x){let[R,C]=j.useState(new Set),[y,k]=j.useState({columnId:null,direction:null}),[T,N]=j.useState({pageIndex:0,pageSize:m[0]||10}),M=o??R,P=l??y,E=f??T,D=$=>{a?a($):C($);},H=$=>{c?c($):k($);},L=$=>{p?p($):N($);},S=j.useMemo(()=>{if(!P.columnId||!P.direction)return t;let $=r.find(O=>O.id===P.columnId);return $?[...t].sort((O,W)=>{let z=$.accessor(O),_=$.accessor(W);if(z===_)return 0;if(z==null)return 1;if(_==null)return -1;let Q=String(z).localeCompare(String(_),void 0,{numeric:true});return P.direction==="asc"?Q:-Q}):t},[t,P,r]),V=j.useMemo(()=>{if(!d)return S;let $=E.pageIndex*E.pageSize;return S.slice($,$+E.pageSize)},[S,d,E]),A=Math.ceil(S.length/E.pageSize),B=$=>{if($===true){let O=new Set(V.map((W,z)=>s(W,z)));D(O);}else D(new Set);},I=($,O)=>{let W=new Set(M);O?W.add($):W.delete($),D(W);},F=V.length>0&&V.every(($,O)=>M.has(s($,O))),K=V.some(($,O)=>M.has(s($,O))),Y=$=>{if(!r.find(z=>z.id===$)?.sortable&&!i)return;let W="asc";P.columnId===$&&(P.direction==="asc"?W="desc":P.direction==="desc"&&(W=null)),H({columnId:W?$:null,direction:W});},te=$=>P.columnId!==$?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):P.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:x,className:u("w-full",e),...w,children:[jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxs("tr",{children:[n&&jsx("th",{className:"h-12 w-12 px-4",children:jsx(zo,{checked:F?true:K?"indeterminate":false,onCheckedChange:B,"aria-label":"Select all"})}),r.map($=>{let O=$.sortable??i;return jsx("th",{className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground",O&&"cursor-pointer select-none hover:text-foreground"),style:{width:$.width},onClick:()=>O&&Y($.id),children:jsxs("div",{className:"flex items-center gap-2",children:[$.header,O&&te($.id)]})},$.id)})]})}),jsx("tbody",{className:"[&_tr:last-child]:border-0",children:h?jsx("tr",{children:jsx("td",{colSpan:r.length+(n?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):V.length===0?jsx("tr",{children:jsx("td",{colSpan:r.length+(n?1:0),className:"h-24 text-center text-muted-foreground",children:g})}):V.map(($,O)=>{let W=s($,O),z=M.has(W);return jsxs("tr",{className:u("border-b transition-colors",v&&"hover:bg-muted/50",b&&O%2===1&&"bg-muted/30",z&&"bg-muted"),"data-state":z?"selected":void 0,children:[n&&jsx("td",{className:"w-12 px-4",children:jsx(zo,{checked:z,onCheckedChange:_=>I(W,!!_),"aria-label":`Select row ${O+1}`})}),r.map(_=>jsx("td",{className:"p-4 align-middle",children:_.cell?_.cell($,O):_.accessor($)},_.id))]},W)})})]})}),d&&jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsx("span",{children:"Rows per page:"}),jsx("select",{value:E.pageSize,onChange:$=>L({pageIndex:0,pageSize:Number($.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:m.map($=>jsx("option",{value:$,children:$},$))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",E.pageIndex+1," of ",A||1]}),jsxs("div",{className:"flex gap-1",children:[jsx(ae,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>L({...E,pageIndex:E.pageIndex-1}),disabled:E.pageIndex===0,"aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>L({...E,pageIndex:E.pageIndex+1}),disabled:E.pageIndex>=A-1,"aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var fw=j.forwardRef(pw);var Ui=["January","February","March","April","May","June","July","August","September","October","November","December"];function Rw({currentMonth:e,onMonthChange:t,startYear:r,endYear:n}){let o=getMonth(e),a=getYear(e),s=c=>{let d=setMonth(e,c);t(d);},i=c=>{let d=setYear(e,c);t(d);},l=j.useMemo(()=>{let c=[];for(let d=n;d>=r;d--)c.push(d);return c},[r,n]);return jsxs("div",{className:"flex items-center gap-1",children:[jsxs(br,{children:[jsx(vr,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{className:"truncate",children:Ui[o]}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(hr,{className:"min-w-[120px] p-0",children:jsx(De,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:Ui.map((c,d)=>jsx($t,{onSelect:()=>s(d),className:u("text-xs",o===d&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]}),jsxs(br,{children:[jsx(vr,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[60px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{children:a}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(hr,{className:"min-w-[80px] p-0",children:jsx(De,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:l.map(c=>jsx($t,{onSelect:()=>i(c),className:u("text-xs",a===c&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]})]})}function ww(e,t,r){return function({calendarMonth:o}){let{goToMonth:a,nextMonth:s,previousMonth:i}=useDayPicker();if(e)return jsxs("div",{className:"flex items-center justify-between gap-1 mb-2",children:[jsx(Rw,{currentMonth:o.date,onMonthChange:a,startYear:t,endYear:r}),jsxs("div",{className:"flex items-center",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-6 w-6 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsx(ChevronLeft,{className:"h-3.5 w-3.5"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-6 w-6 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-3.5 w-3.5"})})]})]});let l=Ui[o.date.getMonth()],c=o.date.getFullYear();return jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-sm font-medium w-[90px]",children:l}),jsx("span",{className:"text-sm font-medium w-[50px]",children:c})]}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})}}function Yr({className:e,classNames:t,showOutsideDays:r=true,showMonthAndYearPickers:n=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=j.useMemo(()=>ww(n,o,a),[n,o,a]);return jsx(DayPicker,{showOutsideDays:r,className:u("p-4",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-2",month_caption:"sr-only",nav:"hidden",month_grid:"w-full border-collapse",weekdays:"flex",weekday:"text-muted-foreground w-8 font-normal text-xs text-center",week:"flex w-full mt-0.5",day:u("relative h-8 w-8 p-0 text-center text-sm","flex items-center justify-center","focus-within:relative focus-within:z-20","[&:has([aria-selected]:not(.outside-day))]:bg-accent","first:[&:has([aria-selected]:not(.outside-day))]:rounded-l-md","last:[&:has([aria-selected]:not(.outside-day))]:rounded-r-md"),day_button:u("size-8 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:u("bg-primary text-primary-foreground rounded-md","hover:bg-primary/90 hover:!text-primary-foreground","focus:bg-primary focus:text-primary-foreground","[&.outside-day]:!bg-transparent [&.outside-day]:!text-muted-foreground/50"),today:"bg-accent text-accent-foreground rounded-md",outside:"outside-day text-muted-foreground/50 !bg-transparent",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none bg-muted text-foreground",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0}},components:{...s,MonthCaption:l},...i})}Yr.displayName="Calendar";var xp=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:u("mx-auto flex w-full justify-center",e),...t});xp.displayName="Pagination";var yp=j.forwardRef(({className:e,...t},r)=>jsx("ul",{ref:r,className:u("flex flex-row items-center gap-1",e),...t}));yp.displayName="PaginationContent";var Rp=j.forwardRef(({className:e,...t},r)=>jsx("li",{ref:r,className:u("",e),...t}));Rp.displayName="PaginationItem";var es=({className:e,isActive:t,size:r="icon",...n})=>jsx("a",{"aria-current":t?"page":void 0,className:u(Yn({variant:t?"solid":"light",size:r}),e),...n});es.displayName="PaginationLink";var wp=({className:e,...t})=>jsxs(es,{"aria-label":"Go to previous page",size:"md",className:u("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});wp.displayName="PaginationPrevious";var Cp=({className:e,...t})=>jsxs(es,{"aria-label":"Go to next page",size:"md",className:u("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});Cp.displayName="PaginationNext";var Tp=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:u("flex h-9 w-9 items-center justify-center",e),...t,children:[jsx(MoreHorizontal,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"More pages"})]});Tp.displayName="PaginationEllipsis";var Xi=j.forwardRef(({className:e,...t},r)=>jsx(Command,{ref:r,className:u("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Xi.displayName=Command.displayName;var kw=({children:e,...t})=>jsx(La,{...t,children:jsx(Sa,{className:"overflow-hidden p-0 shadow-lg",children:jsx(Xi,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Mp=j.forwardRef(({className:e,...t},r)=>jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsx(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsx(Command.Input,{ref:r,className:u("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Mp.displayName=Command.Input.displayName;var Np=j.forwardRef(({className:e,children:t,...r},n)=>jsx(De,{className:"max-h-[300px]",children:jsx(Command.List,{ref:n,className:u("overflow-hidden",e),...r,children:t})}));Np.displayName=Command.List.displayName;var kp=j.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));kp.displayName=Command.Empty.displayName;var Pp=j.forwardRef(({className:e,...t},r)=>jsx(Command.Group,{ref:r,className:u("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Pp.displayName=Command.Group.displayName;var Ep=j.forwardRef(({className:e,...t},r)=>jsx(Command.Separator,{ref:r,className:u("-mx-1 h-px bg-border",e),...t}));Ep.displayName=Command.Separator.displayName;var Lp=j.forwardRef(({className:e,children:t,startContent:r,endContent:n,...o},a)=>jsxs(Command.Item,{ref:a,className:u("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...o,children:[r,t&&jsx("span",{className:"flex-1",children:t}),n]}));Lp.displayName=Command.Item.displayName;var Sp=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Sp.displayName="CommandShortcut";var Hp=j.forwardRef(({className:e,showToggle:t=true,disabled:r,onFocus:n,onBlur:o,style:a,...s},i)=>{let[l,c]=j.useState(false),[d,m]=j.useState(false);return jsxs("div",{className:"relative",children:[jsx("input",{type:l?"text":"password",className:u("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:i,disabled:r,style:{...a,borderColor:d?"var(--color-foreground)":void 0},onFocus:f=>{m(true),n?.(f);},onBlur:f=>{m(false),o?.(f);},...s}),t&&jsx("button",{type:"button",className:"absolute right-0 top-0 h-10 w-10 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>c(!l),disabled:r,tabIndex:-1,"aria-label":l?"Hide password":"Show password",children:l?jsx(EyeOff,{className:"h-4 w-4"}):jsx(Eye,{className:"h-4 w-4"})})]})});Hp.displayName="PasswordInput";var Ip=j.forwardRef(({className:e,showButtons:t=true,step:r=1,min:n,max:o,value:a,defaultValue:s,onChange:i,disabled:l,...c},d)=>{let[m,f]=j.useState(s),[p,g]=j.useState(false),h=a!==void 0,b=h?a:m,v=T=>{T!==void 0&&(n!==void 0&&T<n&&(T=n),o!==void 0&&T>o&&(T=o)),h||f(T),i?.(T);},w=()=>{v((b??0)+r);},x=()=>{v((b??0)-r);},R=T=>{let N=T.target.value;if(N==="")v(void 0);else {let M=parseFloat(N);isNaN(M)||v(M);}},C=T=>{T.key==="ArrowUp"?(T.preventDefault(),w()):T.key==="ArrowDown"&&(T.preventDefault(),x());},y=n===void 0||(b??0)>n,k=o===void 0||(b??0)<o;return t?jsxs("div",{className:u("relative flex items-center rounded-md border transition-colors",p?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:x,disabled:l||!y,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:"h-4 w-4"})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:"min-w-0 flex-1 h-10 bg-background text-sm text-center focus:outline-none disabled:cursor-not-allowed",ref:d,value:b??"",onChange:R,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c}),jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:w,disabled:l||!k,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:"h-4 w-4"})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("flex h-10 w-full bg-background px-3 py-2 text-sm text-center border rounded-md placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",p?"border-foreground":"border-input",e),ref:d,value:b??"",onChange:R,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c})});Ip.displayName="NumberInput";var Ap=j.forwardRef(({value:e,defaultValue:t,onValueChange:r,placeholder:n="Pick a date",dateFormat:o="PPP",disabled:a=false,minDate:s,maxDate:i,className:l},c)=>{let[d,m]=j.useState(false),[f,p]=j.useState(t),g=e!==void 0,h=g?e:f,b=v=>{g||p(v),r?.(v),m(false);};return jsxs(_e,{open:d,onOpenChange:m,children:[jsxs(Dt,{ref:c,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!h&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",l),children:[jsx(Calendar,{className:"h-4 w-4"}),h?format(h,o):n]}),jsx(Xe,{className:"w-auto p-0",align:"start",children:jsx(Yr,{mode:"single",selected:h,onSelect:b,disabled:v=>!!(s&&v<s||i&&v>i),initialFocus:true})})]})});Ap.displayName="DatePicker";var Fp=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),zp=cva("border-2 border-background ring-0 cursor-pointer transition-transform duration-200 hover:-translate-y-1",{variants:{size:{sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{size:"md"}}),Kp=j.forwardRef(({className:e,items:t,max:r=5,size:n,showTooltips:o=false,...a},s)=>{let i=t.slice(0,r),l=t.length-r,c=(m,f)=>{let p=jsxs(wn,{className:u(zp({size:n})),children:[m.src&&jsx(Jn,{src:m.src,alt:m.alt||""}),jsx(Cn,{className:"text-xs",children:m.fallback||m.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&m.alt?jsxs(Gr,{children:[jsx(Ur,{children:p}),jsx(Wr,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:m.alt})]},f):p},d=jsxs("div",{ref:s,className:u(Fp({size:n,className:e})),...a,children:[i.map((m,f)=>c(m,f)),l>0&&jsx(wn,{className:u(zp({size:n})),children:jsxs(Cn,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsx($r,{delayDuration:300,children:d}):d});Kp.displayName="AvatarGroup";var $p=cva("flex gap-0.5",{variants:{size:{sm:"[&_svg]:h-4 [&_svg]:w-4",md:"[&_svg]:h-5 [&_svg]:w-5",lg:"[&_svg]:h-6 [&_svg]:w-6"}},defaultVariants:{size:"md"}}),Gp=j.forwardRef(({className:e,value:t,defaultValue:r=0,onValueChange:n,max:o=5,size:a,icon:s="star",allowHalf:i=false,readOnly:l=false,disabled:c=false,filledColor:d,emptyColor:m,...f},p)=>{let[g,h]=j.useState(r),[b,v]=j.useState(null),w=t!==void 0,x=w?t:g,R=b!==null?b:x,C=D=>{l||c||(w||h(D),n?.(D));},y=(D,H=false)=>{let L=i&&H?D+.5:D+1;C(L);},k=(D,H)=>{if(l||c)return;let L=D.currentTarget.getBoundingClientRect(),S=i&&D.clientX<L.left+L.width/2;v(S?H+.5:H+1);},T=()=>{v(null);},N=s==="heart"?Heart:Star,M=D=>R>=D+1?"full":R>=D+.5?"half":"empty",P=d?{color:d,fill:d}:{},E=m?{color:m}:{};return jsx("div",{ref:p,className:u($p({size:a,className:e}),c&&"opacity-50 cursor-not-allowed"),onMouseLeave:T,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:o},(D,H)=>{let L=M(H);return jsxs("button",{type:"button",className:u("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!l&&!c&&"cursor-pointer hover:scale-110 transition-transform"),onClick:S=>{let V=S.currentTarget.getBoundingClientRect(),A=i&&S.clientX<V.left+V.width/2;y(H,A);},onMouseMove:S=>k(S,H),disabled:c||l,"aria-label":`Rate ${H+1} out of ${o}`,role:"radio","aria-checked":x===H+1,children:[jsx(N,{className:u("text-muted-foreground/30",L!=="empty"&&"absolute inset-0"),style:L==="empty"?E:void 0}),L!=="empty"&&jsx(N,{className:u("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",L==="half"&&"clip-path-half"),style:{...P,clipPath:L==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});Gp.displayName="Rating";var Wp=cva("inline-flex items-center justify-center gap-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-default",{variants:{variant:{solid:"border-transparent text-primary-foreground",bordered:"border bg-transparent",ghost:"border-transparent bg-transparent",soft:"border-transparent",surface:"border-transparent bg-muted text-muted-foreground"},color:{primary:"",secondary:"",success:"",warning:"",danger:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:hover:bg-green-600"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:hover:bg-red-600"},{variant:"bordered",color:"primary",className:"text-primary !border-primary hover:bg-primary/10"},{variant:"bordered",color:"secondary",className:"text-secondary-foreground !border-secondary hover:bg-secondary/10"},{variant:"bordered",color:"success",className:"text-green-600 !border-green-600 hover:bg-green-600/10 dark:text-green-500 dark:!border-green-500"},{variant:"bordered",color:"warning",className:"text-amber-600 !border-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:!border-amber-500"},{variant:"bordered",color:"danger",className:"text-red-600 !border-red-600 hover:bg-red-600/10 dark:text-red-500 dark:!border-red-500"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-green-600/15 text-green-600 hover:bg-green-600/20 dark:bg-green-500/15 dark:text-green-500 dark:hover:bg-green-500/20"},{variant:"soft",color:"warning",className:"bg-amber-600/15 text-amber-600 hover:bg-amber-600/20 dark:bg-amber-500/15 dark:text-amber-500 dark:hover:bg-amber-500/20"},{variant:"soft",color:"danger",className:"bg-red-600/15 text-red-600 hover:bg-red-600/20 dark:bg-red-500/15 dark:text-red-500 dark:hover:bg-red-500/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),Kw={sm:"sm",md:"sm",lg:"sm"},jp=j.forwardRef(({className:e,variant:t,color:r,size:n,radius:o,clickable:a,startContent:s,endContent:i,closable:l,onClose:c,disabled:d,children:m,onClick:f,...p},g)=>{let h=a||!!f,b=v=>{v.stopPropagation(),c?.();};return jsxs("div",{ref:g,role:h?"button":void 0,tabIndex:h&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:f,onKeyDown:h&&!d?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),f?.(v));}:void 0,className:u(Wp({variant:t,color:r,size:n,radius:o,clickable:h}),d&&"opacity-50 cursor-not-allowed",e),...p,children:[s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:m}),i&&jsx("span",{className:"shrink-0",children:i}),l&&jsx(ct,{size:Kw[n??"md"],onClick:b,disabled:d,className:"ml-0.5 h-4 w-4"})]})});jp.displayName="Chip";var _p=createContext({direction:"horizontal"}),Yw=({className:e,direction:t="horizontal",children:r,...n})=>jsx(_p.Provider,{value:{direction:t},children:jsx(Group,{orientation:t,className:u("flex h-full w-full data-[orientation=vertical]:flex-col",e),...n,children:r})}),qw=Panel,Zw=({withHandle:e,className:t,...r})=>{let{direction:n}=useContext(_p),o=n==="vertical";return jsx(Separator,{className:u("relative flex shrink-0 items-center justify-center bg-border outline-none",o?"h-px w-full after:absolute after:inset-x-0 after:top-1/2 after:h-1 after:-translate-y-1/2":"w-px after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2",t),...r,children:e&&jsx("div",{className:u("z-10 flex items-center justify-center rounded-sm border bg-border",o?"h-3 w-4 rotate-90":"h-4 w-3"),children:jsx(GripVertical,{className:"h-2.5 w-2.5"})})})};var Zp=cva("relative inline-flex items-center justify-center",{variants:{size:{sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-24 w-24"},color:{default:"",primary:"",success:"",warning:"",danger:""}},defaultVariants:{size:"md",color:"default"}}),Jw={sm:{size:32,strokeWidth:3,fontSize:"text-[10px]"},md:{size:48,strokeWidth:4,fontSize:"text-xs"},lg:{size:64,strokeWidth:5,fontSize:"text-sm"},xl:{size:96,strokeWidth:6,fontSize:"text-base"}},Xp={default:"var(--color-foreground, #18181b)",primary:"var(--color-primary, #18181b)",success:"var(--color-success, #16a34a)",warning:"var(--color-warning, #d97706)",danger:"var(--color-danger, #dc2626)"},Qp=j.forwardRef(({className:e,size:t="md",color:r="default",value:n,max:o=100,showValue:a=false,formatValue:s=d=>`${Math.round(d)}%`,trackClassName:i,...l},c)=>{let d=Math.min(100,Math.max(0,n/o*100)),m=Jw[t],f=(m.size-m.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxs("div",{ref:c,className:u(Zp({size:t,color:r}),e),role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":o,...l,children:[jsxs("svg",{width:m.size,height:m.size,viewBox:`0 0 ${m.size} ${m.size}`,fill:"none",children:[jsx("circle",{className:u("stroke-muted",i),cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none"}),jsx("circle",{cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none",strokeLinecap:"round",stroke:Xp[r]||Xp.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:g,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),a&&jsx("span",{className:u("absolute font-medium text-foreground",m.fontSize),children:s(d)})]})});Qp.displayName="CircularProgress";var Jp=j.createContext(null),rC=()=>{let e=j.useContext(Jp);if(!e)throw new Error("OTP components must be used within InputOTP");return e},ef=cva("flex items-center gap-2 has-[:disabled]:opacity-50",{variants:{size:{sm:"[&_[data-otp-slot]]:h-8 [&_[data-otp-slot]]:w-8 [&_[data-otp-slot]]:text-xs",md:"[&_[data-otp-slot]]:h-10 [&_[data-otp-slot]]:w-10 [&_[data-otp-slot]]:text-sm",lg:"[&_[data-otp-slot]]:h-12 [&_[data-otp-slot]]:w-12 [&_[data-otp-slot]]:text-base"}},defaultVariants:{size:"md"}}),tf=j.forwardRef(({className:e,containerClassName:t,maxLength:r,value:n,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,children:d,...m},f)=>{let[p,g]=j.useState(o),[h,b]=j.useState(0),[v,w]=j.useState(false),x=j.useRef(null),R=n!==void 0?n:p;j.useImperativeHandle(f,()=>x.current),j.useEffect(()=>{b(Math.min(R.length,r-1));},[R,r]),j.useEffect(()=>{R.length===r&&s&&s(R);},[R,r,s]);let C=P=>{let E=P.target.value;if(i&&E){let D=new RegExp(i.replace("^","").replace("$","").replace("+",""));E=E.split("").filter(H=>D.test(H)).join("");}E=E.slice(0,r),n===void 0&&g(E),a?.(E);},y=P=>{P.key==="ArrowLeft"?b(E=>Math.max(0,E-1)):P.key==="ArrowRight"&&b(E=>Math.min(R.length,r-1,E+1));},k=()=>{x.current?.focus();},T=()=>{w(true),b(Math.min(R.length,r-1));},N=()=>{w(false);},M={value:R,activeIndex:v?h:-1,maxLength:r,disabled:l};return jsx(Jp.Provider,{value:M,children:jsxs("div",{className:u(ef({size:c}),t),onClick:k,"data-otp-container":true,children:[jsx("input",{ref:x,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:R,onChange:C,onKeyDown:y,onFocus:T,onBlur:N,disabled:l,maxLength:r,className:u("absolute opacity-0 pointer-events-none w-0 h-0",e),...m}),d]})})});tf.displayName="InputOTP";var rf=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex items-center",e),...t}));rf.displayName="InputOTPGroup";var nf=j.forwardRef(({index:e,className:t,...r},n)=>{let{value:o,activeIndex:a,disabled:s}=rC(),i=o[e]||"",l=a===e,c=l&&o.length===e;return jsxs("div",{ref:n,"data-otp-slot":true,"data-active":l,"data-filled":!!i,className:u("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:rounded-l-md first:border-l last:rounded-r-md",l&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...r,children:[i,c&&jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});nf.displayName="InputOTPSlot";var of=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"separator",className:u("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));of.displayName="InputOTPSeparator";var lf=cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-600",light:"bg-transparent text-zinc-800 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800",flat:"bg-zinc-100 text-zinc-800 dark:bg-zinc-800 dark:text-white",ghost:"border-2 border-zinc-800 bg-transparent dark:border-white"},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-2.5 text-xs",lg:"h-7 px-3 text-sm"}},defaultVariants:{variant:"flat",size:"md"}}),cf=j.forwardRef(({className:e,variant:t,size:r,value:n=[],onChange:o,placeholder:a="Add tag...",maxTags:s,minTagLength:i=1,maxTagLength:l=50,triggerKeys:c=["Enter",",","Tab"],allowDuplicates:d=false,disabled:m,readOnly:f,renderTag:p,...g},h)=>{let[b,v]=j.useState(""),w=j.useRef(null);j.useImperativeHandle(h,()=>w.current);let x=M=>{let P=M.trim();if(P.length<i||P.length>l||s&&n.length>=s||!d&&n.some(D=>D.text.toLowerCase()===P.toLowerCase()))return;let E={id:crypto.randomUUID(),text:P};o?.([...n,E]),v("");},R=M=>{m||f||o?.(n.filter(P=>P.id!==M));},C=M=>{if(c.includes(M.key)){if(M.key==="Tab"&&!b)return;M.preventDefault(),x(b);}M.key==="Backspace"&&!b&&n.length>0&&R(n[n.length-1].id);},y=M=>{let P=M.target.value;if(P.includes(",")){P.split(",").forEach(D=>{D.trim()&&x(D);});return}v(P);},k=M=>{M.preventDefault(),M.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(D=>{x(D);});},T=()=>{w.current?.focus();},N=s?n.length>=s:false;return jsxs("div",{className:u("flex min-h-10 w-full flex-wrap gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",m&&"cursor-not-allowed opacity-50",e),onClick:T,children:[n.map(M=>p?p(M,()=>R(M.id)):jsxs("span",{className:u(lf({variant:t,size:r})),children:[M.text,!m&&!f&&jsx("button",{type:"button",onClick:P=>{P.stopPropagation(),R(M.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${M.text}`,children:jsx(X,{className:"h-3 w-3"})})]},M.id)),!N&&!f&&jsx("input",{ref:w,type:"text",value:b,onChange:y,onKeyDown:C,onPaste:k,placeholder:n.length===0?a:"",disabled:m,className:u("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...g})]})});cf.displayName="TagInput";var uf=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-2 py-6",md:"gap-3 py-10",lg:"gap-4 py-16"}},defaultVariants:{size:"md"}}),mf=j.forwardRef(({className:e,size:t,icon:r,title:n,description:o,action:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u(uf({size:t,className:e})),...i,children:[r&&jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:r}),n&&jsx("h3",{className:"text-lg font-semibold text-foreground",children:n}),o&&jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:o}),a&&jsx("div",{className:"mt-2",children:a}),s]}));mf.displayName="EmptyState";var ff=cva("border p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-zinc-800 text-white border-zinc-800 dark:bg-zinc-200 dark:text-zinc-900 dark:border-zinc-200",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent border-transparent shadow-none",flat:"bg-zinc-100 border-transparent dark:bg-zinc-800",ghost:"border-2 border-zinc-900 bg-transparent dark:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),gf=j.forwardRef(({className:e,variant:t,radius:r,label:n,value:o,icon:a,trend:s,trendValue:i,description:l,...c},d)=>{let m=s==="up"?TrendingUp:s==="down"?TrendingDown:Minus,f=s==="up"?"text-green-500":s==="down"?"text-red-500":"text-muted-foreground";return jsxs("div",{ref:d,className:u(ff({variant:t,radius:r,className:e})),...c,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:u("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:n}),a&&jsx("div",{className:u("[&>svg]:h-4 [&>svg]:w-4",t==="solid"?"opacity-80":"text-muted-foreground"),children:a})]}),jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsx("p",{className:"text-2xl font-bold",children:o}),s&&i&&jsxs("span",{className:u("flex items-center gap-0.5 text-sm",f),children:[jsx(m,{className:"h-3 w-3"}),i]})]}),l&&jsx("p",{className:u("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:l})]})});gf.displayName="StatCard";var Ji=cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",striped:"gap-2 [&>*:nth-child(odd)]:bg-muted/50",filled:"gap-2 bg-muted/30 rounded-lg p-2"},size:{sm:"[&>*]:py-2 [&>*]:px-3",md:"[&>*]:py-3 [&>*]:px-4",lg:"[&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),pC=({checked:e,disabled:t,onClick:r})=>jsx("button",{type:"button",role:"checkbox","aria-checked":e,disabled:t,onClick:n=>{n.stopPropagation(),t||r(n);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e&&"bg-primary text-primary-foreground",t&&"cursor-not-allowed opacity-50"),children:e&&jsx("span",{className:"flex items-center justify-center text-current",children:jsx(Check,{className:"h-3 w-3"})})});function fC({className:e,variant:t,size:r,items:n,renderItem:o,draggable:a=false,onReorder:s,showHandle:i=true,dragIcon:l,selectable:c=false,multiple:d=false,selectedKeys:m,defaultSelectedKeys:f=[],onSelect:p,checkable:g=false,checkedKeys:h,defaultCheckedKeys:b=[],onCheck:v,children:w,...x},R){let[C,y]=j.useState(null),[k,T]=j.useState(null),[N,M]=j.useState(new Set(f)),P=m!==void 0,E=P?new Set(m):N,[D,H]=j.useState(new Set(b)),L=h!==void 0,S=L?new Set(h):D,V=(O,W)=>{y(W),O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",String(W));},A=(O,W)=>{O.preventDefault(),!(C===null||C===W)&&T(W);},B=()=>{T(null);},I=(O,W)=>{if(O.preventDefault(),!n||C===null||C===W){y(null),T(null);return}let z=[...n],[_]=z.splice(C,1);z.splice(W,0,_),s?.(z),y(null),T(null);},F=()=>{y(null),T(null);},K=j.useCallback((O,W)=>{if(!n)return;let z=new Set(E),_=!z.has(O.id);d?_?z.add(O.id):z.delete(O.id):(z.clear(),_&&z.add(O.id)),P||M(z);let Q=n.filter(ue=>z.has(ue.id));p?.(Array.from(z),{selected:_,selectedItems:Q,item:O,event:W});},[n,E,d,P,p]),Y=j.useCallback((O,W)=>{if(!n)return;let z=new Set(S),_=!z.has(O.id);_?z.add(O.id):z.delete(O.id),L||H(z);let Q=n.filter(ue=>z.has(ue.id));v?.(Array.from(z),{checked:_,checkedItems:Q,item:O,event:W});},[n,S,L,v]);return (a||c||g)&&n&&o?jsx("div",{ref:R,role:"list",className:u(Ji({variant:t,size:r,className:e})),...x,children:n.map((O,W)=>{let z=E.has(O.id),_=S.has(O.id);return jsxs("div",{role:"listitem","aria-selected":c?z:void 0,draggable:a,onDragStart:a?U=>V(U,W):void 0,onDragOver:a?U=>A(U,W):void 0,onDragLeave:a?B:void 0,onDrop:a?U=>I(U,W):void 0,onDragEnd:a?F:void 0,onClick:c&&!g?U=>K(O,U):void 0,className:u("flex items-center gap-3 transition-all",a&&"cursor-move",c&&!g&&"cursor-pointer hover:bg-muted/50",g&&"cursor-pointer hover:bg-muted/50",C===W&&"opacity-50 scale-[1.02] z-10",k===W&&"border-primary border-dashed border rounded-md",z&&c&&!g&&"bg-primary/10"),children:[a&&i&&l!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:l??jsx(GripVertical,{className:"h-5 w-5"})}),g&&jsx(pC,{checked:_,onClick:U=>Y(O,U)}),jsx("div",{className:"flex-1 min-w-0",children:o(O,W)})]},O.id)})}):jsx("div",{ref:R,role:"list",className:u(Ji({variant:t,size:r,className:e})),...x,children:w})}var gC=j.forwardRef(fC),vf=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),hf=j.forwardRef(({className:e,interactive:t,leading:r,trailing:n,children:o,...a},s)=>jsxs("div",{ref:s,role:"listitem",className:u(vf({interactive:t,className:e})),...a,children:[r&&jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:r}),jsx("div",{className:"flex-1 min-w-0",children:o}),n&&jsx("div",{className:"flex-shrink-0 whitespace-nowrap",children:n})]}));hf.displayName="ListItem";var xf=j.forwardRef(({className:e,primary:t,secondary:r,children:n,...o},a)=>jsxs("div",{ref:a,className:u("min-w-0",e),...o,children:[t&&jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),r&&jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:r}),n]}));xf.displayName="ListItemText";var wf=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),Cf=j.forwardRef(({className:e,position:t,...r},n)=>jsx("div",{ref:n,"data-position":t,className:u(wf({position:t,className:e})),...r}));Cf.displayName="Timeline";var Tf=cva("relative flex gap-4 pb-8 last:pb-0",{variants:{variant:{default:"",success:"[&_[data-timeline-dot]]:bg-green-500 [&_[data-timeline-dot]]:border-green-500",warning:"[&_[data-timeline-dot]]:bg-yellow-500 [&_[data-timeline-dot]]:border-yellow-500",error:"[&_[data-timeline-dot]]:bg-red-500 [&_[data-timeline-dot]]:border-red-500",info:"[&_[data-timeline-dot]]:bg-blue-500 [&_[data-timeline-dot]]:border-blue-500"}},defaultVariants:{variant:"default"}}),Mf=j.forwardRef(({className:e,variant:t,hideSeparator:r=false,hideConnector:n=false,dot:o,children:a,...s},i)=>jsxs("div",{ref:i,className:u(Tf({variant:t,className:e})),...s,children:[!r&&jsxs("div",{className:"flex flex-col items-center",children:[jsx("div",{"data-timeline-dot":true,className:"flex h-3 w-3 items-center justify-center rounded-full border-2 border-primary bg-primary",children:o}),!n&&jsx("div",{className:"w-0.5 flex-1 bg-border"})]}),a]}));Mf.displayName="TimelineItem";var Nf=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex-1 pt-0.5",e),...t}));Nf.displayName="TimelineContent";var kf=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));kf.displayName="TimelineOpposite";var Ef=cva("inline-flex items-center rounded-lg bg-muted p-1 text-muted-foreground",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full",false:""}},defaultVariants:{size:"md",fullWidth:false}}),Lf=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"},selected:{true:"bg-background text-foreground shadow-sm",false:""}},defaultVariants:{size:"md",selected:false}}),Sf=j.createContext({}),Df=j.forwardRef(({className:e,size:t="md",fullWidth:r,children:n,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,m]=j.useState(a),f=o!==void 0?o:d,p=j.useCallback(g=>{o===void 0&&m(g),s?.(g);},[o,s]);return jsx(Sf.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsx("div",{ref:c,role:"group",className:u(Ef({size:t,fullWidth:r,className:e})),...l,children:n})})});Df.displayName="SegmentedControl";var Hf=j.forwardRef(({className:e,children:t,value:r,disabled:n,...o},a)=>{let s=j.useContext(Sf),i=s.value===r,l=n||s.disabled;return jsx("button",{ref:a,type:"button",role:"radio","aria-checked":i,"data-state":i?"on":"off",disabled:l,onClick:()=>{l||s.onValueChange?.(r);},className:u(Lf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Hf.displayName="SegmentedControlItem";var If=cva("relative flex flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",{variants:{variant:{default:"border-input bg-background hover:bg-accent/50",active:"border-primary bg-primary/5",error:"border-danger bg-danger/5"},size:{sm:"p-4 min-h-[120px]",md:"p-6 min-h-[160px]",lg:"p-8 min-h-[200px]"}},defaultVariants:{variant:"default",size:"md"}}),Vf=e=>{let t=e.type;return t.startsWith("image/")?Image$1:t.startsWith("video/")?FileVideo:t.startsWith("audio/")?FileAudio:t.includes("pdf")||t.includes("document")?FileText:t.includes("zip")||t.includes("rar")||t.includes("archive")?FileArchive:File},ss=e=>{if(e===0)return "0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,n)).toFixed(2))+" "+r[n]},Af=(e,t,r)=>{let n=[];return t&&e.size>t&&n.push({code:"file-too-large",message:`File is larger than ${ss(t)}`}),r&&r.length>0&&(r.some(a=>{if(a.startsWith("."))return e.name.toLowerCase().endsWith(a.toLowerCase());if(a.endsWith("/*")){let s=a.slice(0,-2);return e.type.startsWith(s)}return e.type===a})||n.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${r.join(", ")}`})),n},zf=j.forwardRef(({className:e,variant:t,size:r,onFilesChange:n,onFilesRejected:o,onFileRemove:a,files:s=[],showFileList:i=true,children:l,maxSize:c=10*1024*1024,accept:d,multiple:m=true,disabled:f,...p},g)=>{let[h,b]=j.useState(false),[v,w]=j.useState(false),[x,R]=j.useState([]),C=j.useRef(null),y=j.useCallback(S=>{if(!S||S.length===0)return;let V=Array.from(S),A=[],B=[];(m?V:[V[0]]).forEach(F=>{let K=Af(F,c,d);K.length>0?B.push({file:F,errors:K}):A.push(F);}),R(B),A.length>0&&n?.(A),B.length>0&&o?.(B);},[c,d,m,n,o]),k=j.useCallback(S=>{if(S.preventDefault(),S.stopPropagation(),!f&&(b(true),S.dataTransfer.items)){let A=Array.from(S.dataTransfer.items).some(B=>{if(B.kind!=="file")return true;if(d&&d.length>0){let I=B.type;return !d.some(F=>F.endsWith("/*")?I.startsWith(F.slice(0,-2)):I===F)}return false});w(A);}},[f,d]),T=j.useCallback(S=>{S.preventDefault(),S.stopPropagation(),!f&&(S.dataTransfer.dropEffect="copy");},[f]),N=j.useCallback(S=>{S.preventDefault(),S.stopPropagation();let V=S.currentTarget.getBoundingClientRect(),A=S.clientX,B=S.clientY;(A<V.left||A>V.right||B<V.top||B>V.bottom)&&(b(false),w(false));},[]),M=j.useCallback(S=>{S.preventDefault(),S.stopPropagation(),b(false),w(false),!f&&y(S.dataTransfer.files);},[f,y]),P=j.useCallback(()=>{f||C.current?.click();},[f]),E=j.useCallback(S=>{y(S.target.files),S.target.value="";},[y]),D=j.useCallback(S=>{f||(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),C.current?.click());},[f]),H=v?"error":h?"active":t,L=d?.join(",");return jsxs("div",{ref:g,className:u("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:k,onDragOver:T,onDragLeave:N,onDrop:M,onClick:P,onKeyDown:D,className:u(If({variant:H,size:r}),f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer focus:outline-none"),"aria-disabled":f,children:[jsx("input",{ref:C,type:"file",accept:L,multiple:m,disabled:f,onChange:E,className:"sr-only",tabIndex:-1}),l||jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[jsx("div",{className:"rounded-full bg-muted p-3",children:jsx(Upload,{className:"h-6 w-6 text-muted-foreground"})}),jsxs("div",{className:"space-y-1",children:[jsx("p",{className:"text-sm font-medium",children:h?"Drop files here":"Drop files or click to upload"}),jsxs("p",{className:"text-xs text-muted-foreground",children:[c&&`Max ${ss(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),x.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:x.map(({file:S,errors:V})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:S.name}),":"," ",V.map(A=>A.message).join(", ")]},S.name))}),i&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(S=>{let V=Vf(S.file);return jsxs("div",{className:u("flex items-center gap-3 rounded-lg border p-3",S.error&&"border-danger bg-danger/5"),children:[jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:jsx(V,{className:"h-5 w-5 text-muted-foreground"})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"truncate text-sm font-medium",children:S.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[ss(S.file.size),S.error&&jsx("span",{className:"ml-2 text-danger",children:S.error})]}),S.progress!==void 0&&S.progress<100&&jsx(qa,{value:S.progress,className:"mt-2 h-1"})]}),jsxs(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:A=>{A.stopPropagation(),a?.(S.file);},children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},S.id)})})]})});zf.displayName="FileUpload";var MC=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,Bf=cva("relative rounded-md border border-input shadow-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},shape:{square:"rounded-md",circle:"rounded-full"},interactive:{true:"cursor-pointer hover:scale-110 active:scale-105",false:"cursor-default"}},defaultVariants:{size:"md",shape:"square",interactive:false}}),Yo=j.forwardRef(({color:e,isSelected:t,showTransparency:r=true,onSelect:n,size:o,shape:a,interactive:s,className:i,onClick:l,disabled:c,selectedRingColor:d,...m},f)=>jsx("button",{ref:f,type:"button",disabled:c,onClick:h=>{l?.(h),n?.(e);},className:u(Bf({size:o,shape:a,interactive:s??(!!n||!!l)}),t&&"ring-2 ring-offset-2",i),style:{backgroundImage:r?MC:void 0,backgroundSize:r?"8px 8px":void 0,...t&&{"--tw-ring-color":d||"var(--color-foreground)"}},"aria-label":`Color ${e}`,"aria-pressed":t,...m,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));Yo.displayName="ColorSwatch";var Ff=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Kf=j.forwardRef(({value:e,defaultValue:t,onChange:r,layout:n,columns:o=6,colors:a,swatchSize:s="md",swatchShape:i="square",disabled:l,selectedRingColor:c,className:d,style:m,...f},p)=>{let[g,h]=j.useState(t),b=e??g,v=j.useCallback(x=>{l||(e===void 0&&h(x),r?.(x));},[e,r,l]),w=x=>x.toLowerCase();return jsx("div",{ref:p,role:"listbox","aria-label":"Color options",className:u(Ff({layout:n}),d),style:{...n==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...m},...f,children:a.map(x=>{let R=b?w(b)===w(x):false;return jsx(Yo,{role:"option",color:x,size:s,shape:i,isSelected:R,onSelect:v,disabled:l,selectedRingColor:c,"aria-selected":R},x)})})});Kf.displayName="ColorSwatchPicker";var PC=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],$f={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Gf=j.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:r,disabled:n,presets:o=PC,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,m]=j.useState(e??t),f=j.useId();j.useEffect(()=>{e!==void 0&&m(e);},[e]);let p=b=>{m(b),r?.(b);},g=b=>{m(b),r?.(b);},h=b=>{let v=b.target.value.toUpperCase();m(v),r?.(v);};return l==="simple"?jsxs("label",{className:u("relative rounded-md border border-input shadow-sm transition-colors cursor-pointer hover:border-foreground focus-within:border-foreground overflow-hidden",n&&"opacity-50 cursor-not-allowed",$f[s],i),children:[jsx("input",{type:"color",value:d,onChange:h,disabled:n,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",id:f}),jsx("div",{className:"h-full w-full",style:{backgroundColor:d}})]}):jsxs(_e,{children:[jsx(Dt,{ref:c,disabled:n,className:u("rounded-md border border-input shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",$f[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`}),jsx(Xe,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:d,onChange:p,className:"!w-[200px]"}),a&&jsxs("div",{className:"space-y-1.5",children:[jsx(Rn,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxs("div",{className:"flex gap-2",children:[jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:d}}),jsx(HexColorInput,{id:"color-input",color:d,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-2 font-mono text-sm uppercase focus:outline-none focus:border-foreground disabled:cursor-not-allowed disabled:opacity-50"})]})]}),o.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(Rn,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(b=>jsx(Yo,{color:b,size:"sm",isSelected:d.toLowerCase()===b.toLowerCase(),onSelect:g},b))})]})]})})]})});Gf.displayName="ColorPicker";var Uf=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),rl=e=>String(e).padStart(2,"0"),HC=e=>{let[t,r]=e.split(":").map(Number);return {hours:t||0,minutes:r||0}},IC=(e,t)=>`${rl(e)}:${rl(t)}`,Wf=j.forwardRef(({className:e,size:t,value:r,onChange:n,use24Hour:o=true,minuteStep:a=1,showPicker:s=true,minTime:i,maxTime:l,disabled:c,...d},m)=>{let[f,p]=j.useState(r??""),[g,h]=j.useState(false);j.useEffect(()=>{r!==void 0&&p(r);},[r]);let{hours:b,minutes:v}=HC(f||"00:00"),w=N=>{let M=N.target.value;p(M),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(M)&&n?.(M);},x=(N,M)=>{let P=Math.max(0,Math.min(23,N)),E=Math.max(0,Math.min(59,M)),D=IC(P,E);p(D),n?.(D);},R=()=>x(b+1,v),C=()=>x(b-1,v),y=()=>x(b,v+a),k=()=>x(b,v-a),T=({value:N,onIncrement:M,onDecrement:P})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:M,disabled:c,children:jsx(ChevronUp,{className:"h-4 w-4"})}),jsx("div",{className:"flex h-10 w-12 items-center justify-center rounded-md bg-muted text-lg font-semibold",children:rl(N)}),jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,disabled:c,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:m,type:"time",value:f,onChange:w,disabled:c,className:u(Uf({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxs(_e,{open:g,onOpenChange:h,children:[jsxs(Dt,{type:"button",className:"absolute right-1 h-7 w-7 p-0 inline-flex items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:c,children:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]}),jsxs(Xe,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(T,{value:b,onIncrement:R,onDecrement:C,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(T,{value:v,onIncrement:y,onDecrement:k,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",onClick:()=>{let N=new Date;x(N.getHours(),N.getMinutes());},children:"Now"}),jsx(ae,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});Wf.displayName="TimeInput";var jf=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),AC=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(a=>a.type==="currency")?.value??e}catch{return e}},nl=(e,t,r,n)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,r);return s?`${i}${n}${s}`:i},_f=(e,t,r)=>{if(!e)return;let n=e.replace(new RegExp(`\\${t}`,"g"),"");n=n.replace(r,"."),n=n.replace(/[^0-9.-]/g,"");let o=parseFloat(n);return isNaN(o)?void 0:o},Xf=j.forwardRef(({className:e,size:t,value:r,defaultValue:n,onChange:o,currency:a="USD",locale:s="en-US",decimals:i=2,min:l,max:c,showCurrency:d=true,currencyPosition:m="prefix",currencySymbol:f,thousandSeparator:p=",",decimalSeparator:g=".",disabled:h,placeholder:b,...v},w)=>{let[x,R]=j.useState(n),[C,y]=j.useState(""),[k,T]=j.useState(false),N=r!==void 0?r:x,M=f??AC(a,s);j.useEffect(()=>{!k&&N!==void 0&&y(nl(N,i,p,g));},[N,i,p,g,k]);let P=S=>{let V=S.target.value;if(!V){y(""),r===void 0&&R(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;y(V);let B=_f(V,p,g);if(B!==void 0){let I=B;l!==void 0&&B<l&&(I=l),c!==void 0&&B>c&&(I=c),r===void 0&&R(I),o?.(I);}},E=()=>{T(true),N!==void 0&&y(N.toString().replace(".",g));},D=()=>{T(false),y(N!==void 0?nl(N,i,p,g):"");},H=d&&m==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:M}),L=d&&m==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:M});return jsxs("div",{className:"relative flex items-center",children:[H&&jsx("div",{className:"absolute left-3 pointer-events-none",children:H}),jsx("input",{ref:w,type:"text",inputMode:"decimal",value:C,onChange:P,onFocus:E,onBlur:D,disabled:h,placeholder:b??`0${g}${"0".repeat(i)}`,className:u(jf({size:t}),H&&"pl-8",L&&"pr-8","text-right",e),style:{borderColor:k?"var(--color-foreground)":void 0},...v}),L&&jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});Xf.displayName="CurrencyInput";var Yf=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),ol={creditCard:{mask:"#### #### #### ####"},creditCardAmex:{mask:"#### ###### #####"},cvv:{mask:"###"},expiry:{mask:"##/##"},date:{mask:"##/##/####"},dateISO:{mask:"####-##-##"},time:{mask:"##:##"},ip:{mask:"###.###.###.###"},mac:{mask:"AA:AA:AA:AA:AA:AA"},id11:{mask:"###########"},id9:{mask:"#########"},id10:{mask:"##########"},postal5:{mask:"#####"},postal9:{mask:"#####-####"}},BC=(e,t)=>{switch(t){case "#":return /\d/.test(e);case "A":return /[a-zA-Z]/.test(e);case "*":return /[a-zA-Z0-9]/.test(e);default:return e===t}},en=e=>["#","A","*"].includes(e),ls=(e,t,r)=>{let n="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(en(s)){if(o<e.length){let i=e[o];BC(i,s)?(n+=i,o++):(o++,a--);}}else (o<e.length||r)&&(n+=s);}return n},al=(e,t)=>{let r="";for(let n=0;n<e.length&&n<t.length;n++){let o=t[n];en(o)&&(r+=e[n]);}return r},qf=(e,t)=>e.split("").map(r=>en(r)?t:r).join(""),FC=(e,t,r)=>{let n=0;for(let i=0;i<r&&i<e.length&&i<t.length;i++)en(t[i])&&n++;let a=0,s=0;for(let i=0;i<t.length&&s<n;i++)a++,en(t[i])&&s++;for(;a<t.length&&!en(t[a]);)a++;return Math.min(a,e.length)},Zf=j.forwardRef(({className:e,size:t,value:r,defaultValue:n="",onChange:o,mask:a,maskPlaceholder:s="_",showMaskPlaceholder:i=false,includeMaskChars:l=false,disabled:c,placeholder:d,...m},f)=>{let p=typeof a=="string"&&a in ol?ol[a].mask:a,[g,h]=j.useState(n),[b,v]=j.useState(""),[w,x]=j.useState(false),R=j.useRef(null),C=r!==void 0?r:g;j.useImperativeHandle(f,()=>R.current),j.useEffect(()=>{let N=ls(C,p,true);v(N);},[C,p]);let y=N=>{let M=N.target.value,P=N.target.selectionStart??0,E=M.replace(/[^\w]/g,""),D=ls(E,p,true),H=al(D,p);v(D),r===void 0&&h(l?D:H),o?.(H,D),requestAnimationFrame(()=>{if(R.current){let L=FC(D,p,P);R.current.setSelectionRange(L,L);}});},k=N=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(N.key)||N.ctrlKey||N.metaKey)return;let M=R.current;if(!M)return;let P=M.selectionStart??0;if(N.key==="Backspace"&&P>0){let E=P-1;for(;E>0&&!en(p[E]);)E--;let D=al(b,p),H=0;for(let V=0;V<E&&V<p.length;V++)en(p[V])&&H++;let L=D.slice(0,Math.max(0,H-1))+D.slice(H),S=ls(L,p,true);v(S),r===void 0&&h(l?S:L),o?.(L,S),N.preventDefault(),requestAnimationFrame(()=>{R.current&&R.current.setSelectionRange(E,E);});}},T=i?qf(p,s):d;return jsx("input",{ref:R,type:"text",value:b,onChange:y,onKeyDown:k,onFocus:()=>x(true),onBlur:()=>x(false),disabled:c,placeholder:T,className:u(Yf({size:t}),e),style:{borderColor:w?"var(--color-foreground)":void 0},...m})});Zf.displayName="MaskedInput";var Jf=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),eg=[{code:"AR",name:"Argentina",dialCode:"+54",flag:"\u{1F1E6}\u{1F1F7}",format:"## ####-####"},{code:"AU",name:"Australia",dialCode:"+61",flag:"\u{1F1E6}\u{1F1FA}",format:"### ### ###"},{code:"AT",name:"Austria",dialCode:"+43",flag:"\u{1F1E6}\u{1F1F9}",format:"### #######"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"\u{1F1E7}\u{1F1EA}",format:"### ## ## ##"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"\u{1F1E7}\u{1F1F7}",format:"(##) #####-####"},{code:"BG",name:"Bulgaria",dialCode:"+359",flag:"\u{1F1E7}\u{1F1EC}",format:"### ### ###"},{code:"CA",name:"Canada",dialCode:"+1",flag:"\u{1F1E8}\u{1F1E6}",format:"(###) ###-####"},{code:"CN",name:"China",dialCode:"+86",flag:"\u{1F1E8}\u{1F1F3}",format:"### #### ####"},{code:"HR",name:"Croatia",dialCode:"+385",flag:"\u{1F1ED}\u{1F1F7}",format:"## ### ####"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"\u{1F1E8}\u{1F1FF}",format:"### ### ###"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"\u{1F1E9}\u{1F1F0}",format:"## ## ## ##"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"\u{1F1EA}\u{1F1EC}",format:"### ### ####"},{code:"FI",name:"Finland",dialCode:"+358",flag:"\u{1F1EB}\u{1F1EE}",format:"## ### ####"},{code:"FR",name:"France",dialCode:"+33",flag:"\u{1F1EB}\u{1F1F7}",format:"# ## ## ## ##"},{code:"DE",name:"Germany",dialCode:"+49",flag:"\u{1F1E9}\u{1F1EA}",format:"#### #######"},{code:"GR",name:"Greece",dialCode:"+30",flag:"\u{1F1EC}\u{1F1F7}",format:"### ### ####"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"\u{1F1ED}\u{1F1F0}",format:"#### ####"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"\u{1F1ED}\u{1F1FA}",format:"## ### ####"},{code:"IN",name:"India",dialCode:"+91",flag:"\u{1F1EE}\u{1F1F3}",format:"##### #####"},{code:"IL",name:"Israel",dialCode:"+972",flag:"\u{1F1EE}\u{1F1F1}",format:"##-###-####"},{code:"IT",name:"Italy",dialCode:"+39",flag:"\u{1F1EE}\u{1F1F9}",format:"### ### ####"},{code:"JP",name:"Japan",dialCode:"+81",flag:"\u{1F1EF}\u{1F1F5}",format:"##-####-####"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"\u{1F1F2}\u{1F1FD}",format:"### ### ####"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"\u{1F1F3}\u{1F1F1}",format:"## ########"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"\u{1F1F3}\u{1F1FF}",format:"## ### ####"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",format:"### ### ####"},{code:"NO",name:"Norway",dialCode:"+47",flag:"\u{1F1F3}\u{1F1F4}",format:"### ## ###"},{code:"PK",name:"Pakistan",dialCode:"+92",flag:"\u{1F1F5}\u{1F1F0}",format:"### #######"},{code:"PL",name:"Poland",dialCode:"+48",flag:"\u{1F1F5}\u{1F1F1}",format:"### ### ###"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"\u{1F1F5}\u{1F1F9}",format:"### ### ###"},{code:"RO",name:"Romania",dialCode:"+40",flag:"\u{1F1F7}\u{1F1F4}",format:"### ### ###"},{code:"RU",name:"Russia",dialCode:"+7",flag:"\u{1F1F7}\u{1F1FA}",format:"(###) ###-##-##"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"\u{1F1F8}\u{1F1E6}",format:"## ### ####"},{code:"RS",name:"Serbia",dialCode:"+381",flag:"\u{1F1F7}\u{1F1F8}",format:"## ### ####"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"\u{1F1F8}\u{1F1EC}",format:"#### ####"},{code:"SK",name:"Slovakia",dialCode:"+421",flag:"\u{1F1F8}\u{1F1F0}",format:"### ### ###"},{code:"SI",name:"Slovenia",dialCode:"+386",flag:"\u{1F1F8}\u{1F1EE}",format:"## ### ###"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",format:"## ### ####"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"\u{1F1F0}\u{1F1F7}",format:"##-####-####"},{code:"ES",name:"Spain",dialCode:"+34",flag:"\u{1F1EA}\u{1F1F8}",format:"### ### ###"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"\u{1F1F8}\u{1F1EA}",format:"##-### ## ##"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"\u{1F1E8}\u{1F1ED}",format:"## ### ## ##"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"\u{1F1F9}\u{1F1FC}",format:"### ### ###"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"\u{1F1F9}\u{1F1F7}",format:"(###) ### ## ##"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"\u{1F1FA}\u{1F1E6}",format:"## ### ## ##"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"\u{1F1E6}\u{1F1EA}",format:"## ### ####"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"\u{1F1EC}\u{1F1E7}",format:"#### ### ####"},{code:"US",name:"United States",dialCode:"+1",flag:"\u{1F1FA}\u{1F1F8}",format:"(###) ###-####"}],cs=(e,t)=>{let r=e.replace(/\D/g,""),n="",o=0;for(let a=0;a<t.length&&o<r.length;a++)t[a]==="#"?(n+=r[o],o++):n+=t[a];return n},WC=e=>e.replace(/#/g,"_"),tg=j.forwardRef(({className:e,size:t,value:r,defaultValue:n="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=eg,showCountrySelect:c=true,showDialCode:d=false,disabled:m,placeholder:f,...p},g)=>{let[h,b]=j.useState(n),[v,w]=j.useState(a??s),[x,R]=j.useState(false),[C,y]=j.useState(false),[k,T]=j.useState(false),[N,M]=j.useState({top:0,left:0,width:0}),P=j.useRef(null),E=j.useRef(null),D=r!==void 0?r:h,H=a??v,L=l.find(I=>I.code===H)??l[0],S=cs(D,L.format);j.useEffect(()=>{T(true);},[]),j.useEffect(()=>{if(C&&P.current){let I=P.current.getBoundingClientRect();M({top:I.bottom+4,left:I.left,width:Math.max(I.width,280)});}},[C]),j.useEffect(()=>{if(!C)return;let I=F=>{P.current&&!P.current.contains(F.target)&&E.current&&!E.current.contains(F.target)&&y(false);};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[C]),j.useEffect(()=>{if(!C)return;let I=F=>{F.key==="Escape"&&y(false);};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[C]);let V=I=>{let K=I.target.value.replace(/\D/g,"");r===void 0&&b(K);let Y=cs(K,L.format),te=`${L.dialCode} ${Y}`;o?.(K,te,L);},A=I=>{let F=l.find(te=>te.code===I);if(!F)return;a===void 0&&w(I),i?.(F);let K=cs(D,F.format),Y=`${F.dialCode} ${K}`;o?.(D,Y,F),y(false);};return jsxs("div",{className:"flex",children:[c&&jsxs(Fragment,{children:[jsxs("button",{ref:P,type:"button",disabled:m,onClick:()=>y(!C),className:u("flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),children:[jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:L.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:L.dialCode})]}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",C&&"rotate-180")})]}),k&&C&&$a.createPortal(jsx("div",{ref:E,className:"fixed z-50 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",style:{top:N.top,left:N.left,minWidth:N.width},children:jsx(De,{style:{maxHeight:300},children:jsx("div",{className:"p-1",children:l.map(I=>jsxs("div",{role:"option","aria-selected":I.code===H,onClick:()=>A(I.code),className:"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:I.code===H&&jsx(Check,{className:"h-4 w-4"})}),jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:I.flag}),jsx("span",{className:"flex-1",children:I.name}),jsx("span",{className:"text-xs text-muted-foreground",children:I.dialCode})]})]},I.code))})})}),document.body)]}),jsxs("div",{className:"relative flex-1",children:[d&&!c&&jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:L.dialCode}),jsx("input",{ref:g,type:"tel",inputMode:"tel",value:S,onChange:V,onFocus:()=>R(true),onBlur:()=>R(false),disabled:m,placeholder:f??WC(L.format),className:u(Jf({size:t}),c&&"rounded-l-none",d&&!c&&"pl-12",e),style:{borderColor:x?"var(--color-foreground)":void 0},...p})]})]})});tg.displayName="PhoneInput";var ng=cva("flex items-center justify-between w-full px-4 py-3 border-b bg-background",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-background border-border",ghost:"bg-transparent border-transparent",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-border"},size:{sm:"h-12 px-3 py-2",md:"h-14 px-4 py-3",lg:"h-16 px-6 py-4"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"bordered",size:"md",sticky:false}}),og=j.forwardRef(({className:e,variant:t,size:r,sticky:n,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=j.useState(false),m={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],f={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxs("nav",{ref:l,className:u(ng({variant:t,size:r,sticky:n,className:e})),...i,children:[jsxs("div",{className:"flex items-center justify-between w-full",children:[o&&jsx("div",{className:"flex-shrink-0",children:o}),jsx("div",{className:u("items-center gap-4 flex-1 justify-end",m),children:a}),jsx("button",{type:"button",className:u("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",f),onClick:()=>d(!c),"aria-label":c?"Close menu":"Open menu","aria-expanded":c,children:c?jsx(X,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),c&&jsx("div",{className:u("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",f),children:a})]})});og.displayName="Navbar";var ag=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex items-center gap-2 font-semibold text-lg",e),...t}));ag.displayName="NavbarBrand";var sg=j.forwardRef(({className:e,justify:t="start",...r},n)=>{let o={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsx("div",{ref:n,className:u("flex items-center gap-4",o,e),...r})});sg.displayName="NavbarContent";var ig=j.forwardRef(({className:e,isActive:t,...r},n)=>jsx("div",{ref:n,className:u("flex items-center",t&&"text-primary font-medium",e),...r}));ig.displayName="NavbarItem";var lg=j.forwardRef(({className:e,isActive:t,...r},n)=>jsx("a",{ref:n,className:u("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...r}));lg.displayName="NavbarLink";var dg=cva("inline-flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"text-primary-foreground bg-primary px-2 py-0.5 rounded hover:bg-primary/90",bordered:"text-primary underline-offset-4 hover:underline",ghost:"text-foreground hover:text-primary",soft:"text-primary bg-primary/10 px-2 py-0.5 rounded hover:bg-primary/20",surface:"text-foreground bg-muted px-2 py-0.5 rounded hover:bg-muted/80"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},underline:{none:"",hover:"hover:underline underline-offset-4",always:"underline underline-offset-4"}},defaultVariants:{variant:"bordered",size:"md",underline:"hover"}}),ug=j.forwardRef(({className:e,variant:t,size:r,underline:n,isExternal:o,showExternalIcon:a=true,isDisabled:s,children:i,...l},c)=>{let d=o?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxs("a",{ref:c,className:u(dg({variant:t,size:r,underline:n,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...d,...l,children:[i,o&&a&&jsx(ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});ug.displayName="Link";var mg=cva("fixed z-50 transition-all duration-300",{variants:{position:{"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6","bottom-center":"bottom-6 left-1/2 -translate-x-1/2"}},defaultVariants:{position:"bottom-right"}}),pg=j.forwardRef(({className:e,position:t,threshold:r=400,icon:n,behavior:o="smooth",variant:a="solid",color:s="default",size:i="md",radius:l="full",target:c,onVisibilityChange:d,onClick:m,...f},p)=>{let[g,h]=j.useState(false);j.useEffect(()=>{let w=c?.current||window,x=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>r;C!==g&&(h(C),d?.(C));};return w.addEventListener("scroll",x,{passive:true}),x(),()=>{w.removeEventListener("scroll",x);}},[r,c,g,d]);let b=w=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),m?.(w);},v=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:u(mg({position:t}),g?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsx(ae,{ref:p,type:"button",variant:a,color:s,size:"icon",radius:l,onClick:b,"aria-label":"Back to top",className:u("shadow-lg",i==="sm"&&"h-9 w-9",i==="md"&&"h-10 w-10",i==="lg"&&"h-12 w-12"),...f,children:n||jsx(ArrowUp,{className:v})})})});pg.displayName="BackTop";var aT=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),sT=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),fg=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),ms=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),gg=j.createContext(null),rn=()=>{let e=j.useContext(gg);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},bg=j.createContext(null),Zo=()=>{let e=j.useContext(bg);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},il=j.createContext(null),vg=j.createContext(null),hg=j.forwardRef(({className:e,children:t,radius:r="sm",...n},o)=>{let[a,s]=j.useState(null);return jsx(gg.Provider,{value:{activeMenu:a,setActiveMenu:s,radius:r},children:jsx("div",{ref:o,role:"menubar",className:u("flex h-10 items-center space-x-1 border bg-background p-1",aT({radius:r}),e),...n,children:t})})});hg.displayName="Menubar";var xg=({children:e})=>{let{activeMenu:t,setActiveMenu:r}=rn(),n=j.useId(),o=j.useRef(null),a=t===n,s=j.useCallback(i=>{r(i?n:null);},[n,r]);return jsx(bg.Provider,{value:{menuId:n,triggerRef:o,open:a,onOpenChange:s},children:e})};xg.displayName="MenubarMenu";var yg=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"group",className:e,...t}));yg.displayName="MenubarGroup";var Rg=({children:e,container:t})=>{let[r,n]=j.useState(false);return j.useEffect(()=>{n(true);},[]),r?$a.createPortal(e,t||document.body):null};Rg.displayName="MenubarPortal";var wg=({children:e,open:t,defaultOpen:r=false,onOpenChange:n})=>{let[o,a]=j.useState(r),s=t!==void 0,i=s?t:o,l=j.useRef(null),c=j.useCallback(d=>{s||a(d),n?.(d);},[s,n]);return jsx(il.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};wg.displayName="MenubarSub";var Cg=j.forwardRef(({value:e="",onValueChange:t,className:r,...n},o)=>jsx(vg.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsx("div",{ref:o,role:"group",className:r,...n})}));Cg.displayName="MenubarRadioGroup";var Tg=j.forwardRef(({className:e,onClick:t,onMouseEnter:r,...n},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=rn(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=Zo(),f=g=>{t?.(g),m(!d);},p=g=>{r?.(g),a&&a!==l&&(s(l),document.activeElement instanceof HTMLElement&&document.activeElement.blur());};return jsx("button",{ref:g=>{c.current=g,typeof o=="function"?o(g):o&&(o.current=g);},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":d,"data-state":d?"open":"closed",className:u("flex cursor-default select-none items-center px-3 py-1.5 text-sm font-medium outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",sT({radius:i}),e),onClick:f,onMouseEnter:p,...n})});Tg.displayName="MenubarTrigger";var Mg=j.forwardRef(({className:e,inset:t,children:r,onMouseEnter:n,onMouseLeave:o,...a},s)=>{let{radius:i}=rn(),l=j.useContext(il);if(!l)throw new Error("MenubarSubTrigger must be used within MenubarSub");let{open:c,onOpenChange:d,triggerRef:m}=l,f=g=>{n?.(g),d(true);},p=g=>{o?.(g),d(false);};return jsxs("div",{ref:g=>{m.current=g,typeof s=="function"?s(g):s&&(s.current=g);},role:"menuitem","aria-haspopup":"menu","aria-expanded":c,"data-state":c?"open":"closed",className:u("flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",ms({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Mg.displayName="MenubarSubTrigger";var Ng=j.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:r,onMouseLeave:n,...o},a)=>{let{radius:s}=rn(),i=j.useContext(il);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[m,f]=j.useState({top:0,left:0}),[p,g]=j.useState(false),h=j.useRef(null);j.useEffect(()=>{g(true);},[]),j.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let x=d.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),C=x.top,y=x.right+t;y+R.width>window.innerWidth&&(y=x.left-R.width-t),f({top:C,left:y});})();},[l,t,d]);let b=w=>{r?.(w),c(true);},v=w=>{n?.(w),c(false);};return !p||!l?null:$a.createPortal(jsx("div",{ref:w=>{h.current=w,typeof a=="function"?a(w):a&&(a.current=w);},role:"menu","data-state":l?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",fg({radius:s}),e),style:{top:m.top,left:m.left},onMouseEnter:b,onMouseLeave:v,...o}),document.body)});Ng.displayName="MenubarSubContent";var kg=j.forwardRef(({className:e,align:t="start",alignOffset:r=-4,sideOffset:n=8,children:o,...a},s)=>{let{radius:i}=rn(),{triggerRef:l,open:c,onOpenChange:d}=Zo(),[m,f]=j.useState({top:0,left:0}),[p,g]=j.useState(false),h=j.useRef(null);return j.useEffect(()=>{g(true);},[]),j.useEffect(()=>{if(!c||!l.current||!h.current)return;let b=()=>{if(!l.current||!h.current)return;let v=l.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),x=v.bottom+n,R=v.left+r;t==="center"?R=v.left+v.width/2-w.width/2:t==="end"&&(R=v.right-w.width-r),f({top:x,left:R});};return b(),window.addEventListener("resize",b),window.addEventListener("scroll",b,true),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b,true);}},[c,t,r,n,l]),j.useEffect(()=>{if(!c)return;let b=v=>{let w=v.target;h.current&&!h.current.contains(w)&&l.current&&!l.current.contains(w)&&d(false);};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c,d,l]),j.useEffect(()=>{if(!c)return;let b=v=>{v.key==="Escape"&&d(false);};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[c,d]),!p||!c?null:$a.createPortal(jsx("div",{ref:b=>{h.current=b,typeof s=="function"?s(b):s&&(s.current=b);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[12rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",fg({radius:i}),e),style:{top:m.top,left:m.left},...a,children:o}),document.body)});kg.displayName="MenubarContent";var Pg=j.forwardRef(({className:e,inset:t,disabled:r,onSelect:n,onClick:o,...a},s)=>{let{radius:i}=rn(),{onOpenChange:l}=Zo(),c=d=>{if(r){d.preventDefault();return}o?.(d),n?.(),l(false);};return jsx("div",{ref:s,role:"menuitem",tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,className:u("relative flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ms({radius:i}),t&&"pl-8",!r&&"cursor-pointer",e),onClick:c,...a})});Pg.displayName="MenubarItem";var Eg=j.forwardRef(({className:e,children:t,checked:r=false,onCheckedChange:n,disabled:o,onClick:a,...s},i)=>{let{radius:l}=rn(),{onOpenChange:c}=Zo(),d=m=>{if(o){m.preventDefault();return}a?.(m),n?.(!r),c(false);};return jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":r,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":r?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ms({radius:l}),!o&&"cursor-pointer",e),onClick:d,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r&&jsx(Check,{className:"h-4 w-4"})}),t]})});Eg.displayName="MenubarCheckboxItem";var Lg=j.forwardRef(({className:e,children:t,value:r,disabled:n,onClick:o,...a},s)=>{let{radius:i}=rn(),{onOpenChange:l}=Zo(),c=j.useContext(vg),d=c?.value===r,m=f=>{if(n){f.preventDefault();return}o?.(f),c?.onValueChange(r),l(false);};return jsxs("div",{ref:s,role:"menuitemradio","aria-checked":d,tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-state":d?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ms({radius:i}),!n&&"cursor-pointer",e),onClick:m,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d&&jsx(Circle,{className:"h-2 w-2 fill-current"})}),t]})});Lg.displayName="MenubarRadioItem";var Sg=j.forwardRef(({className:e,inset:t,...r},n)=>jsx("div",{ref:n,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Sg.displayName="MenubarLabel";var Dg=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Dg.displayName="MenubarSeparator";var Hg=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Hg.displayName="MenubarShortcut";var Ig=cva("flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col"},size:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"horizontal",size:"md"}}),Vg=j.forwardRef(({className:e,orientation:t,size:r,currentStep:n=0,children:o,...a},s)=>{let i=j.Children.toArray(o);return jsx("div",{ref:s,className:u(Ig({orientation:t,size:r,className:e})),...a,children:i.map((l,c)=>j.isValidElement(l)?j.cloneElement(l,{...l.props,stepNumber:c+1,status:l.props.status||(c<n?"completed":c===n?"current":"upcoming"),isLast:c===i.length-1,orientation:t,size:r}):l)})});Vg.displayName="Steps";var Ag=cva("flex items-center",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col items-start"},size:{sm:"gap-2",md:"gap-3",lg:"gap-4"}},defaultVariants:{orientation:"horizontal",size:"md"}}),lT=cva("flex items-center justify-center rounded-full font-medium transition-colors",{variants:{status:{completed:"bg-primary text-primary-foreground",current:"bg-primary text-primary-foreground ring-2 ring-primary ring-offset-2 ring-offset-background",upcoming:"bg-muted text-muted-foreground border-2 border-muted-foreground/30"},size:{sm:"h-6 w-6 text-xs",md:"h-8 w-8 text-sm",lg:"h-10 w-10 text-base"}},defaultVariants:{status:"upcoming",size:"md"}}),cT=cva("bg-muted transition-colors",{variants:{orientation:{horizontal:"h-0.5 flex-1 min-w-8",vertical:"w-0.5 min-h-8 ml-4"},status:{completed:"bg-primary",current:"bg-muted",upcoming:"bg-muted"}},defaultVariants:{orientation:"horizontal",status:"upcoming"}}),zg=j.forwardRef(({className:e,orientation:t="horizontal",size:r="md",title:n,description:o,icon:a,status:s="upcoming",stepNumber:i,isLast:l,...c},d)=>jsxs("div",{ref:d,className:u(Ag({orientation:t,size:r,className:e}),!l&&t==="horizontal"&&"flex-1"),...c,children:[jsx("div",{className:u("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:u(lT({status:s,size:r})),children:s==="completed"?jsx(Check,{className:r==="sm"?"h-3 w-3":r==="lg"?"h-5 w-5":"h-4 w-4"}):a||i}),(n||o)&&jsxs("div",{className:"flex flex-col",children:[n&&jsx("span",{className:u("font-medium",r==="sm"&&"text-sm",r==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:n}),o&&jsx("span",{className:u("text-muted-foreground",r==="sm"&&"text-xs",r==="md"&&"text-sm",r==="lg"&&"text-base"),children:o})]})]})}),!l&&jsx("div",{className:u(cT({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));zg.displayName="Step";var Bg=cva("flex flex-col select-none",{variants:{variant:{default:"",bordered:"rounded-lg border",filled:"bg-muted/30 rounded-lg p-2"},size:{sm:"[--tree-indent:16px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:20px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:24px] [--tree-item-height:40px] text-base"}},defaultVariants:{variant:"default",size:"md"}}),Fg=cva("flex items-center py-1.5 px-2 rounded-sm transition-colors",{variants:{size:{sm:"py-1 px-1.5 text-sm min-h-[var(--tree-item-height)]",md:"py-1.5 px-2 text-sm min-h-[var(--tree-item-height)]",lg:"py-2 px-3 text-base min-h-[var(--tree-item-height)]"},isSelected:{true:"bg-primary/10 text-primary",false:""},isDragging:{true:"opacity-50",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""},isHoverable:{true:"hover:bg-muted/50 cursor-pointer",false:""}},defaultVariants:{size:"md",isSelected:false,isDragging:false,isDisabled:false,isHoverable:true}}),Kg=j.createContext(null),vT=()=>{let e=j.useContext(Kg);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},hT=({checked:e,indeterminate:t,disabled:r,onClick:n})=>jsx("button",{type:"button",role:"checkbox","aria-checked":t?"mixed":e,disabled:r,onClick:o=>{o.stopPropagation(),r||n(o);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",(e||t)&&"bg-primary text-primary-foreground",r&&"cursor-not-allowed opacity-50"),children:(e||t)&&jsx("span",{className:"flex items-center justify-center text-current",children:t?jsx(Minus,{className:"h-3 w-3"}):jsx(Check,{className:"h-3 w-3"})})}),$g=({node:e,level:t,isLast:r=false,parentIsLastPath:n=[]})=>{let{expandedKeys:o,toggleExpand:a,selectedKeys:s,handleSelect:i,selectable:l,checkedKeys:c,halfCheckedKeys:d,handleCheck:m,checkable:f,draggable:p,draggedNode:g,setDraggedNode:h,dragOverKey:b,dragOverPosition:v,setDragOver:w,handleDrop:x,allowDrop:R,onDragStart:C,onDragOver:y,onDragEnter:k,onDragLeave:T,onDragEnd:N,showLine:M,showIcon:P,showHandle:E,dragIcon:D,icon:H,leafIcon:L,folderIcon:S,folderOpenIcon:V,blockNode:A,disabled:B,size:I,getAllKeys:F}=vT(),K=e.children&&e.children.length>0,Y=e.isLeaf??!K,te=o.has(e.key),$=s.has(e.key),O=c.has(e.key),W=d.has(e.key),z=g?.key===e.key,_=b===e.key,Q=!!(B||e.disabled),ue=l&&e.selectable!==false,U=f&&e.checkable!==false,Ve=j.useMemo(()=>Q?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,Q]),Z=j.useMemo(()=>D!==void 0?D:typeof p=="object"&&p.icon!==void 0?p.icon:jsx(GripVertical,{className:"h-4 w-4"}),[D,p]),ye=j.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:te,isLeaf:Y}):H:Y?L:te?V:S,[e.icon,H,te,Y,L,S,V]),zr=X=>{if(!Ve)return;X.stopPropagation(),X.dataTransfer.effectAllowed="move";let Le=X.currentTarget,ce=Le.cloneNode(true),Ge=document.documentElement.classList.contains("dark"),Ue=Ge?"#0a0a0a":"#ffffff",Br=Ge?"#27272a":"#e4e4e7";ce.style.cssText=`
|
|
43
|
+
`;return jsxs(Fragment,{children:[jsx("style",{dangerouslySetInnerHTML:{__html:p}}),jsx("div",{ref:s,id:c,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),style:o,className:u("h-full w-full",t==="vertical"&&"overflow-y-auto overflow-x-hidden",t==="horizontal"&&"overflow-x-auto overflow-y-hidden",t==="both"&&"overflow-auto",e),...a,children:n})]})});Se.displayName="ScrollArea";var Hd=cva("flex min-h-10 w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 py-2 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Id=j.forwardRef(({options:e,multiple:t=false,value:r,defaultValue:n,onValueChange:o,placeholder:a="Select...",searchable:s=false,searchPlaceholder:i="Search...",emptyText:l="No results found.",disabled:c=false,clearable:d=false,maxDisplayItems:m=3,maxDropdownHeight:f=240,radius:p,className:g,...h},b)=>{let[v,w]=j.useState(false),[x,R]=j.useState(""),[C,y]=j.useState(n||""),[k,T]=j.useState(n||[]),[N,M]=j.useState({top:0,left:0,width:0}),P=j.useRef(null),E=j.useRef(null),D=j.useRef(null),H=j.useRef(null),L=r!==void 0?r:C,S=r!==void 0?r:k,V=r!==void 0,A=z=>{d&&L===z?(V||y(""),o?.("")):(V||y(z),o?.(z)),w(false),R("");},B=z=>{let _=S.includes(z)?S.filter(Q=>Q!==z):[...S,z];V||T(_),o?.(_);},I=(z,_)=>{_.stopPropagation();let Q=S.filter(ue=>ue!==z);V||T(Q),o?.(Q);},F=z=>{z.stopPropagation(),t?(V||T([]),o?.([])):(V||y(""),o?.(""));},K=e.find(z=>z.value===L),Y=e.filter(z=>S.includes(z.value)),te=Y.slice(0,m),$=Y.length-m,O=s?e.filter(z=>z.label.toLowerCase().includes(x.toLowerCase())):e;j.useEffect(()=>{if(v&&E.current){let z=E.current.getBoundingClientRect();M({top:z.bottom+4,left:z.left,width:z.width}),s&&setTimeout(()=>H.current?.focus(),0);}v||R("");},[v,s]),j.useEffect(()=>{let z=_=>{let Q=_.target,ue=P.current&&!P.current.contains(Q),U=D.current&&!D.current.contains(Q);ue&&U&&(w(false),R(""));};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[]),j.useEffect(()=>{if(!v)return;let z=_=>{D.current?.contains(_.target)||(w(false),R(""));};return window.addEventListener("scroll",z,true),()=>window.removeEventListener("scroll",z,true)},[v]);let W=t?S.length>0:!!L;return jsxs("div",{ref:P,className:u("relative",g),...h,children:[jsxs("div",{ref:z=>{E.current=z,typeof b=="function"?b(z):b&&(b.current=z);},role:"combobox","aria-expanded":v,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&w(!v),className:u(Hd({radius:p}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:u(!K&&"text-muted-foreground"),children:K?K.label:a}),t&&jsx(Fragment,{children:Y.length===0?jsx("span",{className:"text-muted-foreground",children:a}):jsxs(Fragment,{children:[te.map(z=>jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[z.label,jsx("span",{role:"button",tabIndex:0,onClick:_=>I(z.value,_),onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&I(z.value,_);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X,{className:"h-3 w-3"})})]},z.value)),$>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",$," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&W&&jsx("span",{role:"button",tabIndex:0,onClick:F,onKeyDown:z=>{(z.key==="Enter"||z.key===" ")&&F(z);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsx(X,{className:"h-4 w-4 opacity-50"})}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",v&&"rotate-180")})]})]}),v&&!c&&typeof document<"u"&&za.createPortal(jsxs("div",{ref:D,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:N.top,left:N.left,minWidth:N.width},children:[s&&jsxs("div",{className:"flex items-center border-b border-zinc-300 dark:border-zinc-700 px-3",children:[jsx(Search,{className:"h-4 w-4 opacity-50 mr-2"}),jsx("input",{ref:H,type:"text",value:x,onChange:z=>R(z.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx(Se,{style:{maxHeight:f},onWheel:z=>z.stopPropagation(),children:jsx("div",{className:"p-1",children:O.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):O.map(z=>{let _=t?S.includes(z.value):L===z.value;return jsxs("div",{role:"option","aria-selected":_,onClick:()=>{z.disabled||(t?B(z.value):A(z.value));},className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",z.disabled&&"pointer-events-none opacity-50"),children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:_&&jsx(Check,{className:"h-4 w-4"})}),z.label]},z.value)})})})]}),document.body)]})});Id.displayName="Select";var Vd=j.createContext(null),Vo=()=>{let e=j.useContext(Vd);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},wi=j.createContext({radius:"md"}),Ci=j.createContext(null),fr=({children:e,open:t,defaultOpen:r=false,onOpenChange:n})=>{let[o,a]=j.useState(r),[s,i]=j.useState(-1),l=t!==void 0,c=l?t:o,d=j.useRef(null),m=j.useRef(null),f=j.useId(),p=j.useRef(new Map),g=j.useCallback(v=>{l||a(v),n?.(v),v||i(-1);},[l,n]),h=j.useCallback((v,w)=>{p.current.set(v,w);},[]),b=j.useCallback(v=>{p.current.delete(v);},[]);return jsx(Vd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:m,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:b},children:e})};fr.displayName="Dropdown";var gr=j.forwardRef(({children:e,onClick:t,onKeyDown:r,...n},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Vo();return jsx("div",{ref:m=>{i.current=m,typeof o=="function"?o(m):o&&(o.current=m);},role:"button",tabIndex:0,"aria-expanded":a,"aria-haspopup":"menu","aria-controls":a?l:void 0,onClick:m=>{t?.(m),s(!a);},onKeyDown:m=>{r?.(m),(m.key==="ArrowDown"||m.key==="ArrowUp")&&(m.preventDefault(),s(true)),(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),s(!a));},className:"inline-flex",...n,children:e})});gr.displayName="DropdownTrigger";var Z0={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-2xl"},br=j.forwardRef(({className:e,side:t="bottom",sideOffset:r=4,align:n="start",alignOffset:o=0,collisionPadding:a=8,onInteractOutside:s,onEscapeKeyDown:i,loop:l=true,radius:c="md",children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentRef:b,contentId:v,activeIndex:w,setActiveIndex:x,items:R}=Vo(),[C,y]=j.useState({top:0,left:0}),[k,T]=j.useState(t),[N,M]=j.useState(false),P=j.useRef(0);if(j.useEffect(()=>{M(true);},[]),j.useEffect(()=>{p&&(P.current=R.current.size);},[p,R]),j.useEffect(()=>{if(!p||!h.current||!b.current)return;let D=()=>{if(!h.current||!b.current)return;let H=h.current.getBoundingClientRect(),L=b.current.getBoundingClientRect(),S=window.innerWidth,V=window.innerHeight,A=0,B=0,I=t;switch(t){case "top":A=H.top-L.height-r,A<a&&(A=H.bottom+r,I="bottom");break;case "bottom":A=H.bottom+r,A+L.height>V-a&&(A=H.top-L.height-r,I="top");break;case "left":B=H.left-L.width-r,B<a&&(B=H.right+r,I="right");break;case "right":B=H.right+r,B+L.width>S-a&&(B=H.left-L.width-r,I="left");break}if(I==="top"||I==="bottom"){switch(n){case "start":B=H.left+o;break;case "center":B=H.left+H.width/2-L.width/2;break;case "end":B=H.right-L.width-o;break}B<a?B=a:B+L.width>S-a&&(B=S-L.width-a);}else {switch(n){case "start":A=H.top+o;break;case "center":A=H.top+H.height/2-L.height/2;break;case "end":A=H.bottom-L.height-o;break}A<a?A=a:A+L.height>V-a&&(A=V-L.height-a);}y({top:A,left:B}),T(I);};return D(),window.addEventListener("resize",D),window.addEventListener("scroll",D,true),()=>{window.removeEventListener("resize",D),window.removeEventListener("scroll",D,true);}},[p,t,r,n,o,a,h]),j.useEffect(()=>{if(!p)return;let D=H=>{let L=H.target;b.current&&!b.current.contains(L)&&h.current&&!h.current.contains(L)&&(s?.(),g(false));};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[p,g,s,h,b]),j.useEffect(()=>{if(!p)return;let D=H=>{let L=Array.from(R.current.entries()).sort(([V],[A])=>V-A).map(([,V])=>V),S=L.length;if(S!==0)switch(H.key){case "Escape":H.preventDefault(),i?.(),g(false),h.current?.focus();break;case "ArrowDown":H.preventDefault(),w===-1||w>=S-1?x(l?0:Math.min(w+1,S-1)):x(w+1);break;case "ArrowUp":H.preventDefault(),w<=0?x(l?S-1:0):x(w-1);break;case "Home":H.preventDefault(),x(0);break;case "End":H.preventDefault(),x(S-1);break;case "Enter":case " ":H.preventDefault(),w>=0&&w<S&&L[w]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[p,g,i,w,x,R,l,h]),j.useEffect(()=>{p&&w>=0&&Array.from(R.current.entries()).sort(([H],[L])=>H-L).map(([,H])=>H)[w]?.focus();},[p,w,R]),!N||!p)return null;let E={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[k];return za.createPortal(jsx("div",{ref:D=>{b.current=D,typeof f=="function"?f(D):f&&(f.current=D);},id:v,role:"menu","aria-orientation":"vertical","data-state":p?"open":"closed","data-side":k,"data-dropdown-content":"",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md outline-none",Z0[c],E,e),style:{top:C.top,left:C.left},...m,children:jsx(wi.Provider,{value:{radius:c},children:d})}),document.body)});br.displayName="DropdownContent";var Ad=0,zd={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},Bt=j.forwardRef(({className:e,inset:t,disabled:r,onSelect:n,onClick:o,onMouseEnter:a,startContent:s,endContent:i,children:l,...c},d)=>{let{onOpenChange:m,activeIndex:f,setActiveIndex:p,registerItem:g,unregisterItem:h}=Vo(),{radius:b}=j.useContext(wi),[v]=j.useState(()=>Ad++),w=j.useRef(null);j.useEffect(()=>(!r&&w.current&&g(v,w.current),()=>{h(v);}),[r,v,g,h]);let x=y=>{if(r){y.preventDefault();return}o?.(y),n?.(),m(false);},R=y=>{a?.(y),r||p(v);};return jsxs("div",{ref:y=>{w.current=y,typeof d=="function"?d(y):d&&(d.current=y);},role:"menuitem",tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-highlighted":f===v?"":void 0,className:u("relative flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",zd[b],t&&"pl-8",!r&&"cursor-pointer",e),onClick:x,onMouseEnter:R,...c,children:[s,l&&jsx("span",{className:"flex-1",children:l}),i]})});Bt.displayName="DropdownItem";var Ti=j.forwardRef(({className:e,inset:t,...r},n)=>jsx("div",{ref:n,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...r}));Ti.displayName="DropdownSection";var Od=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Od.displayName="DropdownSeparator";var Bd=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});Bd.displayName="DropdownShortcut";var Fd=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"group",className:e,...t}));Fd.displayName="DropdownGroup";var Kd=({children:e,open:t,defaultOpen:r=false,onOpenChange:n})=>{let[o,a]=j.useState(r),{contentRef:s}=Vo(),i=t!==void 0,l=i?t:o,c=j.useRef(null),d=j.useCallback(m=>{i||a(m),n?.(m);},[i,n]);return jsx(Ci.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};Kd.displayName="DropdownSub";var $d=j.forwardRef(({className:e,inset:t,disabled:r,children:n,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=j.useContext(Ci),{setActiveIndex:d,registerItem:m,unregisterItem:f}=Vo(),{radius:p}=j.useContext(wi),[g]=j.useState(()=>Ad++),h=j.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:b,onOpenChange:v,triggerRef:w}=c;j.useEffect(()=>(!r&&h.current&&m(g,h.current),()=>{f(g);}),[r,g,m,f]);let x=y=>{o?.(y),r||(d(g),v(true));},R=y=>{a?.(y);},C=y=>{s?.(y),(y.key==="ArrowRight"||y.key==="Enter"||y.key===" ")&&(y.preventDefault(),v(true));};return jsxs("div",{ref:y=>{h.current=y,w.current=y,typeof l=="function"?l(y):l&&(l.current=y);},role:"menuitem","aria-haspopup":"menu","aria-expanded":b,tabIndex:r?-1:0,"aria-disabled":r,"data-state":b?"open":"closed","data-disabled":r?"":void 0,className:u("flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",zd[p],t&&"pl-8",!r&&"cursor-pointer",e),onMouseEnter:x,onMouseLeave:R,onKeyDown:C,...i,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});$d.displayName="DropdownSubTrigger";var Gd=j.forwardRef(({className:e,sideOffset:t=2,alignOffset:r=-4,collisionPadding:n=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=j.useContext(Ci);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:m,parentMenuRef:f}=l,[p,g]=j.useState({top:0,left:0}),[h,b]=j.useState(false),v=j.useRef(null),w=j.useRef(null);j.useEffect(()=>{b(true);},[]),j.useEffect(()=>{if(!c||!m.current||!v.current)return;(()=>{if(!m.current||!v.current)return;let y=m.current.getBoundingClientRect(),k=v.current.getBoundingClientRect(),T=window.innerWidth,N=window.innerHeight,M=y.top+r,P=y.right+t;P+k.width>T-n&&(P=y.left-k.width-t),M+k.height>N-n&&(M=N-k.height-n),M<n&&(M=n),g({top:M,left:P});})();},[c,t,r,n,m]);let x=C=>{o?.(C),w.current&&(clearTimeout(w.current),w.current=null),d(true);},R=C=>{a?.(C);let y=C.relatedTarget;m.current?.contains(y)||f?.current?.contains(y)||(w.current=setTimeout(()=>{d(false);},100));};return j.useEffect(()=>()=>{w.current&&clearTimeout(w.current);},[]),!h||!c?null:za.createPortal(jsx("div",{ref:C=>{v.current=C,typeof i=="function"?i(C):i&&(i.current=C);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:p.top,left:p.left},onMouseEnter:x,onMouseLeave:R,...s}),document.body)});Gd.displayName="DropdownSubContent";var Q0=Ti;var jd=j.createContext(null),Mi=()=>{let e=j.useContext(jd);if(!e)throw new Error("Popover components must be used within a Popover");return e},je=({children:e,open:t,defaultOpen:r=false,onOpenChange:n})=>{let[o,a]=j.useState(r),s=t!==void 0,i=s?t:o,l=j.useRef(null),c=j.useId(),d=j.useCallback(m=>{s||a(m),n?.(m);},[s,n]);return jsx(jd.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};je.displayName="Popover";var Et=j.forwardRef(({children:e,onClick:t,...r},n)=>{let{open:o,onOpenChange:a,triggerRef:s,contentId:i}=Mi();return jsx("button",{ref:c=>{s.current=c,typeof n=="function"?n(c):n&&(n.current=c);},type:"button","aria-expanded":o,"aria-haspopup":"dialog","aria-controls":o?i:void 0,onClick:c=>{t?.(c),a(!o);},...r,children:e})});Et.displayName="PopoverTrigger";var Ur=j.forwardRef(({children:e,...t},r)=>{let{triggerRef:n}=Mi();return jsx("div",{ref:o=>{n.current=o,typeof r=="function"?r(o):r&&(r.current=o);},...t,children:e})});Ur.displayName="PopoverAnchor";var _e=j.forwardRef(({className:e,style:t,side:r="bottom",sideOffset:n=4,align:o="center",alignOffset:a=0,onInteractOutside:s,onEscapeKeyDown:i,onOpenAutoFocus:l,onCloseAutoFocus:c,children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentId:b}=Mi(),[v,w]=j.useState({top:0,left:0}),[x,R]=j.useState(false),[C,y]=j.useState(null);if(j.useEffect(()=>{R(true);},[]),j.useEffect(()=>{if(!p||!h.current||!C)return;let T=()=>{if(!h.current||!C)return;let N=h.current.getBoundingClientRect(),M=C.getBoundingClientRect(),P=0,E=0;switch(r){case "top":P=N.top-M.height-n;break;case "bottom":P=N.bottom+n;break;case "left":E=N.left-M.width-n;break;case "right":E=N.right+n;break}if(r==="top"||r==="bottom")switch(o){case "start":E=N.left+a;break;case "center":E=N.left+N.width/2-M.width/2;break;case "end":E=N.right-M.width-a;break}else switch(o){case "start":P=N.top+a;break;case "center":P=N.top+N.height/2-M.height/2;break;case "end":P=N.bottom-M.height-a;break}w({top:P,left:E});};return T(),window.addEventListener("resize",T),window.addEventListener("scroll",T,true),()=>{window.removeEventListener("resize",T),window.removeEventListener("scroll",T,true);}},[p,r,n,o,a,h,C]),j.useEffect(()=>{if(!p)return;let T=N=>{let M=N.target;C&&C.contains(M)||h.current&&h.current.contains(M)||M.closest?.("[data-dropdown-content], [data-popover-content]")||(s?.(),g(false));};return document.addEventListener("mouseup",T),()=>document.removeEventListener("mouseup",T)},[p,g,s,h,C]),j.useEffect(()=>{if(!p)return;let T=N=>{N.key==="Escape"&&(i?.(),g(false));};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[p,g,i]),!x||!p)return null;let k={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[r];return za.createPortal(jsx("div",{ref:T=>{y(N=>N!==T?T:N),typeof f=="function"?f(T):f&&(f.current=T);},id:b,role:"dialog","data-state":p?"open":"closed","data-side":r,className:u("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",k,e),style:{...t,top:v.top,left:v.left},...m,children:d}),document.body)});_e.displayName="PopoverContent";var _d=j.createContext(null),ki=()=>{let e=j.useContext(_d);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},Xd=j.forwardRef(({className:e,value:t,defaultValue:r="",onValueChange:n,variant:o="solid",radius:a="md",orientation:s="horizontal",children:i,...l},c)=>{let[d,m]=j.useState(r),f=t!==void 0,p=f?t:d,g=h=>{f||m(h),n?.(h);};return jsx(_d.Provider,{value:{value:p,onValueChange:g,variant:o,radius:a,orientation:s},children:jsx("div",{ref:c,"data-orientation":s,className:u(s==="vertical"&&"flex gap-4",e),...l,children:i})})});Xd.displayName="Tabs";var Ni={none:{list:"rounded-none",trigger:"rounded-none",indicator:"rounded-none"},sm:{list:"rounded-md",trigger:"rounded-sm",indicator:"rounded-sm"},md:{list:"rounded-lg",trigger:"rounded-md",indicator:"rounded-md"},lg:{list:"rounded-xl",trigger:"rounded-lg",indicator:"rounded-lg"},full:{list:"rounded-full",trigger:"rounded-full",indicator:"rounded-full"}},Yd=j.forwardRef(({className:e,children:t,...r},n)=>{let{variant:o,radius:a,orientation:s,value:i}=ki(),l=j.useRef(null),[c,d]=j.useState({opacity:0});j.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let v=g.querySelector('[data-state="active"]');if(v){let w=g.getBoundingClientRect(),x=v.getBoundingClientRect(),R=s==="vertical";o==="underline"?d(R?{width:2,height:x.height,transform:`translateY(${x.top-w.top}px)`,opacity:1}:{width:x.width,height:2,transform:`translateX(${x.left-w.left}px)`,opacity:1}):o==="solid"&&d(R?{width:x.width,height:x.height,transform:`translateY(${x.top-w.top}px)`,opacity:1}:{width:x.width,height:x.height,transform:`translateX(${x.left-w.left}px)`,opacity:1});}};h();let b=new ResizeObserver(h);return b.observe(g),()=>{b.disconnect();}},[o,s,i]);let m={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",bordered:"bg-transparent p-0 gap-1 !rounded-none"},f=s==="vertical",p=()=>o==="solid"?f?"top-0 left-1 bg-background shadow":"top-1 left-1 bg-background shadow":o==="underline"?f?"top-0 left-0 bg-primary !rounded-full":"bottom-0 left-0 bg-primary !rounded-full":"";return jsxs("div",{ref:g=>{l.current=g,typeof n=="function"?n(g):n&&(n.current=g);},role:"tablist","aria-orientation":s,className:u("relative inline-flex h-9 items-center justify-center text-muted-foreground",f&&"flex-col h-auto w-auto",Ni[a].list,m[o],e),...r,children:[(o==="solid"||o==="underline")&&jsx("span",{className:u("absolute transition-all duration-200 ease-out",Ni[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});Yd.displayName="TabsList";var qd=j.forwardRef(({className:e,value:t,disabled:r,onClick:n,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=ki(),d=s===t,m={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",bordered:"border border-transparent data-[state=active]:border-current data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsx("button",{type:"button",role:"tab",ref:a,"aria-selected":d,"data-state":d?"active":"inactive",disabled:r,className:u("relative z-10 inline-flex items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background transition-all cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",Ni[c].trigger,m[l],e),onClick:f=>{n?.(f),i(t);},...o})});qd.displayName="TabsTrigger";var Zd=j.forwardRef(({className:e,value:t,children:r,...n},o)=>{let{value:a}=ki(),s=a===t;return s?jsx("div",{ref:o,role:"tabpanel","data-state":s?"active":"inactive",className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...n,children:r}):null});Zd.displayName="TabsContent";var Qd=[{label:"At least 8 characters",test:e=>e.length>=8},{label:"Contains uppercase",test:e=>/[A-Z]/.test(e)},{label:"Contains lowercase",test:e=>/[a-z]/.test(e)},{label:"Contains number",test:e=>/[0-9]/.test(e)},{label:"Contains special character",test:e=>/[!@#$%^&*(),.?":{}|<>]/.test(e)}];function eR(e,t=Qd){return e?t.filter(n=>n.test(e)).length/t.length:0}function tR(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function rR(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var zo=0,Pi=null;function Ft(){zo===0&&(Pi=document.body.style.overflow,document.body.style.overflow="hidden"),zo++;}function Kt(){zo--,zo<=0&&(zo=0,document.body.style.overflow=Pi??"",Pi=null);}var eu=j.createContext(null),Aa=()=>{let e=j.useContext(eu);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},tu=({open:e,defaultOpen:t=false,onOpenChange:r,children:n})=>{let[o,a]=j.useState(t),s=e!==void 0,i=s?e:o,l=j.useCallback(c=>{s||a(c),r?.(c);},[s,r]);return jsx(eu.Provider,{value:{open:i,onOpenChange:l},children:n})};tu.displayName="Sheet";var ru=j.forwardRef(({onClick:e,children:t,...r},n)=>{let{onOpenChange:o}=Aa();return jsx("button",{ref:n,type:"button",onClick:s=>{e?.(s),o(true);},...r,children:t})});ru.displayName="SheetTrigger";var nu=j.forwardRef(({onClick:e,children:t,...r},n)=>{let{onOpenChange:o}=Aa();return jsx("button",{ref:n,type:"button",onClick:s=>{e?.(s),o(false);},...r,children:t})});nu.displayName="SheetClose";var Li=({children:e,container:t})=>{let[r,n]=j.useState(false);return j.useEffect(()=>{n(true);},[]),r?za.createPortal(e,t||document.body):null};Li.displayName="SheetPortal";var ou=j.forwardRef(({className:e,...t},r)=>{let{open:n,onOpenChange:o}=Aa();return n?jsx("div",{ref:r,className:u("fixed inset-0 z-50 bg-black/80",n?"animate-in fade-in-0":"animate-out fade-out-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});ou.displayName="SheetOverlay";var au=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),aR=(e,t)=>({top:t?"animate-in slide-in-from-top":"animate-out slide-out-to-top",bottom:t?"animate-in slide-in-from-bottom":"animate-out slide-out-to-bottom",left:t?"animate-in slide-in-from-left":"animate-out slide-out-to-left",right:t?"animate-in slide-in-from-right":"animate-out slide-out-to-right"})[e],su=j.forwardRef(({side:e="right",className:t,children:r,hideCloseButton:n,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=Aa(),[d,m]=j.useState(false),[,f]=j.useState(false);return j.useEffect(()=>{if(l)m(true),f(true),Ft();else {f(true);let p=setTimeout(()=>{m(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{Kt();}},[l]),j.useEffect(()=>{let p=g=>{g.key==="Escape"&&l&&(o?.(),c(false));};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[l,c,o]),!d&&!l?null:jsxs(Li,{children:[jsx("div",{className:u("fixed inset-0 z-50 bg-black/80 transition-opacity duration-300",l?"opacity-100":"opacity-0"),onClick:()=>{a?.(),c(false);},"aria-hidden":"true"}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true",className:u(au({side:e}),aR(e,l),t),...s,children:[!n&&jsxs("button",{type:"button",onClick:()=>c(false),className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none cursor-pointer",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),r]})]})});su.displayName="SheetContent";var iu=({className:e,...t})=>jsx("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});iu.displayName="SheetHeader";var lu=({className:e,...t})=>jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});lu.displayName="SheetFooter";var cu=j.forwardRef(({className:e,...t},r)=>jsx("h2",{ref:r,className:u("text-lg font-semibold text-foreground",e),...t}));cu.displayName="SheetTitle";var du=j.forwardRef(({className:e,...t},r)=>jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...t}));du.displayName="SheetDescription";var lR=({theme:e="system",...t})=>jsx(Toaster,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});var uu=j.createContext(null),Oa=()=>{let e=j.useContext(uu);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Si=j.createContext(null),mu=({children:e,onOpenChange:t})=>{let[r,n]=j.useState(false),[o,a]=j.useState({x:0,y:0}),s=j.useId(),i=j.useCallback(l=>{n(l),t?.(l);},[t]);return jsx(uu.Provider,{value:{open:r,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};mu.displayName="ContextMenu";var pu=j.forwardRef(({children:e,onContextMenu:t,...r},n)=>{let{onOpenChange:o,setPosition:a}=Oa(),s=i=>{i.preventDefault(),a({x:i.clientX,y:i.clientY}),o(true);};return jsx("div",{ref:n,onContextMenu:i=>{t?.(i),s(i);},...r,children:e})});pu.displayName="ContextMenuTrigger";var fu=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"group",className:e,...t}));fu.displayName="ContextMenuGroup";var gu=({children:e,container:t})=>{let[r,n]=j.useState(false);return j.useEffect(()=>{n(true);},[]),r?za.createPortal(e,t||document.body):null};gu.displayName="ContextMenuPortal";var bu=({children:e,open:t,defaultOpen:r=false,onOpenChange:n})=>{let[o,a]=j.useState(r),s=t!==void 0,i=s?t:o,l=j.useRef(null),c=j.useCallback(d=>{s||a(d),n?.(d);},[s,n]);return jsx(Si.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};bu.displayName="ContextMenuSub";var vu=j.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:r,children:n,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Oa(),[d,m]=j.useState(false),[f,p]=j.useState(l),g=j.useRef(null);return j.useEffect(()=>{m(true);},[]),j.useEffect(()=>{if(!s||!g.current){p(l);return}let b=g.current.getBoundingClientRect(),{x:v,y:w}=l;v+b.width>window.innerWidth&&(v=window.innerWidth-b.width-8),w+b.height>window.innerHeight&&(w=window.innerHeight-b.height-8),p({x:v,y:w});},[s,l]),j.useEffect(()=>{if(!s)return;let h=b=>{let v=b.target;g.current&&!g.current.contains(v)&&(t?.(),i(false));};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,i,t]),j.useEffect(()=>{if(!s)return;let h=b=>{b.key==="Escape"&&(r?.(),i(false));};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s,i,r]),!d||!s?null:za.createPortal(jsx("div",{ref:h=>{g.current=h,typeof a=="function"?a(h):a&&(a.current=h);},id:c,role:"menu","aria-orientation":"vertical","data-state":s?"open":"closed",className:u("fixed z-50 max-h-[calc(100vh-2rem)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-md","animate-in fade-in-0 zoom-in-95",e),style:{top:f.y,left:f.x},...o,children:n}),document.body)});vu.displayName="ContextMenuContent";var hu=j.forwardRef(({className:e,inset:t,children:r,onMouseEnter:n,onMouseLeave:o,...a},s)=>{let i=j.useContext(Si);if(!i)throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");let{open:l,onOpenChange:c,triggerRef:d}=i,m=p=>{n?.(p),c(true);},f=p=>{o?.(p),c(false);};return jsxs("div",{ref:p=>{d.current=p,typeof s=="function"?s(p):s&&(s.current=p);},role:"menuitem","aria-haspopup":"menu","aria-expanded":l,"data-state":l?"open":"closed",className:u("flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[state=open]:bg-zinc-100 dark:data-[state=open]:bg-zinc-800",t&&"pl-8",e),onMouseEnter:m,onMouseLeave:f,...a,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});hu.displayName="ContextMenuSubTrigger";var xu=j.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:r,onMouseLeave:n,...o},a)=>{let s=j.useContext(Si);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,m]=j.useState({top:0,left:0}),[f,p]=j.useState(false),g=j.useRef(null);j.useEffect(()=>{p(true);},[]),j.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let w=c.current.getBoundingClientRect(),x=g.current.getBoundingClientRect(),R=w.top,C=w.right+t;C+x.width>window.innerWidth&&(C=w.left-x.width-t),m({top:R,left:C});})();},[i,t,c]);let h=v=>{r?.(v),l(true);},b=v=>{n?.(v),l(false);};return !f||!i?null:za.createPortal(jsx("div",{ref:v=>{g.current=v,typeof a=="function"?a(v):a&&(a.current=v);},role:"menu","data-state":i?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:d.top,left:d.left},onMouseEnter:h,onMouseLeave:b,...o}),document.body)});xu.displayName="ContextMenuSubContent";var yu=j.forwardRef(({className:e,inset:t,disabled:r,onSelect:n,onClick:o,...a},s)=>{let{onOpenChange:i}=Oa(),l=c=>{if(r){c.preventDefault();return}o?.(c),n?.(),i(false);};return jsx("div",{ref:s,role:"menuitem",tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,className:u("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",t&&"pl-8",e),onClick:l,...a})});yu.displayName="ContextMenuItem";var Ru=j.forwardRef(({className:e,children:t,checked:r=false,onCheckedChange:n,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Oa(),c=d=>{if(o){d.preventDefault();return}a?.(d),n?.(!r),l(false);};return jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":r,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":r?"checked":"unchecked",className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:c,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r&&jsx(Check,{className:"h-4 w-4"})}),t]})});Ru.displayName="ContextMenuCheckboxItem";var wu=j.forwardRef(({className:e,inset:t,...r},n)=>jsx("div",{ref:n,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...r}));wu.displayName="ContextMenuSection";var Cu=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"separator",className:u("-mx-1 my-1 h-px bg-border",e),...t}));Cu.displayName="ContextMenuSeparator";var Tu=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Tu.displayName="ContextMenuShortcut";var Nu=j.createContext(null),pR=()=>{let e=j.useContext(Nu);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},ku=j.forwardRef(({className:e,value:t,defaultValue:r="",onValueChange:n,name:o,disabled:a,required:s,orientation:i="vertical",children:l,...c},d)=>{let[m,f]=j.useState(r),p=t!==void 0,g=p?t:m,h=j.useId(),b=v=>{p||f(v),n?.(v);};return jsx("div",{ref:d,role:"radiogroup","aria-required":s,"aria-orientation":i,className:u(i==="vertical"?"grid gap-2":"flex gap-4",e),...c,children:jsx(Nu.Provider,{value:{name:o||h,value:g,onValueChange:b,disabled:a,required:s},children:l})})});ku.displayName="RadioGroup";var Pu=j.forwardRef(({className:e,value:t,disabled:r,...n},o)=>{let a=pR(),s=a.value===t,i=r||a.disabled;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"radio","aria-checked":s,disabled:i,ref:o,className:u("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer",e),onClick:()=>a.onValueChange(t),...n,children:s&&jsx("span",{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}),jsx("input",{type:"radio","aria-hidden":true,tabIndex:-1,name:a.name,value:t,checked:s,required:a.required,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});Pu.displayName="RadioGroupItem";var Fa=cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{solid:"bg-transparent hover:bg-muted data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",bordered:"border border-current bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",ghost:"bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",soft:"bg-transparent hover:bg-primary/10 data-[state=on]:bg-primary/15 data-[state=on]:text-primary",surface:"bg-muted/50 hover:bg-muted data-[state=on]:bg-muted data-[state=on]:text-foreground"},size:{sm:"h-9 px-2.5 min-w-9",md:"h-10 px-3 min-w-10",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"solid",size:"md"}}),Eu=j.forwardRef(({className:e,variant:t,size:r,pressed:n,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,m]=j.useState(o),f=n!==void 0,p=f?n:d,g=()=>{if(s)return;let b=!p;f||m(b),a?.(b);},h=b=>{b.key==="Enter"&&b.preventDefault(),i?.(b);};return jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:c,className:u(Fa({variant:t,size:r,className:e})),onClick:g,onKeyDown:h,...l})});Eu.displayName="Toggle";var Lu=j.createContext(null),hR=()=>{let e=j.useContext(Lu);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},Su=j.forwardRef(({className:e,variant:t,size:r,type:n,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[m,f]=j.useState(()=>n==="single"?a?[a]:[]:a||[]),p=o!==void 0,g=p?n==="single"?o?[o]:[]:o:m,h=b=>{if(n==="single"){let v=g.includes(b)?[]:[b];p||f(v),s?.(v[0]||"");}else {let v=g.includes(b)?g.filter(w=>w!==b):[...g,b];p||f(v),s?.(v);}};return jsx("div",{ref:d,role:"group",className:u("flex items-center justify-center gap-1",e),...c,children:jsx(Lu.Provider,{value:{type:n,variant:t,size:r,value:g,onValueChange:h,disabled:i},children:l})})});Su.displayName="ToggleGroup";var Du=j.forwardRef(({className:e,children:t,variant:r,size:n,value:o,disabled:a,...s},i)=>{let l=hR(),c=l.value.includes(o),d=a||l.disabled;return jsx("button",{type:"button",role:"radio","aria-checked":c,"aria-pressed":c,"data-state":c?"on":"off",disabled:d,ref:i,className:u(Fa({variant:l.variant||r,size:l.size||n}),e),onClick:()=>l.onValueChange(o),...s,children:t})});Du.displayName="ToggleGroupItem";var $a=j.forwardRef(({className:e,value:t,defaultValue:r=[0],onValueChange:n,onValueCommit:o,min:a=0,max:s=100,step:i=1,disabled:l=false,orientation:c="horizontal",name:d,...m},f)=>{let[p,g]=j.useState(r),h=t!==void 0,b=h?t:p,v=j.useRef(null),[w,x]=j.useState(false),[R,C]=j.useState(null),y=(H,L)=>{if(!v.current)return b[0];let S=v.current.getBoundingClientRect(),V;c==="horizontal"?V=(H-S.left)/S.width:V=1-(L-S.top)/S.height,V=Math.max(0,Math.min(1,V));let A=a+V*(s-a),B=Math.round(A/i)*i;return Math.max(a,Math.min(s,B))},k=(H,L)=>{let S=[...b];S[L]=H,L>0&&H<b[L-1]&&(S[L]=b[L-1]),L<b.length-1&&H>b[L+1]&&(S[L]=b[L+1]),h||g(S),n?.(S);},T=(H,L)=>{l||(H.preventDefault(),x(true),C(L),H.target.setPointerCapture(H.pointerId));},N=H=>{if(!w||R===null||l)return;let L=y(H.clientX,H.clientY);k(L,R);},M=()=>{w&&(x(false),C(null),o?.(b));},P=H=>{if(l)return;let L=y(H.clientX,H.clientY),S=0,V=Math.abs(b[0]-L);for(let A=1;A<b.length;A++){let B=Math.abs(b[A]-L);B<V&&(V=B,S=A);}k(L,S),o?.([...b.slice(0,S),L,...b.slice(S+1)]);},E=(H,L)=>{if(l)return;let S=b[L];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),S=Math.min(s,b[L]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),S=Math.max(a,b[L]-i);break;case "Home":H.preventDefault(),S=a;break;case "End":H.preventDefault(),S=s;break;default:return}k(S,L),o?.([...b.slice(0,L),S,...b.slice(L+1)]);},D=H=>(H-a)/(s-a)*100;return jsxs("div",{ref:f,className:u("relative flex touch-none select-none items-center",c==="vertical"&&"flex-col h-full w-5",l&&"opacity-50 pointer-events-none",e),...m,children:[jsx("div",{ref:v,className:u("relative grow overflow-hidden rounded-full bg-secondary",c==="horizontal"?"h-2 w-full":"h-full w-2"),onClick:P,children:jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:b.length>1?`${D(b[0])}%`:0,right:`${100-D(b[b.length-1])}%`,top:0,bottom:0}:{bottom:b.length>1?`${D(b[0])}%`:0,top:`${100-D(b[b.length-1])}%`,left:0,right:0}})}),b.map((H,L)=>jsx("div",{role:"slider",tabIndex:l?-1:0,"aria-valuemin":a,"aria-valuemax":s,"aria-valuenow":H,"aria-orientation":c,"aria-disabled":l,className:u("absolute block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-grab",w&&R===L&&"cursor-grabbing"),style:c==="horizontal"?{left:`calc(${D(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${D(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:S=>T(S,L),onPointerMove:N,onPointerUp:M,onPointerCancel:M,onKeyDown:S=>E(S,L)},L)),d&&b.map((H,L)=>jsx("input",{type:"hidden",name:b.length>1?`${d}[${L}]`:d,value:H},L))]})});$a.displayName="Slider";var Hu=j.createContext(null),Iu=()=>{let e=j.useContext(Hu);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Hi=j.createContext(null),Vu=()=>{let e=j.useContext(Hi);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},Au=j.forwardRef(({className:e,type:t="multiple",value:r,defaultValue:n,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,m]=j.useState(()=>t==="single"?n?[n]:[]:n||[]),f=j.useRef(new Map),p=j.useRef([]),g=r!==void 0,h=g?t==="single"?r?[r]:[]:r:d,b=R=>{if(t==="single"){let y=h.includes(R)&&a?[]:[R];g||m(y),o?.(y[0]||"");}else {let C=h.includes(R)?h.filter(y=>y!==R):[...h,R];g||m(C),o?.(C);}},v=j.useCallback((R,C)=>{f.current.set(R,C),p.current.includes(R)||p.current.push(R);},[]),w=j.useCallback(R=>{f.current.delete(R),p.current=p.current.filter(C=>C!==R);},[]),x=j.useCallback(R=>{let C=p.current;if(C.length===0)return;let y=document.activeElement,k;f.current.forEach((E,D)=>{E===y&&(k=D);});let T=k?C.indexOf(k):-1,N;switch(R){case "first":N=0;break;case "last":N=C.length-1;break;case "next":N=T===-1?0:(T+1)%C.length;break;case "prev":N=T===-1?C.length-1:(T-1+C.length)%C.length;break}let M=C[N];f.current.get(M)?.focus();},[]);return jsx(Hu.Provider,{value:{type:t,value:h,onValueChange:b,collapsible:a,disabled:s,registerTrigger:v,unregisterTrigger:w,focusTrigger:x},children:jsx("div",{ref:c,"data-orientation":"vertical",className:u("w-full",e),...l,children:i})})});Au.displayName="Accordion";var zu=j.forwardRef(({className:e,value:t,disabled:r,title:n,subtitle:o,startContent:a,children:s,...i},l)=>{let c=Iu(),d=c.value.includes(t),m=r||c.disabled||false,f=j.useId(),p=j.useId();return n!==void 0?jsx(Hi.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsxs("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:[jsx(Ou,{children:jsxs("div",{className:"flex items-center gap-3",children:[a,jsxs("div",{className:"flex flex-col items-start",children:[jsx("span",{className:"text-sm font-medium",children:n}),o&&jsx("span",{className:"text-xs text-muted-foreground",children:o})]})]})}),jsx(Bu,{children:s})]})}):jsx(Hi.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsx("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:s})})});zu.displayName="AccordionItem";var Ou=j.forwardRef(({className:e,children:t,onClick:r,onKeyDown:n,...o},a)=>{let s=Iu(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:m}=Vu(),f=j.useRef(null);j.useEffect(()=>{let g=f.current;return g&&!c&&s.registerTrigger(i,g),()=>{s.unregisterTrigger(i);}},[i,c,s]);let p=g=>{switch(n?.(g),g.key){case "ArrowDown":g.preventDefault(),s.focusTrigger("next");break;case "ArrowUp":g.preventDefault(),s.focusTrigger("prev");break;case "Home":g.preventDefault(),s.focusTrigger("first");break;case "End":g.preventDefault(),s.focusTrigger("last");break}};return jsx("h3",{className:"flex",children:jsxs("button",{type:"button",ref:g=>{f.current=g,typeof a=="function"?a(g):a&&(a.current=g);},id:m,"aria-controls":d,"aria-expanded":l,disabled:c,"data-state":l?"open":"closed",className:u("flex flex-1 items-center justify-between py-4 font-medium transition-all text-left cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),onClick:g=>{r?.(g),s.onValueChange(i);},onKeyDown:p,...o,children:[t,jsx(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});Ou.displayName="AccordionTrigger";var Bu=j.forwardRef(({className:e,children:t,style:r,...n},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=Vu();return jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("grid transition-[grid-template-rows] duration-200 ease-out",a?"grid-rows-[1fr]":"grid-rows-[0fr]",e),style:r,...n,children:jsx("div",{className:"overflow-hidden",children:jsx("div",{className:"pb-4 pt-0 text-sm",children:t})})})});Bu.displayName="AccordionContent";var Ku=j.createContext(null),$u=()=>{let e=j.useContext(Ku);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},Gu=j.forwardRef(({className:e,open:t,defaultOpen:r=false,onOpenChange:n,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=j.useState(r),m=t!==void 0,f=m?t:c,p=j.useId(),g=j.useId(),h=b=>{o||(m||d(b),n?.(b));};return jsx(Ku.Provider,{value:{open:f,onOpenChange:h,disabled:o,contentId:p,triggerId:g},children:jsxs("div",{ref:l,"data-state":f?"open":"closed","data-disabled":o?"":void 0,className:u("space-y-2",e),...i,children:[a&&jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsx("h4",{className:"text-sm font-semibold",children:a}),jsx(Ii,{})]}),s]})})});Gu.displayName="Collapsible";var Ii=j.forwardRef(({className:e,children:t,onClick:r,...n},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=$u();return jsx(ae,{ref:o,id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,variant:"light",size:"sm",isIconOnly:true,className:e,onClick:d=>{r?.(d),s(!a);},...n,children:t??jsx(ChevronsUpDown,{className:u("h-4 w-4 transition-transform duration-200",a&&"rotate-180")})})});Ii.displayName="CollapsibleTrigger";var Uu=j.forwardRef(({className:e,children:t,style:r,...n},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=$u(),c=j.useRef(null),[d,m]=j.useState(0),[f,p]=j.useState(false),[g,h]=j.useState(a);j.useEffect(()=>{a?(h(true),m(0),p(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.current&&m(c.current.scrollHeight);});})):(p(true),c.current?(m(c.current.scrollHeight),requestAnimationFrame(()=>{m(0);})):m(0));},[a]);let b=()=>{p(false),a||h(false);};return g?jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("overflow-hidden",e),style:{...r,height:f?d:a?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:a?1:0},onTransitionEnd:b,...n,children:jsx("div",{ref:c,className:"space-y-2",children:t})}):null});Uu.displayName="CollapsibleContent";var Wa=j.forwardRef(({className:e,value:t=0,max:r=100,label:n,showPercentage:o=false,formatPercentage:a=l=>`${Math.round(l)}%`,...s},i)=>{let l=Math.min(Math.max(t/r*100,0),100);return jsxs("div",{ref:i,className:"w-full",children:[(n||o)&&jsxs("div",{className:"flex justify-between text-sm mb-2",children:[n&&jsx("span",{className:"text-muted-foreground",children:n}),o&&jsx("span",{className:u("text-muted-foreground",!n&&"ml-auto"),children:a(l)})]}),jsx("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":r,"aria-label":typeof n=="string"?n:void 0,className:u("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...s,children:jsx("div",{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-l}%)`}})})]})});Wa.displayName="Progress";var Xu=j.createContext(null),Yu=()=>{let e=j.useContext(Xu);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},qu=({children:e,open:t,defaultOpen:r=false,onOpenChange:n,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=j.useState(r),c=t!==void 0,d=c?t:i,m=j.useRef(null),f=j.useId(),p=j.useRef(null),g=j.useRef(null),h=j.useCallback(b=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),b?p.current=setTimeout(()=>{c||l(true),n?.(true);},o):g.current=setTimeout(()=>{c||l(false),n?.(false);},a);},[c,n,o,a]);return j.useEffect(()=>{if(!s||!d)return;let b=()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),c||l(false),n?.(false);};return window.addEventListener("scroll",b,true),()=>window.removeEventListener("scroll",b,true)},[s,d,c,n]),j.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsx(Xu.Provider,{value:{open:d,onOpenChange:h,triggerRef:m,contentId:f},children:e})};qu.displayName="HoverCard";var Zu=j.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:r,onFocus:n,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=Yu();return jsx("a",{ref:p=>{l.current=p,typeof s=="function"?s(p):s&&(s.current=p);},onMouseEnter:p=>{t?.(p),i(true);},onMouseLeave:p=>{r?.(p),i(false);},onFocus:p=>{n?.(p),i(true);},onBlur:p=>{o?.(p),i(false);},...a,children:e})});Zu.displayName="HoverCardTrigger";var Qu=j.forwardRef(({className:e,side:t="bottom",sideOffset:r=4,align:n="center",alignOffset:o=0,onMouseEnter:a,onMouseLeave:s,children:i,...l},c)=>{let{open:d,onOpenChange:m,triggerRef:f,contentId:p}=Yu(),[g,h]=j.useState({top:0,left:0}),[b,v]=j.useState(false),w=j.useRef(null);j.useEffect(()=>{v(true);},[]),j.useEffect(()=>{if(!d||!f.current||!w.current)return;(()=>{if(!f.current||!w.current)return;let k=f.current.getBoundingClientRect(),T=w.current.getBoundingClientRect(),N=0,M=0;switch(t){case "top":N=k.top-T.height-r;break;case "bottom":N=k.bottom+r;break;case "left":M=k.left-T.width-r;break;case "right":M=k.right+r;break}if(t==="top"||t==="bottom")switch(n){case "start":M=k.left+o;break;case "center":M=k.left+k.width/2-T.width/2;break;case "end":M=k.right-T.width-o;break}else switch(n){case "start":N=k.top+o;break;case "center":N=k.top+k.height/2-T.height/2;break;case "end":N=k.bottom-T.height-o;break}h({top:N,left:M});})();},[d,t,r,n,o,f]);let x=y=>{a?.(y),m(true);},R=y=>{s?.(y),m(false);};if(!b||!d)return null;let C={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return za.createPortal(jsx("div",{ref:y=>{w.current=y,typeof c=="function"?c(y):c&&(c.current=y);},id:p,"data-state":d?"open":"closed","data-side":t,className:u("fixed z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:g.top,left:g.left},onMouseEnter:x,onMouseLeave:R,...l,children:i}),document.body)});Qu.displayName="HoverCardContent";var Ju=j.createContext({size:"md",variant:"default",radius:"md"}),_a=()=>j.useContext(Ju);cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var TR=cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),MR=cva("",{variants:{size:{sm:"[&>svg]:h-3 [&>svg]:w-3",md:"[&>svg]:h-3.5 [&>svg]:w-3.5",lg:"[&>svg]:h-4 [&>svg]:w-4"}},defaultVariants:{size:"md"}}),NR=cva("flex items-center justify-center",{variants:{size:{sm:"h-6 w-6 [&>svg]:h-3 [&>svg]:w-3",md:"h-8 w-8 [&>svg]:h-4 [&>svg]:w-4",lg:"h-10 w-10 [&>svg]:h-5 [&>svg]:w-5"}},defaultVariants:{size:"md"}}),em=j.forwardRef(({size:e="md",variant:t="default",radius:r="md",children:n,...o},a)=>jsx(Ju.Provider,{value:{size:e,variant:t,radius:r},children:jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:n})}));em.displayName="Breadcrumb";var tm=j.forwardRef(({className:e,...t},r)=>{let{size:n,variant:o,radius:a}=_a();return jsx("ol",{ref:r,className:u(TR({size:n,variant:o,radius:o==="default"?void 0:a}),e),...t})});tm.displayName="BreadcrumbList";var rm=j.forwardRef(({className:e,...t},r)=>{let{size:n}=_a();return jsx("li",{ref:r,className:u("inline-flex items-center",n==="sm"&&"gap-1",n==="md"&&"gap-1.5",n==="lg"&&"gap-2",e),...t})});rm.displayName="BreadcrumbItem";var nm=j.forwardRef(({className:e,...t},r)=>jsx("a",{ref:r,className:u("transition-colors hover:text-foreground cursor-pointer",e),...t}));nm.displayName="BreadcrumbLink";var om=j.forwardRef(({className:e,...t},r)=>jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:u("font-medium text-foreground",e),...t}));om.displayName="BreadcrumbPage";var am=({children:e,className:t,...r})=>{let{size:n}=_a();return jsx("li",{role:"presentation","aria-hidden":"true",className:u(MR({size:n}),"text-muted-foreground/60",t),...r,children:e??jsx(ChevronRight,{})})};am.displayName="BreadcrumbSeparator";var sm=({className:e,...t})=>{let{size:r}=_a();return jsxs("span",{role:"presentation","aria-hidden":"true",className:u(NR({size:r}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};sm.displayName="BreadcrumbEllipsis";var cm=j.forwardRef(({ratio:e=1,className:t,style:r,children:n,...o},a)=>jsx("div",{ref:a,className:u("relative w-full",t),style:{...r,paddingBottom:`${100/e}%`},...o,children:jsx("div",{className:"absolute inset-0",children:n})}));cm.displayName="AspectRatio";var mm=j.createContext(null),Ai=()=>{let e=j.useContext(mm);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},pm=j.createContext(null),fm=()=>{let e=j.useContext(pm);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},gm=j.forwardRef(({className:e,orientation:t="horizontal",children:r,...n},o)=>{let[a,s]=j.useState(null);return jsx(mm.Provider,{value:{activeItem:a,setActiveItem:s,orientation:t},children:jsxs("nav",{ref:o,className:u("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[r,jsx(zi,{})]})})});gm.displayName="NavigationMenu";var bm=j.forwardRef(({className:e,...t},r)=>{let{orientation:n}=Ai();return jsx("ul",{ref:r,className:u("group flex flex-1 list-none items-center justify-center gap-1",n==="vertical"&&"flex-col items-start",e),...t})});bm.displayName="NavigationMenuList";var vm=j.forwardRef(({className:e,children:t,...r},n)=>{let{activeItem:o,setActiveItem:a}=Ai(),s=j.useId(),i=j.useRef(null),l=o===s,c=j.useCallback(d=>{a(d?s:null);},[s,a]);return jsx(pm.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsx("li",{ref:n,className:u("relative",e),...r,children:t})})});vm.displayName="NavigationMenuItem";var hm=cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50"),xm=j.forwardRef(({className:e,children:t,onMouseEnter:r,onClick:n,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=fm(),c=m=>{r?.(m),l(true);},d=m=>{n?.(m),l(!i);};return jsxs("button",{ref:m=>{s.current=m,typeof a=="function"?a(m):a&&(a.current=m);},type:"button","data-state":i?"open":"closed",className:u(hm(),"group",e),onMouseEnter:c,onClick:d,"aria-expanded":i,...o,children:[t,jsx(ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})});xm.displayName="NavigationMenuTrigger";var ym=j.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:r,...n},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=fm(),l=j.useRef(null),[c,d]=j.useState({top:0,left:0});j.useEffect(()=>{if(!a||!i.current)return;let p=()=>{if(!i.current)return;let g=i.current.getBoundingClientRect();d({top:g.bottom+4,left:g.left});};return p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[a,i]);let m=p=>{t?.(p),s(true);},f=p=>{r?.(p),s(false);};return a?za.createPortal(jsx("div",{ref:p=>{l.current=p,typeof o=="function"?o(p):o&&(o.current=p);},"data-state":a?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-4 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:c.top,left:c.left},onMouseEnter:m,onMouseLeave:f,...n}),document.body):null});ym.displayName="NavigationMenuContent";var Rm=cva("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"),wm=j.forwardRef(({className:e,active:t,...r},n)=>jsx("a",{ref:n,className:u(Rm(),t&&"bg-accent text-accent-foreground",e),...r}));wm.displayName="NavigationMenuLink";var zi=j.forwardRef((e,t)=>null);zi.displayName="NavigationMenuViewport";var Cm=j.forwardRef(({className:e,...t},r)=>{let{activeItem:n}=Ai();return n?jsx("div",{ref:r,className:u("top-full z-[1] flex h-2.5 items-end justify-center overflow-hidden","data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}):null});Cm.displayName="NavigationMenuIndicator";var km=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),yt=j.forwardRef(({className:e,size:t,...r},n)=>{let a={sm:14,md:16,lg:20}[t??"md"];return jsx("button",{ref:n,type:"button",className:u(km({size:t}),e),"aria-label":"Close",...r,children:jsx(X,{style:{width:a,height:a}})})});yt.displayName="CloseButton";var Xa=j.createContext(null);function zR(){let e=j.useContext(Xa);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function jr(){return j.useContext(Xa)}var OR="16rem",BR="18rem",FR="3rem",KR="b",$R={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},GR={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},Oi=j.forwardRef(({defaultOpen:e=false,open:t,onOpenChange:r,placement:n="left",size:o="md",backdrop:a="opaque",isDismissable:s=true,hideCloseButton:i=false,collapsible:l="offcanvas",mode:c,className:d,style:m,children:f,...p},g)=>{let h=c??"overlay",b=h==="overlay",[v,w]=j.useState(false),[x,R]=j.useState(false),[C,y]=j.useState(e),k=t??C,T=j.useCallback(E=>{let D=typeof E=="function"?E(k):E;r?r(D):y(D);},[r,k]);j.useEffect(()=>{let E=()=>{w(window.innerWidth<768);};return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);let N=j.useCallback(()=>b?T(E=>!E):v?R(E=>!E):T(E=>!E),[v,T,R,b]);j.useEffect(()=>{if(b)return;let E=D=>{D.key===KR&&(D.metaKey||D.ctrlKey)&&(D.preventDefault(),N());};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[N,b]);let M=k?"expanded":"collapsed",P=j.useMemo(()=>({placement:n,state:M,open:k,setOpen:T,isMobile:v,openMobile:x,setOpenMobile:R,toggleDrawer:N,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[n,M,k,T,v,x,R,N,l,h,o,a,s,i]);return b?jsx(Xa.Provider,{value:P,children:jsx(Drawer.Root,{open:k,onOpenChange:T,direction:n,dismissible:s,children:f})}):jsx(Xa.Provider,{value:P,children:jsx(Fr,{delayDuration:0,children:jsx("div",{ref:g,style:{"--drawer-width":OR,"--drawer-width-icon":FR,...m},className:u("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});Oi.displayName="Drawer";var Em=j.forwardRef(({variant:e="default",embedded:t=false,className:r,children:n,...o},a)=>{let s=jr();if(!s)return jsx("div",{ref:a,className:u("flex h-full flex-col bg-background text-foreground",r),...o,children:n});let{placement:i,collapsible:l,isMobile:c,state:d,openMobile:m,setOpenMobile:f}=s;if(i==="bottom"||i==="top")return jsx(Fragment,{children:n});if(l==="none")return jsx("div",{ref:a,className:u("flex h-full w-[--drawer-width] flex-col bg-background text-foreground border-r",i==="right"&&"border-l border-r-0",r),...o,children:n});if(c&&!t)return jsx(UR,{open:m,onOpenChange:f,placement:i,children:n});if(t){let g=d==="collapsed",h=l==="offcanvas",b=l==="icon";return jsx("div",{ref:a,className:u("group peer text-foreground relative"),"data-state":d,"data-collapsible":g?l:"","data-variant":e,"data-placement":i,"data-embedded":"true",children:jsx("div",{className:u("flex h-full flex-col overflow-hidden transition-[width,opacity] duration-200 ease-out",h?g?"w-0 opacity-0":"w-[--drawer-width] opacity-100":b&&g?"w-[--drawer-width-icon]":"w-[--drawer-width]",r),...o,children:jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background transition-opacity duration-200",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border",e==="default"&&i==="left"&&"border-r",e==="default"&&i==="right"&&"border-l"),children:n})})})}return jsxs("div",{ref:a,className:"group peer hidden md:block text-foreground","data-state":d,"data-collapsible":d==="collapsed"?l:"","data-variant":e,"data-placement":i,children:[jsx("div",{className:u("duration-200 relative h-svh w-[--drawer-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0",i==="right"&&"group-data-[placement=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--drawer-width-icon]")}),jsx("div",{className:u("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--drawer-width] transition-[left,right,width] ease-linear md:flex",i==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--drawer-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--drawer-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--drawer-width-icon] group-data-[placement=left]:border-r group-data-[placement=right]:border-l",r),...o,children:jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border"),children:n})})]})});Em.displayName="DrawerSidebar";var UR=({children:e,open:t,onOpenChange:r,placement:n})=>{let[o,a]=j.useState(false);return j.useEffect(()=>{a(true);},[]),j.useEffect(()=>{if(t)return Ft(),()=>Kt()},[t]),!o||!t?null:za.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>r(false)}),jsx("div",{className:u("fixed z-50 bg-background p-0 text-foreground shadow-lg","animate-in",n==="left"&&"inset-y-0 left-0 h-full w-[--drawer-width] slide-in-from-left",n==="right"&&"inset-y-0 right-0 h-full w-[--drawer-width] slide-in-from-right"),style:{"--drawer-width":BR},children:jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},Lm=j.forwardRef(({className:e,onClick:t,...r},n)=>{let o=jr();if(o?.mode==="overlay")return jsx(Drawer.Trigger,{ref:n,className:e,onClick:t,...r});let a=o?.toggleDrawer;return jsxs("button",{ref:n,type:"button","data-drawer":"trigger",className:u("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-accent transition-colors cursor-pointer",e),onClick:s=>{t?.(s),a?.();},...r,children:[jsx(PanelLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle Drawer"})]})});Lm.displayName="DrawerTrigger";var Sm=j.forwardRef(({className:e,children:t,...r},n)=>{let o=jr(),a=o?.mode==="overlay",s=o?.placement||"left",i=o?.size||"md",l=o?.backdrop||"opaque",c=o?.hideCloseButton||false;if(a){let d=s==="top"||s==="bottom",m=s==="left"||s==="right",f=m?$R[i]:GR[i],p={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},g={top:"inset-x-0 top-0 rounded-b-[10px]",bottom:"inset-x-0 bottom-0 rounded-t-[10px]",left:"inset-y-0 left-0 rounded-r-[10px]",right:"inset-y-0 right-0 rounded-l-[10px]"};return jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:u("fixed inset-0 z-50",p[l])}),jsxs(Drawer.Content,{ref:n,className:u("fixed z-50 flex flex-col border bg-background",g[s],e),style:{...m?{width:f,height:"100%"}:{},...d?{maxHeight:f}:{},...r.style},...r,children:[m&&!c&&jsx(Drawer.Close,{asChild:true,children:jsx(yt,{className:"absolute right-4 top-4 z-10"})}),d&&jsx("div",{className:u("mx-auto h-2 w-[100px] rounded-full bg-muted",s==="top"?"mb-4 mt-auto":"mt-4")}),t]})]})}return jsx("div",{ref:n,className:u("flex flex-col h-full",e),...r,children:t})});Sm.displayName="DrawerContent";var Dm=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-drawer":"header",className:u("flex flex-col gap-2 p-4",e),...t}));Dm.displayName="DrawerHeader";var Hm=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-drawer":"body",className:u("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-4 group-data-[collapsible=icon]:overflow-hidden",e),...t}));Hm.displayName="DrawerBody";var Im=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-drawer":"footer",className:u("flex flex-col gap-2 p-4 mt-auto",e),...t}));Im.displayName="DrawerFooter";var Vm=j.forwardRef(({className:e,...t},r)=>jr()?.mode==="overlay"?jsx(Drawer.Title,{ref:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}):jsx("h2",{ref:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}));Vm.displayName="DrawerTitle";var Am=j.forwardRef(({className:e,...t},r)=>jr()?.mode==="overlay"?jsx(Drawer.Description,{ref:r,className:u("text-sm text-muted-foreground",e),...t}):jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...t}));Am.displayName="DrawerDescription";var zm=j.forwardRef(({className:e,onClick:t,...r},n)=>{let o=jr();return o?.mode==="overlay"?jsx(Drawer.Close,{ref:n,className:e,onClick:t,...r}):jsx(yt,{ref:n,className:e,onClick:s=>{t?.(s),o?.setOpen(false);},...r})});zm.displayName="DrawerClose";var Om=j.forwardRef(({className:e,onClick:t,showLabel:r=true,...n},o)=>{let a=jr();if(!a)return null;let{toggleDrawer:s,state:i,placement:l}=a,c=i==="collapsed",d=l==="left",m=d?PanelLeftOpen:PanelRightOpen,f=d?PanelLeftClose:PanelRightClose;return jsxs("button",{ref:o,type:"button","data-drawer":"toggle","data-state":i,className:u("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-muted-foreground","hover:bg-accent hover:text-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),onClick:p=>{t?.(p),s();},...n,children:[c?jsx(m,{className:"h-4 w-4 shrink-0"}):jsx(f,{className:"h-4 w-4 shrink-0"}),r&&jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:c?"Expand":"Collapse"})]})});Om.displayName="DrawerToggle";var Bm=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-drawer":"separator",className:u("mx-4 h-px bg-border",e),...t}));Bm.displayName="DrawerSeparator";var Fm=j.forwardRef(({className:e,...t},r)=>jsx("ul",{ref:r,"data-drawer":"menu",className:u("flex w-full min-w-0 flex-col gap-1",e),...t}));Fm.displayName="DrawerMenu";var Km=j.forwardRef(({className:e,...t},r)=>jsx("li",{ref:r,"data-drawer":"menu-item",className:u("group/menu-item relative",e),...t}));Km.displayName="DrawerMenuItem";var $m=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-ring transition-[width,height,padding] hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 active:bg-accent active:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-accent data-[active=true]:font-medium data-[active=true]:text-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-accent hover:text-accent-foreground",bordered:"bg-background shadow-[0_0_0_1px_currentColor] hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent/50 hover:text-accent-foreground"},size:{sm:"h-7 text-xs",md:"h-8 text-sm",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"md"}}),Gm=j.forwardRef(({isActive:e=false,variant:t="default",size:r="md",tooltip:n,className:o,children:a,...s},i)=>{let l=jr(),c=l?.isMobile??false,d=l?.state??"expanded",m=jsx("button",{ref:i,type:"button","data-drawer":"menu-button","data-size":r,"data-active":e,className:u($m({variant:t,size:r}),o),...s,children:a});return n?jsxs(Kr,{children:[jsx($r,{children:m}),jsx(Gr,{side:"right",align:"center",hidden:d!=="collapsed"||c,...typeof n=="string"?{children:n}:n})]}):m});Gm.displayName="DrawerMenuButton";var Um=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-drawer":"group",className:u("relative flex w-full min-w-0 flex-col p-2",e),...t}));Um.displayName="DrawerGroup";var Wm=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,"data-drawer":"group-label",className:u("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-muted-foreground outline-none transition-[margin,opacity] ease-linear","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...t}));Wm.displayName="DrawerGroupLabel";var jm=j.forwardRef(({className:e,...t},r)=>jsx("main",{ref:r,className:u("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));jm.displayName="DrawerInset";var WR=Oi;var Xm=j.forwardRef(({className:e,...t},r)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:r,className:u("w-full caption-bottom text-sm",e),...t})}));Xm.displayName="Table";var Ym=j.forwardRef(({className:e,...t},r)=>jsx("thead",{ref:r,className:u("[&_tr]:border-b",e),...t}));Ym.displayName="TableHeader";var qm=j.forwardRef(({className:e,...t},r)=>jsx("tbody",{ref:r,className:u("[&_tr:last-child]:border-0",e),...t}));qm.displayName="TableBody";var Zm=j.forwardRef(({className:e,...t},r)=>jsx("tfoot",{ref:r,className:u("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Zm.displayName="TableFooter";var Qm=j.forwardRef(({className:e,...t},r)=>jsx("tr",{ref:r,className:u("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Qm.displayName="TableRow";var Jm=j.forwardRef(({className:e,...t},r)=>jsx("th",{ref:r,className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Jm.displayName="TableHead";var ep=j.forwardRef(({className:e,...t},r)=>jsx("td",{ref:r,className:u("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));ep.displayName="TableCell";var tp=j.forwardRef(({className:e,...t},r)=>jsx("caption",{ref:r,className:u("mt-4 text-sm text-muted-foreground",e),...t}));tp.displayName="TableCaption";function ZR({className:e,data:t,columns:r,selectable:n=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(R,C)=>String(C),sortable:i=false,sortState:l,onSortChange:c,paginated:d=false,pageSizeOptions:m=[10,20,50],paginationState:f,onPaginationChange:p,emptyContent:g="No data",loading:h=false,striped:b=false,hoverable:v=true,...w},x){let[R,C]=j.useState(new Set),[y,k]=j.useState({columnId:null,direction:null}),[T,N]=j.useState({pageIndex:0,pageSize:m[0]||10}),M=o??R,P=l??y,E=f??T,D=$=>{a?a($):C($);},H=$=>{c?c($):k($);},L=$=>{p?p($):N($);},S=j.useMemo(()=>{if(!P.columnId||!P.direction)return t;let $=r.find(O=>O.id===P.columnId);return $?[...t].sort((O,W)=>{let z=$.accessor(O),_=$.accessor(W);if(z===_)return 0;if(z==null)return 1;if(_==null)return -1;let Q=String(z).localeCompare(String(_),void 0,{numeric:true});return P.direction==="asc"?Q:-Q}):t},[t,P,r]),V=j.useMemo(()=>{if(!d)return S;let $=E.pageIndex*E.pageSize;return S.slice($,$+E.pageSize)},[S,d,E]),A=Math.ceil(S.length/E.pageSize),B=$=>{if($===true){let O=new Set(V.map((W,z)=>s(W,z)));D(O);}else D(new Set);},I=($,O)=>{let W=new Set(M);O?W.add($):W.delete($),D(W);},F=V.length>0&&V.every(($,O)=>M.has(s($,O))),K=V.some(($,O)=>M.has(s($,O))),Y=$=>{if(!r.find(z=>z.id===$)?.sortable&&!i)return;let W="asc";P.columnId===$&&(P.direction==="asc"?W="desc":P.direction==="desc"&&(W=null)),H({columnId:W?$:null,direction:W});},te=$=>P.columnId!==$?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):P.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:x,className:u("w-full",e),...w,children:[jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxs("tr",{children:[n&&jsx("th",{className:"h-12 w-12 px-4",children:jsx(Io,{checked:F?true:K?"indeterminate":false,onCheckedChange:B,"aria-label":"Select all"})}),r.map($=>{let O=$.sortable??i;return jsx("th",{className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground",O&&"cursor-pointer select-none hover:text-foreground"),style:{width:$.width},onClick:()=>O&&Y($.id),children:jsxs("div",{className:"flex items-center gap-2",children:[$.header,O&&te($.id)]})},$.id)})]})}),jsx("tbody",{className:"[&_tr:last-child]:border-0",children:h?jsx("tr",{children:jsx("td",{colSpan:r.length+(n?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):V.length===0?jsx("tr",{children:jsx("td",{colSpan:r.length+(n?1:0),className:"h-24 text-center text-muted-foreground",children:g})}):V.map(($,O)=>{let W=s($,O),z=M.has(W);return jsxs("tr",{className:u("border-b transition-colors",v&&"hover:bg-muted/50",b&&O%2===1&&"bg-muted/30",z&&"bg-muted"),"data-state":z?"selected":void 0,children:[n&&jsx("td",{className:"w-12 px-4",children:jsx(Io,{checked:z,onCheckedChange:_=>I(W,!!_),"aria-label":`Select row ${O+1}`})}),r.map(_=>jsx("td",{className:"p-4 align-middle",children:_.cell?_.cell($,O):_.accessor($)},_.id))]},W)})})]})}),d&&jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsx("span",{children:"Rows per page:"}),jsx("select",{value:E.pageSize,onChange:$=>L({pageIndex:0,pageSize:Number($.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:m.map($=>jsx("option",{value:$,children:$},$))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",E.pageIndex+1," of ",A||1]}),jsxs("div",{className:"flex gap-1",children:[jsx(ae,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>L({...E,pageIndex:E.pageIndex-1}),disabled:E.pageIndex===0,"aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>L({...E,pageIndex:E.pageIndex+1}),disabled:E.pageIndex>=A-1,"aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var QR=j.forwardRef(ZR);var Bi=["January","February","March","April","May","June","July","August","September","October","November","December"];function aw({currentMonth:e,onMonthChange:t,startYear:r,endYear:n}){let o=getMonth(e),a=getYear(e),s=c=>{let d=setMonth(e,c);t(d);},i=c=>{let d=setYear(e,c);t(d);},l=j.useMemo(()=>{let c=[];for(let d=n;d>=r;d--)c.push(d);return c},[r,n]);return jsxs("div",{className:"flex items-center gap-1",children:[jsxs(fr,{children:[jsx(gr,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{className:"truncate",children:Bi[o]}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(br,{className:"min-w-[120px] p-0",children:jsx(Se,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:Bi.map((c,d)=>jsx(Bt,{onSelect:()=>s(d),className:u("text-xs",o===d&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]}),jsxs(fr,{children:[jsx(gr,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[60px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{children:a}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(br,{className:"min-w-[80px] p-0",children:jsx(Se,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:l.map(c=>jsx(Bt,{onSelect:()=>i(c),className:u("text-xs",a===c&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]})]})}function sw(e,t,r){return function({calendarMonth:o}){let{goToMonth:a,nextMonth:s,previousMonth:i}=useDayPicker();if(e)return jsxs("div",{className:"flex items-center justify-between gap-1 mb-2",children:[jsx(aw,{currentMonth:o.date,onMonthChange:a,startYear:t,endYear:r}),jsxs("div",{className:"flex items-center",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-6 w-6 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsx(ChevronLeft,{className:"h-3.5 w-3.5"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-6 w-6 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-3.5 w-3.5"})})]})]});let l=Bi[o.date.getMonth()],c=o.date.getFullYear();return jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-sm font-medium w-[90px]",children:l}),jsx("span",{className:"text-sm font-medium w-[50px]",children:c})]}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})}}function _r({className:e,classNames:t,showOutsideDays:r=true,showMonthAndYearPickers:n=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=j.useMemo(()=>sw(n,o,a),[n,o,a]);return jsx(DayPicker,{showOutsideDays:r,className:u("p-4",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-2",month_caption:"sr-only",nav:"hidden",month_grid:"w-full border-collapse",weekdays:"flex",weekday:"text-muted-foreground w-8 font-normal text-xs text-center",week:"flex w-full mt-0.5",day:u("relative h-8 w-8 p-0 text-center text-sm","flex items-center justify-center","focus-within:relative focus-within:z-20","[&:has([aria-selected]:not(.outside-day))]:bg-accent","first:[&:has([aria-selected]:not(.outside-day))]:rounded-l-md","last:[&:has([aria-selected]:not(.outside-day))]:rounded-r-md"),day_button:u("size-8 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:u("bg-primary text-primary-foreground rounded-md","hover:bg-primary/90 hover:!text-primary-foreground","focus:bg-primary focus:text-primary-foreground","[&.outside-day]:!bg-transparent [&.outside-day]:!text-muted-foreground/50"),today:"bg-accent text-accent-foreground rounded-md",outside:"outside-day text-muted-foreground/50 !bg-transparent",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none bg-muted text-foreground",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0}},components:{...s,MonthCaption:l},...i})}_r.displayName="Calendar";var ap=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:u("mx-auto flex w-full justify-center",e),...t});ap.displayName="Pagination";var sp=j.forwardRef(({className:e,...t},r)=>jsx("ul",{ref:r,className:u("flex flex-row items-center gap-1",e),...t}));sp.displayName="PaginationContent";var ip=j.forwardRef(({className:e,...t},r)=>jsx("li",{ref:r,className:u("",e),...t}));ip.displayName="PaginationItem";var Ya=({className:e,isActive:t,size:r="icon",...n})=>jsx("a",{"aria-current":t?"page":void 0,className:u(_n({variant:t?"solid":"light",size:r}),e),...n});Ya.displayName="PaginationLink";var lp=({className:e,...t})=>jsxs(Ya,{"aria-label":"Go to previous page",size:"md",className:u("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});lp.displayName="PaginationPrevious";var cp=({className:e,...t})=>jsxs(Ya,{"aria-label":"Go to next page",size:"md",className:u("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});cp.displayName="PaginationNext";var dp=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:u("flex h-9 w-9 items-center justify-center",e),...t,children:[jsx(MoreHorizontal,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"More pages"})]});dp.displayName="PaginationEllipsis";var Oo=j.forwardRef(({className:e,...t},r)=>jsx("span",{ref:r,className:u("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));Oo.displayName="VisuallyHidden";var mp={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},uw={auto:"top-[50%] translate-y-[-50%]",center:"top-[50%] translate-y-[-50%]",top:"top-4 translate-y-0",bottom:"top-auto bottom-4 translate-y-0","top-center":"top-[20%] translate-y-0","bottom-center":"top-auto bottom-[20%] translate-y-0"},pp=cva("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),Gi=cva("fixed left-[50%] z-50 grid translate-x-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Za=j.createContext(null),Tn=()=>{let e=j.useContext(Za);if(!e)throw new Error("Modal components must be used within a Modal");return e},gp=j.forwardRef(({open:e,onOpenChange:t,trigger:r,title:n="Modal",children:o,hideCloseButton:a=false,isDismissable:s=true,isKeyboardDismissDisabled:i=false,backdrop:l="opaque",placement:c="center",scrollBehavior:d="inside",size:m,className:f},p)=>{let[g,h]=j.useState(false),b=e!==void 0,v=b?e:g,[w,x]=j.useState(false),R=j.useRef(null),C=j.useId(),y=j.useId();j.useEffect(()=>{x(true);},[]);let k=j.useCallback(P=>{b||h(P),t?.(P);},[b,t]);j.useEffect(()=>{if(v)return Ft(),()=>Kt()},[v]),j.useEffect(()=>{if(!v||i)return;let P=E=>{E.key==="Escape"&&k(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[v,i,k]);let T=P=>{s&&P.target===P.currentTarget&&k(false);},N=r?j.isValidElement(r)?j.cloneElement(r,{onClick:P=>{r.props.onClick?.(P),k(true);}}):jsx("button",{type:"button",onClick:()=>k(true),children:r}):null,M=()=>!w||!v?null:d==="outside"?za.createPortal(jsx("div",{"data-state":v?"open":"closed",className:u(pp(),mp[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:T,children:jsxs("div",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":v?"open":"closed",className:u("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",m==="xs"&&"w-full max-w-xs",m==="sm"&&"w-full max-w-sm",m==="md"&&"w-full max-w-md",m==="lg"&&"w-full max-w-lg",m==="xl"&&"w-full max-w-xl",m==="2xl"&&"w-full max-w-2xl",m==="3xl"&&"w-full max-w-3xl",m==="4xl"&&"w-full max-w-4xl",m==="5xl"&&"w-full max-w-5xl",m==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!m&&"w-full max-w-md",f),children:[jsx(Oo,{children:jsx("h2",{id:C,children:n})}),o,!a&&jsx(yt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>k(false)})]})}),document.body):za.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":v?"open":"closed",className:u(pp(),mp[l]),onClick:T,"aria-hidden":"true"}),jsxs("div",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":v?"open":"closed",className:u(Gi({size:m}),uw[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsx(Oo,{children:jsx("h2",{id:C,children:n})}),o,!a&&jsx(yt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>k(false)})]})]}),document.body);return jsxs(Za.Provider,{value:{open:v,onOpenChange:k,scrollBehavior:d,titleId:C,descriptionId:y},children:[N,M()]})});gp.displayName="Modal";var Qa=({children:e,open:t,defaultOpen:r=false,onOpenChange:n,scrollBehavior:o="inside"})=>{let[a,s]=j.useState(r),i=t!==void 0,l=i?t:a,c=j.useId(),d=j.useId(),m=j.useCallback(f=>{i||s(f),n?.(f);},[i,n]);return jsx(Za.Provider,{value:{open:l,onOpenChange:m,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};Qa.displayName="ModalRoot";var bp=j.forwardRef(({children:e,onClick:t,...r},n)=>{let{onOpenChange:o}=Tn();return jsx("button",{ref:n,type:"button",onClick:s=>{t?.(s),o(true);},...r,children:e})});bp.displayName="ModalTrigger";var Ui=({children:e,container:t})=>{let[r,n]=j.useState(false);return j.useEffect(()=>{n(true);},[]),r?za.createPortal(e,t||document.body):null};Ui.displayName="ModalPortal";var Wi=j.forwardRef(({className:e,...t},r)=>{let{open:n,onOpenChange:o}=Tn();return n?jsx("div",{ref:r,"data-state":n?"open":"closed",className:u("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});Wi.displayName="ModalOverlay";var vp=j.forwardRef(({children:e,onClick:t,...r},n)=>{let{onOpenChange:o}=Tn();return jsx("button",{ref:n,type:"button",onClick:s=>{t?.(s),o(false);},...r,children:e})});vp.displayName="ModalClose";var Ja=j.forwardRef(({className:e,children:t,size:r,showCloseButton:n=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:m}=Tn(),[f,p]=j.useState(false);return j.useEffect(()=>{p(true);},[]),j.useEffect(()=>{if(l)return Ft(),()=>Kt()},[l]),j.useEffect(()=>{if(!l)return;let g=h=>{h.key==="Escape"&&(o?.(),c(false));};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l,c,o]),!f||!l?null:jsxs(Ui,{children:[jsx(Wi,{}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":m,"data-state":l?"open":"closed",className:u(Gi({size:r}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,n&&jsx(yt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>c(false)})]})]})});Ja.displayName="ModalContent";var hp=({className:e,...t})=>jsx("div",{className:u("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});hp.displayName="ModalHeader";var xp=({className:e,children:t})=>(j.useContext(Za)?.scrollBehavior??"inside")==="inside"?jsx(Se,{className:u("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:u(e),children:t});xp.displayName="ModalBody";var yp=({className:e,children:t,...r})=>{let{onOpenChange:n}=Tn();return jsx("div",{className:u("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r,children:j.Children.map(t,o=>j.isValidElement(o)?j.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),n(false);}}):o)})};yp.displayName="ModalFooter";var Rp=j.forwardRef(({className:e,...t},r)=>{let{titleId:n}=Tn();return jsx("h2",{ref:r,id:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});Rp.displayName="ModalTitle";var wp=j.forwardRef(({className:e,...t},r)=>{let{descriptionId:n}=Tn();return jsx("p",{ref:r,id:n,className:u("text-sm text-muted-foreground",e),...t})});wp.displayName="ModalDescription";var ji=j.forwardRef(({className:e,...t},r)=>jsx(Command,{ref:r,className:u("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ji.displayName=Command.displayName;var fw=({children:e,...t})=>jsx(Qa,{...t,children:jsx(Ja,{className:"overflow-hidden p-0 shadow-lg",showCloseButton:false,children:jsx(ji,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Cp=j.forwardRef(({className:e,...t},r)=>jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsx(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsx(Command.Input,{ref:r,className:u("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Cp.displayName=Command.Input.displayName;var Tp=j.forwardRef(({className:e,children:t,...r},n)=>jsx(Se,{className:"max-h-[300px]",children:jsx(Command.List,{ref:n,className:u("overflow-hidden",e),...r,children:t})}));Tp.displayName=Command.List.displayName;var Mp=j.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Mp.displayName=Command.Empty.displayName;var Np=j.forwardRef(({className:e,...t},r)=>jsx(Command.Group,{ref:r,className:u("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Np.displayName=Command.Group.displayName;var kp=j.forwardRef(({className:e,...t},r)=>jsx(Command.Separator,{ref:r,className:u("-mx-1 h-px bg-border",e),...t}));kp.displayName=Command.Separator.displayName;var Pp=j.forwardRef(({className:e,children:t,startContent:r,endContent:n,...o},a)=>jsxs(Command.Item,{ref:a,className:u("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...o,children:[r,t&&jsx("span",{className:"flex-1",children:t}),n]}));Pp.displayName=Command.Item.displayName;var Ep=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ep.displayName="CommandShortcut";var Sp=j.forwardRef(({className:e,showToggle:t=true,disabled:r,onFocus:n,onBlur:o,style:a,...s},i)=>{let[l,c]=j.useState(false),[d,m]=j.useState(false);return jsxs("div",{className:"relative",children:[jsx("input",{type:l?"text":"password",className:u("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:i,disabled:r,style:{...a,borderColor:d?"var(--color-foreground)":void 0},onFocus:f=>{m(true),n?.(f);},onBlur:f=>{m(false),o?.(f);},...s}),t&&jsx("button",{type:"button",className:"absolute right-0 top-0 h-10 w-10 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>c(!l),disabled:r,tabIndex:-1,"aria-label":l?"Hide password":"Show password",children:l?jsx(EyeOff,{className:"h-4 w-4"}):jsx(Eye,{className:"h-4 w-4"})})]})});Sp.displayName="PasswordInput";var Dp=j.forwardRef(({className:e,showButtons:t=true,step:r=1,min:n,max:o,value:a,defaultValue:s,onChange:i,disabled:l,...c},d)=>{let[m,f]=j.useState(s),[p,g]=j.useState(false),h=a!==void 0,b=h?a:m,v=T=>{T!==void 0&&(n!==void 0&&T<n&&(T=n),o!==void 0&&T>o&&(T=o)),h||f(T),i?.(T);},w=()=>{v((b??0)+r);},x=()=>{v((b??0)-r);},R=T=>{let N=T.target.value;if(N==="")v(void 0);else {let M=parseFloat(N);isNaN(M)||v(M);}},C=T=>{T.key==="ArrowUp"?(T.preventDefault(),w()):T.key==="ArrowDown"&&(T.preventDefault(),x());},y=n===void 0||(b??0)>n,k=o===void 0||(b??0)<o;return t?jsxs("div",{className:u("relative flex items-center rounded-md border transition-colors",p?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:x,disabled:l||!y,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:"h-4 w-4"})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:"min-w-0 flex-1 h-10 bg-background text-sm text-center focus:outline-none disabled:cursor-not-allowed",ref:d,value:b??"",onChange:R,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c}),jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:w,disabled:l||!k,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:"h-4 w-4"})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("flex h-10 w-full bg-background px-3 py-2 text-sm text-center border rounded-md placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",p?"border-foreground":"border-input",e),ref:d,value:b??"",onChange:R,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c})});Dp.displayName="NumberInput";var Ip=j.forwardRef(({value:e,defaultValue:t,onValueChange:r,placeholder:n="Pick a date",dateFormat:o="PPP",disabled:a=false,minDate:s,maxDate:i,className:l},c)=>{let[d,m]=j.useState(false),[f,p]=j.useState(t),g=e!==void 0,h=g?e:f,b=v=>{g||p(v),r?.(v),m(false);};return jsxs(je,{open:d,onOpenChange:m,children:[jsxs(Et,{ref:c,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!h&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",l),children:[jsx(Calendar,{className:"h-4 w-4"}),h?format(h,o):n]}),jsx(_e,{className:"w-auto p-0",align:"start",children:jsx(_r,{mode:"single",selected:h,onSelect:b,disabled:v=>!!(s&&v<s||i&&v>i),initialFocus:true})})]})});Ip.displayName="DatePicker";var Op=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),Vp=cva("border-2 border-background ring-0 cursor-pointer transition-transform duration-200 hover:-translate-y-1",{variants:{size:{sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{size:"md"}}),Bp=j.forwardRef(({className:e,items:t,max:r=5,size:n,showTooltips:o=false,...a},s)=>{let i=t.slice(0,r),l=t.length-r,c=(m,f)=>{let p=jsxs(yn,{className:u(Vp({size:n})),children:[m.src&&jsx(qn,{src:m.src,alt:m.alt||""}),jsx(Rn,{className:"text-xs",children:m.fallback||m.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&m.alt?jsxs(Kr,{children:[jsx($r,{children:p}),jsx(Gr,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:m.alt})]},f):p},d=jsxs("div",{ref:s,className:u(Op({size:n,className:e})),...a,children:[i.map((m,f)=>c(m,f)),l>0&&jsx(yn,{className:u(Vp({size:n})),children:jsxs(Rn,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsx(Fr,{delayDuration:300,children:d}):d});Bp.displayName="AvatarGroup";var Fp=cva("flex gap-0.5",{variants:{size:{sm:"[&_svg]:h-4 [&_svg]:w-4",md:"[&_svg]:h-5 [&_svg]:w-5",lg:"[&_svg]:h-6 [&_svg]:w-6"}},defaultVariants:{size:"md"}}),Kp=j.forwardRef(({className:e,value:t,defaultValue:r=0,onValueChange:n,max:o=5,size:a,icon:s="star",allowHalf:i=false,readOnly:l=false,disabled:c=false,filledColor:d,emptyColor:m,...f},p)=>{let[g,h]=j.useState(r),[b,v]=j.useState(null),w=t!==void 0,x=w?t:g,R=b!==null?b:x,C=D=>{l||c||(w||h(D),n?.(D));},y=(D,H=false)=>{let L=i&&H?D+.5:D+1;C(L);},k=(D,H)=>{if(l||c)return;let L=D.currentTarget.getBoundingClientRect(),S=i&&D.clientX<L.left+L.width/2;v(S?H+.5:H+1);},T=()=>{v(null);},N=s==="heart"?Heart:Star,M=D=>R>=D+1?"full":R>=D+.5?"half":"empty",P=d?{color:d,fill:d}:{},E=m?{color:m}:{};return jsx("div",{ref:p,className:u(Fp({size:a,className:e}),c&&"opacity-50 cursor-not-allowed"),onMouseLeave:T,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:o},(D,H)=>{let L=M(H);return jsxs("button",{type:"button",className:u("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!l&&!c&&"cursor-pointer hover:scale-110 transition-transform"),onClick:S=>{let V=S.currentTarget.getBoundingClientRect(),A=i&&S.clientX<V.left+V.width/2;y(H,A);},onMouseMove:S=>k(S,H),disabled:c||l,"aria-label":`Rate ${H+1} out of ${o}`,role:"radio","aria-checked":x===H+1,children:[jsx(N,{className:u("text-muted-foreground/30",L!=="empty"&&"absolute inset-0"),style:L==="empty"?E:void 0}),L!=="empty"&&jsx(N,{className:u("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",L==="half"&&"clip-path-half"),style:{...P,clipPath:L==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});Kp.displayName="Rating";var Gp=cva("inline-flex items-center justify-center gap-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-default",{variants:{variant:{solid:"border-transparent text-primary-foreground",bordered:"border bg-transparent",ghost:"border-transparent bg-transparent",soft:"border-transparent",surface:"border-transparent bg-muted text-muted-foreground"},color:{primary:"",secondary:"",success:"",warning:"",danger:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:hover:bg-green-600"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:hover:bg-red-600"},{variant:"bordered",color:"primary",className:"text-primary !border-primary hover:bg-primary/10"},{variant:"bordered",color:"secondary",className:"text-secondary-foreground !border-secondary hover:bg-secondary/10"},{variant:"bordered",color:"success",className:"text-green-600 !border-green-600 hover:bg-green-600/10 dark:text-green-500 dark:!border-green-500"},{variant:"bordered",color:"warning",className:"text-amber-600 !border-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:!border-amber-500"},{variant:"bordered",color:"danger",className:"text-red-600 !border-red-600 hover:bg-red-600/10 dark:text-red-500 dark:!border-red-500"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-green-600/15 text-green-600 hover:bg-green-600/20 dark:bg-green-500/15 dark:text-green-500 dark:hover:bg-green-500/20"},{variant:"soft",color:"warning",className:"bg-amber-600/15 text-amber-600 hover:bg-amber-600/20 dark:bg-amber-500/15 dark:text-amber-500 dark:hover:bg-amber-500/20"},{variant:"soft",color:"danger",className:"bg-red-600/15 text-red-600 hover:bg-red-600/20 dark:bg-red-500/15 dark:text-red-500 dark:hover:bg-red-500/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),Pw={sm:"sm",md:"sm",lg:"sm"},Up=j.forwardRef(({className:e,variant:t,color:r,size:n,radius:o,clickable:a,startContent:s,endContent:i,closable:l,onClose:c,disabled:d,children:m,onClick:f,...p},g)=>{let h=a||!!f,b=v=>{v.stopPropagation(),c?.();};return jsxs("div",{ref:g,role:h?"button":void 0,tabIndex:h&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:f,onKeyDown:h&&!d?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),f?.(v));}:void 0,className:u(Gp({variant:t,color:r,size:n,radius:o,clickable:h}),d&&"opacity-50 cursor-not-allowed",e),...p,children:[s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:m}),i&&jsx("span",{className:"shrink-0",children:i}),l&&jsx(yt,{size:Pw[n??"md"],onClick:b,disabled:d,className:"ml-0.5 h-4 w-4"})]})});Up.displayName="Chip";var Wp=createContext({direction:"horizontal"}),Aw=({className:e,direction:t="horizontal",children:r,...n})=>jsx(Wp.Provider,{value:{direction:t},children:jsx(Group,{orientation:t,className:u("flex h-full w-full data-[orientation=vertical]:flex-col",e),...n,children:r})}),zw=Panel,Ow=({withHandle:e,className:t,...r})=>{let{direction:n}=useContext(Wp),o=n==="vertical";return jsx(Separator,{className:u("relative flex shrink-0 items-center justify-center bg-border outline-none",o?"h-px w-full after:absolute after:inset-x-0 after:top-1/2 after:h-1 after:-translate-y-1/2":"w-px after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2",t),...r,children:e&&jsx("div",{className:u("z-10 flex items-center justify-center rounded-sm border bg-border",o?"h-3 w-4 rotate-90":"h-4 w-3"),children:jsx(GripVertical,{className:"h-2.5 w-2.5"})})})};var Yp=cva("relative inline-flex items-center justify-center",{variants:{size:{sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-24 w-24"},color:{default:"",primary:"",success:"",warning:"",danger:""}},defaultVariants:{size:"md",color:"default"}}),Fw={sm:{size:32,strokeWidth:3,fontSize:"text-[10px]"},md:{size:48,strokeWidth:4,fontSize:"text-xs"},lg:{size:64,strokeWidth:5,fontSize:"text-sm"},xl:{size:96,strokeWidth:6,fontSize:"text-base"}},jp={default:"var(--color-foreground, #18181b)",primary:"var(--color-primary, #18181b)",success:"var(--color-success, #16a34a)",warning:"var(--color-warning, #d97706)",danger:"var(--color-danger, #dc2626)"},qp=j.forwardRef(({className:e,size:t="md",color:r="default",value:n,max:o=100,showValue:a=false,formatValue:s=d=>`${Math.round(d)}%`,trackClassName:i,...l},c)=>{let d=Math.min(100,Math.max(0,n/o*100)),m=Fw[t],f=(m.size-m.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxs("div",{ref:c,className:u(Yp({size:t,color:r}),e),role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":o,...l,children:[jsxs("svg",{width:m.size,height:m.size,viewBox:`0 0 ${m.size} ${m.size}`,fill:"none",children:[jsx("circle",{className:u("stroke-muted",i),cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none"}),jsx("circle",{cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none",strokeLinecap:"round",stroke:jp[r]||jp.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:g,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),a&&jsx("span",{className:u("absolute font-medium text-foreground",m.fontSize),children:s(d)})]})});qp.displayName="CircularProgress";var Zp=j.createContext(null),Gw=()=>{let e=j.useContext(Zp);if(!e)throw new Error("OTP components must be used within InputOTP");return e},Qp=cva("flex items-center gap-2 has-[:disabled]:opacity-50",{variants:{size:{sm:"[&_[data-otp-slot]]:h-8 [&_[data-otp-slot]]:w-8 [&_[data-otp-slot]]:text-xs",md:"[&_[data-otp-slot]]:h-10 [&_[data-otp-slot]]:w-10 [&_[data-otp-slot]]:text-sm",lg:"[&_[data-otp-slot]]:h-12 [&_[data-otp-slot]]:w-12 [&_[data-otp-slot]]:text-base"}},defaultVariants:{size:"md"}}),Jp=j.forwardRef(({className:e,containerClassName:t,maxLength:r,value:n,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,children:d,...m},f)=>{let[p,g]=j.useState(o),[h,b]=j.useState(0),[v,w]=j.useState(false),x=j.useRef(null),R=n!==void 0?n:p;j.useImperativeHandle(f,()=>x.current),j.useEffect(()=>{b(Math.min(R.length,r-1));},[R,r]),j.useEffect(()=>{R.length===r&&s&&s(R);},[R,r,s]);let C=P=>{let E=P.target.value;if(i&&E){let D=new RegExp(i.replace("^","").replace("$","").replace("+",""));E=E.split("").filter(H=>D.test(H)).join("");}E=E.slice(0,r),n===void 0&&g(E),a?.(E);},y=P=>{P.key==="ArrowLeft"?b(E=>Math.max(0,E-1)):P.key==="ArrowRight"&&b(E=>Math.min(R.length,r-1,E+1));},k=()=>{x.current?.focus();},T=()=>{w(true),b(Math.min(R.length,r-1));},N=()=>{w(false);},M={value:R,activeIndex:v?h:-1,maxLength:r,disabled:l};return jsx(Zp.Provider,{value:M,children:jsxs("div",{className:u(Qp({size:c}),t),onClick:k,"data-otp-container":true,children:[jsx("input",{ref:x,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:R,onChange:C,onKeyDown:y,onFocus:T,onBlur:N,disabled:l,maxLength:r,className:u("absolute opacity-0 pointer-events-none w-0 h-0",e),...m}),d]})})});Jp.displayName="InputOTP";var ef=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex items-center",e),...t}));ef.displayName="InputOTPGroup";var tf=j.forwardRef(({index:e,className:t,...r},n)=>{let{value:o,activeIndex:a,disabled:s}=Gw(),i=o[e]||"",l=a===e,c=l&&o.length===e;return jsxs("div",{ref:n,"data-otp-slot":true,"data-active":l,"data-filled":!!i,className:u("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:rounded-l-md first:border-l last:rounded-r-md",l&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...r,children:[i,c&&jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});tf.displayName="InputOTPSlot";var rf=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"separator",className:u("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));rf.displayName="InputOTPSeparator";var af=cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-600",light:"bg-transparent text-zinc-800 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800",flat:"bg-zinc-100 text-zinc-800 dark:bg-zinc-800 dark:text-white",ghost:"border-2 border-zinc-800 bg-transparent dark:border-white"},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-2.5 text-xs",lg:"h-7 px-3 text-sm"}},defaultVariants:{variant:"flat",size:"md"}}),sf=j.forwardRef(({className:e,variant:t,size:r,value:n=[],onChange:o,placeholder:a="Add tag...",maxTags:s,minTagLength:i=1,maxTagLength:l=50,triggerKeys:c=["Enter",",","Tab"],allowDuplicates:d=false,disabled:m,readOnly:f,renderTag:p,...g},h)=>{let[b,v]=j.useState(""),w=j.useRef(null);j.useImperativeHandle(h,()=>w.current);let x=M=>{let P=M.trim();if(P.length<i||P.length>l||s&&n.length>=s||!d&&n.some(D=>D.text.toLowerCase()===P.toLowerCase()))return;let E={id:crypto.randomUUID(),text:P};o?.([...n,E]),v("");},R=M=>{m||f||o?.(n.filter(P=>P.id!==M));},C=M=>{if(c.includes(M.key)){if(M.key==="Tab"&&!b)return;M.preventDefault(),x(b);}M.key==="Backspace"&&!b&&n.length>0&&R(n[n.length-1].id);},y=M=>{let P=M.target.value;if(P.includes(",")){P.split(",").forEach(D=>{D.trim()&&x(D);});return}v(P);},k=M=>{M.preventDefault(),M.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(D=>{x(D);});},T=()=>{w.current?.focus();},N=s?n.length>=s:false;return jsxs("div",{className:u("flex min-h-10 w-full flex-wrap gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",m&&"cursor-not-allowed opacity-50",e),onClick:T,children:[n.map(M=>p?p(M,()=>R(M.id)):jsxs("span",{className:u(af({variant:t,size:r})),children:[M.text,!m&&!f&&jsx("button",{type:"button",onClick:P=>{P.stopPropagation(),R(M.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${M.text}`,children:jsx(X,{className:"h-3 w-3"})})]},M.id)),!N&&!f&&jsx("input",{ref:w,type:"text",value:b,onChange:y,onKeyDown:C,onPaste:k,placeholder:n.length===0?a:"",disabled:m,className:u("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...g})]})});sf.displayName="TagInput";var cf=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-2 py-6",md:"gap-3 py-10",lg:"gap-4 py-16"}},defaultVariants:{size:"md"}}),df=j.forwardRef(({className:e,size:t,icon:r,title:n,description:o,action:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u(cf({size:t,className:e})),...i,children:[r&&jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:r}),n&&jsx("h3",{className:"text-lg font-semibold text-foreground",children:n}),o&&jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:o}),a&&jsx("div",{className:"mt-2",children:a}),s]}));df.displayName="EmptyState";var mf=cva("border p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-zinc-800 text-white border-zinc-800 dark:bg-zinc-200 dark:text-zinc-900 dark:border-zinc-200",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent border-transparent shadow-none",flat:"bg-zinc-100 border-transparent dark:bg-zinc-800",ghost:"border-2 border-zinc-900 bg-transparent dark:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),pf=j.forwardRef(({className:e,variant:t,radius:r,label:n,value:o,icon:a,trend:s,trendValue:i,description:l,...c},d)=>{let m=s==="up"?TrendingUp:s==="down"?TrendingDown:Minus,f=s==="up"?"text-green-500":s==="down"?"text-red-500":"text-muted-foreground";return jsxs("div",{ref:d,className:u(mf({variant:t,radius:r,className:e})),...c,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:u("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:n}),a&&jsx("div",{className:u("[&>svg]:h-4 [&>svg]:w-4",t==="solid"?"opacity-80":"text-muted-foreground"),children:a})]}),jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsx("p",{className:"text-2xl font-bold",children:o}),s&&i&&jsxs("span",{className:u("flex items-center gap-0.5 text-sm",f),children:[jsx(m,{className:"h-3 w-3"}),i]})]}),l&&jsx("p",{className:u("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:l})]})});pf.displayName="StatCard";var Zi=cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",striped:"gap-2 [&>*:nth-child(odd)]:bg-muted/50",filled:"gap-2 bg-muted/30 rounded-lg p-2"},size:{sm:"[&>*]:py-2 [&>*]:px-3",md:"[&>*]:py-3 [&>*]:px-4",lg:"[&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),eC=({checked:e,disabled:t,onClick:r})=>jsx("button",{type:"button",role:"checkbox","aria-checked":e,disabled:t,onClick:n=>{n.stopPropagation(),t||r(n);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e&&"bg-primary text-primary-foreground",t&&"cursor-not-allowed opacity-50"),children:e&&jsx("span",{className:"flex items-center justify-center text-current",children:jsx(Check,{className:"h-3 w-3"})})});function tC({className:e,variant:t,size:r,items:n,renderItem:o,draggable:a=false,onReorder:s,showHandle:i=true,dragIcon:l,selectable:c=false,multiple:d=false,selectedKeys:m,defaultSelectedKeys:f=[],onSelect:p,checkable:g=false,checkedKeys:h,defaultCheckedKeys:b=[],onCheck:v,children:w,...x},R){let[C,y]=j.useState(null),[k,T]=j.useState(null),[N,M]=j.useState(new Set(f)),P=m!==void 0,E=P?new Set(m):N,[D,H]=j.useState(new Set(b)),L=h!==void 0,S=L?new Set(h):D,V=(O,W)=>{y(W),O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",String(W));},A=(O,W)=>{O.preventDefault(),!(C===null||C===W)&&T(W);},B=()=>{T(null);},I=(O,W)=>{if(O.preventDefault(),!n||C===null||C===W){y(null),T(null);return}let z=[...n],[_]=z.splice(C,1);z.splice(W,0,_),s?.(z),y(null),T(null);},F=()=>{y(null),T(null);},K=j.useCallback((O,W)=>{if(!n)return;let z=new Set(E),_=!z.has(O.id);d?_?z.add(O.id):z.delete(O.id):(z.clear(),_&&z.add(O.id)),P||M(z);let Q=n.filter(ue=>z.has(ue.id));p?.(Array.from(z),{selected:_,selectedItems:Q,item:O,event:W});},[n,E,d,P,p]),Y=j.useCallback((O,W)=>{if(!n)return;let z=new Set(S),_=!z.has(O.id);_?z.add(O.id):z.delete(O.id),L||H(z);let Q=n.filter(ue=>z.has(ue.id));v?.(Array.from(z),{checked:_,checkedItems:Q,item:O,event:W});},[n,S,L,v]);return (a||c||g)&&n&&o?jsx("div",{ref:R,role:"list",className:u(Zi({variant:t,size:r,className:e})),...x,children:n.map((O,W)=>{let z=E.has(O.id),_=S.has(O.id);return jsxs("div",{role:"listitem","aria-selected":c?z:void 0,draggable:a,onDragStart:a?U=>V(U,W):void 0,onDragOver:a?U=>A(U,W):void 0,onDragLeave:a?B:void 0,onDrop:a?U=>I(U,W):void 0,onDragEnd:a?F:void 0,onClick:c&&!g?U=>K(O,U):void 0,className:u("flex items-center gap-3 transition-all",a&&"cursor-move",c&&!g&&"cursor-pointer hover:bg-muted/50",g&&"cursor-pointer hover:bg-muted/50",C===W&&"opacity-50 scale-[1.02] z-10",k===W&&"border-primary border-dashed border rounded-md",z&&c&&!g&&"bg-primary/10"),children:[a&&i&&l!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:l??jsx(GripVertical,{className:"h-5 w-5"})}),g&&jsx(eC,{checked:_,onClick:U=>Y(O,U)}),jsx("div",{className:"flex-1 min-w-0",children:o(O,W)})]},O.id)})}):jsx("div",{ref:R,role:"list",className:u(Zi({variant:t,size:r,className:e})),...x,children:w})}var rC=j.forwardRef(tC),gf=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),bf=j.forwardRef(({className:e,interactive:t,leading:r,trailing:n,children:o,...a},s)=>jsxs("div",{ref:s,role:"listitem",className:u(gf({interactive:t,className:e})),...a,children:[r&&jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:r}),jsx("div",{className:"flex-1 min-w-0",children:o}),n&&jsx("div",{className:"flex-shrink-0 whitespace-nowrap",children:n})]}));bf.displayName="ListItem";var vf=j.forwardRef(({className:e,primary:t,secondary:r,children:n,...o},a)=>jsxs("div",{ref:a,className:u("min-w-0",e),...o,children:[t&&jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),r&&jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:r}),n]}));vf.displayName="ListItemText";var yf=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),Rf=j.forwardRef(({className:e,position:t,...r},n)=>jsx("div",{ref:n,"data-position":t,className:u(yf({position:t,className:e})),...r}));Rf.displayName="Timeline";var wf=cva("relative flex gap-4 pb-8 last:pb-0",{variants:{variant:{default:"",success:"[&_[data-timeline-dot]]:bg-green-500 [&_[data-timeline-dot]]:border-green-500",warning:"[&_[data-timeline-dot]]:bg-yellow-500 [&_[data-timeline-dot]]:border-yellow-500",error:"[&_[data-timeline-dot]]:bg-red-500 [&_[data-timeline-dot]]:border-red-500",info:"[&_[data-timeline-dot]]:bg-blue-500 [&_[data-timeline-dot]]:border-blue-500"}},defaultVariants:{variant:"default"}}),Cf=j.forwardRef(({className:e,variant:t,hideSeparator:r=false,hideConnector:n=false,dot:o,children:a,...s},i)=>jsxs("div",{ref:i,className:u(wf({variant:t,className:e})),...s,children:[!r&&jsxs("div",{className:"flex flex-col items-center",children:[jsx("div",{"data-timeline-dot":true,className:"flex h-3 w-3 items-center justify-center rounded-full border-2 border-primary bg-primary",children:o}),!n&&jsx("div",{className:"w-0.5 flex-1 bg-border"})]}),a]}));Cf.displayName="TimelineItem";var Tf=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex-1 pt-0.5",e),...t}));Tf.displayName="TimelineContent";var Mf=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));Mf.displayName="TimelineOpposite";var kf=cva("inline-flex items-center rounded-lg bg-muted p-1 text-muted-foreground",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full",false:""}},defaultVariants:{size:"md",fullWidth:false}}),Pf=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"},selected:{true:"bg-background text-foreground shadow-sm",false:""}},defaultVariants:{size:"md",selected:false}}),Ef=j.createContext({}),Lf=j.forwardRef(({className:e,size:t="md",fullWidth:r,children:n,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,m]=j.useState(a),f=o!==void 0?o:d,p=j.useCallback(g=>{o===void 0&&m(g),s?.(g);},[o,s]);return jsx(Ef.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsx("div",{ref:c,role:"group",className:u(kf({size:t,fullWidth:r,className:e})),...l,children:n})})});Lf.displayName="SegmentedControl";var Sf=j.forwardRef(({className:e,children:t,value:r,disabled:n,...o},a)=>{let s=j.useContext(Ef),i=s.value===r,l=n||s.disabled;return jsx("button",{ref:a,type:"button",role:"radio","aria-checked":i,"data-state":i?"on":"off",disabled:l,onClick:()=>{l||s.onValueChange?.(r);},className:u(Pf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Sf.displayName="SegmentedControlItem";var Df=cva("relative flex flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",{variants:{variant:{default:"border-input bg-background hover:bg-accent/50",active:"border-primary bg-primary/5",error:"border-danger bg-danger/5"},size:{sm:"p-4 min-h-[120px]",md:"p-6 min-h-[160px]",lg:"p-8 min-h-[200px]"}},defaultVariants:{variant:"default",size:"md"}}),Hf=e=>{let t=e.type;return t.startsWith("image/")?Image$1:t.startsWith("video/")?FileVideo:t.startsWith("audio/")?FileAudio:t.includes("pdf")||t.includes("document")?FileText:t.includes("zip")||t.includes("rar")||t.includes("archive")?FileArchive:File},as=e=>{if(e===0)return "0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,n)).toFixed(2))+" "+r[n]},If=(e,t,r)=>{let n=[];return t&&e.size>t&&n.push({code:"file-too-large",message:`File is larger than ${as(t)}`}),r&&r.length>0&&(r.some(a=>{if(a.startsWith("."))return e.name.toLowerCase().endsWith(a.toLowerCase());if(a.endsWith("/*")){let s=a.slice(0,-2);return e.type.startsWith(s)}return e.type===a})||n.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${r.join(", ")}`})),n},Vf=j.forwardRef(({className:e,variant:t,size:r,onFilesChange:n,onFilesRejected:o,onFileRemove:a,files:s=[],showFileList:i=true,children:l,maxSize:c=10*1024*1024,accept:d,multiple:m=true,disabled:f,...p},g)=>{let[h,b]=j.useState(false),[v,w]=j.useState(false),[x,R]=j.useState([]),C=j.useRef(null),y=j.useCallback(S=>{if(!S||S.length===0)return;let V=Array.from(S),A=[],B=[];(m?V:[V[0]]).forEach(F=>{let K=If(F,c,d);K.length>0?B.push({file:F,errors:K}):A.push(F);}),R(B),A.length>0&&n?.(A),B.length>0&&o?.(B);},[c,d,m,n,o]),k=j.useCallback(S=>{if(S.preventDefault(),S.stopPropagation(),!f&&(b(true),S.dataTransfer.items)){let A=Array.from(S.dataTransfer.items).some(B=>{if(B.kind!=="file")return true;if(d&&d.length>0){let I=B.type;return !d.some(F=>F.endsWith("/*")?I.startsWith(F.slice(0,-2)):I===F)}return false});w(A);}},[f,d]),T=j.useCallback(S=>{S.preventDefault(),S.stopPropagation(),!f&&(S.dataTransfer.dropEffect="copy");},[f]),N=j.useCallback(S=>{S.preventDefault(),S.stopPropagation();let V=S.currentTarget.getBoundingClientRect(),A=S.clientX,B=S.clientY;(A<V.left||A>V.right||B<V.top||B>V.bottom)&&(b(false),w(false));},[]),M=j.useCallback(S=>{S.preventDefault(),S.stopPropagation(),b(false),w(false),!f&&y(S.dataTransfer.files);},[f,y]),P=j.useCallback(()=>{f||C.current?.click();},[f]),E=j.useCallback(S=>{y(S.target.files),S.target.value="";},[y]),D=j.useCallback(S=>{f||(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),C.current?.click());},[f]),H=v?"error":h?"active":t,L=d?.join(",");return jsxs("div",{ref:g,className:u("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:k,onDragOver:T,onDragLeave:N,onDrop:M,onClick:P,onKeyDown:D,className:u(Df({variant:H,size:r}),f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer focus:outline-none"),"aria-disabled":f,children:[jsx("input",{ref:C,type:"file",accept:L,multiple:m,disabled:f,onChange:E,className:"sr-only",tabIndex:-1}),l||jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[jsx("div",{className:"rounded-full bg-muted p-3",children:jsx(Upload,{className:"h-6 w-6 text-muted-foreground"})}),jsxs("div",{className:"space-y-1",children:[jsx("p",{className:"text-sm font-medium",children:h?"Drop files here":"Drop files or click to upload"}),jsxs("p",{className:"text-xs text-muted-foreground",children:[c&&`Max ${as(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),x.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:x.map(({file:S,errors:V})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:S.name}),":"," ",V.map(A=>A.message).join(", ")]},S.name))}),i&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(S=>{let V=Hf(S.file);return jsxs("div",{className:u("flex items-center gap-3 rounded-lg border p-3",S.error&&"border-danger bg-danger/5"),children:[jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:jsx(V,{className:"h-5 w-5 text-muted-foreground"})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"truncate text-sm font-medium",children:S.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[as(S.file.size),S.error&&jsx("span",{className:"ml-2 text-danger",children:S.error})]}),S.progress!==void 0&&S.progress<100&&jsx(Wa,{value:S.progress,className:"mt-2 h-1"})]}),jsxs(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:A=>{A.stopPropagation(),a?.(S.file);},children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},S.id)})})]})});Vf.displayName="FileUpload";var mC=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,zf=cva("relative rounded-md border border-input shadow-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},shape:{square:"rounded-md",circle:"rounded-full"},interactive:{true:"cursor-pointer hover:scale-110 active:scale-105",false:"cursor-default"}},defaultVariants:{size:"md",shape:"square",interactive:false}}),_o=j.forwardRef(({color:e,isSelected:t,showTransparency:r=true,onSelect:n,size:o,shape:a,interactive:s,className:i,onClick:l,disabled:c,selectedRingColor:d,...m},f)=>jsx("button",{ref:f,type:"button",disabled:c,onClick:h=>{l?.(h),n?.(e);},className:u(zf({size:o,shape:a,interactive:s??(!!n||!!l)}),t&&"ring-2 ring-offset-2",i),style:{backgroundImage:r?mC:void 0,backgroundSize:r?"8px 8px":void 0,...t&&{"--tw-ring-color":d||"var(--color-foreground)"}},"aria-label":`Color ${e}`,"aria-pressed":t,...m,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));_o.displayName="ColorSwatch";var Of=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Bf=j.forwardRef(({value:e,defaultValue:t,onChange:r,layout:n,columns:o=6,colors:a,swatchSize:s="md",swatchShape:i="square",disabled:l,selectedRingColor:c,className:d,style:m,...f},p)=>{let[g,h]=j.useState(t),b=e??g,v=j.useCallback(x=>{l||(e===void 0&&h(x),r?.(x));},[e,r,l]),w=x=>x.toLowerCase();return jsx("div",{ref:p,role:"listbox","aria-label":"Color options",className:u(Of({layout:n}),d),style:{...n==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...m},...f,children:a.map(x=>{let R=b?w(b)===w(x):false;return jsx(_o,{role:"option",color:x,size:s,shape:i,isSelected:R,onSelect:v,disabled:l,selectedRingColor:c,"aria-selected":R},x)})})});Bf.displayName="ColorSwatchPicker";var gC=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],Ff={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Kf=j.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:r,disabled:n,presets:o=gC,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,m]=j.useState(e??t),f=j.useId();j.useEffect(()=>{e!==void 0&&m(e);},[e]);let p=b=>{m(b),r?.(b);},g=b=>{m(b),r?.(b);},h=b=>{let v=b.target.value.toUpperCase();m(v),r?.(v);};return l==="simple"?jsxs("label",{className:u("relative rounded-md border border-input shadow-sm transition-colors cursor-pointer hover:border-foreground focus-within:border-foreground overflow-hidden",n&&"opacity-50 cursor-not-allowed",Ff[s],i),children:[jsx("input",{type:"color",value:d,onChange:h,disabled:n,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",id:f}),jsx("div",{className:"h-full w-full",style:{backgroundColor:d}})]}):jsxs(je,{children:[jsx(Et,{ref:c,disabled:n,className:u("rounded-md border border-input shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",Ff[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`}),jsx(_e,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:d,onChange:p,className:"!w-[200px]"}),a&&jsxs("div",{className:"space-y-1.5",children:[jsx(xn,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxs("div",{className:"flex gap-2",children:[jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:d}}),jsx(HexColorInput,{id:"color-input",color:d,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-2 font-mono text-sm uppercase focus:outline-none focus:border-foreground disabled:cursor-not-allowed disabled:opacity-50"})]})]}),o.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(xn,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(b=>jsx(_o,{color:b,size:"sm",isSelected:d.toLowerCase()===b.toLowerCase(),onSelect:g},b))})]})]})})]})});Kf.displayName="ColorPicker";var $f=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),el=e=>String(e).padStart(2,"0"),yC=e=>{let[t,r]=e.split(":").map(Number);return {hours:t||0,minutes:r||0}},RC=(e,t)=>`${el(e)}:${el(t)}`,Gf=j.forwardRef(({className:e,size:t,value:r,onChange:n,use24Hour:o=true,minuteStep:a=1,showPicker:s=true,minTime:i,maxTime:l,disabled:c,...d},m)=>{let[f,p]=j.useState(r??""),[g,h]=j.useState(false);j.useEffect(()=>{r!==void 0&&p(r);},[r]);let{hours:b,minutes:v}=yC(f||"00:00"),w=N=>{let M=N.target.value;p(M),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(M)&&n?.(M);},x=(N,M)=>{let P=Math.max(0,Math.min(23,N)),E=Math.max(0,Math.min(59,M)),D=RC(P,E);p(D),n?.(D);},R=()=>x(b+1,v),C=()=>x(b-1,v),y=()=>x(b,v+a),k=()=>x(b,v-a),T=({value:N,onIncrement:M,onDecrement:P})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:M,disabled:c,children:jsx(ChevronUp,{className:"h-4 w-4"})}),jsx("div",{className:"flex h-10 w-12 items-center justify-center rounded-md bg-muted text-lg font-semibold",children:el(N)}),jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,disabled:c,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:m,type:"time",value:f,onChange:w,disabled:c,className:u($f({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxs(je,{open:g,onOpenChange:h,children:[jsxs(Et,{type:"button",className:"absolute right-1 h-7 w-7 p-0 inline-flex items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:c,children:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]}),jsxs(_e,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(T,{value:b,onIncrement:R,onDecrement:C,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(T,{value:v,onIncrement:y,onDecrement:k,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",onClick:()=>{let N=new Date;x(N.getHours(),N.getMinutes());},children:"Now"}),jsx(ae,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});Gf.displayName="TimeInput";var Uf=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),CC=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(a=>a.type==="currency")?.value??e}catch{return e}},tl=(e,t,r,n)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,r);return s?`${i}${n}${s}`:i},Wf=(e,t,r)=>{if(!e)return;let n=e.replace(new RegExp(`\\${t}`,"g"),"");n=n.replace(r,"."),n=n.replace(/[^0-9.-]/g,"");let o=parseFloat(n);return isNaN(o)?void 0:o},jf=j.forwardRef(({className:e,size:t,value:r,defaultValue:n,onChange:o,currency:a="USD",locale:s="en-US",decimals:i=2,min:l,max:c,showCurrency:d=true,currencyPosition:m="prefix",currencySymbol:f,thousandSeparator:p=",",decimalSeparator:g=".",disabled:h,placeholder:b,...v},w)=>{let[x,R]=j.useState(n),[C,y]=j.useState(""),[k,T]=j.useState(false),N=r!==void 0?r:x,M=f??CC(a,s);j.useEffect(()=>{!k&&N!==void 0&&y(tl(N,i,p,g));},[N,i,p,g,k]);let P=S=>{let V=S.target.value;if(!V){y(""),r===void 0&&R(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;y(V);let B=Wf(V,p,g);if(B!==void 0){let I=B;l!==void 0&&B<l&&(I=l),c!==void 0&&B>c&&(I=c),r===void 0&&R(I),o?.(I);}},E=()=>{T(true),N!==void 0&&y(N.toString().replace(".",g));},D=()=>{T(false),y(N!==void 0?tl(N,i,p,g):"");},H=d&&m==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:M}),L=d&&m==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:M});return jsxs("div",{className:"relative flex items-center",children:[H&&jsx("div",{className:"absolute left-3 pointer-events-none",children:H}),jsx("input",{ref:w,type:"text",inputMode:"decimal",value:C,onChange:P,onFocus:E,onBlur:D,disabled:h,placeholder:b??`0${g}${"0".repeat(i)}`,className:u(Uf({size:t}),H&&"pl-8",L&&"pr-8","text-right",e),style:{borderColor:k?"var(--color-foreground)":void 0},...v}),L&&jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});jf.displayName="CurrencyInput";var _f=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),rl={creditCard:{mask:"#### #### #### ####"},creditCardAmex:{mask:"#### ###### #####"},cvv:{mask:"###"},expiry:{mask:"##/##"},date:{mask:"##/##/####"},dateISO:{mask:"####-##-##"},time:{mask:"##:##"},ip:{mask:"###.###.###.###"},mac:{mask:"AA:AA:AA:AA:AA:AA"},id11:{mask:"###########"},id9:{mask:"#########"},id10:{mask:"##########"},postal5:{mask:"#####"},postal9:{mask:"#####-####"}},NC=(e,t)=>{switch(t){case "#":return /\d/.test(e);case "A":return /[a-zA-Z]/.test(e);case "*":return /[a-zA-Z0-9]/.test(e);default:return e===t}},Qr=e=>["#","A","*"].includes(e),is=(e,t,r)=>{let n="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(Qr(s)){if(o<e.length){let i=e[o];NC(i,s)?(n+=i,o++):(o++,a--);}}else (o<e.length||r)&&(n+=s);}return n},nl=(e,t)=>{let r="";for(let n=0;n<e.length&&n<t.length;n++){let o=t[n];Qr(o)&&(r+=e[n]);}return r},Xf=(e,t)=>e.split("").map(r=>Qr(r)?t:r).join(""),kC=(e,t,r)=>{let n=0;for(let i=0;i<r&&i<e.length&&i<t.length;i++)Qr(t[i])&&n++;let a=0,s=0;for(let i=0;i<t.length&&s<n;i++)a++,Qr(t[i])&&s++;for(;a<t.length&&!Qr(t[a]);)a++;return Math.min(a,e.length)},Yf=j.forwardRef(({className:e,size:t,value:r,defaultValue:n="",onChange:o,mask:a,maskPlaceholder:s="_",showMaskPlaceholder:i=false,includeMaskChars:l=false,disabled:c,placeholder:d,...m},f)=>{let p=typeof a=="string"&&a in rl?rl[a].mask:a,[g,h]=j.useState(n),[b,v]=j.useState(""),[w,x]=j.useState(false),R=j.useRef(null),C=r!==void 0?r:g;j.useImperativeHandle(f,()=>R.current),j.useEffect(()=>{let N=is(C,p,true);v(N);},[C,p]);let y=N=>{let M=N.target.value,P=N.target.selectionStart??0,E=M.replace(/[^\w]/g,""),D=is(E,p,true),H=nl(D,p);v(D),r===void 0&&h(l?D:H),o?.(H,D),requestAnimationFrame(()=>{if(R.current){let L=kC(D,p,P);R.current.setSelectionRange(L,L);}});},k=N=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(N.key)||N.ctrlKey||N.metaKey)return;let M=R.current;if(!M)return;let P=M.selectionStart??0;if(N.key==="Backspace"&&P>0){let E=P-1;for(;E>0&&!Qr(p[E]);)E--;let D=nl(b,p),H=0;for(let V=0;V<E&&V<p.length;V++)Qr(p[V])&&H++;let L=D.slice(0,Math.max(0,H-1))+D.slice(H),S=is(L,p,true);v(S),r===void 0&&h(l?S:L),o?.(L,S),N.preventDefault(),requestAnimationFrame(()=>{R.current&&R.current.setSelectionRange(E,E);});}},T=i?Xf(p,s):d;return jsx("input",{ref:R,type:"text",value:b,onChange:y,onKeyDown:k,onFocus:()=>x(true),onBlur:()=>x(false),disabled:c,placeholder:T,className:u(_f({size:t}),e),style:{borderColor:w?"var(--color-foreground)":void 0},...m})});Yf.displayName="MaskedInput";var Zf=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),Qf=[{code:"AR",name:"Argentina",dialCode:"+54",flag:"\u{1F1E6}\u{1F1F7}",format:"## ####-####"},{code:"AU",name:"Australia",dialCode:"+61",flag:"\u{1F1E6}\u{1F1FA}",format:"### ### ###"},{code:"AT",name:"Austria",dialCode:"+43",flag:"\u{1F1E6}\u{1F1F9}",format:"### #######"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"\u{1F1E7}\u{1F1EA}",format:"### ## ## ##"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"\u{1F1E7}\u{1F1F7}",format:"(##) #####-####"},{code:"BG",name:"Bulgaria",dialCode:"+359",flag:"\u{1F1E7}\u{1F1EC}",format:"### ### ###"},{code:"CA",name:"Canada",dialCode:"+1",flag:"\u{1F1E8}\u{1F1E6}",format:"(###) ###-####"},{code:"CN",name:"China",dialCode:"+86",flag:"\u{1F1E8}\u{1F1F3}",format:"### #### ####"},{code:"HR",name:"Croatia",dialCode:"+385",flag:"\u{1F1ED}\u{1F1F7}",format:"## ### ####"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"\u{1F1E8}\u{1F1FF}",format:"### ### ###"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"\u{1F1E9}\u{1F1F0}",format:"## ## ## ##"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"\u{1F1EA}\u{1F1EC}",format:"### ### ####"},{code:"FI",name:"Finland",dialCode:"+358",flag:"\u{1F1EB}\u{1F1EE}",format:"## ### ####"},{code:"FR",name:"France",dialCode:"+33",flag:"\u{1F1EB}\u{1F1F7}",format:"# ## ## ## ##"},{code:"DE",name:"Germany",dialCode:"+49",flag:"\u{1F1E9}\u{1F1EA}",format:"#### #######"},{code:"GR",name:"Greece",dialCode:"+30",flag:"\u{1F1EC}\u{1F1F7}",format:"### ### ####"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"\u{1F1ED}\u{1F1F0}",format:"#### ####"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"\u{1F1ED}\u{1F1FA}",format:"## ### ####"},{code:"IN",name:"India",dialCode:"+91",flag:"\u{1F1EE}\u{1F1F3}",format:"##### #####"},{code:"IL",name:"Israel",dialCode:"+972",flag:"\u{1F1EE}\u{1F1F1}",format:"##-###-####"},{code:"IT",name:"Italy",dialCode:"+39",flag:"\u{1F1EE}\u{1F1F9}",format:"### ### ####"},{code:"JP",name:"Japan",dialCode:"+81",flag:"\u{1F1EF}\u{1F1F5}",format:"##-####-####"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"\u{1F1F2}\u{1F1FD}",format:"### ### ####"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"\u{1F1F3}\u{1F1F1}",format:"## ########"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"\u{1F1F3}\u{1F1FF}",format:"## ### ####"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",format:"### ### ####"},{code:"NO",name:"Norway",dialCode:"+47",flag:"\u{1F1F3}\u{1F1F4}",format:"### ## ###"},{code:"PK",name:"Pakistan",dialCode:"+92",flag:"\u{1F1F5}\u{1F1F0}",format:"### #######"},{code:"PL",name:"Poland",dialCode:"+48",flag:"\u{1F1F5}\u{1F1F1}",format:"### ### ###"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"\u{1F1F5}\u{1F1F9}",format:"### ### ###"},{code:"RO",name:"Romania",dialCode:"+40",flag:"\u{1F1F7}\u{1F1F4}",format:"### ### ###"},{code:"RU",name:"Russia",dialCode:"+7",flag:"\u{1F1F7}\u{1F1FA}",format:"(###) ###-##-##"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"\u{1F1F8}\u{1F1E6}",format:"## ### ####"},{code:"RS",name:"Serbia",dialCode:"+381",flag:"\u{1F1F7}\u{1F1F8}",format:"## ### ####"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"\u{1F1F8}\u{1F1EC}",format:"#### ####"},{code:"SK",name:"Slovakia",dialCode:"+421",flag:"\u{1F1F8}\u{1F1F0}",format:"### ### ###"},{code:"SI",name:"Slovenia",dialCode:"+386",flag:"\u{1F1F8}\u{1F1EE}",format:"## ### ###"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",format:"## ### ####"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"\u{1F1F0}\u{1F1F7}",format:"##-####-####"},{code:"ES",name:"Spain",dialCode:"+34",flag:"\u{1F1EA}\u{1F1F8}",format:"### ### ###"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"\u{1F1F8}\u{1F1EA}",format:"##-### ## ##"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"\u{1F1E8}\u{1F1ED}",format:"## ### ## ##"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"\u{1F1F9}\u{1F1FC}",format:"### ### ###"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"\u{1F1F9}\u{1F1F7}",format:"(###) ### ## ##"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"\u{1F1FA}\u{1F1E6}",format:"## ### ## ##"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"\u{1F1E6}\u{1F1EA}",format:"## ### ####"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"\u{1F1EC}\u{1F1E7}",format:"#### ### ####"},{code:"US",name:"United States",dialCode:"+1",flag:"\u{1F1FA}\u{1F1F8}",format:"(###) ###-####"}],ls=(e,t)=>{let r=e.replace(/\D/g,""),n="",o=0;for(let a=0;a<t.length&&o<r.length;a++)t[a]==="#"?(n+=r[o],o++):n+=t[a];return n},DC=e=>e.replace(/#/g,"_"),Jf=j.forwardRef(({className:e,size:t,value:r,defaultValue:n="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=Qf,showCountrySelect:c=true,showDialCode:d=false,disabled:m,placeholder:f,...p},g)=>{let[h,b]=j.useState(n),[v,w]=j.useState(a??s),[x,R]=j.useState(false),[C,y]=j.useState(false),[k,T]=j.useState(false),[N,M]=j.useState({top:0,left:0,width:0}),P=j.useRef(null),E=j.useRef(null),D=r!==void 0?r:h,H=a??v,L=l.find(I=>I.code===H)??l[0],S=ls(D,L.format);j.useEffect(()=>{T(true);},[]),j.useEffect(()=>{if(C&&P.current){let I=P.current.getBoundingClientRect();M({top:I.bottom+4,left:I.left,width:Math.max(I.width,280)});}},[C]),j.useEffect(()=>{if(!C)return;let I=F=>{P.current&&!P.current.contains(F.target)&&E.current&&!E.current.contains(F.target)&&y(false);};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[C]),j.useEffect(()=>{if(!C)return;let I=F=>{F.key==="Escape"&&y(false);};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[C]);let V=I=>{let K=I.target.value.replace(/\D/g,"");r===void 0&&b(K);let Y=ls(K,L.format),te=`${L.dialCode} ${Y}`;o?.(K,te,L);},A=I=>{let F=l.find(te=>te.code===I);if(!F)return;a===void 0&&w(I),i?.(F);let K=ls(D,F.format),Y=`${F.dialCode} ${K}`;o?.(D,Y,F),y(false);};return jsxs("div",{className:"flex",children:[c&&jsxs(Fragment,{children:[jsxs("button",{ref:P,type:"button",disabled:m,onClick:()=>y(!C),className:u("flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),children:[jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:L.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:L.dialCode})]}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",C&&"rotate-180")})]}),k&&C&&za.createPortal(jsx("div",{ref:E,className:"fixed z-50 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",style:{top:N.top,left:N.left,minWidth:N.width},children:jsx(Se,{style:{maxHeight:300},children:jsx("div",{className:"p-1",children:l.map(I=>jsxs("div",{role:"option","aria-selected":I.code===H,onClick:()=>A(I.code),className:"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:I.code===H&&jsx(Check,{className:"h-4 w-4"})}),jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:I.flag}),jsx("span",{className:"flex-1",children:I.name}),jsx("span",{className:"text-xs text-muted-foreground",children:I.dialCode})]})]},I.code))})})}),document.body)]}),jsxs("div",{className:"relative flex-1",children:[d&&!c&&jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:L.dialCode}),jsx("input",{ref:g,type:"tel",inputMode:"tel",value:S,onChange:V,onFocus:()=>R(true),onBlur:()=>R(false),disabled:m,placeholder:f??DC(L.format),className:u(Zf({size:t}),c&&"rounded-l-none",d&&!c&&"pl-12",e),style:{borderColor:x?"var(--color-foreground)":void 0},...p})]})]})});Jf.displayName="PhoneInput";var tg=cva("flex items-center justify-between w-full px-4 py-3 border-b bg-background",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-background border-border",ghost:"bg-transparent border-transparent",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-border"},size:{sm:"h-12 px-3 py-2",md:"h-14 px-4 py-3",lg:"h-16 px-6 py-4"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"bordered",size:"md",sticky:false}}),rg=j.forwardRef(({className:e,variant:t,size:r,sticky:n,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=j.useState(false),m={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],f={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxs("nav",{ref:l,className:u(tg({variant:t,size:r,sticky:n,className:e})),...i,children:[jsxs("div",{className:"flex items-center justify-between w-full",children:[o&&jsx("div",{className:"flex-shrink-0",children:o}),jsx("div",{className:u("items-center gap-4 flex-1 justify-end",m),children:a}),jsx("button",{type:"button",className:u("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",f),onClick:()=>d(!c),"aria-label":c?"Close menu":"Open menu","aria-expanded":c,children:c?jsx(X,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),c&&jsx("div",{className:u("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",f),children:a})]})});rg.displayName="Navbar";var ng=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex items-center gap-2 font-semibold text-lg",e),...t}));ng.displayName="NavbarBrand";var og=j.forwardRef(({className:e,justify:t="start",...r},n)=>{let o={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsx("div",{ref:n,className:u("flex items-center gap-4",o,e),...r})});og.displayName="NavbarContent";var ag=j.forwardRef(({className:e,isActive:t,...r},n)=>jsx("div",{ref:n,className:u("flex items-center",t&&"text-primary font-medium",e),...r}));ag.displayName="NavbarItem";var sg=j.forwardRef(({className:e,isActive:t,...r},n)=>jsx("a",{ref:n,className:u("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...r}));sg.displayName="NavbarLink";var lg=cva("inline-flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"text-primary-foreground bg-primary px-2 py-0.5 rounded hover:bg-primary/90",bordered:"text-primary underline-offset-4 hover:underline",ghost:"text-foreground hover:text-primary",soft:"text-primary bg-primary/10 px-2 py-0.5 rounded hover:bg-primary/20",surface:"text-foreground bg-muted px-2 py-0.5 rounded hover:bg-muted/80"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},underline:{none:"",hover:"hover:underline underline-offset-4",always:"underline underline-offset-4"}},defaultVariants:{variant:"bordered",size:"md",underline:"hover"}}),cg=j.forwardRef(({className:e,variant:t,size:r,underline:n,isExternal:o,showExternalIcon:a=true,isDisabled:s,children:i,...l},c)=>{let d=o?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxs("a",{ref:c,className:u(lg({variant:t,size:r,underline:n,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...d,...l,children:[i,o&&a&&jsx(ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});cg.displayName="Link";var dg=cva("fixed z-50 transition-all duration-300",{variants:{position:{"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6","bottom-center":"bottom-6 left-1/2 -translate-x-1/2"}},defaultVariants:{position:"bottom-right"}}),ug=j.forwardRef(({className:e,position:t,threshold:r=400,icon:n,behavior:o="smooth",variant:a="solid",color:s="default",size:i="md",radius:l="full",target:c,onVisibilityChange:d,onClick:m,...f},p)=>{let[g,h]=j.useState(false);j.useEffect(()=>{let w=c?.current||window,x=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>r;C!==g&&(h(C),d?.(C));};return w.addEventListener("scroll",x,{passive:true}),x(),()=>{w.removeEventListener("scroll",x);}},[r,c,g,d]);let b=w=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),m?.(w);},v=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:u(dg({position:t}),g?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsx(ae,{ref:p,type:"button",variant:a,color:s,size:"icon",radius:l,onClick:b,"aria-label":"Back to top",className:u("shadow-lg",i==="sm"&&"h-9 w-9",i==="md"&&"h-10 w-10",i==="lg"&&"h-12 w-12"),...f,children:n||jsx(ArrowUp,{className:v})})})});ug.displayName="BackTop";var jC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),_C=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),mg=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),us=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),pg=j.createContext(null),en=()=>{let e=j.useContext(pg);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},fg=j.createContext(null),Yo=()=>{let e=j.useContext(fg);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},al=j.createContext(null),gg=j.createContext(null),bg=j.forwardRef(({className:e,children:t,radius:r="sm",...n},o)=>{let[a,s]=j.useState(null);return jsx(pg.Provider,{value:{activeMenu:a,setActiveMenu:s,radius:r},children:jsx("div",{ref:o,role:"menubar",className:u("flex h-10 items-center space-x-1 border bg-background p-1",jC({radius:r}),e),...n,children:t})})});bg.displayName="Menubar";var vg=({children:e})=>{let{activeMenu:t,setActiveMenu:r}=en(),n=j.useId(),o=j.useRef(null),a=t===n,s=j.useCallback(i=>{r(i?n:null);},[n,r]);return jsx(fg.Provider,{value:{menuId:n,triggerRef:o,open:a,onOpenChange:s},children:e})};vg.displayName="MenubarMenu";var hg=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"group",className:e,...t}));hg.displayName="MenubarGroup";var xg=({children:e,container:t})=>{let[r,n]=j.useState(false);return j.useEffect(()=>{n(true);},[]),r?za.createPortal(e,t||document.body):null};xg.displayName="MenubarPortal";var yg=({children:e,open:t,defaultOpen:r=false,onOpenChange:n})=>{let[o,a]=j.useState(r),s=t!==void 0,i=s?t:o,l=j.useRef(null),c=j.useCallback(d=>{s||a(d),n?.(d);},[s,n]);return jsx(al.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};yg.displayName="MenubarSub";var Rg=j.forwardRef(({value:e="",onValueChange:t,className:r,...n},o)=>jsx(gg.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsx("div",{ref:o,role:"group",className:r,...n})}));Rg.displayName="MenubarRadioGroup";var wg=j.forwardRef(({className:e,onClick:t,onMouseEnter:r,...n},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=en(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=Yo(),f=g=>{t?.(g),m(!d);},p=g=>{r?.(g),a&&a!==l&&(s(l),document.activeElement instanceof HTMLElement&&document.activeElement.blur());};return jsx("button",{ref:g=>{c.current=g,typeof o=="function"?o(g):o&&(o.current=g);},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":d,"data-state":d?"open":"closed",className:u("flex cursor-default select-none items-center px-3 py-1.5 text-sm font-medium outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",_C({radius:i}),e),onClick:f,onMouseEnter:p,...n})});wg.displayName="MenubarTrigger";var Cg=j.forwardRef(({className:e,inset:t,children:r,onMouseEnter:n,onMouseLeave:o,...a},s)=>{let{radius:i}=en(),l=j.useContext(al);if(!l)throw new Error("MenubarSubTrigger must be used within MenubarSub");let{open:c,onOpenChange:d,triggerRef:m}=l,f=g=>{n?.(g),d(true);},p=g=>{o?.(g),d(false);};return jsxs("div",{ref:g=>{m.current=g,typeof s=="function"?s(g):s&&(s.current=g);},role:"menuitem","aria-haspopup":"menu","aria-expanded":c,"data-state":c?"open":"closed",className:u("flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",us({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Cg.displayName="MenubarSubTrigger";var Tg=j.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:r,onMouseLeave:n,...o},a)=>{let{radius:s}=en(),i=j.useContext(al);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[m,f]=j.useState({top:0,left:0}),[p,g]=j.useState(false),h=j.useRef(null);j.useEffect(()=>{g(true);},[]),j.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let x=d.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),C=x.top,y=x.right+t;y+R.width>window.innerWidth&&(y=x.left-R.width-t),f({top:C,left:y});})();},[l,t,d]);let b=w=>{r?.(w),c(true);},v=w=>{n?.(w),c(false);};return !p||!l?null:za.createPortal(jsx("div",{ref:w=>{h.current=w,typeof a=="function"?a(w):a&&(a.current=w);},role:"menu","data-state":l?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",mg({radius:s}),e),style:{top:m.top,left:m.left},onMouseEnter:b,onMouseLeave:v,...o}),document.body)});Tg.displayName="MenubarSubContent";var Mg=j.forwardRef(({className:e,align:t="start",alignOffset:r=-4,sideOffset:n=8,children:o,...a},s)=>{let{radius:i}=en(),{triggerRef:l,open:c,onOpenChange:d}=Yo(),[m,f]=j.useState({top:0,left:0}),[p,g]=j.useState(false),h=j.useRef(null);return j.useEffect(()=>{g(true);},[]),j.useEffect(()=>{if(!c||!l.current||!h.current)return;let b=()=>{if(!l.current||!h.current)return;let v=l.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),x=v.bottom+n,R=v.left+r;t==="center"?R=v.left+v.width/2-w.width/2:t==="end"&&(R=v.right-w.width-r),f({top:x,left:R});};return b(),window.addEventListener("resize",b),window.addEventListener("scroll",b,true),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b,true);}},[c,t,r,n,l]),j.useEffect(()=>{if(!c)return;let b=v=>{let w=v.target;h.current&&!h.current.contains(w)&&l.current&&!l.current.contains(w)&&d(false);};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c,d,l]),j.useEffect(()=>{if(!c)return;let b=v=>{v.key==="Escape"&&d(false);};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[c,d]),!p||!c?null:za.createPortal(jsx("div",{ref:b=>{h.current=b,typeof s=="function"?s(b):s&&(s.current=b);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[12rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",mg({radius:i}),e),style:{top:m.top,left:m.left},...a,children:o}),document.body)});Mg.displayName="MenubarContent";var Ng=j.forwardRef(({className:e,inset:t,disabled:r,onSelect:n,onClick:o,...a},s)=>{let{radius:i}=en(),{onOpenChange:l}=Yo(),c=d=>{if(r){d.preventDefault();return}o?.(d),n?.(),l(false);};return jsx("div",{ref:s,role:"menuitem",tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,className:u("relative flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",us({radius:i}),t&&"pl-8",!r&&"cursor-pointer",e),onClick:c,...a})});Ng.displayName="MenubarItem";var kg=j.forwardRef(({className:e,children:t,checked:r=false,onCheckedChange:n,disabled:o,onClick:a,...s},i)=>{let{radius:l}=en(),{onOpenChange:c}=Yo(),d=m=>{if(o){m.preventDefault();return}a?.(m),n?.(!r),c(false);};return jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":r,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":r?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",us({radius:l}),!o&&"cursor-pointer",e),onClick:d,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r&&jsx(Check,{className:"h-4 w-4"})}),t]})});kg.displayName="MenubarCheckboxItem";var Pg=j.forwardRef(({className:e,children:t,value:r,disabled:n,onClick:o,...a},s)=>{let{radius:i}=en(),{onOpenChange:l}=Yo(),c=j.useContext(gg),d=c?.value===r,m=f=>{if(n){f.preventDefault();return}o?.(f),c?.onValueChange(r),l(false);};return jsxs("div",{ref:s,role:"menuitemradio","aria-checked":d,tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-state":d?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",us({radius:i}),!n&&"cursor-pointer",e),onClick:m,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d&&jsx(Circle,{className:"h-2 w-2 fill-current"})}),t]})});Pg.displayName="MenubarRadioItem";var Eg=j.forwardRef(({className:e,inset:t,...r},n)=>jsx("div",{ref:n,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Eg.displayName="MenubarLabel";var Lg=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Lg.displayName="MenubarSeparator";var Sg=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Sg.displayName="MenubarShortcut";var Dg=cva("flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col"},size:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"horizontal",size:"md"}}),Hg=j.forwardRef(({className:e,orientation:t,size:r,currentStep:n=0,children:o,...a},s)=>{let i=j.Children.toArray(o);return jsx("div",{ref:s,className:u(Dg({orientation:t,size:r,className:e})),...a,children:i.map((l,c)=>j.isValidElement(l)?j.cloneElement(l,{...l.props,stepNumber:c+1,status:l.props.status||(c<n?"completed":c===n?"current":"upcoming"),isLast:c===i.length-1,orientation:t,size:r}):l)})});Hg.displayName="Steps";var Ig=cva("flex items-center",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col items-start"},size:{sm:"gap-2",md:"gap-3",lg:"gap-4"}},defaultVariants:{orientation:"horizontal",size:"md"}}),YC=cva("flex items-center justify-center rounded-full font-medium transition-colors",{variants:{status:{completed:"bg-primary text-primary-foreground",current:"bg-primary text-primary-foreground ring-2 ring-primary ring-offset-2 ring-offset-background",upcoming:"bg-muted text-muted-foreground border-2 border-muted-foreground/30"},size:{sm:"h-6 w-6 text-xs",md:"h-8 w-8 text-sm",lg:"h-10 w-10 text-base"}},defaultVariants:{status:"upcoming",size:"md"}}),qC=cva("bg-muted transition-colors",{variants:{orientation:{horizontal:"h-0.5 flex-1 min-w-8",vertical:"w-0.5 min-h-8 ml-4"},status:{completed:"bg-primary",current:"bg-muted",upcoming:"bg-muted"}},defaultVariants:{orientation:"horizontal",status:"upcoming"}}),Vg=j.forwardRef(({className:e,orientation:t="horizontal",size:r="md",title:n,description:o,icon:a,status:s="upcoming",stepNumber:i,isLast:l,...c},d)=>jsxs("div",{ref:d,className:u(Ig({orientation:t,size:r,className:e}),!l&&t==="horizontal"&&"flex-1"),...c,children:[jsx("div",{className:u("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:u(YC({status:s,size:r})),children:s==="completed"?jsx(Check,{className:r==="sm"?"h-3 w-3":r==="lg"?"h-5 w-5":"h-4 w-4"}):a||i}),(n||o)&&jsxs("div",{className:"flex flex-col",children:[n&&jsx("span",{className:u("font-medium",r==="sm"&&"text-sm",r==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:n}),o&&jsx("span",{className:u("text-muted-foreground",r==="sm"&&"text-xs",r==="md"&&"text-sm",r==="lg"&&"text-base"),children:o})]})]})}),!l&&jsx("div",{className:u(qC({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Vg.displayName="Step";var zg=cva("flex flex-col select-none",{variants:{variant:{default:"",bordered:"rounded-lg border",filled:"bg-muted/30 rounded-lg p-2"},size:{sm:"[--tree-indent:16px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:20px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:24px] [--tree-item-height:40px] text-base"}},defaultVariants:{variant:"default",size:"md"}}),Og=cva("flex items-center py-1.5 px-2 rounded-sm transition-colors",{variants:{size:{sm:"py-1 px-1.5 text-sm min-h-[var(--tree-item-height)]",md:"py-1.5 px-2 text-sm min-h-[var(--tree-item-height)]",lg:"py-2 px-3 text-base min-h-[var(--tree-item-height)]"},isSelected:{true:"bg-primary/10 text-primary",false:""},isDragging:{true:"opacity-50",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""},isHoverable:{true:"hover:bg-muted/50 cursor-pointer",false:""}},defaultVariants:{size:"md",isSelected:false,isDragging:false,isDisabled:false,isHoverable:true}}),Bg=j.createContext(null),oT=()=>{let e=j.useContext(Bg);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},aT=({checked:e,indeterminate:t,disabled:r,onClick:n})=>jsx("button",{type:"button",role:"checkbox","aria-checked":t?"mixed":e,disabled:r,onClick:o=>{o.stopPropagation(),r||n(o);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",(e||t)&&"bg-primary text-primary-foreground",r&&"cursor-not-allowed opacity-50"),children:(e||t)&&jsx("span",{className:"flex items-center justify-center text-current",children:t?jsx(Minus,{className:"h-3 w-3"}):jsx(Check,{className:"h-3 w-3"})})}),Fg=({node:e,level:t,isLast:r=false,parentIsLastPath:n=[]})=>{let{expandedKeys:o,toggleExpand:a,selectedKeys:s,handleSelect:i,selectable:l,checkedKeys:c,halfCheckedKeys:d,handleCheck:m,checkable:f,draggable:p,draggedNode:g,setDraggedNode:h,dragOverKey:b,dragOverPosition:v,setDragOver:w,handleDrop:x,allowDrop:R,onDragStart:C,onDragOver:y,onDragEnter:k,onDragLeave:T,onDragEnd:N,showLine:M,showIcon:P,showHandle:E,dragIcon:D,icon:H,leafIcon:L,folderIcon:S,folderOpenIcon:V,blockNode:A,disabled:B,size:I,getAllKeys:F}=oT(),K=e.children&&e.children.length>0,Y=e.isLeaf??!K,te=o.has(e.key),$=s.has(e.key),O=c.has(e.key),W=d.has(e.key),z=g?.key===e.key,_=b===e.key,Q=!!(B||e.disabled),ue=l&&e.selectable!==false,U=f&&e.checkable!==false,Ie=j.useMemo(()=>Q?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,Q]),Z=j.useMemo(()=>D!==void 0?D:typeof p=="object"&&p.icon!==void 0?p.icon:jsx(GripVertical,{className:"h-4 w-4"}),[D,p]),ye=j.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:te,isLeaf:Y}):H:Y?L:te?V:S,[e.icon,H,te,Y,L,S,V]),Vr=X=>{if(!Ie)return;X.stopPropagation(),X.dataTransfer.effectAllowed="move";let Ee=X.currentTarget,ce=Ee.cloneNode(true),$e=document.documentElement.classList.contains("dark"),Ge=$e?"#0a0a0a":"#ffffff",zr=$e?"#27272a":"#e4e4e7";ce.style.cssText=`
|
|
44
44
|
position: fixed;
|
|
45
45
|
top: -9999px;
|
|
46
46
|
left: -9999px;
|
|
47
|
-
background-color: ${
|
|
48
|
-
border: 1px solid ${
|
|
47
|
+
background-color: ${Ge};
|
|
48
|
+
border: 1px solid ${zr};
|
|
49
49
|
border-radius: 6px;
|
|
50
50
|
padding: 6px 12px;
|
|
51
51
|
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
52
|
-
width: ${
|
|
52
|
+
width: ${Ee.offsetWidth}px;
|
|
53
53
|
opacity: 1;
|
|
54
54
|
z-index: 9999;
|
|
55
|
-
`,document.body.appendChild(ce),X.dataTransfer.setDragImage(ce,20,15),setTimeout(()=>{document.body.removeChild(ce);},0),h(e),C?.({event:X,node:e});},ft=X=>{if(X.preventDefault(),X.stopPropagation(),!g||g.key===e.key||Q)return;let Le=X.currentTarget.getBoundingClientRect(),ce=X.clientY-Le.top,Ge=Le.height,Ue;ce<Ge*.25?Ue=-1:ce>Ge*.75?Ue=1:Ue=0,!(R&&!R({dropNode:e,dropPosition:Ue,dragNode:g}))&&(w(e.key,Ue),y?.({event:X,node:e}));},bn=X=>{X.preventDefault(),X.stopPropagation(),!(!g||g.key===e.key)&&k?.({event:X,node:e,expandedKeys:F()});},Or=X=>{X.stopPropagation(),T?.({event:X,node:e});},Vo=X=>{X.preventDefault(),X.stopPropagation(),!(!g||g.key===e.key||Q)&&(v!==null&&x(e,v),h(null),w(null,null));},Ft=X=>{h(null),w(null,null),N?.({event:X,node:e});},Ta=X=>{Q||ue&&i(e.key,e,X);},vn=X=>{X.stopPropagation(),!Q&&!Y&&a(e.key,e);},G=j.useMemo(()=>{if(!_||v===null)return "";switch(v){case -1:return "before:absolute before:left-0 before:right-0 before:top-0 before:h-0.5 before:bg-foreground";case 1:return "after:absolute after:left-0 after:right-0 after:bottom-0 after:h-0.5 after:bg-foreground";case 0:return "ring-2 ring-foreground ring-inset";default:return ""}},[_,v]),oe=[...n,r];return jsxs("div",{className:"relative",children:[M&&t>0&&jsxs(Fragment,{children:[n.map((X,Le)=>!X&&jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${Le} * var(--tree-indent) + 12px)`,top:0,bottom:0}},Le)),jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:0,height:r?"calc(var(--tree-item-height) / 2)":"100%"}}),jsx("div",{className:"absolute border-t border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:"calc(var(--tree-item-height) / 2)",width:"calc(var(--tree-indent) - 4px)"}})]}),jsxs("div",{role:"treeitem","aria-expanded":Y?void 0:te,"aria-selected":ue?$:void 0,"aria-disabled":Q,draggable:Ve,onDragStart:zr,onDragOver:ft,onDragEnter:bn,onDragLeave:Or,onDrop:Vo,onDragEnd:Ft,onClick:Ta,className:u("relative",Fg({size:I,isSelected:$,isDragging:z,isDisabled:Q,isHoverable:ue&&!Q}),G,A&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[Ve&&E&&Z!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:Z}),jsx("button",{type:"button",onClick:vn,className:u("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",Y&&"invisible"),tabIndex:-1,children:jsx(ChevronRight,{className:u("h-4 w-4 transition-transform duration-200",te&&"rotate-90")})}),U&&jsx(hT,{checked:O,indeterminate:W,disabled:Q,onClick:X=>m(e.key,e,X)}),P&&ye&&jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:ye}),jsx("div",{className:u("flex-1 min-w-0 truncate ml-1",A&&"flex-none"),children:e.label})]}),K&&te&&jsx("div",{role:"group",children:e.children.map((X,Le)=>jsx($g,{node:X,level:t+1,isLast:Le===e.children.length-1,parentIsLastPath:oe},X.key))})]})},xT=e=>{let t=[],r=n=>{for(let o of n)t.push(o.key),o.children&&r(o.children);};return r(e),t},yT=e=>{let t=[],r=n=>{for(let o of n)t.push(o.key),o.children&&r(o.children);};return e.children&&r(e.children),t},Gg=(e,t)=>{if(!e.children)return false;for(let r of e.children)if(r.key===t||Gg(r,t))return true;return false},Ug=j.forwardRef(({className:e,variant:t,size:r,data:n,draggable:o=false,allowDrop:a,expandedKeys:s,defaultExpandedKeys:i=[],defaultExpandAll:l=false,onExpand:c,selectable:d=true,multiple:m=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:b=false,checkedKeys:v,defaultCheckedKeys:w=[],onCheck:x,showLine:R=false,showIcon:C=false,showHandle:y=true,dragIcon:k,icon:T,leafIcon:N=jsx(File,{className:"h-4 w-4"}),folderIcon:M=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:P=jsx(FolderOpen,{className:"h-4 w-4"}),onDragStart:E,onDragEnter:D,onDragOver:H,onDragLeave:L,onDragEnd:S,onDrop:V,blockNode:A=false,disabled:B=false,...I},F)=>{let K=j.useCallback(()=>l?new Set(xT(n)):new Set(i),[l,i,n]),[Y,te]=j.useState(K),$=s!==void 0,O=$?new Set(s):Y,W=j.useCallback((fe,je)=>{let Kt=new Set(O),Ae=!Kt.has(fe);Ae?Kt.add(fe):Kt.delete(fe),$||te(Kt),c?.(Array.from(Kt),{expanded:Ae,node:je});},[O,$,c]),[z,_]=j.useState(new Set(p)),Q=f!==void 0,ue=Q?new Set(f):z,U=j.useCallback((fe,je,Kt)=>{let Ae=new Set(ue),fr=!Ae.has(fe);m?fr?Ae.add(fe):Ae.delete(fe):(Ae.clear(),fr&&Ae.add(fe)),Q||_(Ae);let Wn=[],Ao=Ma=>{for(let jn of Ma)Ae.has(jn.key)&&Wn.push(jn),jn.children&&Ao(jn.children);};Ao(n),g?.(Array.from(Ae),{selected:fr,selectedNodes:Wn,node:je,event:Kt});},[ue,m,Q,g,n]),[Ve,Z]=j.useState(new Set(w)),[ye,zr]=j.useState(new Set),ft=v!==void 0,bn=ft?new Set(Array.isArray(v)?v:v.checked):Ve,Or=ft&&!Array.isArray(v)?new Set(v.halfChecked):ye,Vo=j.useCallback((fe,je,Kt)=>{let Ae=new Set(bn),fr=new Set(Or),Wn=!Ae.has(fe);if(Wn?(Ae.add(fe),fr.delete(fe)):Ae.delete(fe),!b&&je.children){let hi=yT(je);for(let Fr of hi)Wn?(Ae.add(Fr),fr.delete(Fr)):Ae.delete(Fr);}ft||(Z(Ae),zr(fr));let Ao=[],Ma=hi=>{for(let Fr of hi)Ae.has(Fr.key)&&Ao.push(Fr),Fr.children&&Ma(Fr.children);};Ma(n);let jn=b?{checked:Array.from(Ae),halfChecked:Array.from(fr)}:Array.from(Ae);x?.(jn,{checked:Wn,checkedNodes:Ao,node:je,event:Kt,halfCheckedKeys:Array.from(fr)});},[bn,Or,b,ft,x,n]),[Ft,Ta]=j.useState(null),[vn,G]=j.useState(null),[oe,X]=j.useState(null),Le=j.useCallback((fe,je)=>{G(fe),X(je);},[]),ce=j.useCallback((fe,je)=>{!Ft||!V||je===0&&Gg(Ft,fe.key)||V({event:{},node:fe,dragNode:Ft,dropPosition:je,dropToGap:je!==0});},[Ft,V]),Ge=j.useCallback(()=>Array.from(O),[O]),Ue={expandedKeys:O,toggleExpand:W,selectedKeys:ue,handleSelect:U,selectable:d,multiple:m,checkedKeys:bn,halfCheckedKeys:Or,handleCheck:Vo,checkable:h,checkStrictly:b,draggable:o,draggedNode:Ft,setDraggedNode:Ta,dragOverKey:vn,dragOverPosition:oe,setDragOver:Le,handleDrop:ce,allowDrop:a,onDragStart:E,onDragEnter:D,onDragOver:H,onDragLeave:L,onDragEnd:S,showLine:R,showIcon:C,showHandle:y,dragIcon:k,icon:T,leafIcon:N,folderIcon:M,folderOpenIcon:P,blockNode:A,disabled:B,size:r,data:n,getAllKeys:Ge},Br=fe=>{let je=fe.relatedTarget,Kt=fe.currentTarget;(!je||!Kt.contains(je))&&Le(null,null);};return jsx(Kg.Provider,{value:Ue,children:jsx("div",{ref:F,role:"tree","aria-multiselectable":m||h,className:u(Bg({variant:t,size:r,className:e})),onDragLeave:Br,...I,children:n.map((fe,je)=>jsx($g,{node:fe,level:0,isLast:je===n.length-1},fe.key))})})});Ug.displayName="Tree";var jg=cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),NT=({text:e,query:t})=>{if(!t)return jsx(Fragment,{children:e});let r=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),n=e.split(r);return jsx(Fragment,{children:n.map((o,a)=>r.test(o)?jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:o},a):jsx("span",{children:o},a))})},kT=(e,t)=>{let[r,n]=j.useState(e);return j.useEffect(()=>{let o=setTimeout(()=>{n(e);},t);return ()=>{clearTimeout(o);}},[e,t]),r},_g=j.forwardRef(({className:e,size:t,value:r,defaultValue:n="",onChange:o,onSelect:a,options:s=[],loadOptions:i,debounceMs:l=300,minChars:c=0,placeholder:d="Type to search...",emptyText:m="No results found.",loadingText:f="Loading...",clearable:p=false,allowCustomValue:g=true,maxHeight:h=200,highlightMatch:b=true,fullWidth:v=false,disabled:w,...x},R)=>{let[C,y]=j.useState(false),[k,T]=j.useState(n),[N,M]=j.useState([]),[P,E]=j.useState(false),[D,H]=j.useState(false),[L,S]=j.useState(0),V=j.useRef(null),A=j.useRef(null),B=r!==void 0?r:k,I=kT(B,l);j.useEffect(()=>{let U=A.current;if(!U)return;let Ve=()=>{S(U.offsetWidth);};Ve();let Z=new ResizeObserver(Ve);return Z.observe(U),()=>{Z.disconnect();}},[]),j.useImperativeHandle(R,()=>V.current);let F=i?N:s,K=j.useMemo(()=>i?F:F.filter(U=>U.label.toLowerCase().includes(B.toLowerCase())),[F,B,i]);j.useEffect(()=>{if(!i)return;if(I.length<c){M([]);return}let U=false;return (async()=>{E(true);try{let Z=await i(I);U||M(Z);}catch{U||M([]);}finally{U||E(false);}})(),()=>{U=true;}},[I,i,c]);let Y=U=>{r===void 0&&T(U),o?.(U);},te=U=>{let Ve=U.target.value;Y(Ve),Ve.length>=c&&y(true);},$=U=>{Y(U.label),a?.(U),y(false);},O=()=>{Y(""),V.current?.focus();},W=()=>{H(true),y(true);},z=()=>{H(false);},_=U=>{U.key==="Escape"&&y(false),U.key==="ArrowDown"&&!C&&K.length>0&&y(true);},Q=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ue=p&&B?"pr-8":"pr-3";return jsxs(_e,{open:C,onOpenChange:y,children:[jsxs(jr,{ref:A,className:u("relative",v?"w-full":"w-fit"),children:[jsx("input",{ref:V,type:"text",value:B,onChange:te,onFocus:W,onBlur:z,onKeyDown:_,disabled:w,placeholder:d,className:u(jg({size:t,fullWidth:v}),ue,e),style:{borderColor:D?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":C,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...x}),p&&B&&!w&&jsx("button",{type:"button",onClick:O,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X,{className:Q})})]}),jsx(Xe,{className:"p-0",align:"start",style:{width:L>0?L:void 0},onOpenAutoFocus:U=>U.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(De,{style:{maxHeight:h},children:jsx(Command.List,{id:"autocomplete-list",className:"p-1",children:P?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:u(Q,"animate-spin")}),f]}):K.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):K.map(U=>jsxs(Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>$(U),className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsx(Check,{className:u("mr-2 h-4 w-4 shrink-0",B===U.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:b?jsx(NT,{text:U.label,query:B}):U.label})]},U.value))})})})})]})});_g.displayName="Autocomplete";var ml=j.createContext(null),pl=j.createContext(null),fl=()=>{let e=j.useContext(ml);if(!e)throw new Error("useFormContext must be used within a Form");return e},gs=()=>{let e=j.useContext(pl);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},PT={required:(e="This field is required")=>({validate:t=>typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:t!=null,message:e}),minLength:(e,t)=>({validate:r=>typeof r=="string"&&r.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:r=>typeof r=="string"&&r.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:r=>typeof r=="number"&&r>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:r=>typeof r=="number"&&r<=e,message:t??`Must be at most ${e}`}),email:(e="Invalid email address")=>({validate:t=>typeof t=="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),message:e}),pattern:(e,t="Invalid format")=>({validate:r=>typeof r=="string"&&e.test(r),message:t}),custom:(e,t)=>({validate:e,message:t})},Xg=j.forwardRef(({defaultValues:e={},onSubmit:t,onError:r,validateOnBlur:n=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=j.useState(e),[m,f]=j.useState({}),[p,g]=j.useState({}),[h,b]=j.useState({}),[v,w]=j.useState(false),x=j.useRef(new Map),R=j.useCallback((L,S)=>{x.current.set(L,S);},[]),C=j.useCallback(L=>{x.current.delete(L);},[]),y=j.useCallback(L=>{let S=x.current.get(L)||[],V=c[L];for(let A of S)if(!A.validate(V))return f(B=>({...B,[L]:A.message})),false;return f(A=>({...A,[L]:null})),true},[c]),k=j.useCallback(()=>{let L=true,S={};return x.current.forEach((V,A)=>{let B=c[A];for(let I of V)if(!I.validate(B)){S[A]=I.message,L=false;break}S[A]||(S[A]=null);}),f(S),L},[c]),T=j.useCallback((L,S)=>{d(V=>({...V,[L]:S})),b(V=>({...V,[L]:true})),o&&setTimeout(()=>{y(L);},0);},[o,y]),N=j.useCallback((L,S)=>{f(V=>({...V,[L]:S}));},[]),M=j.useCallback((L,S)=>{g(V=>({...V,[L]:S})),S&&n&&y(L);},[n,y]),P=j.useCallback(L=>({value:c[L],error:m[L]??null,touched:p[L]??false,dirty:h[L]??false}),[c,m,p,h]),E=j.useCallback(()=>{d(e),f({}),g({}),b({});},[e]),D=async L=>{L.preventDefault();let S={};if(x.current.forEach((A,B)=>{S[B]=true;}),g(S),!k()){r?.(m);return}if(t){w(true);try{await t(c);}finally{w(false);}}},H={values:c,errors:m,touched:p,dirty:h,isSubmitting:v,setValue:T,setError:N,setTouched:M,validateField:y,validateAll:k,registerField:R,unregisterField:C,getFieldState:P,reset:E};return jsx(ml.Provider,{value:H,children:jsx("form",{ref:l,onSubmit:D,className:u("space-y-4",s),...i,children:a})})});Xg.displayName="Form";var Yg=({name:e,rules:t=[],defaultValue:r,children:n})=>{let o=fl(),a=j.useId();j.useEffect(()=>(o.registerField(e,t),r!==void 0&&o.values[e]===void 0&&o.setValue(e,r),()=>{o.unregisterField(e);}),[e,t,r,o]);let s=o.getFieldState(e),i={name:e,id:`${a}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsx(pl.Provider,{value:i,children:n})};Yg.displayName="FormField";var qg=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("space-y-1.5",e),...t}));qg.displayName="FormItem";var Zg=j.forwardRef(({className:e,required:t,children:r,...n},o)=>{let{id:a,error:s,touched:i}=gs();return jsxs(Rn,{ref:o,htmlFor:a,className:u(s&&i&&"text-danger",e),...n,children:[r,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});Zg.displayName="FormLabel";var Qg=({children:e})=>{let{name:t,id:r,error:n,touched:o}=gs(),a=fl(),s=a.getFieldState(t),i=c=>{let d=c.target,m=d.type==="checkbox"?d.checked:d.value;a.setValue(t,m);},l=()=>{a.setTouched(t,true);};return j.cloneElement(e,{id:r,name:t,value:s.value??"",onChange:i,onBlur:l,"aria-invalid":n&&o?"true":void 0,"aria-describedby":n&&o?`${r}-error`:void 0})};Qg.displayName="FormControl";var Jg=j.forwardRef(({className:e,...t},r)=>jsx("p",{ref:r,className:u("text-xs text-muted-foreground",e),...t}));Jg.displayName="FormDescription";var eb=j.forwardRef(({className:e,message:t,...r},n)=>{let{id:o,error:a,touched:s}=gs(),i=t??(s?a:null);return i?jsx("p",{ref:n,id:`${o}-error`,className:u("text-xs text-danger",e),role:"alert",...r,children:i}):null});eb.displayName="FormMessage";var rb=cva("inline-flex items-center gap-3",{variants:{size:{sm:"[&_[data-user-avatar]]:h-8 [&_[data-user-avatar]]:w-8",md:"[&_[data-user-avatar]]:h-10 [&_[data-user-avatar]]:w-10",lg:"[&_[data-user-avatar]]:h-12 [&_[data-user-avatar]]:w-12"}},defaultVariants:{size:"md"}}),nb=j.forwardRef(({className:e,size:t,name:r,description:n,avatarUrl:o,avatarFallback:a,trailing:s,...i},l)=>{let c=a||r.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2);return jsxs("div",{ref:l,className:u(rb({size:t,className:e})),...i,children:[jsxs(wn,{"data-user-avatar":true,children:[o&&jsx(Jn,{src:o,alt:r}),jsx(Cn,{children:c})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:r}),n&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:n})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});nb.displayName="User";var ab=cva("font-mono",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-transparent",light:"bg-muted/50 text-foreground",flat:"bg-muted text-foreground",ghost:"bg-transparent text-foreground"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"flat",size:"md",radius:"sm"}}),sb=j.forwardRef(({className:e,variant:t,size:r,radius:n,...o},a)=>jsx("code",{ref:a,className:u(ab({variant:t,size:r,radius:n,className:e})),...o}));sb.displayName="Code";function db(e){let[t,r]=useState(false);return useEffect(()=>{if(e){r(e==="dark");return}let n=()=>{r(document.documentElement.classList.contains("dark"));};n();let o=new MutationObserver(n);return o.observe(document.documentElement,{attributes:true,attributeFilter:["class"]}),()=>o.disconnect()},[e]),t}var ub=j.forwardRef(({code:e,language:t="bash",showLineNumbers:r=false,className:n,noBorder:o=false,filename:a,theme:s,hideCopyButton:i=false},l)=>{let[c,d]=useState(false),f=db(s)?themes.oneDark:themes.oneLight,p=async()=>{await navigator.clipboard.writeText(e),d(true),setTimeout(()=>d(false),2e3);};return jsxs("div",{ref:l,className:u("overflow-hidden",!o&&"rounded-lg border border-border",n),children:[a&&jsx("div",{className:"flex items-center px-4 py-2 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:jsx("span",{className:"text-sm text-muted-foreground font-mono",children:a})}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:f,code:e.trim(),language:t,children:({tokens:g,getLineProps:h,getTokenProps:b})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:g.map((v,w)=>jsxs("div",{...h({line:v}),children:[r&&jsx("span",{className:"inline-block w-8 text-zinc-400 dark:text-zinc-600 select-none text-right mr-4",children:w+1}),v.map((x,R)=>jsx("span",{...b({token:x})},R))]},w))})}),!i&&jsx("button",{onClick:p,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:c?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});ub.displayName="CodeBlock";var mb=j.forwardRef(({tabs:e,className:t,theme:r},n)=>{let[o,a]=useState(0),[s,i]=useState(false),c=db(r)?themes.oneDark:themes.oneLight,d=async()=>{await navigator.clipboard.writeText(e[o].code),i(true),setTimeout(()=>i(false),2e3);},m=e[o],f=m.language||"bash";return jsxs("div",{ref:n,className:u("rounded-lg border border-border overflow-hidden",t),children:[jsx("div",{className:"flex items-center gap-1 px-2 py-1.5 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:e.map((p,g)=>jsxs("button",{type:"button",onClick:()=>a(g),className:u("flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-colors cursor-pointer",o===g?"bg-zinc-200 dark:bg-zinc-800 text-zinc-900 dark:text-white":"text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-200 hover:bg-zinc-200/50 dark:hover:bg-zinc-800/50"),children:[p.icon,p.name]},p.name))}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:c,code:m.code.trim(),language:f,children:({tokens:p,getLineProps:g,getTokenProps:h})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:p.map((b,v)=>jsx("div",{...g({line:b}),children:b.map((w,x)=>jsx("span",{...h({token:w})},x))},v))})}),jsx("button",{onClick:d,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:s?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});mb.displayName="TabbedCodeBlock";var pb=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-transparent border-current",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),fb=j.forwardRef(({className:e,variant:t,size:r,code:n,copyable:o=true,copyLabel:a="Copy",onCopy:s,symbol:i="$",hideSymbol:l=false,...c},d)=>{let[m,f]=j.useState(false),p=async()=>{try{await navigator.clipboard.writeText(n),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(g){console.error("Failed to copy:",g);}};return jsxs("div",{ref:d,className:u(pb({variant:t,size:r,className:e})),...c,children:[!l&&jsx("span",{className:"text-muted-foreground select-none",children:i}),jsx("code",{className:"flex-1 truncate",children:n}),o&&jsx("button",{type:"button",onClick:p,className:u("flex-shrink-0 rounded p-1 transition-colors","hover:bg-black/10 dark:hover:bg-white/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":m?"Copied":a,children:m?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});fb.displayName="Snippet";var hl=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),gb=j.forwardRef(({className:e,radius:t,src:r,alt:n,fallback:o,showSkeleton:a=true,onLoad:s,onError:i,fit:l="cover",aspectRatio:c,style:d,...m},f)=>{let[p,g]=j.useState("loading");j.useEffect(()=>{r&&g("loading");},[r]);let h=()=>{g("loaded"),s?.();},b=()=>{g("error"),i?.();},v={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[l];return p==="error"&&o?jsx("div",{className:u(hl({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxs("div",{className:u(hl({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsx(za,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:f,src:r,alt:n,onLoad:h,onError:b,className:u("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...m})]})});gb.displayName="Image";var hb=cva("flex flex-col rounded-lg border bg-background",{variants:{size:{sm:"p-1 gap-0.5",md:"p-1.5 gap-1",lg:"p-2 gap-1.5"}},defaultVariants:{size:"md"}}),xb=cva("relative flex cursor-pointer select-none items-center rounded-md outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{size:"md"}}),yb=j.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),Rb=j.forwardRef(({className:e,size:t="md",value:r,defaultValue:n="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=j.useState(n),m=r??c,f=p=>{let g;if(a){let h=Array.isArray(m)?m:[m].filter(Boolean);h.includes(p)?g=h.filter(b=>b!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsx(yb.Provider,{value:{value:m,onValueChange:f,multiple:a,size:t??"md"},children:jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:u(hb({size:t,className:e})),...i,children:s})})});Rb.displayName="Listbox";var wb=j.forwardRef(({className:e,value:t,disabled:r,icon:n,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:m}=j.useContext(yb),f=d?Array.isArray(l)&&l.includes(t):l===t,p=()=>{r||c(t);},g=h=>{(h.key==="Enter"||h.key===" ")&&!r&&(h.preventDefault(),c(t));};return jsxs("div",{ref:i,role:"option","aria-selected":f,"data-disabled":r?"":void 0,tabIndex:r?-1:0,className:u(xb({size:m}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:g,...s,children:[n&&jsx("span",{className:"mr-2 flex-shrink-0",children:n}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:a}),o&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),f&&jsx(Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});wb.displayName="ListboxItem";var Tb=cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Mb=cva("flex items-center gap-3 bg-background transition-all",{variants:{variant:{default:"rounded-lg border p-3",bordered:"p-3",cards:"rounded-lg border p-3 shadow-sm"},size:{sm:"p-2 text-sm",md:"p-3 text-sm",lg:"p-4 text-base"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg z-10",false:""},isDragOver:{true:"border-primary border-dashed",false:""}},defaultVariants:{variant:"default",size:"md",isDragging:false,isDragOver:false}});function $T({className:e,variant:t,size:r,items:n,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,m]=j.useState(null),[f,p]=j.useState(null),g=(x,R)=>{i||(m(R),x.dataTransfer.effectAllowed="move",x.dataTransfer.setData("text/plain",String(R)));},h=(x,R)=>{x.preventDefault(),!(i||d===null||d===R)&&p(R);},b=()=>{p(null);},v=(x,R)=>{if(x.preventDefault(),i||d===null||d===R){m(null),p(null);return}let C=[...n],[y]=C.splice(d,1);C.splice(R,0,y),o?.(C),m(null),p(null);},w=()=>{m(null),p(null);};return jsx("div",{ref:c,className:u(Tb({variant:t,size:r,className:e})),...l,children:n.map((x,R)=>jsxs("div",{draggable:!i,onDragStart:C=>g(C,R),onDragOver:C=>h(C,R),onDragLeave:b,onDrop:C=>v(C,R),onDragEnd:w,className:u(Mb({variant:t,size:r,isDragging:d===R,isDragOver:f===R}),!i&&"cursor-move"),children:[s&&jsx("div",{className:u("flex-shrink-0 text-muted-foreground",i?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsx(GripVertical,{className:"h-5 w-5"})}),jsx("div",{className:"flex-1 min-w-0",children:a(x,R)})]},x.id))})}var GT=j.forwardRef($T);var Pb=cva("absolute inset-0 z-50 flex items-center justify-center transition-opacity",{variants:{variant:{solid:"bg-background",soft:"bg-background/80 backdrop-blur-sm",ghost:"bg-background/50"},visible:{true:"opacity-100 pointer-events-auto",false:"opacity-0 pointer-events-none"}},defaultVariants:{variant:"soft",visible:true}}),_T={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},Eb=j.forwardRef(({className:e,variant:t,loading:r=true,size:n="md",spinner:o,text:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u("relative",e),...i,children:[s,jsx("div",{className:u(Pb({variant:t,visible:r})),"aria-hidden":!r,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsx(Loader2,{className:u(_T[n],"animate-spin text-primary")}),a&&jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));Eb.displayName="LoadingOverlay";var Lb=cva("fixed top-0 left-0 z-[9999] h-0.5 transition-all duration-200 ease-out",{variants:{color:{primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"}},defaultVariants:{color:"primary"}}),Sb=j.forwardRef(({className:e,color:t,isLoading:r=false,progress:n,showSpinner:o=false,...a},s)=>{let[i,l]=j.useState(0),[c,d]=j.useState(false),m=j.useRef(null);return j.useEffect(()=>{if(n!==void 0){l(n),d(n>0&&n<100);return}return r?(d(true),l(10),m.current=setInterval(()=>{l(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):i>0&&(l(100),setTimeout(()=>{d(false),l(0);},200)),()=>{m.current&&clearInterval(m.current);}},[r,n]),!c&&n===void 0||n!==void 0&&(n<=0||n>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:u(Lb({color:t,className:e})),style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...a,children:jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),o&&c&&jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsx("div",{className:u("h-4 w-4 animate-spin rounded-full border-2 border-transparent",t==="primary"&&"border-t-primary",t==="secondary"&&"border-t-secondary",t==="success"&&"border-t-success",t==="warning"&&"border-t-warning",t==="danger"&&"border-t-danger",t==="info"&&"border-t-info")})})]})});Sb.displayName="NProgress";var Vb=cva("flex items-center justify-center",{variants:{variant:{spinner:"",dots:"",pulse:"",skeleton:""},size:{sm:"gap-1",md:"gap-2",lg:"gap-3"},fullScreen:{true:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",false:""}},defaultVariants:{variant:"spinner",size:"md",fullScreen:false}}),Db={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},JT={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Ab=j.forwardRef(({className:e,variant:t="spinner",size:r="md",fullScreen:n,text:o,color:a="primary",...s},i)=>{let l={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[a],c=()=>{switch(t){case "dots":return jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(d=>jsx("div",{className:u(JT[r||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsx("div",{className:u(Db[r||"md"],"animate-pulse rounded-full bg-current",l)});case "skeleton":return jsxs("div",{className:"w-full space-y-2",children:[jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted"})]});default:return jsx(Loader2,{className:u(Db[r||"md"],"animate-spin",l)})}};return jsx("div",{ref:i,className:u(Vb({variant:t,size:r,fullScreen:n,className:e})),role:"status","aria-label":o||"Loading",...s,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[c(),o&&jsx("span",{className:u("text-sm",l),children:o})]})})});Ab.displayName="Loading";var Rl=class extends j.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,r){this.props.onError?.(t,r);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((n,o)=>n!==t.resetKeys?.[o])&&this.reset();}reset=()=>{this.props.onReset?.(),this.setState({hasError:false,error:null});};render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsx(wl,{error:this.state.error,onReset:this.reset}):this.props.children}},wl=j.forwardRef(({error:e,onReset:t,className:r},n)=>jsxs("div",{ref:n,className:u("flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-lg border border-danger/20 bg-danger/5 p-6 text-center",r),role:"alert",children:[jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-danger/10",children:jsx(AlertTriangle,{className:"h-6 w-6 text-danger"})}),jsxs("div",{className:"space-y-2",children:[jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Something went wrong"}),e&&jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:e.message||"An unexpected error occurred"})]}),t&&jsxs("button",{onClick:t,className:"inline-flex items-center gap-2 rounded-md bg-danger px-4 py-2 text-sm font-medium text-danger-foreground hover:bg-danger/90 transition-colors",children:[jsx(RefreshCw,{className:"h-4 w-4"}),"Try again"]})]}));wl.displayName="DefaultErrorFallback";var rM=Rl;var Ob=j.forwardRef(({value:e,defaultValue:t,onValueChange:r,placeholder:n="Pick a date range",dateFormat:o="LLL dd, y",disabled:a=false,minDate:s,maxDate:i,numberOfMonths:l=2,className:c,align:d="start"},m)=>{let[f,p]=j.useState(false),[g,h]=j.useState(t),b=e!==void 0,v=b?e:g,w=R=>{b||h(R),r?.(R);},x=R=>{if(!R)return n;let{from:C,to:y}=R;return C&&y?`${format(C,o)} - ${format(y,o)}`:C?format(C,o):n};return jsxs(_e,{open:f,onOpenChange:p,children:[jsxs(Dt,{ref:m,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!v?.from&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",c),children:[jsx(Calendar,{className:"h-4 w-4"}),x(v)]}),jsx(Xe,{className:"w-auto p-0",align:d,children:jsx(Yr,{mode:"range",defaultMonth:v?.from,selected:v,onSelect:w,numberOfMonths:l,disabled:R=>!!(s&&R<s||i&&R>i),initialFocus:true})})]})});Ob.displayName="DateRangePicker";var uo=e=>String(e).padStart(2,"0"),Bb=j.forwardRef(({value:e,onValueChange:t,placeholder:r="Pick a time",use24Hour:n=true,minuteStep:o=1,disabled:a=false,className:s},i)=>{let[l,c]=j.useState(false),d=n?Array.from({length:24},(x,R)=>R):Array.from({length:12},(x,R)=>R+1),m=Array.from({length:Math.floor(60/o)},(x,R)=>R*o),f=x=>{if(!x)return r;if(n)return `${uo(x.hours)}:${uo(x.minutes)}`;let R=x.hours%12||12,C=x.hours>=12?"PM":"AM";return `${uo(R)}:${uo(x.minutes)} ${C}`},p=x=>{let R=e?.minutes??0,C=x;if(!n&&e){let y=e.hours>=12;y&&x!==12?C=x+12:!y&&x===12&&(C=0);}t?.({hours:C,minutes:R});},g=x=>{let R=e?.hours??0;t?.({hours:R,minutes:x});},h=x=>{if(!e)return;let R=e.hours;x==="AM"&&e.hours>=12?R=e.hours-12:x==="PM"&&e.hours<12&&(R=e.hours+12),t?.({hours:R,minutes:e.minutes});},b=()=>{let x=new Date;t?.({hours:x.getHours(),minutes:x.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,w=e?n?e.hours:e.hours%12||12:void 0;return jsxs(_e,{open:l,onOpenChange:c,children:[jsxs(Dt,{ref:i,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!e&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",s),children:[jsx(Clock,{className:"h-4 w-4"}),f(e)]}),jsxs(Xe,{className:"w-auto p-0",align:"start",children:[jsxs("div",{className:"flex",children:[jsxs("div",{className:"flex flex-col",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Hour"}),jsx(De,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:d.map(x=>jsx(ae,{variant:w===x?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(x),children:uo(x)},x))})})]}),jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Min"}),jsx(De,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:m.map(x=>jsx(ae,{variant:e?.minutes===x?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(x),children:uo(x)},x))})})]}),!n&&jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"\xA0"}),jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsx(ae,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsx(ae,{variant:v==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("PM"),children:"PM"})]})]})]}),jsxs("div",{className:"flex justify-between border-t p-2",children:[jsx(ae,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsx(ae,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});Bb.displayName="TimePicker";var Fb=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function sM({className:e,variant:t,items:r,itemHeight:n,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},m){let f=j.useRef(null),[p,g]=j.useState(0);j.useImperativeHandle(m,()=>f.current);let h=r.length*(n+l)-l,b=n+l,v=Math.max(0,Math.floor(p/b)-a),w=Math.ceil(o/b)+2*a,x=Math.min(r.length-1,v+w),R=y=>{let k=y.currentTarget.scrollTop;g(k),c?.(k);},C=j.useMemo(()=>{let y=[];for(let k=v;k<=x;k++)r[k]!==void 0&&y.push({item:r[k],index:k,style:{position:"absolute",top:k*b,left:0,right:0,height:n}});return y},[r,v,x,b,n]);return jsx("div",{ref:f,className:u(Fb({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:R,...d,children:jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:y,index:k,style:T})=>jsx("div",{style:T,children:s(y,k)},i?i(y,k):k))})})}var iM=j.forwardRef(sM);var $b=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Nl=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Gb=j.forwardRef(({className:e,variant:t,size:r,children:n,onLoadMore:o,hasMore:a,isLoading:s=false,loader:i,threshold:l=100,rootMargin:c,useWindow:d=false,endMessage:m,...f},p)=>{let g=j.useRef(null),h=j.useRef(null),b=j.useRef(false);j.useImperativeHandle(p,()=>g.current),j.useEffect(()=>{let w=h.current;if(!w)return;let x=new IntersectionObserver(R=>{let[C]=R;C.isIntersecting&&a&&!s&&!b.current&&(b.current=true,Promise.resolve(o()).finally(()=>{b.current=false;}));},{root:d?null:g.current,rootMargin:c||`${l}px`,threshold:0});return x.observe(w),()=>{x.disconnect();}},[a,s,o,l,c,d]);let v=jsx("div",{className:u(Nl({size:r})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxs("div",{ref:g,className:u($b({variant:t,className:e})),...f,children:[n,jsx("div",{ref:h,className:"h-px w-full"}),s&&(i||v),!a&&!s&&m&&jsx("div",{className:u(Nl({size:r}),"text-muted-foreground text-sm"),children:m})]})});Gb.displayName="InfiniteScroll";var ra=j.forwardRef(({className:e,...t},r)=>jsx("span",{ref:r,className:u("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));ra.displayName="VisuallyHidden";var Wb={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},uM={auto:"top-[50%] translate-y-[-50%]",center:"top-[50%] translate-y-[-50%]",top:"top-4 translate-y-0",bottom:"top-auto bottom-4 translate-y-0","top-center":"top-[20%] translate-y-0","bottom-center":"top-auto bottom-[20%] translate-y-0"},jb=cva("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),kl=cva("fixed left-[50%] z-50 grid translate-x-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Ms=j.createContext(null),Hn=()=>{let e=j.useContext(Ms);if(!e)throw new Error("Modal components must be used within a Modal");return e},Xb=j.forwardRef(({open:e,onOpenChange:t,trigger:r,title:n="Modal",children:o,hideCloseButton:a=false,isDismissable:s=true,isKeyboardDismissDisabled:i=false,backdrop:l="opaque",placement:c="center",scrollBehavior:d="inside",size:m,className:f},p)=>{let[g,h]=j.useState(false),b=e!==void 0,v=b?e:g,[w,x]=j.useState(false),R=j.useRef(null),C=j.useId(),y=j.useId();j.useEffect(()=>{x(true);},[]);let k=j.useCallback(P=>{b||h(P),t?.(P);},[b,t]);j.useEffect(()=>{if(v)return Rt(),()=>wt()},[v]),j.useEffect(()=>{if(!v||i)return;let P=E=>{E.key==="Escape"&&k(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[v,i,k]);let T=P=>{s&&P.target===P.currentTarget&&k(false);},N=r?j.isValidElement(r)?j.cloneElement(r,{onClick:P=>{r.props.onClick?.(P),k(true);}}):jsx("button",{type:"button",onClick:()=>k(true),children:r}):null,M=()=>!w||!v?null:d==="outside"?$a.createPortal(jsx("div",{"data-state":v?"open":"closed",className:u(jb(),Wb[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:T,children:jsxs("div",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":v?"open":"closed",className:u("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",m==="xs"&&"w-full max-w-xs",m==="sm"&&"w-full max-w-sm",m==="md"&&"w-full max-w-md",m==="lg"&&"w-full max-w-lg",m==="xl"&&"w-full max-w-xl",m==="2xl"&&"w-full max-w-2xl",m==="3xl"&&"w-full max-w-3xl",m==="4xl"&&"w-full max-w-4xl",m==="5xl"&&"w-full max-w-5xl",m==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!m&&"w-full max-w-md",f),children:[jsx(ra,{children:jsx("h2",{id:C,children:n})}),o,!a&&jsx(ct,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>k(false)})]})}),document.body):$a.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":v?"open":"closed",className:u(jb(),Wb[l]),onClick:T,"aria-hidden":"true"}),jsxs("div",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":v?"open":"closed",className:u(kl({size:m}),uM[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsx(ra,{children:jsx("h2",{id:C,children:n})}),o,!a&&jsx(ct,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>k(false)})]})]}),document.body);return jsxs(Ms.Provider,{value:{open:v,onOpenChange:k,scrollBehavior:d,titleId:C,descriptionId:y},children:[N,M()]})});Xb.displayName="Modal";var Yb=({children:e,open:t,defaultOpen:r=false,onOpenChange:n,scrollBehavior:o="inside"})=>{let[a,s]=j.useState(r),i=t!==void 0,l=i?t:a,c=j.useId(),d=j.useId(),m=j.useCallback(f=>{i||s(f),n?.(f);},[i,n]);return jsx(Ms.Provider,{value:{open:l,onOpenChange:m,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};Yb.displayName="ModalRoot";var qb=j.forwardRef(({children:e,onClick:t,...r},n)=>{let{onOpenChange:o}=Hn();return jsx("button",{ref:n,type:"button",onClick:s=>{t?.(s),o(true);},...r,children:e})});qb.displayName="ModalTrigger";var Pl=({children:e,container:t})=>{let[r,n]=j.useState(false);return j.useEffect(()=>{n(true);},[]),r?$a.createPortal(e,t||document.body):null};Pl.displayName="ModalPortal";var El=j.forwardRef(({className:e,...t},r)=>{let{open:n,onOpenChange:o}=Hn();return n?jsx("div",{ref:r,"data-state":n?"open":"closed",className:u("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});El.displayName="ModalOverlay";var Zb=j.forwardRef(({children:e,onClick:t,...r},n)=>{let{onOpenChange:o}=Hn();return jsx("button",{ref:n,type:"button",onClick:s=>{t?.(s),o(false);},...r,children:e})});Zb.displayName="ModalClose";var Qb=j.forwardRef(({className:e,children:t,size:r,showCloseButton:n=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:m}=Hn(),[f,p]=j.useState(false);return j.useEffect(()=>{p(true);},[]),j.useEffect(()=>{if(l)return Rt(),()=>wt()},[l]),j.useEffect(()=>{if(!l)return;let g=h=>{h.key==="Escape"&&(o?.(),c(false));};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l,c,o]),!f||!l?null:jsxs(Pl,{children:[jsx(El,{}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":m,"data-state":l?"open":"closed",className:u(kl({size:r}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,n&&jsx(ct,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>c(false)})]})]})});Qb.displayName="ModalContent";var Jb=({className:e,...t})=>jsx("div",{className:u("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Jb.displayName="ModalHeader";var ev=({className:e,children:t})=>(j.useContext(Ms)?.scrollBehavior??"inside")==="inside"?jsx(De,{className:u("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:u(e),children:t});ev.displayName="ModalBody";var tv=({className:e,children:t,...r})=>{let{onOpenChange:n}=Hn();return jsx("div",{className:u("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r,children:j.Children.map(t,o=>j.isValidElement(o)?j.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),n(false);}}):o)})};tv.displayName="ModalFooter";var rv=j.forwardRef(({className:e,...t},r)=>{let{titleId:n}=Hn();return jsx("h2",{ref:r,id:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});rv.displayName="ModalTitle";var nv=j.forwardRef(({className:e,...t},r)=>{let{descriptionId:n}=Hn();return jsx("p",{ref:r,id:n,className:u("text-sm text-muted-foreground",e),...t})});nv.displayName="ModalDescription";var wM=e=>e.map(t=>typeof t=="string"?{src:t}:t),Ll=j.forwardRef(({images:e,open:t,onOpenChange:r,initialIndex:n=0,onIndexChange:o,trigger:a,showThumbnails:s=true,showZoom:i=true,showRotate:l=true,showDownload:c=true,showFullscreen:d=true,showNavigation:m=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let b=j.useMemo(()=>wM(e),[e]),[v,w]=j.useState(n),[x,R]=j.useState(1),[C,y]=j.useState(0),[k,T]=j.useState(false),[N,M]=j.useState(false),[P,E]=j.useState({x:0,y:0}),[D,H]=j.useState({x:0,y:0}),[L,S]=j.useState(false),V=j.useRef(null),A=b[v];j.useEffect(()=>{S(true);},[]),j.useEffect(()=>{w(n);},[n]),j.useEffect(()=>{o?.(v);},[v,o]),j.useEffect(()=>{R(1),y(0),E({x:0,y:0});},[v]),j.useEffect(()=>{if(t)return Rt(),()=>wt()},[t]);let B=j.useCallback(()=>{w(Z=>Z>0?Z-1:b.length-1);},[b.length]),I=j.useCallback(()=>{w(Z=>Z<b.length-1?Z+1:0);},[b.length]),F=()=>{R(Z=>Math.min(Z+.5,4));},K=()=>{R(Z=>{let ye=Math.max(Z-.5,.5);return ye===1&&E({x:0,y:0}),ye});},Y=()=>{y(Z=>(Z+90)%360);},te=async()=>{if(A)try{let ye=await(await fetch(A.src)).blob(),zr=URL.createObjectURL(ye),ft=document.createElement("a");ft.href=zr,ft.download=A.alt||`image-${v+1}`,document.body.appendChild(ft),ft.click(),document.body.removeChild(ft),URL.revokeObjectURL(zr);}catch{window.open(A.src,"_blank");}},$=async()=>{if(V.current)if(k)try{await document.exitFullscreen(),T(!1);}catch{}else try{await V.current.requestFullscreen(),T(!0);}catch{}},O=Z=>{x>1&&(M(true),H({x:Z.clientX-P.x,y:Z.clientY-P.y}));},W=Z=>{N&&x>1&&E({x:Z.clientX-D.x,y:Z.clientY-D.y});},z=()=>{M(false);},_=()=>{r?.(false);},Q=Z=>{p&&Z.target===Z.currentTarget&&_();},ue=j.useCallback(Z=>{switch(Z.key){case "ArrowLeft":B();break;case "ArrowRight":I();break;case "Escape":r?.(false);break;case "+":case "=":F();break;case "-":K();break}},[B,I,r]);if(j.useEffect(()=>{if(t)return window.addEventListener("keydown",ue),()=>window.removeEventListener("keydown",ue)},[t,ue]),j.useEffect(()=>{let Z=()=>{T(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",Z),()=>document.removeEventListener("fullscreenchange",Z)},[]),b.length===0)return null;let U=a?j.isValidElement(a)?j.cloneElement(a,{onClick:Z=>{a.props.onClick?.(Z),r?.(true);}}):jsx("button",{type:"button",onClick:()=>r?.(true),children:a}):null;return jsxs(Fragment,{children:[U,!L||!t?null:$a.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/90 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":t?"open":"closed",onClick:Q}),jsxs("div",{ref:h,className:u("fixed inset-0 z-50 flex flex-col outline-none",g),children:[jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxs("div",{className:"flex items-center gap-2",children:[f&&b.length>1&&jsxs("span",{className:"text-sm",children:[v+1," / ",b.length]}),A?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:A.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[i&&jsxs(Fragment,{children:[jsx("button",{onClick:K,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom out",children:jsx(ZoomOut,{className:"h-5 w-5"})}),jsxs("span",{className:"min-w-[3rem] text-center text-sm",children:[Math.round(x*100),"%"]}),jsx("button",{onClick:F,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsx(ZoomIn,{className:"h-5 w-5"})})]}),l&&jsx("button",{onClick:Y,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsx(RotateCw,{className:"h-5 w-5"})}),c&&jsx("button",{onClick:te,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsx(Download,{className:"h-5 w-5"})}),d&&jsx("button",{onClick:$,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:k?"Exit fullscreen":"Fullscreen",children:k?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs("button",{onClick:_,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxs("div",{ref:V,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:O,onMouseMove:W,onMouseUp:z,onMouseLeave:z,children:[m&&b.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:B,className:"absolute left-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronLeft,{className:"h-6 w-6"})}),jsx("button",{onClick:I,className:"absolute right-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronRight,{className:"h-6 w-6"})})]}),jsx("img",{src:A?.src,alt:A?.alt||"",className:u("max-h-full max-w-full object-contain transition-transform duration-200",N?"cursor-grabbing":x>1?"cursor-grab":""),style:{transform:`translate(${P.x}px, ${P.y}px) scale(${x}) rotate(${C}deg)`},draggable:false})]}),A?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:A.description}),s&&b.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:b.map((Z,ye)=>jsx("button",{onClick:()=>w(ye),className:u("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===ye?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:Z.src,alt:Z.alt||`Thumbnail ${ye+1}`,className:"h-full w-full object-cover"})},ye))})]})]}),document.body)]})});Ll.displayName="ImageViewer";var av=({children:e,images:t,index:r=0,className:n})=>{let[o,a]=j.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>a(true),className:u("cursor-zoom-in",n),children:e}),jsx(Ll,{images:t,open:o,onOpenChange:a,initialIndex:r})]})};av.displayName="ImageViewerTrigger";var sv=cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),iv=j.forwardRef(({className:e,color:t,size:r,position:n,ping:o,content:a,show:s=true,offset:i,style:l,...c},d)=>{if(!s)return null;let m=a!=null;return jsxs("span",{ref:d,className:u(sv({color:t,size:m?void 0:r,position:n,ping:o}),m&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...l,...i!==void 0&&{transform:`translate(${n?.includes("right")?i:-i}px, ${n?.includes("top")?-i:i}px)`}},...c,children:[o&&jsx("span",{className:u("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),a]})});iv.displayName="Indicator";var lv=j.forwardRef(({className:e,children:t,...r},n)=>jsx("div",{ref:n,className:u("relative inline-flex",e),...r,children:t}));lv.displayName="IndicatorWrapper";var dv=cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),uv=j.forwardRef(({className:e,orientation:t,size:r,hideScrollbar:n=false,shadowColor:o="rgba(0, 0, 0, 0.1)",children:a,...s},i)=>{let l=j.useRef(null),[c,d]=j.useState({top:false,bottom:false,left:false,right:false});j.useImperativeHandle(i,()=>l.current);let m=j.useCallback(()=>{let v=l.current;if(!v)return;let{scrollTop:w,scrollLeft:x,scrollHeight:R,scrollWidth:C,clientHeight:y,clientWidth:k}=v;d({top:w>0,bottom:w<R-y-1,left:x>0,right:x<C-k-1});},[]);j.useEffect(()=>{let v=l.current;if(v)return m(),v.addEventListener("scroll",m),window.addEventListener("resize",m),()=>{v.removeEventListener("scroll",m),window.removeEventListener("resize",m);}},[m]);let p={sm:"20px",md:"40px",lg:"60px"}[r??"md"],g=t==="vertical"||t==="both",h=t==="horizontal"||t==="both",b={maskImage:[g&&c.top&&`linear-gradient(to bottom, transparent, black ${p})`,g&&c.bottom&&`linear-gradient(to top, transparent, black ${p})`,h&&c.left&&`linear-gradient(to right, transparent, black ${p})`,h&&c.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsx("div",{ref:l,className:u(dv({orientation:t,size:r}),n&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:b,...s,children:a})});uv.displayName="ScrollShadow";var mv=cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",bordered:"rounded border border-current text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),PM={cmd:"\u2318",command:"\u2318",meta:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",return:"\u21B5",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",space:"\u2423",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2912",end:"\u2913",capslock:"\u21EA"},EM={cmd:"meta",command:"meta",ctrl:"control",alt:"alt",option:"alt",shift:"shift",enter:"enter",return:"enter",backspace:"backspace",delete:"delete",escape:"escape",esc:"escape",tab:"tab",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",pageup:"pageup",pagedown:"pagedown",home:"home",end:"end"},LM=e=>{let t=e.toLowerCase();return PM[t]||e.toUpperCase()},oa=e=>{let t=e.toLowerCase();return EM[t]||t},Ns=e=>{let t=oa(e);return ["meta","control","alt","shift"].includes(t)},pv=j.forwardRef(({className:e,variant:t,size:r,keys:n,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{j.useEffect(()=>{if(!a||!n||s)return;let m=Array.isArray(n)?n:[n],f=m.filter(Ns).map(oa),p=m.filter(h=>!Ns(h)).map(oa),g=h=>{let b=f.includes("meta")===h.metaKey,v=f.includes("control")===h.ctrlKey,w=f.includes("alt")===h.altKey,x=f.includes("shift")===h.shiftKey,R=p.length===0||p.includes(h.key.toLowerCase());b&&v&&w&&x&&R&&(i&&h.preventDefault(),a(h));};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[n,a,s,i]);let d=()=>n?(Array.isArray(n)?n:[n]).map((f,p)=>jsxs(j.Fragment,{children:[p>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:LM(f)})]},p)):o;return jsx("kbd",{ref:c,className:u(mv({variant:t,size:r}),s&&"opacity-50",e),...l,children:d()})});pv.displayName="Kbd";function SM(e,t,r={}){let{disabled:n=false,preventDefault:o=true}=r;j.useEffect(()=>{if(n)return;let a=Array.isArray(e)?e:[e],s=a.filter(Ns).map(oa),i=a.filter(c=>!Ns(c)).map(oa),l=c=>{let d=s.includes("meta")===c.metaKey,m=s.includes("control")===c.ctrlKey,f=s.includes("alt")===c.altKey,p=s.includes("shift")===c.shiftKey,g=i.length===0||i.includes(c.key.toLowerCase());d&&m&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,n,o]);}var fv=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),gv=j.forwardRef(({className:e,size:t,value:r,successDuration:n=2e3,onCopySuccess:o,onCopyError:a,copyIcon:s,successIcon:i,...l},c)=>{let[d,m]=j.useState(false),p={sm:14,md:16,lg:20}[t??"md"],g=async()=>{try{await navigator.clipboard.writeText(r),m(!0),o?.(),setTimeout(()=>{m(!1);},n);}catch(h){a?.(h);}};return jsx("button",{ref:c,type:"button",className:u(fv({size:t}),e),onClick:g,"aria-label":d?"Copied":"Copy to clipboard",...l,children:d?i??jsx(Check,{className:"text-success",style:{width:p,height:p}}):s??jsx(Copy,{style:{width:p,height:p}})})});gv.displayName="CopyButton";var vv=cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),BM=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],FM=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function KM(e,t,r){let n=new Date(e,t,1),o=new Date(e,t+1,0),a=[],s=n.getDay()-r;s<0&&(s+=7);for(let l=s-1;l>=0;l--)a.push(new Date(e,t,-l));for(let l=1;l<=o.getDate();l++)a.push(new Date(e,t,l));let i=42-a.length;for(let l=1;l<=i;l++)a.push(new Date(e,t+1,l));return a}function $M(e,t){let r=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),r.push(i);}return r}function Es(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Ps(e){return Es(e,new Date)}function bv(e,t){return e.filter(r=>{let n=new Date(r.start),o=new Date(r.end);return Es(n,t)||Es(o,t)||n<t&&o>t})}var hv=j.forwardRef(({className:e,variant:t,size:r,events:n=[],view:o="month",onViewChange:a,date:s,onDateChange:i,onEventClick:l,onSlotClick:c,weekStartsOn:d=0,locale:m="en-US",...f},p)=>{let[g,h]=j.useState(new Date),b=s??g,v=M=>{i?i(M):h(M);},w=d===1?FM:BM,x=()=>{let M=new Date(b);o==="month"?M.setMonth(M.getMonth()-1):o==="week"?M.setDate(M.getDate()-7):M.setDate(M.getDate()-1),v(M);},R=()=>{let M=new Date(b);o==="month"?M.setMonth(M.getMonth()+1):o==="week"?M.setDate(M.getDate()+7):M.setDate(M.getDate()+1),v(M);},C=()=>{v(new Date);},y=()=>o==="day"?b.toLocaleDateString(m,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):b.toLocaleDateString(m,{year:"numeric",month:"long"}),k=()=>{let M=KM(b.getFullYear(),b.getMonth(),d);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(P=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:P},P))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:M.map((P,E)=>{let D=bv(n,P),H=P.getMonth()===b.getMonth();return jsxs("div",{className:u("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!H&&"bg-muted/30"),onClick:()=>c?.(P),children:[jsx("div",{className:u("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",Ps(P)&&"bg-primary text-primary-foreground",!H&&"text-muted-foreground"),children:P.getDate()}),jsxs("div",{className:"space-y-0.5",children:[D.slice(0,3).map(L=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(L);},children:L.title},L.id)),D.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",D.length-3," more"]})]})]},E)})})]})},T=()=>{let M=$M(b,d),P=Array.from({length:24},(E,D)=>D);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsx("div",{className:"p-2"}),M.map((E,D)=>jsxs("div",{className:u("p-2 text-center border-l",Ps(E)&&"bg-primary/10"),children:[jsx("div",{className:"text-xs text-muted-foreground",children:w[D]}),jsx("div",{className:u("text-lg font-semibold",Ps(E)&&"text-primary"),children:E.getDate()})]},D))]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:P.map(E=>jsxs(j.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[E.toString().padStart(2,"0"),":00"]}),M.map((D,H)=>{let L=new Date(D);L.setHours(E,0,0,0);let S=n.filter(V=>{let A=new Date(V.start);return Es(A,D)&&A.getHours()===E});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(L),children:S.map(V=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:V.color||"hsl(var(--primary))",color:"white"},onClick:A=>{A.stopPropagation(),l?.(V);},children:V.title},V.id))},H)})]},E))})})]})},N=()=>{let M=Array.from({length:24},(E,D)=>D),P=bv(n,b);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsx("div",{className:"p-4 border-b text-center",children:jsx("div",{className:u("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",Ps(b)&&"bg-primary text-primary-foreground"),children:b.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:M.map(E=>{let D=new Date(b);D.setHours(E,0,0,0);let H=P.filter(L=>new Date(L.start).getHours()===E);return jsxs(j.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[E.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(D),children:H.map(L=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(L);},children:L.title},L.id))})]},E)})})})]})};return jsxs("div",{ref:p,className:u(vv({variant:t,size:r,className:e})),...f,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",onClick:C,children:"Today"}),jsx(ae,{variant:"ghost",size:"icon",onClick:x,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"ghost",size:"icon",onClick:R,children:jsx(ChevronRight,{className:"h-4 w-4"})}),jsx("h2",{className:"text-lg font-semibold ml-2",children:y()})]}),jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(M=>jsx(ae,{variant:o===M?"solid":"ghost",size:"sm",onClick:()=>a?.(M),children:M.charAt(0).toUpperCase()+M.slice(1)},M))})]}),o==="month"&&k(),o==="week"&&T(),o==="day"&&N()]})});hv.displayName="FullCalendar";var Hs=({active:e,payload:t,label:r})=>!e||!t||!t.length?null:jsxs("div",{className:"border bg-card text-card-foreground shadow-sm rounded-lg p-3 min-w-[120px]",children:[r&&jsx("p",{className:"text-sm font-medium mb-2 text-card-foreground",children:r}),jsx("div",{className:"space-y-1",children:t.map((n,o)=>jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsx("span",{className:"text-sm",style:{color:n.color},children:n.name}),jsx("span",{className:"text-sm font-medium text-card-foreground",children:typeof n.value=="number"?n.value.toLocaleString():n.value})]},o))})]}),sa=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),ia=["hsl(var(--primary))","hsl(var(--chart-1, 220 70% 50%))","hsl(var(--chart-2, 160 60% 45%))","hsl(var(--chart-3, 30 80% 55%))","hsl(var(--chart-4, 280 65% 60%))"],xv=j.forwardRef(({className:e,size:t,data:r,dataKeys:n,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},m)=>jsx("div",{ref:m,className:u(sa({size:t,className:e})),...d,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(LineChart,{data:r,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Hs,{})}),s&&jsx(Legend,{}),n.map((f,p)=>jsx(Line,{type:c,dataKey:f,stroke:o[p%o.length],strokeWidth:2,dot:{fill:o[p%o.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));xv.displayName="LineChart";var yv=j.forwardRef(({className:e,size:t,data:r,dataKeys:n,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(BarChart,{data:r,layout:d,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d==="horizontal"?l:void 0,type:d==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{dataKey:d==="vertical"?l:void 0,type:d==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Hs,{})}),s&&jsx(Legend,{}),n.map((p,g)=>jsx(Bar,{dataKey:p,fill:o[g%o.length],stackId:c?"stack":void 0,radius:[4,4,0,0]},p))]})})}));yv.displayName="BarChart";var Rv=j.forwardRef(({className:e,size:t,data:r,dataKey:n="value",nameKey:o="name",colors:a=ia,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[c&&jsx(Tooltip,{content:jsx(Hs,{})}),l&&jsx(Legend,{}),jsx(Pie,{data:r,dataKey:n,nameKey:o,cx:"50%",cy:"50%",innerRadius:s,outerRadius:i,label:d,labelLine:d,children:r.map((p,g)=>jsx(Cell,{fill:a[g%a.length]},`cell-${g}`))})]})})}));Rv.displayName="PieChart";var wv=j.forwardRef(({className:e,size:t,data:r,dataKeys:n,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{data:r,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Hs,{})}),s&&jsx(Legend,{}),n.map((p,g)=>jsx(Area,{type:d,dataKey:p,stroke:o[g%o.length],fill:o[g%o.length],fillOpacity:.3,stackId:c?"stack":void 0},p))]})})}));wv.displayName="AreaChart";var Mv=cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border rounded-lg bg-background",ghost:""}},defaultVariants:{variant:"default"}}),Nv=cva("flex flex-col min-w-[280px] w-[280px] rounded-lg",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),Ol=cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function uN({card:e,columnId:t,variant:r,renderCard:n,onCardClick:o}){let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=useSortable({id:e.id,data:{columnId:t}}),m={transform:CSS.Transform.toString(l),transition:c};return jsx("div",{ref:i,style:m,className:u(Ol({variant:r,isDragging:d})),onClick:()=>o?.(e,t),...a,...s,children:n?n(e,t):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function mN({column:e,variant:t,renderCard:r,onCardClick:n,onAddCard:o,showAddCard:a,columnHeight:s}){return jsxs("div",{className:u(Nv({variant:t})),children:[jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),a&&jsx(ae,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o?.(e.id),children:jsx(Plus,{className:"h-4 w-4"})})]}),jsx(De,{style:{height:s},children:jsxs("div",{className:"p-2 space-y-2",children:[jsx(SortableContext,{items:e.cards.map(i=>i.id),strategy:verticalListSortingStrategy,children:e.cards.map(i=>jsx(uN,{card:i,columnId:e.id,variant:t,renderCard:r,onCardClick:n},i.id))}),e.cards.length===0&&jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var kv=j.forwardRef(({className:e,variant:t,columns:r,onCardMove:n,onCardClick:o,onAddCard:a,renderCard:s,showAddCard:i=true,columnHeight:l=500,...c},d)=>{let[m,f]=j.useState(null),[p,g]=j.useState(null),h=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),b=R=>r.find(C=>C.cards.some(y=>y.id===R));return jsxs(DndContext,{sensors:h,collisionDetection:closestCorners,onDragStart:R=>{let{active:C}=R,y=b(C.id);if(y){let k=y.cards.find(T=>T.id===C.id);k&&(f(k),g(y.id));}},onDragOver:R=>{let{active:C,over:y}=R;if(!y)return;let k=C.id,T=y.id,N=b(k),M=b(T)||r.find(D=>D.id===T);if(!N||!M||N.id===M.id)return;let P=M.cards.findIndex(D=>D.id===T),E=P===-1?M.cards.length:P;n?.(k,N.id,M.id,E);},onDragEnd:R=>{let{active:C,over:y}=R;if(y&&C.id!==y.id){let k=b(C.id),T=b(y.id)||r.find(N=>N.id===y.id);if(k&&T){let N=T.cards.findIndex(P=>P.id===y.id),M=N===-1?T.cards.length:N;n?.(C.id,k.id,T.id,M);}}f(null),g(null);},children:[jsx("div",{ref:d,className:u(Mv({variant:t,className:e})),...c,children:r.map(R=>jsx(mN,{column:R,variant:t,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,columnHeight:l},R.id))}),jsx(DragOverlay,{children:m&&p&&jsx("div",{className:u(Ol({variant:t,isDragging:true})),children:s?s(m,p):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:m.title}),m.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:m.description})]})]})})})]})});kv.displayName="KanbanBoard";var Pv=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),Ev=j.createContext(null);function Vs(){let e=j.useContext(Ev);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Lv=j.forwardRef(({className:e,variant:t,children:r,opts:n,plugins:o,orientation:a="horizontal",showArrows:s=true,showDots:i=true,setApi:l,...c},d)=>{let[m,f]=pN({...n,axis:a==="horizontal"?"x":"y"},o),[p,g]=j.useState(false),[h,b]=j.useState(false),[v,w]=j.useState(0),[x,R]=j.useState([]),C=j.useCallback(M=>{M&&(w(M.selectedScrollSnap()),g(M.canScrollPrev()),b(M.canScrollNext()));},[]),y=j.useCallback(()=>{f?.scrollPrev();},[f]),k=j.useCallback(()=>{f?.scrollNext();},[f]),T=j.useCallback(M=>{f?.scrollTo(M);},[f]),N=j.useCallback(M=>{M.key==="ArrowLeft"?(M.preventDefault(),y()):M.key==="ArrowRight"&&(M.preventDefault(),k());},[y,k]);return j.useEffect(()=>{!f||!l||l(f);},[f,l]),j.useEffect(()=>{if(f)return R(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsx(Ev.Provider,{value:{carouselRef:m,api:f,scrollPrev:y,scrollNext:k,canScrollPrev:p,canScrollNext:h,selectedIndex:v,scrollSnaps:x,scrollTo:T,orientation:a},children:jsxs("div",{ref:d,className:u(Pv({variant:t,className:e})),onKeyDownCapture:N,role:"region","aria-roledescription":"carousel",...c,children:[jsx("div",{ref:m,className:"overflow-hidden",children:jsx("div",{className:u("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:r})}),s&&jsxs(Fragment,{children:[jsx(Bl,{}),jsx(Fl,{})]}),i&&x.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:x.map((M,P)=>jsx("button",{className:u("w-2 h-2 rounded-full transition-all",P===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>T(P),"aria-label":`Go to slide ${P+1}`},P))})]})})});Lv.displayName="Carousel";var Sv=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex",e),...t}));Sv.displayName="CarouselContent";var Dv=j.forwardRef(({className:e,basis:t="basis-full",...r},n)=>{let{orientation:o}=Vs();return jsx("div",{ref:n,role:"group","aria-roledescription":"slide",className:u("min-w-0 shrink-0 grow-0",o==="horizontal"?"pl-4":"pt-4",t,e),...r})});Dv.displayName="CarouselItem";var Bl=j.forwardRef(({className:e,variant:t="bordered",size:r="icon",...n},o)=>{let{scrollPrev:a,canScrollPrev:s}=Vs();return jsxs(ae,{ref:o,variant:t,size:r,className:u("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...n,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});Bl.displayName="CarouselPrevious";var Fl=j.forwardRef(({className:e,variant:t="bordered",size:r="icon",...n},o)=>{let{scrollNext:a,canScrollNext:s}=Vs();return jsxs(ae,{ref:o,variant:t,size:r,className:u("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...n,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});Fl.displayName="CarouselNext";var Hv=cva("flex flex-col bg-popover border rounded-lg shadow-md",{variants:{size:{sm:"w-64 h-72",md:"w-80 h-96",lg:"w-96 h-[480px]"}},defaultVariants:{size:"md"}}),As={recent:{icon:"\u{1F550}",name:"Recent"},smileys:{icon:"\u{1F600}",name:"Smileys & Emotion"},people:{icon:"\u{1F44B}",name:"People & Body"},animals:{icon:"\u{1F43B}",name:"Animals & Nature"},food:{icon:"\u{1F354}",name:"Food & Drink"},travel:{icon:"\u{1F697}",name:"Travel & Places"},activities:{icon:"\u26BD",name:"Activities"},objects:{icon:"\u{1F4A1}",name:"Objects"},symbols:{icon:"\u2764\uFE0F",name:"Symbols"},flags:{icon:"\u{1F3F3}\uFE0F",name:"Flags"}},$l={smileys:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F923}","\u{1F602}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60A}","\u{1F607}","\u{1F970}","\u{1F60D}","\u{1F929}","\u{1F618}","\u{1F617}","\u263A\uFE0F","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61C}","\u{1F92A}","\u{1F61D}","\u{1F911}","\u{1F917}","\u{1F92D}","\u{1F92B}","\u{1F914}","\u{1F910}","\u{1F928}","\u{1F610}","\u{1F611}","\u{1F636}","\u{1F60F}","\u{1F612}","\u{1F644}","\u{1F62C}","\u{1F925}","\u{1F60C}","\u{1F614}","\u{1F62A}","\u{1F924}","\u{1F634}","\u{1F637}","\u{1F912}","\u{1F915}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F975}","\u{1F976}","\u{1F974}","\u{1F635}","\u{1F92F}","\u{1F920}","\u{1F973}","\u{1F978}","\u{1F60E}","\u{1F913}","\u{1F9D0}","\u{1F615}","\u{1F61F}","\u{1F641}","\u2639\uFE0F","\u{1F62E}","\u{1F62F}","\u{1F632}","\u{1F633}","\u{1F97A}","\u{1F626}","\u{1F627}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F622}","\u{1F62D}","\u{1F631}","\u{1F616}","\u{1F623}","\u{1F61E}","\u{1F613}","\u{1F629}","\u{1F62B}","\u{1F971}","\u{1F624}","\u{1F621}","\u{1F620}","\u{1F92C}","\u{1F608}","\u{1F47F}","\u{1F480}","\u2620\uFE0F","\u{1F4A9}","\u{1F921}","\u{1F479}","\u{1F47A}","\u{1F47B}","\u{1F47D}"],people:["\u{1F44B}","\u{1F91A}","\u{1F590}\uFE0F","\u270B","\u{1F596}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u{1F44D}","\u{1F44E}","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9BF}","\u{1F9B5}","\u{1F9B6}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}","\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F469}","\u{1F9D3}","\u{1F474}","\u{1F475}","\u{1F64D}","\u{1F64E}","\u{1F645}","\u{1F646}","\u{1F481}","\u{1F64B}","\u{1F9CF}","\u{1F647}","\u{1F926}","\u{1F937}","\u{1F46E}","\u{1F575}\uFE0F","\u{1F482}","\u{1F977}","\u{1F477}","\u{1F934}","\u{1F478}"],animals:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F99F}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}"],food:["\u{1F347}","\u{1F348}","\u{1F349}","\u{1F34A}","\u{1F34B}","\u{1F34C}","\u{1F34D}","\u{1F96D}","\u{1F34E}","\u{1F34F}","\u{1F350}","\u{1F351}","\u{1F352}","\u{1F353}","\u{1FAD0}","\u{1F95D}","\u{1F345}","\u{1FAD2}","\u{1F965}","\u{1F951}","\u{1F346}","\u{1F954}","\u{1F955}","\u{1F33D}","\u{1F336}\uFE0F","\u{1FAD1}","\u{1F952}","\u{1F96C}","\u{1F966}","\u{1F9C4}","\u{1F9C5}","\u{1F344}","\u{1F95C}","\u{1F330}","\u{1F35E}","\u{1F950}","\u{1F956}","\u{1FAD3}","\u{1F968}","\u{1F96F}","\u{1F95E}","\u{1F9C7}","\u{1F9C0}","\u{1F356}","\u{1F357}","\u{1F969}","\u{1F953}","\u{1F354}","\u{1F35F}","\u{1F355}","\u{1F32D}","\u{1F96A}","\u{1F32E}","\u{1F32F}","\u{1FAD4}","\u{1F959}","\u{1F9C6}","\u{1F95A}","\u{1F373}","\u{1F958}","\u{1F372}","\u{1FAD5}","\u{1F963}","\u{1F957}","\u{1F37F}","\u{1F9C8}","\u{1F9C2}","\u{1F96B}","\u{1F371}","\u{1F358}","\u{1F359}","\u{1F35A}","\u{1F35B}","\u{1F35C}","\u{1F35D}","\u{1F360}","\u{1F362}","\u{1F363}","\u{1F364}","\u{1F365}"],travel:["\u{1F697}","\u{1F695}","\u{1F699}","\u{1F68C}","\u{1F68E}","\u{1F3CE}\uFE0F","\u{1F693}","\u{1F691}","\u{1F692}","\u{1F690}","\u{1F6FB}","\u{1F69A}","\u{1F69B}","\u{1F69C}","\u{1F9AF}","\u{1F9BD}","\u{1F9BC}","\u{1F6F4}","\u{1F6B2}","\u{1F6F5}","\u{1F3CD}\uFE0F","\u{1F6FA}","\u{1F6A8}","\u{1F694}","\u{1F68D}","\u{1F698}","\u{1F696}","\u{1F6A1}","\u{1F6A0}","\u{1F69F}","\u{1F683}","\u{1F68B}","\u{1F69E}","\u{1F69D}","\u{1F684}","\u{1F685}","\u{1F688}","\u{1F682}","\u{1F686}","\u{1F687}","\u{1F68A}","\u{1F689}","\u2708\uFE0F","\u{1F6EB}","\u{1F6EC}","\u{1F6E9}\uFE0F","\u{1F4BA}","\u{1F6F0}\uFE0F","\u{1F680}","\u{1F6F8}","\u{1F681}","\u{1F6F6}","\u26F5","\u{1F6A4}","\u{1F6E5}\uFE0F","\u{1F6F3}\uFE0F","\u26F4\uFE0F","\u{1F6A2}","\u2693","\u{1FA9D}","\u26FD","\u{1F6A7}","\u{1F6A6}","\u{1F6A5}","\u{1F68F}","\u{1F5FA}\uFE0F","\u{1F5FF}","\u{1F5FD}","\u{1F5FC}","\u{1F3F0}","\u{1F3EF}","\u{1F3DF}\uFE0F","\u{1F3A1}","\u{1F3A2}","\u{1F3A0}","\u26F2","\u26F1\uFE0F","\u{1F3D6}\uFE0F","\u{1F3DD}\uFE0F","\u{1F3DC}\uFE0F"],activities:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F94C}","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u26D1\uFE0F","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}","\u{1F3C6}","\u{1F947}","\u{1F948}","\u{1F949}","\u{1F3C5}","\u{1F396}\uFE0F","\u{1F3F5}\uFE0F","\u{1F397}\uFE0F","\u{1F3AB}","\u{1F39F}\uFE0F","\u{1F3AA}","\u{1F939}","\u{1F3AD}","\u{1FA70}","\u{1F3A8}","\u{1F3AC}","\u{1F3A4}","\u{1F3A7}","\u{1F3BC}","\u{1F3B9}","\u{1F941}","\u{1FA98}","\u{1F3B7}","\u{1F3BA}","\u{1FA97}","\u{1F3B8}","\u{1FA95}"],objects:["\u231A","\u{1F4F1}","\u{1F4F2}","\u{1F4BB}","\u2328\uFE0F","\u{1F5A5}\uFE0F","\u{1F5A8}\uFE0F","\u{1F5B1}\uFE0F","\u{1F5B2}\uFE0F","\u{1F579}\uFE0F","\u{1F5DC}\uFE0F","\u{1F4BD}","\u{1F4BE}","\u{1F4BF}","\u{1F4C0}","\u{1F4FC}","\u{1F4F7}","\u{1F4F8}","\u{1F4F9}","\u{1F3A5}","\u{1F4FD}\uFE0F","\u{1F39E}\uFE0F","\u{1F4DE}","\u260E\uFE0F","\u{1F4DF}","\u{1F4E0}","\u{1F4FA}","\u{1F4FB}","\u{1F399}\uFE0F","\u{1F39A}\uFE0F","\u{1F39B}\uFE0F","\u{1F9ED}","\u23F1\uFE0F","\u23F2\uFE0F","\u23F0","\u{1F570}\uFE0F","\u231B","\u23F3","\u{1F4E1}","\u{1F50B}","\u{1F50C}","\u{1F4A1}","\u{1F526}","\u{1F56F}\uFE0F","\u{1FA94}","\u{1F9EF}","\u{1F6E2}\uFE0F","\u{1F4B8}","\u{1F4B5}","\u{1F4B4}","\u{1F4B6}","\u{1F4B7}","\u{1FA99}","\u{1F4B0}","\u{1F4B3}","\u{1F48E}","\u2696\uFE0F","\u{1FA9C}","\u{1F9F0}","\u{1FA9B}","\u{1F527}","\u{1F528}","\u2692\uFE0F","\u{1F6E0}\uFE0F","\u26CF\uFE0F","\u{1FA9A}","\u{1F529}","\u2699\uFE0F","\u{1FAA4}","\u{1F9F1}","\u26D3\uFE0F","\u{1F9F2}","\u{1F52B}","\u{1F4A3}","\u{1F9E8}","\u{1FA93}","\u{1F52A}","\u{1F5E1}\uFE0F","\u2694\uFE0F","\u{1F6E1}\uFE0F"],symbols:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}","\u262E\uFE0F","\u271D\uFE0F","\u262A\uFE0F","\u{1F549}\uFE0F","\u2638\uFE0F","\u2721\uFE0F","\u{1F52F}","\u{1F54E}","\u262F\uFE0F","\u2626\uFE0F","\u{1F6D0}","\u26CE","\u2648","\u2649","\u264A","\u264B","\u264C","\u264D","\u264E","\u264F","\u2650","\u2651","\u2652","\u2653","\u{1F194}","\u269B\uFE0F","\u{1F251}","\u2622\uFE0F","\u2623\uFE0F","\u{1F4F4}","\u{1F4F3}","\u{1F236}","\u{1F21A}","\u{1F238}","\u{1F23A}","\u{1F237}\uFE0F","\u2734\uFE0F","\u{1F19A}","\u{1F4AE}","\u{1F250}","\u3299\uFE0F","\u3297\uFE0F","\u{1F234}","\u{1F235}","\u{1F239}","\u{1F232}","\u{1F170}\uFE0F","\u{1F171}\uFE0F","\u{1F18E}","\u{1F191}","\u{1F17E}\uFE0F","\u{1F198}","\u274C","\u2B55","\u{1F6D1}","\u26D4","\u{1F4DB}","\u{1F6AB}","\u{1F4AF}","\u{1F4A2}","\u2668\uFE0F"],flags:["\u{1F3F3}\uFE0F","\u{1F3F4}","\u{1F3C1}","\u{1F6A9}","\u{1F3F3}\uFE0F\u200D\u{1F308}","\u{1F3F3}\uFE0F\u200D\u26A7\uFE0F","\u{1F1FA}\u{1F1F3}","\u{1F1E6}\u{1F1EB}","\u{1F1E6}\u{1F1F1}","\u{1F1E9}\u{1F1FF}","\u{1F1E6}\u{1F1F8}","\u{1F1E6}\u{1F1E9}","\u{1F1E6}\u{1F1F4}","\u{1F1E6}\u{1F1EE}","\u{1F1E6}\u{1F1F6}","\u{1F1E6}\u{1F1EC}","\u{1F1E6}\u{1F1F7}","\u{1F1E6}\u{1F1F2}","\u{1F1E6}\u{1F1FC}","\u{1F1E6}\u{1F1FA}","\u{1F1E6}\u{1F1F9}","\u{1F1E6}\u{1F1FF}","\u{1F1E7}\u{1F1F8}","\u{1F1E7}\u{1F1ED}","\u{1F1E7}\u{1F1E9}","\u{1F1E7}\u{1F1E7}","\u{1F1E7}\u{1F1FE}","\u{1F1E7}\u{1F1EA}","\u{1F1E7}\u{1F1FF}","\u{1F1E7}\u{1F1EF}","\u{1F1E7}\u{1F1F2}","\u{1F1E7}\u{1F1F9}","\u{1F1E7}\u{1F1F4}","\u{1F1E7}\u{1F1E6}","\u{1F1E7}\u{1F1FC}","\u{1F1E7}\u{1F1F7}","\u{1F1E7}\u{1F1F3}","\u{1F1E7}\u{1F1EC}","\u{1F1E7}\u{1F1EB}","\u{1F1E7}\u{1F1EE}","\u{1F1E8}\u{1F1FB}","\u{1F1F0}\u{1F1ED}","\u{1F1E8}\u{1F1F2}","\u{1F1E8}\u{1F1E6}","\u{1F1E8}\u{1F1EB}","\u{1F1F9}\u{1F1E9}","\u{1F1E8}\u{1F1F1}","\u{1F1E8}\u{1F1F3}","\u{1F1E8}\u{1F1F4}","\u{1F1F0}\u{1F1F2}","\u{1F1E8}\u{1F1EC}","\u{1F1E8}\u{1F1E9}","\u{1F1E8}\u{1F1F7}","\u{1F1ED}\u{1F1F7}","\u{1F1E8}\u{1F1FA}","\u{1F1E8}\u{1F1FE}","\u{1F1E8}\u{1F1FF}","\u{1F1E9}\u{1F1F0}","\u{1F1E9}\u{1F1EF}","\u{1F1E9}\u{1F1F2}","\u{1F1E9}\u{1F1F4}","\u{1F1EA}\u{1F1E8}","\u{1F1EA}\u{1F1EC}","\u{1F1F8}\u{1F1FB}","\u{1F1EC}\u{1F1F6}","\u{1F1EA}\u{1F1F7}","\u{1F1EA}\u{1F1EA}","\u{1F1EA}\u{1F1F9}","\u{1F1EA}\u{1F1FA}","\u{1F1EB}\u{1F1EF}","\u{1F1EB}\u{1F1EE}","\u{1F1EB}\u{1F1F7}","\u{1F1EC}\u{1F1E6}","\u{1F1EC}\u{1F1F2}","\u{1F1EC}\u{1F1EA}","\u{1F1E9}\u{1F1EA}","\u{1F1EC}\u{1F1ED}","\u{1F1EC}\u{1F1F7}","\u{1F1EC}\u{1F1F9}","\u{1F1EC}\u{1F1F3}"]},Iv=j.forwardRef(({className:e,size:t,onEmojiSelect:r,recentEmojis:n=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=j.useState(n.length>0?"recent":o),[m,f]=j.useState(""),g=m?Object.values($l).flat().filter(b=>b.toLowerCase().includes(m.toLowerCase())):c==="recent"?n:$l[c]||[],h=b=>{r?.(b);};return jsxs("div",{ref:l,className:u(Hv({size:t,className:e})),...i,children:[a&&jsx("div",{className:"p-2 border-b",children:jsxs("div",{className:"relative",children:[jsx(Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsx(Da,{placeholder:"Search emojis...",value:m,onChange:b=>f(b.target.value),className:"pl-8 h-8"})]})}),s&&!m&&jsx("div",{className:"flex border-b px-1",children:Object.entries(As).map(([b,{icon:v}])=>b==="recent"&&n.length===0?null:jsx("button",{className:u("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",c===b&&"bg-accent"),onClick:()=>d(b),title:As[b].name,children:v},b))}),!m&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:As[c].name}),jsx(De,{className:"flex-1",children:jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[g.map((b,v)=>jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>h(b),children:b},`${b}-${v}`)),g.length===0&&jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});Iv.displayName="EmojiPicker";var Vv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),WN=cva("flex flex-wrap items-center gap-0.5 p-1 border-b",{variants:{size:{sm:"p-0.5",md:"p-1",lg:"p-1.5"}},defaultVariants:{size:"md"}}),jN=cva("flex-1 overflow-auto prose prose-sm max-w-none dark:prose-invert [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[inherit] [&_.ProseMirror.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror.is-editor-empty:first-child::before]:float-left [&_.ProseMirror.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror.is-editor-empty:first-child::before]:h-0",{variants:{size:{sm:"min-h-[100px] [&_.ProseMirror]:p-2 text-sm",md:"min-h-[150px] [&_.ProseMirror]:p-3 text-sm",lg:"min-h-[200px] [&_.ProseMirror]:p-4 text-base"}},defaultVariants:{size:"md"}}),Ye=({icon:e,title:t,isActive:r,onClick:n,disabled:o})=>jsxs(Gr,{children:[jsx(Ur,{children:jsx(ae,{type:"button",variant:r?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:n,disabled:o,children:e})}),jsx(Wr,{side:"top",className:"text-xs",children:t})]}),Av=j.forwardRef(({className:e,variant:t,size:r,value:n="",onChange:o,placeholder:a="Start writing...",readOnly:s=false,showToolbar:i=true,minHeight:l,maxHeight:c,onEditorReady:d,...m},f)=>{let p=useEditor({extensions:[wN.configure({heading:{levels:[1,2,3]}}),CN.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),TN,MN.configure({types:["heading","paragraph"]}),NN.configure({placeholder:a})],content:n,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});j.useEffect(()=>{p&&n!==p.getHTML()&&p.commands.setContent(n);},[n,p]),j.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let g=()=>{if(!p)return;let h=p.getAttributes("link").href,b=window.prompt("URL",h);if(b!==null){if(b===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:b}).run();}};return p?jsx($r,{children:jsxs("div",{ref:f,className:u(Vv({variant:t,size:r,className:e})),...m,children:[i&&!s&&jsxs("div",{className:u(WN({size:r})),children:[jsx(Ye,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(Ye,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(Kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Ye,{icon:jsx(Heading1,{className:"h-4 w-4"}),title:"Heading 1",isActive:p.isActive("heading",{level:1}),onClick:()=>p.chain().focus().toggleHeading({level:1}).run()}),jsx(Ye,{icon:jsx(Heading2,{className:"h-4 w-4"}),title:"Heading 2",isActive:p.isActive("heading",{level:2}),onClick:()=>p.chain().focus().toggleHeading({level:2}).run()}),jsx(Ye,{icon:jsx(Heading3,{className:"h-4 w-4"}),title:"Heading 3",isActive:p.isActive("heading",{level:3}),onClick:()=>p.chain().focus().toggleHeading({level:3}).run()}),jsx(Kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Ye,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(Ye,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(Ye,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(Ye,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(Kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Ye,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(Ye,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(Kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Ye,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(Ye,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(Ye,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(Kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Ye,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(Ye,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(Kr,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Ye,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsx(Ye,{icon:jsx(Unlink,{className:"h-4 w-4"}),title:"Remove Link",onClick:()=>p.chain().focus().unsetLink().run(),disabled:!p.isActive("link")})]}),jsx(EditorContent,{editor:p,className:u(jN({size:r})),style:{minHeight:l,maxHeight:c}})]})}):null});Av.displayName="RichTextEditor";var Ov=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function ek(e,t,r){return centerCrop(makeAspectCrop({unit:"%",width:90},r,e,t),e,t)}async function zv(e,t,r=0,n=1){let o=document.createElement("canvas"),a=o.getContext("2d");if(!a)return null;let s=e.naturalWidth/e.width,i=e.naturalHeight/e.height,l=window.devicePixelRatio||1;o.width=Math.floor(t.width*s*l),o.height=Math.floor(t.height*i*l),a.scale(l,l),a.imageSmoothingQuality="high";let c=t.x*s,d=t.y*i,m=r*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return a.save(),a.translate(-c,-d),a.translate(f,p),a.rotate(m),a.scale(n,n),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore(),new Promise(g=>{o.toBlob(h=>{g(h);},"image/png");})}var Bv=j.forwardRef(({className:e,variant:t,src:r,aspectRatio:n,onCropChange:o,onCropComplete:a,showZoom:s=true,showRotation:i=true,minZoom:l=1,maxZoom:c=3,circularCrop:d=false,initialCrop:m,...f},p)=>{let g=j.useRef(null),[h,b]=j.useState(),[v,w]=j.useState(),[x,R]=j.useState(1),[C,y]=j.useState(0),k=P=>{let{width:E,height:D}=P.currentTarget;if(n){let H=ek(E,D,n);b(H);}else b(m||{unit:"%",x:10,y:10,width:80,height:80});},T=P=>{b(P),o?.(P);},N=async P=>{if(w(P),a&&g.current&&P.width&&P.height){let E=await zv(g.current,P,C,x);a(E);}},M=()=>{y(P=>(P+90)%360);};return j.useEffect(()=>{v&&g.current&&a&&zv(g.current,v,C,x).then(P=>{a(P);});},[x,C,v,a]),jsxs("div",{ref:p,className:u(Ov({variant:t,className:e})),...f,children:[jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsx(_N,{crop:h,onChange:T,onComplete:N,aspect:n,circularCrop:d,className:"max-h-[400px]",children:jsx("img",{ref:g,src:r,alt:"Crop preview",onLoad:k,style:{transform:`scale(${x}) rotate(${C}deg)`,maxHeight:"400px"}})})}),jsxs("div",{className:"flex items-center gap-4 p-3 border-t",children:[s&&jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsx(ZoomOut,{className:"h-4 w-4 text-muted-foreground"}),jsx(_a,{value:[x],onValueChange:([P])=>R(P),min:l,max:c,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsx(ae,{variant:"bordered",size:"icon",onClick:M,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});Bv.displayName="ImageCropper";var jl=cva("inline-block",{variants:{variant:{default:"",bordered:"border rounded-lg p-2",card:"border rounded-lg p-4 bg-card shadow-sm"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),nk={sm:96,md:128,lg:192},Kv=j.forwardRef(({className:e,variant:t,size:r,value:n,qrSize:o,fgColor:a="currentColor",bgColor:s="transparent",level:i="M",includeMargin:l=false,title:c,logo:d,logoSize:m=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let b=o??nk[r??"md"];return n?jsx("div",{ref:h,className:u(jl({variant:t,size:r,className:e})),...g,children:jsxs("div",{className:"relative inline-block",children:[jsx(tk,{value:n,size:b,fgColor:a,bgColor:s,level:i,title:c,style:{padding:l?16:0}}),d&&jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:f,backgroundColor:p},children:jsx("img",{src:d,alt:"Logo",style:{width:m,height:m,objectFit:"contain"}})})]})}):jsx("div",{ref:h,className:u(jl({variant:t,size:r,className:e})),...g,children:jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:b,height:b},children:"No data"})})});Kv.displayName="QRCode";var $v=({children:e,defaultTheme:t="system",storageKey:r="reever-ui-theme",enableSystem:n=true,disableTransitionOnChange:o=false,attribute:a="class",forcedTheme:s,themes:i=["light","dark"]})=>jsx(ThemeProvider,{defaultTheme:t,storageKey:r,enableSystem:n,disableTransitionOnChange:o,attribute:a,forcedTheme:s,themes:i,children:e});$v.displayName="ThemeProvider";var dk=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),Gv=j.forwardRef(({className:e,variant:t="ghost",size:r="md",mode:n="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=useTheme(),[l,c]=j.useState(false);j.useEffect(()=>{c(true);},[]);let d=()=>{let m=["light","dark","system"],p=(m.indexOf(a||"system")+1)%m.length;s(m[p]);};return l?n==="cycle"?jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),onClick:d,children:[i==="dark"?jsx(Moon,{className:"h-4 w-4"}):jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxs(br,{children:[jsx(vr,{children:jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),children:[jsx(Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsx(Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxs(hr,{align:"end",children:[jsxs($t,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs($t,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs($t,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});Gv.displayName="ThemeToggle";var Uv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),Wv=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),jv=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),_v=j.forwardRef(({className:e,label:t,description:r,errorMessage:n,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:m,endContent:f,id:p,...g},h)=>{let b=j.useId(),v=p||b,w=`${v}-description`,x=`${v}-error`,R=a&&n;return jsxs("div",{className:u(Uv({size:s}),e),children:[t&&jsxs("label",{htmlFor:v,className:u(jv({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[m&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),jsx("input",{ref:h,id:v,"aria-invalid":a,"aria-describedby":R?x:r?w:void 0,"aria-required":o,className:u(Wv({size:s,isInvalid:a}),m&&"pl-10",f&&"pr-10",l),...g}),f&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),r&&!R&&jsx("p",{id:w,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:r}),R&&jsx("p",{id:x,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:n})]})});_v.displayName="TextField";var qv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),pk=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",{variants:{size:{sm:"h-8 px-8 py-1.5 text-xs",md:"h-10 px-10 py-2 text-sm",lg:"h-12 px-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit min-w-24"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),Xv=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Yv=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),fk=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Zv=j.forwardRef(({className:e,label:t,description:r,errorMessage:n,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:m,max:f,step:p=1,value:g,defaultValue:h,onChange:b,showButtons:v=true,formatOptions:w,fullWidth:x=false,disabled:R,id:C,...y},k)=>{let T=j.useId(),N=C||T,M=`${N}-description`,P=`${N}-error`,[E,D]=j.useState(h),[H,L]=j.useState(false),S=g!==void 0?g:E,V=a&&n,A=j.useCallback(O=>{O!==void 0&&(m!==void 0&&O<m&&(O=m),f!==void 0&&O>f&&(O=f)),g===void 0&&D(O),b?.(O);},[g,m,f,b]),B=()=>{let O=(S??0)+p;A(O);},I=()=>{let O=(S??0)-p;A(O);},F=O=>{let W=O.target.value;if(W==="")A(void 0);else {let z=parseFloat(W);isNaN(z)||A(z);}},K=O=>{O.key==="ArrowUp"?(O.preventDefault(),B()):O.key==="ArrowDown"&&(O.preventDefault(),I());},Y=j.useMemo(()=>S===void 0?"":w?new Intl.NumberFormat(void 0,w).format(S):S.toString(),[S,w]),te=m!==void 0&&S!==void 0&&S<=m,$=f!==void 0&&S!==void 0&&S>=f;return jsxs("div",{className:u(qv({size:s}),e),children:[t&&jsxs("label",{htmlFor:N,className:u(fk({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx("button",{type:"button",onClick:I,disabled:R||te,className:u(Xv({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:u(Yv({size:s}))})}),jsx("input",{ref:k,id:N,type:"text",inputMode:"decimal",value:Y,onChange:F,onKeyDown:K,onFocus:()=>L(true),onBlur:()=>L(false),"aria-invalid":a,"aria-describedby":V?P:r?M:void 0,"aria-required":o,"aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":S,disabled:R,className:u(pk({size:s,isInvalid:a,fullWidth:x}),!v&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...y}),v&&jsx("button",{type:"button",onClick:B,disabled:R||$,className:u(Xv({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:u(Yv({size:s}))})})]}),r&&!V&&jsx("p",{id:M,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:r}),V&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:n})]})});Zv.displayName="NumberField";var Jv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),vk=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),Qv=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),hk=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),xk=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",{variants:{size:{sm:"h-5 w-5 right-1.5",md:"h-6 w-6 right-2",lg:"h-7 w-7 right-2.5"}},defaultVariants:{size:"md"}}),eh=j.forwardRef(({className:e,label:t,description:r,errorMessage:n,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:b=true,showSearchIcon:v=true,disabled:w,placeholder:x="Search...",id:R,...C},y)=>{let k=j.useId(),T=R||k,N=`${T}-description`,M=`${T}-error`,[P,E]=j.useState(f),D=m!==void 0?m:P,H=a&&n,L=D.length>0,S=B=>{let I=B.target.value;m===void 0&&E(I),p?.(I);},V=()=>{m===void 0&&E(""),p?.(""),g?.();},A=B=>{B.key==="Enter"?(B.preventDefault(),h?.(D)):B.key==="Escape"&&L&&(B.preventDefault(),V());};return jsxs("div",{className:u(Jv({size:s}),e),children:[t&&jsxs("label",{htmlFor:T,className:u(hk({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx(Search,{className:u(Qv({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:y,id:T,type:"search",value:D,onChange:S,onKeyDown:A,placeholder:x,"aria-invalid":a,"aria-describedby":H?M:r?N:void 0,"aria-required":o,disabled:w,className:u(vk({size:s,isInvalid:a}),!v&&"pl-3",!b&&"pr-3",l),...C}),b&&L&&!w&&jsx("button",{type:"button",onClick:V,className:u(xk({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X,{className:u(Qv({size:s}))})})]}),r&&!H&&jsx("p",{id:N,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:r}),H&&jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:n})]})});eh.displayName="SearchField";var th=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),Rk=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-3 pr-8 py-1.5 text-xs",md:"h-10 pl-3 pr-10 py-2 text-sm",lg:"h-12 pl-4 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),wk=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Ck=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Ks={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},ec={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},Ql=(e,t)=>String(e).padStart(t,"0"),pa=(e,t)=>{if(!e)return "";let r=Ql(e.getDate(),2),n=Ql(e.getMonth()+1,2),o=Ql(e.getFullYear(),4),a=Ks[t],s=ec[t],i={day:r,month:n,year:o};return s.map(l=>i[l]).join(a)},Jl=(e,t)=>{let r=Ks[t],n=e.split(r);if(n.length!==3)return null;let o=ec[t],a={};if(o.forEach((i,l)=>{a[i]=parseInt(n[l],10);}),isNaN(a.day)||isNaN(a.month)||isNaN(a.year)||a.month<1||a.month>12||a.day<1||a.day>31||a.year<1e3||a.year>9999)return null;let s=new Date(a.year,a.month-1,a.day);return s.getFullYear()!==a.year||s.getMonth()!==a.month-1||s.getDate()!==a.day?null:s},Tk=e=>{let t=Ks[e];return ec[e].map(n=>n==="year"?"####":"##").join(t)},tc=j.forwardRef(({className:e,label:t,description:r,errorMessage:n,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showIcon:v=true,fullWidth:w=false,disabled:x,placeholder:R,id:C,...y},k)=>{let T=j.useId(),N=C||T,M=`${N}-description`,P=`${N}-error`,[E,D]=j.useState(f??null),[H,L]=j.useState(""),[S,V]=j.useState(false),[A,B]=j.useState(false),I=m!==void 0?m:E,F=a&&n,K=Ks[b],Y=Tk(b);j.useEffect(()=>{A||L(pa(I,b));},[I,b,A]);let te=Q=>{m===void 0&&D(Q),p?.(Q);},$=Q=>{let ue=Q??null;te(ue),L(pa(ue,b)),V(false);},O=Q=>{let ue=Q.target.value;ue=ue.replace(new RegExp(`[^0-9\\${K}]`,"g"),"");let U=ue.replace(new RegExp(`\\${K}`,"g"),""),Ve="",Z=0;for(let ye=0;ye<Y.length&&Z<U.length;ye++)Y[ye]==="#"?(Ve+=U[Z],Z++):Ve+=Y[ye];if(L(Ve),Ve.length===Y.length){let ye=Jl(Ve,b);if(ye){if(g&&ye<g||h&&ye>h)return;te(ye);}}},W=()=>{B(true);},z=()=>{B(false),H.length!==Y.length?L(pa(I,b)):Jl(H,b)||L(pa(I,b));},_=()=>{x||V(true);};return jsxs("div",{className:u(th({size:s}),e),children:[t&&jsxs("label",{htmlFor:N,className:u(Ck({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(_e,{open:S,onOpenChange:V,children:[jsxs(jr,{className:u("relative",w?"w-full":"w-fit"),children:[jsx("input",{ref:k,id:N,type:"text",inputMode:"numeric",value:H,onChange:O,onFocus:W,onBlur:z,"aria-invalid":a,"aria-describedby":F?P:r?M:void 0,"aria-required":o,disabled:x,placeholder:R||b.toLowerCase(),className:u(Rk({size:s,isInvalid:a,fullWidth:w}),l),style:{borderColor:A||S?"var(--color-foreground)":void 0},...y}),v&&jsx("button",{type:"button",onClick:_,disabled:x,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u(wk({size:s}))})})]}),jsx(Xe,{className:"w-auto p-0",align:"start",children:jsx(Yr,{mode:"single",selected:I??void 0,onSelect:$,disabled:Q=>!!(g&&Q<g||h&&Q>h),defaultMonth:I??void 0,showMonthAndYearPickers:true})})]}),r&&!F&&jsx("p",{id:M,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:r}),F&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:n})]})});tc.displayName="DateInput";var Mk=tc;var rh=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),Nk=cva("inline-flex items-center rounded-md border border-input bg-background transition-colors",{variants:{size:{sm:"h-8 px-2 gap-0.5 text-xs",md:"h-10 px-3 gap-1 text-sm",lg:"h-12 px-4 gap-1.5 text-base"},isInvalid:{true:"border-danger",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""},fullWidth:{true:"w-full justify-center",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,disabled:false,fullWidth:false}}),kk=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),nh=j.forwardRef(({className:e,label:t,description:r,errorMessage:n,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:b=false,hourCycle:v=24,disabled:w,fullWidth:x=false,id:R,...C},y)=>{let k=j.useId(),T=R||k,N=`${T}-description`,M=`${T}-error`,P=j.useRef(null),E=j.useRef(null),D=j.useRef(null),H=j.useRef(null),[L,S]=j.useState(f??null),V=m!==void 0?m:L,A=a&&n,B=G=>v===24?G:G===0?12:G>12?G-12:G,I=G=>G>=12?"PM":"AM",F=(G,oe)=>oe==="AM"?G===12?0:G:G===12?12:G+12,[K,Y]=j.useState(V?String(B(V.hour)).padStart(2,"0"):""),[te,$]=j.useState(V?String(V.minute).padStart(2,"0"):""),[O,W]=j.useState(V?.second!==void 0?String(V.second).padStart(2,"0"):""),[z,_]=j.useState(V?I(V.hour):"AM"),[Q,ue]=j.useState(false);j.useEffect(()=>{m!==void 0&&(m?(Y(String(B(m.hour)).padStart(2,"0")),$(String(m.minute).padStart(2,"0")),m.second!==void 0&&W(String(m.second).padStart(2,"0")),_(I(m.hour))):(Y(""),$(""),W("")));},[m,v]);let U=(G,oe,X,Le)=>{let ce=parseInt(G,10),Ge=parseInt(oe,10),Ue=b?parseInt(X,10):void 0;if(isNaN(ce)||isNaN(Ge)||b&&isNaN(Ue)){m===void 0&&S(null),p?.(null);return}let fe={hour:v===12?F(ce,Le):ce,minute:Ge,...b&&Ue!==void 0&&{second:Ue}};m===void 0&&S(fe),p?.(fe);},Ve=G=>{let oe=G.target.value.replace(/\D/g,"").slice(0,2);Y(oe);let X=v===24?23:12,Le=v===24?0:1;if(oe.length===2){let ce=parseInt(oe,10);ce>=Le&&ce<=X&&(E.current?.focus(),E.current?.select());}},Z=G=>{let oe=G.target.value.replace(/\D/g,"").slice(0,2);if($(oe),oe.length===2){let X=parseInt(oe,10);X>=0&&X<=59&&(b?(D.current?.focus(),D.current?.select()):v===12&&H.current?.focus());}},ye=G=>{let oe=G.target.value.replace(/\D/g,"").slice(0,2);W(oe),oe.length===2&&v===12&&H.current?.focus();},zr=()=>{if(K){let G=parseInt(K,10),oe=v===24?23:12,Le=Math.min(Math.max(G,v===24?0:1),oe),ce=String(Le).padStart(2,"0");Y(ce),U(ce,te,O,z);}},ft=()=>{if(te){let G=parseInt(te,10),oe=Math.min(Math.max(G,0),59),X=String(oe).padStart(2,"0");$(X),U(K,X,O,z);}},bn=()=>{if(O){let G=parseInt(O,10),oe=Math.min(Math.max(G,0),59),X=String(oe).padStart(2,"0");W(X),U(K,te,X,z);}},Or=()=>{let G=z==="AM"?"PM":"AM";_(G),U(K,te,O,G);},Vo=G=>{let oe=G.key.toLowerCase();oe==="a"?(G.preventDefault(),z!=="AM"&&(_("AM"),U(K,te,O,"AM"))):oe==="p"?(G.preventDefault(),z!=="PM"&&(_("PM"),U(K,te,O,"PM"))):oe==="arrowup"||oe==="arrowdown"?(G.preventDefault(),Or()):oe==="arrowleft"&&(G.preventDefault(),b?(D.current?.focus(),D.current?.select()):(E.current?.focus(),E.current?.select()));},Ft=(G,oe)=>{if(G.key==="ArrowUp"||G.key==="ArrowDown"){G.preventDefault();let X=G.key==="ArrowUp"?1:-1;if(oe==="hour"){let Le=parseInt(K,10)||0,ce=v===24?23:12,Ge=v===24?0:1,Ue=Le+X;Ue>ce&&(Ue=Ge),Ue<Ge&&(Ue=ce);let Br=String(Ue).padStart(2,"0");Y(Br),U(Br,te,O,z);}else if(oe==="minute"){let ce=(parseInt(te,10)||0)+X;ce>59&&(ce=0),ce<0&&(ce=59);let Ge=String(ce).padStart(2,"0");$(Ge),U(K,Ge,O,z);}else if(oe==="second"){let ce=(parseInt(O,10)||0)+X;ce>59&&(ce=0),ce<0&&(ce=59);let Ge=String(ce).padStart(2,"0");W(Ge),U(K,te,Ge,z);}}G.key==="ArrowRight"&&(G.preventDefault(),oe==="hour"?(E.current?.focus(),E.current?.select()):oe==="minute"&&b?(D.current?.focus(),D.current?.select()):(oe==="minute"&&!b&&v===12||oe==="second"&&v===12)&&H.current?.focus()),G.key==="ArrowLeft"&&(G.preventDefault(),oe==="minute"?(P.current?.focus(),P.current?.select()):oe==="second"&&(E.current?.focus(),E.current?.select())),G.key==="Backspace"&&G.currentTarget.value===""&&(oe==="minute"?P.current?.focus():oe==="second"&&E.current?.focus());},vn=u((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",w&&"cursor-not-allowed");return jsxs("div",{ref:y,className:u(rh({size:s}),e),...C,children:[t&&jsxs("label",{htmlFor:T,className:u(kk({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:u(Nk({size:s,isInvalid:a,disabled:w,fullWidth:x}),l),style:{borderColor:Q?"var(--color-foreground)":void 0},onFocus:()=>ue(true),onBlur:G=>{G.currentTarget.contains(G.relatedTarget)||ue(false);},children:[jsx("input",{ref:P,id:T,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:K,onChange:Ve,onBlur:zr,onKeyDown:G=>Ft(G,"hour"),onFocus:G=>G.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":A?M:r?N:void 0,"aria-required":o,disabled:w,className:vn}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:E,type:"text",inputMode:"numeric",placeholder:"mm",value:te,onChange:Z,onBlur:ft,onKeyDown:G=>Ft(G,"minute"),onFocus:G=>G.target.select(),"aria-label":"Minute",disabled:w,className:vn}),b&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:D,type:"text",inputMode:"numeric",placeholder:"ss",value:O,onChange:ye,onBlur:bn,onKeyDown:G=>Ft(G,"second"),onFocus:G=>G.target.select(),"aria-label":"Second",disabled:w,className:vn})]}),v===12&&jsx("button",{ref:H,type:"button",onClick:Or,onKeyDown:Vo,disabled:w,className:u("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",w&&"cursor-not-allowed"),"aria-label":"AM/PM",children:z})]}),r&&!A&&jsx("p",{id:N,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:r}),A&&jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:n})]})});nh.displayName="TimeField";var ah=cva("inline-flex items-center",{variants:{variant:{default:"gap-1",compact:"gap-0.5",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px gap-0"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},size:{sm:"",md:"",lg:""},density:{compact:"gap-0.5",regular:"gap-1",spacious:"gap-2"}},defaultVariants:{variant:"default",orientation:"horizontal",size:"md",density:"regular"}}),sh=j.forwardRef(({className:e,variant:t,orientation:r,size:n,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...m},f)=>{let p=s&&s<a.length?a.slice(0,s):a,g=s&&s<a.length?a.slice(s):[],h={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[n??"md"],b={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[n??"md"],v={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[n??"md"],w=(R,C)=>{C&&C(),l&&l(R);},x=R=>jsxs("button",{type:"button",disabled:i||R.isDisabled,onClick:()=>w(R.key,R.onPress),className:u("inline-flex items-center justify-center gap-2 rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",c?h:b),"aria-label":R.label,children:[R.icon&&jsx("span",{className:v,children:R.icon}),c&&jsx("span",{children:R.label})]},R.key);return jsxs("div",{ref:f,role:"group",className:u(ah({variant:t,orientation:r,size:n,density:o,className:e})),...m,children:[p.map(R=>d?d(R):x(R)),g.length>0&&jsxs(br,{children:[jsx(vr,{"aria-label":"More actions",className:u("items-center justify-center rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",i&&"pointer-events-none opacity-50",b),children:jsx(MoreHorizontal,{className:v})}),jsx(hr,{align:"end",children:g.map(R=>jsxs($t,{disabled:R.isDisabled,onClick:()=>w(R.key,R.onPress),children:[R.icon&&jsx("span",{className:u(v,"mr-2"),children:R.icon}),R.label]},R.key))})]})]})});sh.displayName="ActionGroup";var dh=cva("inline-flex items-center gap-2",{variants:{variant:{neutral:"[--status-color:theme(colors.muted.foreground)]",info:"[--status-color:theme(colors.blue.500)]",positive:"[--status-color:theme(colors.green.500)]",notice:"[--status-color:theme(colors.yellow.500)]",negative:"[--status-color:theme(colors.red.500)]"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"neutral",size:"md"}}),Sk=cva("rounded-full bg-[--status-color] flex-shrink-0",{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"},pulse:{true:"animate-pulse",false:""}},defaultVariants:{size:"md",pulse:false}}),uh=j.forwardRef(({className:e,variant:t,size:r,pulse:n=false,hideLabel:o=false,children:a,...s},i)=>jsxs("span",{ref:i,role:"status",className:u(dh({variant:t,size:r,className:e})),...s,children:[jsx("span",{className:u(Sk({size:r,pulse:n})),"aria-hidden":"true"}),!o&&a&&jsx("span",{className:"text-foreground",children:a})]}));uh.displayName="StatusLight";var ph=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),Hk=cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),Ik=cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),Vk=cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),fh=j.forwardRef(({className:e,size:t,illustration:r,heading:n,description:o,children:a,...s},i)=>jsxs("div",{ref:i,className:u(ph({size:t,className:e})),...s,children:[r&&jsx("div",{className:u(Hk({size:t})),"aria-hidden":"true",children:r}),n&&jsx("h3",{className:u(Ik({size:t})),children:n}),o&&jsx("p",{className:u(Vk({size:t})),children:o}),a&&jsx("div",{className:"mt-2",children:a})]}));fh.displayName="IllustratedMessage";var vh=cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),$k={info:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle,neutral:Info},hh=j.forwardRef(({className:e,variant:t,title:r,icon:n,hideIcon:o=false,isDismissible:a=false,onDismiss:s,actions:i,children:l,...c},d)=>{let[m,f]=j.useState(true);if(!m)return null;let p=$k[t??"info"],g=()=>{f(false),s?.();};return jsxs("div",{ref:d,role:"alert",className:u(vh({variant:t,className:e})),...c,children:[!o&&jsx("div",{className:"flex-shrink-0",children:n||jsx(p,{className:"h-5 w-5"})}),jsxs("div",{className:"flex-1 space-y-1",children:[r&&jsx("div",{className:"font-medium",children:r}),l&&jsx("div",{className:"opacity-90",children:l}),i&&jsx("div",{className:"mt-3 flex gap-2",children:i})]}),a&&jsx("button",{type:"button",onClick:g,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsx(X,{className:"h-4 w-4"})})]})});hh.displayName="InlineAlert";var xh=cva("fixed flex items-center gap-2 rounded-lg border bg-background shadow-lg transition-all duration-200",{variants:{position:{bottom:"bottom-4 left-1/2 -translate-x-1/2",top:"top-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4"},size:{sm:"px-3 py-2 gap-1.5",md:"px-4 py-2.5 gap-2",lg:"px-5 py-3 gap-3"}},defaultVariants:{position:"bottom",size:"md"}}),yh=j.forwardRef(({className:e,position:t,size:r,selectedCount:n=0,isOpen:o=true,onClose:a,showClose:s=true,selectedText:i,children:l,...c},d)=>{if(!o||n===0)return null;let m=()=>typeof i=="function"?i(n):i||`${n} item${n>1?"s":""} selected`;return jsxs("div",{ref:d,role:"toolbar","aria-label":"Actions for selected items",className:u(xh({position:t,size:r,className:e})),...c,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:m()}),jsx("div",{className:"h-4 w-px bg-border"}),jsx("div",{className:"flex items-center gap-1",children:l}),s&&jsxs(Fragment,{children:[jsx("div",{className:"h-4 w-px bg-border"}),jsx(ct,{size:"sm",onClick:a,"aria-label":"Close action bar"})]})]})});yh.displayName="ActionBar";var Rh=j.forwardRef(({className:e,icon:t,children:r,...n},o)=>jsxs("button",{ref:o,type:"button",className:u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",e),...n,children:[t&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),r]}));Rh.displayName="ActionBarButton";var Th=cva("flex flex-col",{variants:{variant:{default:"gap-1",bordered:"border rounded-lg divide-y",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Mh=cva("flex items-center gap-3 transition-colors cursor-pointer",{variants:{variant:{default:"rounded-md hover:bg-accent",bordered:"hover:bg-accent",cards:"rounded-lg border hover:border-primary/50 hover:bg-accent/50"},size:{sm:"px-2 py-1.5 text-sm",md:"px-3 py-2",lg:"px-4 py-3 text-lg"},isSelected:{true:"bg-accent",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"cards",isSelected:true,className:"border-primary bg-accent"}],defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function Nh({className:e,variant:t,size:r,items:n,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,allowsDragging:i=false,onReorder:l,showCheckbox:c=false,renderItem:d,emptyContent:m,...f}){let[p,g]=j.useState(new Set),[h,b]=j.useState(null),[v,w]=j.useState(null),x=j.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),R=T=>{if(a==="none")return;let N;a==="single"?N=x.has(T)?new Set:new Set([T]):(N=new Set(x),N.has(T)?N.delete(T):N.add(T)),o||g(N),s?.(N);},C=(T,N)=>{b(N),T.dataTransfer.effectAllowed="move";},y=(T,N)=>{T.preventDefault(),h!==N&&w(N);},k=()=>{if(h&&v&&h!==v){let T=n.findIndex(E=>E.key===h),N=n.findIndex(E=>E.key===v),M=[...n],[P]=M.splice(T,1);M.splice(N,0,P),l?.(M);}b(null),w(null);};return n.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:u(Th({variant:t,size:r,className:e})),...f,children:n.map(T=>{let N=x.has(T.key),M=h===T.key,P=v===T.key;return d?jsx("div",{role:"option","aria-selected":N,onClick:()=>R(T.key),children:d(T,N)},T.key):jsxs("div",{role:"option","aria-selected":N,"aria-disabled":T.isDisabled,draggable:i&&!T.isDisabled,onDragStart:E=>C(E,T.key),onDragOver:E=>y(E,T.key),onDragEnd:k,onClick:()=>!T.isDisabled&&R(T.key),className:u(Mh({variant:t,size:r,isSelected:N,isDisabled:T.isDisabled}),M&&"opacity-50",P&&"border-t-2 border-t-primary"),children:[i&&jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),c&&a!=="none"&&jsx("div",{className:u("flex h-4 w-4 items-center justify-center rounded border",N?"bg-primary border-primary text-primary-foreground":"border-input"),children:N&&jsx(Check,{className:"h-3 w-3"})}),T.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:T.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:T.label}),T.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:T.description})]})]},T.key)})})}Nh.displayName="ListView";var kh=cva("relative flex w-full touch-none select-none",{variants:{orientation:{horizontal:"items-center",vertical:"flex-col justify-center h-full"},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"horizontal",size:"md"}}),_k=cva("relative grow overflow-hidden rounded-full bg-secondary",{variants:{orientation:{horizontal:"w-full",vertical:"w-2 h-full"},size:{sm:"h-1",md:"h-2",lg:"h-3"}},compoundVariants:[{orientation:"vertical",size:"sm",className:"w-1 h-full"},{orientation:"vertical",size:"md",className:"w-2 h-full"},{orientation:"vertical",size:"lg",className:"w-3 h-full"}],defaultVariants:{orientation:"horizontal",size:"md"}}),Xk=cva("block rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),Ph=j.forwardRef(({className:e,orientation:t="horizontal",size:r="md",value:n,defaultValue:o=[25,75],onValueChange:a,onValueCommit:s,min:i=0,max:l=100,step:c=1,disabled:d=false,showLabels:m=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:g,...h},b)=>{let[v,w]=j.useState(o),x=n!==void 0,R=x?n:v,C=j.useRef(null),[y,k]=j.useState(false),[T,N]=j.useState(null),M=(I,F)=>{if(!C.current)return R[0];let K=C.current.getBoundingClientRect(),Y;t==="horizontal"?Y=(I-K.left)/K.width:Y=1-(F-K.top)/K.height,Y=Math.max(0,Math.min(1,Y));let te=i+Y*(l-i),$=Math.round(te/c)*c;return Math.max(i,Math.min(l,$))},P=(I,F)=>{let K=[...R];K[F]=I,F===0&&I>R[1]&&(K[0]=R[1]),F===1&&I<R[0]&&(K[1]=R[0]),x||w(K),a?.(K);},E=(I,F)=>{d||(I.preventDefault(),k(true),N(F),I.target.setPointerCapture(I.pointerId));},D=I=>{if(!y||T===null||d)return;let F=M(I.clientX,I.clientY);P(F,T);},H=()=>{y&&(k(false),N(null),s?.(R));},L=I=>{if(d)return;let F=M(I.clientX,I.clientY),K=Math.abs(R[0]-F),Y=Math.abs(R[1]-F),te=K<=Y?0:1;P(F,te);let $=[...R];$[te]=F,s?.($);},S=(I,F)=>{if(d)return;let K=R[F];switch(I.key){case "ArrowRight":case "ArrowUp":I.preventDefault(),K=Math.min(l,R[F]+c);break;case "ArrowLeft":case "ArrowDown":I.preventDefault(),K=Math.max(i,R[F]-c);break;case "Home":I.preventDefault(),K=i;break;case "End":I.preventDefault(),K=l;break;default:return}P(K,F);let Y=[...R];Y[F]=K,s?.(Y);},V=I=>(I-i)/(l-i)*100,A={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],B={sm:14,md:20,lg:24}[r||"md"];return jsxs("div",{className:"relative w-full",children:[m&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:f(R[0])}),jsx("span",{children:f(R[1])})]}),jsxs("div",{ref:b,className:u(kh({orientation:t,size:r}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsx("div",{ref:C,className:u(_k({orientation:t,size:r})),onClick:L,children:jsx("div",{className:u("absolute rounded-full",A,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${V(R[0])}%`,right:`${100-V(R[1])}%`,top:0,bottom:0}:{bottom:`${V(R[0])}%`,top:`${100-V(R[1])}%`,left:0,right:0}})}),R.map((I,F)=>jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":I,"aria-orientation":t||void 0,"aria-disabled":d,className:u(Xk({size:r}),y&&T===F&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${V(I)}% - ${B/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${V(I)}% - ${B/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:K=>E(K,F),onPointerMove:D,onPointerUp:H,onPointerCancel:H,onKeyDown:K=>S(K,F)},F)),g&&jsxs(Fragment,{children:[jsx("input",{type:"hidden",name:`${g}[0]`,value:R[0]}),jsx("input",{type:"hidden",name:`${g}[1]`,value:R[1]})]})]})]})});Ph.displayName="RangeSlider";var ic=cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{help:"text-muted-foreground hover:text-foreground",info:"text-blue-500 hover:text-blue-600",warning:"text-yellow-500 hover:text-yellow-600"},size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"help",size:"md"}}),Jk=cva("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in fade-in-0 zoom-in-95",{variants:{size:{sm:"w-56 text-xs",md:"w-72 text-sm",lg:"w-80 text-base"}},defaultVariants:{size:"md"}}),eP={help:HelpCircle,info:Info,warning:AlertCircle},Sh=j.forwardRef(({variant:e="help",size:t,title:r,children:n,trigger:o,side:a="top",align:s="center",open:i,onOpenChange:l,learnMoreUrl:c,learnMoreText:d="Learn more",triggerClassName:m,contentClassName:f},p)=>{let[g,h]=j.useState(false),[b,v]=j.useState(false),[w,x]=j.useState({top:0,left:0}),R=j.useRef(null),C=j.useRef(null),y=i!==void 0?i:g,k=j.useCallback(P=>{i===void 0&&h(P),l?.(P);},[i,l]);j.useEffect(()=>{v(true);},[]),j.useEffect(()=>{if(!y||!R.current)return;let P=()=>{let E=R.current.getBoundingClientRect(),D=C.current?.getBoundingClientRect(),H=D?.width||288,L=D?.height||100,S=8,V=0,A=0;switch(a){case "top":V=E.top-L-S,A=E.left+E.width/2-H/2;break;case "bottom":V=E.bottom+S,A=E.left+E.width/2-H/2;break;case "left":V=E.top+E.height/2-L/2,A=E.left-H-S;break;case "right":V=E.top+E.height/2-L/2,A=E.right+S;break}if(a==="top"||a==="bottom")switch(s){case "start":A=E.left;break;case "center":A=E.left+E.width/2-H/2;break;case "end":A=E.right-H;break}if(a==="left"||a==="right")switch(s){case "start":V=E.top;break;case "center":V=E.top+E.height/2-L/2;break;case "end":V=E.bottom-L;break}A=Math.max(8,Math.min(A,window.innerWidth-H-8)),V=Math.max(8,Math.min(V,window.innerHeight-L-8)),x({top:V,left:A});};return P(),requestAnimationFrame(P),window.addEventListener("resize",P),window.addEventListener("scroll",P,true),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,true);}},[y,a,s]),j.useEffect(()=>{if(!y)return;let P=E=>{C.current&&!C.current.contains(E.target)&&R.current&&!R.current.contains(E.target)&&k(false);};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[y,k]),j.useEffect(()=>{if(!y)return;let P=E=>{E.key==="Escape"&&k(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[y,k]);let T=eP[e??"help"],N=()=>{k(!y);},M=()=>{switch(a){case "top":return "bottom center";case "bottom":return "top center";case "left":return "right center";case "right":return "left center";default:return "center center"}};return jsxs(Fragment,{children:[o?j.isValidElement(o)?j.cloneElement(o,{ref:R,onClick:P=>{o.props.onClick?.(P),N();}}):jsx("button",{ref:R,type:"button",onClick:N,className:u(ic({variant:e,size:t}),m),"aria-label":"Help",children:o}):jsx("button",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},type:"button",onClick:N,className:u(ic({variant:e,size:t}),m),"aria-label":"Help",children:jsx(T,{className:"h-full w-full"})}),b&&y&&$a.createPortal(jsxs("div",{ref:C,className:u(Jk({size:t}),f),style:{position:"fixed",top:w.top,left:w.left,transformOrigin:M()},role:"tooltip",children:[r&&jsx("div",{className:"mb-2 font-semibold text-foreground",children:r}),jsx("div",{className:"text-muted-foreground",children:n}),c&&jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[d," \u2192"]}),jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...a==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...a==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...a==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...a==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});Sh.displayName="ContextualHelp";var Hh=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),lc=cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"bordered",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function Ih({className:e,spacing:t,variant:r,size:n,items:o,selectedKeys:a,selectionMode:s="none",onSelectionChange:i,allowsRemoving:l=false,onRemove:c,label:d,description:m,errorMessage:f,maxTags:p,...g}){let[h,b]=j.useState(new Set),v=j.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),w=y=>{if(s==="none")return;let k;s==="single"?k=v.has(y)?new Set:new Set([y]):(k=new Set(v),k.has(y)?k.delete(y):k.add(y)),a||b(k),i?.(k);},x=(y,k)=>{k.stopPropagation(),c?.(y);},R=p?o.slice(0,p):o,C=p?Math.max(0,o.length-p):0;return jsxs("div",{className:"flex flex-col gap-1.5",children:[d&&jsx("span",{className:"text-sm font-medium text-foreground",children:d}),m&&jsx("span",{className:"text-sm text-muted-foreground",children:m}),jsxs("div",{role:"group","aria-label":d,className:u(Hh({spacing:t}),e),...g,children:[R.map(y=>{let k=v.has(y.key),T=s!=="none";return jsxs("span",{role:T?"button":void 0,tabIndex:T&&!y.isDisabled?0:void 0,"aria-pressed":T?k:void 0,onClick:()=>!y.isDisabled&&w(y.key),onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&!y.isDisabled&&(N.preventDefault(),w(y.key));},style:y.color?{backgroundColor:y.color}:void 0,className:u(lc({variant:y.color?void 0:r,size:n,isSelected:k,isDisabled:y.isDisabled}),T&&!y.isDisabled&&"cursor-pointer hover:opacity-80",y.color&&"text-white"),children:[y.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:y.icon}),y.label,l&&!y.isDisabled&&jsx("button",{type:"button",onClick:N=>x(y.key,N),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${y.label}`,children:jsx(X,{className:"h-3 w-3"})})]},y.key)}),C>0&&jsxs("span",{className:u(lc({variant:"surface",size:n}),"cursor-default"),children:["+",C," more"]})]}),f&&jsx("span",{className:"text-sm text-danger",children:f})]})}Ih.displayName="TagGroup";var zh=cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",auto:"grid-cols-[repeat(auto-fill,minmax(150px,1fr))]"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{columns:"auto",gap:"md"}}),Oh=cva("relative flex flex-col rounded-lg border transition-all cursor-pointer",{variants:{variant:{default:"hover:border-primary/50 hover:bg-accent/50",card:"bg-card shadow-sm hover:shadow-md hover:border-primary/50"},size:{sm:"p-2",md:"p-3",lg:"p-4"},isSelected:{true:"border-primary bg-accent ring-2 ring-primary/20",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function Bh({className:e,columns:t,gap:r,items:n,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,showSelectionIndicator:i=true,itemVariant:l="default",itemSize:c="md",renderItem:d,emptyContent:m,...f}){let[p,g]=j.useState(new Set),h=j.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),b=v=>{if(a==="none")return;let w;a==="single"?w=h.has(v)?new Set:new Set([v]):(w=new Set(h),w.has(v)?w.delete(v):w.add(v)),o||g(w),s?.(w);};return n.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:u(zh({columns:t,gap:r,className:e})),...f,children:n.map(v=>{let w=h.has(v.key);return d?jsx("div",{role:"gridcell","aria-selected":w,onClick:()=>b(v.key),children:d(v,w)},v.key):jsxs("div",{role:"gridcell","aria-selected":w,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&b(v.key),className:u(Oh({variant:l,size:c,isSelected:w,isDisabled:v.isDisabled})),children:[i&&a!=="none"&&w&&jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsx(Check,{className:"h-3 w-3"})}),v.thumbnail&&jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:v.thumbnail}),jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate font-medium",children:v.label}),v.description&&jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:v.description})]})]},v.key)})})}Bh.displayName="GridList";var Kh=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),oP=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),aP=cva("h-full transition-all duration-300 ease-out",{variants:{color:{primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500",auto:""},rounded:{true:"rounded-full",false:"rounded-l-full"}},defaultVariants:{color:"primary",rounded:true}}),Qs=j.forwardRef(({className:e,size:t,value:r,min:n=0,max:o=100,optimum:a,low:s,high:i,label:l,showValueLabel:c=false,formatValue:d,color:m="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(r-n)/(o-n)*100)),b=()=>{if(m!=="auto")return "";let w=(r-n)/(o-n),x=s!==void 0?(s-n)/(o-n):.25,R=i!==void 0?(i-n)/(o-n):.75;return (a!==void 0?(a-n)/(o-n):1)>=.5?w<=x?"bg-red-500":w<=R?"bg-yellow-500":"bg-green-500":w>=R?"bg-red-500":w>=x?"bg-yellow-500":"bg-green-500"},v=d?d(r,h):`${Math.round(h)}%`;return jsxs("div",{ref:g,className:u("w-full",e),...p,children:[(l||c)&&jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l&&jsx("span",{className:"text-sm font-medium text-foreground",children:l}),c&&jsx("span",{className:"text-sm text-muted-foreground",children:v})]}),jsx("div",{role:"meter","aria-valuenow":r,"aria-valuemin":n,"aria-valuemax":o,"aria-label":l,className:u(Kh({size:t})),children:jsx("div",{className:u(oP({variant:f})),children:jsx("div",{className:u(aP({color:m==="auto"?void 0:m,rounded:h>=100}),m==="auto"&&b()),style:{width:`${h}%`}})})})]})});Qs.displayName="Meter";var $h=j.forwardRef((e,t)=>jsx(Qs,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));$h.displayName="DiskUsageMeter";var Gh=j.forwardRef((e,t)=>jsx(Qs,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));Gh.displayName="BatteryMeter";var Uh=cva("relative rounded-lg overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full min-h-48"}},defaultVariants:{size:"md"}}),ei=(e,t,r)=>{let n=o=>{let a=(o+e/60)%6;return r-r*t*Math.max(Math.min(a,4-a,1),0)};return [Math.round(n(5)*255),Math.round(n(3)*255),Math.round(n(1)*255)]},Wh=(e,t,r)=>{e/=255,t/=255,r/=255;let n=Math.max(e,t,r),o=Math.min(e,t,r),a=n-o,s=0,i=n===0?0:a/n,l=n;if(a!==0)switch(n){case e:s=((t-r)/a+(t<r?6:0))*60;break;case t:s=((r-e)/a+2)*60;break;case r:s=((e-t)/a+4)*60;break}return [s,i,l]},jh=e=>{let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null},_h=(e,t,r)=>"#"+[e,t,r].map(n=>n.toString(16).padStart(2,"0")).join(""),Xh=j.forwardRef(({hue:e,saturation:t,brightness:r,value:n,defaultValue:o="#ff0000",onChange:a,onColorChange:s,size:i,disabled:l,thumbSize:c=18,className:d,...m},f)=>{let p=j.useRef(null),[g,h]=j.useState(false),b=j.useCallback(I=>{let F=jh(I);return F?Wh(...F):[0,1,1]},[]),[v,w]=j.useState(()=>b(n||o)),x=e??v[0],R=t??v[1],C=r??v[2];j.useEffect(()=>{if(n){let I=b(n);w(I);}},[n,b]);let y=j.useCallback((I,F)=>{if(l||!p.current)return;let K=p.current.getBoundingClientRect(),Y=Math.max(0,Math.min(1,(I-K.left)/K.width)),te=Math.max(0,Math.min(1,(F-K.top)/K.height)),$=Y,O=1-te;t===void 0&&r===void 0&&w([x,$,O]),a?.({hue:x,saturation:$,brightness:O});let W=ei(x,$,O);s?.(_h(...W));},[l,x,t,r,a,s]),k=I=>{l||(I.preventDefault(),h(true),I.target.setPointerCapture(I.pointerId),y(I.clientX,I.clientY));},T=I=>{g&&y(I.clientX,I.clientY);},N=I=>{h(false),I.target.releasePointerCapture(I.pointerId);},[M,P,E]=ei(x,1,1),D=`rgb(${M}, ${P}, ${E})`,H=R*100,L=(1-C)*100,[S,V,A]=ei(x,R,C),B=`rgb(${S}, ${V}, ${A})`;return jsx("div",{ref:f,className:u(Uh({size:i}),l&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:D},onPointerDown:k,onPointerMove:T,onPointerUp:N,onPointerLeave:N,children:[jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to right, white, transparent)"}}),jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, black)"}}),jsx("div",{className:"absolute rounded-full border-2 border-white pointer-events-none",style:{width:c,height:c,left:`calc(${H}% - ${c/2}px)`,top:`calc(${L}% - ${c/2}px)`,backgroundColor:B,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Xh.displayName="ColorArea";var qh=cva("relative rounded-full cursor-pointer touch-none select-none",{variants:{orientation:{horizontal:"w-full",vertical:"h-full"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",size:"sm",className:"h-3"},{orientation:"horizontal",size:"md",className:"h-4"},{orientation:"horizontal",size:"lg",className:"h-5"},{orientation:"vertical",size:"sm",className:"w-3"},{orientation:"vertical",size:"md",className:"w-4"},{orientation:"vertical",size:"lg",className:"w-5"}],defaultVariants:{orientation:"horizontal",size:"md"}}),cP=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,Yh="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",Zh=j.forwardRef(({value:e,defaultValue:t,onChange:r,channel:n="hue",baseColor:o="#ff0000",orientation:a,size:s,disabled:i,thumbSize:l=18,showBorder:c=true,className:d,...m},f)=>{let p=j.useRef(null),[g,h]=j.useState(false),b=()=>{switch(n){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,w]=j.useState(t??b()),x=e??v,R=n==="hue"?x/360:x,C=j.useCallback((D,H)=>{if(i||!p.current)return;let L=p.current.getBoundingClientRect(),S=a!=="vertical",V;S?V=Math.max(0,Math.min(1,(D-L.left)/L.width)):V=Math.max(0,Math.min(1,1-(H-L.top)/L.height));let A=n==="hue"?V*360:V;e===void 0&&w(A),r?.(A);},[i,a,n,e,r]),y=D=>{i||(D.preventDefault(),h(true),D.target.setPointerCapture(D.pointerId),C(D.clientX,D.clientY));},k=D=>{g&&C(D.clientX,D.clientY);},T=D=>{h(false),D.target.releasePointerCapture(D.pointerId);},N=()=>{let D=a!=="vertical",H=D?"to right":"to top";switch(n){case "hue":return D?Yh:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${o})`;case "saturation":return `linear-gradient(${H}, #808080, ${o})`;case "brightness":return `linear-gradient(${H}, #000000, ${o})`;default:return Yh}},M=()=>n==="hue"?`hsl(${x}, 100%, 50%)`:o,P=a!=="vertical",E=R*100;return jsx("div",{ref:f,className:u(qh({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:u("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:n==="alpha"?cP:void 0,backgroundSize:n==="alpha"?"8px 8px":void 0},onPointerDown:y,onPointerMove:k,onPointerUp:T,onPointerLeave:T,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:N()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...P?{left:`calc(${E}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${E}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:M(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Zh.displayName="ColorSlider";var Qh=cva("relative cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64"}},defaultVariants:{size:"md"}}),mP=(e,t,r)=>{let n=e-r,o=t-r,a=Math.atan2(o,n)*180/Math.PI+90;return a<0&&(a+=360),a},Jh=j.forwardRef(({value:e,defaultValue:t=0,onChange:r,size:n,disabled:o,innerRadius:a=.6,thumbSize:s=20,showCenter:i=true,className:l,...c},d)=>{let m=j.useRef(null),[f,p]=j.useState(false),[g,h]=j.useState(t),b=e??g,v=j.useCallback((y,k)=>{if(o||!m.current)return;let T=m.current.getBoundingClientRect(),N=T.width/2,M=y-T.left,P=k-T.top,E=mP(M,P,N);e===void 0&&h(E),r?.(E);},[o,e,r]),w=y=>{o||(y.preventDefault(),p(true),y.target.setPointerCapture(y.pointerId),v(y.clientX,y.clientY));},x=y=>{f&&v(y.clientX,y.clientY);},R=y=>{p(false),y.target.releasePointerCapture(y.pointerId);},C=()=>{let y=[];for(let k=0;k<=360;k+=30)y.push(`hsl(${k}, 100%, 50%) ${k}deg`);return `conic-gradient(from 270deg, ${y.join(", ")})`};return jsx("div",{ref:d,className:u(Qh({size:n}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxs("div",{ref:m,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:w,onPointerMove:x,onPointerUp:R,onPointerLeave:R,children:[a<1&&jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-a)*50}%`,left:`${(1-a)*50}%`,width:`${a*100}%`,height:`${a*100}%`}}),i&&a<1&&jsx("div",{className:"absolute rounded-full border-2 border-input bg-background",style:{width:8,height:8,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),jsx(pP,{hue:b,innerRadius:a,thumbSize:s})]})})});Jh.displayName="ColorWheel";var pP=({hue:e,innerRadius:t,thumbSize:r})=>{let n=(1-(1-t)/2)*50,o=(e-90)*Math.PI/180,a=50+n*Math.cos(o),s=50+n*Math.sin(o);return jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:r,height:r,left:`calc(${a}% - ${r/2}px)`,top:`calc(${s}% - ${r/2}px)`,backgroundColor:`hsl(${e}, 100%, 50%)`,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})};var tx=cva("flex",{variants:{orientation:{horizontal:"flex-row items-center gap-2",vertical:"flex-col gap-1"},size:{sm:"",md:"",lg:""},align:{start:"items-start",center:"items-center",end:"items-end"}},compoundVariants:[{orientation:"horizontal",align:"start",className:"items-start"},{orientation:"horizontal",align:"center",className:"items-center"},{orientation:"horizontal",align:"end",className:"items-end"}],defaultVariants:{orientation:"vertical",size:"md",align:"start"}}),gP=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),bP=cva("text-foreground",{variants:{size:{sm:"text-sm",md:"text-base",lg:"text-lg"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},mono:{true:"font-mono",false:""}},defaultVariants:{size:"md",weight:"normal",mono:false}}),rx=j.forwardRef(({className:e,orientation:t,size:r,align:n,label:o,value:a,valueWeight:s,mono:i,labelWidth:l,labelClassName:c,valueClassName:d,showColon:m=false,copyable:f=false,onCopy:p,...g},h)=>{let b=async()=>{if(!(!f||a===null||a===void 0))try{let v=typeof a=="string"?a:String(a);await navigator.clipboard.writeText(v),p?.();}catch{}};return jsxs("div",{ref:h,className:u(tx({orientation:t,size:r,align:n,className:e})),...g,children:[jsxs("span",{className:u(gP({size:r}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,m&&":"]}),jsx("span",{className:u(bP({size:r,weight:s,mono:i}),f&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",d),onClick:f?b:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,onKeyDown:f?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),b());}:void 0,children:a})]})});rx.displayName="LabeledValue";var nx=cva("",{variants:{orientation:{horizontal:"flex flex-row flex-wrap",vertical:"flex flex-col"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"vertical",gap:"md"}}),ox=j.forwardRef(({className:e,orientation:t,gap:r,...n},o)=>jsx("div",{ref:o,className:u(nx({orientation:t,gap:r,className:e})),...n}));ox.displayName="LabeledValueGroup";var lx=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),Co=cva("text-muted-foreground shrink-0",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),cx=j.forwardRef(({value:e,defaultValue:t="",onChange:r,onSearch:n,onSelect:o,suggestions:a=[],recentSearches:s=[],onClearRecentSearches:i,trendingSearches:l=[],isLoading:c,showClear:d=true,showIcon:m=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:b,placeholder:v="Search...",disabled:w,...x},R)=>{let[C,y]=j.useState(false),[k,T]=j.useState(t),N=e!==void 0?e:k,M=j.useRef(null);j.useImperativeHandle(R,()=>M.current);let P=N.length>0,E=C&&(a.length>0||s.length>0||l.length>0||P),D=I=>{e===void 0&&T(I),r?.(I);},H=()=>{D(""),M.current?.focus();},L=I=>{I?.preventDefault(),N.trim()&&(n?.(N.trim()),y(false));},S=I=>{D(I.label),o?.(I),y(false);},V=I=>{D(I),n?.(I),y(false);},A=I=>{D(I),n?.(I),y(false);},B=j.useMemo(()=>{let I={};return a.forEach(F=>{let K=F.category||"Results";I[K]||(I[K]=[]),I[K].push(F);}),I},[a]);return jsxs(_e,{open:E,onOpenChange:y,children:[jsx(jr,{children:jsxs("form",{onSubmit:L,className:u(lx({size:g,variant:h}),b),children:[m&&jsx(Search,{className:u(Co({size:g}),"ml-3")}),jsx("input",{ref:M,type:"text",value:N,onChange:I=>D(I.target.value),onFocus:()=>y(true),placeholder:v,disabled:w,className:u("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!m&&"pl-3"),...x}),d&&P&&!w&&jsx("button",{type:"button",onClick:H,className:u("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",Co({size:g})),children:jsx(X,{className:"h-full w-full"})})]})}),jsx(Xe,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:I=>I.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!P&&jsxs("div",{className:"p-2",children:[jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Recent"}),i&&jsx("button",{type:"button",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((I,F)=>jsxs("button",{type:"button",onClick:()=>V(I),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:u(Co({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:I}),jsx(ArrowRight,{className:u(Co({size:g}),"opacity-0 group-hover:opacity-100")})]},F))]}),l.length>0&&!P&&jsxs("div",{className:"border-t p-2",children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Trending"})}),l.map((I,F)=>jsxs("button",{type:"button",onClick:()=>A(I),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:u(Co({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:I})]},F))]}),P&&jsx("div",{className:"p-2",children:c?jsx("div",{className:"flex items-center justify-center py-6",children:jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):a.length>0?Object.entries(B).map(([I,F])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:I})}),F.map(K=>jsxs("button",{type:"button",onClick:()=>S(K),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[K.icon||jsx(Search,{className:u(Co({size:g}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:K.label}),K.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:K.description})]})]},K.id))]},I)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});cx.displayName="SearchBar";var dx={Pages:jsx(File,{className:"h-4 w-4"}),Files:jsx(Folder,{className:"h-4 w-4"}),Settings:jsx(Settings,{className:"h-4 w-4"}),Users:jsx(User,{className:"h-4 w-4"}),Tags:jsx(Hash,{className:"h-4 w-4"})},px=j.forwardRef(({open:e,onOpenChange:t,items:r=[],recentItems:n=[],placeholder:o="Search...",isLoading:a,emptyMessage:s="No results found.",filter:i,shortcut:l="\u2318K",onSelect:c,footer:d},m)=>{let[f,p]=j.useState(""),g=j.useRef(null),[h,b]=j.useState(false);j.useEffect(()=>{b(true);},[]),j.useEffect(()=>{e||p("");},[e]),j.useEffect(()=>{if(!e)return;let y=k=>{k.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[e,t]),j.useEffect(()=>{if(e)return Rt(),()=>wt()},[e]);let v=j.useMemo(()=>{let y={};return r.forEach(k=>{let T=k.category||"Results";y[T]||(y[T]=[]),y[T].push(k);}),y},[r]),w=y=>{y.onSelect?.(),c?.(y),t?.(false);},x=()=>{t?.(false);},R=f.length>0,C=!R&&n.length>0;return !h||!e?null:$a.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":e?"open":"closed",onClick:x}),jsx("div",{ref:m,className:"fixed left-1/2 top-[20%] z-50 w-full max-w-2xl -translate-x-1/2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2","data-state":e?"open":"closed",children:jsxs(Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:i,shouldFilter:!i,children:[jsxs("div",{className:"flex items-center border-b px-4",children:[jsx(Search,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),jsx(Command.Input,{ref:g,value:f,onValueChange:p,placeholder:o,className:"flex h-14 w-full bg-transparent px-4 py-4 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),f&&jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsx(X,{className:"h-4 w-4"})})]}),jsx(Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:a?jsx("div",{className:"flex items-center justify-center py-10",children:jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):jsxs(Fragment,{children:[C&&jsxs(Command.Group,{heading:"Recent",children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),n.map(y=>jsxs(Command.Item,{value:y.label,onSelect:()=>w(y),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:y.icon||dx[y.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:y.label}),y.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:y.description})]}),y.shortcut&&jsx("div",{className:"flex items-center gap-1",children:y.shortcut.map((k,T)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:k},T))})]},y.id))]}),R&&Object.entries(v).map(([y,k])=>jsxs(Command.Group,{heading:y,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:y}),k.map(T=>jsxs(Command.Item,{value:`${T.label} ${T.keywords?.join(" ")||""}`,onSelect:()=>w(T),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:T.icon||dx[y]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:T.label}),T.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:T.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},T.id))]},y)),jsx(Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),d?jsx("div",{className:"border-t px-4 py-3",children:d}):jsxs("div",{className:"flex items-center justify-between border-t px-4 py-3 text-xs text-muted-foreground",children:[jsxs("div",{className:"flex items-center gap-4",children:[jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u2191\u2193"}),"Navigate"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u21B5"}),"Select"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"Esc"}),"Close"]})]}),jsxs("span",{className:"flex items-center gap-1",children:["Press ",jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:l})," to open"]})]})]})})]}),document.body)});px.displayName="SpotlightSearch";function EP(e="k"){let[t,r]=j.useState(false);return j.useEffect(()=>{let n=o=>{(o.metaKey||o.ctrlKey)&&o.key===e&&(o.preventDefault(),r(a=>!a));};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e]),{open:t,setOpen:r,toggle:()=>r(n=>!n)}}var bx=j.createContext(null),ri=()=>{let e=j.useContext(bx);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},zP=({children:e,notifications:t,onNotificationsChange:r})=>{let[n,o]=j.useState([]),[a,s]=j.useState(false),i=j.useRef(null),l=t!==void 0,c=l?t:n,d=j.useCallback(b=>{l?r?.(b):o(b);},[l,r]),m=c.filter(b=>!b.read).length,f=j.useCallback(b=>{d(c.map(v=>v.id===b?{...v,read:true}:v));},[c,d]),p=j.useCallback(()=>{d(c.map(b=>({...b,read:true})));},[c,d]),g=j.useCallback(b=>{d(c.filter(v=>v.id!==b));},[c,d]),h=j.useCallback(()=>{d([]);},[d]);return jsx(bx.Provider,{value:{notifications:c,unreadCount:m,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},vx=j.forwardRef(({className:e,children:t,...r},n)=>jsx("div",{ref:n,className:u("relative inline-block",e),...r,children:t}));vx.displayName="NotificationCenter";var hx=j.forwardRef(({className:e,showBadge:t=true,children:r,onClick:n,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=ri(),d=f=>{n?.(f),l(!i);},m=s>99?"99+":String(s);return jsxs("button",{ref:f=>{c.current=f,typeof a=="function"?a(f):a&&(a.current=f);},type:"button",onClick:d,"aria-label":"Notifications"+(s>0?", "+s+" unread":""),className:u("relative inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...o,children:[r||jsx(Bell,{className:"h-5 w-5"}),t&&s>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-medium text-danger-foreground",children:m})]})});hx.displayName="NotificationCenterTrigger";var xx=j.forwardRef(({className:e,align:t="end",sideOffset:r=8,emptyMessage:n="No notifications",children:o,...a},s)=>{let{open:i,setOpen:l,notifications:c,markAllAsRead:d,clearAll:m,triggerRef:f}=ri(),[p,g]=j.useState(false),h=j.useRef(null),[b,v]=j.useState({top:0,left:0});return j.useEffect(()=>{g(true);},[]),j.useEffect(()=>{if(!i||!f.current||!h.current)return;let w=()=>{if(!f.current||!h.current)return;let x=f.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),C=x.bottom+r,y=x.left;t==="center"?y=x.left+x.width/2-R.width/2:t==="end"&&(y=x.right-R.width),y+R.width>window.innerWidth-16&&(y=window.innerWidth-R.width-16),y<16&&(y=16),v({top:C,left:y});};return w(),window.addEventListener("resize",w),window.addEventListener("scroll",w,true),()=>{window.removeEventListener("resize",w),window.removeEventListener("scroll",w,true);}},[i,f,t,r]),j.useEffect(()=>{if(!i)return;let w=R=>{h.current&&!h.current.contains(R.target)&&f.current&&!f.current.contains(R.target)&&l(false);},x=R=>{R.key==="Escape"&&l(false);};return document.addEventListener("mousedown",w),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",w),document.removeEventListener("keydown",x);}},[i,l,f]),!p||!i?null:$a.createPortal(jsxs("div",{ref:w=>{h.current=w,typeof s=="function"?s(w):s&&(s.current=w);},className:u("fixed z-50 w-80 sm:w-96 max-h-[70vh] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:b.top,left:b.left},...a,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsx("h3",{className:"font-semibold",children:"Notifications"}),jsxs("div",{className:"flex items-center gap-2",children:[c.length>0&&jsxs(Fragment,{children:[jsx("button",{type:"button",onClick:d,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all read"}),jsx("button",{type:"button",onClick:m,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]}),jsx("button",{type:"button",onClick:()=>l(false),className:"rounded-md p-1 hover:bg-accent",children:jsx(X,{className:"h-4 w-4"})})]})]}),jsx("div",{className:"max-h-[calc(70vh-60px)] overflow-y-auto",children:o||(c.length===0?jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[jsx(Bell,{className:"h-10 w-10 mb-2 opacity-50"}),jsx("p",{className:"text-sm",children:n})]}):c.map(w=>jsx(pc,{notification:w},w.id)))})]}),document.body)});xx.displayName="NotificationCenterContent";var OP={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},BP={info:Info,success:CheckCircle,warning:AlertTriangle,error:AlertCircle},pc=({notification:e,onMarkAsRead:t,onRemove:r})=>{let{markAsRead:n,removeNotification:o}=ri(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:m,action:f}=e,p=BP[l],g=()=>{t?t():n(a);},h=()=>{r?r():o(a);},b=v=>{if(!v)return null;let w=typeof v=="string"?new Date(v):v,R=new Date().getTime()-w.getTime(),C=Math.floor(R/6e4),y=Math.floor(R/36e5),k=Math.floor(R/864e5);return C<1?"Just now":C<60?C+"m ago":y<24?y+"h ago":k<7?k+"d ago":w.toLocaleDateString()};return jsxs("div",{className:u("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",OP[l],!d&&"bg-accent/20"),children:[jsx("div",{className:"flex-shrink-0",children:m||jsx("div",{className:u("flex h-8 w-8 items-center justify-center rounded-full",l==="info"&&"bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400",l==="success"&&"bg-green-100 text-green-600 dark:bg-green-900 dark:text-green-400",l==="warning"&&"bg-yellow-100 text-yellow-600 dark:bg-yellow-900 dark:text-yellow-400",l==="error"&&"bg-red-100 text-red-600 dark:bg-red-900 dark:text-red-400"),children:jsx(p,{className:"h-4 w-4"})})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsx("p",{className:u("text-sm font-medium",!d&&"font-semibold"),children:s}),!d&&jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-primary"})]}),i&&jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:i}),jsxs("div",{className:"mt-2 flex items-center gap-3",children:[c&&jsx("span",{className:"text-xs text-muted-foreground",children:b(c)}),f&&jsx("button",{type:"button",onClick:f.onClick,className:"text-xs font-medium text-primary hover:underline",children:f.label})]})]}),jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:jsxs("div",{className:"flex gap-1",children:[!d&&jsx("button",{type:"button",onClick:g,className:"rounded-md p-1 hover:bg-accent",title:"Mark as read",children:jsx(Check,{className:"h-4 w-4"})}),jsx("button",{type:"button",onClick:h,className:"rounded-md p-1 hover:bg-accent text-danger",title:"Remove",children:jsx(Trash2,{className:"h-4 w-4"})})]})})]})};pc.displayName="NotificationItem";var yx=j.forwardRef(({className:e,children:t,...r},n)=>jsx("div",{ref:n,className:u("divide-y",e),...r,children:t}));yx.displayName="NotificationList";var Rx=cva("relative flex items-center justify-center gap-3 px-4 py-2.5 text-sm",{variants:{variant:{solid:"",flat:""},type:{default:"",success:"",warning:"",error:""},position:{top:"fixed top-0 left-0 right-0 z-50",relative:"relative"}},compoundVariants:[{variant:"solid",type:"default",className:"bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"bg-green-600 text-white dark:bg-green-500 [&>svg]:text-white"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"bg-amber-600 text-white dark:bg-amber-500 [&>svg]:text-white"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"bg-red-600 text-white dark:bg-red-500 [&>svg]:text-white"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",position:"relative"}}),_P={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},wx=j.forwardRef(({message:e,type:t="default",variant:r="solid",showIcon:n=false,icon:o,dismissible:a=true,onDismiss:s,endContent:i,position:l,animate:c,autoDismiss:d,storageKey:m,className:f,...p},g)=>{let[h,b]=j.useState(true),[v,w]=j.useState(false);j.useEffect(()=>{m&&localStorage.getItem(`banner-${m}`)==="true"&&b(false);},[m]),j.useEffect(()=>{if(d&&h){let y=setTimeout(()=>{x();},d);return ()=>clearTimeout(y)}},[d,h]);let x=()=>{w(true),setTimeout(()=>{b(false),m&&localStorage.setItem(`banner-${m}`,"true"),s?.();},200);};if(!h)return null;let R=_P[t],C=n?o!==void 0?o:R?jsx(R,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:g,className:u(Rx({variant:r,type:t,position:l}),c&&"animate-pulse",v&&"animate-out fade-out slide-out-to-top duration-200",f),role:"banner",...p,children:[C&&jsx("span",{className:"shrink-0",children:C}),jsx("span",{className:"text-center font-medium",children:e}),i&&jsx("div",{className:"shrink-0 ml-2",children:i}),a&&jsx("button",{type:"button",onClick:x,className:u("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsx(X,{className:"h-4 w-4"})})]})});wx.displayName="Banner";var ga=cva("inline-flex items-center justify-center rounded-full shadow-lg transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border-2 border-current bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border-2 border-current bg-transparent text-primary hover:bg-primary hover:text-primary-foreground"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"solid",size:"md",position:"bottom-right"}}),qP=cva("transition-transform duration-200 [&>svg]:h-full [&>svg]:w-full",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),gc=j.forwardRef(({icon:e,label:t="Action button",extended:r,extendedLabel:n,actions:o,direction:a="up",showTooltip:s=true,closeIcon:i,animation:l="rotate",variant:c,size:d,position:m,className:f,onClick:p,disabled:g,...h},b)=>{let[v,w]=j.useState(false),x=o&&o.length>0,R=N=>{x&&w(!v),p?.(N);},C=N=>{N.onClick?.(),w(false);},y={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},k=l==="rotate"&&v?"rotate-45":"",T=l==="scale"&&v?"scale-0":"scale-100";return jsxs("div",{className:u("relative z-50",m!=="relative"&&m&&ga({position:m})),children:[x&&v&&jsx("div",{className:u("absolute left-1/2 -translate-x-1/2 flex items-center",y[a].container),children:o.map((N,M)=>jsxs("div",{className:u("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${M*50}ms`},children:[s&&(a==="up"||a==="down")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:N.label}),N.href?jsx("a",{href:N.href,className:u(ga({variant:N.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":N.label,children:N.icon}):jsx("button",{type:"button",onClick:()=>C(N),className:u(ga({variant:N.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":N.label,children:N.icon}),s&&(a==="left"||a==="right")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:N.label})]},N.id))}),jsxs("button",{ref:b,type:"button",onClick:R,disabled:g,className:u(ga({variant:c,size:d,position:"relative"}),r&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":x?v:void 0,...h,children:[v&&i?i:jsx("span",{className:u(qP({size:d}),k,T,"transition-all duration-200"),children:e||jsx(Plus,{})}),r&&n&&jsx("span",{className:"font-medium",children:n})]}),x&&v&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>w(false)})]})});gc.displayName="FloatingActionButton";var ZP=gc;var kx=cva("fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background safe-area-pb",{variants:{variant:{default:"border-border",elevated:"border-transparent shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]",filled:"border-transparent bg-primary text-primary-foreground"},size:{sm:"h-14",md:"h-16",lg:"h-20"}},defaultVariants:{variant:"default",size:"md"}}),Tx=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),Px=j.forwardRef(({className:e,variant:t,size:r,items:n,value:o,defaultValue:a,onValueChange:s,showLabels:i="all",renderItem:l,...c},d)=>{let[m,f]=j.useState(a||n[0]?.key),p=o!==void 0,g=p?o:m,h=x=>{x.disabled||(p||f(x.key),s?.(x.key));},b=x=>t==="filled"?x?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":x?"text-primary":"text-muted-foreground hover:text-foreground",v=()=>{switch(r){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},w=()=>{switch(r){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:d,className:u(kx({variant:t,size:r}),e),role:"navigation","aria-label":"Bottom navigation",...c,children:n.map(x=>{let R=g===x.key,C=i==="all"||i==="active"&&R,y=R&&x.activeIcon?x.activeIcon:x.icon;if(l)return jsx("div",{onClick:()=>h(x),className:u(Tx({variant:t}),x.disabled&&"opacity-50 cursor-not-allowed"),children:l(x,R)},x.key);let k=jsxs("div",{onClick:()=>!x.href&&h(x),className:u(Tx({variant:t}),b(R),x.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":R?"page":void 0,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),h(x));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:u(v(),"[&>svg]:h-full [&>svg]:w-full"),children:y}),x.badge!==void 0&&x.badge>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white",children:x.badge>99?"99+":x.badge}),x.showDot&&jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),C&&x.label&&jsx("span",{className:u(w(),"font-medium truncate max-w-full px-1"),children:x.label})]},x.key);return x.href&&!x.disabled?jsx("a",{href:x.href,onClick:()=>h(x),className:u("flex flex-1 flex-col items-center justify-center gap-1 no-underline",b(R)),children:k},x.key):k})})});Px.displayName="BottomNavigation";var JP="fixed inset-x-0 bottom-0 z-50 mt-24 flex h-fit max-h-[90vh] flex-col rounded-t-[20px] border-t border-border/40 dark:border-border/20 bg-background",Lx=cva("flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors focus-visible:outline-none focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-accent",destructive:"text-danger hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),Sx=j.forwardRef(({open:e,onOpenChange:t,trigger:r,title:n,description:o,items:a,cancelLabel:s="Cancel",onCancel:i,showCancel:l=true,children:c,closeOnSelect:d=true,onAction:m},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),m?.(g.key),d&&t?.(false));};return jsxs(Drawer.Root,{open:e,onOpenChange:t,children:[r&&jsx(Drawer.Trigger,{asChild:true,children:r}),jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxs(Drawer.Content,{ref:f,className:JP,children:[jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(n||o)&&jsxs("div",{className:"px-4 py-3 text-center",children:[n&&jsx(Drawer.Title,{className:"text-base font-semibold",children:n}),o&&jsx(Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:o})]}),jsx("div",{className:"flex-1 overflow-y-auto",children:c||jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:a?.map(g=>jsxs("button",{type:"button",disabled:g.isDisabled,onClick:()=>p(g),className:u(Lx({variant:g.isDestructive?"destructive":"default"})),children:[g.icon&&jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"font-medium",children:g.label}),g.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:g.description})]})]},g.key))})}),l&&jsx("div",{className:"border-t border-border/40 dark:border-border/20 p-2 pb-safe",children:jsx(Drawer.Close,{asChild:true,children:jsx("button",{type:"button",onClick:i,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});Sx.displayName="ActionSheet";var Hx=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),vc=cva("flex h-full items-center justify-center px-4 text-white font-medium transition-opacity",{variants:{variant:{primary:"bg-primary",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500"},size:{sm:"min-w-16",md:"min-w-20",lg:"min-w-24"}},defaultVariants:{variant:"primary",size:"md"}}),Ix=j.forwardRef(({className:e,variant:t,leftActions:r=[],rightActions:n=[],actionSize:o="md",threshold:a=.3,onSwipeEnd:s,disabled:i=false,fullSwipeAction:l,children:c,...d},m)=>{let f=j.useRef(null),[p,g]=j.useState(0),[h,b]=j.useState(false),v=j.useRef(0),w=j.useRef(0),x=r.length*(o==="sm"?64:o==="lg"?96:80),R=n.length*(o==="sm"?64:o==="lg"?96:80),C=M=>{i||(b(true),v.current=M.touches[0].clientX,w.current=p);},y=M=>{if(!h||i)return;let E=M.touches[0].clientX-v.current,D=w.current+E;(D>0&&r.length===0||D<0&&n.length===0)&&(D=0),D>x?D=x+(D-x)*.3:D<-R&&(D=-R+(D+R)*.3),g(D);},k=()=>{if(!h)return;b(false);let M=f.current?.offsetWidth||0,P=Math.abs(p)/M;if(l&&P>.6){l==="right"&&p>0&&r[0]?(r[0].onAction?.(),s?.("right",r[0].key)):l==="left"&&p<0&&n[0]&&(n[0].onAction?.(),s?.("left",n[0].key)),g(0);return}p>x*a&&r.length>0?(g(x),s?.("right")):p<-R*a&&n.length>0?(g(-R),s?.("left")):g(0);},T=(M,P)=>{M.onAction?.(),s?.(P,M.key),g(0);},N=()=>{g(0);};return jsxs("div",{ref:m,className:u(Hx({variant:t,className:e})),...d,children:[r.length>0&&p>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:x},children:r.map(M=>jsxs("button",{type:"button",onClick:()=>T(M,"right"),className:u(vc({variant:M.variant,size:o})),style:{opacity:Math.min(1,p/x)},children:[M.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:M.icon}),!M.icon&&M.label]},M.key))}),n.length>0&&p<0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:R},children:n.map(M=>jsxs("button",{type:"button",onClick:()=>T(M,"left"),className:u(vc({variant:M.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/R)},children:[M.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:M.icon}),!M.icon&&M.label]},M.key))}),jsx("div",{ref:f,className:u("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:y,onTouchEnd:k,onClick:p!==0?N:void 0,children:c})]})});Ix.displayName="SwipeActions";var Ax=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),rE=cva("absolute left-1/2 -translate-x-1/2 flex items-center justify-center transition-all duration-200",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{size:"md"}}),zx=j.forwardRef(({className:e,variant:t,onRefresh:r,pullThreshold:n=80,maxPullDistance:o=120,loadingIndicator:a,pullIndicator:s,indicatorSize:i="md",disabled:l=false,pullText:c="Pull to refresh",releaseText:d="Release to refresh",refreshingText:m="Refreshing...",children:f,...p},g)=>{let h=j.useRef(null),[b,v]=j.useState(0),[w,x]=j.useState("idle"),R=j.useRef(0),C=j.useRef(false),y=()=>l||w==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,k=E=>{y()&&(R.current=E.touches[0].clientY,C.current=true);},T=E=>{if(!C.current||!y())return;let H=E.touches[0].clientY-R.current;if(H<0){v(0),x("idle");return}let S=Math.min(H*.5,o);v(S),x(S>=n?"ready":"pulling");},N=async()=>{if(C.current)if(C.current=false,w==="ready"){x("refreshing"),v(n*.6);try{await r();}finally{x("idle"),v(0);}}else x("idle"),v(0);},M={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],P=()=>{if(w==="refreshing")return a||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:u(M,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:m})]});let E=Math.min(b/n*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:u(M,"text-muted-foreground transition-transform"),style:{transform:`rotate(${E}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:w==="ready"?d:c})]})};return jsxs("div",{ref:g,className:u(Ax({variant:t,className:e})),...p,children:[jsx("div",{className:u(rE({size:i}),"z-10",w==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(n*.5),1)},children:P()}),jsx("div",{ref:h,className:u("transition-transform duration-200",w==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:C.current?"none":void 0},onTouchStart:k,onTouchMove:T,onTouchEnd:N,children:f})]})});zx.displayName="PullToRefresh";var $n=(e,t,r)=>({duration:e,delay:t,ease:r||[.4,0,.2,1]}),nE={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},Ox=j.forwardRef(({show:e=true,children:t,duration:r=.3,delay:n=0,ease:o,className:a,unmountOnExit:s=true,initialOpacity:i=0,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=jsx(motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:nE,custom:i,transition:$n(r,n,o),className:u(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsx(AnimatePresence,{children:e&&m}):m});Ox.displayName="Fade";var oE=(e,t)=>{let r=typeof t=="number"?`${t}px`:t,n={up:{y:r},down:{y:`-${r}`},left:{x:r},right:{x:`-${r}`}};return {hidden:{opacity:0,...n[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...n[e]}}},Bx=j.forwardRef(({show:e=true,children:t,duration:r=.3,delay:n=0,ease:o,className:a,unmountOnExit:s=true,direction:i="up",offset:l=20,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=j.useMemo(()=>oE(i,l),[i,l]),p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:$n(r,n,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Bx.displayName="Slide";var aE={center:"center center",top:"center top",bottom:"center bottom",left:"left center",right:"right center","top-left":"left top","top-right":"right top","bottom-left":"left bottom","bottom-right":"right bottom"},sE={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},Fx=j.forwardRef(({show:e=true,children:t,duration:r=.3,delay:n=0,ease:o,className:a,unmountOnExit:s=true,initialScale:i=.9,origin:l="center",onAnimationStart:c,onAnimationComplete:d},m)=>{let f=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:sE,custom:i,transition:$n(r,n,o),className:u(a),style:{transformOrigin:aE[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&f}):f});Fx.displayName="Scale";var Kx=j.forwardRef(({show:e=true,children:t,duration:r=.3,delay:n=0,ease:o,className:a,horizontal:s=false,startingSize:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=s?"width":"height",p={hidden:{[f]:i,opacity:l?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:$n(r,n,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});Kx.displayName="Collapse";var $x=j.forwardRef(({show:e=true,children:t,duration:r=.4,delay:n=0,ease:o,className:a,initialWidth:s=0,initialHeight:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{width:s,height:i,opacity:l?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:$n(r,n,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});$x.displayName="Expand";var Gx=j.forwardRef(({show:e=true,children:t,duration:r=.3,delay:n=0,ease:o,className:a,unmountOnExit:s=true,initialRotation:i=-180,finalRotation:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:$n(r,n,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Gx.displayName="Rotate";var Ux=j.forwardRef(({front:e,back:t,direction:r="horizontal",flipped:n=false,duration:o=.6,delay:a=0,ease:s,className:i,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=r==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:d,className:u("relative",i),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[m]:n?180:0},transition:$n(o,a,s),style:{transformStyle:"preserve-3d"},onAnimationStart:l,onAnimationComplete:c,children:[jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${m}(180deg)`},children:t})]})})});Ux.displayName="Flip";var Wx=j.forwardRef(({color:e="currentColor",duration:t=.6,children:r,className:n,disabled:o=false},a)=>{let[s,i]=j.useState([]),l=j.useRef(null),c=m=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=m.clientX-p.left,h=m.clientY-p.top,b=Math.max(p.width,p.height)*2,v={id:Date.now(),x:g,y:h,size:b};i(w=>[...w,v]);},d=m=>{i(f=>f.filter(p=>p.id!==m));};return jsxs("div",{ref:a,className:u("relative overflow-hidden rounded-[inherit]",n),onClick:c,children:[jsx("div",{ref:l,className:"relative z-0",children:r}),jsx(AnimatePresence,{children:s.map(m=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(m.id),className:"pointer-events-none absolute rounded-full",style:{left:m.x-m.size/2,top:m.y-m.size/2,width:m.size,height:m.size,backgroundColor:e}},m.id))})]})});Wx.displayName="Ripple";var jx=j.forwardRef(({children:e,animate:t=true,height:r=10,duration:n=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=j.useState(false),d=s?l:t,m={idle:{y:0},bounce:{y:[0,-r,0],transition:{duration:n,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"bounce":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});jx.displayName="Bounce";var cE={subtle:[0,-2,2,-2,2,-1,1,0],normal:[0,-5,5,-5,5,-3,3,0],strong:[0,-10,10,-10,10,-5,5,0]},_x=j.forwardRef(({children:e,animate:t=true,intensity:r="normal",duration:n=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=j.useState(false),d=s?l:t,m={idle:{x:0},shake:{x:cE[r],transition:{duration:n,ease:"easeInOut",repeat:o-1}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"shake":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});_x.displayName="Shake";var dE={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},Xx=j.forwardRef(({children:e,animate:t=true,speed:r="normal",className:n},o)=>jsx("div",{ref:o,className:u(t&&dE[r],n),children:e}));Xx.displayName="Pulse";var Yx=j.forwardRef(({children:e,animate:t=true,angle:r=10,duration:n=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=j.useState(false),d=s?l:t,m={idle:{rotate:0},wiggle:{rotate:[0,-r,r,-r,r,0],transition:{duration:n,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"wiggle":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});Yx.displayName="Wiggle";var qx=j.forwardRef(({children:e,animate:t=false,scale:r=1.2,duration:n=.2,className:o,triggerOnHover:a=false,triggerOnClick:s=false},i)=>{let[l,c]=j.useState(false),d=t||l,m={type:"spring",stiffness:400,damping:17,duration:n},f=()=>{s&&(c(true),setTimeout(()=>c(false),n*1e3));};return jsx(motion.div,{ref:i,animate:{scale:d?r:1},transition:m,className:u(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});qx.displayName="Pop";var bE=(e,t,r,n)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,r);return s?`${i}${n}${s}`:i},Zx=j.forwardRef(({value:e,from:t=0,duration:r=2,decimals:n=0,prefix:o="",suffix:a="",separator:s=",",decimalSeparator:i=".",animateOnView:l=true,delay:c=0,className:d,onComplete:m},f)=>{let p=j.useRef(null),g=useInView(p,{once:true}),[h,b]=j.useState(!l);j.useEffect(()=>{if(l&&g){let x=setTimeout(()=>b(true),c*1e3);return ()=>clearTimeout(x)}},[l,g,c]);let v=useMotionValue(t),w=useTransform(v,x=>bE(x,n,s,i));return j.useEffect(()=>{if(h){let x=animate(v,e,{duration:r,ease:"easeOut",onComplete:m});return ()=>x.stop()}},[h,e,r,v,m]),jsx("span",{ref:p,className:u(d),children:jsxs("span",{ref:f,children:[o,jsx(motion.span,{children:w}),a]})})});Zx.displayName="Counter";var Qx=j.forwardRef(({text:e,speed:t=50,delay:r=0,pauseBetween:n=1500,cursor:o=true,cursorChar:a="|",loop:s=false,deleteSpeed:i=30,animateOnView:l=true,className:c,cursorClassName:d,onComplete:m},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=j.useState(""),[b,v]=j.useState(0),[w,x]=j.useState(false),[R,C]=j.useState(false),y=j.useRef(null),k=useInView(y,{once:true}),[T,N]=j.useState(!l);return j.useEffect(()=>{if(l&&k){let M=setTimeout(()=>N(true),r*1e3);return ()=>clearTimeout(M)}},[l,k,r]),j.useEffect(()=>{if(!T||R)return;let M=p[b],P;return w?g.length>0?P=setTimeout(()=>{h(g.slice(0,-1));},i):(x(false),v(E=>(E+1)%p.length)):g.length<M.length?P=setTimeout(()=>{h(M.slice(0,g.length+1));},t):b<p.length-1||s?P=setTimeout(()=>{x(true);},n):(C(true),m?.()),()=>clearTimeout(P)},[T,g,b,w,R,p,t,i,n,s,m]),jsxs("span",{ref:y,className:u(c),children:[jsx("span",{ref:f,children:g}),o&&jsx(motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:u("ml-0.5",d),children:a})]})});Qx.displayName="Typewriter";var Jx=j.forwardRef(({children:e,direction:t="up",stagger:r=.05,duration:n=.5,delay:o=0,splitBy:a="word",animateOnView:s=true,className:i},l)=>{let c=j.useRef(null),d=useInView(c,{once:true,amount:.5}),m=s?d:true,f=typeof e=="string"?e:"",p=a==="word"?f.split(" "):f.split(""),g={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},h={hidden:{},visible:{transition:{staggerChildren:r,delayChildren:o}}},b={hidden:{opacity:0,...g[t]},visible:{opacity:1,x:0,y:0,transition:{duration:n,ease:"easeInOut"}}};return jsx(motion.div,{ref:l,className:u("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:m?"visible":"hidden",children:jsx("span",{ref:c,children:p.map((v,w)=>jsxs(motion.span,{variants:b,className:"inline-block",children:[v,a==="word"&&w<p.length-1&&"\xA0"]},w))})})});Jx.displayName="TextReveal";var ey=j.forwardRef(({words:e,duration:t=2,animation:r="slide",animationDuration:n=.5,className:o,loop:a=true},s)=>{let[i,l]=j.useState(0);j.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(m=>(m+1)%e.length);},t*1e3);return ()=>clearInterval(d)},[e.length,t,a,i]);let c=()=>{switch(r){case "fade":return {initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};case "slide":return {initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20}};case "scale":return {initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.2}};case "blur":return {initial:{opacity:0,filter:"blur(10px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(10px)"}}}};return jsx("span",{ref:s,className:u("relative inline-block",o),children:jsx(AnimatePresence,{mode:"wait",children:jsx(motion.span,{variants:c(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:n},className:"inline-block",children:e[i]},e[i])})})});ey.displayName="WordRotate";var oy=j.forwardRef(({children:e,direction:t="up",distance:r=50,duration:n=.6,delay:o=0,once:a=true,threshold:s=.1,className:i,scale:l,rotate:c,blur:d,ease:m=[.4,0,.2,1]},f)=>{let p=j.useRef(null),g=useInView(p,{once:a,amount:s}),b={up:{x:0,y:r},down:{x:0,y:-r},left:{x:r,y:0},right:{x:-r,y:0},none:{x:0,y:0}}[t],v={hidden:{opacity:0,x:b.x,y:b.y,scale:l??1,rotate:c??0,filter:d?`blur(${d}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:n,delay:o,ease:m}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:f,variants:v,initial:"hidden",animate:g?"visible":"hidden",className:u(i),children:e})})});oy.displayName="ScrollReveal";var ay=j.forwardRef(({position:e="top",size:t=4,color:r="hsl(var(--primary))",backgroundColor:n="transparent",zIndex:o=50,className:a,container:s,showPercentage:i=false,useSpring:l=true},c)=>{let{scrollYProgress:d}=useScroll({container:s}),m=useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?m:d,p=e==="top"||e==="bottom",g={top:{top:0,left:0,right:0,height:t},bottom:{bottom:0,left:0,right:0,height:t},left:{top:0,left:0,bottom:0,width:t},right:{top:0,right:0,bottom:0,width:t}},h=p?"scaleX":"scaleY",b=p?"left":"top";return jsxs("div",{ref:c,className:u("fixed",a),style:{...g[e],zIndex:o,backgroundColor:n},children:[jsx(motion.div,{className:"h-full w-full",style:{[h]:f,transformOrigin:b,backgroundColor:r}}),i&&jsx(hE,{progress:f,position:e})]})});ay.displayName="ScrollProgress";var hE=({progress:e,position:t})=>{let r=useTransform(e,s=>Math.round(s*100)),[n,o]=j.useState(0);return j.useEffect(()=>{let s=r.on("change",o);return ()=>s()},[r]),jsxs("span",{className:u("fixed rounded bg-background/80 px-2 py-1 text-xs font-medium backdrop-blur-sm",{top:"top-2 right-4",bottom:"bottom-2 right-4",left:"top-4 left-2",right:"top-4 right-2"}[t]),children:[n,"%"]})},sy=j.forwardRef(({children:e,speed:t=.5,direction:r="vertical",className:n,container:o},a)=>{let s=j.useRef(null),{scrollYProgress:i}=useScroll({target:s,container:o,offset:["start end","end start"]}),l=[-100*t,100*t],c=useTransform(i,[0,1],l),d=useSpring(c,{stiffness:100,damping:30}),m=r==="horizontal"?d:0,f=r==="vertical"?d:0;return jsx("div",{ref:s,className:u("overflow-hidden",n),children:jsx(motion.div,{ref:a,style:{x:m,y:f},children:e})})});sy.displayName="Parallax";var cy=j.forwardRef(({children:e,width:t,height:r,duration:n=1.5,direction:o="right",baseColor:a="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:i,className:l,active:c=true},d)=>{let m={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},f={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxs("div",{ref:d,className:u("relative overflow-hidden",l),style:{width:t,height:r,borderRadius:i,backgroundColor:a},children:[e,c&&jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${m[o]}, transparent, ${s}, transparent)`,animation:`${f[o]} ${n}s infinite`}}),jsx("style",{children:`
|
|
55
|
+
`,document.body.appendChild(ce),X.dataTransfer.setDragImage(ce,20,15),setTimeout(()=>{document.body.removeChild(ce);},0),h(e),C?.({event:X,node:e});},mt=X=>{if(X.preventDefault(),X.stopPropagation(),!g||g.key===e.key||Q)return;let Ee=X.currentTarget.getBoundingClientRect(),ce=X.clientY-Ee.top,$e=Ee.height,Ge;ce<$e*.25?Ge=-1:ce>$e*.75?Ge=1:Ge=0,!(R&&!R({dropNode:e,dropPosition:Ge,dragNode:g}))&&(w(e.key,Ge),y?.({event:X,node:e}));},fn=X=>{X.preventDefault(),X.stopPropagation(),!(!g||g.key===e.key)&&k?.({event:X,node:e,expandedKeys:F()});},Ar=X=>{X.stopPropagation(),T?.({event:X,node:e});},Do=X=>{X.preventDefault(),X.stopPropagation(),!(!g||g.key===e.key||Q)&&(v!==null&&x(e,v),h(null),w(null,null));},zt=X=>{h(null),w(null,null),N?.({event:X,node:e});},Ra=X=>{Q||ue&&i(e.key,e,X);},gn=X=>{X.stopPropagation(),!Q&&!Y&&a(e.key,e);},G=j.useMemo(()=>{if(!_||v===null)return "";switch(v){case -1:return "before:absolute before:left-0 before:right-0 before:top-0 before:h-0.5 before:bg-foreground";case 1:return "after:absolute after:left-0 after:right-0 after:bottom-0 after:h-0.5 after:bg-foreground";case 0:return "ring-2 ring-foreground ring-inset";default:return ""}},[_,v]),oe=[...n,r];return jsxs("div",{className:"relative",children:[M&&t>0&&jsxs(Fragment,{children:[n.map((X,Ee)=>!X&&jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${Ee} * var(--tree-indent) + 12px)`,top:0,bottom:0}},Ee)),jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:0,height:r?"calc(var(--tree-item-height) / 2)":"100%"}}),jsx("div",{className:"absolute border-t border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:"calc(var(--tree-item-height) / 2)",width:"calc(var(--tree-indent) - 4px)"}})]}),jsxs("div",{role:"treeitem","aria-expanded":Y?void 0:te,"aria-selected":ue?$:void 0,"aria-disabled":Q,draggable:Ie,onDragStart:Vr,onDragOver:mt,onDragEnter:fn,onDragLeave:Ar,onDrop:Do,onDragEnd:zt,onClick:Ra,className:u("relative",Og({size:I,isSelected:$,isDragging:z,isDisabled:Q,isHoverable:ue&&!Q}),G,A&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[Ie&&E&&Z!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:Z}),jsx("button",{type:"button",onClick:gn,className:u("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",Y&&"invisible"),tabIndex:-1,children:jsx(ChevronRight,{className:u("h-4 w-4 transition-transform duration-200",te&&"rotate-90")})}),U&&jsx(aT,{checked:O,indeterminate:W,disabled:Q,onClick:X=>m(e.key,e,X)}),P&&ye&&jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:ye}),jsx("div",{className:u("flex-1 min-w-0 truncate ml-1",A&&"flex-none"),children:e.label})]}),K&&te&&jsx("div",{role:"group",children:e.children.map((X,Ee)=>jsx(Fg,{node:X,level:t+1,isLast:Ee===e.children.length-1,parentIsLastPath:oe},X.key))})]})},sT=e=>{let t=[],r=n=>{for(let o of n)t.push(o.key),o.children&&r(o.children);};return r(e),t},iT=e=>{let t=[],r=n=>{for(let o of n)t.push(o.key),o.children&&r(o.children);};return e.children&&r(e.children),t},Kg=(e,t)=>{if(!e.children)return false;for(let r of e.children)if(r.key===t||Kg(r,t))return true;return false},$g=j.forwardRef(({className:e,variant:t,size:r,data:n,draggable:o=false,allowDrop:a,expandedKeys:s,defaultExpandedKeys:i=[],defaultExpandAll:l=false,onExpand:c,selectable:d=true,multiple:m=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:b=false,checkedKeys:v,defaultCheckedKeys:w=[],onCheck:x,showLine:R=false,showIcon:C=false,showHandle:y=true,dragIcon:k,icon:T,leafIcon:N=jsx(File,{className:"h-4 w-4"}),folderIcon:M=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:P=jsx(FolderOpen,{className:"h-4 w-4"}),onDragStart:E,onDragEnter:D,onDragOver:H,onDragLeave:L,onDragEnd:S,onDrop:V,blockNode:A=false,disabled:B=false,...I},F)=>{let K=j.useCallback(()=>l?new Set(sT(n)):new Set(i),[l,i,n]),[Y,te]=j.useState(K),$=s!==void 0,O=$?new Set(s):Y,W=j.useCallback((fe,We)=>{let Ot=new Set(O),Ve=!Ot.has(fe);Ve?Ot.add(fe):Ot.delete(fe),$||te(Ot),c?.(Array.from(Ot),{expanded:Ve,node:We});},[O,$,c]),[z,_]=j.useState(new Set(p)),Q=f!==void 0,ue=Q?new Set(f):z,U=j.useCallback((fe,We,Ot)=>{let Ve=new Set(ue),mr=!Ve.has(fe);m?mr?Ve.add(fe):Ve.delete(fe):(Ve.clear(),mr&&Ve.add(fe)),Q||_(Ve);let Gn=[],Ho=wa=>{for(let Un of wa)Ve.has(Un.key)&&Gn.push(Un),Un.children&&Ho(Un.children);};Ho(n),g?.(Array.from(Ve),{selected:mr,selectedNodes:Gn,node:We,event:Ot});},[ue,m,Q,g,n]),[Ie,Z]=j.useState(new Set(w)),[ye,Vr]=j.useState(new Set),mt=v!==void 0,fn=mt?new Set(Array.isArray(v)?v:v.checked):Ie,Ar=mt&&!Array.isArray(v)?new Set(v.halfChecked):ye,Do=j.useCallback((fe,We,Ot)=>{let Ve=new Set(fn),mr=new Set(Ar),Gn=!Ve.has(fe);if(Gn?(Ve.add(fe),mr.delete(fe)):Ve.delete(fe),!b&&We.children){let gi=iT(We);for(let Or of gi)Gn?(Ve.add(Or),mr.delete(Or)):Ve.delete(Or);}mt||(Z(Ve),Vr(mr));let Ho=[],wa=gi=>{for(let Or of gi)Ve.has(Or.key)&&Ho.push(Or),Or.children&&wa(Or.children);};wa(n);let Un=b?{checked:Array.from(Ve),halfChecked:Array.from(mr)}:Array.from(Ve);x?.(Un,{checked:Gn,checkedNodes:Ho,node:We,event:Ot,halfCheckedKeys:Array.from(mr)});},[fn,Ar,b,mt,x,n]),[zt,Ra]=j.useState(null),[gn,G]=j.useState(null),[oe,X]=j.useState(null),Ee=j.useCallback((fe,We)=>{G(fe),X(We);},[]),ce=j.useCallback((fe,We)=>{!zt||!V||We===0&&Kg(zt,fe.key)||V({event:{},node:fe,dragNode:zt,dropPosition:We,dropToGap:We!==0});},[zt,V]),$e=j.useCallback(()=>Array.from(O),[O]),Ge={expandedKeys:O,toggleExpand:W,selectedKeys:ue,handleSelect:U,selectable:d,multiple:m,checkedKeys:fn,halfCheckedKeys:Ar,handleCheck:Do,checkable:h,checkStrictly:b,draggable:o,draggedNode:zt,setDraggedNode:Ra,dragOverKey:gn,dragOverPosition:oe,setDragOver:Ee,handleDrop:ce,allowDrop:a,onDragStart:E,onDragEnter:D,onDragOver:H,onDragLeave:L,onDragEnd:S,showLine:R,showIcon:C,showHandle:y,dragIcon:k,icon:T,leafIcon:N,folderIcon:M,folderOpenIcon:P,blockNode:A,disabled:B,size:r,data:n,getAllKeys:$e},zr=fe=>{let We=fe.relatedTarget,Ot=fe.currentTarget;(!We||!Ot.contains(We))&&Ee(null,null);};return jsx(Bg.Provider,{value:Ge,children:jsx("div",{ref:F,role:"tree","aria-multiselectable":m||h,className:u(zg({variant:t,size:r,className:e})),onDragLeave:zr,...I,children:n.map((fe,We)=>jsx(Fg,{node:fe,level:0,isLast:We===n.length-1},fe.key))})})});$g.displayName="Tree";var Ug=cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),pT=({text:e,query:t})=>{if(!t)return jsx(Fragment,{children:e});let r=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),n=e.split(r);return jsx(Fragment,{children:n.map((o,a)=>r.test(o)?jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:o},a):jsx("span",{children:o},a))})},fT=(e,t)=>{let[r,n]=j.useState(e);return j.useEffect(()=>{let o=setTimeout(()=>{n(e);},t);return ()=>{clearTimeout(o);}},[e,t]),r},Wg=j.forwardRef(({className:e,size:t,value:r,defaultValue:n="",onChange:o,onSelect:a,options:s=[],loadOptions:i,debounceMs:l=300,minChars:c=0,placeholder:d="Type to search...",emptyText:m="No results found.",loadingText:f="Loading...",clearable:p=false,allowCustomValue:g=true,maxHeight:h=200,highlightMatch:b=true,fullWidth:v=false,disabled:w,...x},R)=>{let[C,y]=j.useState(false),[k,T]=j.useState(n),[N,M]=j.useState([]),[P,E]=j.useState(false),[D,H]=j.useState(false),[L,S]=j.useState(0),V=j.useRef(null),A=j.useRef(null),B=r!==void 0?r:k,I=fT(B,l);j.useEffect(()=>{let U=A.current;if(!U)return;let Ie=()=>{S(U.offsetWidth);};Ie();let Z=new ResizeObserver(Ie);return Z.observe(U),()=>{Z.disconnect();}},[]),j.useImperativeHandle(R,()=>V.current);let F=i?N:s,K=j.useMemo(()=>i?F:F.filter(U=>U.label.toLowerCase().includes(B.toLowerCase())),[F,B,i]);j.useEffect(()=>{if(!i)return;if(I.length<c){M([]);return}let U=false;return (async()=>{E(true);try{let Z=await i(I);U||M(Z);}catch{U||M([]);}finally{U||E(false);}})(),()=>{U=true;}},[I,i,c]);let Y=U=>{r===void 0&&T(U),o?.(U);},te=U=>{let Ie=U.target.value;Y(Ie),Ie.length>=c&&y(true);},$=U=>{Y(U.label),a?.(U),y(false);},O=()=>{Y(""),V.current?.focus();},W=()=>{H(true),y(true);},z=()=>{H(false);},_=U=>{U.key==="Escape"&&y(false),U.key==="ArrowDown"&&!C&&K.length>0&&y(true);},Q=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ue=p&&B?"pr-8":"pr-3";return jsxs(je,{open:C,onOpenChange:y,children:[jsxs(Ur,{ref:A,className:u("relative",v?"w-full":"w-fit"),children:[jsx("input",{ref:V,type:"text",value:B,onChange:te,onFocus:W,onBlur:z,onKeyDown:_,disabled:w,placeholder:d,className:u(Ug({size:t,fullWidth:v}),ue,e),style:{borderColor:D?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":C,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...x}),p&&B&&!w&&jsx("button",{type:"button",onClick:O,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X,{className:Q})})]}),jsx(_e,{className:"p-0",align:"start",style:{width:L>0?L:void 0},onOpenAutoFocus:U=>U.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(Se,{style:{maxHeight:h},children:jsx(Command.List,{id:"autocomplete-list",className:"p-1",children:P?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:u(Q,"animate-spin")}),f]}):K.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):K.map(U=>jsxs(Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>$(U),className:u("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsx(Check,{className:u("mr-2 h-4 w-4 shrink-0",B===U.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:b?jsx(pT,{text:U.label,query:B}):U.label})]},U.value))})})})})]})});Wg.displayName="Autocomplete";var dl=j.createContext(null),ul=j.createContext(null),ml=()=>{let e=j.useContext(dl);if(!e)throw new Error("useFormContext must be used within a Form");return e},fs=()=>{let e=j.useContext(ul);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},gT={required:(e="This field is required")=>({validate:t=>typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:t!=null,message:e}),minLength:(e,t)=>({validate:r=>typeof r=="string"&&r.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:r=>typeof r=="string"&&r.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:r=>typeof r=="number"&&r>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:r=>typeof r=="number"&&r<=e,message:t??`Must be at most ${e}`}),email:(e="Invalid email address")=>({validate:t=>typeof t=="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),message:e}),pattern:(e,t="Invalid format")=>({validate:r=>typeof r=="string"&&e.test(r),message:t}),custom:(e,t)=>({validate:e,message:t})},jg=j.forwardRef(({defaultValues:e={},onSubmit:t,onError:r,validateOnBlur:n=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=j.useState(e),[m,f]=j.useState({}),[p,g]=j.useState({}),[h,b]=j.useState({}),[v,w]=j.useState(false),x=j.useRef(new Map),R=j.useCallback((L,S)=>{x.current.set(L,S);},[]),C=j.useCallback(L=>{x.current.delete(L);},[]),y=j.useCallback(L=>{let S=x.current.get(L)||[],V=c[L];for(let A of S)if(!A.validate(V))return f(B=>({...B,[L]:A.message})),false;return f(A=>({...A,[L]:null})),true},[c]),k=j.useCallback(()=>{let L=true,S={};return x.current.forEach((V,A)=>{let B=c[A];for(let I of V)if(!I.validate(B)){S[A]=I.message,L=false;break}S[A]||(S[A]=null);}),f(S),L},[c]),T=j.useCallback((L,S)=>{d(V=>({...V,[L]:S})),b(V=>({...V,[L]:true})),o&&setTimeout(()=>{y(L);},0);},[o,y]),N=j.useCallback((L,S)=>{f(V=>({...V,[L]:S}));},[]),M=j.useCallback((L,S)=>{g(V=>({...V,[L]:S})),S&&n&&y(L);},[n,y]),P=j.useCallback(L=>({value:c[L],error:m[L]??null,touched:p[L]??false,dirty:h[L]??false}),[c,m,p,h]),E=j.useCallback(()=>{d(e),f({}),g({}),b({});},[e]),D=async L=>{L.preventDefault();let S={};if(x.current.forEach((A,B)=>{S[B]=true;}),g(S),!k()){r?.(m);return}if(t){w(true);try{await t(c);}finally{w(false);}}},H={values:c,errors:m,touched:p,dirty:h,isSubmitting:v,setValue:T,setError:N,setTouched:M,validateField:y,validateAll:k,registerField:R,unregisterField:C,getFieldState:P,reset:E};return jsx(dl.Provider,{value:H,children:jsx("form",{ref:l,onSubmit:D,className:u("space-y-4",s),...i,children:a})})});jg.displayName="Form";var _g=({name:e,rules:t=[],defaultValue:r,children:n})=>{let o=ml(),a=j.useId();j.useEffect(()=>(o.registerField(e,t),r!==void 0&&o.values[e]===void 0&&o.setValue(e,r),()=>{o.unregisterField(e);}),[e,t,r,o]);let s=o.getFieldState(e),i={name:e,id:`${a}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsx(ul.Provider,{value:i,children:n})};_g.displayName="FormField";var Xg=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("space-y-1.5",e),...t}));Xg.displayName="FormItem";var Yg=j.forwardRef(({className:e,required:t,children:r,...n},o)=>{let{id:a,error:s,touched:i}=fs();return jsxs(xn,{ref:o,htmlFor:a,className:u(s&&i&&"text-danger",e),...n,children:[r,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});Yg.displayName="FormLabel";var qg=({children:e})=>{let{name:t,id:r,error:n,touched:o}=fs(),a=ml(),s=a.getFieldState(t),i=c=>{let d=c.target,m=d.type==="checkbox"?d.checked:d.value;a.setValue(t,m);},l=()=>{a.setTouched(t,true);};return j.cloneElement(e,{id:r,name:t,value:s.value??"",onChange:i,onBlur:l,"aria-invalid":n&&o?"true":void 0,"aria-describedby":n&&o?`${r}-error`:void 0})};qg.displayName="FormControl";var Zg=j.forwardRef(({className:e,...t},r)=>jsx("p",{ref:r,className:u("text-xs text-muted-foreground",e),...t}));Zg.displayName="FormDescription";var Qg=j.forwardRef(({className:e,message:t,...r},n)=>{let{id:o,error:a,touched:s}=fs(),i=t??(s?a:null);return i?jsx("p",{ref:n,id:`${o}-error`,className:u("text-xs text-danger",e),role:"alert",...r,children:i}):null});Qg.displayName="FormMessage";var eb=cva("inline-flex items-center gap-3",{variants:{size:{sm:"[&_[data-user-avatar]]:h-8 [&_[data-user-avatar]]:w-8",md:"[&_[data-user-avatar]]:h-10 [&_[data-user-avatar]]:w-10",lg:"[&_[data-user-avatar]]:h-12 [&_[data-user-avatar]]:w-12"}},defaultVariants:{size:"md"}}),tb=j.forwardRef(({className:e,size:t,name:r,description:n,avatarUrl:o,avatarFallback:a,trailing:s,...i},l)=>{let c=a||r.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2);return jsxs("div",{ref:l,className:u(eb({size:t,className:e})),...i,children:[jsxs(yn,{"data-user-avatar":true,children:[o&&jsx(qn,{src:o,alt:r}),jsx(Rn,{children:c})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:r}),n&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:n})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});tb.displayName="User";var nb=cva("font-mono",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-transparent",light:"bg-muted/50 text-foreground",flat:"bg-muted text-foreground",ghost:"bg-transparent text-foreground"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"flat",size:"md",radius:"sm"}}),ob=j.forwardRef(({className:e,variant:t,size:r,radius:n,...o},a)=>jsx("code",{ref:a,className:u(nb({variant:t,size:r,radius:n,className:e})),...o}));ob.displayName="Code";function lb(e){let[t,r]=useState(false);return useEffect(()=>{if(e){r(e==="dark");return}let n=()=>{r(document.documentElement.classList.contains("dark"));};n();let o=new MutationObserver(n);return o.observe(document.documentElement,{attributes:true,attributeFilter:["class"]}),()=>o.disconnect()},[e]),t}var cb=j.forwardRef(({code:e,language:t="bash",showLineNumbers:r=false,className:n,noBorder:o=false,filename:a,theme:s,hideCopyButton:i=false},l)=>{let[c,d]=useState(false),f=lb(s)?themes.oneDark:themes.oneLight,p=async()=>{await navigator.clipboard.writeText(e),d(true),setTimeout(()=>d(false),2e3);};return jsxs("div",{ref:l,className:u("overflow-hidden",!o&&"rounded-lg border border-border",n),children:[a&&jsx("div",{className:"flex items-center px-4 py-2 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:jsx("span",{className:"text-sm text-muted-foreground font-mono",children:a})}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:f,code:e.trim(),language:t,children:({tokens:g,getLineProps:h,getTokenProps:b})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:g.map((v,w)=>jsxs("div",{...h({line:v}),children:[r&&jsx("span",{className:"inline-block w-8 text-zinc-400 dark:text-zinc-600 select-none text-right mr-4",children:w+1}),v.map((x,R)=>jsx("span",{...b({token:x})},R))]},w))})}),!i&&jsx("button",{onClick:p,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:c?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});cb.displayName="CodeBlock";var db=j.forwardRef(({tabs:e,className:t,theme:r},n)=>{let[o,a]=useState(0),[s,i]=useState(false),c=lb(r)?themes.oneDark:themes.oneLight,d=async()=>{await navigator.clipboard.writeText(e[o].code),i(true),setTimeout(()=>i(false),2e3);},m=e[o],f=m.language||"bash";return jsxs("div",{ref:n,className:u("rounded-lg border border-border overflow-hidden",t),children:[jsx("div",{className:"flex items-center gap-1 px-2 py-1.5 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:e.map((p,g)=>jsxs("button",{type:"button",onClick:()=>a(g),className:u("flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-colors cursor-pointer",o===g?"bg-zinc-200 dark:bg-zinc-800 text-zinc-900 dark:text-white":"text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-200 hover:bg-zinc-200/50 dark:hover:bg-zinc-800/50"),children:[p.icon,p.name]},p.name))}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:c,code:m.code.trim(),language:f,children:({tokens:p,getLineProps:g,getTokenProps:h})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:p.map((b,v)=>jsx("div",{...g({line:b}),children:b.map((w,x)=>jsx("span",{...h({token:w})},x))},v))})}),jsx("button",{onClick:d,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:s?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});db.displayName="TabbedCodeBlock";var ub=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-transparent border-current",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),mb=j.forwardRef(({className:e,variant:t,size:r,code:n,copyable:o=true,copyLabel:a="Copy",onCopy:s,symbol:i="$",hideSymbol:l=false,...c},d)=>{let[m,f]=j.useState(false),p=async()=>{try{await navigator.clipboard.writeText(n),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(g){console.error("Failed to copy:",g);}};return jsxs("div",{ref:d,className:u(ub({variant:t,size:r,className:e})),...c,children:[!l&&jsx("span",{className:"text-muted-foreground select-none",children:i}),jsx("code",{className:"flex-1 truncate",children:n}),o&&jsx("button",{type:"button",onClick:p,className:u("flex-shrink-0 rounded p-1 transition-colors","hover:bg-black/10 dark:hover:bg-white/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":m?"Copied":a,children:m?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});mb.displayName="Snippet";var bl=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),pb=j.forwardRef(({className:e,radius:t,src:r,alt:n,fallback:o,showSkeleton:a=true,onLoad:s,onError:i,fit:l="cover",aspectRatio:c,style:d,...m},f)=>{let[p,g]=j.useState("loading");j.useEffect(()=>{r&&g("loading");},[r]);let h=()=>{g("loaded"),s?.();},b=()=>{g("error"),i?.();},v={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[l];return p==="error"&&o?jsx("div",{className:u(bl({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxs("div",{className:u(bl({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsx(Da,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:f,src:r,alt:n,onLoad:h,onError:b,className:u("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...m})]})});pb.displayName="Image";var bb=cva("flex flex-col rounded-lg border bg-background",{variants:{size:{sm:"p-1 gap-0.5",md:"p-1.5 gap-1",lg:"p-2 gap-1.5"}},defaultVariants:{size:"md"}}),vb=cva("relative flex cursor-pointer select-none items-center rounded-md outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{size:"md"}}),hb=j.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),xb=j.forwardRef(({className:e,size:t="md",value:r,defaultValue:n="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=j.useState(n),m=r??c,f=p=>{let g;if(a){let h=Array.isArray(m)?m:[m].filter(Boolean);h.includes(p)?g=h.filter(b=>b!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsx(hb.Provider,{value:{value:m,onValueChange:f,multiple:a,size:t??"md"},children:jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:u(bb({size:t,className:e})),...i,children:s})})});xb.displayName="Listbox";var yb=j.forwardRef(({className:e,value:t,disabled:r,icon:n,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:m}=j.useContext(hb),f=d?Array.isArray(l)&&l.includes(t):l===t,p=()=>{r||c(t);},g=h=>{(h.key==="Enter"||h.key===" ")&&!r&&(h.preventDefault(),c(t));};return jsxs("div",{ref:i,role:"option","aria-selected":f,"data-disabled":r?"":void 0,tabIndex:r?-1:0,className:u(vb({size:m}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:g,...s,children:[n&&jsx("span",{className:"mr-2 flex-shrink-0",children:n}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:a}),o&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),f&&jsx(Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});yb.displayName="ListboxItem";var wb=cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Cb=cva("flex items-center gap-3 bg-background transition-all",{variants:{variant:{default:"rounded-lg border p-3",bordered:"p-3",cards:"rounded-lg border p-3 shadow-sm"},size:{sm:"p-2 text-sm",md:"p-3 text-sm",lg:"p-4 text-base"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg z-10",false:""},isDragOver:{true:"border-primary border-dashed",false:""}},defaultVariants:{variant:"default",size:"md",isDragging:false,isDragOver:false}});function ET({className:e,variant:t,size:r,items:n,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,m]=j.useState(null),[f,p]=j.useState(null),g=(x,R)=>{i||(m(R),x.dataTransfer.effectAllowed="move",x.dataTransfer.setData("text/plain",String(R)));},h=(x,R)=>{x.preventDefault(),!(i||d===null||d===R)&&p(R);},b=()=>{p(null);},v=(x,R)=>{if(x.preventDefault(),i||d===null||d===R){m(null),p(null);return}let C=[...n],[y]=C.splice(d,1);C.splice(R,0,y),o?.(C),m(null),p(null);},w=()=>{m(null),p(null);};return jsx("div",{ref:c,className:u(wb({variant:t,size:r,className:e})),...l,children:n.map((x,R)=>jsxs("div",{draggable:!i,onDragStart:C=>g(C,R),onDragOver:C=>h(C,R),onDragLeave:b,onDrop:C=>v(C,R),onDragEnd:w,className:u(Cb({variant:t,size:r,isDragging:d===R,isDragOver:f===R}),!i&&"cursor-move"),children:[s&&jsx("div",{className:u("flex-shrink-0 text-muted-foreground",i?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsx(GripVertical,{className:"h-5 w-5"})}),jsx("div",{className:"flex-1 min-w-0",children:a(x,R)})]},x.id))})}var LT=j.forwardRef(ET);var Nb=cva("absolute inset-0 z-50 flex items-center justify-center transition-opacity",{variants:{variant:{solid:"bg-background",soft:"bg-background/80 backdrop-blur-sm",ghost:"bg-background/50"},visible:{true:"opacity-100 pointer-events-auto",false:"opacity-0 pointer-events-none"}},defaultVariants:{variant:"soft",visible:true}}),IT={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},kb=j.forwardRef(({className:e,variant:t,loading:r=true,size:n="md",spinner:o,text:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u("relative",e),...i,children:[s,jsx("div",{className:u(Nb({variant:t,visible:r})),"aria-hidden":!r,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsx(Loader2,{className:u(IT[n],"animate-spin text-primary")}),a&&jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));kb.displayName="LoadingOverlay";var Pb=cva("fixed top-0 left-0 z-[9999] h-0.5 transition-all duration-200 ease-out",{variants:{color:{primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"}},defaultVariants:{color:"primary"}}),Eb=j.forwardRef(({className:e,color:t,isLoading:r=false,progress:n,showSpinner:o=false,...a},s)=>{let[i,l]=j.useState(0),[c,d]=j.useState(false),m=j.useRef(null);return j.useEffect(()=>{if(n!==void 0){l(n),d(n>0&&n<100);return}return r?(d(true),l(10),m.current=setInterval(()=>{l(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):i>0&&(l(100),setTimeout(()=>{d(false),l(0);},200)),()=>{m.current&&clearInterval(m.current);}},[r,n]),!c&&n===void 0||n!==void 0&&(n<=0||n>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:u(Pb({color:t,className:e})),style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...a,children:jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),o&&c&&jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsx("div",{className:u("h-4 w-4 animate-spin rounded-full border-2 border-transparent",t==="primary"&&"border-t-primary",t==="secondary"&&"border-t-secondary",t==="success"&&"border-t-success",t==="warning"&&"border-t-warning",t==="danger"&&"border-t-danger",t==="info"&&"border-t-info")})})]})});Eb.displayName="NProgress";var Hb=cva("flex items-center justify-center",{variants:{variant:{spinner:"",dots:"",pulse:"",skeleton:""},size:{sm:"gap-1",md:"gap-2",lg:"gap-3"},fullScreen:{true:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",false:""}},defaultVariants:{variant:"spinner",size:"md",fullScreen:false}}),Lb={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},FT={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Ib=j.forwardRef(({className:e,variant:t="spinner",size:r="md",fullScreen:n,text:o,color:a="primary",...s},i)=>{let l={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[a],c=()=>{switch(t){case "dots":return jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(d=>jsx("div",{className:u(FT[r||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsx("div",{className:u(Lb[r||"md"],"animate-pulse rounded-full bg-current",l)});case "skeleton":return jsxs("div",{className:"w-full space-y-2",children:[jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted"})]});default:return jsx(Loader2,{className:u(Lb[r||"md"],"animate-spin",l)})}};return jsx("div",{ref:i,className:u(Hb({variant:t,size:r,fullScreen:n,className:e})),role:"status","aria-label":o||"Loading",...s,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[c(),o&&jsx("span",{className:u("text-sm",l),children:o})]})})});Ib.displayName="Loading";var xl=class extends j.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,r){this.props.onError?.(t,r);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((n,o)=>n!==t.resetKeys?.[o])&&this.reset();}reset=()=>{this.props.onReset?.(),this.setState({hasError:false,error:null});};render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsx(yl,{error:this.state.error,onReset:this.reset}):this.props.children}},yl=j.forwardRef(({error:e,onReset:t,className:r},n)=>jsxs("div",{ref:n,className:u("flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-lg border border-danger/20 bg-danger/5 p-6 text-center",r),role:"alert",children:[jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-danger/10",children:jsx(AlertTriangle,{className:"h-6 w-6 text-danger"})}),jsxs("div",{className:"space-y-2",children:[jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Something went wrong"}),e&&jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:e.message||"An unexpected error occurred"})]}),t&&jsxs("button",{onClick:t,className:"inline-flex items-center gap-2 rounded-md bg-danger px-4 py-2 text-sm font-medium text-danger-foreground hover:bg-danger/90 transition-colors",children:[jsx(RefreshCw,{className:"h-4 w-4"}),"Try again"]})]}));yl.displayName="DefaultErrorFallback";var GT=xl;var Ab=j.forwardRef(({value:e,defaultValue:t,onValueChange:r,placeholder:n="Pick a date range",dateFormat:o="LLL dd, y",disabled:a=false,minDate:s,maxDate:i,numberOfMonths:l=2,className:c,align:d="start"},m)=>{let[f,p]=j.useState(false),[g,h]=j.useState(t),b=e!==void 0,v=b?e:g,w=R=>{b||h(R),r?.(R);},x=R=>{if(!R)return n;let{from:C,to:y}=R;return C&&y?`${format(C,o)} - ${format(y,o)}`:C?format(C,o):n};return jsxs(je,{open:f,onOpenChange:p,children:[jsxs(Et,{ref:m,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!v?.from&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",c),children:[jsx(Calendar,{className:"h-4 w-4"}),x(v)]}),jsx(_e,{className:"w-auto p-0",align:d,children:jsx(_r,{mode:"range",defaultMonth:v?.from,selected:v,onSelect:w,numberOfMonths:l,disabled:R=>!!(s&&R<s||i&&R>i),initialFocus:true})})]})});Ab.displayName="DateRangePicker";var lo=e=>String(e).padStart(2,"0"),zb=j.forwardRef(({value:e,onValueChange:t,placeholder:r="Pick a time",use24Hour:n=true,minuteStep:o=1,disabled:a=false,className:s},i)=>{let[l,c]=j.useState(false),d=n?Array.from({length:24},(x,R)=>R):Array.from({length:12},(x,R)=>R+1),m=Array.from({length:Math.floor(60/o)},(x,R)=>R*o),f=x=>{if(!x)return r;if(n)return `${lo(x.hours)}:${lo(x.minutes)}`;let R=x.hours%12||12,C=x.hours>=12?"PM":"AM";return `${lo(R)}:${lo(x.minutes)} ${C}`},p=x=>{let R=e?.minutes??0,C=x;if(!n&&e){let y=e.hours>=12;y&&x!==12?C=x+12:!y&&x===12&&(C=0);}t?.({hours:C,minutes:R});},g=x=>{let R=e?.hours??0;t?.({hours:R,minutes:x});},h=x=>{if(!e)return;let R=e.hours;x==="AM"&&e.hours>=12?R=e.hours-12:x==="PM"&&e.hours<12&&(R=e.hours+12),t?.({hours:R,minutes:e.minutes});},b=()=>{let x=new Date;t?.({hours:x.getHours(),minutes:x.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,w=e?n?e.hours:e.hours%12||12:void 0;return jsxs(je,{open:l,onOpenChange:c,children:[jsxs(Et,{ref:i,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!e&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",s),children:[jsx(Clock,{className:"h-4 w-4"}),f(e)]}),jsxs(_e,{className:"w-auto p-0",align:"start",children:[jsxs("div",{className:"flex",children:[jsxs("div",{className:"flex flex-col",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Hour"}),jsx(Se,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:d.map(x=>jsx(ae,{variant:w===x?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(x),children:lo(x)},x))})})]}),jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Min"}),jsx(Se,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:m.map(x=>jsx(ae,{variant:e?.minutes===x?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(x),children:lo(x)},x))})})]}),!n&&jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"\xA0"}),jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsx(ae,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsx(ae,{variant:v==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("PM"),children:"PM"})]})]})]}),jsxs("div",{className:"flex justify-between border-t p-2",children:[jsx(ae,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsx(ae,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});zb.displayName="TimePicker";var Ob=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function _T({className:e,variant:t,items:r,itemHeight:n,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},m){let f=j.useRef(null),[p,g]=j.useState(0);j.useImperativeHandle(m,()=>f.current);let h=r.length*(n+l)-l,b=n+l,v=Math.max(0,Math.floor(p/b)-a),w=Math.ceil(o/b)+2*a,x=Math.min(r.length-1,v+w),R=y=>{let k=y.currentTarget.scrollTop;g(k),c?.(k);},C=j.useMemo(()=>{let y=[];for(let k=v;k<=x;k++)r[k]!==void 0&&y.push({item:r[k],index:k,style:{position:"absolute",top:k*b,left:0,right:0,height:n}});return y},[r,v,x,b,n]);return jsx("div",{ref:f,className:u(Ob({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:R,...d,children:jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:y,index:k,style:T})=>jsx("div",{style:T,children:s(y,k)},i?i(y,k):k))})})}var XT=j.forwardRef(_T);var Fb=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Tl=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Kb=j.forwardRef(({className:e,variant:t,size:r,children:n,onLoadMore:o,hasMore:a,isLoading:s=false,loader:i,threshold:l=100,rootMargin:c,useWindow:d=false,endMessage:m,...f},p)=>{let g=j.useRef(null),h=j.useRef(null),b=j.useRef(false);j.useImperativeHandle(p,()=>g.current),j.useEffect(()=>{let w=h.current;if(!w)return;let x=new IntersectionObserver(R=>{let[C]=R;C.isIntersecting&&a&&!s&&!b.current&&(b.current=true,Promise.resolve(o()).finally(()=>{b.current=false;}));},{root:d?null:g.current,rootMargin:c||`${l}px`,threshold:0});return x.observe(w),()=>{x.disconnect();}},[a,s,o,l,c,d]);let v=jsx("div",{className:u(Tl({size:r})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxs("div",{ref:g,className:u(Fb({variant:t,className:e})),...f,children:[n,jsx("div",{ref:h,className:"h-px w-full"}),s&&(i||v),!a&&!s&&m&&jsx("div",{className:u(Tl({size:r}),"text-muted-foreground text-sm"),children:m})]})});Kb.displayName="InfiniteScroll";var sM=e=>e.map(t=>typeof t=="string"?{src:t}:t),Ml=j.forwardRef(({images:e,open:t,onOpenChange:r,initialIndex:n=0,onIndexChange:o,trigger:a,showThumbnails:s=true,showZoom:i=true,showRotate:l=true,showDownload:c=true,showFullscreen:d=true,showNavigation:m=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let b=j.useMemo(()=>sM(e),[e]),[v,w]=j.useState(n),[x,R]=j.useState(1),[C,y]=j.useState(0),[k,T]=j.useState(false),[N,M]=j.useState(false),[P,E]=j.useState({x:0,y:0}),[D,H]=j.useState({x:0,y:0}),[L,S]=j.useState(false),V=j.useRef(null),A=b[v];j.useEffect(()=>{S(true);},[]),j.useEffect(()=>{w(n);},[n]),j.useEffect(()=>{o?.(v);},[v,o]),j.useEffect(()=>{R(1),y(0),E({x:0,y:0});},[v]),j.useEffect(()=>{if(t)return Ft(),()=>Kt()},[t]);let B=j.useCallback(()=>{w(Z=>Z>0?Z-1:b.length-1);},[b.length]),I=j.useCallback(()=>{w(Z=>Z<b.length-1?Z+1:0);},[b.length]),F=()=>{R(Z=>Math.min(Z+.5,4));},K=()=>{R(Z=>{let ye=Math.max(Z-.5,.5);return ye===1&&E({x:0,y:0}),ye});},Y=()=>{y(Z=>(Z+90)%360);},te=async()=>{if(A)try{let ye=await(await fetch(A.src)).blob(),Vr=URL.createObjectURL(ye),mt=document.createElement("a");mt.href=Vr,mt.download=A.alt||`image-${v+1}`,document.body.appendChild(mt),mt.click(),document.body.removeChild(mt),URL.revokeObjectURL(Vr);}catch{window.open(A.src,"_blank");}},$=async()=>{if(V.current)if(k)try{await document.exitFullscreen(),T(!1);}catch{}else try{await V.current.requestFullscreen(),T(!0);}catch{}},O=Z=>{x>1&&(M(true),H({x:Z.clientX-P.x,y:Z.clientY-P.y}));},W=Z=>{N&&x>1&&E({x:Z.clientX-D.x,y:Z.clientY-D.y});},z=()=>{M(false);},_=()=>{r?.(false);},Q=Z=>{p&&Z.target===Z.currentTarget&&_();},ue=j.useCallback(Z=>{switch(Z.key){case "ArrowLeft":B();break;case "ArrowRight":I();break;case "Escape":r?.(false);break;case "+":case "=":F();break;case "-":K();break}},[B,I,r]);if(j.useEffect(()=>{if(t)return window.addEventListener("keydown",ue),()=>window.removeEventListener("keydown",ue)},[t,ue]),j.useEffect(()=>{let Z=()=>{T(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",Z),()=>document.removeEventListener("fullscreenchange",Z)},[]),b.length===0)return null;let U=a?j.isValidElement(a)?j.cloneElement(a,{onClick:Z=>{a.props.onClick?.(Z),r?.(true);}}):jsx("button",{type:"button",onClick:()=>r?.(true),children:a}):null;return jsxs(Fragment,{children:[U,!L||!t?null:za.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/90 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":t?"open":"closed",onClick:Q}),jsxs("div",{ref:h,className:u("fixed inset-0 z-50 flex flex-col outline-none",g),children:[jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxs("div",{className:"flex items-center gap-2",children:[f&&b.length>1&&jsxs("span",{className:"text-sm",children:[v+1," / ",b.length]}),A?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:A.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[i&&jsxs(Fragment,{children:[jsx("button",{onClick:K,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom out",children:jsx(ZoomOut,{className:"h-5 w-5"})}),jsxs("span",{className:"min-w-[3rem] text-center text-sm",children:[Math.round(x*100),"%"]}),jsx("button",{onClick:F,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsx(ZoomIn,{className:"h-5 w-5"})})]}),l&&jsx("button",{onClick:Y,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsx(RotateCw,{className:"h-5 w-5"})}),c&&jsx("button",{onClick:te,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsx(Download,{className:"h-5 w-5"})}),d&&jsx("button",{onClick:$,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:k?"Exit fullscreen":"Fullscreen",children:k?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs("button",{onClick:_,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxs("div",{ref:V,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:O,onMouseMove:W,onMouseUp:z,onMouseLeave:z,children:[m&&b.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:B,className:"absolute left-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronLeft,{className:"h-6 w-6"})}),jsx("button",{onClick:I,className:"absolute right-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronRight,{className:"h-6 w-6"})})]}),jsx("img",{src:A?.src,alt:A?.alt||"",className:u("max-h-full max-w-full object-contain transition-transform duration-200",N?"cursor-grabbing":x>1?"cursor-grab":""),style:{transform:`translate(${P.x}px, ${P.y}px) scale(${x}) rotate(${C}deg)`},draggable:false})]}),A?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:A.description}),s&&b.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:b.map((Z,ye)=>jsx("button",{onClick:()=>w(ye),className:u("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===ye?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:Z.src,alt:Z.alt||`Thumbnail ${ye+1}`,className:"h-full w-full object-cover"})},ye))})]})]}),document.body)]})});Ml.displayName="ImageViewer";var Gb=({children:e,images:t,index:r=0,className:n})=>{let[o,a]=j.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>a(true),className:u("cursor-zoom-in",n),children:e}),jsx(Ml,{images:t,open:o,onOpenChange:a,initialIndex:r})]})};Gb.displayName="ImageViewerTrigger";var Ub=cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),Wb=j.forwardRef(({className:e,color:t,size:r,position:n,ping:o,content:a,show:s=true,offset:i,style:l,...c},d)=>{if(!s)return null;let m=a!=null;return jsxs("span",{ref:d,className:u(Ub({color:t,size:m?void 0:r,position:n,ping:o}),m&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...l,...i!==void 0&&{transform:`translate(${n?.includes("right")?i:-i}px, ${n?.includes("top")?-i:i}px)`}},...c,children:[o&&jsx("span",{className:u("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),a]})});Wb.displayName="Indicator";var jb=j.forwardRef(({className:e,children:t,...r},n)=>jsx("div",{ref:n,className:u("relative inline-flex",e),...r,children:t}));jb.displayName="IndicatorWrapper";var Xb=cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),Yb=j.forwardRef(({className:e,orientation:t,size:r,hideScrollbar:n=false,shadowColor:o="rgba(0, 0, 0, 0.1)",children:a,...s},i)=>{let l=j.useRef(null),[c,d]=j.useState({top:false,bottom:false,left:false,right:false});j.useImperativeHandle(i,()=>l.current);let m=j.useCallback(()=>{let v=l.current;if(!v)return;let{scrollTop:w,scrollLeft:x,scrollHeight:R,scrollWidth:C,clientHeight:y,clientWidth:k}=v;d({top:w>0,bottom:w<R-y-1,left:x>0,right:x<C-k-1});},[]);j.useEffect(()=>{let v=l.current;if(v)return m(),v.addEventListener("scroll",m),window.addEventListener("resize",m),()=>{v.removeEventListener("scroll",m),window.removeEventListener("resize",m);}},[m]);let p={sm:"20px",md:"40px",lg:"60px"}[r??"md"],g=t==="vertical"||t==="both",h=t==="horizontal"||t==="both",b={maskImage:[g&&c.top&&`linear-gradient(to bottom, transparent, black ${p})`,g&&c.bottom&&`linear-gradient(to top, transparent, black ${p})`,h&&c.left&&`linear-gradient(to right, transparent, black ${p})`,h&&c.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsx("div",{ref:l,className:u(Xb({orientation:t,size:r}),n&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:b,...s,children:a})});Yb.displayName="ScrollShadow";var qb=cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",bordered:"rounded border border-current text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),mM={cmd:"\u2318",command:"\u2318",meta:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",return:"\u21B5",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",space:"\u2423",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2912",end:"\u2913",capslock:"\u21EA"},pM={cmd:"meta",command:"meta",ctrl:"control",alt:"alt",option:"alt",shift:"shift",enter:"enter",return:"enter",backspace:"backspace",delete:"delete",escape:"escape",esc:"escape",tab:"tab",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",pageup:"pageup",pagedown:"pagedown",home:"home",end:"end"},fM=e=>{let t=e.toLowerCase();return mM[t]||e.toUpperCase()},ta=e=>{let t=e.toLowerCase();return pM[t]||t},Cs=e=>{let t=ta(e);return ["meta","control","alt","shift"].includes(t)},Zb=j.forwardRef(({className:e,variant:t,size:r,keys:n,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{j.useEffect(()=>{if(!a||!n||s)return;let m=Array.isArray(n)?n:[n],f=m.filter(Cs).map(ta),p=m.filter(h=>!Cs(h)).map(ta),g=h=>{let b=f.includes("meta")===h.metaKey,v=f.includes("control")===h.ctrlKey,w=f.includes("alt")===h.altKey,x=f.includes("shift")===h.shiftKey,R=p.length===0||p.includes(h.key.toLowerCase());b&&v&&w&&x&&R&&(i&&h.preventDefault(),a(h));};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[n,a,s,i]);let d=()=>n?(Array.isArray(n)?n:[n]).map((f,p)=>jsxs(j.Fragment,{children:[p>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:fM(f)})]},p)):o;return jsx("kbd",{ref:c,className:u(qb({variant:t,size:r}),s&&"opacity-50",e),...l,children:d()})});Zb.displayName="Kbd";function gM(e,t,r={}){let{disabled:n=false,preventDefault:o=true}=r;j.useEffect(()=>{if(n)return;let a=Array.isArray(e)?e:[e],s=a.filter(Cs).map(ta),i=a.filter(c=>!Cs(c)).map(ta),l=c=>{let d=s.includes("meta")===c.metaKey,m=s.includes("control")===c.ctrlKey,f=s.includes("alt")===c.altKey,p=s.includes("shift")===c.shiftKey,g=i.length===0||i.includes(c.key.toLowerCase());d&&m&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,n,o]);}var Qb=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Jb=j.forwardRef(({className:e,size:t,value:r,successDuration:n=2e3,onCopySuccess:o,onCopyError:a,copyIcon:s,successIcon:i,...l},c)=>{let[d,m]=j.useState(false),p={sm:14,md:16,lg:20}[t??"md"],g=async()=>{try{await navigator.clipboard.writeText(r),m(!0),o?.(),setTimeout(()=>{m(!1);},n);}catch(h){a?.(h);}};return jsx("button",{ref:c,type:"button",className:u(Qb({size:t}),e),onClick:g,"aria-label":d?"Copied":"Copy to clipboard",...l,children:d?i??jsx(Check,{className:"text-success",style:{width:p,height:p}}):s??jsx(Copy,{style:{width:p,height:p}})})});Jb.displayName="CopyButton";var tv=cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),CM=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],TM=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function MM(e,t,r){let n=new Date(e,t,1),o=new Date(e,t+1,0),a=[],s=n.getDay()-r;s<0&&(s+=7);for(let l=s-1;l>=0;l--)a.push(new Date(e,t,-l));for(let l=1;l<=o.getDate();l++)a.push(new Date(e,t,l));let i=42-a.length;for(let l=1;l<=i;l++)a.push(new Date(e,t+1,l));return a}function NM(e,t){let r=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),r.push(i);}return r}function Ns(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Ms(e){return Ns(e,new Date)}function ev(e,t){return e.filter(r=>{let n=new Date(r.start),o=new Date(r.end);return Ns(n,t)||Ns(o,t)||n<t&&o>t})}var rv=j.forwardRef(({className:e,variant:t,size:r,events:n=[],view:o="month",onViewChange:a,date:s,onDateChange:i,onEventClick:l,onSlotClick:c,weekStartsOn:d=0,locale:m="en-US",...f},p)=>{let[g,h]=j.useState(new Date),b=s??g,v=M=>{i?i(M):h(M);},w=d===1?TM:CM,x=()=>{let M=new Date(b);o==="month"?M.setMonth(M.getMonth()-1):o==="week"?M.setDate(M.getDate()-7):M.setDate(M.getDate()-1),v(M);},R=()=>{let M=new Date(b);o==="month"?M.setMonth(M.getMonth()+1):o==="week"?M.setDate(M.getDate()+7):M.setDate(M.getDate()+1),v(M);},C=()=>{v(new Date);},y=()=>o==="day"?b.toLocaleDateString(m,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):b.toLocaleDateString(m,{year:"numeric",month:"long"}),k=()=>{let M=MM(b.getFullYear(),b.getMonth(),d);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(P=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:P},P))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:M.map((P,E)=>{let D=ev(n,P),H=P.getMonth()===b.getMonth();return jsxs("div",{className:u("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!H&&"bg-muted/30"),onClick:()=>c?.(P),children:[jsx("div",{className:u("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",Ms(P)&&"bg-primary text-primary-foreground",!H&&"text-muted-foreground"),children:P.getDate()}),jsxs("div",{className:"space-y-0.5",children:[D.slice(0,3).map(L=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(L);},children:L.title},L.id)),D.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",D.length-3," more"]})]})]},E)})})]})},T=()=>{let M=NM(b,d),P=Array.from({length:24},(E,D)=>D);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsx("div",{className:"p-2"}),M.map((E,D)=>jsxs("div",{className:u("p-2 text-center border-l",Ms(E)&&"bg-primary/10"),children:[jsx("div",{className:"text-xs text-muted-foreground",children:w[D]}),jsx("div",{className:u("text-lg font-semibold",Ms(E)&&"text-primary"),children:E.getDate()})]},D))]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:P.map(E=>jsxs(j.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[E.toString().padStart(2,"0"),":00"]}),M.map((D,H)=>{let L=new Date(D);L.setHours(E,0,0,0);let S=n.filter(V=>{let A=new Date(V.start);return Ns(A,D)&&A.getHours()===E});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(L),children:S.map(V=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:V.color||"hsl(var(--primary))",color:"white"},onClick:A=>{A.stopPropagation(),l?.(V);},children:V.title},V.id))},H)})]},E))})})]})},N=()=>{let M=Array.from({length:24},(E,D)=>D),P=ev(n,b);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsx("div",{className:"p-4 border-b text-center",children:jsx("div",{className:u("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",Ms(b)&&"bg-primary text-primary-foreground"),children:b.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:M.map(E=>{let D=new Date(b);D.setHours(E,0,0,0);let H=P.filter(L=>new Date(L.start).getHours()===E);return jsxs(j.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[E.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(D),children:H.map(L=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(L);},children:L.title},L.id))})]},E)})})})]})};return jsxs("div",{ref:p,className:u(tv({variant:t,size:r,className:e})),...f,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",onClick:C,children:"Today"}),jsx(ae,{variant:"ghost",size:"icon",onClick:x,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"ghost",size:"icon",onClick:R,children:jsx(ChevronRight,{className:"h-4 w-4"})}),jsx("h2",{className:"text-lg font-semibold ml-2",children:y()})]}),jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(M=>jsx(ae,{variant:o===M?"solid":"ghost",size:"sm",onClick:()=>a?.(M),children:M.charAt(0).toUpperCase()+M.slice(1)},M))})]}),o==="month"&&k(),o==="week"&&T(),o==="day"&&N()]})});rv.displayName="FullCalendar";var Ls=({active:e,payload:t,label:r})=>!e||!t||!t.length?null:jsxs("div",{className:"border bg-card text-card-foreground shadow-sm rounded-lg p-3 min-w-[120px]",children:[r&&jsx("p",{className:"text-sm font-medium mb-2 text-card-foreground",children:r}),jsx("div",{className:"space-y-1",children:t.map((n,o)=>jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsx("span",{className:"text-sm",style:{color:n.color},children:n.name}),jsx("span",{className:"text-sm font-medium text-card-foreground",children:typeof n.value=="number"?n.value.toLocaleString():n.value})]},o))})]}),na=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),oa=["hsl(var(--primary))","hsl(var(--chart-1, 220 70% 50%))","hsl(var(--chart-2, 160 60% 45%))","hsl(var(--chart-3, 30 80% 55%))","hsl(var(--chart-4, 280 65% 60%))"],nv=j.forwardRef(({className:e,size:t,data:r,dataKeys:n,colors:o=oa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},m)=>jsx("div",{ref:m,className:u(na({size:t,className:e})),...d,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(LineChart,{data:r,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ls,{})}),s&&jsx(Legend,{}),n.map((f,p)=>jsx(Line,{type:c,dataKey:f,stroke:o[p%o.length],strokeWidth:2,dot:{fill:o[p%o.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));nv.displayName="LineChart";var ov=j.forwardRef(({className:e,size:t,data:r,dataKeys:n,colors:o=oa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...m},f)=>jsx("div",{ref:f,className:u(na({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(BarChart,{data:r,layout:d,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d==="horizontal"?l:void 0,type:d==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{dataKey:d==="vertical"?l:void 0,type:d==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ls,{})}),s&&jsx(Legend,{}),n.map((p,g)=>jsx(Bar,{dataKey:p,fill:o[g%o.length],stackId:c?"stack":void 0,radius:[4,4,0,0]},p))]})})}));ov.displayName="BarChart";var av=j.forwardRef(({className:e,size:t,data:r,dataKey:n="value",nameKey:o="name",colors:a=oa,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...m},f)=>jsx("div",{ref:f,className:u(na({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[c&&jsx(Tooltip,{content:jsx(Ls,{})}),l&&jsx(Legend,{}),jsx(Pie,{data:r,dataKey:n,nameKey:o,cx:"50%",cy:"50%",innerRadius:s,outerRadius:i,label:d,labelLine:d,children:r.map((p,g)=>jsx(Cell,{fill:a[g%a.length]},`cell-${g}`))})]})})}));av.displayName="PieChart";var sv=j.forwardRef(({className:e,size:t,data:r,dataKeys:n,colors:o=oa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...m},f)=>jsx("div",{ref:f,className:u(na({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{data:r,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ls,{})}),s&&jsx(Legend,{}),n.map((p,g)=>jsx(Area,{type:d,dataKey:p,stroke:o[g%o.length],fill:o[g%o.length],fillOpacity:.3,stackId:c?"stack":void 0},p))]})})}));sv.displayName="AreaChart";var cv=cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border rounded-lg bg-background",ghost:""}},defaultVariants:{variant:"default"}}),dv=cva("flex flex-col min-w-[280px] w-[280px] rounded-lg",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),Hl=cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function YM({card:e,columnId:t,variant:r,renderCard:n,onCardClick:o}){let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=useSortable({id:e.id,data:{columnId:t}}),m={transform:CSS.Transform.toString(l),transition:c};return jsx("div",{ref:i,style:m,className:u(Hl({variant:r,isDragging:d})),onClick:()=>o?.(e,t),...a,...s,children:n?n(e,t):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function qM({column:e,variant:t,renderCard:r,onCardClick:n,onAddCard:o,showAddCard:a,columnHeight:s}){return jsxs("div",{className:u(dv({variant:t})),children:[jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),a&&jsx(ae,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o?.(e.id),children:jsx(Plus,{className:"h-4 w-4"})})]}),jsx(Se,{style:{height:s},children:jsxs("div",{className:"p-2 space-y-2",children:[jsx(SortableContext,{items:e.cards.map(i=>i.id),strategy:verticalListSortingStrategy,children:e.cards.map(i=>jsx(YM,{card:i,columnId:e.id,variant:t,renderCard:r,onCardClick:n},i.id))}),e.cards.length===0&&jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var uv=j.forwardRef(({className:e,variant:t,columns:r,onCardMove:n,onCardClick:o,onAddCard:a,renderCard:s,showAddCard:i=true,columnHeight:l=500,...c},d)=>{let[m,f]=j.useState(null),[p,g]=j.useState(null),h=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),b=R=>r.find(C=>C.cards.some(y=>y.id===R));return jsxs(DndContext,{sensors:h,collisionDetection:closestCorners,onDragStart:R=>{let{active:C}=R,y=b(C.id);if(y){let k=y.cards.find(T=>T.id===C.id);k&&(f(k),g(y.id));}},onDragOver:R=>{let{active:C,over:y}=R;if(!y)return;let k=C.id,T=y.id,N=b(k),M=b(T)||r.find(D=>D.id===T);if(!N||!M||N.id===M.id)return;let P=M.cards.findIndex(D=>D.id===T),E=P===-1?M.cards.length:P;n?.(k,N.id,M.id,E);},onDragEnd:R=>{let{active:C,over:y}=R;if(y&&C.id!==y.id){let k=b(C.id),T=b(y.id)||r.find(N=>N.id===y.id);if(k&&T){let N=T.cards.findIndex(P=>P.id===y.id),M=N===-1?T.cards.length:N;n?.(C.id,k.id,T.id,M);}}f(null),g(null);},children:[jsx("div",{ref:d,className:u(cv({variant:t,className:e})),...c,children:r.map(R=>jsx(qM,{column:R,variant:t,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,columnHeight:l},R.id))}),jsx(DragOverlay,{children:m&&p&&jsx("div",{className:u(Hl({variant:t,isDragging:true})),children:s?s(m,p):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:m.title}),m.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:m.description})]})]})})})]})});uv.displayName="KanbanBoard";var mv=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),pv=j.createContext(null);function Ds(){let e=j.useContext(pv);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var fv=j.forwardRef(({className:e,variant:t,children:r,opts:n,plugins:o,orientation:a="horizontal",showArrows:s=true,showDots:i=true,setApi:l,...c},d)=>{let[m,f]=ZM({...n,axis:a==="horizontal"?"x":"y"},o),[p,g]=j.useState(false),[h,b]=j.useState(false),[v,w]=j.useState(0),[x,R]=j.useState([]),C=j.useCallback(M=>{M&&(w(M.selectedScrollSnap()),g(M.canScrollPrev()),b(M.canScrollNext()));},[]),y=j.useCallback(()=>{f?.scrollPrev();},[f]),k=j.useCallback(()=>{f?.scrollNext();},[f]),T=j.useCallback(M=>{f?.scrollTo(M);},[f]),N=j.useCallback(M=>{M.key==="ArrowLeft"?(M.preventDefault(),y()):M.key==="ArrowRight"&&(M.preventDefault(),k());},[y,k]);return j.useEffect(()=>{!f||!l||l(f);},[f,l]),j.useEffect(()=>{if(f)return R(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsx(pv.Provider,{value:{carouselRef:m,api:f,scrollPrev:y,scrollNext:k,canScrollPrev:p,canScrollNext:h,selectedIndex:v,scrollSnaps:x,scrollTo:T,orientation:a},children:jsxs("div",{ref:d,className:u(mv({variant:t,className:e})),onKeyDownCapture:N,role:"region","aria-roledescription":"carousel",...c,children:[jsx("div",{ref:m,className:"overflow-hidden",children:jsx("div",{className:u("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:r})}),s&&jsxs(Fragment,{children:[jsx(Il,{}),jsx(Vl,{})]}),i&&x.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:x.map((M,P)=>jsx("button",{className:u("w-2 h-2 rounded-full transition-all",P===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>T(P),"aria-label":`Go to slide ${P+1}`},P))})]})})});fv.displayName="Carousel";var gv=j.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:u("flex",e),...t}));gv.displayName="CarouselContent";var bv=j.forwardRef(({className:e,basis:t="basis-full",...r},n)=>{let{orientation:o}=Ds();return jsx("div",{ref:n,role:"group","aria-roledescription":"slide",className:u("min-w-0 shrink-0 grow-0",o==="horizontal"?"pl-4":"pt-4",t,e),...r})});bv.displayName="CarouselItem";var Il=j.forwardRef(({className:e,variant:t="bordered",size:r="icon",...n},o)=>{let{scrollPrev:a,canScrollPrev:s}=Ds();return jsxs(ae,{ref:o,variant:t,size:r,className:u("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...n,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});Il.displayName="CarouselPrevious";var Vl=j.forwardRef(({className:e,variant:t="bordered",size:r="icon",...n},o)=>{let{scrollNext:a,canScrollNext:s}=Ds();return jsxs(ae,{ref:o,variant:t,size:r,className:u("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...n,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});Vl.displayName="CarouselNext";var vv=cva("flex flex-col bg-popover border rounded-lg shadow-md",{variants:{size:{sm:"w-64 h-72",md:"w-80 h-96",lg:"w-96 h-[480px]"}},defaultVariants:{size:"md"}}),Hs={recent:{icon:"\u{1F550}",name:"Recent"},smileys:{icon:"\u{1F600}",name:"Smileys & Emotion"},people:{icon:"\u{1F44B}",name:"People & Body"},animals:{icon:"\u{1F43B}",name:"Animals & Nature"},food:{icon:"\u{1F354}",name:"Food & Drink"},travel:{icon:"\u{1F697}",name:"Travel & Places"},activities:{icon:"\u26BD",name:"Activities"},objects:{icon:"\u{1F4A1}",name:"Objects"},symbols:{icon:"\u2764\uFE0F",name:"Symbols"},flags:{icon:"\u{1F3F3}\uFE0F",name:"Flags"}},zl={smileys:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F923}","\u{1F602}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60A}","\u{1F607}","\u{1F970}","\u{1F60D}","\u{1F929}","\u{1F618}","\u{1F617}","\u263A\uFE0F","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61C}","\u{1F92A}","\u{1F61D}","\u{1F911}","\u{1F917}","\u{1F92D}","\u{1F92B}","\u{1F914}","\u{1F910}","\u{1F928}","\u{1F610}","\u{1F611}","\u{1F636}","\u{1F60F}","\u{1F612}","\u{1F644}","\u{1F62C}","\u{1F925}","\u{1F60C}","\u{1F614}","\u{1F62A}","\u{1F924}","\u{1F634}","\u{1F637}","\u{1F912}","\u{1F915}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F975}","\u{1F976}","\u{1F974}","\u{1F635}","\u{1F92F}","\u{1F920}","\u{1F973}","\u{1F978}","\u{1F60E}","\u{1F913}","\u{1F9D0}","\u{1F615}","\u{1F61F}","\u{1F641}","\u2639\uFE0F","\u{1F62E}","\u{1F62F}","\u{1F632}","\u{1F633}","\u{1F97A}","\u{1F626}","\u{1F627}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F622}","\u{1F62D}","\u{1F631}","\u{1F616}","\u{1F623}","\u{1F61E}","\u{1F613}","\u{1F629}","\u{1F62B}","\u{1F971}","\u{1F624}","\u{1F621}","\u{1F620}","\u{1F92C}","\u{1F608}","\u{1F47F}","\u{1F480}","\u2620\uFE0F","\u{1F4A9}","\u{1F921}","\u{1F479}","\u{1F47A}","\u{1F47B}","\u{1F47D}"],people:["\u{1F44B}","\u{1F91A}","\u{1F590}\uFE0F","\u270B","\u{1F596}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u{1F44D}","\u{1F44E}","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9BF}","\u{1F9B5}","\u{1F9B6}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}","\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F469}","\u{1F9D3}","\u{1F474}","\u{1F475}","\u{1F64D}","\u{1F64E}","\u{1F645}","\u{1F646}","\u{1F481}","\u{1F64B}","\u{1F9CF}","\u{1F647}","\u{1F926}","\u{1F937}","\u{1F46E}","\u{1F575}\uFE0F","\u{1F482}","\u{1F977}","\u{1F477}","\u{1F934}","\u{1F478}"],animals:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F99F}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}"],food:["\u{1F347}","\u{1F348}","\u{1F349}","\u{1F34A}","\u{1F34B}","\u{1F34C}","\u{1F34D}","\u{1F96D}","\u{1F34E}","\u{1F34F}","\u{1F350}","\u{1F351}","\u{1F352}","\u{1F353}","\u{1FAD0}","\u{1F95D}","\u{1F345}","\u{1FAD2}","\u{1F965}","\u{1F951}","\u{1F346}","\u{1F954}","\u{1F955}","\u{1F33D}","\u{1F336}\uFE0F","\u{1FAD1}","\u{1F952}","\u{1F96C}","\u{1F966}","\u{1F9C4}","\u{1F9C5}","\u{1F344}","\u{1F95C}","\u{1F330}","\u{1F35E}","\u{1F950}","\u{1F956}","\u{1FAD3}","\u{1F968}","\u{1F96F}","\u{1F95E}","\u{1F9C7}","\u{1F9C0}","\u{1F356}","\u{1F357}","\u{1F969}","\u{1F953}","\u{1F354}","\u{1F35F}","\u{1F355}","\u{1F32D}","\u{1F96A}","\u{1F32E}","\u{1F32F}","\u{1FAD4}","\u{1F959}","\u{1F9C6}","\u{1F95A}","\u{1F373}","\u{1F958}","\u{1F372}","\u{1FAD5}","\u{1F963}","\u{1F957}","\u{1F37F}","\u{1F9C8}","\u{1F9C2}","\u{1F96B}","\u{1F371}","\u{1F358}","\u{1F359}","\u{1F35A}","\u{1F35B}","\u{1F35C}","\u{1F35D}","\u{1F360}","\u{1F362}","\u{1F363}","\u{1F364}","\u{1F365}"],travel:["\u{1F697}","\u{1F695}","\u{1F699}","\u{1F68C}","\u{1F68E}","\u{1F3CE}\uFE0F","\u{1F693}","\u{1F691}","\u{1F692}","\u{1F690}","\u{1F6FB}","\u{1F69A}","\u{1F69B}","\u{1F69C}","\u{1F9AF}","\u{1F9BD}","\u{1F9BC}","\u{1F6F4}","\u{1F6B2}","\u{1F6F5}","\u{1F3CD}\uFE0F","\u{1F6FA}","\u{1F6A8}","\u{1F694}","\u{1F68D}","\u{1F698}","\u{1F696}","\u{1F6A1}","\u{1F6A0}","\u{1F69F}","\u{1F683}","\u{1F68B}","\u{1F69E}","\u{1F69D}","\u{1F684}","\u{1F685}","\u{1F688}","\u{1F682}","\u{1F686}","\u{1F687}","\u{1F68A}","\u{1F689}","\u2708\uFE0F","\u{1F6EB}","\u{1F6EC}","\u{1F6E9}\uFE0F","\u{1F4BA}","\u{1F6F0}\uFE0F","\u{1F680}","\u{1F6F8}","\u{1F681}","\u{1F6F6}","\u26F5","\u{1F6A4}","\u{1F6E5}\uFE0F","\u{1F6F3}\uFE0F","\u26F4\uFE0F","\u{1F6A2}","\u2693","\u{1FA9D}","\u26FD","\u{1F6A7}","\u{1F6A6}","\u{1F6A5}","\u{1F68F}","\u{1F5FA}\uFE0F","\u{1F5FF}","\u{1F5FD}","\u{1F5FC}","\u{1F3F0}","\u{1F3EF}","\u{1F3DF}\uFE0F","\u{1F3A1}","\u{1F3A2}","\u{1F3A0}","\u26F2","\u26F1\uFE0F","\u{1F3D6}\uFE0F","\u{1F3DD}\uFE0F","\u{1F3DC}\uFE0F"],activities:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F94C}","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u26D1\uFE0F","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}","\u{1F3C6}","\u{1F947}","\u{1F948}","\u{1F949}","\u{1F3C5}","\u{1F396}\uFE0F","\u{1F3F5}\uFE0F","\u{1F397}\uFE0F","\u{1F3AB}","\u{1F39F}\uFE0F","\u{1F3AA}","\u{1F939}","\u{1F3AD}","\u{1FA70}","\u{1F3A8}","\u{1F3AC}","\u{1F3A4}","\u{1F3A7}","\u{1F3BC}","\u{1F3B9}","\u{1F941}","\u{1FA98}","\u{1F3B7}","\u{1F3BA}","\u{1FA97}","\u{1F3B8}","\u{1FA95}"],objects:["\u231A","\u{1F4F1}","\u{1F4F2}","\u{1F4BB}","\u2328\uFE0F","\u{1F5A5}\uFE0F","\u{1F5A8}\uFE0F","\u{1F5B1}\uFE0F","\u{1F5B2}\uFE0F","\u{1F579}\uFE0F","\u{1F5DC}\uFE0F","\u{1F4BD}","\u{1F4BE}","\u{1F4BF}","\u{1F4C0}","\u{1F4FC}","\u{1F4F7}","\u{1F4F8}","\u{1F4F9}","\u{1F3A5}","\u{1F4FD}\uFE0F","\u{1F39E}\uFE0F","\u{1F4DE}","\u260E\uFE0F","\u{1F4DF}","\u{1F4E0}","\u{1F4FA}","\u{1F4FB}","\u{1F399}\uFE0F","\u{1F39A}\uFE0F","\u{1F39B}\uFE0F","\u{1F9ED}","\u23F1\uFE0F","\u23F2\uFE0F","\u23F0","\u{1F570}\uFE0F","\u231B","\u23F3","\u{1F4E1}","\u{1F50B}","\u{1F50C}","\u{1F4A1}","\u{1F526}","\u{1F56F}\uFE0F","\u{1FA94}","\u{1F9EF}","\u{1F6E2}\uFE0F","\u{1F4B8}","\u{1F4B5}","\u{1F4B4}","\u{1F4B6}","\u{1F4B7}","\u{1FA99}","\u{1F4B0}","\u{1F4B3}","\u{1F48E}","\u2696\uFE0F","\u{1FA9C}","\u{1F9F0}","\u{1FA9B}","\u{1F527}","\u{1F528}","\u2692\uFE0F","\u{1F6E0}\uFE0F","\u26CF\uFE0F","\u{1FA9A}","\u{1F529}","\u2699\uFE0F","\u{1FAA4}","\u{1F9F1}","\u26D3\uFE0F","\u{1F9F2}","\u{1F52B}","\u{1F4A3}","\u{1F9E8}","\u{1FA93}","\u{1F52A}","\u{1F5E1}\uFE0F","\u2694\uFE0F","\u{1F6E1}\uFE0F"],symbols:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}","\u262E\uFE0F","\u271D\uFE0F","\u262A\uFE0F","\u{1F549}\uFE0F","\u2638\uFE0F","\u2721\uFE0F","\u{1F52F}","\u{1F54E}","\u262F\uFE0F","\u2626\uFE0F","\u{1F6D0}","\u26CE","\u2648","\u2649","\u264A","\u264B","\u264C","\u264D","\u264E","\u264F","\u2650","\u2651","\u2652","\u2653","\u{1F194}","\u269B\uFE0F","\u{1F251}","\u2622\uFE0F","\u2623\uFE0F","\u{1F4F4}","\u{1F4F3}","\u{1F236}","\u{1F21A}","\u{1F238}","\u{1F23A}","\u{1F237}\uFE0F","\u2734\uFE0F","\u{1F19A}","\u{1F4AE}","\u{1F250}","\u3299\uFE0F","\u3297\uFE0F","\u{1F234}","\u{1F235}","\u{1F239}","\u{1F232}","\u{1F170}\uFE0F","\u{1F171}\uFE0F","\u{1F18E}","\u{1F191}","\u{1F17E}\uFE0F","\u{1F198}","\u274C","\u2B55","\u{1F6D1}","\u26D4","\u{1F4DB}","\u{1F6AB}","\u{1F4AF}","\u{1F4A2}","\u2668\uFE0F"],flags:["\u{1F3F3}\uFE0F","\u{1F3F4}","\u{1F3C1}","\u{1F6A9}","\u{1F3F3}\uFE0F\u200D\u{1F308}","\u{1F3F3}\uFE0F\u200D\u26A7\uFE0F","\u{1F1FA}\u{1F1F3}","\u{1F1E6}\u{1F1EB}","\u{1F1E6}\u{1F1F1}","\u{1F1E9}\u{1F1FF}","\u{1F1E6}\u{1F1F8}","\u{1F1E6}\u{1F1E9}","\u{1F1E6}\u{1F1F4}","\u{1F1E6}\u{1F1EE}","\u{1F1E6}\u{1F1F6}","\u{1F1E6}\u{1F1EC}","\u{1F1E6}\u{1F1F7}","\u{1F1E6}\u{1F1F2}","\u{1F1E6}\u{1F1FC}","\u{1F1E6}\u{1F1FA}","\u{1F1E6}\u{1F1F9}","\u{1F1E6}\u{1F1FF}","\u{1F1E7}\u{1F1F8}","\u{1F1E7}\u{1F1ED}","\u{1F1E7}\u{1F1E9}","\u{1F1E7}\u{1F1E7}","\u{1F1E7}\u{1F1FE}","\u{1F1E7}\u{1F1EA}","\u{1F1E7}\u{1F1FF}","\u{1F1E7}\u{1F1EF}","\u{1F1E7}\u{1F1F2}","\u{1F1E7}\u{1F1F9}","\u{1F1E7}\u{1F1F4}","\u{1F1E7}\u{1F1E6}","\u{1F1E7}\u{1F1FC}","\u{1F1E7}\u{1F1F7}","\u{1F1E7}\u{1F1F3}","\u{1F1E7}\u{1F1EC}","\u{1F1E7}\u{1F1EB}","\u{1F1E7}\u{1F1EE}","\u{1F1E8}\u{1F1FB}","\u{1F1F0}\u{1F1ED}","\u{1F1E8}\u{1F1F2}","\u{1F1E8}\u{1F1E6}","\u{1F1E8}\u{1F1EB}","\u{1F1F9}\u{1F1E9}","\u{1F1E8}\u{1F1F1}","\u{1F1E8}\u{1F1F3}","\u{1F1E8}\u{1F1F4}","\u{1F1F0}\u{1F1F2}","\u{1F1E8}\u{1F1EC}","\u{1F1E8}\u{1F1E9}","\u{1F1E8}\u{1F1F7}","\u{1F1ED}\u{1F1F7}","\u{1F1E8}\u{1F1FA}","\u{1F1E8}\u{1F1FE}","\u{1F1E8}\u{1F1FF}","\u{1F1E9}\u{1F1F0}","\u{1F1E9}\u{1F1EF}","\u{1F1E9}\u{1F1F2}","\u{1F1E9}\u{1F1F4}","\u{1F1EA}\u{1F1E8}","\u{1F1EA}\u{1F1EC}","\u{1F1F8}\u{1F1FB}","\u{1F1EC}\u{1F1F6}","\u{1F1EA}\u{1F1F7}","\u{1F1EA}\u{1F1EA}","\u{1F1EA}\u{1F1F9}","\u{1F1EA}\u{1F1FA}","\u{1F1EB}\u{1F1EF}","\u{1F1EB}\u{1F1EE}","\u{1F1EB}\u{1F1F7}","\u{1F1EC}\u{1F1E6}","\u{1F1EC}\u{1F1F2}","\u{1F1EC}\u{1F1EA}","\u{1F1E9}\u{1F1EA}","\u{1F1EC}\u{1F1ED}","\u{1F1EC}\u{1F1F7}","\u{1F1EC}\u{1F1F9}","\u{1F1EC}\u{1F1F3}"]},hv=j.forwardRef(({className:e,size:t,onEmojiSelect:r,recentEmojis:n=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=j.useState(n.length>0?"recent":o),[m,f]=j.useState(""),g=m?Object.values(zl).flat().filter(b=>b.toLowerCase().includes(m.toLowerCase())):c==="recent"?n:zl[c]||[],h=b=>{r?.(b);};return jsxs("div",{ref:l,className:u(vv({size:t,className:e})),...i,children:[a&&jsx("div",{className:"p-2 border-b",children:jsxs("div",{className:"relative",children:[jsx(Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsx(ka,{placeholder:"Search emojis...",value:m,onChange:b=>f(b.target.value),className:"pl-8 h-8"})]})}),s&&!m&&jsx("div",{className:"flex border-b px-1",children:Object.entries(Hs).map(([b,{icon:v}])=>b==="recent"&&n.length===0?null:jsx("button",{className:u("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",c===b&&"bg-accent"),onClick:()=>d(b),title:Hs[b].name,children:v},b))}),!m&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:Hs[c].name}),jsx(Se,{className:"flex-1",children:jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[g.map((b,v)=>jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>h(b),children:b},`${b}-${v}`)),g.length===0&&jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});hv.displayName="EmojiPicker";var xv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),EN=cva("flex flex-wrap items-center gap-0.5 p-1 border-b",{variants:{size:{sm:"p-0.5",md:"p-1",lg:"p-1.5"}},defaultVariants:{size:"md"}}),LN=cva("flex-1 overflow-auto prose prose-sm max-w-none dark:prose-invert [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[inherit] [&_.ProseMirror.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror.is-editor-empty:first-child::before]:float-left [&_.ProseMirror.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror.is-editor-empty:first-child::before]:h-0",{variants:{size:{sm:"min-h-[100px] [&_.ProseMirror]:p-2 text-sm",md:"min-h-[150px] [&_.ProseMirror]:p-3 text-sm",lg:"min-h-[200px] [&_.ProseMirror]:p-4 text-base"}},defaultVariants:{size:"md"}}),Xe=({icon:e,title:t,isActive:r,onClick:n,disabled:o})=>jsxs(Kr,{children:[jsx($r,{children:jsx(ae,{type:"button",variant:r?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:n,disabled:o,children:e})}),jsx(Gr,{side:"top",className:"text-xs",children:t})]}),yv=j.forwardRef(({className:e,variant:t,size:r,value:n="",onChange:o,placeholder:a="Start writing...",readOnly:s=false,showToolbar:i=true,minHeight:l,maxHeight:c,onEditorReady:d,...m},f)=>{let p=useEditor({extensions:[sN.configure({heading:{levels:[1,2,3]}}),iN.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),lN,cN.configure({types:["heading","paragraph"]}),dN.configure({placeholder:a})],content:n,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});j.useEffect(()=>{p&&n!==p.getHTML()&&p.commands.setContent(n);},[n,p]),j.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let g=()=>{if(!p)return;let h=p.getAttributes("link").href,b=window.prompt("URL",h);if(b!==null){if(b===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:b}).run();}};return p?jsx(Fr,{children:jsxs("div",{ref:f,className:u(xv({variant:t,size:r,className:e})),...m,children:[i&&!s&&jsxs("div",{className:u(EN({size:r})),children:[jsx(Xe,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(Xe,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(Br,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Heading1,{className:"h-4 w-4"}),title:"Heading 1",isActive:p.isActive("heading",{level:1}),onClick:()=>p.chain().focus().toggleHeading({level:1}).run()}),jsx(Xe,{icon:jsx(Heading2,{className:"h-4 w-4"}),title:"Heading 2",isActive:p.isActive("heading",{level:2}),onClick:()=>p.chain().focus().toggleHeading({level:2}).run()}),jsx(Xe,{icon:jsx(Heading3,{className:"h-4 w-4"}),title:"Heading 3",isActive:p.isActive("heading",{level:3}),onClick:()=>p.chain().focus().toggleHeading({level:3}).run()}),jsx(Br,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(Xe,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(Xe,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(Xe,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(Br,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(Xe,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(Br,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(Xe,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(Xe,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(Br,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(Xe,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(Br,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsx(Xe,{icon:jsx(Unlink,{className:"h-4 w-4"}),title:"Remove Link",onClick:()=>p.chain().focus().unsetLink().run(),disabled:!p.isActive("link")})]}),jsx(EditorContent,{editor:p,className:u(LN({size:r})),style:{minHeight:l,maxHeight:c}})]})}):null});yv.displayName="RichTextEditor";var wv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function ON(e,t,r){return centerCrop(makeAspectCrop({unit:"%",width:90},r,e,t),e,t)}async function Rv(e,t,r=0,n=1){let o=document.createElement("canvas"),a=o.getContext("2d");if(!a)return null;let s=e.naturalWidth/e.width,i=e.naturalHeight/e.height,l=window.devicePixelRatio||1;o.width=Math.floor(t.width*s*l),o.height=Math.floor(t.height*i*l),a.scale(l,l),a.imageSmoothingQuality="high";let c=t.x*s,d=t.y*i,m=r*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return a.save(),a.translate(-c,-d),a.translate(f,p),a.rotate(m),a.scale(n,n),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore(),new Promise(g=>{o.toBlob(h=>{g(h);},"image/png");})}var Cv=j.forwardRef(({className:e,variant:t,src:r,aspectRatio:n,onCropChange:o,onCropComplete:a,showZoom:s=true,showRotation:i=true,minZoom:l=1,maxZoom:c=3,circularCrop:d=false,initialCrop:m,...f},p)=>{let g=j.useRef(null),[h,b]=j.useState(),[v,w]=j.useState(),[x,R]=j.useState(1),[C,y]=j.useState(0),k=P=>{let{width:E,height:D}=P.currentTarget;if(n){let H=ON(E,D,n);b(H);}else b(m||{unit:"%",x:10,y:10,width:80,height:80});},T=P=>{b(P),o?.(P);},N=async P=>{if(w(P),a&&g.current&&P.width&&P.height){let E=await Rv(g.current,P,C,x);a(E);}},M=()=>{y(P=>(P+90)%360);};return j.useEffect(()=>{v&&g.current&&a&&Rv(g.current,v,C,x).then(P=>{a(P);});},[x,C,v,a]),jsxs("div",{ref:p,className:u(wv({variant:t,className:e})),...f,children:[jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsx(SN,{crop:h,onChange:T,onComplete:N,aspect:n,circularCrop:d,className:"max-h-[400px]",children:jsx("img",{ref:g,src:r,alt:"Crop preview",onLoad:k,style:{transform:`scale(${x}) rotate(${C}deg)`,maxHeight:"400px"}})})}),jsxs("div",{className:"flex items-center gap-4 p-3 border-t",children:[s&&jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsx(ZoomOut,{className:"h-4 w-4 text-muted-foreground"}),jsx($a,{value:[x],onValueChange:([P])=>R(P),min:l,max:c,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsx(ae,{variant:"bordered",size:"icon",onClick:M,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});Cv.displayName="ImageCropper";var Kl=cva("inline-block",{variants:{variant:{default:"",bordered:"border rounded-lg p-2",card:"border rounded-lg p-4 bg-card shadow-sm"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),KN={sm:96,md:128,lg:192},Mv=j.forwardRef(({className:e,variant:t,size:r,value:n,qrSize:o,fgColor:a="currentColor",bgColor:s="transparent",level:i="M",includeMargin:l=false,title:c,logo:d,logoSize:m=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let b=o??KN[r??"md"];return n?jsx("div",{ref:h,className:u(Kl({variant:t,size:r,className:e})),...g,children:jsxs("div",{className:"relative inline-block",children:[jsx(BN,{value:n,size:b,fgColor:a,bgColor:s,level:i,title:c,style:{padding:l?16:0}}),d&&jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:f,backgroundColor:p},children:jsx("img",{src:d,alt:"Logo",style:{width:m,height:m,objectFit:"contain"}})})]})}):jsx("div",{ref:h,className:u(Kl({variant:t,size:r,className:e})),...g,children:jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:b,height:b},children:"No data"})})});Mv.displayName="QRCode";var Nv=({children:e,defaultTheme:t="system",storageKey:r="reever-ui-theme",enableSystem:n=true,disableTransitionOnChange:o=false,attribute:a="class",forcedTheme:s,themes:i=["light","dark"]})=>jsx(ThemeProvider,{defaultTheme:t,storageKey:r,enableSystem:n,disableTransitionOnChange:o,attribute:a,forcedTheme:s,themes:i,children:e});Nv.displayName="ThemeProvider";var XN=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),kv=j.forwardRef(({className:e,variant:t="ghost",size:r="md",mode:n="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=useTheme(),[l,c]=j.useState(false);j.useEffect(()=>{c(true);},[]);let d=()=>{let m=["light","dark","system"],p=(m.indexOf(a||"system")+1)%m.length;s(m[p]);};return l?n==="cycle"?jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),onClick:d,children:[i==="dark"?jsx(Moon,{className:"h-4 w-4"}):jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxs(fr,{children:[jsx(gr,{children:jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),children:[jsx(Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsx(Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxs(br,{align:"end",children:[jsxs(Bt,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs(Bt,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs(Bt,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});kv.displayName="ThemeToggle";var Pv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),Ev=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),Lv=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Sv=j.forwardRef(({className:e,label:t,description:r,errorMessage:n,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:m,endContent:f,id:p,...g},h)=>{let b=j.useId(),v=p||b,w=`${v}-description`,x=`${v}-error`,R=a&&n;return jsxs("div",{className:u(Pv({size:s}),e),children:[t&&jsxs("label",{htmlFor:v,className:u(Lv({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[m&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),jsx("input",{ref:h,id:v,"aria-invalid":a,"aria-describedby":R?x:r?w:void 0,"aria-required":o,className:u(Ev({size:s,isInvalid:a}),m&&"pl-10",f&&"pr-10",l),...g}),f&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),r&&!R&&jsx("p",{id:w,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:r}),R&&jsx("p",{id:x,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:n})]})});Sv.displayName="TextField";var Iv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ZN=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",{variants:{size:{sm:"h-8 px-8 py-1.5 text-xs",md:"h-10 px-10 py-2 text-sm",lg:"h-12 px-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit min-w-24"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),Dv=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Hv=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),QN=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Vv=j.forwardRef(({className:e,label:t,description:r,errorMessage:n,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:m,max:f,step:p=1,value:g,defaultValue:h,onChange:b,showButtons:v=true,formatOptions:w,fullWidth:x=false,disabled:R,id:C,...y},k)=>{let T=j.useId(),N=C||T,M=`${N}-description`,P=`${N}-error`,[E,D]=j.useState(h),[H,L]=j.useState(false),S=g!==void 0?g:E,V=a&&n,A=j.useCallback(O=>{O!==void 0&&(m!==void 0&&O<m&&(O=m),f!==void 0&&O>f&&(O=f)),g===void 0&&D(O),b?.(O);},[g,m,f,b]),B=()=>{let O=(S??0)+p;A(O);},I=()=>{let O=(S??0)-p;A(O);},F=O=>{let W=O.target.value;if(W==="")A(void 0);else {let z=parseFloat(W);isNaN(z)||A(z);}},K=O=>{O.key==="ArrowUp"?(O.preventDefault(),B()):O.key==="ArrowDown"&&(O.preventDefault(),I());},Y=j.useMemo(()=>S===void 0?"":w?new Intl.NumberFormat(void 0,w).format(S):S.toString(),[S,w]),te=m!==void 0&&S!==void 0&&S<=m,$=f!==void 0&&S!==void 0&&S>=f;return jsxs("div",{className:u(Iv({size:s}),e),children:[t&&jsxs("label",{htmlFor:N,className:u(QN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx("button",{type:"button",onClick:I,disabled:R||te,className:u(Dv({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:u(Hv({size:s}))})}),jsx("input",{ref:k,id:N,type:"text",inputMode:"decimal",value:Y,onChange:F,onKeyDown:K,onFocus:()=>L(true),onBlur:()=>L(false),"aria-invalid":a,"aria-describedby":V?P:r?M:void 0,"aria-required":o,"aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":S,disabled:R,className:u(ZN({size:s,isInvalid:a,fullWidth:x}),!v&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...y}),v&&jsx("button",{type:"button",onClick:B,disabled:R||$,className:u(Dv({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:u(Hv({size:s}))})})]}),r&&!V&&jsx("p",{id:M,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:r}),V&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:n})]})});Vv.displayName="NumberField";var zv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),tk=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),Av=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),rk=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),nk=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",{variants:{size:{sm:"h-5 w-5 right-1.5",md:"h-6 w-6 right-2",lg:"h-7 w-7 right-2.5"}},defaultVariants:{size:"md"}}),Ov=j.forwardRef(({className:e,label:t,description:r,errorMessage:n,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:b=true,showSearchIcon:v=true,disabled:w,placeholder:x="Search...",id:R,...C},y)=>{let k=j.useId(),T=R||k,N=`${T}-description`,M=`${T}-error`,[P,E]=j.useState(f),D=m!==void 0?m:P,H=a&&n,L=D.length>0,S=B=>{let I=B.target.value;m===void 0&&E(I),p?.(I);},V=()=>{m===void 0&&E(""),p?.(""),g?.();},A=B=>{B.key==="Enter"?(B.preventDefault(),h?.(D)):B.key==="Escape"&&L&&(B.preventDefault(),V());};return jsxs("div",{className:u(zv({size:s}),e),children:[t&&jsxs("label",{htmlFor:T,className:u(rk({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx(Search,{className:u(Av({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:y,id:T,type:"search",value:D,onChange:S,onKeyDown:A,placeholder:x,"aria-invalid":a,"aria-describedby":H?M:r?N:void 0,"aria-required":o,disabled:w,className:u(tk({size:s,isInvalid:a}),!v&&"pl-3",!b&&"pr-3",l),...C}),b&&L&&!w&&jsx("button",{type:"button",onClick:V,className:u(nk({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X,{className:u(Av({size:s}))})})]}),r&&!H&&jsx("p",{id:N,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:r}),H&&jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:n})]})});Ov.displayName="SearchField";var Bv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ak=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-3 pr-8 py-1.5 text-xs",md:"h-10 pl-3 pr-10 py-2 text-sm",lg:"h-12 pl-4 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),sk=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),ik=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Os={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},Yl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},_l=(e,t)=>String(e).padStart(t,"0"),da=(e,t)=>{if(!e)return "";let r=_l(e.getDate(),2),n=_l(e.getMonth()+1,2),o=_l(e.getFullYear(),4),a=Os[t],s=Yl[t],i={day:r,month:n,year:o};return s.map(l=>i[l]).join(a)},Xl=(e,t)=>{let r=Os[t],n=e.split(r);if(n.length!==3)return null;let o=Yl[t],a={};if(o.forEach((i,l)=>{a[i]=parseInt(n[l],10);}),isNaN(a.day)||isNaN(a.month)||isNaN(a.year)||a.month<1||a.month>12||a.day<1||a.day>31||a.year<1e3||a.year>9999)return null;let s=new Date(a.year,a.month-1,a.day);return s.getFullYear()!==a.year||s.getMonth()!==a.month-1||s.getDate()!==a.day?null:s},lk=e=>{let t=Os[e];return Yl[e].map(n=>n==="year"?"####":"##").join(t)},ql=j.forwardRef(({className:e,label:t,description:r,errorMessage:n,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showIcon:v=true,fullWidth:w=false,disabled:x,placeholder:R,id:C,...y},k)=>{let T=j.useId(),N=C||T,M=`${N}-description`,P=`${N}-error`,[E,D]=j.useState(f??null),[H,L]=j.useState(""),[S,V]=j.useState(false),[A,B]=j.useState(false),I=m!==void 0?m:E,F=a&&n,K=Os[b],Y=lk(b);j.useEffect(()=>{A||L(da(I,b));},[I,b,A]);let te=Q=>{m===void 0&&D(Q),p?.(Q);},$=Q=>{let ue=Q??null;te(ue),L(da(ue,b)),V(false);},O=Q=>{let ue=Q.target.value;ue=ue.replace(new RegExp(`[^0-9\\${K}]`,"g"),"");let U=ue.replace(new RegExp(`\\${K}`,"g"),""),Ie="",Z=0;for(let ye=0;ye<Y.length&&Z<U.length;ye++)Y[ye]==="#"?(Ie+=U[Z],Z++):Ie+=Y[ye];if(L(Ie),Ie.length===Y.length){let ye=Xl(Ie,b);if(ye){if(g&&ye<g||h&&ye>h)return;te(ye);}}},W=()=>{B(true);},z=()=>{B(false),H.length!==Y.length?L(da(I,b)):Xl(H,b)||L(da(I,b));},_=()=>{x||V(true);};return jsxs("div",{className:u(Bv({size:s}),e),children:[t&&jsxs("label",{htmlFor:N,className:u(ik({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(je,{open:S,onOpenChange:V,children:[jsxs(Ur,{className:u("relative",w?"w-full":"w-fit"),children:[jsx("input",{ref:k,id:N,type:"text",inputMode:"numeric",value:H,onChange:O,onFocus:W,onBlur:z,"aria-invalid":a,"aria-describedby":F?P:r?M:void 0,"aria-required":o,disabled:x,placeholder:R||b.toLowerCase(),className:u(ak({size:s,isInvalid:a,fullWidth:w}),l),style:{borderColor:A||S?"var(--color-foreground)":void 0},...y}),v&&jsx("button",{type:"button",onClick:_,disabled:x,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u(sk({size:s}))})})]}),jsx(_e,{className:"w-auto p-0",align:"start",children:jsx(_r,{mode:"single",selected:I??void 0,onSelect:$,disabled:Q=>!!(g&&Q<g||h&&Q>h),defaultMonth:I??void 0,showMonthAndYearPickers:true})})]}),r&&!F&&jsx("p",{id:M,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:r}),F&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:n})]})});ql.displayName="DateInput";var ck=ql;var Fv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),dk=cva("inline-flex items-center rounded-md border border-input bg-background transition-colors",{variants:{size:{sm:"h-8 px-2 gap-0.5 text-xs",md:"h-10 px-3 gap-1 text-sm",lg:"h-12 px-4 gap-1.5 text-base"},isInvalid:{true:"border-danger",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""},fullWidth:{true:"w-full justify-center",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,disabled:false,fullWidth:false}}),uk=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Kv=j.forwardRef(({className:e,label:t,description:r,errorMessage:n,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:b=false,hourCycle:v=24,disabled:w,fullWidth:x=false,id:R,...C},y)=>{let k=j.useId(),T=R||k,N=`${T}-description`,M=`${T}-error`,P=j.useRef(null),E=j.useRef(null),D=j.useRef(null),H=j.useRef(null),[L,S]=j.useState(f??null),V=m!==void 0?m:L,A=a&&n,B=G=>v===24?G:G===0?12:G>12?G-12:G,I=G=>G>=12?"PM":"AM",F=(G,oe)=>oe==="AM"?G===12?0:G:G===12?12:G+12,[K,Y]=j.useState(V?String(B(V.hour)).padStart(2,"0"):""),[te,$]=j.useState(V?String(V.minute).padStart(2,"0"):""),[O,W]=j.useState(V?.second!==void 0?String(V.second).padStart(2,"0"):""),[z,_]=j.useState(V?I(V.hour):"AM"),[Q,ue]=j.useState(false);j.useEffect(()=>{m!==void 0&&(m?(Y(String(B(m.hour)).padStart(2,"0")),$(String(m.minute).padStart(2,"0")),m.second!==void 0&&W(String(m.second).padStart(2,"0")),_(I(m.hour))):(Y(""),$(""),W("")));},[m,v]);let U=(G,oe,X,Ee)=>{let ce=parseInt(G,10),$e=parseInt(oe,10),Ge=b?parseInt(X,10):void 0;if(isNaN(ce)||isNaN($e)||b&&isNaN(Ge)){m===void 0&&S(null),p?.(null);return}let fe={hour:v===12?F(ce,Ee):ce,minute:$e,...b&&Ge!==void 0&&{second:Ge}};m===void 0&&S(fe),p?.(fe);},Ie=G=>{let oe=G.target.value.replace(/\D/g,"").slice(0,2);Y(oe);let X=v===24?23:12,Ee=v===24?0:1;if(oe.length===2){let ce=parseInt(oe,10);ce>=Ee&&ce<=X&&(E.current?.focus(),E.current?.select());}},Z=G=>{let oe=G.target.value.replace(/\D/g,"").slice(0,2);if($(oe),oe.length===2){let X=parseInt(oe,10);X>=0&&X<=59&&(b?(D.current?.focus(),D.current?.select()):v===12&&H.current?.focus());}},ye=G=>{let oe=G.target.value.replace(/\D/g,"").slice(0,2);W(oe),oe.length===2&&v===12&&H.current?.focus();},Vr=()=>{if(K){let G=parseInt(K,10),oe=v===24?23:12,Ee=Math.min(Math.max(G,v===24?0:1),oe),ce=String(Ee).padStart(2,"0");Y(ce),U(ce,te,O,z);}},mt=()=>{if(te){let G=parseInt(te,10),oe=Math.min(Math.max(G,0),59),X=String(oe).padStart(2,"0");$(X),U(K,X,O,z);}},fn=()=>{if(O){let G=parseInt(O,10),oe=Math.min(Math.max(G,0),59),X=String(oe).padStart(2,"0");W(X),U(K,te,X,z);}},Ar=()=>{let G=z==="AM"?"PM":"AM";_(G),U(K,te,O,G);},Do=G=>{let oe=G.key.toLowerCase();oe==="a"?(G.preventDefault(),z!=="AM"&&(_("AM"),U(K,te,O,"AM"))):oe==="p"?(G.preventDefault(),z!=="PM"&&(_("PM"),U(K,te,O,"PM"))):oe==="arrowup"||oe==="arrowdown"?(G.preventDefault(),Ar()):oe==="arrowleft"&&(G.preventDefault(),b?(D.current?.focus(),D.current?.select()):(E.current?.focus(),E.current?.select()));},zt=(G,oe)=>{if(G.key==="ArrowUp"||G.key==="ArrowDown"){G.preventDefault();let X=G.key==="ArrowUp"?1:-1;if(oe==="hour"){let Ee=parseInt(K,10)||0,ce=v===24?23:12,$e=v===24?0:1,Ge=Ee+X;Ge>ce&&(Ge=$e),Ge<$e&&(Ge=ce);let zr=String(Ge).padStart(2,"0");Y(zr),U(zr,te,O,z);}else if(oe==="minute"){let ce=(parseInt(te,10)||0)+X;ce>59&&(ce=0),ce<0&&(ce=59);let $e=String(ce).padStart(2,"0");$($e),U(K,$e,O,z);}else if(oe==="second"){let ce=(parseInt(O,10)||0)+X;ce>59&&(ce=0),ce<0&&(ce=59);let $e=String(ce).padStart(2,"0");W($e),U(K,te,$e,z);}}G.key==="ArrowRight"&&(G.preventDefault(),oe==="hour"?(E.current?.focus(),E.current?.select()):oe==="minute"&&b?(D.current?.focus(),D.current?.select()):(oe==="minute"&&!b&&v===12||oe==="second"&&v===12)&&H.current?.focus()),G.key==="ArrowLeft"&&(G.preventDefault(),oe==="minute"?(P.current?.focus(),P.current?.select()):oe==="second"&&(E.current?.focus(),E.current?.select())),G.key==="Backspace"&&G.currentTarget.value===""&&(oe==="minute"?P.current?.focus():oe==="second"&&E.current?.focus());},gn=u((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",w&&"cursor-not-allowed");return jsxs("div",{ref:y,className:u(Fv({size:s}),e),...C,children:[t&&jsxs("label",{htmlFor:T,className:u(uk({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:u(dk({size:s,isInvalid:a,disabled:w,fullWidth:x}),l),style:{borderColor:Q?"var(--color-foreground)":void 0},onFocus:()=>ue(true),onBlur:G=>{G.currentTarget.contains(G.relatedTarget)||ue(false);},children:[jsx("input",{ref:P,id:T,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:K,onChange:Ie,onBlur:Vr,onKeyDown:G=>zt(G,"hour"),onFocus:G=>G.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":A?M:r?N:void 0,"aria-required":o,disabled:w,className:gn}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:E,type:"text",inputMode:"numeric",placeholder:"mm",value:te,onChange:Z,onBlur:mt,onKeyDown:G=>zt(G,"minute"),onFocus:G=>G.target.select(),"aria-label":"Minute",disabled:w,className:gn}),b&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:D,type:"text",inputMode:"numeric",placeholder:"ss",value:O,onChange:ye,onBlur:fn,onKeyDown:G=>zt(G,"second"),onFocus:G=>G.target.select(),"aria-label":"Second",disabled:w,className:gn})]}),v===12&&jsx("button",{ref:H,type:"button",onClick:Ar,onKeyDown:Do,disabled:w,className:u("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",w&&"cursor-not-allowed"),"aria-label":"AM/PM",children:z})]}),r&&!A&&jsx("p",{id:N,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:r}),A&&jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:n})]})});Kv.displayName="TimeField";var Gv=cva("inline-flex items-center",{variants:{variant:{default:"gap-1",compact:"gap-0.5",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px gap-0"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},size:{sm:"",md:"",lg:""},density:{compact:"gap-0.5",regular:"gap-1",spacious:"gap-2"}},defaultVariants:{variant:"default",orientation:"horizontal",size:"md",density:"regular"}}),Uv=j.forwardRef(({className:e,variant:t,orientation:r,size:n,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...m},f)=>{let p=s&&s<a.length?a.slice(0,s):a,g=s&&s<a.length?a.slice(s):[],h={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[n??"md"],b={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[n??"md"],v={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[n??"md"],w=(R,C)=>{C&&C(),l&&l(R);},x=R=>jsxs("button",{type:"button",disabled:i||R.isDisabled,onClick:()=>w(R.key,R.onPress),className:u("inline-flex items-center justify-center gap-2 rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",c?h:b),"aria-label":R.label,children:[R.icon&&jsx("span",{className:v,children:R.icon}),c&&jsx("span",{children:R.label})]},R.key);return jsxs("div",{ref:f,role:"group",className:u(Gv({variant:t,orientation:r,size:n,density:o,className:e})),...m,children:[p.map(R=>d?d(R):x(R)),g.length>0&&jsxs(fr,{children:[jsx(gr,{"aria-label":"More actions",className:u("items-center justify-center rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",i&&"pointer-events-none opacity-50",b),children:jsx(MoreHorizontal,{className:v})}),jsx(br,{align:"end",children:g.map(R=>jsxs(Bt,{disabled:R.isDisabled,onClick:()=>w(R.key,R.onPress),children:[R.icon&&jsx("span",{className:u(v,"mr-2"),children:R.icon}),R.label]},R.key))})]})]})});Uv.displayName="ActionGroup";var Xv=cva("inline-flex items-center gap-2",{variants:{variant:{neutral:"[--status-color:theme(colors.muted.foreground)]",info:"[--status-color:theme(colors.blue.500)]",positive:"[--status-color:theme(colors.green.500)]",notice:"[--status-color:theme(colors.yellow.500)]",negative:"[--status-color:theme(colors.red.500)]"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"neutral",size:"md"}}),gk=cva("rounded-full bg-[--status-color] flex-shrink-0",{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"},pulse:{true:"animate-pulse",false:""}},defaultVariants:{size:"md",pulse:false}}),Yv=j.forwardRef(({className:e,variant:t,size:r,pulse:n=false,hideLabel:o=false,children:a,...s},i)=>jsxs("span",{ref:i,role:"status",className:u(Xv({variant:t,size:r,className:e})),...s,children:[jsx("span",{className:u(gk({size:r,pulse:n})),"aria-hidden":"true"}),!o&&a&&jsx("span",{className:"text-foreground",children:a})]}));Yv.displayName="StatusLight";var Zv=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),vk=cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),hk=cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),xk=cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Qv=j.forwardRef(({className:e,size:t,illustration:r,heading:n,description:o,children:a,...s},i)=>jsxs("div",{ref:i,className:u(Zv({size:t,className:e})),...s,children:[r&&jsx("div",{className:u(vk({size:t})),"aria-hidden":"true",children:r}),n&&jsx("h3",{className:u(hk({size:t})),children:n}),o&&jsx("p",{className:u(xk({size:t})),children:o}),a&&jsx("div",{className:"mt-2",children:a})]}));Qv.displayName="IllustratedMessage";var th=cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),Nk={info:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle,neutral:Info},rh=j.forwardRef(({className:e,variant:t,title:r,icon:n,hideIcon:o=false,isDismissible:a=false,onDismiss:s,actions:i,children:l,...c},d)=>{let[m,f]=j.useState(true);if(!m)return null;let p=Nk[t??"info"],g=()=>{f(false),s?.();};return jsxs("div",{ref:d,role:"alert",className:u(th({variant:t,className:e})),...c,children:[!o&&jsx("div",{className:"flex-shrink-0",children:n||jsx(p,{className:"h-5 w-5"})}),jsxs("div",{className:"flex-1 space-y-1",children:[r&&jsx("div",{className:"font-medium",children:r}),l&&jsx("div",{className:"opacity-90",children:l}),i&&jsx("div",{className:"mt-3 flex gap-2",children:i})]}),a&&jsx("button",{type:"button",onClick:g,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsx(X,{className:"h-4 w-4"})})]})});rh.displayName="InlineAlert";var nh=cva("fixed flex items-center gap-2 rounded-lg border bg-background shadow-lg transition-all duration-200",{variants:{position:{bottom:"bottom-4 left-1/2 -translate-x-1/2",top:"top-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4"},size:{sm:"px-3 py-2 gap-1.5",md:"px-4 py-2.5 gap-2",lg:"px-5 py-3 gap-3"}},defaultVariants:{position:"bottom",size:"md"}}),oh=j.forwardRef(({className:e,position:t,size:r,selectedCount:n=0,isOpen:o=true,onClose:a,showClose:s=true,selectedText:i,children:l,...c},d)=>{if(!o||n===0)return null;let m=()=>typeof i=="function"?i(n):i||`${n} item${n>1?"s":""} selected`;return jsxs("div",{ref:d,role:"toolbar","aria-label":"Actions for selected items",className:u(nh({position:t,size:r,className:e})),...c,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:m()}),jsx("div",{className:"h-4 w-px bg-border"}),jsx("div",{className:"flex items-center gap-1",children:l}),s&&jsxs(Fragment,{children:[jsx("div",{className:"h-4 w-px bg-border"}),jsx(yt,{size:"sm",onClick:a,"aria-label":"Close action bar"})]})]})});oh.displayName="ActionBar";var ah=j.forwardRef(({className:e,icon:t,children:r,...n},o)=>jsxs("button",{ref:o,type:"button",className:u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",e),...n,children:[t&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),r]}));ah.displayName="ActionBarButton";var lh=cva("flex flex-col",{variants:{variant:{default:"gap-1",bordered:"border rounded-lg divide-y",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),ch=cva("flex items-center gap-3 transition-colors cursor-pointer",{variants:{variant:{default:"rounded-md hover:bg-accent",bordered:"hover:bg-accent",cards:"rounded-lg border hover:border-primary/50 hover:bg-accent/50"},size:{sm:"px-2 py-1.5 text-sm",md:"px-3 py-2",lg:"px-4 py-3 text-lg"},isSelected:{true:"bg-accent",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"cards",isSelected:true,className:"border-primary bg-accent"}],defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function dh({className:e,variant:t,size:r,items:n,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,allowsDragging:i=false,onReorder:l,showCheckbox:c=false,renderItem:d,emptyContent:m,...f}){let[p,g]=j.useState(new Set),[h,b]=j.useState(null),[v,w]=j.useState(null),x=j.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),R=T=>{if(a==="none")return;let N;a==="single"?N=x.has(T)?new Set:new Set([T]):(N=new Set(x),N.has(T)?N.delete(T):N.add(T)),o||g(N),s?.(N);},C=(T,N)=>{b(N),T.dataTransfer.effectAllowed="move";},y=(T,N)=>{T.preventDefault(),h!==N&&w(N);},k=()=>{if(h&&v&&h!==v){let T=n.findIndex(E=>E.key===h),N=n.findIndex(E=>E.key===v),M=[...n],[P]=M.splice(T,1);M.splice(N,0,P),l?.(M);}b(null),w(null);};return n.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:u(lh({variant:t,size:r,className:e})),...f,children:n.map(T=>{let N=x.has(T.key),M=h===T.key,P=v===T.key;return d?jsx("div",{role:"option","aria-selected":N,onClick:()=>R(T.key),children:d(T,N)},T.key):jsxs("div",{role:"option","aria-selected":N,"aria-disabled":T.isDisabled,draggable:i&&!T.isDisabled,onDragStart:E=>C(E,T.key),onDragOver:E=>y(E,T.key),onDragEnd:k,onClick:()=>!T.isDisabled&&R(T.key),className:u(ch({variant:t,size:r,isSelected:N,isDisabled:T.isDisabled}),M&&"opacity-50",P&&"border-t-2 border-t-primary"),children:[i&&jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),c&&a!=="none"&&jsx("div",{className:u("flex h-4 w-4 items-center justify-center rounded border",N?"bg-primary border-primary text-primary-foreground":"border-input"),children:N&&jsx(Check,{className:"h-3 w-3"})}),T.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:T.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:T.label}),T.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:T.description})]})]},T.key)})})}dh.displayName="ListView";var uh=cva("relative flex w-full touch-none select-none",{variants:{orientation:{horizontal:"items-center",vertical:"flex-col justify-center h-full"},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"horizontal",size:"md"}}),Sk=cva("relative grow overflow-hidden rounded-full bg-secondary",{variants:{orientation:{horizontal:"w-full",vertical:"w-2 h-full"},size:{sm:"h-1",md:"h-2",lg:"h-3"}},compoundVariants:[{orientation:"vertical",size:"sm",className:"w-1 h-full"},{orientation:"vertical",size:"md",className:"w-2 h-full"},{orientation:"vertical",size:"lg",className:"w-3 h-full"}],defaultVariants:{orientation:"horizontal",size:"md"}}),Dk=cva("block rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),mh=j.forwardRef(({className:e,orientation:t="horizontal",size:r="md",value:n,defaultValue:o=[25,75],onValueChange:a,onValueCommit:s,min:i=0,max:l=100,step:c=1,disabled:d=false,showLabels:m=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:g,...h},b)=>{let[v,w]=j.useState(o),x=n!==void 0,R=x?n:v,C=j.useRef(null),[y,k]=j.useState(false),[T,N]=j.useState(null),M=(I,F)=>{if(!C.current)return R[0];let K=C.current.getBoundingClientRect(),Y;t==="horizontal"?Y=(I-K.left)/K.width:Y=1-(F-K.top)/K.height,Y=Math.max(0,Math.min(1,Y));let te=i+Y*(l-i),$=Math.round(te/c)*c;return Math.max(i,Math.min(l,$))},P=(I,F)=>{let K=[...R];K[F]=I,F===0&&I>R[1]&&(K[0]=R[1]),F===1&&I<R[0]&&(K[1]=R[0]),x||w(K),a?.(K);},E=(I,F)=>{d||(I.preventDefault(),k(true),N(F),I.target.setPointerCapture(I.pointerId));},D=I=>{if(!y||T===null||d)return;let F=M(I.clientX,I.clientY);P(F,T);},H=()=>{y&&(k(false),N(null),s?.(R));},L=I=>{if(d)return;let F=M(I.clientX,I.clientY),K=Math.abs(R[0]-F),Y=Math.abs(R[1]-F),te=K<=Y?0:1;P(F,te);let $=[...R];$[te]=F,s?.($);},S=(I,F)=>{if(d)return;let K=R[F];switch(I.key){case "ArrowRight":case "ArrowUp":I.preventDefault(),K=Math.min(l,R[F]+c);break;case "ArrowLeft":case "ArrowDown":I.preventDefault(),K=Math.max(i,R[F]-c);break;case "Home":I.preventDefault(),K=i;break;case "End":I.preventDefault(),K=l;break;default:return}P(K,F);let Y=[...R];Y[F]=K,s?.(Y);},V=I=>(I-i)/(l-i)*100,A={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],B={sm:14,md:20,lg:24}[r||"md"];return jsxs("div",{className:"relative w-full",children:[m&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:f(R[0])}),jsx("span",{children:f(R[1])})]}),jsxs("div",{ref:b,className:u(uh({orientation:t,size:r}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsx("div",{ref:C,className:u(Sk({orientation:t,size:r})),onClick:L,children:jsx("div",{className:u("absolute rounded-full",A,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${V(R[0])}%`,right:`${100-V(R[1])}%`,top:0,bottom:0}:{bottom:`${V(R[0])}%`,top:`${100-V(R[1])}%`,left:0,right:0}})}),R.map((I,F)=>jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":I,"aria-orientation":t||void 0,"aria-disabled":d,className:u(Dk({size:r}),y&&T===F&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${V(I)}% - ${B/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${V(I)}% - ${B/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:K=>E(K,F),onPointerMove:D,onPointerUp:H,onPointerCancel:H,onKeyDown:K=>S(K,F)},F)),g&&jsxs(Fragment,{children:[jsx("input",{type:"hidden",name:`${g}[0]`,value:R[0]}),jsx("input",{type:"hidden",name:`${g}[1]`,value:R[1]})]})]})]})});mh.displayName="RangeSlider";var rc=cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{help:"text-muted-foreground hover:text-foreground",info:"text-blue-500 hover:text-blue-600",warning:"text-yellow-500 hover:text-yellow-600"},size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"help",size:"md"}}),zk=cva("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in fade-in-0 zoom-in-95",{variants:{size:{sm:"w-56 text-xs",md:"w-72 text-sm",lg:"w-80 text-base"}},defaultVariants:{size:"md"}}),Ok={help:HelpCircle,info:Info,warning:AlertCircle},gh=j.forwardRef(({variant:e="help",size:t,title:r,children:n,trigger:o,side:a="top",align:s="center",open:i,onOpenChange:l,learnMoreUrl:c,learnMoreText:d="Learn more",triggerClassName:m,contentClassName:f},p)=>{let[g,h]=j.useState(false),[b,v]=j.useState(false),[w,x]=j.useState({top:0,left:0}),R=j.useRef(null),C=j.useRef(null),y=i!==void 0?i:g,k=j.useCallback(P=>{i===void 0&&h(P),l?.(P);},[i,l]);j.useEffect(()=>{v(true);},[]),j.useEffect(()=>{if(!y||!R.current)return;let P=()=>{let E=R.current.getBoundingClientRect(),D=C.current?.getBoundingClientRect(),H=D?.width||288,L=D?.height||100,S=8,V=0,A=0;switch(a){case "top":V=E.top-L-S,A=E.left+E.width/2-H/2;break;case "bottom":V=E.bottom+S,A=E.left+E.width/2-H/2;break;case "left":V=E.top+E.height/2-L/2,A=E.left-H-S;break;case "right":V=E.top+E.height/2-L/2,A=E.right+S;break}if(a==="top"||a==="bottom")switch(s){case "start":A=E.left;break;case "center":A=E.left+E.width/2-H/2;break;case "end":A=E.right-H;break}if(a==="left"||a==="right")switch(s){case "start":V=E.top;break;case "center":V=E.top+E.height/2-L/2;break;case "end":V=E.bottom-L;break}A=Math.max(8,Math.min(A,window.innerWidth-H-8)),V=Math.max(8,Math.min(V,window.innerHeight-L-8)),x({top:V,left:A});};return P(),requestAnimationFrame(P),window.addEventListener("resize",P),window.addEventListener("scroll",P,true),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,true);}},[y,a,s]),j.useEffect(()=>{if(!y)return;let P=E=>{C.current&&!C.current.contains(E.target)&&R.current&&!R.current.contains(E.target)&&k(false);};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[y,k]),j.useEffect(()=>{if(!y)return;let P=E=>{E.key==="Escape"&&k(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[y,k]);let T=Ok[e??"help"],N=()=>{k(!y);},M=()=>{switch(a){case "top":return "bottom center";case "bottom":return "top center";case "left":return "right center";case "right":return "left center";default:return "center center"}};return jsxs(Fragment,{children:[o?j.isValidElement(o)?j.cloneElement(o,{ref:R,onClick:P=>{o.props.onClick?.(P),N();}}):jsx("button",{ref:R,type:"button",onClick:N,className:u(rc({variant:e,size:t}),m),"aria-label":"Help",children:o}):jsx("button",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},type:"button",onClick:N,className:u(rc({variant:e,size:t}),m),"aria-label":"Help",children:jsx(T,{className:"h-full w-full"})}),b&&y&&za.createPortal(jsxs("div",{ref:C,className:u(zk({size:t}),f),style:{position:"fixed",top:w.top,left:w.left,transformOrigin:M()},role:"tooltip",children:[r&&jsx("div",{className:"mb-2 font-semibold text-foreground",children:r}),jsx("div",{className:"text-muted-foreground",children:n}),c&&jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[d," \u2192"]}),jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...a==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...a==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...a==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...a==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});gh.displayName="ContextualHelp";var vh=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),nc=cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"bordered",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function hh({className:e,spacing:t,variant:r,size:n,items:o,selectedKeys:a,selectionMode:s="none",onSelectionChange:i,allowsRemoving:l=false,onRemove:c,label:d,description:m,errorMessage:f,maxTags:p,...g}){let[h,b]=j.useState(new Set),v=j.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),w=y=>{if(s==="none")return;let k;s==="single"?k=v.has(y)?new Set:new Set([y]):(k=new Set(v),k.has(y)?k.delete(y):k.add(y)),a||b(k),i?.(k);},x=(y,k)=>{k.stopPropagation(),c?.(y);},R=p?o.slice(0,p):o,C=p?Math.max(0,o.length-p):0;return jsxs("div",{className:"flex flex-col gap-1.5",children:[d&&jsx("span",{className:"text-sm font-medium text-foreground",children:d}),m&&jsx("span",{className:"text-sm text-muted-foreground",children:m}),jsxs("div",{role:"group","aria-label":d,className:u(vh({spacing:t}),e),...g,children:[R.map(y=>{let k=v.has(y.key),T=s!=="none";return jsxs("span",{role:T?"button":void 0,tabIndex:T&&!y.isDisabled?0:void 0,"aria-pressed":T?k:void 0,onClick:()=>!y.isDisabled&&w(y.key),onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&!y.isDisabled&&(N.preventDefault(),w(y.key));},style:y.color?{backgroundColor:y.color}:void 0,className:u(nc({variant:y.color?void 0:r,size:n,isSelected:k,isDisabled:y.isDisabled}),T&&!y.isDisabled&&"cursor-pointer hover:opacity-80",y.color&&"text-white"),children:[y.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:y.icon}),y.label,l&&!y.isDisabled&&jsx("button",{type:"button",onClick:N=>x(y.key,N),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${y.label}`,children:jsx(X,{className:"h-3 w-3"})})]},y.key)}),C>0&&jsxs("span",{className:u(nc({variant:"surface",size:n}),"cursor-default"),children:["+",C," more"]})]}),f&&jsx("span",{className:"text-sm text-danger",children:f})]})}hh.displayName="TagGroup";var Rh=cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",auto:"grid-cols-[repeat(auto-fill,minmax(150px,1fr))]"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{columns:"auto",gap:"md"}}),wh=cva("relative flex flex-col rounded-lg border transition-all cursor-pointer",{variants:{variant:{default:"hover:border-primary/50 hover:bg-accent/50",card:"bg-card shadow-sm hover:shadow-md hover:border-primary/50"},size:{sm:"p-2",md:"p-3",lg:"p-4"},isSelected:{true:"border-primary bg-accent ring-2 ring-primary/20",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function Ch({className:e,columns:t,gap:r,items:n,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,showSelectionIndicator:i=true,itemVariant:l="default",itemSize:c="md",renderItem:d,emptyContent:m,...f}){let[p,g]=j.useState(new Set),h=j.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),b=v=>{if(a==="none")return;let w;a==="single"?w=h.has(v)?new Set:new Set([v]):(w=new Set(h),w.has(v)?w.delete(v):w.add(v)),o||g(w),s?.(w);};return n.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:u(Rh({columns:t,gap:r,className:e})),...f,children:n.map(v=>{let w=h.has(v.key);return d?jsx("div",{role:"gridcell","aria-selected":w,onClick:()=>b(v.key),children:d(v,w)},v.key):jsxs("div",{role:"gridcell","aria-selected":w,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&b(v.key),className:u(wh({variant:l,size:c,isSelected:w,isDisabled:v.isDisabled})),children:[i&&a!=="none"&&w&&jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsx(Check,{className:"h-3 w-3"})}),v.thumbnail&&jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:v.thumbnail}),jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate font-medium",children:v.label}),v.description&&jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:v.description})]})]},v.key)})})}Ch.displayName="GridList";var Mh=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),$k=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),Gk=cva("h-full transition-all duration-300 ease-out",{variants:{color:{primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500",auto:""},rounded:{true:"rounded-full",false:"rounded-l-full"}},defaultVariants:{color:"primary",rounded:true}}),Ys=j.forwardRef(({className:e,size:t,value:r,min:n=0,max:o=100,optimum:a,low:s,high:i,label:l,showValueLabel:c=false,formatValue:d,color:m="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(r-n)/(o-n)*100)),b=()=>{if(m!=="auto")return "";let w=(r-n)/(o-n),x=s!==void 0?(s-n)/(o-n):.25,R=i!==void 0?(i-n)/(o-n):.75;return (a!==void 0?(a-n)/(o-n):1)>=.5?w<=x?"bg-red-500":w<=R?"bg-yellow-500":"bg-green-500":w>=R?"bg-red-500":w>=x?"bg-yellow-500":"bg-green-500"},v=d?d(r,h):`${Math.round(h)}%`;return jsxs("div",{ref:g,className:u("w-full",e),...p,children:[(l||c)&&jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l&&jsx("span",{className:"text-sm font-medium text-foreground",children:l}),c&&jsx("span",{className:"text-sm text-muted-foreground",children:v})]}),jsx("div",{role:"meter","aria-valuenow":r,"aria-valuemin":n,"aria-valuemax":o,"aria-label":l,className:u(Mh({size:t})),children:jsx("div",{className:u($k({variant:f})),children:jsx("div",{className:u(Gk({color:m==="auto"?void 0:m,rounded:h>=100}),m==="auto"&&b()),style:{width:`${h}%`}})})})]})});Ys.displayName="Meter";var Nh=j.forwardRef((e,t)=>jsx(Ys,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));Nh.displayName="DiskUsageMeter";var kh=j.forwardRef((e,t)=>jsx(Ys,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));kh.displayName="BatteryMeter";var Ph=cva("relative rounded-lg overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full min-h-48"}},defaultVariants:{size:"md"}}),Zs=(e,t,r)=>{let n=o=>{let a=(o+e/60)%6;return r-r*t*Math.max(Math.min(a,4-a,1),0)};return [Math.round(n(5)*255),Math.round(n(3)*255),Math.round(n(1)*255)]},Eh=(e,t,r)=>{e/=255,t/=255,r/=255;let n=Math.max(e,t,r),o=Math.min(e,t,r),a=n-o,s=0,i=n===0?0:a/n,l=n;if(a!==0)switch(n){case e:s=((t-r)/a+(t<r?6:0))*60;break;case t:s=((r-e)/a+2)*60;break;case r:s=((e-t)/a+4)*60;break}return [s,i,l]},Lh=e=>{let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null},Sh=(e,t,r)=>"#"+[e,t,r].map(n=>n.toString(16).padStart(2,"0")).join(""),Dh=j.forwardRef(({hue:e,saturation:t,brightness:r,value:n,defaultValue:o="#ff0000",onChange:a,onColorChange:s,size:i,disabled:l,thumbSize:c=18,className:d,...m},f)=>{let p=j.useRef(null),[g,h]=j.useState(false),b=j.useCallback(I=>{let F=Lh(I);return F?Eh(...F):[0,1,1]},[]),[v,w]=j.useState(()=>b(n||o)),x=e??v[0],R=t??v[1],C=r??v[2];j.useEffect(()=>{if(n){let I=b(n);w(I);}},[n,b]);let y=j.useCallback((I,F)=>{if(l||!p.current)return;let K=p.current.getBoundingClientRect(),Y=Math.max(0,Math.min(1,(I-K.left)/K.width)),te=Math.max(0,Math.min(1,(F-K.top)/K.height)),$=Y,O=1-te;t===void 0&&r===void 0&&w([x,$,O]),a?.({hue:x,saturation:$,brightness:O});let W=Zs(x,$,O);s?.(Sh(...W));},[l,x,t,r,a,s]),k=I=>{l||(I.preventDefault(),h(true),I.target.setPointerCapture(I.pointerId),y(I.clientX,I.clientY));},T=I=>{g&&y(I.clientX,I.clientY);},N=I=>{h(false),I.target.releasePointerCapture(I.pointerId);},[M,P,E]=Zs(x,1,1),D=`rgb(${M}, ${P}, ${E})`,H=R*100,L=(1-C)*100,[S,V,A]=Zs(x,R,C),B=`rgb(${S}, ${V}, ${A})`;return jsx("div",{ref:f,className:u(Ph({size:i}),l&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:D},onPointerDown:k,onPointerMove:T,onPointerUp:N,onPointerLeave:N,children:[jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to right, white, transparent)"}}),jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, black)"}}),jsx("div",{className:"absolute rounded-full border-2 border-white pointer-events-none",style:{width:c,height:c,left:`calc(${H}% - ${c/2}px)`,top:`calc(${L}% - ${c/2}px)`,backgroundColor:B,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Dh.displayName="ColorArea";var Ih=cva("relative rounded-full cursor-pointer touch-none select-none",{variants:{orientation:{horizontal:"w-full",vertical:"h-full"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",size:"sm",className:"h-3"},{orientation:"horizontal",size:"md",className:"h-4"},{orientation:"horizontal",size:"lg",className:"h-5"},{orientation:"vertical",size:"sm",className:"w-3"},{orientation:"vertical",size:"md",className:"w-4"},{orientation:"vertical",size:"lg",className:"w-5"}],defaultVariants:{orientation:"horizontal",size:"md"}}),_k=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,Hh="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",Vh=j.forwardRef(({value:e,defaultValue:t,onChange:r,channel:n="hue",baseColor:o="#ff0000",orientation:a,size:s,disabled:i,thumbSize:l=18,showBorder:c=true,className:d,...m},f)=>{let p=j.useRef(null),[g,h]=j.useState(false),b=()=>{switch(n){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,w]=j.useState(t??b()),x=e??v,R=n==="hue"?x/360:x,C=j.useCallback((D,H)=>{if(i||!p.current)return;let L=p.current.getBoundingClientRect(),S=a!=="vertical",V;S?V=Math.max(0,Math.min(1,(D-L.left)/L.width)):V=Math.max(0,Math.min(1,1-(H-L.top)/L.height));let A=n==="hue"?V*360:V;e===void 0&&w(A),r?.(A);},[i,a,n,e,r]),y=D=>{i||(D.preventDefault(),h(true),D.target.setPointerCapture(D.pointerId),C(D.clientX,D.clientY));},k=D=>{g&&C(D.clientX,D.clientY);},T=D=>{h(false),D.target.releasePointerCapture(D.pointerId);},N=()=>{let D=a!=="vertical",H=D?"to right":"to top";switch(n){case "hue":return D?Hh:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${o})`;case "saturation":return `linear-gradient(${H}, #808080, ${o})`;case "brightness":return `linear-gradient(${H}, #000000, ${o})`;default:return Hh}},M=()=>n==="hue"?`hsl(${x}, 100%, 50%)`:o,P=a!=="vertical",E=R*100;return jsx("div",{ref:f,className:u(Ih({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:u("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:n==="alpha"?_k:void 0,backgroundSize:n==="alpha"?"8px 8px":void 0},onPointerDown:y,onPointerMove:k,onPointerUp:T,onPointerLeave:T,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:N()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...P?{left:`calc(${E}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${E}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:M(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Vh.displayName="ColorSlider";var Ah=cva("relative cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64"}},defaultVariants:{size:"md"}}),qk=(e,t,r)=>{let n=e-r,o=t-r,a=Math.atan2(o,n)*180/Math.PI+90;return a<0&&(a+=360),a},zh=j.forwardRef(({value:e,defaultValue:t=0,onChange:r,size:n,disabled:o,innerRadius:a=.6,thumbSize:s=20,showCenter:i=true,className:l,...c},d)=>{let m=j.useRef(null),[f,p]=j.useState(false),[g,h]=j.useState(t),b=e??g,v=j.useCallback((y,k)=>{if(o||!m.current)return;let T=m.current.getBoundingClientRect(),N=T.width/2,M=y-T.left,P=k-T.top,E=qk(M,P,N);e===void 0&&h(E),r?.(E);},[o,e,r]),w=y=>{o||(y.preventDefault(),p(true),y.target.setPointerCapture(y.pointerId),v(y.clientX,y.clientY));},x=y=>{f&&v(y.clientX,y.clientY);},R=y=>{p(false),y.target.releasePointerCapture(y.pointerId);},C=()=>{let y=[];for(let k=0;k<=360;k+=30)y.push(`hsl(${k}, 100%, 50%) ${k}deg`);return `conic-gradient(from 270deg, ${y.join(", ")})`};return jsx("div",{ref:d,className:u(Ah({size:n}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxs("div",{ref:m,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:w,onPointerMove:x,onPointerUp:R,onPointerLeave:R,children:[a<1&&jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-a)*50}%`,left:`${(1-a)*50}%`,width:`${a*100}%`,height:`${a*100}%`}}),i&&a<1&&jsx("div",{className:"absolute rounded-full border-2 border-input bg-background",style:{width:8,height:8,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),jsx(Zk,{hue:b,innerRadius:a,thumbSize:s})]})})});zh.displayName="ColorWheel";var Zk=({hue:e,innerRadius:t,thumbSize:r})=>{let n=(1-(1-t)/2)*50,o=(e-90)*Math.PI/180,a=50+n*Math.cos(o),s=50+n*Math.sin(o);return jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:r,height:r,left:`calc(${a}% - ${r/2}px)`,top:`calc(${s}% - ${r/2}px)`,backgroundColor:`hsl(${e}, 100%, 50%)`,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})};var Bh=cva("flex",{variants:{orientation:{horizontal:"flex-row items-center gap-2",vertical:"flex-col gap-1"},size:{sm:"",md:"",lg:""},align:{start:"items-start",center:"items-center",end:"items-end"}},compoundVariants:[{orientation:"horizontal",align:"start",className:"items-start"},{orientation:"horizontal",align:"center",className:"items-center"},{orientation:"horizontal",align:"end",className:"items-end"}],defaultVariants:{orientation:"vertical",size:"md",align:"start"}}),Jk=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),eP=cva("text-foreground",{variants:{size:{sm:"text-sm",md:"text-base",lg:"text-lg"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},mono:{true:"font-mono",false:""}},defaultVariants:{size:"md",weight:"normal",mono:false}}),Fh=j.forwardRef(({className:e,orientation:t,size:r,align:n,label:o,value:a,valueWeight:s,mono:i,labelWidth:l,labelClassName:c,valueClassName:d,showColon:m=false,copyable:f=false,onCopy:p,...g},h)=>{let b=async()=>{if(!(!f||a===null||a===void 0))try{let v=typeof a=="string"?a:String(a);await navigator.clipboard.writeText(v),p?.();}catch{}};return jsxs("div",{ref:h,className:u(Bh({orientation:t,size:r,align:n,className:e})),...g,children:[jsxs("span",{className:u(Jk({size:r}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,m&&":"]}),jsx("span",{className:u(eP({size:r,weight:s,mono:i}),f&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",d),onClick:f?b:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,onKeyDown:f?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),b());}:void 0,children:a})]})});Fh.displayName="LabeledValue";var Kh=cva("",{variants:{orientation:{horizontal:"flex flex-row flex-wrap",vertical:"flex flex-col"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"vertical",gap:"md"}}),$h=j.forwardRef(({className:e,orientation:t,gap:r,...n},o)=>jsx("div",{ref:o,className:u(Kh({orientation:t,gap:r,className:e})),...n}));$h.displayName="LabeledValueGroup";var jh=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),yo=cva("text-muted-foreground shrink-0",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),_h=j.forwardRef(({value:e,defaultValue:t="",onChange:r,onSearch:n,onSelect:o,suggestions:a=[],recentSearches:s=[],onClearRecentSearches:i,trendingSearches:l=[],isLoading:c,showClear:d=true,showIcon:m=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:b,placeholder:v="Search...",disabled:w,...x},R)=>{let[C,y]=j.useState(false),[k,T]=j.useState(t),N=e!==void 0?e:k,M=j.useRef(null);j.useImperativeHandle(R,()=>M.current);let P=N.length>0,E=C&&(a.length>0||s.length>0||l.length>0||P),D=I=>{e===void 0&&T(I),r?.(I);},H=()=>{D(""),M.current?.focus();},L=I=>{I?.preventDefault(),N.trim()&&(n?.(N.trim()),y(false));},S=I=>{D(I.label),o?.(I),y(false);},V=I=>{D(I),n?.(I),y(false);},A=I=>{D(I),n?.(I),y(false);},B=j.useMemo(()=>{let I={};return a.forEach(F=>{let K=F.category||"Results";I[K]||(I[K]=[]),I[K].push(F);}),I},[a]);return jsxs(je,{open:E,onOpenChange:y,children:[jsx(Ur,{children:jsxs("form",{onSubmit:L,className:u(jh({size:g,variant:h}),b),children:[m&&jsx(Search,{className:u(yo({size:g}),"ml-3")}),jsx("input",{ref:M,type:"text",value:N,onChange:I=>D(I.target.value),onFocus:()=>y(true),placeholder:v,disabled:w,className:u("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!m&&"pl-3"),...x}),d&&P&&!w&&jsx("button",{type:"button",onClick:H,className:u("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",yo({size:g})),children:jsx(X,{className:"h-full w-full"})})]})}),jsx(_e,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:I=>I.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!P&&jsxs("div",{className:"p-2",children:[jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Recent"}),i&&jsx("button",{type:"button",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((I,F)=>jsxs("button",{type:"button",onClick:()=>V(I),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:u(yo({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:I}),jsx(ArrowRight,{className:u(yo({size:g}),"opacity-0 group-hover:opacity-100")})]},F))]}),l.length>0&&!P&&jsxs("div",{className:"border-t p-2",children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Trending"})}),l.map((I,F)=>jsxs("button",{type:"button",onClick:()=>A(I),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:u(yo({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:I})]},F))]}),P&&jsx("div",{className:"p-2",children:c?jsx("div",{className:"flex items-center justify-center py-6",children:jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):a.length>0?Object.entries(B).map(([I,F])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:I})}),F.map(K=>jsxs("button",{type:"button",onClick:()=>S(K),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[K.icon||jsx(Search,{className:u(yo({size:g}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:K.label}),K.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:K.description})]})]},K.id))]},I)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});_h.displayName="SearchBar";var Xh={Pages:jsx(File,{className:"h-4 w-4"}),Files:jsx(Folder,{className:"h-4 w-4"}),Settings:jsx(Settings,{className:"h-4 w-4"}),Users:jsx(User,{className:"h-4 w-4"}),Tags:jsx(Hash,{className:"h-4 w-4"})},Zh=j.forwardRef(({open:e,onOpenChange:t,items:r=[],recentItems:n=[],placeholder:o="Search...",isLoading:a,emptyMessage:s="No results found.",filter:i,shortcut:l="\u2318K",onSelect:c,footer:d},m)=>{let[f,p]=j.useState(""),g=j.useRef(null),[h,b]=j.useState(false);j.useEffect(()=>{b(true);},[]),j.useEffect(()=>{e||p("");},[e]),j.useEffect(()=>{if(!e)return;let y=k=>{k.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[e,t]),j.useEffect(()=>{if(e)return Ft(),()=>Kt()},[e]);let v=j.useMemo(()=>{let y={};return r.forEach(k=>{let T=k.category||"Results";y[T]||(y[T]=[]),y[T].push(k);}),y},[r]),w=y=>{y.onSelect?.(),c?.(y),t?.(false);},x=()=>{t?.(false);},R=f.length>0,C=!R&&n.length>0;return !h||!e?null:za.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":e?"open":"closed",onClick:x}),jsx("div",{ref:m,className:"fixed left-1/2 top-[20%] z-50 w-full max-w-2xl -translate-x-1/2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2","data-state":e?"open":"closed",children:jsxs(Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:i,shouldFilter:!i,children:[jsxs("div",{className:"flex items-center border-b px-4",children:[jsx(Search,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),jsx(Command.Input,{ref:g,value:f,onValueChange:p,placeholder:o,className:"flex h-14 w-full bg-transparent px-4 py-4 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),f&&jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsx(X,{className:"h-4 w-4"})})]}),jsx(Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:a?jsx("div",{className:"flex items-center justify-center py-10",children:jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):jsxs(Fragment,{children:[C&&jsxs(Command.Group,{heading:"Recent",children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),n.map(y=>jsxs(Command.Item,{value:y.label,onSelect:()=>w(y),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:y.icon||Xh[y.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:y.label}),y.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:y.description})]}),y.shortcut&&jsx("div",{className:"flex items-center gap-1",children:y.shortcut.map((k,T)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:k},T))})]},y.id))]}),R&&Object.entries(v).map(([y,k])=>jsxs(Command.Group,{heading:y,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:y}),k.map(T=>jsxs(Command.Item,{value:`${T.label} ${T.keywords?.join(" ")||""}`,onSelect:()=>w(T),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:T.icon||Xh[y]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:T.label}),T.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:T.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},T.id))]},y)),jsx(Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),d?jsx("div",{className:"border-t px-4 py-3",children:d}):jsxs("div",{className:"flex items-center justify-between border-t px-4 py-3 text-xs text-muted-foreground",children:[jsxs("div",{className:"flex items-center gap-4",children:[jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u2191\u2193"}),"Navigate"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u21B5"}),"Select"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"Esc"}),"Close"]})]}),jsxs("span",{className:"flex items-center gap-1",children:["Press ",jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:l})," to open"]})]})]})})]}),document.body)});Zh.displayName="SpotlightSearch";function pP(e="k"){let[t,r]=j.useState(false);return j.useEffect(()=>{let n=o=>{(o.metaKey||o.ctrlKey)&&o.key===e&&(o.preventDefault(),r(a=>!a));};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e]),{open:t,setOpen:r,toggle:()=>r(n=>!n)}}var ex=j.createContext(null),Js=()=>{let e=j.useContext(ex);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},RP=({children:e,notifications:t,onNotificationsChange:r})=>{let[n,o]=j.useState([]),[a,s]=j.useState(false),i=j.useRef(null),l=t!==void 0,c=l?t:n,d=j.useCallback(b=>{l?r?.(b):o(b);},[l,r]),m=c.filter(b=>!b.read).length,f=j.useCallback(b=>{d(c.map(v=>v.id===b?{...v,read:true}:v));},[c,d]),p=j.useCallback(()=>{d(c.map(b=>({...b,read:true})));},[c,d]),g=j.useCallback(b=>{d(c.filter(v=>v.id!==b));},[c,d]),h=j.useCallback(()=>{d([]);},[d]);return jsx(ex.Provider,{value:{notifications:c,unreadCount:m,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},tx=j.forwardRef(({className:e,children:t,...r},n)=>jsx("div",{ref:n,className:u("relative inline-block",e),...r,children:t}));tx.displayName="NotificationCenter";var rx=j.forwardRef(({className:e,showBadge:t=true,children:r,onClick:n,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=Js(),d=f=>{n?.(f),l(!i);},m=s>99?"99+":String(s);return jsxs("button",{ref:f=>{c.current=f,typeof a=="function"?a(f):a&&(a.current=f);},type:"button",onClick:d,"aria-label":"Notifications"+(s>0?", "+s+" unread":""),className:u("relative inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...o,children:[r||jsx(Bell,{className:"h-5 w-5"}),t&&s>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-medium text-danger-foreground",children:m})]})});rx.displayName="NotificationCenterTrigger";var nx=j.forwardRef(({className:e,align:t="end",sideOffset:r=8,emptyMessage:n="No notifications",children:o,...a},s)=>{let{open:i,setOpen:l,notifications:c,markAllAsRead:d,clearAll:m,triggerRef:f}=Js(),[p,g]=j.useState(false),h=j.useRef(null),[b,v]=j.useState({top:0,left:0});return j.useEffect(()=>{g(true);},[]),j.useEffect(()=>{if(!i||!f.current||!h.current)return;let w=()=>{if(!f.current||!h.current)return;let x=f.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),C=x.bottom+r,y=x.left;t==="center"?y=x.left+x.width/2-R.width/2:t==="end"&&(y=x.right-R.width),y+R.width>window.innerWidth-16&&(y=window.innerWidth-R.width-16),y<16&&(y=16),v({top:C,left:y});};return w(),window.addEventListener("resize",w),window.addEventListener("scroll",w,true),()=>{window.removeEventListener("resize",w),window.removeEventListener("scroll",w,true);}},[i,f,t,r]),j.useEffect(()=>{if(!i)return;let w=R=>{h.current&&!h.current.contains(R.target)&&f.current&&!f.current.contains(R.target)&&l(false);},x=R=>{R.key==="Escape"&&l(false);};return document.addEventListener("mousedown",w),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",w),document.removeEventListener("keydown",x);}},[i,l,f]),!p||!i?null:za.createPortal(jsxs("div",{ref:w=>{h.current=w,typeof s=="function"?s(w):s&&(s.current=w);},className:u("fixed z-50 w-80 sm:w-96 max-h-[70vh] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:b.top,left:b.left},...a,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsx("h3",{className:"font-semibold",children:"Notifications"}),jsxs("div",{className:"flex items-center gap-2",children:[c.length>0&&jsxs(Fragment,{children:[jsx("button",{type:"button",onClick:d,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all read"}),jsx("button",{type:"button",onClick:m,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]}),jsx("button",{type:"button",onClick:()=>l(false),className:"rounded-md p-1 hover:bg-accent",children:jsx(X,{className:"h-4 w-4"})})]})]}),jsx("div",{className:"max-h-[calc(70vh-60px)] overflow-y-auto",children:o||(c.length===0?jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[jsx(Bell,{className:"h-10 w-10 mb-2 opacity-50"}),jsx("p",{className:"text-sm",children:n})]}):c.map(w=>jsx(lc,{notification:w},w.id)))})]}),document.body)});nx.displayName="NotificationCenterContent";var wP={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},CP={info:Info,success:CheckCircle,warning:AlertTriangle,error:AlertCircle},lc=({notification:e,onMarkAsRead:t,onRemove:r})=>{let{markAsRead:n,removeNotification:o}=Js(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:m,action:f}=e,p=CP[l],g=()=>{t?t():n(a);},h=()=>{r?r():o(a);},b=v=>{if(!v)return null;let w=typeof v=="string"?new Date(v):v,R=new Date().getTime()-w.getTime(),C=Math.floor(R/6e4),y=Math.floor(R/36e5),k=Math.floor(R/864e5);return C<1?"Just now":C<60?C+"m ago":y<24?y+"h ago":k<7?k+"d ago":w.toLocaleDateString()};return jsxs("div",{className:u("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",wP[l],!d&&"bg-accent/20"),children:[jsx("div",{className:"flex-shrink-0",children:m||jsx("div",{className:u("flex h-8 w-8 items-center justify-center rounded-full",l==="info"&&"bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400",l==="success"&&"bg-green-100 text-green-600 dark:bg-green-900 dark:text-green-400",l==="warning"&&"bg-yellow-100 text-yellow-600 dark:bg-yellow-900 dark:text-yellow-400",l==="error"&&"bg-red-100 text-red-600 dark:bg-red-900 dark:text-red-400"),children:jsx(p,{className:"h-4 w-4"})})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsx("p",{className:u("text-sm font-medium",!d&&"font-semibold"),children:s}),!d&&jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-primary"})]}),i&&jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:i}),jsxs("div",{className:"mt-2 flex items-center gap-3",children:[c&&jsx("span",{className:"text-xs text-muted-foreground",children:b(c)}),f&&jsx("button",{type:"button",onClick:f.onClick,className:"text-xs font-medium text-primary hover:underline",children:f.label})]})]}),jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:jsxs("div",{className:"flex gap-1",children:[!d&&jsx("button",{type:"button",onClick:g,className:"rounded-md p-1 hover:bg-accent",title:"Mark as read",children:jsx(Check,{className:"h-4 w-4"})}),jsx("button",{type:"button",onClick:h,className:"rounded-md p-1 hover:bg-accent text-danger",title:"Remove",children:jsx(Trash2,{className:"h-4 w-4"})})]})})]})};lc.displayName="NotificationItem";var ox=j.forwardRef(({className:e,children:t,...r},n)=>jsx("div",{ref:n,className:u("divide-y",e),...r,children:t}));ox.displayName="NotificationList";var ax=cva("relative flex items-center justify-center gap-3 px-4 py-2.5 text-sm",{variants:{variant:{solid:"",flat:""},type:{default:"",success:"",warning:"",error:""},position:{top:"fixed top-0 left-0 right-0 z-50",relative:"relative"}},compoundVariants:[{variant:"solid",type:"default",className:"bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"bg-green-600 text-white dark:bg-green-500 [&>svg]:text-white"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"bg-amber-600 text-white dark:bg-amber-500 [&>svg]:text-white"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"bg-red-600 text-white dark:bg-red-500 [&>svg]:text-white"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",position:"relative"}}),SP={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},sx=j.forwardRef(({message:e,type:t="default",variant:r="solid",showIcon:n=false,icon:o,dismissible:a=true,onDismiss:s,endContent:i,position:l,animate:c,autoDismiss:d,storageKey:m,className:f,...p},g)=>{let[h,b]=j.useState(true),[v,w]=j.useState(false);j.useEffect(()=>{m&&localStorage.getItem(`banner-${m}`)==="true"&&b(false);},[m]),j.useEffect(()=>{if(d&&h){let y=setTimeout(()=>{x();},d);return ()=>clearTimeout(y)}},[d,h]);let x=()=>{w(true),setTimeout(()=>{b(false),m&&localStorage.setItem(`banner-${m}`,"true"),s?.();},200);};if(!h)return null;let R=SP[t],C=n?o!==void 0?o:R?jsx(R,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:g,className:u(ax({variant:r,type:t,position:l}),c&&"animate-pulse",v&&"animate-out fade-out slide-out-to-top duration-200",f),role:"banner",...p,children:[C&&jsx("span",{className:"shrink-0",children:C}),jsx("span",{className:"text-center font-medium",children:e}),i&&jsx("div",{className:"shrink-0 ml-2",children:i}),a&&jsx("button",{type:"button",onClick:x,className:u("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsx(X,{className:"h-4 w-4"})})]})});sx.displayName="Banner";var ma=cva("inline-flex items-center justify-center rounded-full shadow-lg transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border-2 border-current bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border-2 border-current bg-transparent text-primary hover:bg-primary hover:text-primary-foreground"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"solid",size:"md",position:"bottom-right"}}),IP=cva("transition-transform duration-200 [&>svg]:h-full [&>svg]:w-full",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),dc=j.forwardRef(({icon:e,label:t="Action button",extended:r,extendedLabel:n,actions:o,direction:a="up",showTooltip:s=true,closeIcon:i,animation:l="rotate",variant:c,size:d,position:m,className:f,onClick:p,disabled:g,...h},b)=>{let[v,w]=j.useState(false),x=o&&o.length>0,R=N=>{x&&w(!v),p?.(N);},C=N=>{N.onClick?.(),w(false);},y={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},k=l==="rotate"&&v?"rotate-45":"",T=l==="scale"&&v?"scale-0":"scale-100";return jsxs("div",{className:u("relative z-50",m!=="relative"&&m&&ma({position:m})),children:[x&&v&&jsx("div",{className:u("absolute left-1/2 -translate-x-1/2 flex items-center",y[a].container),children:o.map((N,M)=>jsxs("div",{className:u("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${M*50}ms`},children:[s&&(a==="up"||a==="down")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:N.label}),N.href?jsx("a",{href:N.href,className:u(ma({variant:N.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":N.label,children:N.icon}):jsx("button",{type:"button",onClick:()=>C(N),className:u(ma({variant:N.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":N.label,children:N.icon}),s&&(a==="left"||a==="right")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:N.label})]},N.id))}),jsxs("button",{ref:b,type:"button",onClick:R,disabled:g,className:u(ma({variant:c,size:d,position:"relative"}),r&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":x?v:void 0,...h,children:[v&&i?i:jsx("span",{className:u(IP({size:d}),k,T,"transition-all duration-200"),children:e||jsx(Plus,{})}),r&&n&&jsx("span",{className:"font-medium",children:n})]}),x&&v&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>w(false)})]})});dc.displayName="FloatingActionButton";var VP=dc;var ux=cva("fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background safe-area-pb",{variants:{variant:{default:"border-border",elevated:"border-transparent shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]",filled:"border-transparent bg-primary text-primary-foreground"},size:{sm:"h-14",md:"h-16",lg:"h-20"}},defaultVariants:{variant:"default",size:"md"}}),lx=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),mx=j.forwardRef(({className:e,variant:t,size:r,items:n,value:o,defaultValue:a,onValueChange:s,showLabels:i="all",renderItem:l,...c},d)=>{let[m,f]=j.useState(a||n[0]?.key),p=o!==void 0,g=p?o:m,h=x=>{x.disabled||(p||f(x.key),s?.(x.key));},b=x=>t==="filled"?x?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":x?"text-primary":"text-muted-foreground hover:text-foreground",v=()=>{switch(r){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},w=()=>{switch(r){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:d,className:u(ux({variant:t,size:r}),e),role:"navigation","aria-label":"Bottom navigation",...c,children:n.map(x=>{let R=g===x.key,C=i==="all"||i==="active"&&R,y=R&&x.activeIcon?x.activeIcon:x.icon;if(l)return jsx("div",{onClick:()=>h(x),className:u(lx({variant:t}),x.disabled&&"opacity-50 cursor-not-allowed"),children:l(x,R)},x.key);let k=jsxs("div",{onClick:()=>!x.href&&h(x),className:u(lx({variant:t}),b(R),x.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":R?"page":void 0,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),h(x));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:u(v(),"[&>svg]:h-full [&>svg]:w-full"),children:y}),x.badge!==void 0&&x.badge>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white",children:x.badge>99?"99+":x.badge}),x.showDot&&jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),C&&x.label&&jsx("span",{className:u(w(),"font-medium truncate max-w-full px-1"),children:x.label})]},x.key);return x.href&&!x.disabled?jsx("a",{href:x.href,onClick:()=>h(x),className:u("flex flex-1 flex-col items-center justify-center gap-1 no-underline",b(R)),children:k},x.key):k})})});mx.displayName="BottomNavigation";var zP="fixed inset-x-0 bottom-0 z-50 mt-24 flex h-fit max-h-[90vh] flex-col rounded-t-[20px] border-t border-border/40 dark:border-border/20 bg-background",fx=cva("flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors focus-visible:outline-none focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-accent",destructive:"text-danger hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),gx=j.forwardRef(({open:e,onOpenChange:t,trigger:r,title:n,description:o,items:a,cancelLabel:s="Cancel",onCancel:i,showCancel:l=true,children:c,closeOnSelect:d=true,onAction:m},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),m?.(g.key),d&&t?.(false));};return jsxs(Drawer.Root,{open:e,onOpenChange:t,children:[r&&jsx(Drawer.Trigger,{asChild:true,children:r}),jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxs(Drawer.Content,{ref:f,className:zP,children:[jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(n||o)&&jsxs("div",{className:"px-4 py-3 text-center",children:[n&&jsx(Drawer.Title,{className:"text-base font-semibold",children:n}),o&&jsx(Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:o})]}),jsx("div",{className:"flex-1 overflow-y-auto",children:c||jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:a?.map(g=>jsxs("button",{type:"button",disabled:g.isDisabled,onClick:()=>p(g),className:u(fx({variant:g.isDestructive?"destructive":"default"})),children:[g.icon&&jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"font-medium",children:g.label}),g.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:g.description})]})]},g.key))})}),l&&jsx("div",{className:"border-t border-border/40 dark:border-border/20 p-2 pb-safe",children:jsx(Drawer.Close,{asChild:true,children:jsx("button",{type:"button",onClick:i,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});gx.displayName="ActionSheet";var vx=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),mc=cva("flex h-full items-center justify-center px-4 text-white font-medium transition-opacity",{variants:{variant:{primary:"bg-primary",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500"},size:{sm:"min-w-16",md:"min-w-20",lg:"min-w-24"}},defaultVariants:{variant:"primary",size:"md"}}),hx=j.forwardRef(({className:e,variant:t,leftActions:r=[],rightActions:n=[],actionSize:o="md",threshold:a=.3,onSwipeEnd:s,disabled:i=false,fullSwipeAction:l,children:c,...d},m)=>{let f=j.useRef(null),[p,g]=j.useState(0),[h,b]=j.useState(false),v=j.useRef(0),w=j.useRef(0),x=r.length*(o==="sm"?64:o==="lg"?96:80),R=n.length*(o==="sm"?64:o==="lg"?96:80),C=M=>{i||(b(true),v.current=M.touches[0].clientX,w.current=p);},y=M=>{if(!h||i)return;let E=M.touches[0].clientX-v.current,D=w.current+E;(D>0&&r.length===0||D<0&&n.length===0)&&(D=0),D>x?D=x+(D-x)*.3:D<-R&&(D=-R+(D+R)*.3),g(D);},k=()=>{if(!h)return;b(false);let M=f.current?.offsetWidth||0,P=Math.abs(p)/M;if(l&&P>.6){l==="right"&&p>0&&r[0]?(r[0].onAction?.(),s?.("right",r[0].key)):l==="left"&&p<0&&n[0]&&(n[0].onAction?.(),s?.("left",n[0].key)),g(0);return}p>x*a&&r.length>0?(g(x),s?.("right")):p<-R*a&&n.length>0?(g(-R),s?.("left")):g(0);},T=(M,P)=>{M.onAction?.(),s?.(P,M.key),g(0);},N=()=>{g(0);};return jsxs("div",{ref:m,className:u(vx({variant:t,className:e})),...d,children:[r.length>0&&p>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:x},children:r.map(M=>jsxs("button",{type:"button",onClick:()=>T(M,"right"),className:u(mc({variant:M.variant,size:o})),style:{opacity:Math.min(1,p/x)},children:[M.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:M.icon}),!M.icon&&M.label]},M.key))}),n.length>0&&p<0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:R},children:n.map(M=>jsxs("button",{type:"button",onClick:()=>T(M,"left"),className:u(mc({variant:M.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/R)},children:[M.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:M.icon}),!M.icon&&M.label]},M.key))}),jsx("div",{ref:f,className:u("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:y,onTouchEnd:k,onClick:p!==0?N:void 0,children:c})]})});hx.displayName="SwipeActions";var yx=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),FP=cva("absolute left-1/2 -translate-x-1/2 flex items-center justify-center transition-all duration-200",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{size:"md"}}),Rx=j.forwardRef(({className:e,variant:t,onRefresh:r,pullThreshold:n=80,maxPullDistance:o=120,loadingIndicator:a,pullIndicator:s,indicatorSize:i="md",disabled:l=false,pullText:c="Pull to refresh",releaseText:d="Release to refresh",refreshingText:m="Refreshing...",children:f,...p},g)=>{let h=j.useRef(null),[b,v]=j.useState(0),[w,x]=j.useState("idle"),R=j.useRef(0),C=j.useRef(false),y=()=>l||w==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,k=E=>{y()&&(R.current=E.touches[0].clientY,C.current=true);},T=E=>{if(!C.current||!y())return;let H=E.touches[0].clientY-R.current;if(H<0){v(0),x("idle");return}let S=Math.min(H*.5,o);v(S),x(S>=n?"ready":"pulling");},N=async()=>{if(C.current)if(C.current=false,w==="ready"){x("refreshing"),v(n*.6);try{await r();}finally{x("idle"),v(0);}}else x("idle"),v(0);},M={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],P=()=>{if(w==="refreshing")return a||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:u(M,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:m})]});let E=Math.min(b/n*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:u(M,"text-muted-foreground transition-transform"),style:{transform:`rotate(${E}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:w==="ready"?d:c})]})};return jsxs("div",{ref:g,className:u(yx({variant:t,className:e})),...p,children:[jsx("div",{className:u(FP({size:i}),"z-10",w==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(n*.5),1)},children:P()}),jsx("div",{ref:h,className:u("transition-transform duration-200",w==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:C.current?"none":void 0},onTouchStart:k,onTouchMove:T,onTouchEnd:N,children:f})]})});Rx.displayName="PullToRefresh";var Fn=(e,t,r)=>({duration:e,delay:t,ease:r||[.4,0,.2,1]}),KP={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},wx=j.forwardRef(({show:e=true,children:t,duration:r=.3,delay:n=0,ease:o,className:a,unmountOnExit:s=true,initialOpacity:i=0,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=jsx(motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:KP,custom:i,transition:Fn(r,n,o),className:u(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsx(AnimatePresence,{children:e&&m}):m});wx.displayName="Fade";var $P=(e,t)=>{let r=typeof t=="number"?`${t}px`:t,n={up:{y:r},down:{y:`-${r}`},left:{x:r},right:{x:`-${r}`}};return {hidden:{opacity:0,...n[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...n[e]}}},Cx=j.forwardRef(({show:e=true,children:t,duration:r=.3,delay:n=0,ease:o,className:a,unmountOnExit:s=true,direction:i="up",offset:l=20,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=j.useMemo(()=>$P(i,l),[i,l]),p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Fn(r,n,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Cx.displayName="Slide";var GP={center:"center center",top:"center top",bottom:"center bottom",left:"left center",right:"right center","top-left":"left top","top-right":"right top","bottom-left":"left bottom","bottom-right":"right bottom"},UP={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},Tx=j.forwardRef(({show:e=true,children:t,duration:r=.3,delay:n=0,ease:o,className:a,unmountOnExit:s=true,initialScale:i=.9,origin:l="center",onAnimationStart:c,onAnimationComplete:d},m)=>{let f=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:UP,custom:i,transition:Fn(r,n,o),className:u(a),style:{transformOrigin:GP[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&f}):f});Tx.displayName="Scale";var Mx=j.forwardRef(({show:e=true,children:t,duration:r=.3,delay:n=0,ease:o,className:a,horizontal:s=false,startingSize:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=s?"width":"height",p={hidden:{[f]:i,opacity:l?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:Fn(r,n,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});Mx.displayName="Collapse";var Nx=j.forwardRef(({show:e=true,children:t,duration:r=.4,delay:n=0,ease:o,className:a,initialWidth:s=0,initialHeight:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{width:s,height:i,opacity:l?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:Fn(r,n,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});Nx.displayName="Expand";var kx=j.forwardRef(({show:e=true,children:t,duration:r=.3,delay:n=0,ease:o,className:a,unmountOnExit:s=true,initialRotation:i=-180,finalRotation:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Fn(r,n,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});kx.displayName="Rotate";var Px=j.forwardRef(({front:e,back:t,direction:r="horizontal",flipped:n=false,duration:o=.6,delay:a=0,ease:s,className:i,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=r==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:d,className:u("relative",i),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[m]:n?180:0},transition:Fn(o,a,s),style:{transformStyle:"preserve-3d"},onAnimationStart:l,onAnimationComplete:c,children:[jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${m}(180deg)`},children:t})]})})});Px.displayName="Flip";var Ex=j.forwardRef(({color:e="currentColor",duration:t=.6,children:r,className:n,disabled:o=false},a)=>{let[s,i]=j.useState([]),l=j.useRef(null),c=m=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=m.clientX-p.left,h=m.clientY-p.top,b=Math.max(p.width,p.height)*2,v={id:Date.now(),x:g,y:h,size:b};i(w=>[...w,v]);},d=m=>{i(f=>f.filter(p=>p.id!==m));};return jsxs("div",{ref:a,className:u("relative overflow-hidden rounded-[inherit]",n),onClick:c,children:[jsx("div",{ref:l,className:"relative z-0",children:r}),jsx(AnimatePresence,{children:s.map(m=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(m.id),className:"pointer-events-none absolute rounded-full",style:{left:m.x-m.size/2,top:m.y-m.size/2,width:m.size,height:m.size,backgroundColor:e}},m.id))})]})});Ex.displayName="Ripple";var Lx=j.forwardRef(({children:e,animate:t=true,height:r=10,duration:n=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=j.useState(false),d=s?l:t,m={idle:{y:0},bounce:{y:[0,-r,0],transition:{duration:n,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"bounce":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});Lx.displayName="Bounce";var _P={subtle:[0,-2,2,-2,2,-1,1,0],normal:[0,-5,5,-5,5,-3,3,0],strong:[0,-10,10,-10,10,-5,5,0]},Sx=j.forwardRef(({children:e,animate:t=true,intensity:r="normal",duration:n=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=j.useState(false),d=s?l:t,m={idle:{x:0},shake:{x:_P[r],transition:{duration:n,ease:"easeInOut",repeat:o-1}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"shake":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});Sx.displayName="Shake";var XP={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},Dx=j.forwardRef(({children:e,animate:t=true,speed:r="normal",className:n},o)=>jsx("div",{ref:o,className:u(t&&XP[r],n),children:e}));Dx.displayName="Pulse";var Hx=j.forwardRef(({children:e,animate:t=true,angle:r=10,duration:n=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=j.useState(false),d=s?l:t,m={idle:{rotate:0},wiggle:{rotate:[0,-r,r,-r,r,0],transition:{duration:n,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"wiggle":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});Hx.displayName="Wiggle";var Ix=j.forwardRef(({children:e,animate:t=false,scale:r=1.2,duration:n=.2,className:o,triggerOnHover:a=false,triggerOnClick:s=false},i)=>{let[l,c]=j.useState(false),d=t||l,m={type:"spring",stiffness:400,damping:17,duration:n},f=()=>{s&&(c(true),setTimeout(()=>c(false),n*1e3));};return jsx(motion.div,{ref:i,animate:{scale:d?r:1},transition:m,className:u(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});Ix.displayName="Pop";var eE=(e,t,r,n)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,r);return s?`${i}${n}${s}`:i},Vx=j.forwardRef(({value:e,from:t=0,duration:r=2,decimals:n=0,prefix:o="",suffix:a="",separator:s=",",decimalSeparator:i=".",animateOnView:l=true,delay:c=0,className:d,onComplete:m},f)=>{let p=j.useRef(null),g=useInView(p,{once:true}),[h,b]=j.useState(!l);j.useEffect(()=>{if(l&&g){let x=setTimeout(()=>b(true),c*1e3);return ()=>clearTimeout(x)}},[l,g,c]);let v=useMotionValue(t),w=useTransform(v,x=>eE(x,n,s,i));return j.useEffect(()=>{if(h){let x=animate(v,e,{duration:r,ease:"easeOut",onComplete:m});return ()=>x.stop()}},[h,e,r,v,m]),jsx("span",{ref:p,className:u(d),children:jsxs("span",{ref:f,children:[o,jsx(motion.span,{children:w}),a]})})});Vx.displayName="Counter";var Ax=j.forwardRef(({text:e,speed:t=50,delay:r=0,pauseBetween:n=1500,cursor:o=true,cursorChar:a="|",loop:s=false,deleteSpeed:i=30,animateOnView:l=true,className:c,cursorClassName:d,onComplete:m},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=j.useState(""),[b,v]=j.useState(0),[w,x]=j.useState(false),[R,C]=j.useState(false),y=j.useRef(null),k=useInView(y,{once:true}),[T,N]=j.useState(!l);return j.useEffect(()=>{if(l&&k){let M=setTimeout(()=>N(true),r*1e3);return ()=>clearTimeout(M)}},[l,k,r]),j.useEffect(()=>{if(!T||R)return;let M=p[b],P;return w?g.length>0?P=setTimeout(()=>{h(g.slice(0,-1));},i):(x(false),v(E=>(E+1)%p.length)):g.length<M.length?P=setTimeout(()=>{h(M.slice(0,g.length+1));},t):b<p.length-1||s?P=setTimeout(()=>{x(true);},n):(C(true),m?.()),()=>clearTimeout(P)},[T,g,b,w,R,p,t,i,n,s,m]),jsxs("span",{ref:y,className:u(c),children:[jsx("span",{ref:f,children:g}),o&&jsx(motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:u("ml-0.5",d),children:a})]})});Ax.displayName="Typewriter";var zx=j.forwardRef(({children:e,direction:t="up",stagger:r=.05,duration:n=.5,delay:o=0,splitBy:a="word",animateOnView:s=true,className:i},l)=>{let c=j.useRef(null),d=useInView(c,{once:true,amount:.5}),m=s?d:true,f=typeof e=="string"?e:"",p=a==="word"?f.split(" "):f.split(""),g={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},h={hidden:{},visible:{transition:{staggerChildren:r,delayChildren:o}}},b={hidden:{opacity:0,...g[t]},visible:{opacity:1,x:0,y:0,transition:{duration:n,ease:"easeInOut"}}};return jsx(motion.div,{ref:l,className:u("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:m?"visible":"hidden",children:jsx("span",{ref:c,children:p.map((v,w)=>jsxs(motion.span,{variants:b,className:"inline-block",children:[v,a==="word"&&w<p.length-1&&"\xA0"]},w))})})});zx.displayName="TextReveal";var Ox=j.forwardRef(({words:e,duration:t=2,animation:r="slide",animationDuration:n=.5,className:o,loop:a=true},s)=>{let[i,l]=j.useState(0);j.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(m=>(m+1)%e.length);},t*1e3);return ()=>clearInterval(d)},[e.length,t,a,i]);let c=()=>{switch(r){case "fade":return {initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};case "slide":return {initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20}};case "scale":return {initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.2}};case "blur":return {initial:{opacity:0,filter:"blur(10px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(10px)"}}}};return jsx("span",{ref:s,className:u("relative inline-block",o),children:jsx(AnimatePresence,{mode:"wait",children:jsx(motion.span,{variants:c(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:n},className:"inline-block",children:e[i]},e[i])})})});Ox.displayName="WordRotate";var $x=j.forwardRef(({children:e,direction:t="up",distance:r=50,duration:n=.6,delay:o=0,once:a=true,threshold:s=.1,className:i,scale:l,rotate:c,blur:d,ease:m=[.4,0,.2,1]},f)=>{let p=j.useRef(null),g=useInView(p,{once:a,amount:s}),b={up:{x:0,y:r},down:{x:0,y:-r},left:{x:r,y:0},right:{x:-r,y:0},none:{x:0,y:0}}[t],v={hidden:{opacity:0,x:b.x,y:b.y,scale:l??1,rotate:c??0,filter:d?`blur(${d}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:n,delay:o,ease:m}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:f,variants:v,initial:"hidden",animate:g?"visible":"hidden",className:u(i),children:e})})});$x.displayName="ScrollReveal";var Gx=j.forwardRef(({position:e="top",size:t=4,color:r="hsl(var(--primary))",backgroundColor:n="transparent",zIndex:o=50,className:a,container:s,showPercentage:i=false,useSpring:l=true},c)=>{let{scrollYProgress:d}=useScroll({container:s}),m=useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?m:d,p=e==="top"||e==="bottom",g={top:{top:0,left:0,right:0,height:t},bottom:{bottom:0,left:0,right:0,height:t},left:{top:0,left:0,bottom:0,width:t},right:{top:0,right:0,bottom:0,width:t}},h=p?"scaleX":"scaleY",b=p?"left":"top";return jsxs("div",{ref:c,className:u("fixed",a),style:{...g[e],zIndex:o,backgroundColor:n},children:[jsx(motion.div,{className:"h-full w-full",style:{[h]:f,transformOrigin:b,backgroundColor:r}}),i&&jsx(rE,{progress:f,position:e})]})});Gx.displayName="ScrollProgress";var rE=({progress:e,position:t})=>{let r=useTransform(e,s=>Math.round(s*100)),[n,o]=j.useState(0);return j.useEffect(()=>{let s=r.on("change",o);return ()=>s()},[r]),jsxs("span",{className:u("fixed rounded bg-background/80 px-2 py-1 text-xs font-medium backdrop-blur-sm",{top:"top-2 right-4",bottom:"bottom-2 right-4",left:"top-4 left-2",right:"top-4 right-2"}[t]),children:[n,"%"]})},Ux=j.forwardRef(({children:e,speed:t=.5,direction:r="vertical",className:n,container:o},a)=>{let s=j.useRef(null),{scrollYProgress:i}=useScroll({target:s,container:o,offset:["start end","end start"]}),l=[-100*t,100*t],c=useTransform(i,[0,1],l),d=useSpring(c,{stiffness:100,damping:30}),m=r==="horizontal"?d:0,f=r==="vertical"?d:0;return jsx("div",{ref:s,className:u("overflow-hidden",n),children:jsx(motion.div,{ref:a,style:{x:m,y:f},children:e})})});Ux.displayName="Parallax";var _x=j.forwardRef(({children:e,width:t,height:r,duration:n=1.5,direction:o="right",baseColor:a="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:i,className:l,active:c=true},d)=>{let m={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},f={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxs("div",{ref:d,className:u("relative overflow-hidden",l),style:{width:t,height:r,borderRadius:i,backgroundColor:a},children:[e,c&&jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${m[o]}, transparent, ${s}, transparent)`,animation:`${f[o]} ${n}s infinite`}}),jsx("style",{children:`
|
|
56
56
|
@keyframes shimmer-right {
|
|
57
57
|
0% { transform: translateX(-100%); }
|
|
58
58
|
100% { transform: translateX(100%); }
|
|
@@ -69,5 +69,5 @@ import*as j from'react';import {createContext,useState,useEffect,useContext,useC
|
|
|
69
69
|
0% { transform: translateY(-100%); }
|
|
70
70
|
100% { transform: translateY(100%); }
|
|
71
71
|
}
|
|
72
|
-
`})]})});cy.displayName="Shimmer";var xE={sm:24,md:40,lg:56,xl:80},yE={default:{circle:"stroke-muted-foreground",check:"stroke-foreground"},success:{circle:"stroke-green-500",check:"stroke-green-500"},primary:{circle:"stroke-primary",check:"stroke-primary"},outline:{circle:"stroke-border",check:"stroke-foreground"}},dy=j.forwardRef(({show:e=true,size:t="md",variant:r="success",strokeWidth:n=2,duration:o=.6,delay:a=0,className:s,onComplete:i},l)=>{let c=xE[t],d=yE[r],m={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a,ease:"easeOut"}}},f={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a+o*.4,ease:"easeOut"}}};return jsxs("svg",{ref:l,width:c,height:c,viewBox:"0 0 50 50",className:u(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:n,className:d.circle,variants:m,initial:"hidden",animate:e?"visible":"hidden"}),jsx(motion.path,{d:"M14 27 L22 35 L36 18",fill:"none",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:d.check,variants:f,initial:"hidden",animate:e?"visible":"hidden",onAnimationComplete:()=>e&&i?.()})]})});dy.displayName="Checkmark";var Lo={particleCount:100,spread:70,startVelocity:30,decay:.95,gravity:1,colors:["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"],origin:{x:.5,y:.5},shapes:["square","circle"],scalar:1,drift:0,ticks:200},uy=j.forwardRef(({autoTrigger:e=false,delay:t=0,options:r={},children:n,onTrigger:o},a)=>{let s=j.useCallback(()=>{let i={...Lo,...r};Eo(i),o?.();},[r,o]);return j.useEffect(()=>{if(e){let i=setTimeout(s,t);return ()=>clearTimeout(i)}},[e,t,s]),n?jsx("div",{ref:a,onClick:s,className:"inline-block cursor-pointer",children:n}):null});uy.displayName="Confetti";var RE=()=>{let e=j.useCallback(n=>{let o={...Lo,...n};Eo(o);},[]),t=j.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);Eo({...Lo,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),Eo({...Lo,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),r=j.useCallback((n="both")=>{let o={x:0,y:1},a={x:1,y:1};(n==="left"||n==="both")&&Eo({...Lo,particleCount:50,angle:60,spread:55,origin:o}),(n==="right"||n==="both")&&Eo({...Lo,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:r}},my=j.forwardRef(({children:e,color:t="hsl(var(--primary))",intensity:r=20,spread:n=0,animate:o=false,duration:a=2,className:s},i)=>{let l={boxShadow:`0 0 ${r}px ${n}px ${t}`};return o?jsx(motion.div,{ref:i,className:u("rounded-[inherit]",s),animate:{boxShadow:[`0 0 ${r}px ${n}px ${t}`,`0 0 ${r*1.5}px ${n+5}px ${t}`,`0 0 ${r}px ${n}px ${t}`]},transition:{duration:a,repeat:1/0,ease:"easeInOut"},children:e}):jsx("div",{ref:i,className:u("rounded-[inherit]",s),style:l,children:e})});my.displayName="Glow";var ly=(e,t)=>({id:Math.random().toString(36).substr(2,9),x:`${Math.random()*100}%`,y:`${Math.random()*100}%`,size:Math.random()*(t-e)+e,delay:Math.random()*2}),py=j.forwardRef(({children:e,count:t=10,color:r="hsl(var(--primary))",minSize:n=4,maxSize:o=8,duration:a=1.5,className:s},i)=>{let[l,c]=j.useState([]);return j.useEffect(()=>{let d=Array.from({length:t},()=>ly(n,o));c(d);let m=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=ly(n,o),p});},a*500);return ()=>clearInterval(m)},[t,n,o,a]),jsxs("div",{ref:i,className:u("relative inline-block",s),children:[e,l.map(d=>jsx(motion.svg,{className:"pointer-events-none absolute",style:{left:d.x,top:d.y,width:d.size,height:d.size},viewBox:"0 0 24 24",initial:{scale:0,opacity:0,rotate:0},animate:{scale:[0,1,0],opacity:[0,1,0],rotate:[0,180]},transition:{duration:a,delay:d.delay,repeat:1/0,ease:"easeInOut"},children:jsx("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z",fill:r})},d.id))]})});py.displayName="Sparkles";var fy=j.forwardRef(({className:e,children:t,...r},n)=>jsx("h1",{ref:n,className:u("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...r,children:t}));fy.displayName="H1";var gy=j.forwardRef(({className:e,children:t,...r},n)=>jsx("h2",{ref:n,className:u("scroll-m-20 text-3xl font-semibold tracking-tight",e),...r,children:t}));gy.displayName="H2";var by=j.forwardRef(({className:e,children:t,...r},n)=>jsx("h3",{ref:n,className:u("scroll-m-20 text-2xl font-semibold tracking-tight",e),...r,children:t}));by.displayName="H3";var vy=j.forwardRef(({className:e,children:t,...r},n)=>jsx("h4",{ref:n,className:u("scroll-m-20 text-xl font-semibold tracking-tight",e),...r,children:t}));vy.displayName="H4";var hy=j.forwardRef(({className:e,children:t,...r},n)=>jsx("p",{ref:n,className:u("leading-7 [&:not(:first-child)]:mt-6",e),...r,children:t}));hy.displayName="Paragraph";var xy=j.forwardRef(({className:e,children:t,...r},n)=>jsx("blockquote",{ref:n,className:u("mt-6 border-l-2 pl-6 italic",e),...r,children:t}));xy.displayName="Blockquote";var yy=j.forwardRef(({className:e,children:t,...r},n)=>jsx("code",{ref:n,className:u("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...r,children:t}));yy.displayName="InlineCode";var Ry=j.forwardRef(({className:e,children:t,...r},n)=>jsx("p",{ref:n,className:u("text-xl text-muted-foreground",e),...r,children:t}));Ry.displayName="Lead";var wy=j.forwardRef(({className:e,children:t,...r},n)=>jsx("div",{ref:n,className:u("text-lg font-semibold",e),...r,children:t}));wy.displayName="Large";var Cy=j.forwardRef(({className:e,children:t,...r},n)=>jsx("small",{ref:n,className:u("text-sm font-medium leading-none",e),...r,children:t}));Cy.displayName="Small";var Ty=j.forwardRef(({className:e,children:t,...r},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...r,children:t}));Ty.displayName="Muted";var My=j.forwardRef(({className:e,children:t,...r},n)=>jsx("ul",{ref:n,className:u("my-6 ml-6 list-disc [&>li]:mt-2",e),...r,children:t}));My.displayName="UL";function So(e){let t=useCallback(o=>typeof window<"u"?window.matchMedia(o).matches:false,[]),[r,n]=useState(()=>t(e));return useEffect(()=>{let o=window.matchMedia(e),a=()=>{n(o.matches);};return n(o.matches),o.addEventListener("change",a),()=>{o.removeEventListener("change",a);}},[e]),r}function ME(){return So("(max-width: 767px)")}function NE(){return So("(min-width: 768px) and (max-width: 1023px)")}function kE(){return So("(min-width: 1024px)")}function PE(){return So("(prefers-color-scheme: dark)")?"dark":"light"}function EE(){return So("(prefers-reduced-motion: reduce)")}function xa(e={}){let{initialWidth:t=0,initialHeight:r=0,debounce:n=0,includeScrollbar:o=true}=e,[a,s]=useState(()=>typeof window>"u"?{width:t,height:r}:{width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight}),i=useRef(null),l=useCallback(()=>{let c=()=>{s({width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight});};n>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(c,n)):c();},[n,o]);return useEffect(()=>(l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),i.current&&clearTimeout(i.current);}),[l]),a}function IE(){let{width:e}=xa();return e}function VE(){let{height:e}=xa();return e}function AE(e){let{width:t}=xa();return t>=e}function zE(){let{width:e}=xa();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function FE(e,t){let r=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading localStorage key "${e}":`,i),t}},[t,e]),[n,o]=useState(r),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting localStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(n):i;o(l),window.localStorage.setItem(e,JSON.stringify(l)),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:JSON.stringify(l)}));}catch(l){console.warn(`Error setting localStorage key "${e}":`,l);}},[e,n]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(e),o(t),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:null}));}catch(i){console.warn(`Error removing localStorage key "${e}":`,i);}},[e,t]);return useEffect(()=>{let i=l=>{if(l.key===e&&l.newValue!==null)try{o(JSON.parse(l.newValue));}catch{o(l.newValue);}else l.key===e&&l.newValue===null&&o(t);};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i);}},[e,t]),[n,a,s]}function $E(e,t){let r=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.sessionStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading sessionStorage key "${e}":`,i),t}},[t,e]),[n,o]=useState(r),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting sessionStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(n):i;o(l),window.sessionStorage.setItem(e,JSON.stringify(l));}catch(l){console.warn(`Error setting sessionStorage key "${e}":`,l);}},[e,n]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.sessionStorage.removeItem(e),o(t);}catch(i){console.warn(`Error removing sessionStorage key "${e}":`,i);}},[e,t]);return [n,a,s]}function WE(e,t=500){let[r,n]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{n(e);},t);return ()=>{clearTimeout(o);}},[e,t]),r}function jE(e,t=500){let r=useRef(null),n=useRef(e);return useEffect(()=>{n.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]),useCallback((...a)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n.current(...a);},t);},[t])}function _E(e,t=500){let r=useRef(null),n=useRef(e),o=useRef(null);useEffect(()=>{n.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]);let a=useCallback((...c)=>{o.current=c,r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n.current(...c),r.current=null,o.current=null;},t);},[t]),s=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null,o.current=null);},[]),i=useCallback(()=>{r.current&&o.current&&(clearTimeout(r.current),n.current(...o.current),r.current=null,o.current=null);},[]),l=useCallback(()=>r.current!==null,[]);return {debouncedCallback:a,cancel:s,flush:i,isPending:l}}function qE(e,t=500){let[r,n]=useState(e),o=useRef(Date.now());return useEffect(()=>{let a=Date.now();if(a>=o.current+t)o.current=a,n(e);else {let s=setTimeout(()=>{o.current=Date.now(),n(e);},t-(a-o.current));return ()=>clearTimeout(s)}},[e,t]),r}function ZE(e,t=500){let r=useRef(0),n=useRef(null),o=useRef(e);return useEffect(()=>{o.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]),useCallback((...s)=>{let i=Date.now();i-r.current>=t?(o.current(...s),r.current=i):(n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{o.current(...s),r.current=Date.now();},t-(i-r.current)));},[t])}function JE(e,t=true){let r=useRef(null);return useEffect(()=>{if(!t)return;let n=o=>{let a=r.current;!a||a.contains(o.target)||e(o);};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n);}},[e,t]),r}function eL(e,t,r=true){useEffect(()=>{if(!r)return;let n=o=>{e.some(s=>{let i=s.current;return i&&i.contains(o.target)})||t(o);};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n);}},[e,t,r]);}function tL(e=2e3){let[t,r]=useState(null),[n,o]=useState(false),[a,s]=useState(false),i=useCallback(()=>{r(null),o(false);},[]),l=useCallback(async c=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;s(true);try{return await navigator.clipboard.writeText(c),r(c),o(!0),e>0&&setTimeout(()=>{o(!1);},e),!0}catch(d){return console.warn("Copy to clipboard failed:",d),r(null),o(false),false}finally{s(false);}},[e]);return {copiedValue:t,success:n,isLoading:a,copy:l,reset:i}}function rL(){return useCallback(async e=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy to clipboard failed:",t),false}},[])}function ky(e){let t=e.toLowerCase().split("+");return {key:t[t.length-1],ctrl:t.includes("ctrl")||t.includes("control"),alt:t.includes("alt")||t.includes("option"),shift:t.includes("shift"),meta:t.includes("meta")||t.includes("cmd")||t.includes("command")}}function Py(e,t){let r=e.key.toLowerCase(),n=r===" "?"space":r==="escape"?"esc":r,o=t.key==="space"?" ":t.key;return (n===o||e.code.toLowerCase()===`key${o}`)&&e.ctrlKey===t.ctrl&&e.altKey===t.alt&&e.shiftKey===t.shift&&e.metaKey===t.meta}function nL(e,t,r={}){let{enabled:n=true,preventDefault:o=true,stopPropagation:a=false,target:s=null}=r,i=useRef(t);i.current=t;let l=ky(e);useEffect(()=>{if(!n)return;let c=m=>{Py(m,l)&&(o&&m.preventDefault(),a&&m.stopPropagation(),i.current(m));},d=s||document;return d.addEventListener("keydown",c),()=>{d.removeEventListener("keydown",c);}},[n,o,a,s,l]);}function oL(e,t={}){let{enabled:r=true,preventDefault:n=true,stopPropagation:o=false,target:a=null}=t,s=useRef(e);s.current=e;let i=Object.entries(e).map(([l,c])=>({parsed:ky(l),handler:c}));useEffect(()=>{if(!r)return;let l=d=>{for(let{parsed:m,handler:f}of i)if(Py(d,m)){n&&d.preventDefault(),o&&d.stopPropagation(),f(d);break}},c=a||document;return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l);}},[r,n,o,a,i]);}function aL(e){let t=useRef(false);return useEffect(()=>{let r=o=>{o.key===e&&(t.current=true);},n=o=>{o.key===e&&(t.current=false);};return document.addEventListener("keydown",r),document.addEventListener("keyup",n),()=>{document.removeEventListener("keydown",r),document.removeEventListener("keyup",n);}},[e]),t.current}function sL(e,t,r,n){let o=useRef(t);o.current=t,useEffect(()=>{let a;if(r==null?a=window:"current"in r?a=r.current:a=r,!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,n),()=>{a?.removeEventListener(e,s,n);}},[e,r,n]);}function iL(e,t,r){let n=useRef(null),o=useRef(t);return o.current=t,useEffect(()=>{let a=n.current;if(!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,r),()=>{a.removeEventListener(e,s,r);}},[e,r]),n}function lL(e,t,r={}){let{target:n,event:o="keydown",enabled:a=true}=r,s=useRef(t);s.current=t,useEffect(()=>{if(!a)return;let i=n?.current||window,l=c=>{c.key===e&&s.current(c);};return i.addEventListener(o,l),()=>{i.removeEventListener(o,l);}},[e,n,o,a]);}function cL(e,t={}){let{threshold:r=500,onStart:n,onCancel:o,enabled:a=true}=t,s=useRef(null),i=useRef(false),l=useRef(null),c=useCallback(m=>{a&&(l.current=m,i.current=false,n?.(m),s.current=setTimeout(()=>{i.current=true,l.current&&e(l.current);},r));},[e,r,n,a]),d=useCallback(m=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(m),i.current=false,l.current=null);},[o,a]);return {onMouseDown:c,onMouseUp:d,onMouseLeave:d,onTouchStart:c,onTouchEnd:d}}function dL(e){let t=useRef(null),[r,n]=useState(false),o=useCallback(()=>{n(true),e?.onHoverStart?.();},[e]),a=useCallback(()=>{n(false),e?.onHoverEnd?.();},[e]);return useEffect(()=>{let s=t.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[o,a]),{ref:t,isHovered:r}}function uL(e,t){let[r,n]=useState(false),o=useCallback(()=>{n(true),t?.onHoverStart?.();},[t]),a=useCallback(()=>{n(false),t?.onHoverEnd?.();},[t]);return useEffect(()=>{let s=e.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[e,o,a]),r}function mL(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function pL(e=0){let t=useRef(null),[r,n]=useState(false),o=useRef(null);return useEffect(()=>{let a=t.current;if(!a)return;let s=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{n(true);},e);},i=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{n(false);},e);};return a.addEventListener("mouseenter",s),a.addEventListener("mouseleave",i),()=>{a.removeEventListener("mouseenter",s),a.removeEventListener("mouseleave",i),o.current&&clearTimeout(o.current);}},[e]),{ref:t,isHovered:r}}function gL(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let r=n=>{t({x:n.clientX,y:n.clientY});};return window.addEventListener("mousemove",r),()=>{window.removeEventListener("mousemove",r);}},[]),e}function bL(e={}){let{enabled:t=true,resetOnLeave:r=false}=e,n=useRef(null),[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=n.current;if(!s||!t)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{r&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),r&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),r&&s.removeEventListener("mouseleave",l);}},[t,r]),{ref:n,...o}}function vL(e,t={}){let{enabled:r=true,resetOnLeave:n=false}=t,[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=e.current;if(!s||!r)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{n&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),n&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),n&&s.removeEventListener("mouseleave",l);}},[e,r,n]),o}var Sy=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"].join(",");function hL(e={}){let{enabled:t=true,initialFocus:r,returnFocus:n=true,autoFocus:o=true}=e,a=useRef(null),s=useRef(null),i=useCallback(()=>{let c=a.current;return c?Array.from(c.querySelectorAll(Sy)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);return useEffect(()=>{if(!t)return;let c=a.current;if(c){if(s.current=document.activeElement,o)if(r?.current)r.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),n&&s.current&&s.current.focus();}}},[t,r,n,o,l,i]),a}function xL(e,t={}){let{enabled:r=true,initialFocus:n,returnFocus:o=true,autoFocus:a=true}=t,s=useRef(null),i=useCallback(()=>{let c=e.current;return c?Array.from(c.querySelectorAll(Sy)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[e]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);useEffect(()=>{if(!r)return;let c=e.current;if(c){if(s.current=document.activeElement,a)if(n?.current)n.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),o&&s.current&&s.current.focus();}}},[e,r,n,o,a,l,i]);}function yL(e={}){let{threshold:t=0,throttle:r=0,element:n}=e,[o,a]=useState({x:0,y:0,isScrolled:false,directionY:0,directionX:0,isAtBottom:false,isAtTop:true,progress:0}),s=useRef(0),i=useRef(0),l=useRef(false),c=useRef(0),d=useCallback(()=>{let f=n?.current,p=f?f.scrollTop:window.scrollY,g=f?f.scrollLeft:window.scrollX,h=f?f.scrollHeight-f.clientHeight:document.documentElement.scrollHeight-window.innerHeight,b=p>s.current?1:p<s.current?-1:0,v=g>i.current?1:g<i.current?-1:0;s.current=p,i.current=g,a({x:g,y:p,isScrolled:p>t,directionY:b,directionX:v,isAtBottom:p>=h-1,isAtTop:p<=0,progress:h>0?p/h:0}),l.current=false;},[n,t]),m=useCallback(()=>{let f=Date.now();if(r>0&&f-c.current<r){l.current||(l.current=true,requestAnimationFrame(d));return}c.current=f,l.current||(l.current=true,requestAnimationFrame(d));},[r,d]);return useEffect(()=>{let f=n?.current||window;return f.addEventListener("scroll",m,{passive:true}),d(),()=>{f.removeEventListener("scroll",m);}},[n,m,d]),o}function RL(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let r=()=>{t({x:window.scrollX,y:window.scrollY});};return window.addEventListener("scroll",r,{passive:true}),r(),()=>{window.removeEventListener("scroll",r);}},[]),e}function zy(e={}){let{autoLock:t=false,lockX:r=true}=e,n=useRef(false),o=useRef({x:0,y:0}),a=useRef(null),s=useCallback(()=>{if(typeof document>"u"||n.current)return;let{body:l}=document,c=window.scrollY,d=window.scrollX;o.current={x:d,y:c},a.current={overflow:l.style.overflow,overflowX:l.style.overflowX,overflowY:l.style.overflowY,position:l.style.position,top:l.style.top,left:l.style.left,width:l.style.width},l.style.overflow="hidden",r&&(l.style.overflowX="hidden"),l.style.overflowY="hidden",l.style.position="fixed",l.style.top=`-${c}px`,l.style.left=r?`-${d}px`:"0",l.style.width="100%",n.current=true;},[r]),i=useCallback(()=>{if(typeof document>"u"||!n.current)return;let{body:l}=document,c=a.current;c&&(l.style.overflow=c.overflow,l.style.overflowX=c.overflowX,l.style.overflowY=c.overflowY,l.style.position=c.position,l.style.top=c.top,l.style.left=c.left,l.style.width=c.width),window.scrollTo(o.current.x,o.current.y),n.current=false;},[]);return useEffect(()=>(t&&s(),()=>{i();}),[t,s,i]),{lock:s,unlock:i,isLocked:n.current}}function wL(e=true){let{lock:t,unlock:r}=zy();useEffect(()=>{e?t():r();},[e,t,r]);}function Fy(e={}){let{root:t=null,rootMargin:r="0px",threshold:n=0,once:o=false,enabled:a=true}=e,s=useRef(null),[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=s.current;if(!c||!a)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),o&&m.isIntersecting&&d.disconnect();},{root:t,rootMargin:r,threshold:n});return d.observe(c),()=>{d.disconnect();}},[t,r,n,o,a]),{ref:s,...i}}function TL(e,t={}){let{root:r=null,rootMargin:n="0px",threshold:o=0,once:a=false,enabled:s=true}=t,[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=e.current;if(!c||!s)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),a&&m.isIntersecting&&d.disconnect();},{root:r,rootMargin:n,threshold:o});return d.observe(c),()=>{d.disconnect();}},[e,r,n,o,a,s]),i}function ML(e="200px"){let{ref:t,isIntersecting:r}=Fy({rootMargin:e,once:true});return {ref:t,isVisible:r}}function NL(e,t={}){let{enabled:r=true,childList:n=true,attributes:o=true,characterData:a=false,subtree:s=false,attributeOldValue:i=false,characterDataOldValue:l=false,attributeFilter:c}=t,d=useRef(null),m=useRef(e);return m.current=e,useEffect(()=>{let f=d.current;if(!f||!r)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:n,attributes:o,characterData:a,subtree:s,attributeOldValue:i,characterDataOldValue:l,attributeFilter:c}),()=>{p.disconnect();}},[r,n,o,a,s,i,l,c]),d}function kL(e,t,r={}){let{enabled:n=true,childList:o=true,attributes:a=true,characterData:s=false,subtree:i=false,attributeOldValue:l=false,characterDataOldValue:c=false,attributeFilter:d}=r,m=useRef(t);m.current=t,useEffect(()=>{let f=e.current;if(!f||!n)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:o,attributes:a,characterData:s,subtree:i,attributeOldValue:l,characterDataOldValue:c,attributeFilter:d}),()=>{p.disconnect();}},[e,n,o,a,s,i,l,c,d]);}function PL(e={}){let{enabled:t=true,box:r="content-box",debounce:n=0}=e,o=useRef(null),[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;r==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});n>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,n)):p();},[r,n]);return useEffect(()=>{let c=o.current;if(!c||!t)return;let d=new ResizeObserver(l);d.observe(c,{box:r});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,r,l]),{ref:o,...a}}function EL(e,t={}){let{enabled:r=true,box:n="content-box",debounce:o=0}=t,[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;n==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});o>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,o)):p();},[n,o]);return useEffect(()=>{let c=e.current;if(!c||!r)return;let d=new ResizeObserver(l);d.observe(c,{box:n});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,r,n,l]),a}function LL(){let e=useRef(null),t=useCallback(()=>{let r=e.current;if(!r)return {width:0,height:0};let n=r.getBoundingClientRect();return {width:n.width,height:n.height}},[]);return {ref:e,measure:t}}function Uy(e={}){let{defaultOpen:t=false,isOpen:r,onOpen:n,onClose:o,onChange:a,id:s}=e,[i,l]=useState(t),c=r!==void 0,d=c?r:i,m=useCallback(()=>{c||l(true),n?.(),a?.(true);},[c,n,a]),f=useCallback(()=>{c||l(false),o?.(),a?.(false);},[c,o,a]),p=useCallback(()=>{d?f():m();},[d,m,f]),g=useCallback(v=>{v?m():f();},[m,f]),h=useCallback(()=>({onClick:p,"aria-expanded":d,...s&&{"aria-controls":s}}),[p,d,s]),b=useCallback(()=>({hidden:!d,...s&&{id:s}}),[d,s]);return useMemo(()=>({isOpen:d,open:m,close:f,toggle:p,setIsOpen:g,getButtonProps:h,getDisclosureProps:b}),[d,m,f,p,g,h,b])}function HL(e){return Uy({...e,defaultOpen:true})}function IL(e=false){let[t,r]=useState(e),n=useCallback(()=>{r(o=>!o);},[]);return [t,n,r]}function VL(e,t=0){let[r,n]=useState(t),o=useCallback(()=>{n(i=>(i+1)%e.length);},[e.length]),a=useCallback(()=>{n(i=>(i-1+e.length)%e.length);},[e.length]),s=useCallback(i=>{let l=e.indexOf(i);l!==-1&&n(l);},[e]);return useMemo(()=>({value:e[r],index:r,next:o,prev:a,setIndex:n,setValue:s}),[e,r,o,a,s])}function AL(e=false){let[t,r]=useState(e),n=useCallback(()=>r(s=>!s),[]),o=useCallback(()=>r(true),[]),a=useCallback(()=>r(false),[]);return useMemo(()=>({value:t,toggle:n,on:o,off:a,set:r}),[t,n,o,a])}function OL(e=0,t={}){let{min:r=-1/0,max:n=1/0,step:o=1}=t,a=useCallback(g=>Math.min(Math.max(g,r),n),[r,n]),[s,i]=useState(()=>a(e)),l=useCallback(()=>{i(g=>a(g+o));},[a,o]),c=useCallback(()=>{i(g=>a(g-o));},[a,o]),d=useCallback(g=>{i(a(g));},[a]),m=useCallback(()=>{i(a(e));},[a,e]),f=s<=r,p=s>=n;return useMemo(()=>({count:s,increment:l,decrement:c,set:d,reset:m,isMin:f,isMax:p}),[s,l,c,d,m,f,p])}function BL(e=0){let[t,r]=useState(e),n=useCallback(()=>r(o=>o+1),[]);return [t,n]}function FL(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function KL(e,t){let r=useRef(t);return useEffect(()=>{r.current=e;},[e]),r.current}function $L(e){let t=useRef(void 0),r=useRef(e),n=r.current!==e;return useEffect(()=>{t.current=r.current,r.current=e;},[e]),{current:e,previous:t.current,hasChanged:n}}function WL(e=[]){let[t,r]=useState(e),n=useCallback(C=>{r(C);},[]),o=useCallback(C=>{r(y=>[...y,C]);},[]),a=useCallback(C=>{r(y=>[...y,...C]);},[]),s=useCallback((C,y)=>{r(k=>{let T=[...k];return T.splice(C,0,y),T});},[]),i=useCallback((C,y)=>{r(k=>{let T=[...k];return T[C]=y,T});},[]),l=useCallback(C=>{r(y=>y.filter((k,T)=>T!==C));},[]),c=useCallback(C=>{r(y=>{let k=y.indexOf(C);return k===-1?y:y.filter((T,N)=>N!==k)});},[]),d=useCallback(C=>{r(y=>y.filter(k=>!C(k)));},[]),m=useCallback(()=>{let C;return r(y=>y.length===0?y:(C=y[0],y.slice(1))),C},[]),f=useCallback(C=>{r(y=>[C,...y]);},[]),p=useCallback(()=>{let C;return r(y=>y.length===0?y:(C=y[y.length-1],y.slice(0,-1))),C},[]),g=useCallback(()=>{r([]);},[]),h=useCallback(()=>{r(e);},[e]),b=useCallback((C,y)=>{r(k=>{let T=[...k],[N]=T.splice(C,1);return T.splice(y,0,N),T});},[]),v=useCallback((C,y)=>{r(k=>{let T=[...k];return [T[C],T[y]]=[T[y],T[C]],T});},[]),w=useCallback(C=>t.filter(C),[t]),x=useCallback(C=>t.find(C),[t]),R=useCallback(C=>t.includes(C),[t]);return useMemo(()=>({list:t,set:n,push:o,pushMany:a,insertAt:s,updateAt:i,removeAt:l,remove:c,removeWhere:d,shift:m,unshift:f,pop:p,clear:g,reset:h,move:b,swap:v,filter:w,find:x,includes:R,length:t.length,isEmpty:t.length===0}),[t,n,o,a,s,i,l,c,d,m,f,p,g,h,b,v,w,x,R])}function jL(e=[]){let[t,r]=useState(()=>new Map(e)),n=useCallback(p=>t.get(p),[t]),o=useCallback((p,g)=>{r(h=>{let b=new Map(h);return b.set(p,g),b});},[]),a=useCallback(p=>{r(g=>{let h=new Map(g);return p.forEach(([b,v])=>h.set(b,v)),h});},[]),s=useCallback(p=>t.has(p),[t]),i=useCallback(p=>{r(g=>{let h=new Map(g);return h.delete(p),h});},[]),l=useCallback(()=>{r(new Map);},[]),c=useCallback(()=>{r(new Map(e));},[e]),d=useCallback(()=>Array.from(t.keys()),[t]),m=useCallback(()=>Array.from(t.values()),[t]),f=useCallback(()=>Array.from(t.entries()),[t]);return useMemo(()=>({map:t,get:n,set:o,setMany:a,has:s,delete:i,clear:l,reset:c,keys:d,values:m,entries:f,size:t.size,isEmpty:t.size===0}),[t,n,o,a,s,i,l,c,d,m,f])}function _L(e={}){let[t,r]=useState(e),n=useCallback(d=>t[d],[t]),o=useCallback((d,m)=>{r(f=>({...f,[d]:m}));},[]),a=useCallback(d=>{r(m=>({...m,...d}));},[]),s=useCallback(d=>{r(m=>{let{[d]:f,...p}=m;return p});},[]),i=useCallback(()=>{r({});},[]),l=useCallback(()=>{r(e);},[e]),c=useCallback(d=>d in t,[t]);return useMemo(()=>({value:t,get:n,set:o,setAll:a,remove:s,clear:i,reset:l,has:c,keys:Object.keys(t),values:Object.values(t)}),[t,n,o,a,s,i,l,c])}function qy(e=[]){let[t,r]=useState(()=>new Set(e)),n=useCallback(m=>{r(f=>{let p=new Set(f);return p.add(m),p});},[]),o=useCallback(m=>{r(f=>{let p=new Set(f);return m.forEach(g=>p.add(g)),p});},[]),a=useCallback(m=>{r(f=>{let p=new Set(f);return p.delete(m),p});},[]),s=useCallback(m=>t.has(m),[t]),i=useCallback(m=>{r(f=>{let p=new Set(f);return p.has(m)?p.delete(m):p.add(m),p});},[]),l=useCallback(()=>{r(new Set);},[]),c=useCallback(()=>{r(new Set(e));},[e]),d=useCallback(()=>Array.from(t),[t]);return useMemo(()=>({set:t,add:n,addMany:o,remove:a,has:s,toggle:i,clear:l,reset:c,values:d,size:t.size,isEmpty:t.size===0}),[t,n,o,a,s,i,l,c,d])}function YL(e=[]){let{add:t,remove:r,has:n,toggle:o,clear:a,addMany:s,values:i,size:l}=qy(e);return useMemo(()=>({selected:i(),isSelected:n,select:t,deselect:r,toggle:o,selectAll:s,deselectAll:a,count:l,isEmpty:l===0}),[i,n,t,r,o,s,a,l])}function qL(e=[]){let[t,r]=useState(e),n=useCallback(c=>{r(d=>[...d,c]);},[]),o=useCallback(c=>{r(d=>[...d,...c]);},[]),a=useCallback(()=>{let c;return r(d=>d.length===0?d:(c=d[0],d.slice(1))),c},[]),s=useCallback(()=>t[0],[t]),i=useCallback(()=>t[t.length-1],[t]),l=useCallback(()=>{r([]);},[]);return useMemo(()=>({queue:t,enqueue:n,enqueueMany:o,dequeue:a,peek:s,peekLast:i,clear:l,size:t.length,isEmpty:t.length===0,hasItems:t.length>0}),[t,n,o,a,s,i,l])}function ZL(e=[]){let[t,r]=useState(e),n=useCallback(l=>{r(c=>[...c,l]);},[]),o=useCallback(l=>{r(c=>[...c,...l]);},[]),a=useCallback(()=>{let l;return r(c=>c.length===0?c:(l=c[c.length-1],c.slice(0,-1))),l},[]),s=useCallback(()=>t[t.length-1],[t]),i=useCallback(()=>{r([]);},[]);return useMemo(()=>({stack:t,push:n,pushMany:o,pop:a,peek:s,clear:i,size:t.length,isEmpty:t.length===0}),[t,n,o,a,s,i])}function e0(e,t=false){let[r,n]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true}),o=useRef(true),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{n(c=>({...c,isLoading:true,isIdle:false,isError:false,error:null}));try{let c=await a.current(...l);return o.current&&n({data:c,error:null,isLoading:!1,isSuccess:!0,isError:!1,isIdle:!1}),c}catch(c){let d=c instanceof Error?c:new Error(String(c));return o.current&&n({data:null,error:d,isLoading:false,isSuccess:false,isError:true,isIdle:false}),null}},[]),i=useCallback(()=>{n({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true});},[]);return useEffect(()=>(o.current=true,t&&s(),()=>{o.current=false;}),[t,s]),{...r,execute:s,reset:i}}function JL(e,t=3,r=1e3){let[n,o]=useState(0),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{let c=null;for(let d=0;d<=t;d++)try{return o(d),await a.current(...l)}catch(m){c=m instanceof Error?m:new Error(String(m)),d<t&&await new Promise(f=>setTimeout(f,r));}throw c},[t,r]);return {...e0(s,false),retryCount:n}}var n0=new Map,eS=300*1e3;function tS(e,t={}){let{immediate:r=true,init:n,transform:o,deps:a=[],enabled:s=true,refetchInterval:i,cacheKey:l}=t,[c,d]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),m=useRef(null),f=useRef(true),p=useCallback(async()=>{if(!e||!s)return;let h=l||e,b=n0.get(h);if(b&&Date.now()-b.timestamp<eS){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}m.current&&m.current.abort(),m.current=new AbortController,d(v=>({...v,isLoading:true,error:null}));try{let v=await fetch(e,{...n,signal:m.current.signal});if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);let w=await v.json(),x=o?o(w):w;n0.set(h,{data:x,timestamp:Date.now()}),f.current&&d({data:x,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(v){if(v instanceof Error&&v.name==="AbortError")return;let w=v instanceof Error?v:new Error(String(v));f.current&&d({data:null,error:w,isLoading:false,isSuccess:false,isError:true});}},[e,s,n,o,l]),g=useCallback(()=>{m.current&&m.current.abort();},[]);return useEffect(()=>(f.current=true,r&&s&&p(),()=>{f.current=false,g();}),[e,r,s,...a]),useEffect(()=>{if(!i||!s)return;let h=setInterval(p,i);return ()=>{clearInterval(h);}},[i,s,p]),{...c,refetch:p,abort:g}}function rS(e,t={}){let{transform:r,...n}=t,[o,a]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),s=useCallback(async l=>{a(c=>({...c,isLoading:true,error:null}));try{let c=await fetch(e,{...n,method:n.method||"POST",headers:{"Content-Type":"application/json",...n.headers},body:l?JSON.stringify(l):void 0});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let d=await c.json(),m=r?r(d):d;return a({data:m,error:null,isLoading:!1,isSuccess:!0,isError:!1}),m}catch(c){let d=c instanceof Error?c:new Error(String(c));return a({data:null,error:d,isLoading:false,isSuccess:false,isError:true}),null}},[e,n,r]),i=useCallback(()=>{a({data:null,error:null,isLoading:false,isSuccess:false,isError:false});},[]);return {...o,mutate:s,reset:i}}function bi(e,t){let r=useRef(e);r.current=e,useEffect(()=>{if(t===null)return;let n=setInterval(()=>{r.current();},t);return ()=>{clearInterval(n);}},[t]);}function oS(e,t){let[r,n]=useState(false);bi(e,r?t:null);let o=useCallback(()=>n(true),[]),a=useCallback(()=>n(false),[]),s=useCallback(()=>n(i=>!i),[]);return {start:o,stop:a,toggle:s,isRunning:r}}function aS(e,t={}){let{interval:r=1e3,onComplete:n,autoStart:o=false}=t,[a,s]=useState(e),[i,l]=useState(o),c=useRef(n);c.current=n;let d=a<=0;bi(()=>{s(g=>{let h=g-1;return h<=0?(l(false),c.current?.(),0):h});},i&&!d?r:null);let m=useCallback(()=>{d||l(true);},[d]),f=useCallback(()=>{l(false);},[]),p=useCallback(g=>{s(g??e),l(false);},[e]);return {seconds:a,isRunning:i,isComplete:d,start:m,pause:f,reset:p}}function sS(e={}){let{interval:t=1e3,maxSeconds:r,autoStart:n=false}=e,[o,a]=useState(0),[s,i]=useState(n),l=s&&(r===void 0||o<r);bi(()=>{a(p=>p+1);},l?t:null);let c=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),m=useCallback(()=>i(p=>!p),[]),f=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:c,stop:d,reset:f,toggle:m}}function s0(e,t){let r=useRef(e);r.current=e,useEffect(()=>{if(t===null)return;let n=setTimeout(()=>{r.current();},t);return ()=>{clearTimeout(n);}},[t]);}function iS(e,t){let[r,n]=useState(false),o=useRef(null),a=useRef(e);a.current=e;let s=useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null),n(false);},[]),i=useCallback(()=>{s(),n(true),o.current=setTimeout(()=>{a.current(),n(false);},t);},[t,s]),l=useCallback(()=>{i();},[i]);return useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{start:i,cancel:s,reset:l,isScheduled:r}}function lS(e,t){let[r,n]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{n(e);},t);return ()=>{clearTimeout(o);}},[e,t]),r}function cS(e,t=true){let[r,n]=useState(false);return s0(()=>{n(true);},t?e:null),r}function dS(e,t=true){let[r,n]=useState(t),[o,a]=useState(0),[s,i]=useState(0),l=useRef(e);l.current=e;let c=useRef(null),d=useRef(0),m=useRef(0),f=useRef(0),p=useRef(0),g=useCallback(v=>{let w=d.current?v-d.current:0;d.current=v,p.current++,v-f.current>=1e3&&(a(p.current),p.current=0,f.current=v),m.current++,i(m.current),l.current(w,v),c.current=requestAnimationFrame(g);},[]),h=useCallback(()=>{c.current===null&&(d.current=0,f.current=performance.now(),p.current=0,c.current=requestAnimationFrame(g),n(true));},[g]),b=useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null,n(false));},[]);return useEffect(()=>(t&&h(),()=>{c.current!==null&&cancelAnimationFrame(c.current);}),[t,h]),{start:h,stop:b,isRunning:r,frameCount:s,fps:o}}function uS(e,t={}){let{duration:r=300,easing:n="easeOutCubic"}=t,[o,a]=useState(e),s=useRef(e),i=useRef(null),l=useRef(null),c={linear:d=>d,easeInCubic:d=>d*d*d,easeOutCubic:d=>1-Math.pow(1-d,3),easeInOutCubic:d=>d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2};return useEffect(()=>{if(o===e)return;s.current=o,i.current=null;let d=m=>{i.current===null&&(i.current=m);let f=m-i.current,p=Math.min(f/r,1),g=c[n](p),h=s.current+(e-s.current)*g;a(h),p<1&&(l.current=requestAnimationFrame(d));};return l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,r,n]),o}function mS(e,t={}){let{stiffness:r=100,damping:n=10,mass:o=1}=t,[a,s]=useState(e),i=useRef(0),l=useRef(null),c=useRef(null);return useEffect(()=>{if(Math.abs(a-e)<.01&&Math.abs(i.current)<.01){s(e);return}let d=m=>{c.current===null&&(c.current=m);let f=Math.min((m-c.current)/1e3,.064);c.current=m;let p=(e-a)*r,g=i.current*n,h=(p-g)/o;i.current+=h*f;let b=a+i.current*f;s(b),Math.abs(b-e)>.01||Math.abs(i.current)>.01?l.current=requestAnimationFrame(d):(s(e),i.current=0);};return c.current=null,l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,r,n,o,a]),a}var d0=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function pS(e,t={}){let{events:r=d0,initialState:n=false,enabled:o=true}=t,[a,s]=useState(n),i=useRef(null),l=useCallback(()=>{s(false),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{s(true);},e);},[e]);return useEffect(()=>{if(o)return l(),r.forEach(c=>{window.addEventListener(c,l);}),()=>{i.current&&clearTimeout(i.current),r.forEach(c=>{window.removeEventListener(c,l);});}},[o,r,l]),a}function fS(e,t,r,n={}){let{events:o=d0,initialState:a=false,enabled:s=true}=n,[i,l]=useState(a),c=useRef(null),d=useRef(a),m=useCallback(()=>{d.current&&(d.current=false,r?.()),l(false),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{d.current=true,l(true),t?.();},e);},[e,t,r]);return useEffect(()=>{if(s)return m(),o.forEach(f=>{window.addEventListener(f,m);}),()=>{c.current&&clearTimeout(c.current),o.forEach(f=>{window.removeEventListener(f,m);});}},[s,o,m]),i}function m0(){let[e,t]=useState(()=>typeof document>"u"?"visible":document.visibilityState);return useEffect(()=>{let r=()=>{t(document.visibilityState);};return document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r);}},[]),e}function vS(){return m0()==="visible"}function hS(e,t){let r=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r);}),[r]);}function xS(){let[e,t]=useState(()=>typeof navigator>"u"?true:navigator.onLine);return useEffect(()=>{let r=()=>t(true),n=()=>t(false);return window.addEventListener("online",r),window.addEventListener("offline",n),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n);}},[]),e}function yS(e,t){let[r,n]=useState(()=>typeof navigator>"u"?true:navigator.onLine),o=useCallback(()=>{n(true),e?.();},[e]),a=useCallback(()=>{n(false),t?.();},[t]);return useEffect(()=>(window.addEventListener("online",o),window.addEventListener("offline",a),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a);}),[o,a]),r}function b0(e){let[t,r]=useState(false),n=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),o=useCallback(async()=>{let i=e?.current||document.documentElement;try{i.requestFullscreen?await i.requestFullscreen():i.webkitRequestFullscreen?await i.webkitRequestFullscreen():i.mozRequestFullScreen?await i.mozRequestFullScreen():i.msRequestFullscreen&&await i.msRequestFullscreen();}catch(l){console.error("Failed to enter fullscreen:",l);}},[e]),a=useCallback(async()=>{try{document.exitFullscreen?await document.exitFullscreen():document.webkitExitFullscreen?await document.webkitExitFullscreen():document.mozCancelFullScreen?await document.mozCancelFullScreen():document.msExitFullscreen&&await document.msExitFullscreen();}catch(i){console.error("Failed to exit fullscreen:",i);}},[]),s=useCallback(async()=>{t?await a():await o();},[t,o,a]);return useEffect(()=>{let i=()=>{r(!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement));};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i);}},[]),{isFullscreen:t,enter:o,exit:a,toggle:s,isSupported:n}}function TS(){let e=useRef(null),t=b0(e);return {ref:e,...t}}function kS(e={}){let{watch:t=false,immediate:r=true,enableHighAccuracy:n=true,maximumAge:o=0,timeout:a=1e4}=e,[s,i]=useState({isLoading:false,position:null,error:null,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null}),l=typeof navigator<"u"&&"geolocation"in navigator,c=useCallback(f=>{i({isLoading:false,position:f,error:null,latitude:f.coords.latitude,longitude:f.coords.longitude,accuracy:f.coords.accuracy,altitude:f.coords.altitude,altitudeAccuracy:f.coords.altitudeAccuracy,heading:f.coords.heading,speed:f.coords.speed,timestamp:f.timestamp});},[]),d=useCallback(f=>{i(p=>({...p,isLoading:false,error:f}));},[]),m=useCallback(()=>{l&&(i(f=>({...f,isLoading:true,error:null})),navigator.geolocation.getCurrentPosition(c,d,{enableHighAccuracy:n,maximumAge:o,timeout:a}));},[l,c,d,n,o,a]);return useEffect(()=>{if(l&&(r&&m(),t)){let f=navigator.geolocation.watchPosition(c,d,{enableHighAccuracy:n,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(f);}}},[t,r,l,m,c,d,n,o,a]),{...s,getCurrentPosition:m,isSupported:l}}function PS(e,t,r,n){if(e===null||t===null||r===null||n===null)return null;let o=6371e3,a=e*Math.PI/180,s=r*Math.PI/180,i=(r-e)*Math.PI/180,l=(n-t)*Math.PI/180,c=Math.sin(i/2)*Math.sin(i/2)+Math.cos(a)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2),d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return o*d}function ES(e){let[t,r]=useState(null),[n,o]=useState(true),a=typeof navigator<"u"&&"permissions"in navigator,s=useCallback(async()=>{if(!a)return o(false),null;try{o(!0);let i=await navigator.permissions.query({name:e});return r(i.state),o(!1),i.state}catch(i){return console.error(`Permission query failed for ${e}:`,i),o(false),null}},[e,a]);return useEffect(()=>{if(!a){o(false);return}let i=null,l=()=>{i&&r(i.state);};return navigator.permissions.query({name:e}).then(c=>{i=c,r(c.state),o(false),c.addEventListener("change",l);}).catch(()=>{o(false);}),()=>{i&&i.removeEventListener("change",l);}},[e,a]),{state:t,isGranted:t==="granted",isDenied:t==="denied",isPrompt:t==="prompt",isLoading:n,isSupported:a,query:s}}function LS(){let[e,t]=useState(typeof Notification<"u"?Notification.permission:"default"),r=typeof Notification<"u",n=useCallback(async()=>{if(!r)return "default";let o=await Notification.requestPermission();return t(o),o},[r]);return useEffect(()=>{r&&t(Notification.permission);},[r]),{permission:e,request:n,isSupported:r}}function SS(e){let[t,r]=useState(null),[n,o]=useState(null),[a,s]=useState(false),i=typeof navigator<"u"&&"mediaDevices"in navigator,l=useCallback(async()=>{if(!i)return null;s(true),o(null);try{let d=await navigator.mediaDevices.getUserMedia(e);return r(d),s(!1),d}catch(d){let m=d instanceof Error?d:new Error(String(d));return o(m),s(false),null}},[e,i]),c=useCallback(()=>{t&&(t.getTracks().forEach(d=>d.stop()),r(null));},[t]);return useEffect(()=>()=>{t&&t.getTracks().forEach(d=>d.stop());},[t]),{stream:t,error:n,isLoading:a,request:l,stop:c,isSupported:i}}function HS(e={}){let{voice:t=null,rate:r=1,pitch:n=1,volume:o=1,lang:a="en-US"}=e,[s,i]=useState(false),[l,c]=useState(false),[d,m]=useState([]),f=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!f)return;let v=()=>{m(window.speechSynthesis.getVoices());};return v(),window.speechSynthesis.addEventListener("voiceschanged",v),()=>{window.speechSynthesis.removeEventListener("voiceschanged",v);}},[f]);let p=useCallback(v=>{if(!f)return;window.speechSynthesis.cancel();let w=new SpeechSynthesisUtterance(v);w.voice=t,w.rate=r,w.pitch=n,w.volume=o,w.lang=a,w.onstart=()=>i(true),w.onend=()=>{i(false),c(false);},w.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(w);},[f,t,r,n,o,a]),g=useCallback(()=>{f&&(window.speechSynthesis.cancel(),i(false),c(false));},[f]),h=useCallback(()=>{f&&(window.speechSynthesis.pause(),c(true));},[f]),b=useCallback(()=>{f&&(window.speechSynthesis.resume(),c(false));},[f]);return {speak:p,stop:g,pause:h,resume:b,isSpeaking:s,isPaused:l,isSupported:f,voices:d}}function IS(e={}){let{lang:t="en-US",continuous:r=false,interimResults:n=true}=e,[o,a]=useState(false),[s,i]=useState(""),[l,c]=useState(""),[d,m]=useState(null),f=useRef(null),p=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=p!==null;useEffect(()=>{if(!g||!p)return;let x=new p;return x.lang=t,x.continuous=r,x.interimResults=n,x.onstart=()=>{a(true),m(null);},x.onend=()=>{a(false);},x.onerror=R=>{m(new Error(R.error)),a(false);},x.onresult=R=>{let C="",y="";for(let k=R.resultIndex;k<R.results.length;k++){let T=R.results[k];T.isFinal?y+=T[0].transcript:C+=T[0].transcript;}y&&i(k=>k+y),c(C);},f.current=x,()=>{x.abort();}},[g,p,t,r,n]);let h=useCallback(()=>{if(f.current&&!o)try{f.current.start();}catch{}},[o]),b=useCallback(()=>{f.current&&f.current.stop();},[]),v=useCallback(()=>{f.current&&f.current.abort();},[]),w=useCallback(()=>{i(""),c(""),m(null);},[]);return {start:h,stop:b,abort:v,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:w}}export{Ju as Accordion,em as AccordionItem,yh as ActionBar,Rh as ActionBarButton,sh as ActionGroup,Sx as ActionSheet,k0 as Alert,E0 as AlertDescription,P0 as AlertTitle,wv as AreaChart,Nm as AspectRatio,_g as Autocomplete,wn as Avatar,Cn as AvatarFallback,Kp as AvatarGroup,Jn as AvatarImage,pg as BackTop,D0 as Badge,wx as Banner,yv as BarChart,Gh as BatteryMeter,xy as Blockquote,Px as BottomNavigation,jx as Bounce,vm as Breadcrumb,Cm as BreadcrumbEllipsis,xm as BreadcrumbItem,ym as BreadcrumbLink,hm as BreadcrumbList,Rm as BreadcrumbPage,wm as BreadcrumbSeparator,ae as Button,cd as ButtonGroup,eg as COUNTRIES,Yr as Calendar,fd as Card,hd as CardContent,vd as CardDescription,xd as CardFooter,gd as CardHeader,bd as CardTitle,Lv as Carousel,Sv as CarouselContent,Dv as CarouselItem,Fl as CarouselNext,Bl as CarouselPrevious,zo as Checkbox,dy as Checkmark,jp as Chip,Qp as CircularProgress,ct as CloseButton,sb as Code,ub as CodeBlock,Kx as Collapse,sm as Collapsible,im as CollapsibleContent,Bi as CollapsibleTrigger,Xh as ColorArea,Gf as ColorPicker,Zh as ColorSlider,Yo as ColorSwatch,Kf as ColorSwatchPicker,Jh as ColorWheel,Xi as Command,kw as CommandDialog,kp as CommandEmpty,Pp as CommandGroup,Mp as CommandInput,Lp as CommandItem,Np as CommandList,Ep as CommandSeparator,Sp as CommandShortcut,uy as Confetti,Eu as ContextMenu,Ou as ContextMenuCheckboxItem,Iu as ContextMenuContent,Su as ContextMenuGroup,zu as ContextMenuItem,Du as ContextMenuPortal,Bu as ContextMenuSection,Fu as ContextMenuSeparator,Ku as ContextMenuShortcut,Hu as ContextMenuSub,Au as ContextMenuSubContent,Vu as ContextMenuSubTrigger,Lu as ContextMenuTrigger,Sh as ContextualHelp,gv as CopyButton,Zx as Counter,Xf as CurrencyInput,ia as DEFAULT_COLORS,fw as DataTable,Mk as DateField,tc as DateInput,Ap as DatePicker,Ob as DateRangePicker,wl as DefaultErrorFallback,La as Dialog,kd as DialogClose,Sa as DialogContent,Sd as DialogDescription,Ed as DialogFooter,Pd as DialogHeader,Ti as DialogOverlay,Ci as DialogPortal,Ld as DialogTitle,Nd as DialogTrigger,$h as DiskUsageMeter,Gi as Drawer,_m as DrawerBody,Zm as DrawerClose,Wm as DrawerContent,qm as DrawerDescription,Xm as DrawerFooter,op as DrawerGroup,ap as DrawerGroupLabel,jm as DrawerHeader,sp as DrawerInset,ep as DrawerMenu,np as DrawerMenuButton,tp as DrawerMenuItem,iw as DrawerProvider,Jm as DrawerSeparator,Gm as DrawerSidebar,Ym as DrawerTitle,Qm as DrawerToggle,Um as DrawerTrigger,br as Dropdown,hr as DropdownContent,nu as DropdownGroup,$t as DropdownItem,bR as DropdownLabel,Li as DropdownSection,tu as DropdownSeparator,ru as DropdownShortcut,ou as DropdownSub,su as DropdownSubContent,au as DropdownSubTrigger,vr as DropdownTrigger,$l as EMOJIS,As as EMOJI_CATEGORIES,Iv as EmojiPicker,mf as EmptyState,rM as ErrorBoundary,$x as Expand,ZP as FAB,Ox as Fade,pl as FieldContext,zf as FileUpload,Ux as Flip,gc as FloatingActionButton,Xg as Form,ml as FormContext,Qg as FormControl,Jg as FormDescription,Yg as FormField,qg as FormItem,Zg as FormLabel,eb as FormMessage,hv as FullCalendar,my as Glow,Bh as GridList,fy as H1,gy as H2,by as H3,vy as H4,pm as HoverCard,gm as HoverCardContent,fm as HoverCardTrigger,fh as IllustratedMessage,gb as Image,Bv as ImageCropper,Ll as ImageViewer,av as ImageViewerTrigger,iv as Indicator,lv as IndicatorWrapper,Gb as InfiniteScroll,hh as InlineAlert,yy as InlineCode,Da as Input,tf as InputOTP,rf as InputOTPGroup,of as InputOTPSeparator,nf as InputOTPSlot,kv as KanbanBoard,pv as Kbd,Rn as Label,rx as LabeledValue,ox as LabeledValueGroup,wy as Large,Ry as Lead,xv as LineChart,ug as Link,gC as List,hf as ListItem,xf as ListItemText,Nh as ListView,Rb as Listbox,wb as ListboxItem,Ab as Loading,Eb as LoadingOverlay,ol as MASK_PRESETS,Zf as MaskedInput,hg as Menubar,Eg as MenubarCheckboxItem,kg as MenubarContent,yg as MenubarGroup,Pg as MenubarItem,Sg as MenubarLabel,xg as MenubarMenu,Rg as MenubarPortal,Cg as MenubarRadioGroup,Lg as MenubarRadioItem,Dg as MenubarSeparator,Hg as MenubarShortcut,wg as MenubarSub,Ng as MenubarSubContent,Mg as MenubarSubTrigger,Tg as MenubarTrigger,Qs as Meter,Xb as Modal,ev as ModalBody,Zb as ModalClose,Qb as ModalContent,nv as ModalDescription,tv as ModalFooter,Jb as ModalHeader,El as ModalOverlay,Pl as ModalPortal,Yb as ModalRoot,rv as ModalTitle,qb as ModalTrigger,Ty as Muted,Sb as NProgress,og as Navbar,ag as NavbarBrand,sg as NavbarContent,ig as NavbarItem,lg as NavbarLink,Dm as NavigationMenu,zm as NavigationMenuContent,Fm as NavigationMenuIndicator,Im as NavigationMenuItem,Bm as NavigationMenuLink,Hm as NavigationMenuList,Am as NavigationMenuTrigger,$i as NavigationMenuViewport,vx as NotificationCenter,xx as NotificationCenterContent,zP as NotificationCenterProvider,hx as NotificationCenterTrigger,pc as NotificationItem,yx as NotificationList,Zv as NumberField,Ip as NumberInput,xp as Pagination,yp as PaginationContent,Tp as PaginationEllipsis,Rp as PaginationItem,es as PaginationLink,Cp as PaginationNext,wp as PaginationPrevious,hy as Paragraph,sy as Parallax,Hp as PasswordInput,tg as PhoneInput,Rv as PieChart,qx as Pop,_e as Popover,jr as PopoverAnchor,Xe as PopoverContent,Dt as PopoverTrigger,qa as Progress,zx as PullToRefresh,Xx as Pulse,Kv as QRCode,Uu as RadioGroup,Wu as RadioGroupItem,Ph as RangeSlider,Gp as Rating,Zw as ResizableHandle,qw as ResizablePanel,Yw as ResizablePanelGroup,Av as RichTextEditor,Wx as Ripple,Gx as Rotate,Fx as Scale,De as ScrollArea,ay as ScrollProgress,oy as ScrollReveal,uv as ScrollShadow,cx as SearchBar,eh as SearchField,Df as SegmentedControl,Hf as SegmentedControlItem,Zd as Select,Kr as Separator,_x as Shake,hu as Sheet,yu as SheetClose,Cu as SheetContent,ku as SheetDescription,Mu as SheetFooter,Tu as SheetHeader,Ru as SheetOverlay,Vi as SheetPortal,Nu as SheetTitle,xu as SheetTrigger,cy as Shimmer,za as Skeleton,Bx as Slide,_a as Slider,Cy as Small,fb as Snippet,GT as SortableList,py as Sparkles,Pa as Spinner,px as SpotlightSearch,gf as StatCard,uh as StatusLight,zg as Step,Vg as Steps,Ix as SwipeActions,Ad as Switch,mb as TabbedCodeBlock,lp as Table,dp as TableBody,gp as TableCaption,fp as TableCell,up as TableFooter,pp as TableHead,cp as TableHeader,mp as TableRow,uu as Tabs,fu as TabsContent,mu as TabsList,pu as TabsTrigger,Ih as TagGroup,cf as TagInput,I0 as TextBadge,_v as TextField,Jx as TextReveal,zd as Textarea,$v as ThemeProvider,Gv as ThemeToggle,nh as TimeField,Wf as TimeInput,Bb as TimePicker,Cf as Timeline,Nf as TimelineContent,Mf as TimelineItem,kf as TimelineOpposite,NR as Toaster,ju as Toggle,Xu as ToggleGroup,Yu as ToggleGroupItem,Gr as Tooltip,Wr as TooltipContent,$r as TooltipProvider,Ur as TooltipTrigger,Ug as Tree,Qx as Typewriter,My as UL,nb as User,iM as VirtualList,Yx as Wiggle,ey as WordRotate,xh as actionBarVariants,ah as actionGroupVariants,Lx as actionSheetItemVariants,M0 as alertVariants,ls as applyMask,jg as autocompleteInputVariants,Fp as avatarGroupVariants,mg as backTopVariants,L0 as badgeIndicatorVariants,Rx as bannerVariants,kx as bottomNavigationVariants,id as buttonGroupVariants,Yn as buttonVariants,hR as calculatePasswordStrength,pd as cardVariants,Pv as carouselVariants,sa as chartContainerVariants,Wp as chipVariants,Zp as circularProgressVariants,wd as closeButtonVariants,u as cn,ab as codeVariants,Uh as colorAreaVariants,qh as colorSliderVariants,Ff as colorSwatchPickerVariants,Bf as colorSwatchVariants,Qh as colorWheelVariants,ic as contextualHelpTriggerVariants,fv as copyButtonVariants,jf as currencyInputVariants,th as dateInputVariants,gu as defaultPasswordRequirements,rp as drawerMenuButtonVariants,Hv as emojiPickerVariants,uf as emptyStateVariants,ga as fabVariants,If as fileUploadVariants,nl as formatCurrency,pa as formatDate,ss as formatFileSize,cs as formatPhoneNumber,vv as fullCalendarVariants,Vf as getFileIcon,qf as getMaskPlaceholder,xR as getPasswordStrengthColor,yR as getPasswordStrengthLabel,Oh as gridListItemVariants,zh as gridListVariants,jh as hexToRgb,ei as hsvToRgb,ph as illustratedMessageVariants,Ov as imageCropperVariants,hl as imageVariants,sv as indicatorVariants,Nl as infiniteScrollLoaderVariants,$b as infiniteScrollVariants,vh as inlineAlertVariants,ef as inputOTPVariants,Wv as inputSizeVariants,Mv as kanbanBoardVariants,Ol as kanbanCardVariants,Nv as kanbanColumnVariants,mv as kbdVariants,jv as labelSizeVariants,nx as labeledValueGroupVariants,tx as labeledValueVariants,dg as linkVariants,vf as listItemVariants,Ji as listVariants,Mh as listViewItemVariants,Th as listViewVariants,xb as listboxItemVariants,hb as listboxVariants,Pb as loadingOverlayVariants,Vb as loadingVariants,Yf as maskedInputVariants,Kh as meterVariants,kl as modalContentVariants,ng as navbarVariants,Om as navigationMenuLinkStyle,Vm as navigationMenuTriggerStyle,Lb as nprogressVariants,qv as numberFieldVariants,Jl as parseDate,_f as parseFormattedValue,Jf as phoneInputVariants,Ax as pullToRefreshVariants,jl as qrCodeVariants,kh as rangeSliderVariants,$p as ratingVariants,_h as rgbToHex,Wh as rgbToHsv,Vv as richTextEditorVariants,dv as scrollShadowVariants,lx as searchBarVariants,Jv as searchFieldVariants,Lf as segmentedControlItemVariants,Ef as segmentedControlVariants,qd as selectVariants,wu as sheetVariants,Bd as skeletonVariants,pb as snippetVariants,Mb as sortableItemVariants,Tb as sortableListVariants,ad as spinnerVariants,ff as statCardVariants,dh as statusLightVariants,Ag as stepVariants,Ig as stepsVariants,vc as swipeActionVariants,Hx as swipeActionsVariants,Ia as switchColors,lc as tagGroupItemVariants,Hh as tagGroupVariants,lf as tagVariants,H0 as textBadgeVariants,Uv as textFieldVariants,dk as themeToggleVariants,rh as timeFieldVariants,Uf as timeInputVariants,Tf as timelineItemVariants,wf as timelineVariants,Wa as toggleVariants,Fg as treeItemVariants,Bg as treeVariants,al as unmask,uS as useAnimatedValue,e0 as useAsync,JL as useAsyncRetry,wL as useBodyScrollLock,AL as useBooleanToggle,AE as useBreakpoint,zE as useBreakpoints,yi as useButtonGroup,Vs as useCarousel,JE as useClickOutside,eL as useClickOutsideMultiple,RE as useConfetti,rL as useCopy,tL as useCopyToClipboard,aS as useCountdown,OL as useCounter,VL as useCycle,WE as useDebounce,jE as useDebouncedCallback,_E as useDebouncedCallbackWithControls,lS as useDelayedValue,Uy as useDisclosure,HL as useDisclosureOpen,PS as useDistance,vS as useDocumentIsVisible,m0 as useDocumentVisibility,hS as useDocumentVisibilityCallback,JR as useDrawer,LL as useElementSize,sL as useEventListener,iL as useEventListenerRef,tS as useFetch,gs as useFieldContext,hL as useFocusTrap,xL as useFocusTrapRef,fl as useFormContext,b0 as useFullscreen,TS as useFullscreenRef,kS as useGeolocation,nL as useHotkeys,oL as useHotkeysMap,dL as useHover,pL as useHoverDelay,mL as useHoverProps,uL as useHoverRef,pS as useIdle,fS as useIdleCallback,BL as useIncrementCounter,Fy as useIntersectionObserver,TL as useIntersectionObserverRef,bi as useInterval,oS as useIntervalControls,kE as useIsDesktop,ME as useIsMobile,NE as useIsTablet,lL as useKeyPress,aL as useKeyPressed,SM as useKeyboardShortcut,ML as useLazyLoad,WL as useList,FE as useLocalStorage,cL as useLongPress,jL as useMap,SS as useMediaPermission,So as useMediaQuery,gL as useMouse,bL as useMouseElement,vL as useMouseElementRef,rS as useMutation,NL as useMutationObserver,kL as useMutationObserverRef,ri as useNotificationCenter,LS as useNotificationPermission,xS as useOnlineStatus,yS as useOnlineStatusCallback,ES as usePermission,PE as usePrefersColorScheme,EE as usePrefersReducedMotion,FL as usePrevious,$L as usePreviousDistinct,KL as usePreviousWithInitial,qL as useQueue,dS as useRafLoop,_L as useRecord,PL as useResizeObserver,EL as useResizeObserverRef,zy as useScrollLock,yL as useScrollPosition,YL as useSelection,$E as useSessionStorage,qy as useSet,IS as useSpeechRecognition,HS as useSpeechSynthesis,EP as useSpotlight,mS as useSpringValue,ZL as useStack,qE as useThrottle,ZE as useThrottledCallback,s0 as useTimeout,iS as useTimeoutControls,cS as useTimeoutFlag,sS as useTimer,IL as useToggle,VE as useWindowHeight,RL as useWindowScroll,xa as useWindowSize,IE as useWindowWidth,rb as userVariants,Af as validateFile,PT as validators,Fb as virtualListVariants};//# sourceMappingURL=index.js.map
|
|
72
|
+
`})]})});_x.displayName="Shimmer";var nE={sm:24,md:40,lg:56,xl:80},oE={default:{circle:"stroke-muted-foreground",check:"stroke-foreground"},success:{circle:"stroke-green-500",check:"stroke-green-500"},primary:{circle:"stroke-primary",check:"stroke-primary"},outline:{circle:"stroke-border",check:"stroke-foreground"}},Xx=j.forwardRef(({show:e=true,size:t="md",variant:r="success",strokeWidth:n=2,duration:o=.6,delay:a=0,className:s,onComplete:i},l)=>{let c=nE[t],d=oE[r],m={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a,ease:"easeOut"}}},f={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a+o*.4,ease:"easeOut"}}};return jsxs("svg",{ref:l,width:c,height:c,viewBox:"0 0 50 50",className:u(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:n,className:d.circle,variants:m,initial:"hidden",animate:e?"visible":"hidden"}),jsx(motion.path,{d:"M14 27 L22 35 L36 18",fill:"none",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:d.check,variants:f,initial:"hidden",animate:e?"visible":"hidden",onAnimationComplete:()=>e&&i?.()})]})});Xx.displayName="Checkmark";var ko={particleCount:100,spread:70,startVelocity:30,decay:.95,gravity:1,colors:["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"],origin:{x:.5,y:.5},shapes:["square","circle"],scalar:1,drift:0,ticks:200},Yx=j.forwardRef(({autoTrigger:e=false,delay:t=0,options:r={},children:n,onTrigger:o},a)=>{let s=j.useCallback(()=>{let i={...ko,...r};No(i),o?.();},[r,o]);return j.useEffect(()=>{if(e){let i=setTimeout(s,t);return ()=>clearTimeout(i)}},[e,t,s]),n?jsx("div",{ref:a,onClick:s,className:"inline-block cursor-pointer",children:n}):null});Yx.displayName="Confetti";var aE=()=>{let e=j.useCallback(n=>{let o={...ko,...n};No(o);},[]),t=j.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);No({...ko,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),No({...ko,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),r=j.useCallback((n="both")=>{let o={x:0,y:1},a={x:1,y:1};(n==="left"||n==="both")&&No({...ko,particleCount:50,angle:60,spread:55,origin:o}),(n==="right"||n==="both")&&No({...ko,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:r}},qx=j.forwardRef(({children:e,color:t="hsl(var(--primary))",intensity:r=20,spread:n=0,animate:o=false,duration:a=2,className:s},i)=>{let l={boxShadow:`0 0 ${r}px ${n}px ${t}`};return o?jsx(motion.div,{ref:i,className:u("rounded-[inherit]",s),animate:{boxShadow:[`0 0 ${r}px ${n}px ${t}`,`0 0 ${r*1.5}px ${n+5}px ${t}`,`0 0 ${r}px ${n}px ${t}`]},transition:{duration:a,repeat:1/0,ease:"easeInOut"},children:e}):jsx("div",{ref:i,className:u("rounded-[inherit]",s),style:l,children:e})});qx.displayName="Glow";var jx=(e,t)=>({id:Math.random().toString(36).substr(2,9),x:`${Math.random()*100}%`,y:`${Math.random()*100}%`,size:Math.random()*(t-e)+e,delay:Math.random()*2}),Zx=j.forwardRef(({children:e,count:t=10,color:r="hsl(var(--primary))",minSize:n=4,maxSize:o=8,duration:a=1.5,className:s},i)=>{let[l,c]=j.useState([]);return j.useEffect(()=>{let d=Array.from({length:t},()=>jx(n,o));c(d);let m=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=jx(n,o),p});},a*500);return ()=>clearInterval(m)},[t,n,o,a]),jsxs("div",{ref:i,className:u("relative inline-block",s),children:[e,l.map(d=>jsx(motion.svg,{className:"pointer-events-none absolute",style:{left:d.x,top:d.y,width:d.size,height:d.size},viewBox:"0 0 24 24",initial:{scale:0,opacity:0,rotate:0},animate:{scale:[0,1,0],opacity:[0,1,0],rotate:[0,180]},transition:{duration:a,delay:d.delay,repeat:1/0,ease:"easeInOut"},children:jsx("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z",fill:r})},d.id))]})});Zx.displayName="Sparkles";var Qx=j.forwardRef(({className:e,children:t,...r},n)=>jsx("h1",{ref:n,className:u("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...r,children:t}));Qx.displayName="H1";var Jx=j.forwardRef(({className:e,children:t,...r},n)=>jsx("h2",{ref:n,className:u("scroll-m-20 text-3xl font-semibold tracking-tight",e),...r,children:t}));Jx.displayName="H2";var ey=j.forwardRef(({className:e,children:t,...r},n)=>jsx("h3",{ref:n,className:u("scroll-m-20 text-2xl font-semibold tracking-tight",e),...r,children:t}));ey.displayName="H3";var ty=j.forwardRef(({className:e,children:t,...r},n)=>jsx("h4",{ref:n,className:u("scroll-m-20 text-xl font-semibold tracking-tight",e),...r,children:t}));ty.displayName="H4";var ry=j.forwardRef(({className:e,children:t,...r},n)=>jsx("p",{ref:n,className:u("leading-7 [&:not(:first-child)]:mt-6",e),...r,children:t}));ry.displayName="Paragraph";var ny=j.forwardRef(({className:e,children:t,...r},n)=>jsx("blockquote",{ref:n,className:u("mt-6 border-l-2 pl-6 italic",e),...r,children:t}));ny.displayName="Blockquote";var oy=j.forwardRef(({className:e,children:t,...r},n)=>jsx("code",{ref:n,className:u("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...r,children:t}));oy.displayName="InlineCode";var ay=j.forwardRef(({className:e,children:t,...r},n)=>jsx("p",{ref:n,className:u("text-xl text-muted-foreground",e),...r,children:t}));ay.displayName="Lead";var sy=j.forwardRef(({className:e,children:t,...r},n)=>jsx("div",{ref:n,className:u("text-lg font-semibold",e),...r,children:t}));sy.displayName="Large";var iy=j.forwardRef(({className:e,children:t,...r},n)=>jsx("small",{ref:n,className:u("text-sm font-medium leading-none",e),...r,children:t}));iy.displayName="Small";var ly=j.forwardRef(({className:e,children:t,...r},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...r,children:t}));ly.displayName="Muted";var cy=j.forwardRef(({className:e,children:t,...r},n)=>jsx("ul",{ref:n,className:u("my-6 ml-6 list-disc [&>li]:mt-2",e),...r,children:t}));cy.displayName="UL";function Po(e){let t=useCallback(o=>typeof window<"u"?window.matchMedia(o).matches:false,[]),[r,n]=useState(()=>t(e));return useEffect(()=>{let o=window.matchMedia(e),a=()=>{n(o.matches);};return n(o.matches),o.addEventListener("change",a),()=>{o.removeEventListener("change",a);}},[e]),r}function cE(){return Po("(max-width: 767px)")}function dE(){return Po("(min-width: 768px) and (max-width: 1023px)")}function uE(){return Po("(min-width: 1024px)")}function mE(){return Po("(prefers-color-scheme: dark)")?"dark":"light"}function pE(){return Po("(prefers-reduced-motion: reduce)")}function ba(e={}){let{initialWidth:t=0,initialHeight:r=0,debounce:n=0,includeScrollbar:o=true}=e,[a,s]=useState(()=>typeof window>"u"?{width:t,height:r}:{width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight}),i=useRef(null),l=useCallback(()=>{let c=()=>{s({width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight});};n>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(c,n)):c();},[n,o]);return useEffect(()=>(l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),i.current&&clearTimeout(i.current);}),[l]),a}function hE(){let{width:e}=ba();return e}function xE(){let{height:e}=ba();return e}function yE(e){let{width:t}=ba();return t>=e}function RE(){let{width:e}=ba();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function TE(e,t){let r=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading localStorage key "${e}":`,i),t}},[t,e]),[n,o]=useState(r),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting localStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(n):i;o(l),window.localStorage.setItem(e,JSON.stringify(l)),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:JSON.stringify(l)}));}catch(l){console.warn(`Error setting localStorage key "${e}":`,l);}},[e,n]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(e),o(t),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:null}));}catch(i){console.warn(`Error removing localStorage key "${e}":`,i);}},[e,t]);return useEffect(()=>{let i=l=>{if(l.key===e&&l.newValue!==null)try{o(JSON.parse(l.newValue));}catch{o(l.newValue);}else l.key===e&&l.newValue===null&&o(t);};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i);}},[e,t]),[n,a,s]}function NE(e,t){let r=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.sessionStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading sessionStorage key "${e}":`,i),t}},[t,e]),[n,o]=useState(r),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting sessionStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(n):i;o(l),window.sessionStorage.setItem(e,JSON.stringify(l));}catch(l){console.warn(`Error setting sessionStorage key "${e}":`,l);}},[e,n]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.sessionStorage.removeItem(e),o(t);}catch(i){console.warn(`Error removing sessionStorage key "${e}":`,i);}},[e,t]);return [n,a,s]}function EE(e,t=500){let[r,n]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{n(e);},t);return ()=>{clearTimeout(o);}},[e,t]),r}function LE(e,t=500){let r=useRef(null),n=useRef(e);return useEffect(()=>{n.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]),useCallback((...a)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n.current(...a);},t);},[t])}function SE(e,t=500){let r=useRef(null),n=useRef(e),o=useRef(null);useEffect(()=>{n.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]);let a=useCallback((...c)=>{o.current=c,r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n.current(...c),r.current=null,o.current=null;},t);},[t]),s=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null,o.current=null);},[]),i=useCallback(()=>{r.current&&o.current&&(clearTimeout(r.current),n.current(...o.current),r.current=null,o.current=null);},[]),l=useCallback(()=>r.current!==null,[]);return {debouncedCallback:a,cancel:s,flush:i,isPending:l}}function IE(e,t=500){let[r,n]=useState(e),o=useRef(Date.now());return useEffect(()=>{let a=Date.now();if(a>=o.current+t)o.current=a,n(e);else {let s=setTimeout(()=>{o.current=Date.now(),n(e);},t-(a-o.current));return ()=>clearTimeout(s)}},[e,t]),r}function VE(e,t=500){let r=useRef(0),n=useRef(null),o=useRef(e);return useEffect(()=>{o.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]),useCallback((...s)=>{let i=Date.now();i-r.current>=t?(o.current(...s),r.current=i):(n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{o.current(...s),r.current=Date.now();},t-(i-r.current)));},[t])}function zE(e,t=true){let r=useRef(null);return useEffect(()=>{if(!t)return;let n=o=>{let a=r.current;!a||a.contains(o.target)||e(o);};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n);}},[e,t]),r}function OE(e,t,r=true){useEffect(()=>{if(!r)return;let n=o=>{e.some(s=>{let i=s.current;return i&&i.contains(o.target)})||t(o);};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n);}},[e,t,r]);}function BE(e=2e3){let[t,r]=useState(null),[n,o]=useState(false),[a,s]=useState(false),i=useCallback(()=>{r(null),o(false);},[]),l=useCallback(async c=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;s(true);try{return await navigator.clipboard.writeText(c),r(c),o(!0),e>0&&setTimeout(()=>{o(!1);},e),!0}catch(d){return console.warn("Copy to clipboard failed:",d),r(null),o(false),false}finally{s(false);}},[e]);return {copiedValue:t,success:n,isLoading:a,copy:l,reset:i}}function FE(){return useCallback(async e=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy to clipboard failed:",t),false}},[])}function uy(e){let t=e.toLowerCase().split("+");return {key:t[t.length-1],ctrl:t.includes("ctrl")||t.includes("control"),alt:t.includes("alt")||t.includes("option"),shift:t.includes("shift"),meta:t.includes("meta")||t.includes("cmd")||t.includes("command")}}function my(e,t){let r=e.key.toLowerCase(),n=r===" "?"space":r==="escape"?"esc":r,o=t.key==="space"?" ":t.key;return (n===o||e.code.toLowerCase()===`key${o}`)&&e.ctrlKey===t.ctrl&&e.altKey===t.alt&&e.shiftKey===t.shift&&e.metaKey===t.meta}function KE(e,t,r={}){let{enabled:n=true,preventDefault:o=true,stopPropagation:a=false,target:s=null}=r,i=useRef(t);i.current=t;let l=uy(e);useEffect(()=>{if(!n)return;let c=m=>{my(m,l)&&(o&&m.preventDefault(),a&&m.stopPropagation(),i.current(m));},d=s||document;return d.addEventListener("keydown",c),()=>{d.removeEventListener("keydown",c);}},[n,o,a,s,l]);}function $E(e,t={}){let{enabled:r=true,preventDefault:n=true,stopPropagation:o=false,target:a=null}=t,s=useRef(e);s.current=e;let i=Object.entries(e).map(([l,c])=>({parsed:uy(l),handler:c}));useEffect(()=>{if(!r)return;let l=d=>{for(let{parsed:m,handler:f}of i)if(my(d,m)){n&&d.preventDefault(),o&&d.stopPropagation(),f(d);break}},c=a||document;return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l);}},[r,n,o,a,i]);}function GE(e){let t=useRef(false);return useEffect(()=>{let r=o=>{o.key===e&&(t.current=true);},n=o=>{o.key===e&&(t.current=false);};return document.addEventListener("keydown",r),document.addEventListener("keyup",n),()=>{document.removeEventListener("keydown",r),document.removeEventListener("keyup",n);}},[e]),t.current}function UE(e,t,r,n){let o=useRef(t);o.current=t,useEffect(()=>{let a;if(r==null?a=window:"current"in r?a=r.current:a=r,!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,n),()=>{a?.removeEventListener(e,s,n);}},[e,r,n]);}function WE(e,t,r){let n=useRef(null),o=useRef(t);return o.current=t,useEffect(()=>{let a=n.current;if(!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,r),()=>{a.removeEventListener(e,s,r);}},[e,r]),n}function jE(e,t,r={}){let{target:n,event:o="keydown",enabled:a=true}=r,s=useRef(t);s.current=t,useEffect(()=>{if(!a)return;let i=n?.current||window,l=c=>{c.key===e&&s.current(c);};return i.addEventListener(o,l),()=>{i.removeEventListener(o,l);}},[e,n,o,a]);}function _E(e,t={}){let{threshold:r=500,onStart:n,onCancel:o,enabled:a=true}=t,s=useRef(null),i=useRef(false),l=useRef(null),c=useCallback(m=>{a&&(l.current=m,i.current=false,n?.(m),s.current=setTimeout(()=>{i.current=true,l.current&&e(l.current);},r));},[e,r,n,a]),d=useCallback(m=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(m),i.current=false,l.current=null);},[o,a]);return {onMouseDown:c,onMouseUp:d,onMouseLeave:d,onTouchStart:c,onTouchEnd:d}}function XE(e){let t=useRef(null),[r,n]=useState(false),o=useCallback(()=>{n(true),e?.onHoverStart?.();},[e]),a=useCallback(()=>{n(false),e?.onHoverEnd?.();},[e]);return useEffect(()=>{let s=t.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[o,a]),{ref:t,isHovered:r}}function YE(e,t){let[r,n]=useState(false),o=useCallback(()=>{n(true),t?.onHoverStart?.();},[t]),a=useCallback(()=>{n(false),t?.onHoverEnd?.();},[t]);return useEffect(()=>{let s=e.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[e,o,a]),r}function qE(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function ZE(e=0){let t=useRef(null),[r,n]=useState(false),o=useRef(null);return useEffect(()=>{let a=t.current;if(!a)return;let s=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{n(true);},e);},i=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{n(false);},e);};return a.addEventListener("mouseenter",s),a.addEventListener("mouseleave",i),()=>{a.removeEventListener("mouseenter",s),a.removeEventListener("mouseleave",i),o.current&&clearTimeout(o.current);}},[e]),{ref:t,isHovered:r}}function JE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let r=n=>{t({x:n.clientX,y:n.clientY});};return window.addEventListener("mousemove",r),()=>{window.removeEventListener("mousemove",r);}},[]),e}function eL(e={}){let{enabled:t=true,resetOnLeave:r=false}=e,n=useRef(null),[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=n.current;if(!s||!t)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{r&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),r&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),r&&s.removeEventListener("mouseleave",l);}},[t,r]),{ref:n,...o}}function tL(e,t={}){let{enabled:r=true,resetOnLeave:n=false}=t,[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=e.current;if(!s||!r)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{n&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),n&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),n&&s.removeEventListener("mouseleave",l);}},[e,r,n]),o}var gy=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"].join(",");function rL(e={}){let{enabled:t=true,initialFocus:r,returnFocus:n=true,autoFocus:o=true}=e,a=useRef(null),s=useRef(null),i=useCallback(()=>{let c=a.current;return c?Array.from(c.querySelectorAll(gy)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);return useEffect(()=>{if(!t)return;let c=a.current;if(c){if(s.current=document.activeElement,o)if(r?.current)r.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),n&&s.current&&s.current.focus();}}},[t,r,n,o,l,i]),a}function nL(e,t={}){let{enabled:r=true,initialFocus:n,returnFocus:o=true,autoFocus:a=true}=t,s=useRef(null),i=useCallback(()=>{let c=e.current;return c?Array.from(c.querySelectorAll(gy)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[e]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);useEffect(()=>{if(!r)return;let c=e.current;if(c){if(s.current=document.activeElement,a)if(n?.current)n.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),o&&s.current&&s.current.focus();}}},[e,r,n,o,a,l,i]);}function oL(e={}){let{threshold:t=0,throttle:r=0,element:n}=e,[o,a]=useState({x:0,y:0,isScrolled:false,directionY:0,directionX:0,isAtBottom:false,isAtTop:true,progress:0}),s=useRef(0),i=useRef(0),l=useRef(false),c=useRef(0),d=useCallback(()=>{let f=n?.current,p=f?f.scrollTop:window.scrollY,g=f?f.scrollLeft:window.scrollX,h=f?f.scrollHeight-f.clientHeight:document.documentElement.scrollHeight-window.innerHeight,b=p>s.current?1:p<s.current?-1:0,v=g>i.current?1:g<i.current?-1:0;s.current=p,i.current=g,a({x:g,y:p,isScrolled:p>t,directionY:b,directionX:v,isAtBottom:p>=h-1,isAtTop:p<=0,progress:h>0?p/h:0}),l.current=false;},[n,t]),m=useCallback(()=>{let f=Date.now();if(r>0&&f-c.current<r){l.current||(l.current=true,requestAnimationFrame(d));return}c.current=f,l.current||(l.current=true,requestAnimationFrame(d));},[r,d]);return useEffect(()=>{let f=n?.current||window;return f.addEventListener("scroll",m,{passive:true}),d(),()=>{f.removeEventListener("scroll",m);}},[n,m,d]),o}function aL(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let r=()=>{t({x:window.scrollX,y:window.scrollY});};return window.addEventListener("scroll",r,{passive:true}),r(),()=>{window.removeEventListener("scroll",r);}},[]),e}function Ry(e={}){let{autoLock:t=false,lockX:r=true}=e,n=useRef(false),o=useRef({x:0,y:0}),a=useRef(null),s=useCallback(()=>{if(typeof document>"u"||n.current)return;let{body:l}=document,c=window.scrollY,d=window.scrollX;o.current={x:d,y:c},a.current={overflow:l.style.overflow,overflowX:l.style.overflowX,overflowY:l.style.overflowY,position:l.style.position,top:l.style.top,left:l.style.left,width:l.style.width},l.style.overflow="hidden",r&&(l.style.overflowX="hidden"),l.style.overflowY="hidden",l.style.position="fixed",l.style.top=`-${c}px`,l.style.left=r?`-${d}px`:"0",l.style.width="100%",n.current=true;},[r]),i=useCallback(()=>{if(typeof document>"u"||!n.current)return;let{body:l}=document,c=a.current;c&&(l.style.overflow=c.overflow,l.style.overflowX=c.overflowX,l.style.overflowY=c.overflowY,l.style.position=c.position,l.style.top=c.top,l.style.left=c.left,l.style.width=c.width),window.scrollTo(o.current.x,o.current.y),n.current=false;},[]);return useEffect(()=>(t&&s(),()=>{i();}),[t,s,i]),{lock:s,unlock:i,isLocked:n.current}}function sL(e=true){let{lock:t,unlock:r}=Ry();useEffect(()=>{e?t():r();},[e,t,r]);}function Ty(e={}){let{root:t=null,rootMargin:r="0px",threshold:n=0,once:o=false,enabled:a=true}=e,s=useRef(null),[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=s.current;if(!c||!a)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),o&&m.isIntersecting&&d.disconnect();},{root:t,rootMargin:r,threshold:n});return d.observe(c),()=>{d.disconnect();}},[t,r,n,o,a]),{ref:s,...i}}function lL(e,t={}){let{root:r=null,rootMargin:n="0px",threshold:o=0,once:a=false,enabled:s=true}=t,[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=e.current;if(!c||!s)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),a&&m.isIntersecting&&d.disconnect();},{root:r,rootMargin:n,threshold:o});return d.observe(c),()=>{d.disconnect();}},[e,r,n,o,a,s]),i}function cL(e="200px"){let{ref:t,isIntersecting:r}=Ty({rootMargin:e,once:true});return {ref:t,isVisible:r}}function dL(e,t={}){let{enabled:r=true,childList:n=true,attributes:o=true,characterData:a=false,subtree:s=false,attributeOldValue:i=false,characterDataOldValue:l=false,attributeFilter:c}=t,d=useRef(null),m=useRef(e);return m.current=e,useEffect(()=>{let f=d.current;if(!f||!r)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:n,attributes:o,characterData:a,subtree:s,attributeOldValue:i,characterDataOldValue:l,attributeFilter:c}),()=>{p.disconnect();}},[r,n,o,a,s,i,l,c]),d}function uL(e,t,r={}){let{enabled:n=true,childList:o=true,attributes:a=true,characterData:s=false,subtree:i=false,attributeOldValue:l=false,characterDataOldValue:c=false,attributeFilter:d}=r,m=useRef(t);m.current=t,useEffect(()=>{let f=e.current;if(!f||!n)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:o,attributes:a,characterData:s,subtree:i,attributeOldValue:l,characterDataOldValue:c,attributeFilter:d}),()=>{p.disconnect();}},[e,n,o,a,s,i,l,c,d]);}function mL(e={}){let{enabled:t=true,box:r="content-box",debounce:n=0}=e,o=useRef(null),[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;r==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});n>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,n)):p();},[r,n]);return useEffect(()=>{let c=o.current;if(!c||!t)return;let d=new ResizeObserver(l);d.observe(c,{box:r});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,r,l]),{ref:o,...a}}function pL(e,t={}){let{enabled:r=true,box:n="content-box",debounce:o=0}=t,[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;n==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});o>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,o)):p();},[n,o]);return useEffect(()=>{let c=e.current;if(!c||!r)return;let d=new ResizeObserver(l);d.observe(c,{box:n});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,r,n,l]),a}function fL(){let e=useRef(null),t=useCallback(()=>{let r=e.current;if(!r)return {width:0,height:0};let n=r.getBoundingClientRect();return {width:n.width,height:n.height}},[]);return {ref:e,measure:t}}function Py(e={}){let{defaultOpen:t=false,isOpen:r,onOpen:n,onClose:o,onChange:a,id:s}=e,[i,l]=useState(t),c=r!==void 0,d=c?r:i,m=useCallback(()=>{c||l(true),n?.(),a?.(true);},[c,n,a]),f=useCallback(()=>{c||l(false),o?.(),a?.(false);},[c,o,a]),p=useCallback(()=>{d?f():m();},[d,m,f]),g=useCallback(v=>{v?m():f();},[m,f]),h=useCallback(()=>({onClick:p,"aria-expanded":d,...s&&{"aria-controls":s}}),[p,d,s]),b=useCallback(()=>({hidden:!d,...s&&{id:s}}),[d,s]);return useMemo(()=>({isOpen:d,open:m,close:f,toggle:p,setIsOpen:g,getButtonProps:h,getDisclosureProps:b}),[d,m,f,p,g,h,b])}function vL(e){return Py({...e,defaultOpen:true})}function hL(e=false){let[t,r]=useState(e),n=useCallback(()=>{r(o=>!o);},[]);return [t,n,r]}function xL(e,t=0){let[r,n]=useState(t),o=useCallback(()=>{n(i=>(i+1)%e.length);},[e.length]),a=useCallback(()=>{n(i=>(i-1+e.length)%e.length);},[e.length]),s=useCallback(i=>{let l=e.indexOf(i);l!==-1&&n(l);},[e]);return useMemo(()=>({value:e[r],index:r,next:o,prev:a,setIndex:n,setValue:s}),[e,r,o,a,s])}function yL(e=false){let[t,r]=useState(e),n=useCallback(()=>r(s=>!s),[]),o=useCallback(()=>r(true),[]),a=useCallback(()=>r(false),[]);return useMemo(()=>({value:t,toggle:n,on:o,off:a,set:r}),[t,n,o,a])}function wL(e=0,t={}){let{min:r=-1/0,max:n=1/0,step:o=1}=t,a=useCallback(g=>Math.min(Math.max(g,r),n),[r,n]),[s,i]=useState(()=>a(e)),l=useCallback(()=>{i(g=>a(g+o));},[a,o]),c=useCallback(()=>{i(g=>a(g-o));},[a,o]),d=useCallback(g=>{i(a(g));},[a]),m=useCallback(()=>{i(a(e));},[a,e]),f=s<=r,p=s>=n;return useMemo(()=>({count:s,increment:l,decrement:c,set:d,reset:m,isMin:f,isMax:p}),[s,l,c,d,m,f,p])}function CL(e=0){let[t,r]=useState(e),n=useCallback(()=>r(o=>o+1),[]);return [t,n]}function TL(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function ML(e,t){let r=useRef(t);return useEffect(()=>{r.current=e;},[e]),r.current}function NL(e){let t=useRef(void 0),r=useRef(e),n=r.current!==e;return useEffect(()=>{t.current=r.current,r.current=e;},[e]),{current:e,previous:t.current,hasChanged:n}}function EL(e=[]){let[t,r]=useState(e),n=useCallback(C=>{r(C);},[]),o=useCallback(C=>{r(y=>[...y,C]);},[]),a=useCallback(C=>{r(y=>[...y,...C]);},[]),s=useCallback((C,y)=>{r(k=>{let T=[...k];return T.splice(C,0,y),T});},[]),i=useCallback((C,y)=>{r(k=>{let T=[...k];return T[C]=y,T});},[]),l=useCallback(C=>{r(y=>y.filter((k,T)=>T!==C));},[]),c=useCallback(C=>{r(y=>{let k=y.indexOf(C);return k===-1?y:y.filter((T,N)=>N!==k)});},[]),d=useCallback(C=>{r(y=>y.filter(k=>!C(k)));},[]),m=useCallback(()=>{let C;return r(y=>y.length===0?y:(C=y[0],y.slice(1))),C},[]),f=useCallback(C=>{r(y=>[C,...y]);},[]),p=useCallback(()=>{let C;return r(y=>y.length===0?y:(C=y[y.length-1],y.slice(0,-1))),C},[]),g=useCallback(()=>{r([]);},[]),h=useCallback(()=>{r(e);},[e]),b=useCallback((C,y)=>{r(k=>{let T=[...k],[N]=T.splice(C,1);return T.splice(y,0,N),T});},[]),v=useCallback((C,y)=>{r(k=>{let T=[...k];return [T[C],T[y]]=[T[y],T[C]],T});},[]),w=useCallback(C=>t.filter(C),[t]),x=useCallback(C=>t.find(C),[t]),R=useCallback(C=>t.includes(C),[t]);return useMemo(()=>({list:t,set:n,push:o,pushMany:a,insertAt:s,updateAt:i,removeAt:l,remove:c,removeWhere:d,shift:m,unshift:f,pop:p,clear:g,reset:h,move:b,swap:v,filter:w,find:x,includes:R,length:t.length,isEmpty:t.length===0}),[t,n,o,a,s,i,l,c,d,m,f,p,g,h,b,v,w,x,R])}function LL(e=[]){let[t,r]=useState(()=>new Map(e)),n=useCallback(p=>t.get(p),[t]),o=useCallback((p,g)=>{r(h=>{let b=new Map(h);return b.set(p,g),b});},[]),a=useCallback(p=>{r(g=>{let h=new Map(g);return p.forEach(([b,v])=>h.set(b,v)),h});},[]),s=useCallback(p=>t.has(p),[t]),i=useCallback(p=>{r(g=>{let h=new Map(g);return h.delete(p),h});},[]),l=useCallback(()=>{r(new Map);},[]),c=useCallback(()=>{r(new Map(e));},[e]),d=useCallback(()=>Array.from(t.keys()),[t]),m=useCallback(()=>Array.from(t.values()),[t]),f=useCallback(()=>Array.from(t.entries()),[t]);return useMemo(()=>({map:t,get:n,set:o,setMany:a,has:s,delete:i,clear:l,reset:c,keys:d,values:m,entries:f,size:t.size,isEmpty:t.size===0}),[t,n,o,a,s,i,l,c,d,m,f])}function SL(e={}){let[t,r]=useState(e),n=useCallback(d=>t[d],[t]),o=useCallback((d,m)=>{r(f=>({...f,[d]:m}));},[]),a=useCallback(d=>{r(m=>({...m,...d}));},[]),s=useCallback(d=>{r(m=>{let{[d]:f,...p}=m;return p});},[]),i=useCallback(()=>{r({});},[]),l=useCallback(()=>{r(e);},[e]),c=useCallback(d=>d in t,[t]);return useMemo(()=>({value:t,get:n,set:o,setAll:a,remove:s,clear:i,reset:l,has:c,keys:Object.keys(t),values:Object.values(t)}),[t,n,o,a,s,i,l,c])}function Iy(e=[]){let[t,r]=useState(()=>new Set(e)),n=useCallback(m=>{r(f=>{let p=new Set(f);return p.add(m),p});},[]),o=useCallback(m=>{r(f=>{let p=new Set(f);return m.forEach(g=>p.add(g)),p});},[]),a=useCallback(m=>{r(f=>{let p=new Set(f);return p.delete(m),p});},[]),s=useCallback(m=>t.has(m),[t]),i=useCallback(m=>{r(f=>{let p=new Set(f);return p.has(m)?p.delete(m):p.add(m),p});},[]),l=useCallback(()=>{r(new Set);},[]),c=useCallback(()=>{r(new Set(e));},[e]),d=useCallback(()=>Array.from(t),[t]);return useMemo(()=>({set:t,add:n,addMany:o,remove:a,has:s,toggle:i,clear:l,reset:c,values:d,size:t.size,isEmpty:t.size===0}),[t,n,o,a,s,i,l,c,d])}function HL(e=[]){let{add:t,remove:r,has:n,toggle:o,clear:a,addMany:s,values:i,size:l}=Iy(e);return useMemo(()=>({selected:i(),isSelected:n,select:t,deselect:r,toggle:o,selectAll:s,deselectAll:a,count:l,isEmpty:l===0}),[i,n,t,r,o,s,a,l])}function IL(e=[]){let[t,r]=useState(e),n=useCallback(c=>{r(d=>[...d,c]);},[]),o=useCallback(c=>{r(d=>[...d,...c]);},[]),a=useCallback(()=>{let c;return r(d=>d.length===0?d:(c=d[0],d.slice(1))),c},[]),s=useCallback(()=>t[0],[t]),i=useCallback(()=>t[t.length-1],[t]),l=useCallback(()=>{r([]);},[]);return useMemo(()=>({queue:t,enqueue:n,enqueueMany:o,dequeue:a,peek:s,peekLast:i,clear:l,size:t.length,isEmpty:t.length===0,hasItems:t.length>0}),[t,n,o,a,s,i,l])}function VL(e=[]){let[t,r]=useState(e),n=useCallback(l=>{r(c=>[...c,l]);},[]),o=useCallback(l=>{r(c=>[...c,...l]);},[]),a=useCallback(()=>{let l;return r(c=>c.length===0?c:(l=c[c.length-1],c.slice(0,-1))),l},[]),s=useCallback(()=>t[t.length-1],[t]),i=useCallback(()=>{r([]);},[]);return useMemo(()=>({stack:t,push:n,pushMany:o,pop:a,peek:s,clear:i,size:t.length,isEmpty:t.length===0}),[t,n,o,a,s,i])}function Oy(e,t=false){let[r,n]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true}),o=useRef(true),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{n(c=>({...c,isLoading:true,isIdle:false,isError:false,error:null}));try{let c=await a.current(...l);return o.current&&n({data:c,error:null,isLoading:!1,isSuccess:!0,isError:!1,isIdle:!1}),c}catch(c){let d=c instanceof Error?c:new Error(String(c));return o.current&&n({data:null,error:d,isLoading:false,isSuccess:false,isError:true,isIdle:false}),null}},[]),i=useCallback(()=>{n({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true});},[]);return useEffect(()=>(o.current=true,t&&s(),()=>{o.current=false;}),[t,s]),{...r,execute:s,reset:i}}function zL(e,t=3,r=1e3){let[n,o]=useState(0),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{let c=null;for(let d=0;d<=t;d++)try{return o(d),await a.current(...l)}catch(m){c=m instanceof Error?m:new Error(String(m)),d<t&&await new Promise(f=>setTimeout(f,r));}throw c},[t,r]);return {...Oy(s,false),retryCount:n}}var Ky=new Map,OL=300*1e3;function BL(e,t={}){let{immediate:r=true,init:n,transform:o,deps:a=[],enabled:s=true,refetchInterval:i,cacheKey:l}=t,[c,d]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),m=useRef(null),f=useRef(true),p=useCallback(async()=>{if(!e||!s)return;let h=l||e,b=Ky.get(h);if(b&&Date.now()-b.timestamp<OL){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}m.current&&m.current.abort(),m.current=new AbortController,d(v=>({...v,isLoading:true,error:null}));try{let v=await fetch(e,{...n,signal:m.current.signal});if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);let w=await v.json(),x=o?o(w):w;Ky.set(h,{data:x,timestamp:Date.now()}),f.current&&d({data:x,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(v){if(v instanceof Error&&v.name==="AbortError")return;let w=v instanceof Error?v:new Error(String(v));f.current&&d({data:null,error:w,isLoading:false,isSuccess:false,isError:true});}},[e,s,n,o,l]),g=useCallback(()=>{m.current&&m.current.abort();},[]);return useEffect(()=>(f.current=true,r&&s&&p(),()=>{f.current=false,g();}),[e,r,s,...a]),useEffect(()=>{if(!i||!s)return;let h=setInterval(p,i);return ()=>{clearInterval(h);}},[i,s,p]),{...c,refetch:p,abort:g}}function FL(e,t={}){let{transform:r,...n}=t,[o,a]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),s=useCallback(async l=>{a(c=>({...c,isLoading:true,error:null}));try{let c=await fetch(e,{...n,method:n.method||"POST",headers:{"Content-Type":"application/json",...n.headers},body:l?JSON.stringify(l):void 0});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let d=await c.json(),m=r?r(d):d;return a({data:m,error:null,isLoading:!1,isSuccess:!0,isError:!1}),m}catch(c){let d=c instanceof Error?c:new Error(String(c));return a({data:null,error:d,isLoading:false,isSuccess:false,isError:true}),null}},[e,n,r]),i=useCallback(()=>{a({data:null,error:null,isLoading:false,isSuccess:false,isError:false});},[]);return {...o,mutate:s,reset:i}}function pi(e,t){let r=useRef(e);r.current=e,useEffect(()=>{if(t===null)return;let n=setInterval(()=>{r.current();},t);return ()=>{clearInterval(n);}},[t]);}function $L(e,t){let[r,n]=useState(false);pi(e,r?t:null);let o=useCallback(()=>n(true),[]),a=useCallback(()=>n(false),[]),s=useCallback(()=>n(i=>!i),[]);return {start:o,stop:a,toggle:s,isRunning:r}}function GL(e,t={}){let{interval:r=1e3,onComplete:n,autoStart:o=false}=t,[a,s]=useState(e),[i,l]=useState(o),c=useRef(n);c.current=n;let d=a<=0;pi(()=>{s(g=>{let h=g-1;return h<=0?(l(false),c.current?.(),0):h});},i&&!d?r:null);let m=useCallback(()=>{d||l(true);},[d]),f=useCallback(()=>{l(false);},[]),p=useCallback(g=>{s(g??e),l(false);},[e]);return {seconds:a,isRunning:i,isComplete:d,start:m,pause:f,reset:p}}function UL(e={}){let{interval:t=1e3,maxSeconds:r,autoStart:n=false}=e,[o,a]=useState(0),[s,i]=useState(n),l=s&&(r===void 0||o<r);pi(()=>{a(p=>p+1);},l?t:null);let c=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),m=useCallback(()=>i(p=>!p),[]),f=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:c,stop:d,reset:f,toggle:m}}function Uy(e,t){let r=useRef(e);r.current=e,useEffect(()=>{if(t===null)return;let n=setTimeout(()=>{r.current();},t);return ()=>{clearTimeout(n);}},[t]);}function WL(e,t){let[r,n]=useState(false),o=useRef(null),a=useRef(e);a.current=e;let s=useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null),n(false);},[]),i=useCallback(()=>{s(),n(true),o.current=setTimeout(()=>{a.current(),n(false);},t);},[t,s]),l=useCallback(()=>{i();},[i]);return useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{start:i,cancel:s,reset:l,isScheduled:r}}function jL(e,t){let[r,n]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{n(e);},t);return ()=>{clearTimeout(o);}},[e,t]),r}function _L(e,t=true){let[r,n]=useState(false);return Uy(()=>{n(true);},t?e:null),r}function XL(e,t=true){let[r,n]=useState(t),[o,a]=useState(0),[s,i]=useState(0),l=useRef(e);l.current=e;let c=useRef(null),d=useRef(0),m=useRef(0),f=useRef(0),p=useRef(0),g=useCallback(v=>{let w=d.current?v-d.current:0;d.current=v,p.current++,v-f.current>=1e3&&(a(p.current),p.current=0,f.current=v),m.current++,i(m.current),l.current(w,v),c.current=requestAnimationFrame(g);},[]),h=useCallback(()=>{c.current===null&&(d.current=0,f.current=performance.now(),p.current=0,c.current=requestAnimationFrame(g),n(true));},[g]),b=useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null,n(false));},[]);return useEffect(()=>(t&&h(),()=>{c.current!==null&&cancelAnimationFrame(c.current);}),[t,h]),{start:h,stop:b,isRunning:r,frameCount:s,fps:o}}function YL(e,t={}){let{duration:r=300,easing:n="easeOutCubic"}=t,[o,a]=useState(e),s=useRef(e),i=useRef(null),l=useRef(null),c={linear:d=>d,easeInCubic:d=>d*d*d,easeOutCubic:d=>1-Math.pow(1-d,3),easeInOutCubic:d=>d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2};return useEffect(()=>{if(o===e)return;s.current=o,i.current=null;let d=m=>{i.current===null&&(i.current=m);let f=m-i.current,p=Math.min(f/r,1),g=c[n](p),h=s.current+(e-s.current)*g;a(h),p<1&&(l.current=requestAnimationFrame(d));};return l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,r,n]),o}function qL(e,t={}){let{stiffness:r=100,damping:n=10,mass:o=1}=t,[a,s]=useState(e),i=useRef(0),l=useRef(null),c=useRef(null);return useEffect(()=>{if(Math.abs(a-e)<.01&&Math.abs(i.current)<.01){s(e);return}let d=m=>{c.current===null&&(c.current=m);let f=Math.min((m-c.current)/1e3,.064);c.current=m;let p=(e-a)*r,g=i.current*n,h=(p-g)/o;i.current+=h*f;let b=a+i.current*f;s(b),Math.abs(b-e)>.01||Math.abs(i.current)>.01?l.current=requestAnimationFrame(d):(s(e),i.current=0);};return c.current=null,l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,r,n,o,a]),a}var Xy=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function ZL(e,t={}){let{events:r=Xy,initialState:n=false,enabled:o=true}=t,[a,s]=useState(n),i=useRef(null),l=useCallback(()=>{s(false),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{s(true);},e);},[e]);return useEffect(()=>{if(o)return l(),r.forEach(c=>{window.addEventListener(c,l);}),()=>{i.current&&clearTimeout(i.current),r.forEach(c=>{window.removeEventListener(c,l);});}},[o,r,l]),a}function QL(e,t,r,n={}){let{events:o=Xy,initialState:a=false,enabled:s=true}=n,[i,l]=useState(a),c=useRef(null),d=useRef(a),m=useCallback(()=>{d.current&&(d.current=false,r?.()),l(false),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{d.current=true,l(true),t?.();},e);},[e,t,r]);return useEffect(()=>{if(s)return m(),o.forEach(f=>{window.addEventListener(f,m);}),()=>{c.current&&clearTimeout(c.current),o.forEach(f=>{window.removeEventListener(f,m);});}},[s,o,m]),i}function qy(){let[e,t]=useState(()=>typeof document>"u"?"visible":document.visibilityState);return useEffect(()=>{let r=()=>{t(document.visibilityState);};return document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r);}},[]),e}function tS(){return qy()==="visible"}function rS(e,t){let r=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r);}),[r]);}function nS(){let[e,t]=useState(()=>typeof navigator>"u"?true:navigator.onLine);return useEffect(()=>{let r=()=>t(true),n=()=>t(false);return window.addEventListener("online",r),window.addEventListener("offline",n),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n);}},[]),e}function oS(e,t){let[r,n]=useState(()=>typeof navigator>"u"?true:navigator.onLine),o=useCallback(()=>{n(true),e?.();},[e]),a=useCallback(()=>{n(false),t?.();},[t]);return useEffect(()=>(window.addEventListener("online",o),window.addEventListener("offline",a),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a);}),[o,a]),r}function e0(e){let[t,r]=useState(false),n=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),o=useCallback(async()=>{let i=e?.current||document.documentElement;try{i.requestFullscreen?await i.requestFullscreen():i.webkitRequestFullscreen?await i.webkitRequestFullscreen():i.mozRequestFullScreen?await i.mozRequestFullScreen():i.msRequestFullscreen&&await i.msRequestFullscreen();}catch(l){console.error("Failed to enter fullscreen:",l);}},[e]),a=useCallback(async()=>{try{document.exitFullscreen?await document.exitFullscreen():document.webkitExitFullscreen?await document.webkitExitFullscreen():document.mozCancelFullScreen?await document.mozCancelFullScreen():document.msExitFullscreen&&await document.msExitFullscreen();}catch(i){console.error("Failed to exit fullscreen:",i);}},[]),s=useCallback(async()=>{t?await a():await o();},[t,o,a]);return useEffect(()=>{let i=()=>{r(!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement));};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i);}},[]),{isFullscreen:t,enter:o,exit:a,toggle:s,isSupported:n}}function lS(){let e=useRef(null),t=e0(e);return {ref:e,...t}}function uS(e={}){let{watch:t=false,immediate:r=true,enableHighAccuracy:n=true,maximumAge:o=0,timeout:a=1e4}=e,[s,i]=useState({isLoading:false,position:null,error:null,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null}),l=typeof navigator<"u"&&"geolocation"in navigator,c=useCallback(f=>{i({isLoading:false,position:f,error:null,latitude:f.coords.latitude,longitude:f.coords.longitude,accuracy:f.coords.accuracy,altitude:f.coords.altitude,altitudeAccuracy:f.coords.altitudeAccuracy,heading:f.coords.heading,speed:f.coords.speed,timestamp:f.timestamp});},[]),d=useCallback(f=>{i(p=>({...p,isLoading:false,error:f}));},[]),m=useCallback(()=>{l&&(i(f=>({...f,isLoading:true,error:null})),navigator.geolocation.getCurrentPosition(c,d,{enableHighAccuracy:n,maximumAge:o,timeout:a}));},[l,c,d,n,o,a]);return useEffect(()=>{if(l&&(r&&m(),t)){let f=navigator.geolocation.watchPosition(c,d,{enableHighAccuracy:n,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(f);}}},[t,r,l,m,c,d,n,o,a]),{...s,getCurrentPosition:m,isSupported:l}}function mS(e,t,r,n){if(e===null||t===null||r===null||n===null)return null;let o=6371e3,a=e*Math.PI/180,s=r*Math.PI/180,i=(r-e)*Math.PI/180,l=(n-t)*Math.PI/180,c=Math.sin(i/2)*Math.sin(i/2)+Math.cos(a)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2),d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return o*d}function pS(e){let[t,r]=useState(null),[n,o]=useState(true),a=typeof navigator<"u"&&"permissions"in navigator,s=useCallback(async()=>{if(!a)return o(false),null;try{o(!0);let i=await navigator.permissions.query({name:e});return r(i.state),o(!1),i.state}catch(i){return console.error(`Permission query failed for ${e}:`,i),o(false),null}},[e,a]);return useEffect(()=>{if(!a){o(false);return}let i=null,l=()=>{i&&r(i.state);};return navigator.permissions.query({name:e}).then(c=>{i=c,r(c.state),o(false),c.addEventListener("change",l);}).catch(()=>{o(false);}),()=>{i&&i.removeEventListener("change",l);}},[e,a]),{state:t,isGranted:t==="granted",isDenied:t==="denied",isPrompt:t==="prompt",isLoading:n,isSupported:a,query:s}}function fS(){let[e,t]=useState(typeof Notification<"u"?Notification.permission:"default"),r=typeof Notification<"u",n=useCallback(async()=>{if(!r)return "default";let o=await Notification.requestPermission();return t(o),o},[r]);return useEffect(()=>{r&&t(Notification.permission);},[r]),{permission:e,request:n,isSupported:r}}function gS(e){let[t,r]=useState(null),[n,o]=useState(null),[a,s]=useState(false),i=typeof navigator<"u"&&"mediaDevices"in navigator,l=useCallback(async()=>{if(!i)return null;s(true),o(null);try{let d=await navigator.mediaDevices.getUserMedia(e);return r(d),s(!1),d}catch(d){let m=d instanceof Error?d:new Error(String(d));return o(m),s(false),null}},[e,i]),c=useCallback(()=>{t&&(t.getTracks().forEach(d=>d.stop()),r(null));},[t]);return useEffect(()=>()=>{t&&t.getTracks().forEach(d=>d.stop());},[t]),{stream:t,error:n,isLoading:a,request:l,stop:c,isSupported:i}}function vS(e={}){let{voice:t=null,rate:r=1,pitch:n=1,volume:o=1,lang:a="en-US"}=e,[s,i]=useState(false),[l,c]=useState(false),[d,m]=useState([]),f=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!f)return;let v=()=>{m(window.speechSynthesis.getVoices());};return v(),window.speechSynthesis.addEventListener("voiceschanged",v),()=>{window.speechSynthesis.removeEventListener("voiceschanged",v);}},[f]);let p=useCallback(v=>{if(!f)return;window.speechSynthesis.cancel();let w=new SpeechSynthesisUtterance(v);w.voice=t,w.rate=r,w.pitch=n,w.volume=o,w.lang=a,w.onstart=()=>i(true),w.onend=()=>{i(false),c(false);},w.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(w);},[f,t,r,n,o,a]),g=useCallback(()=>{f&&(window.speechSynthesis.cancel(),i(false),c(false));},[f]),h=useCallback(()=>{f&&(window.speechSynthesis.pause(),c(true));},[f]),b=useCallback(()=>{f&&(window.speechSynthesis.resume(),c(false));},[f]);return {speak:p,stop:g,pause:h,resume:b,isSpeaking:s,isPaused:l,isSupported:f,voices:d}}function hS(e={}){let{lang:t="en-US",continuous:r=false,interimResults:n=true}=e,[o,a]=useState(false),[s,i]=useState(""),[l,c]=useState(""),[d,m]=useState(null),f=useRef(null),p=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=p!==null;useEffect(()=>{if(!g||!p)return;let x=new p;return x.lang=t,x.continuous=r,x.interimResults=n,x.onstart=()=>{a(true),m(null);},x.onend=()=>{a(false);},x.onerror=R=>{m(new Error(R.error)),a(false);},x.onresult=R=>{let C="",y="";for(let k=R.resultIndex;k<R.results.length;k++){let T=R.results[k];T.isFinal?y+=T[0].transcript:C+=T[0].transcript;}y&&i(k=>k+y),c(C);},f.current=x,()=>{x.abort();}},[g,p,t,r,n]);let h=useCallback(()=>{if(f.current&&!o)try{f.current.start();}catch{}},[o]),b=useCallback(()=>{f.current&&f.current.stop();},[]),v=useCallback(()=>{f.current&&f.current.abort();},[]),w=useCallback(()=>{i(""),c(""),m(null);},[]);return {start:h,stop:b,abort:v,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:w}}export{Au as Accordion,zu as AccordionItem,oh as ActionBar,ah as ActionBarButton,Uv as ActionGroup,gx as ActionSheet,u0 as Alert,p0 as AlertDescription,m0 as AlertTitle,sv as AreaChart,cm as AspectRatio,Wg as Autocomplete,yn as Avatar,Rn as AvatarFallback,Bp as AvatarGroup,qn as AvatarImage,ug as BackTop,b0 as Badge,sx as Banner,ov as BarChart,kh as BatteryMeter,ny as Blockquote,mx as BottomNavigation,Lx as Bounce,em as Breadcrumb,sm as BreadcrumbEllipsis,rm as BreadcrumbItem,nm as BreadcrumbLink,tm as BreadcrumbList,om as BreadcrumbPage,am as BreadcrumbSeparator,ae as Button,od as ButtonGroup,Qf as COUNTRIES,_r as Calendar,cd as Card,pd as CardContent,md as CardDescription,fd as CardFooter,dd as CardHeader,ud as CardTitle,fv as Carousel,gv as CarouselContent,bv as CarouselItem,Vl as CarouselNext,Il as CarouselPrevious,Io as Checkbox,Xx as Checkmark,Up as Chip,qp as CircularProgress,yt as CloseButton,ob as Code,cb as CodeBlock,Mx as Collapse,Gu as Collapsible,Uu as CollapsibleContent,Ii as CollapsibleTrigger,Dh as ColorArea,Kf as ColorPicker,Vh as ColorSlider,_o as ColorSwatch,Bf as ColorSwatchPicker,zh as ColorWheel,ji as Command,fw as CommandDialog,Mp as CommandEmpty,Np as CommandGroup,Cp as CommandInput,Pp as CommandItem,Tp as CommandList,kp as CommandSeparator,Ep as CommandShortcut,Yx as Confetti,mu as ContextMenu,Ru as ContextMenuCheckboxItem,vu as ContextMenuContent,fu as ContextMenuGroup,yu as ContextMenuItem,gu as ContextMenuPortal,wu as ContextMenuSection,Cu as ContextMenuSeparator,Tu as ContextMenuShortcut,bu as ContextMenuSub,xu as ContextMenuSubContent,hu as ContextMenuSubTrigger,pu as ContextMenuTrigger,gh as ContextualHelp,Jb as CopyButton,Vx as Counter,jf as CurrencyInput,oa as DEFAULT_COLORS,QR as DataTable,ck as DateField,ql as DateInput,Ip as DatePicker,Ab as DateRangePicker,yl as DefaultErrorFallback,Nh as DiskUsageMeter,Oi as Drawer,Hm as DrawerBody,zm as DrawerClose,Sm as DrawerContent,Am as DrawerDescription,Im as DrawerFooter,Um as DrawerGroup,Wm as DrawerGroupLabel,Dm as DrawerHeader,jm as DrawerInset,Fm as DrawerMenu,Gm as DrawerMenuButton,Km as DrawerMenuItem,WR as DrawerProvider,Bm as DrawerSeparator,Em as DrawerSidebar,Vm as DrawerTitle,Om as DrawerToggle,Lm as DrawerTrigger,fr as Dropdown,br as DropdownContent,Fd as DropdownGroup,Bt as DropdownItem,Q0 as DropdownLabel,Ti as DropdownSection,Od as DropdownSeparator,Bd as DropdownShortcut,Kd as DropdownSub,Gd as DropdownSubContent,$d as DropdownSubTrigger,gr as DropdownTrigger,zl as EMOJIS,Hs as EMOJI_CATEGORIES,hv as EmojiPicker,df as EmptyState,GT as ErrorBoundary,Nx as Expand,VP as FAB,wx as Fade,ul as FieldContext,Vf as FileUpload,Px as Flip,dc as FloatingActionButton,jg as Form,dl as FormContext,qg as FormControl,Zg as FormDescription,_g as FormField,Xg as FormItem,Yg as FormLabel,Qg as FormMessage,rv as FullCalendar,qx as Glow,Ch as GridList,Qx as H1,Jx as H2,ey as H3,ty as H4,qu as HoverCard,Qu as HoverCardContent,Zu as HoverCardTrigger,Qv as IllustratedMessage,pb as Image,Cv as ImageCropper,Ml as ImageViewer,Gb as ImageViewerTrigger,Wb as Indicator,jb as IndicatorWrapper,Kb as InfiniteScroll,rh as InlineAlert,oy as InlineCode,ka as Input,Jp as InputOTP,ef as InputOTPGroup,rf as InputOTPSeparator,tf as InputOTPSlot,uv as KanbanBoard,Zb as Kbd,xn as Label,Fh as LabeledValue,$h as LabeledValueGroup,sy as Large,ay as Lead,nv as LineChart,cg as Link,rC as List,bf as ListItem,vf as ListItemText,dh as ListView,xb as Listbox,yb as ListboxItem,Ib as Loading,kb as LoadingOverlay,rl as MASK_PRESETS,Yf as MaskedInput,bg as Menubar,kg as MenubarCheckboxItem,Mg as MenubarContent,hg as MenubarGroup,Ng as MenubarItem,Eg as MenubarLabel,vg as MenubarMenu,xg as MenubarPortal,Rg as MenubarRadioGroup,Pg as MenubarRadioItem,Lg as MenubarSeparator,Sg as MenubarShortcut,yg as MenubarSub,Tg as MenubarSubContent,Cg as MenubarSubTrigger,wg as MenubarTrigger,Ys as Meter,gp as Modal,xp as ModalBody,vp as ModalClose,Ja as ModalContent,wp as ModalDescription,yp as ModalFooter,hp as ModalHeader,Wi as ModalOverlay,Ui as ModalPortal,Qa as ModalRoot,Rp as ModalTitle,bp as ModalTrigger,ly as Muted,Eb as NProgress,rg as Navbar,ng as NavbarBrand,og as NavbarContent,ag as NavbarItem,sg as NavbarLink,gm as NavigationMenu,ym as NavigationMenuContent,Cm as NavigationMenuIndicator,vm as NavigationMenuItem,wm as NavigationMenuLink,bm as NavigationMenuList,xm as NavigationMenuTrigger,zi as NavigationMenuViewport,tx as NotificationCenter,nx as NotificationCenterContent,RP as NotificationCenterProvider,rx as NotificationCenterTrigger,lc as NotificationItem,ox as NotificationList,Vv as NumberField,Dp as NumberInput,ap as Pagination,sp as PaginationContent,dp as PaginationEllipsis,ip as PaginationItem,Ya as PaginationLink,cp as PaginationNext,lp as PaginationPrevious,ry as Paragraph,Ux as Parallax,Sp as PasswordInput,Jf as PhoneInput,av as PieChart,Ix as Pop,je as Popover,Ur as PopoverAnchor,_e as PopoverContent,Et as PopoverTrigger,Wa as Progress,Rx as PullToRefresh,Dx as Pulse,Mv as QRCode,ku as RadioGroup,Pu as RadioGroupItem,mh as RangeSlider,Kp as Rating,Ow as ResizableHandle,zw as ResizablePanel,Aw as ResizablePanelGroup,yv as RichTextEditor,Ex as Ripple,kx as Rotate,Tx as Scale,Se as ScrollArea,Gx as ScrollProgress,$x as ScrollReveal,Yb as ScrollShadow,_h as SearchBar,Ov as SearchField,Lf as SegmentedControl,Sf as SegmentedControlItem,Id as Select,Br as Separator,Sx as Shake,tu as Sheet,nu as SheetClose,su as SheetContent,du as SheetDescription,lu as SheetFooter,iu as SheetHeader,ou as SheetOverlay,Li as SheetPortal,cu as SheetTitle,ru as SheetTrigger,_x as Shimmer,Da as Skeleton,Cx as Slide,$a as Slider,iy as Small,mb as Snippet,LT as SortableList,Zx as Sparkles,Ma as Spinner,Zh as SpotlightSearch,pf as StatCard,Yv as StatusLight,Vg as Step,Hg as Steps,hx as SwipeActions,xd as Switch,db as TabbedCodeBlock,Xm as Table,qm as TableBody,tp as TableCaption,ep as TableCell,Zm as TableFooter,Jm as TableHead,Ym as TableHeader,Qm as TableRow,Xd as Tabs,Zd as TabsContent,Yd as TabsList,qd as TabsTrigger,hh as TagGroup,sf as TagInput,h0 as TextBadge,Sv as TextField,zx as TextReveal,yd as Textarea,Nv as ThemeProvider,kv as ThemeToggle,Kv as TimeField,Gf as TimeInput,zb as TimePicker,Rf as Timeline,Tf as TimelineContent,Cf as TimelineItem,Mf as TimelineOpposite,lR as Toaster,Eu as Toggle,Su as ToggleGroup,Du as ToggleGroupItem,Kr as Tooltip,Gr as TooltipContent,Fr as TooltipProvider,$r as TooltipTrigger,$g as Tree,Ax as Typewriter,cy as UL,tb as User,XT as VirtualList,Hx as Wiggle,Ox as WordRotate,nh as actionBarVariants,Gv as actionGroupVariants,fx as actionSheetItemVariants,c0 as alertVariants,is as applyMask,Ug as autocompleteInputVariants,Op as avatarGroupVariants,dg as backTopVariants,f0 as badgeIndicatorVariants,ax as bannerVariants,ux as bottomNavigationVariants,rd as buttonGroupVariants,_n as buttonVariants,eR as calculatePasswordStrength,ld as cardVariants,mv as carouselVariants,na as chartContainerVariants,Gp as chipVariants,Yp as circularProgressVariants,km as closeButtonVariants,u as cn,nb as codeVariants,Ph as colorAreaVariants,Ih as colorSliderVariants,Of as colorSwatchPickerVariants,zf as colorSwatchVariants,Ah as colorWheelVariants,rc as contextualHelpTriggerVariants,Qb as copyButtonVariants,Uf as currencyInputVariants,Bv as dateInputVariants,Qd as defaultPasswordRequirements,$m as drawerMenuButtonVariants,vv as emojiPickerVariants,cf as emptyStateVariants,ma as fabVariants,Df as fileUploadVariants,tl as formatCurrency,da as formatDate,as as formatFileSize,ls as formatPhoneNumber,tv as fullCalendarVariants,Hf as getFileIcon,Xf as getMaskPlaceholder,tR as getPasswordStrengthColor,rR as getPasswordStrengthLabel,wh as gridListItemVariants,Rh as gridListVariants,Lh as hexToRgb,Zs as hsvToRgb,Zv as illustratedMessageVariants,wv as imageCropperVariants,bl as imageVariants,Ub as indicatorVariants,Tl as infiniteScrollLoaderVariants,Fb as infiniteScrollVariants,th as inlineAlertVariants,Qp as inputOTPVariants,Ev as inputSizeVariants,cv as kanbanBoardVariants,Hl as kanbanCardVariants,dv as kanbanColumnVariants,qb as kbdVariants,Lv as labelSizeVariants,Kh as labeledValueGroupVariants,Bh as labeledValueVariants,lg as linkVariants,gf as listItemVariants,Zi as listVariants,ch as listViewItemVariants,lh as listViewVariants,vb as listboxItemVariants,bb as listboxVariants,Nb as loadingOverlayVariants,Hb as loadingVariants,_f as maskedInputVariants,Mh as meterVariants,Gi as modalContentVariants,tg as navbarVariants,Rm as navigationMenuLinkStyle,hm as navigationMenuTriggerStyle,Pb as nprogressVariants,Iv as numberFieldVariants,Xl as parseDate,Wf as parseFormattedValue,Zf as phoneInputVariants,yx as pullToRefreshVariants,Kl as qrCodeVariants,uh as rangeSliderVariants,Fp as ratingVariants,Sh as rgbToHex,Eh as rgbToHsv,xv as richTextEditorVariants,Xb as scrollShadowVariants,jh as searchBarVariants,zv as searchFieldVariants,Pf as segmentedControlItemVariants,kf as segmentedControlVariants,Hd as selectVariants,au as sheetVariants,wd as skeletonVariants,ub as snippetVariants,Cb as sortableItemVariants,wb as sortableListVariants,ed as spinnerVariants,mf as statCardVariants,Xv as statusLightVariants,Ig as stepVariants,Dg as stepsVariants,mc as swipeActionVariants,vx as swipeActionsVariants,Ea as switchColors,nc as tagGroupItemVariants,vh as tagGroupVariants,af as tagVariants,v0 as textBadgeVariants,Pv as textFieldVariants,XN as themeToggleVariants,Fv as timeFieldVariants,$f as timeInputVariants,wf as timelineItemVariants,yf as timelineVariants,Fa as toggleVariants,Og as treeItemVariants,zg as treeVariants,nl as unmask,YL as useAnimatedValue,Oy as useAsync,zL as useAsyncRetry,sL as useBodyScrollLock,yL as useBooleanToggle,yE as useBreakpoint,RE as useBreakpoints,vi as useButtonGroup,Ds as useCarousel,zE as useClickOutside,OE as useClickOutsideMultiple,aE as useConfetti,FE as useCopy,BE as useCopyToClipboard,GL as useCountdown,wL as useCounter,xL as useCycle,EE as useDebounce,LE as useDebouncedCallback,SE as useDebouncedCallbackWithControls,jL as useDelayedValue,Py as useDisclosure,vL as useDisclosureOpen,mS as useDistance,tS as useDocumentIsVisible,qy as useDocumentVisibility,rS as useDocumentVisibilityCallback,zR as useDrawer,fL as useElementSize,UE as useEventListener,WE as useEventListenerRef,BL as useFetch,fs as useFieldContext,rL as useFocusTrap,nL as useFocusTrapRef,ml as useFormContext,e0 as useFullscreen,lS as useFullscreenRef,uS as useGeolocation,KE as useHotkeys,$E as useHotkeysMap,XE as useHover,ZE as useHoverDelay,qE as useHoverProps,YE as useHoverRef,ZL as useIdle,QL as useIdleCallback,CL as useIncrementCounter,Ty as useIntersectionObserver,lL as useIntersectionObserverRef,pi as useInterval,$L as useIntervalControls,uE as useIsDesktop,cE as useIsMobile,dE as useIsTablet,jE as useKeyPress,GE as useKeyPressed,gM as useKeyboardShortcut,cL as useLazyLoad,EL as useList,TE as useLocalStorage,_E as useLongPress,LL as useMap,gS as useMediaPermission,Po as useMediaQuery,JE as useMouse,eL as useMouseElement,tL as useMouseElementRef,FL as useMutation,dL as useMutationObserver,uL as useMutationObserverRef,Js as useNotificationCenter,fS as useNotificationPermission,nS as useOnlineStatus,oS as useOnlineStatusCallback,pS as usePermission,mE as usePrefersColorScheme,pE as usePrefersReducedMotion,TL as usePrevious,NL as usePreviousDistinct,ML as usePreviousWithInitial,IL as useQueue,XL as useRafLoop,SL as useRecord,mL as useResizeObserver,pL as useResizeObserverRef,Ry as useScrollLock,oL as useScrollPosition,HL as useSelection,NE as useSessionStorage,Iy as useSet,hS as useSpeechRecognition,vS as useSpeechSynthesis,pP as useSpotlight,qL as useSpringValue,VL as useStack,IE as useThrottle,VE as useThrottledCallback,Uy as useTimeout,WL as useTimeoutControls,_L as useTimeoutFlag,UL as useTimer,hL as useToggle,xE as useWindowHeight,aL as useWindowScroll,ba as useWindowSize,hE as useWindowWidth,eb as userVariants,If as validateFile,gT as validators,Ob as virtualListVariants};//# sourceMappingURL=index.js.map
|
|
73
73
|
//# sourceMappingURL=index.js.map
|