@pixonui/react 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import*as ue from'react';import ue__default,{useRef,useState,useEffect,createContext,useCallback,useContext,useLayoutEffect,useMemo}from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {cva}from'class-variance-authority';import {createPortal}from'react-dom';import {Info,Lock,Trash2,GripVertical,Pause,Play,MessageSquare,Paperclip,Clock,Upload,File,X,Minus,Plus,Star,Mic,Square,Sparkles,ArrowUp,ExternalLink,Copy,Share,Edit,RefreshCw,ThumbsUp,ThumbsDown,ChevronLeft,ChevronRight,Calendar,ChevronDown,Menu,Settings,User,LogOut,Search,ArrowDown,ArrowUpDown,AlertTriangle,MoreHorizontal,SortAsc,CalendarDays,Archive,Filter,Check,Sun,Moon,ArrowLeft,Phone,Video,MoreVertical,Reply,Smile,CheckCheck,AtSign,Send,Image,Bell,Ban,Loader2,LayoutGrid,FolderOpen,Folder}from'lucide-react';function n(...e){return twMerge(clsx(e))}var Hn=ue__default.forwardRef(({children:e,className:t,leftIcon:r,rightIcon:a,...s},o)=>jsxs("button",{ref:o,type:s.type??"button",className:n("group relative inline-flex items-center justify-center gap-2 rounded-2xl px-5 py-3","bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600","text-white font-semibold tracking-tight","shadow-[0_12px_40px_rgba(99,102,241,.45)]","transition-all duration-300","hover:scale-[1.03] hover:shadow-[0_18px_60px_rgba(99,102,241,.6)]","active:scale-[0.98]","disabled:opacity-50 disabled:cursor-not-allowed","focus:outline-none focus:ring-2 focus:ring-purple-400/40",t),...s,children:[jsx("span",{className:"pointer-events-none absolute inset-0 rounded-2xl bg-gradient-to-r from-white/18 via-white/5 to-white/18 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100"}),jsxs("span",{className:"relative inline-flex items-center gap-2",children:[r,e,a]})]}));Hn.displayName="PrimaryButton";var rt=ue.forwardRef(({children:e,...t},r)=>{if(!ue.isValidElement(e))return null;let a=e;return ue.cloneElement(a,{...t,...a.props,ref:s=>{typeof r=="function"?r(s):r&&(r.current=s);let{ref:o}=a;typeof o=="function"?o(s):o&&"current"in o&&(o.current=s);},className:n(t.className,a.props.className)})});rt.displayName="Slot";var Bn=cva("group relative inline-flex items-center justify-center font-semibold tracking-tight transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-purple-400/40 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 disabled:active:scale-100 hover:scale-[1.02] active:scale-[0.98]",{variants:{variant:{primary:"bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 text-white border-transparent",secondary:"bg-zinc-100 text-zinc-900 border border-zinc-200 hover:bg-zinc-200 dark:bg-white/[0.05] dark:text-white dark:border-white/10 dark:hover:bg-white/[0.10] dark:hover:border-white/20",outline:"bg-transparent text-zinc-900 border border-zinc-300 hover:bg-zinc-100 dark:text-white dark:border-white/20 dark:hover:bg-white/[0.05] dark:hover:border-white/30",ghost:"bg-transparent text-zinc-600 hover:text-zinc-900 hover:bg-zinc-100 dark:text-white/80 dark:hover:text-white dark:hover:bg-white/[0.05] border-transparent",danger:"bg-rose-500/10 text-rose-600 border border-rose-500/20 hover:bg-rose-500/20 hover:border-rose-500/30 hover:text-rose-700 dark:text-rose-400 dark:hover:text-rose-300",success:"bg-emerald-500/10 text-emerald-600 border border-emerald-500/20 hover:bg-emerald-500/20 hover:border-emerald-500/30 hover:text-emerald-700 dark:text-emerald-400 dark:hover:text-emerald-300",alert:"bg-amber-500/10 text-amber-600 border border-amber-500/20 hover:bg-amber-500/20 hover:border-amber-500/30 hover:text-amber-700 dark:text-amber-400 dark:hover:text-amber-300"},size:{sm:"h-9 px-3 text-xs gap-1.5",md:"h-11 px-5 text-sm gap-2",lg:"h-14 px-8 text-base gap-3",icon:"h-10 w-10 p-0 flex items-center justify-center"},shape:{default:"rounded-2xl",pill:"rounded-full",square:"rounded-lg"},shadow:{true:"",false:""}},compoundVariants:[{variant:"primary",shadow:true,class:"shadow-[0_12px_40px_rgba(99,102,241,.45)] hover:shadow-[0_18px_60px_rgba(99,102,241,.6)]"},{variant:"secondary",shadow:true,class:"shadow-sm"}],defaultVariants:{variant:"primary",size:"md",shape:"default",shadow:true}}),P=ue__default.forwardRef(({className:e,variant:t,size:r,shape:a,shadow:s,asChild:o=false,leftIcon:i,rightIcon:l,isLoading:d,children:c,disabled:m,...p},f)=>jsxs(o?rt:"button",{ref:f,disabled:m||d,className:n(Bn({variant:t,size:r,shape:a,shadow:s,className:e})),...p,children:[t==="primary"&&!o&&jsx("span",{className:"pointer-events-none absolute inset-0 rounded-[inherit] bg-gradient-to-r from-white/18 via-white/5 to-white/18 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100"}),jsxs("span",{className:"relative inline-flex items-center justify-center",children:[d&&jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",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"})]}),!d&&i&&jsx("span",{className:n("mr-2",r==="sm"&&"mr-1.5"),children:i}),c,!d&&l&&jsx("span",{className:n("ml-2",r==="sm"&&"ml-1.5"),children:l})]})]}));P.displayName="Button";var On=ue__default.forwardRef(({children:e,className:t,leftIcon:r,rightIcon:a,...s},o)=>{let i=useRef(null),l=d=>{let c=i.current;if(!c)return;let m=c.getBoundingClientRect(),p=d.clientX-m.left,f=d.clientY-m.top;c.style.setProperty("--mouse-x",`${p}px`),c.style.setProperty("--mouse-y",`${f}px`);};return ue__default.useImperativeHandle(o,()=>i.current),jsxs("button",{ref:i,onMouseMove:l,type:s.type??"button",className:n("group relative inline-flex items-center justify-center gap-2 rounded-2xl px-6 py-3","bg-zinc-100 border border-zinc-200 text-zinc-900","dark:bg-white/[0.03] dark:border-white/10 dark:text-white","font-semibold tracking-tight overflow-hidden","transition-all duration-300","hover:bg-zinc-200 dark:hover:bg-white/[0.05] hover:scale-[1.02]","active:scale-[0.98]","focus:outline-none focus:ring-2 focus:ring-purple-400/40",t),...s,children:[jsx("div",{className:"pointer-events-none absolute -inset-px opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.4), transparent 40%)"}}),jsx("div",{className:"pointer-events-none absolute -inset-px rounded-2xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(300px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.6), transparent 40%)",maskImage:"linear-gradient(#fff, #fff), linear-gradient(#fff, #fff)",maskClip:"content-box, border-box",maskComposite:"exclude",WebkitMaskComposite:"xor",padding:"1px"}}),jsxs("span",{className:"relative inline-flex items-center gap-2 z-10",children:[r,e,a]})]})});On.displayName="GlowButton";function Fn({accent:e="teal",children:t}){let r={teal:"bg-teal-500/90",amber:"bg-amber-400/95",violet:"bg-violet-500/90",blue:"bg-blue-500/90",rose:"bg-rose-500/90",emerald:"bg-emerald-500/90",indigo:"bg-indigo-500/90"};return jsx("div",{className:n("flex h-11 w-11 items-center justify-center rounded-2xl",r[e]??r.teal),children:t})}function Kn({accent:e="teal"}){let t={teal:"from-teal-400/25 via-teal-400/10 to-transparent",amber:"from-amber-300/25 via-amber-300/10 to-transparent",violet:"from-violet-400/25 via-violet-400/10 to-transparent",blue:"from-blue-400/25 via-blue-400/10 to-transparent",rose:"from-rose-400/25 via-rose-400/10 to-transparent",emerald:"from-emerald-400/25 via-emerald-400/10 to-transparent",indigo:"from-indigo-400/25 via-indigo-400/10 to-transparent"};return jsx("div",{className:n("pointer-events-none absolute -right-12 top-1/2 h-40 w-48 -translate-y-1/2 rotate-12","bg-gradient-to-l blur-2xl",t[e]??t.teal)})}function Wn({color:e="currentColor"}){return jsx("svg",{viewBox:"0 0 120 40",className:"h-6 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsx("path",{d:"M2 22c10 0 10-10 20-10s10 10 20 10 10-10 20-10 10 10 20 10 10-10 20-10",stroke:e,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.95"})})}var _n=ue__default.forwardRef(({accent:e="teal",icon:t,value:r,subtext:a,showWave:s=false,onClick:o,className:i,...l},d)=>{let c=useRef(null),m=()=>{let h=c.current;if(!h)return;let v=h.getBoundingClientRect();h.style.setProperty("--x",`${Math.round(v.width/2)}px`),h.style.setProperty("--y",`${Math.round(v.height/2)}px`);},p=h=>{let v=c.current;if(!v)return;let b=v.getBoundingClientRect();v.style.setProperty("--x",`${h.clientX-b.left}px`),v.style.setProperty("--y",`${h.clientY-b.top}px`);},f={teal:"rgba(45,212,191,.95)",amber:"rgba(251,191,36,.95)",violet:"rgba(167,139,250,.95)",blue:"rgba(96,165,250,.95)",rose:"rgba(251,113,133,.95)",emerald:"rgba(52,211,153,.95)",indigo:"rgba(129,140,248,.95)"},g=f[e]??f.teal;return jsxs("div",{ref:h=>{c.current=h,typeof d=="function"?d(h):d&&(d.current=h);},onMouseEnter:m,onMouseMove:p,onClick:o,className:n("group relative overflow-hidden rounded-2xl","bg-white border border-gray-200 shadow-sm","dark:bg-transparent dark:bg-gradient-to-b dark:from-white/[0.06] dark:to-white/[0.03]","dark:border-white/[0.10]","dark:shadow-[0_18px_55px_rgba(0,0,0,.55)]","transition-transform duration-300 hover:scale-[1.015]",o&&"cursor-pointer",i),...l,children:[jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(180px at var(--x, 50%) var(--y, 50%), rgba(255,255,255,.16), transparent 60%)"}}),jsx("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(220px_140px_at_18%_18%,rgba(255,255,255,.08),transparent_60%)]"}),jsx(Kn,{accent:e}),jsxs("div",{className:"relative p-5",children:[jsx("div",{className:"flex items-start justify-between gap-4",children:jsx(Fn,{accent:e,children:t})}),jsxs("div",{className:"mt-4 flex items-end justify-between gap-4",children:[jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate text-2xl font-semibold tracking-tight text-gray-900 dark:text-white",children:r}),a?jsx("div",{className:"mt-1 text-sm text-gray-500 dark:text-white/45",children:a}):null]}),s?jsx(Wn,{color:g}):null]})]})]})});_n.displayName="MetricCard";var U=ue__default.forwardRef(({as:e="p",variant:t="default",size:r="base",weight:a="normal",code:s=false,className:o,children:i,...l},d)=>jsx(e,{ref:d,className:n("leading-relaxed transition-colors duration-200",s&&"font-mono bg-zinc-100 dark:bg-white/[0.03] px-1.5 py-0.5 rounded text-[0.9em]",{"text-zinc-900 dark:text-white":t==="default","text-zinc-500 dark:text-zinc-400":t==="muted","text-zinc-400 dark:text-zinc-500":t==="subtle","text-lg md:text-xl text-zinc-600 dark:text-zinc-300 font-light":t==="lead","text-rose-600 dark:text-rose-400":t==="error","text-emerald-600 dark:text-emerald-400":t==="success","text-amber-600 dark:text-amber-400":t==="warning","text-sky-600 dark:text-sky-400":t==="info","text-xs":r==="xs","text-sm":r==="sm","text-base":r==="base","text-lg":r==="lg","text-xl":r==="xl","text-2xl":r==="2xl","font-light":a==="light","font-normal":a==="normal","font-medium":a==="medium","font-semibold":a==="semibold","font-bold":a==="bold"},o),...l,children:i}));U.displayName="Text";var Ke=ue__default.forwardRef(({as:e="h2",weight:t="bold",className:r,children:a,...s},o)=>jsx(e,{ref:o,className:n("tracking-tight text-zinc-900 dark:text-white transition-colors duration-200",{"text-4xl md:text-5xl lg:text-6xl":e==="h1","text-3xl md:text-4xl":e==="h2","text-2xl md:text-3xl":e==="h3","text-xl md:text-2xl":e==="h4","text-lg md:text-xl":e==="h5","text-base md:text-lg":e==="h6"},{"font-normal":t==="normal","font-medium":t==="medium","font-semibold":t==="semibold","font-bold":t==="bold","font-extrabold":t==="extrabold","font-black":t==="black"},r),...s,children:a}));Ke.displayName="Heading";var qn=ue__default.forwardRef(({from:e="from-blue-500",to:t="to-purple-500",via:r,direction:a="r",animate:s=false,className:o,children:i,...l},d)=>jsx("span",{ref:d,className:n("bg-clip-text text-transparent bg-gradient-to-"+a,e,t,r,s&&"animate-gradient bg-[length:200%_auto]",o),...l,children:i}));qn.displayName="TextGradient";var Zn=ue__default.forwardRef(({shimmerColor:e="rgba(255,255,255,0.3)",duration:t="2s",baseColor:r="currentColor",className:a,children:s,...o},i)=>jsx("span",{ref:i,className:n("inline-block bg-clip-text text-transparent animate-shimmer will-change-[background-position]",a),style:{backgroundImage:`linear-gradient(90deg, ${r} 0%, ${r} 40%, ${e} 50%, ${r} 60%, ${r} 100%)`,backgroundSize:"200% 100%",animationDuration:t,animationIterationCount:"infinite",animationTimingFunction:"linear"},...o,children:s}));Zn.displayName="ShinyText";function Be(e={threshold:.1,rootMargin:"0px",enabled:true}){let t=useRef(null),[r,a]=useState(false),[s,o]=useState(false),{enabled:i=true}=e;return useEffect(()=>{if(!i)return;let l=t.current;if(!l)return;let d=new IntersectionObserver(([c])=>{c&&c.isIntersecting?(a(true),o(true)):a(false);},e);return d.observe(l),()=>{d.disconnect();}},[e.threshold,e.rootMargin,e.root,i]),{ref:t,isInView:r,hasAnimated:s}}function Sa({children:e,direction:t="up",duration:r=.5,delay:a=0,boxColor:s="bg-blue-500",className:o,...i}){let{ref:l,hasAnimated:d}=Be({threshold:.2}),c={up:"translate-y-full",down:"-translate-y-full",left:"translate-x-full",right:"-translate-x-full"};return jsxs("div",{ref:l,className:n("relative overflow-hidden inline-block",o),...i,children:[jsx("div",{className:n("transition-all ease-out",d?"translate-x-0 translate-y-0 opacity-100":n("opacity-0",c[t])),style:{transitionDuration:`${r}s`,transitionDelay:`${a}s`},children:e}),jsx("div",{className:n("absolute inset-0 z-10 transition-transform ease-in-out",s,d?t==="left"||t==="right"?"scale-x-0":"scale-y-0":"scale-100"),style:{transitionDuration:`${r}s`,transitionDelay:`${a}s`,transformOrigin:t==="up"?"top":t==="down"?"bottom":t==="left"?"left":"right"}})]})}var os=({title:e,highlight:t,subtitle:r,gradient:a="from-blue-400 via-indigo-500 to-purple-600",animate:s=true,glow:o=true,className:i,...l})=>{let d=jsxs("div",{className:n("flex flex-col items-center text-center space-y-6",i),...l,children:[jsxs("h1",{className:"text-5xl md:text-7xl font-bold tracking-tight text-white leading-tight",children:[e," ",t&&jsxs("span",{className:"relative inline-block",children:[jsx("span",{className:n("bg-clip-text text-transparent bg-gradient-to-r",a),children:t}),o&&jsx("span",{className:n("absolute inset-0 blur-3xl opacity-40 -z-10 bg-gradient-to-r",a),"aria-hidden":"true",children:t})]})]}),r&&jsx("p",{className:"text-lg md:text-xl text-white/50 max-w-2xl mx-auto leading-relaxed",children:r})]});return s?jsx(Sa,{direction:"up",duration:1,children:d}):d};os.displayName="HeroText";var ns=({text:e,delay:t=.05,className:r,...a})=>{let s=e.split("");return jsxs("div",{className:n("flex flex-wrap justify-center overflow-hidden py-2",r),...a,children:[s.map((o,i)=>jsx("span",{className:"inline-block animate-pullup opacity-0",style:{animation:"pullup 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards",animationDelay:`${i*t}s`,whiteSpace:o===" "?"pre":"normal"},children:o},i)),jsx("style",{children:`
1
+ import*as be from'react';import be__default,{useRef,useState,useEffect,createContext,useCallback,useContext,useLayoutEffect,useMemo}from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {cva}from'class-variance-authority';import {createPortal,flushSync}from'react-dom';import {EyeOff,Eye,Upload,File,X,Minus,Plus,Info,Star,Lock,Trash2,GripVertical,Pause,Play,MessageSquare,Paperclip,Clock,Mic,Square,Sparkles,ArrowUp,ExternalLink,Copy,Share,Edit,RefreshCw,ThumbsUp,ThumbsDown,ChevronLeft,ChevronRight,Calendar,Loader2,ChevronDown,Search,ArrowDown,ArrowUpDown,Layout,List,Undo2,Redo2,Filter,SortAsc,MoreHorizontal,AlertCircle,MoreVertical,Check,CheckSquare,Send,FileIcon,Download,Tag,Users,Timer,RotateCcw,Archive,CheckCircle2,Circle,Menu,Settings,User,LogOut,AlertTriangle,Pin,BellOff,ArrowLeft,Phone,Video,VolumeX,Volume2,CheckCheck,Reply,Edit2,Forward,Smile,Gift,MapPin,Image,Bell,Ban,Sun,Moon,FileText,FolderOpen,Folder}from'lucide-react';function i(...e){return twMerge(clsx(e))}var gi=be__default.forwardRef(({children:e,className:t,leftIcon:r,rightIcon:a,...n},o)=>jsxs("button",{ref:o,type:n.type??"button",className:i("group relative inline-flex items-center justify-center gap-2 rounded-2xl px-5 py-3","bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600","text-white font-semibold tracking-tight","shadow-[0_12px_40px_rgba(99,102,241,.45)]","transition-all duration-300","hover:scale-[1.03] hover:shadow-[0_18px_60px_rgba(99,102,241,.6)]","active:scale-[0.98]","disabled:opacity-50 disabled:cursor-not-allowed","focus:outline-none focus:ring-2 focus:ring-purple-400/40",t),...n,children:[jsx("span",{className:"pointer-events-none absolute inset-0 rounded-2xl bg-gradient-to-r from-white/18 via-white/5 to-white/18 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100"}),jsxs("span",{className:"relative inline-flex items-center gap-2",children:[r,e,a]})]}));gi.displayName="PrimaryButton";var ut=be.forwardRef(({children:e,...t},r)=>{if(!be.isValidElement(e))return null;let a=e;return be.cloneElement(a,{...t,...a.props,ref:n=>{typeof r=="function"?r(n):r&&(r.current=n);let{ref:o}=a;typeof o=="function"?o(n):o&&"current"in o&&(o.current=n);},className:i(t.className,a.props.className)})});ut.displayName="Slot";var vi=cva("group relative inline-flex items-center justify-center font-semibold tracking-tight transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-purple-400/40 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 disabled:active:scale-100 hover:scale-[1.02] active:scale-[0.98]",{variants:{variant:{primary:"bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 text-white border-transparent",secondary:"bg-zinc-100 text-zinc-900 border border-zinc-200 hover:bg-zinc-200 dark:bg-white/[0.05] dark:text-white dark:border-white/10 dark:hover:bg-white/[0.10] dark:hover:border-white/20",outline:"bg-transparent text-zinc-900 border border-zinc-300 hover:bg-zinc-100 dark:text-white dark:border-white/20 dark:hover:bg-white/[0.05] dark:hover:border-white/30",ghost:"bg-transparent text-zinc-600 hover:text-zinc-900 hover:bg-zinc-100 dark:text-white/80 dark:hover:text-white dark:hover:bg-white/[0.05] border-transparent",danger:"bg-rose-500/10 text-rose-600 border border-rose-500/20 hover:bg-rose-500/20 hover:border-rose-500/30 hover:text-rose-700 dark:text-rose-400 dark:hover:text-rose-300",success:"bg-emerald-500/10 text-emerald-600 border border-emerald-500/20 hover:bg-emerald-500/20 hover:border-emerald-500/30 hover:text-emerald-700 dark:text-emerald-400 dark:hover:text-emerald-300",alert:"bg-amber-500/10 text-amber-600 border border-amber-500/20 hover:bg-amber-500/20 hover:border-amber-500/30 hover:text-amber-700 dark:text-amber-400 dark:hover:text-amber-300"},size:{sm:"h-9 px-3 text-xs gap-1.5",md:"h-11 px-5 text-sm gap-2",lg:"h-14 px-8 text-base gap-3",icon:"h-10 w-10 p-0 flex items-center justify-center"},shape:{default:"rounded-2xl",pill:"rounded-full",square:"rounded-lg"},shadow:{true:"",false:""}},compoundVariants:[{variant:"primary",shadow:true,class:"shadow-[0_12px_40px_rgba(99,102,241,.45)] hover:shadow-[0_18px_60px_rgba(99,102,241,.6)]"},{variant:"secondary",shadow:true,class:"shadow-sm"}],defaultVariants:{variant:"primary",size:"md",shape:"default",shadow:true}}),R=be__default.forwardRef(({className:e,variant:t,size:r,shape:a,shadow:n,asChild:o=false,leftIcon:s,rightIcon:l,isLoading:c,children:d,disabled:m,...u},p)=>jsxs(o?ut:"button",{ref:p,disabled:m||c,className:i(vi({variant:t,size:r,shape:a,shadow:n,className:e})),...u,children:[t==="primary"&&!o&&jsx("span",{className:"pointer-events-none absolute inset-0 rounded-[inherit] bg-gradient-to-r from-white/18 via-white/5 to-white/18 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100"}),jsxs("span",{className:"relative inline-flex items-center justify-center",children:[c&&jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",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"})]}),!c&&s&&jsx("span",{className:i("mr-2",r==="sm"&&"mr-1.5"),children:s}),d,!c&&l&&jsx("span",{className:i("ml-2",r==="sm"&&"ml-1.5"),children:l})]})]}));R.displayName="Button";var yi=be__default.forwardRef(({children:e,className:t,leftIcon:r,rightIcon:a,...n},o)=>{let s=useRef(null),l=c=>{let d=s.current;if(!d)return;let m=d.getBoundingClientRect(),u=c.clientX-m.left,p=c.clientY-m.top;d.style.setProperty("--mouse-x",`${u}px`),d.style.setProperty("--mouse-y",`${p}px`);};return be__default.useImperativeHandle(o,()=>s.current),jsxs("button",{ref:s,onMouseMove:l,type:n.type??"button",className:i("group relative inline-flex items-center justify-center gap-2 rounded-2xl px-6 py-3","bg-zinc-100 border border-zinc-200 text-zinc-900","dark:bg-white/[0.03] dark:border-white/10 dark:text-white","font-semibold tracking-tight overflow-hidden","transition-all duration-300","hover:bg-zinc-200 dark:hover:bg-white/[0.05] hover:scale-[1.02]","active:scale-[0.98]","focus:outline-none focus:ring-2 focus:ring-purple-400/40",t),...n,children:[jsx("div",{className:"pointer-events-none absolute -inset-px opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.4), transparent 40%)"}}),jsx("div",{className:"pointer-events-none absolute -inset-px rounded-2xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(300px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.6), transparent 40%)",maskImage:"linear-gradient(#fff, #fff), linear-gradient(#fff, #fff)",maskClip:"content-box, border-box",maskComposite:"exclude",WebkitMaskComposite:"xor",padding:"1px"}}),jsxs("span",{className:"relative inline-flex items-center gap-2 z-10",children:[r,e,a]})]})});yi.displayName="GlowButton";function Ti({accent:e="teal",children:t}){let r={teal:"bg-teal-500/90",amber:"bg-amber-400/95",violet:"bg-violet-500/90",blue:"bg-blue-500/90",rose:"bg-rose-500/90",emerald:"bg-emerald-500/90",indigo:"bg-indigo-500/90"};return jsx("div",{className:i("flex h-11 w-11 items-center justify-center rounded-2xl",r[e]??r.teal),children:t})}function Ci({accent:e="teal"}){let t={teal:"from-teal-400/25 via-teal-400/10 to-transparent",amber:"from-amber-300/25 via-amber-300/10 to-transparent",violet:"from-violet-400/25 via-violet-400/10 to-transparent",blue:"from-blue-400/25 via-blue-400/10 to-transparent",rose:"from-rose-400/25 via-rose-400/10 to-transparent",emerald:"from-emerald-400/25 via-emerald-400/10 to-transparent",indigo:"from-indigo-400/25 via-indigo-400/10 to-transparent"};return jsx("div",{className:i("pointer-events-none absolute -right-12 top-1/2 h-40 w-48 -translate-y-1/2 rotate-12","bg-gradient-to-l blur-2xl",t[e]??t.teal)})}function Ri({color:e="currentColor"}){return jsx("svg",{viewBox:"0 0 120 40",className:"h-6 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsx("path",{d:"M2 22c10 0 10-10 20-10s10 10 20 10 10-10 20-10 10 10 20 10 10-10 20-10",stroke:e,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.95"})})}var Mi=be__default.forwardRef(({accent:e="teal",icon:t,value:r,subtext:a,showWave:n=false,onClick:o,className:s,...l},c)=>{let d=useRef(null),m=()=>{let h=d.current;if(!h)return;let x=h.getBoundingClientRect();h.style.setProperty("--x",`${Math.round(x.width/2)}px`),h.style.setProperty("--y",`${Math.round(x.height/2)}px`);},u=h=>{let x=d.current;if(!x)return;let g=x.getBoundingClientRect();x.style.setProperty("--x",`${h.clientX-g.left}px`),x.style.setProperty("--y",`${h.clientY-g.top}px`);},p={teal:"rgba(45,212,191,.95)",amber:"rgba(251,191,36,.95)",violet:"rgba(167,139,250,.95)",blue:"rgba(96,165,250,.95)",rose:"rgba(251,113,133,.95)",emerald:"rgba(52,211,153,.95)",indigo:"rgba(129,140,248,.95)"},b=p[e]??p.teal;return jsxs("div",{ref:h=>{d.current=h,typeof c=="function"?c(h):c&&(c.current=h);},onMouseEnter:m,onMouseMove:u,onClick:o,className:i("group relative overflow-hidden rounded-2xl","bg-white border border-gray-200 shadow-sm","dark:bg-transparent dark:bg-gradient-to-b dark:from-white/[0.06] dark:to-white/[0.03]","dark:border-white/[0.10]","dark:shadow-[0_18px_55px_rgba(0,0,0,.55)]","transition-transform duration-300 hover:scale-[1.015]",o&&"cursor-pointer",s),...l,children:[jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(180px at var(--x, 50%) var(--y, 50%), rgba(255,255,255,.16), transparent 60%)"}}),jsx("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(220px_140px_at_18%_18%,rgba(255,255,255,.08),transparent_60%)]"}),jsx(Ci,{accent:e}),jsxs("div",{className:"relative p-5",children:[jsx("div",{className:"flex items-start justify-between gap-4",children:jsx(Ti,{accent:e,children:t})}),jsxs("div",{className:"mt-4 flex items-end justify-between gap-4",children:[jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate text-2xl font-semibold tracking-tight text-gray-900 dark:text-white",children:r}),a?jsx("div",{className:"mt-1 text-sm text-gray-500 dark:text-white/45",children:a}):null]}),n?jsx(Ri,{color:b}):null]})]})]})});Mi.displayName="MetricCard";var Ei=cva("rounded-2xl backdrop-blur-xl transition-all duration-300 bg-white/70 border border-zinc-200 shadow-sm text-zinc-900 dark:bg-white/[0.03] dark:border-white/10 dark:shadow-[0_18px_55px_rgba(0,0,0,.45)] dark:text-white",{variants:{variant:{default:"",ghost:"bg-transparent border-transparent shadow-none"}},defaultVariants:{variant:"default"}}),Q=be__default.forwardRef(({className:e,variant:t,asChild:r=false,...a},n)=>jsx(r?ut:"div",{ref:n,className:i(Ei({variant:t,className:e})),...a}));Q.displayName="Surface";var Di=be__default.forwardRef(({className:e,...t},r)=>jsx(Q,{ref:r,className:e,...t}));Di.displayName="Card";var Hi=be__default.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:i("flex flex-col space-y-1.5 p-6",e),...t}));Hi.displayName="CardHeader";var Ii=be__default.forwardRef(({className:e,...t},r)=>jsx("h3",{ref:r,className:i("text-2xl font-semibold leading-none tracking-tight",e),...t}));Ii.displayName="CardTitle";var Ai=be__default.forwardRef(({className:e,...t},r)=>jsx("p",{ref:r,className:i("text-sm text-gray-500 dark:text-white/50",e),...t}));Ai.displayName="CardDescription";var Bi=be__default.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:i("p-6 pt-0",e),...t}));Bi.displayName="CardContent";var Vi=be__default.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:i("flex items-center p-6 pt-0",e),...t}));Vi.displayName="CardFooter";var ge=be__default.forwardRef(({as:e="p",variant:t="default",size:r="base",weight:a="normal",code:n=false,className:o,children:s,...l},c)=>jsx(e,{ref:c,className:i("leading-relaxed transition-colors duration-200",n&&"font-mono bg-zinc-100 dark:bg-white/[0.03] px-1.5 py-0.5 rounded text-[0.9em]",{"text-zinc-900 dark:text-white":t==="default","text-zinc-500 dark:text-zinc-400":t==="muted","text-zinc-400 dark:text-zinc-500":t==="subtle","text-lg md:text-xl text-zinc-600 dark:text-zinc-300 font-light":t==="lead","text-rose-600 dark:text-rose-400":t==="error","text-emerald-600 dark:text-emerald-400":t==="success","text-amber-600 dark:text-amber-400":t==="warning","text-sky-600 dark:text-sky-400":t==="info","text-xs":r==="xs","text-sm":r==="sm","text-base":r==="base","text-lg":r==="lg","text-xl":r==="xl","text-2xl":r==="2xl","font-light":a==="light","font-normal":a==="normal","font-medium":a==="medium","font-semibold":a==="semibold","font-bold":a==="bold"},o),...l,children:s}));ge.displayName="Text";var Xe=be__default.forwardRef(({as:e="h2",weight:t="bold",className:r,children:a,...n},o)=>jsx(e,{ref:o,className:i("tracking-tight text-zinc-900 dark:text-white transition-colors duration-200",{"text-4xl md:text-5xl lg:text-6xl":e==="h1","text-3xl md:text-4xl":e==="h2","text-2xl md:text-3xl":e==="h3","text-xl md:text-2xl":e==="h4","text-lg md:text-xl":e==="h5","text-base md:text-lg":e==="h6"},{"font-normal":t==="normal","font-medium":t==="medium","font-semibold":t==="semibold","font-bold":t==="bold","font-extrabold":t==="extrabold","font-black":t==="black"},r),...n,children:a}));Xe.displayName="Heading";var Ui=be__default.forwardRef(({from:e="from-blue-500",to:t="to-purple-500",via:r,direction:a="r",animate:n=false,className:o,children:s,...l},c)=>jsx("span",{ref:c,className:i("bg-clip-text text-transparent bg-gradient-to-"+a,e,t,r,n&&"animate-gradient bg-[length:200%_auto]",o),...l,children:s}));Ui.displayName="TextGradient";var _i=be__default.forwardRef(({shimmerColor:e="rgba(255,255,255,0.3)",duration:t="2s",baseColor:r="currentColor",className:a,children:n,...o},s)=>jsx("span",{ref:s,className:i("inline-block bg-clip-text text-transparent animate-shimmer will-change-[background-position]",a),style:{backgroundImage:`linear-gradient(90deg, ${r} 0%, ${r} 40%, ${e} 50%, ${r} 60%, ${r} 100%)`,backgroundSize:"200% 100%",animationDuration:t,animationIterationCount:"infinite",animationTimingFunction:"linear"},...o,children:n}));_i.displayName="ShinyText";function ze(e={threshold:.1,rootMargin:"0px",enabled:true}){let t=useRef(null),[r,a]=useState(false),[n,o]=useState(false),{enabled:s=true}=e;return useEffect(()=>{if(!s)return;let l=t.current;if(!l)return;let c=new IntersectionObserver(([d])=>{d&&d.isIntersecting?(a(true),o(true)):a(false);},e);return c.observe(l),()=>{c.disconnect();}},[e.threshold,e.rootMargin,e.root,s]),{ref:t,isInView:r,hasAnimated:n}}function Ko({children:e,direction:t="up",duration:r=.5,delay:a=0,boxColor:n="bg-blue-500",className:o,...s}){let{ref:l,hasAnimated:c}=ze({threshold:.2}),d={up:"translate-y-full",down:"-translate-y-full",left:"translate-x-full",right:"-translate-x-full"};return jsxs("div",{ref:l,className:i("relative overflow-hidden inline-block",o),...s,children:[jsx("div",{className:i("transition-all ease-out",c?"translate-x-0 translate-y-0 opacity-100":i("opacity-0",d[t])),style:{transitionDuration:`${r}s`,transitionDelay:`${a}s`},children:e}),jsx("div",{className:i("absolute inset-0 z-10 transition-transform ease-in-out",n,c?t==="left"||t==="right"?"scale-x-0":"scale-y-0":"scale-100"),style:{transitionDuration:`${r}s`,transitionDelay:`${a}s`,transformOrigin:t==="up"?"top":t==="down"?"bottom":t==="left"?"left":"right"}})]})}var Qi=({title:e,highlight:t,subtitle:r,gradient:a="from-blue-400 via-indigo-500 to-purple-600",animate:n=true,glow:o=true,className:s,...l})=>{let c=jsxs("div",{className:i("flex flex-col items-center text-center space-y-6",s),...l,children:[jsxs("h1",{className:"text-5xl md:text-7xl font-bold tracking-tight text-white leading-tight",children:[e," ",t&&jsxs("span",{className:"relative inline-block",children:[jsx("span",{className:i("bg-clip-text text-transparent bg-gradient-to-r",a),children:t}),o&&jsx("span",{className:i("absolute inset-0 blur-3xl opacity-40 -z-10 bg-gradient-to-r",a),"aria-hidden":"true",children:t})]})]}),r&&jsx("p",{className:"text-lg md:text-xl text-white/50 max-w-2xl mx-auto leading-relaxed",children:r})]});return n?jsx(Ko,{direction:"up",duration:1,children:c}):c};Qi.displayName="HeroText";var Ji=({text:e,delay:t=.05,className:r,...a})=>{let n=e.split("");return jsxs("div",{className:i("flex flex-wrap justify-center overflow-hidden py-2",r),...a,children:[n.map((o,s)=>jsx("span",{className:"inline-block animate-pullup opacity-0",style:{animation:"pullup 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards",animationDelay:`${s*t}s`,whiteSpace:o===" "?"pre":"normal"},children:o},s)),jsx("style",{children:`
2
2
  @keyframes pullup {
3
3
  from {
4
4
  opacity: 0;
@@ -9,10 +9,22 @@ import*as ue from'react';import ue__default,{useRef,useState,useEffect,createCon
9
9
  transform: translateY(0);
10
10
  }
11
11
  }
12
- `})]})};ns.displayName="LetterPullup";var Y=ue__default.forwardRef(({className:e,children:t,required:r,...a},s)=>jsxs("label",{ref:s,className:n("text-sm font-medium leading-none text-gray-700 dark:text-white/80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...a,children:[t,r&&jsx("span",{className:"ml-1 text-rose-500",children:"*"})]}));Y.displayName="Label";var ms=cva("w-full rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3 border border-gray-200 dark:border-white/[0.10] text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-white/30 focus:outline-none focus:ring-2 focus:ring-purple-400/30 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200",{variants:{hasError:{true:"border-rose-400/25 focus:ring-rose-300/25",false:""},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""}},defaultVariants:{hasError:false,hasLeftIcon:false,hasRightIcon:false}}),ft=ue__default.forwardRef(({className:e,containerClassName:t,label:r,error:a,leftIcon:s,rightIcon:o,id:i,...l},d)=>{let c=i||ue__default.useId(),m=!!a;return jsxs("div",{className:n("flex flex-col gap-1.5",t),children:[r&&jsx(Y,{htmlFor:c,required:l.required,children:r}),jsxs("div",{className:"relative flex items-center",children:[s&&jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 dark:text-white/35",children:s}),jsx("input",{ref:d,id:c,className:n(ms({hasError:m,hasLeftIcon:!!s,hasRightIcon:!!o,className:e})),...l}),o&&jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:o})]}),a&&jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:a})]})});ft.displayName="TextInput";var Cr=ue__default.forwardRef(({className:e,label:t,error:r,id:a,disabled:s,checked:o,defaultChecked:i,onChange:l,...d},c)=>{let m=a||ue__default.useId(),[p,f]=ue__default.useState(i||o||false);ue__default.useEffect(()=>{o!==void 0&&f(o);},[o]);let g=()=>{if(s)return;let h=!p;f(h),l&&l({target:{checked:h}});};return jsxs("div",{className:n("flex flex-col gap-1.5",e),children:[jsxs("button",{ref:c,type:"button",id:m,role:"checkbox","aria-checked":p,"aria-label":t,onClick:g,disabled:s,className:n("flex items-center gap-3 rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-3","hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",s&&"opacity-50 cursor-not-allowed"),...d,children:[jsx("span",{"aria-hidden":"true",className:n("grid h-6 w-6 place-items-center rounded-lg border",p?"border-emerald-400/30 bg-emerald-400/15":"border-gray-300 dark:border-white/10 bg-white dark:bg-white/[0.02]"),children:p?jsx("svg",{className:"h-4 w-4 text-emerald-200",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):null}),t&&jsx("span",{className:"text-sm text-gray-700 dark:text-white/70",children:t})]}),r&&jsx("p",{className:"text-xs text-rose-500 mt-1 ml-1",children:r})]})});Cr.displayName="Checkbox";var Lr=ue__default.forwardRef(({className:e,label:t,error:r,id:a,disabled:s,checked:o,defaultChecked:i,onChange:l,...d},c)=>{let m=a||ue__default.useId(),[p,f]=ue__default.useState(i||o||false);ue__default.useEffect(()=>{o!==void 0&&f(o);},[o]);let g=()=>{if(s)return;let h=!p;f(h),l&&l({target:{checked:h}});};return jsxs("div",{className:n("flex flex-col gap-1.5",e),children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",id:m,role:"switch","aria-checked":p,onClick:g,disabled:s,className:n("peer inline-flex h-6 w-11 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-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-black disabled:cursor-not-allowed disabled:opacity-50",p?"bg-emerald-500":"bg-gray-200 dark:bg-white/[0.06]"),...d,children:jsx("span",{className:n("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform",p?"translate-x-5":"translate-x-0")})}),t&&jsx(Y,{htmlFor:m,className:"cursor-pointer select-none text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",onClick:g,children:t})]}),r&&jsx("p",{className:"text-xs text-rose-500 mt-1 ml-1",children:r})]})});Lr.displayName="Switch";var Dr=ue__default.forwardRef(({label:e,name:t,options:r,value:a,defaultValue:s,onChange:o,placeholder:i="Select an option",error:l,disabled:d,className:c},m)=>{let[p,f]=useState(false),[g,h]=useState(s),[v,b]=useState(-1),u=useRef(null),x=ue__default.useId(),y=a!==void 0,k=y?a:g,w=r.find(T=>T.value===k);useEffect(()=>{if(p){let T=r.findIndex(R=>R.value===k);b(T!==-1?T:0);}else b(-1);},[p,k,r]),useEffect(()=>{let T=R=>{u.current&&!u.current.contains(R.target)&&f(false);};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);let N=T=>{d||(y||h(T),o?.(T),f(false));},M=T=>{d||(T.key==="Enter"||T.key===" "?(T.preventDefault(),p&&v!==-1?N(r[v].value):f(true)):T.key==="Escape"?f(false):T.key==="ArrowDown"?(T.preventDefault(),p?b(R=>(R+1)%r.length):f(true)):T.key==="ArrowUp"?(T.preventDefault(),p?b(R=>(R-1+r.length)%r.length):f(true)):T.key==="Home"?(T.preventDefault(),p&&b(0)):T.key==="End"&&(T.preventDefault(),p&&b(r.length-1)));};return jsxs("div",{ref:u,className:n("flex flex-col gap-1.5 relative",c),children:[e&&jsx(Y,{htmlFor:x,className:n(d&&"opacity-50 cursor-not-allowed"),children:e}),jsxs("div",{ref:m,id:x,role:"combobox","aria-expanded":p,"aria-haspopup":"listbox","aria-controls":`${x}-listbox`,"aria-disabled":d,tabIndex:d?-1:0,onClick:()=>!d&&f(!p),onKeyDown:M,className:n("w-full appearance-none rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3","border border-gray-200 dark:border-white/[0.10]","text-gray-900 dark:text-white flex items-center","focus:outline-none focus:ring-2 focus:ring-purple-400/30","hover:bg-gray-100 dark:hover:bg-white/[0.05] cursor-pointer",d&&"cursor-not-allowed opacity-50 hover:bg-gray-50 dark:hover:bg-white/[0.04]",p&&"border-gray-300 dark:border-white/20 ring-2 ring-purple-400/20",l&&"border-rose-400/25 focus:ring-rose-300/25"),children:[jsx("span",{className:n("block truncate",!w&&"text-gray-400 dark:text-white/20"),children:w?w.label:i}),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:n("absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 dark:text-white/40 transition-transform duration-200",p&&"rotate-180"),children:jsx("path",{d:"m6 9 6 6 6-6"})})]}),p&&jsx("div",{className:"absolute top-full left-0 z-50 mt-1 w-full overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A] p-1 shadow-xl animate-in fade-in zoom-in-95 duration-100",children:jsx("ul",{id:`${x}-listbox`,role:"listbox","aria-activedescendant":v!==-1?`${x}-option-${v}`:void 0,className:"max-h-60 overflow-auto p-1 flex flex-col gap-2",children:r.map((T,R)=>jsx("li",{id:`${x}-option-${R}`,role:"option","aria-selected":k===T.value,onClick:()=>N(T.value),onMouseEnter:()=>b(R),className:n("w-full rounded-2xl px-3 py-2 text-left text-sm transition-colors cursor-pointer","hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white",k===T.value||v===R?"bg-gray-100 dark:bg-white/[0.06] text-gray-900 dark:text-white/90":"text-gray-700 dark:text-white/80"),children:jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsx("span",{className:"flex-1 truncate",children:T.label}),k===T.value&&jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:jsx("polyline",{points:"20 6 9 17 4 12"})})]})},T.value))})}),l&&jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:l}),jsx("input",{type:"hidden",name:t,value:k||""})]})});Dr.displayName="Select";function gt(e,t,r={}){let{side:a="bottom",align:s="center",sideOffset:o=4,alignOffset:i=0,isOpen:l=false}=r,[d,c]=useState({top:0,left:0}),[m,p]=useState(false),f=useCallback(()=>{if(!e.current||!t.current||!l)return;let g=e.current.getBoundingClientRect(),h=t.current.getBoundingClientRect(),v=0,b=0;switch(a){case "top":v=g.top-h.height-o;break;case "bottom":v=g.bottom+o;break;case "left":b=g.left-h.width-o;break;case "right":b=g.right+o;break}if(a==="top"||a==="bottom")switch(s){case "start":b=g.left+i;break;case "center":b=g.left+g.width/2-h.width/2+i;break;case "end":b=g.right-h.width+i;break}else switch(s){case "start":v=g.top+i;break;case "center":v=g.top+g.height/2-h.height/2+i;break;case "end":v=g.bottom-h.height+i;break}let u=8,x=window.innerWidth,y=window.innerHeight;b<u&&(b=u),b+h.width>x-u&&(b=x-h.width-u),v<u&&(v=u),v+h.height>y-u&&(v=y-h.height-u),c({top:v,left:b}),p(true);},[e,t,a,s,o,i,l]);return useLayoutEffect(()=>{if(!l){m&&p(false);return}f();let g=new ResizeObserver(()=>f());return e.current&&g.observe(e.current),t.current&&g.observe(t.current),window.addEventListener("resize",f),window.addEventListener("scroll",f,true),()=>{g.disconnect(),window.removeEventListener("resize",f),window.removeEventListener("scroll",f,true);}},[l,f,e,t]),{position:d,isPositioned:m,updatePosition:f}}var Hr=createContext(void 0);function Ue({children:e,open:t,onOpenChange:r}){let[a,s]=useState(false),o=useRef(null),i=t!==void 0,l=i?t:a,d=c=>{i||s(c),r?.(c);};return jsx(Hr.Provider,{value:{isOpen:l,setIsOpen:d,triggerRef:o},children:jsx("div",{className:"relative inline-block",children:e})})}function Ye({className:e,children:t,...r}){let a=useContext(Hr);if(!a)throw new Error("PopoverTrigger must be used within Popover");let s=o=>{a.setIsOpen(!a.isOpen),r.onClick?.(o);};return jsx("button",{ref:a.triggerRef,type:"button","aria-haspopup":"dialog","aria-expanded":a.isOpen?"true":"false",onClick:s,className:n("inline-flex items-center justify-center",e),...r,children:t})}function je({className:e,children:t,align:r="center",sideOffset:a=4,...s}){let o=useContext(Hr);if(!o)throw new Error("PopoverContent must be used within Popover");let i=useRef(null),{position:l,isPositioned:d}=gt(o.triggerRef,i,{side:"bottom",align:r,sideOffset:a,isOpen:o.isOpen});if(useEffect(()=>{if(o.isOpen){let m=p=>{i.current&&!i.current.contains(p.target)&&o.triggerRef.current&&!o.triggerRef.current.contains(p.target)&&o.setIsOpen(false);};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m);}}},[o.isOpen,o.setIsOpen,o.triggerRef]),!o.isOpen)return null;let c=()=>{let m=l.top>(o.triggerRef.current?.getBoundingClientRect().top||0)?"bottom":"top";return m==="bottom"?r==="start"?"top left":r==="end"?"top right":"top center":m==="top"?r==="start"?"bottom left":r==="end"?"bottom right":"bottom center":"center center"};return createPortal(jsx("div",{ref:i,style:{top:l.top,left:l.left,transformOrigin:c()},className:n("fixed z-50 min-w-[12rem] rounded-2xl border border-gray-200 dark:border-white/10 bg-white/80 dark:bg-white/[0.03] backdrop-blur-xl p-4 shadow-xl outline-none duration-200",d?"animate-in fade-in zoom-in-95 opacity-100":"opacity-0",e),...s,children:t}),document.body)}var Ot=createContext(void 0);function Ir({children:e,value:t,defaultValue:r="",onValueChange:a,filter:s=(i,l)=>i.toLowerCase().includes(l.toLowerCase()),usePopover:o=true}){let[i,l]=useState(r),[d,c]=useState(""),[m,p]=useState(false),[f,g]=useState(new Map),[h,v]=useState(-1),b=t!==void 0,u=b?t:i,x=N=>{b||l(N),a?.(N),p(false),c("");},y=ue__default.useCallback((N,M,T)=>(g(R=>{let O=new Map(R);return O.set(N,{text:M,value:T}),O}),()=>{g(R=>{let O=new Map(R);return O.delete(N),O});}),[]),k=useMemo(()=>Array.from(f.entries()).filter(([N,M])=>s(M.text,d)).map(([N,M])=>({id:N,value:M.value})),[f,d,s]),w=k.length>0;return useEffect(()=>{v(m?0:-1);},[m]),jsx(Ot.Provider,{value:{value:u,onValueChange:x,searchTerm:d,setSearchTerm:c,isOpen:m,setIsOpen:p,registerItem:y,isItemVisible:(N,M)=>s(M,d),hasVisibleItems:w,activeIndex:h,setActiveIndex:v,visibleItems:k},children:o?jsx(Ue,{open:m,onOpenChange:p,children:e}):e})}function r0({className:e,children:t,...r}){let a=useContext(Ot);return jsxs(Ye,{role:"combobox","aria-expanded":a?.isOpen,"aria-haspopup":"listbox",className:n("flex h-10 w-full items-center justify-between rounded-2xl border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-900 placeholder:text-gray-500 focus:border-purple-500 focus:outline-none focus:ring-2 focus:ring-purple-500/20 disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:bg-white/[0.03] dark:text-white dark:placeholder:text-white/40 dark:focus:border-white/20 dark:focus:ring-white/10",e),...r,children:[t,jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-2 opacity-50",children:jsx("path",{d:"m6 9 6 6 6-6"})})]})}function a0({className:e,children:t,...r}){return jsx(je,{className:n("p-0 w-[200px]",e),align:"start",...r,children:t})}function ja({className:e,placeholder:t="Search...",...r}){let a=useContext(Ot);if(!a)throw new Error("ComboboxInput must be used within Combobox");let s=o=>{o.key==="ArrowDown"?(o.preventDefault(),a.setActiveIndex(i=>(i+1)%a.visibleItems.length)):o.key==="ArrowUp"?(o.preventDefault(),a.setActiveIndex(i=>(i-1+a.visibleItems.length)%a.visibleItems.length)):o.key==="Enter"?(o.preventDefault(),a.activeIndex!==-1&&a.visibleItems[a.activeIndex]&&a.onValueChange(a.visibleItems[a.activeIndex].value)):o.key==="Escape"&&a.setIsOpen(false),r.onKeyDown?.(o);};return jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-white/10 px-3",children:[jsxs("svg",{className:"mr-2 h-4 w-4 shrink-0 opacity-50",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("circle",{cx:"11",cy:"11",r:"8"}),jsx("path",{d:"m21 21-4.3-4.3"})]}),jsx("input",{className:n("flex h-10 w-full rounded-md bg-transparent py-3 text-sm text-gray-900 dark:text-white outline-none placeholder:text-gray-400 dark:placeholder:text-white/40 disabled:cursor-not-allowed disabled:opacity-50",e),placeholder:t,value:a.searchTerm,onChange:o=>a.setSearchTerm(o.target.value),onKeyDown:s,"aria-autocomplete":"list","aria-activedescendant":a.activeIndex!==-1?a.visibleItems[a.activeIndex]?.id:void 0,...r})]})}function Xa({className:e,children:t,...r}){return jsx("div",{role:"listbox",className:n("max-h-[300px] overflow-y-auto overflow-x-hidden p-1",e),...r,children:t})}function Ga({className:e,children:t,...r}){let a=useContext(Ot);if(!a)throw new Error("ComboboxEmpty must be used within Combobox");return a.hasVisibleItems?null:jsx("div",{className:n("py-6 text-center text-sm text-gray-500 dark:text-white/40",e),...r,children:t})}function qa({className:e,value:t,children:r,textValue:a,...s}){let o=useContext(Ot);if(!o)throw new Error("ComboboxItem must be used within Combobox");let i=ue__default.useId(),l=a||(typeof r=="string"?r:t),d=o.isItemVisible(i,l),c=o.value===t,m=o.visibleItems.findIndex(f=>f.id===i),p=o.activeIndex===m;return useEffect(()=>o.registerItem(i,l,t),[i,l,t,o.registerItem]),d?jsxs("div",{id:i,role:"option","aria-selected":c,onClick:()=>o.onValueChange(t),onMouseEnter:()=>o.setActiveIndex(m),className:n("relative flex cursor-default select-none items-center rounded-2xl px-3 py-2 text-sm outline-none transition-colors","text-gray-700 dark:text-white/80","aria-selected:bg-gray-100 aria-selected:text-gray-900 dark:aria-selected:bg-white/[0.06] dark:aria-selected:text-white","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.06] dark:hover:text-white",(c||p)&&"bg-gray-100 text-gray-900 dark:bg-white/[0.06] dark:text-white",e),...s,children:[jsx("svg",{className:n("mr-2 h-4 w-4",c?"opacity-100":"opacity-0"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("polyline",{points:"20 6 9 17 4 12"})}),r]}):null}var d0=ue__default.forwardRef(({className:e,value:t,defaultValue:r=0,min:a=0,max:s=100,step:o=1,onChange:i,disabled:l,...d},c)=>{let[m,p]=useState(r),f=t!==void 0,g=f?t:m,h=useRef(null),v=(g-a)/(s-a)*100,b=useCallback(k=>{if(l||!h.current)return;let w=h.current.getBoundingClientRect(),N=w.width,M=w.left,T=(k-M)/N*(s-a)+a;T=Math.min(Math.max(T,a),s);let R=Math.round((T-a)/o);T=a+R*o,T=Number(T.toFixed(10)),f||p(T),i?.(T);},[l,f,s,a,i,o]),u=k=>{if(l)return;b(k.clientX);let w=M=>{b(M.clientX);},N=()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",N);};document.addEventListener("mousemove",w),document.addEventListener("mouseup",N);},x=k=>{if(l)return;let w=k.touches[0];w&&b(w.clientX);let N=T=>{let R=T.touches[0];R&&b(R.clientX);},M=()=>{document.removeEventListener("touchmove",N),document.removeEventListener("touchend",M);};document.addEventListener("touchmove",N,{passive:false}),document.addEventListener("touchend",M);};return jsxs("div",{ref:c,role:"slider","aria-valuemin":a,"aria-valuemax":s,"aria-valuenow":g,"aria-disabled":l,tabIndex:l?-1:0,onKeyDown:k=>{if(l)return;let w=g;if(k.key==="ArrowRight"||k.key==="ArrowUp")w=Math.min(g+o,s);else if(k.key==="ArrowLeft"||k.key==="ArrowDown")w=Math.max(g-o,a);else if(k.key==="Home")w=a;else if(k.key==="End")w=s;else return;k.preventDefault(),w!==g&&(f||p(w),i?.(w));},className:n("relative flex w-full touch-none select-none items-center py-4 group",l&&"opacity-50 cursor-not-allowed",e),onMouseDown:u,onTouchStart:x,...d,children:[jsx("div",{ref:h,className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.06] backdrop-blur-sm border border-gray-200 dark:border-white/5",children:jsx("div",{className:"absolute h-full bg-gray-900 dark:bg-white transition-none dark:shadow-[0_0_10px_rgba(255,255,255,0.5)]",style:{width:`${v}%`}})}),jsx("div",{className:"absolute h-5 w-5 rounded-full border-2 border-gray-900 dark:border-white bg-white dark:bg-black shadow-md dark:shadow-[0_0_15px_rgba(255,255,255,0.5)] transition-transform hover:scale-110 focus:scale-110",style:{left:`calc(${v}% - 10px)`}})]})});var Ls=["Su","Mo","Tu","We","Th","Fr","Sa"],Ps=["January","February","March","April","May","June","July","August","September","October","November","December"];function sr({className:e,value:t,onChange:r,minDate:a,maxDate:s}){let[o,i]=useState(t||new Date),[l,d]=useState(t||new Date),c=(u,x)=>new Date(u,x+1,0).getDate(),m=(u,x)=>new Date(u,x,1).getDay(),p=()=>{d(new Date(l.getFullYear(),l.getMonth()-1,1));},f=()=>{d(new Date(l.getFullYear(),l.getMonth()+1,1));},g=u=>{let x=new Date(l.getFullYear(),l.getMonth(),u);r&&r(x),i(x);},h=u=>t&&t.getDate()===u&&t.getMonth()===l.getMonth()&&t.getFullYear()===l.getFullYear(),v=u=>{let x=new Date;return x.getDate()===u&&x.getMonth()===l.getMonth()&&x.getFullYear()===l.getFullYear()},b=()=>{let u=c(l.getFullYear(),l.getMonth()),x=m(l.getFullYear(),l.getMonth()),y=[];for(let k=0;k<x;k++)y.push(jsx("div",{className:"h-9 w-9"},`empty-${k}`));for(let k=1;k<=u;k++){let w=h(k),N=v(k);y.push(jsx("button",{onClick:()=>g(k),type:"button",className:n("h-9 w-9 rounded-2xl text-sm font-medium transition-all duration-200","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20",w&&"bg-gray-900 text-white dark:bg-white dark:text-black shadow-md dark:shadow-[0_0_15px_rgba(255,255,255,0.3)] hover:bg-gray-800 dark:hover:bg-white/90",!w&&N&&"bg-gray-100 dark:bg-white/[0.03] text-gray-900 dark:text-white border border-gray-200 dark:border-white/10",!w&&!N&&"text-gray-700 dark:text-white/70 hover:text-gray-900 dark:hover:text-white"),children:k},k));}return y};return jsxs("div",{className:n("p-4 bg-white dark:bg-black/40 backdrop-blur-xl border border-gray-200 dark:border-white/10 rounded-2xl w-fit",e),children:[jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[jsxs("div",{className:"font-semibold text-gray-900 dark:text-white",children:[Ps[l.getMonth()]," ",jsx("span",{className:"text-gray-500 dark:text-white/50",children:l.getFullYear()})]}),jsxs("div",{className:"flex gap-1",children:[jsx("button",{onClick:p,type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/70 hover:text-gray-900 dark:hover:text-white transition-colors",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx("button",{onClick:f,type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/70 hover:text-gray-900 dark:hover:text-white transition-colors",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]}),jsx("div",{className:"grid grid-cols-7 gap-1 mb-2 text-center",children:Ls.map(u=>jsx("div",{className:"h-9 w-9 flex items-center justify-center text-xs font-medium text-gray-400 dark:text-white/40",children:u},u))}),jsx("div",{className:"grid grid-cols-7 gap-1",children:b()})]})}function T0({value:e,onChange:t,placeholder:r="Pick a date",className:a}){let[s,o]=useState(e),[i,l]=useState(false),d=p=>{o(p),t?.(p),l(false);},c=p=>p.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});return jsxs(Ue,{open:i,onOpenChange:l,children:[jsxs(Ye,{onMouseMove:p=>{let f=p.currentTarget.getBoundingClientRect(),g=p.clientX-f.left,h=p.clientY-f.top;p.currentTarget.style.setProperty("--x",`${g}px`),p.currentTarget.style.setProperty("--y",`${h}px`);},className:n("group relative flex h-11 w-full items-center justify-between rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-2 text-sm text-gray-900 dark:text-white transition-all duration-200 overflow-hidden","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/15",!s&&"text-gray-400 dark:text-white/40",a),children:[jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--x) var(--y), rgba(255,255,255,0.06), transparent 40%)"}}),jsx("span",{className:"relative z-10",children:s?c(s):r}),jsx(Calendar,{className:"relative z-10 h-4 w-4 text-white/40"})]}),jsx(je,{className:"w-auto p-0 border-none bg-transparent shadow-none",align:"start",children:jsx(sr,{value:s,onChange:d,className:"shadow-2xl shadow-black/50"})})]})}var Te=ue__default.forwardRef(({className:e,children:t,orientation:r="vertical",scrollbarSize:a="sm",...s},o)=>jsx("div",{ref:o,className:n("overflow-auto","[&::-webkit-scrollbar]:bg-transparent","[&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-thumb]:bg-white/[0.06]","[&::-webkit-scrollbar-thumb]:rounded-full","hover:[&::-webkit-scrollbar-thumb]:bg-gray-400 dark:hover:[&::-webkit-scrollbar-thumb]:bg-white/20","[&::-webkit-scrollbar-track]:bg-transparent","[scrollbar-width:thin] [scrollbar-color:rgba(0,0,0,0.2)_transparent] dark:[scrollbar-color:rgba(255,255,255,0.1)_transparent]",r==="vertical"&&"overflow-y-auto overflow-x-hidden",r==="horizontal"&&"overflow-x-auto overflow-y-hidden",r==="both"&&"overflow-auto",a==="sm"&&"[&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar]:h-1.5",a==="md"&&"[&::-webkit-scrollbar]:w-2.5 [&::-webkit-scrollbar]:h-2.5",a==="lg"&&"[&::-webkit-scrollbar]:w-4 [&::-webkit-scrollbar]:h-4",e),...s,children:t}));Te.displayName="ScrollArea";function O0({value:e,onChange:t,placeholder:r="Pick date & time",className:a}){let[s,o]=useState(e),[i,l]=useState(false),[d,c]=useState(e?e.getHours():12),[m,p]=useState(e?e.getMinutes():0);useEffect(()=>{e&&(o(e),c(e.getHours()),p(e.getMinutes()));},[e]);let f=b=>{let u=new Date(b);u.setHours(d),u.setMinutes(m),o(u),t?.(u);},g=(b,u)=>{let x=parseInt(u,10);if(isNaN(x))return;let y=d,k=m;b==="hours"?(x=Math.max(0,Math.min(23,x)),c(x),y=x):(x=Math.max(0,Math.min(59,x)),p(x),k=x);let w=s||new Date,N=new Date(w);N.setHours(y),N.setMinutes(k),o(N),t?.(N);},h=b=>b.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"});return jsxs(Ue,{open:i,onOpenChange:l,children:[jsxs(Ye,{onMouseMove:b=>{let u=b.currentTarget.getBoundingClientRect(),x=b.clientX-u.left,y=b.clientY-u.top;b.currentTarget.style.setProperty("--x",`${x}px`),b.currentTarget.style.setProperty("--y",`${y}px`);},className:n("group relative flex h-11 w-full items-center justify-between rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-2 text-sm text-gray-900 dark:text-white transition-all duration-200 overflow-hidden","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/15",!s&&"text-gray-400 dark:text-white/40",a),children:[jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--x) var(--y), rgba(0,0,0,0.06), transparent 40%)"}}),jsx("span",{className:"relative z-10",children:s?h(s):r}),jsxs("div",{className:"flex items-center gap-2 text-gray-400 dark:text-white/40",children:[jsx(Calendar,{className:"h-4 w-4"}),jsx(Clock,{className:"h-4 w-4"})]})]}),jsx(je,{className:"w-auto p-0 border-none bg-transparent shadow-none",align:"start",children:jsx("div",{className:"flex flex-col rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/40 backdrop-blur-xl shadow-2xl dark:shadow-black/50",children:jsxs("div",{className:"flex",children:[jsx("div",{className:"p-4 border-r border-gray-200 dark:border-white/10",children:jsx(sr,{value:s,onChange:f,className:"border-0 p-0 bg-transparent backdrop-blur-none shadow-none rounded-none"})}),jsxs("div",{className:"flex flex-col p-4 w-[160px] h-[340px]",children:[jsx("div",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-white/70",children:"Time"}),jsxs("div",{className:"flex flex-1 gap-2 min-h-0 overflow-hidden",children:[jsxs(Te,{className:"flex-1 flex flex-col gap-1",scrollbarSize:"sm",children:[jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 text-center mb-1 sticky top-0 bg-white dark:bg-[#0A0A0A] py-1 z-10",children:"Hr"}),jsx("div",{className:"flex flex-col gap-1",children:Array.from({length:24}).map((b,u)=>jsx("button",{onClick:()=>g("hours",u.toString()),className:n("w-full rounded-lg px-1 py-1.5 text-sm transition-colors text-center shrink-0",d===u?"bg-emerald-500 dark:bg-emerald-600/80 text-white font-medium":"text-gray-700 dark:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white"),children:u.toString().padStart(2,"0")},u))})]}),jsx("div",{className:"w-[1px] bg-gray-200 dark:bg-white/[0.06]"}),jsxs(Te,{className:"flex-1 flex flex-col gap-1",scrollbarSize:"sm",children:[jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 text-center mb-1 sticky top-0 bg-white dark:bg-[#0A0A0A] py-1 z-10",children:"Min"}),jsx("div",{className:"flex flex-col gap-1",children:Array.from({length:60}).map((b,u)=>jsx("button",{onClick:()=>g("minutes",u.toString()),className:n("w-full rounded-lg px-1 py-1.5 text-sm transition-colors text-center shrink-0",m===u?"bg-emerald-500 dark:bg-emerald-600/80 text-white font-medium":"text-gray-700 dark:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white"),children:u.toString().padStart(2,"0")},u))})]})]})]})]})})})]})}var Br=ue__default.forwardRef(({className:e,label:t,error:r,id:a,disabled:s,...o},i)=>{let l=ue__default.useId(),d=a||l;return jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&jsx(Y,{htmlFor:d,className:n(s&&"opacity-50 cursor-not-allowed"),children:t}),jsx("textarea",{ref:i,id:d,disabled:s,className:n("w-full rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3","border border-gray-200 dark:border-white/[0.10]","text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-white/30","focus:outline-none focus:ring-2 focus:ring-purple-400/30","resize-none","disabled:cursor-not-allowed disabled:opacity-50",r&&"border-rose-400/25 focus:ring-rose-300/25",e),...o}),r&&jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:r})]})});Br.displayName="Textarea";var to=createContext({}),zs=ue__default.forwardRef(({className:e,value:t,onChange:r,name:a,disabled:s,label:o,children:i,...l},d)=>{let c=ue__default.useId();return jsxs("div",{ref:d,className:n("flex flex-col gap-2",e),...l,children:[o&&jsx(Y,{className:n(s&&"opacity-50 cursor-not-allowed"),children:o}),jsx("div",{className:"flex flex-col gap-2",role:"radiogroup",children:jsx(to.Provider,{value:{value:t,onChange:r,name:a||c,disabled:s},children:i})})]})});zs.displayName="RadioGroup";var $s=ue__default.forwardRef(({className:e,value:t,label:r,disabled:a,...s},o)=>{let i=useContext(to),l=i.value===t,d=i.disabled||a,c=ue__default.useId();return jsxs("label",{htmlFor:c,className:n("flex items-center gap-3 cursor-pointer group",d&&"cursor-not-allowed opacity-50",e),children:[jsxs("div",{className:"relative flex items-center justify-center",children:[jsx("input",{ref:o,id:c,type:"radio",name:i.name,value:t,checked:l,disabled:d,onChange:m=>{m.target.checked&&i.onChange?.(t);},className:"peer sr-only",...s}),jsx("div",{className:n("h-5 w-5 rounded-full border border-gray-300 dark:border-white/20 bg-gray-50 dark:bg-white/[0.03] transition-all duration-200","peer-focus-visible:ring-2 peer-focus-visible:ring-gray-400 dark:peer-focus-visible:ring-white/20 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-white dark:peer-focus-visible:ring-offset-[#0A0A0A]","group-hover:bg-gray-100 dark:group-hover:bg-white/[0.05]",l&&"border-gray-900 bg-gray-900 dark:border-white dark:bg-white"),children:l&&jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:jsx("div",{className:"h-2 w-2 rounded-full bg-white dark:bg-black"})})})]}),r&&jsx("span",{className:"text-sm text-gray-900 dark:text-white/90 select-none font-medium",children:r})]})});$s.displayName="RadioGroupItem";var $t=ue__default.createContext({}),Fs=ue__default.forwardRef(({className:e,...t},r)=>{let a=ue__default.useId();return jsx($t.Provider,{value:{id:a},children:jsx("div",{ref:r,className:n("space-y-2",e),...t})})});Fs.displayName="FormItem";var Ks=ue__default.forwardRef(({className:e,...t},r)=>{let{id:a}=ue__default.useContext($t);return jsx(Y,{ref:r,className:n("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),htmlFor:a,...t})});Ks.displayName="FormLabel";var Ws=ue__default.forwardRef(({...e},t)=>{let{id:r}=ue__default.useContext($t),{children:a,...s}=e;return ue__default.isValidElement(a)?ue__default.cloneElement(a,{id:r,"aria-describedby":`${r}-description ${r}-message`,...s,...a.props}):jsx("div",{ref:t,...e})});Ws.displayName="FormControl";var _s=ue__default.forwardRef(({className:e,...t},r)=>{let{id:a}=ue__default.useContext($t);return jsx("p",{ref:r,id:`${a}-description`,className:n("text-xs text-white/50",e),...t})});_s.displayName="FormDescription";var Us=ue__default.forwardRef(({className:e,children:t,...r},a)=>{let{id:s}=ue__default.useContext($t);return t?jsx("p",{ref:a,id:`${s}-message`,className:n("text-xs font-medium text-rose-500",e),...r,children:t}):null});Us.displayName="FormMessage";var ro={loading:jsx("svg",{className:"animate-spin text-blue-500",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),success:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-400",children:[jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-rose-400",children:[jsx("circle",{cx:"12",cy:"12",r:"10"}),jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),warning:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-400",children:[jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-400",children:[jsx("circle",{cx:"12",cy:"12",r:"10"}),jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},ao=({id:e,title:t,description:r,variant:a="default",duration:s=5e3,onDismiss:o})=>(useEffect(()=>{if(s===1/0)return;let i=setTimeout(()=>{o(e);},s);return ()=>clearTimeout(i)},[s,e,o]),jsxs("div",{role:"alert",className:n("pointer-events-auto relative flex w-full max-w-sm items-start gap-4 overflow-hidden rounded-2xl border p-4 shadow-lg transition-all","animate-in slide-in-from-right-full fade-in duration-300","bg-white dark:bg-[#0A0A0A]/90 backdrop-blur-md border-gray-200 dark:border-white/10",a==="error"&&"border-rose-200 dark:border-rose-500/30 bg-rose-50 dark:bg-rose-500/10",a==="success"&&"border-emerald-200 dark:border-emerald-500/20 bg-emerald-50 dark:bg-emerald-950/10",a==="warning"&&"border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-950/10",a==="info"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10",a==="loading"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10"),children:[a!=="default"&&ro[a]&&jsx("div",{className:"shrink-0 pt-0.5",children:ro[a]}),jsxs("div",{className:"flex-1 gap-1",children:[t&&jsx("div",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t}),r&&jsx("div",{className:"text-sm text-gray-600 dark:text-white/80",children:r})]}),jsx("button",{onClick:()=>o(e),className:"shrink-0 rounded-md p-1 text-gray-400 dark:text-white/50 opacity-0 transition-opacity hover:text-gray-900 dark:hover:text-white group-hover:opacity-100 focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20",children:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}));var Or=createContext(void 0);function pf({children:e}){let[t,r]=useState([]),a=useCallback(l=>{r(d=>d.filter(c=>c.id!==l));},[]),s=useCallback(l=>{let d=Math.random().toString(36).substring(2,9);return r(c=>[...c,{...l,id:d,onDismiss:a}]),d},[a]),o=useCallback((l,d)=>{r(c=>c.map(m=>m.id===l?{...m,...d}:m));},[]),i=useCallback(async(l,d)=>{let c=typeof d.loading=="string"?{title:d.loading,variant:"loading"}:{variant:"loading",...d.loading},m=s({...c,duration:1/0});try{let p=await l,f=typeof d.success=="function"?d.success(p):typeof d.success=="string"?{title:d.success,variant:"success"}:d.success;return o(m,{...f,duration:5e3}),p}catch(p){let f=typeof d.error=="function"?d.error(p):typeof d.error=="string"?{title:d.error,variant:"error"}:d.error;throw o(m,{...f,duration:5e3}),p}},[s,o]);return jsxs(Or.Provider,{value:{toast:s,dismiss:a,promise:i},children:[e,jsx("div",{className:"fixed bottom-0 right-0 z-[100] flex max-h-screen w-full flex-col-reverse gap-2 p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",children:t.map(l=>jsx(ao,{...l},l.id))})]})}var Qs={success:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-400",children:[jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-rose-400",children:[jsx("circle",{cx:"12",cy:"12",r:"10"}),jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),warning:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-400",children:[jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-400",children:[jsx("circle",{cx:"12",cy:"12",r:"10"}),jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},Js=ue__default.forwardRef(({className:e,variant:t="default",icon:r,title:a,children:s,...o},i)=>{let l=r||(t!=="default"?Qs[t]:null);return jsxs("div",{ref:i,role:"alert",className:n("relative w-full rounded-2xl border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-gray-900 dark:[&>svg]:text-white","bg-white dark:bg-[#0A0A0A]/50 backdrop-blur-md border-gray-200 dark:border-white/10 text-gray-900 dark:text-white",t==="error"&&"border-rose-200 dark:border-rose-500/20 bg-rose-50 dark:bg-rose-950/10 text-rose-900 dark:text-rose-50 [&>svg]:text-rose-600 dark:[&>svg]:text-rose-400",t==="success"&&"border-emerald-200 dark:border-emerald-500/20 bg-emerald-50 dark:bg-emerald-950/10 text-emerald-900 dark:text-emerald-50 [&>svg]:text-emerald-600 dark:[&>svg]:text-emerald-400",t==="warning"&&"border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-950/10 text-amber-900 dark:text-amber-50 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",t==="info"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10 text-blue-900 dark:text-blue-50 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",e),...o,children:[l,jsxs("div",{className:"flex flex-col gap-1",children:[a&&jsx("h5",{className:"mb-1 font-medium leading-none tracking-tight",children:a}),s&&jsx("div",{className:"text-sm opacity-90 [&_p]:leading-relaxed",children:s})]})]})});Js.displayName="Alert";var ei=ue__default.forwardRef(({className:e,value:t=0,max:r=100,variant:a="default",size:s="md",isIndeterminate:o=false,hasStripe:i=false,indicatorClassName:l,...d},c)=>{let m=o?0:Math.min(Math.max((t||0)/r,0),1)*100,p={default:"bg-gray-900 dark:bg-white dark:shadow-[0_0_10px_rgba(255,255,255,0.5)]",success:"bg-emerald-500 shadow-sm dark:shadow-[0_0_10px_rgba(16,185,129,0.5)]",warning:"bg-amber-500 shadow-sm dark:shadow-[0_0_10px_rgba(245,158,11,0.5)]",danger:"bg-rose-500 shadow-sm dark:shadow-[0_0_10px_rgba(244,63,94,0.5)]",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 shadow-sm dark:shadow-[0_0_15px_rgba(99,102,241,0.5)]"};return jsx("div",{ref:c,role:"progressbar","aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":o?void 0:t,className:n("relative w-full overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.03] border border-gray-200 dark:border-white/5 backdrop-blur-sm",{sm:"h-1",md:"h-2",lg:"h-4"}[s],e),...d,children:jsx("div",{className:n("h-full w-full flex-1 transition-all duration-500 ease-in-out relative overflow-hidden",p[a],o&&"absolute inset-0 w-full origin-left animate-indeterminate-progress",l),style:{transform:o?void 0:`translateX(-${100-m}%)`},children:i&&!o&&jsx("div",{className:"absolute inset-0 w-full h-full animate-progress-stripe",style:{backgroundImage:"linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)",backgroundSize:"1rem 1rem"}})})})});ei.displayName="Progress";var oi={sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-14 w-14 text-base",xl:"h-20 w-20 text-xl"},fe=ue__default.forwardRef(({className:e,src:t,alt:r,fallback:a,size:s="md",...o},i)=>{let[l,d]=useState(false);return useEffect(()=>{d(false);},[t]),jsx("div",{ref:i,className:n("relative flex shrink-0 overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.06]",oi[s],e),...o,children:t&&!l?jsx("img",{src:t,alt:r,className:"aspect-square h-full w-full object-cover",onError:()=>d(true)}):jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-100 dark:bg-white/5 text-gray-600 dark:text-white/70 font-medium",children:a||(r?r.charAt(0).toUpperCase():"?")})})});fe.displayName="Avatar";var Fr=createContext(void 0);function Hf({type:e="single",defaultValue:t,value:r,onValueChange:a,className:s,children:o,...i}){let[l,d]=useState(t||(e==="multiple"?[]:"")),c=r!==void 0?r:l,m=p=>{let f;if(e==="multiple"){let g=Array.isArray(c)?c:[];g.includes(p)?f=g.filter(h=>h!==p):f=[...g,p];}else f=c===p?"":p;r===void 0&&d(f),a?.(f);};return jsx(Fr.Provider,{value:{value:c,onValueChange:m,type:e},children:jsx("div",{className:n("space-y-2",s),...i,children:o})})}var Kr=createContext({value:"",isOpen:false});function If({className:e,value:t,children:r,...a}){let s=useContext(Fr),o=Array.isArray(s?.value)?s?.value.includes(t):s?.value===t;return jsx(Kr.Provider,{value:{value:t,isOpen:!!o},children:jsx("div",{className:n("overflow-hidden rounded-2xl border border-gray-200 dark:border-white/5 bg-gray-50 dark:bg-white/[0.03] transition-all duration-200",o&&"bg-white dark:bg-white/[0.04] border-gray-300 dark:border-white/10",e),...a,children:r})})}function Sf({className:e,children:t,...r}){let a=useContext(Fr),{value:s,isOpen:o}=useContext(Kr);return jsxs("button",{type:"button",onClick:()=>a?.onValueChange(s),"aria-expanded":o,"aria-controls":`accordion-content-${s}`,id:`accordion-trigger-${s}`,className:n("flex w-full items-center justify-between px-4 py-3 text-sm font-medium text-gray-900 dark:text-white transition-all hover:text-gray-700 dark:hover:text-white/90 focus:outline-none",e),...r,children:[t,jsx(ChevronDown,{className:n("h-4 w-4 shrink-0 text-gray-400 dark:text-white/50 transition-transform duration-200",o&&"rotate-180 text-gray-900 dark:text-white")})]})}function Af({className:e,children:t,...r}){let{isOpen:a,value:s}=useContext(Kr);return a?jsx("div",{id:`accordion-content-${s}`,role:"region","aria-labelledby":`accordion-trigger-${s}`,className:n("px-4 pb-3 pt-0 text-sm text-gray-600 dark:text-white/70 animate-in slide-in-from-top-1 fade-in duration-200",e),...r,children:t}):null}var Wr=createContext(void 0);function Ff({defaultValue:e,value:t,onValueChange:r,className:a,children:s,...o}){let[i,l]=useState(e),d=m=>{t===void 0&&l(m),r?.(m);},c=t!==void 0?t:i;return jsx(Wr.Provider,{value:{value:c,onValueChange:d},children:jsx("div",{className:n("w-full",a),...o,children:s})})}function Kf({className:e,children:t,...r}){return jsx("div",{role:"tablist",className:n("inline-flex h-10 items-center justify-center rounded-2xl bg-gray-100 p-1 text-gray-500 dark:bg-white/[0.03] dark:text-white/60",e),...r,children:t})}function Wf({className:e,value:t,children:r,...a}){let s=useContext(Wr);if(!s)throw new Error("TabsTrigger must be used within Tabs");let o=s.value===t;return jsx("button",{type:"button",role:"tab","aria-selected":o,"aria-controls":`tabs-content-${t}`,id:`tabs-trigger-${t}`,onClick:()=>s.onValueChange(t),className:n("inline-flex items-center justify-center whitespace-nowrap rounded-2xl px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-white/20",o?"bg-white text-gray-900 shadow-sm dark:bg-white/[0.06] dark:text-white dark:backdrop-blur-sm":"hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-white/[0.03] dark:hover:text-white",e),...a,children:r})}function _f({className:e,value:t,children:r,...a}){let s=useContext(Wr);if(!s)throw new Error("TabsContent must be used within Tabs");return s.value!==t?null:jsx("div",{role:"tabpanel",id:`tabs-content-${t}`,"aria-labelledby":`tabs-trigger-${t}`,tabIndex:0,className:n("mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20 focus-visible:ring-offset-2",e),...a,children:r})}var Gf=ue__default.forwardRef(({className:e,children:t,...r},a)=>jsx("aside",{ref:a,className:n("flex h-full w-64 flex-col border-r backdrop-blur-xl transition-colors duration-200","border-gray-200 bg-white/50","dark:border-white/10 dark:bg-black/20",e),...r,children:t})),qf=ue__default.forwardRef(({className:e,children:t,...r},a)=>jsx("div",{ref:a,className:n("flex h-16 items-center px-6 border-b border-gray-200 dark:border-white/5",e),...r,children:t})),Qf=ue__default.forwardRef(({className:e,children:t,...r},a)=>jsx("div",{ref:a,className:n("flex-1 overflow-y-auto py-4 px-3 space-y-1",e),...r,children:t})),Jf=ue__default.forwardRef(({className:e,children:t,...r},a)=>jsx("div",{ref:a,className:n("p-4 border-t border-gray-200 dark:border-white/5",e),...r,children:t})),Zf=ue__default.forwardRef(({className:e,children:t,active:r,icon:a,badge:s,...o},i)=>jsxs("button",{ref:i,className:n("flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium transition-colors","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.03] dark:hover:text-white",r?"bg-gray-200 text-gray-900 dark:bg-white/[0.06] dark:text-white":"text-gray-600 dark:text-white/60",e),...o,children:[a&&jsx("span",{className:n("flex h-4 w-4 items-center justify-center",r?"text-gray-900 dark:text-white":"text-gray-500 dark:text-white/60"),children:a}),jsx("span",{className:"flex-1 text-left",children:t}),s&&jsx("span",{className:"flex h-5 min-w-5 items-center justify-center rounded-full bg-gray-200 dark:bg-white/[0.06] px-1.5 text-[10px] font-bold text-gray-900 dark:text-white",children:s})]})),eg=ue__default.forwardRef(({className:e,children:t,label:r,...a},s)=>jsxs("div",{ref:s,className:n("mb-6",e),...a,children:[r&&jsx("div",{className:"mb-2 px-3 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-white/40",children:r}),jsx("div",{className:"space-y-1",children:t})]}));var ui=cva("rounded-2xl backdrop-blur-xl transition-all duration-300 bg-white/70 border border-zinc-200 shadow-sm text-zinc-900 dark:bg-white/[0.03] dark:border-white/10 dark:shadow-[0_18px_55px_rgba(0,0,0,.45)] dark:text-white",{variants:{variant:{default:"",ghost:"bg-transparent border-transparent shadow-none"}},defaultVariants:{variant:"default"}}),Z=ue__default.forwardRef(({className:e,variant:t,asChild:r=false,...a},s)=>jsx(r?rt:"div",{ref:s,className:n(ui({variant:t,className:e})),...a}));Z.displayName="Surface";var hi={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"};function fg({logo:e,links:t=[],actions:r,className:a,maxWidth:s="xl"}){let[o,i]=useState(false),[l,d]=useState(false);return useEffect(()=>{let c=()=>{i(window.scrollY>20);};return window.addEventListener("scroll",c),()=>window.removeEventListener("scroll",c)},[]),jsx("nav",{className:n("fixed top-0 left-0 right-0 z-50 transition-all duration-300 px-4 py-4",o?"py-3":"py-6",a),children:jsxs("div",{className:n("mx-auto transition-all duration-300",hi[s]),children:[jsxs(Z,{className:n("flex items-center justify-between px-6 py-3 transition-all duration-300",o?"rounded-2xl border-white/10 bg-white/70 dark:bg-zinc-900/70 backdrop-blur-xl shadow-lg":"rounded-2xl border-transparent bg-transparent dark:bg-transparent backdrop-blur-none shadow-none"),children:[jsx("div",{className:"flex items-center gap-2",children:e||jsx("span",{className:"text-xl font-bold tracking-tighter",children:"PIXON"})}),jsx("div",{className:"hidden md:flex items-center gap-8",children:t.map(c=>jsx("a",{href:c.href,className:"text-sm font-medium text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors",children:c.label},c.label))}),jsxs("div",{className:"flex items-center gap-4",children:[jsx("div",{className:"hidden md:flex items-center gap-2",children:r}),jsx("button",{className:"md:hidden p-2 text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-white/[0.03] rounded-2xl transition-colors",onClick:()=>d(!l),children:l?jsx(X,{size:20}):jsx(Menu,{size:20})})]})]}),jsx("div",{className:n("md:hidden absolute top-full left-4 right-4 mt-2 transition-all duration-300 origin-top",l?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 -translate-y-4 pointer-events-none"),children:jsxs(Z,{className:"p-4 flex flex-col gap-4 shadow-2xl border-white/10 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-2xl",children:[t.map(c=>jsx("a",{href:c.href,className:"text-base font-medium px-4 py-2 rounded-2xl hover:bg-zinc-100 dark:hover:bg-white/[0.03] text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-all",onClick:()=>d(false),children:c.label},c.label)),jsx("div",{className:"pt-4 border-t border-zinc-200 dark:border-white/10 flex flex-col gap-2",children:r})]})})]})})}var ur=createContext(void 0);function wt({children:e}){let[t,r]=useState(false),a=useRef(null);return jsx(ur.Provider,{value:{isOpen:t,setIsOpen:r,triggerRef:a},children:jsx("div",{className:"relative inline-block text-left",children:e})})}function yt({className:e,children:t,...r}){let a=useContext(ur);if(!a)throw new Error("DropdownMenuTrigger must be used within DropdownMenu");let s=o=>{a.setIsOpen(!a.isOpen),r.onClick?.(o);};return jsx("button",{ref:a.triggerRef,type:"button","aria-haspopup":"menu","aria-expanded":a.isOpen?"true":"false",onClick:s,className:n("inline-flex items-center justify-center",e),...r,children:t})}function kt({className:e,children:t,align:r="start",side:a="bottom",...s}){let o=useContext(ur);if(!o)throw new Error("DropdownMenuContent must be used within DropdownMenu");let i=useRef(null),{position:l,isPositioned:d}=gt(o.triggerRef,i,{side:a,align:r,isOpen:o.isOpen});if(useEffect(()=>{if(o.isOpen){let m=f=>{i.current&&!i.current.contains(f.target)&&o.triggerRef.current&&!o.triggerRef.current.contains(f.target)&&o.setIsOpen(false);},p=f=>{if(f.key==="Escape"&&(o.setIsOpen(false),o.triggerRef.current?.focus()),f.key==="ArrowDown"||f.key==="ArrowUp"){f.preventDefault();let g=i.current?.querySelectorAll('[role="menuitem"]');if(!g.length)return;let h=Array.from(g).indexOf(document.activeElement),v=0;f.key==="ArrowDown"?v=(h+1)%g.length:v=(h-1+g.length)%g.length,g[v]?.focus();}};return document.addEventListener("mousedown",m),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",p);}}},[o.isOpen,o.setIsOpen,o.triggerRef]),!o.isOpen)return null;let c=()=>a==="bottom"?r==="start"?"top left":r==="end"?"top right":"top center":a==="top"?r==="start"?"bottom left":r==="end"?"bottom right":"bottom center":a==="left"?r==="start"?"top right":r==="end"?"bottom right":"center right":a==="right"?r==="start"?"top left":r==="end"?"bottom left":"center left":"center center";return createPortal(jsx("div",{ref:i,role:"menu","aria-orientation":"vertical",style:{top:l.top,left:l.left,transformOrigin:c()},className:n("fixed z-50 min-w-[8rem] overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white/80 dark:bg-white/[0.03] backdrop-blur-xl p-1 shadow-md duration-100",d?"animate-in fade-in zoom-in-95 opacity-100":"opacity-0",e),...s,children:t}),document.body)}function ee({className:e,children:t,...r}){let a=useContext(ur);return jsx("button",{type:"button",role:"menuitem",onClick:o=>{a?.setIsOpen(false),r.onClick?.(o);},className:n("relative flex w-full cursor-pointer select-none items-center rounded-2xl px-3 py-2 text-sm outline-none transition-colors","text-gray-700 dark:text-white/80","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.06] dark:hover:text-white","focus:bg-gray-100 focus:text-gray-900 dark:focus:bg-white/[0.06] dark:focus:text-white","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:t})}function mo({className:e,children:t,...r}){return jsx("div",{className:n("px-2 py-1.5 text-sm font-semibold text-gray-900 dark:text-white",e),...r,children:t})}function Ur({className:e,...t}){return jsx("div",{className:n("-mx-1 my-1 h-px bg-gray-200 dark:bg-white/[0.03]",e),...t})}function Pg({name:e,description:t,avatarSrc:r,avatarFallback:a,className:s,side:o="top",align:i="start"}){return jsxs(wt,{children:[jsx(yt,{className:n("w-full outline-none",s),children:jsxs("div",{className:"group flex w-full items-center gap-3 rounded-2xl border border-gray-200 dark:border-white/5 bg-white dark:bg-white/[0.03] p-3 transition-colors hover:bg-gray-50 dark:hover:bg-white/[0.06]",children:[jsx(fe,{src:r,fallback:a||e.charAt(0),size:"sm"}),jsxs("div",{className:"flex flex-1 flex-col items-start text-left",children:[jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:e}),t&&jsx("span",{className:"text-[10px] text-gray-500 dark:text-white/50",children:t})]}),jsx(Settings,{className:"h-4 w-4 text-gray-400 dark:text-white/50 transition-colors group-hover:text-gray-900 dark:group-hover:text-white"})]})}),jsxs(kt,{className:"w-56",align:i,side:o,children:[jsx(mo,{children:"My Account"}),jsx(Ur,{}),jsxs(ee,{children:[jsx(User,{className:"mr-2 h-4 w-4"}),jsx("span",{children:"Profile"})]}),jsxs(ee,{children:[jsx(Settings,{className:"mr-2 h-4 w-4"}),jsx("span",{children:"Settings"})]}),jsx(Ur,{}),jsxs(ee,{className:"text-rose-400 focus:text-rose-400",children:[jsx(LogOut,{className:"mr-2 h-4 w-4"}),jsx("span",{children:"Log out"})]})]})]})}var Ti=ue__default.forwardRef(({...e},t)=>jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));Ti.displayName="Breadcrumb";var Mi=ue__default.forwardRef(({className:e,...t},r)=>jsx("ol",{ref:r,className:n("flex flex-wrap items-center gap-1.5 break-words text-sm text-gray-500 dark:text-white/50 sm:gap-2.5",e),...t}));Mi.displayName="BreadcrumbList";var Ri=ue__default.forwardRef(({className:e,...t},r)=>jsx("li",{ref:r,className:n("inline-flex items-center gap-1.5",e),...t}));Ri.displayName="BreadcrumbItem";var Ci=ue__default.forwardRef(({className:e,...t},r)=>jsx("a",{ref:r,className:n("transition-colors hover:text-gray-900 dark:hover:text-white",e),...t}));Ci.displayName="BreadcrumbLink";var Li=ue__default.forwardRef(({className:e,...t},r)=>jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:n("font-normal text-gray-900 dark:text-white",e),...t}));Li.displayName="BreadcrumbPage";var Pi=({children:e,className:t,...r})=>jsx("li",{role:"presentation","aria-hidden":"true",className:n("[&>svg]:size-3.5",t),...r,children:e??jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsx("path",{d:"m9 18 6-6-6-6"})})});Pi.displayName="BreadcrumbSeparator";var Ei=({className:e,...t})=>jsxs("span",{role:"presentation","aria-hidden":"true",className:n("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:[jsx("circle",{cx:"12",cy:"12",r:"1"}),jsx("circle",{cx:"19",cy:"12",r:"1"}),jsx("circle",{cx:"5",cy:"12",r:"1"})]}),jsx("span",{className:"sr-only",children:"More"})]});Ei.displayName="BreadcrumbElipssis";var Di=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:n("mx-auto flex w-full justify-center",e),...t});Di.displayName="Pagination";var Hi=ue__default.forwardRef(({className:e,...t},r)=>jsx("ul",{ref:r,className:n("flex flex-row items-center gap-1",e),...t}));Hi.displayName="PaginationContent";var Ii=ue__default.forwardRef(({className:e,...t},r)=>jsx("li",{ref:r,className:n("",e),...t}));Ii.displayName="PaginationItem";var Yr=({className:e,isActive:t,...r})=>jsx("a",{"aria-current":t?"page":void 0,className:n("inline-flex h-9 w-9 items-center justify-center rounded-2xl text-sm font-medium transition-colors","hover:bg-gray-100 dark:hover:bg-white/[0.03] hover:text-gray-900 dark:hover:text-white",t?"bg-gray-100 text-gray-900 dark:bg-white/[0.06] dark:text-white":"text-gray-500 dark:text-white/60",e),...r});Yr.displayName="PaginationLink";var Si=({className:e,...t})=>jsxs(Yr,{"aria-label":"Go to previous page",className:n("w-auto gap-1 px-2.5",e),...t,children:[jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsx("path",{d:"m15 18-6-6 6-6"})}),jsx("span",{children:"Previous"})]});Si.displayName="PaginationPrevious";var Ai=({className:e,...t})=>jsxs(Yr,{"aria-label":"Go to next page",className:n("w-auto gap-1 px-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsx("path",{d:"m9 18 6-6-6-6"})})]});Ai.displayName="PaginationNext";var Bi=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:n("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:[jsx("circle",{cx:"12",cy:"12",r:"1"}),jsx("circle",{cx:"19",cy:"12",r:"1"}),jsx("circle",{cx:"5",cy:"12",r:"1"})]}),jsx("span",{className:"sr-only",children:"More pages"})]});Bi.displayName="PaginationEllipsis";function bo({isOpen:e,onClose:t,children:r,className:a}){let s=useRef(null);return useEffect(()=>{let i=s.current;i&&(e?i.open||(i.showModal(),document.body.style.overflow="hidden"):i.open&&(i.close(),document.body.style.overflow="unset"));},[e]),useEffect(()=>{let i=s.current;if(!i)return;let l=d=>{d.preventDefault(),t();};return i.addEventListener("cancel",l),()=>i.removeEventListener("cancel",l)},[t]),createPortal(jsx("dialog",{ref:s,onClick:i=>{i.target===s.current&&t();},className:n("fixed inset-0 z-50 bg-transparent p-0 backdrop:bg-black/60 backdrop:backdrop-blur-sm open:flex open:items-center open:justify-center","animate-in fade-in duration-200",a),children:jsxs("div",{className:n("relative w-full max-w-lg scale-100 gap-4 border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 p-6 shadow-2xl backdrop-blur-xl transition-all sm:rounded-2xl","animate-in fade-in zoom-in-95 duration-200 slide-in-from-bottom-2"),children:[r,jsxs("button",{onClick:t,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-gray-400 dark:focus:ring-white/20 disabled:pointer-events-none",children:[jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:[jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),jsx("span",{className:"sr-only",children:"Close"})]})]})}),document.body)}function ho({className:e,children:t}){return jsx("div",{className:n("flex flex-col space-y-1.5 text-center sm:text-left mb-4",e),children:t})}function xo({className:e,children:t}){return jsx("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),children:t})}function vo({className:e,children:t}){return jsx(Ke,{as:"h2",className:n("text-lg font-semibold leading-none tracking-tight",e),children:t})}function Yg({className:e,children:t}){return jsx(U,{variant:"muted",className:n("text-sm",e),children:t})}function eb({isOpen:e,onClose:t,children:r,className:a}){let s=useRef(null);return useEffect(()=>{let i=s.current;i&&(e?i.open||i.showModal():i.open&&i.close());},[e]),useEffect(()=>{let i=s.current;if(!i)return;let l=d=>{d.preventDefault(),t();};return i.addEventListener("cancel",l),()=>i.removeEventListener("cancel",l)},[t]),createPortal(jsx("dialog",{ref:s,onClick:i=>{i.target===s.current&&t();},className:n("fixed inset-0 z-50 bg-transparent p-0 backdrop:bg-black/60 backdrop:backdrop-blur-sm","open:animate-in open:fade-in open:duration-200",a),children:jsxs("div",{className:n("relative w-full max-w-lg scale-100 gap-4 border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 p-6 shadow-2xl backdrop-blur-xl transition-all sm:rounded-2xl","animate-in fade-in zoom-in-95 duration-200 slide-in-from-bottom-2"),children:[r,jsxs("button",{onClick:t,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-gray-400 dark:focus:ring-white/20 disabled:pointer-events-none",children:[jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:[jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),jsx("span",{className:"sr-only",children:"Close"})]})]})}),document.body)}function tb({className:e,children:t}){return jsx("div",{className:n("flex flex-col space-y-1.5 text-center sm:text-left mb-4",e),children:t})}function rb({className:e,children:t}){return jsx("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),children:t})}function ab({className:e,children:t}){return jsx(Ke,{as:"h2",className:n("text-lg font-semibold leading-none tracking-tight",e),children:t})}function ob({className:e,children:t}){return jsx("p",{className:n("text-sm text-gray-500 dark:text-gray-400",e),children:t})}function pb({isOpen:e,onClose:t,position:r="right",children:a,className:s}){let[o,i]=useState(false),[l,d]=useState(false),c=useRef(null);useEffect(()=>{if(e)d(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{i(true);});}),document.body.style.overflow="hidden";else {i(false);let g=setTimeout(()=>{d(false),document.body.style.overflow="unset";},300);return ()=>clearTimeout(g)}},[e]),useEffect(()=>{let g=h=>{h.key==="Escape"&&t();};return e&&document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g);}},[e,t]);let m=g=>{g.target===c.current&&t();};if(!l)return null;let p={left:"left-0 h-full w-3/4 max-w-sm border-r",right:"right-0 h-full w-3/4 max-w-sm border-l",bottom:"bottom-0 w-full h-auto max-h-[90vh] border-t rounded-t-2xl"},f={left:o?"translate-x-0":"-translate-x-full",right:o?"translate-x-0":"translate-x-full",bottom:o?"translate-y-0":"translate-y-full"};return createPortal(jsx("div",{ref:c,onClick:m,className:n("fixed inset-0 z-50 flex bg-black/60 backdrop-blur-sm transition-opacity duration-300",o?"opacity-100":"opacity-0"),role:"dialog","aria-modal":"true",children:jsx("div",{className:n("absolute bg-white dark:bg-[#0A0A0A] border-gray-200 dark:border-white/10 p-6 shadow-2xl transition-transform duration-300 ease-in-out",p[r],f[r],s),children:a})}),document.body)}function fb({className:e,children:t,...r}){return jsx("div",{className:n("flex flex-col space-y-1.5 text-center sm:text-left mb-6",e),...r,children:t})}function gb({className:e,children:t,...r}){return jsx("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-auto pt-6",e),...r,children:t})}function bb({className:e,children:t,...r}){return jsx(Ke,{as:"h2",className:n("text-lg font-semibold leading-none tracking-tight",e),...r,children:t})}function hb({className:e,children:t,...r}){return jsx(U,{variant:"muted",className:n("text-sm",e),...r,children:t})}function Mb({content:e,children:t,position:r="top",delay:a=200,className:s}){let[o,i]=useState(false),l=useRef(null),d=useRef(null),c=useRef(null),{position:m,isPositioned:p}=gt(d,c,{side:r,align:"center",sideOffset:8,isOpen:o}),f=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>i(true),a);},g=()=>{l.current&&clearTimeout(l.current),i(false);};useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let h={top:"slide-in-from-bottom-2",bottom:"slide-in-from-top-2",left:"slide-in-from-right-2",right:"slide-in-from-left-2"};return jsxs("div",{ref:d,className:"relative inline-flex",onMouseEnter:f,onMouseLeave:g,onFocus:f,onBlur:g,children:[t,o&&createPortal(jsx("div",{ref:c,role:"tooltip",style:{top:m.top,left:m.left},className:n("fixed z-[100] min-w-max max-w-xs rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 px-3 py-1.5 text-xs text-gray-900 dark:text-white shadow-xl backdrop-blur-md","duration-200",p?"animate-in fade-in opacity-100":"opacity-0",h[r],s),children:e}),document.body)]})}function No({children:e,...t}){return jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-2xl bg-white dark:bg-black/90 text-gray-900 dark:text-white",children:jsx(Ir,{usePopover:false,...t,children:e})})}function Ab({children:e,open:t,onOpenChange:r,...a}){let s=useRef(null);useEffect(()=>{let i=l=>{l.key==="Escape"&&r(false);};return t&&(document.addEventListener("keydown",i),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",i),document.body.style.overflow="unset";}},[t,r]);let o=i=>{i.target===s.current&&r(false);};return t?createPortal(jsx("div",{ref:s,onClick:o,className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 backdrop-blur-sm animate-in fade-in duration-200 pt-[20vh]",children:jsx("div",{className:"relative w-full max-w-lg overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/90 shadow-2xl animate-in zoom-in-95 duration-200",children:jsx(Ir,{usePopover:false,...a,children:e})})}),document.body):null}function To({className:e,...t}){return jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-white/10 px-3","cmdk-input-wrapper":"",children:[jsx(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsx(ja,{className:n("flex h-12 w-full rounded-md bg-transparent py-3 text-sm text-gray-900 dark:text-white outline-none placeholder:text-gray-400 dark:placeholder:text-white/50 disabled:cursor-not-allowed disabled:opacity-50 border-none focus:ring-0 px-0",e),...t})]})}function Mo({className:e,...t}){return jsx(Xa,{className:n("max-h-[300px] overflow-y-auto overflow-x-hidden p-2",e),...t})}function Bb(e){return jsx(Ga,{className:"py-6 text-center text-sm",...e})}function Ro({children:e,heading:t,className:r,...a}){return jsxs("div",{className:n("overflow-hidden p-1 text-gray-900 dark:text-white",r),...a,children:[t&&jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-gray-500 dark:text-white/50",children:t}),e]})}function Co({className:e,...t}){return jsx(qa,{className:n("relative flex cursor-default select-none items-center rounded-2xl px-2 py-1.5 text-sm outline-none text-gray-900 dark:text-white aria-selected:bg-gray-100 dark:aria-selected:bg-white/[0.06] aria-selected:text-gray-900 dark:aria-selected:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t})}function Vb({className:e,...t}){return jsx("span",{className:n("ml-auto text-xs tracking-widest text-gray-400 dark:text-white/50",e),...t})}function Kb(){let e=useContext(Or);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function Ub(e=0){let[t,r]=useState(e),[a,s]=useState(false),o=useRef(null),i=useCallback(()=>{a||(s(true),o.current=setInterval(()=>{r(m=>m+1);},1e3));},[a]),l=useCallback(()=>{a&&o.current&&(clearInterval(o.current),s(false));},[a]),d=useCallback(()=>{o.current&&clearInterval(o.current),s(false),r(0);},[]);return useEffect(()=>()=>{o.current&&clearInterval(o.current);},[]),{seconds:t,isActive:a,start:i,pause:l,reset:d,formattedTime:(m=>{let p=Math.floor(m/3600),f=Math.floor(m%3600/60),g=m%60;return [p,f,g].map(h=>h<10?"0"+h:h).filter((h,v)=>h!=="00"||v>0).join(":")})(t)}}function Gb(e,{threshold:t=0,root:r=null,rootMargin:a="0%",freezeOnceVisible:s=false}={}){let[o,i]=useState(),l=o?.isIntersecting&&s,d=([c])=>{i(c);};return useEffect(()=>{let c=e?.current;if(!!!window.IntersectionObserver||l||!c)return;let p={threshold:t,root:r,rootMargin:a},f=new IntersectionObserver(d,p);return f.observe(c),()=>f.disconnect()},[e,t,r,a,l]),o}function Jb({initialValues:e,onSubmit:t}){let[r,a]=useState(e),[s,o]=useState({}),[i,l]=useState(false),d=useCallback(p=>{let{name:f,value:g,type:h}=p.target,v=h==="checkbox"?p.target.checked:g;a(b=>({...b,[f]:v})),s[f]&&o(b=>({...b,[f]:""}));},[s]),c=useCallback(async p=>{p.preventDefault();let f=p.currentTarget;if(!f.checkValidity()){let g={};Array.from(f.elements).forEach(h=>{let v=h;v.name&&!v.validity.valid&&(g[v.name]=v.validationMessage);}),o(g);return}l(true);try{await t(r);}finally{l(false);}},[r,t]),m=useCallback(p=>({name:p,value:r[p],onChange:d,error:s[p]}),[r,s,d]);return {values:r,errors:s,isSubmitting:i,handleChange:d,handleSubmit:c,register:m,setValues:a,setErrors:o}}var nl={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function sl(e){let[t,r]=useState(false);return useEffect(()=>{let a=window.matchMedia(e);r(a.matches);let s=()=>r(a.matches);return a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[e]),t}function th(e){return sl(`(min-width: ${nl[e]}px)`)}function rh(e){let[t,r]=useState({width:0,height:0});return useLayoutEffect(()=>{if(!e.current)return;let a=new ResizeObserver(s=>{for(let o of s)r({width:o.contentRect.width,height:o.contentRect.height});});return a.observe(e.current),()=>a.disconnect()},[e]),t}function Do(){let[e,t]=useState({scrollX:0,scrollY:0,scrollProgressX:0,scrollProgressY:0}),r=useCallback(()=>{let a=window.scrollX,s=window.scrollY,o=document.documentElement.scrollWidth-document.documentElement.clientWidth,i=document.documentElement.scrollHeight-document.documentElement.clientHeight;t({scrollX:a,scrollY:s,scrollProgressX:o>0?a/o:0,scrollProgressY:i>0?s/i:0});},[]);return useEffect(()=>(window.addEventListener("scroll",r,{passive:true}),()=>window.removeEventListener("scroll",r)),[r]),e}function lh({className:e,color:t="bg-blue-500",height:r=2,position:a="top",...s}){let{scrollProgressY:o}=Do();return jsx("div",{className:n("fixed left-0 right-0 z-[100] w-full pointer-events-none",a==="top"?"top-0":"bottom-0",e),style:{height:r},...s,children:jsx("div",{className:n("h-full transition-all duration-75 ease-out",t),style:{width:`${o*100}%`,boxShadow:o>0?`0 0 10px ${t.replace("bg-","var(--")}`:"none"}})})}var ul=cva("inline-flex items-center gap-1 rounded-full border px-2.5 py-1 text-xs font-medium whitespace-nowrap transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-white/[0.06] dark:text-white/70 dark:border-white/10",neutral:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-white/[0.06] dark:text-white/70 dark:border-white/10",success:"bg-emerald-100 text-emerald-700 border-emerald-200 dark:bg-emerald-400/15 dark:text-emerald-200 dark:border-emerald-400/20",warning:"bg-amber-100 text-amber-700 border-amber-200 dark:bg-amber-400/15 dark:text-amber-200 dark:border-amber-400/20",danger:"bg-rose-100 text-rose-700 border-rose-200 dark:bg-rose-400/15 dark:text-rose-200 dark:border-rose-400/20",info:"bg-sky-100 text-sky-700 border-sky-200 dark:bg-sky-400/15 dark:text-sky-200 dark:border-sky-400/20",outline:"bg-transparent text-white/60 border-white/10 hover:bg-white/[0.06]"}},defaultVariants:{variant:"default"}}),Oe=ue__default.forwardRef(({className:e,variant:t,...r},a)=>jsx("span",{ref:a,className:n(ul({variant:t}),e),...r}));Oe.displayName="Badge";var gl=ue__default.forwardRef(({orientation:e="horizontal",className:t,...r},a)=>jsx("hr",{ref:a,className:n("border-0 bg-gray-200 dark:bg-white/10",{"h-px w-full":e==="horizontal","h-full w-px":e==="vertical"},t),...r}));gl.displayName="Divider";var xl=ue__default.forwardRef(({children:e,className:t,...r},a)=>jsx("kbd",{ref:a,className:n("rounded-lg border border-gray-200 dark:border-white/10 bg-gray-100 dark:bg-white/[0.03] px-2 py-1 text-[11px] font-semibold text-gray-500 dark:text-white/65",t),...r,children:e}));xl.displayName="Kbd";var kl=ue__default.forwardRef(({icon:e,title:t,description:r,action:a,className:s,...o},i)=>jsx(Z,{ref:i,className:n("p-8 text-center",s),...o,children:jsxs("div",{className:"mx-auto w-full max-w-md space-y-3",children:[jsx("div",{className:"mx-auto grid h-12 w-12 place-items-center rounded-2xl border border-white/10 bg-white/[0.03] text-white/70",children:e??jsx(Info,{className:"h-5 w-5"})}),jsx("div",{className:"text-lg font-semibold text-white",children:t}),r?jsx("div",{className:"text-sm text-white/55",children:r}):null,a?jsx("div",{className:"pt-2 flex justify-center",children:a}):null]})}));kl.displayName="EmptyState";function Io({className:e,variant:t="default",...r}){return jsx("div",{className:n("animate-pulse bg-gray-200 dark:bg-white/[0.03]",t==="circle"&&"rounded-full",t==="default"&&"rounded-2xl",t==="text"&&"rounded h-4 w-full",e),...r})}ue__default.createContext(null);var Zr=ue__default.forwardRef(({className:e,wrapperClassName:t,rounded:r=false,maxHeight:a,...s},o)=>jsx(Te,{className:n("w-full",r&&"rounded-2xl border border-white/10",t),style:{maxHeight:a},orientation:a?"both":"horizontal",scrollbarSize:"sm",children:jsx("table",{ref:o,className:n("w-full caption-bottom text-sm text-left",e),...s})}));Zr.displayName="Table";var ea=ue__default.forwardRef(({className:e,...t},r)=>jsx("thead",{ref:r,className:n("bg-white/[0.02] text-white/55",e),...t}));ea.displayName="TableHeader";var ta=ue__default.forwardRef(({className:e,...t},r)=>jsx("tbody",{ref:r,className:n("[&_tr:last-child]:border-0",e),...t}));ta.displayName="TableBody";var Wt=ue__default.forwardRef(({className:e,hoverable:t=true,optimized:r=false,...a},s)=>jsx("tr",{ref:s,className:n("border-t border-white/10 transition-colors data-[state=selected]:bg-white/[0.04]",t&&"hover:bg-white/[0.02]",e),style:r?{contentVisibility:"auto",containIntrinsicSize:"0 56px"}:void 0,...a}));Wt.displayName="TableRow";var ra=ue__default.forwardRef(({className:e,...t},r)=>jsx("th",{ref:r,className:n("h-10 px-5 py-3 text-left align-middle font-semibold text-white/55 [&:has([role=checkbox])]:pr-0 whitespace-nowrap",e),...t}));ra.displayName="TableHead";var fr=ue__default.forwardRef(({className:e,...t},r)=>jsx("td",{ref:r,className:n("p-5 align-middle [&:has([role=checkbox])]:pr-0 text-white/85 whitespace-nowrap",e),...t}));fr.displayName="TableCell";function Uh({data:e,columns:t,searchPlaceholder:r="Search...",searchKeys:a,onRowClick:s,className:o,maxHeight:i,rounded:l=true}){let[d,c]=useState(""),[m,p]=useState({key:"",direction:null}),f=useMemo(()=>{let h=[...e];return d&&a&&(h=h.filter(v=>a.some(b=>String(v[b]??"").toLowerCase().includes(d.toLowerCase())))),m.key&&m.direction&&h.sort((v,b)=>{let u=v[m.key],x=b[m.key];return u==null||x===void 0||x===null?0:u<x?m.direction==="asc"?-1:1:u>x?m.direction==="asc"?1:-1:0}),h},[e,d,a,m]),g=h=>{p(v=>({key:h,direction:v.key===h&&v.direction==="asc"?"desc":"asc"}));};return jsxs("div",{className:n("space-y-4",o),children:[a&&jsx("div",{className:"relative max-w-sm",children:jsx(ft,{placeholder:r,value:d,onChange:h=>c(h.target.value),leftIcon:jsx(Search,{className:"w-4 h-4 text-white/40"})})}),jsxs(Zr,{rounded:l,maxHeight:i,children:[jsx(ea,{children:jsx(Wt,{children:t.map(h=>jsx(ra,{className:n(h.sortable&&"cursor-pointer select-none hover:text-cyan-500 transition-colors",h.className),onClick:()=>h.sortable&&g(h.key),children:jsxs("div",{className:"flex items-center gap-2",children:[h.header,h.sortable&&jsx("span",{className:"text-white/30",children:m.key===h.key?m.direction==="asc"?jsx(ArrowUp,{className:"w-3 h-3 text-cyan-500"}):jsx(ArrowDown,{className:"w-3 h-3 text-cyan-500"}):jsx(ArrowUpDown,{className:"w-3 h-3"})})]})},String(h.key)))})}),jsxs(ta,{children:[f.map((h,v)=>jsx(Wt,{onClick:()=>s?.(h),className:n(s&&"cursor-pointer hover:bg-white/[0.03] transition-colors group"),children:t.map(b=>jsx(fr,{className:b.className,children:b.render?b.render(h):h[b.key]},String(b.key)))},v)),f.length===0&&jsx(Wt,{children:jsxs(fr,{colSpan:t.length,className:"h-32 text-center text-white/40",children:['No results found for "',d,'"']})})]})]})]})}function Vo({tasks:e,columns:t,groupBy:r,pageSize:a}){let[s,o]=useState(null),[i,l]=useState({}),d=useMemo(()=>s?[...e].sort((p,f)=>{let{field:g,direction:h}=s,v=0;if(g==="title")v=p.title.localeCompare(f.title);else if(g==="priority"){let b={urgent:4,high:3,medium:2,low:1,neutral:0},u=b[p.priority]||0,x=b[f.priority]||0;v=u-x;}else g==="dueDate"&&(v=(p.dueDate||"").localeCompare(f.dueDate||""));return h==="asc"?v:-v}):e,[e,s]),c=useMemo(()=>{let p={};if(r)d.forEach(f=>{let g=String(f[r]||"Other");p[g]||(p[g]={});let h=p[g];h[f.columnId]||(h[f.columnId]=[]),h[f.columnId].push(f);});else {p.default={};let f=p.default;t.forEach(g=>{f[g.id]=d.filter(h=>h.columnId===g.id);});}return p},[d,t,r]),m=useCallback(p=>{l(f=>({...f,[p]:(f[p]||a)+a}));},[a]);return {tasksByGroupAndColumn:c,sortConfig:s,setSortConfig:o,visibleCounts:i,handleLoadMore:m,sortedTasks:d}}function zo({tasks:e,columns:t,selectedTaskIds:r,onTaskMove:a,onColumnMove:s,onTaskDrop:o,onTaskDragStart:i,onTaskDragEnd:l}){let[d,c]=useState(null),[m,p]=useState(null),[f,g]=useState(null),[h,v]=useState(null),[b,u]=useState(null),x=useRef(null),y=useRef(null),k=(D,E,V)=>{V==="task"?(c(E),D.dataTransfer.setData("taskId",E),i?.(E)):(p(E),D.dataTransfer.setData("columnId",E)),D.dataTransfer.effectAllowed="move";},w=useCallback(()=>{d&&l?.(d),c(null),p(null),g(null),v(null),u(null);},[d,l]);return {draggedTaskId:d,draggedColumnId:m,dragOverColumnId:f,dragOverTaskId:h,dropPosition:b,handleDragStart:k,handleDragEnd:w,handleDragOver:(D,E,V)=>{if(D.preventDefault(),D.dataTransfer.dropEffect="move",m){g(E);let S=D.currentTarget.getBoundingClientRect(),C=S.left+S.width/2;u(D.clientX<C?"left":"right");}else if(g(E),V){v(V);let S=D.currentTarget.getBoundingClientRect(),C=S.top+S.height/2;u(D.clientY<C?"top":"bottom");}else D.target===D.currentTarget&&(v(null),u(null));},handleDrop:(D,E,V)=>{D.preventDefault();let S=d||D.dataTransfer.getData("taskId"),C=m||D.dataTransfer.getData("columnId");if(C&&s)s(C,E,b==="right"?"right":"left");else if(S&&a){if(!e.find(Q=>Q.id===S))return;(r.includes(S)?r:[S]).forEach(Q=>{let Ae=e.find(De=>De.id===Q)?.columnId||"";a(Q,E,V,b==="bottom"?"bottom":"top"),o?.(Q,Ae,E,0);});}w();},handleTouchStart:(D,E,V)=>{let S=D.touches[0];S&&(x.current=setTimeout(()=>{V==="task"?(c(E),i?.(E)):p(E),y.current={x:S.clientX,y:S.clientY};},500));},handleTouchMove:D=>{if(!d&&!m)return;D.preventDefault();let E=D.touches[0];if(!E)return;let V=document.elementFromPoint(E.clientX,E.clientY);if(!V)return;let S=V.closest("[data-column-id]"),C=V.closest("[data-task-id]");if(S){let A=S.getAttribute("data-column-id");if(g(A),m){let me=S.getBoundingClientRect(),Q=me.left+me.width/2;u(E.clientX<Q?"left":"right");}else if(C){let me=C.getAttribute("data-task-id");v(me);let Q=C.getBoundingClientRect(),ve=Q.top+Q.height/2;u(E.clientY<ve?"top":"bottom");}}},handleTouchEnd:D=>{if(clearTimeout(x.current),d||m){if(f){let E=d,V=m;V&&s?s(V,f,b==="right"?"right":"left"):E&&a&&a(E,f,h||void 0,b==="bottom"?"bottom":"top");}w();}},setDraggedTaskId:c}}function $o(){let[e,t]=useState(false),[r,a]=useState(0),[s,o]=useState(0),i=useRef(null);return {boardRef:i,isDraggingBoard:e,handleBoardMouseDown:m=>{m.target.closest("button")||m.target.closest('[draggable="true"]')||m.target.closest(".no-drag")||(t(true),a(m.pageX-(i.current?.offsetLeft||0)),o(i.current?.scrollLeft||0));},handleBoardMouseMove:m=>{if(!e)return;m.preventDefault();let f=(m.pageX-(i.current?.offsetLeft||0)-r)*2;i.current&&(i.current.scrollLeft=s-f);},handleBoardMouseUp:()=>{t(false);}}}var oa=ue__default.memo(({task:e,columnId:t,selectedTaskIds:r,activeTimerTaskId:a,selectable:s,cardClassName:o,onTaskClick:i,onTaskSelectionChange:l,onTaskRemove:d,onTaskTimerToggle:c,renderCard:m})=>{if(m)return jsx(Fragment,{children:m(e)});let p=g=>{switch(g){case "urgent":return "danger";case "high":return "warning";case "medium":return "info";case "low":return "success";default:return "neutral"}},f=r.includes(e.id);return jsx(Z,{onClick:g=>i?.(g,e),className:n("p-6 border border-white/10 bg-white/[0.03] hover:bg-white/[0.06] transition-all duration-200 rounded-2xl group",e.blockedBy&&e.blockedBy.length>0&&"border-red-500/30 bg-red-500/[0.02]",f&&"ring-2 ring-cyan-500/50 bg-cyan-500/[0.02]",o),children:jsxs("div",{className:"flex flex-col gap-3",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s&&jsx(Cr,{checked:f,onChange:g=>{let v=g.target.checked?[...r,e.id]:r.filter(b=>b!==e.id);l?.(v);},onClick:g=>g.stopPropagation(),className:"mr-1"}),e.blockedBy&&e.blockedBy.length>0&&jsx(Lock,{className:"h-3.5 w-3.5 text-red-500 flex-shrink-0"}),jsx(U,{className:n("font-medium text-sm leading-tight group-hover:text-cyan-400 transition-colors truncate",e.blockedBy&&e.blockedBy.length>0&&"text-red-400/80"),children:e.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[d&&jsx("button",{onClick:g=>{g.stopPropagation(),d(e.id);},className:"p-1 rounded-md hover:bg-red-500/20 text-white/20 hover:text-red-400 transition-colors",children:jsx(Trash2,{className:"h-3.5 w-3.5"})}),jsx(GripVertical,{className:"h-4 w-4 text-white/20 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]})]}),e.description&&jsx(U,{className:"text-xs text-white/50 line-clamp-2",children:e.description}),e.progress!==void 0&&jsxs("div",{className:"space-y-1.5",children:[jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[jsx("span",{className:"text-white/30 uppercase font-bold tracking-wider",children:"Progress"}),jsxs("span",{className:"text-white/50",children:[e.progress,"%"]})]}),jsx("div",{className:"h-1 w-full bg-white/[0.03] rounded-full overflow-hidden",children:jsx("div",{className:"h-full bg-cyan-500 transition-all duration-500",style:{width:`${e.progress}%`}})})]}),jsxs("div",{className:"flex flex-wrap gap-2 mt-1",children:[e.priority&&jsx(Oe,{variant:p(e.priority),className:"text-[10px] px-1.5 py-0 uppercase font-bold",children:e.priority}),e.tags?.map(g=>jsx(Oe,{variant:"neutral",className:"text-[10px] px-1.5 py-0 bg-white/[0.03] border-white/5",children:g},g))]}),jsxs("div",{className:"flex items-center justify-between mt-2 pt-3 border-t border-white/5",children:[jsxs("div",{className:"flex items-center gap-3 text-[10px] text-white/30",children:[e.timeSpent!==void 0&&jsxs("div",{className:n("flex items-center gap-1 px-1.5 py-0.5 rounded-md transition-colors",a===e.id?"bg-cyan-500/20 text-cyan-400":"bg-white/[0.03]"),children:[a===e.id?jsx(Pause,{className:"h-2.5 w-2.5 cursor-pointer hover:scale-110 transition-transform",onClick:g=>{g.stopPropagation(),c?.(e.id);}}):jsx(Play,{className:"h-2.5 w-2.5 cursor-pointer hover:scale-110 transition-transform",onClick:g=>{g.stopPropagation(),c?.(e.id);}}),jsxs("span",{className:"font-mono",children:[Math.floor(e.timeSpent/3600),"h ",Math.floor(e.timeSpent%3600/60),"m"]})]}),e.comments!==void 0&&jsxs("div",{className:"flex items-center gap-1",children:[jsx(MessageSquare,{className:"h-3 w-3"}),e.comments]}),e.attachments!==void 0&&jsxs("div",{className:"flex items-center gap-1",children:[jsx(Paperclip,{className:"h-3 w-3"}),e.attachments]}),e.dueDate&&jsxs("div",{className:"flex items-center gap-1",children:[jsx(Clock,{className:"h-3 w-3"}),e.dueDate]})]}),e.assignee&&jsx("div",{className:"flex -space-x-2",children:jsx("div",{className:"h-6 w-6 rounded-full border-2 border-[#0a0a0a] bg-white/[0.06] flex items-center justify-center text-[10px] font-bold overflow-hidden",children:e.assignee.avatar?jsx("img",{src:e.assignee.avatar,alt:e.assignee.name,className:"h-full w-full object-cover"}):e.assignee.name[0]})})]})]})})});oa.displayName="KanbanCard";var Ko=({column:e,columnMap:t,groupName:r,visibleCount:a,pageSize:s,draggedTaskId:o,draggedColumnId:i,dragOverTaskId:l,dragOverColumnId:d,dropPosition:c,quickAddColumnId:m,quickAddValue:p,selectedTaskIds:f,activeTimerTaskId:g,handleDragStart:h,handleDragEnd:v,handleDragOver:b,handleDrop:u,handleTouchStart:x,handleTouchMove:y,handleTouchEnd:k,handleKeyDown:w,handleLoadMore:N,handleSetQuickAdd:M,handleQuickAdd:T,setQuickAddValue:R,setQuickAddColumnId:O,onTaskClick:D,onTaskFullAdd:E,onTaskRemove:V,onTaskTimerToggle:S,onTaskSelectionChange:C,renderCard:A,selectable:me,cardClassName:Q})=>{let ve=t[e.id]||[],Ae=ve.slice(0,a),De=ve.length>a;return jsxs("div",{className:"flex flex-col gap-4 h-full min-h-0",children:[m===`${r}-${e.id}`?jsxs("div",{className:"p-4 bg-white/[0.03] border border-cyan-500/30 rounded-2xl animate-in fade-in slide-in-from-top-2 duration-200",children:[jsx("input",{autoFocus:true,className:"w-full bg-transparent border-none outline-none text-sm text-white placeholder:text-white/20",placeholder:"Task title...",value:p,onChange:I=>R(I.target.value),onKeyDown:I=>{I.key==="Enter"&&T(e.id,r),I.key==="Escape"&&O(null);},onBlur:()=>{p.trim()||O(null);}}),jsxs("div",{className:"flex items-center justify-between mt-3",children:[jsx(U,{className:"text-[10px] text-white/30 uppercase font-bold",children:"Press Enter to save"}),jsxs("div",{className:"flex gap-1",children:[jsx(P,{variant:"ghost",size:"sm",className:"h-7 px-2 text-[10px] hover:bg-white/[0.06]",onClick:()=>O(null),children:"Cancel"}),jsx(P,{variant:"primary",size:"sm",className:"h-7 px-3 text-[10px] bg-cyan-500 hover:bg-cyan-400 text-black font-bold",onClick:()=>T(e.id,r),children:"Add Task"})]})]})]}):jsxs("button",{onClick:()=>M(e.id,r),className:"group/add flex items-center justify-center gap-2 p-4 border border-dashed border-white/10 hover:border-cyan-500/30 hover:bg-cyan-500/[0.02] rounded-2xl transition-all duration-200",children:[jsx(Plus,{className:"h-4 w-4 text-white/20 group-hover/add:text-cyan-400 transition-colors"}),jsx(U,{className:"text-xs font-bold text-white/20 group-hover/add:text-cyan-400 uppercase tracking-widest transition-colors",children:"Add New Task"})]}),jsxs("div",{role:"list","aria-label":`Tasks in ${e.title}`,className:"flex-1 overflow-y-auto pr-2 custom-scrollbar flex flex-col gap-4 min-h-0 pb-20",children:[Ae.map(I=>jsxs(ue__default.Fragment,{children:[o&&l===I.id&&c==="top"&&o!==I.id&&jsx("div",{className:"h-1 bg-cyan-500/50 rounded-full animate-pulse"}),jsx("div",{draggable:true,role:"listitem","aria-label":`Task: ${I.title}`,onDragStart:He=>h(He,I.id,"task"),onDragEnd:v,onDragOver:He=>b(He,e.id,I.id),onDrop:He=>u(He,e.id,I.id),onTouchStart:He=>x(He,I.id,"task"),onTouchMove:y,onTouchEnd:k,onKeyDown:He=>w(He,I.id,e.id),tabIndex:0,"data-task-id":I.id,className:n("outline-none transition-all duration-200",o===I.id?"opacity-20 scale-95":"opacity-100 scale-100",l===I.id&&o?"ring-2 ring-cyan-500/30 rounded-2xl":""),children:jsx(oa,{task:I,columnId:e.id,selectedTaskIds:f,activeTimerTaskId:g,selectable:me,cardClassName:Q,onTaskClick:D,onTaskSelectionChange:C,onTaskRemove:V,onTaskTimerToggle:S,renderCard:A})}),o&&l===I.id&&c==="bottom"&&o!==I.id&&jsx("div",{className:"h-1 bg-cyan-500/50 rounded-full animate-pulse"})]},I.id)),De&&jsxs("button",{onClick:()=>N(e.id),className:"flex items-center justify-center gap-2 p-4 text-white/30 hover:text-cyan-400 transition-colors",children:[jsx(Plus,{className:"h-4 w-4"}),jsxs("span",{className:"text-xs font-bold uppercase tracking-widest",children:["Load ",ve.length-a," more tasks"]})]}),ve.length===0&&!o&&jsxs("div",{className:"flex flex-col items-center justify-center py-12 px-4 border border-dashed border-white/5 rounded-[2rem] opacity-20",children:[jsx(LayoutGrid,{className:"h-8 w-8 mb-3"}),jsx(U,{className:"text-xs font-medium",children:"No tasks yet"})]}),ve.length===0&&o&&jsx("div",{className:"flex-1 min-h-[200px] border-2 border-dashed border-cyan-500/20 rounded-[2rem] bg-cyan-500/[0.02] flex items-center justify-center",onDragOver:I=>b(I,e.id),onDrop:I=>u(I,e.id),children:jsx(U,{className:"text-xs font-bold text-cyan-500/40 uppercase tracking-widest",children:"Drop here"})})]})]})};function Ex({columns:e,tasks:t,onTaskMove:r,onColumnMove:a,onTaskClick:s,onTaskAdd:o,onTaskFullAdd:i,onTaskRemove:l,onColumnAction:d,onTaskDrop:c,onTaskDragStart:m,onTaskDragEnd:p,onTaskSelectionChange:f,onTaskTimerToggle:g,renderCard:h,className:v,columnClassName:b,cardClassName:u,groupBy:x,accentColor:y="cyan",showTaskCount:k=true,showDividers:w=true,columnHeight:N="calc(100vh - 200px)",pageSize:M=10,selectable:T=false,selectedTaskIds:R=[],activeTimerTaskId:O=null}){let[D,E]=useState(null),[V,S]=useState(""),{tasksByGroupAndColumn:C,sortConfig:A,setSortConfig:me,visibleCounts:Q,handleLoadMore:ve}=Vo({tasks:t,columns:e,groupBy:x,pageSize:M}),{draggedTaskId:Ae,draggedColumnId:De,dragOverColumnId:I,dragOverTaskId:He,dropPosition:wr,handleDragStart:wa,handleDragEnd:yr,handleDragOver:kr,handleDrop:Nr,handleTouchStart:ya,handleTouchMove:ka,handleTouchEnd:Na,setDraggedTaskId:vn}=zo({tasks:t,columns:e,selectedTaskIds:R,onTaskMove:r,onColumnMove:a,onTaskDrop:c,onTaskDragStart:m,onTaskDragEnd:p}),{boardRef:wn,isDraggingBoard:yn,handleBoardMouseDown:kn,handleBoardMouseMove:Nn,handleBoardMouseUp:Ta}=$o(),Ma=(L,F="default")=>{E(`${F}-${L}`);},Tn=(L,F="default")=>{V.trim()&&o&&(o(L,V.trim()),S(""),E(null));},Mn=useCallback((L,F)=>{if(T&&(L.ctrlKey||L.metaKey)){L.preventDefault(),L.stopPropagation();let we=R.includes(F.id)?R.filter(K=>K!==F.id):[...R,F.id];f?.(we);}else s?.(F);},[T,R,f,s]),Rn=(L,F,B)=>{if((L.key===" "||L.key==="Enter")&&(L.preventDefault(),Ae===F?(r&&r(Ae,B),yr()):vn(F)),Ae===F){let we=e.findIndex(Fe=>Fe.id===B),K=-1,Ra="default";for(let[Fe,Cn]of Object.entries(C)){let Ca=(Cn[B]||[]).findIndex(Ln=>Ln.id===F);if(Ca!==-1){K=Ca,Ra=Fe;break}}let Tr=C[Ra]?.[B]||[];if(L.key==="ArrowRight"&&we<e.length-1)r?.(F,e[we+1].id);else if(L.key==="ArrowLeft"&&we>0)r?.(F,e[we-1].id);else if(L.key==="ArrowDown"&&K<Tr.length-1){let Fe=Tr[K+1];Fe&&r?.(F,B,Fe.id,"bottom");}else if(L.key==="ArrowUp"&&K>0){let Fe=Tr[K-1];Fe&&r?.(F,B,Fe.id,"top");}}};return jsxs("div",{ref:wn,role:"list","aria-label":"Kanban Board",onMouseDown:kn,onMouseMove:Nn,onMouseUp:Ta,onMouseLeave:Ta,className:n("flex flex-col overflow-x-auto overflow-y-hidden pb-4 select-none board-scroll-container snap-x snap-mandatory scroll-smooth",yn?"cursor-grabbing":"cursor-grab",v),style:{height:typeof N=="number"?`${N}px`:N},children:[jsx("div",{className:"flex sticky top-0 z-20 bg-[#0a0a0a]/80 backdrop-blur-md border-b border-white/10 w-fit",children:e.map((L,F)=>{let B=t.filter(K=>K.columnId===L.id),we=L.limit&&B.length>L.limit;return jsxs("div",{role:"listitem","aria-label":`Column: ${L.title}`,className:n("flex-shrink-0 w-[480px] flex items-center justify-between px-8 py-6 group/header snap-start",w&&F>0&&"border-l border-white/10"),onDragOver:K=>kr(K,L.id),onDrop:K=>Nr(K,L.id),children:[jsxs("div",{draggable:true,onDragStart:K=>wa(K,L.id,"column"),onDragEnd:yr,onTouchStart:K=>ya(K,L.id,"column"),onTouchMove:ka,onTouchEnd:Na,className:"flex items-center gap-3 cursor-grab active:cursor-grabbing flex-1 min-w-0",children:[jsx("div",{className:"w-2.5 h-2.5 rounded-full shadow-[0_0_10px_rgba(0,0,0,0.5)]",style:{backgroundColor:L.color||`var(--${y}-500)`}}),jsx(Ke,{as:"h4",className:"text-sm font-bold uppercase tracking-[0.1em] text-white/90 truncate",children:L.title}),k&&jsxs(Oe,{variant:we?"danger":"neutral",className:n("ml-1 text-[10px] px-2 py-0.5 rounded-full font-bold",!we&&"bg-white/[0.06] border-white/5 text-white/60"),children:[B.length,L.limit?` / ${L.limit}`:""]}),we&&jsx(AlertTriangle,{className:"h-3.5 w-3.5 text-amber-500 animate-pulse"})]}),jsxs("div",{className:"flex items-center gap-1.5 opacity-0 group-hover/header:opacity-100 transition-all duration-200",children:[jsx(P,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-white/[0.06] rounded-full text-white/40 hover:text-white",onClick:()=>Ma(L.id),children:jsx(Plus,{className:"h-4.5 w-4.5"})}),jsxs(wt,{children:[jsx(yt,{className:"h-8 w-8 p-0 hover:bg-white/[0.06] rounded-full flex items-center justify-center text-white/40 hover:text-white transition-colors",children:jsx(MoreHorizontal,{className:"h-4.5 w-4.5"})}),jsxs(kt,{align:"end",className:"w-56 bg-[#1a1a1a]/95 backdrop-blur-xl border border-white/10 p-1.5 shadow-2xl z-50 rounded-2xl",children:[jsx("div",{className:"px-2 py-1.5 mb-1",children:jsx(U,{className:"text-[10px] font-bold uppercase tracking-widest text-white/30",children:"Column Actions"})}),jsxs(ee,{onClick:()=>d?.(L.id,"settings"),className:"gap-2.5 text-xs text-white/70 hover:text-white hover:bg-white/[0.03] rounded-2xl py-2",children:[jsx(Settings,{className:"h-4 w-4"})," Column Settings"]}),jsx("div",{className:"h-px bg-white/[0.03] my-1.5"}),jsx("div",{className:"px-2 py-1.5 mb-1",children:jsx(U,{className:"text-[10px] font-bold uppercase tracking-widest text-white/30",children:"Sort Tasks"})}),jsxs(ee,{onClick:()=>me({field:"title",direction:A?.field==="title"&&A.direction==="asc"?"desc":"asc"}),className:n("gap-2.5 text-xs hover:bg-white/[0.03] rounded-2xl py-2",A?.field==="title"?"text-cyan-400 bg-cyan-500/5":"text-white/70 hover:text-white"),children:[jsx(SortAsc,{className:"h-4 w-4"})," Sort by Title",A?.field==="title"&&jsx("span",{className:"ml-auto text-[10px] uppercase font-bold opacity-50",children:A.direction})]}),jsxs(ee,{onClick:()=>me({field:"priority",direction:A?.field==="priority"&&A.direction==="desc"?"asc":"desc"}),className:n("gap-2.5 text-xs hover:bg-white/[0.03] rounded-2xl py-2",A?.field==="priority"?"text-cyan-400 bg-cyan-500/5":"text-white/70 hover:text-white"),children:[jsx(ArrowUpDown,{className:"h-4 w-4"})," Sort by Priority",A?.field==="priority"&&jsx("span",{className:"ml-auto text-[10px] uppercase font-bold opacity-50",children:A.direction})]}),jsxs(ee,{onClick:()=>me({field:"dueDate",direction:A?.field==="dueDate"&&A.direction==="asc"?"desc":"asc"}),className:n("gap-2.5 text-xs hover:bg-white/[0.03] rounded-2xl py-2",A?.field==="dueDate"?"text-cyan-400 bg-cyan-500/5":"text-white/70 hover:text-white"),children:[jsx(CalendarDays,{className:"h-4 w-4"})," Sort by Date",A?.field==="dueDate"&&jsx("span",{className:"ml-auto text-[10px] uppercase font-bold opacity-50",children:A.direction})]}),jsx("div",{className:"h-px bg-white/[0.03] my-1.5"}),jsxs(ee,{className:"gap-2.5 text-xs text-white/70 hover:text-white hover:bg-white/[0.03] rounded-2xl py-2",children:[jsx(Archive,{className:"h-4 w-4"})," Archive All Tasks"]}),jsxs(ee,{className:"gap-2.5 text-xs text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded-2xl py-2",children:[jsx(Trash2,{className:"h-4 w-4"})," Delete Column"]})]})]})]})]},L.id)})}),jsx("div",{className:"flex-1 min-h-0 overflow-y-auto w-fit",children:Object.entries(C).map(([L,F])=>jsxs("div",{className:"flex flex-col h-full min-h-0",children:[x&&jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-3 px-6 py-2 bg-[#0a0a0a]/60 backdrop-blur-sm border-b border-white/5",children:[jsx(Oe,{variant:"neutral",className:"bg-white/[0.06] border-white/10 text-[10px] uppercase font-bold tracking-widest px-3",children:L}),jsx("div",{className:"h-px flex-1 bg-white/[0.03]"})]}),jsx("div",{className:"flex min-w-max h-full min-h-0",children:e.map((B,we)=>jsxs(ue__default.Fragment,{children:[De&&I===B.id&&wr==="left"&&De!==B.id&&jsx("div",{className:"flex-shrink-0 w-1 bg-cyan-500/50 mx-2 rounded-full animate-pulse"}),jsx("div",{"data-column-id":B.id,className:n("flex-shrink-0 w-[480px] flex flex-col gap-6 transition-all duration-300 p-4 rounded-[2rem] snap-start h-full min-h-0 overflow-hidden",w&&we>0&&"border-l border-white/10",De===B.id?"opacity-20":"opacity-100",I===B.id&&De?"bg-cyan-500/5":"",B.limit&&(F[B.id]||[]).length>B.limit&&"bg-red-500/[0.02] ring-1 ring-inset ring-red-500/20",b),onDragOver:K=>kr(K,B.id),onDrop:K=>Nr(K,B.id),children:jsx(Ko,{column:B,columnMap:F,groupName:L,visibleCount:Q[B.id]||M,pageSize:M,draggedTaskId:Ae,draggedColumnId:De,dragOverTaskId:He,dragOverColumnId:I,dropPosition:wr,quickAddColumnId:D,quickAddValue:V,selectedTaskIds:R,activeTimerTaskId:O,handleDragStart:wa,handleDragEnd:yr,handleDragOver:kr,handleDrop:Nr,handleTouchStart:ya,handleTouchMove:ka,handleTouchEnd:Na,handleKeyDown:Rn,handleLoadMore:ve,handleSetQuickAdd:Ma,handleQuickAdd:Tn,setQuickAddValue:S,setQuickAddColumnId:E,onTaskClick:Mn,onTaskFullAdd:i,onTaskRemove:l,onTaskTimerToggle:g,onTaskSelectionChange:f,renderCard:h,selectable:T,cardClassName:u})},B.id),De&&I===B.id&&wr==="right"&&De!==B.id&&jsx("div",{className:"flex-shrink-0 w-1 bg-cyan-500/50 mx-2 rounded-full animate-pulse"})]},B.id))})]},L))})]})}var sd=cva("relative flex flex-col items-center justify-center rounded-2xl border-2 border-dashed transition-all duration-200 text-center",{variants:{isDragActive:{true:"border-blue-500 bg-blue-50 dark:bg-blue-500/10",false:"border-gray-200 bg-gray-50 hover:bg-gray-100 dark:border-white/10 dark:bg-white/[0.02] dark:hover:bg-white/[0.05]"},error:{true:"border-rose-500 bg-rose-50 dark:bg-rose-500/10",false:""}},defaultVariants:{isDragActive:false,error:false}}),sa=ue__default.forwardRef(({className:e,onDrop:t,maxFiles:r=1,maxSize:a,label:s="Upload files",description:o="Drag & drop or click to upload",...i},l)=>{let[d,c]=useState(false),[m,p]=useState([]),[f,g]=useState(null),h=ue__default.useRef(null),v=w=>{w.preventDefault(),c(true);},b=w=>{w.preventDefault(),c(false);},u=w=>r&&w.length>r?(g(`Max ${r} files allowed`),false):a&&w.some(M=>M.size>a)?(g(`File too large (max ${a/1024/1024}MB)`),false):(g(null),true),x=w=>{w.preventDefault(),c(false);let N=Array.from(w.dataTransfer.files);u(N)&&(p(N),t?.(N));},y=w=>{if(w.target.files){let N=Array.from(w.target.files);u(N)&&(p(N),t?.(N));}},k=(w,N)=>{N.stopPropagation();let M=m.filter((T,R)=>R!==w);p(M),t?.(M);};return jsxs("div",{className:"w-full space-y-4",children:[jsxs("div",{ref:l,className:n(sd({isDragActive:d,error:!!f,className:e}),"p-8 cursor-pointer"),onDragOver:v,onDragLeave:b,onDrop:x,onClick:()=>h.current?.click(),...i,children:[jsx("input",{ref:h,type:"file",className:"hidden",multiple:r>1,onChange:y}),jsx("div",{className:"mb-4 rounded-full bg-gray-100 p-3 dark:bg-white/[0.06]",children:jsx(Upload,{className:"h-6 w-6 text-gray-500 dark:text-white/70"})}),jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-white",children:s}),jsx("div",{className:"mt-1 text-xs text-gray-500 dark:text-white/50",children:o}),f&&jsx("div",{className:"mt-2 text-xs font-medium text-rose-500",children:f})]}),m.length>0&&jsx("div",{className:"grid gap-2",children:m.map((w,N)=>jsxs("div",{className:"flex items-center justify-between rounded-xl border border-gray-200 bg-white p-3 dark:border-white/10 dark:bg-white/[0.03]",children:[jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-gray-100 dark:bg-white/[0.06]",children:jsx(File,{className:"h-4 w-4 text-gray-500 dark:text-white/70"})}),jsxs("div",{className:"flex flex-col",children:[jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white truncate max-w-[200px]",children:w.name}),jsxs("span",{className:"text-xs text-gray-500 dark:text-white/50",children:[(w.size/1024).toFixed(1)," KB"]})]})]}),jsx("button",{onClick:M=>k(N,M),className:"rounded-full p-1 hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50",children:jsx(X,{className:"h-4 w-4"})})]},N))})]})});sa.displayName="FileDropzone";function Jx({isOpen:e,onClose:t,onSave:r,task:a,columnId:s}){let[o,i]=useState(""),[l,d]=useState(""),[c,m]=useState("medium"),[p,f]=useState([]),[g,h]=useState("");useEffect(()=>{a?(i(a.title||""),d(a.description||""),m(a.priority||"medium"),f(a.tags||[])):(i(""),d(""),m("medium"),f([]));},[a,e]);let v=()=>{o.trim()&&(r({...a,title:o,description:l,priority:c,tags:p,columnId:a?.columnId||s}),t());},b=()=>{g.trim()&&!p.includes(g.trim())&&(f([...p,g.trim()]),h(""));},u=x=>{f(p.filter(y=>y!==x));};return jsxs(bo,{isOpen:e,onClose:t,children:[jsx(ho,{children:jsx(vo,{children:a?"Edit Task":"Create New Task"})}),jsxs("div",{className:"space-y-6 py-4",children:[jsxs("div",{className:"space-y-2",children:[jsx(Y,{htmlFor:"task-title",children:"Title"}),jsx(ft,{id:"task-title",placeholder:"What needs to be done?",value:o,onChange:x=>i(x.target.value),autoFocus:true})]}),jsxs("div",{className:"space-y-2",children:[jsx(Y,{htmlFor:"task-desc",children:"Description"}),jsx(Br,{id:"task-desc",placeholder:"Add more details...",value:l,onChange:x=>d(x.target.value),rows:4})]}),jsxs("div",{className:"grid grid-cols-2 gap-4",children:[jsxs("div",{className:"space-y-2",children:[jsx(Y,{children:"Priority"}),jsx(Dr,{options:[{label:"Low",value:"low"},{label:"Medium",value:"medium"},{label:"High",value:"high"},{label:"Urgent",value:"urgent"}],value:c,onChange:x=>m(x)})]}),jsxs("div",{className:"space-y-2",children:[jsx(Y,{children:"Tags"}),jsxs("div",{className:"flex gap-2",children:[jsx(ft,{placeholder:"Add tag...",value:g,onChange:x=>h(x.target.value),onKeyDown:x=>x.key==="Enter"&&(x.preventDefault(),b())}),jsx(P,{variant:"outline",onClick:b,type:"button",children:"Add"})]}),jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:p.map(x=>jsxs("span",{className:"flex items-center gap-1 px-2 py-1 rounded-2xl bg-white/[0.03] border border-white/10 text-xs text-white/70",children:[x,jsx(X,{size:12,className:"cursor-pointer hover:text-white",onClick:()=>u(x)})]},x))})]})]}),jsxs("div",{className:"space-y-2",children:[jsx(Y,{children:"Attachments"}),jsx(sa,{onDrop:x=>console.log("Files selected:",x),className:"border-dashed border-white/10 bg-white/[0.02]"})]})]}),jsxs(xo,{children:[jsx(P,{variant:"ghost",onClick:t,children:"Cancel"}),jsx(P,{variant:"primary",onClick:v,disabled:!o.trim(),children:a?"Save Changes":"Create Task"})]})]})}function cv({onSearchChange:e,onFilterChange:t,priorityOptions:r=[],tagOptions:a=[],assigneeOptions:s=[],className:o}){let[i,l]=useState(""),[d,c]=useState({}),m=(g,h)=>{let v=d[g]||[],b=v.includes(h)?v.filter(x=>x!==h):[...v,h],u={...d,[g]:b};b.length===0&&delete u[g],c(u),t?.(u);},p=()=>{c({}),t?.({});},f=Object.values(d).flat().length;return jsxs(Z,{className:n("p-2 flex flex-wrap items-center gap-3",o),children:[jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[jsx(Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-white/20"}),jsx("input",{type:"text",placeholder:"Search tasks...",className:"w-full pl-10 pr-4 py-2 text-sm rounded-2xl border border-white/10 bg-white/[0.03] focus:outline-none focus:ring-2 focus:ring-cyan-500/50 transition-all placeholder:text-white/20",value:i,onChange:g=>{l(g.target.value),e?.(g.target.value);}})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsx(Yo,{label:"Priority",options:r,selected:d.priority||[],onSelect:g=>m("priority",g)}),jsx(Yo,{label:"Tags",options:a,selected:d.tags||[],onSelect:g=>m("tags",g)}),f>0&&jsxs(P,{variant:"ghost",size:"sm",onClick:p,className:"h-9 px-3 text-xs text-white/40 hover:text-white gap-2",children:[jsx(X,{className:"h-3.5 w-3.5"})," Clear Filters",jsx(Oe,{variant:"neutral",className:"bg-white/[0.06] border-white/10 ml-1",children:f})]})]})]})}function Yo({label:e,options:t,selected:r,onSelect:a}){return jsxs(Ue,{children:[jsxs(Ye,{className:n("h-9 px-3 text-xs gap-2 border border-transparent hover:border-white/10 rounded-2xl transition-all",r.length>0?"bg-cyan-500/10 text-cyan-400 border-cyan-500/20":"text-white/60"),children:[jsx(Filter,{className:"h-3.5 w-3.5"}),e,r.length>0&&jsx(Oe,{variant:"info",className:"h-4 min-w-[16px] px-1 bg-cyan-500 text-black border-none",children:r.length}),jsx(ChevronDown,{className:"h-3.5 w-3.5 opacity-40"})]}),jsx(je,{className:"w-56 p-0 bg-[#1a1a1a] border-white/10 shadow-2xl",children:jsxs(No,{children:[jsx(To,{placeholder:`Search ${e}...`}),jsx(Mo,{children:jsx(Ro,{children:t.map(s=>jsxs(Co,{value:s.value,onSelect:()=>a(s.value),className:"flex items-center justify-between",children:[jsx("span",{children:s.label}),r.includes(s.value)&&jsx(Check,{className:"h-3.5 w-3.5 text-cyan-400"})]},s.value))})})]})})]})}function wv({tasks:e,onTaskClick:t,onAddTask:r,className:a}){let[s,o]=useState(new Date),i=(u,x)=>new Date(u,x+1,0).getDate(),l=(u,x)=>new Date(u,x,1).getDay(),d=s.getFullYear(),c=s.getMonth(),m=i(d,c),p=l(d,c),f=()=>o(new Date(d,c-1,1)),g=()=>o(new Date(d,c+1,1)),h=["January","February","March","April","May","June","July","August","September","October","November","December"],v=[];for(let u=0;u<p;u++)v.push(null);for(let u=1;u<=m;u++)v.push(new Date(d,c,u));let b=u=>e.filter(x=>{if(!x.dueDate)return false;let y=new Date(x.dueDate);if(isNaN(y.getTime())){let k=new Date().getFullYear(),w=new Date(`${x.dueDate} ${k}`);return w.getDate()===u.getDate()&&w.getMonth()===u.getMonth()&&w.getFullYear()===u.getFullYear()}return y.getDate()===u.getDate()&&y.getMonth()===u.getMonth()&&y.getFullYear()===u.getFullYear()});return jsxs(Z,{className:n("flex flex-col h-[700px] overflow-hidden",a),children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b border-white/10",children:[jsxs("div",{className:"flex flex-col",children:[jsxs(U,{className:"text-xl font-bold text-white",children:[h[c]," ",d]}),jsx(U,{className:"text-xs text-white/40 uppercase tracking-widest font-bold",children:"Monthly Schedule"})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsx(P,{variant:"outline",size:"sm",onClick:f,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(P,{variant:"outline",size:"sm",onClick:()=>o(new Date),children:"Today"}),jsx(P,{variant:"outline",size:"sm",onClick:g,children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]}),jsx("div",{className:"grid grid-cols-7 border-b border-white/10 bg-white/[0.02]",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(u=>jsx("div",{className:"py-2 text-center",children:jsx(U,{className:"text-xs font-bold text-white/40 uppercase tracking-wider",children:u})},u))}),jsx("div",{className:"flex-1 grid grid-cols-7 auto-rows-fr overflow-y-auto",children:v.map((u,x)=>{if(!u)return jsx("div",{className:"border-r border-b border-white/5 bg-white/[0.01]"},`empty-${x}`);let y=b(u),k=new Date().toDateString()===u.toDateString();return jsxs("div",{className:n("group relative border-r border-b border-white/10 p-2 min-h-[100px] transition-colors hover:bg-white/[0.02]",k&&"bg-cyan-500/[0.03]"),children:[jsxs("div",{className:"flex items-center justify-between mb-2",children:[jsx("span",{className:n("text-sm font-medium w-7 h-7 flex items-center justify-center rounded-full transition-colors",k?"bg-cyan-500 text-white":"text-white/60 group-hover:text-white"),children:u.getDate()}),jsx("button",{onClick:()=>r?.(u),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-white/[0.06] rounded-md transition-all text-white/40 hover:text-white",children:jsx(Plus,{className:"h-3 w-3"})})]}),jsx("div",{className:"space-y-1",children:y.map(w=>jsx("div",{onClick:()=>t?.(w),className:n("px-2 py-1 text-[10px] rounded-md border cursor-pointer transition-all truncate",w.priority==="urgent"?"bg-red-500/10 border-red-500/20 text-red-400":w.priority==="high"?"bg-orange-500/10 border-orange-500/20 text-orange-400":w.priority==="medium"?"bg-cyan-500/10 border-cyan-500/20 text-cyan-400":"bg-gray-500/10 border-gray-500/20 text-gray-400"),children:w.title},w.id))})]},u.toISOString())})})]})}var xd=ue__default.forwardRef(({className:e,...t},r)=>jsx(Z,{ref:r,className:e,...t}));xd.displayName="Card";var vd=ue__default.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:n("flex flex-col space-y-1.5 p-6",e),...t}));vd.displayName="CardHeader";var wd=ue__default.forwardRef(({className:e,...t},r)=>jsx("h3",{ref:r,className:n("text-2xl font-semibold leading-none tracking-tight",e),...t}));wd.displayName="CardTitle";var yd=ue__default.forwardRef(({className:e,...t},r)=>jsx("p",{ref:r,className:n("text-sm text-gray-500 dark:text-white/50",e),...t}));yd.displayName="CardDescription";var kd=ue__default.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:n("p-6 pt-0",e),...t}));kd.displayName="CardContent";var Nd=ue__default.forwardRef(({className:e,...t},r)=>jsx("div",{ref:r,className:n("flex items-center p-6 pt-0",e),...t}));Nd.displayName="CardFooter";var la=ue__default.forwardRef(({className:e,containerClassName:t,alt:r,src:a,fallback:s,onLoad:o,onError:i,...l},d)=>{let[c,m]=useState(true),[p,f]=useState(false),g=v=>{m(false),o?.(v);},h=v=>{m(false),f(true),i?.(v);};return p&&s?jsx(Fragment,{children:s}):jsxs("div",{className:n("relative overflow-hidden rounded-2xl bg-gray-100 dark:bg-white/[0.02] border border-gray-200 dark:border-white/10",t),children:[c&&jsx(Io,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:d,src:a,alt:r,onLoad:g,onError:h,className:n("h-full w-full object-cover transition-opacity duration-300",c?"opacity-0":"opacity-100",e),...l})]})});la.displayName="Image";var Ld=ue__default.forwardRef(({className:e,size:t="lg",...r},a)=>jsx("div",{ref:a,className:n("mx-auto w-full px-4",{sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl",full:"max-w-full"}[t],e),...r}));Ld.displayName="Container";var Dd=ue__default.forwardRef(({className:e,direction:t="col",gap:r=4,align:a,justify:s,wrap:o,style:i,...l},d)=>jsx("div",{ref:d,className:n("flex",{"flex-row":t==="row","flex-col":t==="col","flex-row-reverse":t==="row-reverse","flex-col-reverse":t==="col-reverse","flex-wrap":o,"items-start":a==="start","items-end":a==="end","items-center":a==="center","items-baseline":a==="baseline","items-stretch":a==="stretch","justify-start":s==="start","justify-end":s==="end","justify-center":s==="center","justify-between":s==="between","justify-around":s==="around","justify-evenly":s==="evenly"},e),style:{gap:typeof r=="number"?`${r*.25}rem`:r,...i},...l}));Dd.displayName="Stack";var Sd=ue__default.forwardRef(({className:e,cols:t=1,sm:r,md:a,lg:s,xl:o,gap:i=4,style:l,...d},c)=>jsx("div",{ref:c,className:n("grid",r&&`sm:grid-cols-${r}`,a&&`md:grid-cols-${a}`,s&&`lg:grid-cols-${s}`,o&&`xl:grid-cols-${o}`,e),style:{gridTemplateColumns:t?`repeat(${t}, minmax(0, 1fr))`:void 0,gap:typeof i=="number"?`${i*.25}rem`:i,...l},...d}));Sd.displayName="Grid";var Bd=ue__default.forwardRef(({variant:e="none",noise:t=false,patternColor:r,size:a=24,mask:s="none",animate:o=false,followMouse:i=false,bgColor:l,className:d,children:c,style:m,...p},f)=>{let g=ue__default.useRef(null);ue__default.useEffect(()=>{if(!i)return;let b=u=>{let x=g.current;if(!x)return;let y=x.getBoundingClientRect(),k=u.clientX-y.left,w=u.clientY-y.top;x.style.setProperty("--mouse-x",`${k}px`),x.style.setProperty("--mouse-y",`${w}px`);};return window.addEventListener("mousemove",b),()=>window.removeEventListener("mousemove",b)},[i]);let h=()=>{let b={},u=r||"var(--pattern-color, rgba(255,255,255,0.08))";return e==="dots"?{...b,backgroundImage:`radial-gradient(${u} 1px, transparent 1px)`,backgroundSize:`${a}px ${a}px`,transform:i?"translate3d(calc((var(--mouse-x, 0) - 24px) / 40), calc((var(--mouse-y, 0) - 24px) / 40), 0)":void 0}:e==="grid"?{...b,backgroundImage:`
13
- linear-gradient(to right, ${u} 1px, transparent 1px),
14
- linear-gradient(to bottom, ${u} 1px, transparent 1px)
15
- `,backgroundSize:`${a}px ${a}px`,transform:i?"translate3d(calc((var(--mouse-x, 0) - 24px) / 40), calc((var(--mouse-y, 0) - 24px) / 40), 0)":void 0}:e==="gradient"?{...b,background:i?`radial-gradient(circle at var(--mouse-x, center) var(--mouse-y, center), ${u}, transparent)`:`radial-gradient(circle at center, ${u}, transparent)`}:e==="beams"?{...b,background:`radial-gradient(60% 40% at 50% 0%, ${u} 0%, transparent 100%)`}:b},v=s==="fade"?{maskImage:"radial-gradient(ellipse at center, black, transparent 90%)",WebkitMaskImage:"radial-gradient(ellipse at center, black, transparent 90%)"}:{};return jsxs("div",{ref:b=>{b&&(g.current=b),typeof f=="function"?f(b):f&&(f.current=b);},className:n("absolute inset-0 overflow-hidden pointer-events-none transition-transform duration-300 ease-out","z-0","[--pattern-color:rgba(0,0,0,0.05)] dark:[--pattern-color:rgba(255,255,255,0.08)]",l?.startsWith("bg-")?l:"",d),style:{...h(),...v,...m,backgroundColor:l&&!l.startsWith("bg-")?l:void 0},...p,children:[t&&jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none brightness-100 contrast-150",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`}}),e==="beams"&&jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[jsx("div",{className:"absolute top-0 left-1/4 w-px h-full bg-gradient-to-b from-transparent via-white/10 to-transparent"}),jsx("div",{className:"absolute top-0 right-1/4 w-px h-full bg-gradient-to-b from-transparent via-white/10 to-transparent"})]}),e==="mesh"&&jsxs("div",{className:n("absolute inset-0 opacity-30 blur-[100px]",o&&"animate-pulse"),children:[jsx("div",{className:"absolute top-[-10%] left-[-10%] w-[50%] h-[50%] rounded-full bg-blue-500/20"}),jsx("div",{className:"absolute bottom-[-10%] right-[-10%] w-[50%] h-[50%] rounded-full bg-purple-500/20"}),jsx("div",{className:"absolute top-[20%] right-[10%] w-[40%] h-[40%] rounded-full bg-indigo-500/10"})]}),c]})});Bd.displayName="Background";var Fd={theme:"system",setTheme:()=>null},Xo=createContext(Fd);function Qv({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...a}){let[s,o]=useState(()=>localStorage.getItem(r)||t);useEffect(()=>{let l=window.document.documentElement;if(l.classList.remove("light","dark"),s==="system"){let d=window.matchMedia("(prefers-color-scheme: dark)"),c=()=>{l.classList.remove("light","dark"),l.classList.add(d.matches?"dark":"light");};return c(),d.addEventListener("change",c),()=>d.removeEventListener("change",c)}l.classList.add(s);},[s]);let i={theme:s,setTheme:l=>{localStorage.setItem(r,l),o(l);}};return jsx(Xo.Provider,{...a,value:i,children:e})}var Go=()=>{let e=useContext(Xo);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function aw(){let{setTheme:e,theme:t}=Go();return jsxs(P,{variant:"ghost",size:"icon",onClick:()=>e(t==="light"?"dark":"light"),children:[jsx(Sun,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsx(Moon,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})}var Zo=createContext(void 0);function he(){let e=useContext(Zo);if(!e)throw new Error("Chart components must be used within a ChartContainer");return e}function Pt(e,t,r){return t===0?0:e/t*r}function lw({data:e,height:t=300,padding:r={top:20,right:20,bottom:40,left:40},className:a,children:s,...o}){let[i,l]=useState(null),[d,c]=useState(0),m=ue__default.useRef(null);ue__default.useEffect(()=>{if(!m.current)return;let f=new ResizeObserver(g=>{g[0]&&c(g[0].contentRect.width);});return f.observe(m.current),()=>f.disconnect()},[]);let p=useMemo(()=>Math.max(...e.map(f=>f.value))*1.1,[e]);return jsx(Zo.Provider,{value:{width:d,height:t,data:e,maxValue:p,padding:r,hoveredIndex:i,setHoveredIndex:l},children:jsx("div",{ref:m,className:n("relative w-full select-none",a),style:{height:t},...o,children:d>0&&jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${d} ${t}`,className:"overflow-visible",children:s})})})}function dw({lines:e=5}){let{width:t,height:r,padding:a}=he(),s=r-a.top-a.bottom;return jsx("g",{className:"text-gray-200 dark:text-white/5",children:Array.from({length:e+1}).map((o,i)=>{let l=a.top+s/e*i;return jsx("line",{x1:a.left,y1:l,x2:t-a.right,y2:l,stroke:"currentColor",strokeWidth:1,strokeDasharray:"4 4"},i)})})}function cw(){let{width:e,height:t,padding:r,data:a}=he(),o=(e-r.left-r.right)/a.length;return jsx("g",{children:a.map((i,l)=>{let d=r.left+o*l+o/2,c=t-r.bottom+20;return jsx("text",{x:d,y:c,textAnchor:"middle",className:"fill-gray-400 dark:fill-white/40 text-xs font-medium",children:i.label},l)})})}function mw({renderTooltip:e}){let{hoveredIndex:t,data:r,width:a,padding:s}=he();if(t===null)return null;let i=(a-s.left-s.right)/r.length,l=s.left+i*t+i/2,d=r[t];if(!d)return null;let c=e?e(d):jsxs("div",{className:"rounded-xl border border-gray-200 dark:border-white/10 bg-white/90 dark:bg-black/80 px-3 py-2 text-xs shadow-xl backdrop-blur-md",children:[jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:d.label}),jsxs("div",{className:"text-gray-500 dark:text-white/70",children:["Value: ",d.value]})]});return jsx("foreignObject",{x:l-75,y:0,width:150,height:"100%",className:"pointer-events-none overflow-visible",children:jsx("div",{className:"flex h-full flex-col justify-center items-center",children:jsx("div",{className:"animate-in fade-in zoom-in-95 duration-200",children:c})})})}function uw(){return jsx("div",{className:"w-full h-full flex items-end justify-between gap-2 p-4 animate-pulse bg-gray-100 dark:bg-white/[0.02] rounded-2xl border border-gray-200 dark:border-white/5",children:[...Array(12)].map((e,t)=>jsx("div",{className:"w-full bg-gray-200 dark:bg-white/[0.03] rounded-t-lg",style:{height:`${Math.random()*60+20}%`}},t))})}function hw({color:e="cyan",showValues:t=false,animationDelay:r=0,onValueClick:a}){let{width:s,height:o,padding:i,data:l,maxValue:d,setHoveredIndex:c,hoveredIndex:m}=he(),p=s-i.left-i.right,f=o-i.top-i.bottom,g=p/l.length,h=g*.6,v={cyan:"from-cyan-500 to-blue-600",purple:"from-purple-500 to-indigo-600",emerald:"from-emerald-500 to-teal-600",amber:"from-amber-400 to-orange-600",rose:"from-rose-500 to-pink-600"};return jsxs("g",{children:[l.map((b,u)=>{let x=Pt(b.value,d,f),y=i.left+g*u+(g-h)/2,k=o-i.bottom-x,w=m===u,N=u*.1+r;return jsxs("g",{onMouseEnter:()=>c(u),onMouseLeave:()=>c(null),onClick:()=>a?.(b),className:n("cursor-pointer",a&&"cursor-pointer"),children:[jsx("rect",{x:i.left+g*u,y:i.top,width:g,height:f,fill:"transparent"}),jsx("rect",{x:y,y:k,width:h,height:x,rx:4,className:n("transition-all duration-300 ease-out",w?"brightness-125 filter":"opacity-80"),style:{transformOrigin:`center ${o-i.bottom}px`,animation:`grow-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) ${N}s backwards`}}),jsx("rect",{x:y,y:k,width:h,height:x,rx:4,className:n("bg-gradient-to-b",v[e]),style:{pointerEvents:"none",transformOrigin:`center ${o-i.bottom}px`,animation:`grow-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) ${N}s backwards`}}),t&&jsx("text",{x:y+h/2,y:k-8,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${N+.4}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:b.value})]},u)}),jsx("style",{children:`
12
+ `})]})};Ji.displayName="LetterPullup";var U=be__default.forwardRef(({className:e,children:t,required:r,...a},n)=>jsxs("label",{ref:n,className:i("text-sm font-medium leading-none text-gray-700 dark:text-white/80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...a,children:[t,r&&jsx("span",{className:"ml-1 text-rose-500",children:"*"})]}));U.displayName="Label";var ol=cva("w-full rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3 border border-gray-200 dark:border-white/[0.10] text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-white/30 focus:outline-none focus:ring-2 focus:ring-purple-400/30 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200",{variants:{hasError:{true:"border-rose-400/25 focus:ring-rose-300/25",false:""},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""}},defaultVariants:{hasError:false,hasLeftIcon:false,hasRightIcon:false}}),pt=be__default.forwardRef(({className:e,containerClassName:t,label:r,error:a,leftIcon:n,rightIcon:o,id:s,...l},c)=>{let d=s||be__default.useId(),m=!!a;return jsxs("div",{className:i("flex flex-col gap-1.5",t),children:[r&&jsx(U,{htmlFor:d,required:l.required,children:r}),jsxs("div",{className:"relative flex items-center",children:[n&&jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 dark:text-white/35",children:n}),jsx("input",{ref:c,id:d,className:i(ol({hasError:m,hasLeftIcon:!!n,hasRightIcon:!!o,className:e})),...l}),o&&jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:o})]}),a&&jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:a})]})});pt.displayName="TextInput";var ka=be__default.forwardRef(({className:e,label:t,error:r,id:a,disabled:n,checked:o,defaultChecked:s,onChange:l,...c},d)=>{let m=a||be__default.useId(),[u,p]=be__default.useState(s||o||false);be__default.useEffect(()=>{o!==void 0&&p(o);},[o]);let b=()=>{if(n)return;let h=!u;p(h),l&&l({target:{checked:h}});};return jsxs("div",{className:i("flex flex-col gap-1.5",e),children:[jsxs("button",{ref:d,type:"button",id:m,role:"checkbox","aria-checked":u,"aria-label":t,onClick:b,disabled:n,className:i("flex items-center gap-3 rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-3","hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",n&&"opacity-50 cursor-not-allowed"),...c,children:[jsx("span",{"aria-hidden":"true",className:i("grid h-6 w-6 place-items-center rounded-lg border",u?"border-emerald-400/30 bg-emerald-400/15":"border-gray-300 dark:border-white/10 bg-white dark:bg-white/[0.02]"),children:u?jsx("svg",{className:"h-4 w-4 text-emerald-200",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):null}),t&&jsx("span",{className:"text-sm text-gray-700 dark:text-white/70",children:t})]}),r&&jsx("p",{className:"text-xs text-rose-500 mt-1 ml-1",children:r})]})});ka.displayName="Checkbox";var Na=be__default.forwardRef(({className:e,label:t,error:r,id:a,disabled:n,checked:o,defaultChecked:s,onChange:l,...c},d)=>{let m=a||be__default.useId(),[u,p]=be__default.useState(s||o||false);be__default.useEffect(()=>{o!==void 0&&p(o);},[o]);let b=()=>{if(n)return;let h=!u;p(h),l&&l({target:{checked:h}});};return jsxs("div",{className:i("flex flex-col gap-1.5",e),children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",id:m,role:"switch","aria-checked":u,onClick:b,disabled:n,className:i("peer inline-flex h-6 w-11 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-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-black disabled:cursor-not-allowed disabled:opacity-50",u?"bg-emerald-500":"bg-gray-200 dark:bg-white/[0.06]"),...c,children:jsx("span",{className:i("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform",u?"translate-x-5":"translate-x-0")})}),t&&jsx(U,{htmlFor:m,className:"cursor-pointer select-none text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",onClick:b,children:t})]}),r&&jsx("p",{className:"text-xs text-rose-500 mt-1 ml-1",children:r})]})});Na.displayName="Switch";var Or=be__default.forwardRef(({label:e,name:t,options:r,value:a,defaultValue:n,onChange:o,placeholder:s="Select an option",error:l,disabled:c,className:d},m)=>{let[u,p]=useState(false),[b,h]=useState(n),[x,g]=useState(-1),f=useRef(null),v=be__default.useId(),w=a!==void 0,y=w?a:b,k=r.find(C=>C.value===y);useEffect(()=>{if(u){let C=r.findIndex(M=>M.value===y);g(C!==-1?C:0);}else g(-1);},[u,y,r]),useEffect(()=>{let C=M=>{f.current&&!f.current.contains(M.target)&&p(false);};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[]);let N=C=>{c||(w||h(C),o?.(C),p(false));},T=C=>{c||(C.key==="Enter"||C.key===" "?(C.preventDefault(),u&&x!==-1?N(r[x].value):p(true)):C.key==="Escape"?p(false):C.key==="ArrowDown"?(C.preventDefault(),u?g(M=>(M+1)%r.length):p(true)):C.key==="ArrowUp"?(C.preventDefault(),u?g(M=>(M-1+r.length)%r.length):p(true)):C.key==="Home"?(C.preventDefault(),u&&g(0)):C.key==="End"&&(C.preventDefault(),u&&g(r.length-1)));};return jsxs("div",{ref:f,className:i("flex flex-col gap-1.5 relative",d),children:[e&&jsx(U,{htmlFor:v,className:i(c&&"opacity-50 cursor-not-allowed"),children:e}),jsxs("div",{ref:m,id:v,role:"combobox","aria-expanded":u,"aria-haspopup":"listbox","aria-controls":`${v}-listbox`,"aria-disabled":c,tabIndex:c?-1:0,onClick:()=>!c&&p(!u),onKeyDown:T,className:i("w-full appearance-none rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3","border border-gray-200 dark:border-white/[0.10]","text-gray-900 dark:text-white flex items-center","focus:outline-none focus:ring-2 focus:ring-purple-400/30","hover:bg-gray-100 dark:hover:bg-white/[0.05] cursor-pointer",c&&"cursor-not-allowed opacity-50 hover:bg-gray-50 dark:hover:bg-white/[0.04]",u&&"border-gray-300 dark:border-white/20 ring-2 ring-purple-400/20",l&&"border-rose-400/25 focus:ring-rose-300/25"),children:[jsx("span",{className:i("block truncate",!k&&"text-gray-400 dark:text-white/20"),children:k?k.label:s}),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:i("absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 dark:text-white/40 transition-transform duration-200",u&&"rotate-180"),children:jsx("path",{d:"m6 9 6 6 6-6"})})]}),u&&jsx("div",{className:"absolute top-full left-0 z-[110] mt-1 w-full overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A] p-1 shadow-xl animate-in fade-in zoom-in-95 duration-100",children:jsx("ul",{id:`${v}-listbox`,role:"listbox","aria-activedescendant":x!==-1?`${v}-option-${x}`:void 0,className:"max-h-60 overflow-auto p-1 flex flex-col gap-2",children:r.map((C,M)=>jsx("li",{id:`${v}-option-${M}`,role:"option","aria-selected":y===C.value,onClick:()=>N(C.value),onMouseEnter:()=>g(M),className:i("w-full rounded-2xl px-3 py-2 text-left text-sm transition-colors cursor-pointer","hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white",y===C.value||x===M?"bg-gray-100 dark:bg-white/[0.06] text-gray-900 dark:text-white/90":"text-gray-700 dark:text-white/80"),children:jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsx("span",{className:"flex-1 truncate",children:C.label}),y===C.value&&jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:jsx("polyline",{points:"20 6 9 17 4 12"})})]})},C.value))})}),l&&jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:l}),jsx("input",{type:"hidden",name:t,value:y||""})]})});Or.displayName="Select";function Dt(e,t,r={}){let{side:a="bottom",align:n="center",sideOffset:o=4,alignOffset:s=0,isOpen:l=false}=r,[c,d]=useState({top:0,left:0}),[m,u]=useState(false),p=useCallback(()=>{if(!e.current||!t.current||!l)return;let b=e.current.getBoundingClientRect(),h=t.current.getBoundingClientRect(),x=0,g=0;switch(a){case "top":x=b.top-h.height-o;break;case "bottom":x=b.bottom+o;break;case "left":g=b.left-h.width-o;break;case "right":g=b.right+o;break}if(a==="top"||a==="bottom")switch(n){case "start":g=b.left+s;break;case "center":g=b.left+b.width/2-h.width/2+s;break;case "end":g=b.right-h.width+s;break}else switch(n){case "start":x=b.top+s;break;case "center":x=b.top+b.height/2-h.height/2+s;break;case "end":x=b.bottom-h.height+s;break}let f=8,v=window.innerWidth,w=window.innerHeight;g<f&&(g=f),g+h.width>v-f&&(g=v-h.width-f),x<f&&(x=f),x+h.height>w-f&&(x=w-h.height-f),d({top:x,left:g}),u(true);},[e,t,a,n,o,s,l]);return useLayoutEffect(()=>{if(!l){m&&u(false);return}p();let b=new ResizeObserver(()=>p());return e.current&&b.observe(e.current),t.current&&b.observe(t.current),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{b.disconnect(),window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[l,p,e,t]),{position:c,isPositioned:m,updatePosition:p}}var Ra=createContext(void 0);function qe({children:e,open:t,onOpenChange:r}){let[a,n]=useState(false),o=useRef(null),s=t!==void 0,l=s?t:a,c=d=>{s||n(d),r?.(d);};return jsx(Ra.Provider,{value:{isOpen:l,setIsOpen:c,triggerRef:o},children:jsx("div",{className:"relative inline-block",children:e})})}function Ge({className:e,children:t,...r}){let a=useContext(Ra);if(!a)throw new Error("PopoverTrigger must be used within Popover");let n=o=>{a.setIsOpen(!a.isOpen),r.onClick?.(o);};return jsx("button",{ref:a.triggerRef,type:"button","aria-haspopup":"dialog","aria-expanded":a.isOpen?"true":"false",onClick:n,className:i("inline-flex items-center justify-center",e),...r,children:t})}function je({className:e,children:t,align:r="center",sideOffset:a=4,...n}){let o=useContext(Ra);if(!o)throw new Error("PopoverContent must be used within Popover");let s=useRef(null),{position:l,isPositioned:c}=Dt(o.triggerRef,s,{side:"bottom",align:r,sideOffset:a,isOpen:o.isOpen});if(useEffect(()=>{if(o.isOpen){let m=u=>{s.current&&!s.current.contains(u.target)&&o.triggerRef.current&&!o.triggerRef.current.contains(u.target)&&o.setIsOpen(false);};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m);}}},[o.isOpen,o.setIsOpen,o.triggerRef]),!o.isOpen)return null;let d=()=>{let m=l.top>(o.triggerRef.current?.getBoundingClientRect().top||0)?"bottom":"top";return m==="bottom"?r==="start"?"top left":r==="end"?"top right":"top center":m==="top"?r==="start"?"bottom left":r==="end"?"bottom right":"bottom center":"center center"};return createPortal(jsx("div",{ref:s,style:{top:l.top,left:l.left,transformOrigin:d()},className:i("fixed z-[110] min-w-[12rem] rounded-2xl border border-gray-200 dark:border-white/10 bg-white/80 dark:bg-white/[0.03] backdrop-blur-xl p-4 shadow-xl outline-none duration-200",c?"animate-in fade-in zoom-in-95 opacity-100":"opacity-0",e),...n,children:t}),document.body)}var sr=createContext(void 0);function Ma({children:e,value:t,defaultValue:r="",onValueChange:a,filter:n=(s,l)=>s.toLowerCase().includes(l.toLowerCase()),usePopover:o=true}){let[s,l]=useState(r),[c,d]=useState(""),[m,u]=useState(false),[p,b]=useState(new Map),[h,x]=useState(-1),g=t!==void 0,f=g?t:s,v=N=>{g||l(N),a?.(N),u(false),d("");},w=be__default.useCallback((N,T,C)=>(b(M=>{let H=new Map(M);return H.set(N,{text:T,value:C}),H}),()=>{b(M=>{let H=new Map(M);return H.delete(N),H});}),[]),y=useMemo(()=>Array.from(p.entries()).filter(([N,T])=>n(T.text,c)).map(([N,T])=>({id:N,value:T.value})),[p,c,n]),k=y.length>0;return useEffect(()=>{x(m?0:-1);},[m]),jsx(sr.Provider,{value:{value:f,onValueChange:v,searchTerm:c,setSearchTerm:d,isOpen:m,setIsOpen:u,registerItem:w,isItemVisible:(N,T)=>n(T,c),hasVisibleItems:k,activeIndex:h,setActiveIndex:x,visibleItems:y},children:o?jsx(qe,{open:m,onOpenChange:u,children:e}):e})}function tx({className:e,children:t,...r}){let a=useContext(sr);return jsxs(Ge,{role:"combobox","aria-expanded":a?.isOpen,"aria-haspopup":"listbox",className:i("flex h-10 w-full items-center justify-between rounded-2xl border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-900 placeholder:text-gray-500 focus:border-purple-500 focus:outline-none focus:ring-2 focus:ring-purple-500/20 disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:bg-white/[0.03] dark:text-white dark:placeholder:text-white/40 dark:focus:border-white/20 dark:focus:ring-white/10",e),...r,children:[t,jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-2 opacity-50",children:jsx("path",{d:"m6 9 6 6 6-6"})})]})}function rx({className:e,children:t,...r}){return jsx(je,{className:i("p-0 w-[200px]",e),align:"start",...r,children:t})}function Zo({className:e,placeholder:t="Search...",...r}){let a=useContext(sr);if(!a)throw new Error("ComboboxInput must be used within Combobox");let n=o=>{o.key==="ArrowDown"?(o.preventDefault(),a.setActiveIndex(s=>(s+1)%a.visibleItems.length)):o.key==="ArrowUp"?(o.preventDefault(),a.setActiveIndex(s=>(s-1+a.visibleItems.length)%a.visibleItems.length)):o.key==="Enter"?(o.preventDefault(),a.activeIndex!==-1&&a.visibleItems[a.activeIndex]&&a.onValueChange(a.visibleItems[a.activeIndex].value)):o.key==="Escape"&&a.setIsOpen(false),r.onKeyDown?.(o);};return jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-white/10 px-3",children:[jsxs("svg",{className:"mr-2 h-4 w-4 shrink-0 opacity-50",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("circle",{cx:"11",cy:"11",r:"8"}),jsx("path",{d:"m21 21-4.3-4.3"})]}),jsx("input",{className:i("flex h-10 w-full rounded-md bg-transparent py-3 text-sm text-gray-900 dark:text-white outline-none placeholder:text-gray-400 dark:placeholder:text-white/40 disabled:cursor-not-allowed disabled:opacity-50",e),placeholder:t,value:a.searchTerm,onChange:o=>a.setSearchTerm(o.target.value),onKeyDown:n,"aria-autocomplete":"list","aria-activedescendant":a.activeIndex!==-1?a.visibleItems[a.activeIndex]?.id:void 0,...r})]})}function en({className:e,children:t,...r}){return jsx("div",{role:"listbox",className:i("max-h-[300px] overflow-y-auto overflow-x-hidden p-1",e),...r,children:t})}function tn({className:e,children:t,...r}){let a=useContext(sr);if(!a)throw new Error("ComboboxEmpty must be used within Combobox");return a.hasVisibleItems?null:jsx("div",{className:i("py-6 text-center text-sm text-gray-500 dark:text-white/40",e),...r,children:t})}function rn({className:e,value:t,children:r,textValue:a,...n}){let o=useContext(sr);if(!o)throw new Error("ComboboxItem must be used within Combobox");let s=be__default.useId(),l=a||(typeof r=="string"?r:t),c=o.isItemVisible(s,l),d=o.value===t,m=o.visibleItems.findIndex(p=>p.id===s),u=o.activeIndex===m;return useEffect(()=>o.registerItem(s,l,t),[s,l,t,o.registerItem]),c?jsxs("div",{id:s,role:"option","aria-selected":d,onClick:()=>o.onValueChange(t),onMouseEnter:()=>o.setActiveIndex(m),className:i("relative flex cursor-default select-none items-center rounded-2xl px-3 py-2 text-sm outline-none transition-colors","text-gray-700 dark:text-white/80","aria-selected:bg-gray-100 aria-selected:text-gray-900 dark:aria-selected:bg-white/[0.06] dark:aria-selected:text-white","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.06] dark:hover:text-white",(d||u)&&"bg-gray-100 text-gray-900 dark:bg-white/[0.06] dark:text-white",e),...n,children:[jsx("svg",{className:i("mr-2 h-4 w-4",d?"opacity-100":"opacity-0"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("polyline",{points:"20 6 9 17 4 12"})}),r]}):null}var lx=be__default.forwardRef(({className:e,value:t,defaultValue:r=0,min:a=0,max:n=100,step:o=1,onChange:s,disabled:l,...c},d)=>{let[m,u]=useState(r),p=t!==void 0,b=p?t:m,h=useRef(null),x=(b-a)/(n-a)*100,g=useCallback(y=>{if(l||!h.current)return;let k=h.current.getBoundingClientRect(),N=k.width,T=k.left,C=(y-T)/N*(n-a)+a;C=Math.min(Math.max(C,a),n);let M=Math.round((C-a)/o);C=a+M*o,C=Number(C.toFixed(10)),p||u(C),s?.(C);},[l,p,n,a,s,o]),f=y=>{if(l)return;g(y.clientX);let k=T=>{g(T.clientX);},N=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",N);};document.addEventListener("mousemove",k),document.addEventListener("mouseup",N);},v=y=>{if(l)return;let k=y.touches[0];k&&g(k.clientX);let N=C=>{let M=C.touches[0];M&&g(M.clientX);},T=()=>{document.removeEventListener("touchmove",N),document.removeEventListener("touchend",T);};document.addEventListener("touchmove",N,{passive:false}),document.addEventListener("touchend",T);};return jsxs("div",{ref:d,role:"slider","aria-valuemin":a,"aria-valuemax":n,"aria-valuenow":b,"aria-disabled":l,tabIndex:l?-1:0,onKeyDown:y=>{if(l)return;let k=b;if(y.key==="ArrowRight"||y.key==="ArrowUp")k=Math.min(b+o,n);else if(y.key==="ArrowLeft"||y.key==="ArrowDown")k=Math.max(b-o,a);else if(y.key==="Home")k=a;else if(y.key==="End")k=n;else return;y.preventDefault(),k!==b&&(p||u(k),s?.(k));},className:i("relative flex w-full touch-none select-none items-center py-4 group",l&&"opacity-50 cursor-not-allowed",e),onMouseDown:f,onTouchStart:v,...c,children:[jsx("div",{ref:h,className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.06] backdrop-blur-sm border border-gray-200 dark:border-white/5",children:jsx("div",{className:"absolute h-full bg-gray-900 dark:bg-white transition-none dark:shadow-[0_0_10px_rgba(255,255,255,0.5)]",style:{width:`${x}%`}})}),jsx("div",{className:"absolute h-5 w-5 rounded-full border-2 border-gray-900 dark:border-white bg-white dark:bg-black shadow-md dark:shadow-[0_0_15px_rgba(255,255,255,0.5)] transition-transform hover:scale-110 focus:scale-110",style:{left:`calc(${x}% - 10px)`}})]})});var yl=["Su","Mo","Tu","We","Th","Fr","Sa"],kl=["January","February","March","April","May","June","July","August","September","October","November","December"];function Ur({className:e,value:t,onChange:r,minDate:a,maxDate:n}){let[o,s]=useState(t||new Date),[l,c]=useState(t||new Date),d=(f,v)=>new Date(f,v+1,0).getDate(),m=(f,v)=>new Date(f,v,1).getDay(),u=()=>{c(new Date(l.getFullYear(),l.getMonth()-1,1));},p=()=>{c(new Date(l.getFullYear(),l.getMonth()+1,1));},b=f=>{let v=new Date(l.getFullYear(),l.getMonth(),f);r&&r(v),s(v);},h=f=>t&&t.getDate()===f&&t.getMonth()===l.getMonth()&&t.getFullYear()===l.getFullYear(),x=f=>{let v=new Date;return v.getDate()===f&&v.getMonth()===l.getMonth()&&v.getFullYear()===l.getFullYear()},g=()=>{let f=d(l.getFullYear(),l.getMonth()),v=m(l.getFullYear(),l.getMonth()),w=[];for(let y=0;y<v;y++)w.push(jsx("div",{className:"h-9 w-9"},`empty-${y}`));for(let y=1;y<=f;y++){let k=h(y),N=x(y);w.push(jsx("button",{onClick:()=>b(y),type:"button",className:i("h-9 w-9 rounded-2xl text-sm font-medium transition-all duration-200","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20",k&&"bg-gray-900 text-white dark:bg-white dark:text-black shadow-md dark:shadow-[0_0_15px_rgba(255,255,255,0.3)] hover:bg-gray-800 dark:hover:bg-white/90",!k&&N&&"bg-gray-100 dark:bg-white/[0.03] text-gray-900 dark:text-white border border-gray-200 dark:border-white/10",!k&&!N&&"text-gray-700 dark:text-white/70 hover:text-gray-900 dark:hover:text-white"),children:y},y));}return w};return jsxs("div",{className:i("p-4 bg-white dark:bg-black/40 backdrop-blur-xl border border-gray-200 dark:border-white/10 rounded-2xl w-fit",e),children:[jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[jsxs("div",{className:"font-semibold text-gray-900 dark:text-white",children:[kl[l.getMonth()]," ",jsx("span",{className:"text-gray-500 dark:text-white/50",children:l.getFullYear()})]}),jsxs("div",{className:"flex gap-1",children:[jsx("button",{onClick:u,type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/70 hover:text-gray-900 dark:hover:text-white transition-colors",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx("button",{onClick:p,type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/70 hover:text-gray-900 dark:hover:text-white transition-colors",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]}),jsx("div",{className:"grid grid-cols-7 gap-1 mb-2 text-center",children:yl.map(f=>jsx("div",{className:"h-9 w-9 flex items-center justify-center text-xs font-medium text-gray-400 dark:text-white/40",children:f},f))}),jsx("div",{className:"grid grid-cols-7 gap-1",children:g()})]})}function Nx({value:e,onChange:t,placeholder:r="Pick a date",className:a}){let[n,o]=useState(e),[s,l]=useState(false),c=u=>{o(u),t?.(u),l(false);},d=u=>u.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});return jsxs(qe,{open:s,onOpenChange:l,children:[jsxs(Ge,{onMouseMove:u=>{let p=u.currentTarget.getBoundingClientRect(),b=u.clientX-p.left,h=u.clientY-p.top;u.currentTarget.style.setProperty("--x",`${b}px`),u.currentTarget.style.setProperty("--y",`${h}px`);},className:i("group relative flex h-11 w-full items-center justify-between rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-2 text-sm text-gray-900 dark:text-white transition-all duration-200 overflow-hidden","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/15",!n&&"text-gray-400 dark:text-white/40",a),children:[jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--x) var(--y), rgba(255,255,255,0.06), transparent 40%)"}}),jsx("span",{className:"relative z-10",children:n?d(n):r}),jsx(Calendar,{className:"relative z-10 h-4 w-4 text-white/40"})]}),jsx(je,{className:"w-auto p-0 border-none bg-transparent shadow-none",align:"start",children:jsx(Ur,{value:n,onChange:c,className:"shadow-2xl shadow-black/50"})})]})}var Me=be__default.forwardRef(({className:e,children:t,orientation:r="vertical",scrollbarSize:a="sm",...n},o)=>jsx("div",{ref:o,className:i("overflow-auto","[&::-webkit-scrollbar]:bg-transparent","[&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-thumb]:bg-white/[0.06]","[&::-webkit-scrollbar-thumb]:rounded-full","hover:[&::-webkit-scrollbar-thumb]:bg-gray-400 dark:hover:[&::-webkit-scrollbar-thumb]:bg-white/20","[&::-webkit-scrollbar-track]:bg-transparent","[scrollbar-width:thin] [scrollbar-color:rgba(0,0,0,0.2)_transparent] dark:[scrollbar-color:rgba(255,255,255,0.1)_transparent]",r==="vertical"&&"overflow-y-auto overflow-x-hidden",r==="horizontal"&&"overflow-x-auto overflow-y-hidden",r==="both"&&"overflow-auto",a==="sm"&&"[&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar]:h-1.5",a==="md"&&"[&::-webkit-scrollbar]:w-2.5 [&::-webkit-scrollbar]:h-2.5",a==="lg"&&"[&::-webkit-scrollbar]:w-4 [&::-webkit-scrollbar]:h-4",e),...n,children:t}));Me.displayName="ScrollArea";function Vx({value:e,onChange:t,placeholder:r="Pick date & time",className:a}){let[n,o]=useState(e),[s,l]=useState(false),[c,d]=useState(e?e.getHours():12),[m,u]=useState(e?e.getMinutes():0);useEffect(()=>{e&&(o(e),d(e.getHours()),u(e.getMinutes()));},[e]);let p=g=>{let f=new Date(g);f.setHours(c),f.setMinutes(m),o(f),t?.(f);},b=(g,f)=>{let v=parseInt(f,10);if(isNaN(v))return;let w=c,y=m;g==="hours"?(v=Math.max(0,Math.min(23,v)),d(v),w=v):(v=Math.max(0,Math.min(59,v)),u(v),y=v);let k=n||new Date,N=new Date(k);N.setHours(w),N.setMinutes(y),o(N),t?.(N);},h=g=>g.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"});return jsxs(qe,{open:s,onOpenChange:l,children:[jsxs(Ge,{onMouseMove:g=>{let f=g.currentTarget.getBoundingClientRect(),v=g.clientX-f.left,w=g.clientY-f.top;g.currentTarget.style.setProperty("--x",`${v}px`),g.currentTarget.style.setProperty("--y",`${w}px`);},className:i("group relative flex h-11 w-full items-center justify-between rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-2 text-sm text-gray-900 dark:text-white transition-all duration-200 overflow-hidden","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/15",!n&&"text-gray-400 dark:text-white/40",a),children:[jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--x) var(--y), rgba(0,0,0,0.06), transparent 40%)"}}),jsx("span",{className:"relative z-10",children:n?h(n):r}),jsxs("div",{className:"flex items-center gap-2 text-gray-400 dark:text-white/40",children:[jsx(Calendar,{className:"h-4 w-4"}),jsx(Clock,{className:"h-4 w-4"})]})]}),jsx(je,{className:"w-auto p-0 border-none bg-transparent shadow-none",align:"start",children:jsx("div",{className:"flex flex-col rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/40 backdrop-blur-xl shadow-2xl dark:shadow-black/50",children:jsxs("div",{className:"flex",children:[jsx("div",{className:"p-4 border-r border-gray-200 dark:border-white/10",children:jsx(Ur,{value:n,onChange:p,className:"border-0 p-0 bg-transparent backdrop-blur-none shadow-none rounded-none"})}),jsxs("div",{className:"flex flex-col p-4 w-[160px] h-[340px]",children:[jsx("div",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-white/70",children:"Time"}),jsxs("div",{className:"flex flex-1 gap-2 min-h-0 overflow-hidden",children:[jsxs(Me,{className:"flex-1 flex flex-col gap-1",scrollbarSize:"sm",children:[jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 text-center mb-1 sticky top-0 bg-white dark:bg-[#0A0A0A] py-1 z-10",children:"Hr"}),jsx("div",{className:"flex flex-col gap-1",children:Array.from({length:24}).map((g,f)=>jsx("button",{onClick:()=>b("hours",f.toString()),className:i("w-full rounded-lg px-1 py-1.5 text-sm transition-colors text-center shrink-0",c===f?"bg-emerald-500 dark:bg-emerald-600/80 text-white font-medium":"text-gray-700 dark:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white"),children:f.toString().padStart(2,"0")},f))})]}),jsx("div",{className:"w-[1px] bg-gray-200 dark:bg-white/[0.06]"}),jsxs(Me,{className:"flex-1 flex flex-col gap-1",scrollbarSize:"sm",children:[jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 text-center mb-1 sticky top-0 bg-white dark:bg-[#0A0A0A] py-1 z-10",children:"Min"}),jsx("div",{className:"flex flex-col gap-1",children:Array.from({length:60}).map((g,f)=>jsx("button",{onClick:()=>b("minutes",f.toString()),className:i("w-full rounded-lg px-1 py-1.5 text-sm transition-colors text-center shrink-0",m===f?"bg-emerald-500 dark:bg-emerald-600/80 text-white font-medium":"text-gray-700 dark:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white"),children:f.toString().padStart(2,"0")},f))})]})]})]})]})})})]})}var lr=be__default.forwardRef(({className:e,label:t,error:r,id:a,disabled:n,...o},s)=>{let l=be__default.useId(),c=a||l;return jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&jsx(U,{htmlFor:c,className:i(n&&"opacity-50 cursor-not-allowed"),children:t}),jsx("textarea",{ref:s,id:c,disabled:n,className:i("w-full rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3","border border-gray-200 dark:border-white/[0.10]","text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-white/30","focus:outline-none focus:ring-2 focus:ring-purple-400/30","resize-none","disabled:cursor-not-allowed disabled:opacity-50",r&&"border-rose-400/25 focus:ring-rose-300/25",e),...o}),r&&jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:r})]})});lr.displayName="Textarea";var Il=be__default.forwardRef((e,t)=>{let[r,a]=useState(false);return jsx(pt,{...e,ref:t,type:r?"text":"password",rightIcon:jsx(R,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-white/10",onClick:()=>a(!r),"aria-label":r?"Hide password":"Show password",children:r?jsx(EyeOff,{className:"h-4 w-4 text-gray-400 dark:text-white/35"}):jsx(Eye,{className:"h-4 w-4 text-gray-400 dark:text-white/35"})})})});Il.displayName="PasswordInput";var Vl=cva("inline-flex items-center gap-1 rounded-full border px-2.5 py-1 text-xs font-medium whitespace-nowrap transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-white/[0.06] dark:text-white/70 dark:border-white/10",neutral:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-white/[0.06] dark:text-white/70 dark:border-white/10",success:"bg-emerald-100 text-emerald-700 border-emerald-200 dark:bg-emerald-400/15 dark:text-emerald-200 dark:border-emerald-400/20",warning:"bg-amber-100 text-amber-700 border-amber-200 dark:bg-amber-400/15 dark:text-amber-200 dark:border-amber-400/20",danger:"bg-rose-100 text-rose-700 border-rose-200 dark:bg-rose-400/15 dark:text-rose-200 dark:border-rose-400/20",info:"bg-sky-100 text-sky-700 border-sky-200 dark:bg-sky-400/15 dark:text-sky-200 dark:border-sky-400/20",outline:"bg-transparent text-white/60 border-white/10 hover:bg-white/[0.06]"}},defaultVariants:{variant:"default"}}),Be=be__default.forwardRef(({className:e,variant:t,...r},a)=>jsx("span",{ref:a,className:i(Vl({variant:t}),e),...r}));Be.displayName="Badge";function cv({label:e,placeholder:t="Add tag...",tags:r,onChange:a,error:n,className:o}){let[s,l]=useState(""),c=m=>{m.key==="Enter"&&s.trim()?(m.preventDefault(),r.includes(s.trim())||a([...r,s.trim()]),l("")):m.key==="Backspace"&&!s&&r.length>0&&a(r.slice(0,-1));},d=m=>{a(r.filter(u=>u!==m));};return jsxs("div",{className:i("flex flex-col gap-1.5",o),children:[e&&jsx(U,{children:e}),jsxs("div",{className:i("flex flex-wrap gap-2 rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-3 py-2 border border-gray-200 dark:border-white/[0.10] focus-within:ring-2 focus-within:ring-purple-400/30 transition-all duration-200",n&&"border-rose-400/25"),children:[r.map(m=>jsxs(Be,{variant:"default",className:"gap-1 pr-1",children:[m,jsx("button",{type:"button",onClick:()=>d(m),className:"rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10 transition-colors",children:jsx(X,{className:"h-3 w-3"})})]},m)),jsx("input",{type:"text",value:s,onChange:m=>l(m.target.value),onKeyDown:c,placeholder:r.length===0?t:"",className:"flex-1 bg-transparent py-1 text-sm outline-none placeholder:text-gray-400 dark:placeholder:text-white/30 min-w-[120px]"})]}),n&&jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:n})]})}function fv({label:e,value:t,onChange:r,error:a,className:n}){return jsxs("div",{className:i("flex flex-col gap-1.5",n),children:[e&&jsx(U,{children:e}),jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:"h-10 w-10 rounded-xl border border-gray-200 dark:border-white/10 overflow-hidden relative",style:{backgroundColor:t},children:jsx("input",{type:"color",value:t,onChange:o=>r(o.target.value),className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full"})}),jsx("input",{type:"text",value:t,onChange:o=>r(o.target.value),className:"flex-1 rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-2 border border-gray-200 dark:border-white/[0.10] text-sm focus:outline-none focus:ring-2 focus:ring-purple-400/30 transition-all"})]}),a&&jsx("p",{className:"text-xs text-rose-400",children:a})]})}var cn=createContext({}),Ul=be__default.forwardRef(({className:e,value:t,onChange:r,name:a,disabled:n,label:o,children:s,...l},c)=>{let d=be__default.useId();return jsxs("div",{ref:c,className:i("flex flex-col gap-2",e),...l,children:[o&&jsx(U,{className:i(n&&"opacity-50 cursor-not-allowed"),children:o}),jsx("div",{className:"flex flex-col gap-2",role:"radiogroup",children:jsx(cn.Provider,{value:{value:t,onChange:r,name:a||d,disabled:n},children:s})})]})});Ul.displayName="RadioGroup";var Wl=be__default.forwardRef(({className:e,value:t,label:r,disabled:a,...n},o)=>{let s=useContext(cn),l=s.value===t,c=s.disabled||a,d=be__default.useId();return jsxs("label",{htmlFor:d,className:i("flex items-center gap-3 cursor-pointer group",c&&"cursor-not-allowed opacity-50",e),children:[jsxs("div",{className:"relative flex items-center justify-center",children:[jsx("input",{ref:o,id:d,type:"radio",name:s.name,value:t,checked:l,disabled:c,onChange:m=>{m.target.checked&&s.onChange?.(t);},className:"peer sr-only",...n}),jsx("div",{className:i("h-5 w-5 rounded-full border border-gray-300 dark:border-white/20 bg-gray-50 dark:bg-white/[0.03] transition-all duration-200","peer-focus-visible:ring-2 peer-focus-visible:ring-gray-400 dark:peer-focus-visible:ring-white/20 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-white dark:peer-focus-visible:ring-offset-[#0A0A0A]","group-hover:bg-gray-100 dark:group-hover:bg-white/[0.05]",l&&"border-gray-900 bg-gray-900 dark:border-white dark:bg-white"),children:l&&jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:jsx("div",{className:"h-2 w-2 rounded-full bg-white dark:bg-black"})})})]}),r&&jsx("span",{className:"text-sm text-gray-900 dark:text-white/90 select-none font-medium",children:r})]})});Wl.displayName="RadioGroupItem";var mr=be__default.createContext({}),Yl=be__default.forwardRef(({className:e,...t},r)=>{let a=be__default.useId();return jsx(mr.Provider,{value:{id:a},children:jsx("div",{ref:r,className:i("space-y-2",e),...t})})});Yl.displayName="FormItem";var _l=be__default.forwardRef(({className:e,...t},r)=>{let{id:a}=be__default.useContext(mr);return jsx(U,{ref:r,className:i("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),htmlFor:a,...t})});_l.displayName="FormLabel";var Xl=be__default.forwardRef(({...e},t)=>{let{id:r}=be__default.useContext(mr),{children:a,...n}=e;return be__default.isValidElement(a)?be__default.cloneElement(a,{id:r,"aria-describedby":`${r}-description ${r}-message`,...n,...a.props}):jsx("div",{ref:t,...e})});Xl.displayName="FormControl";var ql=be__default.forwardRef(({className:e,...t},r)=>{let{id:a}=be__default.useContext(mr);return jsx("p",{ref:r,id:`${a}-description`,className:i("text-xs text-white/50",e),...t})});ql.displayName="FormDescription";var Gl=be__default.forwardRef(({className:e,children:t,...r},a)=>{let{id:n}=be__default.useContext(mr);return t?jsx("p",{ref:a,id:`${n}-message`,className:i("text-xs font-medium text-rose-500",e),...r,children:t}):null});Gl.displayName="FormMessage";var ec=cva("relative flex flex-col items-center justify-center rounded-2xl border-2 border-dashed transition-all duration-200 text-center",{variants:{isDragActive:{true:"border-blue-500 bg-blue-50 dark:bg-blue-500/10",false:"border-gray-200 bg-gray-50 hover:bg-gray-100 dark:border-white/10 dark:bg-white/[0.02] dark:hover:bg-white/[0.05]"},error:{true:"border-rose-500 bg-rose-50 dark:bg-rose-500/10",false:""}},defaultVariants:{isDragActive:false,error:false}}),tc=be__default.forwardRef(({className:e,onDrop:t,maxFiles:r=1,maxSize:a,label:n="Upload files",description:o="Drag & drop or click to upload",...s},l)=>{let[c,d]=useState(false),[m,u]=useState([]),[p,b]=useState(null),h=be__default.useRef(null),x=k=>{k.preventDefault(),d(true);},g=k=>{k.preventDefault(),d(false);},f=k=>r&&k.length>r?(b(`Max ${r} files allowed`),false):a&&k.some(T=>T.size>a)?(b(`File too large (max ${a/1024/1024}MB)`),false):(b(null),true),v=k=>{k.preventDefault(),d(false);let N=Array.from(k.dataTransfer.files);f(N)&&(u(N),t?.(N));},w=k=>{if(k.target.files){let N=Array.from(k.target.files);f(N)&&(u(N),t?.(N));}},y=(k,N)=>{N.stopPropagation();let T=m.filter((C,M)=>M!==k);u(T),t?.(T);};return jsxs("div",{className:"w-full space-y-4",children:[jsxs("div",{ref:l,className:i(ec({isDragActive:c,error:!!p,className:e}),"p-8 cursor-pointer"),onDragOver:x,onDragLeave:g,onDrop:v,onClick:()=>h.current?.click(),...s,children:[jsx("input",{ref:h,type:"file",className:"hidden",multiple:r>1,onChange:w}),jsx("div",{className:"mb-4 rounded-full bg-gray-100 p-3 dark:bg-white/[0.06]",children:jsx(Upload,{className:"h-6 w-6 text-gray-500 dark:text-white/70"})}),jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n}),jsx("div",{className:"mt-1 text-xs text-gray-500 dark:text-white/50",children:o}),p&&jsx("div",{className:"mt-2 text-xs font-medium text-rose-500",children:p})]}),m.length>0&&jsx("div",{className:"grid gap-2",children:m.map((k,N)=>jsxs("div",{className:"flex items-center justify-between rounded-xl border border-gray-200 bg-white p-3 dark:border-white/10 dark:bg-white/[0.03]",children:[jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-gray-100 dark:bg-white/[0.06]",children:jsx(File,{className:"h-4 w-4 text-gray-500 dark:text-white/70"})}),jsxs("div",{className:"flex flex-col",children:[jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white truncate max-w-[200px]",children:k.name}),jsxs("span",{className:"text-xs text-gray-500 dark:text-white/50",children:[(k.size/1024).toFixed(1)," KB"]})]})]}),jsx("button",{onClick:T=>y(N,T),className:"rounded-full p-1 hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50",children:jsx(X,{className:"h-4 w-4"})})]},N))})]})});tc.displayName="FileDropzone";var ic=cva("flex items-center gap-2",{variants:{size:{sm:"[&>input]:h-8 [&>input]:w-8 [&>input]:text-sm",md:"[&>input]:h-10 [&>input]:w-10 [&>input]:text-base",lg:"[&>input]:h-12 [&>input]:w-12 [&>input]:text-lg"}},defaultVariants:{size:"md"}}),lc=be__default.forwardRef(({className:e,size:t,length:r=6,value:a="",onChange:n,onComplete:o,disabled:s,error:l,...c},d)=>{let[m,u]=useState(new Array(r).fill("")),p=useRef([]);useEffect(()=>{let g=a.split("").slice(0,r),f=[...g,...new Array(r-g.length).fill("")];u(f);},[a,r]);let b=(g,f)=>{let v=g.target.value;if(isNaN(Number(v)))return;let w=[...m];w[f]=v.substring(v.length-1),u(w);let y=w.join("");n?.(y),v&&f<r-1&&p.current[f+1]?.focus(),y.length===r&&o?.(y);},h=(g,f)=>{g.key==="Backspace"&&!m[f]&&f>0&&p.current[f-1]?.focus();},x=g=>{g.preventDefault();let f=g.clipboardData.getData("text/plain").slice(0,r);if(!/^\d+$/.test(f))return;let v=[...m];f.split("").forEach((y,k)=>{v[k]=y;}),u(v);let w=v.join("");n?.(w),w.length===r&&o?.(w),p.current[Math.min(f.length,r-1)]?.focus();};return jsx("div",{ref:d,className:i(ic({size:t,className:e})),...c,children:m.map((g,f)=>jsx("input",{ref:v=>p.current[f]=v,type:"text",inputMode:"numeric",maxLength:1,value:g,disabled:s,onChange:v=>b(v,f),onKeyDown:v=>h(v,f),onPaste:x,className:i("rounded-2xl border bg-gray-50 text-center font-semibold transition-all duration-200","focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed","dark:bg-white/[0.03] dark:text-white",l?"border-rose-500 text-rose-500 focus:border-rose-500 focus:ring-rose-500/20":"border-gray-200 dark:border-white/10")},f))})});lc.displayName="OTPInput";var pc=cva("flex items-center rounded-2xl border bg-gray-50 dark:bg-white/[0.03] dark:border-white/10",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},error:{true:"border-rose-500",false:"border-gray-200"}},defaultVariants:{size:"md",error:false}}),fc=be__default.forwardRef(({className:e,size:t,error:r,value:a=0,onChange:n,min:o=-1/0,max:s=1/0,step:l=1,disabled:c,...d},m)=>{let u=()=>{a-l>=o&&n?.(a-l);},p=()=>{a+l<=s&&n?.(a+l);},b=h=>{let x=parseFloat(h.target.value);isNaN(x)||n?.(x);};return jsxs("div",{className:i(pc({size:t,error:r,className:e})),children:[jsx("button",{type:"button",onClick:u,disabled:c||a<=o,className:"flex h-full items-center justify-center px-3 text-gray-500 hover:text-gray-900 disabled:opacity-50 dark:text-white/50 dark:hover:text-white",children:jsx(Minus,{className:"h-3.5 w-3.5"})}),jsx("div",{className:"h-full w-px bg-gray-200 dark:bg-white/[0.06]"}),jsx("input",{ref:m,type:"number",value:a,onChange:b,disabled:c,className:"h-full w-full min-w-[3rem] bg-transparent text-center text-sm font-medium text-gray-900 focus:outline-none dark:text-white",...d}),jsx("div",{className:"h-full w-px bg-gray-200 dark:bg-white/[0.06]"}),jsx("button",{type:"button",onClick:p,disabled:c||a>=s,className:"flex h-full items-center justify-center px-3 text-gray-500 hover:text-gray-900 disabled:opacity-50 dark:text-white/50 dark:hover:text-white",children:jsx(Plus,{className:"h-3.5 w-3.5"})})]})});fc.displayName="NumberInput";var hc=cva("inline-flex items-center rounded-2xl border border-gray-200 bg-gray-50 p-1 dark:border-white/10 dark:bg-white/[0.03]",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full flex",false:""}},defaultVariants:{size:"md",fullWidth:false}}),xc=cva("inline-flex items-center justify-center whitespace-nowrap rounded-2xl px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-gray-950 dark:focus-visible:ring-gray-300",{variants:{selected:{true:"bg-white text-gray-950 shadow-sm dark:bg-gray-800 dark:text-gray-50",false:"text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-50"},fullWidth:{true:"flex-1",false:""}},defaultVariants:{selected:false,fullWidth:false}}),vc=be__default.forwardRef(({className:e,size:t,fullWidth:r,value:a,onChange:n,options:o,...s},l)=>jsx("div",{ref:l,className:i(hc({size:t,fullWidth:r,className:e})),...s,children:o.map(c=>jsxs("button",{type:"button",onClick:()=>n?.(c.value),className:i(xc({selected:a===c.value,fullWidth:r})),children:[c.icon&&jsx("span",{className:"mr-2",children:c.icon}),c.label]},c.value))}));vc.displayName="ToggleGroup";var fn={loading:jsx("svg",{className:"animate-spin text-blue-500",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),success:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-400",children:[jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-rose-400",children:[jsx("circle",{cx:"12",cy:"12",r:"10"}),jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),warning:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-400",children:[jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-400",children:[jsx("circle",{cx:"12",cy:"12",r:"10"}),jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},gn=({id:e,title:t,description:r,variant:a="default",duration:n=5e3,onDismiss:o})=>(useEffect(()=>{if(n===1/0)return;let s=setTimeout(()=>{o(e);},n);return ()=>clearTimeout(s)},[n,e,o]),jsxs("div",{role:"alert",className:i("pointer-events-auto relative flex w-full max-w-sm items-start gap-4 overflow-hidden rounded-2xl border p-4 shadow-lg transition-all","animate-in slide-in-from-right-full fade-in duration-300","bg-white dark:bg-[#0A0A0A]/90 backdrop-blur-md border-gray-200 dark:border-white/10",a==="error"&&"border-rose-200 dark:border-rose-500/30 bg-rose-50 dark:bg-rose-500/10",a==="success"&&"border-emerald-200 dark:border-emerald-500/20 bg-emerald-50 dark:bg-emerald-950/10",a==="warning"&&"border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-950/10",a==="info"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10",a==="loading"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10"),children:[a!=="default"&&fn[a]&&jsx("div",{className:"shrink-0 pt-0.5",children:fn[a]}),jsxs("div",{className:"flex-1 gap-1",children:[t&&jsx("div",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t}),r&&jsx("div",{className:"text-sm text-gray-600 dark:text-white/80",children:r})]}),jsx("button",{onClick:()=>o(e),className:"shrink-0 rounded-md p-1 text-gray-400 dark:text-white/50 opacity-0 transition-opacity hover:text-gray-900 dark:hover:text-white group-hover:opacity-100 focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20",children:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}));var Ha=createContext(void 0);function nw({children:e}){let[t,r]=useState([]),a=useCallback(l=>{r(c=>c.filter(d=>d.id!==l));},[]),n=useCallback(l=>{let c=Math.random().toString(36).substring(2,9);return r(d=>[...d,{...l,id:c,onDismiss:a}]),c},[a]),o=useCallback((l,c)=>{r(d=>d.map(m=>m.id===l?{...m,...c}:m));},[]),s=useCallback(async(l,c)=>{let d=typeof c.loading=="string"?{title:c.loading,variant:"loading"}:{variant:"loading",...c.loading},m=n({...d,duration:1/0});try{let u=await l,p=typeof c.success=="function"?c.success(u):typeof c.success=="string"?{title:c.success,variant:"success"}:c.success;return o(m,{...p,duration:5e3}),u}catch(u){let p=typeof c.error=="function"?c.error(u):typeof c.error=="string"?{title:c.error,variant:"error"}:c.error;throw o(m,{...p,duration:5e3}),u}},[n,o]);return jsxs(Ha.Provider,{value:{toast:n,dismiss:a,promise:s},children:[e,jsx("div",{className:"fixed bottom-0 right-0 z-[150] flex max-h-screen w-full flex-col-reverse gap-2 p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",children:t.map(l=>jsx(gn,{...l},l.id))})]})}var Rc={success:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-400",children:[jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-rose-400",children:[jsx("circle",{cx:"12",cy:"12",r:"10"}),jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),warning:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-400",children:[jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-400",children:[jsx("circle",{cx:"12",cy:"12",r:"10"}),jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},Mc=be__default.forwardRef(({className:e,variant:t="default",icon:r,title:a,children:n,...o},s)=>{let l=r||(t!=="default"?Rc[t]:null);return jsxs("div",{ref:s,role:"alert",className:i("relative w-full rounded-2xl border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-gray-900 dark:[&>svg]:text-white","bg-white dark:bg-[#0A0A0A]/50 backdrop-blur-md border-gray-200 dark:border-white/10 text-gray-900 dark:text-white",t==="error"&&"border-rose-200 dark:border-rose-500/20 bg-rose-50 dark:bg-rose-950/10 text-rose-900 dark:text-rose-50 [&>svg]:text-rose-600 dark:[&>svg]:text-rose-400",t==="success"&&"border-emerald-200 dark:border-emerald-500/20 bg-emerald-50 dark:bg-emerald-950/10 text-emerald-900 dark:text-emerald-50 [&>svg]:text-emerald-600 dark:[&>svg]:text-emerald-400",t==="warning"&&"border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-950/10 text-amber-900 dark:text-amber-50 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",t==="info"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10 text-blue-900 dark:text-blue-50 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",e),...o,children:[l,jsxs("div",{className:"flex flex-col gap-1",children:[a&&jsx("h5",{className:"mb-1 font-medium leading-none tracking-tight",children:a}),n&&jsx("div",{className:"text-sm opacity-90 [&_p]:leading-relaxed",children:n})]})]})});Mc.displayName="Alert";var Pc=be__default.forwardRef(({className:e,value:t=0,max:r=100,variant:a="default",size:n="md",isIndeterminate:o=false,hasStripe:s=false,indicatorClassName:l,...c},d)=>{let m=o?0:Math.min(Math.max((t||0)/r,0),1)*100,u={default:"bg-gray-900 dark:bg-white dark:shadow-[0_0_10px_rgba(255,255,255,0.5)]",success:"bg-emerald-500 shadow-sm dark:shadow-[0_0_10px_rgba(16,185,129,0.5)]",warning:"bg-amber-500 shadow-sm dark:shadow-[0_0_10px_rgba(245,158,11,0.5)]",danger:"bg-rose-500 shadow-sm dark:shadow-[0_0_10px_rgba(244,63,94,0.5)]",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 shadow-sm dark:shadow-[0_0_15px_rgba(99,102,241,0.5)]"};return jsx("div",{ref:d,role:"progressbar","aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":o?void 0:t,className:i("relative w-full overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.03] border border-gray-200 dark:border-white/5 backdrop-blur-sm",{sm:"h-1",md:"h-2",lg:"h-4"}[n],e),...c,children:jsx("div",{className:i("h-full w-full flex-1 transition-all duration-500 ease-in-out relative overflow-hidden",u[a],o&&"absolute inset-0 w-full origin-left animate-indeterminate-progress",l),style:{transform:o?void 0:`translateX(-${100-m}%)`},children:s&&!o&&jsx("div",{className:"absolute inset-0 w-full h-full animate-progress-stripe",style:{backgroundImage:"linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)",backgroundSize:"1rem 1rem"}})})})});Pc.displayName="Progress";var Dc=be__default.forwardRef(({icon:e,title:t,description:r,action:a,className:n,...o},s)=>jsx(Q,{ref:s,className:i("p-8 text-center",n),...o,children:jsxs("div",{className:"mx-auto w-full max-w-md space-y-3",children:[jsx("div",{className:"mx-auto grid h-12 w-12 place-items-center rounded-2xl border border-white/10 bg-white/[0.03] text-white/70",children:e??jsx(Info,{className:"h-5 w-5"})}),jsx("div",{className:"text-lg font-semibold text-white",children:t}),r?jsx("div",{className:"text-sm text-white/55",children:r}):null,a?jsx("div",{className:"pt-2 flex justify-center",children:a}):null]})}));Dc.displayName="EmptyState";function hn({className:e,variant:t="default",...r}){return jsx("div",{className:i("animate-pulse bg-gray-200 dark:bg-white/[0.03]",t==="circle"&&"rounded-full",t==="default"&&"rounded-2xl",t==="text"&&"rounded h-4 w-full",e),...r})}var Oc=be__default.forwardRef(({className:e,max:t=5,value:r=0,onChange:a,readOnly:n=false,size:o="md",...s},l)=>{let[c,d]=useState(null),m={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};return jsx("div",{ref:l,className:i("flex items-center gap-1",e),...s,children:Array.from({length:t}).map((u,p)=>{let b=p+1,h=(c!==null?c:r)>=b;return jsx("button",{type:"button",disabled:n,onClick:()=>a?.(b),onMouseEnter:()=>!n&&d(b),onMouseLeave:()=>!n&&d(null),className:i("transition-transform hover:scale-110 focus:outline-none",n&&"cursor-default hover:scale-100"),children:jsx(Star,{className:i(m[o],"transition-colors duration-200",h?"fill-amber-400 text-amber-400":"fill-transparent text-gray-300 dark:text-white/20")})},p)})})});Oc.displayName="Rating";var xn=cva("transition-all duration-700 ease-out",{variants:{preset:{fade:"opacity-0 translate-y-4",spring:"opacity-0 scale-95 translate-y-4","slide-right":"opacity-0 -translate-x-8","slide-left":"opacity-0 translate-x-8",blur:"opacity-0 blur-sm scale-105","3d-flip":"opacity-0 rotate-x-90"},visibleState:{fade:"opacity-100 translate-y-0",spring:"opacity-100 scale-100 translate-y-0 animate-enter-spring","slide-right":"opacity-100 translate-x-0","slide-left":"opacity-100 translate-x-0",blur:"opacity-100 blur-0 scale-100","3d-flip":"opacity-100 rotate-x-0"}},defaultVariants:{preset:"spring"}});function vn({className:e,preset:t="spring",viewport:r=true,visible:a,delay:n=0,once:o=true,asChild:s=false,children:l,style:c,...d}){let{ref:m,isInView:u,hasAnimated:p}=ze({threshold:.1,enabled:r&&a===void 0}),h=a!==void 0?a:r?o?p:u:true,x=xn({preset:t}),g=h?xn({visibleState:t}):"";return jsx(s?ut:"div",{ref:m,className:i(x,g,e),style:{transitionDelay:`${n}ms`,willChange:"transform, opacity",...c},...d,children:l})}function zw({children:e,stagger:t=100,delay:r=0,className:a,...n}){let{ref:o,hasAnimated:s}=ze({threshold:.1});return jsx("div",{ref:o,className:i("relative",a),...n,children:be__default.Children.map(e,(l,c)=>be__default.isValidElement(l)?be__default.cloneElement(l,{visible:s,viewport:false,delay:r+c*t}):l)})}function Ww({text:e,type:t="char",stagger:r=30,delay:a=0,className:n,...o}){let{ref:s,hasAnimated:l}=ze({threshold:.2}),c=t==="char"?e.split(""):e.split(" ");return jsx("div",{ref:s,className:i("flex flex-wrap",n),"aria-label":e,...o,children:c.map((d,m)=>jsxs("span",{className:i("inline-block whitespace-pre transition-all duration-500 ease-out will-change-transform",l?"opacity-100 translate-y-0 blur-0":"opacity-0 translate-y-4 blur-sm"),style:{transitionDelay:`${a+m*r}ms`},children:[d,t==="word"&&m!==c.length-1?" ":""]},m))})}function jw({children:e,speed:t=.1,direction:r="vertical",className:a,...n}){let o=useRef(null);return useEffect(()=>{let s=o.current;if(!s)return;let l=()=>{let c=s.getBoundingClientRect(),d=window.innerHeight;if(c.top>d||c.bottom<0)return;let u=(d/2-(c.top+c.height/2))*t;r==="vertical"?s.style.transform=`translate3d(0, ${u}px, 0)`:s.style.transform=`translate3d(${u}px, 0, 0)`;};return window.addEventListener("scroll",l,{passive:true}),l(),()=>window.removeEventListener("scroll",l)},[t,r]),jsx("div",{ref:o,className:i("will-change-transform",a),...n,children:e})}function ay({children:e,strength:t=.5,className:r}){let a=useRef(null),n=s=>{let l=a.current;if(!l)return;let{clientX:c,clientY:d}=s,{left:m,top:u,width:p,height:b}=l.getBoundingClientRect(),h=m+p/2,x=u+b/2,g=c-h,f=d-x,v=Math.max(p,b)*1.5;Math.abs(g)<v&&Math.abs(f)<v?(l.style.setProperty("--mag-x",`${g*t}px`),l.style.setProperty("--mag-y",`${f*t}px`)):(l.style.setProperty("--mag-x","0px"),l.style.setProperty("--mag-y","0px"));},o=()=>{let s=a.current;s&&(s.style.setProperty("--mag-x","0px"),s.style.setProperty("--mag-y","0px"));};return useEffect(()=>(window.addEventListener("mousemove",n),()=>window.removeEventListener("mousemove",n)),[t]),jsx("div",{ref:a,className:i("inline-block transition-transform duration-300 ease-out will-change-transform",r),onMouseLeave:o,style:{transform:"translate3d(var(--mag-x, 0px), var(--mag-y, 0px), 0)"},children:e})}function dy({value:e,duration:t=2e3,delay:r=0,decimalPlaces:a=0,className:n,...o}){let[s,l]=useState(0),{ref:c,hasAnimated:d}=ze({threshold:.1}),m=useRef(null);return useEffect(()=>{if(!d)return;let u=b=>{m.current||(m.current=b);let h=Math.min((b-m.current-r)/t,1);if(h>=0){let x=h*e;l(x);}h<1&&requestAnimationFrame(u);},p=setTimeout(()=>{requestAnimationFrame(u);},r);return ()=>clearTimeout(p)},[d,e,t,r]),jsx("span",{ref:c,className:i("tabular-nums tracking-tighter",n),...o,children:s.toFixed(a)})}function gy({variant:e="spinner",text:t,fullscreen:r=true,className:a,...n}){let o=r?"fixed inset-0 z-[200] flex items-center justify-center bg-white/80 dark:bg-black/80 backdrop-blur-sm":"flex items-center justify-center p-8 w-full h-full min-h-[200px]";return e==="bar"?jsx("div",{className:i("fixed top-0 left-0 right-0 z-[200] h-1 bg-transparent",a),...n,children:jsx("div",{className:"h-full bg-blue-500 animate-indeterminate-progress origin-left"})}):e==="dots"?jsxs("div",{className:i(o,a),...n,children:[jsxs("div",{className:"flex space-x-2",children:[jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce [animation-delay:-0.3s]"}),jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce [animation-delay:-0.15s]"}),jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce"})]}),t&&jsx("span",{className:"ml-4 text-sm font-medium text-gray-500 dark:text-white/70",children:t})]}):e==="logo"?jsx("div",{className:i(o,a),...n,children:jsxs("div",{className:"flex flex-col items-center gap-4",children:[jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-full bg-white dark:bg-white/[0.06] shadow-lg ring-1 ring-black/5",children:[jsx("div",{className:"absolute inset-0 rounded-full animate-ping bg-blue-500/20"}),jsx("div",{className:"h-8 w-8 rounded bg-blue-500"})]}),t&&jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-white/70 animate-pulse",children:t})]})}):e==="glass"?jsx("div",{className:i(o,"bg-white/30 dark:bg-black/30 backdrop-blur-md",a),...n,children:jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsx(Loader2,{className:"h-8 w-8 animate-spin text-white"}),t&&jsx("span",{className:"text-sm font-medium text-white tracking-wider",children:t})]})}):jsx("div",{className:i(o,a),...n,children:jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsx(Loader2,{className:"h-8 w-8 animate-spin text-blue-500"}),t&&jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-white/70",children:t})]})})}function yy({preset:e="fade",duration:t=300,useViewTransition:r=false,className:a,children:n,...o}){let[s,l]=useState(false);useEffect(()=>{if(r&&document.startViewTransition)document.startViewTransition(()=>{l(true);});else {let m=requestAnimationFrame(()=>{l(true);});return ()=>cancelAnimationFrame(m)}},[r]);let d={fade:{initial:"opacity-0",animate:"opacity-100"},"slide-up":{initial:"opacity-0 translate-y-8",animate:"opacity-100 translate-y-0"},scale:{initial:"opacity-0 scale-95",animate:"opacity-100 scale-100"},blur:{initial:"opacity-0 blur-sm",animate:"opacity-100 blur-0"},none:{initial:"",animate:""}}[e];return jsx("div",{className:i("transition-all ease-out",s?d.animate:d.initial,a),style:{transitionDuration:`${t}ms`,viewTransitionName:r?"page-content":void 0},...o,children:n})}var sd={sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-14 w-14 text-base",xl:"h-20 w-20 text-xl"},V=be__default.forwardRef(({className:e,src:t,alt:r,fallback:a,size:n="md",...o},s)=>{let[l,c]=useState(false);return useEffect(()=>{c(false);},[t]),jsx("div",{ref:s,className:i("relative flex shrink-0 overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.06]",sd[n],e),...o,children:t&&!l?jsx("img",{src:t,alt:r,className:"aspect-square h-full w-full object-cover",onError:()=>c(true)}):jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-100 dark:bg-white/5 text-gray-600 dark:text-white/70 font-medium",children:a||(r?r.charAt(0).toUpperCase():"?")})})});V.displayName="Avatar";var Oa=createContext(void 0);function Dy({type:e="single",defaultValue:t,value:r,onValueChange:a,className:n,children:o,...s}){let[l,c]=useState(t||(e==="multiple"?[]:"")),d=r!==void 0?r:l,m=u=>{let p;if(e==="multiple"){let b=Array.isArray(d)?d:[];b.includes(u)?p=b.filter(h=>h!==u):p=[...b,u];}else p=d===u?"":u;r===void 0&&c(p),a?.(p);};return jsx(Oa.Provider,{value:{value:d,onValueChange:m,type:e},children:jsx("div",{className:i("space-y-2",n),...s,children:o})})}var za=createContext({value:"",isOpen:false});function Hy({className:e,value:t,children:r,...a}){let n=useContext(Oa),o=Array.isArray(n?.value)?n?.value.includes(t):n?.value===t;return jsx(za.Provider,{value:{value:t,isOpen:!!o},children:jsx("div",{className:i("overflow-hidden rounded-2xl border border-gray-200 dark:border-white/5 bg-gray-50 dark:bg-white/[0.03] transition-all duration-200",o&&"bg-white dark:bg-white/[0.04] border-gray-300 dark:border-white/10",e),...a,children:r})})}function Iy({className:e,children:t,...r}){let a=useContext(Oa),{value:n,isOpen:o}=useContext(za);return jsxs("button",{type:"button",onClick:()=>a?.onValueChange(n),"aria-expanded":o,"aria-controls":`accordion-content-${n}`,id:`accordion-trigger-${n}`,className:i("flex w-full items-center justify-between px-4 py-3 text-sm font-medium text-gray-900 dark:text-white transition-all hover:text-gray-700 dark:hover:text-white/90 focus:outline-none",e),...r,children:[t,jsx(ChevronDown,{className:i("h-4 w-4 shrink-0 text-gray-400 dark:text-white/50 transition-transform duration-200",o&&"rotate-180 text-gray-900 dark:text-white")})]})}function Ay({className:e,children:t,...r}){let{isOpen:a,value:n}=useContext(za);return a?jsx("div",{id:`accordion-content-${n}`,role:"region","aria-labelledby":`accordion-trigger-${n}`,className:i("px-4 pb-3 pt-0 text-sm text-gray-600 dark:text-white/70 animate-in slide-in-from-top-1 fade-in duration-200",e),...r,children:t}):null}be__default.createContext(null);var ur=be__default.forwardRef(({className:e,wrapperClassName:t,rounded:r=false,maxHeight:a,...n},o)=>jsx(Me,{className:i("w-full",r&&"rounded-2xl border border-white/10",t),style:{maxHeight:a},orientation:a?"both":"horizontal",scrollbarSize:"sm",children:jsx("table",{ref:o,className:i("w-full caption-bottom text-sm text-left",e),...n})}));ur.displayName="Table";var pr=be__default.forwardRef(({className:e,...t},r)=>jsx("thead",{ref:r,className:i("bg-white/[0.02] text-white/55",e),...t}));pr.displayName="TableHeader";var fr=be__default.forwardRef(({className:e,...t},r)=>jsx("tbody",{ref:r,className:i("[&_tr:last-child]:border-0",e),...t}));fr.displayName="TableBody";var tt=be__default.forwardRef(({className:e,hoverable:t=true,optimized:r=false,...a},n)=>jsx("tr",{ref:n,className:i("border-t border-white/10 transition-colors data-[state=selected]:bg-white/[0.04]",t&&"hover:bg-white/[0.02]",e),style:r?{contentVisibility:"auto",containIntrinsicSize:"0 56px"}:void 0,...a}));tt.displayName="TableRow";var Qe=be__default.forwardRef(({className:e,...t},r)=>jsx("th",{ref:r,className:i("h-10 px-5 py-3 text-left align-middle font-semibold text-white/55 [&:has([role=checkbox])]:pr-0 whitespace-nowrap",e),...t}));Qe.displayName="TableHead";var $e=be__default.forwardRef(({className:e,...t},r)=>jsx("td",{ref:r,className:i("p-5 align-middle [&:has([role=checkbox])]:pr-0 text-white/85 whitespace-nowrap",e),...t}));$e.displayName="TableCell";function jy({data:e,columns:t,searchPlaceholder:r="Search...",searchKeys:a,onRowClick:n,className:o,maxHeight:s,rounded:l=true}){let[c,d]=useState(""),[m,u]=useState({key:"",direction:null}),p=useMemo(()=>{let h=[...e];return c&&a&&(h=h.filter(x=>a.some(g=>String(x[g]??"").toLowerCase().includes(c.toLowerCase())))),m.key&&m.direction&&h.sort((x,g)=>{let f=x[m.key],v=g[m.key];return f==null||v===void 0||v===null?0:f<v?m.direction==="asc"?-1:1:f>v?m.direction==="asc"?1:-1:0}),h},[e,c,a,m]),b=h=>{u(x=>({key:h,direction:x.key===h&&x.direction==="asc"?"desc":"asc"}));};return jsxs("div",{className:i("space-y-4",o),children:[a&&jsx("div",{className:"relative max-w-sm",children:jsx(pt,{placeholder:r,value:c,onChange:h=>d(h.target.value),leftIcon:jsx(Search,{className:"w-4 h-4 text-white/40"})})}),jsxs(ur,{rounded:l,maxHeight:s,children:[jsx(pr,{children:jsx(tt,{children:t.map(h=>jsx(Qe,{className:i(h.sortable&&"cursor-pointer select-none hover:text-cyan-500 transition-colors",h.className),onClick:()=>h.sortable&&b(h.key),children:jsxs("div",{className:"flex items-center gap-2",children:[h.header,h.sortable&&jsx("span",{className:"text-white/30",children:m.key===h.key?m.direction==="asc"?jsx(ArrowUp,{className:"w-3 h-3 text-cyan-500"}):jsx(ArrowDown,{className:"w-3 h-3 text-cyan-500"}):jsx(ArrowUpDown,{className:"w-3 h-3"})})]})},String(h.key)))})}),jsxs(fr,{children:[p.map((h,x)=>jsx(tt,{onClick:()=>n?.(h),className:i(n&&"cursor-pointer hover:bg-white/[0.03] transition-colors group"),children:t.map(g=>jsx($e,{className:g.className,children:g.render?g.render(h):h[g.key]},String(g.key)))},x)),p.length===0&&jsx(tt,{children:jsxs($e,{colSpan:t.length,className:"h-32 text-center text-white/40",children:['No results found for "',c,'"']})})]})]})]})}var $a=be__default.forwardRef(({className:e,containerClassName:t,alt:r,src:a,fallback:n,onLoad:o,onError:s,...l},c)=>{let[d,m]=useState(true),[u,p]=useState(false),b=x=>{m(false),o?.(x);},h=x=>{m(false),p(true),s?.(x);};return u&&n?jsx(Fragment,{children:n}):jsxs("div",{className:i("relative overflow-hidden rounded-2xl bg-gray-100 dark:bg-white/[0.02] border border-gray-200 dark:border-white/10",t),children:[d&&jsx(hn,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:c,src:a,alt:r,onLoad:b,onError:h,className:i("h-full w-full object-cover transition-opacity duration-300",d?"opacity-0":"opacity-100",e),...l})]})});$a.displayName="Image";var wd=cva("flex flex-col gap-4 rounded-2xl border p-4 transition-all duration-200",{variants:{variant:{default:"bg-white border-gray-200 dark:bg-white/[0.03] dark:border-white/10",glass:"backdrop-blur-md bg-white/80 border-white/20 dark:bg-black/40 dark:border-white/10"}},defaultVariants:{variant:"default"}}),yd=be__default.forwardRef(({className:e,variant:t,user:r,onFollow:a,onMessage:n,...o},s)=>jsxs("div",{ref:s,className:i(wd({variant:t,className:e})),...o,children:[jsxs("div",{className:"flex items-start justify-between",children:[jsxs("div",{className:"flex gap-3",children:[jsx(V,{src:r.avatarSrc,alt:r.name,size:"lg"}),jsxs("div",{children:[jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:r.name}),r.role&&jsx("span",{className:"text-xs text-gray-500 dark:text-white/50",children:r.role}),r.email&&jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 mt-0.5",children:r.email})]})]}),a&&jsx(R,{size:"sm",variant:"outline",onClick:a,children:"Follow"})]}),r.bio&&jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 line-clamp-2",children:r.bio}),r.stats&&jsx("div",{className:"flex gap-4 border-t border-gray-100 pt-3 dark:border-white/5",children:r.stats.map((l,c)=>jsxs("div",{className:"flex flex-col",children:[jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:l.value}),jsx("span",{className:"text-[10px] text-gray-500 dark:text-white/40",children:l.label})]},c))}),n&&jsx(R,{className:"w-full mt-2",onClick:n,children:"Message"})]}));yd.displayName="UserPreview";var Td=cva("relative pl-8 pb-8 last:pb-0",{variants:{status:{default:"[&>div:first-child]:bg-gray-200 dark:[&>div:first-child]:bg-white/20",active:"[&>div:first-child]:bg-blue-500",success:"[&>div:first-child]:bg-emerald-500",error:"[&>div:first-child]:bg-rose-500"}},defaultVariants:{status:"default"}}),Cd=be__default.forwardRef(({className:e,status:t,title:r,date:a,description:n,icon:o,isLast:s,...l},c)=>jsxs("div",{ref:c,className:i(Td({status:t,className:e})),...l,children:[!s&&jsx("div",{className:"absolute left-[11px] top-[24px] bottom-0 w-px bg-gray-200 dark:bg-white/[0.06]"}),jsx("div",{className:i("absolute left-0 top-1.5 flex h-6 w-6 items-center justify-center rounded-full border-2 border-white dark:border-black ring-1 ring-transparent transition-colors",t==="active"?"bg-blue-500 ring-blue-500/30":t==="success"?"bg-emerald-500 ring-emerald-500/30":t==="error"?"bg-rose-500 ring-rose-500/30":"bg-gray-200 dark:bg-white/20"),children:o&&jsx("span",{className:"text-white text-[10px]",children:o})}),jsxs("div",{className:"flex flex-col gap-1",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:r}),a&&jsx("span",{className:"text-xs text-gray-500 dark:text-white/40",children:a})]}),n&&jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:n})]})]}));Cd.displayName="TimelineItem";var fk=({children:e,className:t})=>jsx("div",{className:i("flex flex-col",t),children:e});var Cn=({node:e,depth:t=0,onSelect:r})=>{let[a,n]=useState(false),o=e.children&&e.children.length>0,s=l=>{l.stopPropagation(),o&&n(!a),r?.(e);};return jsxs("div",{children:[jsxs("div",{className:i("flex items-center gap-2 rounded-lg px-2 py-1.5 text-sm text-gray-700 transition-colors hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-white/[0.03] cursor-pointer"),style:{paddingLeft:`${t*12+8}px`},onClick:s,children:[o?jsx("span",{className:"text-gray-400 dark:text-white/40",children:a?jsx(ChevronDown,{className:"h-4 w-4"}):jsx(ChevronRight,{className:"h-4 w-4"})}):jsx("span",{className:"w-4"}),e.icon?jsx("span",{className:"text-gray-500 dark:text-white/50",children:e.icon}):jsx("span",{className:"text-blue-500 dark:text-blue-400",children:o?a?jsx(FolderOpen,{className:"h-4 w-4"}):jsx(Folder,{className:"h-4 w-4"}):jsx(File,{className:"h-4 w-4"})}),jsx("span",{className:"truncate",children:e.label})]}),a&&o&&jsx("div",{className:"animate-in slide-in-from-top-1 fade-in duration-200",children:e.children.map(l=>jsx(Cn,{node:l,depth:t+1,onSelect:r},l.id))})]})},yk=({data:e,className:t,onSelect:r})=>jsx("div",{className:i("w-full select-none",t),children:e.map(a=>jsx(Cn,{node:a,onSelect:r},a.id))});function Rn({title:e,view:t="board",onViewChange:r,onFilter:a,onSort:n,onAddColumn:o,canUndo:s,canRedo:l,onUndo:c,onRedo:d,className:m}){let u=[{id:"board",icon:Layout,label:"Board"},{id:"list",icon:List,label:"List"},{id:"calendar",icon:Calendar,label:"Calendar"},{id:"timeline",icon:Clock,label:"Timeline"}];return jsxs("div",{className:i("flex items-center justify-between mb-8",m),children:[jsxs("div",{className:"flex items-center gap-6",children:[jsx("h1",{className:"text-2xl font-bold text-white tracking-tight",children:e}),jsx("div",{className:"flex items-center bg-white/5 rounded-xl p-1",children:u.map(p=>jsxs("button",{onClick:()=>r?.(p.id),className:i("flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs font-medium transition-all",t===p.id?"bg-white/10 text-white shadow-lg":"text-white/40 hover:text-white/60"),children:[jsx(p.icon,{className:"h-3.5 w-3.5"}),p.label]},p.id))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("div",{className:"flex items-center gap-1 mr-2",children:[jsx(R,{variant:"ghost",size:"icon",onClick:c,disabled:!s,className:"h-8 w-8 text-white/40 disabled:opacity-20",children:jsx(Undo2,{className:"h-4 w-4"})}),jsx(R,{variant:"ghost",size:"icon",onClick:d,disabled:!l,className:"h-8 w-8 text-white/40 disabled:opacity-20",children:jsx(Redo2,{className:"h-4 w-4"})})]}),jsxs(R,{variant:"ghost",size:"sm",onClick:a,className:"gap-2 text-white/60",children:[jsx(Filter,{className:"h-4 w-4"}),"Filter"]}),jsxs(R,{variant:"ghost",size:"sm",onClick:n,className:"gap-2 text-white/60",children:[jsx(SortAsc,{className:"h-4 w-4"}),"Sort"]}),jsx("div",{className:"w-px h-4 bg-white/10 mx-2"}),jsxs(R,{size:"sm",onClick:o,className:"gap-2",children:[jsx(Plus,{className:"h-4 w-4"}),"Add Column"]}),jsx(R,{variant:"ghost",size:"icon",className:"h-9 w-9 text-white/40",children:jsx(MoreHorizontal,{className:"h-4 w-4"})})]})]})}function Ln({count:e,limit:t,className:r}){if(!t)return null;let a=e>t,n=Math.min(e/t*100,100);return jsxs("div",{className:i("flex items-center gap-3",r),children:[jsx("div",{className:"flex-1 h-1 bg-white/5 rounded-full overflow-hidden",children:jsx("div",{className:i("h-full transition-all duration-500",a?"bg-red-500":n>80?"bg-orange-500":"bg-blue-500"),style:{width:`${n}%`}})}),jsxs("div",{className:i("flex items-center gap-1.5 text-[10px] font-bold px-2 py-0.5 rounded-full",a?"bg-red-500/20 text-red-400":"bg-white/5 text-white/40"),children:[a&&jsx(AlertCircle,{className:"h-3 w-3"}),e,"/",t]})]})}var Wa=be__default.memo(({task:e,isSelected:t,showTimer:r,onEdit:a,onDelete:n,draggable:o=true,activeTimerTaskId:s,selectable:l,cardClassName:c,onTaskClick:d,onTaskSelectionChange:m,onTaskTimerToggle:u,onDragStart:p,onDragOver:b,onDrop:h,renderCard:x})=>{if(x)return jsx(Fragment,{children:x(e)});let g=f=>{switch(f){case "urgent":return "danger";case "high":return "warning";case "medium":return "info";case "low":return "success";default:return "neutral"}};return jsx(Q,{onClick:f=>d?.(f,e),draggable:o,onDragStart:p,onDragOver:b,onDrop:h,className:i("p-6 border border-white/10 bg-white/[0.03] hover:bg-white/[0.06] transition-all duration-200 rounded-2xl group cursor-grab active:cursor-grabbing",e.blockedBy&&e.blockedBy.length>0&&"border-red-500/30 bg-red-500/[0.02]",t&&"ring-2 ring-cyan-500/50 bg-cyan-500/[0.02]",c),children:jsxs("div",{className:"flex flex-col gap-3",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[l&&jsx(ka,{checked:t,onChange:f=>{m?.(t?[]:[e.id]);},onClick:f=>f.stopPropagation(),className:"mr-1"}),e.blockedBy&&e.blockedBy.length>0&&jsx(Lock,{className:"h-3.5 w-3.5 text-red-500 flex-shrink-0"}),jsx(ge,{className:i("font-medium text-sm leading-tight group-hover:text-cyan-400 transition-colors truncate",e.blockedBy&&e.blockedBy.length>0&&"text-red-400/80"),children:e.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[n&&jsx("button",{onClick:f=>{f.stopPropagation(),n(e.id);},className:"p-1 rounded-md hover:bg-red-500/20 text-white/20 hover:text-red-400 transition-colors",children:jsx(Trash2,{className:"h-3.5 w-3.5"})}),o&&jsx(GripVertical,{className:"h-4 w-4 text-white/20 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]})]}),e.description&&jsx(ge,{className:"text-xs text-white/50 line-clamp-2",children:e.description}),e.progress!==void 0&&jsxs("div",{className:"space-y-1.5",children:[jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[jsx("span",{className:"text-white/30 uppercase font-bold tracking-wider",children:"Progress"}),jsxs("span",{className:"text-white/50",children:[e.progress,"%"]})]}),jsx("div",{className:"h-1 w-full bg-white/[0.03] rounded-full overflow-hidden",children:jsx("div",{className:"h-full bg-cyan-500 transition-all duration-500",style:{width:`${e.progress}%`}})})]}),jsxs("div",{className:"flex flex-wrap gap-2 mt-1",children:[e.priority&&jsx(Be,{variant:g(e.priority),className:"text-[10px] px-1.5 py-0 uppercase font-bold",children:e.priority}),e.tags?.map(f=>jsx(Be,{variant:"neutral",className:"text-[10px] px-1.5 py-0 bg-white/[0.03] border-white/5",children:f},f))]}),jsxs("div",{className:"flex items-center justify-between mt-2 pt-3 border-t border-white/5",children:[jsxs("div",{className:"flex items-center gap-3 text-[10px] text-white/30",children:[e.timeSpent!==void 0&&jsxs("div",{className:i("flex items-center gap-1 px-1.5 py-0.5 rounded-md transition-colors",s===e.id?"bg-cyan-500/20 text-cyan-400":"bg-white/[0.03]"),children:[s===e.id?jsx(Pause,{className:"h-2.5 w-2.5 cursor-pointer hover:scale-110 transition-transform",onClick:f=>{f.stopPropagation(),u?.(e.id);}}):jsx(Play,{className:"h-2.5 w-2.5 cursor-pointer hover:scale-110 transition-transform",onClick:f=>{f.stopPropagation(),u?.(e.id);}}),jsxs("span",{className:"font-mono",children:[Math.floor(e.timeSpent/3600),"h ",Math.floor(e.timeSpent%3600/60),"m"]})]}),e.comments!==void 0&&jsxs("div",{className:"flex items-center gap-1",children:[jsx(MessageSquare,{className:"h-3 w-3"}),e.comments]}),e.attachments!==void 0&&jsxs("div",{className:"flex items-center gap-1",children:[jsx(Paperclip,{className:"h-3 w-3"}),e.attachments]}),e.dueDate&&jsxs("div",{className:"flex items-center gap-1",children:[jsx(Clock,{className:"h-3 w-3"}),e.dueDate]})]}),e.assignee&&jsx("div",{className:"flex -space-x-2",children:jsx("div",{className:"h-6 w-6 rounded-full border-2 border-[#0a0a0a] bg-white/[0.06] flex items-center justify-center text-[10px] font-bold overflow-hidden",children:e.assignee.avatar?jsx("img",{src:e.assignee.avatar,alt:e.assignee.name,className:"h-full w-full object-cover"}):e.assignee.name[0]})})]})]})})});Wa.displayName="KanbanCard";function Ya({column:e,tasks:t,onAddTask:r,onCollapse:a,onTaskClick:n,onAction:o,onDragStart:s,onDragOver:l,onDrop:c,isCollapsed:d,children:m,className:u}){return jsxs("div",{className:i("flex flex-col h-full transition-all duration-300",d?"w-12":"w-80",u),onDragOver:p=>l?.(p),onDrop:p=>c?.(p),onDragStart:p=>s?.(p,e.id,"column"),draggable:!d,children:[jsxs("div",{className:i("flex items-center justify-between mb-4 px-2",d&&"flex-col gap-4"),children:[jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[jsx("button",{onClick:()=>a?.(e.id),className:"p-1 rounded hover:bg-white/5 text-white/40",children:d?jsx(ChevronRight,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"})}),!d&&jsxs(Fragment,{children:[jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:e.color||"#3b82f6"}}),jsx("h3",{className:"font-bold text-sm text-white truncate",children:e.title}),jsx("span",{className:"text-[10px] font-bold px-1.5 py-0.5 rounded-md bg-white/5 text-white/40",children:t.length})]})]}),!d&&jsxs("div",{className:"flex items-center gap-1",children:[jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>r?.(e.id),children:jsx(Plus,{className:"h-4 w-4"})}),jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>o?.("more"),children:jsx(MoreVertical,{className:"h-4 w-4"})})]})]}),!d&&e.limit&&jsx("div",{className:"px-2 mb-4",children:jsx(Ln,{count:t.length,limit:e.limit})}),jsx("div",{className:i("flex-1 overflow-y-auto min-h-0 px-2 space-y-3 custom-scrollbar",d&&"hidden"),children:m||t.map(p=>jsx(Wa,{task:p,onTaskClick:(b,h)=>n?.(h),onDragStart:b=>s?.(b,p.id,"task"),onDragOver:b=>l?.(b,p.id),onDrop:b=>c?.(b,p.id)},p.id))}),d&&jsx("div",{className:"flex-1 flex items-center justify-center",children:jsx("span",{className:"rotate-90 whitespace-nowrap text-[10px] font-bold uppercase tracking-widest text-white/20",children:e.title})})]})}function Gr({tasks:e,columns:t,onTaskClick:r,className:a}){let n=o=>t.find(s=>s.id===o);return jsx("div",{className:i("bg-white/[0.02] border border-white/5 rounded-2xl overflow-hidden",a),children:jsxs(ur,{children:[jsx(pr,{children:jsxs(tt,{className:"hover:bg-transparent border-white/5",children:[jsx(Qe,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Task"}),jsx(Qe,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Status"}),jsx(Qe,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Priority"}),jsx(Qe,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Assignee"}),jsx(Qe,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Due Date"})]})}),jsx(fr,{children:e.map(o=>{let s=n(o.columnId);return jsxs(tt,{className:"border-white/5 hover:bg-white/[0.03] cursor-pointer transition-colors",onClick:()=>r?.(o),children:[jsx($e,{className:"font-medium text-white",children:o.title}),jsx($e,{children:jsxs("div",{className:"flex items-center gap-2",children:[jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:s?.color||"#3b82f6"}}),jsx("span",{className:"text-xs text-white/60",children:s?.title})]})}),jsx($e,{children:jsx(Be,{variant:o.priority==="urgent"?"danger":o.priority==="high"?"warning":"info",className:"text-[10px] uppercase",children:o.priority||"medium"})}),jsx($e,{children:o.assignee&&jsxs("div",{className:"flex items-center gap-2",children:[jsx(V,{src:o.assignee.avatar,alt:o.assignee.name,size:"sm"}),jsx("span",{className:"text-xs text-white/60",children:o.assignee.name})]})}),jsx($e,{className:"text-xs text-white/40",children:o.dueDate?new Date(o.dueDate).toLocaleDateString():"-"})]},o.id)})})]})})}function En({tasks:e,className:t}){return jsxs("div",{className:i("p-8 bg-white/[0.02] border border-white/5 rounded-2xl flex flex-col items-center justify-center min-h-[400px]",t),children:[jsx("div",{className:"h-12 w-12 rounded-full bg-blue-500/10 flex items-center justify-center mb-4",children:jsx("div",{className:"h-6 w-6 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})}),jsx("h3",{className:"text-lg font-bold text-white mb-2",children:"Timeline View"}),jsxs("p",{className:"text-sm text-white/40 text-center max-w-xs",children:["The timeline view is currently being optimized for high-performance rendering of ",e.length," tasks."]})]})}function Sn({tasks:e,columns:t,onTaskClick:r,className:a}){return jsx(Gr,{tasks:e,columns:t,onTaskClick:r,className:a})}function Dn({tasks:e,onTaskClick:t,onAddTask:r,className:a}){let[n,o]=useState(new Date),s=(f,v)=>new Date(f,v+1,0).getDate(),l=(f,v)=>new Date(f,v,1).getDay(),c=n.getFullYear(),d=n.getMonth(),m=s(c,d),u=l(c,d),p=()=>o(new Date(c,d-1,1)),b=()=>o(new Date(c,d+1,1)),h=["January","February","March","April","May","June","July","August","September","October","November","December"],x=[];for(let f=0;f<u;f++)x.push(null);for(let f=1;f<=m;f++)x.push(new Date(c,d,f));let g=f=>e.filter(v=>{if(!v.dueDate)return false;let w=new Date(v.dueDate);return w.getDate()===f.getDate()&&w.getMonth()===f.getMonth()&&w.getFullYear()===f.getFullYear()});return jsxs("div",{className:i("flex flex-col h-full",a),children:[jsxs("div",{className:"flex items-center justify-between mb-6",children:[jsxs("div",{className:"flex items-center gap-4",children:[jsxs(cm,{level:3,className:"text-white",children:[h[d]," ",c]}),jsxs("div",{className:"flex items-center gap-1",children:[jsx(R,{variant:"ghost",size:"sm",onClick:p,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(R,{variant:"ghost",size:"sm",onClick:b,children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]}),jsx(R,{variant:"ghost",size:"sm",onClick:()=>o(new Date),children:"Today"})]}),jsxs("div",{className:"grid grid-cols-7 gap-px bg-white/5 border border-white/5 rounded-2xl overflow-hidden flex-1",children:[["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(f=>jsx("div",{className:"bg-white/[0.02] p-3 text-center",children:jsx(ge,{size:"xs",className:"text-white/40 font-medium uppercase tracking-wider",children:f})},f)),x.map((f,v)=>jsx("div",{className:i("bg-gray-900/50 min-h-[120px] p-2 group transition-colors hover:bg-white/[0.02]",!f&&"bg-transparent"),children:f&&jsxs(Fragment,{children:[jsxs("div",{className:"flex items-center justify-between mb-2",children:[jsx("span",{className:i("text-xs font-medium w-6 h-6 flex items-center justify-center rounded-full",f.toDateString()===new Date().toDateString()?"bg-blue-500 text-white":"text-white/40"),children:f.getDate()}),jsx("button",{onClick:()=>r?.(f),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-white/10 rounded-lg transition-all",children:jsx(Plus,{className:"h-3 w-3 text-white/40"})})]}),jsx("div",{className:"space-y-1",children:g(f).map(w=>jsx("div",{onClick:()=>t?.(w),className:"px-2 py-1 rounded-lg bg-blue-500/10 border border-blue-500/20 cursor-pointer hover:bg-blue-500/20 transition-all",children:jsx(ge,{size:"xs",className:"text-blue-400 truncate",children:w.title})},w.id))})]})},v))]})]})}function cm({children:e,level:t,className:r}){let a=`h${t}`;return jsx(a,{className:i("font-semibold",r),children:e})}function Hn({children:e,...t}){return jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-2xl bg-white dark:bg-black/90 text-gray-900 dark:text-white",children:jsx(Ma,{usePopover:false,...t,children:e})})}function kN({children:e,open:t,onOpenChange:r,...a}){let n=useRef(null);useEffect(()=>{let s=l=>{l.key==="Escape"&&r(false);};return t&&(document.addEventListener("keydown",s),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",s),document.body.style.overflow="unset";}},[t,r]);let o=s=>{s.target===n.current&&r(false);};return t?createPortal(jsx("div",{ref:n,onClick:o,className:"fixed inset-0 z-[100] flex items-start justify-center bg-black/60 backdrop-blur-sm animate-in fade-in duration-200 pt-[20vh]",children:jsx("div",{className:"relative w-full max-w-lg overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/90 shadow-2xl animate-in zoom-in-95 duration-200",children:jsx(Ma,{usePopover:false,...a,children:e})})}),document.body):null}function In({className:e,...t}){return jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-white/10 px-3","cmdk-input-wrapper":"",children:[jsx(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsx(Zo,{className:i("flex h-12 w-full rounded-md bg-transparent py-3 text-sm text-gray-900 dark:text-white outline-none placeholder:text-gray-400 dark:placeholder:text-white/50 disabled:cursor-not-allowed disabled:opacity-50 border-none focus:ring-0 px-0",e),...t})]})}function An({className:e,...t}){return jsx(en,{className:i("max-h-[300px] overflow-y-auto overflow-x-hidden p-2",e),...t})}function NN(e){return jsx(tn,{className:"py-6 text-center text-sm",...e})}function Bn({children:e,heading:t,className:r,...a}){return jsxs("div",{className:i("overflow-hidden p-1 text-gray-900 dark:text-white",r),...a,children:[t&&jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-gray-500 dark:text-white/50",children:t}),e]})}function Vn({className:e,...t}){return jsx(rn,{className:i("relative flex cursor-default select-none items-center rounded-2xl px-2 py-1.5 text-sm outline-none text-gray-900 dark:text-white aria-selected:bg-gray-100 dark:aria-selected:bg-white/[0.06] aria-selected:text-gray-900 dark:aria-selected:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t})}function TN({className:e,...t}){return jsx("span",{className:i("ml-auto text-xs tracking-widest text-gray-400 dark:text-white/50",e),...t})}function zn({onSearchChange:e,onFilterChange:t,onSortChange:r,onViewChange:a,onGroupChange:n,priorityOptions:o=[],tagOptions:s=[],assigneeOptions:l=[],viewOptions:c=["board","list","calendar","timeline"],sortOptions:d=[],groupOptions:m=[],savedFilters:u=[],onSaveFilter:p,className:b}){let[h,x]=useState(""),[g,f]=useState({}),[v,w]=useState("board"),y=(T,C)=>{let M=g[T]||[],H=M.includes(C)?M.filter(E=>E!==C):[...M,C],S={...g,[T]:H};H.length===0&&delete S[T],f(S),t?.(S);},k=()=>{f({}),t?.({}),x(""),e?.("");},N=Object.values(g).flat().length;return jsxs(Q,{className:i("p-2 flex flex-wrap items-center gap-3 bg-white/[0.02] border-white/5",b),children:[jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[jsx(Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-white/20"}),jsx("input",{type:"text",placeholder:"Search tasks...",className:"w-full pl-10 pr-4 py-2 text-sm rounded-2xl border border-white/10 bg-white/[0.03] focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all placeholder:text-white/20 text-white",value:h,onChange:T=>{x(T.target.value),e?.(T.target.value);}})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsx(qa,{label:"Priority",options:o,selected:g.priority||[],onSelect:T=>y("priority",T)}),jsx(qa,{label:"Tags",options:s,selected:g.tags||[],onSelect:T=>y("tags",T)}),jsx(qa,{label:"Assignee",options:l,selected:g.assignee||[],onSelect:T=>y("assignee",T)}),jsx("div",{className:"w-px h-4 bg-white/10 mx-1"}),jsxs(qe,{children:[jsx(Ge,{children:jsxs(R,{variant:"ghost",size:"sm",className:"h-9 gap-2 text-white/60",children:[jsx(SortAsc,{className:"h-4 w-4"}),"Sort"]})}),jsx(je,{className:"w-48 p-1 bg-gray-900 border-white/10",children:d.map(T=>jsx("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-xs text-white/60 hover:text-white hover:bg-white/5 rounded-lg text-left",onClick:()=>r?.(T.value,"asc"),children:T.label},T.value))})]}),N>0&&jsxs(R,{variant:"ghost",size:"sm",onClick:k,className:"h-9 px-3 text-xs text-white/40 hover:text-white gap-2",children:[jsx(X,{className:"h-3.5 w-3.5"})," Clear",jsx(Be,{variant:"neutral",className:"bg-white/[0.06] border-white/10 ml-1",children:N})]})]})]})}function qa({label:e,options:t,selected:r,onSelect:a}){return jsxs(qe,{children:[jsx(Ge,{children:jsxs(R,{variant:"ghost",size:"sm",className:i("h-9 gap-2 text-xs transition-all",r.length>0?"bg-blue-500/10 text-blue-400":"text-white/60 hover:text-white"),children:[e,r.length>0?jsx(Be,{variant:"info",className:"h-4 min-w-[16px] px-1 bg-blue-500 text-white border-none",children:r.length}):jsx(ChevronDown,{className:"h-3.5 w-3.5 opacity-40"})]})}),jsx(je,{className:"w-56 p-0 bg-gray-900 border-white/10 shadow-2xl",children:jsxs(Hn,{children:[jsx(In,{placeholder:`Search ${e.toLowerCase()}...`,className:"border-none"}),jsx(An,{className:"max-h-[240px]",children:jsx(Bn,{children:t.map(n=>jsxs(Vn,{value:n.value,onClick:()=>a(n.value),className:"flex items-center justify-between py-2 px-3 cursor-pointer hover:bg-white/5",children:[jsx("span",{className:"text-xs text-white/80",children:n.label}),r.includes(n.value)&&jsx(Check,{className:"h-3.5 w-3.5 text-blue-500"})]},n.value))})})]})})]})}function jr({isOpen:e,onClose:t,children:r,className:a}){let n=useRef(null);return useEffect(()=>{let s=n.current;s&&(e?s.open||(s.showModal(),document.body.style.overflow="hidden"):s.open&&(s.close(),document.body.style.overflow="unset"));},[e]),useEffect(()=>{let s=n.current;if(!s)return;let l=c=>{c.preventDefault(),t();};return s.addEventListener("cancel",l),()=>s.removeEventListener("cancel",l)},[t]),createPortal(jsx("dialog",{ref:n,onClick:s=>{s.target===n.current&&t();},className:i("fixed inset-0 z-[100] bg-transparent p-0 backdrop:bg-black/60 backdrop:backdrop-blur-sm open:flex open:items-center open:justify-center","animate-in fade-in duration-200",a),children:jsxs("div",{className:i("relative w-full max-w-lg scale-100 gap-4 border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 p-6 shadow-2xl backdrop-blur-xl transition-all sm:rounded-2xl","animate-in fade-in zoom-in-95 duration-200 slide-in-from-bottom-2"),children:[r,jsxs("button",{onClick:t,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-gray-400 dark:focus:ring-white/20 disabled:pointer-events-none",children:[jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:[jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),jsx("span",{className:"sr-only",children:"Close"})]})]})}),document.body)}function Qr({className:e,children:t}){return jsx("div",{className:i("flex flex-col space-y-1.5 text-center sm:text-left mb-4",e),children:t})}function Jr({className:e,children:t}){return jsx("div",{className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),children:t})}function $n({className:e,children:t}){return jsx(Xe,{as:"h2",className:i("text-lg font-semibold leading-none tracking-tight",e),children:t})}function GN({className:e,children:t}){return jsx(ge,{variant:"muted",className:i("text-sm",e),children:t})}function Fn({items:e,onToggle:t,className:r}){if(!e||e.length===0)return null;let a=e.filter(o=>o.completed).length,n=a/e.length*100;return jsxs("div",{className:i("space-y-3",r),children:[jsxs("div",{className:"flex items-center justify-between text-[10px] text-white/40 uppercase tracking-wider font-bold",children:[jsx("span",{children:"Checklist"}),jsxs("span",{children:[a,"/",e.length]})]}),jsx("div",{className:"h-1 w-full bg-white/5 rounded-full overflow-hidden",children:jsx("div",{className:"h-full bg-blue-500 transition-all duration-500",style:{width:`${n}%`}})}),jsx("div",{className:"space-y-2",children:e.map(o=>jsxs("div",{className:"flex items-center gap-2 group cursor-pointer",onClick:()=>t?.(o.id),children:[o.completed?jsx(CheckSquare,{className:"h-4 w-4 text-blue-500"}):jsx(Square,{className:"h-4 w-4 text-white/20 group-hover:text-white/40"}),jsx("span",{className:i("text-sm transition-colors",o.completed?"text-white/40 line-through":"text-white/80"),children:o.title})]},o.id))})]})}function Un({comments:e,onAddComment:t,className:r}){let[a,n]=useState(""),o=()=>{a.trim()&&(t?.(a),n(""));};return jsxs("div",{className:i("space-y-6",r),children:[jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Comments"}),jsx("div",{className:"flex gap-3",children:jsxs("div",{className:"flex-1",children:[jsx(lr,{placeholder:"Write a comment...",value:a,onChange:s=>n(s.target.value),className:"min-h-[80px] bg-white/[0.03] border-white/10 text-sm"}),jsx("div",{className:"flex justify-end mt-2",children:jsxs(R,{size:"sm",onClick:o,disabled:!a.trim(),className:"gap-2",children:[jsx(Send,{className:"h-3.5 w-3.5"}),"Comment"]})})]})}),jsx("div",{className:"space-y-6",children:e.map(s=>jsxs("div",{className:"flex gap-3",children:[jsx(V,{src:s.user.avatar,alt:s.user.name,size:"sm"}),jsxs("div",{className:"flex-1 bg-white/[0.03] border border-white/5 rounded-2xl p-3",children:[jsxs("div",{className:"flex items-center justify-between mb-1",children:[jsx("span",{className:"text-xs font-bold text-white",children:s.user.name}),jsx("span",{className:"text-[10px] text-white/30",children:s.timestamp.toLocaleString()})]}),jsx("p",{className:"text-sm text-white/70 leading-relaxed",children:s.content})]})]},s.id))})]})}function Wn({attachments:e,onRemove:t,onDownload:r,className:a}){return jsxs("div",{className:i("space-y-4",a),children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Attachments"}),jsxs(R,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 text-white/40 hover:text-white",children:[jsx(Paperclip,{className:"h-3 w-3"}),"Add"]})]}),jsx("div",{className:"grid grid-cols-2 gap-3",children:e.map(n=>jsxs("div",{className:"group relative bg-white/[0.03] border border-white/5 rounded-xl overflow-hidden hover:border-white/20 transition-all",children:[n.thumbnail?jsx("div",{className:"aspect-video w-full overflow-hidden",children:jsx("img",{src:n.thumbnail,alt:n.name,className:"w-full h-full object-cover"})}):jsx("div",{className:"aspect-video w-full flex items-center justify-center bg-white/5",children:jsx(FileIcon,{className:"h-8 w-8 text-white/20"})}),jsxs("div",{className:"p-2",children:[jsx("p",{className:"text-xs font-medium text-white truncate",children:n.name}),jsx("p",{className:"text-[10px] text-white/30 uppercase",children:n.size})]}),jsxs("div",{className:"absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2",children:[jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-full bg-white/10 hover:bg-white/20",onClick:()=>r?.(n),children:jsx(Download,{className:"h-4 w-4"})}),jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-full bg-red-500/20 hover:bg-red-500/40 text-red-400",onClick:()=>t?.(n.id),children:jsx(X,{className:"h-4 w-4"})})]})]},n.id))})]})}function Yn({labels:e,selectedIds:t,onToggle:r,className:a}){return jsxs("div",{className:i("space-y-3",a),children:[jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsx(Tag,{className:"h-3 w-3"}),"Labels"]}),jsx("div",{className:"flex flex-wrap gap-2",children:e.map(n=>{let o=t.includes(n.id);return jsxs("button",{onClick:()=>r(n.id),className:i("px-3 py-1.5 rounded-full text-xs font-medium transition-all flex items-center gap-2 border",o?"bg-white/10 border-white/20 text-white":"bg-transparent border-white/5 text-white/40 hover:border-white/10"),children:[jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.color}}),n.name,o&&jsx(Check,{className:"h-3 w-3"})]},n.id)})})]})}function _n({users:e,selectedId:t,onSelect:r,className:a}){return jsxs("div",{className:i("space-y-3",a),children:[jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsx(Users,{className:"h-3 w-3"}),"Assignee"]}),jsx("div",{className:"grid grid-cols-1 gap-1",children:e.map(n=>{let o=t===n.id;return jsxs("button",{onClick:()=>r(n.id),className:i("flex items-center gap-3 p-2 rounded-xl transition-all text-left",o?"bg-white/10 text-white":"text-white/60 hover:bg-white/5"),children:[jsx(V,{src:n.avatar,alt:n.name,size:"sm"}),jsx("span",{className:"text-sm flex-1 truncate",children:n.name}),o&&jsx(Check,{className:"h-4 w-4 text-blue-500"})]},n.id)})})]})}function qn({date:e,onChange:t,className:r}){return jsxs("div",{className:i("space-y-3",r),children:[jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsx(Calendar,{className:"h-3 w-3"}),"Due Date"]}),e?jsxs("div",{className:"flex items-center gap-2 p-3 rounded-2xl bg-white/5 border border-white/10",children:[jsx("div",{className:"h-8 w-8 rounded-lg bg-blue-500/20 flex items-center justify-center text-blue-400",children:jsx(Clock,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1",children:[jsx("p",{className:"text-sm font-medium text-white",children:e.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}),jsx("p",{className:"text-[10px] text-white/40",children:e.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})})]}),jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/20 hover:text-red-400",onClick:()=>t(void 0),children:jsx(X,{className:"h-4 w-4"})})]}):jsxs(R,{variant:"ghost",className:"w-full justify-start gap-3 h-12 rounded-2xl border border-dashed border-white/10 text-white/40 hover:border-white/20 hover:bg-white/5",onClick:()=>t(new Date),children:[jsx(Calendar,{className:"h-4 w-4"}),"Set due date"]})]})}function jn({initialSeconds:e=0,onTimeUpdate:t,className:r}){let[a,n]=useState(e),[o,s]=useState(false);useEffect(()=>{let c=null;return o?c=setInterval(()=>{n(d=>{let m=d+1;return t?.(m),m});},1e3):clearInterval(c),()=>clearInterval(c)},[o,t]);let l=c=>{let d=Math.floor(c/3600),m=Math.floor(c%3600/60),u=c%60;return `${d.toString().padStart(2,"0")}:${m.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}`};return jsxs("div",{className:i("space-y-3",r),children:[jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsx(Timer,{className:"h-3 w-3"}),"Time Tracking"]}),jsxs("div",{className:"flex items-center gap-4 p-4 rounded-2xl bg-white/[0.03] border border-white/5",children:[jsxs("div",{className:"flex-1",children:[jsx("p",{className:"text-2xl font-mono font-bold text-white tracking-tight",children:l(a)}),jsx("p",{className:"text-[10px] text-white/30 uppercase font-bold mt-1",children:"Total Time Spent"})]}),jsxs("div",{className:"flex gap-2",children:[jsx(R,{variant:"ghost",size:"icon",className:"h-10 w-10 rounded-full bg-white/5 hover:bg-white/10",onClick:()=>n(0),children:jsx(RotateCcw,{className:"h-4 w-4"})}),jsx(R,{variant:o?"secondary":"primary",size:"icon",className:i("h-10 w-10 rounded-full shadow-lg transition-all",o?"bg-orange-500 hover:bg-orange-600":"bg-blue-600 hover:bg-blue-700"),onClick:()=>s(!o),children:o?jsx(Pause,{className:"h-4 w-4"}):jsx(Play,{className:"h-4 w-4 ml-0.5"})})]})]})]})}function Qn({isOpen:e,onClose:t,onSave:r,onDelete:a,onDuplicate:n,onArchive:o,task:s,columnId:l,columns:c=[],users:d=[],availableLabels:m=[],showSubtasks:u=true,showChecklist:p=true,showAttachments:b=true,showComments:h=true,showActivity:x=true}){let[g,f]=useState(""),[v,w]=useState(""),[y,k]=useState("medium"),[N,T]=useState(""),[C,M]=useState(void 0),[H,S]=useState([]),[E,P]=useState(void 0);useEffect(()=>{s?(f(s.title||""),w(s.description||""),k(s.priority||"medium"),T(s.columnId||""),M(s.assignee?.id),S(s.labels?.map(L=>L.id)||[]),P(s.dueDate?new Date(s.dueDate):void 0)):(f(""),w(""),k("medium"),T(l||""),M(void 0),S([]),P(void 0));},[s,e,l]);let D=()=>{g.trim()&&(r({...s,title:g,description:v,priority:y,columnId:N,assignee:d.find(L=>L.id===C),labels:m.filter(L=>H.includes(L.id)),dueDate:E?.toISOString()}),t());};return jsxs(jr,{isOpen:e,onClose:t,children:[jsxs(Qr,{className:"flex items-center justify-between pr-12",children:[jsx($n,{children:s?"Edit Task":"Create New Task"}),jsx("div",{className:"flex items-center gap-2",children:s&&jsxs(Fragment,{children:[jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>n?.(s),children:jsx(Copy,{className:"h-4 w-4"})}),jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>o?.(s.id),children:jsx(Archive,{className:"h-4 w-4"})}),jsx(R,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-red-400",onClick:()=>a?.(s.id),children:jsx(Trash2,{className:"h-4 w-4"})})]})})]}),jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8 py-6",children:[jsxs("div",{className:"lg:col-span-2 space-y-8",children:[jsxs("div",{className:"space-y-2",children:[jsx(U,{htmlFor:"task-title",className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Title"}),jsx(pt,{id:"task-title",placeholder:"What needs to be done?",value:g,onChange:L=>f(L.target.value),className:"text-lg font-bold bg-transparent border-white/10 focus:border-blue-500",autoFocus:true})]}),jsxs("div",{className:"space-y-2",children:[jsx(U,{htmlFor:"task-desc",className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Description"}),jsx(lr,{id:"task-desc",placeholder:"Add more details...",value:v,onChange:L=>w(L.target.value),rows:6,className:"bg-white/[0.03] border-white/10 text-sm leading-relaxed"})]}),p&&s?.checklist&&jsx(Fn,{items:s.checklist}),b&&s?.attachments&&jsx(Wn,{attachments:[]}),h&&jsx(Un,{comments:[]})]}),jsxs("div",{className:"space-y-8 bg-white/[0.02] p-6 rounded-3xl border border-white/5 h-fit",children:[jsxs("div",{className:"space-y-2",children:[jsx(U,{className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Status"}),jsx(Or,{value:N,onChange:L=>T(L),options:c.map(L=>({label:L.title,value:L.id})),className:"bg-white/5 border-white/10"})]}),jsxs("div",{className:"space-y-2",children:[jsx(U,{className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Priority"}),jsx(Or,{value:y,onChange:L=>k(L),options:[{label:"Low",value:"low"},{label:"Medium",value:"medium"},{label:"High",value:"high"},{label:"Urgent",value:"urgent"}],className:"bg-white/5 border-white/10"})]}),jsx(_n,{users:d,selectedId:C,onSelect:M}),jsx(Yn,{labels:m,selectedIds:H,onToggle:L=>S($=>$.includes(L)?$.filter(ae=>ae!==L):[...$,L])}),jsx(qn,{date:E,onChange:P}),jsx(jn,{initialSeconds:s?.timeSpent})]})]}),jsxs(Jr,{className:"border-t border-white/5 pt-6",children:[jsx(R,{variant:"ghost",onClick:t,children:"Cancel"}),jsx(R,{onClick:D,className:"px-8",children:"Save Changes"})]})]})}function Jn({title:e,count:t,isCollapsed:r,onToggle:a,children:n,className:o}){return jsxs("div",{className:i("space-y-4",o),children:[jsxs("button",{onClick:a,className:"flex items-center gap-3 w-full group",children:[jsxs("div",{className:"flex items-center gap-2",children:[r?jsx(ChevronRight,{className:"h-4 w-4 text-white/20"}):jsx(ChevronDown,{className:"h-4 w-4 text-white/20"}),jsx("h4",{className:"text-xs font-bold uppercase tracking-widest text-white/40 group-hover:text-white/60 transition-colors",children:e})]}),jsx("div",{className:"h-px flex-1 bg-white/5"}),jsx("span",{className:"text-[10px] font-bold px-2 py-0.5 rounded-full bg-white/5 text-white/20",children:t})]}),!r&&jsx("div",{className:"animate-in fade-in slide-in-from-top-2 duration-300",children:n})]})}function ts(e){let[t,r]=useState(""),[a,n]=useState({}),o=useMemo(()=>e.filter(c=>{if(t){let d=t.toLowerCase();if(!(c.title.toLowerCase().includes(d)||c.description?.toLowerCase().includes(d)||c.tags?.some(u=>u.toLowerCase().includes(d))))return false}for(let[d,m]of Object.entries(a))if(!(!m||m.length===0)&&(d==="priority"&&!m.includes(c.priority)||d==="assignee"&&(!c.assignee||!m.includes(c.assignee.id))||d==="tags"&&!c.tags?.some(u=>m.includes(u))))return false;return true}),[e,t,a]),s=useCallback((c,d)=>{n(m=>{let u=m[c]||[],p=u.includes(d)?u.filter(h=>h!==d):[...u,d],b={...m,[c]:p};return p.length===0&&delete b[c],b});},[]),l=useCallback(()=>{n({}),r("");},[]);return {searchQuery:t,setSearchQuery:r,activeFilters:a,setActiveFilters:n,filteredTasks:o,toggleFilter:s,clearFilters:l}}function rs(e){let[t,r]=useState({history:[e],currentIndex:0}),a=useRef(e);useEffect(()=>{let l=e.tasks.length!==a.current.tasks.length||e.tasks.some((d,m)=>d.id!==a.current.tasks[m]?.id||d.columnId!==a.current.tasks[m]?.columnId),c=e.columns.length!==a.current.columns.length||e.columns.some((d,m)=>d.id!==a.current.columns[m]?.id);if(l||c){let d=t.history[t.currentIndex];d&&e.tasks.length===d.tasks.length&&e.tasks.every((u,p)=>u.id===d.tasks[p]?.id&&u.columnId===d.tasks[p]?.columnId)||r({history:[e],currentIndex:0}),a.current=e;}},[e,t.history,t.currentIndex]);let n=useCallback(l=>{r(c=>({history:[...c.history.slice(0,c.currentIndex+1),l],currentIndex:c.currentIndex+1}));},[]),o=useCallback(()=>{r(l=>l.currentIndex>0?{...l,currentIndex:l.currentIndex-1}:l);},[]),s=useCallback(()=>{r(l=>l.currentIndex<l.history.length-1?{...l,currentIndex:l.currentIndex+1}:l);},[]);return {state:t.history[t.currentIndex],pushState:n,undo:o,redo:s,canUndo:t.currentIndex>0,canRedo:t.currentIndex<t.history.length-1}}function as({onUndo:e,onRedo:t,onSearch:r,onNewTask:a,onNewColumn:n,enabled:o=true}){useEffect(()=>{if(!o)return;let s=l=>{(l.ctrlKey||l.metaKey)&&l.key==="z"&&!l.shiftKey&&(l.preventDefault(),e?.()),((l.ctrlKey||l.metaKey)&&l.key==="z"&&l.shiftKey||(l.ctrlKey||l.metaKey)&&l.key==="y")&&(l.preventDefault(),t?.()),((l.ctrlKey||l.metaKey)&&l.key==="f"||l.key==="/"&&document.activeElement===document.body)&&(l.preventDefault(),r?.()),l.key==="n"&&document.activeElement===document.body&&(l.preventDefault(),a?.()),l.key==="c"&&document.activeElement===document.body&&(l.preventDefault(),n?.());};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[o,e,t,r,a,n]);}function ns({tasks:e,columns:t,selectedTaskIds:r,onTaskMove:a,onColumnMove:n,onTaskDrop:o,onTaskDragStart:s,onTaskDragEnd:l}){let[c,d]=useState(null),[m,u]=useState(null),[p,b]=useState(null),[h,x]=useState(null),[g,f]=useState(null),v=useRef(null),w=useRef(null),y=(S,E,P)=>{P==="task"?(d(E),S.dataTransfer.setData("taskId",E),s?.(E)):(u(E),S.dataTransfer.setData("columnId",E)),S.dataTransfer.effectAllowed="move";},k=useCallback(()=>{c&&l?.(c),d(null),u(null),b(null),x(null),f(null);},[c,l]);return {draggedTaskId:c,draggedColumnId:m,dragOverColumnId:p,dragOverTaskId:h,dropPosition:g,handleDragStart:y,handleDragEnd:k,handleDragOver:(S,E,P)=>{if(S.preventDefault(),S.dataTransfer.dropEffect="move",m){b(E);let D=S.currentTarget.getBoundingClientRect(),L=D.left+D.width/2;f(S.clientX<L?"left":"right");}else if(b(E),P){x(P);let D=S.currentTarget.getBoundingClientRect(),L=D.top+D.height/2;f(S.clientY<L?"top":"bottom");}else S.target===S.currentTarget&&(x(null),f(null));},handleDrop:(S,E,P)=>{S.preventDefault();let D=c||S.dataTransfer.getData("taskId"),L=m||S.dataTransfer.getData("columnId");if(L&&n)n(L,E,g==="right"?"right":"left");else if(D&&a){if(!e.find(oe=>oe.id===D))return;(r.includes(D)?r:[D]).forEach(oe=>{let Sr=e.find(tr=>tr.id===oe)?.columnId||"";a(oe,E,P,g==="bottom"?"bottom":"top"),o?.(oe,Sr,E,0);});}k();},handleTouchStart:(S,E,P)=>{let D=S.touches[0];D&&(v.current=setTimeout(()=>{P==="task"?(d(E),s?.(E)):u(E),w.current={x:D.clientX,y:D.clientY};},500));},handleTouchMove:S=>{if(!c&&!m)return;S.preventDefault();let E=S.touches[0];if(!E)return;let P=document.elementFromPoint(E.clientX,E.clientY);if(!P)return;let D=P.closest("[data-column-id]"),L=P.closest("[data-task-id]");if(D){let $=D.getAttribute("data-column-id");if(b($),m){let ae=D.getBoundingClientRect(),oe=ae.left+ae.width/2;f(E.clientX<oe?"left":"right");}else if(L){let ae=L.getAttribute("data-task-id");x(ae);let oe=L.getBoundingClientRect(),mt=oe.top+oe.height/2;f(E.clientY<mt?"top":"bottom");}}},handleTouchEnd:S=>{if(clearTimeout(v.current),c||m){if(p){let E=c,P=m;P&&n?n(P,p,g==="right"?"right":"left"):E&&a&&a(E,p,h||void 0,g==="bottom"?"bottom":"top");}k();}},setDraggedTaskId:d}}function eu({columns:e,tasks:t,onTaskMove:r,onColumnMove:a,onTaskClick:n,onTaskAdd:o,onColumnAction:s,swimlanes:l=false,swimlaneBy:c="priority",view:d,onViewChange:m,className:u,...p}){let[b,h]=useState(d||"board"),[x,g]=useState(null),[f,v]=useState([]),w=d||b,y=F=>{h(F),m?.(F);},{state:k,pushState:N,undo:T,redo:C,canUndo:M,canRedo:H}=rs({tasks:t,columns:e}),S=k?.tasks||[],E=k?.columns||[],{setSearchQuery:P,setActiveFilters:D,filteredTasks:L}=ts(S),$=useMemo(()=>{if(!l)return null;let F={},G=(A,ne)=>ne.includes(".")?ne.split(".").reduce((B,se)=>B&&B[se],A):A[ne];return L.forEach(A=>{let ne=G(A,c),B=String(ne||"Uncategorized");F[B]||(F[B]=[]),F[B].push(A);}),F},[L,l,c]),{handleDragStart:ae,handleDragOver:oe,handleDrop:mt}=ns({columns:E,tasks:S,selectedTaskIds:[],onTaskMove:(F,G,A,ne)=>{let B=[...S],se=B.findIndex(Dr=>Dr.id===F);if(se===-1)return;let Lt={...B[se],columnId:G};if(B.splice(se,1),!A)B.push(Lt);else {let Dr=B.findIndex(mi=>mi.id===A),di=ne==="bottom"?Dr+1:Dr;B.splice(di,0,Lt);}N({tasks:B,columns:E}),r?.(F,G,A,ne);}});as({onUndo:T,onRedo:C,onSearch:()=>document.querySelector('input[placeholder*="Search"]')?.focus(),onNewTask:()=>o?.("todo","New Task")});let tr=useMemo(()=>S.find(F=>F.id===x),[S,x]),ci=()=>{let F=G=>{g(G.id),n?.(G);};switch(w){case "list":return jsx(Gr,{tasks:L,columns:E,onTaskClick:F});case "timeline":return jsx(En,{tasks:L});case "table":return jsx(Sn,{tasks:L,columns:E,onTaskClick:F});case "calendar":return jsx(Dn,{tasks:L,onTaskClick:F});default:if(l){let G=$&&Object.keys($).length>0?$:{"All Tasks":[]};return jsx("div",{className:"flex flex-col gap-8 overflow-y-auto h-full pr-2 custom-scrollbar",children:Object.entries(G).map(([A,ne])=>jsx(Jn,{title:A,count:ne.length,isCollapsed:f.includes(A),onToggle:()=>v(B=>B.includes(A)?B.filter(se=>se!==A):[...B,A]),children:jsx("div",{className:"flex gap-6 min-h-[200px]",children:E.map(B=>jsx(Ya,{column:B,tasks:ne.filter(se=>se.columnId===B.id),onTaskClick:F,onAddTask:()=>o?.(B.id,"New Task"),onAction:se=>s?.(B.id,se),onDragStart:ae,onDragOver:(se,Lt)=>oe(se,B.id,Lt),onDrop:(se,Lt)=>mt(se,B.id,Lt)},B.id))})},A))})}return jsx("div",{className:"flex gap-6 overflow-x-auto pb-4 min-h-[500px] scrollbar-thin scrollbar-thumb-white/10",children:E.map(G=>jsx(Ya,{column:G,tasks:L.filter(A=>A.columnId===G.id),onTaskClick:F,onAddTask:()=>o?.(G.id,"New Task"),onAction:A=>s?.(G.id,A),onDragStart:ae,onDragOver:(A,ne)=>oe(A,G.id,ne),onDrop:(A,ne)=>mt(A,G.id,ne)},G.id))})}};return jsxs("div",{className:i("flex flex-col gap-4 h-full",u),children:[jsx(Rn,{title:"Project Board",view:w,onViewChange:F=>y(F),canUndo:M,canRedo:H,onUndo:T,onRedo:C}),jsx(zn,{onSearchChange:P,onFilterChange:D}),jsx("div",{className:"flex-1 overflow-hidden",children:ci()}),tr&&jsx(Qn,{isOpen:!!x,onClose:()=>g(null),task:tr,onSave:F=>{let G=S.map(A=>A.id===tr.id?{...A,...F}:A);N({tasks:G,columns:E}),g(null);}})]})}function F2({columnId:e,onAdd:t,placeholder:r="Add task...",className:a}){let[n,o]=useState(false),[s,l]=useState(""),c=d=>{d?.preventDefault(),s.trim()&&(t(e,s),l(""),o(false));};return n?jsxs("form",{onSubmit:c,className:i("bg-white/[0.03] border border-white/10 rounded-2xl p-3 space-y-3",a),children:[jsx("input",{autoFocus:true,value:s,onChange:d=>l(d.target.value),placeholder:"What needs to be done?",className:"w-full bg-transparent border-none outline-none text-sm text-white placeholder:text-white/20",onKeyDown:d=>{d.key==="Escape"&&o(false);}}),jsxs("div",{className:"flex items-center justify-end gap-2",children:[jsx(R,{variant:"ghost",size:"sm",onClick:()=>o(false),className:"h-8 text-white/40 hover:text-white",children:"Cancel"}),jsx(R,{size:"sm",onClick:()=>c(),disabled:!s.trim(),className:"h-8",children:"Add Task"})]})]}):jsxs("button",{onClick:()=>o(true),className:i("w-full flex items-center gap-2 p-3 rounded-2xl border border-dashed border-white/10 text-white/40 hover:border-white/20 hover:bg-white/5 transition-all text-sm",a),children:[jsx(Plus,{className:"h-4 w-4"}),r]})}function X2({onSync:e,interval:t=3e4,enabled:r=false}){let[a,n]=useState(null),[o,s]=useState(false),[l,c]=useState(null);return {sync:useCallback(async m=>{if(e){s(true),c(null);try{await e(m),n(new Date);}catch(u){c(u instanceof Error?u:new Error("Sync failed"));}finally{s(false);}}},[e]),isSyncing:o,lastSynced:a,error:l}}function j2(){let[e,t]=useState([]),r=useCallback(n=>{let o={...n,id:Math.random().toString(36).substr(2,9),timestamp:new Date};t(s=>[o,...s]);},[]),a=useCallback(()=>{t([]);},[]);return {history:e,addEntry:r,clearHistory:a}}function eT({subtasks:e,onToggle:t,className:r}){return !e||e.length===0?null:jsx("div",{className:i("space-y-1",r),children:e.map(a=>jsxs("div",{className:"flex items-center gap-2 group cursor-pointer",onClick:()=>t?.(a.id),children:[a.completed?jsx(CheckCircle2,{className:"h-3.5 w-3.5 text-green-500"}):jsx(Circle,{className:"h-3.5 w-3.5 text-white/20 group-hover:text-white/40"}),jsx("span",{className:i("text-xs transition-colors",a.completed?"text-white/40 line-through":"text-white/70"),children:a.title})]},a.id))})}function nT({activities:e,className:t}){return jsxs("div",{className:i("space-y-4",t),children:[jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Activity"}),jsx("div",{className:"space-y-4",children:e.map(r=>jsxs("div",{className:"flex gap-3",children:[jsx(V,{src:r.user.avatar,alt:r.user.name,size:"sm"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsxs("p",{className:"text-xs text-white/80",children:[jsx("span",{className:"font-bold text-white",children:r.user.name})," ",r.action," ",r.target&&jsx("span",{className:"font-medium text-blue-400",children:r.target})]}),jsx("p",{className:"text-[10px] text-white/30 mt-0.5",children:r.timestamp.toLocaleString()})]})]},r.id))})]})}var cu=be__default.forwardRef(({className:e,title:t="Terminal",children:r,...a},n)=>jsxs("div",{ref:n,className:i("overflow-hidden rounded-2xl border border-gray-200 bg-gray-950 shadow-xl dark:border-white/10",e),...a,children:[jsxs("div",{className:"flex items-center justify-between border-b border-white/10 bg-white/[0.03] px-4 py-2",children:[jsxs("div",{className:"flex items-center gap-1.5",children:[jsx("div",{className:"h-3 w-3 rounded-full bg-rose-500/80"}),jsx("div",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),jsx("div",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),jsx("div",{className:"text-xs font-medium text-white/50",children:t}),jsx("div",{className:"w-10"})," "]}),jsx("div",{className:"p-4 font-mono text-sm text-gray-300",children:r})]}));cu.displayName="Terminal";var KT=({children:e,prefix:t="$",className:r})=>jsxs("div",{className:i("flex gap-2",r),children:[jsx("span",{className:"select-none text-emerald-400",children:t}),jsx("span",{children:e})]});var WT=({className:e,pauseOnHover:t=false,direction:r="left",speed:a="normal",children:n,...o})=>{let s={slow:"40s",normal:"20s",fast:"10s"};return jsxs("div",{className:i("group flex overflow-hidden p-2 [--gap:1rem] [gap:var(--gap)]",e),...o,children:[jsx("div",{className:i("flex shrink-0 justify-around [gap:var(--gap)] min-w-full",r==="left"?"animate-marquee":"animate-marquee-reverse",t&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:s[a]},children:n}),jsx("div",{"aria-hidden":"true",className:i("flex shrink-0 justify-around [gap:var(--gap)] min-w-full",r==="left"?"animate-marquee":"animate-marquee-reverse",t&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:s[a]},children:n}),jsx("style",{children:`
13
+ @keyframes marquee {
14
+ from { transform: translateX(0); }
15
+ to { transform: translateX(calc(-100% - var(--gap))); }
16
+ }
17
+ @keyframes marquee-reverse {
18
+ from { transform: translateX(calc(-100% - var(--gap))); }
19
+ to { transform: translateX(0); }
20
+ }
21
+ .animate-marquee {
22
+ animation: marquee linear infinite;
23
+ }
24
+ .animate-marquee-reverse {
25
+ animation: marquee-reverse linear infinite;
26
+ }
27
+ `})]})};var pu=cva("inline-block rounded-full",{variants:{variant:{success:"bg-emerald-500",warning:"bg-amber-500",error:"bg-rose-500",info:"bg-blue-500",neutral:"bg-gray-400"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},animate:{true:"animate-pulse",false:""}},defaultVariants:{variant:"neutral",size:"md",animate:false}}),fu=be__default.forwardRef(({className:e,variant:t,size:r,animate:a,...n},o)=>jsx("span",{ref:o,className:i(pu({variant:t,size:r,animate:a,className:e})),...n}));fu.displayName="StatusDot";var xu=cva("shrink-0 bg-gray-200 dark:bg-white/[0.03]",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"}},defaultVariants:{orientation:"horizontal"}}),Nr=be__default.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,...a},n)=>jsx("div",{ref:n,role:r?"none":"separator","aria-orientation":r?void 0:t,className:i(xu({orientation:t,className:e})),...a}));Nr.displayName="Separator";function c5({title:e,open:t,defaultOpen:r=false,onOpenChange:a,disabled:n=false,children:o,className:s,triggerClassName:l,contentClassName:c,...d}){let[m,u]=useState(r),p=t!==void 0,b=p?t:m,h=()=>{if(n)return;let x=!b;p||u(x),a?.(x);};return jsxs("div",{className:i("w-full overflow-hidden rounded-2xl border border-gray-200 bg-white dark:border-white/10 dark:bg-white/[0.02]",s),...d,children:[e&&jsxs("button",{type:"button",onClick:h,disabled:n,className:i("flex w-full items-center justify-between px-4 py-3 text-sm font-medium transition-colors hover:bg-gray-50 dark:hover:bg-white/[0.02]",n&&"cursor-not-allowed opacity-50",l),children:[e,jsx(ChevronDown,{className:i("h-4 w-4 shrink-0 text-gray-500 transition-transform duration-200 dark:text-gray-400",b&&"rotate-180")})]}),jsx("div",{className:i("grid transition-all duration-300 ease-in-out",b?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:jsx("div",{className:"overflow-hidden",children:jsx("div",{className:i("px-4 pb-4 pt-0",e&&"pt-1",c),children:o})})})]})}var ps=createContext(void 0);function ke(){let e=useContext(ps);if(!e)throw new Error("Chart components must be used within a ChartContainer");return e}function Ut(e,t,r){return t===0?0:e/t*r}function f5({data:e,height:t=300,padding:r={top:20,right:20,bottom:40,left:40},className:a,children:n,...o}){let[s,l]=useState(null),[c,d]=useState(0),m=be__default.useRef(null);be__default.useEffect(()=>{if(!m.current)return;let p=new ResizeObserver(b=>{b[0]&&d(b[0].contentRect.width);});return p.observe(m.current),()=>p.disconnect()},[]);let u=useMemo(()=>Math.max(...e.map(p=>p.value))*1.1,[e]);return jsx(ps.Provider,{value:{width:c,height:t,data:e,maxValue:u,padding:r,hoveredIndex:s,setHoveredIndex:l},children:jsx("div",{ref:m,className:i("relative w-full select-none",a),style:{height:t},...o,children:c>0&&jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${c} ${t}`,className:"overflow-visible",children:n})})})}function g5({lines:e=5}){let{width:t,height:r,padding:a}=ke(),n=r-a.top-a.bottom;return jsx("g",{className:"text-gray-200 dark:text-white/5",children:Array.from({length:e+1}).map((o,s)=>{let l=a.top+n/e*s;return jsx("line",{x1:a.left,y1:l,x2:t-a.right,y2:l,stroke:"currentColor",strokeWidth:1,strokeDasharray:"4 4"},s)})})}function b5(){let{width:e,height:t,padding:r,data:a}=ke(),o=(e-r.left-r.right)/a.length;return jsx("g",{children:a.map((s,l)=>{let c=r.left+o*l+o/2,d=t-r.bottom+20;return jsx("text",{x:c,y:d,textAnchor:"middle",className:"fill-gray-400 dark:fill-white/40 text-xs font-medium",children:s.label},l)})})}function h5({renderTooltip:e}){let{hoveredIndex:t,data:r,width:a,padding:n}=ke();if(t===null)return null;let s=(a-n.left-n.right)/r.length,l=n.left+s*t+s/2,c=r[t];if(!c)return null;let d=e?e(c):jsxs("div",{className:"rounded-xl border border-gray-200 dark:border-white/10 bg-white/90 dark:bg-black/80 px-3 py-2 text-xs shadow-xl backdrop-blur-md",children:[jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:c.label}),jsxs("div",{className:"text-gray-500 dark:text-white/70",children:["Value: ",c.value]})]});return jsx("foreignObject",{x:l-75,y:0,width:150,height:"100%",className:"pointer-events-none overflow-visible",children:jsx("div",{className:"flex h-full flex-col justify-center items-center",children:jsx("div",{className:"animate-in fade-in zoom-in-95 duration-200",children:d})})})}function x5(){return jsx("div",{className:"w-full h-full flex items-end justify-between gap-2 p-4 animate-pulse bg-gray-100 dark:bg-white/[0.02] rounded-2xl border border-gray-200 dark:border-white/5",children:[...Array(12)].map((e,t)=>jsx("div",{className:"w-full bg-gray-200 dark:bg-white/[0.03] rounded-t-lg",style:{height:`${Math.random()*60+20}%`}},t))})}function N5({color:e="cyan",showValues:t=false,animationDelay:r=0,onValueClick:a}){let{width:n,height:o,padding:s,data:l,maxValue:c,setHoveredIndex:d,hoveredIndex:m}=ke(),u=n-s.left-s.right,p=o-s.top-s.bottom,b=u/l.length,h=b*.6,x={cyan:"from-cyan-500 to-blue-600",purple:"from-purple-500 to-indigo-600",emerald:"from-emerald-500 to-teal-600",amber:"from-amber-400 to-orange-600",rose:"from-rose-500 to-pink-600"};return jsxs("g",{children:[l.map((g,f)=>{let v=Ut(g.value,c,p),w=s.left+b*f+(b-h)/2,y=o-s.bottom-v,k=m===f,N=f*.1+r;return jsxs("g",{onMouseEnter:()=>d(f),onMouseLeave:()=>d(null),onClick:()=>a?.(g),className:i("cursor-pointer",a&&"cursor-pointer"),children:[jsx("rect",{x:s.left+b*f,y:s.top,width:b,height:p,fill:"transparent"}),jsx("rect",{x:w,y,width:h,height:v,rx:4,className:i("transition-all duration-300 ease-out",k?"brightness-125 filter":"opacity-80"),style:{transformOrigin:`center ${o-s.bottom}px`,animation:`grow-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) ${N}s backwards`}}),jsx("rect",{x:w,y,width:h,height:v,rx:4,className:i("bg-gradient-to-b",x[e]),style:{pointerEvents:"none",transformOrigin:`center ${o-s.bottom}px`,animation:`grow-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) ${N}s backwards`}}),t&&jsx("text",{x:w+h/2,y:y-8,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${N+.4}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:g.value})]},f)}),jsx("style",{children:`
16
28
  @keyframes grow-up {
17
29
  from { transform: scaleY(0); }
18
30
  to { transform: scaleY(1); }
@@ -21,12 +33,12 @@ import*as ue from'react';import ue__default,{useRef,useState,useEffect,createCon
21
33
  from { opacity: 0; transform: translateY(10px); }
22
34
  to { opacity: 1; transform: translateY(0); }
23
35
  }
24
- `})]})}function kw({color:e="purple",showValues:t=false,animationDelay:r=0,onValueClick:a}){let{width:s,height:o,padding:i,data:l,maxValue:d,setHoveredIndex:c,hoveredIndex:m}=he(),p=s-i.left-i.right,f=o-i.top-i.bottom,g=p/(l.length-1),v={cyan:{stroke:"#06b6d4",fill:"rgba(6, 182, 212, 0.2)"},purple:{stroke:"#8b5cf6",fill:"rgba(139, 92, 246, 0.2)"},emerald:{stroke:"#10b981",fill:"rgba(16, 185, 129, 0.2)"},amber:{stroke:"#f59e0b",fill:"rgba(245, 158, 11, 0.2)"},rose:{stroke:"#f43f5e",fill:"rgba(244, 63, 94, 0.2)"}}[e],b=l.map((y,k)=>{let w=i.left+g*k,N=o-i.bottom-Pt(y.value,d,f);return {x:w,y:N,item:y}}),u=b.map((y,k)=>k===0?`M ${y.x} ${y.y}`:`L ${y.x} ${y.y}`).join(" "),x=`
25
- ${u}
26
- L ${s-i.right} ${o-i.bottom}
27
- L ${i.left} ${o-i.bottom}
36
+ `})]})}function L5({color:e="purple",showValues:t=false,animationDelay:r=0,onValueClick:a}){let{width:n,height:o,padding:s,data:l,maxValue:c,setHoveredIndex:d,hoveredIndex:m}=ke(),u=n-s.left-s.right,p=o-s.top-s.bottom,b=u/(l.length-1),x={cyan:{stroke:"#06b6d4",fill:"rgba(6, 182, 212, 0.2)"},purple:{stroke:"#8b5cf6",fill:"rgba(139, 92, 246, 0.2)"},emerald:{stroke:"#10b981",fill:"rgba(16, 185, 129, 0.2)"},amber:{stroke:"#f59e0b",fill:"rgba(245, 158, 11, 0.2)"},rose:{stroke:"#f43f5e",fill:"rgba(244, 63, 94, 0.2)"}}[e],g=l.map((w,y)=>{let k=s.left+b*y,N=o-s.bottom-Ut(w.value,c,p);return {x:k,y:N,item:w}}),f=g.map((w,y)=>y===0?`M ${w.x} ${w.y}`:`L ${w.x} ${w.y}`).join(" "),v=`
37
+ ${f}
38
+ L ${n-s.right} ${o-s.bottom}
39
+ L ${s.left} ${o-s.bottom}
28
40
  Z
29
- `;return jsxs("g",{children:[jsx("path",{d:x,fill:v.fill,style:{opacity:0,animation:`fade-in 1s ease-out ${r}s forwards`}}),jsx("path",{d:u,fill:"none",stroke:v.stroke,strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",className:"animate-draw-line",style:{strokeDasharray:2e3,strokeDashoffset:2e3,animation:`draw-line 2s ease-out ${r}s forwards`}}),b.map((y,k)=>jsxs("g",{onMouseEnter:()=>c(k),onMouseLeave:()=>c(null),onClick:()=>a?.(y.item),className:n("cursor-crosshair",a&&"cursor-pointer"),children:[jsx("rect",{x:y.x-g/2,y:i.top,width:g,height:f,fill:"transparent"}),(m===k||t)&&jsxs(Fragment,{children:[m===k&&jsx("line",{x1:y.x,y1:i.top,x2:y.x,y2:o-i.bottom,stroke:"white",strokeWidth:1,strokeDasharray:"4 4",className:"opacity-50"}),jsx("circle",{cx:y.x,cy:y.y,r:m===k?6:4,fill:v.stroke,stroke:"white",strokeWidth:2,style:{transition:"r 0.2s ease-out"}}),t&&jsx("text",{x:y.x,y:y.y-12,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${r+1+k*.1}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:l[k]?.value})]})]},k)),jsx("style",{children:`
41
+ `;return jsxs("g",{children:[jsx("path",{d:v,fill:x.fill,style:{opacity:0,animation:`fade-in 1s ease-out ${r}s forwards`}}),jsx("path",{d:f,fill:"none",stroke:x.stroke,strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",className:"animate-draw-line",style:{strokeDasharray:2e3,strokeDashoffset:2e3,animation:`draw-line 2s ease-out ${r}s forwards`}}),g.map((w,y)=>jsxs("g",{onMouseEnter:()=>d(y),onMouseLeave:()=>d(null),onClick:()=>a?.(w.item),className:i("cursor-crosshair",a&&"cursor-pointer"),children:[jsx("rect",{x:w.x-b/2,y:s.top,width:b,height:p,fill:"transparent"}),(m===y||t)&&jsxs(Fragment,{children:[m===y&&jsx("line",{x1:w.x,y1:s.top,x2:w.x,y2:o-s.bottom,stroke:"white",strokeWidth:1,strokeDasharray:"4 4",className:"opacity-50"}),jsx("circle",{cx:w.x,cy:w.y,r:m===y?6:4,fill:x.stroke,stroke:"white",strokeWidth:2,style:{transition:"r 0.2s ease-out"}}),t&&jsx("text",{x:w.x,y:w.y-12,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${r+1+y*.1}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:l[y]?.value})]})]},y)),jsx("style",{children:`
30
42
  @keyframes draw-line {
31
43
  to { stroke-dashoffset: 0; }
32
44
  }
@@ -38,7 +50,7 @@ import*as ue from'react';import ue__default,{useRef,useState,useEffect,createCon
38
50
  from { opacity: 0; transform: translateY(10px); }
39
51
  to { opacity: 1; transform: translateY(0); }
40
52
  }
41
- `})]})}function Cw({color:e="cyan",showValues:t=false,animationDelay:r=0,curve:a="smooth",strokeWidth:s=3,align:o="edge",onValueClick:i}){let{width:l,height:d,padding:c,data:m,maxValue:p,setHoveredIndex:f,hoveredIndex:g}=he(),h=l-c.left-c.right,v=d-c.top-c.bottom,b=o==="center"?h/m.length:h/(m.length-1),x={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e"}[e],y=m.map((w,N)=>{let M;o==="center"?M=c.left+b*N+b/2:M=c.left+b*N;let T=d-c.bottom-Pt(w.value,p,v);return {x:M,y:T,item:w}}),k="";if(y.length>0)if(k=`M ${y[0].x} ${y[0].y}`,a==="smooth")for(let w=0;w<y.length-1;w++){let N=y[w],M=y[w+1],T=N.x+(M.x-N.x)/2,R=N.y,O=N.x+(M.x-N.x)/2,D=M.y;k+=` C ${T} ${R}, ${O} ${D}, ${M.x} ${M.y}`;}else if(a==="step")for(let w=0;w<y.length-1;w++){let N=y[w],M=y[w+1];k+=` L ${M.x} ${N.y} L ${M.x} ${M.y}`;}else for(let w=1;w<y.length;w++)k+=` L ${y[w].x} ${y[w].y}`;return jsxs("g",{children:[jsx("path",{d:k,fill:"none",stroke:x,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round",className:"animate-draw-line",style:{strokeDasharray:3e3,strokeDashoffset:3e3,animation:`draw-line 2.5s ease-out ${r}s forwards`}}),y.map((w,N)=>jsxs("g",{onMouseEnter:()=>f(N),onMouseLeave:()=>f(null),onClick:()=>i?.(w.item),className:n("cursor-crosshair",i&&"cursor-pointer"),children:[jsx("rect",{x:w.x-b/2,y:c.top,width:b,height:v,fill:"transparent"}),(g===N||t)&&jsxs(Fragment,{children:[g===N&&jsx("line",{x1:w.x,y1:c.top,x2:w.x,y2:d-c.bottom,stroke:"white",strokeWidth:1,strokeDasharray:"4 4",className:"opacity-50"}),jsx("circle",{cx:w.x,cy:w.y,r:g===N?6:4,fill:x,stroke:"white",strokeWidth:2,style:{transition:"r 0.2s ease-out"}}),t&&jsx("text",{x:w.x,y:w.y-12,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${r+1+N*.1}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:m[N]?.value})]})]},N)),jsx("style",{children:`
53
+ `})]})}function H5({color:e="cyan",showValues:t=false,animationDelay:r=0,curve:a="smooth",strokeWidth:n=3,align:o="edge",onValueClick:s}){let{width:l,height:c,padding:d,data:m,maxValue:u,setHoveredIndex:p,hoveredIndex:b}=ke(),h=l-d.left-d.right,x=c-d.top-d.bottom,g=o==="center"?h/m.length:h/(m.length-1),v={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e"}[e],w=m.map((k,N)=>{let T;o==="center"?T=d.left+g*N+g/2:T=d.left+g*N;let C=c-d.bottom-Ut(k.value,u,x);return {x:T,y:C,item:k}}),y="";if(w.length>0)if(y=`M ${w[0].x} ${w[0].y}`,a==="smooth")for(let k=0;k<w.length-1;k++){let N=w[k],T=w[k+1],C=N.x+(T.x-N.x)/2,M=N.y,H=N.x+(T.x-N.x)/2,S=T.y;y+=` C ${C} ${M}, ${H} ${S}, ${T.x} ${T.y}`;}else if(a==="step")for(let k=0;k<w.length-1;k++){let N=w[k],T=w[k+1];y+=` L ${T.x} ${N.y} L ${T.x} ${T.y}`;}else for(let k=1;k<w.length;k++)y+=` L ${w[k].x} ${w[k].y}`;return jsxs("g",{children:[jsx("path",{d:y,fill:"none",stroke:v,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:"animate-draw-line",style:{strokeDasharray:3e3,strokeDashoffset:3e3,animation:`draw-line 2.5s ease-out ${r}s forwards`}}),w.map((k,N)=>jsxs("g",{onMouseEnter:()=>p(N),onMouseLeave:()=>p(null),onClick:()=>s?.(k.item),className:i("cursor-crosshair",s&&"cursor-pointer"),children:[jsx("rect",{x:k.x-g/2,y:d.top,width:g,height:x,fill:"transparent"}),(b===N||t)&&jsxs(Fragment,{children:[b===N&&jsx("line",{x1:k.x,y1:d.top,x2:k.x,y2:c-d.bottom,stroke:"white",strokeWidth:1,strokeDasharray:"4 4",className:"opacity-50"}),jsx("circle",{cx:k.x,cy:k.y,r:b===N?6:4,fill:v,stroke:"white",strokeWidth:2,style:{transition:"r 0.2s ease-out"}}),t&&jsx("text",{x:k.x,y:k.y-12,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${r+1+N*.1}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:m[N]?.value})]})]},N)),jsx("style",{children:`
42
54
  @keyframes draw-line {
43
55
  to { stroke-dashoffset: 0; }
44
56
  }
@@ -46,25 +58,14 @@ import*as ue from'react';import ue__default,{useRef,useState,useEffect,createCon
46
58
  from { opacity: 0; transform: translateY(10px); }
47
59
  to { opacity: 1; transform: translateY(0); }
48
60
  }
49
- `})]})}function Sw({innerRadius:e=0,padAngle:t=.02,showLabels:r=false,colors:a=["#06b6d4","#8b5cf6","#10b981","#f59e0b","#f43f5e","#3b82f6","#ec4899"],onValueClick:s}){let{width:o,height:i,data:l,setHoveredIndex:d,hoveredIndex:c}=he(),m=Math.min(o,i)/2*.8,p=o/2,f=i/2,g=useMemo(()=>l.reduce((u,x)=>u+x.value,0),[l]),h=0,v=l.map((u,x)=>{let y=u.value/g,k=y*2*Math.PI,w=h,N=h+k;return h+=k,{...u,startAngle:w,endAngle:N,color:a[x%a.length],percentage:y}}),b=(u,x)=>{let y=p+x*Math.cos(u),k=f+x*Math.sin(u);return [y,k]};return jsxs("g",{children:[v.map((u,x)=>{let y=u.startAngle+(v.length>1?t/2:0),k=u.endAngle-(v.length>1?t/2:0);if(k<=y)return null;let[w,N]=b(y,m),[M,T]=b(k,m),R=k-y>Math.PI?1:0,O=m*e,[D,E]=b(k,O),[V,S]=b(y,O),C=[`M ${w} ${N}`,`A ${m} ${m} 0 ${R} 1 ${M} ${T}`,e>0?`L ${D} ${E}`:`L ${p} ${f}`,e>0?`A ${O} ${O} 0 ${R} 0 ${V} ${S}`:"","Z"].join(" "),A=c===x,me=(u.startAngle+u.endAngle)/2,Q=m*(e>0?(1+e)/2:.7),[ve,Ae]=b(me,Q);return jsxs("g",{onMouseEnter:()=>d(x),onMouseLeave:()=>d(null),className:"cursor-pointer",children:[jsx("path",{d:C,fill:u.color,className:n("transition-all duration-300 ease-out",A?"opacity-100 brightness-110":"opacity-90"),style:{transformOrigin:`${p}px ${f}px`,transform:A?"scale(1.05)":"scale(1)",animation:`pie-enter 0.6s ease-out ${x*.05}s backwards`}}),(r||A)&&jsxs("text",{x:ve,y:Ae,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:12,fontWeight:600,className:"pointer-events-none",style:{textShadow:"0 1px 2px rgba(0,0,0,0.5)"},children:[Math.round(u.percentage*100),"%"]})]},x)}),jsx("style",{children:`
61
+ `})]})}function K5({innerRadius:e=0,padAngle:t=.02,showLabels:r=false,colors:a=["#06b6d4","#8b5cf6","#10b981","#f59e0b","#f43f5e","#3b82f6","#ec4899"],onValueClick:n}){let{width:o,height:s,data:l,setHoveredIndex:c,hoveredIndex:d}=ke(),m=Math.min(o,s)/2*.8,u=o/2,p=s/2,b=useMemo(()=>l.reduce((f,v)=>f+v.value,0),[l]),h=0,x=l.map((f,v)=>{let w=f.value/b,y=w*2*Math.PI,k=h,N=h+y;return h+=y,{...f,startAngle:k,endAngle:N,color:a[v%a.length],percentage:w}}),g=(f,v)=>{let w=u+v*Math.cos(f),y=p+v*Math.sin(f);return [w,y]};return jsxs("g",{children:[x.map((f,v)=>{let w=f.startAngle+(x.length>1?t/2:0),y=f.endAngle-(x.length>1?t/2:0);if(y<=w)return null;let[k,N]=g(w,m),[T,C]=g(y,m),M=y-w>Math.PI?1:0,H=m*e,[S,E]=g(y,H),[P,D]=g(w,H),L=[`M ${k} ${N}`,`A ${m} ${m} 0 ${M} 1 ${T} ${C}`,e>0?`L ${S} ${E}`:`L ${u} ${p}`,e>0?`A ${H} ${H} 0 ${M} 0 ${P} ${D}`:"","Z"].join(" "),$=d===v,ae=(f.startAngle+f.endAngle)/2,oe=m*(e>0?(1+e)/2:.7),[mt,Sr]=g(ae,oe);return jsxs("g",{onMouseEnter:()=>c(v),onMouseLeave:()=>c(null),className:"cursor-pointer",children:[jsx("path",{d:L,fill:f.color,className:i("transition-all duration-300 ease-out",$?"opacity-100 brightness-110":"opacity-90"),style:{transformOrigin:`${u}px ${p}px`,transform:$?"scale(1.05)":"scale(1)",animation:`pie-enter 0.6s ease-out ${v*.05}s backwards`}}),(r||$)&&jsxs("text",{x:mt,y:Sr,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:12,fontWeight:600,className:"pointer-events-none",style:{textShadow:"0 1px 2px rgba(0,0,0,0.5)"},children:[Math.round(f.percentage*100),"%"]})]},v)}),jsx("style",{children:`
50
62
  @keyframes pie-enter {
51
63
  from { opacity: 0; transform: scale(0.8) rotate(-10deg); }
52
64
  to { opacity: 0.9; transform: scale(1) rotate(0); }
53
65
  }
54
- `})]})}function zw({data:e,keys:t,colors:r=["cyan","purple","emerald"],maxValue:a,height:s=300,className:o,...i}){let[l,d]=useState(0),c=ue__default.useRef(null);ue__default.useEffect(()=>{if(!c.current)return;let b=new ResizeObserver(u=>{u[0]&&d(u[0].contentRect.width);});return b.observe(c.current),()=>b.disconnect()},[]);let m={x:l/2,y:s/2},p=Math.min(l,s)/2-40,f=useMemo(()=>{if(a)return a;let b=0;return e.forEach(u=>{t.forEach(x=>{let y=Number(u[x])||0;y>b&&(b=y);});}),b*1.1||100},[e,t,a]),g=Math.PI*2/e.length,h={cyan:"rgba(6, 182, 212, 0.5)",purple:"rgba(139, 92, 246, 0.5)",emerald:"rgba(16, 185, 129, 0.5)",amber:"rgba(245, 158, 11, 0.5)",rose:"rgba(244, 63, 94, 0.5)"},v={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e"};return l===0?jsx("div",{ref:c,style:{height:s}}):jsx("div",{ref:c,className:n("relative w-full select-none",o),style:{height:s},...i,children:jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${l} ${s}`,className:"overflow-visible",children:[[1,2,3,4,5].map(b=>{let u=p/5*b,x=e.map((y,k)=>{let w=g*k-Math.PI/2;return `${m.x+Math.cos(w)*u},${m.y+Math.sin(w)*u}`}).join(" ");return jsx("polygon",{points:x,fill:"none",stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"},b)}),e.map((b,u)=>{let x=g*u-Math.PI/2,y=m.x+Math.cos(x)*p,k=m.y+Math.sin(x)*p,w=m.x+Math.cos(x)*(p+20),N=m.y+Math.sin(x)*(p+20);return jsxs("g",{children:[jsx("line",{x1:m.x,y1:m.y,x2:y,y2:k,stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"}),jsx("text",{x:w,y:N,textAnchor:"middle",dominantBaseline:"middle",fill:"rgba(255,255,255,0.6)",fontSize:"12",children:b.subject})]},u)}),t.map((b,u)=>{let x=e.map((N,M)=>{let R=(Number(N[b])||0)/f*p,O=g*M-Math.PI/2;return `${m.x+Math.cos(O)*R},${m.y+Math.sin(O)*R}`}).join(" "),y=r[u%r.length]||"cyan",k=h[y],w=v[y];return jsx("polygon",{points:x,fill:k,fillOpacity:.3,stroke:w,strokeWidth:2,className:"transition-all duration-500 ease-out hover:fill-opacity-50"},b)})]})})}function Ww({data:e,color:t="emerald",height:r=40,strokeWidth:a=2,fill:s=false,className:o,...i}){let l=Math.max(...e),d=Math.min(...e),c=l-d||1,p={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e",white:"#ffffff"}[t],f=e.map((v,b)=>{let u=b/(e.length-1)*100,y=95-(v-d)/c*90;return {x:u,y}}),g="";if(f.length>0){g=`M ${f[0].x} ${f[0].y}`;for(let v=0;v<f.length-1;v++){let b=f[v],u=f[v+1],x=b.x+(u.x-b.x)/2,y=b.y,k=b.x+(u.x-b.x)/2,w=u.y;g+=` C ${x} ${y}, ${k} ${w}, ${u.x} ${u.y}`;}}let h=s?`${g} L 100 100 L 0 100 Z`:void 0;return jsx("div",{className:n("w-full overflow-hidden",o),style:{height:r},...i,children:jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"overflow-visible",children:[s&&jsx("path",{d:h,fill:p,fillOpacity:.1,stroke:"none"}),jsx("path",{d:g,fill:"none",stroke:p,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})})}function jw({ticks:e=5,format:t=r=>r.toString()}){let{height:r,padding:a,maxValue:s}=he(),o=r-a.top-a.bottom;return jsx("g",{children:Array.from({length:e+1}).map((i,l)=>{let d=s/e*l,c=r-a.bottom-o/e*l;return jsx("text",{x:a.left-10,y:c,textAnchor:"end",dominantBaseline:"middle",className:"fill-gray-400 dark:fill-white/40 text-xs font-medium",children:t(Math.round(d))},l)})})}var ac=cva("flex flex-col gap-4 rounded-2xl border p-4 transition-all duration-200",{variants:{variant:{default:"bg-white border-gray-200 dark:bg-white/[0.03] dark:border-white/10",glass:"backdrop-blur-md bg-white/80 border-white/20 dark:bg-black/40 dark:border-white/10"}},defaultVariants:{variant:"default"}}),oc=ue__default.forwardRef(({className:e,variant:t,user:r,onFollow:a,onMessage:s,...o},i)=>jsxs("div",{ref:i,className:n(ac({variant:t,className:e})),...o,children:[jsxs("div",{className:"flex items-start justify-between",children:[jsxs("div",{className:"flex gap-3",children:[jsx(fe,{src:r.avatarSrc,alt:r.name,size:"lg"}),jsxs("div",{children:[jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:r.name}),r.role&&jsx("span",{className:"text-xs text-gray-500 dark:text-white/50",children:r.role}),r.email&&jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 mt-0.5",children:r.email})]})]}),a&&jsx(P,{size:"sm",variant:"outline",onClick:a,children:"Follow"})]}),r.bio&&jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 line-clamp-2",children:r.bio}),r.stats&&jsx("div",{className:"flex gap-4 border-t border-gray-100 pt-3 dark:border-white/5",children:r.stats.map((l,d)=>jsxs("div",{className:"flex flex-col",children:[jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:l.value}),jsx("span",{className:"text-[10px] text-gray-500 dark:text-white/40",children:l.label})]},d))}),s&&jsx(P,{className:"w-full mt-2",onClick:s,children:"Message"})]}));oc.displayName="UserPreview";var ic=cva("relative pl-8 pb-8 last:pb-0",{variants:{status:{default:"[&>div:first-child]:bg-gray-200 dark:[&>div:first-child]:bg-white/20",active:"[&>div:first-child]:bg-blue-500",success:"[&>div:first-child]:bg-emerald-500",error:"[&>div:first-child]:bg-rose-500"}},defaultVariants:{status:"default"}}),lc=ue__default.forwardRef(({className:e,status:t,title:r,date:a,description:s,icon:o,isLast:i,...l},d)=>jsxs("div",{ref:d,className:n(ic({status:t,className:e})),...l,children:[!i&&jsx("div",{className:"absolute left-[11px] top-[24px] bottom-0 w-px bg-gray-200 dark:bg-white/[0.06]"}),jsx("div",{className:n("absolute left-0 top-1.5 flex h-6 w-6 items-center justify-center rounded-full border-2 border-white dark:border-black ring-1 ring-transparent transition-colors",t==="active"?"bg-blue-500 ring-blue-500/30":t==="success"?"bg-emerald-500 ring-emerald-500/30":t==="error"?"bg-rose-500 ring-rose-500/30":"bg-gray-200 dark:bg-white/20"),children:o&&jsx("span",{className:"text-white text-[10px]",children:o})}),jsxs("div",{className:"flex flex-col gap-1",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:r}),a&&jsx("span",{className:"text-xs text-gray-500 dark:text-white/40",children:a})]}),s&&jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:s})]})]}));lc.displayName="TimelineItem";var sy=({children:e,className:t})=>jsx("div",{className:n("flex flex-col",t),children:e});var sn=({node:e,depth:t=0,onSelect:r})=>{let[a,s]=useState(false),o=e.children&&e.children.length>0,i=l=>{l.stopPropagation(),o&&s(!a),r?.(e);};return jsxs("div",{children:[jsxs("div",{className:n("flex items-center gap-2 rounded-lg px-2 py-1.5 text-sm text-gray-700 transition-colors hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-white/[0.03] cursor-pointer"),style:{paddingLeft:`${t*12+8}px`},onClick:i,children:[o?jsx("span",{className:"text-gray-400 dark:text-white/40",children:a?jsx(ChevronDown,{className:"h-4 w-4"}):jsx(ChevronRight,{className:"h-4 w-4"})}):jsx("span",{className:"w-4"}),e.icon?jsx("span",{className:"text-gray-500 dark:text-white/50",children:e.icon}):jsx("span",{className:"text-blue-500 dark:text-blue-400",children:o?a?jsx(FolderOpen,{className:"h-4 w-4"}):jsx(Folder,{className:"h-4 w-4"}):jsx(File,{className:"h-4 w-4"})}),jsx("span",{className:"truncate",children:e.label})]}),a&&o&&jsx("div",{className:"animate-in slide-in-from-top-1 fade-in duration-200",children:e.children.map(l=>jsx(sn,{node:l,depth:t+1,onSelect:r},l.id))})]})},py=({data:e,className:t,onSelect:r})=>jsx("div",{className:n("w-full select-none",t),children:e.map(a=>jsx(sn,{node:a,onSelect:r},a.id))});var bc=ue__default.forwardRef(({className:e,title:t="Terminal",children:r,...a},s)=>jsxs("div",{ref:s,className:n("overflow-hidden rounded-2xl border border-gray-200 bg-gray-950 shadow-xl dark:border-white/10",e),...a,children:[jsxs("div",{className:"flex items-center justify-between border-b border-white/10 bg-white/[0.03] px-4 py-2",children:[jsxs("div",{className:"flex items-center gap-1.5",children:[jsx("div",{className:"h-3 w-3 rounded-full bg-rose-500/80"}),jsx("div",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),jsx("div",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),jsx("div",{className:"text-xs font-medium text-white/50",children:t}),jsx("div",{className:"w-10"})," "]}),jsx("div",{className:"p-4 font-mono text-sm text-gray-300",children:r})]}));bc.displayName="Terminal";var xy=({children:e,prefix:t="$",className:r})=>jsxs("div",{className:n("flex gap-2",r),children:[jsx("span",{className:"select-none text-emerald-400",children:t}),jsx("span",{children:e})]});var ky=({className:e,pauseOnHover:t=false,direction:r="left",speed:a="normal",children:s,...o})=>{let i={slow:"40s",normal:"20s",fast:"10s"};return jsxs("div",{className:n("group flex overflow-hidden p-2 [--gap:1rem] [gap:var(--gap)]",e),...o,children:[jsx("div",{className:n("flex shrink-0 justify-around [gap:var(--gap)] min-w-full",r==="left"?"animate-marquee":"animate-marquee-reverse",t&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:i[a]},children:s}),jsx("div",{"aria-hidden":"true",className:n("flex shrink-0 justify-around [gap:var(--gap)] min-w-full",r==="left"?"animate-marquee":"animate-marquee-reverse",t&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:i[a]},children:s}),jsx("style",{children:`
55
- @keyframes marquee {
56
- from { transform: translateX(0); }
57
- to { transform: translateX(calc(-100% - var(--gap))); }
58
- }
59
- @keyframes marquee-reverse {
60
- from { transform: translateX(calc(-100% - var(--gap))); }
61
- to { transform: translateX(0); }
62
- }
63
- .animate-marquee {
64
- animation: marquee linear infinite;
65
- }
66
- .animate-marquee-reverse {
67
- animation: marquee-reverse linear infinite;
68
- }
69
- `})]})};var wc=cva("inline-block rounded-full",{variants:{variant:{success:"bg-emerald-500",warning:"bg-amber-500",error:"bg-rose-500",info:"bg-blue-500",neutral:"bg-gray-400"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},animate:{true:"animate-pulse",false:""}},defaultVariants:{variant:"neutral",size:"md",animate:false}}),yc=ue__default.forwardRef(({className:e,variant:t,size:r,animate:a,...s},o)=>jsx("span",{ref:o,className:n(wc({variant:t,size:r,animate:a,className:e})),...s}));yc.displayName="StatusDot";var Lc=cva("flex items-center gap-2",{variants:{size:{sm:"[&>input]:h-8 [&>input]:w-8 [&>input]:text-sm",md:"[&>input]:h-10 [&>input]:w-10 [&>input]:text-base",lg:"[&>input]:h-12 [&>input]:w-12 [&>input]:text-lg"}},defaultVariants:{size:"md"}}),Pc=ue__default.forwardRef(({className:e,size:t,length:r=6,value:a="",onChange:s,onComplete:o,disabled:i,error:l,...d},c)=>{let[m,p]=useState(new Array(r).fill("")),f=useRef([]);useEffect(()=>{let b=a.split("").slice(0,r),u=[...b,...new Array(r-b.length).fill("")];p(u);},[a,r]);let g=(b,u)=>{let x=b.target.value;if(isNaN(Number(x)))return;let y=[...m];y[u]=x.substring(x.length-1),p(y);let k=y.join("");s?.(k),x&&u<r-1&&f.current[u+1]?.focus(),k.length===r&&o?.(k);},h=(b,u)=>{b.key==="Backspace"&&!m[u]&&u>0&&f.current[u-1]?.focus();},v=b=>{b.preventDefault();let u=b.clipboardData.getData("text/plain").slice(0,r);if(!/^\d+$/.test(u))return;let x=[...m];u.split("").forEach((k,w)=>{x[w]=k;}),p(x);let y=x.join("");s?.(y),y.length===r&&o?.(y),f.current[Math.min(u.length,r-1)]?.focus();};return jsx("div",{ref:c,className:n(Lc({size:t,className:e})),...d,children:m.map((b,u)=>jsx("input",{ref:x=>f.current[u]=x,type:"text",inputMode:"numeric",maxLength:1,value:b,disabled:i,onChange:x=>g(x,u),onKeyDown:x=>h(x,u),onPaste:v,className:n("rounded-2xl border bg-gray-50 text-center font-semibold transition-all duration-200","focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed","dark:bg-white/[0.03] dark:text-white",l?"border-rose-500 text-rose-500 focus:border-rose-500 focus:ring-rose-500/20":"border-gray-200 dark:border-white/10")},u))})});Pc.displayName="OTPInput";var Sc=cva("flex items-center rounded-2xl border bg-gray-50 dark:bg-white/[0.03] dark:border-white/10",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},error:{true:"border-rose-500",false:"border-gray-200"}},defaultVariants:{size:"md",error:false}}),Ac=ue__default.forwardRef(({className:e,size:t,error:r,value:a=0,onChange:s,min:o=-1/0,max:i=1/0,step:l=1,disabled:d,...c},m)=>{let p=()=>{a-l>=o&&s?.(a-l);},f=()=>{a+l<=i&&s?.(a+l);},g=h=>{let v=parseFloat(h.target.value);isNaN(v)||s?.(v);};return jsxs("div",{className:n(Sc({size:t,error:r,className:e})),children:[jsx("button",{type:"button",onClick:p,disabled:d||a<=o,className:"flex h-full items-center justify-center px-3 text-gray-500 hover:text-gray-900 disabled:opacity-50 dark:text-white/50 dark:hover:text-white",children:jsx(Minus,{className:"h-3.5 w-3.5"})}),jsx("div",{className:"h-full w-px bg-gray-200 dark:bg-white/[0.06]"}),jsx("input",{ref:m,type:"number",value:a,onChange:g,disabled:d,className:"h-full w-full min-w-[3rem] bg-transparent text-center text-sm font-medium text-gray-900 focus:outline-none dark:text-white",...c}),jsx("div",{className:"h-full w-px bg-gray-200 dark:bg-white/[0.06]"}),jsx("button",{type:"button",onClick:f,disabled:d||a>=i,className:"flex h-full items-center justify-center px-3 text-gray-500 hover:text-gray-900 disabled:opacity-50 dark:text-white/50 dark:hover:text-white",children:jsx(Plus,{className:"h-3.5 w-3.5"})})]})});Ac.displayName="NumberInput";var Oc=cva("inline-flex items-center rounded-2xl border border-gray-200 bg-gray-50 p-1 dark:border-white/10 dark:bg-white/[0.03]",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full flex",false:""}},defaultVariants:{size:"md",fullWidth:false}}),zc=cva("inline-flex items-center justify-center whitespace-nowrap rounded-2xl px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-gray-950 dark:focus-visible:ring-gray-300",{variants:{selected:{true:"bg-white text-gray-950 shadow-sm dark:bg-gray-800 dark:text-gray-50",false:"text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-50"},fullWidth:{true:"flex-1",false:""}},defaultVariants:{selected:false,fullWidth:false}}),$c=ue__default.forwardRef(({className:e,size:t,fullWidth:r,value:a,onChange:s,options:o,...i},l)=>jsx("div",{ref:l,className:n(Oc({size:t,fullWidth:r,className:e})),...i,children:o.map(d=>jsxs("button",{type:"button",onClick:()=>s?.(d.value),className:n(zc({selected:a===d.value,fullWidth:r})),children:[d.icon&&jsx("span",{className:"mr-2",children:d.icon}),d.label]},d.value))}));$c.displayName="ToggleGroup";var Uc=ue__default.forwardRef(({className:e,max:t=5,value:r=0,onChange:a,readOnly:s=false,size:o="md",...i},l)=>{let[d,c]=useState(null),m={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};return jsx("div",{ref:l,className:n("flex items-center gap-1",e),...i,children:Array.from({length:t}).map((p,f)=>{let g=f+1,h=(d!==null?d:r)>=g;return jsx("button",{type:"button",disabled:s,onClick:()=>a?.(g),onMouseEnter:()=>!s&&c(g),onMouseLeave:()=>!s&&c(null),className:n("transition-transform hover:scale-110 focus:outline-none",s&&"cursor-default hover:scale-100"),children:jsx(Star,{className:n(m[o],"transition-colors duration-200",h?"fill-amber-400 text-amber-400":"fill-transparent text-gray-300 dark:text-white/20")})},f)})})});Uc.displayName="Rating";var Zy=({steps:e,currentStep:t,className:r,onStepClick:a})=>jsx("div",{className:n("flex w-full flex-col gap-4 md:flex-row",r),children:e.map((s,o)=>{let i=t>o,l=t===o,d=!!a;return jsxs("div",{className:n("flex flex-1 flex-col gap-2 md:flex-row md:items-center md:gap-4",d&&"cursor-pointer"),onClick:()=>d&&a(o),children:[jsxs("div",{className:"flex items-center gap-4 md:flex-col md:gap-2",children:[jsxs("div",{className:"flex items-center",children:[jsx("div",{className:n("flex h-8 w-8 items-center justify-center rounded-full border-2 text-sm font-semibold transition-colors",i?"border-blue-600 bg-blue-600 text-white dark:border-blue-500 dark:bg-blue-500":l?"border-blue-600 text-blue-600 dark:border-blue-500 dark:text-blue-500":"border-gray-300 text-gray-500 dark:border-white/20 dark:text-white/40"),children:i?jsx(Check,{className:"h-4 w-4"}):o+1}),o<e.length-1&&jsx("div",{className:n("ml-4 h-px flex-1 bg-gray-200 md:hidden dark:bg-white/[0.03]",i&&"bg-blue-600 dark:bg-blue-500")})]}),jsxs("div",{className:"flex flex-col",children:[jsx("span",{className:n("text-sm font-medium",l||i?"text-gray-900 dark:text-white":"text-gray-500 dark:text-white/50"),children:s.title}),s.description&&jsx("span",{className:"text-xs text-gray-500 dark:text-white/40 hidden md:block",children:s.description})]})]}),o<e.length-1&&jsx("div",{className:n("hidden h-px flex-1 bg-gray-200 md:block dark:bg-white/[0.03]",i&&"bg-blue-600 dark:bg-blue-500")})]},o)})});var ik=({children:e,className:t,size:r=300,color:a="rgba(255, 255, 255, 0.1)",...s})=>{let o=useRef(null);return jsxs("div",{ref:o,onMouseMove:c=>{let m=o.current;if(!m)return;let p=m.getBoundingClientRect(),f=c.clientX-p.left,g=c.clientY-p.top;m.style.setProperty("--mouse-x",`${f}px`),m.style.setProperty("--mouse-y",`${g}px`);},onMouseEnter:()=>{o.current?.style.setProperty("--opacity","1");},onMouseLeave:()=>{o.current?.style.setProperty("--opacity","0");},className:n("relative overflow-hidden rounded-2xl border border-gray-200 bg-white dark:border-white/10 dark:bg-black",t),...s,children:[jsx("div",{className:"pointer-events-none absolute -inset-px transition-opacity duration-300",style:{opacity:"var(--opacity, 0)",background:`radial-gradient(${r}px circle at var(--mouse-x, center) var(--mouse-y, center), ${a}, transparent 80%)`}}),jsx("div",{className:"relative h-full",children:e})]})};var sm=cva("relative flex w-full flex-col rounded-2xl border transition-all duration-200 focus-within:ring-4",{variants:{variant:{default:"bg-white border-gray-200 shadow-sm focus-within:border-purple-500/50 focus-within:ring-purple-500/10 dark:bg-white/[0.03] dark:border-white/10 dark:shadow-none",ghost:"bg-transparent border-transparent shadow-none focus-within:bg-white/50 dark:focus-within:bg-white/5"}},defaultVariants:{variant:"default"}}),im=ue__default.forwardRef(({className:e,variant:t,onSubmit:r,isGenerating:a,onAttach:s,onFilesSelected:o,onStop:i,onMic:l,maxLength:d,footer:c,attachments:m,onRemoveAttachment:p,accept:f,multiple:g,placeholder:h="Ask AI anything...",value:v,onChange:b,...u},x)=>{let[y,k]=useState(""),w=v!==void 0,N=w?v:y,M=useRef(null),T=useRef(null),R=()=>{M.current&&(M.current.style.height="auto",M.current.style.height=`${M.current.scrollHeight}px`);};useEffect(()=>{R();},[N]);let O=C=>{let A=C.target.value;d&&A.length>d||(w||k(A),b?.(C));},D=C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),N.trim()&&!a&&(r?.(N),w||k(""))),u.onKeyDown?.(C);},E=()=>{a&&i?i():N.trim()&&(r?.(N),w||k(""));},V=()=>{o&&T.current?T.current.click():s?.();},S=C=>{C.target.files&&C.target.files.length>0&&o?.(C.target.files),T.current&&(T.current.value="");};return jsxs("div",{className:n(sm({variant:t,className:e})),children:[jsx("input",{type:"file",ref:T,className:"hidden",onChange:S,accept:f,multiple:g}),m&&m.length>0&&jsx("div",{className:"flex flex-wrap gap-2 px-4 pt-4",children:m.map(C=>jsxs("div",{className:"group relative flex items-center gap-2 rounded-xl border border-gray-200 bg-gray-50 px-3 py-1.5 text-sm transition-colors hover:bg-gray-100 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/[0.06]",children:[jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded-lg bg-white dark:bg-white/[0.06]",children:jsx(File,{className:"h-3 w-3 text-purple-500"})}),jsx("span",{className:"max-w-[120px] truncate text-gray-700 dark:text-gray-300",children:C.name}),jsx("button",{onClick:()=>p?.(C.id),className:"ml-1 rounded-full p-0.5 text-gray-400 opacity-0 transition-all hover:bg-gray-200 hover:text-gray-600 group-hover:opacity-100 dark:hover:bg-white/[0.06] dark:hover:text-white",type:"button",children:jsx(X,{className:"h-3 w-3"})})]},C.id))}),jsx("textarea",{ref:C=>{M.current=C,typeof x=="function"?x(C):x&&(x.current=C);},value:N,onChange:O,onKeyDown:D,placeholder:h,rows:1,className:n("w-full resize-none bg-transparent px-4 py-4 text-base outline-none max-h-[200px]","text-gray-900 placeholder:text-gray-400","dark:text-white dark:placeholder:text-white/40"),disabled:a&&!i,...u}),jsxs("div",{className:"flex items-center justify-between px-2 pb-2",children:[jsxs("div",{className:"flex items-center gap-1",children:[jsx(P,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-gray-600 dark:text-white/40 dark:hover:text-white",onClick:V,type:"button",title:"Attach file",children:jsx(Paperclip,{className:"h-5 w-5"})}),l&&jsx(P,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-gray-600 dark:text-white/40 dark:hover:text-white",onClick:l,type:"button",title:"Use microphone",children:jsx(Mic,{className:"h-5 w-5"})})]}),jsxs("div",{className:"flex items-center gap-3",children:[d&&jsxs("span",{className:"text-xs text-gray-400 dark:text-white/30",children:[N.length,"/",d]}),jsx(P,{size:"icon",disabled:!N.trim()&&!a||a&&!i,onClick:E,className:n("h-8 w-8 rounded-full transition-all duration-200",N.trim()||a?"bg-purple-600 text-white hover:bg-purple-500 shadow-lg shadow-purple-500/25":"bg-gray-100 text-gray-400 dark:bg-white/[0.06] dark:text-white/20"),children:a?i?jsx(Square,{className:"h-3 w-3 fill-current"}):jsx(Sparkles,{className:"h-4 w-4 animate-pulse"}):jsx(ArrowUp,{className:"h-4 w-4"})})]})]}),c&&jsx("div",{className:"border-t border-gray-100 px-4 py-2 text-xs text-gray-400 dark:border-white/5 dark:text-white/30",children:c})]})});im.displayName="AIPromptInput";var xm=cva("group relative overflow-hidden rounded-2xl border transition-all duration-200",{variants:{variant:{default:"bg-gray-50 border-gray-200 dark:bg-white/[0.02] dark:border-white/10",ghost:"bg-transparent border-transparent",outline:"bg-transparent border-gray-200 dark:border-white/10"}},defaultVariants:{variant:"default"}}),vm=ue__default.forwardRef(({className:e,variant:t,children:r,onCopy:a,onRegenerate:s,onFeedback:o,onShare:i,onEdit:l,timestamp:d,sources:c,model:m,usage:p,...f},g)=>jsxs("div",{ref:g,className:n(xm({variant:t,className:e})),...f,children:[jsxs("div",{className:"absolute left-4 top-4 flex items-center gap-3",children:[jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br from-purple-500 to-blue-500 shadow-lg shadow-purple-500/20",children:jsx(Sparkles,{className:"h-3.5 w-3.5 text-white"})}),d&&jsx("span",{className:"text-xs font-medium text-gray-400 dark:text-white/30",children:d})]}),jsxs("div",{className:"pl-14 pr-4 py-4",children:[jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none text-gray-700 dark:text-gray-300",children:r}),c&&c.length>0&&jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:c.map((h,v)=>jsxs("a",{href:h.url,target:"_blank",rel:"noopener noreferrer",className:n("flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs transition-colors","border-gray-200 bg-white text-gray-600 hover:bg-gray-50","dark:border-white/10 dark:bg-white/[0.03] dark:text-white/60 dark:hover:bg-white/[0.06]"),children:[jsx("span",{className:"max-w-[150px] truncate",children:h.title}),jsx(ExternalLink,{className:"h-3 w-3 opacity-50"})]},v))})]}),jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 bg-white/50 px-2 py-1.5 backdrop-blur dark:border-white/5 dark:bg-white/[0.02]",children:[jsxs("div",{className:"flex items-center gap-3 px-2 text-[10px] font-medium text-gray-400 dark:text-white/20",children:[m&&jsx("span",{children:m}),p&&jsx("span",{children:p})]}),jsxs("div",{className:"flex items-center gap-1",children:[jsxs(P,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:a,children:[jsx(Copy,{className:"mr-1.5 h-3.5 w-3.5"}),"Copy"]}),i&&jsx(P,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:i,title:"Share",children:jsx(Share,{className:"h-3.5 w-3.5"})}),l&&jsx(P,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:l,title:"Edit",children:jsx(Edit,{className:"h-3.5 w-3.5"})}),jsx("div",{className:"mx-1 h-3 w-px bg-gray-200 dark:bg-white/10"}),jsx(P,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:s,title:"Regenerate",children:jsx(RefreshCw,{className:"h-3.5 w-3.5"})}),jsx(P,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:()=>o?.("up"),title:"Helpful",children:jsx(ThumbsUp,{className:"h-3.5 w-3.5"})}),jsx(P,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:()=>o?.("down"),title:"Not helpful",children:jsx(ThumbsDown,{className:"h-3.5 w-3.5"})})]})]})]}));vm.displayName="AIResponse";function Mk({children:e,className:t,...r}){return jsx("div",{className:n("flex h-[800px] w-full overflow-hidden rounded-3xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/40 backdrop-blur-xl shadow-2xl",t),...r,children:e})}function Hk({conversations:e,activeId:t,onSelect:r,onNewChat:a,className:s,...o}){return jsxs("div",{className:n("flex w-80 flex-col border-r border-gray-200 dark:border-white/10 bg-gray-50/50 dark:bg-white/[0.02]",s),...o,children:[jsxs("div",{className:"p-4 space-y-4",children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"Messages"}),jsx("button",{onClick:a,className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsx(Plus,{className:"h-5 w-5"})})]}),jsxs("div",{className:"relative",children:[jsx(Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),jsx("input",{type:"text",placeholder:"Search messages...",className:"w-full h-10 pl-9 pr-4 rounded-2xl bg-white dark:bg-white/[0.03] border border-gray-200 dark:border-white/10 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all placeholder:text-gray-400"})]})]}),jsx(Te,{className:"flex-1",children:jsx("div",{className:"p-2 space-y-1",children:e.map(i=>jsxs("button",{onClick:()=>r?.(i.id),className:n("w-full flex items-center gap-3 p-3 rounded-2xl transition-all text-left group",t===i.id?"bg-blue-500/10 dark:bg-white/[0.06] shadow-[0_0_15px_rgba(59,130,246,0.1)] dark:shadow-[0_0_15px_rgba(255,255,255,0.05)]":"hover:bg-gray-100 dark:hover:bg-white/[0.03]"),children:[jsxs("div",{className:"relative",children:[jsx(fe,{src:i.user.avatar,alt:i.user.name,fallback:i.user.name[0]}),i.user.status==="online"&&jsx("span",{className:"absolute bottom-0 right-0 h-3 w-3 rounded-full bg-green-500 border-2 border-white dark:border-black"})]}),jsxs("div",{className:"flex-1 min-w-0",children:[jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[jsx("span",{className:n("font-medium truncate",t===i.id?"text-blue-600 dark:text-white":"text-gray-900 dark:text-white/90"),children:i.user.name}),i.lastMessage&&jsx("span",{className:"text-xs text-gray-400 whitespace-nowrap ml-2",children:i.lastMessage.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:n("text-sm truncate pr-2",t===i.id?"text-blue-600/80 dark:text-white/70":"text-gray-500 dark:text-white/50",i.isTyping&&"text-blue-500 italic"),children:i.isTyping?"Typing...":i.lastMessage?.content}),i.unreadCount?jsx("span",{className:"flex h-5 min-w-[1.25rem] items-center justify-center rounded-full bg-blue-500 px-1.5 text-[10px] font-bold text-white",children:i.unreadCount}):null]})]})]},i.id))})})]})}function Ok({user:e,onBack:t,onInfo:r,className:a,...s}){return jsxs("div",{className:n("flex h-16 items-center justify-between border-b border-gray-200 dark:border-white/10 bg-white/80 dark:bg-black/40 backdrop-blur px-4 sticky top-0 z-10",a),...s,children:[jsxs("div",{className:"flex items-center gap-3",children:[t&&jsx("button",{onClick:t,className:"md:hidden p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsx(ArrowLeft,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),jsxs("div",{className:"relative cursor-pointer",onClick:r,children:[jsx(fe,{src:e.avatar,alt:e.name,fallback:e.name[0]}),e.status==="online"&&jsx("span",{className:"absolute bottom-0 right-0 h-3 w-3 rounded-full bg-green-500 border-2 border-white dark:border-black"})]}),jsxs("div",{className:"cursor-pointer",onClick:r,children:[jsx("h3",{className:"font-semibold text-gray-900 dark:text-white leading-none mb-1",children:e.name}),jsx("p",{className:"text-xs text-gray-500 dark:text-white/50",children:e.status==="online"?"Online":`Last seen ${e.lastSeen?.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`})]})]}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsx(Phone,{className:"h-5 w-5"})}),jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsx(Video,{className:"h-5 w-5"})}),jsx("button",{onClick:r,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsx(MoreVertical,{className:"h-5 w-5"})})]})]})}var pn=cva("transition-all duration-700 ease-out",{variants:{preset:{fade:"opacity-0 translate-y-4",spring:"opacity-0 scale-95 translate-y-4","slide-right":"opacity-0 -translate-x-8","slide-left":"opacity-0 translate-x-8",blur:"opacity-0 blur-sm scale-105","3d-flip":"opacity-0 rotate-x-90"},visibleState:{fade:"opacity-100 translate-y-0",spring:"opacity-100 scale-100 translate-y-0 animate-enter-spring","slide-right":"opacity-100 translate-x-0","slide-left":"opacity-100 translate-x-0",blur:"opacity-100 blur-0 scale-100","3d-flip":"opacity-100 rotate-x-0"}},defaultVariants:{preset:"spring"}});function fn({className:e,preset:t="spring",viewport:r=true,visible:a,delay:s=0,once:o=true,asChild:i=false,children:l,style:d,...c}){let{ref:m,isInView:p,hasAnimated:f}=Be({threshold:.1,enabled:r&&a===void 0}),h=a!==void 0?a:r?o?f:p:true,v=pn({preset:t}),b=h?pn({visibleState:t}):"";return jsx(i?rt:"div",{ref:m,className:n(v,b,e),style:{transitionDelay:`${s}ms`,willChange:"transform, opacity",...d},...c,children:l})}function bn({message:e,isOwn:t,showAvatar:r,showStatus:a=true,className:s,onReply:o,onReact:i,onDelete:l}){return jsxs(fn,{preset:"spring",className:n("flex w-full gap-2 mb-1 group relative",t?"justify-end":"justify-start",s),children:[jsx("div",{className:n("absolute top-2 opacity-0 group-hover:opacity-100 transition-opacity z-10",t?"left-0 -translate-x-full pr-2":"right-0 translate-x-full pl-2"),children:jsxs(wt,{children:[jsx(yt,{className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-400",children:jsx(MoreHorizontal,{className:"h-4 w-4"})}),jsxs(kt,{align:t?"end":"start",children:[jsxs(ee,{onClick:()=>o?.(e),children:[jsx(Reply,{className:"h-4 w-4 mr-2"})," Reply"]}),jsxs(ee,{onClick:()=>navigator.clipboard.writeText(e.content),children:[jsx(Copy,{className:"h-4 w-4 mr-2"})," Copy"]}),jsxs(ee,{onClick:()=>i?.(e,"\u{1F44D}"),children:[jsx(Smile,{className:"h-4 w-4 mr-2"})," React"]}),t&&jsxs(ee,{onClick:()=>l?.(e),className:"text-red-500",children:[jsx(Trash2,{className:"h-4 w-4 mr-2"})," Delete"]})]})]})}),jsxs("div",{className:n("relative max-w-[70%] px-4 py-2 rounded-2xl shadow-sm transition-all",t?"bg-blue-600 text-white rounded-tr-sm":"bg-white dark:bg-white/[0.06] text-gray-900 dark:text-white rounded-tl-sm border border-gray-200 dark:border-transparent"),children:[e.replyToId&&jsx("div",{className:n("mb-2 rounded px-2 py-1 text-xs border-l-2 opacity-80",t?"bg-white/[0.06] border-white/50":"bg-gray-100 dark:bg-black/20 border-blue-500"),children:"Replying to message..."}),e.attachments&&e.attachments.length>0&&jsx("div",{className:"mb-2 space-y-2",children:e.attachments.map(d=>d.type==="image"?jsx(la,{src:d.url,alt:"Attachment",className:"rounded-2xl max-h-60 object-cover w-full"},d.id):jsxs("div",{className:"flex items-center gap-2 p-2 rounded bg-black/5 dark:bg-white/[0.06]",children:[jsx("div",{className:"h-8 w-8 bg-gray-200 dark:bg-white/20 rounded flex items-center justify-center text-xs font-bold",children:"FILE"}),jsx("div",{className:"text-xs truncate flex-1",children:d.name||"File"})]},d.id))}),jsx("div",{className:"text-sm whitespace-pre-wrap break-words leading-relaxed",children:e.content}),jsxs("div",{className:n("flex items-center justify-end gap-1 mt-1 select-none",t?"text-blue-100":"text-gray-400 dark:text-white/40"),children:[jsx("span",{className:"text-[10px]",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),t&&a&&jsx("span",{className:"flex items-center",children:e.status==="read"?jsx(CheckCheck,{className:"h-3 w-3 text-blue-200"}):e.status==="delivered"?jsx(CheckCheck,{className:"h-3 w-3 text-blue-200/50"}):jsx(Check,{className:"h-3 w-3 text-blue-200/50"})})]}),e.reactions&&Object.keys(e.reactions).length>0&&jsx("div",{className:"absolute -bottom-2 right-4 flex gap-1",children:Object.entries(e.reactions).map(([d,c])=>jsxs("div",{className:"bg-white dark:bg-gray-800 shadow-sm border border-gray-100 dark:border-white/10 rounded-full px-1.5 py-0.5 text-[10px] flex items-center gap-1",children:[jsx("span",{children:d}),jsx("span",{className:"text-gray-500",children:c.length})]},d))})]})]})}function s2({messages:e,currentUserId:t,className:r,onReply:a,onReact:s,onDelete:o,onLoadMore:i,hasMore:l,isLoadingMore:d,...c}){let m=useRef(null),[p,f]=useState(true);useEffect(()=>{p&&m.current?.scrollIntoView({behavior:"smooth"});},[e,p]);let g=v=>{let b=v.currentTarget,u=Math.abs(b.scrollHeight-b.clientHeight-b.scrollTop)<50;f(u),b.scrollTop===0&&l&&!d&&i&&i();},h=useMemo(()=>e.reduce((v,b)=>{let u=b.timestamp.toLocaleDateString();return v[u]||(v[u]=[]),v[u].push(b),v},{}),[e]);return e.length===0&&!d?jsx("div",{className:n("flex-1 flex items-center justify-center p-8 text-center text-gray-500 dark:text-white/40",r),...c,children:jsxs("div",{className:"max-w-sm space-y-4",children:[jsx("div",{className:"w-24 h-24 bg-blue-500/10 dark:bg-white/[0.03] rounded-full flex items-center justify-center mx-auto mb-6 animate-pulse",children:jsx(MessageSquare,{className:"h-12 w-12 text-blue-500"})}),jsx("h3",{className:"text-xl font-medium text-gray-900 dark:text-white",children:"No messages yet"}),jsx("p",{children:"Start the conversation by sending a message below."})]})}):jsx(Te,{className:n("flex-1 p-4",r),onScroll:g,role:"log","aria-live":"polite","aria-relevant":"additions",...c,children:jsxs("div",{className:"space-y-6 pb-4",children:[l&&jsx("div",{className:"flex justify-center py-4",children:d?jsxs("div",{className:"flex items-center gap-2 text-xs text-white/40",children:[jsx("div",{className:"w-4 h-4 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"}),"Loading older messages..."]}):jsx("button",{onClick:i,className:"text-xs text-cyan-500/60 hover:text-cyan-500 transition-colors",children:"Load older messages"})}),Object.entries(h).map(([v,b])=>jsxs("div",{className:"space-y-4",children:[jsx("div",{className:"flex justify-center sticky top-0 z-10 py-2",children:jsx("span",{className:"px-3 py-1 rounded-full bg-gray-100/80 dark:bg-white/[0.03] text-[10px] uppercase tracking-wider font-bold text-gray-500 dark:text-white/40 backdrop-blur-md border border-white/5 shadow-sm",children:v})}),jsx("div",{className:"space-y-1",children:b.map((u,x)=>{let y=u.senderId===t,k=b[x-1],w=b[x+1];!k||k.senderId!==u.senderId;let M=!w||w.senderId!==u.senderId;return jsx(bn,{message:u,isOwn:y,className:n(!M&&"mb-0.5"),onReply:a,onReact:s,onDelete:o},u.id)})})]},v)),jsx("div",{ref:m,className:"h-px"})]})})}function x2({onSend:e,onAttach:t,placeholder:r="Type a message...",users:a=[],className:s,...o}){let[i,l]=useState(""),[d,c]=useState(false),[m,p]=useState(null),[f,g]=useState(0),h=useRef(null),v=useMemo(()=>m===null?[]:a.filter(w=>w.name.toLowerCase().includes(m.toLowerCase())).slice(0,5),[a,m]),b=w=>{let N=w.target.value;l(N);N[w.target.selectionStart-1];let R=N.slice(0,w.target.selectionStart).match(/@(\w*)$/);R?(p(R[1]||""),g(0)):p(null),h.current&&(h.current.style.height="auto",h.current.style.height=`${Math.min(h.current.scrollHeight,120)}px`);},u=w=>{if(!h.current)return;let N=h.current.selectionStart,M=i.slice(0,N).replace(/@\w*$/,`@${w.name} `),T=i.slice(N);l(M+T),p(null),h.current.focus();},x=w=>{if(m!==null&&v.length>0){w.key==="ArrowDown"?(w.preventDefault(),g(N=>(N+1)%v.length)):w.key==="ArrowUp"?(w.preventDefault(),g(N=>(N-1+v.length)%v.length)):w.key==="Enter"||w.key==="Tab"?(w.preventDefault(),u(v[f])):w.key==="Escape"&&p(null);return}w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),y());},y=()=>{i.trim()&&(e?.(i),l(""),h.current&&(h.current.style.height="auto"));},k=()=>{c(true),setTimeout(()=>{c(false),t?.();},1e3);};return jsxs("div",{className:n("relative p-4 border-t border-white/10 bg-white/[0.02]",s),...o,children:[m!==null&&v.length>0&&jsxs(Z,{className:"absolute bottom-full left-4 mb-2 w-64 overflow-hidden shadow-2xl animate-in fade-in slide-in-from-bottom-2",children:[jsx("div",{className:"p-2 border-b border-white/10 bg-white/[0.02]",children:jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-white/40 px-2",children:"Mention User"})}),jsx("div",{className:"max-h-48 overflow-y-auto p-1",children:v.map((w,N)=>jsxs("button",{onClick:()=>u(w),className:n("w-full flex items-center gap-3 px-3 py-2 rounded-2xl transition-colors text-left",N===f?"bg-white/[0.06]":"hover:bg-white/[0.03]"),children:[jsx(fe,{src:w.avatar,alt:w.name,size:"sm"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"text-sm font-medium text-white truncate",children:w.name}),jsxs("div",{className:"text-xs text-white/40 truncate",children:["@",w.name.toLowerCase().replace(/\s/g,"")]})]}),N===f&&jsx("div",{className:"text-[10px] bg-white/[0.06] px-1.5 py-0.5 rounded text-white/60",children:"Enter"})]},w.id))})]}),jsxs("div",{className:"flex items-end gap-2 max-w-4xl mx-auto",children:[jsx("div",{className:"flex gap-1 mb-1",children:jsx(P,{variant:"ghost",size:"icon",className:"h-9 w-9 rounded-2xl text-white/40 hover:text-white",onClick:k,disabled:d,children:jsx(Paperclip,{className:n("w-5 h-5",d&&"animate-pulse text-blue-500")})})}),jsxs("div",{className:"flex-1 relative group",children:[jsx("textarea",{ref:h,value:i,onChange:b,onKeyDown:x,placeholder:d?"Uploading...":r,rows:1,className:"w-full bg-white/[0.03] border border-white/10 rounded-2xl px-4 py-2.5 text-sm text-white placeholder:text-white/20 focus:outline-none focus:ring-2 focus:ring-white/10 resize-none transition-all min-h-[44px]"}),jsxs("div",{className:"absolute right-3 bottom-2.5 flex items-center gap-2 opacity-0 group-focus-within:opacity-100 transition-opacity",children:[jsx("button",{className:"text-white/20 hover:text-white/60 transition-colors",children:jsx(Smile,{className:"w-4 h-4"})}),jsx("button",{className:"text-white/20 hover:text-white/60 transition-colors",children:jsx(AtSign,{className:"w-4 h-4"})})]})]}),jsx("div",{className:"flex gap-2 mb-1",children:i.trim()?jsx(P,{onClick:y,className:"h-9 w-9 rounded-2xl bg-white text-black hover:bg-white/90 p-0",children:jsx(Send,{className:"w-4 h-4"})}):jsx(P,{variant:"ghost",size:"icon",className:"h-9 w-9 rounded-2xl text-white/40 hover:text-white",children:jsx(Mic,{className:"w-5 h-5"})})})]})]})}var Gm=cva("shrink-0 bg-gray-200 dark:bg-white/[0.03]",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"}},defaultVariants:{orientation:"horizontal"}}),qt=ue__default.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,...a},s)=>jsx("div",{ref:s,role:r?"none":"separator","aria-orientation":r?void 0:t,className:n(Gm({orientation:t,className:e})),...a}));qt.displayName="Separator";function S2({user:e,onClose:t,className:r,...a}){return jsxs("div",{className:n("w-80 border-l border-gray-200 dark:border-white/10 bg-white dark:bg-black/20 flex flex-col",r),...a,children:[jsxs("div",{className:"h-16 flex items-center px-4 border-b border-gray-200 dark:border-white/10",children:[jsx("button",{onClick:t,className:"p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsx(X,{className:"h-5 w-5 text-gray-500"})}),jsx("span",{className:"ml-2 font-semibold text-gray-900 dark:text-white",children:"Contact Info"})]}),jsxs(Te,{className:"flex-1",children:[jsxs("div",{className:"p-6 flex flex-col items-center text-center",children:[jsx(fe,{src:e.avatar,alt:e.name,fallback:e.name[0],className:"h-24 w-24 mb-4 text-2xl"}),jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:e.name}),jsx("p",{className:"text-sm text-gray-500 dark:text-white/50 mt-1",children:e.phone||"+1 (555) 000-0000"}),jsxs("div",{className:"mt-6 w-full",children:[jsx("p",{className:"text-sm text-gray-500 dark:text-white/50 mb-1 text-left",children:"About"}),jsx("p",{className:"text-sm text-gray-900 dark:text-white text-left",children:e.bio||"Hey there! I am using Pixon Chat."})]})]}),jsx(qt,{}),jsxs("div",{className:"p-4 space-y-4",children:[jsx("h3",{className:"text-xs font-semibold text-gray-500 dark:text-white/40 uppercase tracking-wider",children:"Media & Docs"}),jsx("div",{className:"grid grid-cols-3 gap-2",children:[1,2,3,4,5,6].map(s=>jsxs("div",{className:"aspect-square rounded-2xl bg-gray-100 dark:bg-white/[0.03] overflow-hidden relative group cursor-pointer",children:[jsx("div",{className:"absolute inset-0 flex items-center justify-center text-gray-400",children:jsx(Image,{className:"h-6 w-6"})}),jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity"})]},s))})]}),jsx(qt,{}),jsx("div",{className:"p-4 space-y-4",children:jsxs("div",{className:"flex items-center justify-between",children:[jsxs("div",{className:"flex items-center gap-3 text-gray-700 dark:text-white/80",children:[jsx(Bell,{className:"h-5 w-5"}),jsx("span",{className:"text-sm font-medium",children:"Mute Notifications"})]}),jsx(Lr,{})]})}),jsx(qt,{}),jsxs("div",{className:"p-4 space-y-2",children:[jsxs("button",{className:"w-full flex items-center gap-3 p-3 rounded-2xl hover:bg-red-50 dark:hover:bg-red-500/10 text-red-600 dark:text-red-400 transition-colors text-sm font-medium",children:[jsx(Ban,{className:"h-5 w-5"}),"Block ",e.name]}),jsxs("button",{className:"w-full flex items-center gap-3 p-3 rounded-2xl hover:bg-red-50 dark:hover:bg-red-500/10 text-red-600 dark:text-red-400 transition-colors text-sm font-medium",children:[jsx(Trash2,{className:"h-5 w-5"}),"Delete Chat"]})]})]})]})}function $2({children:e,stagger:t=100,delay:r=0,className:a,...s}){let{ref:o,hasAnimated:i}=Be({threshold:.1});return jsx("div",{ref:o,className:n("relative",a),...s,children:ue__default.Children.map(e,(l,d)=>ue__default.isValidElement(l)?ue__default.cloneElement(l,{visible:i,viewport:false,delay:r+d*t}):l)})}function U2({text:e,type:t="char",stagger:r=30,delay:a=0,className:s,...o}){let{ref:i,hasAnimated:l}=Be({threshold:.2}),d=t==="char"?e.split(""):e.split(" ");return jsx("div",{ref:i,className:n("flex flex-wrap",s),"aria-label":e,...o,children:d.map((c,m)=>jsxs("span",{className:n("inline-block whitespace-pre transition-all duration-500 ease-out will-change-transform",l?"opacity-100 translate-y-0 blur-0":"opacity-0 translate-y-4 blur-sm"),style:{transitionDelay:`${a+m*r}ms`},children:[c,t==="word"&&m!==d.length-1?" ":""]},m))})}function Q2({children:e,speed:t=.1,direction:r="vertical",className:a,...s}){let o=useRef(null);return useEffect(()=>{let i=o.current;if(!i)return;let l=()=>{let d=i.getBoundingClientRect(),c=window.innerHeight;if(d.top>c||d.bottom<0)return;let p=(c/2-(d.top+d.height/2))*t;r==="vertical"?i.style.transform=`translate3d(0, ${p}px, 0)`:i.style.transform=`translate3d(${p}px, 0, 0)`;};return window.addEventListener("scroll",l,{passive:true}),l(),()=>window.removeEventListener("scroll",l)},[t,r]),jsx("div",{ref:o,className:n("will-change-transform",a),...s,children:e})}function o1({children:e,strength:t=.5,className:r}){let a=useRef(null),s=i=>{let l=a.current;if(!l)return;let{clientX:d,clientY:c}=i,{left:m,top:p,width:f,height:g}=l.getBoundingClientRect(),h=m+f/2,v=p+g/2,b=d-h,u=c-v,x=Math.max(f,g)*1.5;Math.abs(b)<x&&Math.abs(u)<x?(l.style.setProperty("--mag-x",`${b*t}px`),l.style.setProperty("--mag-y",`${u*t}px`)):(l.style.setProperty("--mag-x","0px"),l.style.setProperty("--mag-y","0px"));},o=()=>{let i=a.current;i&&(i.style.setProperty("--mag-x","0px"),i.style.setProperty("--mag-y","0px"));};return useEffect(()=>(window.addEventListener("mousemove",s),()=>window.removeEventListener("mousemove",s)),[t]),jsx("div",{ref:a,className:n("inline-block transition-transform duration-300 ease-out will-change-transform",r),onMouseLeave:o,style:{transform:"translate3d(var(--mag-x, 0px), var(--mag-y, 0px), 0)"},children:e})}function m1({value:e,duration:t=2e3,delay:r=0,decimalPlaces:a=0,className:s,...o}){let[i,l]=useState(0),{ref:d,hasAnimated:c}=Be({threshold:.1}),m=useRef(null);return useEffect(()=>{if(!c)return;let p=g=>{m.current||(m.current=g);let h=Math.min((g-m.current-r)/t,1);if(h>=0){let v=h*e;l(v);}h<1&&requestAnimationFrame(p);},f=setTimeout(()=>{requestAnimationFrame(p);},r);return ()=>clearTimeout(f)},[c,e,t,r]),jsx("span",{ref:d,className:n("tabular-nums tracking-tighter",s),...o,children:i.toFixed(a)})}function w1({title:e,open:t,defaultOpen:r=false,onOpenChange:a,disabled:s=false,children:o,className:i,triggerClassName:l,contentClassName:d,...c}){let[m,p]=useState(r),f=t!==void 0,g=f?t:m,h=()=>{if(s)return;let v=!g;f||p(v),a?.(v);};return jsxs("div",{className:n("w-full overflow-hidden rounded-2xl border border-gray-200 bg-white dark:border-white/10 dark:bg-white/[0.02]",i),...c,children:[e&&jsxs("button",{type:"button",onClick:h,disabled:s,className:n("flex w-full items-center justify-between px-4 py-3 text-sm font-medium transition-colors hover:bg-gray-50 dark:hover:bg-white/[0.02]",s&&"cursor-not-allowed opacity-50",l),children:[e,jsx(ChevronDown,{className:n("h-4 w-4 shrink-0 text-gray-500 transition-transform duration-200 dark:text-gray-400",g&&"rotate-180")})]}),jsx("div",{className:n("grid transition-all duration-300 ease-in-out",g?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:jsx("div",{className:"overflow-hidden",children:jsx("div",{className:n("px-4 pb-4 pt-0",e&&"pt-1",d),children:o})})})]})}function M1({variant:e="spinner",text:t,fullscreen:r=true,className:a,...s}){let o=r?"fixed inset-0 z-50 flex items-center justify-center bg-white/80 dark:bg-black/80 backdrop-blur-sm":"flex items-center justify-center p-8 w-full h-full min-h-[200px]";return e==="bar"?jsx("div",{className:n("fixed top-0 left-0 right-0 z-50 h-1 bg-transparent",a),...s,children:jsx("div",{className:"h-full bg-blue-500 animate-indeterminate-progress origin-left"})}):e==="dots"?jsxs("div",{className:n(o,a),...s,children:[jsxs("div",{className:"flex space-x-2",children:[jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce [animation-delay:-0.3s]"}),jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce [animation-delay:-0.15s]"}),jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce"})]}),t&&jsx("span",{className:"ml-4 text-sm font-medium text-gray-500 dark:text-white/70",children:t})]}):e==="logo"?jsx("div",{className:n(o,a),...s,children:jsxs("div",{className:"flex flex-col items-center gap-4",children:[jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-full bg-white dark:bg-white/[0.06] shadow-lg ring-1 ring-black/5",children:[jsx("div",{className:"absolute inset-0 rounded-full animate-ping bg-blue-500/20"}),jsx("div",{className:"h-8 w-8 rounded bg-blue-500"})]}),t&&jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-white/70 animate-pulse",children:t})]})}):e==="glass"?jsx("div",{className:n(o,"bg-white/30 dark:bg-black/30 backdrop-blur-md",a),...s,children:jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsx(Loader2,{className:"h-8 w-8 animate-spin text-white"}),t&&jsx("span",{className:"text-sm font-medium text-white tracking-wider",children:t})]})}):jsx("div",{className:n(o,a),...s,children:jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsx(Loader2,{className:"h-8 w-8 animate-spin text-blue-500"}),t&&jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-white/70",children:t})]})})}function D1({preset:e="fade",duration:t=300,useViewTransition:r=false,className:a,children:s,...o}){let[i,l]=useState(false);useEffect(()=>{if(r&&document.startViewTransition)document.startViewTransition(()=>{l(true);});else {let m=requestAnimationFrame(()=>{l(true);});return ()=>cancelAnimationFrame(m)}},[r]);let c={fade:{initial:"opacity-0",animate:"opacity-100"},"slide-up":{initial:"opacity-0 translate-y-8",animate:"opacity-100 translate-y-0"},scale:{initial:"opacity-0 scale-95",animate:"opacity-100 scale-100"},blur:{initial:"opacity-0 blur-sm",animate:"opacity-100 blur-0"},none:{initial:"",animate:""}}[e];return jsx("div",{className:n("transition-all ease-out",i?c.animate:c.initial,a),style:{transitionDuration:`${t}ms`,viewTransitionName:r?"page-content":void 0},...o,children:s})}export{im as AIPromptInput,vm as AIResponse,Hf as Accordion,Af as AccordionContent,If as AccordionItem,Sf as AccordionTrigger,Js as Alert,kw as AreaChart,fe as Avatar,Bd as Background,Oe as Badge,hw as BarChart,Ti as Breadcrumb,Ei as BreadcrumbEllipsis,Ri as BreadcrumbItem,Ci as BreadcrumbLink,Mi as BreadcrumbList,Li as BreadcrumbPage,Pi as BreadcrumbSeparator,P as Button,sr as Calendar,xd as Card,kd as CardContent,yd as CardDescription,Nd as CardFooter,vd as CardHeader,wd as CardTitle,lw as ChartContainer,dw as ChartGrid,uw as ChartSkeleton,mw as ChartTooltip,cw as ChartXAxis,jw as ChartYAxis,Ok as ChatHeader,x2 as ChatInput,Mk as ChatLayout,S2 as ChatProfile,Hk as ChatSidebar,Cr as Checkbox,w1 as Collapse,Ir as Combobox,a0 as ComboboxContent,Ga as ComboboxEmpty,ja as ComboboxInput,qa as ComboboxItem,Xa as ComboboxList,r0 as ComboboxTrigger,No as Command,Ab as CommandDialog,Bb as CommandEmpty,Ro as CommandGroup,To as CommandInput,Co as CommandItem,Mo as CommandList,Vb as CommandShortcut,Ld as Container,Uh as DataTable,T0 as DatePicker,O0 as DateTimePicker,eb as Dialog,ob as DialogDescription,rb as DialogFooter,tb as DialogHeader,ab as DialogTitle,gl as Divider,pb as Drawer,hb as DrawerDescription,gb as DrawerFooter,fb as DrawerHeader,bb as DrawerTitle,wt as DropdownMenu,kt as DropdownMenuContent,ee as DropdownMenuItem,mo as DropdownMenuLabel,Ur as DropdownMenuSeparator,yt as DropdownMenuTrigger,kl as EmptyState,sa as FileDropzone,Ws as FormControl,_s as FormDescription,Fs as FormItem,Ks as FormLabel,Us as FormMessage,On as GlowButton,Sd as Grid,Ke as Heading,os as HeroText,la as Image,Ex as Kanban,wv as KanbanCalendarView,cv as KanbanFilterBar,Jx as KanbanTaskModal,xl as Kbd,Y as Label,ns as LetterPullup,Cw as LineChart,o1 as Magnetic,ky as Marquee,bn as MessageBubble,s2 as MessageList,_n as MetricCard,bo as Modal,Yg as ModalDescription,xo as ModalFooter,ho as ModalHeader,vo as ModalTitle,fn as Motion,$2 as MotionGroup,fg as Navbar,Ac as NumberInput,m1 as NumberTicker,Pc as OTPInput,M1 as PageLoader,D1 as PageTransition,Di as Pagination,Hi as PaginationContent,Bi as PaginationEllipsis,Ii as PaginationItem,Yr as PaginationLink,Ai as PaginationNext,Si as PaginationPrevious,Q2 as Parallax,Sw as PieChart,Ue as Popover,je as PopoverContent,Ye as PopoverTrigger,Hn as PrimaryButton,ei as Progress,zw as RadarChart,zs as RadioGroup,$s as RadioGroupItem,Uc as Rating,Sa as Reveal,Te as ScrollArea,lh as ScrollProgress,Dr as Select,qt as Separator,Zn as ShinyText,Gf as Sidebar,Qf as SidebarContent,Jf as SidebarFooter,eg as SidebarGroup,qf as SidebarHeader,Zf as SidebarItem,Io as Skeleton,d0 as Slider,Ww as Sparkline,ik as Spotlight,Dd as Stack,yc as StatusDot,Zy as Stepper,Z as Surface,Lr as Switch,Zr as Table,ta as TableBody,fr as TableCell,ra as TableHead,ea as TableHeader,Wt as TableRow,Ff as Tabs,_f as TabsContent,Kf as TabsList,Wf as TabsTrigger,bc as Terminal,xy as TerminalLine,U as Text,qn as TextGradient,ft as TextInput,U2 as TextMotion,Br as Textarea,Qv as ThemeProvider,aw as ThemeToggle,sy as Timeline,lc as TimelineItem,ao as Toast,Or as ToastContext,pf as ToastProvider,$c as ToggleGroup,Mb as Tooltip,py as Tree,Pg as UserMenu,oc as UserPreview,n as cn,Pt as normalize,th as useBreakpoint,he as useChart,rh as useContainerQuery,gt as useFloating,Jb as useForm,Gb as useIntersection,sl as useMediaQuery,Do as useScroll,Go as useTheme,Ub as useTimer,Kb as useToast};//# sourceMappingURL=index.mjs.map
66
+ `})]})}function Y5({data:e,keys:t,colors:r=["cyan","purple","emerald"],maxValue:a,height:n=300,className:o,...s}){let[l,c]=useState(0),d=be__default.useRef(null);be__default.useEffect(()=>{if(!d.current)return;let g=new ResizeObserver(f=>{f[0]&&c(f[0].contentRect.width);});return g.observe(d.current),()=>g.disconnect()},[]);let m={x:l/2,y:n/2},u=Math.min(l,n)/2-40,p=useMemo(()=>{if(a)return a;let g=0;return e.forEach(f=>{t.forEach(v=>{let w=Number(f[v])||0;w>g&&(g=w);});}),g*1.1||100},[e,t,a]),b=Math.PI*2/e.length,h={cyan:"rgba(6, 182, 212, 0.5)",purple:"rgba(139, 92, 246, 0.5)",emerald:"rgba(16, 185, 129, 0.5)",amber:"rgba(245, 158, 11, 0.5)",rose:"rgba(244, 63, 94, 0.5)"},x={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e"};return l===0?jsx("div",{ref:d,style:{height:n}}):jsx("div",{ref:d,className:i("relative w-full select-none",o),style:{height:n},...s,children:jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${l} ${n}`,className:"overflow-visible",children:[[1,2,3,4,5].map(g=>{let f=u/5*g,v=e.map((w,y)=>{let k=b*y-Math.PI/2;return `${m.x+Math.cos(k)*f},${m.y+Math.sin(k)*f}`}).join(" ");return jsx("polygon",{points:v,fill:"none",stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"},g)}),e.map((g,f)=>{let v=b*f-Math.PI/2,w=m.x+Math.cos(v)*u,y=m.y+Math.sin(v)*u,k=m.x+Math.cos(v)*(u+20),N=m.y+Math.sin(v)*(u+20);return jsxs("g",{children:[jsx("line",{x1:m.x,y1:m.y,x2:w,y2:y,stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"}),jsx("text",{x:k,y:N,textAnchor:"middle",dominantBaseline:"middle",fill:"rgba(255,255,255,0.6)",fontSize:"12",children:g.subject})]},f)}),t.map((g,f)=>{let v=e.map((N,T)=>{let M=(Number(N[g])||0)/p*u,H=b*T-Math.PI/2;return `${m.x+Math.cos(H)*M},${m.y+Math.sin(H)*M}`}).join(" "),w=r[f%r.length]||"cyan",y=h[w],k=x[w];return jsx("polygon",{points:v,fill:y,fillOpacity:.3,stroke:k,strokeWidth:2,className:"transition-all duration-500 ease-out hover:fill-opacity-50"},g)})]})})}function G5({data:e,color:t="emerald",height:r=40,strokeWidth:a=2,fill:n=false,className:o,...s}){let l=Math.max(...e),c=Math.min(...e),d=l-c||1,u={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e",white:"#ffffff"}[t],p=e.map((x,g)=>{let f=g/(e.length-1)*100,w=95-(x-c)/d*90;return {x:f,y:w}}),b="";if(p.length>0){b=`M ${p[0].x} ${p[0].y}`;for(let x=0;x<p.length-1;x++){let g=p[x],f=p[x+1],v=g.x+(f.x-g.x)/2,w=g.y,y=g.x+(f.x-g.x)/2,k=f.y;b+=` C ${v} ${w}, ${y} ${k}, ${f.x} ${f.y}`;}}let h=n?`${b} L 100 100 L 0 100 Z`:void 0;return jsx("div",{className:i("w-full overflow-hidden",o),style:{height:r},...s,children:jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"overflow-visible",children:[n&&jsx("path",{d:h,fill:u,fillOpacity:.1,stroke:"none"}),jsx("path",{d:b,fill:"none",stroke:u,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})})}function Z5({ticks:e=5,format:t=r=>r.toString()}){let{height:r,padding:a,maxValue:n}=ke(),o=r-a.top-a.bottom;return jsx("g",{children:Array.from({length:e+1}).map((s,l)=>{let c=n/e*l,d=r-a.bottom-o/e*l;return jsx("text",{x:a.left-10,y:d,textAnchor:"end",dominantBaseline:"middle",className:"fill-gray-400 dark:fill-white/40 text-xs font-medium",children:t(Math.round(c))},l)})})}var lo=createContext(void 0);function nC({defaultValue:e,value:t,onValueChange:r,className:a,children:n,...o}){let[s,l]=useState(e),c=m=>{t===void 0&&l(m),r?.(m);},d=t!==void 0?t:s;return jsx(lo.Provider,{value:{value:d,onValueChange:c},children:jsx("div",{className:i("w-full",a),...o,children:n})})}function sC({className:e,children:t,...r}){return jsx("div",{role:"tablist",className:i("inline-flex h-10 items-center justify-center rounded-2xl bg-gray-100 p-1 text-gray-500 dark:bg-white/[0.03] dark:text-white/60",e),...r,children:t})}function iC({className:e,value:t,children:r,...a}){let n=useContext(lo);if(!n)throw new Error("TabsTrigger must be used within Tabs");let o=n.value===t;return jsx("button",{type:"button",role:"tab","aria-selected":o,"aria-controls":`tabs-content-${t}`,id:`tabs-trigger-${t}`,onClick:()=>n.onValueChange(t),className:i("inline-flex items-center justify-center whitespace-nowrap rounded-2xl px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-white/20",o?"bg-white text-gray-900 shadow-sm dark:bg-white/[0.06] dark:text-white dark:backdrop-blur-sm":"hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-white/[0.03] dark:hover:text-white",e),...a,children:r})}function lC({className:e,value:t,children:r,...a}){let n=useContext(lo);if(!n)throw new Error("TabsContent must be used within Tabs");return n.value!==t?null:jsx("div",{role:"tabpanel",id:`tabs-content-${t}`,"aria-labelledby":`tabs-trigger-${t}`,tabIndex:0,className:i("mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20 focus-visible:ring-offset-2",e),...a,children:r})}var pC=be__default.forwardRef(({className:e,children:t,...r},a)=>jsx("aside",{ref:a,className:i("flex h-full w-64 flex-col border-r backdrop-blur-xl transition-colors duration-200","border-gray-200 bg-white/50","dark:border-white/10 dark:bg-black/20",e),...r,children:t})),fC=be__default.forwardRef(({className:e,children:t,...r},a)=>jsx("div",{ref:a,className:i("flex h-16 items-center px-6 border-b border-gray-200 dark:border-white/5",e),...r,children:t})),gC=be__default.forwardRef(({className:e,children:t,...r},a)=>jsx("div",{ref:a,className:i("flex-1 overflow-y-auto py-4 px-3 space-y-1",e),...r,children:t})),bC=be__default.forwardRef(({className:e,children:t,...r},a)=>jsx("div",{ref:a,className:i("p-4 border-t border-gray-200 dark:border-white/5",e),...r,children:t})),hC=be__default.forwardRef(({className:e,children:t,active:r,icon:a,badge:n,...o},s)=>jsxs("button",{ref:s,className:i("flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium transition-colors","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.03] dark:hover:text-white",r?"bg-gray-200 text-gray-900 dark:bg-white/[0.06] dark:text-white":"text-gray-600 dark:text-white/60",e),...o,children:[a&&jsx("span",{className:i("flex h-4 w-4 items-center justify-center",r?"text-gray-900 dark:text-white":"text-gray-500 dark:text-white/60"),children:a}),jsx("span",{className:"flex-1 text-left",children:t}),n&&jsx("span",{className:"flex h-5 min-w-5 items-center justify-center rounded-full bg-gray-200 dark:bg-white/[0.06] px-1.5 text-[10px] font-bold text-gray-900 dark:text-white",children:n})]})),xC=be__default.forwardRef(({className:e,children:t,label:r,...a},n)=>jsxs("div",{ref:n,className:i("mb-6",e),...a,children:[r&&jsx("div",{className:"mb-2 px-3 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-white/40",children:r}),jsx("div",{className:"space-y-1",children:t})]}));var Bu={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"};function RC({logo:e,links:t=[],actions:r,className:a,maxWidth:n="xl"}){let[o,s]=useState(false),[l,c]=useState(false);return useEffect(()=>{let d=()=>{s(window.scrollY>20);};return window.addEventListener("scroll",d),()=>window.removeEventListener("scroll",d)},[]),jsx("nav",{className:i("fixed top-0 left-0 right-0 z-50 transition-all duration-300 px-4 py-4",o?"py-3":"py-6",a),children:jsxs("div",{className:i("mx-auto transition-all duration-300",Bu[n]),children:[jsxs(Q,{className:i("flex items-center justify-between px-6 py-3 transition-all duration-300",o?"rounded-2xl border-white/10 bg-white/70 dark:bg-zinc-900/70 backdrop-blur-xl shadow-lg":"rounded-2xl border-transparent bg-transparent dark:bg-transparent backdrop-blur-none shadow-none"),children:[jsx("div",{className:"flex items-center gap-2",children:e||jsx("span",{className:"text-xl font-bold tracking-tighter",children:"PIXON"})}),jsx("div",{className:"hidden md:flex items-center gap-8",children:t.map(d=>jsx("a",{href:d.href,className:"text-sm font-medium text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors",children:d.label},d.label))}),jsxs("div",{className:"flex items-center gap-4",children:[jsx("div",{className:"hidden md:flex items-center gap-2",children:r}),jsx("button",{className:"md:hidden p-2 text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-white/[0.03] rounded-2xl transition-colors",onClick:()=>c(!l),children:l?jsx(X,{size:20}):jsx(Menu,{size:20})})]})]}),jsx("div",{className:i("md:hidden absolute top-full left-4 right-4 mt-2 transition-all duration-300 origin-top",l?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 -translate-y-4 pointer-events-none"),children:jsxs(Q,{className:"p-4 flex flex-col gap-4 shadow-2xl border-white/10 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-2xl",children:[t.map(d=>jsx("a",{href:d.href,className:"text-base font-medium px-4 py-2 rounded-2xl hover:bg-zinc-100 dark:hover:bg-white/[0.03] text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-all",onClick:()=>c(false),children:d.label},d.label)),jsx("div",{className:"pt-4 border-t border-zinc-200 dark:border-white/10 flex flex-col gap-2",children:r})]})})]})})}var ia=createContext(void 0);function la({children:e}){let[t,r]=useState(false),a=useRef(null);return jsx(ia.Provider,{value:{isOpen:t,setIsOpen:r,triggerRef:a},children:jsx("div",{className:"relative inline-block text-left",children:e})})}function ca({className:e,children:t,...r}){let a=useContext(ia);if(!a)throw new Error("DropdownMenuTrigger must be used within DropdownMenu");let n=o=>{a.setIsOpen(!a.isOpen),r.onClick?.(o);};return jsx("button",{ref:a.triggerRef,type:"button","aria-haspopup":"menu","aria-expanded":a.isOpen?"true":"false",onClick:n,className:i("inline-flex items-center justify-center",e),...r,children:t})}function da({className:e,children:t,align:r="start",side:a="bottom",...n}){let o=useContext(ia);if(!o)throw new Error("DropdownMenuContent must be used within DropdownMenu");let s=useRef(null),{position:l,isPositioned:c}=Dt(o.triggerRef,s,{side:a,align:r,isOpen:o.isOpen});if(useEffect(()=>{if(o.isOpen){let m=p=>{s.current&&!s.current.contains(p.target)&&o.triggerRef.current&&!o.triggerRef.current.contains(p.target)&&o.setIsOpen(false);},u=p=>{if(p.key==="Escape"&&(o.setIsOpen(false),o.triggerRef.current?.focus()),p.key==="ArrowDown"||p.key==="ArrowUp"){p.preventDefault();let b=s.current?.querySelectorAll('[role="menuitem"]');if(!b.length)return;let h=Array.from(b).indexOf(document.activeElement),x=0;p.key==="ArrowDown"?x=(h+1)%b.length:x=(h-1+b.length)%b.length,b[x]?.focus();}};return document.addEventListener("mousedown",m),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",u);}}},[o.isOpen,o.setIsOpen,o.triggerRef]),!o.isOpen)return null;let d=()=>a==="bottom"?r==="start"?"top left":r==="end"?"top right":"top center":a==="top"?r==="start"?"bottom left":r==="end"?"bottom right":"bottom center":a==="left"?r==="start"?"top right":r==="end"?"bottom right":"center right":a==="right"?r==="start"?"top left":r==="end"?"bottom left":"center left":"center center";return createPortal(jsx("div",{ref:s,role:"menu","aria-orientation":"vertical",style:{top:l.top,left:l.left,transformOrigin:d()},className:i("fixed z-[110] min-w-[8rem] overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white/80 dark:bg-white/[0.03] backdrop-blur-xl p-1 shadow-md duration-100",c?"animate-in fade-in zoom-in-95 opacity-100":"opacity-0",e),...n,children:t}),document.body)}function Se({className:e,children:t,...r}){let a=useContext(ia);return jsx("button",{type:"button",role:"menuitem",onClick:o=>{a?.setIsOpen(false),r.onClick?.(o);},className:i("relative flex w-full cursor-pointer select-none items-center rounded-2xl px-3 py-2 text-sm outline-none transition-colors","text-gray-700 dark:text-white/80","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.06] dark:hover:text-white","focus:bg-gray-100 focus:text-gray-900 dark:focus:bg-white/[0.06] dark:focus:text-white","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:t})}function Ns({className:e,children:t,...r}){return jsx("div",{className:i("px-2 py-1.5 text-sm font-semibold text-gray-900 dark:text-white",e),...r,children:t})}function mo({className:e,...t}){return jsx("div",{className:i("-mx-1 my-1 h-px bg-gray-200 dark:bg-white/[0.03]",e),...t})}function $C({name:e,description:t,avatarSrc:r,avatarFallback:a,className:n,side:o="top",align:s="start"}){return jsxs(la,{children:[jsx(ca,{className:i("w-full outline-none",n),children:jsxs("div",{className:"group flex w-full items-center gap-3 rounded-2xl border border-gray-200 dark:border-white/5 bg-white dark:bg-white/[0.03] p-3 transition-colors hover:bg-gray-50 dark:hover:bg-white/[0.06]",children:[jsx(V,{src:r,fallback:a||e.charAt(0),size:"sm"}),jsxs("div",{className:"flex flex-1 flex-col items-start text-left",children:[jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:e}),t&&jsx("span",{className:"text-[10px] text-gray-500 dark:text-white/50",children:t})]}),jsx(Settings,{className:"h-4 w-4 text-gray-400 dark:text-white/50 transition-colors group-hover:text-gray-900 dark:group-hover:text-white"})]})}),jsxs(da,{className:"w-56",align:s,side:o,children:[jsx(Ns,{children:"My Account"}),jsx(mo,{}),jsxs(Se,{children:[jsx(User,{className:"mr-2 h-4 w-4"}),jsx("span",{children:"Profile"})]}),jsxs(Se,{children:[jsx(Settings,{className:"mr-2 h-4 w-4"}),jsx("span",{children:"Settings"})]}),jsx(mo,{}),jsxs(Se,{className:"text-rose-400 focus:text-rose-400",children:[jsx(LogOut,{className:"mr-2 h-4 w-4"}),jsx("span",{children:"Log out"})]})]})]})}var Uu=be__default.forwardRef(({...e},t)=>jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));Uu.displayName="Breadcrumb";var Wu=be__default.forwardRef(({className:e,...t},r)=>jsx("ol",{ref:r,className:i("flex flex-wrap items-center gap-1.5 break-words text-sm text-gray-500 dark:text-white/50 sm:gap-2.5",e),...t}));Wu.displayName="BreadcrumbList";var Yu=be__default.forwardRef(({className:e,...t},r)=>jsx("li",{ref:r,className:i("inline-flex items-center gap-1.5",e),...t}));Yu.displayName="BreadcrumbItem";var _u=be__default.forwardRef(({className:e,...t},r)=>jsx("a",{ref:r,className:i("transition-colors hover:text-gray-900 dark:hover:text-white",e),...t}));_u.displayName="BreadcrumbLink";var Xu=be__default.forwardRef(({className:e,...t},r)=>jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:i("font-normal text-gray-900 dark:text-white",e),...t}));Xu.displayName="BreadcrumbPage";var qu=({children:e,className:t,...r})=>jsx("li",{role:"presentation","aria-hidden":"true",className:i("[&>svg]:size-3.5",t),...r,children:e??jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsx("path",{d:"m9 18 6-6-6-6"})})});qu.displayName="BreadcrumbSeparator";var Gu=({className:e,...t})=>jsxs("span",{role:"presentation","aria-hidden":"true",className:i("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:[jsx("circle",{cx:"12",cy:"12",r:"1"}),jsx("circle",{cx:"19",cy:"12",r:"1"}),jsx("circle",{cx:"5",cy:"12",r:"1"})]}),jsx("span",{className:"sr-only",children:"More"})]});Gu.displayName="BreadcrumbElipssis";function GC({contentId:e="main-content",className:t,children:r="Skip to content"}){return jsx("a",{href:`#${e}`,className:i("sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:bg-purple-600 focus:text-white focus:rounded-xl focus:shadow-2xl focus:outline-none focus:ring-2 focus:ring-white/20 transition-all",t),children:r})}var Qu=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:i("mx-auto flex w-full justify-center",e),...t});Qu.displayName="Pagination";var Ju=be__default.forwardRef(({className:e,...t},r)=>jsx("ul",{ref:r,className:i("flex flex-row items-center gap-1",e),...t}));Ju.displayName="PaginationContent";var Zu=be__default.forwardRef(({className:e,...t},r)=>jsx("li",{ref:r,className:i("",e),...t}));Zu.displayName="PaginationItem";var uo=({className:e,isActive:t,...r})=>jsx("a",{"aria-current":t?"page":void 0,className:i("inline-flex h-9 w-9 items-center justify-center rounded-2xl text-sm font-medium transition-colors","hover:bg-gray-100 dark:hover:bg-white/[0.03] hover:text-gray-900 dark:hover:text-white",t?"bg-gray-100 text-gray-900 dark:bg-white/[0.06] dark:text-white":"text-gray-500 dark:text-white/60",e),...r});uo.displayName="PaginationLink";var ep=({className:e,...t})=>jsxs(uo,{"aria-label":"Go to previous page",className:i("w-auto gap-1 px-2.5",e),...t,children:[jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsx("path",{d:"m15 18-6-6 6-6"})}),jsx("span",{children:"Previous"})]});ep.displayName="PaginationPrevious";var tp=({className:e,...t})=>jsxs(uo,{"aria-label":"Go to next page",className:i("w-auto gap-1 px-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsx("path",{d:"m9 18 6-6-6-6"})})]});tp.displayName="PaginationNext";var rp=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:i("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:[jsx("circle",{cx:"12",cy:"12",r:"1"}),jsx("circle",{cx:"19",cy:"12",r:"1"}),jsx("circle",{cx:"5",cy:"12",r:"1"})]}),jsx("span",{className:"sr-only",children:"More pages"})]});rp.displayName="PaginationEllipsis";var oR=({steps:e,currentStep:t,className:r,onStepClick:a})=>jsx("div",{className:i("flex w-full flex-col gap-4 md:flex-row",r),children:e.map((n,o)=>{let s=t>o,l=t===o,c=!!a;return jsxs("div",{className:i("flex flex-1 flex-col gap-2 md:flex-row md:items-center md:gap-4",c&&"cursor-pointer"),onClick:()=>c&&a(o),children:[jsxs("div",{className:"flex items-center gap-4 md:flex-col md:gap-2",children:[jsxs("div",{className:"flex items-center",children:[jsx("div",{className:i("flex h-8 w-8 items-center justify-center rounded-full border-2 text-sm font-semibold transition-colors",s?"border-blue-600 bg-blue-600 text-white dark:border-blue-500 dark:bg-blue-500":l?"border-blue-600 text-blue-600 dark:border-blue-500 dark:text-blue-500":"border-gray-300 text-gray-500 dark:border-white/20 dark:text-white/40"),children:s?jsx(Check,{className:"h-4 w-4"}):o+1}),o<e.length-1&&jsx("div",{className:i("ml-4 h-px flex-1 bg-gray-200 md:hidden dark:bg-white/[0.03]",s&&"bg-blue-600 dark:bg-blue-500")})]}),jsxs("div",{className:"flex flex-col",children:[jsx("span",{className:i("text-sm font-medium",l||s?"text-gray-900 dark:text-white":"text-gray-500 dark:text-white/50"),children:n.title}),n.description&&jsx("span",{className:"text-xs text-gray-500 dark:text-white/40 hidden md:block",children:n.description})]})]}),o<e.length-1&&jsx("div",{className:i("hidden h-px flex-1 bg-gray-200 md:block dark:bg-white/[0.03]",s&&"bg-blue-600 dark:bg-blue-500")})]},o)})});function uR({isOpen:e,onClose:t,onConfirm:r,title:a,description:n,confirmText:o="Confirm",cancelText:s="Cancel",variant:l="primary",isLoading:c=false}){return jsxs(jr,{isOpen:e,onClose:t,children:[jsx(Qr,{children:jsxs("div",{className:"flex items-center gap-3",children:[l==="danger"&&jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-rose-500/10 text-rose-500",children:jsx(AlertTriangle,{className:"h-5 w-5"})}),jsx(Xe,{as:"h3",children:a})]})}),jsx("div",{className:"py-2",children:jsx(ge,{className:"text-gray-500 dark:text-white/60",children:n})}),jsxs(Jr,{children:[jsx(R,{variant:"ghost",onClick:t,disabled:c,children:s}),jsx(R,{variant:l==="danger"?"danger":"primary",onClick:r,isLoading:c,children:o})]})]})}function wR({isOpen:e,onClose:t,children:r,className:a}){let n=useRef(null);return useEffect(()=>{let s=n.current;s&&(e?s.open||s.showModal():s.open&&s.close());},[e]),useEffect(()=>{let s=n.current;if(!s)return;let l=c=>{c.preventDefault(),t();};return s.addEventListener("cancel",l),()=>s.removeEventListener("cancel",l)},[t]),createPortal(jsx("dialog",{ref:n,onClick:s=>{s.target===n.current&&t();},className:i("fixed inset-0 z-[100] bg-transparent p-0 backdrop:bg-black/60 backdrop:backdrop-blur-sm","open:animate-in open:fade-in open:duration-200",a),children:jsxs("div",{className:i("relative w-full max-w-lg scale-100 gap-4 border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 p-6 shadow-2xl backdrop-blur-xl transition-all sm:rounded-2xl","animate-in fade-in zoom-in-95 duration-200 slide-in-from-bottom-2"),children:[r,jsxs("button",{onClick:t,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-gray-400 dark:focus:ring-white/20 disabled:pointer-events-none",children:[jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:[jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),jsx("span",{className:"sr-only",children:"Close"})]})]})}),document.body)}function yR({className:e,children:t}){return jsx("div",{className:i("flex flex-col space-y-1.5 text-center sm:text-left mb-4",e),children:t})}function kR({className:e,children:t}){return jsx("div",{className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),children:t})}function NR({className:e,children:t}){return jsx(Xe,{as:"h2",className:i("text-lg font-semibold leading-none tracking-tight",e),children:t})}function TR({className:e,children:t}){return jsx("p",{className:i("text-sm text-gray-500 dark:text-gray-400",e),children:t})}function HR({isOpen:e,onClose:t,position:r="right",children:a,className:n}){let[o,s]=useState(false),[l,c]=useState(false),d=useRef(null);useEffect(()=>{if(e)c(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{s(true);});}),document.body.style.overflow="hidden";else {s(false);let b=setTimeout(()=>{c(false),document.body.style.overflow="unset";},300);return ()=>clearTimeout(b)}},[e]),useEffect(()=>{let b=h=>{h.key==="Escape"&&t();};return e&&document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b);}},[e,t]);let m=b=>{b.target===d.current&&t();};if(!l)return null;let u={left:"left-0 h-full w-3/4 max-w-sm border-r",right:"right-0 h-full w-3/4 max-w-sm border-l",bottom:"bottom-0 w-full h-auto max-h-[90vh] border-t rounded-t-2xl"},p={left:o?"translate-x-0":"-translate-x-full",right:o?"translate-x-0":"translate-x-full",bottom:o?"translate-y-0":"translate-y-full"};return createPortal(jsx("div",{ref:d,onClick:m,className:i("fixed inset-0 z-[100] flex bg-black/60 backdrop-blur-sm transition-opacity duration-300",o?"opacity-100":"opacity-0"),role:"dialog","aria-modal":"true",children:jsx("div",{className:i("absolute bg-white dark:bg-[#0A0A0A] border-gray-200 dark:border-white/10 p-6 shadow-2xl transition-transform duration-300 ease-in-out",u[r],p[r],n),children:a})}),document.body)}function IR({className:e,children:t,...r}){return jsx("div",{className:i("flex flex-col space-y-1.5 text-center sm:text-left mb-6",e),...r,children:t})}function AR({className:e,children:t,...r}){return jsx("div",{className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-auto pt-6",e),...r,children:t})}function BR({className:e,children:t,...r}){return jsx(Xe,{as:"h2",className:i("text-lg font-semibold leading-none tracking-tight",e),...r,children:t})}function VR({className:e,children:t,...r}){return jsx(ge,{variant:"muted",className:i("text-sm",e),...r,children:t})}function YR({content:e,children:t,position:r="top",delay:a=200,className:n}){let[o,s]=useState(false),l=useRef(null),c=useRef(null),d=useRef(null),{position:m,isPositioned:u}=Dt(c,d,{side:r,align:"center",sideOffset:8,isOpen:o}),p=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>s(true),a);},b=()=>{l.current&&clearTimeout(l.current),s(false);};useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let h={top:"slide-in-from-bottom-2",bottom:"slide-in-from-top-2",left:"slide-in-from-right-2",right:"slide-in-from-left-2"};return jsxs("div",{ref:c,className:"relative inline-flex",onMouseEnter:p,onMouseLeave:b,onFocus:p,onBlur:b,children:[t,o&&createPortal(jsx("div",{ref:d,role:"tooltip",style:{top:m.top,left:m.left},className:i("fixed z-[120] min-w-max max-w-xs rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 px-3 py-1.5 text-xs text-gray-900 dark:text-white shadow-xl backdrop-blur-md","duration-200",u?"animate-in fade-in opacity-100":"opacity-0",h[r],n),children:e}),document.body)]})}var gp=be__default.forwardRef(({className:e,size:t="lg",...r},a)=>jsx("div",{ref:a,className:i("mx-auto w-full px-4",{sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl",full:"max-w-full"}[t],e),...r}));gp.displayName="Container";var xp=be__default.forwardRef(({className:e,direction:t="col",gap:r=4,align:a,justify:n,wrap:o,style:s,...l},c)=>jsx("div",{ref:c,className:i("flex",{"flex-row":t==="row","flex-col":t==="col","flex-row-reverse":t==="row-reverse","flex-col-reverse":t==="col-reverse","flex-wrap":o,"items-start":a==="start","items-end":a==="end","items-center":a==="center","items-baseline":a==="baseline","items-stretch":a==="stretch","justify-start":n==="start","justify-end":n==="end","justify-center":n==="center","justify-between":n==="between","justify-around":n==="around","justify-evenly":n==="evenly"},e),style:{gap:typeof r=="number"?`${r*.25}rem`:r,...s},...l}));xp.displayName="Stack";var yp=be__default.forwardRef(({className:e,cols:t=1,sm:r,md:a,lg:n,xl:o,gap:s=4,style:l,...c},d)=>jsx("div",{ref:d,className:i("grid",r&&`sm:grid-cols-${r}`,a&&`md:grid-cols-${a}`,n&&`lg:grid-cols-${n}`,o&&`xl:grid-cols-${o}`,e),style:{gridTemplateColumns:t?`repeat(${t}, minmax(0, 1fr))`:void 0,gap:typeof s=="number"?`${s*.25}rem`:s,...l},...c}));yp.displayName="Grid";var Np=be__default.forwardRef(({variant:e="none",noise:t=false,patternColor:r,size:a=24,mask:n="none",animate:o=false,followMouse:s=false,bgColor:l,className:c,children:d,style:m,...u},p)=>{let b=be__default.useRef(null);be__default.useEffect(()=>{if(!s)return;let g=f=>{let v=b.current;if(!v)return;let w=v.getBoundingClientRect(),y=f.clientX-w.left,k=f.clientY-w.top;v.style.setProperty("--mouse-x",`${y}px`),v.style.setProperty("--mouse-y",`${k}px`);};return window.addEventListener("mousemove",g),()=>window.removeEventListener("mousemove",g)},[s]);let h=()=>{let g={},f=r||"var(--pattern-color, rgba(255,255,255,0.08))";return e==="dots"?{...g,backgroundImage:`radial-gradient(${f} 1px, transparent 1px)`,backgroundSize:`${a}px ${a}px`,transform:s?"translate3d(calc((var(--mouse-x, 0) - 24px) / 40), calc((var(--mouse-y, 0) - 24px) / 40), 0)":void 0}:e==="grid"?{...g,backgroundImage:`
67
+ linear-gradient(to right, ${f} 1px, transparent 1px),
68
+ linear-gradient(to bottom, ${f} 1px, transparent 1px)
69
+ `,backgroundSize:`${a}px ${a}px`,transform:s?"translate3d(calc((var(--mouse-x, 0) - 24px) / 40), calc((var(--mouse-y, 0) - 24px) / 40), 0)":void 0}:e==="gradient"?{...g,background:s?`radial-gradient(circle at var(--mouse-x, center) var(--mouse-y, center), ${f}, transparent)`:`radial-gradient(circle at center, ${f}, transparent)`}:e==="beams"?{...g,background:`radial-gradient(60% 40% at 50% 0%, ${f} 0%, transparent 100%)`}:g},x=n==="fade"?{maskImage:"radial-gradient(ellipse at center, black, transparent 90%)",WebkitMaskImage:"radial-gradient(ellipse at center, black, transparent 90%)"}:{};return jsxs("div",{ref:g=>{g&&(b.current=g),typeof p=="function"?p(g):p&&(p.current=g);},className:i("absolute inset-0 overflow-hidden pointer-events-none transition-transform duration-300 ease-out","z-0","[--pattern-color:rgba(0,0,0,0.05)] dark:[--pattern-color:rgba(255,255,255,0.08)]",l?.startsWith("bg-")?l:"",c),style:{...h(),...x,...m,backgroundColor:l&&!l.startsWith("bg-")?l:void 0},...u,children:[t&&jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none brightness-100 contrast-150",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`}}),e==="beams"&&jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[jsx("div",{className:"absolute top-0 left-1/4 w-px h-full bg-gradient-to-b from-transparent via-white/10 to-transparent"}),jsx("div",{className:"absolute top-0 right-1/4 w-px h-full bg-gradient-to-b from-transparent via-white/10 to-transparent"})]}),e==="mesh"&&jsxs("div",{className:i("absolute inset-0 opacity-30 blur-[100px]",o&&"animate-pulse"),children:[jsx("div",{className:"absolute top-[-10%] left-[-10%] w-[50%] h-[50%] rounded-full bg-blue-500/20"}),jsx("div",{className:"absolute bottom-[-10%] right-[-10%] w-[50%] h-[50%] rounded-full bg-purple-500/20"}),jsx("div",{className:"absolute top-[20%] right-[10%] w-[40%] h-[40%] rounded-full bg-indigo-500/10"})]}),d]})});Np.displayName="Background";var gM=({children:e,className:t,size:r=300,color:a="rgba(255, 255, 255, 0.1)",...n})=>{let o=useRef(null);return jsxs("div",{ref:o,onMouseMove:d=>{let m=o.current;if(!m)return;let u=m.getBoundingClientRect(),p=d.clientX-u.left,b=d.clientY-u.top;m.style.setProperty("--mouse-x",`${p}px`),m.style.setProperty("--mouse-y",`${b}px`);},onMouseEnter:()=>{o.current?.style.setProperty("--opacity","1");},onMouseLeave:()=>{o.current?.style.setProperty("--opacity","0");},className:i("relative overflow-hidden rounded-2xl border border-gray-200 bg-white dark:border-white/10 dark:bg-black",t),...n,children:[jsx("div",{className:"pointer-events-none absolute -inset-px transition-opacity duration-300",style:{opacity:"var(--opacity, 0)",background:`radial-gradient(${r}px circle at var(--mouse-x, center) var(--mouse-y, center), ${a}, transparent 80%)`}}),jsx("div",{className:"relative h-full",children:e})]})};var Vp=cva("relative flex w-full flex-col rounded-2xl border transition-all duration-200 focus-within:ring-4",{variants:{variant:{default:"bg-white border-gray-200 shadow-sm focus-within:border-purple-500/50 focus-within:ring-purple-500/10 dark:bg-white/[0.03] dark:border-white/10 dark:shadow-none",ghost:"bg-transparent border-transparent shadow-none focus-within:bg-white/50 dark:focus-within:bg-white/5"}},defaultVariants:{variant:"default"}}),Op=be__default.forwardRef(({className:e,variant:t,onSubmit:r,isGenerating:a,onAttach:n,onFilesSelected:o,onStop:s,onMic:l,maxLength:c,footer:d,attachments:m,onRemoveAttachment:u,accept:p,multiple:b,placeholder:h="Ask AI anything...",value:x,onChange:g,...f},v)=>{let[w,y]=useState(""),k=x!==void 0,N=k?x:w,T=useRef(null),C=useRef(null),M=()=>{T.current&&(T.current.style.height="auto",T.current.style.height=`${T.current.scrollHeight}px`);};useEffect(()=>{M();},[N]);let H=L=>{let $=L.target.value;c&&$.length>c||(k||y($),g?.(L));},S=L=>{L.key==="Enter"&&!L.shiftKey&&(L.preventDefault(),N.trim()&&!a&&(r?.(N),k||y(""))),f.onKeyDown?.(L);},E=()=>{a&&s?s():N.trim()&&(r?.(N),k||y(""));},P=()=>{o&&C.current?C.current.click():n?.();},D=L=>{L.target.files&&L.target.files.length>0&&o?.(L.target.files),C.current&&(C.current.value="");};return jsxs("div",{className:i(Vp({variant:t,className:e})),children:[jsx("input",{type:"file",ref:C,className:"hidden",onChange:D,accept:p,multiple:b}),m&&m.length>0&&jsx("div",{className:"flex flex-wrap gap-2 px-4 pt-4",children:m.map(L=>jsxs("div",{className:"group relative flex items-center gap-2 rounded-xl border border-gray-200 bg-gray-50 px-3 py-1.5 text-sm transition-colors hover:bg-gray-100 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/[0.06]",children:[jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded-lg bg-white dark:bg-white/[0.06]",children:jsx(File,{className:"h-3 w-3 text-purple-500"})}),jsx("span",{className:"max-w-[120px] truncate text-gray-700 dark:text-gray-300",children:L.name}),jsx("button",{onClick:()=>u?.(L.id),className:"ml-1 rounded-full p-0.5 text-gray-400 opacity-0 transition-all hover:bg-gray-200 hover:text-gray-600 group-hover:opacity-100 dark:hover:bg-white/[0.06] dark:hover:text-white",type:"button",children:jsx(X,{className:"h-3 w-3"})})]},L.id))}),jsx("textarea",{ref:L=>{T.current=L,typeof v=="function"?v(L):v&&(v.current=L);},value:N,onChange:H,onKeyDown:S,placeholder:h,rows:1,className:i("w-full resize-none bg-transparent px-4 py-4 text-base outline-none max-h-[200px]","text-gray-900 placeholder:text-gray-400","dark:text-white dark:placeholder:text-white/40"),disabled:a&&!s,...f}),jsxs("div",{className:"flex items-center justify-between px-2 pb-2",children:[jsxs("div",{className:"flex items-center gap-1",children:[jsx(R,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-gray-600 dark:text-white/40 dark:hover:text-white",onClick:P,type:"button",title:"Attach file",children:jsx(Paperclip,{className:"h-5 w-5"})}),l&&jsx(R,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-gray-600 dark:text-white/40 dark:hover:text-white",onClick:l,type:"button",title:"Use microphone",children:jsx(Mic,{className:"h-5 w-5"})})]}),jsxs("div",{className:"flex items-center gap-3",children:[c&&jsxs("span",{className:"text-xs text-gray-400 dark:text-white/30",children:[N.length,"/",c]}),jsx(R,{size:"icon",disabled:!N.trim()&&!a||a&&!s,onClick:E,className:i("h-8 w-8 rounded-full transition-all duration-200",N.trim()||a?"bg-purple-600 text-white hover:bg-purple-500 shadow-lg shadow-purple-500/25":"bg-gray-100 text-gray-400 dark:bg-white/[0.06] dark:text-white/20"),children:a?s?jsx(Square,{className:"h-3 w-3 fill-current"}):jsx(Sparkles,{className:"h-4 w-4 animate-pulse"}):jsx(ArrowUp,{className:"h-4 w-4"})})]})]}),d&&jsx("div",{className:"border-t border-gray-100 px-4 py-2 text-xs text-gray-400 dark:border-white/5 dark:text-white/30",children:d})]})});Op.displayName="AIPromptInput";var Gp=cva("group relative overflow-hidden rounded-2xl border transition-all duration-200",{variants:{variant:{default:"bg-gray-50 border-gray-200 dark:bg-white/[0.02] dark:border-white/10",ghost:"bg-transparent border-transparent",outline:"bg-transparent border-gray-200 dark:border-white/10"}},defaultVariants:{variant:"default"}}),jp=be__default.forwardRef(({className:e,variant:t,children:r,onCopy:a,onRegenerate:n,onFeedback:o,onShare:s,onEdit:l,timestamp:c,sources:d,model:m,usage:u,...p},b)=>jsxs("div",{ref:b,className:i(Gp({variant:t,className:e})),...p,children:[jsxs("div",{className:"absolute left-4 top-4 flex items-center gap-3",children:[jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br from-purple-500 to-blue-500 shadow-lg shadow-purple-500/20",children:jsx(Sparkles,{className:"h-3.5 w-3.5 text-white"})}),c&&jsx("span",{className:"text-xs font-medium text-gray-400 dark:text-white/30",children:c})]}),jsxs("div",{className:"pl-14 pr-4 py-4",children:[jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none text-gray-700 dark:text-gray-300",children:r}),d&&d.length>0&&jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:d.map((h,x)=>jsxs("a",{href:h.url,target:"_blank",rel:"noopener noreferrer",className:i("flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs transition-colors","border-gray-200 bg-white text-gray-600 hover:bg-gray-50","dark:border-white/10 dark:bg-white/[0.03] dark:text-white/60 dark:hover:bg-white/[0.06]"),children:[jsx("span",{className:"max-w-[150px] truncate",children:h.title}),jsx(ExternalLink,{className:"h-3 w-3 opacity-50"})]},x))})]}),jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 bg-white/50 px-2 py-1.5 backdrop-blur dark:border-white/5 dark:bg-white/[0.02]",children:[jsxs("div",{className:"flex items-center gap-3 px-2 text-[10px] font-medium text-gray-400 dark:text-white/20",children:[m&&jsx("span",{children:m}),u&&jsx("span",{children:u})]}),jsxs("div",{className:"flex items-center gap-1",children:[jsxs(R,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:a,children:[jsx(Copy,{className:"mr-1.5 h-3.5 w-3.5"}),"Copy"]}),s&&jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:s,title:"Share",children:jsx(Share,{className:"h-3.5 w-3.5"})}),l&&jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:l,title:"Edit",children:jsx(Edit,{className:"h-3.5 w-3.5"})}),jsx("div",{className:"mx-1 h-3 w-px bg-gray-200 dark:bg-white/10"}),jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:n,title:"Regenerate",children:jsx(RefreshCw,{className:"h-3.5 w-3.5"})}),jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:()=>o?.("up"),title:"Helpful",children:jsx(ThumbsUp,{className:"h-3.5 w-3.5"})}),jsx(R,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:()=>o?.("down"),title:"Not helpful",children:jsx(ThumbsDown,{className:"h-3.5 w-3.5"})})]})]})]}));jp.displayName="AIResponse";function HM({children:e,className:t,...r}){return jsx("div",{className:i("flex h-[800px] w-full overflow-hidden rounded-3xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/40 backdrop-blur-xl shadow-2xl",t),...r,children:e})}function Ds({users:e=[],variant:t="default",className:r,...a}){let n=e.length===0?"Someone is typing":e.length===1?`${e[0]} is typing`:e.length===2?`${e[0]} and ${e[1]} are typing`:`${e[0]} and ${e.length-1} others are typing`;return t==="bubble"?jsx("div",{className:i("flex items-center gap-1 px-3 py-2 rounded-2xl bg-gray-100 dark:bg-white/[0.03] w-fit",r),...a,children:jsxs("div",{className:"flex gap-1",children:[jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce [animation-delay:-0.3s]"}),jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce [animation-delay:-0.15s]"}),jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce"})]})}):jsxs("div",{className:i("flex items-center gap-2 text-xs text-gray-500 dark:text-white/40 italic",r),...a,children:[jsxs("div",{className:"flex gap-0.5",children:[jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.3s]"}),jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.15s]"}),jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce"})]}),n]})}function _M({conversations:e,activeId:t,onSelect:r,onNewChat:a,onSearch:n,onArchive:o,onPin:s,onMute:l,onDelete:c,filter:d="all",sortBy:m="recent",className:u,...p}){let[b,h]=useState(""),x=g=>{let f=g.target.value;h(f),n?.(f);};return jsxs("div",{className:i("flex w-80 flex-col border-r border-gray-200 dark:border-white/10 bg-gray-50/50 dark:bg-white/[0.02]",u),...p,children:[jsxs("div",{className:"p-4 space-y-4",children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"Messages"}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",title:"Filter",children:jsx(Filter,{className:"h-4 w-4"})}),jsx("button",{onClick:a,className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",title:"New Chat",children:jsx(Plus,{className:"h-5 w-5"})})]})]}),jsxs("div",{className:"relative",children:[jsx(Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),jsx("input",{type:"text",value:b,onChange:x,placeholder:"Search messages...",className:"w-full h-10 pl-9 pr-4 rounded-2xl bg-white dark:bg-white/[0.03] border border-gray-200 dark:border-white/10 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all placeholder:text-gray-400 dark:text-white"})]})]}),jsx(Me,{className:"flex-1",children:jsx("div",{className:"p-2 space-y-1",children:e.map(g=>{let f=g.user?.name||g.group?.name||"Unknown",v=g.user?.avatar||g.group?.avatar,w=g.user?.status==="online";return jsxs("div",{className:"group relative",children:[jsxs("button",{onClick:()=>r?.(g.id),className:i("w-full flex items-center gap-3 p-3 rounded-2xl transition-all text-left",t===g.id?"bg-blue-500/10 dark:bg-white/[0.06] shadow-[0_0_15px_rgba(59,130,246,0.1)] dark:shadow-[0_0_15px_rgba(255,255,255,0.05)]":"hover:bg-gray-100 dark:hover:bg-white/[0.03]"),children:[jsxs("div",{className:"relative",children:[jsx(V,{src:v,alt:f,fallback:f[0]}),w&&jsx("span",{className:"absolute bottom-0 right-0 h-3 w-3 rounded-full bg-green-500 border-2 border-white dark:border-black"})]}),jsxs("div",{className:"flex-1 min-w-0",children:[jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[jsx("span",{className:i("font-medium truncate",t===g.id?"text-blue-600 dark:text-white":"text-gray-900 dark:text-white/90"),children:f}),g.isPinned&&jsx(Pin,{className:"h-3 w-3 text-blue-500 rotate-45"}),g.isMuted&&jsx(BellOff,{className:"h-3 w-3 text-gray-400"})]}),g.lastMessage&&jsx("span",{className:"text-xs text-gray-400 whitespace-nowrap ml-2",children:g.lastMessage.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),jsxs("div",{className:"flex items-center justify-between",children:[jsx("div",{className:i("text-sm truncate pr-2 flex-1",t===g.id?"text-blue-600/80 dark:text-white/70":"text-gray-500 dark:text-white/50"),children:g.isTyping?jsx(Ds,{className:"text-[10px]"}):jsx("p",{className:"truncate",children:g.lastMessage?.content})}),g.unreadCount?jsx("span",{className:"flex h-5 min-w-[1.25rem] items-center justify-center rounded-full bg-blue-500 px-1.5 text-[10px] font-bold text-white",children:g.unreadCount}):null]})]})]}),jsxs("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 hidden group-hover:flex items-center gap-1 bg-white dark:bg-gray-800 shadow-lg rounded-lg p-1 border border-gray-200 dark:border-white/10 animate-in fade-in zoom-in-95",children:[jsx("button",{onClick:y=>{y.stopPropagation(),s?.(g.id);},className:"p-1.5 rounded hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500",children:jsx(Pin,{className:"h-3.5 w-3.5"})}),jsx("button",{onClick:y=>{y.stopPropagation(),o?.(g.id);},className:"p-1.5 rounded hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500",children:jsx(Archive,{className:"h-3.5 w-3.5"})}),jsx("button",{onClick:y=>{y.stopPropagation(),c?.(g.id);},className:"p-1.5 rounded hover:bg-red-100 dark:hover:bg-red-500/20 text-red-500",children:jsx(Trash2,{className:"h-3.5 w-3.5"})})]})]},g.id)})})})]})}function JM({user:e,onBack:t,onInfo:r,onCall:a,onVideoCall:n,onSearch:o,onMute:s,isTyping:l,isMuted:c,actions:d,className:m,...u}){return jsxs("div",{className:i("flex h-16 items-center justify-between border-b border-gray-200 dark:border-white/10 bg-white/80 dark:bg-black/40 backdrop-blur px-4 sticky top-0 z-10",m),...u,children:[jsxs("div",{className:"flex items-center gap-3",children:[t&&jsx("button",{onClick:t,className:"md:hidden p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsx(ArrowLeft,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),jsxs("div",{className:"relative cursor-pointer",onClick:r,children:[jsx(V,{src:e.avatar,alt:e.name,fallback:e.name[0]}),e.status==="online"&&jsx("span",{className:"absolute bottom-0 right-0 h-3 w-3 rounded-full bg-green-500 border-2 border-white dark:border-black"})]}),jsxs("div",{className:"cursor-pointer",onClick:r,children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("h3",{className:"font-semibold text-gray-900 dark:text-white leading-none",children:e.name}),c&&jsx(BellOff,{className:"h-3 w-3 text-gray-400"})]}),jsx("p",{className:i("text-xs mt-1 transition-colors",l?"text-blue-500 font-medium animate-pulse":"text-gray-500 dark:text-white/50"),children:l?"typing...":e.status==="online"?"Online":`Last seen ${e.lastSeen?.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`})]})]}),jsxs("div",{className:"flex items-center gap-1",children:[o&&jsx("button",{onClick:o,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsx(Search,{className:"h-5 w-5"})}),jsx("button",{onClick:a,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsx(Phone,{className:"h-5 w-5"})}),jsx("button",{onClick:n,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsx(Video,{className:"h-5 w-5"})}),d,jsx("button",{onClick:r,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsx(MoreVertical,{className:"h-5 w-5"})})]})]})}function Is({src:e,duration:t,isMe:r,className:a,...n}){let[o,s]=useState(false),[l,c]=useState(0),[d,m]=useState(false),u=useRef(null),p=()=>{u.current&&(o?u.current.pause():u.current.play(),s(!o));},b=()=>{u.current&&c(u.current.currentTime);},h=()=>{s(false),c(0);},x=f=>{let v=Math.floor(f/60),w=Math.floor(f%60);return `${v}:${w.toString().padStart(2,"0")}`},g=t?l/t*100:0;return jsxs("div",{className:i("flex items-center gap-3 p-2 rounded-2xl min-w-[200px]",r?"bg-white/10":"bg-gray-100 dark:bg-white/[0.03]",a),...n,children:[jsx("audio",{ref:u,src:e,onTimeUpdate:b,onEnded:h}),jsx("button",{onClick:p,className:i("w-10 h-10 rounded-full flex items-center justify-center transition-all",r?"bg-white text-blue-600":"bg-blue-500 text-white"),children:o?jsx(Pause,{className:"h-5 w-5 fill-current"}):jsx(Play,{className:"h-5 w-5 fill-current ml-0.5"})}),jsxs("div",{className:"flex-1 space-y-1",children:[jsx("div",{className:"h-1.5 w-full bg-gray-300 dark:bg-white/10 rounded-full overflow-hidden",children:jsx("div",{className:i("h-full transition-all duration-100",r?"bg-white":"bg-blue-500"),style:{width:`${g}%`}})}),jsxs("div",{className:"flex justify-between text-[10px] font-medium opacity-60",children:[jsx("span",{children:x(l)}),jsx("span",{children:t?x(t):"--:--"})]})]}),jsx("button",{onClick:()=>m(!d),className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/5 opacity-60",children:d?jsx(VolumeX,{className:"h-4 w-4"}):jsx(Volume2,{className:"h-4 w-4"})})]})}function Bs({status:e,className:t,...r}){return e==="sending"?jsx("div",{className:i("w-3 h-3 border border-current border-t-transparent rounded-full animate-spin opacity-50",t),...r}):e==="failed"?jsx("span",{className:i("text-red-500 text-[10px] font-bold",t),...r,children:"!"}):jsxs("div",{className:i("flex items-center",t),...r,children:[e==="sent"&&jsx(Check,{className:"h-3 w-3 opacity-50"}),e==="delivered"&&jsx(CheckCheck,{className:"h-3 w-3 opacity-50"}),e==="read"&&jsx(CheckCheck,{className:"h-3 w-3 text-blue-500"})]})}function Vs({url:e,title:t,description:r,image:a,siteName:n,className:o,...s}){return jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:i("block overflow-hidden rounded-xl border border-gray-200 dark:border-white/10 bg-white dark:bg-white/[0.03] hover:bg-gray-50 dark:hover:bg-white/[0.05] transition-all group",o),...s,children:[a&&jsx("div",{className:"aspect-video w-full overflow-hidden border-b border-gray-200 dark:border-white/10",children:jsx("img",{src:a,alt:t,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})}),jsxs("div",{className:"p-3 space-y-1",children:[n&&jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-blue-500",children:n}),jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white line-clamp-1",children:t||e}),r&&jsx("p",{className:"text-xs text-gray-500 dark:text-white/50 line-clamp-2",children:r}),jsxs("div",{className:"flex items-center gap-1 text-[10px] text-gray-400 pt-1",children:[jsx(ExternalLink,{className:"h-3 w-3"}),jsx("span",{className:"truncate",children:new URL(e).hostname})]})]})]})}function zs({message:e,isOwn:t,showAvatar:r,showStatus:a=true,className:n,onReply:o,onReact:s,onDelete:l,onEdit:c,onForward:d,onCopy:m,onPin:u,onSelect:p,isSelected:b}){let h=()=>{switch(e.type){case "audio":return jsx(Is,{src:e.attachments?.[0]?.url||"",duration:e.attachments?.[0]?.duration,isMe:t});case "location":return jsxs("div",{className:"space-y-2",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(MapPin,{className:"h-4 w-4"}),jsx("span",{className:"text-sm font-medium",children:e.location?.address||"Shared Location"})]}),jsx("div",{className:"aspect-video rounded-xl bg-gray-200 dark:bg-white/10 flex items-center justify-center",children:jsx(MapPin,{className:"h-8 w-8 opacity-20"})})]});case "contact":return jsxs("div",{className:"flex items-center gap-3 p-2 rounded-xl bg-black/5 dark:bg-white/10",children:[jsx("div",{className:"w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center text-white",children:jsx(User,{className:"h-5 w-5"})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"text-sm font-bold truncate",children:e.contact?.name}),jsx("p",{className:"text-xs opacity-60 truncate",children:e.contact?.phone})]})]});case "file":return jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl bg-black/5 dark:bg-white/10 border border-white/5",children:[jsx(FileText,{className:"h-8 w-8 text-blue-500"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"text-sm font-medium truncate",children:e.attachments?.[0]?.name||"File"}),jsx("p",{className:"text-[10px] opacity-60 uppercase",children:e.attachments?.[0]?.size||"Unknown size"})]})]});default:let x=/(https?:\/\/[^\s]+)/g,g=e.content.match(x);return jsxs("div",{className:"space-y-2",children:[jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words",children:e.content}),g&&g.map((f,v)=>jsx(Vs,{url:f,className:i("mt-2",t?"bg-white/10 border-white/20":"bg-black/5 dark:bg-black/20")},v))]})}};return jsxs(vn,{preset:"spring",className:i("flex w-full gap-2 mb-1 group relative",t?"justify-end":"justify-start",b&&"bg-blue-500/5",n),onClick:()=>p?.(),children:[jsx("div",{className:i("absolute top-2 opacity-0 group-hover:opacity-100 transition-opacity z-10",t?"left-0 -translate-x-full pr-2":"right-0 translate-x-full pl-2"),children:jsxs(la,{children:[jsx(ca,{className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-400",children:jsx(MoreHorizontal,{className:"h-4 w-4"})}),jsxs(da,{align:t?"end":"start",children:[jsxs(Se,{onClick:()=>o?.(),children:[jsx(Reply,{className:"h-4 w-4 mr-2"})," Reply"]}),jsxs(Se,{onClick:()=>c?.(),children:[jsx(Edit2,{className:"h-4 w-4 mr-2"})," Edit"]}),jsxs(Se,{onClick:()=>m?.(),children:[jsx(Copy,{className:"h-4 w-4 mr-2"})," Copy"]}),jsxs(Se,{onClick:()=>d?.(),children:[jsx(Forward,{className:"h-4 w-4 mr-2"})," Forward"]}),jsxs(Se,{onClick:()=>u?.(),children:[jsx(Pin,{className:"h-4 w-4 mr-2"})," Pin"]}),jsxs(Se,{onClick:()=>s?.("\u{1F44D}"),children:[jsx(Smile,{className:"h-4 w-4 mr-2"})," React"]}),t&&jsxs(Se,{onClick:()=>l?.(),className:"text-red-500",children:[jsx(Trash2,{className:"h-4 w-4 mr-2"})," Delete"]})]})]})}),jsxs("div",{className:i("relative max-w-[70%] px-4 py-2 rounded-2xl shadow-sm transition-all",t?"bg-blue-600 text-white rounded-tr-sm":"bg-white dark:bg-white/[0.06] text-gray-900 dark:text-white rounded-tl-sm border border-gray-200 dark:border-transparent",e.isPinned&&"ring-2 ring-blue-500/50"),children:[e.replyTo&&jsxs("div",{className:i("mb-2 rounded px-2 py-1 text-xs border-l-2 opacity-80",t?"bg-white/[0.06] border-white/50":"bg-gray-100 dark:bg-black/20 border-blue-500"),children:[jsx("p",{className:"font-bold opacity-60",children:"Replying to"}),jsx("p",{className:"truncate",children:e.replyTo.content})]}),e.attachments&&e.attachments.length>0&&e.type==="image"&&jsx("div",{className:"mb-2 space-y-2",children:e.attachments.map(x=>jsx($a,{src:x.url,alt:"Attachment",className:"rounded-2xl max-h-60 object-cover w-full"},x.id))}),h(),jsxs("div",{className:i("flex items-center justify-end gap-1 mt-1 text-[10px]",t?"text-white/60":"text-gray-400"),children:[e.isEdited&&jsx("span",{children:"edited"}),jsx("span",{children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),t&&e.status&&jsx(Bs,{status:e.status})]})]})]})}function I4({messages:e,currentUserId:t,className:r,onReply:a,onReact:n,onDelete:o,onEdit:s,onForward:l,onCopy:c,onPin:d,onSelect:m,onLoadMore:u,hasMore:p,isLoadingMore:b,selectedMessages:h=[],dateFormat:x="MMMM d, yyyy",groupByDate:g=true,...f}){let v=useRef(null),[w,y]=useState(true);useEffect(()=>{w&&v.current?.scrollIntoView({behavior:"smooth"});},[e,w]);let k=T=>{let C=T.currentTarget,M=Math.abs(C.scrollHeight-C.clientHeight-C.scrollTop)<50;y(M),C.scrollTop===0&&p&&!b&&u&&u();},N=useMemo(()=>g?e.reduce((T,C)=>{let M=C.timestamp.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"});return T[M]||(T[M]=[]),T[M].push(C),T},{}):{all:e},[e,g]);return e.length===0&&!b?jsx("div",{className:i("flex-1 flex items-center justify-center p-8 text-center text-gray-500 dark:text-white/40",r),...f,children:jsxs("div",{className:"max-w-sm space-y-4",children:[jsx("div",{className:"w-24 h-24 bg-blue-500/10 dark:bg-white/[0.03] rounded-full flex items-center justify-center mx-auto mb-6 animate-pulse",children:jsx(MessageSquare,{className:"h-12 w-12 text-blue-500"})}),jsx("h3",{className:"text-xl font-medium text-gray-900 dark:text-white",children:"No messages yet"}),jsx("p",{children:"Start the conversation by sending a message below."})]})}):jsx(Me,{className:i("flex-1 p-4",r),onScroll:k,role:"log","aria-live":"polite","aria-relevant":"additions",...f,children:jsxs("div",{className:"space-y-6 pb-4",children:[p&&jsx("div",{className:"flex justify-center py-4",children:b?jsxs("div",{className:"flex items-center gap-2 text-xs text-white/40",children:[jsx("div",{className:"w-4 h-4 border-2 border-cyan-500/30 border-t-cyan-500 rounded-full animate-spin"}),"Loading older messages..."]}):jsx("button",{onClick:u,className:"text-xs text-cyan-500/60 hover:text-cyan-500 transition-colors",children:"Load older messages"})}),Object.entries(N).map(([T,C])=>jsxs("div",{className:"space-y-4",children:[g&&jsx("div",{className:"flex justify-center sticky top-0 z-10 py-2",children:jsxs("div",{className:"flex items-center gap-2 px-3 py-1 rounded-full bg-gray-100/80 dark:bg-white/5 backdrop-blur text-[10px] font-medium text-gray-500 dark:text-white/40 border border-gray-200 dark:border-white/10",children:[jsx(Calendar,{className:"h-3 w-3"}),T]})}),jsx("div",{className:"space-y-1",children:C.map((M,H)=>{let S=M.senderId===t,E=C[H-1],P=C[H+1];!E||E.senderId!==M.senderId;let L=!P||P.senderId!==M.senderId;return jsx(zs,{message:M,isOwn:S,className:i(!L&&"mb-0.5"),onReply:()=>a?.(M),onReact:$=>n?.(M,$),onDelete:()=>o?.(M),onEdit:()=>s?.(M),onForward:()=>l?.(M),onCopy:()=>c?.(M),onPin:()=>d?.(M),onSelect:()=>m?.(M),isSelected:h.includes(M.id)},M.id)})})]},T)),jsx("div",{ref:v,className:"h-px"})]})})}function X4({onSend:e,onAttach:t,onMic:r,onEmoji:a,onGif:n,onLocation:o,onCancelReply:s,placeholder:l="Type a message...",users:c=[],replyingTo:d,isRecording:m,maxLength:u,disabled:p,className:b,...h}){let[x,g]=useState(""),[f,v]=useState(false),[w,y]=useState(null),[k,N]=useState(0),T=useRef(null),C=useMemo(()=>w===null?[]:c.filter(P=>P.name.toLowerCase().includes(w.toLowerCase())).slice(0,5),[c,w]),M=P=>{if(p)return;let D=P.target.value;if(u&&D.length>u)return;g(D);D[P.target.selectionStart-1];let ae=D.slice(0,P.target.selectionStart).match(/@(\w*)$/);ae?(y(ae[1]||""),N(0)):y(null),T.current&&(T.current.style.height="auto",T.current.style.height=`${Math.min(T.current.scrollHeight,120)}px`);},H=P=>{if(!T.current)return;let D=T.current.selectionStart,L=x.slice(0,D).replace(/@\w*$/,`@${P.name} `),$=x.slice(D);g(L+$),y(null),T.current.focus();},S=P=>{if(!p){if(w!==null&&C.length>0){P.key==="ArrowDown"?(P.preventDefault(),N(D=>(D+1)%C.length)):P.key==="ArrowUp"?(P.preventDefault(),N(D=>(D-1+C.length)%C.length)):P.key==="Enter"||P.key==="Tab"?(P.preventDefault(),H(C[k])):P.key==="Escape"&&y(null);return}P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),E());}},E=()=>{p||!x.trim()||(e?.(x),g(""),T.current&&(T.current.style.height="auto"));};return jsxs("div",{className:i("p-4 bg-white/80 dark:bg-black/40 backdrop-blur border-t border-gray-200 dark:border-white/10",b),...h,children:[d&&jsxs("div",{className:"mb-3 flex items-center justify-between p-2 rounded-xl bg-blue-500/5 border-l-4 border-blue-500 animate-in slide-in-from-bottom-2",children:[jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"text-xs font-bold text-blue-500",children:"Replying to"}),jsx("p",{className:"text-sm text-gray-600 dark:text-white/60 truncate",children:d.content})]}),jsx("button",{onClick:s,className:"p-1 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400",children:jsx(X,{className:"h-4 w-4"})})]}),jsxs("div",{className:"flex items-end gap-2",children:[jsxs("div",{className:"flex items-center gap-1 mb-1",children:[jsx("button",{onClick:t,disabled:p,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsx(Paperclip,{className:"h-5 w-5"})}),jsx("button",{onClick:a,disabled:p,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsx(Smile,{className:"h-5 w-5"})})]}),jsxs("div",{className:"flex-1 relative",children:[jsx("textarea",{ref:T,value:x,onChange:M,onKeyDown:S,placeholder:m?"Recording...":l,disabled:p||m,rows:1,className:i("w-full resize-none rounded-2xl bg-gray-100 dark:bg-white/[0.03] border-none px-4 py-2.5 text-sm focus:ring-2 focus:ring-blue-500/50 transition-all placeholder:text-gray-400 dark:text-white",m&&"animate-pulse text-red-500")}),w!==null&&C.length>0&&jsx(Q,{className:"absolute bottom-full left-0 mb-2 w-64 overflow-hidden shadow-xl animate-in fade-in slide-in-from-bottom-2",children:jsx("div",{className:"p-1",children:C.map((P,D)=>jsxs("button",{onClick:()=>H(P),className:i("w-full flex items-center gap-2 p-2 rounded-xl text-left transition-colors",D===k?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-white/[0.06]"),children:[jsx(V,{src:P.avatar,alt:P.name,fallback:P.name[0],size:"sm"}),jsx("span",{className:"text-sm font-medium",children:P.name})]},P.id))})})]}),jsxs("div",{className:"flex items-center gap-1 mb-1",children:[!x.trim()&&!m&&jsxs(Fragment,{children:[jsx("button",{onClick:n,disabled:p,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsx(Gift,{className:"h-5 w-5"})}),jsx("button",{onClick:o,disabled:p,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsx(MapPin,{className:"h-5 w-5"})})]}),m?jsx(R,{size:"icon",variant:"ghost",onClick:r,className:"rounded-full bg-red-500/10 text-red-500 hover:bg-red-500/20 animate-pulse",children:jsx(Mic,{className:"h-5 w-5"})}):x.trim()?jsx(R,{size:"icon",onClick:E,disabled:p,className:"rounded-full bg-blue-500 hover:bg-blue-600 text-white shadow-lg shadow-blue-500/20",children:jsx(Send,{className:"h-5 w-5"})}):jsx("button",{onClick:r,disabled:p,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsx(Mic,{className:"h-5 w-5"})})]})]}),u&&jsxs("div",{className:"mt-1 text-[10px] text-right text-gray-400",children:[x.length," / ",u]})]})}function oL({user:e,onClose:t,className:r,...a}){return jsxs("div",{className:i("w-80 border-l border-gray-200 dark:border-white/10 bg-white dark:bg-black/20 flex flex-col",r),...a,children:[jsxs("div",{className:"h-16 flex items-center px-4 border-b border-gray-200 dark:border-white/10",children:[jsx("button",{onClick:t,className:"p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsx(X,{className:"h-5 w-5 text-gray-500"})}),jsx("span",{className:"ml-2 font-semibold text-gray-900 dark:text-white",children:"Contact Info"})]}),jsxs(Me,{className:"flex-1",children:[jsxs("div",{className:"p-6 flex flex-col items-center text-center",children:[jsx(V,{src:e.avatar,alt:e.name,fallback:e.name[0],className:"h-24 w-24 mb-4 text-2xl"}),jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:e.name}),jsx("p",{className:"text-sm text-gray-500 dark:text-white/50 mt-1",children:e.phone||"+1 (555) 000-0000"}),jsxs("div",{className:"mt-6 w-full",children:[jsx("p",{className:"text-sm text-gray-500 dark:text-white/50 mb-1 text-left",children:"About"}),jsx("p",{className:"text-sm text-gray-900 dark:text-white text-left",children:e.bio||"Hey there! I am using Pixon Chat."})]})]}),jsx(Nr,{}),jsxs("div",{className:"p-4 space-y-4",children:[jsx("h3",{className:"text-xs font-semibold text-gray-500 dark:text-white/40 uppercase tracking-wider",children:"Media & Docs"}),jsx("div",{className:"grid grid-cols-3 gap-2",children:[1,2,3,4,5,6].map(n=>jsxs("div",{className:"aspect-square rounded-2xl bg-gray-100 dark:bg-white/[0.03] overflow-hidden relative group cursor-pointer",children:[jsx("div",{className:"absolute inset-0 flex items-center justify-center text-gray-400",children:jsx(Image,{className:"h-6 w-6"})}),jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity"})]},n))})]}),jsx(Nr,{}),jsx("div",{className:"p-4 space-y-4",children:jsxs("div",{className:"flex items-center justify-between",children:[jsxs("div",{className:"flex items-center gap-3 text-gray-700 dark:text-white/80",children:[jsx(Bell,{className:"h-5 w-5"}),jsx("span",{className:"text-sm font-medium",children:"Mute Notifications"})]}),jsx(Na,{})]})}),jsx(Nr,{}),jsxs("div",{className:"p-4 space-y-2",children:[jsxs("button",{className:"w-full flex items-center gap-3 p-3 rounded-2xl hover:bg-red-50 dark:hover:bg-red-500/10 text-red-600 dark:text-red-400 transition-colors text-sm font-medium",children:[jsx(Ban,{className:"h-5 w-5"}),"Block ",e.name]}),jsxs("button",{className:"w-full flex items-center gap-3 p-3 rounded-2xl hover:bg-red-50 dark:hover:bg-red-500/10 text-red-600 dark:text-red-400 transition-colors text-sm font-medium",children:[jsx(Trash2,{className:"h-5 w-5"}),"Delete Chat"]})]})]})]})}function cL({message:e,onCancel:t,className:r,...a}){return jsxs("div",{className:i("flex items-center gap-3 p-2 rounded-xl bg-blue-500/5 border-l-4 border-blue-500 animate-in slide-in-from-bottom-2",r),...a,children:[jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/10 text-blue-500",children:jsx(Reply,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"text-xs font-bold text-blue-500",children:"Replying to"}),jsx("p",{className:"text-sm text-gray-600 dark:text-white/60 truncate",children:e.content})]}),t&&jsx("button",{onClick:t,className:"p-1 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400 transition-colors",children:jsx(X,{className:"h-4 w-4"})})]})}function fL({type:e="info",message:t,action:r,onClose:a,className:n,...o}){let s={info:Info,warning:AlertCircle,error:AlertCircle,success:CheckCircle2},l={info:"bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20",warning:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20",error:"bg-red-500/10 text-red-600 dark:text-red-400 border-red-500/20",success:"bg-green-500/10 text-green-600 dark:text-green-400 border-green-500/20"},c=s[e];return jsxs("div",{className:i("flex items-center gap-3 px-4 py-2 border-b text-sm animate-in slide-in-from-top duration-300",l[e],n),...o,children:[jsx(c,{className:"h-4 w-4 shrink-0"}),jsx("p",{className:"flex-1 font-medium",children:t}),r&&jsx("button",{onClick:r.onClick,className:"text-xs font-bold uppercase tracking-wider hover:underline",children:r.label}),a&&jsx("button",{onClick:a,className:"p-1 rounded-full hover:bg-black/5 dark:hover:bg-white/5 transition-colors",children:jsx(X,{className:"h-4 w-4"})})]})}function vL({date:e,className:t,...r}){return jsx("div",{className:i("flex justify-center sticky top-0 z-10 py-4",t),...r,children:jsxs("div",{className:"flex items-center gap-2 px-3 py-1 rounded-full bg-gray-100/80 dark:bg-white/5 backdrop-blur text-[10px] font-bold uppercase tracking-wider text-gray-500 dark:text-white/40 border border-gray-200 dark:border-white/10 shadow-sm",children:[jsx(Calendar,{className:"h-3 w-3"}),e]})})}function NL({status:e="offline",size:t="md",className:r,...a}){let n={online:"bg-green-500",offline:"bg-gray-400",away:"bg-amber-500",busy:"bg-red-500"},o={sm:"h-2 w-2",md:"h-3 w-3",lg:"h-4 w-4"};return jsx("span",{className:i("rounded-full border-2 border-white dark:border-black shrink-0",n[e],o[t],e==="online"&&"animate-pulse",r),...a})}function ML({content:e,className:t,...r}){return jsx("div",{className:i("flex justify-center py-2",t),...r,children:jsx("div",{className:"px-4 py-1 rounded-lg bg-gray-100/50 dark:bg-white/[0.02] text-[11px] font-medium text-gray-500 dark:text-white/30 border border-gray-200/50 dark:border-white/5",children:e})})}function IL({group:e,onBack:t,onInfo:r,isTyping:a,typingUsers:n=[],className:o,...s}){let l=n.length>0?`${n.join(", ")} ${n.length===1?"is":"are"} typing...`:"typing...";return jsxs("div",{className:i("flex h-16 items-center justify-between border-b border-gray-200 dark:border-white/10 bg-white/80 dark:bg-black/40 backdrop-blur px-4 sticky top-0 z-10",o),...s,children:[jsxs("div",{className:"flex items-center gap-3",children:[t&&jsx("button",{onClick:t,className:"md:hidden p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsx(ArrowLeft,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),jsx("div",{className:"relative cursor-pointer",onClick:r,children:jsxs("div",{className:"flex -space-x-3",children:[e.members.slice(0,2).map((c,d)=>jsx(V,{src:c.avatar,alt:c.name,fallback:c.name[0],className:i("border-2 border-white dark:border-black",d===0?"z-10":"z-0")},c.id)),e.members.length>2&&jsxs("div",{className:"w-10 h-10 rounded-full bg-gray-200 dark:bg-white/10 border-2 border-white dark:border-black flex items-center justify-center text-[10px] font-bold text-gray-600 dark:text-white/60 z-0",children:["+",e.members.length-2]})]})}),jsxs("div",{className:"cursor-pointer min-w-0",onClick:r,children:[jsx("h3",{className:"font-semibold text-gray-900 dark:text-white leading-none truncate",children:e.name}),jsx("p",{className:i("text-xs mt-1 truncate transition-colors",a?"text-blue-500 font-medium animate-pulse":"text-gray-500 dark:text-white/50"),children:a?l:`${e.members.length} members`})]})]}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsx(Phone,{className:"h-5 w-5"})}),jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsx(Video,{className:"h-5 w-5"})}),jsx("button",{onClick:r,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsx(MoreVertical,{className:"h-5 w-5"})})]})]})}function KL({users:e,selectedIndex:t,onSelect:r,className:a,...n}){return e.length===0?null:jsx(Q,{className:i("w-64 overflow-hidden shadow-xl animate-in fade-in slide-in-from-bottom-2",a),...n,children:jsxs("div",{className:"p-1",children:[jsx("div",{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-wider text-gray-400 border-b border-gray-200 dark:border-white/5 mb-1",children:"Mention someone"}),e.map((o,s)=>jsxs("button",{onClick:()=>r(o),className:i("w-full flex items-center gap-2 p-2 rounded-xl text-left transition-colors",s===t?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-white/[0.06]"),children:[jsx(V,{src:o.avatar,alt:o.name,fallback:o.name[0],size:"sm"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"text-sm font-medium truncate",children:o.name}),o.status&&jsx("p",{className:i("text-[10px]",s===t?"text-white/70":"text-gray-500"),children:o.status})]})]},o.id))]})})}var mf=[{name:"Smileys",emojis:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F602}","\u{1F923}","\u{1F60A}","\u{1F607}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60C}","\u{1F60D}","\u{1F970}","\u{1F618}","\u{1F617}","\u{1F619}","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61D}","\u{1F61C}","\u{1F92A}","\u{1F928}","\u{1F9D0}","\u{1F913}","\u{1F60E}","\u{1F929}","\u{1F973}","\u{1F60F}","\u{1F612}","\u{1F61E}","\u{1F614}","\u{1F61F}","\u{1F615}","\u{1F641}","\u2639\uFE0F","\u{1F623}","\u{1F616}","\u{1F62B}","\u{1F629}","\u{1F97A}","\u{1F622}","\u{1F62D}","\u{1F624}","\u{1F620}","\u{1F621}","\u{1F92C}","\u{1F92F}","\u{1F633}","\u{1F975}","\u{1F976}","\u{1F631}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F613}","\u{1F917}","\u{1F914}","\u{1F92D}","\u{1F92B}","\u{1F925}","\u{1F636}","\u{1F610}","\u{1F611}","\u{1F62C}","\u{1F644}","\u{1F62F}","\u{1F626}","\u{1F627}","\u{1F62E}","\u{1F632}","\u{1F971}","\u{1F634}","\u{1F924}","\u{1F62A}","\u{1F635}","\u{1F910}","\u{1F974}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F637}","\u{1F912}","\u{1F915}"]},{name:"Hearts",emojis:["\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}"]},{name:"Gestures",emojis:["\u{1F44D}","\u{1F44E}","\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","\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{1F9B5}","\u{1F9BF}","\u{1F9B6}","\u{1F463}","\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}"]},{name:"Activities",emojis:["\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{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}","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}"]},{name:"Nature",emojis:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F43B}\u200D\u2744\uFE0F","\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{1F99F}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\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}","\u{1F9AC}","\u{1F403}","\u{1F402}","\u{1F404}","\u{1F40E}","\u{1F416}","\u{1F40F}","\u{1F411}","\u{1F410}","\u{1F98C}","\u{1F415}","\u{1F429}","\u{1F9AE}","\u{1F415}\u200D\u{1F9BA}","\u{1F408}","\u{1F408}\u200D\u2B1B","\u{1F413}","\u{1F983}","\u{1F99A}","\u{1F99C}","\u{1F9A2}","\u{1F9A9}","\u{1F54A}\uFE0F","\u{1F407}","\u{1F99D}","\u{1F9A8}","\u{1F9A1}","\u{1F9AB}","\u{1F9A6}","\u{1F9A5}","\u{1F401}","\u{1F400}","\u{1F43F}\uFE0F","\u{1F994}","\u{1F43E}","\u{1F409}","\u{1F432}","\u{1F335}","\u{1F384}","\u{1F332}","\u{1F333}","\u{1F334}","\u{1FAB5}","\u{1F331}","\u{1F33F}","\u2618\uFE0F","\u{1F340}","\u{1F38D}","\u{1FAB4}","\u{1F38B}","\u{1F343}","\u{1F342}","\u{1F341}","\u{1F344}","\u{1F41A}","\u{1FAA8}","\u{1F33E}","\u{1F490}","\u{1F337}","\u{1F339}","\u{1F940}","\u{1F33A}","\u{1F338}","\u{1F33C}","\u{1F33B}","\u{1F31E}","\u{1F31D}","\u{1F31B}","\u{1F31C}","\u{1F31A}","\u{1F315}","\u{1F316}","\u{1F317}","\u{1F318}","\u{1F311}","\u{1F312}","\u{1F313}","\u{1F314}","\u{1F319}","\u{1F30E}","\u{1F30D}","\u{1F30F}","\u{1FA90}","\u{1F4AB}","\u2B50\uFE0F","\u{1F31F}","\u2728","\u26A1\uFE0F","\u2604\uFE0F","\u{1F4A5}","\u{1F525}","\u{1F32A}\uFE0F","\u{1F308}","\u2600\uFE0F","\u{1F324}\uFE0F","\u26C5\uFE0F","\u{1F325}\uFE0F","\u2601\uFE0F","\u{1F326}\uFE0F","\u{1F327}\uFE0F","\u26C8\uFE0F","\u{1F329}\uFE0F","\u{1F328}\uFE0F","\u2744\uFE0F","\u2603\uFE0F","\u26C4\uFE0F","\u{1F32C}\uFE0F","\u{1F4A8}","\u{1F4A7}","\u{1F4A6}","\u2614\uFE0F","\u2602\uFE0F","\u{1F30A}","\u{1F32B}\uFE0F"]}];function qL({onSelect:e,className:t,...r}){let[a,n]=useState(""),o=mf.map(s=>({...s,emojis:s.emojis.filter(l=>a===""||l.includes(a))})).filter(s=>s.emojis.length>0);return jsxs(Q,{className:i("w-72 h-96 flex flex-col overflow-hidden shadow-2xl",t),...r,children:[jsx("div",{className:"p-3 border-b border-gray-200 dark:border-white/10",children:jsxs("div",{className:"relative",children:[jsx(Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),jsx("input",{type:"text",value:a,onChange:s=>n(s.target.value),placeholder:"Search emoji...",className:"w-full h-8 pl-8 pr-3 rounded-lg bg-gray-100 dark:bg-white/5 text-xs focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all"})]})}),jsx("div",{className:"flex-1 overflow-y-auto p-2 custom-scrollbar",children:o.map(s=>jsxs("div",{className:"mb-4",children:[jsx("h4",{className:"text-[10px] font-bold uppercase tracking-wider text-gray-400 px-2 mb-2",children:s.name}),jsx("div",{className:"grid grid-cols-8 gap-1",children:s.emojis.map(l=>jsx("button",{onClick:()=>e(l),className:"h-8 w-8 flex items-center justify-center rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-lg transition-colors",children:l},l))})]},s.name))})]})}function Ys(){let[e,t]=useState(false),[r,a]=useState(0),[n,o]=useState(null),[s,l]=useState(null),c=useRef(null),d=useRef(null),m=useRef([]),u=useCallback(async()=>{try{let x=await navigator.mediaDevices.getUserMedia({audio:!0});c.current=new MediaRecorder(x),m.current=[],c.current.ondataavailable=g=>{g.data.size>0&&m.current.push(g.data);},c.current.onstop=()=>{let g=new Blob(m.current,{type:"audio/webm"}),f=URL.createObjectURL(g);o(g),l(f),x.getTracks().forEach(v=>v.stop());},c.current.start(),t(!0),a(0),d.current=window.setInterval(()=>{a(g=>g+1);},1e3);}catch(x){throw console.error("Failed to start recording",x),x}},[]),p=useCallback(()=>{c.current&&e&&(c.current.stop(),t(false),d.current&&clearInterval(d.current));},[e]),b=useCallback(()=>{c.current&&e&&(c.current.stop(),t(false),d.current&&clearInterval(d.current),o(null),l(null),a(0));},[e]),h=useCallback(()=>{o(null),l(null),a(0);},[]);return {isRecording:e,duration:r,audioBlob:n,audioUrl:s,startRecording:u,stopRecording:p,cancelRecording:b,clearAudio:h}}function iP({onSend:e,onCancel:t,className:r,...a}){let{isRecording:n,duration:o,audioBlob:s,startRecording:l,stopRecording:c,cancelRecording:d}=Ys();useEffect(()=>(l(),()=>d()),[l,d]);let m=u=>{let p=Math.floor(u/60),b=u%60;return `${p}:${b.toString().padStart(2,"0")}`};return jsxs("div",{className:i("flex items-center gap-3 p-2 rounded-2xl bg-gray-100 dark:bg-white/[0.03] border border-gray-200 dark:border-white/10 animate-in slide-in-from-bottom-2",r),...a,children:[jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-xl bg-red-500/10 text-red-500",children:[jsx("div",{className:"w-2 h-2 rounded-full bg-red-500 animate-pulse"}),jsx("span",{className:"text-sm font-mono font-bold",children:m(o)})]}),jsx("div",{className:"flex-1 h-8 flex items-center gap-0.5 px-2",children:[...Array(20)].map((u,p)=>jsx("div",{className:"w-1 bg-red-500/40 rounded-full transition-all duration-150",style:{height:n?`${20+Math.random()*80}%`:"20%",animationDelay:`${p*.05}s`}},p))}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{onClick:()=>{d(),t();},className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-500 transition-colors",children:jsx(Trash2,{className:"h-5 w-5"})}),n?jsx(R,{size:"icon",variant:"ghost",onClick:c,className:"rounded-full bg-red-500 text-white hover:bg-red-600",children:jsx(Square,{className:"h-4 w-4 fill-current"})}):jsx(R,{size:"icon",onClick:()=>s&&e(s,o),className:"rounded-full bg-blue-500 text-white hover:bg-blue-600",children:jsx(Send,{className:"h-4 w-4"})})]})]})}function bP({onSearch:e,results:t,onResultClick:r,onClose:a,className:n,...o}){let[s,l]=useState(""),c=d=>{let m=d.target.value;l(m),e(m);};return jsxs("div",{className:i("flex flex-col h-full bg-white dark:bg-gray-900 border-l border-gray-200 dark:border-white/10 animate-in slide-in-from-right duration-300",n),...o,children:[jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-white/10 flex items-center justify-between",children:[jsx("h3",{className:"font-bold text-gray-900 dark:text-white",children:"Search Messages"}),jsx("button",{onClick:a,className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-white/10",children:jsx(X,{className:"h-5 w-5 text-gray-500"})})]}),jsx("div",{className:"p-4",children:jsxs("div",{className:"relative",children:[jsx(Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),jsx("input",{type:"text",value:s,onChange:c,placeholder:"Search in conversation...",className:"w-full h-10 pl-10 pr-4 rounded-xl bg-gray-100 dark:bg-white/5 border-none text-sm focus:ring-2 focus:ring-blue-500/50 transition-all",autoFocus:true})]})}),jsx("div",{className:"flex-1 overflow-y-auto p-2",children:s&&t.length===0?jsx("div",{className:"p-8 text-center text-gray-500 dark:text-white/30",children:jsxs("p",{className:"text-sm",children:['No messages found for "',s,'"']})}):jsx("div",{className:"space-y-1",children:t.map(d=>jsxs("button",{onClick:()=>r(d),className:"w-full p-3 rounded-xl hover:bg-gray-100 dark:hover:bg-white/5 text-left transition-all group",children:[jsxs("div",{className:"flex justify-between mb-1",children:[jsx("span",{className:"text-[10px] font-bold text-blue-500 uppercase",children:d.timestamp.toLocaleDateString()}),jsx("span",{className:"text-[10px] text-gray-400",children:d.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),jsx("p",{className:"text-sm text-gray-700 dark:text-white/70 line-clamp-2 group-hover:text-gray-900 dark:group-hover:text-white",children:d.content})]},d.id))})})]})}function _s(){let[e,t]=useState({scrollX:0,scrollY:0,scrollProgressX:0,scrollProgressY:0}),r=useRef(false),a=useCallback(()=>{r.current||(window.requestAnimationFrame(()=>{let n=window.scrollX,o=window.scrollY,s=document.documentElement.scrollWidth-document.documentElement.clientWidth,l=document.documentElement.scrollHeight-document.documentElement.clientHeight;t({scrollX:n,scrollY:o,scrollProgressX:s>0?n/s:0,scrollProgressY:l>0?o/l:0}),r.current=false;}),r.current=true);},[]);return useEffect(()=>(window.addEventListener("scroll",a,{passive:true}),a(),()=>window.removeEventListener("scroll",a)),[a]),e}function NP({className:e,color:t="bg-blue-500",height:r=2,position:a="top",...n}){let{scrollProgressY:o}=_s();return jsx("div",{className:i("fixed left-0 right-0 z-[100] w-full pointer-events-none",a==="top"?"top-0":"bottom-0",e),style:{height:r},...n,children:jsx("div",{className:i("h-full transition-all duration-75 ease-out",t),style:{width:`${o*100}%`,boxShadow:o>0?`0 0 10px ${t.replace("bg-","var(--")}`:"none"}})})}var Tf=be__default.forwardRef(({orientation:e="horizontal",className:t,...r},a)=>jsx("hr",{ref:a,className:i("border-0 bg-gray-200 dark:bg-white/10",{"h-px w-full":e==="horizontal","h-full w-px":e==="vertical"},t),...r}));Tf.displayName="Divider";var Mf=be__default.forwardRef(({children:e,className:t,...r},a)=>jsx("kbd",{ref:a,className:i("rounded-lg border border-gray-200 dark:border-white/10 bg-gray-100 dark:bg-white/[0.03] px-2 py-1 text-[11px] font-semibold text-gray-500 dark:text-white/65",t),...r,children:e}));Mf.displayName="Kbd";var Hf={theme:"system",setTheme:()=>null},qs=createContext(Hf);function BP({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...a}){let[n,o]=useState(()=>localStorage.getItem(r)||t);useEffect(()=>{let l=window.document.documentElement;if(l.classList.remove("light","dark"),n==="system"){let c=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>{l.classList.remove("light","dark"),l.classList.add(c.matches?"dark":"light");};return d(),c.addEventListener("change",d),()=>c.removeEventListener("change",d)}l.classList.add(n);},[n]);let s={theme:n,setTheme:l=>{localStorage.setItem(r,l),o(l);}};return jsx(qs.Provider,{...a,value:s,children:e})}var Gs=()=>{let e=useContext(qs);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function FP(){let{setTheme:e,theme:t}=Gs();return jsxs(R,{variant:"ghost",size:"icon",onClick:()=>e(t==="light"?"dark":"light"),children:[jsx(Sun,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsx(Moon,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function Kf(e,t=true){let[r,a]=useState({data:null,error:null,isLoading:false}),n=useCallback(async()=>{a({data:null,error:null,isLoading:true});try{let o=await e();return a({data:o,error:null,isLoading:!1}),o}catch(o){throw a({data:null,error:o,isLoading:false}),o}},[e]);return useEffect(()=>{t&&n();},[n,t]),{...r,execute:n}}function _P(e,t){let r=useCallback(()=>fetch(e,t).then(a=>a.json()),[e,t]);return Kf(r)}function GP({initialMessages:e=[],onSendMessage:t,scrollThreshold:r=100}={}){let[a,n]=useState(e),[o,s]=useState(false),[l,c]=useState(false),d=useRef(null),m=useRef(true),u=useCallback((x="smooth")=>{d.current&&d.current.scrollTo({top:d.current.scrollHeight,behavior:x});},[]),p=useCallback(()=>{if(d.current){let{scrollTop:x,scrollHeight:g,clientHeight:f}=d.current;m.current=g-x-f<r;}},[r]);useEffect(()=>{m.current&&u();},[a,u]);let b=useCallback(async(x,g)=>{if(!x.trim())return;let f=crypto.randomUUID(),v={id:f,content:x,senderId:g,timestamp:new Date,status:"sending"};n(w=>[...w,v]);try{t&&await t(x),n(w=>w.map(y=>y.id===f?{...y,status:"sent"}:y));}catch{n(y=>y.map(k=>k.id===f?{...k,status:"error"}:k));}},[t]),h=useCallback(()=>{n([]);},[]);return {messages:a,setMessages:n,sendMessage:b,clearMessages:h,isTyping:o,setIsTyping:s,isLoading:l,setIsLoading:c,scrollRef:d,handleScroll:p,scrollToBottom:u}}function ZP(e=[]){let[t,r]=useState(e),a=useCallback(d=>{r(m=>[...m,d]);},[]),n=useCallback((d,m)=>{r(u=>u.map(p=>p.id===d?{...p,status:m}:p));},[]),o=useCallback(d=>{r(m=>m.filter(u=>u.id!==d));},[]),s=useCallback((d,m)=>{r(u=>u.map(p=>p.id===d?{...p,content:m,isEdited:true}:p));},[]),l=useCallback((d,m,u)=>{r(p=>p.map(b=>{if(b.id!==d)return b;let h={...b.reactions||{}},x=h[m]||[];return x.includes(u)?(h[m]=x.filter(g=>g!==u),h[m].length===0&&delete h[m]):h[m]=[...x,u],{...b,reactions:h}}));},[]),c=useCallback(()=>{r([]);},[]);return {messages:t,setMessages:r,addMessage:a,updateMessageStatus:n,deleteMessage:o,editMessage:s,addReaction:l,clearMessages:c}}function rE(e){let[t,r]=useState(""),a=useMemo(()=>{if(!t.trim())return [];let n=t.toLowerCase();return e.filter(o=>o.content.toLowerCase().includes(n))},[e,t]);return {query:t,setQuery:r,results:a}}function nE(e){let t=useRef(null);return useEffect(()=>{let r=a=>{let n=t.current;!n||n.contains(a?.target||null)||e(a);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e]),t}function lE({timeout:e=2e3}={}){let[t,r]=useState(false),[a,n]=useState(null);return {copy:useCallback(async s=>{if(!navigator?.clipboard){n(new Error("Clipboard API not supported"));return}try{await navigator.clipboard.writeText(s),r(!0),setTimeout(()=>r(!1),e);}catch(l){n(l instanceof Error?l:new Error("Failed to copy"));}},[e]),copied:t,error:a}}function mE(e,t){let[r,a]=useState(e);return useEffect(()=>{let n=setTimeout(()=>{a(e);},t);return ()=>{clearTimeout(n);}},[e,t]),r}function fE(e){let[t,r]=useState(false),[a,n]=useState({x:0,y:0}),o=useRef({x:0,y:0}),s=useRef({x:0,y:0}),l=useRef(Date.now()),c=useRef({x:0,y:0}),d=useCallback((p,b)=>{r(true),o.current={x:p-a.x,y:b-a.y},s.current={x:p,y:b},l.current=Date.now();},[a]),m=useCallback((p,b)=>{if(!t)return;let h=p-o.current.x,x=b-o.current.y,g=Date.now(),f=g-l.current;f>0&&(c.current={x:(p-s.current.x)/f,y:(b-s.current.y)/f}),n({x:h,y:x}),s.current={x:p,y:b},l.current=g,e?.({isDragging:true,offset:{x:h,y:x},velocity:c.current});},[t,e]),u=useCallback(()=>{r(false),e?.({isDragging:false,offset:a,velocity:c.current});},[a,e]);return useEffect(()=>{let p=g=>m(g.clientX,g.clientY),b=g=>{g.touches[0]&&m(g.touches[0].clientX,g.touches[0].clientY);},h=()=>u(),x=()=>u();return t&&(window.addEventListener("mousemove",p),window.addEventListener("mouseup",h),window.addEventListener("touchmove",b),window.addEventListener("touchend",x)),()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",h),window.removeEventListener("touchmove",b),window.removeEventListener("touchend",x);}},[t,m,u]),{isDragging:t,offset:a,dragProps:{onMouseDown:p=>d(p.clientX,p.clientY),onTouchStart:p=>{p.touches[0]&&d(p.touches[0].clientX,p.touches[0].clientY);},style:{cursor:t?"grabbing":"grab",touchAction:"none"}}}}function hE(e){let[t,r]=useState({progress:0,scrollY:0,isIntersecting:false}),a=useRef(false);return useEffect(()=>{let n=e.current;if(!n)return;let o=()=>{a.current||(window.requestAnimationFrame(()=>{let s=n.getBoundingClientRect(),l=window.innerHeight,c=l+s.height,d=l-s.top,m=Math.max(0,Math.min(1,d/c));r({progress:m,scrollY:window.scrollY,isIntersecting:s.top<l&&s.bottom>0}),a.current=false;}),a.current=true);};return window.addEventListener("scroll",o,{passive:true}),window.addEventListener("resize",o),o(),()=>{window.removeEventListener("scroll",o),window.removeEventListener("resize",o);}},[e]),t}function wE(e,t){let r=useRef(null);return useLayoutEffect(()=>{let a=document.querySelector(`[data-flip-id="${e}"]`);if(!a)return;let n=r.current,o=a.getBoundingClientRect();if(n){let s=n.left-o.left,l=n.top-o.top,c=n.width/o.width,d=n.height/o.height;(Math.abs(s)>.5||Math.abs(l)>.5||Math.abs(c-1)>.01||Math.abs(d-1)>.01)&&a.animate([{transformOrigin:"top left",transform:`translate(${s}px, ${l}px) scale(${c}, ${d})`},{transformOrigin:"top left",transform:"none"}],{duration:400,easing:"cubic-bezier(0.2, 0.8, 0.2, 1)"});}r.current=o;},t),{"data-flip-id":e}}function NE({initialValues:e,onSubmit:t}){let[r,a]=useState(e),[n,o]=useState({}),[s,l]=useState(false),c=useCallback(u=>{let{name:p,value:b,type:h}=u.target,x=h==="checkbox"?u.target.checked:b;a(g=>({...g,[p]:x})),n[p]&&o(g=>({...g,[p]:""}));},[n]),d=useCallback(async u=>{u.preventDefault();let p=u.currentTarget;if(!p.checkValidity()){let b={};Array.from(p.elements).forEach(h=>{let x=h;x.name&&!x.validity.valid&&(b[x.name]=x.validationMessage);}),o(b);return}l(true);try{await t(r);}finally{l(false);}},[r,t]),m=useCallback(u=>({name:u,value:r[u],onChange:c,error:n[u]}),[r,n,c]);return {values:r,errors:n,isSubmitting:s,handleChange:c,handleSubmit:d,register:m,setValues:a,setErrors:o}}function ME(e){let[t,r]=useState({past:[],present:e,future:[]}),a=t.past.length>0,n=t.future.length>0,o=useCallback(()=>{a&&r(d=>{let m=d.past[d.past.length-1];return m===void 0?d:{past:d.past.slice(0,d.past.length-1),present:m,future:[d.present,...d.future]}});},[a]),s=useCallback(()=>{n&&r(d=>{let m=d.future[0];if(m===void 0)return d;let u=d.future.slice(1);return {past:[...d.past,d.present],present:m,future:u}});},[n]),l=useCallback(d=>{r(m=>{let u=typeof d=="function"?d(m.present):d;return m.present===u?m:{past:[...m.past,m.present],present:u,future:[]}});},[]),c=useCallback(()=>{r({past:[],present:e,future:[]});},[e]);return {state:t.present,set:l,undo:o,redo:s,clear:c,canUndo:a,canRedo:n,history:t}}function EE(e=3e3){let[t,r]=useState(false),a=useRef();return useEffect(()=>{let n=()=>{r(false),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{r(true);},e);},o=["mousemove","mousedown","keydown","touchstart","scroll"];return o.forEach(s=>{window.addEventListener(s,n);}),n(),()=>{o.forEach(s=>{window.removeEventListener(s,n);}),a.current&&clearTimeout(a.current);}},[e]),t}function HE({onLoadMore:e,isLoading:t,hasMore:r,threshold:a=100,root:n=null}){let o=useRef(null),s=useRef(null),l=useCallback(c=>{let d=c[0];d&&d.isIntersecting&&r&&!t&&e();},[r,t,e]);return useEffect(()=>{let c=s.current;if(c)return o.current=new IntersectionObserver(l,{root:n,rootMargin:`0px 0px ${a}px 0px`,threshold:.1}),o.current.observe(c),()=>{o.current&&o.current.disconnect();}},[l,n,a]),s}function VE(e,{threshold:t=0,root:r=null,rootMargin:a="0%",freezeOnceVisible:n=false}={}){let[o,s]=useState(),l=o?.isIntersecting&&n,c=([d])=>{s(d);};return useEffect(()=>{let d=e?.current;if(!!!window.IntersectionObserver||l||!d)return;let u={threshold:t,root:r,rootMargin:a},p=new IntersectionObserver(c,u);return p.observe(d),()=>p.disconnect()},[e,t,r,a,l]),o}function KE(e){let[t,r]=useState(e),a=useCallback((l,c,d,m)=>{r(u=>{let p=u.columns[c],b=u.columns[d],h=u.tasks[l];if(!p||!b||!h)return u;let x=Array.from(p.taskIds);x.splice(x.indexOf(l),1);let g={...p,taskIds:x},f=c===d?x:Array.from(b.taskIds);f.splice(m,0,l);let v={...b,taskIds:f};return {...u,columns:{...u.columns,[c]:g,[d]:v},tasks:{...u.tasks,[l]:{...h,columnId:d}}}});},[]),n=useCallback((l,c)=>{r(d=>{let m=Array.from(d.columnOrder);return m.splice(m.indexOf(l),1),m.splice(c,0,l),{...d,columnOrder:m}});},[]),o=useCallback((l,c)=>{r(d=>{let m=d.columns[l];if(!m)return d;let u={...m,taskIds:[...m.taskIds,c.id]};return {...d,tasks:{...d.tasks,[c.id]:c},columns:{...d.columns,[l]:u}}});},[]),s=useCallback(l=>{r(c=>{let d=c.tasks[l];if(!d)return c;let m=c.columns[d.columnId];if(!m)return c;let u={...c.tasks};delete u[l];let p={...m,taskIds:m.taskIds.filter(b=>b!==l)};return {...c,tasks:u,columns:{...c.columns,[d.columnId]:p}}});},[]);return {board:t,setBoard:r,moveTask:a,moveColumn:n,addTask:o,removeTask:s}}function UE(e){let t=useRef(e);t.current=e,useEffect(()=>{let r=a=>{let n=[];(a.ctrlKey||a.metaKey)&&n.push("mod"),a.shiftKey&&n.push("shift"),a.altKey&&n.push("alt");let s=a.key.toLowerCase();["control","meta","shift","alt"].includes(s)||n.push(s);let l=n.join("+"),c=t.current[l]||t.current[s];c&&c(a);};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[]);}function _E(e){let t=useRef(false);useEffect(()=>{t.current||(t.current=true,e());},[]);}function XE(e){useEffect(()=>()=>{e();},[]);}function QE(e,t){let[r,a]=useState(()=>{if(typeof window>"u")return t;try{let o=window.localStorage.getItem(e);return o?JSON.parse(o):t}catch(o){return console.warn(`Error reading localStorage key "${e}":`,o),t}}),n=useCallback(o=>{try{let s=o instanceof Function?o(r):o;a(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s));}catch(s){console.warn(`Error setting localStorage key "${e}":`,s);}},[e,r]);return [r,n]}function eS(e){let[t,r]=useState({x:0,y:0,elementX:0,elementY:0,percentageX:0,percentageY:0}),a=useRef(),n=useRef({x:0,y:0});return useEffect(()=>{let o=l=>{n.current={x:l.clientX,y:l.clientY},a.current||(a.current=requestAnimationFrame(s));},s=()=>{let{x:l,y:c}=n.current,d=0,m=0,u=0,p=0;if(e?.current){let b=e.current.getBoundingClientRect();d=l-b.left,m=c-b.top,u=Math.max(0,Math.min(100,d/b.width*100)),p=Math.max(0,Math.min(100,m/b.height*100));}r({x:l,y:c,elementX:d,elementY:m,percentageX:u,percentageY:p}),a.current=void 0;};return window.addEventListener("mousemove",o),()=>{window.removeEventListener("mousemove",o),a.current&&cancelAnimationFrame(a.current);}},[e]),t}function aS(){let[e,t]=useState({alpha:null,beta:null,gamma:null,absolute:false});return useEffect(()=>{let r=a=>{t({alpha:a.alpha,beta:a.beta,gamma:a.gamma,absolute:a.absolute});};return typeof window<"u"&&"DeviceOrientationEvent"in window&&window.addEventListener("deviceorientation",r),()=>{window.removeEventListener("deviceorientation",r);}},[]),e}function sS(e){let t=useRef();return useEffect(()=>{t.current=e;},[e]),t.current}function cS(e){let t=useRef(null),r=useCallback((a,n,o)=>{!a||o||!t.current||(a.dataset.messageId=n,t.current.observe(a));},[]);return useEffect(()=>(t.current=new IntersectionObserver(a=>{a.forEach(n=>{if(n.isIntersecting){let o=n.target.dataset.messageId;o&&(e(o),t.current?.unobserve(n.target));}});},{threshold:.5}),()=>{t.current?.disconnect();}),[e]),{registerMessage:r}}function uS(){let[e,t]=useState(false);return useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");t(r.matches);let a=n=>{t(n.matches);};return r.addEventListener("change",a),()=>r.removeEventListener("change",a)},[]),e}var Pg={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function Eg(e){let[t,r]=useState(false);return useEffect(()=>{let a=window.matchMedia(e);r(a.matches);let n=()=>r(a.matches);return a.addEventListener("change",n),()=>a.removeEventListener("change",n)},[e]),t}function gS(e){return Eg(`(min-width: ${Pg[e]}px)`)}function bS(e){let[t,r]=useState({width:0,height:0});return useLayoutEffect(()=>{if(!e.current)return;let a=new ResizeObserver(n=>{for(let o of n)r({width:o.contentRect.width,height:o.contentRect.height});});return a.observe(e.current),()=>a.disconnect()},[e]),t}function vS(e=10){let[t,r]=useState(null),a=useRef(0);return useEffect(()=>{let n=()=>{let s=window.scrollY;if(Math.abs(s-a.current)<e)return;let l=s>a.current?"down":"up";l!==t&&(s>0||l==="down")&&r(l),a.current=s>0?s:0;},o=()=>{window.requestAnimationFrame(n);};return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)},[t,e]),t}function kS(e=true){useLayoutEffect(()=>{if(!e)return;let t=window.getComputedStyle(document.body).overflow,r=window.getComputedStyle(document.body).paddingRight,a=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",a>0&&(document.body.style.paddingRight=`${parseFloat(r)+a}px`),()=>{document.body.style.overflow=t,document.body.style.paddingRight=r;}},[e]);}function Ag(e,t,r){let[a,n]=t,[o,s]=r,l=(e-a)/(n-a),c=Math.max(0,Math.min(1,l));return o+c*(s-o)}function TS(e,t,r){return Ag(e,t,r)}function MS(){let[e,t]=useState(0),r=useRef(0),a=useRef(Date.now()),n=useRef();return useEffect(()=>{let o=()=>{let l=window.scrollY,c=Date.now(),d=c-a.current;if(d>0){let u=(l-r.current)/d;t(u);}r.current=l,a.current=c,n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(s);},s=()=>{t(l=>Math.abs(l)<.01?0:l*.9),n.current=requestAnimationFrame(s);};return window.addEventListener("scroll",o,{passive:true}),()=>{window.removeEventListener("scroll",o),n.current&&cancelAnimationFrame(n.current);}},[]),e}function zg(e,t){let r=e.toLowerCase().replace(/\s/g,""),a=t.toLowerCase(),n=0;for(let o=0;o<a.length&&n<r.length;o++)a[o]===r[n]&&n++;return n===r.length}function ES(e,t,r){return useMemo(()=>t.trim()?e.filter(a=>r.some(n=>{let o=a[n];return o==null?false:zg(t,String(o))})):e,[e,t,r])}function HS(e,t){let r=useCallback(()=>{if(typeof window>"u")return t;try{let s=window.sessionStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return console.warn(`Error reading sessionStorage key "${e}":`,s),t}},[t,e]),[a,n]=useState(r),o=useCallback(s=>{try{let l=s instanceof Function?s(a):s;n(l),typeof window<"u"&&window.sessionStorage.setItem(e,JSON.stringify(l));}catch(l){console.warn(`Error setting sessionStorage key "${e}":`,l);}},[e,a]);return useEffect(()=>{n(r());},[r]),[a,o]}function BS(e,t={}){let{stiffness:r=.15,damping:a=.8,mass:n=1,precision:o=.01}=t,[s,l]=useState(e),c=useRef(0),d=useRef(e),m=useRef();return useEffect(()=>{let u=()=>{let p=e-d.current,h=p*r/n;if(c.current=(c.current+h)*a,d.current+=c.current,Math.abs(p)<o&&Math.abs(c.current)<o){d.current=e,l(e),m.current=void 0;return}l(d.current),m.current=requestAnimationFrame(u);};return m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(u),()=>{m.current&&cancelAnimationFrame(m.current);}},[e,r,a,n,o]),s}function OS(e,t=100,r=0){return r+e*t}function zS(e,t=100){return Array.from({length:e},(r,a)=>a*t)}var ni="01XYZ#%&@$+-/<>!_";function FS(e,t=800,r=true){let[a,n]=useState(e),o=useRef();return useEffect(()=>{if(!r){n(e);return}let s=Date.now(),l=()=>{let c=Date.now()-s,d=Math.min(c/t,1),m=e.split("").map((u,p)=>u===" "?" ":d>p/e.length?u:ni[Math.floor(Math.random()*ni.length)]).join("");n(m),d<1&&(o.current=requestAnimationFrame(l));};return o.current=requestAnimationFrame(l),()=>{o.current&&cancelAnimationFrame(o.current);}},[e,t,r]),a}function YS(e,t){let[r,a]=useState(e),n=useRef(Date.now());return useEffect(()=>{let o=setTimeout(()=>{Date.now()-n.current>=t&&(a(e),n.current=Date.now());},t-(Date.now()-n.current));return ()=>{clearTimeout(o);}},[e,t]),r}function qS(e=0){let[t,r]=useState(e),[a,n]=useState(false),o=useRef(null),s=useCallback(()=>{a||(n(true),o.current=setInterval(()=>{r(m=>m+1);},1e3));},[a]),l=useCallback(()=>{a&&o.current&&(clearInterval(o.current),n(false));},[a]),c=useCallback(()=>{o.current&&clearInterval(o.current),n(false),r(0);},[]);return useEffect(()=>()=>{o.current&&clearInterval(o.current);},[]),{seconds:t,isActive:a,start:s,pause:l,reset:c,formattedTime:(m=>{let u=Math.floor(m/3600),p=Math.floor(m%3600/60),b=m%60;return [u,p,b].map(h=>h<10?"0"+h:h).filter((h,x)=>h!=="00"||x>0).join(":")})(t)}}function JS(){let e=useContext(Ha);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function tD(e=false){let[t,r]=useState(e),a=useCallback(()=>{r(n=>!n);},[]);return [t,a,r]}function oD(e=3e3){let[t,r]=useState(false),a=useRef(null),n=useCallback(o=>{r(o),a.current&&clearTimeout(a.current),o&&(a.current=window.setTimeout(()=>{r(false);},e));},[e]);return useEffect(()=>()=>{a.current&&clearTimeout(a.current);},[]),{isTyping:t,setTyping:n}}function iD(){return {startTransition:t=>{if(!document.startViewTransition){t();return}document.startViewTransition(()=>{flushSync(()=>{t();});});}}}function dD({itemCount:e,itemHeight:t=50,overscan:r=5}){let [a,n]=useState(0),[o,s]=useState(0),l=useRef(null);useRef({});useLayoutEffect(()=>{if(l.current){let b=new ResizeObserver(h=>{for(let x of h)s(x.contentRect.height);});return b.observe(l.current),()=>b.disconnect()}},[]);let d=useCallback(b=>{n(b.currentTarget.scrollTop);},[]),{visibleItems:m,totalHeight:u,startIndex:p}=useMemo(()=>{let b=Math.max(0,Math.floor(a/t)-r),h=Math.min(e,Math.ceil((a+o)/t)+r),x=[];for(let g=b;g<h;g++)x.push({index:g,offsetTop:g*t});return {visibleItems:x,totalHeight:e*t,startIndex:b}},[a,o,e,t,r]);return {containerRef:l,visibleItems:m,totalHeight:u,startIndex:p,onScroll:d,scrollToIndex:b=>{l.current&&(l.current.scrollTop=b*t);}}}function uD(e,t={month:"short",day:"numeric",year:"numeric"}){let r=new Date(e);return new Intl.DateTimeFormat("en-US",t).format(r)}function pD(e){return new Intl.NumberFormat("en-US").format(e)}function fD(e,t="USD"){return new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e)}function bD(e,t){return e.length<=t?e:e.slice(0,t)+"..."}function hD(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}
70
+ export{Op as AIPromptInput,jp as AIResponse,Dy as Accordion,Ay as AccordionContent,Hy as AccordionItem,Iy as AccordionTrigger,Mc as Alert,L5 as AreaChart,_n as AssigneePicker,Is as AudioPlayer,V as Avatar,Np as Background,Be as Badge,N5 as BarChart,Uu as Breadcrumb,Gu as BreadcrumbEllipsis,Yu as BreadcrumbItem,_u as BreadcrumbLink,Wu as BreadcrumbList,Xu as BreadcrumbPage,qu as BreadcrumbSeparator,R as Button,Ur as Calendar,Di as Card,Bi as CardContent,Ai as CardDescription,Vi as CardFooter,Hi as CardHeader,Ii as CardTitle,f5 as ChartContainer,g5 as ChartGrid,x5 as ChartSkeleton,h5 as ChartTooltip,b5 as ChartXAxis,Z5 as ChartYAxis,fL as ChatBanner,JM as ChatHeader,X4 as ChatInput,HM as ChatLayout,oL as ChatProfile,_M as ChatSidebar,ka as Checkbox,Fn as Checklist,c5 as Collapse,fv as ColorPicker,Ln as ColumnLimit,Ma as Combobox,rx as ComboboxContent,tn as ComboboxEmpty,Zo as ComboboxInput,rn as ComboboxItem,en as ComboboxList,tx as ComboboxTrigger,Hn as Command,kN as CommandDialog,NN as CommandEmpty,Bn as CommandGroup,In as CommandInput,Vn as CommandItem,An as CommandList,TN as CommandShortcut,uR as ConfirmDialog,gp as Container,jy as DataTable,Nx as DatePicker,vL as DateSeparator,Vx as DateTimePicker,wR as Dialog,TR as DialogDescription,kR as DialogFooter,yR as DialogHeader,NR as DialogTitle,Tf as Divider,HR as Drawer,VR as DrawerDescription,AR as DrawerFooter,IR as DrawerHeader,BR as DrawerTitle,la as DropdownMenu,da as DropdownMenuContent,Se as DropdownMenuItem,Ns as DropdownMenuLabel,mo as DropdownMenuSeparator,ca as DropdownMenuTrigger,qn as DueDatePicker,qL as EmojiPicker,Dc as EmptyState,tc as FileDropzone,Xl as FormControl,ql as FormDescription,Yl as FormItem,_l as FormLabel,Gl as FormMessage,yi as GlowButton,yp as Grid,IL as GroupHeader,Xe as Heading,Qi as HeroText,$a as Image,eu as Kanban,eu as KanbanBoard,Dn as KanbanCalendarView,Wa as KanbanCard,Ya as KanbanColumn,zn as KanbanFilterBar,Rn as KanbanHeader,Gr as KanbanListView,F2 as KanbanQuickAdd,Jn as KanbanSwimlane,Sn as KanbanTableView,Qn as KanbanTaskModal,En as KanbanTimelineView,Mf as Kbd,U as Label,Yn as LabelPicker,Ji as LetterPullup,H5 as LineChart,Vs as LinkPreview,ay as Magnetic,WT as Marquee,KL as MentionList,zs as MessageBubble,I4 as MessageList,bP as MessageSearch,Mi as MetricCard,jr as Modal,GN as ModalDescription,Jr as ModalFooter,Qr as ModalHeader,$n as ModalTitle,vn as Motion,zw as MotionGroup,RC as Navbar,fc as NumberInput,dy as NumberTicker,lc as OTPInput,NL as OnlineIndicator,gy as PageLoader,yy as PageTransition,Qu as Pagination,Ju as PaginationContent,rp as PaginationEllipsis,Zu as PaginationItem,uo as PaginationLink,tp as PaginationNext,ep as PaginationPrevious,jw as Parallax,Il as PasswordInput,K5 as PieChart,qe as Popover,je as PopoverContent,Ge as PopoverTrigger,gi as PrimaryButton,Pc as Progress,Y5 as RadarChart,Ul as RadioGroup,Wl as RadioGroupItem,Oc as Rating,Bs as ReadReceipt,cL as ReplyPreview,Ko as Reveal,Me as ScrollArea,NP as ScrollProgress,Or as Select,Nr as Separator,_i as ShinyText,pC as Sidebar,gC as SidebarContent,bC as SidebarFooter,xC as SidebarGroup,fC as SidebarHeader,hC as SidebarItem,hn as Skeleton,GC as SkipToContent,lx as Slider,G5 as Sparkline,gM as Spotlight,xp as Stack,fu as StatusDot,oR as Stepper,eT as SubtaskList,Q as Surface,Na as Switch,ML as SystemMessage,ur as Table,fr as TableBody,$e as TableCell,Qe as TableHead,pr as TableHeader,tt as TableRow,nC as Tabs,lC as TabsContent,sC as TabsList,iC as TabsTrigger,cv as TagInput,nT as TaskActivity,Wn as TaskAttachments,Un as TaskComments,cu as Terminal,KT as TerminalLine,ge as Text,Ui as TextGradient,pt as TextInput,Ww as TextMotion,lr as Textarea,BP as ThemeProvider,FP as ThemeToggle,jn as TimeTracker,fk as Timeline,Cd as TimelineItem,gn as Toast,Ha as ToastContext,nw as ToastProvider,vc as ToggleGroup,YR as Tooltip,yk as Tree,Ds as TypingIndicator,$C as UserMenu,yd as UserPreview,iP as VoiceRecorder,i as cn,fD as formatCurrency,uD as formatDate,pD as formatNumber,Ut as normalize,hD as slugify,bD as truncate,Kf as useAsync,gS as useBreakpoint,ke as useChart,GP as useChat,ZP as useChatMessages,rE as useChatSearch,nE as useClickOutside,lE as useClipboard,bS as useContainerQuery,mE as useDebounce,fE as useDrag,hE as useElementScroll,_P as useFetch,wE as useFlip,Dt as useFloating,NE as useForm,ME as useHistory,EE as useIdle,ze as useInView,HE as useInfiniteScroll,VE as useIntersection,KE as useKanban,ts as useKanbanFilters,j2 as useKanbanHistory,as as useKanbanKeyboard,X2 as useKanbanSync,rs as useKanbanUndo,UE as useKeyboardShortcuts,QE as useLocalStorage,Eg as useMediaQuery,eS as useMousePosition,_E as useOnMount,XE as useOnUnmount,aS as useOrientation,sS as usePrevious,cS as useReadReceipts,uS as useReducedMotion,_s as useScroll,vS as useScrollDirection,kS as useScrollLock,TS as useScrollTransform,MS as useScrollVelocity,ES as useSearch,zS as useSequence,HS as useSessionStorage,BS as useSpring,OS as useStagger,FS as useTextScramble,Gs as useTheme,YS as useThrottle,qS as useTimer,JS as useToast,tD as useToggle,oD as useTypingIndicator,iD as useViewTransition,dD as useVirtualList,Ys as useVoiceRecorder};//# sourceMappingURL=index.mjs.map
70
71
  //# sourceMappingURL=index.mjs.map