@craftzbay/ui 0.2.2 → 0.2.3
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-lib/components/ui/Avatar.d.ts +2 -2
- package/dist-lib/components/ui/Sidebar.d.ts +7 -0
- package/dist-lib/index.cjs +3 -3
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +1110 -1090
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist-lib/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ia=require("clsx"),la=require("tailwind-merge"),l=require("react"),p=require("lucide-react"),e=require("react/jsx-runtime"),ca=require("@radix-ui/react-accordion"),ke=require("class-variance-authority"),da=require("@radix-ui/react-avatar"),xr=require("@radix-ui/react-slot"),ua=require("@radix-ui/react-checkbox"),fa=require("@radix-ui/react-popover"),de=require("cmdk"),ma=require("@radix-ui/react-dialog"),xa=require("@radix-ui/react-context-menu"),ga=require("@radix-ui/react-dropdown-menu"),yn=require("react-day-picker"),pa=require("@radix-ui/react-label"),Nn=require("react-hook-form"),ha=require("@radix-ui/react-select"),ba=require("@radix-ui/react-progress"),va=require("@radix-ui/react-radio-group"),ja=require("@radix-ui/react-scroll-area"),wa=require("@radix-ui/react-separator"),ya=require("@radix-ui/react-slider"),Na=require("@radix-ui/react-switch"),Ca=require("@radix-ui/react-tabs"),Sa=require("@radix-ui/react-toast"),ka=require("@radix-ui/react-tooltip");function ae(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>n[r]})}}return t.default=n,Object.freeze(t)}const Ta=ae(l),yt=ae(ca),fn=ae(da),Zn=ae(ua),Z=ae(fa),H=ae(ma),fe=ae(xa),me=ae(ga),Da=ae(pa),ue=ae(ha),er=ae(ba),hn=ae(va),ht=ae(ja),Ra=ae(wa),Lt=ae(ya),tr=ae(Na),Vt=ae(Ca),st=ae(Sa),Nt=ae(ka);function m(...n){return la.twMerge(ia.clsx(n))}let nr=0;function Ia(n="ds"){return nr+=1,`${n}-${nr}`}function gr(n){const[t,r]=l.useState(()=>typeof window>"u"?!1:window.matchMedia(n).matches);return l.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia(n),a=o=>r(o.matches);return r(s.matches),s.addEventListener("change",a),()=>s.removeEventListener("change",a)},[n]),t}function Pa(){return gr("(prefers-reduced-motion: reduce)")}const Je={toasts:[],listeners:new Set,emit(){for(const n of this.listeners)n(this.toasts)},push(n){const t=n.id??`t_${Date.now()}_${Math.random().toString(36).slice(2,7)}`,r={open:!0,duration:5e3,variant:"default",...n,id:t};return this.toasts=[r,...this.toasts].slice(0,3),this.emit(),t},dismiss(n){this.toasts=this.toasts.map(t=>t.id===n?{...t,open:!1}:t),this.emit()},remove(n){this.toasts=this.toasts.filter(t=>t.id!==n),this.emit()}};function Ma(){const[n,t]=l.useState(()=>[...Je.toasts]);l.useEffect(()=>{const o=i=>t([...i]);return Je.listeners.add(o),()=>{Je.listeners.delete(o)}},[]);const r=l.useCallback(o=>Je.push(o),[]),s=l.useCallback(o=>Je.dismiss(o),[]),a=l.useCallback(o=>Je.remove(o),[]);return{toasts:n,push:r,dismiss:s,remove:a}}const za=n=>Je.push(n),Ea=Object.freeze(Object.defineProperty({__proto__:null,AlertCircle:p.AlertCircle,AlertTriangle:p.AlertTriangle,ArrowDown:p.ArrowDown,ArrowLeft:p.ArrowLeft,ArrowRight:p.ArrowRight,ArrowUp:p.ArrowUp,ArrowUpDown:p.ArrowUpDown,BarChart3:p.BarChart3,Bell:p.Bell,Bookmark:p.Bookmark,Calendar:p.Calendar,Check:p.Check,CheckCircle2:p.CheckCircle2,ChevronDown:p.ChevronDown,ChevronLeft:p.ChevronLeft,ChevronRight:p.ChevronRight,ChevronUp:p.ChevronUp,ChevronsLeft:p.ChevronsLeft,ChevronsRight:p.ChevronsRight,ChevronsUpDown:p.ChevronsUpDown,Circle:p.Circle,Copy:p.Copy,CornerDownLeft:p.CornerDownLeft,CreditCard:p.CreditCard,Download:p.Download,Edit2:p.Edit2,Ellipsis:p.Ellipsis,ExternalLink:p.ExternalLink,Eye:p.Eye,EyeOff:p.EyeOff,Filter:p.Filter,Folder:p.Folder,GripVertical:p.GripVertical,HelpCircle:p.HelpCircle,Home:p.Home,Inbox:p.Inbox,Info:p.Info,LayoutGrid:p.LayoutGrid,Link2:p.Link2,Loader2:p.Loader2,Lock:p.Lock,LogOut:p.LogOut,Mail:p.Mail,Menu:p.Menu,Minus:p.Minus,Moon:p.Moon,MoreHorizontal:p.MoreHorizontal,Plug:p.Plug,Plus:p.Plus,Search:p.Search,Settings:p.Settings,Sparkles:p.Sparkles,Sun:p.Sun,Trash2:p.Trash2,Upload:p.Upload,User:p.User,Users:p.Users,X:p.X,XCircle:p.XCircle},Symbol.toStringTag,{value:"Module"})),Aa=yt.Root,pr=l.forwardRef(function({className:t,...r},s){return e.jsx(yt.Item,{ref:s,className:m("border-b border-border",t),...r})});pr.displayName="AccordionItem";const hr=l.forwardRef(function({className:t,children:r,...s},a){return e.jsx(yt.Header,{className:"flex",children:e.jsxs(yt.Trigger,{ref:a,className:m("flex flex-1 items-center justify-between gap-2 py-4 text-left text-sm font-medium text-foreground","outline-none transition-colors duration-[var(--duration-fast)]","hover:text-accent","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","[&[data-state=open]>svg]:rotate-180",t),...s,children:[r,e.jsx(p.ChevronDown,{className:"size-4 shrink-0 text-foreground-subtle transition-transform duration-[var(--duration-base)]","aria-hidden":!0})]})})});hr.displayName="AccordionTrigger";const br=l.forwardRef(function({className:t,children:r,...s},a){return e.jsx(yt.Content,{ref:a,className:m("overflow-hidden text-sm text-foreground-muted","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"),...s,children:e.jsx("div",{className:m("pb-4 pt-0",t),children:r})})});br.displayName="AccordionContent";const La=ke.cva(["relative flex w-full gap-3 rounded-lg border p-4","text-sm"],{variants:{variant:{default:"border-border bg-background-subtle text-foreground",info:"border-info-border-soft bg-info-soft text-info-text",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text"}},defaultVariants:{variant:"default"}}),Oa={default:null,info:e.jsx(p.Info,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),success:e.jsx(p.CheckCircle2,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(p.AlertTriangle,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(p.XCircle,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0})},Tt=l.forwardRef(function({className:t,variant:r="default",title:s,dismissible:a,onDismiss:o,icon:i,children:d,...u},c){const[g,x]=l.useState(!0);if(!g)return null;const f=()=>{x(!1),o==null||o()},b=i===!1?null:i??Oa[r??"default"];return e.jsxs("div",{ref:c,role:"alert",className:m(La({variant:r}),t),...u,children:[b,e.jsxs("div",{className:"flex-1 min-w-0",children:[s&&e.jsx("h5",{className:"font-medium leading-tight mb-1",children:s}),e.jsx("div",{className:"text-sm leading-relaxed [&_p]:leading-relaxed",children:d})]}),a&&e.jsx("button",{type:"button","aria-label":"Dismiss",onClick:f,className:m("inline-flex size-6 shrink-0 items-center justify-center rounded-md","hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:e.jsx(p.X,{className:"size-3.5","aria-hidden":!0})})]})});Tt.displayName="Alert";const vr={xs:"size-5 text-[10px]",sm:"size-6 text-xs",md:"size-8 text-xs",lg:"size-10 text-sm",xl:"size-12 text-base"},Fa=ke.cva(["relative inline-flex shrink-0 overflow-hidden rounded-full","bg-background-muted text-foreground-muted"],{variants:{size:vr},defaultVariants:{size:"md"}}),_a={online:"bg-success",busy:"bg-danger",away:"bg-warning",offline:"bg-foreground-subtle"},Re=l.forwardRef(function({className:t,size:r,src:s,alt:a,fallback:o,status:i,...d},u){return e.jsxs(fn.Root,{ref:u,className:m(Fa({size:r}),t),...d,children:[s&&e.jsx(fn.Image,{src:s,alt:a??"",className:"aspect-square size-full object-cover"}),e.jsx(fn.Fallback,{delayMs:s?200:0,className:"flex size-full items-center justify-center bg-background-muted font-medium uppercase",children:o??"?"}),i&&e.jsx("span",{"aria-label":`Status: ${i}`,className:m("absolute bottom-0 right-0 block size-1/4 rounded-full ring-2 ring-background",_a[i])})]})});Re.displayName="Avatar";const jr=l.forwardRef(function({max:t=4,size:r="md",className:s,children:a,...o},i){const d=Array.isArray(a)?a:[a],u=d.slice(0,t),c=d.length-u.length;return e.jsxs("div",{ref:i,className:m("flex items-center -space-x-2",s),...o,children:[u.map((g,x)=>e.jsx("div",{className:"ring-2 ring-background rounded-full",children:g},x)),c>0&&e.jsxs("div",{className:m("inline-flex items-center justify-center rounded-full bg-background-muted text-foreground-muted ring-2 ring-background",vr[r],"font-medium"),"aria-label":`${c} more`,children:["+",c]})]})});jr.displayName="AvatarGroup";const Ba=ke.cva(["inline-flex items-center gap-1 rounded-full px-2 py-0.5","text-xs font-medium whitespace-nowrap"],{variants:{variant:{subtle:"",outline:"border bg-transparent"},tone:{neutral:"",accent:"",success:"",warning:"",danger:"",info:""}},compoundVariants:[{variant:"subtle",tone:"neutral",class:"bg-background-muted text-foreground-muted"},{variant:"subtle",tone:"accent",class:"bg-accent-soft text-on-accent-soft"},{variant:"subtle",tone:"success",class:"bg-success-soft text-success-text"},{variant:"subtle",tone:"warning",class:"bg-warning-soft text-warning-text"},{variant:"subtle",tone:"danger",class:"bg-danger-soft text-danger-text"},{variant:"subtle",tone:"info",class:"bg-info-soft text-info-text"},{variant:"outline",tone:"neutral",class:"border-border text-foreground-muted"},{variant:"outline",tone:"accent",class:"border-accent text-accent"},{variant:"outline",tone:"success",class:"border-success-border-soft text-success-text"},{variant:"outline",tone:"warning",class:"border-warning-border-soft text-warning-text"},{variant:"outline",tone:"danger",class:"border-danger-border-soft text-danger-text"},{variant:"outline",tone:"info",class:"border-info-border-soft text-info-text"}],defaultVariants:{variant:"subtle",tone:"neutral"}}),$a={neutral:"bg-foreground-subtle",accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"},ve=l.forwardRef(function({className:t,variant:r,tone:s="neutral",dot:a,children:o,...i},d){return e.jsxs("span",{ref:d,className:m(Ba({variant:r,tone:s}),t),...i,children:[a&&e.jsx("span",{"aria-hidden":!0,className:m("inline-block size-1.5 rounded-full",$a[s??"neutral"])}),o]})});ve.displayName="Badge";const Cn=l.forwardRef(function({items:t,maxItems:r=4,renderLink:s,className:a,...o},i){const u=t.length>r?[t[0],{collapsed:!0},...t.slice(-2)]:t;return e.jsx("nav",{ref:i,"aria-label":"Breadcrumb",className:m("text-sm",a),...o,children:e.jsx("ol",{className:"flex flex-wrap items-center gap-1.5 text-foreground-subtle",children:u.map((c,g)=>{const x=g===u.length-1;if("collapsed"in c)return e.jsxs("li",{className:"flex items-center gap-1.5",children:[e.jsx(p.MoreHorizontal,{className:"size-4","aria-hidden":!0}),e.jsx(p.ChevronRight,{className:"size-3.5","aria-hidden":!0})]},`ellipsis-${g}`);const f=c,b=x?e.jsx("span",{"aria-current":"page",className:"font-medium text-foreground",children:f.label}):f.href?s?s(f.href,f.label):e.jsx("a",{href:f.href,className:"hover:text-foreground transition-colors duration-[var(--duration-fast)] outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",children:f.label}):e.jsx("span",{children:f.label});return e.jsxs("li",{className:"flex items-center gap-1.5",children:[b,!x&&e.jsx(p.ChevronRight,{className:"size-3.5","aria-hidden":!0})]},g)})})})});Cn.displayName="Breadcrumbs";const Ha=ke.cva(["inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-md text-sm font-medium","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{variant:{primary:["bg-accent text-on-accent","hover:bg-accent-700","active:bg-accent-800"],secondary:["bg-background-muted text-foreground border border-border","hover:bg-neutral-200 dark:hover:bg-neutral-800","active:bg-neutral-300 dark:active:bg-neutral-700"],outline:["border border-border bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],ghost:["bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],destructive:["bg-danger text-on-danger","hover:bg-danger-700","active:bg-danger-800"],link:["bg-transparent text-accent underline-offset-4 px-0","hover:underline","active:text-accent-700"]},size:{sm:"h-8 px-3 text-xs [&_svg]:size-4",md:"h-9 px-3.5 text-sm [&_svg]:size-4",lg:"h-10 px-4 text-sm [&_svg]:size-5",icon:"h-9 w-9 [&_svg]:size-4"}},compoundVariants:[{variant:"link",size:"sm",class:"h-auto px-0"},{variant:"link",size:"md",class:"h-auto px-0"},{variant:"link",size:"lg",class:"h-auto px-0"}],defaultVariants:{variant:"primary",size:"md"}}),q=l.forwardRef(function({className:t,variant:r,size:s,asChild:a=!1,loading:o=!1,leadingIcon:i,trailingIcon:d,disabled:u,children:c,type:g="button",...x},f){const b=u||o,h=m(Ha({variant:r,size:s}),t);return a?e.jsx(xr.Slot,{ref:f,"aria-busy":o||void 0,"data-loading":o||void 0,className:h,...x,children:c}):e.jsxs("button",{ref:f,type:g,"aria-busy":o||void 0,disabled:b,"data-loading":o||void 0,className:h,...x,children:[o?e.jsx(p.Loader2,{className:"animate-spin","aria-hidden":"true"}):i,c,!o&&d]})});q.displayName="Button";const Ua=ke.cva(["rounded-lg border bg-card text-card-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]"],{variants:{variant:{default:"border-border",interactive:"border-border hover:border-border-strong hover:bg-background-subtle cursor-pointer"},padding:{none:"",sm:"p-4",md:"p-5",lg:"p-6"}},defaultVariants:{variant:"default",padding:"md"}}),xe=l.forwardRef(function({className:t,variant:r,padding:s,...a},o){return e.jsx("div",{ref:o,className:m(Ua({variant:r,padding:s}),t),...a})});xe.displayName="Card";const he=l.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:m("flex flex-col gap-1 pb-4",t),...r})});he.displayName="CardHeader";const Se=l.forwardRef(function({className:t,...r},s){return e.jsx("h3",{ref:s,className:m("text-base font-semibold text-foreground leading-tight",t),...r})});Se.displayName="CardTitle";const Ae=l.forwardRef(function({className:t,...r},s){return e.jsx("p",{ref:s,className:m("text-sm text-foreground-muted",t),...r})});Ae.displayName="CardDescription";const be=l.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:m("text-sm text-foreground",t),...r})});be.displayName="CardContent";const wr=l.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:m("flex items-center gap-2 pt-4",t),...r})});wr.displayName="CardFooter";const bt=l.forwardRef(function({className:t,label:r,description:s,error:a,hideLabel:o,id:i,disabled:d,...u},c){const g=l.useId(),x=i??g,f=s?`${x}-desc`:void 0,b=a?`${x}-error`:void 0;return e.jsxs("div",{className:m("flex flex-col gap-1",t),children:[e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx(Zn.Root,{ref:c,id:x,disabled:d,"aria-describedby":b??f,"aria-invalid":!!a||void 0,className:m("peer mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-sm border","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-on-accent","data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-on-accent","disabled:cursor-not-allowed disabled:opacity-50",a?"border-danger":"border-border-strong"),...u,children:e.jsx(Zn.Indicator,{className:"flex items-center justify-center",children:u.checked==="indeterminate"?e.jsx(p.Minus,{className:"size-3","aria-hidden":!0,strokeWidth:3}):e.jsx(p.Check,{className:"size-3","aria-hidden":!0,strokeWidth:3})})}),r&&e.jsxs("div",{className:m("flex flex-col gap-0.5",o&&"sr-only"),children:[e.jsx("label",{htmlFor:x,className:m("text-sm text-foreground select-none",d&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:f,className:"text-xs text-foreground-subtle",children:s})]})]}),a&&e.jsx("p",{id:b,role:"alert",className:"text-xs text-danger-text",children:a})]})});bt.displayName="Checkbox";const yr=l.forwardRef(function({value:t,onChange:r,options:s,loadOptions:a,label:o,helperText:i,error:d,placeholder:u="Select…",searchPlaceholder:c="Search…",emptyText:g="No results.",clearable:x=!0,disabled:f,size:b="md",className:h},v){const w=l.useId(),j=`${w}-helper`,N=`${w}-error`,[S,y]=l.useState(!1),[k,D]=l.useState(""),[C,T]=l.useState([]),[R,L]=l.useState(!1),E=a?C:s??[];l.useEffect(()=>{if(!a||!S)return;let O=!1;return L(!0),a(k).then(K=>{O||T(K)}).finally(()=>{O||L(!1)}),()=>{O=!0}},[k,S,a]);const F=l.useMemo(()=>E.find(O=>O.value===t)??null,[E,t]),I=b==="sm"?"h-8":b==="lg"?"h-10":"h-9",M=b==="sm"?"px-2.5":b==="lg"?"px-3.5":"px-3",_=l.useCallback(O=>{O.stopPropagation(),r(null)},[r]),W=!!d;return e.jsxs("div",{ref:v,className:m("flex flex-col gap-1.5",h),children:[o&&e.jsx("label",{htmlFor:w,className:"text-sm font-medium text-foreground",children:o}),e.jsxs(Z.Root,{open:S,onOpenChange:y,children:[e.jsx(Z.Trigger,{asChild:!0,children:e.jsxs("button",{id:w,type:"button",role:"combobox","aria-expanded":S,"aria-invalid":W||void 0,"aria-describedby":W?N:i?j:void 0,disabled:f,className:m("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",I,M,W?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring"),children:[e.jsx("span",{className:m("truncate",!F&&"text-foreground-subtle"),children:F?F.label:u}),e.jsxs("span",{className:"ml-2 flex items-center gap-1 shrink-0",children:[x&&F&&!f&&e.jsx("span",{role:"button",tabIndex:-1,onClick:_,"aria-label":"Clear selection",className:"text-foreground-subtle hover:text-foreground",children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})}),e.jsx(p.ChevronsUpDown,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(Z.Portal,{children:e.jsx(Z.Content,{align:"start",sideOffset:4,className:m("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:e.jsxs(de.Command,{shouldFilter:!a,className:"flex h-full w-full flex-col",children:[e.jsxs("div",{className:"flex items-center border-b border-border px-3",children:[e.jsx(de.Command.Input,{value:k,onValueChange:D,placeholder:c,className:"flex h-9 w-full bg-transparent py-2 text-sm outline-none placeholder:text-foreground-subtle"}),R&&e.jsx(p.Loader2,{className:"size-4 animate-spin text-foreground-subtle","aria-hidden":!0})]}),e.jsxs(de.Command.List,{className:"max-h-64 overflow-y-auto p-1",children:[E.map(O=>{const K=O.value===t;return e.jsxs(de.Command.Item,{value:O.value,disabled:O.disabled,onSelect:ee=>{r(ee),y(!1)},className:m("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{className:"flex-1",children:O.label}),O.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:O.description}),K&&e.jsx(p.Check,{className:"size-4 text-accent","aria-hidden":!0})]},O.value)}),!R&&E.length===0&&e.jsx(de.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:g})]})]})})})]}),d?e.jsx("p",{id:N,role:"alert",className:"text-xs text-danger-text",children:d}):i?e.jsx("p",{id:j,className:"text-xs text-foreground-subtle",children:i}):null]})});yr.displayName="Combobox";const Nr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command,{ref:s,className:m("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground",t),...r})});Nr.displayName="Command";const Cr=l.forwardRef(function({className:t,...r},s){return e.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3","cmdk-input-wrapper":"",children:[e.jsx(p.Search,{className:"size-4 shrink-0 text-foreground-subtle","aria-hidden":!0}),e.jsx(de.Command.Input,{ref:s,className:m("flex h-11 w-full bg-transparent py-3 text-sm outline-none","placeholder:text-foreground-subtle disabled:cursor-not-allowed disabled:opacity-50",t),...r})]})});Cr.displayName="CommandInput";const Sr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command.List,{ref:s,className:m("max-h-[320px] overflow-y-auto p-1",t),...r})});Sr.displayName="CommandList";const kr=l.forwardRef(function(t,r){return e.jsx(de.Command.Empty,{ref:r,className:"py-8 text-center text-sm text-foreground-subtle",...t})});kr.displayName="CommandEmpty";const Tr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command.Group,{ref:s,className:m("overflow-hidden text-foreground p-1","[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5","[&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium","[&_[cmdk-group-heading]]:text-foreground-subtle",t),...r})});Tr.displayName="CommandGroup";const Dr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command.Separator,{ref:s,className:m("-mx-1 my-1 h-px bg-border",t),...r})});Dr.displayName="CommandSeparator";const Rr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command.Item,{ref:s,className:m("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[selected=true]:bg-background-muted data-[selected=true]:text-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","[&_svg]:size-4 [&_svg]:text-foreground-subtle",t),...r})});Rr.displayName="CommandItem";function Va({children:n,className:t}){return e.jsx("span",{className:m("ml-auto inline-flex items-center gap-0.5 text-xs tracking-widest text-foreground-subtle font-mono",t),children:n})}function Ga({open:n,onOpenChange:t,children:r,title:s="Command palette"}){return e.jsx(H.Root,{open:n,onOpenChange:t,children:e.jsxs(H.Portal,{children:[e.jsx(H.Overlay,{className:m("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0")}),e.jsxs(H.Content,{className:m("fixed left-1/2 top-[20%] z-[var(--z-modal)] -translate-x-1/2","w-[calc(100%-2rem)] max-w-[640px] overflow-hidden","rounded-lg border border-border bg-popover text-popover-foreground shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0","data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95"),children:[e.jsx(H.Title,{className:"sr-only",children:s}),r]})]})})}function qa(n){const[t,r]=l.useState(0);l.useEffect(()=>{const s=a=>{a.key==="k"&&(a.metaKey||a.ctrlKey)&&(a.preventDefault(),n(!0),r(o=>o+1))};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[n])}const Wa=fe.Root,Xa=fe.Trigger,Ka=fe.Group,Ir=fe.Portal,Ya=fe.Sub,Qa=fe.RadioGroup,Gt=m("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),Pr=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(fe.SubTrigger,{ref:a,className:m(Gt,"data-[state=open]:bg-background-muted",t),...s,children:[r,e.jsx(p.ChevronRight,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});Pr.displayName="ContextMenuSubTrigger";const Mr=l.forwardRef(function({className:t,...r},s){return e.jsx(fe.SubContent,{ref:s,className:m("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md",t),...r})});Mr.displayName="ContextMenuSubContent";const zr=l.forwardRef(function({className:t,...r},s){return e.jsx(Ir,{children:e.jsx(fe.Content,{ref:s,className:m("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r})})});zr.displayName="ContextMenuContent";const Er=l.forwardRef(function({className:t,destructive:r,...s},a){return e.jsx(fe.Item,{ref:a,className:m(Gt,r&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...s})});Er.displayName="ContextMenuItem";const Ar=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(fe.CheckboxItem,{ref:a,className:m(Gt,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(fe.ItemIndicator,{children:e.jsx(p.Check,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});Ar.displayName="ContextMenuCheckboxItem";const Lr=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(fe.RadioItem,{ref:a,className:m(Gt,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(fe.ItemIndicator,{children:e.jsx(p.Circle,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});Lr.displayName="ContextMenuRadioItem";const Or=l.forwardRef(function({className:t,...r},s){return e.jsx(fe.Label,{ref:s,className:m("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});Or.displayName="ContextMenuLabel";const Fr=l.forwardRef(function({className:t,...r},s){return e.jsx(fe.Separator,{ref:s,className:m("-mx-1 my-1 h-px bg-border",t),...r})});Fr.displayName="ContextMenuSeparator";function _r({className:n,...t}){return e.jsx("span",{className:m("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",n),...t})}_r.displayName="ContextMenuShortcut";const qt=me.Root,Wt=me.Trigger,Ja=me.Group,Br=me.Portal,Za=me.Sub,eo=me.RadioGroup,Xt=m("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-[var(--duration-fast)]"),$r=l.forwardRef(function({className:t,inset:r,children:s,...a},o){return e.jsxs(me.SubTrigger,{ref:o,className:m(Xt,"data-[state=open]:bg-background-muted",r&&"pl-8",t),...a,children:[s,e.jsx(p.ChevronRight,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});$r.displayName="DropdownMenuSubTrigger";const Hr=l.forwardRef(function({className:t,...r},s){return e.jsx(me.SubContent,{ref:s,className:m("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",t),...r})});Hr.displayName="DropdownMenuSubContent";const Dt=l.forwardRef(function({className:t,sideOffset:r=4,align:s="end",...a},o){return e.jsx(Br,{children:e.jsx(me.Content,{ref:o,sideOffset:r,align:s,className:m("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1",t),...a})})});Dt.displayName="DropdownMenuContent";const Ze=l.forwardRef(function({className:t,inset:r,destructive:s,...a},o){return e.jsx(me.Item,{ref:o,className:m(Xt,r&&"pl-8",s&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...a})});Ze.displayName="DropdownMenuItem";const Sn=l.forwardRef(function({className:t,children:r,checked:s,...a},o){return e.jsxs(me.CheckboxItem,{ref:o,checked:s,className:m(Xt,"pl-8",t),...a,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(me.ItemIndicator,{children:e.jsx(p.Check,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});Sn.displayName="DropdownMenuCheckboxItem";const Ur=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(me.RadioItem,{ref:a,className:m(Xt,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(me.ItemIndicator,{children:e.jsx(p.Circle,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});Ur.displayName="DropdownMenuRadioItem";const Kt=l.forwardRef(function({className:t,inset:r,...s},a){return e.jsx(me.Label,{ref:a,className:m("px-2 py-1.5 text-xs font-medium text-foreground-subtle",r&&"pl-8",t),...s})});Kt.displayName="DropdownMenuLabel";const ct=l.forwardRef(function({className:t,...r},s){return e.jsx(me.Separator,{ref:s,className:m("-mx-1 my-1 h-px bg-border",t),...r})});ct.displayName="DropdownMenuSeparator";function Vr({className:n,...t}){return e.jsx("span",{className:m("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",n),...t})}Vr.displayName="DropdownMenuShortcut";const to=ke.cva(["inline-flex items-center justify-center shrink-0","rounded-md","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none"],{variants:{variant:{primary:"bg-accent text-on-accent hover:bg-accent-700 active:bg-accent-800",secondary:"bg-background-muted text-foreground border border-border hover:bg-neutral-200 dark:hover:bg-neutral-800",outline:"border border-border bg-transparent text-foreground hover:bg-background-muted",ghost:"bg-transparent text-foreground-muted hover:bg-background-muted hover:text-foreground",destructive:"bg-danger text-on-danger hover:bg-danger-700 active:bg-danger-800"},size:{sm:"h-7 w-7 [&_svg]:size-3.5",md:"h-8 w-8 [&_svg]:size-4",lg:"h-10 w-10 [&_svg]:size-5"}},defaultVariants:{variant:"ghost",size:"md"}}),Rt=l.forwardRef(function({className:t,variant:r,size:s,icon:a,loading:o,disabled:i,type:d="button",...u},c){const g=i||o;return e.jsx("button",{ref:c,type:d,"aria-busy":o||void 0,disabled:g,className:m(to({variant:r,size:s}),t),...u,children:o?e.jsx(p.Loader2,{className:"animate-spin","aria-hidden":"true"}):a})});Rt.displayName="IconButton";const no=ke.cva(["group inline-flex items-center w-full","rounded-md border bg-card text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","has-disabled:opacity-50 has-disabled:pointer-events-none","focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-background"],{variants:{size:{sm:"h-8 px-2.5 gap-1.5",md:"h-9 px-3 gap-2",lg:"h-10 px-3.5 gap-2"},tone:{default:"border-border focus-within:border-accent focus-within:ring-ring",error:"border-danger focus-within:border-danger focus-within:ring-danger"}},defaultVariants:{size:"md",tone:"default"}}),ro=ke.cva(["flex-1 min-w-0 bg-transparent outline-none","placeholder:text-foreground-subtle","text-foreground","disabled:cursor-not-allowed"]),se=l.forwardRef(function({className:t,type:r="text",size:s,tone:a,label:o,helperText:i,error:d,prefix:u,suffix:c,clearable:g,onClear:x,hideLabel:f,id:b,disabled:h,value:v,...w},j){const N=l.useId(),S=b??N,y=`${S}-helper`,k=`${S}-error`,[D,C]=l.useState(!1),T=r==="password"?D?"text":"password":r,R=!!d,L=R?"error":a,E=u??(r==="search"?e.jsx(p.Search,{className:"size-4 text-foreground-subtle","aria-hidden":!0}):null),F=v!==void 0&&v!==""&&v!==null;return e.jsxs("div",{className:m("flex flex-col gap-1.5",t),children:[o&&e.jsx("label",{htmlFor:S,className:m("text-sm font-medium text-foreground",f&&"sr-only"),children:o}),e.jsxs("div",{className:m(no({size:s,tone:L})),children:[E&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:E}),e.jsx("input",{ref:j,id:S,type:T,disabled:h,value:v,"aria-invalid":R||void 0,"aria-describedby":d?k:i?y:void 0,className:m(ro()),...w}),g&&F&&e.jsx("button",{type:"button",onClick:x,tabIndex:-1,"aria-label":"Clear input",className:"flex items-center text-foreground-subtle hover:text-foreground",children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})}),r==="password"&&e.jsx("button",{type:"button",onClick:()=>C(I=>!I),tabIndex:-1,"aria-label":D?"Hide password":"Show password","aria-pressed":D,className:"flex items-center text-foreground-subtle hover:text-foreground",children:D?e.jsx(p.EyeOff,{className:"size-4","aria-hidden":!0}):e.jsx(p.Eye,{className:"size-4","aria-hidden":!0})}),c&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:c})]}),d?e.jsx("p",{id:k,role:"alert",className:"text-xs text-danger-text",children:d}):i?e.jsx("p",{id:y,className:"text-xs text-foreground-subtle",children:i}):null]})});se.displayName="Input";const Yt=l.forwardRef(function({className:t,...r},s){return e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:s,className:m("w-full caption-bottom text-sm border-collapse",t),...r})})});Yt.displayName="Table";const Qt=l.forwardRef(function({className:t,...r},s){return e.jsx("thead",{ref:s,className:m("sticky top-0 z-10 bg-background-subtle text-foreground-muted","[&_tr]:border-b [&_tr]:border-border",t),...r})});Qt.displayName="TableHeader";const Jt=l.forwardRef(function({className:t,...r},s){return e.jsx("tbody",{ref:s,className:m("[&_tr:last-child]:border-0",t),...r})});Jt.displayName="TableBody";const Gr=l.forwardRef(function({className:t,...r},s){return e.jsx("tfoot",{ref:s,className:m("border-t border-border bg-background-subtle font-medium",t),...r})});Gr.displayName="TableFooter";const qe=l.forwardRef(function({className:t,selected:r,...s},a){return e.jsx("tr",{ref:a,"data-selected":r||void 0,className:m("border-b border-border transition-colors duration-[var(--duration-fast)]","hover:bg-background-subtle","data-[selected]:bg-accent-soft data-[selected]:hover:bg-accent-soft",t),...s})});qe.displayName="TableRow";const We=l.forwardRef(function({className:t,...r},s){return e.jsx("th",{ref:s,className:m("h-10 px-3 text-left align-middle text-xs font-medium uppercase tracking-wide text-foreground-subtle","[&:has([role=checkbox])]:w-10 [&:has([role=checkbox])]:pr-0",t),...r})});We.displayName="TableHead";const Ue=l.forwardRef(function({className:t,...r},s){return e.jsx("td",{ref:s,className:m("px-3 py-3 align-middle text-foreground",t),...r})});Ue.displayName="TableCell";const qr=l.forwardRef(function({className:t,...r},s){return e.jsx("caption",{ref:s,className:m("mt-4 text-sm text-foreground-subtle",t),...r})});qr.displayName="TableCaption";const kn=l.forwardRef(function({sortKey:t,currentSort:r,onSortChange:s,children:a,className:o,...i},d){const u=(r==null?void 0:r.key)===t,c=u?r==null?void 0:r.direction:void 0,g=()=>{s(t,u&&c==="asc"?"desc":"asc")};return e.jsx(We,{ref:d,className:m("p-0",o),"aria-sort":u?c==="asc"?"ascending":"descending":"none",...i,children:e.jsxs("button",{type:"button",onClick:g,className:m("inline-flex h-10 w-full items-center gap-1.5 px-3 outline-none","transition-colors duration-[var(--duration-fast)]","hover:text-foreground focus-visible:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-sm",u&&"text-foreground"),children:[a,c==="asc"?e.jsx(p.ArrowUp,{className:"size-3.5","aria-hidden":!0}):c==="desc"?e.jsx(p.ArrowDown,{className:"size-3.5","aria-hidden":!0}):e.jsx(p.ArrowUpDown,{className:"size-3.5 opacity-40","aria-hidden":!0})]})})});kn.displayName="TableSortHeader";const Tn=l.forwardRef(function({className:t,variant:r,...s},a){return e.jsx("div",{ref:a,"aria-hidden":!0,className:m("animate-pulse bg-background-muted",r==="text"&&"h-3 rounded-sm",r==="circle"&&"rounded-full aspect-square",r==="avatar"&&"size-8 rounded-full",r==="card"&&"rounded-lg",!r&&"rounded-md",t),...s})});Tn.displayName="Skeleton";function Wr({columns:n,rows:t,loading:r,sort:s,onSortChange:a,filter:o,emptyState:i,className:d}){const[u,c]=l.useState({}),g=l.useMemo(()=>n.filter(f=>!u[f.key]),[n,u]),x=()=>r?Array.from({length:5}).map((f,b)=>e.jsx(qe,{children:g.map(h=>e.jsx(Ue,{children:e.jsx(Tn,{variant:"text",className:"w-3/4"})},h.key))},`skel-${b}`)):t.length===0?e.jsx(qe,{children:e.jsx(Ue,{colSpan:g.length,className:"h-32 text-center",children:i??e.jsx("span",{className:"text-foreground-subtle",children:"No results."})})}):t.map(f=>e.jsx(qe,{children:g.map(b=>e.jsx(Ue,{className:m(b.align==="right"&&"text-right tabular"),children:b.cell?b.cell(f):f[b.key]},b.key))},f.id));return e.jsxs("div",{className:m("flex flex-col gap-3",d),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o?e.jsx(se,{type:"search",placeholder:o.placeholder??"Filter…",value:o.value,onChange:f=>o.onChange(f.target.value),clearable:!0,onClear:()=>o.onChange(""),className:"max-w-sm w-full",hideLabel:!0,label:"Filter rows"}):e.jsx("div",{}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(qt,{children:[e.jsx(Wt,{asChild:!0,children:e.jsx(Rt,{"aria-label":"Column visibility",icon:e.jsx(p.Settings,{}),variant:"outline"})}),e.jsxs(Dt,{children:[e.jsx(Kt,{children:"Columns"}),e.jsx(ct,{}),n.map(f=>e.jsx(Sn,{checked:!u[f.key],onCheckedChange:b=>c(h=>({...h,[f.key]:!b})),children:f.header},f.key))]})]})})]}),e.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:e.jsxs(Yt,{children:[e.jsx("colgroup",{children:g.map(f=>e.jsx("col",{style:f.width?{width:f.width}:void 0},f.key))}),e.jsx(Qt,{children:e.jsx(qe,{children:g.map(f=>f.sortable&&a?e.jsx(kn,{sortKey:f.key,currentSort:s??null,onSortChange:(b,h)=>a({key:b,direction:h}),children:f.header},f.key):e.jsx(We,{className:m(f.align==="right"&&"text-right"),children:f.header},f.key))})}),e.jsx(Jt,{children:x()})]})})]})}const Xr={root:"p-3",month:"space-y-2",caption:"flex items-center justify-between px-1 pb-2",caption_label:"text-sm font-medium text-foreground",nav:"flex items-center gap-1",nav_button:"inline-flex size-7 items-center justify-center rounded-md text-foreground-muted hover:bg-background-muted hover:text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring",table:"w-full border-collapse",head_row:"flex",head_cell:"w-9 text-xs font-medium text-foreground-subtle",row:"flex w-full mt-1",cell:"relative size-9 p-0 text-center",day:"inline-flex size-9 items-center justify-center rounded-md text-sm text-foreground transition-colors outline-none hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring",day_selected:"bg-accent text-on-accent hover:bg-accent hover:text-on-accent",day_today:"font-semibold text-accent",day_outside:"text-foreground-subtle opacity-50",day_disabled:"text-foreground-subtle opacity-50 pointer-events-none",day_range_start:"rounded-l-md",day_range_end:"rounded-r-md",day_range_middle:"bg-accent-soft text-on-accent-soft rounded-none"},Kr={IconLeft:()=>e.jsx(p.ChevronLeft,{className:"size-4","aria-hidden":!0}),IconRight:()=>e.jsx(p.ChevronRight,{className:"size-4","aria-hidden":!0})};function Ht(n){return n?n.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):""}function Yr({label:n,placeholder:t,hasValue:r,children:s,error:a,fieldId:o,disabled:i}){return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[n&&e.jsx("label",{htmlFor:o,className:"text-sm font-medium text-foreground",children:n}),e.jsx(Z.Trigger,{asChild:!0,children:e.jsxs("button",{id:o,type:"button",disabled:i,"aria-invalid":!!a||void 0,className:m("inline-flex h-9 w-full items-center justify-start gap-2 rounded-md border bg-card px-3 text-left text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",a?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",!r&&"text-foreground-subtle"),children:[e.jsx(p.Calendar,{className:"size-4 text-foreground-subtle","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:r?s:t})]})}),a&&e.jsx("p",{role:"alert",className:"text-xs text-danger-text",children:a})]})}const Qr=l.forwardRef(function({value:t,onChange:r,label:s,placeholder:a="Pick a date",error:o,disabled:i,fromDate:d,toDate:u,className:c},g){const x=l.useId(),[f,b]=l.useState(!1);return e.jsx("div",{ref:g,className:m(c),children:e.jsxs(Z.Root,{open:f,onOpenChange:b,children:[e.jsx(Yr,{label:s,placeholder:a,hasValue:!!t,error:o,fieldId:x,disabled:i,children:Ht(t)}),e.jsx(Z.Portal,{children:e.jsx(Z.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg border border-border bg-popover text-popover-foreground shadow-md",children:e.jsx(yn.DayPicker,{mode:"single",selected:t,onSelect:h=>{r(h??void 0),h&&b(!1)},fromDate:d,toDate:u,classNames:Xr,components:Kr})})})]})})});Qr.displayName="DatePicker";const Jr=l.forwardRef(function({value:t,onChange:r,label:s,placeholder:a="Pick a range",error:o,disabled:i,fromDate:d,toDate:u,className:c},g){const x=l.useId(),[f,b]=l.useState(!1),h=!!(t!=null&&t.from);return e.jsx("div",{ref:g,className:m(c),children:e.jsxs(Z.Root,{open:f,onOpenChange:b,children:[e.jsx(Yr,{label:s,placeholder:a,hasValue:h,error:o,fieldId:x,disabled:i,children:t!=null&&t.from&&t.to?`${Ht(t.from)} – ${Ht(t.to)}`:t!=null&&t.from?Ht(t.from):""}),e.jsx(Z.Portal,{children:e.jsx(Z.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg border border-border bg-popover text-popover-foreground shadow-md",children:e.jsx(yn.DayPicker,{mode:"range",selected:t,onSelect:r,numberOfMonths:2,fromDate:d,toDate:u,classNames:Xr,components:Kr})})})]})})});Jr.displayName="DateRangePicker";const Zr=H.Root,so=H.Trigger,es=H.Portal,ts=H.Close,Dn=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Overlay,{ref:s,className:m("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r})});Dn.displayName="DialogOverlay";const Rn=l.forwardRef(function({className:t,children:r,showClose:s=!0,size:a="md",...o},i){return e.jsxs(es,{children:[e.jsx(Dn,{}),e.jsxs(H.Content,{ref:i,className:m("fixed left-1/2 top-1/2 z-[var(--z-modal)] -translate-x-1/2 -translate-y-1/2","w-[calc(100%-2rem)] rounded-lg border border-border bg-card text-card-foreground shadow-lg","p-6","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",a==="sm"&&"max-w-[400px]",a==="md"&&"max-w-[520px]",a==="lg"&&"max-w-[720px]",t),...o,children:[r,s&&e.jsx(H.Close,{"aria-label":"Close",className:m("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})})]})]})});Rn.displayName="DialogContent";function In({className:n,...t}){return e.jsx("div",{className:m("flex flex-col gap-1 pb-4",n),...t})}In.displayName="DialogHeader";function Pn({className:n,...t}){return e.jsx("div",{className:m("flex flex-col-reverse gap-2 pt-6 sm:flex-row sm:justify-end",n),...t})}Pn.displayName="DialogFooter";const Mn=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Title,{ref:s,className:m("text-lg font-semibold text-foreground leading-tight",t),...r})});Mn.displayName="DialogTitle";const zn=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Description,{ref:s,className:m("text-sm text-foreground-muted",t),...r})});zn.displayName="DialogDescription";function ns({open:n,onOpenChange:t,title:r,description:s,confirmLabel:a="Confirm",cancelLabel:o="Cancel",confirmVariant:i="primary",onConfirm:d,loading:u}){return e.jsx(Zr,{open:n,onOpenChange:t,children:e.jsxs(Rn,{size:"sm",children:[e.jsxs(In,{children:[e.jsx(Mn,{children:r}),s&&e.jsx(zn,{children:s})]}),e.jsxs(Pn,{children:[e.jsx(ts,{asChild:!0,children:e.jsx(q,{variant:"outline",children:o})}),e.jsx(q,{variant:i,loading:u,onClick:d,children:a})]})]})})}ns.displayName="ConfirmationDialog";const Zt=l.forwardRef(function({icon:t,title:r,description:s,action:a,secondaryAction:o,className:i,...d},u){return e.jsxs("div",{ref:u,className:m("flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border bg-background-subtle p-10 text-center",i),...d,children:[t&&e.jsx("div",{className:"inline-flex size-12 items-center justify-center rounded-full bg-background-muted text-foreground-muted [&_svg]:size-6",children:t}),e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:r}),s&&e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:s}),(a||o)&&e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[a,o]})]})});Zt.displayName="EmptyState";const ao={404:{icon:e.jsx(p.AlertTriangle,{}),title:"Page not found",description:"We couldn't find what you were looking for."},500:{icon:e.jsx(p.XCircle,{}),title:"Something went wrong",description:"We're looking into it. Please try again in a moment."},generic:{icon:e.jsx(p.AlertTriangle,{}),title:"Unexpected error",description:"Something interrupted this action."}},rs=l.forwardRef(function({variant:t="generic",title:r,description:s,action:a,onRetry:o,className:i,...d},u){const c=ao[t];return e.jsxs("div",{ref:u,role:"alert",className:m("flex flex-col items-center justify-center gap-3 rounded-lg border border-border bg-background-subtle p-10 text-center",i),...d,children:[e.jsx("div",{className:"inline-flex size-12 items-center justify-center rounded-full bg-danger-soft text-danger-text [&_svg]:size-6",children:c.icon}),e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:r??c.title}),e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:s??c.description}),(a||o)&&e.jsx("div",{className:"mt-2 flex items-center gap-2",children:a??e.jsx(q,{onClick:o,variant:"outline",children:"Try again"})})]})});rs.displayName="ErrorState";const oo=Nn.FormProvider,ss=l.createContext(null);function io(n){return e.jsx(ss.Provider,{value:{name:n.name},children:e.jsx(Nn.Controller,{...n})})}const as=l.createContext(null);function It(){const n=l.useContext(ss),t=l.useContext(as),{getFieldState:r,formState:s}=Nn.useFormContext();if(!n)throw new Error("useFormField must be used inside <FormField>");const a=r(n.name,s),o=(t==null?void 0:t.id)??"";return{id:o,name:n.name,formItemId:`${o}-item`,formDescriptionId:`${o}-desc`,formMessageId:`${o}-error`,...a}}const os=l.forwardRef(function({className:t,...r},s){const a=l.useId();return e.jsx(as.Provider,{value:{id:a},children:e.jsx("div",{ref:s,className:m("flex flex-col gap-1.5",t),...r})})});os.displayName="FormItem";const is=l.forwardRef(function({className:t,...r},s){const{formItemId:a,error:o}=It();return e.jsx(Da.Root,{ref:s,htmlFor:a,className:m("text-sm font-medium text-foreground",o&&"text-danger-text",t),...r})});is.displayName="FormLabel";const ls=l.forwardRef(function(t,r){const{error:s,formItemId:a,formDescriptionId:o,formMessageId:i}=It();return e.jsx(xr.Slot,{ref:r,id:a,"aria-describedby":s?`${o} ${i}`:o,"aria-invalid":!!s,...t})});ls.displayName="FormControl";const cs=l.forwardRef(function({className:t,...r},s){const{formDescriptionId:a}=It();return e.jsx("p",{ref:s,id:a,className:m("text-xs text-foreground-subtle",t),...r})});cs.displayName="FormDescription";const ds=l.forwardRef(function({className:t,children:r,...s},a){const{error:o,formMessageId:i}=It(),d=o?String((o==null?void 0:o.message)??""):r;return d?e.jsx("p",{ref:a,id:i,role:"alert",className:m("text-xs text-danger-text",t),...s,children:d}):null});ds.displayName="FormError";const En=l.forwardRef(function({size:t="sm",className:r,...s},a){return e.jsx("kbd",{ref:a,className:m("inline-flex items-center justify-center rounded border border-border bg-background-subtle font-mono","text-foreground-muted shadow-xs",t==="sm"?"h-5 min-w-5 px-1 text-[10px]":"h-6 min-w-6 px-1.5 text-xs",r),...s})});En.displayName="Kbd";const us=l.forwardRef(function({options:t,value:r,onChange:s,label:a,helperText:o,error:i,placeholder:d="Select…",emptyText:u="No results.",maxVisibleChips:c=4,clearable:g=!0,disabled:x,className:f},b){const h=l.useId(),v=h,w=`${h}-helper`,j=`${h}-error`,[N,S]=l.useState(!1),[y,k]=l.useState(""),D=l.useRef(null),C=l.useMemo(()=>t.filter(M=>r.includes(M.value)),[t,r]),T=l.useCallback(M=>{r.includes(M)?s(r.filter(_=>_!==M)):s([...r,M])},[r,s]),R=l.useCallback(()=>s([]),[s]),L=M=>{M.key==="Backspace"&&y===""&&r.length>0&&s(r.slice(0,-1))},E=C.slice(0,c),F=C.length-E.length,I=!!i;return e.jsxs("div",{ref:b,className:m("flex flex-col gap-1.5",f),children:[a&&e.jsx("label",{htmlFor:v,className:"text-sm font-medium text-foreground",children:a}),e.jsxs(Z.Root,{open:N,onOpenChange:S,children:[e.jsx(Z.Trigger,{asChild:!0,children:e.jsxs("div",{role:"combobox","aria-expanded":N,"aria-controls":`${v}-list`,"aria-haspopup":"listbox",id:v,tabIndex:x?-1:0,onKeyDown:L,"aria-disabled":x||void 0,"aria-invalid":I||void 0,"aria-describedby":I?j:o?w:void 0,className:m("flex w-full min-h-9 cursor-text flex-wrap items-center gap-1.5 rounded-md border bg-card px-2 py-1 text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background",I?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",x&&"opacity-50 pointer-events-none"),onClick:()=>{var M;return(M=D.current)==null?void 0:M.focus()},children:[E.length===0&&e.jsx("span",{className:"text-foreground-subtle px-1",children:d}),E.map(M=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-accent-soft px-1.5 py-0.5 text-xs font-medium text-on-accent-soft",children:[M.label,e.jsx("button",{type:"button","aria-label":`Remove ${M.label}`,className:"inline-flex items-center text-on-accent-soft hover:text-foreground",onClick:_=>{_.stopPropagation(),T(M.value)},children:e.jsx(p.X,{className:"size-3","aria-hidden":!0})})]},M.value)),F>0&&e.jsxs("span",{className:"rounded-md bg-background-muted px-1.5 py-0.5 text-xs font-medium text-foreground-muted",children:["+",F," more"]}),e.jsx("input",{ref:D,value:y,onChange:M=>k(M.target.value),onFocus:()=>S(!0),className:"flex-1 min-w-[8ch] bg-transparent text-sm outline-none placeholder:text-foreground-subtle",placeholder:(C.length===0,""),disabled:x}),e.jsxs("span",{className:"ml-auto flex items-center gap-1",children:[g&&C.length>0&&e.jsx("button",{type:"button","aria-label":"Clear all",onClick:M=>{M.stopPropagation(),R()},className:"text-foreground-subtle hover:text-foreground",children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})}),e.jsx(p.ChevronsUpDown,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(Z.Portal,{children:e.jsx(Z.Content,{align:"start",sideOffset:4,className:m("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),onOpenAutoFocus:M=>M.preventDefault(),children:e.jsx(de.Command,{shouldFilter:!1,className:"flex h-full w-full flex-col",children:e.jsxs(de.Command.List,{id:`${v}-list`,className:"max-h-64 overflow-y-auto p-1",children:[t.filter(M=>M.label.toLowerCase().includes(y.toLowerCase())).map(M=>{const _=r.includes(M.value);return e.jsxs(de.Command.Item,{value:M.value,disabled:M.disabled,onSelect:()=>T(M.value),className:m("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{"aria-hidden":!0,className:m("flex size-4 items-center justify-center rounded-sm border",_?"border-accent bg-accent text-on-accent":"border-border"),children:_&&e.jsx(p.Check,{className:"size-3","aria-hidden":!0})}),e.jsx("span",{className:"flex-1",children:M.label}),M.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:M.description})]},M.value)}),e.jsx(de.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:u})]})})})})]}),i?e.jsx("p",{id:j,role:"alert",className:"text-xs text-danger-text",children:i}):o?e.jsx("p",{id:w,className:"text-xs text-foreground-subtle",children:o}):null]})});us.displayName="MultiSelect";const An=ue.Root,lo=ue.Value,en=l.forwardRef(function({className:t,placeholder:r,size:s="md",tone:a="default",...o},i){return e.jsxs(ue.Trigger,{ref:i,className:m("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed","data-[placeholder]:text-foreground-subtle",s==="sm"&&"h-8 px-2.5",s==="md"&&"h-9 px-3",s==="lg"&&"h-10 px-3.5",a==="default"?"border-border focus-visible:border-accent focus-visible:ring-ring":"border-danger focus-visible:border-danger focus-visible:ring-danger",t),...o,children:[e.jsx(ue.Value,{placeholder:r}),e.jsx(ue.Icon,{asChild:!0,children:e.jsx(p.ChevronsUpDown,{className:"size-4 text-foreground-subtle shrink-0","aria-hidden":!0})})]})});en.displayName="SelectTrigger";const fs="flex h-6 cursor-default items-center justify-center text-foreground-subtle",Ln=l.forwardRef(function({className:t,...r},s){return e.jsx(ue.ScrollUpButton,{ref:s,className:m(fs,t),...r,children:e.jsx(p.ChevronUp,{className:"size-4","aria-hidden":!0})})});Ln.displayName="SelectScrollUpButton";const On=l.forwardRef(function({className:t,...r},s){return e.jsx(ue.ScrollDownButton,{ref:s,className:m(fs,t),...r,children:e.jsx(p.ChevronDown,{className:"size-4","aria-hidden":!0})})});On.displayName="SelectScrollDownButton";const tn=l.forwardRef(function({className:t,children:r,position:s="popper",...a},o){return e.jsx(ue.Portal,{children:e.jsxs(ue.Content,{ref:o,position:s,className:m("z-[var(--z-popover)] min-w-[var(--radix-select-trigger-width)] max-h-96","overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground","shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",t),...a,children:[e.jsx(Ln,{}),e.jsx(ue.Viewport,{className:"p-1",children:r}),e.jsx(On,{})]})})});tn.displayName="SelectContent";const Fn=l.forwardRef(function({className:t,...r},s){return e.jsx(ue.Label,{ref:s,className:m("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});Fn.displayName="SelectLabel";const tt=l.forwardRef(function({className:t,children:r,leadingIcon:s,...a},o){return e.jsxs(ue.Item,{ref:o,className:m("relative flex w-full cursor-default select-none items-center gap-2","rounded-sm px-2 py-1.5 pr-8 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[s&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:s}),e.jsx(ue.ItemText,{children:r}),e.jsx("span",{className:"absolute right-2 flex items-center justify-center",children:e.jsx(ue.ItemIndicator,{children:e.jsx(p.Check,{className:"size-4 text-accent","aria-hidden":!0})})})]})});tt.displayName="SelectItem";const ms=l.forwardRef(function({className:t,...r},s){return e.jsx(ue.Separator,{ref:s,className:m("-mx-1 my-1 h-px bg-border",t),...r})});ms.displayName="SelectSeparator";const xs=l.forwardRef(function({label:t,children:r,...s},a){return e.jsxs(ue.Group,{ref:a,...s,children:[t&&e.jsx(Fn,{children:t}),r]})});xs.displayName="SelectGroup";function co(n,t,r=7){if(t<=r)return Array.from({length:t},(d,u)=>u+1);const s=1,a=[],o=Math.max(2,n-s),i=Math.min(t-1,n+s);a.push(1),o>2&&a.push("gap");for(let d=o;d<=i;d++)a.push(d);return i<t-1&&a.push("gap"),a.push(t),a}const _n=l.forwardRef(function({page:t,pageCount:r,onPageChange:s,totalItems:a,pageSize:o,pageSizeOptions:i,onPageSizeChange:d,showJump:u=!0,className:c,...g},x){const f=l.useMemo(()=>co(t,r),[t,r]),b=o?(t-1)*o+1:void 0,h=o&&a?Math.min(t*o,a):void 0,v=w=>{w<1||w>r||w===t||s(w)};return e.jsxs("nav",{ref:x,"aria-label":"Pagination",className:m("flex flex-wrap items-center justify-between gap-3",c),...g,children:[e.jsxs("div",{className:"flex items-center gap-3 text-sm text-foreground-muted",children:[a!==void 0&&o!==void 0&&e.jsxs("span",{className:"tabular",children:["Showing ",b,"–",h," of ",a]}),i&&d&&o!==void 0&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"page-size",className:"sr-only",children:"Rows per page"}),e.jsxs(An,{value:String(o),onValueChange:w=>d(Number(w)),children:[e.jsx(en,{size:"sm",className:"w-[7.5rem] whitespace-nowrap"}),e.jsx(tn,{children:i.map(w=>e.jsxs(tt,{value:String(w),children:[w," / page"]},w))})]})]})]}),e.jsxs("ul",{className:"flex items-center gap-1",children:[u&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to first page",disabled:t===1,onClick:()=>v(1),className:Ot,children:e.jsx(p.ChevronsLeft,{className:"size-4","aria-hidden":!0})})}),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Previous page",disabled:t===1,onClick:()=>v(t-1),className:Ot,children:e.jsx(p.ChevronLeft,{className:"size-4","aria-hidden":!0})})}),f.map((w,j)=>w==="gap"?e.jsx("li",{className:"px-2 text-foreground-subtle",children:"…"},`gap-${j}`):e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":`Page ${w}`,"aria-current":w===t?"page":void 0,onClick:()=>v(w),className:m("inline-flex size-8 items-center justify-center rounded-md text-sm tabular outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",w===t?"bg-accent text-on-accent font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground"),children:w})},w)),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Next page",disabled:t===r,onClick:()=>v(t+1),className:Ot,children:e.jsx(p.ChevronRight,{className:"size-4","aria-hidden":!0})})}),u&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to last page",disabled:t===r,onClick:()=>v(r),className:Ot,children:e.jsx(p.ChevronsRight,{className:"size-4","aria-hidden":!0})})})]})]})});_n.displayName="Pagination";const Ot=m("inline-flex size-8 items-center justify-center rounded-md text-foreground-muted","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","disabled:opacity-50 disabled:pointer-events-none","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),uo=Z.Root,fo=Z.Trigger,mo=Z.Anchor,xo=Z.Close,gs=l.forwardRef(function({className:t,align:r="center",sideOffset:s=4,...a},o){return e.jsx(Z.Portal,{children:e.jsx(Z.Content,{ref:o,align:r,sideOffset:s,className:m("z-[var(--z-popover)] w-72 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-md","outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1","data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1",t),...a})})});gs.displayName="PopoverContent";const go={sm:"h-1",md:"h-1.5",lg:"h-2"},po={accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},ps=l.forwardRef(function({className:t,value:r,size:s="md",tone:a="accent",...o},i){const d=r==null;return e.jsxs(er.Root,{ref:i,value:d?void 0:r,className:m("relative w-full overflow-hidden rounded-full bg-background-muted",go[s],t),...o,children:[e.jsx(er.Indicator,{className:m("h-full w-full flex-1 transition-transform",po[a],d&&"animate-[progressIndeterminate_1.4s_ease-in-out_infinite] origin-left"),style:d?void 0:{transform:`translateX(-${100-(r??0)}%)`}}),e.jsx("style",{children:`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ia=require("clsx"),la=require("tailwind-merge"),l=require("react"),p=require("lucide-react"),e=require("react/jsx-runtime"),ca=require("@radix-ui/react-accordion"),ke=require("class-variance-authority"),da=require("@radix-ui/react-avatar"),xr=require("@radix-ui/react-slot"),ua=require("@radix-ui/react-checkbox"),fa=require("@radix-ui/react-popover"),de=require("cmdk"),ma=require("@radix-ui/react-dialog"),xa=require("@radix-ui/react-context-menu"),ga=require("@radix-ui/react-dropdown-menu"),yn=require("react-day-picker"),pa=require("@radix-ui/react-label"),Nn=require("react-hook-form"),ha=require("@radix-ui/react-select"),ba=require("@radix-ui/react-progress"),va=require("@radix-ui/react-radio-group"),ja=require("@radix-ui/react-scroll-area"),wa=require("@radix-ui/react-separator"),ya=require("@radix-ui/react-slider"),Na=require("@radix-ui/react-switch"),Ca=require("@radix-ui/react-tabs"),Sa=require("@radix-ui/react-toast"),ka=require("@radix-ui/react-tooltip");function ae(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>n[r]})}}return t.default=n,Object.freeze(t)}const Ta=ae(l),yt=ae(ca),fn=ae(da),Zn=ae(ua),Z=ae(fa),H=ae(ma),fe=ae(xa),me=ae(ga),Da=ae(pa),ue=ae(ha),er=ae(ba),hn=ae(va),ht=ae(ja),Ra=ae(wa),Ot=ae(ya),tr=ae(Na),Gt=ae(Ca),st=ae(Sa),Nt=ae(ka);function m(...n){return la.twMerge(ia.clsx(n))}let nr=0;function Ia(n="ds"){return nr+=1,`${n}-${nr}`}function gr(n){const[t,r]=l.useState(()=>typeof window>"u"?!1:window.matchMedia(n).matches);return l.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia(n),a=o=>r(o.matches);return r(s.matches),s.addEventListener("change",a),()=>s.removeEventListener("change",a)},[n]),t}function Pa(){return gr("(prefers-reduced-motion: reduce)")}const Je={toasts:[],listeners:new Set,emit(){for(const n of this.listeners)n(this.toasts)},push(n){const t=n.id??`t_${Date.now()}_${Math.random().toString(36).slice(2,7)}`,r={open:!0,duration:5e3,variant:"default",...n,id:t};return this.toasts=[r,...this.toasts].slice(0,3),this.emit(),t},dismiss(n){this.toasts=this.toasts.map(t=>t.id===n?{...t,open:!1}:t),this.emit()},remove(n){this.toasts=this.toasts.filter(t=>t.id!==n),this.emit()}};function Ma(){const[n,t]=l.useState(()=>[...Je.toasts]);l.useEffect(()=>{const o=i=>t([...i]);return Je.listeners.add(o),()=>{Je.listeners.delete(o)}},[]);const r=l.useCallback(o=>Je.push(o),[]),s=l.useCallback(o=>Je.dismiss(o),[]),a=l.useCallback(o=>Je.remove(o),[]);return{toasts:n,push:r,dismiss:s,remove:a}}const za=n=>Je.push(n),Ea=Object.freeze(Object.defineProperty({__proto__:null,AlertCircle:p.AlertCircle,AlertTriangle:p.AlertTriangle,ArrowDown:p.ArrowDown,ArrowLeft:p.ArrowLeft,ArrowRight:p.ArrowRight,ArrowUp:p.ArrowUp,ArrowUpDown:p.ArrowUpDown,BarChart3:p.BarChart3,Bell:p.Bell,Bookmark:p.Bookmark,Calendar:p.Calendar,Check:p.Check,CheckCircle2:p.CheckCircle2,ChevronDown:p.ChevronDown,ChevronLeft:p.ChevronLeft,ChevronRight:p.ChevronRight,ChevronUp:p.ChevronUp,ChevronsLeft:p.ChevronsLeft,ChevronsRight:p.ChevronsRight,ChevronsUpDown:p.ChevronsUpDown,Circle:p.Circle,Copy:p.Copy,CornerDownLeft:p.CornerDownLeft,CreditCard:p.CreditCard,Download:p.Download,Edit2:p.Edit2,Ellipsis:p.Ellipsis,ExternalLink:p.ExternalLink,Eye:p.Eye,EyeOff:p.EyeOff,Filter:p.Filter,Folder:p.Folder,GripVertical:p.GripVertical,HelpCircle:p.HelpCircle,Home:p.Home,Inbox:p.Inbox,Info:p.Info,LayoutGrid:p.LayoutGrid,Link2:p.Link2,Loader2:p.Loader2,Lock:p.Lock,LogOut:p.LogOut,Mail:p.Mail,Menu:p.Menu,Minus:p.Minus,Moon:p.Moon,MoreHorizontal:p.MoreHorizontal,Plug:p.Plug,Plus:p.Plus,Search:p.Search,Settings:p.Settings,Sparkles:p.Sparkles,Sun:p.Sun,Trash2:p.Trash2,Upload:p.Upload,User:p.User,Users:p.Users,X:p.X,XCircle:p.XCircle},Symbol.toStringTag,{value:"Module"})),Aa=yt.Root,pr=l.forwardRef(function({className:t,...r},s){return e.jsx(yt.Item,{ref:s,className:m("border-b border-border",t),...r})});pr.displayName="AccordionItem";const hr=l.forwardRef(function({className:t,children:r,...s},a){return e.jsx(yt.Header,{className:"flex",children:e.jsxs(yt.Trigger,{ref:a,className:m("flex flex-1 items-center justify-between gap-2 py-4 text-left text-sm font-medium text-foreground","outline-none transition-colors duration-[var(--duration-fast)]","hover:text-accent","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","[&[data-state=open]>svg]:rotate-180",t),...s,children:[r,e.jsx(p.ChevronDown,{className:"size-4 shrink-0 text-foreground-subtle transition-transform duration-[var(--duration-base)]","aria-hidden":!0})]})})});hr.displayName="AccordionTrigger";const br=l.forwardRef(function({className:t,children:r,...s},a){return e.jsx(yt.Content,{ref:a,className:m("overflow-hidden text-sm text-foreground-muted","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"),...s,children:e.jsx("div",{className:m("pb-4 pt-0",t),children:r})})});br.displayName="AccordionContent";const La=ke.cva(["relative flex w-full gap-3 rounded-lg border p-4","text-sm"],{variants:{variant:{default:"border-border bg-background-subtle text-foreground",info:"border-info-border-soft bg-info-soft text-info-text",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text"}},defaultVariants:{variant:"default"}}),Oa={default:null,info:e.jsx(p.Info,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),success:e.jsx(p.CheckCircle2,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(p.AlertTriangle,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(p.XCircle,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0})},Tt=l.forwardRef(function({className:t,variant:r="default",title:s,dismissible:a,onDismiss:o,icon:i,children:d,...u},c){const[g,x]=l.useState(!0);if(!g)return null;const f=()=>{x(!1),o==null||o()},b=i===!1?null:i??Oa[r??"default"];return e.jsxs("div",{ref:c,role:"alert",className:m(La({variant:r}),t),...u,children:[b,e.jsxs("div",{className:"flex-1 min-w-0",children:[s&&e.jsx("h5",{className:"font-medium leading-tight mb-1",children:s}),e.jsx("div",{className:"text-sm leading-relaxed [&_p]:leading-relaxed",children:d})]}),a&&e.jsx("button",{type:"button","aria-label":"Dismiss",onClick:f,className:m("inline-flex size-6 shrink-0 items-center justify-center rounded-md","hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:e.jsx(p.X,{className:"size-3.5","aria-hidden":!0})})]})});Tt.displayName="Alert";const vr={xs:"size-5 text-[10px]",sm:"size-6 text-xs",md:"size-8 text-xs",lg:"size-10 text-sm",xl:"size-12 text-base"},Fa=ke.cva("relative inline-flex shrink-0",{variants:{size:vr},defaultVariants:{size:"md"}}),_a={online:"bg-success",busy:"bg-danger",away:"bg-warning",offline:"bg-foreground-subtle"},Re=l.forwardRef(function({className:t,size:r,src:s,alt:a,fallback:o,status:i,...d},u){return e.jsxs("span",{className:Fa({size:r}),children:[e.jsxs(fn.Root,{ref:u,className:m("block size-full overflow-hidden rounded-full bg-background-muted text-foreground-muted",t),...d,children:[s&&e.jsx(fn.Image,{src:s,alt:a??"",className:"aspect-square size-full object-cover"}),e.jsx(fn.Fallback,{delayMs:s?200:0,className:"flex size-full items-center justify-center bg-background-muted font-medium uppercase",children:o??"?"})]}),i&&e.jsx("span",{"aria-label":`Status: ${i}`,className:m("absolute bottom-0 right-0 block size-[28%] rounded-full ring-2 ring-background",_a[i])})]})});Re.displayName="Avatar";const jr=l.forwardRef(function({max:t=4,size:r="md",className:s,children:a,...o},i){const d=Array.isArray(a)?a:[a],u=d.slice(0,t),c=d.length-u.length;return e.jsxs("div",{ref:i,className:m("flex items-center -space-x-2",s),...o,children:[u.map((g,x)=>e.jsx("div",{className:"ring-2 ring-background rounded-full",children:g},x)),c>0&&e.jsxs("div",{className:m("inline-flex items-center justify-center rounded-full bg-background-muted text-foreground-muted ring-2 ring-background",vr[r],"font-medium"),"aria-label":`${c} more`,children:["+",c]})]})});jr.displayName="AvatarGroup";const Ba=ke.cva(["inline-flex items-center gap-1 rounded-full px-2 py-0.5","text-xs font-medium whitespace-nowrap"],{variants:{variant:{subtle:"",outline:"border bg-transparent"},tone:{neutral:"",accent:"",success:"",warning:"",danger:"",info:""}},compoundVariants:[{variant:"subtle",tone:"neutral",class:"bg-background-muted text-foreground-muted"},{variant:"subtle",tone:"accent",class:"bg-accent-soft text-on-accent-soft"},{variant:"subtle",tone:"success",class:"bg-success-soft text-success-text"},{variant:"subtle",tone:"warning",class:"bg-warning-soft text-warning-text"},{variant:"subtle",tone:"danger",class:"bg-danger-soft text-danger-text"},{variant:"subtle",tone:"info",class:"bg-info-soft text-info-text"},{variant:"outline",tone:"neutral",class:"border-border text-foreground-muted"},{variant:"outline",tone:"accent",class:"border-accent text-accent"},{variant:"outline",tone:"success",class:"border-success-border-soft text-success-text"},{variant:"outline",tone:"warning",class:"border-warning-border-soft text-warning-text"},{variant:"outline",tone:"danger",class:"border-danger-border-soft text-danger-text"},{variant:"outline",tone:"info",class:"border-info-border-soft text-info-text"}],defaultVariants:{variant:"subtle",tone:"neutral"}}),$a={neutral:"bg-foreground-subtle",accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"},ve=l.forwardRef(function({className:t,variant:r,tone:s="neutral",dot:a,children:o,...i},d){return e.jsxs("span",{ref:d,className:m(Ba({variant:r,tone:s}),t),...i,children:[a&&e.jsx("span",{"aria-hidden":!0,className:m("inline-block size-1.5 rounded-full",$a[s??"neutral"])}),o]})});ve.displayName="Badge";const Cn=l.forwardRef(function({items:t,maxItems:r=4,renderLink:s,className:a,...o},i){const u=t.length>r?[t[0],{collapsed:!0},...t.slice(-2)]:t;return e.jsx("nav",{ref:i,"aria-label":"Breadcrumb",className:m("text-sm",a),...o,children:e.jsx("ol",{className:"flex flex-wrap items-center gap-1.5 text-foreground-subtle",children:u.map((c,g)=>{const x=g===u.length-1;if("collapsed"in c)return e.jsxs("li",{className:"flex items-center gap-1.5",children:[e.jsx(p.MoreHorizontal,{className:"size-4","aria-hidden":!0}),e.jsx(p.ChevronRight,{className:"size-3.5","aria-hidden":!0})]},`ellipsis-${g}`);const f=c,b=x?e.jsx("span",{"aria-current":"page",className:"font-medium text-foreground",children:f.label}):f.href?s?s(f.href,f.label):e.jsx("a",{href:f.href,className:"hover:text-foreground transition-colors duration-[var(--duration-fast)] outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",children:f.label}):e.jsx("span",{children:f.label});return e.jsxs("li",{className:"flex items-center gap-1.5",children:[b,!x&&e.jsx(p.ChevronRight,{className:"size-3.5","aria-hidden":!0})]},g)})})})});Cn.displayName="Breadcrumbs";const Ha=ke.cva(["inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-md text-sm font-medium","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{variant:{primary:["bg-accent text-on-accent","hover:bg-accent-700","active:bg-accent-800"],secondary:["bg-background-muted text-foreground border border-border","hover:bg-neutral-200 dark:hover:bg-neutral-800","active:bg-neutral-300 dark:active:bg-neutral-700"],outline:["border border-border bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],ghost:["bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],destructive:["bg-danger text-on-danger","hover:bg-danger-700","active:bg-danger-800"],link:["bg-transparent text-accent underline-offset-4 px-0","hover:underline","active:text-accent-700"]},size:{sm:"h-8 px-3 text-xs [&_svg]:size-4",md:"h-9 px-3.5 text-sm [&_svg]:size-4",lg:"h-10 px-4 text-sm [&_svg]:size-5",icon:"h-9 w-9 [&_svg]:size-4"}},compoundVariants:[{variant:"link",size:"sm",class:"h-auto px-0"},{variant:"link",size:"md",class:"h-auto px-0"},{variant:"link",size:"lg",class:"h-auto px-0"}],defaultVariants:{variant:"primary",size:"md"}}),q=l.forwardRef(function({className:t,variant:r,size:s,asChild:a=!1,loading:o=!1,leadingIcon:i,trailingIcon:d,disabled:u,children:c,type:g="button",...x},f){const b=u||o,h=m(Ha({variant:r,size:s}),t);return a?e.jsx(xr.Slot,{ref:f,"aria-busy":o||void 0,"data-loading":o||void 0,className:h,...x,children:c}):e.jsxs("button",{ref:f,type:g,"aria-busy":o||void 0,disabled:b,"data-loading":o||void 0,className:h,...x,children:[o?e.jsx(p.Loader2,{className:"animate-spin","aria-hidden":"true"}):i,c,!o&&d]})});q.displayName="Button";const Ua=ke.cva(["rounded-lg border bg-card text-card-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]"],{variants:{variant:{default:"border-border",interactive:"border-border hover:border-border-strong hover:bg-background-subtle cursor-pointer"},padding:{none:"",sm:"p-4",md:"p-5",lg:"p-6"}},defaultVariants:{variant:"default",padding:"md"}}),xe=l.forwardRef(function({className:t,variant:r,padding:s,...a},o){return e.jsx("div",{ref:o,className:m(Ua({variant:r,padding:s}),t),...a})});xe.displayName="Card";const he=l.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:m("flex flex-col gap-1 pb-4",t),...r})});he.displayName="CardHeader";const Se=l.forwardRef(function({className:t,...r},s){return e.jsx("h3",{ref:s,className:m("text-base font-semibold text-foreground leading-tight",t),...r})});Se.displayName="CardTitle";const Ae=l.forwardRef(function({className:t,...r},s){return e.jsx("p",{ref:s,className:m("text-sm text-foreground-muted",t),...r})});Ae.displayName="CardDescription";const be=l.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:m("text-sm text-foreground",t),...r})});be.displayName="CardContent";const wr=l.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:m("flex items-center gap-2 pt-4",t),...r})});wr.displayName="CardFooter";const bt=l.forwardRef(function({className:t,label:r,description:s,error:a,hideLabel:o,id:i,disabled:d,...u},c){const g=l.useId(),x=i??g,f=s?`${x}-desc`:void 0,b=a?`${x}-error`:void 0;return e.jsxs("div",{className:m("flex flex-col gap-1",t),children:[e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx(Zn.Root,{ref:c,id:x,disabled:d,"aria-describedby":b??f,"aria-invalid":!!a||void 0,className:m("peer mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-sm border","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-on-accent","data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-on-accent","disabled:cursor-not-allowed disabled:opacity-50",a?"border-danger":"border-border-strong"),...u,children:e.jsx(Zn.Indicator,{className:"flex items-center justify-center",children:u.checked==="indeterminate"?e.jsx(p.Minus,{className:"size-3","aria-hidden":!0,strokeWidth:3}):e.jsx(p.Check,{className:"size-3","aria-hidden":!0,strokeWidth:3})})}),r&&e.jsxs("div",{className:m("flex flex-col gap-0.5",o&&"sr-only"),children:[e.jsx("label",{htmlFor:x,className:m("text-sm text-foreground select-none",d&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:f,className:"text-xs text-foreground-subtle",children:s})]})]}),a&&e.jsx("p",{id:b,role:"alert",className:"text-xs text-danger-text",children:a})]})});bt.displayName="Checkbox";const yr=l.forwardRef(function({value:t,onChange:r,options:s,loadOptions:a,label:o,helperText:i,error:d,placeholder:u="Select…",searchPlaceholder:c="Search…",emptyText:g="No results.",clearable:x=!0,disabled:f,size:b="md",className:h},v){const w=l.useId(),j=`${w}-helper`,N=`${w}-error`,[S,y]=l.useState(!1),[k,D]=l.useState(""),[C,T]=l.useState([]),[R,L]=l.useState(!1),E=a?C:s??[];l.useEffect(()=>{if(!a||!S)return;let O=!1;return L(!0),a(k).then(K=>{O||T(K)}).finally(()=>{O||L(!1)}),()=>{O=!0}},[k,S,a]);const F=l.useMemo(()=>E.find(O=>O.value===t)??null,[E,t]),I=b==="sm"?"h-8":b==="lg"?"h-10":"h-9",M=b==="sm"?"px-2.5":b==="lg"?"px-3.5":"px-3",_=l.useCallback(O=>{O.stopPropagation(),r(null)},[r]),W=!!d;return e.jsxs("div",{ref:v,className:m("flex flex-col gap-1.5",h),children:[o&&e.jsx("label",{htmlFor:w,className:"text-sm font-medium text-foreground",children:o}),e.jsxs(Z.Root,{open:S,onOpenChange:y,children:[e.jsx(Z.Trigger,{asChild:!0,children:e.jsxs("button",{id:w,type:"button",role:"combobox","aria-expanded":S,"aria-invalid":W||void 0,"aria-describedby":W?N:i?j:void 0,disabled:f,className:m("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",I,M,W?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring"),children:[e.jsx("span",{className:m("truncate",!F&&"text-foreground-subtle"),children:F?F.label:u}),e.jsxs("span",{className:"ml-2 flex items-center gap-1 shrink-0",children:[x&&F&&!f&&e.jsx("span",{role:"button",tabIndex:-1,onClick:_,"aria-label":"Clear selection",className:"text-foreground-subtle hover:text-foreground",children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})}),e.jsx(p.ChevronsUpDown,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(Z.Portal,{children:e.jsx(Z.Content,{align:"start",sideOffset:4,className:m("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:e.jsxs(de.Command,{shouldFilter:!a,className:"flex h-full w-full flex-col",children:[e.jsxs("div",{className:"flex items-center border-b border-border px-3",children:[e.jsx(de.Command.Input,{value:k,onValueChange:D,placeholder:c,className:"flex h-9 w-full bg-transparent py-2 text-sm outline-none placeholder:text-foreground-subtle"}),R&&e.jsx(p.Loader2,{className:"size-4 animate-spin text-foreground-subtle","aria-hidden":!0})]}),e.jsxs(de.Command.List,{className:"max-h-64 overflow-y-auto p-1",children:[E.map(O=>{const K=O.value===t;return e.jsxs(de.Command.Item,{value:O.value,disabled:O.disabled,onSelect:ee=>{r(ee),y(!1)},className:m("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{className:"flex-1",children:O.label}),O.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:O.description}),K&&e.jsx(p.Check,{className:"size-4 text-accent","aria-hidden":!0})]},O.value)}),!R&&E.length===0&&e.jsx(de.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:g})]})]})})})]}),d?e.jsx("p",{id:N,role:"alert",className:"text-xs text-danger-text",children:d}):i?e.jsx("p",{id:j,className:"text-xs text-foreground-subtle",children:i}):null]})});yr.displayName="Combobox";const Nr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command,{ref:s,className:m("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground",t),...r})});Nr.displayName="Command";const Cr=l.forwardRef(function({className:t,...r},s){return e.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3","cmdk-input-wrapper":"",children:[e.jsx(p.Search,{className:"size-4 shrink-0 text-foreground-subtle","aria-hidden":!0}),e.jsx(de.Command.Input,{ref:s,className:m("flex h-11 w-full bg-transparent py-3 text-sm outline-none","placeholder:text-foreground-subtle disabled:cursor-not-allowed disabled:opacity-50",t),...r})]})});Cr.displayName="CommandInput";const Sr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command.List,{ref:s,className:m("max-h-[320px] overflow-y-auto p-1",t),...r})});Sr.displayName="CommandList";const kr=l.forwardRef(function(t,r){return e.jsx(de.Command.Empty,{ref:r,className:"py-8 text-center text-sm text-foreground-subtle",...t})});kr.displayName="CommandEmpty";const Tr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command.Group,{ref:s,className:m("overflow-hidden text-foreground p-1","[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5","[&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium","[&_[cmdk-group-heading]]:text-foreground-subtle",t),...r})});Tr.displayName="CommandGroup";const Dr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command.Separator,{ref:s,className:m("-mx-1 my-1 h-px bg-border",t),...r})});Dr.displayName="CommandSeparator";const Rr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command.Item,{ref:s,className:m("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[selected=true]:bg-background-muted data-[selected=true]:text-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","[&_svg]:size-4 [&_svg]:text-foreground-subtle",t),...r})});Rr.displayName="CommandItem";function Va({children:n,className:t}){return e.jsx("span",{className:m("ml-auto inline-flex items-center gap-0.5 text-xs tracking-widest text-foreground-subtle font-mono",t),children:n})}function Ga({open:n,onOpenChange:t,children:r,title:s="Command palette"}){return e.jsx(H.Root,{open:n,onOpenChange:t,children:e.jsxs(H.Portal,{children:[e.jsx(H.Overlay,{className:m("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0")}),e.jsxs(H.Content,{className:m("fixed left-1/2 top-[20%] z-[var(--z-modal)] -translate-x-1/2","w-[calc(100%-2rem)] max-w-[640px] overflow-hidden","rounded-lg border border-border bg-popover text-popover-foreground shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0","data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95"),children:[e.jsx(H.Title,{className:"sr-only",children:s}),r]})]})})}function qa(n){const[t,r]=l.useState(0);l.useEffect(()=>{const s=a=>{a.key==="k"&&(a.metaKey||a.ctrlKey)&&(a.preventDefault(),n(!0),r(o=>o+1))};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[n])}const Wa=fe.Root,Xa=fe.Trigger,Ka=fe.Group,Ir=fe.Portal,Ya=fe.Sub,Qa=fe.RadioGroup,qt=m("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),Pr=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(fe.SubTrigger,{ref:a,className:m(qt,"data-[state=open]:bg-background-muted",t),...s,children:[r,e.jsx(p.ChevronRight,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});Pr.displayName="ContextMenuSubTrigger";const Mr=l.forwardRef(function({className:t,...r},s){return e.jsx(fe.SubContent,{ref:s,className:m("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md",t),...r})});Mr.displayName="ContextMenuSubContent";const zr=l.forwardRef(function({className:t,...r},s){return e.jsx(Ir,{children:e.jsx(fe.Content,{ref:s,className:m("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r})})});zr.displayName="ContextMenuContent";const Er=l.forwardRef(function({className:t,destructive:r,...s},a){return e.jsx(fe.Item,{ref:a,className:m(qt,r&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...s})});Er.displayName="ContextMenuItem";const Ar=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(fe.CheckboxItem,{ref:a,className:m(qt,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(fe.ItemIndicator,{children:e.jsx(p.Check,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});Ar.displayName="ContextMenuCheckboxItem";const Lr=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(fe.RadioItem,{ref:a,className:m(qt,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(fe.ItemIndicator,{children:e.jsx(p.Circle,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});Lr.displayName="ContextMenuRadioItem";const Or=l.forwardRef(function({className:t,...r},s){return e.jsx(fe.Label,{ref:s,className:m("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});Or.displayName="ContextMenuLabel";const Fr=l.forwardRef(function({className:t,...r},s){return e.jsx(fe.Separator,{ref:s,className:m("-mx-1 my-1 h-px bg-border",t),...r})});Fr.displayName="ContextMenuSeparator";function _r({className:n,...t}){return e.jsx("span",{className:m("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",n),...t})}_r.displayName="ContextMenuShortcut";const Wt=me.Root,Xt=me.Trigger,Ja=me.Group,Br=me.Portal,Za=me.Sub,eo=me.RadioGroup,Kt=m("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-[var(--duration-fast)]"),$r=l.forwardRef(function({className:t,inset:r,children:s,...a},o){return e.jsxs(me.SubTrigger,{ref:o,className:m(Kt,"data-[state=open]:bg-background-muted",r&&"pl-8",t),...a,children:[s,e.jsx(p.ChevronRight,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});$r.displayName="DropdownMenuSubTrigger";const Hr=l.forwardRef(function({className:t,...r},s){return e.jsx(me.SubContent,{ref:s,className:m("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",t),...r})});Hr.displayName="DropdownMenuSubContent";const Dt=l.forwardRef(function({className:t,sideOffset:r=4,align:s="end",...a},o){return e.jsx(Br,{children:e.jsx(me.Content,{ref:o,sideOffset:r,align:s,className:m("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1",t),...a})})});Dt.displayName="DropdownMenuContent";const Ze=l.forwardRef(function({className:t,inset:r,destructive:s,...a},o){return e.jsx(me.Item,{ref:o,className:m(Kt,r&&"pl-8",s&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...a})});Ze.displayName="DropdownMenuItem";const Sn=l.forwardRef(function({className:t,children:r,checked:s,...a},o){return e.jsxs(me.CheckboxItem,{ref:o,checked:s,className:m(Kt,"pl-8",t),...a,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(me.ItemIndicator,{children:e.jsx(p.Check,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});Sn.displayName="DropdownMenuCheckboxItem";const Ur=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(me.RadioItem,{ref:a,className:m(Kt,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(me.ItemIndicator,{children:e.jsx(p.Circle,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});Ur.displayName="DropdownMenuRadioItem";const Yt=l.forwardRef(function({className:t,inset:r,...s},a){return e.jsx(me.Label,{ref:a,className:m("px-2 py-1.5 text-xs font-medium text-foreground-subtle",r&&"pl-8",t),...s})});Yt.displayName="DropdownMenuLabel";const ct=l.forwardRef(function({className:t,...r},s){return e.jsx(me.Separator,{ref:s,className:m("-mx-1 my-1 h-px bg-border",t),...r})});ct.displayName="DropdownMenuSeparator";function Vr({className:n,...t}){return e.jsx("span",{className:m("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",n),...t})}Vr.displayName="DropdownMenuShortcut";const to=ke.cva(["inline-flex items-center justify-center shrink-0","rounded-md","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none"],{variants:{variant:{primary:"bg-accent text-on-accent hover:bg-accent-700 active:bg-accent-800",secondary:"bg-background-muted text-foreground border border-border hover:bg-neutral-200 dark:hover:bg-neutral-800",outline:"border border-border bg-transparent text-foreground hover:bg-background-muted",ghost:"bg-transparent text-foreground-muted hover:bg-background-muted hover:text-foreground",destructive:"bg-danger text-on-danger hover:bg-danger-700 active:bg-danger-800"},size:{sm:"h-7 w-7 [&_svg]:size-3.5",md:"h-8 w-8 [&_svg]:size-4",lg:"h-10 w-10 [&_svg]:size-5"}},defaultVariants:{variant:"ghost",size:"md"}}),Rt=l.forwardRef(function({className:t,variant:r,size:s,icon:a,loading:o,disabled:i,type:d="button",...u},c){const g=i||o;return e.jsx("button",{ref:c,type:d,"aria-busy":o||void 0,disabled:g,className:m(to({variant:r,size:s}),t),...u,children:o?e.jsx(p.Loader2,{className:"animate-spin","aria-hidden":"true"}):a})});Rt.displayName="IconButton";const no=ke.cva(["group inline-flex items-center w-full","rounded-md border bg-card text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","has-disabled:opacity-50 has-disabled:pointer-events-none","focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-background"],{variants:{size:{sm:"h-8 px-2.5 gap-1.5",md:"h-9 px-3 gap-2",lg:"h-10 px-3.5 gap-2"},tone:{default:"border-border focus-within:border-accent focus-within:ring-ring",error:"border-danger focus-within:border-danger focus-within:ring-danger"}},defaultVariants:{size:"md",tone:"default"}}),ro=ke.cva(["flex-1 min-w-0 bg-transparent outline-none","placeholder:text-foreground-subtle","text-foreground","disabled:cursor-not-allowed"]),se=l.forwardRef(function({className:t,type:r="text",size:s,tone:a,label:o,helperText:i,error:d,prefix:u,suffix:c,clearable:g,onClear:x,hideLabel:f,id:b,disabled:h,value:v,...w},j){const N=l.useId(),S=b??N,y=`${S}-helper`,k=`${S}-error`,[D,C]=l.useState(!1),T=r==="password"?D?"text":"password":r,R=!!d,L=R?"error":a,E=u??(r==="search"?e.jsx(p.Search,{className:"size-4 text-foreground-subtle","aria-hidden":!0}):null),F=v!==void 0&&v!==""&&v!==null;return e.jsxs("div",{className:m("flex flex-col gap-1.5",t),children:[o&&e.jsx("label",{htmlFor:S,className:m("text-sm font-medium text-foreground",f&&"sr-only"),children:o}),e.jsxs("div",{className:m(no({size:s,tone:L})),children:[E&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:E}),e.jsx("input",{ref:j,id:S,type:T,disabled:h,value:v,"aria-invalid":R||void 0,"aria-describedby":d?k:i?y:void 0,className:m(ro()),...w}),g&&F&&e.jsx("button",{type:"button",onClick:x,tabIndex:-1,"aria-label":"Clear input",className:"flex items-center text-foreground-subtle hover:text-foreground",children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})}),r==="password"&&e.jsx("button",{type:"button",onClick:()=>C(I=>!I),tabIndex:-1,"aria-label":D?"Hide password":"Show password","aria-pressed":D,className:"flex items-center text-foreground-subtle hover:text-foreground",children:D?e.jsx(p.EyeOff,{className:"size-4","aria-hidden":!0}):e.jsx(p.Eye,{className:"size-4","aria-hidden":!0})}),c&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:c})]}),d?e.jsx("p",{id:k,role:"alert",className:"text-xs text-danger-text",children:d}):i?e.jsx("p",{id:y,className:"text-xs text-foreground-subtle",children:i}):null]})});se.displayName="Input";const Qt=l.forwardRef(function({className:t,...r},s){return e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:s,className:m("w-full caption-bottom text-sm border-collapse",t),...r})})});Qt.displayName="Table";const Jt=l.forwardRef(function({className:t,...r},s){return e.jsx("thead",{ref:s,className:m("sticky top-0 z-10 bg-background-subtle text-foreground-muted","[&_tr]:border-b [&_tr]:border-border",t),...r})});Jt.displayName="TableHeader";const Zt=l.forwardRef(function({className:t,...r},s){return e.jsx("tbody",{ref:s,className:m("[&_tr:last-child]:border-0",t),...r})});Zt.displayName="TableBody";const Gr=l.forwardRef(function({className:t,...r},s){return e.jsx("tfoot",{ref:s,className:m("border-t border-border bg-background-subtle font-medium",t),...r})});Gr.displayName="TableFooter";const qe=l.forwardRef(function({className:t,selected:r,...s},a){return e.jsx("tr",{ref:a,"data-selected":r||void 0,className:m("border-b border-border transition-colors duration-[var(--duration-fast)]","hover:bg-background-subtle","data-[selected]:bg-accent-soft data-[selected]:hover:bg-accent-soft",t),...s})});qe.displayName="TableRow";const We=l.forwardRef(function({className:t,...r},s){return e.jsx("th",{ref:s,className:m("h-10 px-3 text-left align-middle text-xs font-medium uppercase tracking-wide text-foreground-subtle","[&:has([role=checkbox])]:w-10 [&:has([role=checkbox])]:pr-0",t),...r})});We.displayName="TableHead";const Ue=l.forwardRef(function({className:t,...r},s){return e.jsx("td",{ref:s,className:m("px-3 py-3 align-middle text-foreground",t),...r})});Ue.displayName="TableCell";const qr=l.forwardRef(function({className:t,...r},s){return e.jsx("caption",{ref:s,className:m("mt-4 text-sm text-foreground-subtle",t),...r})});qr.displayName="TableCaption";const kn=l.forwardRef(function({sortKey:t,currentSort:r,onSortChange:s,children:a,className:o,...i},d){const u=(r==null?void 0:r.key)===t,c=u?r==null?void 0:r.direction:void 0,g=()=>{s(t,u&&c==="asc"?"desc":"asc")};return e.jsx(We,{ref:d,className:m("p-0",o),"aria-sort":u?c==="asc"?"ascending":"descending":"none",...i,children:e.jsxs("button",{type:"button",onClick:g,className:m("inline-flex h-10 w-full items-center gap-1.5 px-3 outline-none","transition-colors duration-[var(--duration-fast)]","hover:text-foreground focus-visible:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-sm",u&&"text-foreground"),children:[a,c==="asc"?e.jsx(p.ArrowUp,{className:"size-3.5","aria-hidden":!0}):c==="desc"?e.jsx(p.ArrowDown,{className:"size-3.5","aria-hidden":!0}):e.jsx(p.ArrowUpDown,{className:"size-3.5 opacity-40","aria-hidden":!0})]})})});kn.displayName="TableSortHeader";const Tn=l.forwardRef(function({className:t,variant:r,...s},a){return e.jsx("div",{ref:a,"aria-hidden":!0,className:m("animate-pulse bg-background-muted",r==="text"&&"h-3 rounded-sm",r==="circle"&&"rounded-full aspect-square",r==="avatar"&&"size-8 rounded-full",r==="card"&&"rounded-lg",!r&&"rounded-md",t),...s})});Tn.displayName="Skeleton";function Wr({columns:n,rows:t,loading:r,sort:s,onSortChange:a,filter:o,emptyState:i,className:d}){const[u,c]=l.useState({}),g=l.useMemo(()=>n.filter(f=>!u[f.key]),[n,u]),x=()=>r?Array.from({length:5}).map((f,b)=>e.jsx(qe,{children:g.map(h=>e.jsx(Ue,{children:e.jsx(Tn,{variant:"text",className:"w-3/4"})},h.key))},`skel-${b}`)):t.length===0?e.jsx(qe,{children:e.jsx(Ue,{colSpan:g.length,className:"h-32 text-center",children:i??e.jsx("span",{className:"text-foreground-subtle",children:"No results."})})}):t.map(f=>e.jsx(qe,{children:g.map(b=>e.jsx(Ue,{className:m(b.align==="right"&&"text-right tabular"),children:b.cell?b.cell(f):f[b.key]},b.key))},f.id));return e.jsxs("div",{className:m("flex flex-col gap-3",d),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o?e.jsx(se,{type:"search",placeholder:o.placeholder??"Filter…",value:o.value,onChange:f=>o.onChange(f.target.value),clearable:!0,onClear:()=>o.onChange(""),className:"max-w-sm w-full",hideLabel:!0,label:"Filter rows"}):e.jsx("div",{}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(Wt,{children:[e.jsx(Xt,{asChild:!0,children:e.jsx(Rt,{"aria-label":"Column visibility",icon:e.jsx(p.Settings,{}),variant:"outline"})}),e.jsxs(Dt,{children:[e.jsx(Yt,{children:"Columns"}),e.jsx(ct,{}),n.map(f=>e.jsx(Sn,{checked:!u[f.key],onCheckedChange:b=>c(h=>({...h,[f.key]:!b})),children:f.header},f.key))]})]})})]}),e.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:e.jsxs(Qt,{children:[e.jsx("colgroup",{children:g.map(f=>e.jsx("col",{style:f.width?{width:f.width}:void 0},f.key))}),e.jsx(Jt,{children:e.jsx(qe,{children:g.map(f=>f.sortable&&a?e.jsx(kn,{sortKey:f.key,currentSort:s??null,onSortChange:(b,h)=>a({key:b,direction:h}),children:f.header},f.key):e.jsx(We,{className:m(f.align==="right"&&"text-right"),children:f.header},f.key))})}),e.jsx(Zt,{children:x()})]})})]})}const Xr={root:"p-3",month:"space-y-2",caption:"flex items-center justify-between px-1 pb-2",caption_label:"text-sm font-medium text-foreground",nav:"flex items-center gap-1",nav_button:"inline-flex size-7 items-center justify-center rounded-md text-foreground-muted hover:bg-background-muted hover:text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring",table:"w-full border-collapse",head_row:"flex",head_cell:"w-9 text-xs font-medium text-foreground-subtle",row:"flex w-full mt-1",cell:"relative size-9 p-0 text-center",day:"inline-flex size-9 items-center justify-center rounded-md text-sm text-foreground transition-colors outline-none hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring",day_selected:"bg-accent text-on-accent hover:bg-accent hover:text-on-accent",day_today:"font-semibold text-accent",day_outside:"text-foreground-subtle opacity-50",day_disabled:"text-foreground-subtle opacity-50 pointer-events-none",day_range_start:"rounded-l-md",day_range_end:"rounded-r-md",day_range_middle:"bg-accent-soft text-on-accent-soft rounded-none"},Kr={IconLeft:()=>e.jsx(p.ChevronLeft,{className:"size-4","aria-hidden":!0}),IconRight:()=>e.jsx(p.ChevronRight,{className:"size-4","aria-hidden":!0})};function Ut(n){return n?n.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):""}function Yr({label:n,placeholder:t,hasValue:r,children:s,error:a,fieldId:o,disabled:i}){return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[n&&e.jsx("label",{htmlFor:o,className:"text-sm font-medium text-foreground",children:n}),e.jsx(Z.Trigger,{asChild:!0,children:e.jsxs("button",{id:o,type:"button",disabled:i,"aria-invalid":!!a||void 0,className:m("inline-flex h-9 w-full items-center justify-start gap-2 rounded-md border bg-card px-3 text-left text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",a?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",!r&&"text-foreground-subtle"),children:[e.jsx(p.Calendar,{className:"size-4 text-foreground-subtle","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:r?s:t})]})}),a&&e.jsx("p",{role:"alert",className:"text-xs text-danger-text",children:a})]})}const Qr=l.forwardRef(function({value:t,onChange:r,label:s,placeholder:a="Pick a date",error:o,disabled:i,fromDate:d,toDate:u,className:c},g){const x=l.useId(),[f,b]=l.useState(!1);return e.jsx("div",{ref:g,className:m(c),children:e.jsxs(Z.Root,{open:f,onOpenChange:b,children:[e.jsx(Yr,{label:s,placeholder:a,hasValue:!!t,error:o,fieldId:x,disabled:i,children:Ut(t)}),e.jsx(Z.Portal,{children:e.jsx(Z.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg border border-border bg-popover text-popover-foreground shadow-md",children:e.jsx(yn.DayPicker,{mode:"single",selected:t,onSelect:h=>{r(h??void 0),h&&b(!1)},fromDate:d,toDate:u,classNames:Xr,components:Kr})})})]})})});Qr.displayName="DatePicker";const Jr=l.forwardRef(function({value:t,onChange:r,label:s,placeholder:a="Pick a range",error:o,disabled:i,fromDate:d,toDate:u,className:c},g){const x=l.useId(),[f,b]=l.useState(!1),h=!!(t!=null&&t.from);return e.jsx("div",{ref:g,className:m(c),children:e.jsxs(Z.Root,{open:f,onOpenChange:b,children:[e.jsx(Yr,{label:s,placeholder:a,hasValue:h,error:o,fieldId:x,disabled:i,children:t!=null&&t.from&&t.to?`${Ut(t.from)} – ${Ut(t.to)}`:t!=null&&t.from?Ut(t.from):""}),e.jsx(Z.Portal,{children:e.jsx(Z.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg border border-border bg-popover text-popover-foreground shadow-md",children:e.jsx(yn.DayPicker,{mode:"range",selected:t,onSelect:r,numberOfMonths:2,fromDate:d,toDate:u,classNames:Xr,components:Kr})})})]})})});Jr.displayName="DateRangePicker";const Zr=H.Root,so=H.Trigger,es=H.Portal,ts=H.Close,Dn=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Overlay,{ref:s,className:m("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r})});Dn.displayName="DialogOverlay";const Rn=l.forwardRef(function({className:t,children:r,showClose:s=!0,size:a="md",...o},i){return e.jsxs(es,{children:[e.jsx(Dn,{}),e.jsxs(H.Content,{ref:i,className:m("fixed left-1/2 top-1/2 z-[var(--z-modal)] -translate-x-1/2 -translate-y-1/2","w-[calc(100%-2rem)] rounded-lg border border-border bg-card text-card-foreground shadow-lg","p-6","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",a==="sm"&&"max-w-[400px]",a==="md"&&"max-w-[520px]",a==="lg"&&"max-w-[720px]",t),...o,children:[r,s&&e.jsx(H.Close,{"aria-label":"Close",className:m("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})})]})]})});Rn.displayName="DialogContent";function In({className:n,...t}){return e.jsx("div",{className:m("flex flex-col gap-1 pb-4",n),...t})}In.displayName="DialogHeader";function Pn({className:n,...t}){return e.jsx("div",{className:m("flex flex-col-reverse gap-2 pt-6 sm:flex-row sm:justify-end",n),...t})}Pn.displayName="DialogFooter";const Mn=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Title,{ref:s,className:m("text-lg font-semibold text-foreground leading-tight",t),...r})});Mn.displayName="DialogTitle";const zn=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Description,{ref:s,className:m("text-sm text-foreground-muted",t),...r})});zn.displayName="DialogDescription";function ns({open:n,onOpenChange:t,title:r,description:s,confirmLabel:a="Confirm",cancelLabel:o="Cancel",confirmVariant:i="primary",onConfirm:d,loading:u}){return e.jsx(Zr,{open:n,onOpenChange:t,children:e.jsxs(Rn,{size:"sm",children:[e.jsxs(In,{children:[e.jsx(Mn,{children:r}),s&&e.jsx(zn,{children:s})]}),e.jsxs(Pn,{children:[e.jsx(ts,{asChild:!0,children:e.jsx(q,{variant:"outline",children:o})}),e.jsx(q,{variant:i,loading:u,onClick:d,children:a})]})]})})}ns.displayName="ConfirmationDialog";const en=l.forwardRef(function({icon:t,title:r,description:s,action:a,secondaryAction:o,className:i,...d},u){return e.jsxs("div",{ref:u,className:m("flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border bg-background-subtle p-10 text-center",i),...d,children:[t&&e.jsx("div",{className:"inline-flex size-12 items-center justify-center rounded-full bg-background-muted text-foreground-muted [&_svg]:size-6",children:t}),e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:r}),s&&e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:s}),(a||o)&&e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[a,o]})]})});en.displayName="EmptyState";const ao={404:{icon:e.jsx(p.AlertTriangle,{}),title:"Page not found",description:"We couldn't find what you were looking for."},500:{icon:e.jsx(p.XCircle,{}),title:"Something went wrong",description:"We're looking into it. Please try again in a moment."},generic:{icon:e.jsx(p.AlertTriangle,{}),title:"Unexpected error",description:"Something interrupted this action."}},rs=l.forwardRef(function({variant:t="generic",title:r,description:s,action:a,onRetry:o,className:i,...d},u){const c=ao[t];return e.jsxs("div",{ref:u,role:"alert",className:m("flex flex-col items-center justify-center gap-3 rounded-lg border border-border bg-background-subtle p-10 text-center",i),...d,children:[e.jsx("div",{className:"inline-flex size-12 items-center justify-center rounded-full bg-danger-soft text-danger-text [&_svg]:size-6",children:c.icon}),e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:r??c.title}),e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:s??c.description}),(a||o)&&e.jsx("div",{className:"mt-2 flex items-center gap-2",children:a??e.jsx(q,{onClick:o,variant:"outline",children:"Try again"})})]})});rs.displayName="ErrorState";const oo=Nn.FormProvider,ss=l.createContext(null);function io(n){return e.jsx(ss.Provider,{value:{name:n.name},children:e.jsx(Nn.Controller,{...n})})}const as=l.createContext(null);function It(){const n=l.useContext(ss),t=l.useContext(as),{getFieldState:r,formState:s}=Nn.useFormContext();if(!n)throw new Error("useFormField must be used inside <FormField>");const a=r(n.name,s),o=(t==null?void 0:t.id)??"";return{id:o,name:n.name,formItemId:`${o}-item`,formDescriptionId:`${o}-desc`,formMessageId:`${o}-error`,...a}}const os=l.forwardRef(function({className:t,...r},s){const a=l.useId();return e.jsx(as.Provider,{value:{id:a},children:e.jsx("div",{ref:s,className:m("flex flex-col gap-1.5",t),...r})})});os.displayName="FormItem";const is=l.forwardRef(function({className:t,...r},s){const{formItemId:a,error:o}=It();return e.jsx(Da.Root,{ref:s,htmlFor:a,className:m("text-sm font-medium text-foreground",o&&"text-danger-text",t),...r})});is.displayName="FormLabel";const ls=l.forwardRef(function(t,r){const{error:s,formItemId:a,formDescriptionId:o,formMessageId:i}=It();return e.jsx(xr.Slot,{ref:r,id:a,"aria-describedby":s?`${o} ${i}`:o,"aria-invalid":!!s,...t})});ls.displayName="FormControl";const cs=l.forwardRef(function({className:t,...r},s){const{formDescriptionId:a}=It();return e.jsx("p",{ref:s,id:a,className:m("text-xs text-foreground-subtle",t),...r})});cs.displayName="FormDescription";const ds=l.forwardRef(function({className:t,children:r,...s},a){const{error:o,formMessageId:i}=It(),d=o?String((o==null?void 0:o.message)??""):r;return d?e.jsx("p",{ref:a,id:i,role:"alert",className:m("text-xs text-danger-text",t),...s,children:d}):null});ds.displayName="FormError";const En=l.forwardRef(function({size:t="sm",className:r,...s},a){return e.jsx("kbd",{ref:a,className:m("inline-flex items-center justify-center rounded border border-border bg-background-subtle font-mono","text-foreground-muted shadow-xs",t==="sm"?"h-5 min-w-5 px-1 text-[10px]":"h-6 min-w-6 px-1.5 text-xs",r),...s})});En.displayName="Kbd";const us=l.forwardRef(function({options:t,value:r,onChange:s,label:a,helperText:o,error:i,placeholder:d="Select…",emptyText:u="No results.",maxVisibleChips:c=4,clearable:g=!0,disabled:x,className:f},b){const h=l.useId(),v=h,w=`${h}-helper`,j=`${h}-error`,[N,S]=l.useState(!1),[y,k]=l.useState(""),D=l.useRef(null),C=l.useMemo(()=>t.filter(M=>r.includes(M.value)),[t,r]),T=l.useCallback(M=>{r.includes(M)?s(r.filter(_=>_!==M)):s([...r,M])},[r,s]),R=l.useCallback(()=>s([]),[s]),L=M=>{M.key==="Backspace"&&y===""&&r.length>0&&s(r.slice(0,-1))},E=C.slice(0,c),F=C.length-E.length,I=!!i;return e.jsxs("div",{ref:b,className:m("flex flex-col gap-1.5",f),children:[a&&e.jsx("label",{htmlFor:v,className:"text-sm font-medium text-foreground",children:a}),e.jsxs(Z.Root,{open:N,onOpenChange:S,children:[e.jsx(Z.Trigger,{asChild:!0,children:e.jsxs("div",{role:"combobox","aria-expanded":N,"aria-controls":`${v}-list`,"aria-haspopup":"listbox",id:v,tabIndex:x?-1:0,onKeyDown:L,"aria-disabled":x||void 0,"aria-invalid":I||void 0,"aria-describedby":I?j:o?w:void 0,className:m("flex w-full min-h-9 cursor-text flex-wrap items-center gap-1.5 rounded-md border bg-card px-2 py-1 text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background",I?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",x&&"opacity-50 pointer-events-none"),onClick:()=>{var M;return(M=D.current)==null?void 0:M.focus()},children:[E.length===0&&e.jsx("span",{className:"text-foreground-subtle px-1",children:d}),E.map(M=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-accent-soft px-1.5 py-0.5 text-xs font-medium text-on-accent-soft",children:[M.label,e.jsx("button",{type:"button","aria-label":`Remove ${M.label}`,className:"inline-flex items-center text-on-accent-soft hover:text-foreground",onClick:_=>{_.stopPropagation(),T(M.value)},children:e.jsx(p.X,{className:"size-3","aria-hidden":!0})})]},M.value)),F>0&&e.jsxs("span",{className:"rounded-md bg-background-muted px-1.5 py-0.5 text-xs font-medium text-foreground-muted",children:["+",F," more"]}),e.jsx("input",{ref:D,value:y,onChange:M=>k(M.target.value),onFocus:()=>S(!0),className:"flex-1 min-w-[8ch] bg-transparent text-sm outline-none placeholder:text-foreground-subtle",placeholder:(C.length===0,""),disabled:x}),e.jsxs("span",{className:"ml-auto flex items-center gap-1",children:[g&&C.length>0&&e.jsx("button",{type:"button","aria-label":"Clear all",onClick:M=>{M.stopPropagation(),R()},className:"text-foreground-subtle hover:text-foreground",children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})}),e.jsx(p.ChevronsUpDown,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(Z.Portal,{children:e.jsx(Z.Content,{align:"start",sideOffset:4,className:m("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),onOpenAutoFocus:M=>M.preventDefault(),children:e.jsx(de.Command,{shouldFilter:!1,className:"flex h-full w-full flex-col",children:e.jsxs(de.Command.List,{id:`${v}-list`,className:"max-h-64 overflow-y-auto p-1",children:[t.filter(M=>M.label.toLowerCase().includes(y.toLowerCase())).map(M=>{const _=r.includes(M.value);return e.jsxs(de.Command.Item,{value:M.value,disabled:M.disabled,onSelect:()=>T(M.value),className:m("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{"aria-hidden":!0,className:m("flex size-4 items-center justify-center rounded-sm border",_?"border-accent bg-accent text-on-accent":"border-border"),children:_&&e.jsx(p.Check,{className:"size-3","aria-hidden":!0})}),e.jsx("span",{className:"flex-1",children:M.label}),M.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:M.description})]},M.value)}),e.jsx(de.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:u})]})})})})]}),i?e.jsx("p",{id:j,role:"alert",className:"text-xs text-danger-text",children:i}):o?e.jsx("p",{id:w,className:"text-xs text-foreground-subtle",children:o}):null]})});us.displayName="MultiSelect";const An=ue.Root,lo=ue.Value,tn=l.forwardRef(function({className:t,placeholder:r,size:s="md",tone:a="default",...o},i){return e.jsxs(ue.Trigger,{ref:i,className:m("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed","data-[placeholder]:text-foreground-subtle",s==="sm"&&"h-8 px-2.5",s==="md"&&"h-9 px-3",s==="lg"&&"h-10 px-3.5",a==="default"?"border-border focus-visible:border-accent focus-visible:ring-ring":"border-danger focus-visible:border-danger focus-visible:ring-danger",t),...o,children:[e.jsx(ue.Value,{placeholder:r}),e.jsx(ue.Icon,{asChild:!0,children:e.jsx(p.ChevronsUpDown,{className:"size-4 text-foreground-subtle shrink-0","aria-hidden":!0})})]})});tn.displayName="SelectTrigger";const fs="flex h-6 cursor-default items-center justify-center text-foreground-subtle",Ln=l.forwardRef(function({className:t,...r},s){return e.jsx(ue.ScrollUpButton,{ref:s,className:m(fs,t),...r,children:e.jsx(p.ChevronUp,{className:"size-4","aria-hidden":!0})})});Ln.displayName="SelectScrollUpButton";const On=l.forwardRef(function({className:t,...r},s){return e.jsx(ue.ScrollDownButton,{ref:s,className:m(fs,t),...r,children:e.jsx(p.ChevronDown,{className:"size-4","aria-hidden":!0})})});On.displayName="SelectScrollDownButton";const nn=l.forwardRef(function({className:t,children:r,position:s="popper",...a},o){return e.jsx(ue.Portal,{children:e.jsxs(ue.Content,{ref:o,position:s,className:m("z-[var(--z-popover)] min-w-[var(--radix-select-trigger-width)] max-h-96","overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground","shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",t),...a,children:[e.jsx(Ln,{}),e.jsx(ue.Viewport,{className:"p-1",children:r}),e.jsx(On,{})]})})});nn.displayName="SelectContent";const Fn=l.forwardRef(function({className:t,...r},s){return e.jsx(ue.Label,{ref:s,className:m("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});Fn.displayName="SelectLabel";const tt=l.forwardRef(function({className:t,children:r,leadingIcon:s,...a},o){return e.jsxs(ue.Item,{ref:o,className:m("relative flex w-full cursor-default select-none items-center gap-2","rounded-sm px-2 py-1.5 pr-8 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[s&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:s}),e.jsx(ue.ItemText,{children:r}),e.jsx("span",{className:"absolute right-2 flex items-center justify-center",children:e.jsx(ue.ItemIndicator,{children:e.jsx(p.Check,{className:"size-4 text-accent","aria-hidden":!0})})})]})});tt.displayName="SelectItem";const ms=l.forwardRef(function({className:t,...r},s){return e.jsx(ue.Separator,{ref:s,className:m("-mx-1 my-1 h-px bg-border",t),...r})});ms.displayName="SelectSeparator";const xs=l.forwardRef(function({label:t,children:r,...s},a){return e.jsxs(ue.Group,{ref:a,...s,children:[t&&e.jsx(Fn,{children:t}),r]})});xs.displayName="SelectGroup";function co(n,t,r=7){if(t<=r)return Array.from({length:t},(d,u)=>u+1);const s=1,a=[],o=Math.max(2,n-s),i=Math.min(t-1,n+s);a.push(1),o>2&&a.push("gap");for(let d=o;d<=i;d++)a.push(d);return i<t-1&&a.push("gap"),a.push(t),a}const _n=l.forwardRef(function({page:t,pageCount:r,onPageChange:s,totalItems:a,pageSize:o,pageSizeOptions:i,onPageSizeChange:d,showJump:u=!0,className:c,...g},x){const f=l.useMemo(()=>co(t,r),[t,r]),b=o?(t-1)*o+1:void 0,h=o&&a?Math.min(t*o,a):void 0,v=w=>{w<1||w>r||w===t||s(w)};return e.jsxs("nav",{ref:x,"aria-label":"Pagination",className:m("flex flex-wrap items-center justify-between gap-3",c),...g,children:[e.jsxs("div",{className:"flex items-center gap-3 text-sm text-foreground-muted",children:[a!==void 0&&o!==void 0&&e.jsxs("span",{className:"tabular",children:["Showing ",b,"–",h," of ",a]}),i&&d&&o!==void 0&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"page-size",className:"sr-only",children:"Rows per page"}),e.jsxs(An,{value:String(o),onValueChange:w=>d(Number(w)),children:[e.jsx(tn,{size:"sm",className:"w-[7.5rem] whitespace-nowrap"}),e.jsx(nn,{children:i.map(w=>e.jsxs(tt,{value:String(w),children:[w," / page"]},w))})]})]})]}),e.jsxs("ul",{className:"flex items-center gap-1",children:[u&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to first page",disabled:t===1,onClick:()=>v(1),className:Ft,children:e.jsx(p.ChevronsLeft,{className:"size-4","aria-hidden":!0})})}),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Previous page",disabled:t===1,onClick:()=>v(t-1),className:Ft,children:e.jsx(p.ChevronLeft,{className:"size-4","aria-hidden":!0})})}),f.map((w,j)=>w==="gap"?e.jsx("li",{className:"px-2 text-foreground-subtle",children:"…"},`gap-${j}`):e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":`Page ${w}`,"aria-current":w===t?"page":void 0,onClick:()=>v(w),className:m("inline-flex size-8 items-center justify-center rounded-md text-sm tabular outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",w===t?"bg-accent text-on-accent font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground"),children:w})},w)),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Next page",disabled:t===r,onClick:()=>v(t+1),className:Ft,children:e.jsx(p.ChevronRight,{className:"size-4","aria-hidden":!0})})}),u&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to last page",disabled:t===r,onClick:()=>v(r),className:Ft,children:e.jsx(p.ChevronsRight,{className:"size-4","aria-hidden":!0})})})]})]})});_n.displayName="Pagination";const Ft=m("inline-flex size-8 items-center justify-center rounded-md text-foreground-muted","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","disabled:opacity-50 disabled:pointer-events-none","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),uo=Z.Root,fo=Z.Trigger,mo=Z.Anchor,xo=Z.Close,gs=l.forwardRef(function({className:t,align:r="center",sideOffset:s=4,...a},o){return e.jsx(Z.Portal,{children:e.jsx(Z.Content,{ref:o,align:r,sideOffset:s,className:m("z-[var(--z-popover)] w-72 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-md","outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1","data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1",t),...a})})});gs.displayName="PopoverContent";const go={sm:"h-1",md:"h-1.5",lg:"h-2"},po={accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},ps=l.forwardRef(function({className:t,value:r,size:s="md",tone:a="accent",...o},i){const d=r==null;return e.jsxs(er.Root,{ref:i,value:d?void 0:r,className:m("relative w-full overflow-hidden rounded-full bg-background-muted",go[s],t),...o,children:[e.jsx(er.Indicator,{className:m("h-full w-full flex-1 transition-transform",po[a],d&&"animate-[progressIndeterminate_1.4s_ease-in-out_infinite] origin-left"),style:d?void 0:{transform:`translateX(-${100-(r??0)}%)`}}),e.jsx("style",{children:`
|
|
2
2
|
@keyframes progressIndeterminate {
|
|
3
3
|
0% { transform: translateX(-100%) scaleX(0.6); }
|
|
4
4
|
50% { transform: translateX(0%) scaleX(0.4); }
|
|
5
5
|
100% { transform: translateX(100%) scaleX(0.6); }
|
|
6
6
|
}
|
|
7
|
-
`})]})});ps.displayName="Progress";const ho={accent:"stroke-accent",success:"stroke-success",warning:"stroke-warning",danger:"stroke-danger"},hs=l.forwardRef(function({value:t,size:r=36,thickness:s=3,className:a,tone:o="accent",...i},d){const u=t===void 0,c=(r-s)/2,g=2*Math.PI*c,x=u?0:g-Math.min(100,Math.max(0,t))/100*g;return e.jsxs("svg",{ref:d,width:r,height:r,viewBox:`0 0 ${r} ${r}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u?void 0:t,className:m("shrink-0",u&&"animate-spin",a),...i,children:[e.jsx("circle",{cx:r/2,cy:r/2,r:c,strokeWidth:s,className:"stroke-background-muted fill-none"}),e.jsx("circle",{cx:r/2,cy:r/2,r:c,strokeWidth:s,strokeLinecap:"round",strokeDasharray:g,strokeDashoffset:u?g*.7:x,className:m(ho[o],"fill-none transition-[stroke-dashoffset]"),transform:`rotate(-90 ${r/2} ${r/2})`})]})});hs.displayName="ProgressCircle";const Bn=l.forwardRef(function({className:t,orientation:r="vertical",...s},a){return e.jsx(hn.Root,{ref:a,className:m("flex gap-3",r==="vertical"?"flex-col":"flex-row flex-wrap",t),...s})});Bn.displayName="RadioGroup";const vt=l.forwardRef(function({className:t,label:r,description:s,hideLabel:a,id:o,disabled:i,...d},u){const c=l.useId(),g=o??c,x=s?`${g}-desc`:void 0;return e.jsxs("div",{className:m("flex items-start gap-2.5",t),children:[e.jsx(hn.Item,{ref:u,id:g,disabled:i,"aria-describedby":x,className:m("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border bg-card","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:border-accent","disabled:cursor-not-allowed disabled:opacity-50","border-border-strong"),...d,children:e.jsx(hn.Indicator,{className:"flex items-center justify-center",children:e.jsx("span",{className:"size-2 rounded-full bg-accent","aria-hidden":!0})})}),r&&e.jsxs("div",{className:m("flex flex-col gap-0.5",a&&"sr-only"),children:[e.jsx("label",{htmlFor:g,className:m("text-sm text-foreground select-none",i&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:x,className:"text-xs text-foreground-subtle",children:s})]})]})});vt.displayName="RadioItem";const bs=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(ht.Root,{ref:a,className:m("relative overflow-hidden",t),...s,children:[e.jsx(ht.Viewport,{className:"h-full w-full rounded-[inherit]",children:r}),e.jsx($n,{}),e.jsx(ht.Corner,{})]})});bs.displayName="ScrollArea";const $n=l.forwardRef(function({className:t,orientation:r="vertical",...s},a){return e.jsx(ht.ScrollAreaScrollbar,{ref:a,orientation:r,className:m("flex touch-none select-none transition-colors duration-[var(--duration-fast)]",r==="vertical"&&"h-full w-2 border-l border-l-transparent p-px",r==="horizontal"&&"h-2 flex-col border-t border-t-transparent p-px",t),...s,children:e.jsx(ht.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border-strong"})})});$n.displayName="ScrollBar";const nt=l.forwardRef(function({className:t,orientation:r="horizontal",decorative:s=!0,...a},o){return e.jsx(Ra.Root,{ref:o,orientation:r,decorative:s,className:m("shrink-0 bg-border",r==="horizontal"?"h-px w-full":"h-full w-px",t),...a})});nt.displayName="Separator";const bo=H.Root,vo=H.Trigger,jo=H.Close,vs=H.Portal,js=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Overlay,{ref:s,className:m("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",t),...r})});js.displayName="SheetOverlay";const wo=ke.cva(["fixed z-[var(--z-modal)] bg-card text-card-foreground shadow-lg","flex flex-col gap-4 p-6","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:duration-[var(--duration-base)] data-[state=open]:duration-[var(--duration-slow)]"],{variants:{side:{top:"inset-x-0 top-0 border-b border-border data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top",bottom:"inset-x-0 bottom-0 border-t border-border data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom",left:"inset-y-0 left-0 h-full w-3/4 max-w-md border-r border-border data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left",right:"inset-y-0 right-0 h-full w-3/4 max-w-md border-l border-border data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right"}},defaultVariants:{side:"right"}}),ws=l.forwardRef(function({className:t,children:r,side:s="right",showClose:a=!0,...o},i){return e.jsxs(vs,{children:[e.jsx(js,{}),e.jsxs(H.Content,{ref:i,className:m(wo({side:s}),t),...o,children:[r,a&&e.jsx(H.Close,{"aria-label":"Close",className:m("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})})]})]})});ws.displayName="SheetContent";function ys({className:n,...t}){return e.jsx("div",{className:m("flex flex-col gap-1",n),...t})}ys.displayName="SheetHeader";function Ns({className:n,...t}){return e.jsx("div",{className:m("mt-auto flex flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-end",n),...t})}Ns.displayName="SheetFooter";const Cs=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Title,{ref:s,className:m("text-lg font-semibold text-foreground leading-tight",t),...r})});Cs.displayName="SheetTitle";const Ss=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Description,{ref:s,className:m("text-sm text-foreground-muted",t),...r})});Ss.displayName="SheetDescription";const nn=l.createContext({collapsed:!1}),Hn=l.forwardRef(function({defaultCollapsed:t=!1,collapsed:r,onCollapsedChange:s,header:a,footer:o,className:i,children:d,...u},c){const[g,x]=l.useState(t),f=r??g,b=h=>{r===void 0&&x(h),s==null||s(h)};return e.jsx(nn.Provider,{value:{collapsed:f},children:e.jsxs("aside",{ref:c,"aria-label":"Primary",className:m("sticky top-0 hidden md:flex h-screen shrink-0 flex-col gap-2 border-r border-border bg-background-subtle","transition-[width] duration-[var(--duration-base)] ease-[var(--ease-out)]",f?"w-14":"w-60",i),...u,children:[a&&e.jsx("div",{className:"flex h-14 shrink-0 items-center border-b border-border px-3",children:a}),e.jsx("div",{className:"flex-1 overflow-y-auto py-3",children:d}),o&&e.jsx("div",{className:"border-t border-border p-2",children:o}),e.jsxs("button",{type:"button",onClick:()=>b(!f),"aria-label":f?"Expand sidebar":"Collapse sidebar","aria-expanded":!f,className:m("flex h-8 items-center gap-2 mx-2 mb-2 rounded-md px-2 text-foreground-subtle","hover:bg-background-muted hover:text-foreground outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-colors duration-[var(--duration-fast)]"),children:[f?e.jsx(p.ChevronsRight,{className:"size-4","aria-hidden":!0}):e.jsx(p.ChevronsLeft,{className:"size-4","aria-hidden":!0}),!f&&e.jsx("span",{className:"text-xs font-medium",children:"Collapse"})]})]})})});Hn.displayName="Sidebar";function jt({label:n,className:t,children:r,...s}){const{collapsed:a}=l.useContext(nn);return e.jsxs("div",{className:m("mb-3",t),...s,children:[n&&!a&&e.jsx("div",{className:"px-4 pb-1 pt-2 text-xs font-medium text-foreground-subtle uppercase tracking-wide",children:n}),e.jsx("ul",{className:"flex flex-col gap-px",children:r})]})}jt.displayName="SidebarSection";function De({icon:n,active:t,href:r,trailing:s,sub:a,className:o,children:i,...d}){const{collapsed:u}=l.useContext(nn),c=r?"a":"button";return e.jsx("li",{children:e.jsxs(c,{href:r,"aria-current":t?"page":void 0,className:m("mx-2 flex h-8 items-center gap-2 rounded-md px-2 text-sm outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t?"bg-background-muted text-foreground font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground",a&&!u&&"ml-6",u&&"justify-center",o),...d,children:[n&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:n}),!u&&e.jsx("span",{className:"flex-1 truncate text-left",children:i}),!u&&s&&e.jsx("span",{className:"ml-auto",children:s})]})})}De.displayName="SidebarItem";function ks({icon:n,label:t,defaultOpen:r=!0,children:s}){const{collapsed:a}=l.useContext(nn),[o,i]=l.useState(r);return a?e.jsx(e.Fragment,{children:s}):e.jsxs("li",{children:[e.jsxs("button",{type:"button",onClick:()=>i(d=>!d),"aria-expanded":o,className:m("mx-2 flex h-8 w-[calc(100%-1rem)] items-center gap-2 rounded-md px-2 text-sm text-foreground-muted outline-none","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[n&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:n}),e.jsx("span",{className:"flex-1 text-left",children:t}),e.jsx(p.ChevronDown,{className:m("size-3.5 transition-transform",o&&"rotate-180"),"aria-hidden":!0})]}),o&&e.jsx("ul",{className:"flex flex-col gap-px",children:s})]})}ks.displayName="SidebarGroup";const Ts=l.forwardRef(function({className:t,label:r,showValue:s,formatValue:a=c=>String(c),value:o,defaultValue:i,...d},u){const c=o??i??[0],g=c.length>1;return e.jsxs("div",{className:m("flex flex-col gap-2",t),children:[(r||s)&&e.jsxs("div",{className:"flex items-center justify-between",children:[r&&e.jsx("span",{className:"text-sm font-medium text-foreground",children:r}),s&&e.jsx("span",{className:"text-xs tabular text-foreground-muted font-mono",children:g?`${a(c[0])} – ${a(c[1])}`:a(c[0])})]}),e.jsxs(Lt.Root,{ref:u,value:o,defaultValue:i,className:"relative flex w-full touch-none select-none items-center",...d,children:[e.jsx(Lt.Track,{className:"relative h-1 w-full grow overflow-hidden rounded-full bg-background-muted",children:e.jsx(Lt.Range,{className:"absolute h-full bg-accent"})}),c.map((x,f)=>e.jsx(Lt.Thumb,{className:m("block size-4 rounded-full border-2 border-accent bg-card shadow-sm","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-transform duration-[var(--duration-fast)] ease-[var(--ease-out)]","hover:scale-110 disabled:pointer-events-none disabled:opacity-50"),"aria-label":g?f===0?"Minimum":"Maximum":r?String(r):"Value"},f))]})]})});Ts.displayName="Slider";const yo={sm:"size-3.5",md:"size-4",lg:"size-6"},No={accent:"text-accent",neutral:"text-foreground-subtle","on-accent":"text-on-accent"},Ds=l.forwardRef(function({className:t,tone:r="accent",size:s="md",label:a,decorative:o,...i},d){return e.jsxs("svg",{ref:d,viewBox:"0 0 24 24",role:o?void 0:"status","aria-label":o?void 0:a??"Loading","aria-hidden":o||void 0,className:m("animate-spin",yo[s],No[r],t),...i,children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeOpacity:.2,fill:"none"}),e.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",fill:"none"})]})});Ds.displayName="Spinner";const Un=l.forwardRef(function({steps:t,current:r,orientation:s="horizontal",className:a,...o},i){return e.jsx("ol",{ref:i,"aria-label":"Progress",className:m(s==="horizontal"?"flex w-full items-center":"flex flex-col gap-6",a),...o,children:t.map((d,u)=>{const c=u<r?"complete":u===r?"current":"upcoming",g=u===t.length-1;return e.jsxs("li",{"aria-current":c==="current"?"step":void 0,className:m(s==="horizontal"?"flex flex-1 items-center gap-3 last:flex-initial":"flex items-start gap-3"),children:[e.jsxs("div",{className:m(s==="horizontal"?"flex items-center gap-3":"flex flex-col items-center"),children:[e.jsx("span",{"aria-hidden":!0,className:m("inline-flex size-7 items-center justify-center rounded-full text-xs font-semibold transition-colors",c==="complete"&&"bg-accent text-on-accent",c==="current"&&"bg-card border-2 border-accent text-accent",c==="upcoming"&&"bg-background-muted text-foreground-subtle border border-border"),children:c==="complete"?e.jsx(p.Check,{className:"size-4"}):u+1}),s==="vertical"&&!g&&e.jsx("span",{className:m("mt-1 w-px flex-1 min-h-6",u<r?"bg-accent":"bg-border")})]}),e.jsxs("div",{className:m("flex flex-col",s==="horizontal"&&"min-w-0"),children:[e.jsx("span",{className:m("text-sm font-medium",c==="upcoming"?"text-foreground-subtle":"text-foreground"),children:d.title}),s==="vertical"&&d.description&&e.jsx("p",{className:"text-xs text-foreground-muted mt-0.5",children:d.description})]}),s==="horizontal"&&!g&&e.jsx("span",{"aria-hidden":!0,className:m("h-px flex-1 mx-2",u<r?"bg-accent":"bg-border")})]},u)})})});Un.displayName="Stepper";const Co={sm:"h-4 w-7",md:"h-5 w-9"},So={sm:"size-3 data-[state=checked]:translate-x-3",md:"size-4 data-[state=checked]:translate-x-4"},ot=l.forwardRef(function({className:t,label:r,description:s,labelPosition:a="after",size:o="md",hideLabel:i,id:d,disabled:u,...c},g){const x=l.useId(),f=d??x,b=s?`${f}-desc`:void 0,h=e.jsx(tr.Root,{ref:g,id:f,disabled:u,"aria-describedby":b,className:m("peer inline-flex shrink-0 items-center rounded-full border-2 border-transparent","transition-colors duration-[var(--duration-base)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-accent data-[state=unchecked]:bg-neutral-300 dark:data-[state=unchecked]:bg-neutral-700",Co[o]),...c,children:e.jsx(tr.Thumb,{className:m("pointer-events-none block rounded-full bg-white shadow-sm","transition-transform duration-[var(--duration-base)] ease-[var(--ease-out)]","translate-x-0",So[o])})}),v=r&&e.jsxs("div",{className:m("flex flex-col gap-0.5 select-none",i&&"sr-only"),children:[e.jsx("label",{htmlFor:f,className:m("text-sm text-foreground",u&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:b,className:"text-xs text-foreground-subtle",children:s})]});return e.jsxs("div",{className:m("inline-flex items-center gap-2.5",t),children:[a==="before"&&v,h,a==="after"&&v]})});ot.displayName="Switch";const Rs=Vt.Root,ko=ke.cva("inline-flex items-center",{variants:{variant:{underline:"gap-4 border-b border-border w-full",pills:"gap-1 rounded-lg bg-background-muted p-1"},size:{sm:"h-9 text-xs",md:"h-10 text-sm",lg:"h-11 text-sm"}},defaultVariants:{variant:"underline",size:"md"}}),Vn=l.forwardRef(function({className:t,variant:r="underline",size:s,...a},o){return e.jsx(Vt.List,{ref:o,"data-variant":r,className:m(ko({variant:r,size:s}),t),...a})});Vn.displayName="TabsList";const it=l.forwardRef(function({className:t,...r},s){return e.jsx(Vt.Trigger,{ref:s,className:m("inline-flex items-center gap-2 whitespace-nowrap font-medium","outline-none transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[[data-variant=underline]_&]:relative [[data-variant=underline]_&]:h-full","[[data-variant=underline]_&]:px-1 [[data-variant=underline]_&]:text-foreground-muted","[[data-variant=underline]_&]:hover:text-foreground","[[data-variant=underline]_&]:data-[state=active]:text-foreground","[[data-variant=underline]_&]:data-[state=active]:after:absolute","[[data-variant=underline]_&]:data-[state=active]:after:inset-x-0","[[data-variant=underline]_&]:data-[state=active]:after:-bottom-px","[[data-variant=underline]_&]:data-[state=active]:after:h-0.5","[[data-variant=underline]_&]:data-[state=active]:after:bg-accent","[[data-variant=pills]_&]:h-full [[data-variant=pills]_&]:rounded-md [[data-variant=pills]_&]:px-3","[[data-variant=pills]_&]:text-foreground-muted","[[data-variant=pills]_&]:hover:text-foreground","[[data-variant=pills]_&]:data-[state=active]:bg-card","[[data-variant=pills]_&]:data-[state=active]:text-foreground","[[data-variant=pills]_&]:data-[state=active]:shadow-xs",t),...r})});it.displayName="TabsTrigger";const lt=l.forwardRef(function({className:t,...r},s){return e.jsx(Vt.Content,{ref:s,className:m("mt-4 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t),...r})});lt.displayName="TabsContent";const Is=l.forwardRef(function({className:t,label:r,helperText:s,error:a,autoResize:o,minRows:i=3,maxRows:d=12,hideLabel:u,id:c,onChange:g,value:x,defaultValue:f,...b},h){const v=l.useId(),w=c??v,j=`${w}-helper`,N=`${w}-error`,S=l.useRef(null),y=D=>{S.current=D,typeof h=="function"?h(D):h&&(h.current=D)},k=l.useCallback(()=>{const D=S.current;if(!D||!o)return;D.style.height="auto";const T=(parseFloat(getComputedStyle(D).lineHeight)||20)*d;D.style.height=`${Math.min(D.scrollHeight,T)}px`,D.style.overflowY=D.scrollHeight>T?"auto":"hidden"},[o,d]);return l.useEffect(()=>{o&&k()},[o,k,x,f]),e.jsxs("div",{className:m("flex flex-col gap-1.5",t),children:[r&&e.jsx("label",{htmlFor:w,className:m("text-sm font-medium text-foreground",u&&"sr-only"),children:r}),e.jsx("textarea",{ref:y,id:w,rows:i,value:x,defaultValue:f,onChange:D=>{g==null||g(D),o&&k()},"aria-invalid":!!a||void 0,"aria-describedby":a?N:s?j:void 0,className:m("rounded-md border bg-card px-3 py-2 text-sm text-foreground","placeholder:text-foreground-subtle","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",a?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent",o?"resize-none":"resize-y min-h-20"),...b}),a?e.jsx("p",{id:N,role:"alert",className:"text-xs text-danger-text",children:a}):s?e.jsx("p",{id:j,className:"text-xs text-foreground-subtle",children:s}):null]})});Is.displayName="Textarea";const To=st.Provider,Ps=l.forwardRef(function({className:t,...r},s){return e.jsx(st.Viewport,{ref:s,className:m("fixed bottom-0 right-0 z-[var(--z-toast)] flex max-h-screen w-full flex-col-reverse gap-2 p-6","sm:bottom-auto sm:top-4 sm:right-4 sm:max-w-sm sm:flex-col",t),...r})});Ps.displayName="ToastViewport";const Do=ke.cva(["group pointer-events-auto relative flex w-full items-start gap-3","overflow-hidden rounded-lg border p-4 pr-8 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-right-full","data-[state=closed]:slide-out-to-right-full","data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform","data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)]"],{variants:{variant:{default:"border-border bg-card text-card-foreground",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text",info:"border-info-border-soft bg-info-soft text-info-text"}},defaultVariants:{variant:"default"}}),Ro={default:null,success:e.jsx(p.CheckCircle2,{className:"size-5 text-success-text shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(p.AlertTriangle,{className:"size-5 text-warning-text shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(p.XCircle,{className:"size-5 text-danger-text shrink-0 mt-0.5","aria-hidden":!0}),info:e.jsx(p.Info,{className:"size-5 text-info-text shrink-0 mt-0.5","aria-hidden":!0})},Ms=l.forwardRef(function({className:t,variant:r="default",children:s,...a},o){return e.jsxs(st.Root,{ref:o,className:m(Do({variant:r}),t),...a,children:[Ro[r??"default"],e.jsx("div",{className:"flex-1 space-y-1",children:s})]})});Ms.displayName="Toast";const zs=l.forwardRef(function({className:t,...r},s){return e.jsx(st.Title,{ref:s,className:m("text-sm font-medium",t),...r})});zs.displayName="ToastTitle";const Es=l.forwardRef(function({className:t,...r},s){return e.jsx(st.Description,{ref:s,className:m("text-sm opacity-90",t),...r})});Es.displayName="ToastDescription";const As=l.forwardRef(function({className:t,...r},s){return e.jsx(st.Action,{ref:s,className:m("inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-current bg-transparent px-3 text-sm font-medium","transition-colors hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card",t),...r})});As.displayName="ToastAction";const Ls=l.forwardRef(function({className:t,...r},s){return e.jsx(st.Close,{ref:s,"aria-label":"Close",className:m("absolute right-2 top-2 inline-flex size-7 items-center justify-center rounded-md text-foreground-subtle","opacity-0 transition-opacity group-hover:opacity-100 hover:text-foreground","outline-none focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-ring",t),"toast-close":"",...r,children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})})});Ls.displayName="ToastClose";const Io=({delayDuration:n=500,skipDelayDuration:t=200,...r})=>e.jsx(Nt.Provider,{delayDuration:n,skipDelayDuration:t,...r}),Os=Nt.Root,Fs=Nt.Trigger,Gn=l.forwardRef(function({className:t,sideOffset:r=4,...s},a){return e.jsx(Nt.Portal,{children:e.jsx(Nt.Content,{ref:a,sideOffset:r,className:m("z-[var(--z-tooltip)] overflow-hidden rounded-md px-2 py-1 text-xs font-medium","bg-neutral-900 text-neutral-50","dark:bg-neutral-50 dark:text-neutral-900","shadow-sm max-w-xs","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",t),...s})})});Gn.displayName="TooltipContent";function _s({children:n,label:t,side:r="top",align:s="center",disabled:a,delayDuration:o}){return a?e.jsx(e.Fragment,{children:n}):e.jsxs(Os,{delayDuration:o,children:[e.jsx(Fs,{asChild:!0,children:n}),e.jsx(Gn,{side:r,align:s,children:t})]})}_s.displayName="Tooltip";const Bs=l.forwardRef(function({logo:t,nav:r,search:s,actions:a,className:o,...i},d){return e.jsxs("header",{ref:d,className:m("sticky top-0 z-[var(--z-sticky)] flex h-14 w-full items-center gap-4","border-b border-border bg-background/80 px-4 backdrop-blur","supports-[backdrop-filter]:bg-background/60",o),...i,children:[e.jsxs("div",{className:"flex items-center gap-6 shrink-0",children:[t,r&&e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:r})]}),s&&e.jsx("div",{className:"flex-1 max-w-md mx-auto",children:s}),a&&e.jsx("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:a})]})});Bs.displayName="TopNav";const $s=l.forwardRef(function({href:t,active:r,className:s,children:a,...o},i){return e.jsx("a",{ref:i,href:t,"aria-current":r?"page":void 0,className:m("inline-flex h-9 items-center rounded-md px-3 text-sm font-medium outline-none","transition-colors duration-[var(--duration-fast)]",r?"text-foreground":"text-foreground-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",s),...o,children:a})});$s.displayName="TopNavLink";const Po=l.forwardRef(function({className:t,classNames:r,...s},a){return e.jsx(yn.DayPicker,{showOutsideDays:!0,className:m("p-3",t),classNames:{months:"flex flex-col gap-4",month:"flex flex-col gap-3",caption:"flex items-center justify-between px-1",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:"inline-flex h-7 w-7 items-center justify-center rounded-md text-foreground-muted hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none",table:"w-full border-collapse",head_row:"flex",head_cell:"w-9 text-[11px] font-medium text-foreground-subtle",row:"mt-1 flex",cell:"relative h-9 w-9 p-0 text-center",day:"inline-flex h-9 w-9 items-center justify-center rounded-md text-sm hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none",day_selected:"bg-accent text-on-accent hover:bg-accent-700",day_today:"border border-border",day_outside:"text-foreground-subtle",day_disabled:"opacity-40 pointer-events-none",day_range_middle:"bg-accent-soft rounded-none",day_hidden:"invisible",...r},components:{Chevron:({orientation:o})=>o==="left"?e.jsx(p.ChevronLeft,{className:"size-4"}):e.jsx(p.ChevronRight,{className:"size-4"})},...s})});function Mo(n){return Object.prototype.toString.call(n)==="[object Object]"}function rr(n){return Mo(n)||Array.isArray(n)}function zo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function qn(n,t){const r=Object.keys(n),s=Object.keys(t);if(r.length!==s.length)return!1;const a=JSON.stringify(Object.keys(n.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return a!==o?!1:r.every(i=>{const d=n[i],u=t[i];return typeof d=="function"?`${d}`==`${u}`:!rr(d)||!rr(u)?d===u:qn(d,u)})}function sr(n){return n.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function Eo(n,t){if(n.length!==t.length)return!1;const r=sr(n),s=sr(t);return r.every((a,o)=>{const i=s[o];return qn(a,i)})}function Wn(n){return typeof n=="number"}function bn(n){return typeof n=="string"}function rn(n){return typeof n=="boolean"}function ar(n){return Object.prototype.toString.call(n)==="[object Object]"}function Q(n){return Math.abs(n)}function Xn(n){return Math.sign(n)}function wt(n,t){return Q(n-t)}function Ao(n,t){if(n===0||t===0||Q(n)<=Q(t))return 0;const r=wt(Q(n),Q(t));return Q(r/n)}function Lo(n){return Math.round(n*100)/100}function Ct(n){return St(n).map(Number)}function Me(n){return n[Pt(n)]}function Pt(n){return Math.max(0,n.length-1)}function Kn(n,t){return t===Pt(n)}function or(n,t=0){return Array.from(Array(n),(r,s)=>t+s)}function St(n){return Object.keys(n)}function Hs(n,t){return[n,t].reduce((r,s)=>(St(s).forEach(a=>{const o=r[a],i=s[a],d=ar(o)&&ar(i);r[a]=d?Hs(o,i):i}),r),{})}function vn(n,t){return typeof t.MouseEvent<"u"&&n instanceof t.MouseEvent}function Oo(n,t){const r={start:s,center:a,end:o};function s(){return 0}function a(u){return o(u)/2}function o(u){return t-u}function i(u,c){return bn(n)?r[n](u):n(t,u,c)}return{measure:i}}function kt(){let n=[];function t(a,o,i,d={passive:!0}){let u;if("addEventListener"in a)a.addEventListener(o,i,d),u=()=>a.removeEventListener(o,i,d);else{const c=a;c.addListener(i),u=()=>c.removeListener(i)}return n.push(u),s}function r(){n=n.filter(a=>a())}const s={add:t,clear:r};return s}function Fo(n,t,r,s){const a=kt(),o=1e3/60;let i=null,d=0,u=0;function c(){a.add(n,"visibilitychange",()=>{n.hidden&&h()})}function g(){b(),a.clear()}function x(w){if(!u)return;i||(i=w,r(),r());const j=w-i;for(i=w,d+=j;d>=o;)r(),d-=o;const N=d/o;s(N),u&&(u=t.requestAnimationFrame(x))}function f(){u||(u=t.requestAnimationFrame(x))}function b(){t.cancelAnimationFrame(u),i=null,d=0,u=0}function h(){i=null,d=0}return{init:c,destroy:g,start:f,stop:b,update:r,render:s}}function _o(n,t){const r=t==="rtl",s=n==="y",a=s?"y":"x",o=s?"x":"y",i=!s&&r?-1:1,d=g(),u=x();function c(h){const{height:v,width:w}=h;return s?v:w}function g(){return s?"top":r?"right":"left"}function x(){return s?"bottom":r?"left":"right"}function f(h){return h*i}return{scroll:a,cross:o,startEdge:d,endEdge:u,measureSize:c,direction:f}}function rt(n=0,t=0){const r=Q(n-t);function s(c){return c<n}function a(c){return c>t}function o(c){return s(c)||a(c)}function i(c){return o(c)?s(c)?n:t:c}function d(c){return r?c-r*Math.ceil((c-t)/r):c}return{length:r,max:t,min:n,constrain:i,reachedAny:o,reachedMax:a,reachedMin:s,removeOffset:d}}function Us(n,t,r){const{constrain:s}=rt(0,n),a=n+1;let o=i(t);function i(f){return r?Q((a+f)%a):s(f)}function d(){return o}function u(f){return o=i(f),x}function c(f){return g().set(d()+f)}function g(){return Us(n,d(),r)}const x={get:d,set:u,add:c,clone:g};return x}function Bo(n,t,r,s,a,o,i,d,u,c,g,x,f,b,h,v,w,j,N){const{cross:S,direction:y}=n,k=["INPUT","SELECT","TEXTAREA"],D={passive:!1},C=kt(),T=kt(),R=rt(50,225).constrain(b.measure(20)),L={mouse:300,touch:400},E={mouse:500,touch:600},F=h?43:25;let I=!1,M=0,_=0,W=!1,O=!1,K=!1,ee=!1;function Ie(z){if(!N)return;function V(oe){(rn(N)||N(z,oe))&&Fe(oe)}const P=t;C.add(P,"dragstart",oe=>oe.preventDefault(),D).add(P,"touchmove",()=>{},D).add(P,"touchend",()=>{}).add(P,"touchstart",V).add(P,"mousedown",V).add(P,"touchcancel",J).add(P,"contextmenu",J).add(P,"click",we,!0)}function Te(){C.clear(),T.clear()}function Le(){const z=ee?r:t;T.add(z,"touchmove",ne,D).add(z,"touchend",J).add(z,"mousemove",ne,D).add(z,"mouseup",J)}function je(z){const V=z.nodeName||"";return k.includes(V)}function ge(){return(h?E:L)[ee?"mouse":"touch"]}function Oe(z,V){const P=x.add(Xn(z)*-1),oe=g.byDistance(z,!h).distance;return h||Q(z)<R?oe:w&&V?oe*.5:g.byIndex(P.get(),0).distance}function Fe(z){const V=vn(z,s);ee=V,K=h&&V&&!z.buttons&&I,I=wt(a.get(),i.get())>=2,!(V&&z.button!==0)&&(je(z.target)||(W=!0,o.pointerDown(z),c.useFriction(0).useDuration(0),a.set(i),Le(),M=o.readPoint(z),_=o.readPoint(z,S),f.emit("pointerDown")))}function ne(z){if(!vn(z,s)&&z.touches.length>=2)return J(z);const P=o.readPoint(z),oe=o.readPoint(z,S),ye=wt(P,M),Ne=wt(oe,_);if(!O&&!ee&&(!z.cancelable||(O=ye>Ne,!O)))return J(z);const _e=o.pointerMove(z);ye>v&&(K=!0),c.useFriction(.3).useDuration(.75),d.start(),a.add(y(_e)),z.preventDefault()}function J(z){const P=g.byDistance(0,!1).index!==x.get(),oe=o.pointerUp(z)*ge(),ye=Oe(y(oe),P),Ne=Ao(oe,ye),_e=F-10*Ne,ze=j+Ne/50;O=!1,W=!1,T.clear(),c.useDuration(_e).useFriction(ze),u.distance(ye,!h),ee=!1,f.emit("pointerUp")}function we(z){K&&(z.stopPropagation(),z.preventDefault(),K=!1)}function le(){return W}return{init:Ie,destroy:Te,pointerDown:le}}function $o(n,t){let s,a;function o(x){return x.timeStamp}function i(x,f){const h=`client${(f||n.scroll)==="x"?"X":"Y"}`;return(vn(x,t)?x:x.touches[0])[h]}function d(x){return s=x,a=x,i(x)}function u(x){const f=i(x)-i(a),b=o(x)-o(s)>170;return a=x,b&&(s=x),f}function c(x){if(!s||!a)return 0;const f=i(a)-i(s),b=o(x)-o(s),h=o(x)-o(a)>170,v=f/b;return b&&!h&&Q(v)>.1?v:0}return{pointerDown:d,pointerMove:u,pointerUp:c,readPoint:i}}function Ho(){function n(r){const{offsetTop:s,offsetLeft:a,offsetWidth:o,offsetHeight:i}=r;return{top:s,right:a+o,bottom:s+i,left:a,width:o,height:i}}return{measure:n}}function Uo(n){function t(s){return n*(s/100)}return{measure:t}}function Vo(n,t,r,s,a,o,i){const d=[n].concat(s);let u,c,g=[],x=!1;function f(w){return a.measureSize(i.measure(w))}function b(w){if(!o)return;c=f(n),g=s.map(f);function j(N){for(const S of N){if(x)return;const y=S.target===n,k=s.indexOf(S.target),D=y?c:g[k],C=f(y?n:s[k]);if(Q(C-D)>=.5){w.reInit(),t.emit("resize");break}}}u=new ResizeObserver(N=>{(rn(o)||o(w,N))&&j(N)}),r.requestAnimationFrame(()=>{d.forEach(N=>u.observe(N))})}function h(){x=!0,u&&u.disconnect()}return{init:b,destroy:h}}function Go(n,t,r,s,a,o){let i=0,d=0,u=a,c=o,g=n.get(),x=0;function f(){const D=s.get()-n.get(),C=!u;let T=0;return C?(i=0,r.set(s),n.set(s),T=D):(r.set(n),i+=D/u,i*=c,g+=i,n.add(i),T=g-x),d=Xn(T),x=g,k}function b(){const D=s.get()-t.get();return Q(D)<.001}function h(){return u}function v(){return d}function w(){return i}function j(){return S(a)}function N(){return y(o)}function S(D){return u=D,k}function y(D){return c=D,k}const k={direction:v,duration:h,velocity:w,seek:f,settled:b,useBaseFriction:N,useBaseDuration:j,useFriction:y,useDuration:S};return k}function qo(n,t,r,s,a){const o=a.measure(10),i=a.measure(50),d=rt(.1,.99);let u=!1;function c(){return!(u||!n.reachedAny(r.get())||!n.reachedAny(t.get()))}function g(b){if(!c())return;const h=n.reachedMin(t.get())?"min":"max",v=Q(n[h]-t.get()),w=r.get()-t.get(),j=d.constrain(v/i);r.subtract(w*j),!b&&Q(w)<o&&(r.set(n.constrain(r.get())),s.useDuration(25).useBaseFriction())}function x(b){u=!b}return{shouldConstrain:c,constrain:g,toggleActive:x}}function Wo(n,t,r,s,a){const o=rt(-t+n,0),i=x(),d=g(),u=f();function c(h,v){return wt(h,v)<=1}function g(){const h=i[0],v=Me(i),w=i.lastIndexOf(h),j=i.indexOf(v)+1;return rt(w,j)}function x(){return r.map((h,v)=>{const{min:w,max:j}=o,N=o.constrain(h),S=!v,y=Kn(r,v);return S?j:y||c(w,N)?w:c(j,N)?j:N}).map(h=>parseFloat(h.toFixed(3)))}function f(){if(t<=n+a)return[o.max];if(s==="keepSnaps")return i;const{min:h,max:v}=d;return i.slice(h,v)}return{snapsContained:u,scrollContainLimit:d}}function Xo(n,t,r){const s=t[0],a=r?s-n:Me(t);return{limit:rt(a,s)}}function Ko(n,t,r,s){const o=t.min+.1,i=t.max+.1,{reachedMin:d,reachedMax:u}=rt(o,i);function c(f){return f===1?u(r.get()):f===-1?d(r.get()):!1}function g(f){if(!c(f))return;const b=n*(f*-1);s.forEach(h=>h.add(b))}return{loop:g}}function Yo(n){const{max:t,length:r}=n;function s(o){const i=o-t;return r?i/-r:0}return{get:s}}function Qo(n,t,r,s,a){const{startEdge:o,endEdge:i}=n,{groupSlides:d}=a,u=x().map(t.measure),c=f(),g=b();function x(){return d(s).map(v=>Me(v)[i]-v[0][o]).map(Q)}function f(){return s.map(v=>r[o]-v[o]).map(v=>-Q(v))}function b(){return d(c).map(v=>v[0]).map((v,w)=>v+u[w])}return{snaps:c,snapsAligned:g}}function Jo(n,t,r,s,a,o){const{groupSlides:i}=a,{min:d,max:u}=s,c=g();function g(){const f=i(o),b=!n||t==="keepSnaps";return r.length===1?[o]:b?f:f.slice(d,u).map((h,v,w)=>{const j=!v,N=Kn(w,v);if(j){const S=Me(w[0])+1;return or(S)}if(N){const S=Pt(o)-Me(w)[0]+1;return or(S,Me(w)[0])}return h})}return{slideRegistry:c}}function Zo(n,t,r,s,a){const{reachedAny:o,removeOffset:i,constrain:d}=s;function u(h){return h.concat().sort((v,w)=>Q(v)-Q(w))[0]}function c(h){const v=n?i(h):d(h),w=t.map((N,S)=>({diff:g(N-v,0),index:S})).sort((N,S)=>Q(N.diff)-Q(S.diff)),{index:j}=w[0];return{index:j,distance:v}}function g(h,v){const w=[h,h+r,h-r];if(!n)return h;if(!v)return u(w);const j=w.filter(N=>Xn(N)===v);return j.length?u(j):Me(w)-r}function x(h,v){const w=t[h]-a.get(),j=g(w,v);return{index:h,distance:j}}function f(h,v){const w=a.get()+h,{index:j,distance:N}=c(w),S=!n&&o(w);if(!v||S)return{index:j,distance:h};const y=t[j]-N,k=h+g(y,0);return{index:j,distance:k}}return{byDistance:f,byIndex:x,shortcut:g}}function ei(n,t,r,s,a,o,i){function d(x){const f=x.distance,b=x.index!==t.get();o.add(f),f&&(s.duration()?n.start():(n.update(),n.render(1),n.update())),b&&(r.set(t.get()),t.set(x.index),i.emit("select"))}function u(x,f){const b=a.byDistance(x,f);d(b)}function c(x,f){const b=t.clone().set(x),h=a.byIndex(b.get(),f);d(h)}return{distance:u,index:c}}function ti(n,t,r,s,a,o,i,d){const u={passive:!0,capture:!0};let c=0;function g(b){if(!d)return;function h(v){if(new Date().getTime()-c>10)return;i.emit("slideFocusStart"),n.scrollLeft=0;const N=r.findIndex(S=>S.includes(v));Wn(N)&&(a.useDuration(0),s.index(N,0),i.emit("slideFocus"))}o.add(document,"keydown",x,!1),t.forEach((v,w)=>{o.add(v,"focus",j=>{(rn(d)||d(b,j))&&h(w)},u)})}function x(b){b.code==="Tab"&&(c=new Date().getTime())}return{init:g}}function pt(n){let t=n;function r(){return t}function s(u){t=i(u)}function a(u){t+=i(u)}function o(u){t-=i(u)}function i(u){return Wn(u)?u:u.get()}return{get:r,set:s,add:a,subtract:o}}function Vs(n,t){const r=n.scroll==="x"?i:d,s=t.style;let a=null,o=!1;function i(f){return`translate3d(${f}px,0px,0px)`}function d(f){return`translate3d(0px,${f}px,0px)`}function u(f){if(o)return;const b=Lo(n.direction(f));b!==a&&(s.transform=r(b),a=b)}function c(f){o=!f}function g(){o||(s.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:g,to:u,toggleActive:c}}function ni(n,t,r,s,a,o,i,d,u){const g=Ct(a),x=Ct(a).reverse(),f=j().concat(N());function b(C,T){return C.reduce((R,L)=>R-a[L],T)}function h(C,T){return C.reduce((R,L)=>b(R,T)>0?R.concat([L]):R,[])}function v(C){return o.map((T,R)=>({start:T-s[R]+.5+C,end:T+t-.5+C}))}function w(C,T,R){const L=v(T);return C.map(E=>{const F=R?0:-r,I=R?r:0,M=R?"end":"start",_=L[E][M];return{index:E,loopPoint:_,slideLocation:pt(-1),translate:Vs(n,u[E]),target:()=>d.get()>_?F:I}})}function j(){const C=i[0],T=h(x,C);return w(T,r,!1)}function N(){const C=t-i[0]-1,T=h(g,C);return w(T,-r,!0)}function S(){return f.every(({index:C})=>{const T=g.filter(R=>R!==C);return b(T,t)<=.1})}function y(){f.forEach(C=>{const{target:T,translate:R,slideLocation:L}=C,E=T();E!==L.get()&&(R.to(E),L.set(E))})}function k(){f.forEach(C=>C.translate.clear())}return{canLoop:S,clear:k,loop:y,loopPoints:f}}function ri(n,t,r){let s,a=!1;function o(u){if(!r)return;function c(g){for(const x of g)if(x.type==="childList"){u.reInit(),t.emit("slidesChanged");break}}s=new MutationObserver(g=>{a||(rn(r)||r(u,g))&&c(g)}),s.observe(n,{childList:!0})}function i(){s&&s.disconnect(),a=!0}return{init:o,destroy:i}}function si(n,t,r,s){const a={};let o=null,i=null,d,u=!1;function c(){d=new IntersectionObserver(h=>{u||(h.forEach(v=>{const w=t.indexOf(v.target);a[w]=v}),o=null,i=null,r.emit("slidesInView"))},{root:n.parentElement,threshold:s}),t.forEach(h=>d.observe(h))}function g(){d&&d.disconnect(),u=!0}function x(h){return St(a).reduce((v,w)=>{const j=parseInt(w),{isIntersecting:N}=a[j];return(h&&N||!h&&!N)&&v.push(j),v},[])}function f(h=!0){if(h&&o)return o;if(!h&&i)return i;const v=x(h);return h&&(o=v),h||(i=v),v}return{init:c,destroy:g,get:f}}function ai(n,t,r,s,a,o){const{measureSize:i,startEdge:d,endEdge:u}=n,c=r[0]&&a,g=h(),x=v(),f=r.map(i),b=w();function h(){if(!c)return 0;const N=r[0];return Q(t[d]-N[d])}function v(){if(!c)return 0;const N=o.getComputedStyle(Me(s));return parseFloat(N.getPropertyValue(`margin-${u}`))}function w(){return r.map((N,S,y)=>{const k=!S,D=Kn(y,S);return k?f[S]+g:D?f[S]+x:y[S+1][d]-N[d]}).map(Q)}return{slideSizes:f,slideSizesWithGaps:b,startGap:g,endGap:x}}function oi(n,t,r,s,a,o,i,d,u){const{startEdge:c,endEdge:g,direction:x}=n,f=Wn(r);function b(j,N){return Ct(j).filter(S=>S%N===0).map(S=>j.slice(S,S+N))}function h(j){return j.length?Ct(j).reduce((N,S,y)=>{const k=Me(N)||0,D=k===0,C=S===Pt(j),T=a[c]-o[k][c],R=a[c]-o[S][g],L=!s&&D?x(i):0,E=!s&&C?x(d):0,F=Q(R-E-(T+L));return y&&F>t+u&&N.push(S),C&&N.push(j.length),N},[]).map((N,S,y)=>{const k=Math.max(y[S-1]||0);return j.slice(k,N)}):[]}function v(j){return f?b(j,r):h(j)}return{groupSlides:v}}function ii(n,t,r,s,a,o,i){const{align:d,axis:u,direction:c,startIndex:g,loop:x,duration:f,dragFree:b,dragThreshold:h,inViewThreshold:v,slidesToScroll:w,skipSnaps:j,containScroll:N,watchResize:S,watchSlides:y,watchDrag:k,watchFocus:D}=o,C=2,T=Ho(),R=T.measure(t),L=r.map(T.measure),E=_o(u,c),F=E.measureSize(R),I=Uo(F),M=Oo(d,F),_=!x&&!!N,W=x||!!N,{slideSizes:O,slideSizesWithGaps:K,startGap:ee,endGap:Ie}=ai(E,R,L,r,W,a),Te=oi(E,F,w,x,R,L,ee,Ie,C),{snaps:Le,snapsAligned:je}=Qo(E,M,R,L,Te),ge=-Me(Le)+Me(K),{snapsContained:Oe,scrollContainLimit:Fe}=Wo(F,ge,je,N,C),ne=_?Oe:je,{limit:J}=Xo(ge,ne,x),we=Us(Pt(ne),g,x),le=we.clone(),U=Ct(r),z=({dragHandler:$e,scrollBody:mt,scrollBounds:He,options:{loop:Ke}})=>{Ke||He.constrain($e.pointerDown()),mt.seek()},V=({scrollBody:$e,translate:mt,location:He,offsetLocation:Ke,previousLocation:on,scrollLooper:ln,slideLooper:cn,dragHandler:dn,animation:un,eventHandler:A,scrollBounds:$,options:{loop:G}},B)=>{const X=$e.settled(),ce=!$.shouldConstrain(),ie=G?X:X&&ce,Pe=ie&&!dn.pointerDown();Pe&&un.stop();const Ce=He.get()*B+on.get()*(1-B);Ke.set(Ce),G&&(ln.loop($e.direction()),cn.loop()),mt.to(Ke.get()),Pe&&A.emit("settle"),ie||A.emit("scroll")},P=Fo(s,a,()=>z(ft),$e=>V(ft,$e)),oe=.68,ye=ne[we.get()],Ne=pt(ye),_e=pt(ye),ze=pt(ye),pe=pt(ye),Ve=Go(Ne,ze,_e,pe,f,oe),dt=Zo(x,ne,ge,J,pe),Be=ei(P,we,le,Ve,dt,pe,i),zt=Yo(J),ut=kt(),an=si(t,r,i,v),{slideRegistry:Et}=Jo(_,N,ne,Fe,Te,U),at=ti(n,r,Et,Be,Ve,ut,i,D),ft={ownerDocument:s,ownerWindow:a,eventHandler:i,containerRect:R,slideRects:L,animation:P,axis:E,dragHandler:Bo(E,n,s,a,pe,$o(E,a),Ne,P,Be,Ve,dt,we,i,I,b,h,j,oe,k),eventStore:ut,percentOfView:I,index:we,indexPrevious:le,limit:J,location:Ne,offsetLocation:ze,previousLocation:_e,options:o,resizeHandler:Vo(t,i,a,r,E,S,T),scrollBody:Ve,scrollBounds:qo(J,ze,pe,Ve,I),scrollLooper:Ko(ge,J,ze,[Ne,ze,_e,pe]),scrollProgress:zt,scrollSnapList:ne.map(zt.get),scrollSnaps:ne,scrollTarget:dt,scrollTo:Be,slideLooper:ni(E,F,ge,O,K,Le,ne,ze,r),slideFocus:at,slidesHandler:ri(t,i,y),slidesInView:an,slideIndexes:U,slideRegistry:Et,slidesToScroll:Te,target:pe,translate:Vs(E,t)};return ft}function li(){let n={},t;function r(c){t=c}function s(c){return n[c]||[]}function a(c){return s(c).forEach(g=>g(t,c)),u}function o(c,g){return n[c]=s(c).concat([g]),u}function i(c,g){return n[c]=s(c).filter(x=>x!==g),u}function d(){n={}}const u={init:r,emit:a,off:i,on:o,clear:d};return u}const ci={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function di(n){function t(o,i){return Hs(o,i||{})}function r(o){const i=o.breakpoints||{},d=St(i).filter(u=>n.matchMedia(u).matches).map(u=>i[u]).reduce((u,c)=>t(u,c),{});return t(o,d)}function s(o){return o.map(i=>St(i.breakpoints||{})).reduce((i,d)=>i.concat(d),[]).map(n.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:s}}function ui(n){let t=[];function r(o,i){return t=i.filter(({options:d})=>n.optionsAtMedia(d).active!==!1),t.forEach(d=>d.init(o,n)),i.reduce((d,u)=>Object.assign(d,{[u.name]:u}),{})}function s(){t=t.filter(o=>o.destroy())}return{init:r,destroy:s}}function Ut(n,t,r){const s=n.ownerDocument,a=s.defaultView,o=di(a),i=ui(o),d=kt(),u=li(),{mergeOptions:c,optionsAtMedia:g,optionsMediaQueries:x}=o,{on:f,off:b,emit:h}=u,v=E;let w=!1,j,N=c(ci,Ut.globalOptions),S=c(N),y=[],k,D,C;function T(){const{container:U,slides:z}=S;D=(bn(U)?n.querySelector(U):U)||n.children[0];const P=bn(z)?D.querySelectorAll(z):z;C=[].slice.call(P||D.children)}function R(U){const z=ii(n,D,C,s,a,U,u);if(U.loop&&!z.slideLooper.canLoop()){const V=Object.assign({},U,{loop:!1});return R(V)}return z}function L(U,z){w||(N=c(N,U),S=g(N),y=z||y,T(),j=R(S),x([N,...y.map(({options:V})=>V)]).forEach(V=>d.add(V,"change",E)),S.active&&(j.translate.to(j.location.get()),j.animation.init(),j.slidesInView.init(),j.slideFocus.init(le),j.eventHandler.init(le),j.resizeHandler.init(le),j.slidesHandler.init(le),j.options.loop&&j.slideLooper.loop(),D.offsetParent&&C.length&&j.dragHandler.init(le),k=i.init(le,y)))}function E(U,z){const V=Te();F(),L(c({startIndex:V},U),z),u.emit("reInit")}function F(){j.dragHandler.destroy(),j.eventStore.clear(),j.translate.clear(),j.slideLooper.clear(),j.resizeHandler.destroy(),j.slidesHandler.destroy(),j.slidesInView.destroy(),j.animation.destroy(),i.destroy(),d.clear()}function I(){w||(w=!0,d.clear(),F(),u.emit("destroy"),u.clear())}function M(U,z,V){!S.active||w||(j.scrollBody.useBaseFriction().useDuration(z===!0?0:S.duration),j.scrollTo.index(U,V||0))}function _(U){const z=j.index.add(1).get();M(z,U,-1)}function W(U){const z=j.index.add(-1).get();M(z,U,1)}function O(){return j.index.add(1).get()!==Te()}function K(){return j.index.add(-1).get()!==Te()}function ee(){return j.scrollSnapList}function Ie(){return j.scrollProgress.get(j.offsetLocation.get())}function Te(){return j.index.get()}function Le(){return j.indexPrevious.get()}function je(){return j.slidesInView.get()}function ge(){return j.slidesInView.get(!1)}function Oe(){return k}function Fe(){return j}function ne(){return n}function J(){return D}function we(){return C}const le={canScrollNext:O,canScrollPrev:K,containerNode:J,internalEngine:Fe,destroy:I,off:b,on:f,emit:h,plugins:Oe,previousScrollSnap:Le,reInit:v,rootNode:ne,scrollNext:_,scrollPrev:W,scrollProgress:Ie,scrollSnapList:ee,scrollTo:M,selectedScrollSnap:Te,slideNodes:we,slidesInView:je,slidesNotInView:ge};return L(t,r),setTimeout(()=>u.emit("init"),0),le}Ut.globalOptions=void 0;function Yn(n={},t=[]){const r=l.useRef(n),s=l.useRef(t),[a,o]=l.useState(),[i,d]=l.useState(),u=l.useCallback(()=>{a&&a.reInit(r.current,s.current)},[a]);return l.useEffect(()=>{qn(r.current,n)||(r.current=n,u())},[n,u]),l.useEffect(()=>{Eo(s.current,t)||(s.current=t,u())},[t,u]),l.useEffect(()=>{if(zo()&&i){Ut.globalOptions=Yn.globalOptions;const c=Ut(i,r.current,s.current);return o(c),()=>c.destroy()}else o(void 0)},[i,o]),[d,a]}Yn.globalOptions=void 0;const Gs=l.createContext(null);function sn(){const n=l.useContext(Gs);if(!n)throw new Error("Carousel components must be used inside <Carousel>");return n}const fi=l.forwardRef(function({opts:t,orientation:r="horizontal",setApi:s,className:a,children:o,...i},d){const[u,c]=Yn({...t,axis:r==="horizontal"?"x":"y"}),[g,x]=l.useState(!1),[f,b]=l.useState(!1),h=l.useCallback(v=>{v&&(x(v.canScrollPrev()),b(v.canScrollNext()))},[]);return l.useEffect(()=>{if(c)return s==null||s(c),h(c),c.on("reInit",h).on("select",h),()=>{c.off("reInit",h).off("select",h)}},[c,h,s]),e.jsx(Gs.Provider,{value:{carouselRef:u,api:c,canPrev:g,canNext:f,scrollPrev:()=>c==null?void 0:c.scrollPrev(),scrollNext:()=>c==null?void 0:c.scrollNext(),orientation:r},children:e.jsx("div",{ref:d,className:m("relative",a),role:"region","aria-roledescription":"carousel",...i,children:o})})}),mi=l.forwardRef(function({className:t,...r},s){const{carouselRef:a,orientation:o}=sn();return e.jsx("div",{ref:a,className:"overflow-hidden",children:e.jsx("div",{ref:s,className:m("flex",o==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...r})})}),xi=l.forwardRef(function({className:t,...r},s){const{orientation:a}=sn();return e.jsx("div",{ref:s,role:"group","aria-roledescription":"slide",className:m("min-w-0 shrink-0 grow-0 basis-full",a==="horizontal"?"pl-4":"pt-4",t),...r})});function gi({className:n}){const{canPrev:t,scrollPrev:r,orientation:s}=sn();return e.jsx(Rt,{"aria-label":"Previous",variant:"outline",disabled:!t,onClick:r,icon:e.jsx(p.ChevronLeft,{}),className:m("absolute z-10",s==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",n)})}function pi({className:n}){const{canNext:t,scrollNext:r,orientation:s}=sn();return e.jsx(Rt,{"aria-label":"Next",variant:"outline",disabled:!t,onClick:r,icon:e.jsx(p.ChevronRight,{}),className:m("absolute z-10",s==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",n)})}function qs(n,t,r,s=8){const a=n.map(f=>f.y),o=Math.min(0,...a),i=Math.max(...a,1),d=i-o||1,u=t-s*2,c=r-s*2;return{sx:f=>n.length<=1?s+u/2:s+f/(n.length-1)*u,sy:f=>s+c-(f-o)/d*c,min:o,max:i}}function hi({data:n,height:t=80,width:r="100%",caption:s,className:a}){const o=typeof r=="number"?r:320,{sx:i,sy:d}=qs(n,o,t),u=n.map((c,g)=>`${g===0?"M":"L"}${i(g).toFixed(1)},${d(c.y).toFixed(1)}`).join(" ");return e.jsxs("figure",{className:m("flex flex-col gap-1.5",a),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsxs("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:[e.jsx("path",{d:u,fill:"none",stroke:"var(--color-accent)",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"}),n.map((c,g)=>e.jsx("circle",{cx:i(g),cy:d(c.y),r:2,fill:"var(--color-accent)"},g))]})]})}function bi({data:n,height:t=80,width:r="100%",caption:s,className:a}){const o=typeof r=="number"?r:320,{sx:i,sy:d}=qs(n,o,t),u=n.map((g,x)=>`${x===0?"M":"L"}${i(x).toFixed(1)},${d(g.y).toFixed(1)}`).join(" "),c=`${u} L${i(n.length-1).toFixed(1)},${t} L${i(0).toFixed(1)},${t} Z`;return e.jsxs("figure",{className:m("flex flex-col gap-1.5",a),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsxs("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:[e.jsx("path",{d:c,fill:"var(--color-accent-soft)"}),e.jsx("path",{d:u,fill:"none",stroke:"var(--color-accent)",strokeWidth:1.5})]})]})}function vi({data:n,height:t=100,width:r="100%",caption:s,className:a}){const o=typeof r=="number"?r:320,i=8,d=2,u=o-i*2,c=Math.max(2,u/n.length-d),g=n.map(f=>f.y),x=Math.max(...g,1);return e.jsxs("figure",{className:m("flex flex-col gap-1.5",a),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsx("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:n.map((f,b)=>{const h=f.y/x*(t-i*2);return e.jsx("rect",{x:i+b*(c+d),y:t-i-h,width:c,height:h,fill:"var(--color-accent)",rx:1.5,children:e.jsx("title",{children:`${f.x}: ${f.y}`})},b)})})]})}function ji(n){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}const Ws=l.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Mt=()=>{const n=l.useContext(Ws);if(!n)throw new Error("useDrawerContext must be used within a Drawer.Root");return n};ji(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
7
|
+
`})]})});ps.displayName="Progress";const ho={accent:"stroke-accent",success:"stroke-success",warning:"stroke-warning",danger:"stroke-danger"},hs=l.forwardRef(function({value:t,size:r=36,thickness:s=3,className:a,tone:o="accent",...i},d){const u=t===void 0,c=(r-s)/2,g=2*Math.PI*c,x=u?0:g-Math.min(100,Math.max(0,t))/100*g;return e.jsxs("svg",{ref:d,width:r,height:r,viewBox:`0 0 ${r} ${r}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u?void 0:t,className:m("shrink-0",u&&"animate-spin",a),...i,children:[e.jsx("circle",{cx:r/2,cy:r/2,r:c,strokeWidth:s,className:"stroke-background-muted fill-none"}),e.jsx("circle",{cx:r/2,cy:r/2,r:c,strokeWidth:s,strokeLinecap:"round",strokeDasharray:g,strokeDashoffset:u?g*.7:x,className:m(ho[o],"fill-none transition-[stroke-dashoffset]"),transform:`rotate(-90 ${r/2} ${r/2})`})]})});hs.displayName="ProgressCircle";const Bn=l.forwardRef(function({className:t,orientation:r="vertical",...s},a){return e.jsx(hn.Root,{ref:a,className:m("flex gap-3",r==="vertical"?"flex-col":"flex-row flex-wrap",t),...s})});Bn.displayName="RadioGroup";const vt=l.forwardRef(function({className:t,label:r,description:s,hideLabel:a,id:o,disabled:i,...d},u){const c=l.useId(),g=o??c,x=s?`${g}-desc`:void 0;return e.jsxs("div",{className:m("flex items-start gap-2.5",t),children:[e.jsx(hn.Item,{ref:u,id:g,disabled:i,"aria-describedby":x,className:m("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border bg-card","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:border-accent","disabled:cursor-not-allowed disabled:opacity-50","border-border-strong"),...d,children:e.jsx(hn.Indicator,{className:"flex items-center justify-center",children:e.jsx("span",{className:"size-2 rounded-full bg-accent","aria-hidden":!0})})}),r&&e.jsxs("div",{className:m("flex flex-col gap-0.5",a&&"sr-only"),children:[e.jsx("label",{htmlFor:g,className:m("text-sm text-foreground select-none",i&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:x,className:"text-xs text-foreground-subtle",children:s})]})]})});vt.displayName="RadioItem";const bs=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(ht.Root,{ref:a,className:m("relative overflow-hidden",t),...s,children:[e.jsx(ht.Viewport,{className:"h-full w-full rounded-[inherit]",children:r}),e.jsx($n,{}),e.jsx(ht.Corner,{})]})});bs.displayName="ScrollArea";const $n=l.forwardRef(function({className:t,orientation:r="vertical",...s},a){return e.jsx(ht.ScrollAreaScrollbar,{ref:a,orientation:r,className:m("flex touch-none select-none transition-colors duration-[var(--duration-fast)]",r==="vertical"&&"h-full w-2 border-l border-l-transparent p-px",r==="horizontal"&&"h-2 flex-col border-t border-t-transparent p-px",t),...s,children:e.jsx(ht.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border-strong"})})});$n.displayName="ScrollBar";const nt=l.forwardRef(function({className:t,orientation:r="horizontal",decorative:s=!0,...a},o){return e.jsx(Ra.Root,{ref:o,orientation:r,decorative:s,className:m("shrink-0 bg-border",r==="horizontal"?"h-px w-full":"h-full w-px",t),...a})});nt.displayName="Separator";const bo=H.Root,vo=H.Trigger,jo=H.Close,vs=H.Portal,js=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Overlay,{ref:s,className:m("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",t),...r})});js.displayName="SheetOverlay";const wo=ke.cva(["fixed z-[var(--z-modal)] bg-card text-card-foreground shadow-lg","flex flex-col gap-4 p-6","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:duration-[var(--duration-base)] data-[state=open]:duration-[var(--duration-slow)]"],{variants:{side:{top:"inset-x-0 top-0 border-b border-border data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top",bottom:"inset-x-0 bottom-0 border-t border-border data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom",left:"inset-y-0 left-0 h-full w-3/4 max-w-md border-r border-border data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left",right:"inset-y-0 right-0 h-full w-3/4 max-w-md border-l border-border data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right"}},defaultVariants:{side:"right"}}),ws=l.forwardRef(function({className:t,children:r,side:s="right",showClose:a=!0,...o},i){return e.jsxs(vs,{children:[e.jsx(js,{}),e.jsxs(H.Content,{ref:i,className:m(wo({side:s}),t),...o,children:[r,a&&e.jsx(H.Close,{"aria-label":"Close",className:m("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})})]})]})});ws.displayName="SheetContent";function ys({className:n,...t}){return e.jsx("div",{className:m("flex flex-col gap-1",n),...t})}ys.displayName="SheetHeader";function Ns({className:n,...t}){return e.jsx("div",{className:m("mt-auto flex flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-end",n),...t})}Ns.displayName="SheetFooter";const Cs=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Title,{ref:s,className:m("text-lg font-semibold text-foreground leading-tight",t),...r})});Cs.displayName="SheetTitle";const Ss=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Description,{ref:s,className:m("text-sm text-foreground-muted",t),...r})});Ss.displayName="SheetDescription";const Pt=l.createContext({collapsed:!1});function yo(){return l.useContext(Pt)}const Hn=l.forwardRef(function({defaultCollapsed:t=!1,collapsed:r,onCollapsedChange:s,header:a,footer:o,className:i,children:d,...u},c){const[g,x]=l.useState(t),f=r??g,b=h=>{r===void 0&&x(h),s==null||s(h)};return e.jsx(Pt.Provider,{value:{collapsed:f},children:e.jsxs("aside",{ref:c,"aria-label":"Primary",className:m("sticky top-0 hidden md:flex h-screen shrink-0 flex-col gap-2 border-r border-border bg-background-subtle","transition-[width] duration-[var(--duration-base)] ease-[var(--ease-out)]",f?"w-14":"w-60",i),...u,children:[a&&e.jsx("div",{className:m("flex h-14 shrink-0 items-center overflow-hidden border-b border-border",f?"justify-center px-2":"px-3"),children:a}),e.jsx("div",{className:"flex-1 overflow-y-auto py-3",children:d}),o&&e.jsx("div",{className:"border-t border-border p-2",children:o}),e.jsxs("button",{type:"button",onClick:()=>b(!f),"aria-label":f?"Expand sidebar":"Collapse sidebar","aria-expanded":!f,className:m("flex h-8 items-center gap-2 mx-2 mb-2 rounded-md px-2 text-foreground-subtle","hover:bg-background-muted hover:text-foreground outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-colors duration-[var(--duration-fast)]"),children:[f?e.jsx(p.ChevronsRight,{className:"size-4","aria-hidden":!0}):e.jsx(p.ChevronsLeft,{className:"size-4","aria-hidden":!0}),!f&&e.jsx("span",{className:"text-xs font-medium",children:"Collapse"})]})]})})});Hn.displayName="Sidebar";function jt({label:n,className:t,children:r,...s}){const{collapsed:a}=l.useContext(Pt);return e.jsxs("div",{className:m("mb-3",t),...s,children:[n&&!a&&e.jsx("div",{className:"px-4 pb-1 pt-2 text-xs font-medium text-foreground-subtle uppercase tracking-wide",children:n}),e.jsx("ul",{className:"flex flex-col gap-px",children:r})]})}jt.displayName="SidebarSection";function De({icon:n,active:t,href:r,trailing:s,sub:a,className:o,children:i,...d}){const{collapsed:u}=l.useContext(Pt),c=r?"a":"button";return e.jsx("li",{children:e.jsxs(c,{href:r,"aria-current":t?"page":void 0,className:m("mx-2 flex h-8 items-center gap-2 rounded-md px-2 text-sm outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t?"bg-background-muted text-foreground font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground",a&&!u&&"ml-6",u&&"justify-center",o),...d,children:[n&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:n}),!u&&e.jsx("span",{className:"flex-1 truncate text-left",children:i}),!u&&s&&e.jsx("span",{className:"ml-auto",children:s})]})})}De.displayName="SidebarItem";function ks({icon:n,label:t,defaultOpen:r=!0,children:s}){const{collapsed:a}=l.useContext(Pt),[o,i]=l.useState(r);return a?e.jsx(e.Fragment,{children:s}):e.jsxs("li",{children:[e.jsxs("button",{type:"button",onClick:()=>i(d=>!d),"aria-expanded":o,className:m("mx-2 flex h-8 w-[calc(100%-1rem)] items-center gap-2 rounded-md px-2 text-sm text-foreground-muted outline-none","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[n&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:n}),e.jsx("span",{className:"flex-1 text-left",children:t}),e.jsx(p.ChevronDown,{className:m("size-3.5 transition-transform",o&&"rotate-180"),"aria-hidden":!0})]}),o&&e.jsx("ul",{className:"flex flex-col gap-px",children:s})]})}ks.displayName="SidebarGroup";const Ts=l.forwardRef(function({className:t,label:r,showValue:s,formatValue:a=c=>String(c),value:o,defaultValue:i,...d},u){const c=o??i??[0],g=c.length>1;return e.jsxs("div",{className:m("flex flex-col gap-2",t),children:[(r||s)&&e.jsxs("div",{className:"flex items-center justify-between",children:[r&&e.jsx("span",{className:"text-sm font-medium text-foreground",children:r}),s&&e.jsx("span",{className:"text-xs tabular text-foreground-muted font-mono",children:g?`${a(c[0])} – ${a(c[1])}`:a(c[0])})]}),e.jsxs(Ot.Root,{ref:u,value:o,defaultValue:i,className:"relative flex w-full touch-none select-none items-center",...d,children:[e.jsx(Ot.Track,{className:"relative h-1 w-full grow overflow-hidden rounded-full bg-background-muted",children:e.jsx(Ot.Range,{className:"absolute h-full bg-accent"})}),c.map((x,f)=>e.jsx(Ot.Thumb,{className:m("block size-4 rounded-full border-2 border-accent bg-card shadow-sm","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-transform duration-[var(--duration-fast)] ease-[var(--ease-out)]","hover:scale-110 disabled:pointer-events-none disabled:opacity-50"),"aria-label":g?f===0?"Minimum":"Maximum":r?String(r):"Value"},f))]})]})});Ts.displayName="Slider";const No={sm:"size-3.5",md:"size-4",lg:"size-6"},Co={accent:"text-accent",neutral:"text-foreground-subtle","on-accent":"text-on-accent"},Ds=l.forwardRef(function({className:t,tone:r="accent",size:s="md",label:a,decorative:o,...i},d){return e.jsxs("svg",{ref:d,viewBox:"0 0 24 24",role:o?void 0:"status","aria-label":o?void 0:a??"Loading","aria-hidden":o||void 0,className:m("animate-spin",No[s],Co[r],t),...i,children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeOpacity:.2,fill:"none"}),e.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",fill:"none"})]})});Ds.displayName="Spinner";const Un=l.forwardRef(function({steps:t,current:r,orientation:s="horizontal",className:a,...o},i){return e.jsx("ol",{ref:i,"aria-label":"Progress",className:m(s==="horizontal"?"flex w-full items-center":"flex flex-col gap-6",a),...o,children:t.map((d,u)=>{const c=u<r?"complete":u===r?"current":"upcoming",g=u===t.length-1;return e.jsxs("li",{"aria-current":c==="current"?"step":void 0,className:m(s==="horizontal"?"flex flex-1 items-center gap-3 last:flex-initial":"flex items-start gap-3"),children:[e.jsxs("div",{className:m(s==="horizontal"?"flex items-center gap-3":"flex flex-col items-center"),children:[e.jsx("span",{"aria-hidden":!0,className:m("inline-flex size-7 items-center justify-center rounded-full text-xs font-semibold transition-colors",c==="complete"&&"bg-accent text-on-accent",c==="current"&&"bg-card border-2 border-accent text-accent",c==="upcoming"&&"bg-background-muted text-foreground-subtle border border-border"),children:c==="complete"?e.jsx(p.Check,{className:"size-4"}):u+1}),s==="vertical"&&!g&&e.jsx("span",{className:m("mt-1 w-px flex-1 min-h-6",u<r?"bg-accent":"bg-border")})]}),e.jsxs("div",{className:m("flex flex-col",s==="horizontal"&&"min-w-0"),children:[e.jsx("span",{className:m("text-sm font-medium",c==="upcoming"?"text-foreground-subtle":"text-foreground"),children:d.title}),s==="vertical"&&d.description&&e.jsx("p",{className:"text-xs text-foreground-muted mt-0.5",children:d.description})]}),s==="horizontal"&&!g&&e.jsx("span",{"aria-hidden":!0,className:m("h-px flex-1 mx-2",u<r?"bg-accent":"bg-border")})]},u)})})});Un.displayName="Stepper";const So={sm:"h-4 w-7",md:"h-5 w-9"},ko={sm:"size-3 data-[state=checked]:translate-x-3",md:"size-4 data-[state=checked]:translate-x-4"},ot=l.forwardRef(function({className:t,label:r,description:s,labelPosition:a="after",size:o="md",hideLabel:i,id:d,disabled:u,...c},g){const x=l.useId(),f=d??x,b=s?`${f}-desc`:void 0,h=e.jsx(tr.Root,{ref:g,id:f,disabled:u,"aria-describedby":b,className:m("peer inline-flex shrink-0 items-center rounded-full border-2 border-transparent","transition-colors duration-[var(--duration-base)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-accent data-[state=unchecked]:bg-neutral-300 dark:data-[state=unchecked]:bg-neutral-700",So[o]),...c,children:e.jsx(tr.Thumb,{className:m("pointer-events-none block rounded-full bg-white shadow-sm","transition-transform duration-[var(--duration-base)] ease-[var(--ease-out)]","translate-x-0",ko[o])})}),v=r&&e.jsxs("div",{className:m("flex flex-col gap-0.5 select-none",i&&"sr-only"),children:[e.jsx("label",{htmlFor:f,className:m("text-sm text-foreground",u&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:b,className:"text-xs text-foreground-subtle",children:s})]});return e.jsxs("div",{className:m("inline-flex items-center gap-2.5",t),children:[a==="before"&&v,h,a==="after"&&v]})});ot.displayName="Switch";const Rs=Gt.Root,To=ke.cva("inline-flex items-center",{variants:{variant:{underline:"gap-4 border-b border-border w-full",pills:"gap-1 rounded-lg bg-background-muted p-1"},size:{sm:"h-9 text-xs",md:"h-10 text-sm",lg:"h-11 text-sm"}},defaultVariants:{variant:"underline",size:"md"}}),Vn=l.forwardRef(function({className:t,variant:r="underline",size:s,...a},o){return e.jsx(Gt.List,{ref:o,"data-variant":r,className:m(To({variant:r,size:s}),t),...a})});Vn.displayName="TabsList";const it=l.forwardRef(function({className:t,...r},s){return e.jsx(Gt.Trigger,{ref:s,className:m("inline-flex items-center gap-2 whitespace-nowrap font-medium","outline-none transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[[data-variant=underline]_&]:relative [[data-variant=underline]_&]:h-full","[[data-variant=underline]_&]:px-1 [[data-variant=underline]_&]:text-foreground-muted","[[data-variant=underline]_&]:hover:text-foreground","[[data-variant=underline]_&]:data-[state=active]:text-foreground","[[data-variant=underline]_&]:data-[state=active]:after:absolute","[[data-variant=underline]_&]:data-[state=active]:after:inset-x-0","[[data-variant=underline]_&]:data-[state=active]:after:-bottom-px","[[data-variant=underline]_&]:data-[state=active]:after:h-0.5","[[data-variant=underline]_&]:data-[state=active]:after:bg-accent","[[data-variant=pills]_&]:h-full [[data-variant=pills]_&]:rounded-md [[data-variant=pills]_&]:px-3","[[data-variant=pills]_&]:text-foreground-muted","[[data-variant=pills]_&]:hover:text-foreground","[[data-variant=pills]_&]:data-[state=active]:bg-card","[[data-variant=pills]_&]:data-[state=active]:text-foreground","[[data-variant=pills]_&]:data-[state=active]:shadow-xs",t),...r})});it.displayName="TabsTrigger";const lt=l.forwardRef(function({className:t,...r},s){return e.jsx(Gt.Content,{ref:s,className:m("mt-4 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t),...r})});lt.displayName="TabsContent";const Is=l.forwardRef(function({className:t,label:r,helperText:s,error:a,autoResize:o,minRows:i=3,maxRows:d=12,hideLabel:u,id:c,onChange:g,value:x,defaultValue:f,...b},h){const v=l.useId(),w=c??v,j=`${w}-helper`,N=`${w}-error`,S=l.useRef(null),y=D=>{S.current=D,typeof h=="function"?h(D):h&&(h.current=D)},k=l.useCallback(()=>{const D=S.current;if(!D||!o)return;D.style.height="auto";const T=(parseFloat(getComputedStyle(D).lineHeight)||20)*d;D.style.height=`${Math.min(D.scrollHeight,T)}px`,D.style.overflowY=D.scrollHeight>T?"auto":"hidden"},[o,d]);return l.useEffect(()=>{o&&k()},[o,k,x,f]),e.jsxs("div",{className:m("flex flex-col gap-1.5",t),children:[r&&e.jsx("label",{htmlFor:w,className:m("text-sm font-medium text-foreground",u&&"sr-only"),children:r}),e.jsx("textarea",{ref:y,id:w,rows:i,value:x,defaultValue:f,onChange:D=>{g==null||g(D),o&&k()},"aria-invalid":!!a||void 0,"aria-describedby":a?N:s?j:void 0,className:m("rounded-md border bg-card px-3 py-2 text-sm text-foreground","placeholder:text-foreground-subtle","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",a?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent",o?"resize-none":"resize-y min-h-20"),...b}),a?e.jsx("p",{id:N,role:"alert",className:"text-xs text-danger-text",children:a}):s?e.jsx("p",{id:j,className:"text-xs text-foreground-subtle",children:s}):null]})});Is.displayName="Textarea";const Do=st.Provider,Ps=l.forwardRef(function({className:t,...r},s){return e.jsx(st.Viewport,{ref:s,className:m("fixed bottom-0 right-0 z-[var(--z-toast)] flex max-h-screen w-full flex-col-reverse gap-2 p-6","sm:bottom-auto sm:top-4 sm:right-4 sm:max-w-sm sm:flex-col",t),...r})});Ps.displayName="ToastViewport";const Ro=ke.cva(["group pointer-events-auto relative flex w-full items-start gap-3","overflow-hidden rounded-lg border p-4 pr-8 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-right-full","data-[state=closed]:slide-out-to-right-full","data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform","data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)]"],{variants:{variant:{default:"border-border bg-card text-card-foreground",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text",info:"border-info-border-soft bg-info-soft text-info-text"}},defaultVariants:{variant:"default"}}),Io={default:null,success:e.jsx(p.CheckCircle2,{className:"size-5 text-success-text shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(p.AlertTriangle,{className:"size-5 text-warning-text shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(p.XCircle,{className:"size-5 text-danger-text shrink-0 mt-0.5","aria-hidden":!0}),info:e.jsx(p.Info,{className:"size-5 text-info-text shrink-0 mt-0.5","aria-hidden":!0})},Ms=l.forwardRef(function({className:t,variant:r="default",children:s,...a},o){return e.jsxs(st.Root,{ref:o,className:m(Ro({variant:r}),t),...a,children:[Io[r??"default"],e.jsx("div",{className:"flex-1 space-y-1",children:s})]})});Ms.displayName="Toast";const zs=l.forwardRef(function({className:t,...r},s){return e.jsx(st.Title,{ref:s,className:m("text-sm font-medium",t),...r})});zs.displayName="ToastTitle";const Es=l.forwardRef(function({className:t,...r},s){return e.jsx(st.Description,{ref:s,className:m("text-sm opacity-90",t),...r})});Es.displayName="ToastDescription";const As=l.forwardRef(function({className:t,...r},s){return e.jsx(st.Action,{ref:s,className:m("inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-current bg-transparent px-3 text-sm font-medium","transition-colors hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card",t),...r})});As.displayName="ToastAction";const Ls=l.forwardRef(function({className:t,...r},s){return e.jsx(st.Close,{ref:s,"aria-label":"Close",className:m("absolute right-2 top-2 inline-flex size-7 items-center justify-center rounded-md text-foreground-subtle","opacity-0 transition-opacity group-hover:opacity-100 hover:text-foreground","outline-none focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-ring",t),"toast-close":"",...r,children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})})});Ls.displayName="ToastClose";const Po=({delayDuration:n=500,skipDelayDuration:t=200,...r})=>e.jsx(Nt.Provider,{delayDuration:n,skipDelayDuration:t,...r}),Os=Nt.Root,Fs=Nt.Trigger,Gn=l.forwardRef(function({className:t,sideOffset:r=4,...s},a){return e.jsx(Nt.Portal,{children:e.jsx(Nt.Content,{ref:a,sideOffset:r,className:m("z-[var(--z-tooltip)] overflow-hidden rounded-md px-2 py-1 text-xs font-medium","bg-neutral-900 text-neutral-50","dark:bg-neutral-50 dark:text-neutral-900","shadow-sm max-w-xs","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",t),...s})})});Gn.displayName="TooltipContent";function _s({children:n,label:t,side:r="top",align:s="center",disabled:a,delayDuration:o}){return a?e.jsx(e.Fragment,{children:n}):e.jsxs(Os,{delayDuration:o,children:[e.jsx(Fs,{asChild:!0,children:n}),e.jsx(Gn,{side:r,align:s,children:t})]})}_s.displayName="Tooltip";const Bs=l.forwardRef(function({logo:t,nav:r,search:s,actions:a,className:o,...i},d){return e.jsxs("header",{ref:d,className:m("sticky top-0 z-[var(--z-sticky)] flex h-14 w-full items-center gap-4","border-b border-border bg-background/80 px-4 backdrop-blur","supports-[backdrop-filter]:bg-background/60",o),...i,children:[e.jsxs("div",{className:"flex items-center gap-6 shrink-0",children:[t,r&&e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:r})]}),s&&e.jsx("div",{className:"flex-1 max-w-md mx-auto",children:s}),a&&e.jsx("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:a})]})});Bs.displayName="TopNav";const $s=l.forwardRef(function({href:t,active:r,className:s,children:a,...o},i){return e.jsx("a",{ref:i,href:t,"aria-current":r?"page":void 0,className:m("inline-flex h-9 items-center rounded-md px-3 text-sm font-medium outline-none","transition-colors duration-[var(--duration-fast)]",r?"text-foreground":"text-foreground-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",s),...o,children:a})});$s.displayName="TopNavLink";const Mo=l.forwardRef(function({className:t,classNames:r,...s},a){return e.jsx(yn.DayPicker,{showOutsideDays:!0,className:m("p-3",t),classNames:{months:"flex flex-col gap-4",month:"flex flex-col gap-3",caption:"flex items-center justify-between px-1",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:"inline-flex h-7 w-7 items-center justify-center rounded-md text-foreground-muted hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none",table:"w-full border-collapse",head_row:"flex",head_cell:"w-9 text-[11px] font-medium text-foreground-subtle",row:"mt-1 flex",cell:"relative h-9 w-9 p-0 text-center",day:"inline-flex h-9 w-9 items-center justify-center rounded-md text-sm hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none",day_selected:"bg-accent text-on-accent hover:bg-accent-700",day_today:"border border-border",day_outside:"text-foreground-subtle",day_disabled:"opacity-40 pointer-events-none",day_range_middle:"bg-accent-soft rounded-none",day_hidden:"invisible",...r},components:{Chevron:({orientation:o})=>o==="left"?e.jsx(p.ChevronLeft,{className:"size-4"}):e.jsx(p.ChevronRight,{className:"size-4"})},...s})});function zo(n){return Object.prototype.toString.call(n)==="[object Object]"}function rr(n){return zo(n)||Array.isArray(n)}function Eo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function qn(n,t){const r=Object.keys(n),s=Object.keys(t);if(r.length!==s.length)return!1;const a=JSON.stringify(Object.keys(n.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return a!==o?!1:r.every(i=>{const d=n[i],u=t[i];return typeof d=="function"?`${d}`==`${u}`:!rr(d)||!rr(u)?d===u:qn(d,u)})}function sr(n){return n.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function Ao(n,t){if(n.length!==t.length)return!1;const r=sr(n),s=sr(t);return r.every((a,o)=>{const i=s[o];return qn(a,i)})}function Wn(n){return typeof n=="number"}function bn(n){return typeof n=="string"}function rn(n){return typeof n=="boolean"}function ar(n){return Object.prototype.toString.call(n)==="[object Object]"}function Q(n){return Math.abs(n)}function Xn(n){return Math.sign(n)}function wt(n,t){return Q(n-t)}function Lo(n,t){if(n===0||t===0||Q(n)<=Q(t))return 0;const r=wt(Q(n),Q(t));return Q(r/n)}function Oo(n){return Math.round(n*100)/100}function Ct(n){return St(n).map(Number)}function Me(n){return n[Mt(n)]}function Mt(n){return Math.max(0,n.length-1)}function Kn(n,t){return t===Mt(n)}function or(n,t=0){return Array.from(Array(n),(r,s)=>t+s)}function St(n){return Object.keys(n)}function Hs(n,t){return[n,t].reduce((r,s)=>(St(s).forEach(a=>{const o=r[a],i=s[a],d=ar(o)&&ar(i);r[a]=d?Hs(o,i):i}),r),{})}function vn(n,t){return typeof t.MouseEvent<"u"&&n instanceof t.MouseEvent}function Fo(n,t){const r={start:s,center:a,end:o};function s(){return 0}function a(u){return o(u)/2}function o(u){return t-u}function i(u,c){return bn(n)?r[n](u):n(t,u,c)}return{measure:i}}function kt(){let n=[];function t(a,o,i,d={passive:!0}){let u;if("addEventListener"in a)a.addEventListener(o,i,d),u=()=>a.removeEventListener(o,i,d);else{const c=a;c.addListener(i),u=()=>c.removeListener(i)}return n.push(u),s}function r(){n=n.filter(a=>a())}const s={add:t,clear:r};return s}function _o(n,t,r,s){const a=kt(),o=1e3/60;let i=null,d=0,u=0;function c(){a.add(n,"visibilitychange",()=>{n.hidden&&h()})}function g(){b(),a.clear()}function x(w){if(!u)return;i||(i=w,r(),r());const j=w-i;for(i=w,d+=j;d>=o;)r(),d-=o;const N=d/o;s(N),u&&(u=t.requestAnimationFrame(x))}function f(){u||(u=t.requestAnimationFrame(x))}function b(){t.cancelAnimationFrame(u),i=null,d=0,u=0}function h(){i=null,d=0}return{init:c,destroy:g,start:f,stop:b,update:r,render:s}}function Bo(n,t){const r=t==="rtl",s=n==="y",a=s?"y":"x",o=s?"x":"y",i=!s&&r?-1:1,d=g(),u=x();function c(h){const{height:v,width:w}=h;return s?v:w}function g(){return s?"top":r?"right":"left"}function x(){return s?"bottom":r?"left":"right"}function f(h){return h*i}return{scroll:a,cross:o,startEdge:d,endEdge:u,measureSize:c,direction:f}}function rt(n=0,t=0){const r=Q(n-t);function s(c){return c<n}function a(c){return c>t}function o(c){return s(c)||a(c)}function i(c){return o(c)?s(c)?n:t:c}function d(c){return r?c-r*Math.ceil((c-t)/r):c}return{length:r,max:t,min:n,constrain:i,reachedAny:o,reachedMax:a,reachedMin:s,removeOffset:d}}function Us(n,t,r){const{constrain:s}=rt(0,n),a=n+1;let o=i(t);function i(f){return r?Q((a+f)%a):s(f)}function d(){return o}function u(f){return o=i(f),x}function c(f){return g().set(d()+f)}function g(){return Us(n,d(),r)}const x={get:d,set:u,add:c,clone:g};return x}function $o(n,t,r,s,a,o,i,d,u,c,g,x,f,b,h,v,w,j,N){const{cross:S,direction:y}=n,k=["INPUT","SELECT","TEXTAREA"],D={passive:!1},C=kt(),T=kt(),R=rt(50,225).constrain(b.measure(20)),L={mouse:300,touch:400},E={mouse:500,touch:600},F=h?43:25;let I=!1,M=0,_=0,W=!1,O=!1,K=!1,ee=!1;function Ie(z){if(!N)return;function V(oe){(rn(N)||N(z,oe))&&Fe(oe)}const P=t;C.add(P,"dragstart",oe=>oe.preventDefault(),D).add(P,"touchmove",()=>{},D).add(P,"touchend",()=>{}).add(P,"touchstart",V).add(P,"mousedown",V).add(P,"touchcancel",J).add(P,"contextmenu",J).add(P,"click",we,!0)}function Te(){C.clear(),T.clear()}function Le(){const z=ee?r:t;T.add(z,"touchmove",ne,D).add(z,"touchend",J).add(z,"mousemove",ne,D).add(z,"mouseup",J)}function je(z){const V=z.nodeName||"";return k.includes(V)}function ge(){return(h?E:L)[ee?"mouse":"touch"]}function Oe(z,V){const P=x.add(Xn(z)*-1),oe=g.byDistance(z,!h).distance;return h||Q(z)<R?oe:w&&V?oe*.5:g.byIndex(P.get(),0).distance}function Fe(z){const V=vn(z,s);ee=V,K=h&&V&&!z.buttons&&I,I=wt(a.get(),i.get())>=2,!(V&&z.button!==0)&&(je(z.target)||(W=!0,o.pointerDown(z),c.useFriction(0).useDuration(0),a.set(i),Le(),M=o.readPoint(z),_=o.readPoint(z,S),f.emit("pointerDown")))}function ne(z){if(!vn(z,s)&&z.touches.length>=2)return J(z);const P=o.readPoint(z),oe=o.readPoint(z,S),ye=wt(P,M),Ne=wt(oe,_);if(!O&&!ee&&(!z.cancelable||(O=ye>Ne,!O)))return J(z);const _e=o.pointerMove(z);ye>v&&(K=!0),c.useFriction(.3).useDuration(.75),d.start(),a.add(y(_e)),z.preventDefault()}function J(z){const P=g.byDistance(0,!1).index!==x.get(),oe=o.pointerUp(z)*ge(),ye=Oe(y(oe),P),Ne=Lo(oe,ye),_e=F-10*Ne,ze=j+Ne/50;O=!1,W=!1,T.clear(),c.useDuration(_e).useFriction(ze),u.distance(ye,!h),ee=!1,f.emit("pointerUp")}function we(z){K&&(z.stopPropagation(),z.preventDefault(),K=!1)}function le(){return W}return{init:Ie,destroy:Te,pointerDown:le}}function Ho(n,t){let s,a;function o(x){return x.timeStamp}function i(x,f){const h=`client${(f||n.scroll)==="x"?"X":"Y"}`;return(vn(x,t)?x:x.touches[0])[h]}function d(x){return s=x,a=x,i(x)}function u(x){const f=i(x)-i(a),b=o(x)-o(s)>170;return a=x,b&&(s=x),f}function c(x){if(!s||!a)return 0;const f=i(a)-i(s),b=o(x)-o(s),h=o(x)-o(a)>170,v=f/b;return b&&!h&&Q(v)>.1?v:0}return{pointerDown:d,pointerMove:u,pointerUp:c,readPoint:i}}function Uo(){function n(r){const{offsetTop:s,offsetLeft:a,offsetWidth:o,offsetHeight:i}=r;return{top:s,right:a+o,bottom:s+i,left:a,width:o,height:i}}return{measure:n}}function Vo(n){function t(s){return n*(s/100)}return{measure:t}}function Go(n,t,r,s,a,o,i){const d=[n].concat(s);let u,c,g=[],x=!1;function f(w){return a.measureSize(i.measure(w))}function b(w){if(!o)return;c=f(n),g=s.map(f);function j(N){for(const S of N){if(x)return;const y=S.target===n,k=s.indexOf(S.target),D=y?c:g[k],C=f(y?n:s[k]);if(Q(C-D)>=.5){w.reInit(),t.emit("resize");break}}}u=new ResizeObserver(N=>{(rn(o)||o(w,N))&&j(N)}),r.requestAnimationFrame(()=>{d.forEach(N=>u.observe(N))})}function h(){x=!0,u&&u.disconnect()}return{init:b,destroy:h}}function qo(n,t,r,s,a,o){let i=0,d=0,u=a,c=o,g=n.get(),x=0;function f(){const D=s.get()-n.get(),C=!u;let T=0;return C?(i=0,r.set(s),n.set(s),T=D):(r.set(n),i+=D/u,i*=c,g+=i,n.add(i),T=g-x),d=Xn(T),x=g,k}function b(){const D=s.get()-t.get();return Q(D)<.001}function h(){return u}function v(){return d}function w(){return i}function j(){return S(a)}function N(){return y(o)}function S(D){return u=D,k}function y(D){return c=D,k}const k={direction:v,duration:h,velocity:w,seek:f,settled:b,useBaseFriction:N,useBaseDuration:j,useFriction:y,useDuration:S};return k}function Wo(n,t,r,s,a){const o=a.measure(10),i=a.measure(50),d=rt(.1,.99);let u=!1;function c(){return!(u||!n.reachedAny(r.get())||!n.reachedAny(t.get()))}function g(b){if(!c())return;const h=n.reachedMin(t.get())?"min":"max",v=Q(n[h]-t.get()),w=r.get()-t.get(),j=d.constrain(v/i);r.subtract(w*j),!b&&Q(w)<o&&(r.set(n.constrain(r.get())),s.useDuration(25).useBaseFriction())}function x(b){u=!b}return{shouldConstrain:c,constrain:g,toggleActive:x}}function Xo(n,t,r,s,a){const o=rt(-t+n,0),i=x(),d=g(),u=f();function c(h,v){return wt(h,v)<=1}function g(){const h=i[0],v=Me(i),w=i.lastIndexOf(h),j=i.indexOf(v)+1;return rt(w,j)}function x(){return r.map((h,v)=>{const{min:w,max:j}=o,N=o.constrain(h),S=!v,y=Kn(r,v);return S?j:y||c(w,N)?w:c(j,N)?j:N}).map(h=>parseFloat(h.toFixed(3)))}function f(){if(t<=n+a)return[o.max];if(s==="keepSnaps")return i;const{min:h,max:v}=d;return i.slice(h,v)}return{snapsContained:u,scrollContainLimit:d}}function Ko(n,t,r){const s=t[0],a=r?s-n:Me(t);return{limit:rt(a,s)}}function Yo(n,t,r,s){const o=t.min+.1,i=t.max+.1,{reachedMin:d,reachedMax:u}=rt(o,i);function c(f){return f===1?u(r.get()):f===-1?d(r.get()):!1}function g(f){if(!c(f))return;const b=n*(f*-1);s.forEach(h=>h.add(b))}return{loop:g}}function Qo(n){const{max:t,length:r}=n;function s(o){const i=o-t;return r?i/-r:0}return{get:s}}function Jo(n,t,r,s,a){const{startEdge:o,endEdge:i}=n,{groupSlides:d}=a,u=x().map(t.measure),c=f(),g=b();function x(){return d(s).map(v=>Me(v)[i]-v[0][o]).map(Q)}function f(){return s.map(v=>r[o]-v[o]).map(v=>-Q(v))}function b(){return d(c).map(v=>v[0]).map((v,w)=>v+u[w])}return{snaps:c,snapsAligned:g}}function Zo(n,t,r,s,a,o){const{groupSlides:i}=a,{min:d,max:u}=s,c=g();function g(){const f=i(o),b=!n||t==="keepSnaps";return r.length===1?[o]:b?f:f.slice(d,u).map((h,v,w)=>{const j=!v,N=Kn(w,v);if(j){const S=Me(w[0])+1;return or(S)}if(N){const S=Mt(o)-Me(w)[0]+1;return or(S,Me(w)[0])}return h})}return{slideRegistry:c}}function ei(n,t,r,s,a){const{reachedAny:o,removeOffset:i,constrain:d}=s;function u(h){return h.concat().sort((v,w)=>Q(v)-Q(w))[0]}function c(h){const v=n?i(h):d(h),w=t.map((N,S)=>({diff:g(N-v,0),index:S})).sort((N,S)=>Q(N.diff)-Q(S.diff)),{index:j}=w[0];return{index:j,distance:v}}function g(h,v){const w=[h,h+r,h-r];if(!n)return h;if(!v)return u(w);const j=w.filter(N=>Xn(N)===v);return j.length?u(j):Me(w)-r}function x(h,v){const w=t[h]-a.get(),j=g(w,v);return{index:h,distance:j}}function f(h,v){const w=a.get()+h,{index:j,distance:N}=c(w),S=!n&&o(w);if(!v||S)return{index:j,distance:h};const y=t[j]-N,k=h+g(y,0);return{index:j,distance:k}}return{byDistance:f,byIndex:x,shortcut:g}}function ti(n,t,r,s,a,o,i){function d(x){const f=x.distance,b=x.index!==t.get();o.add(f),f&&(s.duration()?n.start():(n.update(),n.render(1),n.update())),b&&(r.set(t.get()),t.set(x.index),i.emit("select"))}function u(x,f){const b=a.byDistance(x,f);d(b)}function c(x,f){const b=t.clone().set(x),h=a.byIndex(b.get(),f);d(h)}return{distance:u,index:c}}function ni(n,t,r,s,a,o,i,d){const u={passive:!0,capture:!0};let c=0;function g(b){if(!d)return;function h(v){if(new Date().getTime()-c>10)return;i.emit("slideFocusStart"),n.scrollLeft=0;const N=r.findIndex(S=>S.includes(v));Wn(N)&&(a.useDuration(0),s.index(N,0),i.emit("slideFocus"))}o.add(document,"keydown",x,!1),t.forEach((v,w)=>{o.add(v,"focus",j=>{(rn(d)||d(b,j))&&h(w)},u)})}function x(b){b.code==="Tab"&&(c=new Date().getTime())}return{init:g}}function pt(n){let t=n;function r(){return t}function s(u){t=i(u)}function a(u){t+=i(u)}function o(u){t-=i(u)}function i(u){return Wn(u)?u:u.get()}return{get:r,set:s,add:a,subtract:o}}function Vs(n,t){const r=n.scroll==="x"?i:d,s=t.style;let a=null,o=!1;function i(f){return`translate3d(${f}px,0px,0px)`}function d(f){return`translate3d(0px,${f}px,0px)`}function u(f){if(o)return;const b=Oo(n.direction(f));b!==a&&(s.transform=r(b),a=b)}function c(f){o=!f}function g(){o||(s.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:g,to:u,toggleActive:c}}function ri(n,t,r,s,a,o,i,d,u){const g=Ct(a),x=Ct(a).reverse(),f=j().concat(N());function b(C,T){return C.reduce((R,L)=>R-a[L],T)}function h(C,T){return C.reduce((R,L)=>b(R,T)>0?R.concat([L]):R,[])}function v(C){return o.map((T,R)=>({start:T-s[R]+.5+C,end:T+t-.5+C}))}function w(C,T,R){const L=v(T);return C.map(E=>{const F=R?0:-r,I=R?r:0,M=R?"end":"start",_=L[E][M];return{index:E,loopPoint:_,slideLocation:pt(-1),translate:Vs(n,u[E]),target:()=>d.get()>_?F:I}})}function j(){const C=i[0],T=h(x,C);return w(T,r,!1)}function N(){const C=t-i[0]-1,T=h(g,C);return w(T,-r,!0)}function S(){return f.every(({index:C})=>{const T=g.filter(R=>R!==C);return b(T,t)<=.1})}function y(){f.forEach(C=>{const{target:T,translate:R,slideLocation:L}=C,E=T();E!==L.get()&&(R.to(E),L.set(E))})}function k(){f.forEach(C=>C.translate.clear())}return{canLoop:S,clear:k,loop:y,loopPoints:f}}function si(n,t,r){let s,a=!1;function o(u){if(!r)return;function c(g){for(const x of g)if(x.type==="childList"){u.reInit(),t.emit("slidesChanged");break}}s=new MutationObserver(g=>{a||(rn(r)||r(u,g))&&c(g)}),s.observe(n,{childList:!0})}function i(){s&&s.disconnect(),a=!0}return{init:o,destroy:i}}function ai(n,t,r,s){const a={};let o=null,i=null,d,u=!1;function c(){d=new IntersectionObserver(h=>{u||(h.forEach(v=>{const w=t.indexOf(v.target);a[w]=v}),o=null,i=null,r.emit("slidesInView"))},{root:n.parentElement,threshold:s}),t.forEach(h=>d.observe(h))}function g(){d&&d.disconnect(),u=!0}function x(h){return St(a).reduce((v,w)=>{const j=parseInt(w),{isIntersecting:N}=a[j];return(h&&N||!h&&!N)&&v.push(j),v},[])}function f(h=!0){if(h&&o)return o;if(!h&&i)return i;const v=x(h);return h&&(o=v),h||(i=v),v}return{init:c,destroy:g,get:f}}function oi(n,t,r,s,a,o){const{measureSize:i,startEdge:d,endEdge:u}=n,c=r[0]&&a,g=h(),x=v(),f=r.map(i),b=w();function h(){if(!c)return 0;const N=r[0];return Q(t[d]-N[d])}function v(){if(!c)return 0;const N=o.getComputedStyle(Me(s));return parseFloat(N.getPropertyValue(`margin-${u}`))}function w(){return r.map((N,S,y)=>{const k=!S,D=Kn(y,S);return k?f[S]+g:D?f[S]+x:y[S+1][d]-N[d]}).map(Q)}return{slideSizes:f,slideSizesWithGaps:b,startGap:g,endGap:x}}function ii(n,t,r,s,a,o,i,d,u){const{startEdge:c,endEdge:g,direction:x}=n,f=Wn(r);function b(j,N){return Ct(j).filter(S=>S%N===0).map(S=>j.slice(S,S+N))}function h(j){return j.length?Ct(j).reduce((N,S,y)=>{const k=Me(N)||0,D=k===0,C=S===Mt(j),T=a[c]-o[k][c],R=a[c]-o[S][g],L=!s&&D?x(i):0,E=!s&&C?x(d):0,F=Q(R-E-(T+L));return y&&F>t+u&&N.push(S),C&&N.push(j.length),N},[]).map((N,S,y)=>{const k=Math.max(y[S-1]||0);return j.slice(k,N)}):[]}function v(j){return f?b(j,r):h(j)}return{groupSlides:v}}function li(n,t,r,s,a,o,i){const{align:d,axis:u,direction:c,startIndex:g,loop:x,duration:f,dragFree:b,dragThreshold:h,inViewThreshold:v,slidesToScroll:w,skipSnaps:j,containScroll:N,watchResize:S,watchSlides:y,watchDrag:k,watchFocus:D}=o,C=2,T=Uo(),R=T.measure(t),L=r.map(T.measure),E=Bo(u,c),F=E.measureSize(R),I=Vo(F),M=Fo(d,F),_=!x&&!!N,W=x||!!N,{slideSizes:O,slideSizesWithGaps:K,startGap:ee,endGap:Ie}=oi(E,R,L,r,W,a),Te=ii(E,F,w,x,R,L,ee,Ie,C),{snaps:Le,snapsAligned:je}=Jo(E,M,R,L,Te),ge=-Me(Le)+Me(K),{snapsContained:Oe,scrollContainLimit:Fe}=Xo(F,ge,je,N,C),ne=_?Oe:je,{limit:J}=Ko(ge,ne,x),we=Us(Mt(ne),g,x),le=we.clone(),U=Ct(r),z=({dragHandler:$e,scrollBody:mt,scrollBounds:He,options:{loop:Ke}})=>{Ke||He.constrain($e.pointerDown()),mt.seek()},V=({scrollBody:$e,translate:mt,location:He,offsetLocation:Ke,previousLocation:on,scrollLooper:ln,slideLooper:cn,dragHandler:dn,animation:un,eventHandler:A,scrollBounds:$,options:{loop:G}},B)=>{const X=$e.settled(),ce=!$.shouldConstrain(),ie=G?X:X&&ce,Pe=ie&&!dn.pointerDown();Pe&&un.stop();const Ce=He.get()*B+on.get()*(1-B);Ke.set(Ce),G&&(ln.loop($e.direction()),cn.loop()),mt.to(Ke.get()),Pe&&A.emit("settle"),ie||A.emit("scroll")},P=_o(s,a,()=>z(ft),$e=>V(ft,$e)),oe=.68,ye=ne[we.get()],Ne=pt(ye),_e=pt(ye),ze=pt(ye),pe=pt(ye),Ve=qo(Ne,ze,_e,pe,f,oe),dt=ei(x,ne,ge,J,pe),Be=ti(P,we,le,Ve,dt,pe,i),Et=Qo(J),ut=kt(),an=ai(t,r,i,v),{slideRegistry:At}=Zo(_,N,ne,Fe,Te,U),at=ni(n,r,At,Be,Ve,ut,i,D),ft={ownerDocument:s,ownerWindow:a,eventHandler:i,containerRect:R,slideRects:L,animation:P,axis:E,dragHandler:$o(E,n,s,a,pe,Ho(E,a),Ne,P,Be,Ve,dt,we,i,I,b,h,j,oe,k),eventStore:ut,percentOfView:I,index:we,indexPrevious:le,limit:J,location:Ne,offsetLocation:ze,previousLocation:_e,options:o,resizeHandler:Go(t,i,a,r,E,S,T),scrollBody:Ve,scrollBounds:Wo(J,ze,pe,Ve,I),scrollLooper:Yo(ge,J,ze,[Ne,ze,_e,pe]),scrollProgress:Et,scrollSnapList:ne.map(Et.get),scrollSnaps:ne,scrollTarget:dt,scrollTo:Be,slideLooper:ri(E,F,ge,O,K,Le,ne,ze,r),slideFocus:at,slidesHandler:si(t,i,y),slidesInView:an,slideIndexes:U,slideRegistry:At,slidesToScroll:Te,target:pe,translate:Vs(E,t)};return ft}function ci(){let n={},t;function r(c){t=c}function s(c){return n[c]||[]}function a(c){return s(c).forEach(g=>g(t,c)),u}function o(c,g){return n[c]=s(c).concat([g]),u}function i(c,g){return n[c]=s(c).filter(x=>x!==g),u}function d(){n={}}const u={init:r,emit:a,off:i,on:o,clear:d};return u}const di={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function ui(n){function t(o,i){return Hs(o,i||{})}function r(o){const i=o.breakpoints||{},d=St(i).filter(u=>n.matchMedia(u).matches).map(u=>i[u]).reduce((u,c)=>t(u,c),{});return t(o,d)}function s(o){return o.map(i=>St(i.breakpoints||{})).reduce((i,d)=>i.concat(d),[]).map(n.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:s}}function fi(n){let t=[];function r(o,i){return t=i.filter(({options:d})=>n.optionsAtMedia(d).active!==!1),t.forEach(d=>d.init(o,n)),i.reduce((d,u)=>Object.assign(d,{[u.name]:u}),{})}function s(){t=t.filter(o=>o.destroy())}return{init:r,destroy:s}}function Vt(n,t,r){const s=n.ownerDocument,a=s.defaultView,o=ui(a),i=fi(o),d=kt(),u=ci(),{mergeOptions:c,optionsAtMedia:g,optionsMediaQueries:x}=o,{on:f,off:b,emit:h}=u,v=E;let w=!1,j,N=c(di,Vt.globalOptions),S=c(N),y=[],k,D,C;function T(){const{container:U,slides:z}=S;D=(bn(U)?n.querySelector(U):U)||n.children[0];const P=bn(z)?D.querySelectorAll(z):z;C=[].slice.call(P||D.children)}function R(U){const z=li(n,D,C,s,a,U,u);if(U.loop&&!z.slideLooper.canLoop()){const V=Object.assign({},U,{loop:!1});return R(V)}return z}function L(U,z){w||(N=c(N,U),S=g(N),y=z||y,T(),j=R(S),x([N,...y.map(({options:V})=>V)]).forEach(V=>d.add(V,"change",E)),S.active&&(j.translate.to(j.location.get()),j.animation.init(),j.slidesInView.init(),j.slideFocus.init(le),j.eventHandler.init(le),j.resizeHandler.init(le),j.slidesHandler.init(le),j.options.loop&&j.slideLooper.loop(),D.offsetParent&&C.length&&j.dragHandler.init(le),k=i.init(le,y)))}function E(U,z){const V=Te();F(),L(c({startIndex:V},U),z),u.emit("reInit")}function F(){j.dragHandler.destroy(),j.eventStore.clear(),j.translate.clear(),j.slideLooper.clear(),j.resizeHandler.destroy(),j.slidesHandler.destroy(),j.slidesInView.destroy(),j.animation.destroy(),i.destroy(),d.clear()}function I(){w||(w=!0,d.clear(),F(),u.emit("destroy"),u.clear())}function M(U,z,V){!S.active||w||(j.scrollBody.useBaseFriction().useDuration(z===!0?0:S.duration),j.scrollTo.index(U,V||0))}function _(U){const z=j.index.add(1).get();M(z,U,-1)}function W(U){const z=j.index.add(-1).get();M(z,U,1)}function O(){return j.index.add(1).get()!==Te()}function K(){return j.index.add(-1).get()!==Te()}function ee(){return j.scrollSnapList}function Ie(){return j.scrollProgress.get(j.offsetLocation.get())}function Te(){return j.index.get()}function Le(){return j.indexPrevious.get()}function je(){return j.slidesInView.get()}function ge(){return j.slidesInView.get(!1)}function Oe(){return k}function Fe(){return j}function ne(){return n}function J(){return D}function we(){return C}const le={canScrollNext:O,canScrollPrev:K,containerNode:J,internalEngine:Fe,destroy:I,off:b,on:f,emit:h,plugins:Oe,previousScrollSnap:Le,reInit:v,rootNode:ne,scrollNext:_,scrollPrev:W,scrollProgress:Ie,scrollSnapList:ee,scrollTo:M,selectedScrollSnap:Te,slideNodes:we,slidesInView:je,slidesNotInView:ge};return L(t,r),setTimeout(()=>u.emit("init"),0),le}Vt.globalOptions=void 0;function Yn(n={},t=[]){const r=l.useRef(n),s=l.useRef(t),[a,o]=l.useState(),[i,d]=l.useState(),u=l.useCallback(()=>{a&&a.reInit(r.current,s.current)},[a]);return l.useEffect(()=>{qn(r.current,n)||(r.current=n,u())},[n,u]),l.useEffect(()=>{Ao(s.current,t)||(s.current=t,u())},[t,u]),l.useEffect(()=>{if(Eo()&&i){Vt.globalOptions=Yn.globalOptions;const c=Vt(i,r.current,s.current);return o(c),()=>c.destroy()}else o(void 0)},[i,o]),[d,a]}Yn.globalOptions=void 0;const Gs=l.createContext(null);function sn(){const n=l.useContext(Gs);if(!n)throw new Error("Carousel components must be used inside <Carousel>");return n}const mi=l.forwardRef(function({opts:t,orientation:r="horizontal",setApi:s,className:a,children:o,...i},d){const[u,c]=Yn({...t,axis:r==="horizontal"?"x":"y"}),[g,x]=l.useState(!1),[f,b]=l.useState(!1),h=l.useCallback(v=>{v&&(x(v.canScrollPrev()),b(v.canScrollNext()))},[]);return l.useEffect(()=>{if(c)return s==null||s(c),h(c),c.on("reInit",h).on("select",h),()=>{c.off("reInit",h).off("select",h)}},[c,h,s]),e.jsx(Gs.Provider,{value:{carouselRef:u,api:c,canPrev:g,canNext:f,scrollPrev:()=>c==null?void 0:c.scrollPrev(),scrollNext:()=>c==null?void 0:c.scrollNext(),orientation:r},children:e.jsx("div",{ref:d,className:m("relative",a),role:"region","aria-roledescription":"carousel",...i,children:o})})}),xi=l.forwardRef(function({className:t,...r},s){const{carouselRef:a,orientation:o}=sn();return e.jsx("div",{ref:a,className:"overflow-hidden",children:e.jsx("div",{ref:s,className:m("flex",o==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...r})})}),gi=l.forwardRef(function({className:t,...r},s){const{orientation:a}=sn();return e.jsx("div",{ref:s,role:"group","aria-roledescription":"slide",className:m("min-w-0 shrink-0 grow-0 basis-full",a==="horizontal"?"pl-4":"pt-4",t),...r})});function pi({className:n}){const{canPrev:t,scrollPrev:r,orientation:s}=sn();return e.jsx(Rt,{"aria-label":"Previous",variant:"outline",disabled:!t,onClick:r,icon:e.jsx(p.ChevronLeft,{}),className:m("absolute z-10",s==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",n)})}function hi({className:n}){const{canNext:t,scrollNext:r,orientation:s}=sn();return e.jsx(Rt,{"aria-label":"Next",variant:"outline",disabled:!t,onClick:r,icon:e.jsx(p.ChevronRight,{}),className:m("absolute z-10",s==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",n)})}function qs(n,t,r,s=8){const a=n.map(f=>f.y),o=Math.min(0,...a),i=Math.max(...a,1),d=i-o||1,u=t-s*2,c=r-s*2;return{sx:f=>n.length<=1?s+u/2:s+f/(n.length-1)*u,sy:f=>s+c-(f-o)/d*c,min:o,max:i}}function bi({data:n,height:t=80,width:r="100%",caption:s,className:a}){const o=typeof r=="number"?r:320,{sx:i,sy:d}=qs(n,o,t),u=n.map((c,g)=>`${g===0?"M":"L"}${i(g).toFixed(1)},${d(c.y).toFixed(1)}`).join(" ");return e.jsxs("figure",{className:m("flex flex-col gap-1.5",a),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsxs("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:[e.jsx("path",{d:u,fill:"none",stroke:"var(--color-accent)",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"}),n.map((c,g)=>e.jsx("circle",{cx:i(g),cy:d(c.y),r:2,fill:"var(--color-accent)"},g))]})]})}function vi({data:n,height:t=80,width:r="100%",caption:s,className:a}){const o=typeof r=="number"?r:320,{sx:i,sy:d}=qs(n,o,t),u=n.map((g,x)=>`${x===0?"M":"L"}${i(x).toFixed(1)},${d(g.y).toFixed(1)}`).join(" "),c=`${u} L${i(n.length-1).toFixed(1)},${t} L${i(0).toFixed(1)},${t} Z`;return e.jsxs("figure",{className:m("flex flex-col gap-1.5",a),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsxs("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:[e.jsx("path",{d:c,fill:"var(--color-accent-soft)"}),e.jsx("path",{d:u,fill:"none",stroke:"var(--color-accent)",strokeWidth:1.5})]})]})}function ji({data:n,height:t=100,width:r="100%",caption:s,className:a}){const o=typeof r=="number"?r:320,i=8,d=2,u=o-i*2,c=Math.max(2,u/n.length-d),g=n.map(f=>f.y),x=Math.max(...g,1);return e.jsxs("figure",{className:m("flex flex-col gap-1.5",a),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsx("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:n.map((f,b)=>{const h=f.y/x*(t-i*2);return e.jsx("rect",{x:i+b*(c+d),y:t-i-h,width:c,height:h,fill:"var(--color-accent)",rx:1.5,children:e.jsx("title",{children:`${f.x}: ${f.y}`})},b)})})]})}function wi(n){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}const Ws=l.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),zt=()=>{const n=l.useContext(Ws);if(!n)throw new Error("useDrawerContext must be used within a Drawer.Root");return n};wi(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
8
8
|
[data-state=closed]
|
|
9
|
-
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function wi(){const n=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(n)&&/Mobile/.test(n)||/FxiOS/.test(n))}function yi(){return Qn(/^Mac/)}function Ni(){return Qn(/^iPhone/)}function ir(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Ci(){return Qn(/^iPad/)||yi()&&navigator.maxTouchPoints>1}function Xs(){return Ni()||Ci()}function Qn(n){return typeof window<"u"&&window.navigator!=null?n.test(window.navigator.platform):void 0}const Si=24,ki=typeof window<"u"?l.useLayoutEffect:l.useEffect;function lr(...n){return(...t)=>{for(let r of n)typeof r=="function"&&r(...t)}}const mn=typeof document<"u"&&window.visualViewport;function cr(n){let t=window.getComputedStyle(n);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Ks(n){for(cr(n)&&(n=n.parentElement);n&&!cr(n);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}const Ti=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Ft=0,xn;function Di(n={}){let{isDisabled:t}=n;ki(()=>{if(!t)return Ft++,Ft===1&&Xs()&&(xn=Ri()),()=>{Ft--,Ft===0&&(xn==null||xn())}},[t])}function Ri(){let n,t=0,r=x=>{n=Ks(x.target),!(n===document.documentElement&&n===document.body)&&(t=x.changedTouches[0].pageY)},s=x=>{if(!n||n===document.documentElement||n===document.body){x.preventDefault();return}let f=x.changedTouches[0].pageY,b=n.scrollTop,h=n.scrollHeight-n.clientHeight;h!==0&&((b<=0&&f>t||b>=h&&f<t)&&x.preventDefault(),t=f)},a=x=>{let f=x.target;jn(f)&&f!==document.activeElement&&(x.preventDefault(),f.style.transform="translateY(-2000px)",f.focus(),requestAnimationFrame(()=>{f.style.transform=""}))},o=x=>{let f=x.target;jn(f)&&(f.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{f.style.transform="",mn&&(mn.height<window.innerHeight?requestAnimationFrame(()=>{dr(f)}):mn.addEventListener("resize",()=>dr(f),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},d=window.pageXOffset,u=window.pageYOffset,c=lr(Ii(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let g=lr(xt(document,"touchstart",r,{passive:!1,capture:!0}),xt(document,"touchmove",s,{passive:!1,capture:!0}),xt(document,"touchend",a,{passive:!1,capture:!0}),xt(document,"focus",o,!0),xt(window,"scroll",i));return()=>{c(),g(),window.scrollTo(d,u)}}function Ii(n,t,r){let s=n.style[t];return n.style[t]=r,()=>{n.style[t]=s}}function xt(n,t,r,s){return n.addEventListener(t,r,s),()=>{n.removeEventListener(t,r,s)}}function dr(n){let t=document.scrollingElement||document.documentElement;for(;n&&n!==t;){let r=Ks(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let s=r.getBoundingClientRect().top,a=n.getBoundingClientRect().top,o=n.getBoundingClientRect().bottom;const i=r.getBoundingClientRect().bottom+Si;o>i&&(r.scrollTop+=a-s)}n=r.parentElement}}function jn(n){return n instanceof HTMLInputElement&&!Ti.has(n.type)||n instanceof HTMLTextAreaElement||n instanceof HTMLElement&&n.isContentEditable}function Pi(n,t){typeof n=="function"?n(t):n!=null&&(n.current=t)}function Mi(...n){return t=>n.forEach(r=>Pi(r,t))}function Ys(...n){return Ta.useCallback(Mi(...n),n)}const Qs=new WeakMap;function re(n,t,r=!1){if(!n||!(n instanceof HTMLElement))return;let s={};Object.entries(t).forEach(([a,o])=>{if(a.startsWith("--")){n.style.setProperty(a,o);return}s[a]=n.style[a],n.style[a]=o}),!r&&Qs.set(n,s)}function zi(n,t){if(!n||!(n instanceof HTMLElement))return;let r=Qs.get(n);r&&(n.style[t]=r[t])}const te=n=>{switch(n){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return n}};function _t(n,t){if(!n)return null;const r=window.getComputedStyle(n),s=r.transform||r.webkitTransform||r.mozTransform;let a=s.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[te(t)?13:12]):(a=s.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[te(t)?5:4]):null)}function Ei(n){return 8*(Math.log(n+1)-2)}function gn(n,t){if(!n)return()=>{};const r=n.style.cssText;return Object.assign(n.style,t),()=>{n.style.cssText=r}}function Ai(...n){return(...t)=>{for(const r of n)typeof r=="function"&&r(...t)}}const Y={DURATION:.5,EASE:[.32,.72,0,1]},Js=.4,Li=.25,Oi=100,Zs=8,Qe=16,wn=26,pn="vaul-dragging";function ea(n){const t=l.useRef(n);return l.useEffect(()=>{t.current=n}),l.useMemo(()=>(...r)=>t.current==null?void 0:t.current.call(t,...r),[])}function Fi({defaultProp:n,onChange:t}){const r=l.useState(n),[s]=r,a=l.useRef(s),o=ea(t);return l.useEffect(()=>{a.current!==s&&(o(s),a.current=s)},[s,a,o]),r}function ta({prop:n,defaultProp:t,onChange:r=()=>{}}){const[s,a]=Fi({defaultProp:t,onChange:r}),o=n!==void 0,i=o?n:s,d=ea(r),u=l.useCallback(c=>{if(o){const x=typeof c=="function"?c(n):c;x!==n&&d(x)}else a(c)},[o,n,a,d]);return[i,u]}function _i({activeSnapPointProp:n,setActiveSnapPointProp:t,snapPoints:r,drawerRef:s,overlayRef:a,fadeFromIndex:o,onSnapPointChange:i,direction:d="bottom",container:u,snapToSequentialPoint:c}){const[g,x]=ta({prop:n,defaultProp:r==null?void 0:r[0],onChange:t}),[f,b]=l.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);l.useEffect(()=>{function C(){b({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]);const h=l.useMemo(()=>g===(r==null?void 0:r[r.length-1])||null,[r,g]),v=l.useMemo(()=>{var C;return(C=r==null?void 0:r.findIndex(T=>T===g))!=null?C:null},[r,g]),w=r&&r.length>0&&(o||o===0)&&!Number.isNaN(o)&&r[o]===g||!r,j=l.useMemo(()=>{const C=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var T;return(T=r==null?void 0:r.map(R=>{const L=typeof R=="string";let E=0;if(L&&(E=parseInt(R,10)),te(d)){const I=L?E:f?R*C.height:0;return f?d==="bottom"?C.height-I:-C.height+I:I}const F=L?E:f?R*C.width:0;return f?d==="right"?C.width-F:-C.width+F:F}))!=null?T:[]},[r,f,u]),N=l.useMemo(()=>v!==null?j==null?void 0:j[v]:null,[j,v]),S=l.useCallback(C=>{var T;const R=(T=j==null?void 0:j.findIndex(L=>L===C))!=null?T:null;i(R),re(s.current,{transition:`transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,transform:te(d)?`translate3d(0, ${C}px, 0)`:`translate3d(${C}px, 0, 0)`}),j&&R!==j.length-1&&o!==void 0&&R!==o&&R<o?re(a.current,{transition:`opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,opacity:"0"}):re(a.current,{transition:`opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,opacity:"1"}),x(r==null?void 0:r[Math.max(R,0)])},[s.current,r,j,o,a,x]);l.useEffect(()=>{if(g||n){var C;const T=(C=r==null?void 0:r.findIndex(R=>R===n||R===g))!=null?C:-1;j&&T!==-1&&typeof j[T]=="number"&&S(j[T])}},[g,n,r,j,S]);function y({draggedDistance:C,closeDrawer:T,velocity:R,dismissible:L}){if(o===void 0)return;const E=d==="bottom"||d==="right"?(N??0)-C:(N??0)+C,F=v===o-1,I=v===0,M=C>0;if(F&&re(a.current,{transition:`opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`}),!c&&R>2&&!M){L?T():S(j[0]);return}if(!c&&R>2&&M&&j&&r){S(j[r.length-1]);return}const _=j==null?void 0:j.reduce((O,K)=>typeof O!="number"||typeof K!="number"?O:Math.abs(K-E)<Math.abs(O-E)?K:O),W=te(d)?window.innerHeight:window.innerWidth;if(R>Js&&Math.abs(C)<W*.4){const O=M?1:-1;if(O>0&&h&&r){S(j[r.length-1]);return}if(I&&O<0&&L&&T(),v===null)return;S(j[v+O]);return}S(_)}function k({draggedDistance:C}){if(N===null)return;const T=d==="bottom"||d==="right"?N-C:N+C;(d==="bottom"||d==="right")&&T<j[j.length-1]||(d==="top"||d==="left")&&T>j[j.length-1]||re(s.current,{transform:te(d)?`translate3d(0, ${T}px, 0)`:`translate3d(${T}px, 0, 0)`})}function D(C,T){if(!r||typeof v!="number"||!j||o===void 0)return null;const R=v===o-1;if(v>=o&&T)return 0;if(R&&!T)return 1;if(!w&&!R)return null;const E=R?v+1:v-1,F=R?j[E]-j[E-1]:j[E+1]-j[E],I=C/Math.abs(F);return R?1-I:I}return{isLastSnapPoint:h,activeSnapPoint:g,shouldFade:w,getPercentageDragged:D,setActiveSnapPoint:x,activeSnapPointIndex:v,onRelease:y,onDrag:k,snapPointsOffset:j}}const Bi=()=>()=>{};function $i(){const{direction:n,isOpen:t,shouldScaleBackground:r,setBackgroundColorOnScale:s,noBodyStyles:a}=Mt(),o=l.useRef(null),i=l.useMemo(()=>document.body.style.backgroundColor,[]);function d(){return(window.innerWidth-wn)/window.innerWidth}l.useEffect(()=>{if(t&&r){o.current&&clearTimeout(o.current);const u=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!u)return;Ai(s&&!a?gn(document.body,{background:"black"}):Bi,gn(u,{transformOrigin:te(n)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Y.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Y.EASE.join(",")})`}));const c=gn(u,{borderRadius:`${Zs}px`,overflow:"hidden",...te(n)?{transform:`scale(${d()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${d()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{c(),o.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},Y.DURATION*1e3)}}},[t,r,i])}let gt=null;function Hi({isOpen:n,modal:t,nested:r,hasBeenOpened:s,preventScrollRestoration:a,noBodyStyles:o}){const[i,d]=l.useState(()=>typeof window<"u"?window.location.href:""),u=l.useRef(0),c=l.useCallback(()=>{if(ir()&>===null&&n&&!o){gt={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:x,innerHeight:f}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-u.current}px`,left:`${-x}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const b=f-window.innerHeight;b&&u.current>=f&&(document.body.style.top=`${-(u.current+b)}px`)}),300)}},[n]),g=l.useCallback(()=>{if(ir()&>!==null&&!o){const x=-parseInt(document.body.style.top,10),f=-parseInt(document.body.style.left,10);Object.assign(document.body.style,gt),window.requestAnimationFrame(()=>{if(a&&i!==window.location.href){d(window.location.href);return}window.scrollTo(f,x)}),gt=null}},[i]);return l.useEffect(()=>{function x(){u.current=window.scrollY}return x(),window.addEventListener("scroll",x),()=>{window.removeEventListener("scroll",x)}},[]),l.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||g()}},[t,g]),l.useEffect(()=>{r||!s||(n?(!window.matchMedia("(display-mode: standalone)").matches&&c(),t||window.setTimeout(()=>{g()},500)):g())},[n,s,i,t,r,c,g]),{restorePositionSetting:g}}function Ui({open:n,onOpenChange:t,children:r,onDrag:s,onRelease:a,snapPoints:o,shouldScaleBackground:i=!1,setBackgroundColorOnScale:d=!0,closeThreshold:u=Li,scrollLockTimeout:c=Oi,dismissible:g=!0,handleOnly:x=!1,fadeFromIndex:f=o&&o.length-1,activeSnapPoint:b,setActiveSnapPoint:h,fixed:v,modal:w=!0,onClose:j,nested:N,noBodyStyles:S=!1,direction:y="bottom",defaultOpen:k=!1,disablePreventScroll:D=!0,snapToSequentialPoint:C=!1,preventScrollRestoration:T=!1,repositionInputs:R=!0,onAnimationEnd:L,container:E,autoFocus:F=!1}){var I,M;const[_=!1,W]=ta({defaultProp:k,prop:n,onChange:A=>{t==null||t(A),!A&&!N&&Et(),setTimeout(()=>{L==null||L(A)},Y.DURATION*1e3),A&&!w&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),A||(document.body.style.pointerEvents="auto")}}),[O,K]=l.useState(!1),[ee,Ie]=l.useState(!1),[Te,Le]=l.useState(!1),je=l.useRef(null),ge=l.useRef(null),Oe=l.useRef(null),Fe=l.useRef(null),ne=l.useRef(null),J=l.useRef(!1),we=l.useRef(null),le=l.useRef(0),U=l.useRef(!1),z=l.useRef(!k),V=l.useRef(0),P=l.useRef(null),oe=l.useRef(((I=P.current)==null?void 0:I.getBoundingClientRect().height)||0),ye=l.useRef(((M=P.current)==null?void 0:M.getBoundingClientRect().width)||0),Ne=l.useRef(0),_e=l.useCallback(A=>{o&&A===Be.length-1&&(ge.current=new Date)},[]),{activeSnapPoint:ze,activeSnapPointIndex:pe,setActiveSnapPoint:Ve,onRelease:dt,snapPointsOffset:Be,onDrag:zt,shouldFade:ut,getPercentageDragged:an}=_i({snapPoints:o,activeSnapPointProp:b,setActiveSnapPointProp:h,drawerRef:P,fadeFromIndex:f,overlayRef:je,onSnapPointChange:_e,direction:y,container:E,snapToSequentialPoint:C});Di({isDisabled:!_||ee||!w||Te||!O||!R||!D});const{restorePositionSetting:Et}=Hi({isOpen:_,modal:w,nested:N??!1,hasBeenOpened:O,preventScrollRestoration:T,noBodyStyles:S});function at(){return(window.innerWidth-wn)/window.innerWidth}function ft(A){var $,G;!g&&!o||P.current&&!P.current.contains(A.target)||(oe.current=(($=P.current)==null?void 0:$.getBoundingClientRect().height)||0,ye.current=((G=P.current)==null?void 0:G.getBoundingClientRect().width)||0,Ie(!0),Oe.current=new Date,Xs()&&window.addEventListener("touchend",()=>J.current=!1,{once:!0}),A.target.setPointerCapture(A.pointerId),le.current=te(y)?A.pageY:A.pageX)}function $e(A,$){var G;let B=A;const X=(G=window.getSelection())==null?void 0:G.toString(),ce=P.current?_t(P.current,y):null,ie=new Date;if(B.tagName==="SELECT"||B.hasAttribute("data-vaul-no-drag")||B.closest("[data-vaul-no-drag]"))return!1;if(y==="right"||y==="left")return!0;if(ge.current&&ie.getTime()-ge.current.getTime()<500)return!1;if(ce!==null&&(y==="bottom"?ce>0:ce<0))return!0;if(X&&X.length>0)return!1;if(ne.current&&ie.getTime()-ne.current.getTime()<c&&ce===0||$)return ne.current=ie,!1;for(;B;){if(B.scrollHeight>B.clientHeight){if(B.scrollTop!==0)return ne.current=new Date,!1;if(B.getAttribute("role")==="dialog")return!0}B=B.parentNode}return!0}function mt(A){if(P.current&&ee){const $=y==="bottom"||y==="right"?1:-1,G=(le.current-(te(y)?A.pageY:A.pageX))*$,B=G>0,X=o&&!g&&!B;if(X&&pe===0)return;const ce=Math.abs(G),ie=document.querySelector("[data-vaul-drawer-wrapper]"),Pe=y==="bottom"||y==="top"?oe.current:ye.current;let Ce=ce/Pe;const Ye=an(ce,B);if(Ye!==null&&(Ce=Ye),X&&Ce>=1||!J.current&&!$e(A.target,B))return;if(P.current.classList.add(pn),J.current=!0,re(P.current,{transition:"none"}),re(je.current,{transition:"none"}),o&&zt({draggedDistance:G}),B&&!o){const Ee=Ei(G),At=Math.min(Ee*-1,0)*$;re(P.current,{transform:te(y)?`translate3d(0, ${At}px, 0)`:`translate3d(${At}px, 0, 0)`});return}const Ge=1-Ce;if((ut||f&&pe===f-1)&&(s==null||s(A,Ce),re(je.current,{opacity:`${Ge}`,transition:"none"},!0)),ie&&je.current&&i){const Ee=Math.min(at()+Ce*(1-at()),1),At=8-Ce*8,Jn=Math.max(0,14-Ce*14);re(ie,{borderRadius:`${At}px`,transform:te(y)?`scale(${Ee}) translate3d(0, ${Jn}px, 0)`:`scale(${Ee}) translate3d(${Jn}px, 0, 0)`,transition:"none"},!0)}if(!o){const Ee=ce*$;re(P.current,{transform:te(y)?`translate3d(0, ${Ee}px, 0)`:`translate3d(${Ee}px, 0, 0)`})}}}l.useEffect(()=>{window.requestAnimationFrame(()=>{z.current=!0})},[]),l.useEffect(()=>{var A;function $(){if(!P.current||!R)return;const G=document.activeElement;if(jn(G)||U.current){var B;const X=((B=window.visualViewport)==null?void 0:B.height)||0,ce=window.innerHeight;let ie=ce-X;const Pe=P.current.getBoundingClientRect().height||0,Ce=Pe>ce*.8;Ne.current||(Ne.current=Pe);const Ye=P.current.getBoundingClientRect().top;if(Math.abs(V.current-ie)>60&&(U.current=!U.current),o&&o.length>0&&Be&&pe){const Ge=Be[pe]||0;ie+=Ge}if(V.current=ie,Pe>X||U.current){const Ge=P.current.getBoundingClientRect().height;let Ee=Ge;Ge>X&&(Ee=X-(Ce?Ye:wn)),v?P.current.style.height=`${Ge-Math.max(ie,0)}px`:P.current.style.height=`${Math.max(Ee,X-Ye)}px`}else wi()||(P.current.style.height=`${Ne.current}px`);o&&o.length>0&&!U.current?P.current.style.bottom="0px":P.current.style.bottom=`${Math.max(ie,0)}px`}}return(A=window.visualViewport)==null||A.addEventListener("resize",$),()=>{var G;return(G=window.visualViewport)==null?void 0:G.removeEventListener("resize",$)}},[pe,o,Be]);function He(A){on(),j==null||j(),A||W(!1),setTimeout(()=>{o&&Ve(o[0])},Y.DURATION*1e3)}function Ke(){if(!P.current)return;const A=document.querySelector("[data-vaul-drawer-wrapper]"),$=_t(P.current,y);re(P.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`}),re(je.current,{transition:`opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,opacity:"1"}),i&&$&&$>0&&_&&re(A,{borderRadius:`${Zs}px`,overflow:"hidden",...te(y)?{transform:`scale(${at()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${at()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Y.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Y.EASE.join(",")})`},!0)}function on(){!ee||!P.current||(P.current.classList.remove(pn),J.current=!1,Ie(!1),Fe.current=new Date)}function ln(A){if(!ee||!P.current)return;P.current.classList.remove(pn),J.current=!1,Ie(!1),Fe.current=new Date;const $=_t(P.current,y);if(!A||!$e(A.target,!1)||!$||Number.isNaN($)||Oe.current===null)return;const G=Fe.current.getTime()-Oe.current.getTime(),B=le.current-(te(y)?A.pageY:A.pageX),X=Math.abs(B)/G;if(X>.05&&(Le(!0),setTimeout(()=>{Le(!1)},200)),o){dt({draggedDistance:B*(y==="bottom"||y==="right"?1:-1),closeDrawer:He,velocity:X,dismissible:g}),a==null||a(A,!0);return}if(y==="bottom"||y==="right"?B>0:B<0){Ke(),a==null||a(A,!0);return}if(X>Js){He(),a==null||a(A,!1);return}var ce;const ie=Math.min((ce=P.current.getBoundingClientRect().height)!=null?ce:0,window.innerHeight);var Pe;const Ce=Math.min((Pe=P.current.getBoundingClientRect().width)!=null?Pe:0,window.innerWidth),Ye=y==="left"||y==="right";if(Math.abs($)>=(Ye?Ce:ie)*u){He(),a==null||a(A,!1);return}a==null||a(A,!0),Ke()}l.useEffect(()=>(_&&(re(document.documentElement,{scrollBehavior:"auto"}),ge.current=new Date),()=>{zi(document.documentElement,"scrollBehavior")}),[_]);function cn(A){const $=A?(window.innerWidth-Qe)/window.innerWidth:1,G=A?-Qe:0;we.current&&window.clearTimeout(we.current),re(P.current,{transition:`transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,transform:te(y)?`scale(${$}) translate3d(0, ${G}px, 0)`:`scale(${$}) translate3d(${G}px, 0, 0)`}),!A&&P.current&&(we.current=setTimeout(()=>{const B=_t(P.current,y);re(P.current,{transition:"none",transform:te(y)?`translate3d(0, ${B}px, 0)`:`translate3d(${B}px, 0, 0)`})},500))}function dn(A,$){if($<0)return;const G=(window.innerWidth-Qe)/window.innerWidth,B=G+$*(1-G),X=-Qe+$*Qe;re(P.current,{transform:te(y)?`scale(${B}) translate3d(0, ${X}px, 0)`:`scale(${B}) translate3d(${X}px, 0, 0)`,transition:"none"})}function un(A,$){const G=te(y)?window.innerHeight:window.innerWidth,B=$?(G-Qe)/G:1,X=$?-Qe:0;$&&re(P.current,{transition:`transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,transform:te(y)?`scale(${B}) translate3d(0, ${X}px, 0)`:`scale(${B}) translate3d(${X}px, 0, 0)`})}return l.useEffect(()=>{w||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[w]),l.createElement(H.Root,{defaultOpen:k,onOpenChange:A=>{!g&&!A||(A?K(!0):He(!0),W(A))},open:_},l.createElement(Ws.Provider,{value:{activeSnapPoint:ze,snapPoints:o,setActiveSnapPoint:Ve,drawerRef:P,overlayRef:je,onOpenChange:t,onPress:ft,onRelease:ln,onDrag:mt,dismissible:g,shouldAnimate:z,handleOnly:x,isOpen:_,isDragging:ee,shouldFade:ut,closeDrawer:He,onNestedDrag:dn,onNestedOpenChange:cn,onNestedRelease:un,keyboardIsOpen:U,modal:w,snapPointsOffset:Be,activeSnapPointIndex:pe,direction:y,shouldScaleBackground:i,setBackgroundColorOnScale:d,noBodyStyles:S,container:E,autoFocus:F}},r))}const na=l.forwardRef(function({...n},t){const{overlayRef:r,snapPoints:s,onRelease:a,shouldFade:o,isOpen:i,modal:d,shouldAnimate:u}=Mt(),c=Ys(t,r),g=s&&s.length>0;if(!d)return null;const x=l.useCallback(f=>a(f),[a]);return l.createElement(H.Overlay,{onMouseUp:x,ref:c,"data-vaul-overlay":"","data-vaul-snap-points":i&&g?"true":"false","data-vaul-snap-points-overlay":i&&o?"true":"false","data-vaul-animate":u!=null&&u.current?"true":"false",...n})});na.displayName="Drawer.Overlay";const ra=l.forwardRef(function({onPointerDownOutside:n,style:t,onOpenAutoFocus:r,...s},a){const{drawerRef:o,onPress:i,onRelease:d,onDrag:u,keyboardIsOpen:c,snapPointsOffset:g,activeSnapPointIndex:x,modal:f,isOpen:b,direction:h,snapPoints:v,container:w,handleOnly:j,shouldAnimate:N,autoFocus:S}=Mt(),[y,k]=l.useState(!1),D=Ys(a,o),C=l.useRef(null),T=l.useRef(null),R=l.useRef(!1),L=v&&v.length>0;$i();const E=(I,M,_=0)=>{if(R.current)return!0;const W=Math.abs(I.y),O=Math.abs(I.x),K=O>W,ee=["bottom","right"].includes(M)?1:-1;if(M==="left"||M==="right"){if(!(I.x*ee<0)&&O>=0&&O<=_)return K}else if(!(I.y*ee<0)&&W>=0&&W<=_)return!K;return R.current=!0,!0};l.useEffect(()=>{L&&window.requestAnimationFrame(()=>{k(!0)})},[]);function F(I){C.current=null,R.current=!1,d(I)}return l.createElement(H.Content,{"data-vaul-drawer-direction":h,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":b&&L?"true":"false","data-vaul-custom-container":w?"true":"false","data-vaul-animate":N!=null&&N.current?"true":"false",...s,ref:D,style:g&&g.length>0?{"--snap-point-height":`${g[x??0]}px`,...t}:t,onPointerDown:I=>{j||(s.onPointerDown==null||s.onPointerDown.call(s,I),C.current={x:I.pageX,y:I.pageY},i(I))},onOpenAutoFocus:I=>{r==null||r(I),S||I.preventDefault()},onPointerDownOutside:I=>{if(n==null||n(I),!f||I.defaultPrevented){I.preventDefault();return}c.current&&(c.current=!1)},onFocusOutside:I=>{if(!f){I.preventDefault();return}},onPointerMove:I=>{if(T.current=I,j||(s.onPointerMove==null||s.onPointerMove.call(s,I),!C.current))return;const M=I.pageY-C.current.y,_=I.pageX-C.current.x,W=I.pointerType==="touch"?10:2;E({x:_,y:M},h,W)?u(I):(Math.abs(_)>W||Math.abs(M)>W)&&(C.current=null)},onPointerUp:I=>{s.onPointerUp==null||s.onPointerUp.call(s,I),C.current=null,R.current=!1,d(I)},onPointerOut:I=>{s.onPointerOut==null||s.onPointerOut.call(s,I),F(T.current)},onContextMenu:I=>{s.onContextMenu==null||s.onContextMenu.call(s,I),T.current&&F(T.current)}})});ra.displayName="Drawer.Content";const Vi=250,Gi=120,qi=l.forwardRef(function({preventCycle:n=!1,children:t,...r},s){const{closeDrawer:a,isDragging:o,snapPoints:i,activeSnapPoint:d,setActiveSnapPoint:u,dismissible:c,handleOnly:g,isOpen:x,onPress:f,onDrag:b}=Mt(),h=l.useRef(null),v=l.useRef(!1);function w(){if(v.current){S();return}window.setTimeout(()=>{j()},Gi)}function j(){if(o||n||v.current){S();return}if(S(),!i||i.length===0){c||a();return}if(d===i[i.length-1]&&c){a();return}const k=i.findIndex(C=>C===d);if(k===-1)return;const D=i[k+1];u(D)}function N(){h.current=window.setTimeout(()=>{v.current=!0},Vi)}function S(){h.current&&window.clearTimeout(h.current),v.current=!1}return l.createElement("div",{onClick:w,onPointerCancel:S,onPointerDown:y=>{g&&f(y),N()},onPointerMove:y=>{g&&b(y)},ref:s,"data-vaul-drawer-visible":x?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},l.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});qi.displayName="Drawer.Handle";function Wi(n){const t=Mt(),{container:r=t.container,...s}=n;return l.createElement(H.Portal,{container:r,...s})}const Xe={Root:Ui,Content:ra,Overlay:na,Trigger:H.Trigger,Portal:Wi,Close:H.Close,Title:H.Title,Description:H.Description},sa=({shouldScaleBackground:n=!0,...t})=>e.jsx(Xe.Root,{shouldScaleBackground:n,...t});sa.displayName="Drawer";const Xi=Xe.Trigger,aa=Xe.Portal,Ki=Xe.Close,oa=l.forwardRef(function({className:t,...r},s){return e.jsx(Xe.Overlay,{ref:s,className:m("fixed inset-0 z-50 bg-black/40",t),...r})}),Yi=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(aa,{children:[e.jsx(oa,{}),e.jsxs(Xe.Content,{ref:a,className:m("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl","border-t border-border bg-card",t),...s,children:[e.jsx("div",{className:"mx-auto mt-3 h-1.5 w-12 rounded-full bg-border"}),r]})]})});function Qi({className:n,...t}){return e.jsx("div",{className:m("grid gap-1 p-4 text-center sm:text-left",n),...t})}function Ji({className:n,...t}){return e.jsx("div",{className:m("mt-auto flex flex-col gap-2 p-4",n),...t})}const Zi=l.forwardRef(function({className:t,...r},s){return e.jsx(Xe.Title,{ref:s,className:m("text-lg font-semibold",t),...r})}),el=l.forwardRef(function({className:t,...r},s){return e.jsx(Xe.Description,{ref:s,className:m("text-sm text-foreground-muted",t),...r})});function tl(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/1024/1024).toFixed(1)} MB`}const nl=l.forwardRef(function({accept:t,multiple:r,maxSize:s,value:a,onChange:o,hint:i,disabled:d,className:u},c){const g=l.useRef(null),x=l.useId(),[f,b]=l.useState([]),[h,v]=l.useState(!1),w=a??f,j=l.useCallback(k=>{a===void 0&&b(k),o==null||o(k)},[o,a]),N=l.useCallback(k=>{const D=Array.from(k).filter(C=>!s||C.size<=s);j(r?[...w,...D]:D.slice(0,1))},[w,s,r,j]),S=k=>j(w.filter((D,C)=>C!==k)),y=k=>{k.preventDefault(),v(!1),!d&&N(k.dataTransfer.files)};return e.jsxs("div",{ref:c,className:m("flex flex-col gap-3",u),children:[e.jsxs("label",{htmlFor:x,onDragOver:k=>{k.preventDefault(),d||v(!0)},onDragLeave:()=>v(!1),onDrop:y,className:m("group relative flex cursor-pointer flex-col items-center justify-center gap-2","rounded-md border border-dashed border-border bg-background-subtle px-6 py-8","text-center transition-colors","hover:border-border-strong hover:bg-background-muted",h&&"border-accent bg-accent-soft",d&&"pointer-events-none opacity-50"),children:[e.jsx(p.Upload,{className:"size-5 text-foreground-muted","aria-hidden":!0}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Drop files here, or click to browse"}),i&&e.jsx("p",{className:"text-xs text-foreground-muted",children:i})]}),e.jsx("input",{ref:g,id:x,type:"file",accept:t,multiple:r,disabled:d,className:"sr-only",onChange:k=>k.target.files&&N(k.target.files)})]}),w.length>0&&e.jsx("ul",{className:"flex flex-col gap-2",children:w.map((k,D)=>e.jsxs("li",{className:"flex items-center gap-3 rounded-md border border-border bg-card px-3 py-2",children:[e.jsx(p.File,{className:"size-4 shrink-0 text-foreground-muted","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm",children:k.name}),e.jsx("p",{className:"text-xs text-foreground-muted",children:tl(k.size)})]}),e.jsx("button",{type:"button",onClick:()=>S(D),className:"rounded p-1 text-foreground-muted hover:bg-background-muted hover:text-foreground","aria-label":`Remove ${k.name}`,children:e.jsx(p.X,{className:"size-4"})})]},`${k.name}-${D}`))})]})}),rl=ke.cva(["relative pointer-events-auto w-full max-w-md","flex items-start gap-3 rounded-md border bg-card p-3 shadow-md","text-sm text-foreground"],{variants:{variant:{default:"border-border",info:"border-info-border-soft",success:"border-success-border-soft",warning:"border-warning-border-soft",danger:"border-danger-border-soft"}},defaultVariants:{variant:"default"}}),sl={default:null,info:e.jsx(p.Info,{className:"size-4 shrink-0 mt-0.5 text-info-text","aria-hidden":!0}),success:e.jsx(p.CheckCircle2,{className:"size-4 shrink-0 mt-0.5 text-success-text","aria-hidden":!0}),warning:e.jsx(p.AlertTriangle,{className:"size-4 shrink-0 mt-0.5 text-warning-text","aria-hidden":!0}),danger:e.jsx(p.XCircle,{className:"size-4 shrink-0 mt-0.5 text-danger-text","aria-hidden":!0})},al=l.forwardRef(function({className:t,variant:r="default",title:s,action:a,onClose:o,icon:i,children:d,...u},c){const g=i===!1?null:i??sl[r??"default"];return e.jsxs("div",{ref:c,role:"status",className:m(rl({variant:r}),t),...u,children:[g,e.jsxs("div",{className:"min-w-0 flex-1",children:[s&&e.jsx("p",{className:"font-medium",children:s}),d&&e.jsx("p",{className:"text-foreground-muted",children:d})]}),a,o&&e.jsx("button",{type:"button",onClick:o,"aria-label":"Dismiss",className:"rounded p-1 text-foreground-muted hover:bg-background-muted hover:text-foreground",children:e.jsx(p.X,{className:"size-4"})})]})}),ol=l.forwardRef(function({value:t,defaultValue:r=[],onChange:s,placeholder:a="Add and press Enter",max:o,disabled:i,error:d,separators:u=["Enter",","],className:c},g){const[x,f]=l.useState(r),[b,h]=l.useState(""),v=t??x,w=l.useCallback(y=>{t===void 0&&f(y),s==null||s(y)},[s,t]),j=y=>{const k=y.trim();!k||v.includes(k)||o!==void 0&&v.length>=o||w([...v,k])},N=y=>w(v.filter((k,D)=>D!==y)),S=y=>{u.includes(y.key)?(y.preventDefault(),j(b),h("")):y.key==="Backspace"&&!b&&v.length&&N(v.length-1)};return e.jsxs("div",{ref:g,className:m("flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-md border bg-card px-2 py-1.5","transition-colors focus-within:border-ring focus-within:ring-2 focus-within:ring-ring",d?"border-danger focus-within:border-danger focus-within:ring-danger":"border-border",i&&"pointer-events-none opacity-50",c),children:[v.map((y,k)=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-background-muted px-2 py-0.5 text-xs",children:[y,e.jsx("button",{type:"button",onClick:()=>N(k),className:"rounded p-0.5 text-foreground-muted hover:bg-background-subtle hover:text-foreground","aria-label":`Remove ${y}`,children:e.jsx(p.X,{className:"size-3"})})]},`${y}-${k}`)),e.jsx("input",{value:b,disabled:i,onChange:y=>h(y.target.value),onKeyDown:S,onBlur:()=>{b&&(j(b),h(""))},placeholder:v.length===0?a:void 0,className:"min-w-[8ch] flex-1 bg-transparent text-sm outline-none placeholder:text-foreground-subtle"})]})}),il=l.forwardRef(function({className:t,children:r,...s},a){return e.jsx("ol",{ref:a,className:m("relative flex flex-col gap-6",t),...s,children:r})}),ll=l.forwardRef(function({bullet:t,isLast:r,className:s,children:a,...o},i){return e.jsxs("li",{ref:i,className:m("relative flex gap-4 pb-1",s),...o,children:[e.jsxs("div",{className:"relative flex shrink-0 flex-col items-center",children:[e.jsx("div",{className:"flex size-6 items-center justify-center rounded-full border border-border bg-card text-foreground-muted",children:t??e.jsx("span",{className:"size-2 rounded-full bg-accent","aria-hidden":!0})}),!r&&e.jsx("span",{className:"mt-1 flex-1 w-px bg-border","aria-hidden":!0})]}),e.jsx("div",{className:"min-w-0 flex-1 pb-4",children:a})]})});function cl({className:n,children:t}){return e.jsx("p",{className:m("text-xs text-foreground-subtle",n),children:t})}function dl({className:n,children:t}){return e.jsx("p",{className:m("text-sm font-medium",n),children:t})}function ul({className:n,children:t}){return e.jsx("p",{className:m("mt-0.5 text-sm text-foreground-muted",n),children:t})}function fl({data:n,defaultExpanded:t=[],selectedId:r,onSelect:s,className:a}){const[o,i]=l.useState(new Set(t)),d=c=>i(g=>{const x=new Set(g);return x.has(c)?x.delete(c):x.add(c),x});function u(c,g){const x=!!c.children,f=o.has(c.id),b=r===c.id,h=x?f?p.FolderOpen:p.Folder:p.File;return e.jsxs("li",{role:"treeitem","aria-expanded":x?f:void 0,children:[e.jsxs("button",{type:"button",tabIndex:0,onClick:()=>{s==null||s(c.id),x&&d(c.id)},onKeyDown:v=>{(v.key==="ArrowRight"&&x&&!f||v.key==="ArrowLeft"&&x&&f)&&d(c.id)},style:{paddingLeft:g*16+8},className:m("flex w-full items-center gap-1.5 rounded-md py-1 pr-2 text-left text-sm","hover:bg-background-muted focus-visible:bg-background-muted outline-none",b&&"bg-accent-soft text-foreground"),children:[x?e.jsx(p.ChevronRight,{className:m("size-3.5 shrink-0 text-foreground-subtle transition-transform",f&&"rotate-90"),"aria-hidden":!0}):e.jsx("span",{className:"w-3.5 shrink-0","aria-hidden":!0}),c.icon??e.jsx(h,{className:"size-4 shrink-0 text-foreground-muted","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:c.label})]}),x&&f&&e.jsx("ul",{role:"group",className:"mt-0.5",children:c.children.map(v=>u(v,g+1))})]},c.id)}return e.jsx("ul",{role:"tree",className:m("flex flex-col gap-0.5",a),children:n.map(c=>u(c,0))})}function ml({brand:n,title:t,subtitle:r,children:s,footer:a}){return e.jsx("main",{className:"grid min-h-screen place-items-center bg-background-subtle px-4 py-12",children:e.jsxs("div",{className:"w-full max-w-[400px] space-y-6",children:[n&&e.jsx("div",{className:"flex justify-center",children:n}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:t}),r&&e.jsx("p",{className:"text-sm text-foreground-muted",children:r})]}),e.jsx("div",{className:"rounded-lg border border-border bg-card p-6",children:s}),a&&e.jsx("p",{className:"text-center text-sm text-foreground-muted",children:a})]})})}function xl({onSubmit:n,loading:t,error:r,forgotHref:s="/forgot"}){const[a,o]=l.useState(""),[i,d]=l.useState(""),u=c=>{c.preventDefault(),n({email:a,password:i})};return e.jsxs("form",{onSubmit:u,className:"space-y-4",children:[r&&e.jsx(Tt,{variant:"danger",children:r}),e.jsx(se,{type:"email",label:"Email",value:a,onChange:c=>o(c.target.value),autoComplete:"email",required:!0}),e.jsx(se,{type:"password",label:"Password",value:i,onChange:c=>d(c.target.value),autoComplete:"current-password",required:!0}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsx("a",{href:s,className:"font-medium text-accent hover:underline outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:"Forgot password?"})}),e.jsx(q,{type:"submit",loading:t,className:"w-full",trailingIcon:e.jsx(p.ArrowRight,{}),children:"Sign in"})]})}function gl({onSubmit:n,loading:t,error:r}){const[s,a]=l.useState(""),[o,i]=l.useState(""),[d,u]=l.useState("");return e.jsxs("form",{onSubmit:c=>{c.preventDefault(),n({name:s,email:o,password:d})},className:"space-y-4",children:[r&&e.jsx(Tt,{variant:"danger",children:r}),e.jsx(se,{label:"Full name",value:s,onChange:c=>a(c.target.value),required:!0}),e.jsx(se,{type:"email",label:"Work email",value:o,onChange:c=>i(c.target.value),autoComplete:"email",required:!0}),e.jsx(se,{type:"password",label:"Password",helperText:"At least 8 characters.",value:d,onChange:c=>u(c.target.value),autoComplete:"new-password",required:!0}),e.jsx(q,{type:"submit",loading:t,className:"w-full",children:"Create account"}),e.jsx("p",{className:"text-xs text-foreground-subtle text-center",children:"By signing up you agree to our Terms of Service and Privacy Policy."})]})}function pl({onSubmit:n,loading:t,error:r}){const[s,a]=l.useState("");return e.jsxs("form",{onSubmit:o=>{o.preventDefault(),n(s)},className:"space-y-4",children:[r&&e.jsx(Tt,{variant:"danger",children:r}),e.jsx(se,{type:"email",label:"Email",helperText:"We'll send a reset link if an account exists.",value:s,onChange:o=>a(o.target.value),autoComplete:"email",required:!0}),e.jsx(q,{type:"submit",loading:t,className:"w-full",leadingIcon:e.jsx(p.Mail,{}),children:"Send reset link"})]})}function hl({email:n,onResend:t}){return e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"mx-auto inline-flex size-12 items-center justify-center rounded-full bg-success-soft text-success-text",children:e.jsx(p.CheckCircle2,{className:"size-6","aria-hidden":!0})}),e.jsxs("p",{className:"text-sm text-foreground-muted",children:["We sent a sign-in link to"," ",e.jsx("span",{className:"font-medium text-foreground",children:n}),". Open it on this device to continue."]}),e.jsx(nt,{}),e.jsxs("p",{className:"text-xs text-foreground-subtle",children:["Didn't get it?"," ",e.jsx("button",{type:"button",onClick:t,className:"font-medium text-accent hover:underline outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:"Resend"})]})]})}function et(n){typeof window>"u"||(window.location.hash=n)}function bl({children:n,brand:t,active:r="home"}){return e.jsxs("div",{className:"flex min-h-screen w-full bg-background",children:[e.jsxs(Hn,{defaultCollapsed:!1,header:t,footer:e.jsx(yl,{}),children:[e.jsxs(jt,{label:"Workspace",children:[e.jsx(De,{href:"#dashboard",icon:e.jsx(p.Home,{}),active:r==="home",children:"Home"}),e.jsx(De,{href:"#data-table",icon:e.jsx(p.Folder,{}),active:r==="projects",trailing:e.jsx(ve,{tone:"neutral",children:"12"}),children:"Projects"}),e.jsx(De,{href:"#first-run",icon:e.jsx(p.Inbox,{}),active:r==="inbox",trailing:e.jsx(ve,{tone:"accent",children:"5"}),children:"Inbox"}),e.jsx(De,{href:"#record",icon:e.jsx(p.Users,{}),active:r==="members",trailing:e.jsx(ve,{tone:"neutral",children:"3"}),children:"Members"}),e.jsx(De,{href:"#dashboard",icon:e.jsx(p.BarChart3,{}),active:r==="insights",children:"Insights"})]}),e.jsxs(jt,{label:"Personal",children:[e.jsx(De,{href:"#pricing",icon:e.jsx(p.Bookmark,{}),active:r==="bookmarks",children:"Bookmarks"}),e.jsx(De,{href:"#onboarding",icon:e.jsx(p.LayoutGrid,{}),active:r==="apps",children:"Apps"})]}),e.jsxs(jt,{label:"Account",children:[e.jsx(De,{href:"#settings",icon:e.jsx(p.Settings,{}),active:r==="settings",children:"Settings"}),e.jsx(De,{href:"#settings",icon:e.jsx(p.Plug,{}),active:r==="integrations",children:"Integrations"}),e.jsx(De,{href:"#",icon:e.jsx(p.HelpCircle,{}),active:r==="help",children:"Help & docs"})]})]}),e.jsxs("div",{className:"flex flex-1 flex-col min-w-0",children:[e.jsx(vl,{}),e.jsx("main",{className:"flex-1 overflow-y-auto p-6 md:p-8",children:n})]})]})}function vl(){return e.jsxs("header",{className:"sticky top-0 z-30 flex h-14 items-center gap-3 border-b border-border bg-background/80 px-4 backdrop-blur md:px-6",children:[e.jsx("div",{className:"relative flex-1 max-w-xl",children:e.jsx(se,{type:"search",placeholder:"Search projects, members, files…",hideLabel:!0,label:"Search",prefix:e.jsx(p.Search,{}),suffix:e.jsx(En,{children:"⌘K"})})}),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[e.jsx(jl,{}),e.jsx(wl,{})]})]})}const ur=[{id:"n1",who:{name:"Anu B.",initials:"AB"},action:"mentioned you in",target:"Q2 OKRs",when:"2m",unread:!0},{id:"n2",who:{name:"Bat E.",initials:"BE"},action:"requested review on",target:"fix/login-flow",when:"18m",unread:!0},{id:"n3",who:{name:"Tuya G.",initials:"TG"},action:"commented on",target:"feat/segments",when:"1h",unread:!0},{id:"n4",who:{name:"Khulan O.",initials:"KO"},action:"archived",target:"old-billing-spike",when:"3h"},{id:"n5",who:{name:"Sara M.",initials:"SM"},action:"invited you to",target:"Atlas workspace",when:"Yesterday"}];function jl(){const n=ur.filter(t=>t.unread).length;return e.jsxs(qt,{children:[e.jsx(Wt,{asChild:!0,children:e.jsxs("button",{type:"button","aria-label":`Notifications${n?`, ${n} unread`:""}`,className:"relative inline-flex size-9 items-center justify-center rounded-md text-foreground-muted outline-none transition-colors hover:bg-background-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[e.jsx(p.Bell,{className:"size-4"}),n>0&&e.jsx("span",{"aria-hidden":!0,className:"absolute right-2 top-2 inline-flex h-2 w-2 rounded-full bg-accent ring-2 ring-background"})]})}),e.jsxs(Dt,{align:"end",className:"w-80 p-0",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border px-3 py-2.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:"Notifications"}),n>0&&e.jsxs(ve,{tone:"accent",children:[n," new"]})]}),e.jsx("button",{type:"button",className:"text-xs text-foreground-muted hover:text-foreground",children:"Mark all read"})]}),e.jsx("ul",{className:"max-h-80 overflow-y-auto py-1",children:ur.map(t=>e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>et("record"),className:"flex w-full items-start gap-3 px-3 py-2.5 text-left outline-none hover:bg-background-muted focus-visible:bg-background-muted",children:[e.jsxs("div",{className:"relative mt-0.5",children:[e.jsx(Re,{size:"sm",fallback:t.who.initials}),t.unread&&e.jsx("span",{"aria-hidden":!0,className:"absolute -right-0.5 -top-0.5 inline-flex h-2 w-2 rounded-full bg-accent ring-2 ring-background"})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("p",{className:"text-sm leading-snug",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.who.name})," ",e.jsx("span",{className:"text-foreground-muted",children:t.action})," ",e.jsx("span",{className:"font-medium text-foreground",children:t.target})]}),e.jsx("p",{className:"mt-0.5 text-xs text-foreground-subtle",children:t.when})]})]})},t.id))}),e.jsx("div",{className:"border-t border-border px-3 py-2 text-center",children:e.jsx("button",{type:"button",onClick:()=>et("record"),className:"text-xs font-medium text-accent hover:underline",children:"View all notifications"})})]})]})}function wl(){return e.jsxs(qt,{children:[e.jsx(Wt,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":"Open profile menu",className:"flex items-center gap-2 rounded-full p-0.5 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background hover:bg-background-muted",children:e.jsx(Re,{size:"sm",fallback:"BO",status:"online"})})}),e.jsxs(Dt,{align:"end",className:"w-60",children:[e.jsx(Kt,{children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-sm font-medium text-foreground",children:"Bay Otgonbayar"}),e.jsx("span",{className:"text-xs text-foreground-subtle",children:"bay@craftzbay.com"})]})}),e.jsx(ct,{}),e.jsxs(Ze,{onSelect:()=>et("record"),children:[e.jsx(p.User,{className:"size-4"}),"Profile"]}),e.jsxs(Ze,{onSelect:()=>et("settings"),children:[e.jsx(p.Settings,{className:"size-4"}),"Account settings"]}),e.jsxs(Ze,{onSelect:()=>et("pricing"),children:[e.jsx(p.Sparkles,{className:"size-4"}),"Upgrade plan",e.jsx(ve,{tone:"accent",className:"ml-auto",children:"Pro"})]}),e.jsx(ct,{}),e.jsxs(Ze,{onSelect:()=>et("first-run"),children:[e.jsx(p.HelpCircle,{className:"size-4"}),"Help & support"]}),e.jsx(ct,{}),e.jsxs(Ze,{onSelect:()=>et("auth-signin"),children:[e.jsx(p.LogOut,{className:"size-4"}),"Sign out"]})]})]})}function yl(){return e.jsxs("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1.5",children:[e.jsx(Re,{fallback:"BO",size:"sm",status:"online"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:"Bay Otgonbayar"}),e.jsx("p",{className:"truncate text-xs text-foreground-subtle",children:"Owner"})]})]})}const Nl=[{label:"Active users",value:"2,840",delta:{value:"+12%",positive:!0}},{label:"Sessions today",value:"8,402",delta:{value:"+4%",positive:!0}},{label:"Open issues",value:"14",delta:{value:"−6%",positive:!0}},{label:"Error rate",value:"0.32%",delta:{value:"+0.05%",positive:!1}}],Cl=[{id:"1",who:{name:"Anu B.",initials:"AB"},action:"merged",target:"feat/segments",when:"12m ago"},{id:"2",who:{name:"Bat E.",initials:"BE"},action:"opened",target:"fix/login-flow",when:"34m ago"},{id:"3",who:{name:"Tuya G.",initials:"TG"},action:"commented on",target:"Q2 OKRs",when:"1h ago"},{id:"4",who:{name:"Khulan O.",initials:"KO"},action:"archived",target:"old-billing-spike",when:"3h ago"}];function Sl(){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("header",{className:"flex items-end justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Overview"}),e.jsx("p",{className:"text-sm text-foreground-muted mt-1",children:"What's happening across your workspace today."})]}),e.jsx("div",{className:"hidden md:flex items-center gap-2",children:e.jsx(ve,{tone:"neutral",variant:"outline",children:"Last 7 days"})})]}),e.jsx("section",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:Nl.map(n=>e.jsxs(xe,{children:[e.jsx(he,{className:"pb-2",children:e.jsx(Ae,{children:n.label})}),e.jsx(be,{children:e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-semibold tabular text-foreground",children:n.value}),n.delta&&e.jsx("span",{className:n.delta.positive?"text-xs font-medium text-success-text tabular":"text-xs font-medium text-danger-text tabular",children:n.delta.value})]})})]},n.label))}),e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:"Active users"}),e.jsx(Ae,{children:"Distinct sessions per day, last 30 days."})]}),e.jsx(be,{children:e.jsx("div",{role:"img","aria-label":"Active users sparkline",className:"h-48 w-full rounded-md border border-dashed border-border bg-background-subtle"})})]}),e.jsxs(xe,{padding:"none",children:[e.jsx(he,{className:"px-5 pt-5",children:e.jsx(Se,{children:"Recent activity"})}),e.jsxs(Yt,{children:[e.jsx(Qt,{children:e.jsxs(qe,{children:[e.jsx(We,{children:"Who"}),e.jsx(We,{children:"Action"}),e.jsx(We,{children:"Target"}),e.jsx(We,{className:"text-right",children:"When"})]})}),e.jsx(Jt,{children:Cl.map(n=>e.jsxs(qe,{children:[e.jsx(Ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Re,{size:"xs",fallback:n.who.initials}),e.jsx("span",{className:"text-foreground",children:n.who.name})]})}),e.jsx(Ue,{className:"text-foreground-muted",children:n.action}),e.jsx(Ue,{children:e.jsx(ve,{tone:"neutral",variant:"outline",children:n.target})}),e.jsx(Ue,{className:"text-right tabular text-foreground-subtle",children:n.when})]},n.id))})]})]})]})}const kl=[{id:"profile",label:"Profile",icon:e.jsx(p.User,{})},{id:"security",label:"Security",icon:e.jsx(p.Lock,{})},{id:"notifications",label:"Notifications",icon:e.jsx(p.Bell,{})},{id:"billing",label:"Billing",icon:e.jsx(p.CreditCard,{})},{id:"team",label:"Team",icon:e.jsx(p.Users,{})}];function Tl(){const[n,t]=l.useState("profile");return e.jsxs("div",{className:"mx-auto max-w-5xl space-y-8",children:[e.jsxs("header",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Settings"}),e.jsx("p",{className:"text-sm text-foreground-muted mt-1",children:"Manage your account, preferences, and billing."})]}),e.jsxs("div",{className:"grid gap-8 md:grid-cols-[200px_1fr]",children:[e.jsx("nav",{"aria-label":"Settings sections",className:"md:sticky md:top-20 md:self-start",children:e.jsx("ul",{className:"flex flex-col gap-px",children:kl.map(r=>e.jsx("li",{children:e.jsxs("a",{href:`#${r.id}`,onClick:()=>t(r.id),className:m("flex h-9 items-center gap-2 rounded-md px-2 text-sm transition-colors duration-[var(--duration-fast)] outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",n===r.id?"bg-background-muted text-foreground font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground"),"aria-current":n===r.id?"page":void 0,children:[e.jsx("span",{className:"[&_svg]:size-4",children:r.icon}),r.label]})},r.id))})}),e.jsxs("div",{className:"space-y-8",children:[e.jsx("section",{id:"profile",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:"Profile"}),e.jsx(Ae,{children:"Visible to your teammates."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(Re,{size:"xl",fallback:"BO"}),e.jsxs("div",{children:[e.jsx(q,{variant:"outline",size:"sm",children:"Change photo"}),e.jsx("p",{className:"text-xs text-foreground-subtle mt-2",children:"JPG or PNG, max 2 MB."})]})]}),e.jsx(nt,{}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(se,{label:"First name",defaultValue:"Bay"}),e.jsx(se,{label:"Last name",defaultValue:"Otgonbayar"})]}),e.jsx(se,{label:"Display email",type:"email",defaultValue:"bay@company.com"}),e.jsx("div",{className:"flex justify-end",children:e.jsx(q,{children:"Save changes"})})]})]})}),e.jsx("section",{id:"security",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:"Security"}),e.jsx(Ae,{children:"How you sign in and protect your account."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsx(se,{label:"Current password",type:"password"}),e.jsx(se,{label:"New password",type:"password",helperText:"At least 8 characters."}),e.jsx(nt,{}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Two-factor authentication"}),e.jsx("p",{className:"text-xs text-foreground-subtle",children:"Required for admin accounts on production."})]}),e.jsx(ot,{defaultChecked:!0})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(q,{children:"Update password"})})]})]})}),e.jsx("section",{id:"notifications",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:"Notifications"}),e.jsx(Ae,{children:"Choose what we email and ping you about."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsx(ot,{label:"Product updates",description:"A short note when we ship something.",defaultChecked:!0}),e.jsx(nt,{}),e.jsx(ot,{label:"Mentions",description:"When a teammate @ mentions you in a comment.",defaultChecked:!0}),e.jsx(nt,{}),e.jsx(ot,{label:"Weekly digest",description:"A Monday-morning summary of last week's activity."})]})]})}),e.jsx("section",{id:"billing",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:"Billing"}),e.jsx(Ae,{children:"Your plan, invoices, and payment method."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-md border border-border bg-background-subtle p-4",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Team — $20/user/month"}),e.jsx("p",{className:"text-xs text-foreground-subtle mt-1",children:"Renews on 1 June 2026 · 12 seats"})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(q,{variant:"outline",children:"Manage seats"}),e.jsx(q,{children:"Upgrade plan"})]})]})]})}),e.jsx("section",{id:"team",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:"Team"}),e.jsx(Ae,{children:"Invite teammates and manage roles."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(se,{type:"email",placeholder:"teammate@company.com",hideLabel:!0,label:"Invite email",className:"flex-1"}),e.jsx(q,{children:"Send invite"})]}),e.jsx("p",{className:"text-xs text-foreground-subtle",children:"Invited members will receive a sign-up link by email."})]})]})})]})]})]})}const Dl=[{id:"p1",name:"Pulse onboarding",status:"active",owner:"Anu B.",updatedAt:"2 hours ago"},{id:"p2",name:"Q2 OKRs rollout",status:"active",owner:"Bat E.",updatedAt:"Yesterday"},{id:"p3",name:"Legacy export",status:"paused",owner:"Tuya G.",updatedAt:"3 days ago"},{id:"p4",name:"Billing spike",status:"archived",owner:"Khulan O.",updatedAt:"Last week"},{id:"p5",name:"Marketing refresh",status:"active",owner:"Anu B.",updatedAt:"Last week"}],fr={active:{tone:"success",label:"Active"},paused:{tone:"warning",label:"Paused"},archived:{tone:"neutral",label:"Archived"}};function Rl(){const[n,t]=l.useState(""),[r,s]=l.useState("all"),[a,o]=l.useState([]),[i,d]=l.useState(1),[u,c]=l.useState(10),g=l.useMemo(()=>Dl.filter(b=>{const h=b.name.toLowerCase().includes(n.toLowerCase()),v=r==="all"||b.status===r;return h&&v}),[n,r]),x=g.length>0&&a.length===g.length,f=a.length>0&&!x;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{className:"flex items-end justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Projects"}),e.jsxs("p",{className:"text-sm text-foreground-muted mt-1",children:[g.length," project",g.length===1?"":"s"," match your filters."]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{variant:"outline",leadingIcon:e.jsx(p.Upload,{}),children:"Import"}),e.jsx(q,{leadingIcon:e.jsx(p.Plus,{}),children:"New project"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(An,{value:r,onValueChange:s,children:[e.jsx(en,{className:"w-36",placeholder:"Status"}),e.jsxs(tn,{children:[e.jsx(tt,{value:"all",children:"All statuses"}),e.jsx(tt,{value:"active",children:"Active"}),e.jsx(tt,{value:"paused",children:"Paused"}),e.jsx(tt,{value:"archived",children:"Archived"})]})]}),e.jsx(q,{variant:"outline",size:"sm",leadingIcon:e.jsx(p.Filter,{}),children:"More filters"})]}),a.length>0&&e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border bg-background-subtle px-4 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(bt,{checked:x?!0:f?"indeterminate":!1,onCheckedChange:b=>o(b?g.map(h=>h.id):[]),"aria-label":"Select all"}),e.jsxs("span",{className:"text-sm text-foreground",children:[a.length," selected"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{variant:"ghost",size:"sm",leadingIcon:e.jsx(p.Download,{}),children:"Export"}),e.jsx(q,{variant:"ghost",size:"sm",leadingIcon:e.jsx(p.Trash2,{}),children:"Delete"})]})]}),e.jsx(Wr,{rows:g.slice((i-1)*u,i*u),filter:{value:n,onChange:t,placeholder:"Search projects…"},emptyState:e.jsx(Zt,{title:"No projects match",description:"Try adjusting filters or creating a new project.",action:e.jsx(q,{leadingIcon:e.jsx(p.Plus,{}),children:"New project"}),className:"border-0 bg-transparent"}),columns:[{key:"select",header:e.jsx(bt,{checked:x?!0:f?"indeterminate":!1,onCheckedChange:b=>o(b?g.map(h=>h.id):[]),"aria-label":"Select all rows"}),width:"32px",cell:b=>e.jsx(bt,{checked:a.includes(b.id),onCheckedChange:h=>o(v=>h?[...v,b.id]:v.filter(w=>w!==b.id)),"aria-label":`Select ${b.name}`})},{key:"name",header:"Name",sortable:!0,cell:b=>e.jsx("span",{className:"font-medium text-foreground",children:b.name})},{key:"status",header:"Status",cell:b=>e.jsx(ve,{tone:fr[b.status].tone,dot:!0,children:fr[b.status].label})},{key:"owner",header:"Owner"},{key:"updatedAt",header:"Updated",align:"right"}]}),e.jsx(_n,{page:i,pageCount:Math.max(1,Math.ceil(g.length/u)),onPageChange:d,totalItems:g.length,pageSize:u,pageSizeOptions:[10,20,50],onPageSizeChange:b=>{c(b),d(1)}})]})}function Il(){return e.jsxs("div",{className:"space-y-6",children:[e.jsx(Cn,{items:[{label:"Projects",href:"/projects"},{label:"Pulse onboarding"}]}),e.jsxs("header",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Pulse onboarding"}),e.jsx(ve,{tone:"success",dot:!0,children:"Active"})]}),e.jsx("p",{className:"text-sm text-foreground-muted max-w-2xl",children:"Self-serve onboarding flow for new admins. Owns the first 5 minutes of every workspace."})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{variant:"outline",leadingIcon:e.jsx(p.Edit2,{}),children:"Edit"}),e.jsx(q,{variant:"outline",leadingIcon:e.jsx(p.Trash2,{}),children:"Archive"}),e.jsx(q,{trailingIcon:e.jsx(p.ExternalLink,{}),children:"Open in app"})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_320px]",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs(Rs,{defaultValue:"overview",children:[e.jsxs(Vn,{children:[e.jsx(it,{value:"overview",children:"Overview"}),e.jsx(it,{value:"activity",children:"Activity"}),e.jsx(it,{value:"files",children:"Files"}),e.jsx(it,{value:"settings",children:"Settings"})]}),e.jsx(lt,{value:"overview",className:"space-y-4",children:e.jsxs(xe,{children:[e.jsx(he,{children:e.jsx(Se,{children:"Summary"})}),e.jsxs(be,{className:"space-y-2 text-foreground-muted leading-relaxed",children:[e.jsx("p",{children:"The Pulse onboarding flow walks new admins through workspace creation, teammate invites, and first-data import in under five minutes."}),e.jsx("p",{children:"Completion rate sits at 71% (week-over-week +4 pts) and median time to finish is 4 m 22 s."})]})]})}),e.jsx(lt,{value:"activity",children:e.jsx("p",{className:"text-sm text-foreground-muted",children:"Activity feed appears here."})}),e.jsx(lt,{value:"files",children:e.jsx("p",{className:"text-sm text-foreground-muted",children:"Linked documents appear here."})}),e.jsx(lt,{value:"settings",children:e.jsx("p",{className:"text-sm text-foreground-muted",children:"Project settings appear here."})})]})}),e.jsxs("aside",{className:"space-y-4",children:[e.jsxs(xe,{children:[e.jsx(he,{children:e.jsx(Se,{children:"Details"})}),e.jsxs(be,{className:"space-y-3 text-sm",children:[e.jsx(Bt,{label:"Owner",value:e.jsxs(e.Fragment,{children:[e.jsx(Re,{size:"xs",fallback:"AB"})," Anu B."]})}),e.jsx(Bt,{label:"Created",value:"12 Feb 2026"}),e.jsx(Bt,{label:"Updated",value:"2 hours ago"}),e.jsx(Bt,{label:"Tags",value:e.jsxs(e.Fragment,{children:[e.jsx(ve,{tone:"accent",children:"growth"})," ",e.jsx(ve,{tone:"neutral",variant:"outline",children:"v2"})]})})]})]}),e.jsxs(xe,{children:[e.jsx(he,{children:e.jsx(Se,{children:"Watchers"})}),e.jsx(be,{children:e.jsxs("div",{className:"flex -space-x-2",children:[e.jsx(Re,{fallback:"AB"}),e.jsx(Re,{fallback:"BE"}),e.jsx(Re,{fallback:"TG"}),e.jsx(Re,{fallback:"+2"})]})})]})]})]})]})}function Bt({label:n,value:t}){return e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"text-foreground-subtle",children:n}),e.jsx("span",{className:"flex items-center gap-1.5 text-foreground",children:t})]})}const $t=[{title:"Workspace"},{title:"Invite team"},{title:"Connect data"},{title:"Done"}];function Pl(){const[n,t]=l.useState(0),r=()=>t(a=>Math.min(a+1,$t.length-1)),s=()=>t(a=>Math.max(a-1,0));return e.jsxs("div",{className:"mx-auto max-w-2xl space-y-8 py-12",children:[e.jsx(Un,{steps:$t,current:n}),e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:mr[n].title}),e.jsx(Ae,{children:mr[n].description})]}),e.jsxs(be,{className:"space-y-4",children:[n===0&&e.jsxs(e.Fragment,{children:[e.jsx(se,{label:"Workspace name",placeholder:"Acme Inc."}),e.jsx(se,{label:"URL slug",prefix:e.jsx("span",{children:"acme.app/"}),placeholder:"acme"})]}),n===1&&e.jsxs(e.Fragment,{children:[e.jsx(se,{type:"email",label:"Invite by email",placeholder:"teammate@company.com",helperText:"Separate multiple emails with commas."}),e.jsxs(Bn,{defaultValue:"member",children:[e.jsx(vt,{value:"admin",label:"Admin",description:"Can manage workspace and billing."}),e.jsx(vt,{value:"member",label:"Member",description:"Can create and edit projects."}),e.jsx(vt,{value:"viewer",label:"Viewer",description:"Read-only access."})]})]}),n===2&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-foreground-muted",children:"Connect your data source so we can populate your first dashboard."}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:["Postgres","BigQuery","Snowflake","CSV upload"].map(a=>e.jsxs("button",{type:"button",className:"rounded-lg border border-border bg-card p-4 text-left hover:border-border-strong hover:bg-background-subtle transition-colors duration-[var(--duration-fast)] outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[e.jsx("p",{className:"font-medium text-foreground",children:a}),e.jsx("p",{className:"text-xs text-foreground-subtle mt-1",children:"Quick setup with SSO"})]},a))})]}),n===3&&e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center",children:[e.jsx(p.CheckCircle2,{className:"size-10 text-success-text","aria-hidden":!0}),e.jsx("p",{className:"text-base font-medium text-foreground",children:"You're all set."}),e.jsx("p",{className:"text-sm text-foreground-muted max-w-sm",children:"Your workspace is ready. We've sent invites and your first dashboard is loading."})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(q,{variant:"ghost",leadingIcon:e.jsx(p.ArrowLeft,{}),onClick:s,disabled:n===0,children:"Back"}),n<$t.length-1?e.jsx(q,{trailingIcon:e.jsx(p.ArrowRight,{}),onClick:r,children:n===$t.length-2?"Finish":"Continue"}):e.jsx(q,{children:"Open workspace"})]})]})}const mr=[{title:"Create your workspace",description:"A workspace is where your team and projects live."},{title:"Invite your team",description:"You can always invite more people later."},{title:"Connect a data source",description:"Pick one — others can be added in settings."},{title:"Welcome aboard",description:"We've set up your starting dashboard."}],Ml=[{name:"Starter",price:"$0",cadence:"forever",description:"For individuals exploring the product.",features:["Up to 3 projects","Community support","Single workspace"],cta:"Start free"},{name:"Team",price:"$20",cadence:"per user / month",description:"For small teams running real workloads.",features:["Unlimited projects","Email support, 24h response","SSO via Google & Microsoft","Audit log (30 days)"],cta:"Start 14-day trial",highlighted:!0},{name:"Enterprise",price:"Custom",cadence:"annual",description:"For organisations with custom requirements.",features:["Everything in Team","SAML SSO + SCIM","Dedicated CSM","SOC 2 report + DPA","Audit log (unlimited)"],cta:"Talk to sales"}];function zl(){return e.jsxs("div",{className:"mx-auto max-w-5xl space-y-8 py-16",children:[e.jsxs("header",{className:"text-center space-y-3",children:[e.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:"Plans that scale with your team"}),e.jsx("p",{className:"text-sm text-foreground-muted max-w-xl mx-auto",children:"Start free, upgrade when you need more. All paid plans include a 14-day trial — no credit card required."})]}),e.jsx("div",{className:"grid gap-4 md:grid-cols-3",children:Ml.map(n=>e.jsxs("div",{className:m("flex flex-col gap-6 rounded-lg border bg-card p-6",n.highlighted?"border-accent shadow-sm":"border-border"),children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:n.name}),n.highlighted&&e.jsx(ve,{tone:"accent",children:"Most popular"})]}),e.jsx("p",{className:"text-sm text-foreground-muted",children:n.description})]}),e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-3xl font-semibold tabular text-foreground",children:n.price}),e.jsx("span",{className:"text-sm text-foreground-subtle",children:n.cadence})]}),e.jsx("ul",{className:"space-y-2 text-sm",children:n.features.map(t=>e.jsxs("li",{className:"flex items-start gap-2 text-foreground",children:[e.jsx(p.Check,{className:"size-4 text-accent shrink-0 mt-0.5","aria-hidden":!0}),t]},t))}),e.jsx(q,{variant:n.highlighted?"primary":"outline",className:"mt-auto w-full",children:n.cta})]},n.name))})]})}const El=[{icon:e.jsx(p.Plus,{}),title:"Create a project",description:"Track a real piece of work end-to-end.",cta:"New project"},{icon:e.jsx(p.Upload,{}),title:"Import existing data",description:"CSV, Postgres, BigQuery, or Snowflake — connect in a minute.",cta:"Connect source"},{icon:e.jsx(p.Users,{}),title:"Invite your team",description:"Workspaces are better with teammates. We'll send the invites.",cta:"Invite people"}];function Al(){return e.jsxs("div",{className:"mx-auto max-w-3xl space-y-8 py-12",children:[e.jsx(Zt,{icon:e.jsx(p.Folder,{className:"size-6"}),title:"Your workspace is ready",description:"Start with one of the steps below — you can always come back to the others.",action:e.jsx(q,{trailingIcon:e.jsx(p.ArrowRight,{}),children:"Open tutorial"})}),e.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:El.map(n=>e.jsx(xe,{variant:"interactive",children:e.jsxs(be,{className:"space-y-3",children:[e.jsx("div",{className:"inline-flex size-9 items-center justify-center rounded-md bg-accent-soft text-on-accent-soft [&_svg]:size-4",children:n.icon}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:n.title}),e.jsx("p",{className:"text-xs text-foreground-muted leading-relaxed",children:n.description})]}),e.jsx(q,{variant:"ghost",size:"sm",trailingIcon:e.jsx(p.ArrowRight,{}),children:n.cta})]})},n.title))})]})}Object.defineProperty(exports,"cva",{enumerable:!0,get:()=>ke.cva});exports.Accordion=Aa;exports.AccordionContent=br;exports.AccordionItem=pr;exports.AccordionTrigger=hr;exports.Alert=Tt;exports.AppShell=bl;exports.AreaChart=bi;exports.AuthLayout=ml;exports.Avatar=Re;exports.AvatarGroup=jr;exports.Badge=ve;exports.BarChart=vi;exports.Breadcrumbs=Cn;exports.Button=q;exports.Calendar=Po;exports.Card=xe;exports.CardContent=be;exports.CardDescription=Ae;exports.CardFooter=wr;exports.CardHeader=he;exports.CardTitle=Se;exports.Carousel=fi;exports.CarouselContent=mi;exports.CarouselItem=xi;exports.CarouselNext=pi;exports.CarouselPrevious=gi;exports.Checkbox=bt;exports.Combobox=yr;exports.Command=Nr;exports.CommandDialog=Ga;exports.CommandEmpty=kr;exports.CommandGroup=Tr;exports.CommandInput=Cr;exports.CommandItem=Rr;exports.CommandList=Sr;exports.CommandSeparator=Dr;exports.CommandShortcut=Va;exports.ConfirmationDialog=ns;exports.ContextMenu=Wa;exports.ContextMenuCheckboxItem=Ar;exports.ContextMenuContent=zr;exports.ContextMenuGroup=Ka;exports.ContextMenuItem=Er;exports.ContextMenuLabel=Or;exports.ContextMenuPortal=Ir;exports.ContextMenuRadioGroup=Qa;exports.ContextMenuRadioItem=Lr;exports.ContextMenuSeparator=Fr;exports.ContextMenuShortcut=_r;exports.ContextMenuSub=Ya;exports.ContextMenuSubContent=Mr;exports.ContextMenuSubTrigger=Pr;exports.ContextMenuTrigger=Xa;exports.Dashboard=Sl;exports.DataGrid=Wr;exports.DataTablePage=Rl;exports.DatePicker=Qr;exports.DateRangePicker=Jr;exports.Dialog=Zr;exports.DialogClose=ts;exports.DialogContent=Rn;exports.DialogDescription=zn;exports.DialogFooter=Pn;exports.DialogHeader=In;exports.DialogOverlay=Dn;exports.DialogPortal=es;exports.DialogTitle=Mn;exports.DialogTrigger=so;exports.Drawer=sa;exports.DrawerClose=Ki;exports.DrawerContent=Yi;exports.DrawerDescription=el;exports.DrawerFooter=Ji;exports.DrawerHeader=Qi;exports.DrawerOverlay=oa;exports.DrawerPortal=aa;exports.DrawerTitle=Zi;exports.DrawerTrigger=Xi;exports.DropdownMenu=qt;exports.DropdownMenuCheckboxItem=Sn;exports.DropdownMenuContent=Dt;exports.DropdownMenuGroup=Ja;exports.DropdownMenuItem=Ze;exports.DropdownMenuLabel=Kt;exports.DropdownMenuPortal=Br;exports.DropdownMenuRadioGroup=eo;exports.DropdownMenuRadioItem=Ur;exports.DropdownMenuSeparator=ct;exports.DropdownMenuShortcut=Vr;exports.DropdownMenuSub=Za;exports.DropdownMenuSubContent=Hr;exports.DropdownMenuSubTrigger=$r;exports.DropdownMenuTrigger=Wt;exports.EmptyState=Zt;exports.ErrorState=rs;exports.FileUpload=nl;exports.FirstRunEmpty=Al;exports.ForgotPasswordForm=pl;exports.Form=oo;exports.FormControl=ls;exports.FormDescription=cs;exports.FormError=ds;exports.FormField=io;exports.FormItem=os;exports.FormLabel=is;exports.IconButton=Rt;exports.Icons=Ea;exports.Input=se;exports.Kbd=En;exports.LineChart=hi;exports.MagicLinkSent=hl;exports.MultiSelect=us;exports.Onboarding=Pl;exports.Pagination=_n;exports.Popover=uo;exports.PopoverAnchor=mo;exports.PopoverClose=xo;exports.PopoverContent=gs;exports.PopoverTrigger=fo;exports.Pricing=zl;exports.Progress=ps;exports.ProgressCircle=hs;exports.RadioGroup=Bn;exports.RadioItem=vt;exports.RecordDetail=Il;exports.ScrollArea=bs;exports.ScrollBar=$n;exports.Select=An;exports.SelectContent=tn;exports.SelectGroup=xs;exports.SelectItem=tt;exports.SelectLabel=Fn;exports.SelectScrollDownButton=On;exports.SelectScrollUpButton=Ln;exports.SelectSeparator=ms;exports.SelectTrigger=en;exports.SelectValue=lo;exports.Separator=nt;exports.SettingsPage=Tl;exports.Sheet=bo;exports.SheetClose=jo;exports.SheetContent=ws;exports.SheetDescription=Ss;exports.SheetFooter=Ns;exports.SheetHeader=ys;exports.SheetPortal=vs;exports.SheetTitle=Cs;exports.SheetTrigger=vo;exports.Sidebar=Hn;exports.SidebarGroup=ks;exports.SidebarItem=De;exports.SidebarSection=jt;exports.SignInForm=xl;exports.SignUpForm=gl;exports.Skeleton=Tn;exports.Slider=Ts;exports.Snackbar=al;exports.Spinner=Ds;exports.Stepper=Un;exports.Switch=ot;exports.Table=Yt;exports.TableBody=Jt;exports.TableCaption=qr;exports.TableCell=Ue;exports.TableFooter=Gr;exports.TableHead=We;exports.TableHeader=Qt;exports.TableRow=qe;exports.TableSortHeader=kn;exports.Tabs=Rs;exports.TabsContent=lt;exports.TabsList=Vn;exports.TabsTrigger=it;exports.TagInput=ol;exports.Textarea=Is;exports.Timeline=il;exports.TimelineDescription=ul;exports.TimelineItem=ll;exports.TimelineTime=cl;exports.TimelineTitle=dl;exports.Toast=Ms;exports.ToastAction=As;exports.ToastClose=Ls;exports.ToastDescription=Es;exports.ToastProvider=To;exports.ToastTitle=zs;exports.ToastViewport=Ps;exports.Tooltip=_s;exports.TooltipContent=Gn;exports.TooltipProvider=Io;exports.TooltipRoot=Os;exports.TooltipTrigger=Fs;exports.TopNav=Bs;exports.TopNavLink=$s;exports.Tree=fl;exports.cn=m;exports.toast=za;exports.uid=Ia;exports.useCommandPaletteShortcut=qa;exports.useFormField=It;exports.useMediaQuery=gr;exports.usePrefersReducedMotion=Pa;exports.useToast=Ma;
|
|
9
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function yi(){const n=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(n)&&/Mobile/.test(n)||/FxiOS/.test(n))}function Ni(){return Qn(/^Mac/)}function Ci(){return Qn(/^iPhone/)}function ir(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Si(){return Qn(/^iPad/)||Ni()&&navigator.maxTouchPoints>1}function Xs(){return Ci()||Si()}function Qn(n){return typeof window<"u"&&window.navigator!=null?n.test(window.navigator.platform):void 0}const ki=24,Ti=typeof window<"u"?l.useLayoutEffect:l.useEffect;function lr(...n){return(...t)=>{for(let r of n)typeof r=="function"&&r(...t)}}const mn=typeof document<"u"&&window.visualViewport;function cr(n){let t=window.getComputedStyle(n);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Ks(n){for(cr(n)&&(n=n.parentElement);n&&!cr(n);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}const Di=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let _t=0,xn;function Ri(n={}){let{isDisabled:t}=n;Ti(()=>{if(!t)return _t++,_t===1&&Xs()&&(xn=Ii()),()=>{_t--,_t===0&&(xn==null||xn())}},[t])}function Ii(){let n,t=0,r=x=>{n=Ks(x.target),!(n===document.documentElement&&n===document.body)&&(t=x.changedTouches[0].pageY)},s=x=>{if(!n||n===document.documentElement||n===document.body){x.preventDefault();return}let f=x.changedTouches[0].pageY,b=n.scrollTop,h=n.scrollHeight-n.clientHeight;h!==0&&((b<=0&&f>t||b>=h&&f<t)&&x.preventDefault(),t=f)},a=x=>{let f=x.target;jn(f)&&f!==document.activeElement&&(x.preventDefault(),f.style.transform="translateY(-2000px)",f.focus(),requestAnimationFrame(()=>{f.style.transform=""}))},o=x=>{let f=x.target;jn(f)&&(f.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{f.style.transform="",mn&&(mn.height<window.innerHeight?requestAnimationFrame(()=>{dr(f)}):mn.addEventListener("resize",()=>dr(f),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},d=window.pageXOffset,u=window.pageYOffset,c=lr(Pi(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let g=lr(xt(document,"touchstart",r,{passive:!1,capture:!0}),xt(document,"touchmove",s,{passive:!1,capture:!0}),xt(document,"touchend",a,{passive:!1,capture:!0}),xt(document,"focus",o,!0),xt(window,"scroll",i));return()=>{c(),g(),window.scrollTo(d,u)}}function Pi(n,t,r){let s=n.style[t];return n.style[t]=r,()=>{n.style[t]=s}}function xt(n,t,r,s){return n.addEventListener(t,r,s),()=>{n.removeEventListener(t,r,s)}}function dr(n){let t=document.scrollingElement||document.documentElement;for(;n&&n!==t;){let r=Ks(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let s=r.getBoundingClientRect().top,a=n.getBoundingClientRect().top,o=n.getBoundingClientRect().bottom;const i=r.getBoundingClientRect().bottom+ki;o>i&&(r.scrollTop+=a-s)}n=r.parentElement}}function jn(n){return n instanceof HTMLInputElement&&!Di.has(n.type)||n instanceof HTMLTextAreaElement||n instanceof HTMLElement&&n.isContentEditable}function Mi(n,t){typeof n=="function"?n(t):n!=null&&(n.current=t)}function zi(...n){return t=>n.forEach(r=>Mi(r,t))}function Ys(...n){return Ta.useCallback(zi(...n),n)}const Qs=new WeakMap;function re(n,t,r=!1){if(!n||!(n instanceof HTMLElement))return;let s={};Object.entries(t).forEach(([a,o])=>{if(a.startsWith("--")){n.style.setProperty(a,o);return}s[a]=n.style[a],n.style[a]=o}),!r&&Qs.set(n,s)}function Ei(n,t){if(!n||!(n instanceof HTMLElement))return;let r=Qs.get(n);r&&(n.style[t]=r[t])}const te=n=>{switch(n){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return n}};function Bt(n,t){if(!n)return null;const r=window.getComputedStyle(n),s=r.transform||r.webkitTransform||r.mozTransform;let a=s.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[te(t)?13:12]):(a=s.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[te(t)?5:4]):null)}function Ai(n){return 8*(Math.log(n+1)-2)}function gn(n,t){if(!n)return()=>{};const r=n.style.cssText;return Object.assign(n.style,t),()=>{n.style.cssText=r}}function Li(...n){return(...t)=>{for(const r of n)typeof r=="function"&&r(...t)}}const Y={DURATION:.5,EASE:[.32,.72,0,1]},Js=.4,Oi=.25,Fi=100,Zs=8,Qe=16,wn=26,pn="vaul-dragging";function ea(n){const t=l.useRef(n);return l.useEffect(()=>{t.current=n}),l.useMemo(()=>(...r)=>t.current==null?void 0:t.current.call(t,...r),[])}function _i({defaultProp:n,onChange:t}){const r=l.useState(n),[s]=r,a=l.useRef(s),o=ea(t);return l.useEffect(()=>{a.current!==s&&(o(s),a.current=s)},[s,a,o]),r}function ta({prop:n,defaultProp:t,onChange:r=()=>{}}){const[s,a]=_i({defaultProp:t,onChange:r}),o=n!==void 0,i=o?n:s,d=ea(r),u=l.useCallback(c=>{if(o){const x=typeof c=="function"?c(n):c;x!==n&&d(x)}else a(c)},[o,n,a,d]);return[i,u]}function Bi({activeSnapPointProp:n,setActiveSnapPointProp:t,snapPoints:r,drawerRef:s,overlayRef:a,fadeFromIndex:o,onSnapPointChange:i,direction:d="bottom",container:u,snapToSequentialPoint:c}){const[g,x]=ta({prop:n,defaultProp:r==null?void 0:r[0],onChange:t}),[f,b]=l.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);l.useEffect(()=>{function C(){b({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]);const h=l.useMemo(()=>g===(r==null?void 0:r[r.length-1])||null,[r,g]),v=l.useMemo(()=>{var C;return(C=r==null?void 0:r.findIndex(T=>T===g))!=null?C:null},[r,g]),w=r&&r.length>0&&(o||o===0)&&!Number.isNaN(o)&&r[o]===g||!r,j=l.useMemo(()=>{const C=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var T;return(T=r==null?void 0:r.map(R=>{const L=typeof R=="string";let E=0;if(L&&(E=parseInt(R,10)),te(d)){const I=L?E:f?R*C.height:0;return f?d==="bottom"?C.height-I:-C.height+I:I}const F=L?E:f?R*C.width:0;return f?d==="right"?C.width-F:-C.width+F:F}))!=null?T:[]},[r,f,u]),N=l.useMemo(()=>v!==null?j==null?void 0:j[v]:null,[j,v]),S=l.useCallback(C=>{var T;const R=(T=j==null?void 0:j.findIndex(L=>L===C))!=null?T:null;i(R),re(s.current,{transition:`transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,transform:te(d)?`translate3d(0, ${C}px, 0)`:`translate3d(${C}px, 0, 0)`}),j&&R!==j.length-1&&o!==void 0&&R!==o&&R<o?re(a.current,{transition:`opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,opacity:"0"}):re(a.current,{transition:`opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,opacity:"1"}),x(r==null?void 0:r[Math.max(R,0)])},[s.current,r,j,o,a,x]);l.useEffect(()=>{if(g||n){var C;const T=(C=r==null?void 0:r.findIndex(R=>R===n||R===g))!=null?C:-1;j&&T!==-1&&typeof j[T]=="number"&&S(j[T])}},[g,n,r,j,S]);function y({draggedDistance:C,closeDrawer:T,velocity:R,dismissible:L}){if(o===void 0)return;const E=d==="bottom"||d==="right"?(N??0)-C:(N??0)+C,F=v===o-1,I=v===0,M=C>0;if(F&&re(a.current,{transition:`opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`}),!c&&R>2&&!M){L?T():S(j[0]);return}if(!c&&R>2&&M&&j&&r){S(j[r.length-1]);return}const _=j==null?void 0:j.reduce((O,K)=>typeof O!="number"||typeof K!="number"?O:Math.abs(K-E)<Math.abs(O-E)?K:O),W=te(d)?window.innerHeight:window.innerWidth;if(R>Js&&Math.abs(C)<W*.4){const O=M?1:-1;if(O>0&&h&&r){S(j[r.length-1]);return}if(I&&O<0&&L&&T(),v===null)return;S(j[v+O]);return}S(_)}function k({draggedDistance:C}){if(N===null)return;const T=d==="bottom"||d==="right"?N-C:N+C;(d==="bottom"||d==="right")&&T<j[j.length-1]||(d==="top"||d==="left")&&T>j[j.length-1]||re(s.current,{transform:te(d)?`translate3d(0, ${T}px, 0)`:`translate3d(${T}px, 0, 0)`})}function D(C,T){if(!r||typeof v!="number"||!j||o===void 0)return null;const R=v===o-1;if(v>=o&&T)return 0;if(R&&!T)return 1;if(!w&&!R)return null;const E=R?v+1:v-1,F=R?j[E]-j[E-1]:j[E+1]-j[E],I=C/Math.abs(F);return R?1-I:I}return{isLastSnapPoint:h,activeSnapPoint:g,shouldFade:w,getPercentageDragged:D,setActiveSnapPoint:x,activeSnapPointIndex:v,onRelease:y,onDrag:k,snapPointsOffset:j}}const $i=()=>()=>{};function Hi(){const{direction:n,isOpen:t,shouldScaleBackground:r,setBackgroundColorOnScale:s,noBodyStyles:a}=zt(),o=l.useRef(null),i=l.useMemo(()=>document.body.style.backgroundColor,[]);function d(){return(window.innerWidth-wn)/window.innerWidth}l.useEffect(()=>{if(t&&r){o.current&&clearTimeout(o.current);const u=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!u)return;Li(s&&!a?gn(document.body,{background:"black"}):$i,gn(u,{transformOrigin:te(n)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Y.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Y.EASE.join(",")})`}));const c=gn(u,{borderRadius:`${Zs}px`,overflow:"hidden",...te(n)?{transform:`scale(${d()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${d()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{c(),o.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},Y.DURATION*1e3)}}},[t,r,i])}let gt=null;function Ui({isOpen:n,modal:t,nested:r,hasBeenOpened:s,preventScrollRestoration:a,noBodyStyles:o}){const[i,d]=l.useState(()=>typeof window<"u"?window.location.href:""),u=l.useRef(0),c=l.useCallback(()=>{if(ir()&>===null&&n&&!o){gt={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:x,innerHeight:f}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-u.current}px`,left:`${-x}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const b=f-window.innerHeight;b&&u.current>=f&&(document.body.style.top=`${-(u.current+b)}px`)}),300)}},[n]),g=l.useCallback(()=>{if(ir()&>!==null&&!o){const x=-parseInt(document.body.style.top,10),f=-parseInt(document.body.style.left,10);Object.assign(document.body.style,gt),window.requestAnimationFrame(()=>{if(a&&i!==window.location.href){d(window.location.href);return}window.scrollTo(f,x)}),gt=null}},[i]);return l.useEffect(()=>{function x(){u.current=window.scrollY}return x(),window.addEventListener("scroll",x),()=>{window.removeEventListener("scroll",x)}},[]),l.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||g()}},[t,g]),l.useEffect(()=>{r||!s||(n?(!window.matchMedia("(display-mode: standalone)").matches&&c(),t||window.setTimeout(()=>{g()},500)):g())},[n,s,i,t,r,c,g]),{restorePositionSetting:g}}function Vi({open:n,onOpenChange:t,children:r,onDrag:s,onRelease:a,snapPoints:o,shouldScaleBackground:i=!1,setBackgroundColorOnScale:d=!0,closeThreshold:u=Oi,scrollLockTimeout:c=Fi,dismissible:g=!0,handleOnly:x=!1,fadeFromIndex:f=o&&o.length-1,activeSnapPoint:b,setActiveSnapPoint:h,fixed:v,modal:w=!0,onClose:j,nested:N,noBodyStyles:S=!1,direction:y="bottom",defaultOpen:k=!1,disablePreventScroll:D=!0,snapToSequentialPoint:C=!1,preventScrollRestoration:T=!1,repositionInputs:R=!0,onAnimationEnd:L,container:E,autoFocus:F=!1}){var I,M;const[_=!1,W]=ta({defaultProp:k,prop:n,onChange:A=>{t==null||t(A),!A&&!N&&At(),setTimeout(()=>{L==null||L(A)},Y.DURATION*1e3),A&&!w&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),A||(document.body.style.pointerEvents="auto")}}),[O,K]=l.useState(!1),[ee,Ie]=l.useState(!1),[Te,Le]=l.useState(!1),je=l.useRef(null),ge=l.useRef(null),Oe=l.useRef(null),Fe=l.useRef(null),ne=l.useRef(null),J=l.useRef(!1),we=l.useRef(null),le=l.useRef(0),U=l.useRef(!1),z=l.useRef(!k),V=l.useRef(0),P=l.useRef(null),oe=l.useRef(((I=P.current)==null?void 0:I.getBoundingClientRect().height)||0),ye=l.useRef(((M=P.current)==null?void 0:M.getBoundingClientRect().width)||0),Ne=l.useRef(0),_e=l.useCallback(A=>{o&&A===Be.length-1&&(ge.current=new Date)},[]),{activeSnapPoint:ze,activeSnapPointIndex:pe,setActiveSnapPoint:Ve,onRelease:dt,snapPointsOffset:Be,onDrag:Et,shouldFade:ut,getPercentageDragged:an}=Bi({snapPoints:o,activeSnapPointProp:b,setActiveSnapPointProp:h,drawerRef:P,fadeFromIndex:f,overlayRef:je,onSnapPointChange:_e,direction:y,container:E,snapToSequentialPoint:C});Ri({isDisabled:!_||ee||!w||Te||!O||!R||!D});const{restorePositionSetting:At}=Ui({isOpen:_,modal:w,nested:N??!1,hasBeenOpened:O,preventScrollRestoration:T,noBodyStyles:S});function at(){return(window.innerWidth-wn)/window.innerWidth}function ft(A){var $,G;!g&&!o||P.current&&!P.current.contains(A.target)||(oe.current=(($=P.current)==null?void 0:$.getBoundingClientRect().height)||0,ye.current=((G=P.current)==null?void 0:G.getBoundingClientRect().width)||0,Ie(!0),Oe.current=new Date,Xs()&&window.addEventListener("touchend",()=>J.current=!1,{once:!0}),A.target.setPointerCapture(A.pointerId),le.current=te(y)?A.pageY:A.pageX)}function $e(A,$){var G;let B=A;const X=(G=window.getSelection())==null?void 0:G.toString(),ce=P.current?Bt(P.current,y):null,ie=new Date;if(B.tagName==="SELECT"||B.hasAttribute("data-vaul-no-drag")||B.closest("[data-vaul-no-drag]"))return!1;if(y==="right"||y==="left")return!0;if(ge.current&&ie.getTime()-ge.current.getTime()<500)return!1;if(ce!==null&&(y==="bottom"?ce>0:ce<0))return!0;if(X&&X.length>0)return!1;if(ne.current&&ie.getTime()-ne.current.getTime()<c&&ce===0||$)return ne.current=ie,!1;for(;B;){if(B.scrollHeight>B.clientHeight){if(B.scrollTop!==0)return ne.current=new Date,!1;if(B.getAttribute("role")==="dialog")return!0}B=B.parentNode}return!0}function mt(A){if(P.current&&ee){const $=y==="bottom"||y==="right"?1:-1,G=(le.current-(te(y)?A.pageY:A.pageX))*$,B=G>0,X=o&&!g&&!B;if(X&&pe===0)return;const ce=Math.abs(G),ie=document.querySelector("[data-vaul-drawer-wrapper]"),Pe=y==="bottom"||y==="top"?oe.current:ye.current;let Ce=ce/Pe;const Ye=an(ce,B);if(Ye!==null&&(Ce=Ye),X&&Ce>=1||!J.current&&!$e(A.target,B))return;if(P.current.classList.add(pn),J.current=!0,re(P.current,{transition:"none"}),re(je.current,{transition:"none"}),o&&Et({draggedDistance:G}),B&&!o){const Ee=Ai(G),Lt=Math.min(Ee*-1,0)*$;re(P.current,{transform:te(y)?`translate3d(0, ${Lt}px, 0)`:`translate3d(${Lt}px, 0, 0)`});return}const Ge=1-Ce;if((ut||f&&pe===f-1)&&(s==null||s(A,Ce),re(je.current,{opacity:`${Ge}`,transition:"none"},!0)),ie&&je.current&&i){const Ee=Math.min(at()+Ce*(1-at()),1),Lt=8-Ce*8,Jn=Math.max(0,14-Ce*14);re(ie,{borderRadius:`${Lt}px`,transform:te(y)?`scale(${Ee}) translate3d(0, ${Jn}px, 0)`:`scale(${Ee}) translate3d(${Jn}px, 0, 0)`,transition:"none"},!0)}if(!o){const Ee=ce*$;re(P.current,{transform:te(y)?`translate3d(0, ${Ee}px, 0)`:`translate3d(${Ee}px, 0, 0)`})}}}l.useEffect(()=>{window.requestAnimationFrame(()=>{z.current=!0})},[]),l.useEffect(()=>{var A;function $(){if(!P.current||!R)return;const G=document.activeElement;if(jn(G)||U.current){var B;const X=((B=window.visualViewport)==null?void 0:B.height)||0,ce=window.innerHeight;let ie=ce-X;const Pe=P.current.getBoundingClientRect().height||0,Ce=Pe>ce*.8;Ne.current||(Ne.current=Pe);const Ye=P.current.getBoundingClientRect().top;if(Math.abs(V.current-ie)>60&&(U.current=!U.current),o&&o.length>0&&Be&&pe){const Ge=Be[pe]||0;ie+=Ge}if(V.current=ie,Pe>X||U.current){const Ge=P.current.getBoundingClientRect().height;let Ee=Ge;Ge>X&&(Ee=X-(Ce?Ye:wn)),v?P.current.style.height=`${Ge-Math.max(ie,0)}px`:P.current.style.height=`${Math.max(Ee,X-Ye)}px`}else yi()||(P.current.style.height=`${Ne.current}px`);o&&o.length>0&&!U.current?P.current.style.bottom="0px":P.current.style.bottom=`${Math.max(ie,0)}px`}}return(A=window.visualViewport)==null||A.addEventListener("resize",$),()=>{var G;return(G=window.visualViewport)==null?void 0:G.removeEventListener("resize",$)}},[pe,o,Be]);function He(A){on(),j==null||j(),A||W(!1),setTimeout(()=>{o&&Ve(o[0])},Y.DURATION*1e3)}function Ke(){if(!P.current)return;const A=document.querySelector("[data-vaul-drawer-wrapper]"),$=Bt(P.current,y);re(P.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`}),re(je.current,{transition:`opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,opacity:"1"}),i&&$&&$>0&&_&&re(A,{borderRadius:`${Zs}px`,overflow:"hidden",...te(y)?{transform:`scale(${at()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${at()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Y.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Y.EASE.join(",")})`},!0)}function on(){!ee||!P.current||(P.current.classList.remove(pn),J.current=!1,Ie(!1),Fe.current=new Date)}function ln(A){if(!ee||!P.current)return;P.current.classList.remove(pn),J.current=!1,Ie(!1),Fe.current=new Date;const $=Bt(P.current,y);if(!A||!$e(A.target,!1)||!$||Number.isNaN($)||Oe.current===null)return;const G=Fe.current.getTime()-Oe.current.getTime(),B=le.current-(te(y)?A.pageY:A.pageX),X=Math.abs(B)/G;if(X>.05&&(Le(!0),setTimeout(()=>{Le(!1)},200)),o){dt({draggedDistance:B*(y==="bottom"||y==="right"?1:-1),closeDrawer:He,velocity:X,dismissible:g}),a==null||a(A,!0);return}if(y==="bottom"||y==="right"?B>0:B<0){Ke(),a==null||a(A,!0);return}if(X>Js){He(),a==null||a(A,!1);return}var ce;const ie=Math.min((ce=P.current.getBoundingClientRect().height)!=null?ce:0,window.innerHeight);var Pe;const Ce=Math.min((Pe=P.current.getBoundingClientRect().width)!=null?Pe:0,window.innerWidth),Ye=y==="left"||y==="right";if(Math.abs($)>=(Ye?Ce:ie)*u){He(),a==null||a(A,!1);return}a==null||a(A,!0),Ke()}l.useEffect(()=>(_&&(re(document.documentElement,{scrollBehavior:"auto"}),ge.current=new Date),()=>{Ei(document.documentElement,"scrollBehavior")}),[_]);function cn(A){const $=A?(window.innerWidth-Qe)/window.innerWidth:1,G=A?-Qe:0;we.current&&window.clearTimeout(we.current),re(P.current,{transition:`transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,transform:te(y)?`scale(${$}) translate3d(0, ${G}px, 0)`:`scale(${$}) translate3d(${G}px, 0, 0)`}),!A&&P.current&&(we.current=setTimeout(()=>{const B=Bt(P.current,y);re(P.current,{transition:"none",transform:te(y)?`translate3d(0, ${B}px, 0)`:`translate3d(${B}px, 0, 0)`})},500))}function dn(A,$){if($<0)return;const G=(window.innerWidth-Qe)/window.innerWidth,B=G+$*(1-G),X=-Qe+$*Qe;re(P.current,{transform:te(y)?`scale(${B}) translate3d(0, ${X}px, 0)`:`scale(${B}) translate3d(${X}px, 0, 0)`,transition:"none"})}function un(A,$){const G=te(y)?window.innerHeight:window.innerWidth,B=$?(G-Qe)/G:1,X=$?-Qe:0;$&&re(P.current,{transition:`transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,transform:te(y)?`scale(${B}) translate3d(0, ${X}px, 0)`:`scale(${B}) translate3d(${X}px, 0, 0)`})}return l.useEffect(()=>{w||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[w]),l.createElement(H.Root,{defaultOpen:k,onOpenChange:A=>{!g&&!A||(A?K(!0):He(!0),W(A))},open:_},l.createElement(Ws.Provider,{value:{activeSnapPoint:ze,snapPoints:o,setActiveSnapPoint:Ve,drawerRef:P,overlayRef:je,onOpenChange:t,onPress:ft,onRelease:ln,onDrag:mt,dismissible:g,shouldAnimate:z,handleOnly:x,isOpen:_,isDragging:ee,shouldFade:ut,closeDrawer:He,onNestedDrag:dn,onNestedOpenChange:cn,onNestedRelease:un,keyboardIsOpen:U,modal:w,snapPointsOffset:Be,activeSnapPointIndex:pe,direction:y,shouldScaleBackground:i,setBackgroundColorOnScale:d,noBodyStyles:S,container:E,autoFocus:F}},r))}const na=l.forwardRef(function({...n},t){const{overlayRef:r,snapPoints:s,onRelease:a,shouldFade:o,isOpen:i,modal:d,shouldAnimate:u}=zt(),c=Ys(t,r),g=s&&s.length>0;if(!d)return null;const x=l.useCallback(f=>a(f),[a]);return l.createElement(H.Overlay,{onMouseUp:x,ref:c,"data-vaul-overlay":"","data-vaul-snap-points":i&&g?"true":"false","data-vaul-snap-points-overlay":i&&o?"true":"false","data-vaul-animate":u!=null&&u.current?"true":"false",...n})});na.displayName="Drawer.Overlay";const ra=l.forwardRef(function({onPointerDownOutside:n,style:t,onOpenAutoFocus:r,...s},a){const{drawerRef:o,onPress:i,onRelease:d,onDrag:u,keyboardIsOpen:c,snapPointsOffset:g,activeSnapPointIndex:x,modal:f,isOpen:b,direction:h,snapPoints:v,container:w,handleOnly:j,shouldAnimate:N,autoFocus:S}=zt(),[y,k]=l.useState(!1),D=Ys(a,o),C=l.useRef(null),T=l.useRef(null),R=l.useRef(!1),L=v&&v.length>0;Hi();const E=(I,M,_=0)=>{if(R.current)return!0;const W=Math.abs(I.y),O=Math.abs(I.x),K=O>W,ee=["bottom","right"].includes(M)?1:-1;if(M==="left"||M==="right"){if(!(I.x*ee<0)&&O>=0&&O<=_)return K}else if(!(I.y*ee<0)&&W>=0&&W<=_)return!K;return R.current=!0,!0};l.useEffect(()=>{L&&window.requestAnimationFrame(()=>{k(!0)})},[]);function F(I){C.current=null,R.current=!1,d(I)}return l.createElement(H.Content,{"data-vaul-drawer-direction":h,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":b&&L?"true":"false","data-vaul-custom-container":w?"true":"false","data-vaul-animate":N!=null&&N.current?"true":"false",...s,ref:D,style:g&&g.length>0?{"--snap-point-height":`${g[x??0]}px`,...t}:t,onPointerDown:I=>{j||(s.onPointerDown==null||s.onPointerDown.call(s,I),C.current={x:I.pageX,y:I.pageY},i(I))},onOpenAutoFocus:I=>{r==null||r(I),S||I.preventDefault()},onPointerDownOutside:I=>{if(n==null||n(I),!f||I.defaultPrevented){I.preventDefault();return}c.current&&(c.current=!1)},onFocusOutside:I=>{if(!f){I.preventDefault();return}},onPointerMove:I=>{if(T.current=I,j||(s.onPointerMove==null||s.onPointerMove.call(s,I),!C.current))return;const M=I.pageY-C.current.y,_=I.pageX-C.current.x,W=I.pointerType==="touch"?10:2;E({x:_,y:M},h,W)?u(I):(Math.abs(_)>W||Math.abs(M)>W)&&(C.current=null)},onPointerUp:I=>{s.onPointerUp==null||s.onPointerUp.call(s,I),C.current=null,R.current=!1,d(I)},onPointerOut:I=>{s.onPointerOut==null||s.onPointerOut.call(s,I),F(T.current)},onContextMenu:I=>{s.onContextMenu==null||s.onContextMenu.call(s,I),T.current&&F(T.current)}})});ra.displayName="Drawer.Content";const Gi=250,qi=120,Wi=l.forwardRef(function({preventCycle:n=!1,children:t,...r},s){const{closeDrawer:a,isDragging:o,snapPoints:i,activeSnapPoint:d,setActiveSnapPoint:u,dismissible:c,handleOnly:g,isOpen:x,onPress:f,onDrag:b}=zt(),h=l.useRef(null),v=l.useRef(!1);function w(){if(v.current){S();return}window.setTimeout(()=>{j()},qi)}function j(){if(o||n||v.current){S();return}if(S(),!i||i.length===0){c||a();return}if(d===i[i.length-1]&&c){a();return}const k=i.findIndex(C=>C===d);if(k===-1)return;const D=i[k+1];u(D)}function N(){h.current=window.setTimeout(()=>{v.current=!0},Gi)}function S(){h.current&&window.clearTimeout(h.current),v.current=!1}return l.createElement("div",{onClick:w,onPointerCancel:S,onPointerDown:y=>{g&&f(y),N()},onPointerMove:y=>{g&&b(y)},ref:s,"data-vaul-drawer-visible":x?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},l.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});Wi.displayName="Drawer.Handle";function Xi(n){const t=zt(),{container:r=t.container,...s}=n;return l.createElement(H.Portal,{container:r,...s})}const Xe={Root:Vi,Content:ra,Overlay:na,Trigger:H.Trigger,Portal:Xi,Close:H.Close,Title:H.Title,Description:H.Description},sa=({shouldScaleBackground:n=!0,...t})=>e.jsx(Xe.Root,{shouldScaleBackground:n,...t});sa.displayName="Drawer";const Ki=Xe.Trigger,aa=Xe.Portal,Yi=Xe.Close,oa=l.forwardRef(function({className:t,...r},s){return e.jsx(Xe.Overlay,{ref:s,className:m("fixed inset-0 z-50 bg-black/40",t),...r})}),Qi=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(aa,{children:[e.jsx(oa,{}),e.jsxs(Xe.Content,{ref:a,className:m("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl","border-t border-border bg-card",t),...s,children:[e.jsx("div",{className:"mx-auto mt-3 h-1.5 w-12 rounded-full bg-border"}),r]})]})});function Ji({className:n,...t}){return e.jsx("div",{className:m("grid gap-1 p-4 text-center sm:text-left",n),...t})}function Zi({className:n,...t}){return e.jsx("div",{className:m("mt-auto flex flex-col gap-2 p-4",n),...t})}const el=l.forwardRef(function({className:t,...r},s){return e.jsx(Xe.Title,{ref:s,className:m("text-lg font-semibold",t),...r})}),tl=l.forwardRef(function({className:t,...r},s){return e.jsx(Xe.Description,{ref:s,className:m("text-sm text-foreground-muted",t),...r})});function nl(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/1024/1024).toFixed(1)} MB`}const rl=l.forwardRef(function({accept:t,multiple:r,maxSize:s,value:a,onChange:o,hint:i,disabled:d,className:u},c){const g=l.useRef(null),x=l.useId(),[f,b]=l.useState([]),[h,v]=l.useState(!1),w=a??f,j=l.useCallback(k=>{a===void 0&&b(k),o==null||o(k)},[o,a]),N=l.useCallback(k=>{const D=Array.from(k).filter(C=>!s||C.size<=s);j(r?[...w,...D]:D.slice(0,1))},[w,s,r,j]),S=k=>j(w.filter((D,C)=>C!==k)),y=k=>{k.preventDefault(),v(!1),!d&&N(k.dataTransfer.files)};return e.jsxs("div",{ref:c,className:m("flex flex-col gap-3",u),children:[e.jsxs("label",{htmlFor:x,onDragOver:k=>{k.preventDefault(),d||v(!0)},onDragLeave:()=>v(!1),onDrop:y,className:m("group relative flex cursor-pointer flex-col items-center justify-center gap-2","rounded-md border border-dashed border-border bg-background-subtle px-6 py-8","text-center transition-colors","hover:border-border-strong hover:bg-background-muted",h&&"border-accent bg-accent-soft",d&&"pointer-events-none opacity-50"),children:[e.jsx(p.Upload,{className:"size-5 text-foreground-muted","aria-hidden":!0}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Drop files here, or click to browse"}),i&&e.jsx("p",{className:"text-xs text-foreground-muted",children:i})]}),e.jsx("input",{ref:g,id:x,type:"file",accept:t,multiple:r,disabled:d,className:"sr-only",onChange:k=>k.target.files&&N(k.target.files)})]}),w.length>0&&e.jsx("ul",{className:"flex flex-col gap-2",children:w.map((k,D)=>e.jsxs("li",{className:"flex items-center gap-3 rounded-md border border-border bg-card px-3 py-2",children:[e.jsx(p.File,{className:"size-4 shrink-0 text-foreground-muted","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm",children:k.name}),e.jsx("p",{className:"text-xs text-foreground-muted",children:nl(k.size)})]}),e.jsx("button",{type:"button",onClick:()=>S(D),className:"rounded p-1 text-foreground-muted hover:bg-background-muted hover:text-foreground","aria-label":`Remove ${k.name}`,children:e.jsx(p.X,{className:"size-4"})})]},`${k.name}-${D}`))})]})}),sl=ke.cva(["relative pointer-events-auto w-full max-w-md","flex items-start gap-3 rounded-md border bg-card p-3 shadow-md","text-sm text-foreground"],{variants:{variant:{default:"border-border",info:"border-info-border-soft",success:"border-success-border-soft",warning:"border-warning-border-soft",danger:"border-danger-border-soft"}},defaultVariants:{variant:"default"}}),al={default:null,info:e.jsx(p.Info,{className:"size-4 shrink-0 mt-0.5 text-info-text","aria-hidden":!0}),success:e.jsx(p.CheckCircle2,{className:"size-4 shrink-0 mt-0.5 text-success-text","aria-hidden":!0}),warning:e.jsx(p.AlertTriangle,{className:"size-4 shrink-0 mt-0.5 text-warning-text","aria-hidden":!0}),danger:e.jsx(p.XCircle,{className:"size-4 shrink-0 mt-0.5 text-danger-text","aria-hidden":!0})},ol=l.forwardRef(function({className:t,variant:r="default",title:s,action:a,onClose:o,icon:i,children:d,...u},c){const g=i===!1?null:i??al[r??"default"];return e.jsxs("div",{ref:c,role:"status",className:m(sl({variant:r}),t),...u,children:[g,e.jsxs("div",{className:"min-w-0 flex-1",children:[s&&e.jsx("p",{className:"font-medium",children:s}),d&&e.jsx("p",{className:"text-foreground-muted",children:d})]}),a,o&&e.jsx("button",{type:"button",onClick:o,"aria-label":"Dismiss",className:"rounded p-1 text-foreground-muted hover:bg-background-muted hover:text-foreground",children:e.jsx(p.X,{className:"size-4"})})]})}),il=l.forwardRef(function({value:t,defaultValue:r=[],onChange:s,placeholder:a="Add and press Enter",max:o,disabled:i,error:d,separators:u=["Enter",","],className:c},g){const[x,f]=l.useState(r),[b,h]=l.useState(""),v=t??x,w=l.useCallback(y=>{t===void 0&&f(y),s==null||s(y)},[s,t]),j=y=>{const k=y.trim();!k||v.includes(k)||o!==void 0&&v.length>=o||w([...v,k])},N=y=>w(v.filter((k,D)=>D!==y)),S=y=>{u.includes(y.key)?(y.preventDefault(),j(b),h("")):y.key==="Backspace"&&!b&&v.length&&N(v.length-1)};return e.jsxs("div",{ref:g,className:m("flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-md border bg-card px-2 py-1.5","transition-colors focus-within:border-ring focus-within:ring-2 focus-within:ring-ring",d?"border-danger focus-within:border-danger focus-within:ring-danger":"border-border",i&&"pointer-events-none opacity-50",c),children:[v.map((y,k)=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-background-muted px-2 py-0.5 text-xs",children:[y,e.jsx("button",{type:"button",onClick:()=>N(k),className:"rounded p-0.5 text-foreground-muted hover:bg-background-subtle hover:text-foreground","aria-label":`Remove ${y}`,children:e.jsx(p.X,{className:"size-3"})})]},`${y}-${k}`)),e.jsx("input",{value:b,disabled:i,onChange:y=>h(y.target.value),onKeyDown:S,onBlur:()=>{b&&(j(b),h(""))},placeholder:v.length===0?a:void 0,className:"min-w-[8ch] flex-1 bg-transparent text-sm outline-none placeholder:text-foreground-subtle"})]})}),ll=l.forwardRef(function({className:t,children:r,...s},a){return e.jsx("ol",{ref:a,className:m("relative flex flex-col gap-6",t),...s,children:r})}),cl=l.forwardRef(function({bullet:t,isLast:r,className:s,children:a,...o},i){return e.jsxs("li",{ref:i,className:m("relative flex gap-4 pb-1",s),...o,children:[e.jsxs("div",{className:"relative flex shrink-0 flex-col items-center",children:[e.jsx("div",{className:"flex size-6 items-center justify-center rounded-full border border-border bg-card text-foreground-muted",children:t??e.jsx("span",{className:"size-2 rounded-full bg-accent","aria-hidden":!0})}),!r&&e.jsx("span",{className:"mt-1 flex-1 w-px bg-border","aria-hidden":!0})]}),e.jsx("div",{className:"min-w-0 flex-1 pb-4",children:a})]})});function dl({className:n,children:t}){return e.jsx("p",{className:m("text-xs text-foreground-subtle",n),children:t})}function ul({className:n,children:t}){return e.jsx("p",{className:m("text-sm font-medium",n),children:t})}function fl({className:n,children:t}){return e.jsx("p",{className:m("mt-0.5 text-sm text-foreground-muted",n),children:t})}function ml({data:n,defaultExpanded:t=[],selectedId:r,onSelect:s,className:a}){const[o,i]=l.useState(new Set(t)),d=c=>i(g=>{const x=new Set(g);return x.has(c)?x.delete(c):x.add(c),x});function u(c,g){const x=!!c.children,f=o.has(c.id),b=r===c.id,h=x?f?p.FolderOpen:p.Folder:p.File;return e.jsxs("li",{role:"treeitem","aria-expanded":x?f:void 0,children:[e.jsxs("button",{type:"button",tabIndex:0,onClick:()=>{s==null||s(c.id),x&&d(c.id)},onKeyDown:v=>{(v.key==="ArrowRight"&&x&&!f||v.key==="ArrowLeft"&&x&&f)&&d(c.id)},style:{paddingLeft:g*16+8},className:m("flex w-full items-center gap-1.5 rounded-md py-1 pr-2 text-left text-sm","hover:bg-background-muted focus-visible:bg-background-muted outline-none",b&&"bg-accent-soft text-foreground"),children:[x?e.jsx(p.ChevronRight,{className:m("size-3.5 shrink-0 text-foreground-subtle transition-transform",f&&"rotate-90"),"aria-hidden":!0}):e.jsx("span",{className:"w-3.5 shrink-0","aria-hidden":!0}),c.icon??e.jsx(h,{className:"size-4 shrink-0 text-foreground-muted","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:c.label})]}),x&&f&&e.jsx("ul",{role:"group",className:"mt-0.5",children:c.children.map(v=>u(v,g+1))})]},c.id)}return e.jsx("ul",{role:"tree",className:m("flex flex-col gap-0.5",a),children:n.map(c=>u(c,0))})}function xl({brand:n,title:t,subtitle:r,children:s,footer:a}){return e.jsx("main",{className:"grid min-h-screen place-items-center bg-background-subtle px-4 py-12",children:e.jsxs("div",{className:"w-full max-w-[400px] space-y-6",children:[n&&e.jsx("div",{className:"flex justify-center",children:n}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:t}),r&&e.jsx("p",{className:"text-sm text-foreground-muted",children:r})]}),e.jsx("div",{className:"rounded-lg border border-border bg-card p-6",children:s}),a&&e.jsx("p",{className:"text-center text-sm text-foreground-muted",children:a})]})})}function gl({onSubmit:n,loading:t,error:r,forgotHref:s="/forgot"}){const[a,o]=l.useState(""),[i,d]=l.useState(""),u=c=>{c.preventDefault(),n({email:a,password:i})};return e.jsxs("form",{onSubmit:u,className:"space-y-4",children:[r&&e.jsx(Tt,{variant:"danger",children:r}),e.jsx(se,{type:"email",label:"Email",value:a,onChange:c=>o(c.target.value),autoComplete:"email",required:!0}),e.jsx(se,{type:"password",label:"Password",value:i,onChange:c=>d(c.target.value),autoComplete:"current-password",required:!0}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsx("a",{href:s,className:"font-medium text-accent hover:underline outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:"Forgot password?"})}),e.jsx(q,{type:"submit",loading:t,className:"w-full",trailingIcon:e.jsx(p.ArrowRight,{}),children:"Sign in"})]})}function pl({onSubmit:n,loading:t,error:r}){const[s,a]=l.useState(""),[o,i]=l.useState(""),[d,u]=l.useState("");return e.jsxs("form",{onSubmit:c=>{c.preventDefault(),n({name:s,email:o,password:d})},className:"space-y-4",children:[r&&e.jsx(Tt,{variant:"danger",children:r}),e.jsx(se,{label:"Full name",value:s,onChange:c=>a(c.target.value),required:!0}),e.jsx(se,{type:"email",label:"Work email",value:o,onChange:c=>i(c.target.value),autoComplete:"email",required:!0}),e.jsx(se,{type:"password",label:"Password",helperText:"At least 8 characters.",value:d,onChange:c=>u(c.target.value),autoComplete:"new-password",required:!0}),e.jsx(q,{type:"submit",loading:t,className:"w-full",children:"Create account"}),e.jsx("p",{className:"text-xs text-foreground-subtle text-center",children:"By signing up you agree to our Terms of Service and Privacy Policy."})]})}function hl({onSubmit:n,loading:t,error:r}){const[s,a]=l.useState("");return e.jsxs("form",{onSubmit:o=>{o.preventDefault(),n(s)},className:"space-y-4",children:[r&&e.jsx(Tt,{variant:"danger",children:r}),e.jsx(se,{type:"email",label:"Email",helperText:"We'll send a reset link if an account exists.",value:s,onChange:o=>a(o.target.value),autoComplete:"email",required:!0}),e.jsx(q,{type:"submit",loading:t,className:"w-full",leadingIcon:e.jsx(p.Mail,{}),children:"Send reset link"})]})}function bl({email:n,onResend:t}){return e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"mx-auto inline-flex size-12 items-center justify-center rounded-full bg-success-soft text-success-text",children:e.jsx(p.CheckCircle2,{className:"size-6","aria-hidden":!0})}),e.jsxs("p",{className:"text-sm text-foreground-muted",children:["We sent a sign-in link to"," ",e.jsx("span",{className:"font-medium text-foreground",children:n}),". Open it on this device to continue."]}),e.jsx(nt,{}),e.jsxs("p",{className:"text-xs text-foreground-subtle",children:["Didn't get it?"," ",e.jsx("button",{type:"button",onClick:t,className:"font-medium text-accent hover:underline outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:"Resend"})]})]})}function et(n){typeof window>"u"||(window.location.hash=n)}function vl({children:n,brand:t,active:r="home"}){return e.jsxs("div",{className:"flex min-h-screen w-full bg-background",children:[e.jsxs(Hn,{defaultCollapsed:!1,header:t,footer:e.jsx(Nl,{}),children:[e.jsxs(jt,{label:"Workspace",children:[e.jsx(De,{href:"#dashboard",icon:e.jsx(p.Home,{}),active:r==="home",children:"Home"}),e.jsx(De,{href:"#data-table",icon:e.jsx(p.Folder,{}),active:r==="projects",trailing:e.jsx(ve,{tone:"neutral",children:"12"}),children:"Projects"}),e.jsx(De,{href:"#first-run",icon:e.jsx(p.Inbox,{}),active:r==="inbox",trailing:e.jsx(ve,{tone:"accent",children:"5"}),children:"Inbox"}),e.jsx(De,{href:"#record",icon:e.jsx(p.Users,{}),active:r==="members",trailing:e.jsx(ve,{tone:"neutral",children:"3"}),children:"Members"}),e.jsx(De,{href:"#dashboard",icon:e.jsx(p.BarChart3,{}),active:r==="insights",children:"Insights"})]}),e.jsxs(jt,{label:"Personal",children:[e.jsx(De,{href:"#pricing",icon:e.jsx(p.Bookmark,{}),active:r==="bookmarks",children:"Bookmarks"}),e.jsx(De,{href:"#onboarding",icon:e.jsx(p.LayoutGrid,{}),active:r==="apps",children:"Apps"})]}),e.jsxs(jt,{label:"Account",children:[e.jsx(De,{href:"#settings",icon:e.jsx(p.Settings,{}),active:r==="settings",children:"Settings"}),e.jsx(De,{href:"#settings",icon:e.jsx(p.Plug,{}),active:r==="integrations",children:"Integrations"}),e.jsx(De,{href:"#",icon:e.jsx(p.HelpCircle,{}),active:r==="help",children:"Help & docs"})]})]}),e.jsxs("div",{className:"flex flex-1 flex-col min-w-0",children:[e.jsx(jl,{}),e.jsx("main",{className:"flex-1 overflow-y-auto p-6 md:p-8",children:n})]})]})}function jl(){return e.jsxs("header",{className:"sticky top-0 z-30 flex h-14 items-center gap-3 border-b border-border bg-background/80 px-4 backdrop-blur md:px-6",children:[e.jsx("div",{className:"relative flex-1 max-w-xl",children:e.jsx(se,{type:"search",placeholder:"Search projects, members, files…",hideLabel:!0,label:"Search",prefix:e.jsx(p.Search,{}),suffix:e.jsx(En,{children:"⌘K"})})}),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[e.jsx(wl,{}),e.jsx(yl,{})]})]})}const ur=[{id:"n1",who:{name:"Anu B.",initials:"AB"},action:"mentioned you in",target:"Q2 OKRs",when:"2m",unread:!0},{id:"n2",who:{name:"Bat E.",initials:"BE"},action:"requested review on",target:"fix/login-flow",when:"18m",unread:!0},{id:"n3",who:{name:"Tuya G.",initials:"TG"},action:"commented on",target:"feat/segments",when:"1h",unread:!0},{id:"n4",who:{name:"Khulan O.",initials:"KO"},action:"archived",target:"old-billing-spike",when:"3h"},{id:"n5",who:{name:"Sara M.",initials:"SM"},action:"invited you to",target:"Atlas workspace",when:"Yesterday"}];function wl(){const n=ur.filter(t=>t.unread).length;return e.jsxs(Wt,{children:[e.jsx(Xt,{asChild:!0,children:e.jsxs("button",{type:"button","aria-label":`Notifications${n?`, ${n} unread`:""}`,className:"relative inline-flex size-9 items-center justify-center rounded-md text-foreground-muted outline-none transition-colors hover:bg-background-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[e.jsx(p.Bell,{className:"size-4"}),n>0&&e.jsx("span",{"aria-hidden":!0,className:"absolute right-2 top-2 inline-flex h-2 w-2 rounded-full bg-accent ring-2 ring-background"})]})}),e.jsxs(Dt,{align:"end",className:"w-80 p-0",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border px-3 py-2.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:"Notifications"}),n>0&&e.jsxs(ve,{tone:"accent",children:[n," new"]})]}),e.jsx("button",{type:"button",className:"text-xs text-foreground-muted hover:text-foreground",children:"Mark all read"})]}),e.jsx("ul",{className:"max-h-80 overflow-y-auto py-1",children:ur.map(t=>e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>et("record"),className:"flex w-full items-start gap-3 px-3 py-2.5 text-left outline-none hover:bg-background-muted focus-visible:bg-background-muted",children:[e.jsxs("div",{className:"relative mt-0.5",children:[e.jsx(Re,{size:"sm",fallback:t.who.initials}),t.unread&&e.jsx("span",{"aria-hidden":!0,className:"absolute -right-0.5 -top-0.5 inline-flex h-2 w-2 rounded-full bg-accent ring-2 ring-background"})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("p",{className:"text-sm leading-snug",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.who.name})," ",e.jsx("span",{className:"text-foreground-muted",children:t.action})," ",e.jsx("span",{className:"font-medium text-foreground",children:t.target})]}),e.jsx("p",{className:"mt-0.5 text-xs text-foreground-subtle",children:t.when})]})]})},t.id))}),e.jsx("div",{className:"border-t border-border px-3 py-2 text-center",children:e.jsx("button",{type:"button",onClick:()=>et("record"),className:"text-xs font-medium text-accent hover:underline",children:"View all notifications"})})]})]})}function yl(){return e.jsxs(Wt,{children:[e.jsx(Xt,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":"Open profile menu",className:"flex items-center gap-2 rounded-full p-0.5 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background hover:bg-background-muted",children:e.jsx(Re,{size:"sm",fallback:"BO",status:"online"})})}),e.jsxs(Dt,{align:"end",className:"w-60",children:[e.jsx(Yt,{children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-sm font-medium text-foreground",children:"Bay Otgonbayar"}),e.jsx("span",{className:"text-xs text-foreground-subtle",children:"bay@craftzbay.com"})]})}),e.jsx(ct,{}),e.jsxs(Ze,{onSelect:()=>et("record"),children:[e.jsx(p.User,{className:"size-4"}),"Profile"]}),e.jsxs(Ze,{onSelect:()=>et("settings"),children:[e.jsx(p.Settings,{className:"size-4"}),"Account settings"]}),e.jsxs(Ze,{onSelect:()=>et("pricing"),children:[e.jsx(p.Sparkles,{className:"size-4"}),"Upgrade plan",e.jsx(ve,{tone:"accent",className:"ml-auto",children:"Pro"})]}),e.jsx(ct,{}),e.jsxs(Ze,{onSelect:()=>et("first-run"),children:[e.jsx(p.HelpCircle,{className:"size-4"}),"Help & support"]}),e.jsx(ct,{}),e.jsxs(Ze,{onSelect:()=>et("auth-signin"),children:[e.jsx(p.LogOut,{className:"size-4"}),"Sign out"]})]})]})}function Nl(){return e.jsxs("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1.5",children:[e.jsx(Re,{fallback:"BO",size:"sm",status:"online"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:"Bay Otgonbayar"}),e.jsx("p",{className:"truncate text-xs text-foreground-subtle",children:"Owner"})]})]})}const Cl=[{label:"Active users",value:"2,840",delta:{value:"+12%",positive:!0}},{label:"Sessions today",value:"8,402",delta:{value:"+4%",positive:!0}},{label:"Open issues",value:"14",delta:{value:"−6%",positive:!0}},{label:"Error rate",value:"0.32%",delta:{value:"+0.05%",positive:!1}}],Sl=[{id:"1",who:{name:"Anu B.",initials:"AB"},action:"merged",target:"feat/segments",when:"12m ago"},{id:"2",who:{name:"Bat E.",initials:"BE"},action:"opened",target:"fix/login-flow",when:"34m ago"},{id:"3",who:{name:"Tuya G.",initials:"TG"},action:"commented on",target:"Q2 OKRs",when:"1h ago"},{id:"4",who:{name:"Khulan O.",initials:"KO"},action:"archived",target:"old-billing-spike",when:"3h ago"}];function kl(){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("header",{className:"flex items-end justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Overview"}),e.jsx("p",{className:"text-sm text-foreground-muted mt-1",children:"What's happening across your workspace today."})]}),e.jsx("div",{className:"hidden md:flex items-center gap-2",children:e.jsx(ve,{tone:"neutral",variant:"outline",children:"Last 7 days"})})]}),e.jsx("section",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:Cl.map(n=>e.jsxs(xe,{children:[e.jsx(he,{className:"pb-2",children:e.jsx(Ae,{children:n.label})}),e.jsx(be,{children:e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-semibold tabular text-foreground",children:n.value}),n.delta&&e.jsx("span",{className:n.delta.positive?"text-xs font-medium text-success-text tabular":"text-xs font-medium text-danger-text tabular",children:n.delta.value})]})})]},n.label))}),e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:"Active users"}),e.jsx(Ae,{children:"Distinct sessions per day, last 30 days."})]}),e.jsx(be,{children:e.jsx("div",{role:"img","aria-label":"Active users sparkline",className:"h-48 w-full rounded-md border border-dashed border-border bg-background-subtle"})})]}),e.jsxs(xe,{padding:"none",children:[e.jsx(he,{className:"px-5 pt-5",children:e.jsx(Se,{children:"Recent activity"})}),e.jsxs(Qt,{children:[e.jsx(Jt,{children:e.jsxs(qe,{children:[e.jsx(We,{children:"Who"}),e.jsx(We,{children:"Action"}),e.jsx(We,{children:"Target"}),e.jsx(We,{className:"text-right",children:"When"})]})}),e.jsx(Zt,{children:Sl.map(n=>e.jsxs(qe,{children:[e.jsx(Ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Re,{size:"xs",fallback:n.who.initials}),e.jsx("span",{className:"text-foreground",children:n.who.name})]})}),e.jsx(Ue,{className:"text-foreground-muted",children:n.action}),e.jsx(Ue,{children:e.jsx(ve,{tone:"neutral",variant:"outline",children:n.target})}),e.jsx(Ue,{className:"text-right tabular text-foreground-subtle",children:n.when})]},n.id))})]})]})]})}const Tl=[{id:"profile",label:"Profile",icon:e.jsx(p.User,{})},{id:"security",label:"Security",icon:e.jsx(p.Lock,{})},{id:"notifications",label:"Notifications",icon:e.jsx(p.Bell,{})},{id:"billing",label:"Billing",icon:e.jsx(p.CreditCard,{})},{id:"team",label:"Team",icon:e.jsx(p.Users,{})}];function Dl(){const[n,t]=l.useState("profile");return e.jsxs("div",{className:"mx-auto max-w-5xl space-y-8",children:[e.jsxs("header",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Settings"}),e.jsx("p",{className:"text-sm text-foreground-muted mt-1",children:"Manage your account, preferences, and billing."})]}),e.jsxs("div",{className:"grid gap-8 md:grid-cols-[200px_1fr]",children:[e.jsx("nav",{"aria-label":"Settings sections",className:"md:sticky md:top-20 md:self-start",children:e.jsx("ul",{className:"flex flex-col gap-px",children:Tl.map(r=>e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>t(r.id),className:m("w-full text-left","flex h-9 items-center gap-2 rounded-md px-2 text-sm transition-colors duration-[var(--duration-fast)] outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",n===r.id?"bg-background-muted text-foreground font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground"),"aria-current":n===r.id?"page":void 0,children:[e.jsx("span",{className:"[&_svg]:size-4",children:r.icon}),r.label]})},r.id))})}),e.jsxs("div",{className:"space-y-8",children:[e.jsx("section",{id:"profile",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:"Profile"}),e.jsx(Ae,{children:"Visible to your teammates."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(Re,{size:"xl",fallback:"BO"}),e.jsxs("div",{children:[e.jsx(q,{variant:"outline",size:"sm",children:"Change photo"}),e.jsx("p",{className:"text-xs text-foreground-subtle mt-2",children:"JPG or PNG, max 2 MB."})]})]}),e.jsx(nt,{}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(se,{label:"First name",defaultValue:"Bay"}),e.jsx(se,{label:"Last name",defaultValue:"Otgonbayar"})]}),e.jsx(se,{label:"Display email",type:"email",defaultValue:"bay@company.com"}),e.jsx("div",{className:"flex justify-end",children:e.jsx(q,{children:"Save changes"})})]})]})}),e.jsx("section",{id:"security",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:"Security"}),e.jsx(Ae,{children:"How you sign in and protect your account."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsx(se,{label:"Current password",type:"password"}),e.jsx(se,{label:"New password",type:"password",helperText:"At least 8 characters."}),e.jsx(nt,{}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Two-factor authentication"}),e.jsx("p",{className:"text-xs text-foreground-subtle",children:"Required for admin accounts on production."})]}),e.jsx(ot,{defaultChecked:!0})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(q,{children:"Update password"})})]})]})}),e.jsx("section",{id:"notifications",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:"Notifications"}),e.jsx(Ae,{children:"Choose what we email and ping you about."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsx(ot,{label:"Product updates",description:"A short note when we ship something.",defaultChecked:!0}),e.jsx(nt,{}),e.jsx(ot,{label:"Mentions",description:"When a teammate @ mentions you in a comment.",defaultChecked:!0}),e.jsx(nt,{}),e.jsx(ot,{label:"Weekly digest",description:"A Monday-morning summary of last week's activity."})]})]})}),e.jsx("section",{id:"billing",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:"Billing"}),e.jsx(Ae,{children:"Your plan, invoices, and payment method."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-md border border-border bg-background-subtle p-4",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Team — $20/user/month"}),e.jsx("p",{className:"text-xs text-foreground-subtle mt-1",children:"Renews on 1 June 2026 · 12 seats"})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(q,{variant:"outline",children:"Manage seats"}),e.jsx(q,{children:"Upgrade plan"})]})]})]})}),e.jsx("section",{id:"team",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:"Team"}),e.jsx(Ae,{children:"Invite teammates and manage roles."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(se,{type:"email",placeholder:"teammate@company.com",hideLabel:!0,label:"Invite email",className:"flex-1"}),e.jsx(q,{children:"Send invite"})]}),e.jsx("p",{className:"text-xs text-foreground-subtle",children:"Invited members will receive a sign-up link by email."})]})]})})]})]})]})}const Rl=[{id:"p1",name:"Pulse onboarding",status:"active",owner:"Anu B.",updatedAt:"2 hours ago"},{id:"p2",name:"Q2 OKRs rollout",status:"active",owner:"Bat E.",updatedAt:"Yesterday"},{id:"p3",name:"Legacy export",status:"paused",owner:"Tuya G.",updatedAt:"3 days ago"},{id:"p4",name:"Billing spike",status:"archived",owner:"Khulan O.",updatedAt:"Last week"},{id:"p5",name:"Marketing refresh",status:"active",owner:"Anu B.",updatedAt:"Last week"}],fr={active:{tone:"success",label:"Active"},paused:{tone:"warning",label:"Paused"},archived:{tone:"neutral",label:"Archived"}};function Il(){const[n,t]=l.useState(""),[r,s]=l.useState("all"),[a,o]=l.useState([]),[i,d]=l.useState(1),[u,c]=l.useState(10),g=l.useMemo(()=>Rl.filter(b=>{const h=b.name.toLowerCase().includes(n.toLowerCase()),v=r==="all"||b.status===r;return h&&v}),[n,r]),x=g.length>0&&a.length===g.length,f=a.length>0&&!x;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{className:"flex items-end justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Projects"}),e.jsxs("p",{className:"text-sm text-foreground-muted mt-1",children:[g.length," project",g.length===1?"":"s"," match your filters."]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{variant:"outline",leadingIcon:e.jsx(p.Upload,{}),children:"Import"}),e.jsx(q,{leadingIcon:e.jsx(p.Plus,{}),children:"New project"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(An,{value:r,onValueChange:s,children:[e.jsx(tn,{className:"w-36",placeholder:"Status"}),e.jsxs(nn,{children:[e.jsx(tt,{value:"all",children:"All statuses"}),e.jsx(tt,{value:"active",children:"Active"}),e.jsx(tt,{value:"paused",children:"Paused"}),e.jsx(tt,{value:"archived",children:"Archived"})]})]}),e.jsx(q,{variant:"outline",size:"sm",leadingIcon:e.jsx(p.Filter,{}),children:"More filters"})]}),a.length>0&&e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border bg-background-subtle px-4 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(bt,{checked:x?!0:f?"indeterminate":!1,onCheckedChange:b=>o(b?g.map(h=>h.id):[]),"aria-label":"Select all"}),e.jsxs("span",{className:"text-sm text-foreground",children:[a.length," selected"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{variant:"ghost",size:"sm",leadingIcon:e.jsx(p.Download,{}),children:"Export"}),e.jsx(q,{variant:"ghost",size:"sm",leadingIcon:e.jsx(p.Trash2,{}),children:"Delete"})]})]}),e.jsx(Wr,{rows:g.slice((i-1)*u,i*u),filter:{value:n,onChange:t,placeholder:"Search projects…"},emptyState:e.jsx(en,{title:"No projects match",description:"Try adjusting filters or creating a new project.",action:e.jsx(q,{leadingIcon:e.jsx(p.Plus,{}),children:"New project"}),className:"border-0 bg-transparent"}),columns:[{key:"select",header:e.jsx(bt,{checked:x?!0:f?"indeterminate":!1,onCheckedChange:b=>o(b?g.map(h=>h.id):[]),"aria-label":"Select all rows"}),width:"32px",cell:b=>e.jsx(bt,{checked:a.includes(b.id),onCheckedChange:h=>o(v=>h?[...v,b.id]:v.filter(w=>w!==b.id)),"aria-label":`Select ${b.name}`})},{key:"name",header:"Name",sortable:!0,cell:b=>e.jsx("span",{className:"font-medium text-foreground",children:b.name})},{key:"status",header:"Status",cell:b=>e.jsx(ve,{tone:fr[b.status].tone,dot:!0,children:fr[b.status].label})},{key:"owner",header:"Owner"},{key:"updatedAt",header:"Updated",align:"right"}]}),e.jsx(_n,{page:i,pageCount:Math.max(1,Math.ceil(g.length/u)),onPageChange:d,totalItems:g.length,pageSize:u,pageSizeOptions:[10,20,50],onPageSizeChange:b=>{c(b),d(1)}})]})}function Pl(){return e.jsxs("div",{className:"space-y-6",children:[e.jsx(Cn,{items:[{label:"Projects",href:"/projects"},{label:"Pulse onboarding"}]}),e.jsxs("header",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Pulse onboarding"}),e.jsx(ve,{tone:"success",dot:!0,children:"Active"})]}),e.jsx("p",{className:"text-sm text-foreground-muted max-w-2xl",children:"Self-serve onboarding flow for new admins. Owns the first 5 minutes of every workspace."})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{variant:"outline",leadingIcon:e.jsx(p.Edit2,{}),children:"Edit"}),e.jsx(q,{variant:"outline",leadingIcon:e.jsx(p.Trash2,{}),children:"Archive"}),e.jsx(q,{trailingIcon:e.jsx(p.ExternalLink,{}),children:"Open in app"})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_320px]",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs(Rs,{defaultValue:"overview",children:[e.jsxs(Vn,{children:[e.jsx(it,{value:"overview",children:"Overview"}),e.jsx(it,{value:"activity",children:"Activity"}),e.jsx(it,{value:"files",children:"Files"}),e.jsx(it,{value:"settings",children:"Settings"})]}),e.jsx(lt,{value:"overview",className:"space-y-4",children:e.jsxs(xe,{children:[e.jsx(he,{children:e.jsx(Se,{children:"Summary"})}),e.jsxs(be,{className:"space-y-2 text-foreground-muted leading-relaxed",children:[e.jsx("p",{children:"The Pulse onboarding flow walks new admins through workspace creation, teammate invites, and first-data import in under five minutes."}),e.jsx("p",{children:"Completion rate sits at 71% (week-over-week +4 pts) and median time to finish is 4 m 22 s."})]})]})}),e.jsx(lt,{value:"activity",children:e.jsx("p",{className:"text-sm text-foreground-muted",children:"Activity feed appears here."})}),e.jsx(lt,{value:"files",children:e.jsx("p",{className:"text-sm text-foreground-muted",children:"Linked documents appear here."})}),e.jsx(lt,{value:"settings",children:e.jsx("p",{className:"text-sm text-foreground-muted",children:"Project settings appear here."})})]})}),e.jsxs("aside",{className:"space-y-4",children:[e.jsxs(xe,{children:[e.jsx(he,{children:e.jsx(Se,{children:"Details"})}),e.jsxs(be,{className:"space-y-3 text-sm",children:[e.jsx($t,{label:"Owner",value:e.jsxs(e.Fragment,{children:[e.jsx(Re,{size:"xs",fallback:"AB"})," Anu B."]})}),e.jsx($t,{label:"Created",value:"12 Feb 2026"}),e.jsx($t,{label:"Updated",value:"2 hours ago"}),e.jsx($t,{label:"Tags",value:e.jsxs(e.Fragment,{children:[e.jsx(ve,{tone:"accent",children:"growth"})," ",e.jsx(ve,{tone:"neutral",variant:"outline",children:"v2"})]})})]})]}),e.jsxs(xe,{children:[e.jsx(he,{children:e.jsx(Se,{children:"Watchers"})}),e.jsx(be,{children:e.jsxs("div",{className:"flex -space-x-2",children:[e.jsx(Re,{fallback:"AB"}),e.jsx(Re,{fallback:"BE"}),e.jsx(Re,{fallback:"TG"}),e.jsx(Re,{fallback:"+2"})]})})]})]})]})]})}function $t({label:n,value:t}){return e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"text-foreground-subtle",children:n}),e.jsx("span",{className:"flex items-center gap-1.5 text-foreground",children:t})]})}const Ht=[{title:"Workspace"},{title:"Invite team"},{title:"Connect data"},{title:"Done"}];function Ml(){const[n,t]=l.useState(0),r=()=>t(a=>Math.min(a+1,Ht.length-1)),s=()=>t(a=>Math.max(a-1,0));return e.jsxs("div",{className:"mx-auto max-w-2xl space-y-8 py-12",children:[e.jsx(Un,{steps:Ht,current:n}),e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Se,{children:mr[n].title}),e.jsx(Ae,{children:mr[n].description})]}),e.jsxs(be,{className:"space-y-4",children:[n===0&&e.jsxs(e.Fragment,{children:[e.jsx(se,{label:"Workspace name",placeholder:"Acme Inc."}),e.jsx(se,{label:"URL slug",prefix:e.jsx("span",{children:"acme.app/"}),placeholder:"acme"})]}),n===1&&e.jsxs(e.Fragment,{children:[e.jsx(se,{type:"email",label:"Invite by email",placeholder:"teammate@company.com",helperText:"Separate multiple emails with commas."}),e.jsxs(Bn,{defaultValue:"member",children:[e.jsx(vt,{value:"admin",label:"Admin",description:"Can manage workspace and billing."}),e.jsx(vt,{value:"member",label:"Member",description:"Can create and edit projects."}),e.jsx(vt,{value:"viewer",label:"Viewer",description:"Read-only access."})]})]}),n===2&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-foreground-muted",children:"Connect your data source so we can populate your first dashboard."}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:["Postgres","BigQuery","Snowflake","CSV upload"].map(a=>e.jsxs("button",{type:"button",className:"rounded-lg border border-border bg-card p-4 text-left hover:border-border-strong hover:bg-background-subtle transition-colors duration-[var(--duration-fast)] outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[e.jsx("p",{className:"font-medium text-foreground",children:a}),e.jsx("p",{className:"text-xs text-foreground-subtle mt-1",children:"Quick setup with SSO"})]},a))})]}),n===3&&e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center",children:[e.jsx(p.CheckCircle2,{className:"size-10 text-success-text","aria-hidden":!0}),e.jsx("p",{className:"text-base font-medium text-foreground",children:"You're all set."}),e.jsx("p",{className:"text-sm text-foreground-muted max-w-sm",children:"Your workspace is ready. We've sent invites and your first dashboard is loading."})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(q,{variant:"ghost",leadingIcon:e.jsx(p.ArrowLeft,{}),onClick:s,disabled:n===0,children:"Back"}),n<Ht.length-1?e.jsx(q,{trailingIcon:e.jsx(p.ArrowRight,{}),onClick:r,children:n===Ht.length-2?"Finish":"Continue"}):e.jsx(q,{children:"Open workspace"})]})]})}const mr=[{title:"Create your workspace",description:"A workspace is where your team and projects live."},{title:"Invite your team",description:"You can always invite more people later."},{title:"Connect a data source",description:"Pick one — others can be added in settings."},{title:"Welcome aboard",description:"We've set up your starting dashboard."}],zl=[{name:"Starter",price:"$0",cadence:"forever",description:"For individuals exploring the product.",features:["Up to 3 projects","Community support","Single workspace"],cta:"Start free"},{name:"Team",price:"$20",cadence:"per user / month",description:"For small teams running real workloads.",features:["Unlimited projects","Email support, 24h response","SSO via Google & Microsoft","Audit log (30 days)"],cta:"Start 14-day trial",highlighted:!0},{name:"Enterprise",price:"Custom",cadence:"annual",description:"For organisations with custom requirements.",features:["Everything in Team","SAML SSO + SCIM","Dedicated CSM","SOC 2 report + DPA","Audit log (unlimited)"],cta:"Talk to sales"}];function El(){return e.jsxs("div",{className:"mx-auto max-w-5xl space-y-8 py-16",children:[e.jsxs("header",{className:"text-center space-y-3",children:[e.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:"Plans that scale with your team"}),e.jsx("p",{className:"text-sm text-foreground-muted max-w-xl mx-auto",children:"Start free, upgrade when you need more. All paid plans include a 14-day trial — no credit card required."})]}),e.jsx("div",{className:"grid gap-4 md:grid-cols-3",children:zl.map(n=>e.jsxs("div",{className:m("flex flex-col gap-6 rounded-lg border bg-card p-6",n.highlighted?"border-accent shadow-sm":"border-border"),children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:n.name}),n.highlighted&&e.jsx(ve,{tone:"accent",children:"Most popular"})]}),e.jsx("p",{className:"text-sm text-foreground-muted",children:n.description})]}),e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-3xl font-semibold tabular text-foreground",children:n.price}),e.jsx("span",{className:"text-sm text-foreground-subtle",children:n.cadence})]}),e.jsx("ul",{className:"space-y-2 text-sm",children:n.features.map(t=>e.jsxs("li",{className:"flex items-start gap-2 text-foreground",children:[e.jsx(p.Check,{className:"size-4 text-accent shrink-0 mt-0.5","aria-hidden":!0}),t]},t))}),e.jsx(q,{variant:n.highlighted?"primary":"outline",className:"mt-auto w-full",children:n.cta})]},n.name))})]})}const Al=[{icon:e.jsx(p.Plus,{}),title:"Create a project",description:"Track a real piece of work end-to-end.",cta:"New project"},{icon:e.jsx(p.Upload,{}),title:"Import existing data",description:"CSV, Postgres, BigQuery, or Snowflake — connect in a minute.",cta:"Connect source"},{icon:e.jsx(p.Users,{}),title:"Invite your team",description:"Workspaces are better with teammates. We'll send the invites.",cta:"Invite people"}];function Ll(){return e.jsxs("div",{className:"mx-auto max-w-3xl space-y-8 py-12",children:[e.jsx(en,{icon:e.jsx(p.Folder,{className:"size-6"}),title:"Your workspace is ready",description:"Start with one of the steps below — you can always come back to the others.",action:e.jsx(q,{trailingIcon:e.jsx(p.ArrowRight,{}),children:"Open tutorial"})}),e.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:Al.map(n=>e.jsx(xe,{variant:"interactive",children:e.jsxs(be,{className:"space-y-3",children:[e.jsx("div",{className:"inline-flex size-9 items-center justify-center rounded-md bg-accent-soft text-on-accent-soft [&_svg]:size-4",children:n.icon}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:n.title}),e.jsx("p",{className:"text-xs text-foreground-muted leading-relaxed",children:n.description})]}),e.jsx(q,{variant:"ghost",size:"sm",trailingIcon:e.jsx(p.ArrowRight,{}),children:n.cta})]})},n.title))})]})}Object.defineProperty(exports,"cva",{enumerable:!0,get:()=>ke.cva});exports.Accordion=Aa;exports.AccordionContent=br;exports.AccordionItem=pr;exports.AccordionTrigger=hr;exports.Alert=Tt;exports.AppShell=vl;exports.AreaChart=vi;exports.AuthLayout=xl;exports.Avatar=Re;exports.AvatarGroup=jr;exports.Badge=ve;exports.BarChart=ji;exports.Breadcrumbs=Cn;exports.Button=q;exports.Calendar=Mo;exports.Card=xe;exports.CardContent=be;exports.CardDescription=Ae;exports.CardFooter=wr;exports.CardHeader=he;exports.CardTitle=Se;exports.Carousel=mi;exports.CarouselContent=xi;exports.CarouselItem=gi;exports.CarouselNext=hi;exports.CarouselPrevious=pi;exports.Checkbox=bt;exports.Combobox=yr;exports.Command=Nr;exports.CommandDialog=Ga;exports.CommandEmpty=kr;exports.CommandGroup=Tr;exports.CommandInput=Cr;exports.CommandItem=Rr;exports.CommandList=Sr;exports.CommandSeparator=Dr;exports.CommandShortcut=Va;exports.ConfirmationDialog=ns;exports.ContextMenu=Wa;exports.ContextMenuCheckboxItem=Ar;exports.ContextMenuContent=zr;exports.ContextMenuGroup=Ka;exports.ContextMenuItem=Er;exports.ContextMenuLabel=Or;exports.ContextMenuPortal=Ir;exports.ContextMenuRadioGroup=Qa;exports.ContextMenuRadioItem=Lr;exports.ContextMenuSeparator=Fr;exports.ContextMenuShortcut=_r;exports.ContextMenuSub=Ya;exports.ContextMenuSubContent=Mr;exports.ContextMenuSubTrigger=Pr;exports.ContextMenuTrigger=Xa;exports.Dashboard=kl;exports.DataGrid=Wr;exports.DataTablePage=Il;exports.DatePicker=Qr;exports.DateRangePicker=Jr;exports.Dialog=Zr;exports.DialogClose=ts;exports.DialogContent=Rn;exports.DialogDescription=zn;exports.DialogFooter=Pn;exports.DialogHeader=In;exports.DialogOverlay=Dn;exports.DialogPortal=es;exports.DialogTitle=Mn;exports.DialogTrigger=so;exports.Drawer=sa;exports.DrawerClose=Yi;exports.DrawerContent=Qi;exports.DrawerDescription=tl;exports.DrawerFooter=Zi;exports.DrawerHeader=Ji;exports.DrawerOverlay=oa;exports.DrawerPortal=aa;exports.DrawerTitle=el;exports.DrawerTrigger=Ki;exports.DropdownMenu=Wt;exports.DropdownMenuCheckboxItem=Sn;exports.DropdownMenuContent=Dt;exports.DropdownMenuGroup=Ja;exports.DropdownMenuItem=Ze;exports.DropdownMenuLabel=Yt;exports.DropdownMenuPortal=Br;exports.DropdownMenuRadioGroup=eo;exports.DropdownMenuRadioItem=Ur;exports.DropdownMenuSeparator=ct;exports.DropdownMenuShortcut=Vr;exports.DropdownMenuSub=Za;exports.DropdownMenuSubContent=Hr;exports.DropdownMenuSubTrigger=$r;exports.DropdownMenuTrigger=Xt;exports.EmptyState=en;exports.ErrorState=rs;exports.FileUpload=rl;exports.FirstRunEmpty=Ll;exports.ForgotPasswordForm=hl;exports.Form=oo;exports.FormControl=ls;exports.FormDescription=cs;exports.FormError=ds;exports.FormField=io;exports.FormItem=os;exports.FormLabel=is;exports.IconButton=Rt;exports.Icons=Ea;exports.Input=se;exports.Kbd=En;exports.LineChart=bi;exports.MagicLinkSent=bl;exports.MultiSelect=us;exports.Onboarding=Ml;exports.Pagination=_n;exports.Popover=uo;exports.PopoverAnchor=mo;exports.PopoverClose=xo;exports.PopoverContent=gs;exports.PopoverTrigger=fo;exports.Pricing=El;exports.Progress=ps;exports.ProgressCircle=hs;exports.RadioGroup=Bn;exports.RadioItem=vt;exports.RecordDetail=Pl;exports.ScrollArea=bs;exports.ScrollBar=$n;exports.Select=An;exports.SelectContent=nn;exports.SelectGroup=xs;exports.SelectItem=tt;exports.SelectLabel=Fn;exports.SelectScrollDownButton=On;exports.SelectScrollUpButton=Ln;exports.SelectSeparator=ms;exports.SelectTrigger=tn;exports.SelectValue=lo;exports.Separator=nt;exports.SettingsPage=Dl;exports.Sheet=bo;exports.SheetClose=jo;exports.SheetContent=ws;exports.SheetDescription=Ss;exports.SheetFooter=Ns;exports.SheetHeader=ys;exports.SheetPortal=vs;exports.SheetTitle=Cs;exports.SheetTrigger=vo;exports.Sidebar=Hn;exports.SidebarGroup=ks;exports.SidebarItem=De;exports.SidebarSection=jt;exports.SignInForm=gl;exports.SignUpForm=pl;exports.Skeleton=Tn;exports.Slider=Ts;exports.Snackbar=ol;exports.Spinner=Ds;exports.Stepper=Un;exports.Switch=ot;exports.Table=Qt;exports.TableBody=Zt;exports.TableCaption=qr;exports.TableCell=Ue;exports.TableFooter=Gr;exports.TableHead=We;exports.TableHeader=Jt;exports.TableRow=qe;exports.TableSortHeader=kn;exports.Tabs=Rs;exports.TabsContent=lt;exports.TabsList=Vn;exports.TabsTrigger=it;exports.TagInput=il;exports.Textarea=Is;exports.Timeline=ll;exports.TimelineDescription=fl;exports.TimelineItem=cl;exports.TimelineTime=dl;exports.TimelineTitle=ul;exports.Toast=Ms;exports.ToastAction=As;exports.ToastClose=Ls;exports.ToastDescription=Es;exports.ToastProvider=Do;exports.ToastTitle=zs;exports.ToastViewport=Ps;exports.Tooltip=_s;exports.TooltipContent=Gn;exports.TooltipProvider=Po;exports.TooltipRoot=Os;exports.TooltipTrigger=Fs;exports.TopNav=Bs;exports.TopNavLink=$s;exports.Tree=ml;exports.cn=m;exports.toast=za;exports.uid=Ia;exports.useCommandPaletteShortcut=qa;exports.useFormField=It;exports.useMediaQuery=gr;exports.usePrefersReducedMotion=Pa;exports.useSidebar=yo;exports.useToast=Ma;
|
|
10
10
|
//# sourceMappingURL=index.cjs.map
|