@tenerife.music/ui 1.0.6 → 1.0.8
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/components/layout/Container.d.ts +28 -7
- package/dist/components/layout/index.d.ts +3 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1669 -1597
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./motion-DJx1TbXJ.cjs"),t=require("./tokens/index.cjs"),R=require("./typography-C-Nb4y0o.cjs"),o=require("react/jsx-runtime"),qe=require("@radix-ui/react-slot"),K=require("class-variance-authority"),ie=require("react"),Ta=require("clsx"),Oa=require("tailwind-merge"),pa=require("@radix-ui/react-label"),D=require("lucide-react"),Nn=require("react-dom");function jt(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const l=jt(ie),mn=jt(pa),ga=jt(Nn);function E(...e){return Oa.twMerge(Ta.clsx(e))}const Tn=K.cva(`inline-flex items-center justify-center ${t.BUTTON_TOKENS.gap} whitespace-nowrap ${t.BUTTON_TOKENS.radius} ${t.BUTTON_TOKENS.fontSize.md} font-medium ${t.BUTTON_TOKENS.transition.colors} focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:${t.BUTTON_TOKENS.iconSize} [&_svg]:shrink-0`,{variants:{variant:{primary:`${t.BUTTON_TOKENS.variant.primary.background} ${t.BUTTON_TOKENS.variant.primary.text} ${t.BUTTON_TOKENS.shadow.primary} ${t.BUTTON_TOKENS.variant.primary.hover}`,secondary:`${t.BUTTON_TOKENS.variant.secondary.background} ${t.BUTTON_TOKENS.variant.secondary.text} ${t.BUTTON_TOKENS.shadow.default} ${t.BUTTON_TOKENS.variant.secondary.hover}`,accent:`${t.BUTTON_TOKENS.variant.accent.background} ${t.BUTTON_TOKENS.variant.accent.text} ${t.BUTTON_TOKENS.shadow.default} ${t.BUTTON_TOKENS.variant.accent.hover}`,outline:`${t.BUTTON_TOKENS.variant.outline.border} ${t.BUTTON_TOKENS.variant.outline.background} ${t.BUTTON_TOKENS.shadow.default} ${t.BUTTON_TOKENS.variant.outline.hover.background} ${t.BUTTON_TOKENS.variant.outline.hover.text}`,ghost:`${t.BUTTON_TOKENS.variant.ghost.hover.background} ${t.BUTTON_TOKENS.variant.ghost.hover.text}`,destructive:`${t.BUTTON_TOKENS.variant.destructive.background} ${t.BUTTON_TOKENS.variant.destructive.text} ${t.BUTTON_TOKENS.shadow.default} ${t.BUTTON_TOKENS.variant.destructive.hover}`},size:{sm:`${t.BUTTON_TOKENS.height.sm} ${t.BUTTON_TOKENS.radius} ${t.BUTTON_TOKENS.padding.horizontal.sm} ${t.BUTTON_TOKENS.padding.vertical.sm} ${t.BUTTON_TOKENS.fontSize.sm}`,md:`${t.BUTTON_TOKENS.height.md} ${t.BUTTON_TOKENS.radius} ${t.BUTTON_TOKENS.padding.horizontal.md} ${t.BUTTON_TOKENS.padding.vertical.md} ${t.BUTTON_TOKENS.fontSize.md}`,lg:`${t.BUTTON_TOKENS.height.lg} ${t.BUTTON_TOKENS.radius} ${t.BUTTON_TOKENS.padding.horizontal.lg} ${t.BUTTON_TOKENS.padding.vertical.md} ${t.BUTTON_TOKENS.fontSize.lg}`,icon:`${t.BUTTON_TOKENS.height.icon} ${t.BUTTON_TOKENS.width.icon}`}},defaultVariants:{variant:"primary",size:"md"}}),ne=l.forwardRef(({className:e,variant:r,size:n,asChild:s=!1,leftIcon:a,rightIcon:d,children:i,...c},u)=>{const N=s?qe.Slot:"button";return o.jsxs(N,{className:E(Tn({variant:r,size:n,className:e})),ref:u,...c,children:[a&&o.jsx("span",{className:"inline-flex items-center",children:a}),i,d&&o.jsx("span",{className:"inline-flex items-center",children:d})]})});ne.displayName="Button";const On=K.cva("text-foreground",{variants:{size:{xs:t.TEXT_TOKENS.fontSize.xs,sm:t.TEXT_TOKENS.fontSize.sm,md:t.TEXT_TOKENS.fontSize.md,lg:t.TEXT_TOKENS.fontSize.lg,xl:t.TEXT_TOKENS.fontSize.xl},weight:{normal:t.TEXT_TOKENS.fontWeight.normal,medium:t.TEXT_TOKENS.fontWeight.medium,semibold:t.TEXT_TOKENS.fontWeight.semibold,bold:t.TEXT_TOKENS.fontWeight.bold},muted:{true:"text-muted-foreground",false:""},variant:{primary:"text-primary",secondary:"text-secondary-foreground",accent:"text-accent-foreground",outline:"text-foreground",ghost:"text-foreground",link:"text-primary hover:underline",destructive:"text-destructive",muted:"text-muted-foreground"}},defaultVariants:{size:"md",weight:"normal",muted:!1}}),W=l.forwardRef(({className:e,size:r,weight:n,muted:s,variant:a,...d},i)=>{const c=s!==void 0?s:a==="muted";return o.jsx("span",{ref:i,className:E(On({size:r,weight:n,muted:c,variant:a}),e),...d})});W.displayName="Text";const pn=K.cva(`${t.ALERT_TOKENS.radius} border ${t.ALERT_TOKENS.padding}`,{variants:{variant:{default:"bg-muted border-border text-foreground",primary:"bg-primary/10 border-primary/20 text-primary-foreground",secondary:"bg-secondary/10 border-secondary/20 text-secondary-foreground",accent:"bg-accent/10 border-accent/20 text-accent-foreground",destructive:"bg-destructive/10 border-destructive/20 text-destructive-foreground",success:"bg-accent/10 border-accent/20 text-accent-foreground",warning:"bg-secondary/10 border-secondary/20 text-secondary-foreground",danger:"bg-destructive/10 border-destructive/20 text-destructive-foreground",info:"bg-primary/10 border-primary/20 text-primary-foreground"}},defaultVariants:{variant:"default"}}),gn=l.forwardRef(({className:e,variant:r,...n},s)=>o.jsx("div",{ref:s,role:"alert",className:E(pn({variant:r}),e),...n}));gn.displayName="Alert";const Sn=K.cva("font-sans text-foreground",{variants:{size:{md:"text-md leading-relaxed tracking-normal",lg:"text-lg leading-relaxed tracking-normal"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},muted:{true:"text-muted-foreground",false:""}},defaultVariants:{size:"md",weight:"normal",muted:!1}}),hn=l.forwardRef(({className:e,size:r,weight:n,muted:s,as:a="p",children:d,...i},c)=>{const u=a;return o.jsx(u,{ref:c,className:E(Sn({size:r,weight:n,muted:s}),e),...i,children:d})});hn.displayName="Body";const En=K.cva("font-sans text-foreground",{variants:{weight:{normal:"font-normal",medium:"font-medium"},muted:{true:"text-muted-foreground",false:""}},defaultVariants:{weight:"normal",muted:!0}}),xn=l.forwardRef(({className:e,weight:r,muted:n,as:s="span",children:a,...d},i)=>{const c=s;return o.jsx(c,{ref:i,className:E("text-xs leading-tight tracking-wide",En({weight:r,muted:n}),e),...d,children:a})});xn.displayName="Caption";const bn=K.cva("font-mono text-foreground",{variants:{variant:{inline:"rounded bg-muted px-xs py-0.5 text-sm font-semibold",block:"block rounded-md bg-muted p-md text-sm font-semibold"},muted:{true:"text-muted-foreground",false:""}},defaultVariants:{variant:"inline",muted:!1}}),In=l.forwardRef(({className:e,variant:r,muted:n,as:s,children:a,...d},i)=>{const c=s||(r==="block"?"pre":"code");return o.jsx(c,{ref:i,className:E(bn({variant:r,muted:n}),e),...d,children:r==="block"?o.jsx("code",{children:a}):a})});In.displayName="Code";const vn=K.cva("font-display text-foreground",{variants:{size:{xl:"text-xl leading-normal tracking-normal","2xl":"text-2xl leading-tight tracking-tight","3xl":"text-3xl leading-tight tracking-tight","4xl":"text-4xl leading-none tracking-tight"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},muted:{true:"text-muted-foreground",false:""}},defaultVariants:{size:"4xl",weight:"bold",muted:!1}}),_n=l.forwardRef(({className:e,size:r,weight:n,muted:s,as:a="h1",children:d,...i},c)=>{const u=a==="h1"?"h1":a==="h2"?"h2":"div";return o.jsx(u,{ref:c,className:E(vn({size:r,weight:n,muted:s}),e),...i,children:d})});_n.displayName="Display";const Kn=K.cva("font-display text-foreground",{variants:{level:{1:"text-5xl font-bold leading-tight tracking-tight",2:"text-4xl font-bold leading-tight tracking-tight",3:"text-3xl font-semibold leading-snug tracking-normal",4:"text-2xl font-semibold leading-snug tracking-normal",5:"text-xl font-medium leading-normal tracking-normal",6:"text-lg font-medium leading-normal tracking-normal"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},muted:{true:"text-muted-foreground",false:""}},compoundVariants:[{level:1,weight:"normal",class:"text-5xl font-normal"},{level:1,weight:"medium",class:"text-5xl font-medium"},{level:1,weight:"semibold",class:"text-5xl font-semibold"},{level:1,weight:"bold",class:"text-5xl font-bold"},{level:2,weight:"normal",class:"text-4xl font-normal"},{level:2,weight:"medium",class:"text-4xl font-medium"},{level:2,weight:"semibold",class:"text-4xl font-semibold"},{level:2,weight:"bold",class:"text-4xl font-bold"},{level:3,weight:"normal",class:"text-3xl font-normal"},{level:3,weight:"medium",class:"text-3xl font-medium"},{level:3,weight:"semibold",class:"text-3xl font-semibold"},{level:3,weight:"bold",class:"text-3xl font-bold"},{level:4,weight:"normal",class:"text-2xl font-normal"},{level:4,weight:"medium",class:"text-2xl font-medium"},{level:4,weight:"semibold",class:"text-2xl font-semibold"},{level:4,weight:"bold",class:"text-2xl font-bold"},{level:5,weight:"normal",class:"text-xl font-normal"},{level:5,weight:"medium",class:"text-xl font-medium"},{level:5,weight:"semibold",class:"text-xl font-semibold"},{level:5,weight:"bold",class:"text-xl font-bold"},{level:6,weight:"normal",class:"text-lg font-normal"},{level:6,weight:"medium",class:"text-lg font-medium"},{level:6,weight:"semibold",class:"text-lg font-semibold"},{level:6,weight:"bold",class:"text-lg font-bold"}],defaultVariants:{level:1,muted:!1}}),Se=l.forwardRef(({className:e,level:r=1,weight:n,muted:s,as:a,children:d,...i},c)=>{const u=a||`h${r}`;return o.jsx(u,{ref:c,className:E(Kn({level:r,weight:n,muted:s}),e),...i,children:d})});Se.displayName="Heading";const wn=K.cva("font-sans text-foreground",{variants:{size:{lg:"text-lg leading-normal tracking-normal",xl:"text-xl leading-normal tracking-normal"},muted:{true:"text-muted-foreground",false:""}},defaultVariants:{size:"lg",muted:!0}}),yn=l.forwardRef(({className:e,size:r,muted:n,as:s="p",children:a,...d},i)=>{const c=s;return o.jsx(c,{ref:i,className:E(wn({size:r,muted:n}),e),...d,children:a})});yn.displayName="Lead";const ce=({className:e,"aria-hidden":r=!0,...n})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:o.jsx("path",{d:"M14 5l7 7m0 0l-7 7m7-7H3"})});ce.displayName="IconArrowRight";const Qe=({className:e,"aria-hidden":r=!0,...n})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:o.jsx("path",{d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})});Qe.displayName="IconCalendar";const Ze=({className:e,"aria-hidden":r=!0,...n})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:o.jsx("path",{d:"M20 6 9 17l-5-5"})});Ze.displayName="IconCheck";const zt=({className:e,"aria-hidden":r=!0,...n})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:o.jsx("path",{d:"m6 9 6 6 6-6"})});zt.displayName="IconChevronDown";const Mt=({className:e,"aria-hidden":r=!0,...n})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:o.jsx("path",{d:"m9 18 6-6-6-6"})});Mt.displayName="IconChevronRight";const kt=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("path",{d:"m18 6-12 12"}),o.jsx("path",{d:"m6 6 12 12"})]});kt.displayName="IconClose";const Pt=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"m15 9-6 6"}),o.jsx("path",{d:"m9 9 6 6"})]});Pt.displayName="IconError";const Dt=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"M12 16v-4"}),o.jsx("path",{d:"M12 8h.01"})]});Dt.displayName="IconInfo";const Je=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("path",{d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),o.jsx("path",{d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]});Je.displayName="IconLocation";const Ut=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("line",{x1:"4",x2:"20",y1:"6",y2:"6"}),o.jsx("line",{x1:"4",x2:"20",y1:"12",y2:"12"}),o.jsx("line",{x1:"4",x2:"20",y1:"18",y2:"18"})]});Ut.displayName="IconMenu";const Lt=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("circle",{cx:"11",cy:"11",r:"8"}),o.jsx("path",{d:"m21 21-4.35-4.35"})]});Lt.displayName="IconSearch";const Bt=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"m9 12 2 2 4-4"})]});Bt.displayName="IconSuccess";const Gt=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),o.jsx("path",{d:"M12 9v4"}),o.jsx("path",{d:"M12 17h.01"})]});Gt.displayName="IconWarning";const It={arrowRight:ce,calendar:Qe,check:Ze,chevronDown:zt,chevronRight:Mt,close:kt,error:Pt,info:Dt,location:Je,menu:Ut,search:Lt,success:Bt,warning:Gt},An=K.cva(`inline-flex items-center justify-center border ${t.MOTION_TOKENS.transition.all} ${t.MOTION_TOKENS.duration[200]} ${t.MOTION_TOKENS.easing["in-out"]} focus-visible:outline-none disabled:cursor-not-allowed ${t.CHECKBOX_TOKENS.shadow}`,{variants:{variant:{primary:`${t.CHECKBOX_TOKENS.variant.primary.border} ${t.CHECKBOX_TOKENS.variant.primary.background} ${t.CHECKBOX_TOKENS.variant.primary.text} ${t.CHECKBOX_TOKENS.variant.primary.focus}`,secondary:`${t.CHECKBOX_TOKENS.variant.secondary.border} ${t.CHECKBOX_TOKENS.variant.secondary.background} ${t.CHECKBOX_TOKENS.variant.secondary.text} ${t.CHECKBOX_TOKENS.variant.secondary.focus}`,outline:`${t.CHECKBOX_TOKENS.variant.outline.border} ${t.CHECKBOX_TOKENS.variant.outline.background} ${t.CHECKBOX_TOKENS.variant.outline.text} ${t.CHECKBOX_TOKENS.variant.outline.focus}`,ghost:`${t.CHECKBOX_TOKENS.variant.ghost.border} ${t.CHECKBOX_TOKENS.variant.ghost.background} ${t.CHECKBOX_TOKENS.variant.ghost.text} ${t.CHECKBOX_TOKENS.variant.ghost.focus}`,destructive:`${t.CHECKBOX_TOKENS.variant.destructive.border} ${t.CHECKBOX_TOKENS.variant.destructive.background} ${t.CHECKBOX_TOKENS.variant.destructive.text} ${t.CHECKBOX_TOKENS.variant.destructive.focus}`},size:{xs:`${t.CHECKBOX_TOKENS.size.xs.width} ${t.CHECKBOX_TOKENS.size.xs.height} ${t.CHECKBOX_TOKENS.size.xs.radius}`,sm:`${t.CHECKBOX_TOKENS.size.sm.width} ${t.CHECKBOX_TOKENS.size.sm.height} ${t.CHECKBOX_TOKENS.size.sm.radius}`,md:`${t.CHECKBOX_TOKENS.size.md.width} ${t.CHECKBOX_TOKENS.size.md.height} ${t.CHECKBOX_TOKENS.size.md.radius}`,lg:`${t.CHECKBOX_TOKENS.size.lg.width} ${t.CHECKBOX_TOKENS.size.lg.height} ${t.CHECKBOX_TOKENS.size.lg.radius}`,xl:`${t.CHECKBOX_TOKENS.size.xl.width} ${t.CHECKBOX_TOKENS.size.xl.height} ${t.CHECKBOX_TOKENS.size.xl.radius}`},state:{default:`${t.CHECKBOX_TOKENS.state.border.default} ${t.CHECKBOX_TOKENS.state.background.default} ${t.CHECKBOX_TOKENS.state.text.default}`,checked:`${t.CHECKBOX_TOKENS.state.border.checked} ${t.CHECKBOX_TOKENS.state.background.checked} ${t.CHECKBOX_TOKENS.state.text.checked}`,indeterminate:`${t.CHECKBOX_TOKENS.state.border.indeterminate} ${t.CHECKBOX_TOKENS.state.background.indeterminate} ${t.CHECKBOX_TOKENS.state.text.indeterminate}`,error:`${t.CHECKBOX_TOKENS.state.border.error} ${t.CHECKBOX_TOKENS.state.background.default} ${t.CHECKBOX_TOKENS.state.text.default}`,disabled:`${t.CHECKBOX_TOKENS.state.border.disabled} ${t.CHECKBOX_TOKENS.state.background.disabled} ${t.CHECKBOX_TOKENS.state.text.disabled}`}},defaultVariants:{variant:"outline",size:"md",state:"default"}}),Cn=l.forwardRef(({className:e,variant:r,size:n,state:s,checked:a,indeterminate:d=!1,disabled:i=!1,onCheckedChange:c,icon:u,indeterminateIcon:N,"aria-label":f,"aria-labelledby":O,"aria-describedby":m,onClick:p,onKeyDown:T,...h},g)=>{const[S,x]=l.useState(!1),b=a!==void 0,I=b?a:S,v=i||s==="disabled",_=s==="error",$=l.useMemo(()=>v?"disabled":_?"error":d?"indeterminate":I?"checked":"default",[v,_,d,I]),y=l.useMemo(()=>d?"mixed":I?"true":"false",[d,I]),V=l.useCallback(z=>{if(v){z.preventDefault();return}b||x(X=>!X),c==null||c(!I),p==null||p(z)},[v,b,I,c,p]),A=l.useCallback(z=>{v||((z.key===" "||z.key==="Spacebar")&&(z.preventDefault(),z.stopPropagation(),b||x(X=>!X),c==null||c(!I)),T==null||T(z))},[v,b,I,c,T]),M=E(An({variant:r,size:n,state:$}),e),Y=n?t.CHECKBOX_TOKENS.icon.size[n]:t.CHECKBOX_TOKENS.icon.size.md,G=()=>d?N||o.jsx("span",{className:E(t.CHECKBOX_TOKENS.indeterminate.width,t.CHECKBOX_TOKENS.indeterminate.height,t.CHECKBOX_TOKENS.indeterminate.color,"block rounded-sm"),"aria-hidden":"true"}):I?u||o.jsx(Ze,{className:E(Y,t.CHECKBOX_TOKENS.icon.stroke,v?t.CHECKBOX_TOKENS.icon.color.disabled:t.CHECKBOX_TOKENS.icon.color.default),"aria-hidden":!0}):null;return o.jsx("button",{type:"button",role:"checkbox","aria-checked":y,"aria-disabled":v,"aria-invalid":_,"aria-label":f,"aria-labelledby":O,"aria-describedby":m,disabled:v,className:M,onClick:V,onKeyDown:A,ref:g,...h,children:G()})});Cn.displayName="Checkbox";const $n=K.cva(`flex ${t.INPUT_TOKENS.shadow} ${t.MOTION_TOKENS.transition.colors} file:border-0 file:bg-transparent ${t.TEXT_TOKENS.fontSize.sm} file:font-medium ${t.INPUT_TOKENS.file.text} disabled:cursor-not-allowed focus-visible:outline-none`,{variants:{variant:{primary:`${t.INPUT_TOKENS.variant.primary.border} ${t.INPUT_TOKENS.variant.primary.background} ${t.INPUT_TOKENS.variant.primary.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.primary.focus}`,secondary:`${t.INPUT_TOKENS.variant.secondary.border} ${t.INPUT_TOKENS.variant.secondary.background} ${t.INPUT_TOKENS.variant.secondary.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.secondary.focus}`,outline:`${t.INPUT_TOKENS.variant.outline.border} ${t.INPUT_TOKENS.variant.outline.background} ${t.INPUT_TOKENS.variant.outline.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.outline.focus}`,ghost:`${t.INPUT_TOKENS.variant.ghost.border} ${t.INPUT_TOKENS.variant.ghost.background} ${t.INPUT_TOKENS.variant.ghost.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.ghost.focus}`,destructive:`${t.INPUT_TOKENS.variant.destructive.border} ${t.INPUT_TOKENS.variant.destructive.background} ${t.INPUT_TOKENS.variant.destructive.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.destructive.focus}`},size:{xs:`${t.INPUT_TOKENS.size.xs.height} ${t.INPUT_TOKENS.size.xs.padding.horizontal} ${t.INPUT_TOKENS.size.xs.padding.vertical} ${t.INPUT_TOKENS.size.xs.radius} ${t.INPUT_TOKENS.size.xs.fontSize}`,sm:`${t.INPUT_TOKENS.size.sm.height} ${t.INPUT_TOKENS.size.sm.padding.horizontal} ${t.INPUT_TOKENS.size.sm.padding.vertical} ${t.INPUT_TOKENS.size.sm.radius} ${t.INPUT_TOKENS.size.sm.fontSize}`,md:`${t.INPUT_TOKENS.size.md.height} ${t.INPUT_TOKENS.size.md.padding.horizontal} ${t.INPUT_TOKENS.size.md.padding.vertical} ${t.INPUT_TOKENS.size.md.radius} ${t.INPUT_TOKENS.size.md.fontSize} ${t.INPUT_TOKENS.size.md.fontSizeResponsive}`,lg:`${t.INPUT_TOKENS.size.lg.height} ${t.INPUT_TOKENS.size.lg.padding.horizontal} ${t.INPUT_TOKENS.size.lg.padding.vertical} ${t.INPUT_TOKENS.size.lg.radius} ${t.INPUT_TOKENS.size.lg.fontSize}`,xl:`${t.INPUT_TOKENS.size.xl.height} ${t.INPUT_TOKENS.size.xl.padding.horizontal} ${t.INPUT_TOKENS.size.xl.padding.vertical} ${t.INPUT_TOKENS.size.xl.radius} ${t.INPUT_TOKENS.size.xl.fontSize}`},state:{default:`${t.INPUT_TOKENS.state.border.default} ${t.INPUT_TOKENS.state.background.default} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.border.focus}`,error:`${t.INPUT_TOKENS.state.border.error} ${t.INPUT_TOKENS.state.background.default} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.border.focus}`,success:`${t.INPUT_TOKENS.state.border.success} ${t.INPUT_TOKENS.state.background.default} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.border.focus}`,disabled:`${t.INPUT_TOKENS.state.border.disabled} ${t.INPUT_TOKENS.state.background.disabled} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.text.disabled}`},fullWidth:{true:t.INPUT_TOKENS.width.full,false:""}},defaultVariants:{variant:"outline",size:"md",state:"default",fullWidth:!0}}),Rn=l.forwardRef(({className:e,type:r="text",variant:n,size:s,state:a,fullWidth:d,iconLeft:i,iconRight:c,disabled:u,"aria-invalid":N,"aria-describedby":f,...O},m)=>{const p=a==="error"||N===!0,T=u||a==="disabled",h=p?!0:N,g=l.useId(),[S]=l.useState(()=>{if(f)return f;if(a==="error"||a==="success")return`input-${g}-message`}),x=E($n({variant:n,size:s,state:a,fullWidth:d}),i&&t.INPUT_TOKENS.icon.paddingLeft,c&&t.INPUT_TOKENS.icon.paddingRight,e);return i||c?o.jsxs("div",{className:E("relative",d!==!1&&t.INPUT_TOKENS.width.full),children:[i&&o.jsx("span",{className:E("absolute left-0 top-0 flex h-full items-center",t.INPUT_TOKENS.icon.paddingLeft,t.INPUT_TOKENS.icon.size,t.INPUT_TOKENS.icon.color),children:i}),o.jsx("input",{type:r,className:x,ref:m,disabled:T,"aria-invalid":h,"aria-describedby":S,...O}),c&&o.jsx("span",{className:E("absolute right-0 top-0 flex h-full items-center",t.INPUT_TOKENS.icon.paddingRight,t.INPUT_TOKENS.icon.size,t.INPUT_TOKENS.icon.color),children:c})]}):o.jsx("input",{type:r,className:x,ref:m,disabled:T,"aria-invalid":h,"aria-describedby":S,...O})});Rn.displayName="Input";const Vn=K.cva(`inline-flex items-center justify-center border ${t.MOTION_TOKENS.transition.all} ${t.MOTION_TOKENS.duration[200]} ${t.MOTION_TOKENS.easing["in-out"]} focus-visible:outline-none disabled:cursor-not-allowed ${t.RADIO_TOKENS.shadow}`,{variants:{variant:{primary:`${t.RADIO_TOKENS.variant.primary.border} ${t.RADIO_TOKENS.variant.primary.background} ${t.RADIO_TOKENS.variant.primary.text} ${t.RADIO_TOKENS.variant.primary.focus}`,secondary:`${t.RADIO_TOKENS.variant.secondary.border} ${t.RADIO_TOKENS.variant.secondary.background} ${t.RADIO_TOKENS.variant.secondary.text} ${t.RADIO_TOKENS.variant.secondary.focus}`,outline:`${t.RADIO_TOKENS.variant.outline.border} ${t.RADIO_TOKENS.variant.outline.background} ${t.RADIO_TOKENS.variant.outline.text} ${t.RADIO_TOKENS.variant.outline.focus}`,ghost:`${t.RADIO_TOKENS.variant.ghost.border} ${t.RADIO_TOKENS.variant.ghost.background} ${t.RADIO_TOKENS.variant.ghost.text} ${t.RADIO_TOKENS.variant.ghost.focus}`,destructive:`${t.RADIO_TOKENS.variant.destructive.border} ${t.RADIO_TOKENS.variant.destructive.background} ${t.RADIO_TOKENS.variant.destructive.text} ${t.RADIO_TOKENS.variant.destructive.focus}`},size:{xs:`${t.RADIO_TOKENS.size.xs.width} ${t.RADIO_TOKENS.size.xs.height} ${t.RADIO_TOKENS.size.xs.radius}`,sm:`${t.RADIO_TOKENS.size.sm.width} ${t.RADIO_TOKENS.size.sm.height} ${t.RADIO_TOKENS.size.sm.radius}`,md:`${t.RADIO_TOKENS.size.md.width} ${t.RADIO_TOKENS.size.md.height} ${t.RADIO_TOKENS.size.md.radius}`,lg:`${t.RADIO_TOKENS.size.lg.width} ${t.RADIO_TOKENS.size.lg.height} ${t.RADIO_TOKENS.size.lg.radius}`,xl:`${t.RADIO_TOKENS.size.xl.width} ${t.RADIO_TOKENS.size.xl.height} ${t.RADIO_TOKENS.size.xl.radius}`},state:{default:`${t.RADIO_TOKENS.state.border.default} ${t.RADIO_TOKENS.state.background.default} ${t.RADIO_TOKENS.state.text.default}`,checked:`${t.RADIO_TOKENS.state.border.checked} ${t.RADIO_TOKENS.state.background.checked} ${t.RADIO_TOKENS.state.text.checked}`,error:`${t.RADIO_TOKENS.state.border.error} ${t.RADIO_TOKENS.state.background.default} ${t.RADIO_TOKENS.state.text.default}`,disabled:`${t.RADIO_TOKENS.state.border.disabled} ${t.RADIO_TOKENS.state.background.disabled} ${t.RADIO_TOKENS.state.text.disabled}`}},defaultVariants:{variant:"outline",size:"md",state:"default"}}),jn=l.createContext(void 0),zn=l.forwardRef(({value:e,defaultValue:r,onValueChange:n,name:s,orientation:a="vertical",size:d,className:i,children:c,...u},N)=>{const[f,O]=l.useState(r||""),m=e!==void 0,p=m?e:f,T=l.useMemo(()=>s||(typeof document<"u"?`radio-group-${Math.random().toString(36).substr(2,9)}`:"radio-group"),[s]),h=l.useCallback(S=>{m||O(S),n==null||n(S)},[m,n]),g=l.useMemo(()=>({value:p,onValueChange:h,name:T,orientation:a??"vertical",size:d??"md"}),[p,h,T,a,d]);return o.jsx(jn.Provider,{value:g,children:o.jsx("div",{ref:N,role:"radiogroup","aria-orientation":a??"vertical",className:E(a==="horizontal"?"flex flex-row items-center gap-md":"flex flex-col gap-md",i),...u,children:c})})});zn.displayName="RadioGroup";const Mn=l.forwardRef(({className:e,variant:r,size:n,state:s,checked:a,disabled:d=!1,value:i,onCheckedChange:c,icon:u,"aria-label":N,"aria-labelledby":f,"aria-describedby":O,onClick:m,onKeyDown:p,...T},h)=>{const g=l.useContext(jn),S=a!==void 0,x=g!==void 0,b=x&&i!==void 0&&g?g.value===i:!1,[I,v]=l.useState(!1),_=S?a:x?b:I,$=n||(g==null?void 0:g.size)||"md",y=d||s==="disabled",V=s==="error",A=l.useMemo(()=>y?"disabled":V?"error":_?"checked":"default",[y,V,_]),M=l.useMemo(()=>x?_?0:-1:0,[x,_]),Y=l.useCallback(w=>{if(y){w.preventDefault();return}x&&i!==void 0?g==null||g.onValueChange(i):S||v(!0),c==null||c(!0),m==null||m(w)},[y,x,S,i,g,c,m]),G=l.useCallback(w=>{var C;if(!y){if((w.key===" "||w.key==="Spacebar")&&(w.preventDefault(),w.stopPropagation(),x&&i!==void 0?g==null||g.onValueChange(i):S||v(!0),c==null||c(!0)),x&&g){const j=w.currentTarget,k=Array.from(((C=j.parentElement)==null?void 0:C.querySelectorAll('[role="radio"]:not([disabled])'))||[]),L=k.findIndex(me=>me===j);let J=L;g.orientation==="horizontal"&&(w.key==="ArrowLeft"?(w.preventDefault(),J=L>0?L-1:k.length-1):w.key==="ArrowRight"&&(w.preventDefault(),J=L<k.length-1?L+1:0)),w.key==="ArrowUp"?(w.preventDefault(),J=L>0?L-1:k.length-1):w.key==="ArrowDown"&&(w.preventDefault(),J=L<k.length-1?L+1:0),g.orientation==="vertical"&&(w.key==="ArrowLeft"||w.key==="ArrowRight")&&(w.preventDefault(),w.key==="ArrowLeft"?J=L>0?L-1:k.length-1:J=L<k.length-1?L+1:0);const xe=k[J];if(J!==L&&xe){xe.focus();const me=xe.getAttribute("data-value");me&&g&&g.onValueChange(me)}}p==null||p(w)}},[y,x,S,i,g,c,p]),z=E(Vn({variant:r,size:$,state:A}),e),X=t.RADIO_TOKENS.dot.size[$],U=()=>_?u||o.jsx("span",{className:E(X,t.RADIO_TOKENS.dot.radius,y?t.RADIO_TOKENS.dot.color.disabled:t.RADIO_TOKENS.dot.color.default,"block"),"aria-hidden":"true"}):null;return o.jsx("button",{type:"button",role:"radio","aria-checked":_,"aria-disabled":y,"aria-invalid":V,"aria-label":N,"aria-labelledby":f,"aria-describedby":O,tabIndex:M,disabled:y,"data-value":i,name:g==null?void 0:g.name,className:z,onClick:Y,onKeyDown:G,ref:h,...T,children:U()})});Mn.displayName="Radio";const Ne=l.forwardRef(({children:e,container:r,className:n,style:s},a)=>{const[d,i]=l.useState(!1);if(l.useEffect(()=>{i(!0)},[]),!d||typeof window>"u")return null;const c=r||document.body;return c?Nn.createPortal(o.jsx("div",{ref:a,className:E(n),style:s,children:e}),c):null});Ne.displayName="Portal";const kn=K.cva(`flex ${t.INPUT_TOKENS.width.full} items-center justify-between ${t.INPUT_TOKENS.shadow} ${t.MOTION_TOKENS.transition.colors} disabled:cursor-not-allowed focus-visible:outline-none`,{variants:{variant:{primary:`${t.INPUT_TOKENS.variant.primary.border} ${t.INPUT_TOKENS.variant.primary.background} ${t.INPUT_TOKENS.variant.primary.text} ${t.INPUT_TOKENS.variant.primary.focus}`,secondary:`${t.INPUT_TOKENS.variant.secondary.border} ${t.INPUT_TOKENS.variant.secondary.background} ${t.INPUT_TOKENS.variant.secondary.text} ${t.INPUT_TOKENS.variant.secondary.focus}`,outline:`${t.INPUT_TOKENS.variant.outline.border} ${t.INPUT_TOKENS.variant.outline.background} ${t.INPUT_TOKENS.variant.outline.text} ${t.INPUT_TOKENS.variant.outline.focus}`,ghost:`${t.INPUT_TOKENS.variant.ghost.border} ${t.INPUT_TOKENS.variant.ghost.background} ${t.INPUT_TOKENS.variant.ghost.text} ${t.INPUT_TOKENS.variant.ghost.focus}`},size:{xs:`${t.INPUT_TOKENS.size.xs.height} ${t.INPUT_TOKENS.size.xs.padding.horizontal} ${t.INPUT_TOKENS.size.xs.padding.vertical} ${t.INPUT_TOKENS.size.xs.radius} ${t.INPUT_TOKENS.size.xs.fontSize}`,sm:`${t.INPUT_TOKENS.size.sm.height} ${t.INPUT_TOKENS.size.sm.padding.horizontal} ${t.INPUT_TOKENS.size.sm.padding.vertical} ${t.INPUT_TOKENS.size.sm.radius} ${t.INPUT_TOKENS.size.sm.fontSize}`,md:`${t.INPUT_TOKENS.size.md.height} ${t.INPUT_TOKENS.size.md.padding.horizontal} ${t.INPUT_TOKENS.size.md.padding.vertical} ${t.INPUT_TOKENS.size.md.radius} ${t.INPUT_TOKENS.size.md.fontSize} ${t.INPUT_TOKENS.size.md.fontSizeResponsive}`,lg:`${t.INPUT_TOKENS.size.lg.height} ${t.INPUT_TOKENS.size.lg.padding.horizontal} ${t.INPUT_TOKENS.size.lg.padding.vertical} ${t.INPUT_TOKENS.size.lg.radius} ${t.INPUT_TOKENS.size.lg.fontSize}`},state:{open:t.INPUT_TOKENS.state.border.focus,closed:"",disabled:`${t.INPUT_TOKENS.state.border.disabled} ${t.INPUT_TOKENS.state.background.disabled} ${t.INPUT_TOKENS.state.text.disabled}`}},defaultVariants:{variant:"outline",size:"md",state:"closed"}}),Pn=K.cva(`relative z-50 min-w-[8rem] overflow-hidden ${t.INPUT_TOKENS.selectListbox.radius} ${t.INPUT_TOKENS.selectListbox.border} ${t.INPUT_TOKENS.selectListbox.background} ${t.INPUT_TOKENS.selectListbox.text} ${t.INPUT_TOKENS.selectListbox.shadow} ${t.MOTION_TOKENS.transition.colors}`,{variants:{size:{xs:t.TEXT_TOKENS.fontSize.xs,sm:t.TEXT_TOKENS.fontSize.sm,md:t.TEXT_TOKENS.fontSize.sm,lg:t.TEXT_TOKENS.fontSize.md}},defaultVariants:{size:"md"}}),Dn=K.cva(`relative flex ${t.INPUT_TOKENS.width.full} cursor-default select-none items-center outline-none ${t.MOTION_TOKENS.transition.colors} ${t.INPUT_TOKENS.selectOption.focus.background} ${t.INPUT_TOKENS.selectOption.focus.text} data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,{variants:{size:{xs:`${t.INPUT_TOKENS.size.xs.padding.horizontal} ${t.INPUT_TOKENS.size.xs.padding.vertical} ${t.INPUT_TOKENS.size.xs.fontSize}`,sm:`${t.INPUT_TOKENS.size.sm.padding.horizontal} ${t.INPUT_TOKENS.size.sm.padding.vertical} ${t.INPUT_TOKENS.size.sm.fontSize}`,md:`${t.INPUT_TOKENS.size.sm.padding.horizontal} ${t.INPUT_TOKENS.size.sm.padding.vertical} ${t.INPUT_TOKENS.size.sm.fontSize}`,lg:`${t.INPUT_TOKENS.size.md.padding.horizontal} ${t.INPUT_TOKENS.size.sm.padding.vertical} ${t.INPUT_TOKENS.size.md.fontSize}`},state:{selected:`${t.INPUT_TOKENS.selectOption.selected.background} ${t.INPUT_TOKENS.selectOption.selected.text}`,default:"",disabled:"pointer-events-none opacity-50"}},defaultVariants:{size:"md",state:"default"}}),Un=l.createContext(null);function Ht(){const e=l.useContext(Un);if(!e)throw new Error("Select components must be used within SelectRoot");return e}function Xt({value:e,defaultValue:r,onValueChange:n,disabled:s=!1,open:a,onOpenChange:d,defaultOpen:i=!1,children:c,variant:u="outline",size:N="md"}){const[f,O]=l.useState(r),[m,p]=l.useState(i),[T,h]=l.useState(null),[g,S]=l.useState([]),[x,b]=l.useState(new Map),I=l.useRef(`select-trigger-${Math.random().toString(36).substr(2,9)}`),v=l.useRef(`select-listbox-${Math.random().toString(36).substr(2,9)}`),_=e!==void 0,$=_?e:f,y=a!==void 0,V=y?a:m,A=l.useCallback(w=>{_||O(w),n==null||n(w),y?d==null||d(!1):p(!1)},[_,y,n,d]),M=l.useCallback(w=>{y||p(w),d==null||d(w),w||h(null)},[y,d]),Y=l.useCallback(w=>{S(C=>C.includes(w)?C:[...C,w])},[]),G=l.useCallback(w=>{S(C=>C.filter(j=>j!==w))},[]),z=l.useCallback((w,C)=>{b(j=>{const k=j.get(w);if(k&&k.label===C)return j;const L=new Map(j);return L.set(w,{label:C}),L})},[]),X=l.useCallback(w=>{b(C=>{if(!C.has(w))return C;const j=new Map(C);return j.delete(w),j})},[]),U=l.useMemo(()=>({value:$,onValueChange:A,open:V,onOpenChange:M,disabled:s,triggerId:I.current,listboxId:v.current,variant:u,size:N,focusedIndex:T,setFocusedIndex:h,itemIds:g,registerItem:Y,unregisterItem:G,options:x,registerOption:z,unregisterOption:X}),[$,A,V,M,s,u,N,T,g,Y,G,x,z,X]);return o.jsx(Un.Provider,{value:U,children:c})}Xt.displayName="SelectRoot";function vt(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(Array.isArray(e))return e.map(vt).join("");if(l.isValidElement(e)){const r=e.props;if(r.children)return vt(r.children)}return""}const Ft=l.forwardRef(({className:e,variant:r,size:n,placeholder:s="Select an option...",...a},d)=>{const i=Ht(),{open:c,onOpenChange:u,listboxId:N}=i,f=l.useRef(null),O=l.useRef(null);l.useImperativeHandle(d,()=>f.current,[]),l.useEffect(()=>{if(typeof document>"u")return;const S=document.getElementById(N);S&&S instanceof HTMLDivElement&&(O.current=S)},[N,c]),l.useEffect(()=>{if(!c||!f.current||!O.current)return;const S=O.current,x=()=>{if(!f.current||!O.current)return;const I=f.current.getBoundingClientRect();S.style.position="fixed",S.style.top=`${I.bottom+4}px`,S.style.left=`${I.left}px`,S.style.width=`${I.width}px`,S.style.minWidth=`${I.width}px`},b=I=>{const v=I.target;f.current&&!f.current.contains(v)&&O.current&&!O.current.contains(v)&&u(!1)};return x(),window.addEventListener("scroll",x,!0),window.addEventListener("resize",x),document.addEventListener("mousedown",b),()=>{window.removeEventListener("scroll",x,!0),window.removeEventListener("resize",x),document.removeEventListener("mousedown",b)}},[c,u]);const m=r??i.variant,p=n??i.size,T=l.useCallback(S=>{var x;if(i.disabled){S.preventDefault();return}i.onOpenChange(!i.open),(x=a.onClick)==null||x.call(a,S)},[i,a]),h=l.useCallback(S=>{var x;i.disabled||(S.key==="Enter"||S.key===" "||S.key==="ArrowDown"?(S.preventDefault(),i.open||i.onOpenChange(!0)):S.key==="Escape"&&i.open&&(S.preventDefault(),i.onOpenChange(!1)),(x=a.onKeyDown)==null||x.call(a,S))},[i,a]),g=l.useMemo(()=>{if(!i.value)return s;const S=i.options.get(i.value);return(S==null?void 0:S.label)??s},[i.value,i.options,s]);return o.jsx(o.Fragment,{children:o.jsxs("button",{ref:f,type:"button",id:i.triggerId,disabled:i.disabled,"aria-haspopup":"listbox","aria-expanded":i.open,"aria-controls":i.open?i.listboxId:void 0,className:E(kn({variant:m,size:p,state:i.disabled?"disabled":i.open?"open":"closed"}),e),onClick:T,onKeyDown:h,...a,children:[o.jsx("span",{className:"truncate",children:g}),o.jsx(D.ChevronDown,{className:E("ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform",i.open&&"rotate-180"),"aria-hidden":"true"})]})})});Ft.displayName="SelectTrigger";const Wt=l.forwardRef(({className:e,size:r,children:n,onKeyDown:s,...a},d)=>{const i=Ht(),c=l.useRef(null);l.useImperativeHandle(d,()=>c.current,[]);const u=r??i.size,N=i.open,f=l.useMemo(()=>i.itemIds.filter(m=>{const p=document.getElementById(m);return p&&!p.hasAttribute("aria-disabled")}),[i.itemIds]);l.useEffect(()=>{i.open&&(i.focusedIndex===null||i.focusedIndex===-1)&&f.length>0&&i.setFocusedIndex(0)},[i.open,i.focusedIndex,f.length]),l.useLayoutEffect(()=>{if(!i.open)return;const m=i.focusedIndex??-1;if(m<0||m>=f.length)return;const p=f[m];if(!p)return;const T=document.getElementById(p);T&&(T.getAttribute("tabindex")==="-1"&&T.setAttribute("tabindex","0"),T.focus())},[i.open,i.focusedIndex,f]);const O=l.useCallback(m=>{if(!N){s==null||s(m);return}if(f.length===0){s==null||s(m);return}let p=i.focusedIndex??0;switch(m.key){case"ArrowDown":m.preventDefault(),p=Math.min(p+1,f.length-1),i.setFocusedIndex(p);break;case"ArrowUp":m.preventDefault(),p=Math.max(p-1,0),i.setFocusedIndex(p);break;case"Home":m.preventDefault(),p=0,i.setFocusedIndex(p);break;case"End":m.preventDefault(),p=f.length-1,i.setFocusedIndex(p);break;case"Enter":{m.preventDefault();const h=i.focusedIndex??0,g=f[h];if(g){const S=document.getElementById(g);if(S&&S.hasAttribute("data-value")){const x=S.getAttribute("data-value");x&&(i.onValueChange(x),i.onOpenChange(!1))}}break}case"Escape":m.preventDefault(),i.onOpenChange(!1);const T=document.getElementById(i.triggerId);T==null||T.focus();break;case"Tab":m.preventDefault(),i.onOpenChange(!1);break;default:s==null||s(m);break}},[N,i,s,f]);return l.useEffect(()=>()=>{if(typeof document<"u"){const m=document.getElementById(i.listboxId);m&&m.parentNode&&m.parentNode.removeChild(m)}},[i.listboxId]),o.jsx(Ne,{children:o.jsx("div",{ref:c,id:N?i.listboxId:void 0,role:N?"listbox":void 0,"aria-labelledby":N?i.triggerId:void 0,"aria-hidden":N?void 0:"true",hidden:!N,className:E(Pn({size:u}),e),onKeyDown:O,...a,children:n})})});Wt.displayName="SelectListbox";const Yt=l.forwardRef(({className:e,value:r,label:n,disabled:s=!1,size:a,children:d,onClick:i,onKeyDown:c,...u},N)=>{const f=Ht(),O=l.useRef(null),m=l.useRef(`select-option-${Math.random().toString(36).substr(2,9)}`);l.useImperativeHandle(N,()=>O.current,[]),l.useEffect(()=>{const _=m.current;return f.registerItem(_),()=>{f.unregisterItem(_)}},[]);const p=l.useRef(f.registerOption),T=l.useRef(f.unregisterOption);p.current=f.registerOption,T.current=f.unregisterOption,l.useLayoutEffect(()=>{const _=typeof n=="string"?n:vt(d)||String(r);return p.current(r,_),()=>{T.current(r)}},[r,n,d]);const h=l.useMemo(()=>{if(s||f.disabled)return-1;const _=f.itemIds.indexOf(m.current);if(_<0)return-1;let $=0;for(let y=0;y<_;y++){const V=f.itemIds[y];if(!V)continue;const A=document.getElementById(V);A&&!A.hasAttribute("aria-disabled")&&$++}return $},[f.itemIds,s,f.disabled]),g=f.focusedIndex!==null&&f.focusedIndex===h&&h>=0,S=f.value===r,x=a??f.size,b=l.useCallback(_=>{if(s||f.disabled){_.preventDefault();return}f.onValueChange(r),i==null||i(_)},[s,f,r,i]),I=l.useCallback(_=>{if(!(s||f.disabled)){if(_.key==="Enter"||_.key===" "){_.preventDefault(),f.onValueChange(r);return}c==null||c(_)}},[s,f,r,c]);l.useEffect(()=>{S&&f.open&&O.current&&!s&&!f.disabled&&queueMicrotask(()=>{O.current&&(O.current.focus(),f.setFocusedIndex(h))})},[f.open,S,h,s,f]);const v=g;return o.jsx("div",{ref:O,id:m.current,role:"option",tabIndex:v?0:-1,"aria-selected":v?"true":"false","aria-disabled":s||f.disabled,"data-disabled":s||f.disabled,"data-value":r,className:E(Dn({size:x,state:S?"selected":s||f.disabled?"disabled":"default"}),e),onClick:b,onKeyDown:I,onFocus:()=>{!s&&!f.disabled&&f.setFocusedIndex(h)},...u,children:n??d??r})});Yt.displayName="SelectOption";const Sa={Root:Xt,Trigger:Ft,Listbox:Wt,Option:Yt},Ln=K.cva(`flex min-h-[80px] ${t.INPUT_TOKENS.shadow} ${t.MOTION_TOKENS.transition.colors} disabled:cursor-not-allowed focus-visible:outline-none resize-y`,{variants:{variant:{primary:`${t.INPUT_TOKENS.variant.primary.border} ${t.INPUT_TOKENS.variant.primary.background} ${t.INPUT_TOKENS.variant.primary.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.primary.focus}`,secondary:`${t.INPUT_TOKENS.variant.secondary.border} ${t.INPUT_TOKENS.variant.secondary.background} ${t.INPUT_TOKENS.variant.secondary.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.secondary.focus}`,outline:`${t.INPUT_TOKENS.variant.outline.border} ${t.INPUT_TOKENS.variant.outline.background} ${t.INPUT_TOKENS.variant.outline.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.outline.focus}`,ghost:`${t.INPUT_TOKENS.variant.ghost.border} ${t.INPUT_TOKENS.variant.ghost.background} ${t.INPUT_TOKENS.variant.ghost.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.ghost.focus}`,destructive:`${t.INPUT_TOKENS.variant.destructive.border} ${t.INPUT_TOKENS.variant.destructive.background} ${t.INPUT_TOKENS.variant.destructive.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.destructive.focus}`},size:{xs:`${t.INPUT_TOKENS.size.xs.padding.horizontal} ${t.INPUT_TOKENS.size.xs.padding.vertical} ${t.INPUT_TOKENS.size.xs.radius} ${t.INPUT_TOKENS.size.xs.fontSize}`,sm:`${t.INPUT_TOKENS.size.sm.padding.horizontal} ${t.INPUT_TOKENS.size.sm.padding.vertical} ${t.INPUT_TOKENS.size.sm.radius} ${t.INPUT_TOKENS.size.sm.fontSize}`,md:`${t.INPUT_TOKENS.size.md.padding.horizontal} ${t.INPUT_TOKENS.size.md.padding.vertical} ${t.INPUT_TOKENS.size.md.radius} ${t.INPUT_TOKENS.size.md.fontSize} ${t.INPUT_TOKENS.size.md.fontSizeResponsive}`,lg:`${t.INPUT_TOKENS.size.lg.padding.horizontal} ${t.INPUT_TOKENS.size.lg.padding.vertical} ${t.INPUT_TOKENS.size.lg.radius} ${t.INPUT_TOKENS.size.lg.fontSize}`,xl:`${t.INPUT_TOKENS.size.xl.padding.horizontal} ${t.INPUT_TOKENS.size.xl.padding.vertical} ${t.INPUT_TOKENS.size.xl.radius} ${t.INPUT_TOKENS.size.xl.fontSize}`},state:{default:`${t.INPUT_TOKENS.state.border.default} ${t.INPUT_TOKENS.state.background.default} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.border.focus}`,error:`${t.INPUT_TOKENS.state.border.error} ${t.INPUT_TOKENS.state.background.default} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.border.focus}`,success:`${t.INPUT_TOKENS.state.border.success} ${t.INPUT_TOKENS.state.background.default} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.border.focus}`,disabled:`${t.INPUT_TOKENS.state.border.disabled} ${t.INPUT_TOKENS.state.background.disabled} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.text.disabled}`},fullWidth:{true:t.INPUT_TOKENS.width.full,false:""}},defaultVariants:{variant:"outline",size:"md",state:"default",fullWidth:!0}}),Bn=l.forwardRef(({className:e,variant:r,size:n,state:s,fullWidth:a,disabled:d,maxLength:i,showCharacterCount:c=!1,value:u,defaultValue:N,"aria-invalid":f,"aria-describedby":O,...m},p)=>{const T=s==="error"||f===!0,h=d||s==="disabled",g=T?!0:f,S=l.useId(),[x]=l.useState(()=>{if(O)return O;if(s==="error"||s==="success")return`textarea-${S}-message`}),b=E(Ln({variant:r,size:n,state:s,fullWidth:a}),e),I=u??N??"",v=typeof I=="string"?I.length:0;return c&&i!==void 0?o.jsxs("div",{className:E("relative",a!==!1&&t.INPUT_TOKENS.width.full),children:[o.jsx("textarea",{className:b,ref:p,disabled:h,maxLength:i,value:u,defaultValue:N,"aria-invalid":g,"aria-describedby":x,...m}),o.jsxs("div",{className:E("absolute",t.INPUT_TOKENS.message.position.bottom,t.INPUT_TOKENS.message.position.right,t.TEXT_TOKENS.fontSize.xs,t.INPUT_TOKENS.message.color.default,v>i&&t.INPUT_TOKENS.message.color.error),children:[v," / ",i]})]}):o.jsx("textarea",{className:b,ref:p,disabled:h,maxLength:i,value:u,defaultValue:N,"aria-invalid":g,"aria-describedby":x,...m})});Bn.displayName="Textarea";function ha(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ea(e){if(e!=null)return ha(e)?e.base:e}function H(e){if(typeof e=="number")return e%1!==0?`var(--spacing-${e.toString().replace(".","-")})`:`var(--spacing-${e})`;if(e==="none")return"var(--spacing-none)";if(e.includes("-")&&!e.startsWith("--")){const r=e.split("-");if(r.length>=2){const n=r[0],s=r.slice(1).join("-");if(n&&["section","container","grid","stack","component"].includes(n))return`var(--layout-${n}-${s})`}}return`var(--spacing-${e})`}function xa(e){return`var(--radius-${e})`}function ba(e){return e.startsWith("hsl(")||e.startsWith("var(")?e:`var(--${e})`}function F(e){return Ea(e)}function Ia(e){if(!(!e||e==="none"))return`shadow-${e}`}function va(e){if(e){if(e==="inline")return"inline";if(e==="inline-block")return"inline-block";if(e==="flex")return"flex";if(e==="inline-flex")return"inline-flex";if(e==="grid")return"grid";if(e==="inline-grid")return"inline-grid";if(e==="block")return"block";if(e==="none")return"hidden"}}function _a(e){if(e){if(e==="row")return"flex-row";if(e==="column")return"flex-col";if(e==="row-reverse")return"flex-row-reverse";if(e==="column-reverse")return"flex-col-reverse"}}function Ka(e){if(e){if(e==="start")return"items-start";if(e==="end")return"items-end";if(e==="center")return"items-center";if(e==="baseline")return"items-baseline";if(e==="stretch")return"items-stretch"}}function wa(e){if(e){if(e==="start")return"justify-start";if(e==="end")return"justify-end";if(e==="center")return"justify-center";if(e==="between")return"justify-between";if(e==="around")return"justify-around";if(e==="evenly")return"justify-evenly"}}const q=l.forwardRef(({as:e="div",p:r,px:n,py:s,pt:a,pr:d,pb:i,pl:c,m:u,mx:N,my:f,mt:O,mr:m,mb:p,ml:T,display:h,flexDirection:g,radius:S,shadow:x,bg:b,gap:I,align:v,justify:_,className:$,style:y,...V},A)=>{const M=F(r),Y=F(n),G=F(s),z=F(a),X=F(d),U=F(i),w=F(c),C=F(u),j=F(N),k=F(f),L=F(O),J=F(m),xe=F(p),me=F(T),Hr=F(S),Xr=F(b),Fr=F(I),Wr={...M!==void 0&&{padding:H(M)},...!r&&Y!==void 0&&{paddingLeft:H(Y),paddingRight:H(Y)},...!r&&G!==void 0&&{paddingTop:H(G),paddingBottom:H(G)},...!r&&!s&&z!==void 0&&{paddingTop:H(z)},...!r&&!n&&X!==void 0&&{paddingRight:H(X)},...!r&&!s&&U!==void 0&&{paddingBottom:H(U)},...!r&&!n&&w!==void 0&&{paddingLeft:H(w)},...C!==void 0&&{margin:H(C)},...!u&&j!==void 0&&{marginLeft:H(j),marginRight:H(j)},...!u&&k!==void 0&&{marginTop:H(k),marginBottom:H(k)},...!u&&!f&&L!==void 0&&{marginTop:H(L)},...!u&&!N&&J!==void 0&&{marginRight:H(J)},...!u&&!f&&xe!==void 0&&{marginBottom:H(xe)},...!u&&!N&&me!==void 0&&{marginLeft:H(me)},...Hr!==void 0&&{borderRadius:xa(Hr)},...Xr!==void 0&&{backgroundColor:ba(Xr)},...Fr!==void 0&&{gap:H(Fr)},...y},fa=E(va(h),_a(g),Ka(v),wa(_),Ia(x),$),Na=e,ma=Object.keys(Wr).length>0||y?{...Wr,...y}:void 0;return o.jsx(Na,{ref:A,className:fa,style:ma,...V})});q.displayName="Box";const ae=l.forwardRef(({direction:e="vertical",spacing:r,gap:n,align:s,justify:a,...d},i)=>{const c=r??n;return o.jsx(q,{ref:i,display:"flex",flexDirection:e==="horizontal"?"row":"column",gap:c,align:s,justify:a,...d})});ae.displayName="Stack";const ya=ae;function De(e){if(e!=null){if(typeof e=="object"&&!Array.isArray(e)&&e!==null){if("base"in e&&e.base!==void 0)return e.base;if("sm"in e&&e.sm!==void 0)return e.sm;if("md"in e&&e.md!==void 0)return e.md;if("lg"in e&&e.lg!==void 0)return e.lg}return e}}function Aa(e){if(e){if(e==="row")return"flex-row";if(e==="column")return"flex-col";if(e==="row-reverse")return"flex-row-reverse";if(e==="column-reverse")return"flex-col-reverse"}}function Ca(e){if(e){if(e==="nowrap")return"flex-nowrap";if(e==="wrap")return"flex-wrap";if(e==="wrap-reverse")return"flex-wrap-reverse"}}function $a(e){if(e){if(e==="start")return"items-start";if(e==="end")return"items-end";if(e==="center")return"items-center";if(e==="baseline")return"items-baseline";if(e==="stretch")return"items-stretch"}}function Ra(e){if(e){if(e==="start")return"justify-start";if(e==="end")return"justify-end";if(e==="center")return"justify-center";if(e==="between")return"justify-between";if(e==="around")return"justify-around";if(e==="evenly")return"justify-evenly"}}function Va(e){if(!(e===void 0||e===!1||e===0)&&(e===!0||e===1))return"grow"}function ja(e){if(!(e===void 0||e===!1||e===0)&&(e===!0||e===1))return"shrink"}const Gn=l.forwardRef(({direction:e,wrap:r,grow:n,shrink:s,basis:a,align:d,justify:i,gap:c,className:u,style:N,...f},O)=>{const m=De(e),p=De(r),T=De(d),h=De(i),g=E(Aa(m),Ca(p),Va(n),ja(s),$a(T),Ra(h),u),S={...a?{flexBasis:a}:{},...N};return o.jsx(q,{ref:O,display:"flex",flexDirection:m,gap:c,className:g,style:Object.keys(S).length>0?S:void 0,...f})});Gn.displayName="Flex";function ye(e){if(e!=null){if(typeof e=="object"&&!Array.isArray(e)&&e!==null){if("base"in e&&e.base!==void 0)return e.base;if("sm"in e&&e.sm!==void 0)return e.sm;if("md"in e&&e.md!==void 0)return e.md;if("lg"in e&&e.lg!==void 0)return e.lg}return e}}function Te(e){if(e)return e==="none"?"grid-cols-none":`grid-cols-${e}`}function za(e){if(!(!e||e==="none"))return`grid-rows-${e}`}function Ma(e){if(e){if(e==="row")return"grid-flow-row";if(e==="col")return"grid-flow-col";if(e==="dense")return"grid-flow-dense";if(e==="row-dense")return"grid-flow-row-dense";if(e==="col-dense")return"grid-flow-col-dense"}}function ka(e){if(e){if(e==="start")return"items-start";if(e==="end")return"items-end";if(e==="center")return"items-center";if(e==="baseline")return"items-baseline";if(e==="stretch")return"items-stretch"}}function Pa(e){if(e){if(e==="start")return"justify-start";if(e==="end")return"justify-end";if(e==="center")return"justify-center";if(e==="between")return"justify-between";if(e==="around")return"justify-around";if(e==="evenly")return"justify-evenly"}}const Hn=l.forwardRef(({cols:e,sm:r,md:n,lg:s,xl:a,"2xl":d,rows:i,gap:c,flow:u,align:N,justify:f,className:O,...m},p)=>{let T=e;(r||n||s||a||d)&&(e!==void 0&&typeof e!="object"?T={base:e,...r&&{sm:r},...n&&{md:n},...s&&{lg:s},...a&&{xl:a},...d&&{"2xl":d}}:e===void 0?T={...r&&{sm:r},...n&&{md:n},...s&&{lg:s},...a&&{xl:a},...d&&{"2xl":d}}:T={...e,...r&&{sm:r},...n&&{md:n},...s&&{lg:s},...a&&{xl:a},...d&&{"2xl":d}});const h=ye(T),g=ye(i),S=ye(u),x=ye(N),b=ye(f),I=[];typeof T=="object"&&T!==null&&!Array.isArray(T)?(T.base!==void 0&&I.push(Te(T.base)||""),T.sm!==void 0&&I.push(`sm:${Te(T.sm)||""}`),T.md!==void 0&&I.push(`md:${Te(T.md)||""}`),T.lg!==void 0&&I.push(`lg:${Te(T.lg)||""}`),T.xl!==void 0&&I.push(`xl:${Te(T.xl)||""}`),T["2xl"]!==void 0&&I.push(`2xl:${Te(T["2xl"])||""}`)):h!==void 0&&I.push(Te(h)||"");const v=E(I,za(g),Ma(S),ka(x),Pa(b),O);return o.jsx(q,{ref:p,display:"grid",gap:c,className:v,...m})});Hn.displayName="Grid";const et=l.forwardRef(({gap:e,align:r,justify:n,...s},a)=>o.jsx(q,{ref:a,display:"flex",flexDirection:"row",gap:e,align:r,justify:n,...s}));et.displayName="Row";const Xn=K.cva("",{variants:{variant:{flat:"bg-background border border-border shadow-none",raised:"bg-card border border-border shadow-sm",sunken:"bg-muted border border-border shadow-none"}},defaultVariants:{variant:"flat"}}),Fn=l.forwardRef(({variant:e,radius:r,className:n,...s},a)=>o.jsx(q,{ref:a,className:E(Xn({variant:e}),n),radius:r,...s}));Fn.displayName="Surface";const Wn=K.cva(`${t.TEXT_TOKENS.fontSize.sm} ${t.TEXT_TOKENS.fontWeight.medium} ${t.TEXT_TOKENS.lineHeight.none} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),qt=l.forwardRef(({className:e,required:r,children:n,...s},a)=>o.jsxs(mn.Root,{ref:a,className:E(Wn(),e),...s,children:[n,r&&o.jsx("span",{className:E(t.INPUT_TOKENS.label.requiredMark,"ml-xs"),children:"*"})]}));qt.displayName=mn.Root.displayName;const Yn=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx(ae,{ref:s,gap:"sm",className:E(e),...n,children:r}));Yn.displayName="Field";const qn=l.forwardRef(({className:e,...r},n)=>o.jsx(qt,{ref:n,className:e,...r}));qn.displayName="FieldLabel";const Qn=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("div",{ref:s,className:E(e),...n,children:r}));Qn.displayName="FieldControl";const Zn=l.forwardRef(({className:e,...r},n)=>o.jsx(W,{ref:n,size:"sm",muted:!0,className:E(e),...r}));Zn.displayName="FieldDescription";const Jn=l.forwardRef(({className:e,...r},n)=>o.jsx(W,{ref:n,size:"sm",className:E("text-destructive",e),...r}));Jn.displayName="FieldError";const $e=Yn;$e.Label=qn;$e.Control=Qn;$e.Description=Zn;$e.Error=Jn;const Re=l.forwardRef(({size:e="md",radius:r,shadow:n,p:s,className:a,...d},i)=>{const c=t.CARD_TOKENS.size[e],u=r??c.radius.replace("rounded-",""),N=c.shadow,f=N==="shadow"?"xs":N.replace("shadow-",""),O=n??f,m=s??c.padding.replace("p-","");return o.jsx(q,{ref:i,className:E("border border-border bg-card text-card-foreground",a),radius:u,shadow:O,p:m,...d})});Re.displayName="Card";const Qt=l.forwardRef(({size:e="md",p:r,className:n,...s},a)=>{const d=t.CARD_TOKENS.size[e],i=r??d.padding.replace("p-",""),c=d.spacing.vertical.replace("space-y-","");return o.jsx(ae,{ref:a,gap:c,className:E(n),p:i,...s})});Qt.displayName="CardHeader";const Zt=l.forwardRef(({size:e="md",p:r,className:n,...s},a)=>{const d=t.CARD_TOKENS.size[e],i=r??d.padding.replace("p-","");return o.jsx(q,{ref:a,className:E(n),p:i,...s})});Zt.displayName="CardBody";const Jt=l.forwardRef(({size:e="md",p:r,className:n,...s},a)=>{const d=t.CARD_TOKENS.size[e],i=r??d.padding.replace("p-","");return o.jsx(et,{ref:a,className:E("items-center",n),p:i,...s})});Jt.displayName="CardFooter";Re.Header=Qt;Re.Body=Zt;Re.Footer=Jt;const es=l.forwardRef(({padding:e="md",gap:r,className:n,as:s,...a},d)=>{const c=t.SECTION_TOKENS.padding[e].replace("py-",""),u=r?t.SECTION_TOKENS.spacing[r].replace("gap-",""):void 0;return o.jsx(ae,{ref:d,as:s??"section",py:c,gap:u,className:E("w-full",n),...a})});es.displayName="Section";const ts=K.cva("",{variants:{variant:{flat:`${t.SURFACE_TOKENS.variant.flat.bg} ${t.SURFACE_TOKENS.variant.flat.border} ${t.SURFACE_TOKENS.variant.flat.shadow}`,raised:`${t.SURFACE_TOKENS.variant.raised.bg} ${t.SURFACE_TOKENS.variant.raised.border} ${t.SURFACE_TOKENS.variant.raised.shadow}`,sunken:`${t.SURFACE_TOKENS.variant.sunken.bg} ${t.SURFACE_TOKENS.variant.sunken.border} ${t.SURFACE_TOKENS.variant.sunken.shadow}`,outline:`${t.SURFACE_TOKENS.variant.outline.bg} ${t.SURFACE_TOKENS.variant.outline.border} ${t.SURFACE_TOKENS.variant.outline.shadow}`,subtle:`${t.SURFACE_TOKENS.variant.subtle.bg} ${t.SURFACE_TOKENS.variant.subtle.border} ${t.SURFACE_TOKENS.variant.subtle.shadow}`}},defaultVariants:{variant:"flat"}}),tt=l.forwardRef(({variant:e="flat",p:r,radius:n,className:s,...a},d)=>{const c=t.SURFACE_TOKENS.variant[e].padding.replace("p-",""),N=t.SURFACE_TOKENS.variant[e].radius.replace("rounded-",""),f=r??c,O=n??N;return o.jsx(q,{ref:d,className:E(ts({variant:e}),s),p:f,radius:O,...a})});tt.displayName="Surface";const Da=K.cva("fixed inset-0 z-40 transition-opacity",{variants:{variant:{default:`${t.OVERLAY_TOKENS.backdrop.default.bg} ${t.OVERLAY_TOKENS.backdrop.default.opacity}`,blurred:`${t.OVERLAY_TOKENS.backdrop.blurred.bg} ${t.OVERLAY_TOKENS.backdrop.blurred.opacity} ${t.OVERLAY_TOKENS.backdrop.blurred.backdropFilter}`,transparent:`${t.OVERLAY_TOKENS.backdrop.transparent.bg} ${t.OVERLAY_TOKENS.backdrop.transparent.opacity}`}},defaultVariants:{variant:"default"}}),rt=l.forwardRef(({variant:e="default",isVisible:r=!0,onClick:n,className:s,...a},d)=>o.jsx("div",{ref:d,className:E(Da({variant:e}),r?"tm-motion-fade-in opacity-100":"tm-motion-fade-out opacity-0",s),onClick:n,"aria-hidden":"true",...a}));rt.displayName="Backdrop";function Ua(e){const r=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");return Array.from(e.querySelectorAll(r)).filter(n=>!n.hasAttribute("disabled")&&n.offsetParent!==null)}function rs({containerRef:e,enabled:r,returnFocusRef:n,additionalFocusableElements:s=[]}){const a=l.useRef(null);l.useEffect(()=>{if(!r||!e.current)return;const d=e.current,i=document.activeElement;i&&d.contains(i),a.current=i;const c=[...Ua(d),...s].filter(Boolean);if(c.length===0)return;const u=c[0],N=c[c.length-1];u==null||u.focus();function f(m){var h,g;if(m.key!=="Tab")return;const p=m.shiftKey,T=c.indexOf(document.activeElement);if(p&&document.activeElement===u)m.preventDefault(),N==null||N.focus();else if(!p&&document.activeElement===N)m.preventDefault(),u==null||u.focus();else if(!p&&T>=0&&T<c.length-1){const S=T+1;(h=c[S])==null||h.focus()}else if(p&&T>0){const S=T-1;(g=c[S])==null||g.focus()}}d.addEventListener("keydown",f);const O=n==null?void 0:n.current;return()=>{d.removeEventListener("keydown",f),O?O.focus():a.current&&a.current.focus()}},[r,e,n,s])}function La(){var s;if(typeof window>"u")return 0;const e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);const r=document.createElement("div");e.appendChild(r);const n=e.offsetWidth-r.offsetWidth;return(s=e.parentNode)==null||s.removeChild(e),n}function Ba({enabled:e}){const r=l.useRef(0),n=l.useRef(""),s=l.useRef("");l.useEffect(()=>{if(typeof window>"u"||!e)return;const{body:a}=document,d=document.documentElement;n.current=a.style.overflow,s.current=a.style.paddingRight;const i=La();return r.current=i,a.style.overflow="hidden",d.style.overflow="hidden",i>0&&(a.style.paddingRight=`${i}px`),()=>{a.style.overflow=n.current,d.style.overflow="",a.style.paddingRight=s.current}},[e])}const ns=K.cva(`fixed z-50 flex flex-col transform ${t.OVERLAY_TOKENS.modal.surface.primary.bg} ${t.OVERLAY_TOKENS.modal.surface.primary.border} ${t.OVERLAY_TOKENS.modal.position.center} ${t.MOTION_TOKENS.transition.all}`,{variants:{size:{sm:`${t.OVERLAY_TOKENS.modal.maxWidth.sm} ${t.OVERLAY_TOKENS.modal.radius.sm} ${t.OVERLAY_TOKENS.modal.padding.sm} ${t.OVERLAY_TOKENS.modal.shadow.sm}`,md:`${t.OVERLAY_TOKENS.modal.maxWidth.md} ${t.OVERLAY_TOKENS.modal.radius.md} ${t.OVERLAY_TOKENS.modal.padding.md} ${t.OVERLAY_TOKENS.modal.shadow.md}`,lg:`${t.OVERLAY_TOKENS.modal.maxWidth.lg} ${t.OVERLAY_TOKENS.modal.radius.lg} ${t.OVERLAY_TOKENS.modal.padding.lg} ${t.OVERLAY_TOKENS.modal.shadow.lg}`,fullscreen:`${t.OVERLAY_TOKENS.modal.maxWidth.fullscreen} ${t.OVERLAY_TOKENS.modal.radius.fullscreen} ${t.OVERLAY_TOKENS.modal.padding.lg} ${t.OVERLAY_TOKENS.modal.shadow.lg}`}},defaultVariants:{size:"md"}}),_t=l.forwardRef(({open:e,onClose:r,size:n="md",backdropVariant:s="default",closeOnBackdropClick:a=!0,closeOnEscape:d=!0,returnFocusRef:i,children:c,className:u,...N},f)=>{const O=l.useRef(null),m=l.useRef(null);l.useEffect(()=>{f&&(typeof f=="function"?f(m.current):f.current=m.current)},[f]),l.useEffect(()=>{m.current=O.current},[]),rs({containerRef:O,enabled:e,returnFocusRef:i}),Ba({enabled:e}),l.useEffect(()=>{if(!e||!d)return;function T(h){h.key==="Escape"&&r()}return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[e,d,r]);const p=l.useCallback(T=>{a&&T.target===T.currentTarget&&r()},[a,r]);return e?o.jsx(Ne,{children:o.jsxs("div",{className:t.OVERLAY_TOKENS.modal.container.layout,onClick:p,children:[o.jsx(rt,{variant:s,isVisible:e}),o.jsx("div",{ref:O,className:E(ns({size:n}),e?"tm-motion-fade-scale":"tm-motion-fade-scale-out",u),role:"dialog","aria-modal":"true",onClick:T=>T.stopPropagation(),...N,children:c})]})}):null});_t.displayName="ModalContent";const er=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,className:E("flex flex-col",t.OVERLAY_TOKENS.modal.spacing.header.marginBottom,t.OVERLAY_TOKENS.modal.spacing.header.gap,e),...r}));er.displayName="ModalHeader";const tr=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,className:E(t.OVERLAY_TOKENS.modal.spacing.body.layout,e),...r}));tr.displayName="ModalBody";const rr=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,className:E("flex flex-col-reverse sm:flex-row sm:justify-end",t.OVERLAY_TOKENS.modal.spacing.footer.marginTop,t.OVERLAY_TOKENS.modal.spacing.footer.gap,e),...r}));rr.displayName="ModalFooter";const ss=Object.assign(_t,{Content:_t,Header:er,Body:tr,Footer:rr}),Ge=l.forwardRef(({titleId:e,descriptionId:r,children:n,...s},a)=>{const d=l.useId(),i=l.useId(),c=e||d,u=r||i;return o.jsx(ss,{ref:a,...s,"aria-labelledby":c,"aria-describedby":u,children:l.Children.map(n,N=>l.isValidElement(N)?l.cloneElement(N,{titleId:c,descriptionId:u}):N)})});Ge.displayName="DialogRoot";const nr=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,className:E("flex flex-col",t.OVERLAY_TOKENS.modal.spacing.header.marginBottom,t.OVERLAY_TOKENS.modal.spacing.header.gap,e),...r}));nr.displayName="DialogHeader";const sr=l.forwardRef(({titleId:e,className:r,children:n,...s},a)=>o.jsx(Se,{ref:a,as:"h2",level:4,weight:"semibold",id:e,className:E(r),...s,children:n}));sr.displayName="DialogTitle";const ar=l.forwardRef(({descriptionId:e,className:r,children:n,...s},a)=>o.jsx("p",{ref:a,id:e,className:E(t.TEXT_TOKENS.fontSize.sm,t.ICON_TOKENS.colors.muted,r),...s,children:n}));ar.displayName="DialogDescription";const or=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,className:E(t.OVERLAY_TOKENS.modal.spacing.body.layout,e),...r}));or.displayName="DialogBody";const ir=l.forwardRef(({className:e,...r},n)=>o.jsx(et,{ref:n,justify:"end",gap:"sm",className:E(t.OVERLAY_TOKENS.modal.spacing.footer.marginTop,e),...r}));ir.displayName="DialogFooter";const Ga=Object.assign(Ge,{Root:Ge,Header:nr,Title:sr,Description:ar,Body:or,Footer:ir});function as(e={}){const{threshold:r=50,velocityThreshold:n=.1,directions:s=["left","right","up","down"],onSwipe:a,enabled:d=!0}=e,[i,c]=ie.useState(!1),[u,N]=ie.useState(0),[f,O]=ie.useState(null),m=ie.useRef(null),p=ie.useRef(null);return ie.useEffect(()=>{if(typeof window>"u"||!d)return;const T=p.current;if(!T)return;const h=b=>{b.pointerType==="mouse"&&b.button!==0||(m.current={x:b.clientX,y:b.clientY,time:Date.now()},c(!0),N(0),O(null),T.setPointerCapture(b.pointerId))},g=b=>{if(!m.current)return;const I=b.clientX-m.current.x,v=b.clientY-m.current.y,_=Math.abs(I),$=Math.abs(v);let y=null,V=0;_>$?(V=_,I>0&&s.includes("right")?y="right":I<0&&s.includes("left")&&(y="left")):(V=$,v>0&&s.includes("down")?y="down":v<0&&s.includes("up")&&(y="up")),N(V),O(y)},S=b=>{if(!m.current)return;const I=b.clientX-m.current.x,v=b.clientY-m.current.y,_=Math.abs(I),$=Math.abs(v),y=Date.now()-m.current.time,V=Math.max(_,$)/y;let A=null,M=0;_>$?(M=_,I>0&&s.includes("right")?A="right":I<0&&s.includes("left")&&(A="left")):(M=$,v>0&&s.includes("down")?A="down":v<0&&s.includes("up")&&(A="up")),A&&M>=r&&V>=n&&(a==null||a({direction:A,distance:M,velocity:V})),m.current=null,c(!1),N(0),O(null),T.releasePointerCapture(b.pointerId)},x=b=>{m.current=null,c(!1),N(0),O(null),T.releasePointerCapture(b.pointerId)};return T.addEventListener("pointerdown",h),T.addEventListener("pointermove",g),T.addEventListener("pointerup",S),T.addEventListener("pointercancel",x),()=>{T.removeEventListener("pointerdown",h),T.removeEventListener("pointermove",g),T.removeEventListener("pointerup",S),T.removeEventListener("pointercancel",x)}},[r,n,s,a,d]),{isSwiping:i,distance:u,direction:f,handlers:{ref:T=>{p.current=T}}}}const Ha=K.cva(`group pointer-events-auto relative flex items-center justify-between overflow-hidden border ${t.TOAST_TOKENS.width.full} ${t.TOAST_TOKENS.spacing.gap} ${t.MOTION_TOKENS.transition.all}`,{variants:{variant:{default:`${t.TOAST_TOKENS.surface.default} ${t.TOAST_TOKENS.radius.default} ${t.TOAST_TOKENS.shadow.default} ${t.TOAST_TOKENS.spacing.padding}`,success:`${t.TOAST_TOKENS.surface.success} ${t.TOAST_TOKENS.radius.default} ${t.TOAST_TOKENS.shadow.default} ${t.TOAST_TOKENS.spacing.padding}`,info:`${t.TOAST_TOKENS.surface.info} ${t.TOAST_TOKENS.radius.default} ${t.TOAST_TOKENS.shadow.default} ${t.TOAST_TOKENS.spacing.padding}`,warning:`${t.TOAST_TOKENS.surface.warning} ${t.TOAST_TOKENS.radius.default} ${t.TOAST_TOKENS.shadow.default} ${t.TOAST_TOKENS.spacing.padding}`,danger:`${t.TOAST_TOKENS.surface.danger} ${t.TOAST_TOKENS.radius.default} ${t.TOAST_TOKENS.shadow.default} ${t.TOAST_TOKENS.spacing.padding}`}},defaultVariants:{variant:"default"}}),lr=l.forwardRef(({toast:e,onDismiss:r,isVisible:n=!0,variant:s,className:a,...d},i)=>{const c=s||e.variant||"default",u=c==="danger"?"assertive":"polite",{handlers:N}=as({directions:["left","right"],threshold:50,onSwipe:()=>{r(e.id)},enabled:n}),f=l.useCallback(O=>{typeof i=="function"?i(O):i&&(i.current=O),N.ref&&N.ref(O)},[i,N]);return o.jsxs("div",{...N,ref:f,className:E(Ha({variant:c}),n?"tm-motion-fade-slide-right":"tm-motion-fade-slide-left-out",a),role:"alert","aria-live":u,...d,children:[o.jsx("div",{className:E(t.TOAST_TOKENS.content.layout,t.TOAST_TOKENS.content.gap),children:o.jsxs("div",{className:E("flex-1",t.TOAST_TOKENS.content.verticalSpacing),children:[e.title&&o.jsx("div",{className:E(t.TOAST_TOKENS.title.fontSize,t.TOAST_TOKENS.title.fontWeight),children:e.title}),e.description&&o.jsx("div",{className:E(t.TOAST_TOKENS.description.fontSize,t.TOAST_TOKENS.description.opacity),children:e.description}),e.action&&o.jsx("div",{className:"mt-sm",children:o.jsx(ne,{variant:"outline",size:"sm",onClick:e.action.onClick,className:E(t.TOAST_TOKENS.action.height,t.TOAST_TOKENS.action.padding,t.TOAST_TOKENS.action.fontSize),children:e.action.label})})]})}),o.jsx(ne,{variant:"ghost",size:"icon",className:E(t.TOAST_TOKENS.dismiss.position,t.TOAST_TOKENS.dismiss.size,t.TOAST_TOKENS.dismiss.radius,t.TOAST_TOKENS.dismiss.padding,t.TOAST_TOKENS.dismiss.colors.default,t.TOAST_TOKENS.dismiss.states.default,t.MOTION_TOKENS.transition.opacity,t.TOAST_TOKENS.dismiss.colors.hover,t.TOAST_TOKENS.dismiss.states.groupHover,t.TOAST_TOKENS.dismiss.states.focus,t.TOAST_TOKENS.dismiss.states.focusRing),onClick:()=>r(e.id),"aria-label":"Dismiss toast",children:o.jsx(D.X,{className:"h-4 w-4"})})]})});lr.displayName="Toast";const Xa={"top-left":"fixed top-md left-md z-[100] flex flex-col gap-sm","top-center":"fixed top-md inset-x-0 z-[100] flex flex-col items-center gap-sm","top-right":"fixed top-md right-md z-[100] flex flex-col gap-sm","bottom-left":"fixed bottom-md left-md z-[100] flex flex-col-reverse gap-sm","bottom-center":"fixed bottom-md inset-x-0 z-[100] flex flex-col-reverse items-center gap-sm","bottom-right":"fixed bottom-md right-md z-[100] flex flex-col-reverse gap-sm"},dr=l.forwardRef(({position:e="top-right",children:r,className:n},s)=>o.jsx(Ne,{children:o.jsx("div",{ref:s,className:E(Xa[e],"max-h-screen w-full max-w-md overflow-hidden p-0",n),style:{pointerEvents:"none"},"aria-live":"polite","aria-label":"Notifications",children:o.jsx("div",{className:"pointer-events-auto flex flex-col gap-sm",style:{pointerEvents:"auto"},children:r})})}));dr.displayName="ToastViewport";const os=l.createContext(void 0);function Fa({children:e,position:r="top-right",maxVisible:n=3,groupBy:s}){const[a,d]=l.useState([]),[i,c]=l.useState([]),u=l.useCallback(g=>{d(S=>{const x=S.filter(b=>b.id!==g);return x.length<n&&c(b=>{if(b.length>0){const I=b[0];if(I)return setTimeout(()=>{d(v=>v.find(_=>_.id===I.id)?v:[...v,I])},0),b.slice(1)}return b}),x}),c(S=>S.filter(x=>x.id!==g))},[n]),N=l.useCallback(g=>{const S=Math.random().toString(36).substr(2,9),x={id:S,...g,duration:g.duration??5e3};return d(b=>{const I=[...b,x],v=I.length;if(v>n){const _=I.slice(-n),$=I.slice(0,v-n);return c(y=>[...y,...$]),_}return I}),x.duration&&x.duration>0&&setTimeout(()=>{u(S)},x.duration),S},[n,u]),f=l.useCallback(()=>{d([]),c([])},[]),O=l.useCallback((g,S)=>{d(x=>x.map(b=>b.id===g?{...b,...S}:b)),c(x=>x.map(b=>b.id===g?{...b,...S}:b))},[]),m=l.useCallback(()=>i,[i]),p=l.useCallback(()=>s?a.reduce((g,S)=>{const x=s(S);return g[x]||(g[x]=[]),g[x].push(S),g},{}):{default:a},[a,s]),T=l.useMemo(()=>({toast:N,dismiss:u,dismissAll:f,updateToast:O,getQueue:m,getGrouped:p}),[N,u,f,O,m,p]),h=a.slice(-n);return o.jsxs(os.Provider,{value:T,children:[e,o.jsx(dr,{position:r,children:h.map(g=>o.jsx(lr,{toast:g,onDismiss:u},g.id))})]})}function Wa(){const e=l.useContext(os);if(e===void 0)throw new Error("useToast must be used within a ToastProvider");return e}const is=l.createContext(void 0);function ls({children:e,maxHistory:r=100,persistent:n=!0}){const[s,a]=l.useState([]),[d,i]=l.useState([]),c=l.useCallback(b=>{a(I=>I.filter(v=>v.id!==b))},[]),u=l.useCallback(b=>{const I=Math.random().toString(36).substr(2,9),v=Date.now(),_=A=>A==="danger"?"error":A==="success"?"success":A==="warning"?"warning":A==="system"?"system":A==="log"?"log":"info",$=A=>A==="error"?"danger":A==="success"?"success":"default",y=b.channel||_(b.variant),V={id:I,...b,channel:y,variant:b.variant||$(y),timestamp:v,read:!1,persistent:b.persistent??!1,duration:b.duration??(b.persistent?0:5e3)};return a(A=>[...A,V]),n&&i(A=>[V,...A].slice(0,r)),V.duration&&V.duration>0&&setTimeout(()=>{a(A=>A.filter(M=>M.id!==I))},V.duration),I},[r,n]),N=l.useCallback(()=>{a([])},[]),f=l.useCallback(b=>{a(I=>I.filter(v=>v.channel!==b))},[]),O=l.useCallback(b=>s.reduce((I,v)=>{const _=b(v);return I[_]||(I[_]=[]),I[_].push(v),I},{}),[s]),m=l.useCallback(()=>d,[d]),p=l.useCallback(b=>s.filter(I=>I.channel===b),[s]),T=l.useCallback(()=>s,[s]),h=l.useCallback(b=>{a(I=>I.map(v=>v.id===b?{...v,read:!0}:v)),i(I=>I.map(v=>v.id===b?{...v,read:!0}:v))},[]),g=l.useCallback(()=>{a(b=>b.map(I=>({...I,read:!0}))),i(b=>b.map(I=>({...I,read:!0})))},[]),S=l.useCallback(()=>s.filter(b=>!b.read).length,[s]),x=l.useMemo(()=>({push:u,remove:c,clearAll:N,clearChannel:f,groupBy:O,getHistory:m,getByChannel:p,getAll:T,markAsRead:h,markAllAsRead:g,getUnreadCount:S}),[u,c,N,f,O,m,p,T,h,g,S]);return o.jsx(is.Provider,{value:x,children:e})}function Ve(){const e=l.useContext(is);if(e===void 0)throw new Error("useNotificationCenterContext must be used within a NotificationCenterProvider");return e}const nt=l.forwardRef(({confirm:e=!1,confirmMessage:r="Clear all notifications?",className:n,...s},a)=>{const{clearAll:d,getAll:i}=Ve(),c=i(),u=()=>{c.length!==0&&(e&&typeof window<"u"?window.confirm(r)&&d():d())};return c.length===0?null:o.jsx(ne,{ref:a,variant:"ghost",size:"sm",onClick:u,"aria-label":"Clear all notifications",className:n,...s,children:"Clear all"})});nt.displayName="NotificationCenter.DismissAll";const st=l.forwardRef(({label:e,collapsed:r=!1,onToggleCollapse:n,collapsible:s=!1,className:a,...d},i)=>o.jsxs("div",{ref:i,className:E("flex items-center justify-between",t.NOTIFICATION_TOKENS.spacing.paddingVertical,a),...d,children:[o.jsx("h3",{className:"text-sm font-semibold text-foreground",children:e}),s&&n&&o.jsx(ne,{variant:"ghost",size:"icon",onClick:n,"aria-label":r?"Expand group":"Collapse group","aria-expanded":!r,className:"h-6 w-6",children:r?o.jsx(D.ChevronDown,{className:"h-4 w-4"}):o.jsx(D.ChevronUp,{className:"h-4 w-4"})})]}));st.displayName="NotificationCenter.GroupHeader";function Ya(e="default"){switch(e){case"success":return D.CheckCircle2;case"info":return D.Info;case"warning":return D.AlertCircle;case"danger":return D.XCircle;case"system":return D.Bell;case"log":return D.FileText;default:return D.Info}}function qa(e){const n=Date.now()-e,s=Math.floor(n/1e3),a=Math.floor(s/60),d=Math.floor(a/60),i=Math.floor(d/24);return s<60?"just now":a<60?`${a}m ago`:d<24?`${d}h ago`:i<7?`${i}d ago`:new Date(e).toLocaleDateString()}const at=l.forwardRef(({notification:e,onDismiss:r,onClick:n,expandable:s=!1,className:a,...d},i)=>{const c=e.variant||"default",u=Ya(c),N=e.read??!1,f=()=>{n&&n(e.id)},O=h=>{h.stopPropagation(),r&&r(e.id)},m=`notification-${e.id}`,p=`${m}-title`,T=`${m}-description`;return o.jsxs("li",{ref:i,role:"listitem","aria-labelledby":e.title?p:void 0,"aria-describedby":e.description?T:void 0,className:E("group relative flex items-start gap-sm rounded-md border transition-colors",t.NOTIFICATION_TOKENS.item.padding,t.NOTIFICATION_TOKENS.item.radius,t.NOTIFICATION_TOKENS.shadow.item,t.NOTIFICATION_TOKENS.surface[c],!N&&"ring-1 ring-primary/20",n&&"cursor-pointer hover:bg-accent/50",a),onClick:f,...d,children:[o.jsx("div",{className:"flex-shrink-0",children:o.jsx(u,{className:E(t.NOTIFICATION_TOKENS.item.iconSize,"text-foreground/70")})}),o.jsxs("div",{className:"min-w-0 flex-1 space-y-xs",children:[e.title&&o.jsx("div",{id:p,className:"text-sm font-semibold text-foreground",children:e.title}),e.description&&o.jsx("div",{id:T,className:"text-sm text-foreground/80",children:e.description}),o.jsx("div",{className:"text-xs text-muted-foreground",children:qa(e.timestamp)}),e.action&&o.jsx("div",{className:"mt-sm",children:o.jsx(ne,{variant:"outline",size:"sm",onClick:h=>{var g;h.stopPropagation(),(g=e.action)==null||g.onClick()},className:"h-7 px-xs text-xs",children:e.action.label})})]}),r&&o.jsx(ne,{variant:"ghost",size:"icon",onClick:O,"aria-label":"Dismiss notification",className:"absolute right-xs top-xs h-6 w-6 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100",children:o.jsx(D.X,{className:"h-4 w-4"})})]})});at.displayName="NotificationCenter.Item";const ot=l.forwardRef(({children:e,className:r,"aria-label":n,...s},a)=>o.jsx(ae,{ref:a,as:"ul",role:"list","aria-label":n||"Notifications",className:E("list-none",t.NOTIFICATION_TOKENS.spacing.gap,r),...s,children:e}));ot.displayName="NotificationCenter.List";function Qa(e){const n=Date.now()-e.timestamp,s=Math.floor(n/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s<7?"This Week":s<30?"This Month":"Older"}const cr=l.forwardRef(({isOpen:e,onClose:r,groupBy:n=Qa,width:s="md",autoCollapse:a=!0,returnFocusRef:d},i)=>{const c=l.useRef(null),{getAll:u,markAsRead:N}=Ve(),[f,O]=l.useState(new Set),{handlers:m}=as({directions:["right"],threshold:100,onSwipe:()=>{r()},enabled:e}),p=u(),T=l.useMemo(()=>n?p.reduce((g,S)=>{const x=n(S);return g[x]||(g[x]=[]),g[x].push(S),g},{}):{default:p},[p,n]);if(l.useEffect(()=>{if(a&&e){const S=Object.keys(T).filter(x=>x!=="Today"&&x!=="Yesterday");O(new Set(S))}},[a,e,T]),rs({containerRef:c,enabled:e,returnFocusRef:d}),l.useEffect(()=>{if(!e)return;function g(S){S.key==="Escape"&&r()}return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[e,r]),l.useEffect(()=>{e&&p.forEach(g=>{g.read||N(g.id)})},[e,p,N]),l.useEffect(()=>{if(e&&typeof window<"u")return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),!e)return null;const h=g=>{O(S=>{const x=new Set(S);return x.has(g)?x.delete(g):x.add(g),x})};return o.jsxs(Ne,{children:[o.jsx(rt,{variant:"default",onClick:r,isVisible:e,className:"z-40"}),o.jsx("div",{...m,ref:g=>{c.current=g,m.ref(g),typeof i=="function"?i(g):i&&typeof i=="object"&&(i.current=g)},className:E("fixed right-0 top-0 z-50 h-full",t.NOTIFICATION_TOKENS.panel.width[s],t.NOTIFICATION_TOKENS.panel.maxHeight,t.NOTIFICATION_TOKENS.panel.shadow.default,e?"tm-motion-fade-slide-right":"tm-motion-fade-slide-right-out"),role:"dialog","aria-modal":"true","aria-label":"Notifications",children:o.jsxs(tt,{ref:i,variant:"raised",className:E("flex h-full flex-col",t.NOTIFICATION_TOKENS.panel.radius.default),children:[o.jsxs("div",{className:E("flex items-center justify-between border-b",t.NOTIFICATION_TOKENS.panel.spacing.headerPadding),children:[o.jsx("h2",{className:"text-lg font-semibold",children:"Notifications"}),o.jsxs("div",{className:"flex items-center gap-xs",children:[o.jsx(nt,{}),o.jsx(ne,{variant:"ghost",size:"icon",onClick:r,"aria-label":"Close notifications",className:"h-8 w-8",children:o.jsx(D.X,{className:"h-4 w-4"})})]})]}),o.jsx("div",{className:E("flex-1 overflow-y-auto",t.NOTIFICATION_TOKENS.panel.spacing.padding),children:Object.keys(T).length===0?o.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"No notifications"}):o.jsx(ae,{gap:"md",children:Object.entries(T).map(([g,S])=>{const x=f.has(g);return o.jsxs("div",{children:[o.jsx(st,{label:g,collapsed:x,onToggleCollapse:()=>h(g),collapsible:a}),!x&&o.jsx(ot,{"aria-label":`${g} notifications`,children:S.map(b=>o.jsx(at,{notification:b},b.id))})]},g)})})})]})})]})});cr.displayName="NotificationCenter.Panel";const ur=l.forwardRef(({onClick:e,showBadge:r=!0,className:n,...s},a)=>{const{getUnreadCount:d}=Ve(),i=d();return o.jsxs(ne,{ref:a,variant:"ghost",size:"icon",onClick:e,"aria-label":`Open notifications${i>0?` (${i} unread)`:""}`,className:E("relative",n),...s,children:[o.jsx(D.Bell,{className:"h-5 w-5"}),r&&i>0&&o.jsx("span",{className:E("absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-destructive text-xs font-semibold text-destructive-foreground"),"aria-hidden":"true",children:i>99?"99+":i})]})});ur.displayName="NotificationCenter.Trigger";function Za(){const e=Ve(),r=l.useCallback((c,u)=>e.push({...u,description:c,variant:"success",channel:"success"}),[e]),n=l.useCallback((c,u)=>e.push({...u,description:c,variant:"danger",channel:"error"}),[e]),s=l.useCallback((c,u)=>e.push({...u,description:c,variant:"info",channel:"info"}),[e]),a=l.useCallback((c,u)=>e.push({...u,description:c,variant:"warning",channel:"warning"}),[e]),d=l.useCallback((c,u)=>e.push({...u,description:c,variant:"system",channel:"system"}),[e]),i=l.useCallback((c,u)=>e.push({...u,description:c,variant:"log",channel:"log"}),[e]);return l.useMemo(()=>({success:r,error:n,info:s,warning:a,system:d,log:i,push:e.push,remove:e.remove,clearAll:e.clearAll,clearChannel:e.clearChannel}),[r,n,s,a,d,i,e])}const Ja={Provider:ls,Panel:cr,Trigger:ur,List:ot,Item:at,GroupHeader:st,DismissAll:nt},ds=l.forwardRef(({className:e,size:r="md",...n},s)=>o.jsx("div",{ref:s,className:E("absolute z-[-1] rotate-45 border border-border bg-popover",t.POPOVER_TOKENS.arrow.size[r],e),style:{transform:`${t.POPOVER_TOKENS.arrow.offset[r]} rotate(45deg)`},...n}));ds.displayName="PopoverArrow";const He=Math.min,Oe=Math.max,Xe=Math.round,Ue=Math.floor,re=e=>({x:e,y:e}),eo={left:"right",right:"left",bottom:"top",top:"bottom"},to={start:"end",end:"start"};function Yr(e,r,n){return Oe(e,He(r,n))}function it(e,r){return typeof e=="function"?e(r):e}function pe(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function cs(e){return e==="x"?"y":"x"}function us(e){return e==="y"?"height":"width"}const ro=new Set(["top","bottom"]);function le(e){return ro.has(pe(e))?"y":"x"}function fs(e){return cs(le(e))}function no(e,r,n){n===void 0&&(n=!1);const s=lt(e),a=fs(e),d=us(a);let i=a==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return r.reference[d]>r.floating[d]&&(i=Fe(i)),[i,Fe(i)]}function so(e){const r=Fe(e);return[Kt(e),r,Kt(r)]}function Kt(e){return e.replace(/start|end/g,r=>to[r])}const qr=["left","right"],Qr=["right","left"],ao=["top","bottom"],oo=["bottom","top"];function io(e,r,n){switch(e){case"top":case"bottom":return n?r?Qr:qr:r?qr:Qr;case"left":case"right":return r?ao:oo;default:return[]}}function lo(e,r,n,s){const a=lt(e);let d=io(pe(e),n==="start",s);return a&&(d=d.map(i=>i+"-"+a),r&&(d=d.concat(d.map(Kt)))),d}function Fe(e){return e.replace(/left|right|bottom|top/g,r=>eo[r])}function co(e){return{top:0,right:0,bottom:0,left:0,...e}}function uo(e){return typeof e!="number"?co(e):{top:e,right:e,bottom:e,left:e}}function We(e){const{x:r,y:n,width:s,height:a}=e;return{width:s,height:a,top:n,left:r,right:r+s,bottom:n+a,x:r,y:n}}function Zr(e,r,n){let{reference:s,floating:a}=e;const d=le(r),i=fs(r),c=us(i),u=pe(r),N=d==="y",f=s.x+s.width/2-a.width/2,O=s.y+s.height/2-a.height/2,m=s[c]/2-a[c]/2;let p;switch(u){case"top":p={x:f,y:s.y-a.height};break;case"bottom":p={x:f,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:O};break;case"left":p={x:s.x-a.width,y:O};break;default:p={x:s.x,y:s.y}}switch(lt(r)){case"start":p[i]-=m*(n&&N?-1:1);break;case"end":p[i]+=m*(n&&N?-1:1);break}return p}const fo=async(e,r,n)=>{const{placement:s="bottom",strategy:a="absolute",middleware:d=[],platform:i}=n,c=d.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(r));let N=await i.getElementRects({reference:e,floating:r,strategy:a}),{x:f,y:O}=Zr(N,s,u),m=s,p={},T=0;for(let h=0;h<c.length;h++){const{name:g,fn:S}=c[h],{x,y:b,data:I,reset:v}=await S({x:f,y:O,initialPlacement:s,placement:m,strategy:a,middlewareData:p,rects:N,platform:i,elements:{reference:e,floating:r}});f=x??f,O=b??O,p={...p,[g]:{...p[g],...I}},v&&T<=50&&(T++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(N=v.rects===!0?await i.getElementRects({reference:e,floating:r,strategy:a}):v.rects),{x:f,y:O}=Zr(N,m,u)),h=-1)}return{x:f,y:O,placement:m,strategy:a,middlewareData:p}};async function Ns(e,r){var n;r===void 0&&(r={});const{x:s,y:a,platform:d,rects:i,elements:c,strategy:u}=e,{boundary:N="clippingAncestors",rootBoundary:f="viewport",elementContext:O="floating",altBoundary:m=!1,padding:p=0}=it(r,e),T=uo(p),g=c[m?O==="floating"?"reference":"floating":O],S=We(await d.getClippingRect({element:(n=await(d.isElement==null?void 0:d.isElement(g)))==null||n?g:g.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(c.floating)),boundary:N,rootBoundary:f,strategy:u})),x=O==="floating"?{x:s,y:a,width:i.floating.width,height:i.floating.height}:i.reference,b=await(d.getOffsetParent==null?void 0:d.getOffsetParent(c.floating)),I=await(d.isElement==null?void 0:d.isElement(b))?await(d.getScale==null?void 0:d.getScale(b))||{x:1,y:1}:{x:1,y:1},v=We(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:u}):x);return{top:(S.top-v.top+T.top)/I.y,bottom:(v.bottom-S.bottom+T.bottom)/I.y,left:(S.left-v.left+T.left)/I.x,right:(v.right-S.right+T.right)/I.x}}const No=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var n,s;const{placement:a,middlewareData:d,rects:i,initialPlacement:c,platform:u,elements:N}=r,{mainAxis:f=!0,crossAxis:O=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:h=!0,...g}=it(e,r);if((n=d.arrow)!=null&&n.alignmentOffset)return{};const S=pe(a),x=le(c),b=pe(c)===c,I=await(u.isRTL==null?void 0:u.isRTL(N.floating)),v=m||(b||!h?[Fe(c)]:so(c)),_=T!=="none";!m&&_&&v.push(...lo(c,h,T,I));const $=[c,...v],y=await Ns(r,g),V=[];let A=((s=d.flip)==null?void 0:s.overflows)||[];if(f&&V.push(y[S]),O){const z=no(a,i,I);V.push(y[z[0]],y[z[1]])}if(A=[...A,{placement:a,overflows:V}],!V.every(z=>z<=0)){var M,Y;const z=(((M=d.flip)==null?void 0:M.index)||0)+1,X=$[z];if(X&&(!(O==="alignment"?x!==le(X):!1)||A.every(C=>le(C.placement)===x?C.overflows[0]>0:!0)))return{data:{index:z,overflows:A},reset:{placement:X}};let U=(Y=A.filter(w=>w.overflows[0]<=0).sort((w,C)=>w.overflows[1]-C.overflows[1])[0])==null?void 0:Y.placement;if(!U)switch(p){case"bestFit":{var G;const w=(G=A.filter(C=>{if(_){const j=le(C.placement);return j===x||j==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(j=>j>0).reduce((j,k)=>j+k,0)]).sort((C,j)=>C[1]-j[1])[0])==null?void 0:G[0];w&&(U=w);break}case"initialPlacement":U=c;break}if(a!==U)return{reset:{placement:U}}}return{}}}},mo=new Set(["left","top"]);async function To(e,r){const{placement:n,platform:s,elements:a}=e,d=await(s.isRTL==null?void 0:s.isRTL(a.floating)),i=pe(n),c=lt(n),u=le(n)==="y",N=mo.has(i)?-1:1,f=d&&u?-1:1,O=it(r,e);let{mainAxis:m,crossAxis:p,alignmentAxis:T}=typeof O=="number"?{mainAxis:O,crossAxis:0,alignmentAxis:null}:{mainAxis:O.mainAxis||0,crossAxis:O.crossAxis||0,alignmentAxis:O.alignmentAxis};return c&&typeof T=="number"&&(p=c==="end"?T*-1:T),u?{x:p*f,y:m*N}:{x:m*N,y:p*f}}const Oo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var n,s;const{x:a,y:d,placement:i,middlewareData:c}=r,u=await To(r,e);return i===((n=c.offset)==null?void 0:n.placement)&&(s=c.arrow)!=null&&s.alignmentOffset?{}:{x:a+u.x,y:d+u.y,data:{...u,placement:i}}}}},po=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:n,y:s,placement:a}=r,{mainAxis:d=!0,crossAxis:i=!1,limiter:c={fn:g=>{let{x:S,y:x}=g;return{x:S,y:x}}},...u}=it(e,r),N={x:n,y:s},f=await Ns(r,u),O=le(pe(a)),m=cs(O);let p=N[m],T=N[O];if(d){const g=m==="y"?"top":"left",S=m==="y"?"bottom":"right",x=p+f[g],b=p-f[S];p=Yr(x,p,b)}if(i){const g=O==="y"?"top":"left",S=O==="y"?"bottom":"right",x=T+f[g],b=T-f[S];T=Yr(x,T,b)}const h=c.fn({...r,[m]:p,[O]:T});return{...h,data:{x:h.x-n,y:h.y-s,enabled:{[m]:d,[O]:i}}}}}};function dt(){return typeof window<"u"}function ve(e){return ms(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function oe(e){var r;return(r=(ms(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function ms(e){return dt()?e instanceof Node||e instanceof Q(e).Node:!1}function ee(e){return dt()?e instanceof Element||e instanceof Q(e).Element:!1}function se(e){return dt()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function Jr(e){return!dt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}const go=new Set(["inline","contents"]);function je(e){const{overflow:r,overflowX:n,overflowY:s,display:a}=te(e);return/auto|scroll|overlay|hidden|clip/.test(r+s+n)&&!go.has(a)}const So=new Set(["table","td","th"]);function ho(e){return So.has(ve(e))}const Eo=[":popover-open",":modal"];function ct(e){return Eo.some(r=>{try{return e.matches(r)}catch{return!1}})}const xo=["transform","translate","scale","rotate","perspective"],bo=["transform","translate","scale","rotate","perspective","filter"],Io=["paint","layout","strict","content"];function fr(e){const r=Nr(),n=ee(e)?te(e):e;return xo.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!r&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!r&&(n.filter?n.filter!=="none":!1)||bo.some(s=>(n.willChange||"").includes(s))||Io.some(s=>(n.contain||"").includes(s))}function vo(e){let r=ue(e);for(;se(r)&&!Ie(r);){if(fr(r))return r;if(ct(r))return null;r=ue(r)}return null}function Nr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _o=new Set(["html","body","#document"]);function Ie(e){return _o.has(ve(e))}function te(e){return Q(e).getComputedStyle(e)}function ut(e){return ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ue(e){if(ve(e)==="html")return e;const r=e.assignedSlot||e.parentNode||Jr(e)&&e.host||oe(e);return Jr(r)?r.host:r}function Ts(e){const r=ue(e);return Ie(r)?e.ownerDocument?e.ownerDocument.body:e.body:se(r)&&je(r)?r:Ts(r)}function Ce(e,r,n){var s;r===void 0&&(r=[]),n===void 0&&(n=!0);const a=Ts(e),d=a===((s=e.ownerDocument)==null?void 0:s.body),i=Q(a);if(d){const c=wt(i);return r.concat(i,i.visualViewport||[],je(a)?a:[],c&&n?Ce(c):[])}return r.concat(a,Ce(a,[],n))}function wt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Os(e){const r=te(e);let n=parseFloat(r.width)||0,s=parseFloat(r.height)||0;const a=se(e),d=a?e.offsetWidth:n,i=a?e.offsetHeight:s,c=Xe(n)!==d||Xe(s)!==i;return c&&(n=d,s=i),{width:n,height:s,$:c}}function mr(e){return ee(e)?e:e.contextElement}function be(e){const r=mr(e);if(!se(r))return re(1);const n=r.getBoundingClientRect(),{width:s,height:a,$:d}=Os(r);let i=(d?Xe(n.width):n.width)/s,c=(d?Xe(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Ko=re(0);function ps(e){const r=Q(e);return!Nr()||!r.visualViewport?Ko:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function wo(e,r,n){return r===void 0&&(r=!1),!n||r&&n!==Q(e)?!1:r}function ge(e,r,n,s){r===void 0&&(r=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),d=mr(e);let i=re(1);r&&(s?ee(s)&&(i=be(s)):i=be(e));const c=wo(d,n,s)?ps(d):re(0);let u=(a.left+c.x)/i.x,N=(a.top+c.y)/i.y,f=a.width/i.x,O=a.height/i.y;if(d){const m=Q(d),p=s&&ee(s)?Q(s):s;let T=m,h=wt(T);for(;h&&s&&p!==T;){const g=be(h),S=h.getBoundingClientRect(),x=te(h),b=S.left+(h.clientLeft+parseFloat(x.paddingLeft))*g.x,I=S.top+(h.clientTop+parseFloat(x.paddingTop))*g.y;u*=g.x,N*=g.y,f*=g.x,O*=g.y,u+=b,N+=I,T=Q(h),h=wt(T)}}return We({width:f,height:O,x:u,y:N})}function ft(e,r){const n=ut(e).scrollLeft;return r?r.left+n:ge(oe(e)).left+n}function gs(e,r){const n=e.getBoundingClientRect(),s=n.left+r.scrollLeft-ft(e,n),a=n.top+r.scrollTop;return{x:s,y:a}}function yo(e){let{elements:r,rect:n,offsetParent:s,strategy:a}=e;const d=a==="fixed",i=oe(s),c=r?ct(r.floating):!1;if(s===i||c&&d)return n;let u={scrollLeft:0,scrollTop:0},N=re(1);const f=re(0),O=se(s);if((O||!O&&!d)&&((ve(s)!=="body"||je(i))&&(u=ut(s)),se(s))){const p=ge(s);N=be(s),f.x=p.x+s.clientLeft,f.y=p.y+s.clientTop}const m=i&&!O&&!d?gs(i,u):re(0);return{width:n.width*N.x,height:n.height*N.y,x:n.x*N.x-u.scrollLeft*N.x+f.x+m.x,y:n.y*N.y-u.scrollTop*N.y+f.y+m.y}}function Ao(e){return Array.from(e.getClientRects())}function Co(e){const r=oe(e),n=ut(e),s=e.ownerDocument.body,a=Oe(r.scrollWidth,r.clientWidth,s.scrollWidth,s.clientWidth),d=Oe(r.scrollHeight,r.clientHeight,s.scrollHeight,s.clientHeight);let i=-n.scrollLeft+ft(e);const c=-n.scrollTop;return te(s).direction==="rtl"&&(i+=Oe(r.clientWidth,s.clientWidth)-a),{width:a,height:d,x:i,y:c}}const en=25;function $o(e,r){const n=Q(e),s=oe(e),a=n.visualViewport;let d=s.clientWidth,i=s.clientHeight,c=0,u=0;if(a){d=a.width,i=a.height;const f=Nr();(!f||f&&r==="fixed")&&(c=a.offsetLeft,u=a.offsetTop)}const N=ft(s);if(N<=0){const f=s.ownerDocument,O=f.body,m=getComputedStyle(O),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,T=Math.abs(s.clientWidth-O.clientWidth-p);T<=en&&(d-=T)}else N<=en&&(d+=N);return{width:d,height:i,x:c,y:u}}const Ro=new Set(["absolute","fixed"]);function Vo(e,r){const n=ge(e,!0,r==="fixed"),s=n.top+e.clientTop,a=n.left+e.clientLeft,d=se(e)?be(e):re(1),i=e.clientWidth*d.x,c=e.clientHeight*d.y,u=a*d.x,N=s*d.y;return{width:i,height:c,x:u,y:N}}function tn(e,r,n){let s;if(r==="viewport")s=$o(e,n);else if(r==="document")s=Co(oe(e));else if(ee(r))s=Vo(r,n);else{const a=ps(e);s={x:r.x-a.x,y:r.y-a.y,width:r.width,height:r.height}}return We(s)}function Ss(e,r){const n=ue(e);return n===r||!ee(n)||Ie(n)?!1:te(n).position==="fixed"||Ss(n,r)}function jo(e,r){const n=r.get(e);if(n)return n;let s=Ce(e,[],!1).filter(c=>ee(c)&&ve(c)!=="body"),a=null;const d=te(e).position==="fixed";let i=d?ue(e):e;for(;ee(i)&&!Ie(i);){const c=te(i),u=fr(i);!u&&c.position==="fixed"&&(a=null),(d?!u&&!a:!u&&c.position==="static"&&!!a&&Ro.has(a.position)||je(i)&&!u&&Ss(e,i))?s=s.filter(f=>f!==i):a=c,i=ue(i)}return r.set(e,s),s}function zo(e){let{element:r,boundary:n,rootBoundary:s,strategy:a}=e;const i=[...n==="clippingAncestors"?ct(r)?[]:jo(r,this._c):[].concat(n),s],c=i[0],u=i.reduce((N,f)=>{const O=tn(r,f,a);return N.top=Oe(O.top,N.top),N.right=He(O.right,N.right),N.bottom=He(O.bottom,N.bottom),N.left=Oe(O.left,N.left),N},tn(r,c,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Mo(e){const{width:r,height:n}=Os(e);return{width:r,height:n}}function ko(e,r,n){const s=se(r),a=oe(r),d=n==="fixed",i=ge(e,!0,d,r);let c={scrollLeft:0,scrollTop:0};const u=re(0);function N(){u.x=ft(a)}if(s||!s&&!d)if((ve(r)!=="body"||je(a))&&(c=ut(r)),s){const p=ge(r,!0,d,r);u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}else a&&N();d&&!s&&a&&N();const f=a&&!s&&!d?gs(a,c):re(0),O=i.left+c.scrollLeft-u.x-f.x,m=i.top+c.scrollTop-u.y-f.y;return{x:O,y:m,width:i.width,height:i.height}}function St(e){return te(e).position==="static"}function rn(e,r){if(!se(e)||te(e).position==="fixed")return null;if(r)return r(e);let n=e.offsetParent;return oe(e)===n&&(n=n.ownerDocument.body),n}function hs(e,r){const n=Q(e);if(ct(e))return n;if(!se(e)){let a=ue(e);for(;a&&!Ie(a);){if(ee(a)&&!St(a))return a;a=ue(a)}return n}let s=rn(e,r);for(;s&&ho(s)&&St(s);)s=rn(s,r);return s&&Ie(s)&&St(s)&&!fr(s)?n:s||vo(e)||n}const Po=async function(e){const r=this.getOffsetParent||hs,n=this.getDimensions,s=await n(e.floating);return{reference:ko(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Do(e){return te(e).direction==="rtl"}const Uo={convertOffsetParentRelativeRectToViewportRelativeRect:yo,getDocumentElement:oe,getClippingRect:zo,getOffsetParent:hs,getElementRects:Po,getClientRects:Ao,getDimensions:Mo,getScale:be,isElement:ee,isRTL:Do};function Es(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function Lo(e,r){let n=null,s;const a=oe(e);function d(){var c;clearTimeout(s),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),d();const N=e.getBoundingClientRect(),{left:f,top:O,width:m,height:p}=N;if(c||r(),!m||!p)return;const T=Ue(O),h=Ue(a.clientWidth-(f+m)),g=Ue(a.clientHeight-(O+p)),S=Ue(f),b={rootMargin:-T+"px "+-h+"px "+-g+"px "+-S+"px",threshold:Oe(0,He(1,u))||1};let I=!0;function v(_){const $=_[0].intersectionRatio;if($!==u){if(!I)return i();$?i(!1,$):s=setTimeout(()=>{i(!1,1e-7)},1e3)}$===1&&!Es(N,e.getBoundingClientRect())&&i(),I=!1}try{n=new IntersectionObserver(v,{...b,root:a.ownerDocument})}catch{n=new IntersectionObserver(v,b)}n.observe(e)}return i(!0),d}function Bo(e,r,n,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:d=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=s,N=mr(e),f=a||d?[...N?Ce(N):[],...Ce(r)]:[];f.forEach(S=>{a&&S.addEventListener("scroll",n,{passive:!0}),d&&S.addEventListener("resize",n)});const O=N&&c?Lo(N,n):null;let m=-1,p=null;i&&(p=new ResizeObserver(S=>{let[x]=S;x&&x.target===N&&p&&(p.unobserve(r),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(r)})),n()}),N&&!u&&p.observe(N),p.observe(r));let T,h=u?ge(e):null;u&&g();function g(){const S=ge(e);h&&!Es(h,S)&&n(),h=S,T=requestAnimationFrame(g)}return n(),()=>{var S;f.forEach(x=>{a&&x.removeEventListener("scroll",n),d&&x.removeEventListener("resize",n)}),O==null||O(),(S=p)==null||S.disconnect(),p=null,u&&cancelAnimationFrame(T)}}const Go=Oo,Ho=po,Xo=No,Fo=(e,r,n)=>{const s=new Map,a={platform:Uo,...n},d={...a.platform,_c:s};return fo(e,r,{...a,platform:d})};var Wo=typeof document<"u",Yo=function(){},Be=Wo?ie.useLayoutEffect:Yo;function Ye(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let n,s,a;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==r.length)return!1;for(s=n;s--!==0;)if(!Ye(e[s],r[s]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(r,a[s]))return!1;for(s=n;s--!==0;){const d=a[s];if(!(d==="_owner"&&e.$$typeof)&&!Ye(e[d],r[d]))return!1}return!0}return e!==e&&r!==r}function xs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nn(e,r){const n=xs(e);return Math.round(r*n)/n}function ht(e){const r=l.useRef(e);return Be(()=>{r.current=e}),r}function qo(e){e===void 0&&(e={});const{placement:r="bottom",strategy:n="absolute",middleware:s=[],platform:a,elements:{reference:d,floating:i}={},transform:c=!0,whileElementsMounted:u,open:N}=e,[f,O]=l.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[m,p]=l.useState(s);Ye(m,s)||p(s);const[T,h]=l.useState(null),[g,S]=l.useState(null),x=l.useCallback(C=>{C!==_.current&&(_.current=C,h(C))},[]),b=l.useCallback(C=>{C!==$.current&&($.current=C,S(C))},[]),I=d||T,v=i||g,_=l.useRef(null),$=l.useRef(null),y=l.useRef(f),V=u!=null,A=ht(u),M=ht(a),Y=ht(N),G=l.useCallback(()=>{if(!_.current||!$.current)return;const C={placement:r,strategy:n,middleware:m};M.current&&(C.platform=M.current),Fo(_.current,$.current,C).then(j=>{const k={...j,isPositioned:Y.current!==!1};z.current&&!Ye(y.current,k)&&(y.current=k,ga.flushSync(()=>{O(k)}))})},[m,r,n,M,Y]);Be(()=>{N===!1&&y.current.isPositioned&&(y.current.isPositioned=!1,O(C=>({...C,isPositioned:!1})))},[N]);const z=l.useRef(!1);Be(()=>(z.current=!0,()=>{z.current=!1}),[]),Be(()=>{if(I&&(_.current=I),v&&($.current=v),I&&v){if(A.current)return A.current(I,v,G);G()}},[I,v,G,A,V]);const X=l.useMemo(()=>({reference:_,floating:$,setReference:x,setFloating:b}),[x,b]),U=l.useMemo(()=>({reference:I,floating:v}),[I,v]),w=l.useMemo(()=>{const C={position:n,left:0,top:0};if(!U.floating)return C;const j=nn(U.floating,f.x),k=nn(U.floating,f.y);return c?{...C,transform:"translate("+j+"px, "+k+"px)",...xs(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:k}},[n,c,U.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:G,refs:X,elements:U,floatingStyles:w}),[f,G,X,U,w])}const Qo=(e,r)=>({...Go(e),options:[e,r]}),Zo=(e,r)=>({...Ho(e),options:[e,r]}),Jo=(e,r)=>({...Xo(e),options:[e,r]});function bs({anchorRef:e,contentRef:r,placement:n="bottom",offset:s=4,enabled:a=!0,flip:d=!0,shift:i=!0}){const[c,u]=l.useState(!1),[N,f]=l.useState(!1);l.useEffect(()=>{f(!0)},[]);const O=l.useMemo(()=>{const T=[Qo(s)];return d&&T.push(Jo()),i&&T.push(Zo({padding:8})),T},[s,d,i]),m=qo({placement:n,middleware:O,whileElementsMounted:N&&a?Bo:void 0});return l.useLayoutEffect(()=>{if(!N||!a){u(!1);return}if(typeof window>"u")return;const T=e.current,h=r.current;if(!T||!h){u(!1);return}m.refs.setReference(T),m.refs.setFloating(h),u(!0)},[N,a,e,r,m.refs,n,s]),{position:l.useMemo(()=>!c||!m.x||!m.y?{position:"fixed",top:0,left:0,visibility:"hidden"}:{position:m.strategy,top:m.y??0,left:m.x??0},[c,m.x,m.y,m.strategy]),placement:m.placement,isPositioned:c}}const Is=l.createContext(null);function he(){const e=l.useContext(Is);if(!e)throw new Error("Popover components must be used within PopoverRoot");return e}function _e({open:e,onOpenChange:r,defaultOpen:n=!1,children:s}){const[a,d]=l.useState(n),i=l.useRef(`popover-trigger-${Math.random().toString(36).substr(2,9)}`),c=l.useRef(`popover-content-${Math.random().toString(36).substr(2,9)}`),u=e!==void 0,N=u?e:a,f=l.useCallback(m=>{u||d(m),r==null||r(m)},[u,r]),O=l.useMemo(()=>({open:N,onOpenChange:f,triggerId:i.current,contentId:c.current}),[N,f]);return o.jsx(Is.Provider,{value:O,children:s})}_e.displayName="PopoverRoot";const vs=K.cva("z-50 outline-none border border-border bg-popover text-popover-foreground",{variants:{size:{xs:`${t.POPOVER_TOKENS.content.width.xs} ${t.POPOVER_TOKENS.content.padding.sm} ${t.POPOVER_TOKENS.content.radius.sm} ${t.POPOVER_TOKENS.content.shadow.sm}`,sm:`${t.POPOVER_TOKENS.content.width.sm} ${t.POPOVER_TOKENS.content.padding.sm} ${t.POPOVER_TOKENS.content.radius.sm} ${t.POPOVER_TOKENS.content.shadow.sm}`,md:`${t.POPOVER_TOKENS.content.width.md} ${t.POPOVER_TOKENS.content.padding.md} ${t.POPOVER_TOKENS.content.radius.md} ${t.POPOVER_TOKENS.content.shadow.md}`,lg:`${t.POPOVER_TOKENS.content.width.lg} ${t.POPOVER_TOKENS.content.padding.lg} ${t.POPOVER_TOKENS.content.radius.md} ${t.POPOVER_TOKENS.content.shadow.md}`}},defaultVariants:{size:"md"}}),Nt=l.forwardRef(({className:e,size:r="md",placement:n="bottom",offset:s=4,closeOnInteractOutside:a=!0,children:d,...i},c)=>{const{open:u,onOpenChange:N,triggerId:f,contentId:O}=he(),m=l.useRef(null),p=l.useRef(null);l.useImperativeHandle(c,()=>m.current,[]),l.useEffect(()=>{if(typeof document>"u")return;const S=document.getElementById(f);S&&(p.current=S)},[f]);const{position:T,isPositioned:h}=bs({anchorRef:p,contentRef:m,placement:n,offset:s,enabled:u});if(l.useEffect(()=>{if(!u||!a)return;function S(x){const b=x.target;m.current&&!m.current.contains(b)&&p.current&&!p.current.contains(b)&&N(!1)}return document.addEventListener("mousedown",S,!0),()=>{document.removeEventListener("mousedown",S,!0)}},[u,a,N]),l.useEffect(()=>{if(!u)return;function S(x){x.key==="Escape"&&N(!1)}return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[u,N]),!u)return null;const g=()=>n!=null&&n.startsWith("top")?"tm-motion-fade-slide-down":n!=null&&n.startsWith("bottom")?"tm-motion-fade-slide-up":n!=null&&n.startsWith("left")?"tm-motion-fade-slide-right":n!=null&&n.startsWith("right")?"tm-motion-fade-slide-left":"tm-motion-fade-scale";return o.jsx(Ne,{children:o.jsx("div",{ref:m,id:O,role:"dialog","aria-labelledby":f,className:E(vs({size:r}),g(),!h&&"invisible",e),style:T,...i,children:d})})});Nt.displayName="PopoverContent";const mt=l.forwardRef(({asChild:e=!1,className:r,children:n,...s},a)=>{const{open:d,onOpenChange:i,triggerId:c,contentId:u}=he(),N=l.useRef(null);l.useImperativeHandle(a,()=>N.current,[]);const f=l.useCallback(p=>{var T;i(!d),(T=s.onClick)==null||T.call(s,p)},[d,i,s]),O=l.useCallback(p=>{var T;(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),i(!d)),(T=s.onKeyDown)==null||T.call(s,p)},[d,i,s]),m={...s,ref:N,id:c,"aria-haspopup":"dialog","aria-expanded":d,"aria-controls":d?u:void 0,onClick:f,onKeyDown:O,className:E(r)};return e?o.jsx(qe.Slot,{...m,children:n}):o.jsx("button",{type:"button",...m,ref:N,children:n})});mt.displayName="PopoverTrigger";const _s=l.createContext(null);function yt(){const e=l.useContext(_s);if(!e)throw new Error("DropdownMenu components must be used within DropdownMenuRoot");return e}function Ks(e){const[r,n]=l.useState(null),[s,a]=l.useState([]),d=l.useCallback(u=>{a(N=>N.includes(u)?N:[...N,u])},[]),i=l.useCallback(u=>{a(N=>N.filter(f=>f!==u))},[]),c=l.useMemo(()=>({focusedIndex:r,setFocusedIndex:n,itemIds:s,registerItem:d,unregisterItem:i}),[r,s,d,i]);return l.useEffect(()=>{!e.open&&e.open!==void 0&&n(null)},[e.open]),o.jsx(_e,{...e,children:o.jsx(_s.Provider,{value:c,children:e.children})})}Ks.displayName="DropdownMenuRoot";const Ke=l.forwardRef(({className:e,disabled:r=!1,selected:n=!1,onSelect:s,inset:a=!1,children:d,onClick:i,onKeyDown:c,...u},N)=>{const{onOpenChange:f}=he(),{itemIds:O,focusedIndex:m,setFocusedIndex:p}=yt(),T=l.useRef(null),h=l.useRef(`dropdown-item-${Math.random().toString(36).substr(2,9)}`);l.useImperativeHandle(N,()=>T.current,[]);const{registerItem:g,unregisterItem:S}=yt();l.useEffect(()=>{const _=h.current;return g(_),()=>{S(_)}},[g,S]);const x=l.useMemo(()=>O.indexOf(h.current),[O]),b=m===x,I=l.useCallback(_=>{if(r){_.preventDefault();return}s==null||s(_.nativeEvent),i==null||i(_),f(!1)},[r,s,i,f]),v=l.useCallback(_=>{if(!r){if(_.key==="Enter"||_.key===" "){_.preventDefault(),s==null||s(_.nativeEvent),f(!1);return}c==null||c(_)}},[r,s,f,c]);return o.jsx("div",{ref:T,id:h.current,role:"menuitem",tabIndex:b?0:-1,"aria-disabled":r,"aria-selected":n,className:E("relative flex cursor-default select-none items-center outline-none transition-colors",t.MENU_TOKENS.item.padding.md,t.MENU_TOKENS.item.radius.md,a&&"pl-8",!r&&"focus:bg-accent focus:text-accent-foreground",n&&"bg-accent/50",r&&"pointer-events-none opacity-50",e),onClick:I,onKeyDown:v,onFocus:()=>p(x),...u,children:d})});Ke.displayName="DropdownMenuItem";const ws=l.forwardRef(({className:e,checked:r=!1,children:n,...s},a)=>o.jsxs(Ke,{ref:a,selected:r,className:E("pl-8",e),...s,children:[o.jsx("span",{className:E("absolute left-2 flex items-center justify-center",t.MENU_TOKENS.indicator.size.sm),children:r&&o.jsx(D.Check,{className:t.MENU_TOKENS.indicator.size.sm})}),n]}));ws.displayName="DropdownMenuCheckItem";const Tr=l.forwardRef(({className:e,children:r,onKeyDown:n,...s},a)=>{const{itemIds:d,focusedIndex:i,setFocusedIndex:c}=yt(),u=l.useCallback(N=>{var m,p,T,h;const f=d.filter(g=>{const S=document.getElementById(g);return S&&!S.hasAttribute("aria-disabled")});if(f.length===0){n==null||n(N);return}let O=i??0;switch(N.key){case"ArrowDown":N.preventDefault(),O=(O+1)%f.length,c(O);const g=f[O];g&&((m=document.getElementById(g))==null||m.focus());break;case"ArrowUp":N.preventDefault(),O=O<=0?f.length-1:O-1,c(O);const S=f[O];S&&((p=document.getElementById(S))==null||p.focus());break;case"Home":N.preventDefault(),O=0,c(O);const x=f[O];x&&((T=document.getElementById(x))==null||T.focus());break;case"End":N.preventDefault(),O=f.length-1,c(O);const b=f[O];b&&((h=document.getElementById(b))==null||h.focus());break;case"Tab":N.preventDefault();break;default:n==null||n(N);break}},[d,i,c,n]);return o.jsx(Nt,{ref:a,className:E(`${t.MENU_TOKENS.content.padding.md} ${t.MENU_TOKENS.content.radius.md} ${t.MENU_TOKENS.content.shadow.md} ${t.MENU_TOKENS.content.minWidth.md}`,"tm-motion-fade-slide-up overflow-hidden",e),role:"menu",onKeyDown:u,placement:"bottom",...s,children:r})});Tr.displayName="DropdownMenuContent";const Or=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,role:"group",className:E(e),...r}));Or.displayName="DropdownMenuGroup";const pr=l.forwardRef(({className:e,inset:r=!1,...n},s)=>o.jsx("div",{ref:s,className:E(t.MENU_TOKENS.label.padding.md,t.MENU_TOKENS.label.textStyle,r&&"pl-8",e),...n}));pr.displayName="DropdownMenuLabel";const ys=l.createContext(null);function ei(){return l.useContext(ys)}const As=l.forwardRef(({className:e,value:r,onValueChange:n,...s},a)=>{const d=l.useMemo(()=>({value:r,onValueChange:n}),[r,n]);return o.jsx(ys.Provider,{value:d,children:o.jsx("div",{ref:a,role:"radiogroup",className:E(e),...s})})});As.displayName="DropdownMenuRadioGroup";const Cs=l.forwardRef(({className:e,value:r,children:n,onSelect:s,...a},d)=>{const i=ei(),c=(i==null?void 0:i.value)===r,u=l.useCallback(N=>{var f;(f=i==null?void 0:i.onValueChange)==null||f.call(i,r),s==null||s(N)},[r,i,s]);return o.jsxs(Ke,{ref:d,selected:c,className:E("pl-8",e),onSelect:u,...a,children:[o.jsx("span",{className:E("absolute left-2 flex items-center justify-center",t.MENU_TOKENS.indicator.size.sm),children:c&&o.jsx(D.Circle,{className:"h-2 w-2 fill-current"})}),n]})});Cs.displayName="DropdownMenuRadioItem";const gr=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,role:"separator",className:E(t.MENU_TOKENS.separator.margin.md,t.MENU_TOKENS.separator.height,t.MENU_TOKENS.separator.color,e),...r}));gr.displayName="DropdownMenuSeparator";function $s(e){return o.jsx(_e,{...e})}$s.displayName="DropdownMenuSub";const Rs=l.forwardRef((e,r)=>o.jsx(Tr,{ref:r,...e}));Rs.displayName="DropdownMenuSubContent";const Vs=l.forwardRef(({className:e,children:r,...n},s)=>o.jsxs(Ke,{ref:s,className:E(e),...n,children:[r,o.jsx(D.ChevronRight,{className:"ml-auto h-4 w-4"})]}));Vs.displayName="DropdownMenuSubTrigger";const js=l.forwardRef((e,r)=>o.jsx(mt,{ref:r,...e,"aria-haspopup":"menu"}));js.displayName="DropdownMenuTrigger";const zs=l.forwardRef(({onMouseEnter:e,onMouseLeave:r,...n},s)=>{const{onOpenChange:a}=he(),d=l.useCallback(c=>{a(!0),e==null||e(c)},[a,e]),i=l.useCallback(c=>{a(!1),r==null||r(c)},[a,r]);return o.jsx(Nt,{ref:s,onMouseEnter:d,onMouseLeave:i,role:"tooltip",...n})});zs.displayName="HoverCardContent";function Ms({openDelay:e=0,closeDelay:r=300,defaultOpen:n=!1,...s}){const[a,d]=l.useState(n),i=l.useRef(null),c=l.useRef(null),u=l.useCallback(N=>{i.current&&(clearTimeout(i.current),i.current=null),c.current&&(clearTimeout(c.current),c.current=null),N?e>0?i.current=setTimeout(()=>{d(!0)},e):d(!0):r>0?c.current=setTimeout(()=>{d(!1)},r):d(!1)},[e,r]);return l.useEffect(()=>()=>{i.current&&clearTimeout(i.current),c.current&&clearTimeout(c.current)},[]),o.jsx(_e,{...s,open:a,onOpenChange:u,defaultOpen:n})}Ms.displayName="HoverCardRoot";const ks=l.forwardRef(({onMouseEnter:e,onMouseLeave:r,onFocus:n,onBlur:s,...a},d)=>{const{onOpenChange:i}=he(),c=l.useCallback(O=>{i(!0),e==null||e(O)},[i,e]),u=l.useCallback(O=>{i(!1),r==null||r(O)},[i,r]),N=l.useCallback(O=>{i(!0),n==null||n(O)},[i,n]),f=l.useCallback(O=>{i(!1),s==null||s(O)},[i,s]);return o.jsx(mt,{ref:d,onMouseEnter:c,onMouseLeave:u,onFocus:N,onBlur:f,"aria-haspopup":"dialog",...a})});ks.displayName="HoverCardTrigger";const Ps=l.createContext(null);function Ds(){const e=l.useContext(Ps);if(!e)throw new Error("ContextMenu components must be used within ContextMenuRoot");return e}function Us(e){const[r,n]=l.useState(!1),[s,a]=l.useState(null),[d,i]=l.useState(null),[c,u]=l.useState([]),N=l.useCallback(m=>{u(p=>p.includes(m)?p:[...p,m])},[]),f=l.useCallback(m=>{u(p=>p.filter(T=>T!==m))},[]),O=l.useMemo(()=>({focusedIndex:d,setFocusedIndex:i,itemIds:c,registerItem:N,unregisterItem:f,position:s,setPosition:a}),[d,c,N,f,s]);return l.useEffect(()=>{r||(i(null),a(null))},[r]),o.jsx(_e,{...e,open:r,onOpenChange:n,children:o.jsx(Ps.Provider,{value:O,children:e.children})})}Us.displayName="ContextMenuRoot";const Ls=l.forwardRef(({className:e,placement:r="bottom-start",offset:n=4,children:s,...a},d)=>{const{open:i,onOpenChange:c,triggerId:u,contentId:N}=he(),{position:f}=Ds(),O=l.useRef(null),m=l.useRef(null);l.useImperativeHandle(d,()=>O.current,[]),l.useEffect(()=>{if(!f||typeof document>"u")return;const h=document.createElement("div");return h.style.position="fixed",h.style.left=`${f.x}px`,h.style.top=`${f.y}px`,h.style.width="1px",h.style.height="1px",h.style.pointerEvents="none",h.style.visibility="hidden",document.body.appendChild(h),m.current=h,()=>{h.parentNode&&h.parentNode.removeChild(h)}},[f]);const{position:p,isPositioned:T}=bs({anchorRef:m,contentRef:O,placement:r,offset:n,enabled:i&&!!f});return l.useEffect(()=>{if(!i)return;function h(g){const S=g.target;O.current&&!O.current.contains(S)&&c(!1)}return document.addEventListener("mousedown",h,!0),()=>{document.removeEventListener("mousedown",h,!0)}},[i,c]),l.useEffect(()=>{if(!i)return;function h(g){g.key==="Escape"&&c(!1)}return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[i,c]),i?o.jsx(Ne,{children:o.jsx("div",{ref:O,id:N,role:"menu","aria-labelledby":u,className:E("z-50 border border-border bg-popover text-popover-foreground outline-none",`${t.MENU_TOKENS.content.padding.md} ${t.MENU_TOKENS.content.radius.md} ${t.MENU_TOKENS.content.shadow.md} ${t.MENU_TOKENS.content.minWidth.md}`,"overflow-hidden",!T&&"invisible",e),style:p,...a,children:s})}):null});Ls.displayName="ContextMenuContent";const Bs=l.forwardRef((e,r)=>o.jsx(Or,{ref:r,...e}));Bs.displayName="ContextMenuGroup";const Gs=l.forwardRef((e,r)=>o.jsx(Ke,{ref:r,...e}));Gs.displayName="ContextMenuItem";const Hs=l.forwardRef((e,r)=>o.jsx(pr,{ref:r,...e}));Hs.displayName="ContextMenuLabel";const Xs=l.forwardRef((e,r)=>o.jsx(gr,{ref:r,...e}));Xs.displayName="ContextMenuSeparator";const Fs=l.forwardRef(({asChild:e=!1,className:r,children:n,onContextMenu:s,...a},d)=>{const{onOpenChange:i}=he(),{setPosition:c}=Ds(),u=l.useRef(null);l.useImperativeHandle(d,()=>u.current,[]);const N=l.useCallback(f=>{f.preventDefault(),f.stopPropagation(),c({x:f.clientX,y:f.clientY}),i(!0),s==null||s(f)},[i,c,s]);if(e&&l.isValidElement(n)){const f=n.props;return l.cloneElement(n,{...a,...f,ref:u,onContextMenu:N,className:E(r,f.className)})}return o.jsx("div",{ref:u,onContextMenu:N,className:E(r),...a,children:n})});Fs.displayName="ContextMenuTrigger";const Ws=K.cva(`${t.DATA_TOKENS.skeleton.background.default} ${t.DATA_TOKENS.skeleton.animation.pulse}`,{variants:{variant:{text:`${t.DATA_TOKENS.skeleton.height.text} ${t.DATA_TOKENS.skeleton.radius.text} ${t.DATA_TOKENS.skeleton.width.full}`,inline:`${t.DATA_TOKENS.skeleton.height.inline} ${t.DATA_TOKENS.skeleton.radius.inline} ${t.DATA_TOKENS.skeleton.width.inline}`,block:`${t.DATA_TOKENS.skeleton.height.block} ${t.DATA_TOKENS.skeleton.radius.block} ${t.DATA_TOKENS.skeleton.width.full}`,card:`${t.DATA_TOKENS.skeleton.height.card} ${t.DATA_TOKENS.skeleton.radius.card} ${t.DATA_TOKENS.skeleton.width.full}`,circle:`${t.DATA_TOKENS.skeleton.height.circle} ${t.DATA_TOKENS.skeleton.radius.circle}`}},defaultVariants:{variant:"text"}}),Sr=l.forwardRef(({className:e,variant:r,"aria-hidden":n=!0,...s},a)=>o.jsx("div",{ref:a,className:E(Ws({variant:r}),e),"aria-hidden":n,...s}));Sr.displayName="Skeleton";const hr=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("div",{ref:s,className:E("mt-2",e),...n,children:r}));hr.displayName="EmptyStateAction";const Er=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("p",{ref:s,className:E(t.DATA_TOKENS.emptyState.typography.description.fontSize,t.DATA_TOKENS.emptyState.typography.description.fontWeight,"max-w-md text-muted-foreground",e),...n,children:r}));Er.displayName="EmptyStateDescription";const Tt=l.forwardRef(({children:e,size:r="md",className:n,...s},a)=>{const d=t.DATA_TOKENS.emptyState.iconSize[r];return o.jsx("div",{ref:a,className:E("flex items-center justify-center text-muted-foreground",d,n),...s,children:e})});Tt.displayName="EmptyStateIcon";const Ot=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("h3",{ref:s,className:E(t.DATA_TOKENS.emptyState.typography.title.fontSize,t.DATA_TOKENS.emptyState.typography.title.fontWeight,"text-foreground",e),...n,children:r}));Ot.displayName="EmptyStateTitle";const Ee=l.forwardRef(({id:e,className:r,children:n,...s},a)=>{const d=l.useId(),i=e||`empty-state-${d}`;return o.jsx(tt,{ref:a,variant:"flat",radius:"xl",p:"lg",className:E("text-center",r),id:i,...s,children:o.jsx(ae,{gap:"md",align:"center",justify:"center",children:n})})});Ee.displayName="EmptyState";Ee.Icon=Tt;Ee.Title=Ot;Ee.Description=Er;Ee.Action=hr;const xr=l.forwardRef(({padding:e="md",className:r,children:n,...s},a)=>{const d=t.DATA_TOKENS.dataList.rowPadding[e];return o.jsx("div",{ref:a,className:E(d,"flex flex-col border-b border-border last:border-0 md:flex-row md:items-center",r),...s,children:n})});xr.displayName="DataListItem";const br=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("dt",{ref:s,className:E("mb-1 font-semibold text-foreground md:mb-0","md:w-32",e),...n,children:r}));br.displayName="DataListLabel";const Ir=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("dd",{ref:s,className:E("flex-1 text-muted-foreground",e),...n,children:r}));Ir.displayName="DataListValue";const we=l.forwardRef(({labelWidth:e="md",className:r,children:n,...s},a)=>o.jsx("dl",{ref:a,className:E(t.DATA_TOKENS.dataList.spacing.gap,r),...s,children:n}));we.displayName="DataListRoot";we.Item=xr;we.Label=br;we.Value=Ir;const vr=l.forwardRef(({className:e,...r},n)=>o.jsx("tbody",{ref:n,className:E(e),role:"rowgroup",...r}));vr.displayName="TableBody";const _r=l.forwardRef(({align:e="left",size:r="md",className:n,...s},a)=>{const d=t.DATA_TOKENS.table.padding.cell[r],i=t.DATA_TOKENS.table.typography.cell.fontSize,c=t.DATA_TOKENS.table.typography.cell.fontWeight,u={left:"text-left",center:"text-center",right:"text-right"};return o.jsx("td",{ref:a,className:E(d,i,c,u[e],n),role:"cell",...s})});_r.displayName="TableCell";const Kr=l.forwardRef(({colSpan:e,message:r="No data available",className:n,...s},a)=>o.jsx("tr",{ref:a,className:E(n),...s,children:o.jsx("td",{colSpan:e,className:"p-8",children:o.jsxs(Ee,{children:[o.jsx(Tt,{children:"📭"}),o.jsx(Ot,{children:r})]})})}));Kr.displayName="TableEmpty";const wr=l.forwardRef(({colSpan:e,expanded:r,children:n,className:s,...a},d)=>o.jsx("td",{ref:d,colSpan:e,className:E("p-0","overflow-hidden transition-all duration-normal ease-in-out",r?"max-h-[100vh] opacity-100":"max-h-0 opacity-0",s),...a,children:o.jsx("div",{className:E("p-md",r?"block":"hidden"),children:n})}));wr.displayName="TableExpandableContent";const pt=l.forwardRef(({direction:e,className:r,...n},s)=>o.jsx("span",{ref:s,className:E("inline-flex size-4 items-center text-muted-foreground transition-transform",e==="desc"&&"rotate-180",!e&&"opacity-30",r),"aria-hidden":"true",...n,children:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"m7 15 5 5 5-5"}),o.jsx("path",{d:"m7 9 5-5 5 5"})]})}));pt.displayName="TableSortIcon";const yr=l.forwardRef(({align:e="left",sortable:r=!1,columnKey:n,size:s="md",className:a,children:d,...i},c)=>{const{sortState:u,setSortState:N}=qs(),f=l.useCallback(()=>{if(!r||!n)return;const S=u.column===n?u.direction:null;let x=null;S===null?x="asc":S==="asc"?x="desc":x=null,N({column:x?n:null,direction:x})},[r,n,u,N]),O=t.DATA_TOKENS.table.padding.header[s],m=t.DATA_TOKENS.table.typography.header.fontSize,p=t.DATA_TOKENS.table.typography.header.fontWeight,T={left:"text-left",center:"text-center",right:"text-right"},g=u.column===n?u.direction:null;return o.jsx("th",{ref:c,className:E(O,m,p,T[e],t.DATA_TOKENS.table.colors.border,"border-b",r&&"cursor-pointer select-none hover:bg-muted/50",a),onClick:f,"aria-sort":(()=>{if(g==="asc")return"ascending";if(g==="desc")return"descending";if(r)return"none"})(),role:"columnheader",...i,children:o.jsxs("div",{className:"flex items-center gap-2",children:[d,r&&o.jsx(pt,{direction:g})]})})});yr.displayName="TableHead";const Ar=l.forwardRef(({sticky:e=!1,className:r,...n},s)=>o.jsx("thead",{ref:s,className:E(e&&"sticky top-0 z-10 bg-background",r),role:"rowgroup",...n}));Ar.displayName="TableHeader";const Cr=l.forwardRef(({colSpan:e,rows:r=5,className:n,...s},a)=>o.jsx(o.Fragment,{children:Array.from({length:r}).map((d,i)=>o.jsx("tr",{ref:i===0?a:void 0,className:E(n),...s,children:Array.from({length:e}).map((c,u)=>o.jsx("td",{className:"p-sm",children:o.jsx(Sr,{variant:"text",className:"w-full"})},u))},i))}));Cr.displayName="TableLoadingState";const $r=l.forwardRef(({selected:e=!1,expandable:r=!1,rowKey:n,expanded:s=!1,className:a,...d},i)=>o.jsx("tr",{ref:i,className:E(t.DATA_TOKENS.table.colors.border,"border-b",t.DATA_TOKENS.table.colors.rowHover,e&&t.DATA_TOKENS.table.colors.rowSelected,r&&"cursor-pointer",a),"aria-expanded":r?s:void 0,role:"row",...d}));$r.displayName="TableRow";const Ys=l.createContext(null);function qs(){const e=l.useContext(Ys);if(!e)throw new Error("Table components must be used within Table.Root");return e}function Z({data:e,columns:r,rowKey:n,sortable:s=!1,expandable:a=!1,renderExpandableContent:d,loading:i=!1,emptyMessage:c="No data available",stickyHeader:u=!1,rowSize:N="md",className:f,children:O,...m}){const[p,T]=l.useState({column:null,direction:null}),[h,g]=l.useState(new Set),S=l.useCallback(b=>{g(I=>{const v=new Set(I);return v.has(b)?v.delete(b):v.add(b),v})},[]),x=l.useMemo(()=>({sortState:p,setSortState:T,expandedRows:h,toggleRow:S,expandable:a,renderExpandableContent:d}),[p,h,S,a,d]);return o.jsx(Ys.Provider,{value:x,children:o.jsx("div",{className:"overflow-x-auto",children:o.jsx("table",{className:E("w-full border-collapse",t.DATA_TOKENS.table.radius.default,t.DATA_TOKENS.table.shadow.subtle,f),role:"table",...m,children:O})})})}Z.displayName="TableRoot";Z.Header=Ar;Z.Head=yr;Z.Body=vr;Z.Row=$r;Z.Cell=_r;Z.SortIcon=pt;Z.Empty=Kr;Z.LoadingState=Cr;Z.ExpandableContent=wr;const Qs=K.cva(`inline-flex items-center justify-center ${t.NAVIGATION_TOKENS.spacing.listGap.md} ${t.NAVIGATION_TOKENS.typography.default} ${t.NAVIGATION_TOKENS.shadow.sm}`,{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},size:{sm:`${t.NAVIGATION_TOKENS.sizes.sm.fontSize}`,md:`${t.NAVIGATION_TOKENS.sizes.md.fontSize}`,lg:`${t.NAVIGATION_TOKENS.sizes.lg.fontSize}`}},defaultVariants:{orientation:"horizontal",size:"md"}}),Zs=K.cva(`inline-flex items-center justify-center whitespace-nowrap ${t.NAVIGATION_TOKENS.typography.fontWeight.medium} ${t.NAVIGATION_TOKENS.focus.ring} ${t.MOTION_TOKENS.transition.colors} disabled:pointer-events-none disabled:opacity-50 relative`,{variants:{size:{sm:`${t.NAVIGATION_TOKENS.sizes.sm.height} ${t.NAVIGATION_TOKENS.sizes.sm.padding.horizontal} ${t.NAVIGATION_TOKENS.sizes.sm.padding.vertical} ${t.NAVIGATION_TOKENS.sizes.sm.fontSize}`,md:`${t.NAVIGATION_TOKENS.sizes.md.height} ${t.NAVIGATION_TOKENS.sizes.md.padding.horizontal} ${t.NAVIGATION_TOKENS.sizes.md.padding.vertical} ${t.NAVIGATION_TOKENS.sizes.md.fontSize}`,lg:`${t.NAVIGATION_TOKENS.sizes.lg.height} ${t.NAVIGATION_TOKENS.sizes.lg.padding.horizontal} ${t.NAVIGATION_TOKENS.sizes.lg.padding.vertical} ${t.NAVIGATION_TOKENS.sizes.lg.fontSize}`},state:{default:`${t.NAVIGATION_TOKENS.states.default.background} ${t.NAVIGATION_TOKENS.states.default.text} ${t.NAVIGATION_TOKENS.states.hover.background} ${t.NAVIGATION_TOKENS.states.hover.text}`,selected:`${t.NAVIGATION_TOKENS.states.selected.background} ${t.NAVIGATION_TOKENS.states.selected.text} ${t.NAVIGATION_TOKENS.shadow.sm}`}},defaultVariants:{size:"md",state:"default"}}),Rr=l.createContext(void 0);function Js(){const e=l.useContext(Rr);if(!e)throw new Error("Tabs components must be used within Tabs.Root");return e}const At=l.forwardRef(({value:e,defaultValue:r,onValueChange:n,orientation:s="horizontal",className:a,children:d,...i},c)=>{const[u,N]=l.useState(r||""),f=e!==void 0,O=f?e:u,m=l.useCallback(g=>{f||N(g),n==null||n(g)},[f,n]),[p,T]=l.useState("md"),h=l.useMemo(()=>({value:O,onValueChange:m,orientation:s,size:p}),[O,m,s,p]);return o.jsx(Rr.Provider,{value:h,children:o.jsx("div",{ref:c,className:E("w-full",a),...i,children:l.Children.map(d,g=>{if(l.isValidElement(g)&&g.type===Vr){const S=g.props;return l.cloneElement(g,{...S,onSizeChange:T})}return g})})})});At.displayName="Tabs.Root";const Vr=l.forwardRef(({className:e,orientation:r,size:n="md",onSizeChange:s,children:a,...d},i)=>{const c=l.useContext(Rr),u=r||(c==null?void 0:c.orientation)||"horizontal",N=n||(c==null?void 0:c.size)||"md";return l.useEffect(()=>{s==null||s(N)},[N,s]),o.jsx("div",{ref:i,role:"tablist","aria-orientation":u,className:E(Qs({orientation:u,size:N}),e),...d,children:a})});Vr.displayName="Tabs.List";const ea=l.forwardRef(({className:e,value:r,disabled:n,size:s,children:a,...d},i)=>{const c=Js(),u=c.value===r,N=s||c.size||"md",f=l.useRef(null);l.useImperativeHandle(i,()=>f.current);const O=u?0:-1,m=l.useCallback(h=>{var I,v;if(n)return;const g=Array.from(((v=(I=f.current)==null?void 0:I.parentElement)==null?void 0:v.querySelectorAll('[role="tab"]:not([disabled])'))||[]),S=g.findIndex(_=>_===f.current);let x=S;c.orientation==="horizontal"?h.key==="ArrowLeft"?(h.preventDefault(),x=S>0?S-1:g.length-1):h.key==="ArrowRight"&&(h.preventDefault(),x=S<g.length-1?S+1:0):h.key==="ArrowUp"?(h.preventDefault(),x=S>0?S-1:g.length-1):h.key==="ArrowDown"&&(h.preventDefault(),x=S<g.length-1?S+1:0),h.key==="Home"?(h.preventDefault(),x=0):h.key==="End"&&(h.preventDefault(),x=g.length-1);const b=g[x];if(x!==S&&b){b.focus();const _=b.getAttribute("data-value");_&&c.onValueChange(_)}},[n,c]),p=l.useMemo(()=>typeof document<"u"?`tabs-trigger-${r}-${Math.random().toString(36).substr(2,9)}`:`tabs-trigger-${r}`,[r]),T=l.useMemo(()=>`tabs-content-${r}`,[r]);return o.jsxs("button",{ref:f,type:"button",role:"tab",id:p,"aria-selected":u,"aria-controls":T,tabIndex:O,disabled:n,"data-value":r,className:E(Zs({size:N,state:u?"selected":"default"}),e),onKeyDown:m,onClick:()=>!n&&c.onValueChange(r),...d,children:[a,u&&o.jsx("span",{className:E(t.NAVIGATION_TOKENS.indicator.height,t.NAVIGATION_TOKENS.indicator.background,t.NAVIGATION_TOKENS.indicator.radius,t.NAVIGATION_TOKENS.indicator.transition,t.NAVIGATION_TOKENS.indicator.position),"aria-hidden":"true"})]})});ea.displayName="Tabs.Trigger";const ta=l.forwardRef(({className:e,value:r,forceMount:n,children:s,...a},d)=>{const c=Js().value===r,u=l.useMemo(()=>typeof document<"u"?`tabs-content-${r}-${Math.random().toString(36).substr(2,9)}`:`tabs-content-${r}`,[r]),N=l.useMemo(()=>`tabs-trigger-${r}`,[r]),[f,O]=l.useState(n||!1);return l.useEffect(()=>{typeof document<"u"&&O(!0)},[]),!f&&!n&&!c?null:o.jsx("div",{ref:d,role:"tabpanel",id:u,"aria-labelledby":N,hidden:!c,className:E("mt-2",c?"block":"hidden",t.NAVIGATION_TOKENS.focus.ring,e),...a,children:s})});ta.displayName="Tabs.Content";const ti=Object.assign(At,{Root:At,List:Vr,Trigger:ea,Content:ta}),ra=K.cva(`inline-flex items-center ${t.NAVIGATION_TOKENS.spacing.listGap.xs} ${t.NAVIGATION_TOKENS.radius.default} ${t.NAVIGATION_TOKENS.shadow.sm} ${t.NAVIGATION_TOKENS.container.padding.xs} ${t.NAVIGATION_TOKENS.container.background.muted}`,{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},size:{sm:`${t.NAVIGATION_TOKENS.sizes.sm.fontSize}`,md:`${t.NAVIGATION_TOKENS.sizes.md.fontSize}`,lg:`${t.NAVIGATION_TOKENS.sizes.lg.fontSize}`}},defaultVariants:{orientation:"horizontal",size:"md"}}),na=K.cva(`inline-flex items-center justify-center whitespace-nowrap ${t.NAVIGATION_TOKENS.typography.fontWeight.medium} ${t.NAVIGATION_TOKENS.focus.ring} ${t.MOTION_TOKENS.transition.all} disabled:pointer-events-none disabled:opacity-50 relative`,{variants:{size:{sm:`${t.NAVIGATION_TOKENS.sizes.sm.height} ${t.NAVIGATION_TOKENS.sizes.sm.padding.horizontal} ${t.NAVIGATION_TOKENS.sizes.sm.padding.vertical} ${t.NAVIGATION_TOKENS.sizes.sm.fontSize} ${t.NAVIGATION_TOKENS.radius.default}`,md:`${t.NAVIGATION_TOKENS.sizes.md.height} ${t.NAVIGATION_TOKENS.sizes.md.padding.horizontal} ${t.NAVIGATION_TOKENS.sizes.md.padding.vertical} ${t.NAVIGATION_TOKENS.sizes.md.fontSize} ${t.NAVIGATION_TOKENS.radius.default}`,lg:`${t.NAVIGATION_TOKENS.sizes.lg.height} ${t.NAVIGATION_TOKENS.sizes.lg.padding.horizontal} ${t.NAVIGATION_TOKENS.sizes.lg.padding.vertical} ${t.NAVIGATION_TOKENS.sizes.lg.fontSize} ${t.NAVIGATION_TOKENS.radius.default}`},state:{default:`${t.NAVIGATION_TOKENS.states.default.background} ${t.NAVIGATION_TOKENS.states.default.text} ${t.NAVIGATION_TOKENS.states.hover.background} ${t.NAVIGATION_TOKENS.states.hover.text}`,selected:`${t.NAVIGATION_TOKENS.states.selected.background} ${t.NAVIGATION_TOKENS.states.selected.text} ${t.NAVIGATION_TOKENS.shadow.sm}`}},defaultVariants:{size:"md",state:"default"}}),sa=l.createContext(void 0);function ri(){const e=l.useContext(sa);if(!e)throw new Error("SegmentedControl components must be used within SegmentedControl.Root");return e}const Ct=l.forwardRef(({value:e,defaultValue:r,onValueChange:n,name:s,orientation:a="horizontal",size:d="md",className:i,children:c,...u},N)=>{const[f,O]=l.useState(r||""),m=e!==void 0,p=m?e:f,T=l.useMemo(()=>s||(typeof document<"u"?`segmented-control-${Math.random().toString(36).substr(2,9)}`:"segmented-control"),[s]),h=l.useCallback(S=>{m||O(S),n==null||n(S)},[m,n]),g=l.useMemo(()=>({value:p,onValueChange:h,name:T,orientation:a??"horizontal",size:d??"md"}),[p,h,T,a,d]);return o.jsx(sa.Provider,{value:g,children:o.jsx("div",{ref:N,role:"radiogroup","aria-orientation":a??"horizontal",className:E(ra({orientation:a,size:d}),i),...u,children:c})})});Ct.displayName="SegmentedControl.Root";const aa=l.forwardRef(({className:e,value:r,disabled:n,size:s,children:a,...d},i)=>{const c=ri(),u=c.value===r,N=s||c.size||"md",f=l.useRef(null);l.useImperativeHandle(i,()=>f.current);const O=u?0:-1,m=l.useCallback(p=>{var x,b;if(n)return;const T=Array.from(((b=(x=f.current)==null?void 0:x.parentElement)==null?void 0:b.querySelectorAll('[role="radio"]:not([disabled])'))||[]),h=T.findIndex(I=>I===f.current);let g=h;c.orientation==="horizontal"?p.key==="ArrowLeft"?(p.preventDefault(),g=h>0?h-1:T.length-1):p.key==="ArrowRight"&&(p.preventDefault(),g=h<T.length-1?h+1:0):p.key==="ArrowUp"?(p.preventDefault(),g=h>0?h-1:T.length-1):p.key==="ArrowDown"&&(p.preventDefault(),g=h<T.length-1?h+1:0),c.orientation==="horizontal"?(p.key==="ArrowUp"||p.key==="ArrowDown")&&(p.preventDefault(),p.key==="ArrowUp"?g=h>0?h-1:T.length-1:g=h<T.length-1?h+1:0):(p.key==="ArrowLeft"||p.key==="ArrowRight")&&(p.preventDefault(),p.key==="ArrowLeft"?g=h>0?h-1:T.length-1:g=h<T.length-1?h+1:0);const S=T[g];if(g!==h&&S){S.focus();const I=S.getAttribute("data-value");I&&c.onValueChange(I)}},[n,c]);return o.jsx("button",{ref:f,type:"button",role:"radio","aria-checked":u,tabIndex:O,disabled:n,"data-value":r,name:c.name,className:E(na({size:N,state:u?"selected":"default"}),e),onKeyDown:m,onClick:()=>!n&&c.onValueChange(r),...d,children:a})});aa.displayName="SegmentedControl.Item";const ni=Object.assign(Ct,{Root:Ct,Item:aa}),$t=l.forwardRef(({items:e,separator:r,ariaLabel:n="Breadcrumb",className:s,children:a,...d},i)=>{const c=e.length-1,u=o.jsx(D.ChevronRight,{className:E("h-4 w-4",t.NAVIGATION_TOKENS.states.default.text),"aria-hidden":"true"});return o.jsx("nav",{ref:i,"aria-label":n,className:E(t.NAVIGATION_TOKENS.typography.default,s),...d,children:o.jsxs("ol",{className:E("flex items-center",t.NAVIGATION_TOKENS.spacing.listGap.sm),children:[e.map((N,f)=>{const O=f===c;return o.jsxs(jr,{isLast:O,disabled:N.disabled,children:[f>0&&o.jsx(zr,{children:r||u}),N.href&&!O&&!N.disabled?o.jsx("a",{href:N.href,className:E(t.NAVIGATION_TOKENS.states.default.text,t.NAVIGATION_TOKENS.states.hover.text,t.MOTION_TOKENS.transition.colors),children:N.label}):o.jsx("span",{className:E(O?t.NAVIGATION_TOKENS.typography.fontWeight.medium:t.NAVIGATION_TOKENS.states.default.text,N.disabled&&t.NAVIGATION_TOKENS.states.disabled.text),"aria-current":O?"page":void 0,children:N.label})]},`${N.label}-${f}`)}),a]})})});$t.displayName="Breadcrumbs.Root";const jr=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("li",{ref:s,className:E("flex items-center",e),...n,children:r}));jr.displayName="Breadcrumbs.Item";const zr=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("span",{ref:s,className:E("mx-1",t.NAVIGATION_TOKENS.states.default.text,e),"aria-hidden":"true",...n,children:r}));zr.displayName="Breadcrumbs.Separator";const si=Object.assign($t,{Root:$t,Item:jr,Separator:zr}),Mr="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background transition-shadow";function ai(e,r,n=2){const a=r;if(r<=1)return[1];const d=[],i=[],c=Math.max(2,e-n),u=Math.min(a-1,e+n);for(let N=c;N<=u;N++)d.push(N);return e-n>2?i.push(1,"..."):i.push(1),i.push(...d),e+n<a-1?i.push("...",a):a!==1&&i.push(a),i}const Rt=l.forwardRef(({currentPage:e,totalPages:r,onPageChange:n,delta:s=2,ariaLabel:a="Pagination",className:d,children:i,...c},u)=>{const N=Math.max(1,r),f=Math.min(Math.max(1,e),N),O=l.useCallback(p=>{const T=Math.min(Math.max(p,1),N);T!==f&&n(T)},[f,N,n]),m=l.useMemo(()=>ai(f,N,s),[f,N,s]);return o.jsxs("nav",{ref:u,"aria-label":a,className:E("flex items-center",t.NAVIGATION_TOKENS.spacing.listGap.xs,d),...c,children:[o.jsx(Pr,{disabled:f===1,onClick:()=>O(f-1)}),m.map((p,T)=>o.jsx(l.Fragment,{children:p==="..."?o.jsx(Ur,{}):o.jsx(kr,{page:p,isCurrent:p===f,onClick:()=>O(p)})},`${p}-${T}`)),o.jsx(Dr,{disabled:f===N,onClick:()=>O(f+1)}),i]})});Rt.displayName="Pagination.Root";const kr=l.forwardRef(({className:e,page:r,isCurrent:n,disabled:s,onClick:a,...d},i)=>r==="..."?null:o.jsx("button",{ref:i,type:"button",onClick:a,disabled:s,"aria-label":`Go to page ${r}`,"aria-current":n?"page":void 0,"aria-disabled":s,className:E(t.NAVIGATION_TOKENS.sizes.md.height,t.NAVIGATION_TOKENS.sizes.md.padding.horizontal,t.NAVIGATION_TOKENS.sizes.md.padding.vertical,t.NAVIGATION_TOKENS.radius.default,t.NAVIGATION_TOKENS.sizes.md.fontSize,t.NAVIGATION_TOKENS.typography.fontWeight.medium,"border",t.MOTION_TOKENS.transition.colors,n?`${t.NAVIGATION_TOKENS.states.selected.background} ${t.NAVIGATION_TOKENS.states.selected.text} ${t.NAVIGATION_TOKENS.states.selected.border} ${t.NAVIGATION_TOKENS.shadow.sm}`:`${t.NAVIGATION_TOKENS.states.default.border} border-input ${t.NAVIGATION_TOKENS.states.default.background} ${t.NAVIGATION_TOKENS.states.default.text} ${t.NAVIGATION_TOKENS.states.hover.background} ${t.NAVIGATION_TOKENS.states.hover.text}`,s&&t.NAVIGATION_TOKENS.states.disabled.cursor,Mr,e),...d,children:r}));kr.displayName="Pagination.Item";const Pr=l.forwardRef(({className:e,disabled:r,onClick:n,...s},a)=>o.jsxs("button",{ref:a,type:"button",onClick:n,disabled:r,"aria-label":"Previous page","aria-disabled":r,className:E(t.NAVIGATION_TOKENS.sizes.md.height,t.NAVIGATION_TOKENS.sizes.md.padding.horizontal,t.NAVIGATION_TOKENS.sizes.md.padding.vertical,t.NAVIGATION_TOKENS.radius.default,t.NAVIGATION_TOKENS.sizes.md.fontSize,"border border-input",t.MOTION_TOKENS.transition.colors,`${t.NAVIGATION_TOKENS.states.default.background} ${t.NAVIGATION_TOKENS.states.default.text} ${t.NAVIGATION_TOKENS.states.hover.background} ${t.NAVIGATION_TOKENS.states.hover.text}`,r&&t.NAVIGATION_TOKENS.states.disabled.cursor,Mr,e),...s,children:[o.jsx(D.ChevronLeft,{className:"h-4 w-4","aria-hidden":"true"}),o.jsx("span",{className:"sr-only",children:"Previous"})]}));Pr.displayName="Pagination.Prev";const Dr=l.forwardRef(({className:e,disabled:r,onClick:n,...s},a)=>o.jsxs("button",{ref:a,type:"button",onClick:n,disabled:r,"aria-label":"Next page","aria-disabled":r,className:E(t.NAVIGATION_TOKENS.sizes.md.height,t.NAVIGATION_TOKENS.sizes.md.padding.horizontal,t.NAVIGATION_TOKENS.sizes.md.padding.vertical,t.NAVIGATION_TOKENS.radius.default,t.NAVIGATION_TOKENS.sizes.md.fontSize,"border border-input",t.MOTION_TOKENS.transition.colors,`${t.NAVIGATION_TOKENS.states.default.background} ${t.NAVIGATION_TOKENS.states.default.text} ${t.NAVIGATION_TOKENS.states.hover.background} ${t.NAVIGATION_TOKENS.states.hover.text}`,r&&t.NAVIGATION_TOKENS.states.disabled.cursor,Mr,e),...s,children:[o.jsx(D.ChevronRight,{className:"h-4 w-4","aria-hidden":"true"}),o.jsx("span",{className:"sr-only",children:"Next"})]}));Dr.displayName="Pagination.Next";const Ur=l.forwardRef(({className:e,...r},n)=>o.jsx("span",{ref:n,className:E(t.NAVIGATION_TOKENS.sizes.md.padding.horizontal,t.NAVIGATION_TOKENS.sizes.md.padding.vertical,t.NAVIGATION_TOKENS.states.default.text,t.ICON_TOKENS.colors.muted,e),"aria-hidden":"true",...r,children:"…"}));Ur.displayName="Pagination.Ellipsis";const oi=Object.assign(Rt,{Root:Rt,Item:kr,Prev:Pr,Next:Dr,Ellipsis:Ur}),Vt=l.forwardRef(({steps:e,activeStep:r,orientation:n="horizontal",showNumbers:s=!0,className:a,children:d,...i},c)=>{const u=Math.min(Math.max(0,r),e.length-1);return o.jsxs("div",{ref:c,className:E("flex",n==="horizontal"?"flex-row items-start":"flex-col",t.NAVIGATION_TOKENS.spacing.listGap.md,a),...i,children:[e.map((N,f)=>{const O=f===u,m=f<u;return o.jsx(Lr,{step:N,index:f,isActive:O,isCompleted:m,showNumber:s,orientation:n},N.id)}),d]})});Vt.displayName="Stepper.Root";const Lr=l.forwardRef(({className:e,step:r,index:n,isActive:s,isCompleted:a,showNumber:d=!0,orientation:i="horizontal",...c},u)=>o.jsxs("div",{ref:u,className:E("flex items-start",i==="horizontal"?"flex-col":"flex-row",t.NAVIGATION_TOKENS.spacing.listGap.sm,e),...c,children:[o.jsx(Br,{index:n,isActive:s,isCompleted:a,disabled:r.disabled,icon:r.icon,showNumber:d}),o.jsx(Gr,{label:r.label,description:r.description,isActive:s})]}));Lr.displayName="Stepper.Item";const Br=l.forwardRef(({className:e,index:r,isActive:n,isCompleted:s,disabled:a,icon:d,showNumber:i=!0,...c},u)=>{const N=E(t.NAVIGATION_TOKENS.sizes.sm.height,t.NAVIGATION_TOKENS.sizes.sm.width,"flex items-center justify-center",t.NAVIGATION_TOKENS.radius.full,t.NAVIGATION_TOKENS.typography.fontWeight.medium,t.NAVIGATION_TOKENS.sizes.sm.fontSize,"border-2",t.MOTION_TOKENS.transition.colors);return s?o.jsx("div",{ref:u,className:E(N,`${t.NAVIGATION_TOKENS.states.selected.background} ${t.NAVIGATION_TOKENS.states.selected.text} ${t.NAVIGATION_TOKENS.states.selected.border}`,e),"aria-current":n?"step":void 0,...c,children:o.jsx(D.Check,{className:"h-4 w-4","aria-hidden":"true"})}):n?o.jsx("div",{ref:u,className:E(N,`${t.NAVIGATION_TOKENS.states.selected.background} ${t.NAVIGATION_TOKENS.states.selected.text} ${t.NAVIGATION_TOKENS.states.selected.border}`,e),"aria-current":"step",...c,children:d||i&&o.jsx("span",{children:r+1})}):o.jsx("div",{ref:u,className:E(N,`${t.NAVIGATION_TOKENS.states.default.border} ${t.NAVIGATION_TOKENS.border.muted} ${t.NAVIGATION_TOKENS.states.default.background} ${t.NAVIGATION_TOKENS.states.default.text}`,a&&t.NAVIGATION_TOKENS.states.disabled.text,e),...c,children:d||i&&o.jsx("span",{children:r+1})})});Br.displayName="Stepper.Indicator";const Gr=l.forwardRef(({className:e,label:r,description:n,isActive:s,...a},d)=>o.jsxs("div",{ref:d,className:E("flex flex-col",t.NAVIGATION_TOKENS.spacing.listGap.xs,e),...a,children:[o.jsx("span",{className:E(t.NAVIGATION_TOKENS.typography.default,s?t.NAVIGATION_TOKENS.typography.fontWeight.semibold:t.NAVIGATION_TOKENS.typography.fontWeight.normal,s?t.NAVIGATION_TOKENS.states.selected.text:t.NAVIGATION_TOKENS.states.default.text),children:r}),n&&o.jsx("span",{className:E(t.NAVIGATION_TOKENS.typography.sm,t.NAVIGATION_TOKENS.states.default.text,t.ICON_TOKENS.colors.muted),children:n})]}));Gr.displayName="Stepper.Label";const oa=l.forwardRef(({className:e,isActive:r,children:n,...s},a)=>r?o.jsx("div",{ref:a,className:E(t.NAVIGATION_TOKENS.spacing.content.marginTop,e),...s,children:n}):null);oa.displayName="Stepper.Content";const ii=Object.assign(Vt,{Root:Vt,Item:Lr,Indicator:Br,Label:Gr,Content:oa}),ia=K.cva("shrink-0",{variants:{size:{sm:t.ICON_TOKENS.sizes.sm,md:t.ICON_TOKENS.sizes.md,lg:t.ICON_TOKENS.sizes.lg,xl:t.ICON_TOKENS.sizes.xl},color:{default:t.ICON_TOKENS.colors.default,muted:t.ICON_TOKENS.colors.muted,success:t.ICON_TOKENS.colors.success,warning:t.ICON_TOKENS.colors.warning,danger:t.ICON_TOKENS.colors.danger,info:t.ICON_TOKENS.colors.info},stroke:{thin:t.ICON_TOKENS.stroke.thin,normal:t.ICON_TOKENS.stroke.normal,bold:t.ICON_TOKENS.stroke.bold}},defaultVariants:{size:"md",color:"default",stroke:"normal"}}),de=l.forwardRef(({name:e,size:r,color:n,stroke:s,className:a,asChild:d=!1,...i},c)=>{const u=It[e]||It.error;if(!u)return null;const{name:N,asChild:f,size:O,color:m,stroke:p,...T}=i,h=o.jsx(u,{className:E(ia({size:r,color:n,stroke:s}),a),ref:c,...T});return d?o.jsx(qe.Slot,{children:h}):h});de.displayName="Icon";function P(e){if(e===!0)return!0;if(e===!1||typeof window>"u")return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}const Ae={fadeIn:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-in"}),fadeOut:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-out"}),fadeInUp:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-up"}),fadeInDown:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-down"}),fadeInLeft:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-left"}),fadeInRight:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-right"})},Le={slideInUp:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-slide-up"}),slideInDown:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-slide-down"}),slideInLeft:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-slide-left"}),slideInRight:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-slide-right"}),slideOutUp:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-up-out"}),slideOutDown:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-down-out"}),slideOutLeft:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-left-out"}),slideOutRight:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-right-out"})},li={scaleIn:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-scale-in"}),scaleOut:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-scale-out"}),scaleUp:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-hover-scale"}),scaleDown:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-tap-scale"})},Et={hoverLift:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-hover-lift"}),hoverScale:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-hover-scale"}),tapScale:e=>({className:P(e==null?void 0:e.reducedMotion)?"":"tm-motion-tap-scale"})};function di(e){if(e){if(typeof e=="object")return e;switch(e){case"fadeIn":return Ae.fadeIn();case"fadeInUp":return Ae.fadeInUp();case"fadeInDown":return Ae.fadeInDown();case"fadeInLeft":return Ae.fadeInLeft();case"fadeInRight":return Ae.fadeInRight();case"slideInUp":return Le.slideInUp();case"slideInDown":return Le.slideInDown();case"slideInLeft":return Le.slideInLeft();case"slideInRight":return Le.slideInRight();case"scaleIn":return li.scaleIn();default:return}}}function ci(e){if(e){if(typeof e=="object")return e;switch(e){case"hoverLift":return Et.hoverLift();case"hoverScale":return Et.hoverScale();case"tapScale":return Et.tapScale();default:return}}}function gt(e){if(!e)return{};const r=di(e.animation),n=ci(e.hoverAnimation),s=e.animationProps||{};return{...r,...n,...s}}const ui=K.cva(`${t.DOMAIN_TOKENS.surface.bg.default} ${t.DOMAIN_TOKENS.surface.border.default} ${t.DOMAIN_TOKENS.surface.radius.default} ${t.DOMAIN_TOKENS.surface.shadow.default} ${t.DOMAIN_TOKENS.surface.bg.hover} ${t.DOMAIN_TOKENS.surface.border.hover} ${t.DOMAIN_TOKENS.surface.elevation.hover} ${t.DOMAIN_TOKENS.motion.hover.transition} overflow-hidden`,{variants:{size:{default:`${t.DOMAIN_TOKENS.layout.padding.default} ${t.DOMAIN_TOKENS.layout.gap.default}`,compact:`${t.DOMAIN_TOKENS.layout.padding.compact} ${t.DOMAIN_TOKENS.layout.gap.compact}`},variant:{default:"",featured:`${t.DOMAIN_TOKENS.badges.surface.featured}`}},defaultVariants:{size:"default",variant:"default"}}),fi=K.cva(`${t.DOMAIN_TOKENS.image.aspectRatio} ${t.DOMAIN_TOKENS.image.radius} overflow-hidden`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),Ni=K.cva("flex flex-col",{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),mi=K.cva("flex",{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),ze=l.forwardRef(({size:e="default",variant:r="default",className:n,children:s,...a},d)=>o.jsx("div",{ref:d,className:E(ui({size:e,variant:r}),n),...a,children:s}));ze.displayName="CardBase";const Me=l.forwardRef(({size:e="default",className:r,children:n,...s},a)=>o.jsx("div",{ref:a,className:E(fi({size:e}),r),...s,children:n}));Me.displayName="CardBaseImageWrapper";const ke=l.forwardRef(({size:e="default",className:r,children:n,...s},a)=>o.jsx(ae,{ref:a,direction:"vertical",className:E(Ni({size:e}),r),...s,children:n}));ke.displayName="CardBaseContentWrapper";const Pe=l.forwardRef(({size:e="default",className:r,children:n,...s},a)=>o.jsx("div",{ref:a,className:E(mi({size:e}),r),...s,children:n}));Pe.displayName="CardBaseFooterWrapper";const Ti=K.cva("inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"text-primary hover:text-primary/80 underline-offset-4 hover:underline",secondary:"text-secondary-foreground underline-offset-4 hover:underline",accent:"text-accent-foreground hover:text-accent-foreground/80 underline-offset-4 hover:underline",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground rounded-md px-md py-sm",ghost:"text-foreground hover:text-accent-foreground hover:bg-accent rounded-md px-sm py-sm",link:"text-primary underline-offset-4 hover:underline",destructive:"text-destructive hover:text-destructive/80 underline-offset-4 hover:underline"},size:{xs:"h-7 text-xs px-xs py-xs",sm:"h-8 text-xs px-sm py-xs",md:"h-9 text-sm px-md py-sm",lg:"h-10 text-sm px-lg py-sm",xl:"h-11 text-base px-xl py-md"}},defaultVariants:{variant:"link",size:"md"}}),fe=l.forwardRef(({className:e,variant:r,size:n,asChild:s=!1,leftIcon:a,rightIcon:d,children:i,...c},u)=>{const N=s?qe.Slot:"a";return o.jsxs(N,{className:E(Ti({variant:r,size:n,className:e})),ref:u,...c,children:[a&&o.jsx("span",{className:"inline-flex items-center",children:a}),i,d&&o.jsx("span",{className:"inline-flex items-center",children:d})]})});fe.displayName="Link";const Oi=K.cva("group relative",{variants:{size:{default:"",compact:""},variant:{default:"",featured:""}},defaultVariants:{size:"default",variant:"default"}}),pi=K.cva("absolute z-10",{variants:{size:{default:t.DOMAIN_TOKENS.badges.position.default,compact:t.DOMAIN_TOKENS.badges.position.compact}},defaultVariants:{size:"default"}}),gi=K.cva(`inline-flex items-center ${t.DOMAIN_TOKENS.badges.radius} ${t.DOMAIN_TOKENS.badges.shadow} ${t.DOMAIN_TOKENS.badges.text.color} ${t.TEXT_TOKENS.fontSize.xs} ${t.TEXT_TOKENS.fontWeight.semibold}`,{variants:{size:{default:t.DOMAIN_TOKENS.badges.size.md,compact:t.DOMAIN_TOKENS.badges.size.sm},variant:{default:t.DOMAIN_TOKENS.badges.surface.default,featured:t.DOMAIN_TOKENS.badges.surface.featured}},defaultVariants:{size:"default",variant:"featured"}}),Si=K.cva(`absolute inset-0 ${t.DOMAIN_TOKENS.image.overlay.gradient} opacity-0 ${t.MOTION_TOKENS.transition.opacity} ${t.MOTION_TOKENS.duration.normal} group-hover:opacity-100`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),hi=K.cva(`object-cover ${t.MOTION_TOKENS.transition.transform} ${t.MOTION_TOKENS.duration.slow} ${t.DOMAIN_TOKENS.motion.hover.scale}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),Ei=K.cva(`flex flex-col ${t.DOMAIN_TOKENS.metadata.spacing.vertical}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),sn=K.cva(`flex items-center ${t.DOMAIN_TOKENS.metadata.spacing.horizontal} ${t.DOMAIN_TOKENS.metadata.text.secondary} ${t.TEXT_TOKENS.fontSize.xs}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),an=K.cva(`${t.ICON_TOKENS.sizes.md} ${t.ICON_TOKENS.colors.muted}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),xi=K.cva(`${t.DOMAIN_TOKENS.metadata.text.secondary} ${t.TEXT_TOKENS.fontSize.xs}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),bi=K.cva("border-t border-border",{variants:{size:{default:t.DOMAIN_TOKENS.spacing.footer.paddingTopDefault,compact:t.DOMAIN_TOKENS.spacing.footer.paddingTopCompact}},defaultVariants:{size:"default"}}),la=l.forwardRef(({name:e,description:r,genres:n,followers:s,plays:a,imageUrl:d,href:i,featured:c=!1,showImage:u=!0,popularBadgeText:N,followersLabel:f,playsLabel:O,size:m="default",variant:p,className:T,animation:h,...g},S)=>{if(!e||e.trim()==="")throw new Error('ArtistCard: "name" prop is required and cannot be empty');if(!f||f.trim()==="")throw new Error('ArtistCard: "followersLabel" prop is required and cannot be empty');if(!O||O.trim()==="")throw new Error('ArtistCard: "playsLabel" prop is required and cannot be empty');const x=gt({animation:(h==null?void 0:h.animation)||"fadeInUp",hoverAnimation:(h==null?void 0:h.hoverAnimation)||"hoverLift",animationProps:h==null?void 0:h.animationProps}),b=p||(c?"featured":"default");return o.jsx(q,{...x,children:o.jsxs(ze,{ref:S,size:m,variant:b,className:E(Oi({size:m,variant:p}),T),...g,children:[c&&N&&o.jsx("div",{className:pi({size:m}),children:o.jsx("span",{className:gi({size:m,variant:"featured"}),children:N})}),u&&o.jsx(Me,{size:m,children:o.jsxs("div",{className:"relative w-full overflow-hidden bg-gradient-to-br from-muted to-muted/50",children:[d?o.jsx("img",{src:d,alt:e,className:E("h-full w-full",hi({size:m}))}):o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsx(de,{name:"info",size:"xl",color:"muted",className:t.ICON_TOKENS.sizes["4xl"],"aria-hidden":"true"})}),o.jsx("div",{className:Si({size:m})})]})}),o.jsxs(ke,{size:m,children:[o.jsx(Se,{level:3,className:E("line-clamp-2",t.TEXT_TOKENS.fontSize.lg,t.TEXT_TOKENS.fontWeight.bold,t.MOTION_TOKENS.transition.colors,"group-hover:text-primary",m==="compact"?t.DOMAIN_TOKENS.spacing.section.titleToSubtitle:t.DOMAIN_TOKENS.spacing.section.subtitleToMetadata),children:i?o.jsx(fe,{href:i,variant:"ghost",children:e}):e}),r&&o.jsx(W,{size:"sm",variant:"muted",className:E("line-clamp-2",m==="compact"?t.DOMAIN_TOKENS.spacing.section.titleToSubtitle:t.DOMAIN_TOKENS.spacing.section.subtitleToMetadata),children:r}),n&&o.jsx(W,{size:"xs",variant:"muted",className:E(xi({size:m}),m==="compact"?t.DOMAIN_TOKENS.spacing.section.titleToSubtitle:t.DOMAIN_TOKENS.spacing.section.subtitleToMetadata),children:n}),(s!==void 0||a!==void 0)&&o.jsxs("div",{className:Ei({size:m}),children:[s!==void 0&&o.jsxs("div",{className:sn({size:m}),children:[o.jsx(de,{name:"info",size:"sm",color:"muted",className:an({size:m}),"aria-hidden":"true"}),o.jsxs(W,{size:"xs",variant:"muted",children:[s.toLocaleString()," ",f]})]}),a!==void 0&&o.jsxs("div",{className:sn({size:m}),children:[o.jsx(de,{name:"info",size:"sm",color:"muted",className:an({size:m}),"aria-hidden":"true"}),o.jsxs(W,{size:"xs",variant:"muted",children:[a.toLocaleString()," ",O]})]})]})]}),(s!==void 0||a!==void 0)&&o.jsx(Pe,{size:m,children:o.jsx("div",{className:bi({size:m})})})]})})});la.displayName="ArtistCard";const Ii=K.cva("absolute z-10",{variants:{size:{default:t.DOMAIN_TOKENS.badges.position.default,compact:t.DOMAIN_TOKENS.badges.position.compact}},defaultVariants:{size:"default"}}),vi=K.cva(`inline-flex items-center ${t.DOMAIN_TOKENS.badges.radius} ${t.DOMAIN_TOKENS.badges.shadow} ${t.DOMAIN_TOKENS.badges.size.sm} ${t.DOMAIN_TOKENS.badges.text.color} ${t.TEXT_TOKENS.fontSize.xs} font-semibold`,{variants:{variant:{default:t.DOMAIN_TOKENS.badges.surface.default,featured:t.DOMAIN_TOKENS.badges.surface.featured}},defaultVariants:{variant:"featured"}}),_i=K.cva(`flex flex-col ${t.DOMAIN_TOKENS.metadata.spacing.vertical}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),on=K.cva(`flex items-center ${t.DOMAIN_TOKENS.metadata.spacing.horizontal} ${t.DOMAIN_TOKENS.metadata.text.secondary} ${t.TEXT_TOKENS.fontSize.xs}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),ln=K.cva(`${t.ICON_TOKENS.sizes.md} ${t.ICON_TOKENS.colors.muted}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),Ki=K.cva("border-t border-border",{variants:{size:{default:t.DOMAIN_TOKENS.spacing.footer.paddingTopDefault,compact:t.DOMAIN_TOKENS.spacing.footer.paddingTopCompact}},defaultVariants:{size:"default"}}),wi=K.cva(`inline-flex items-center justify-center ${t.DOMAIN_TOKENS.badges.surface.featured} ${t.DOMAIN_TOKENS.badges.text.color} ${t.DOMAIN_TOKENS.badges.shadow} ${t.DOMAIN_TOKENS.motion.hover.transition} font-semibold transform`,{variants:{size:{default:t.DOMAIN_TOKENS.spacing.button.paddingDefault,compact:t.DOMAIN_TOKENS.spacing.button.paddingCompact}},defaultVariants:{size:"default"}}),yi=K.cva(`${t.ICON_TOKENS.sizes.md} ${t.DOMAIN_TOKENS.spacing.button.iconMarginLeft}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),Ai=K.cva("bg-gradient-to-r from-accent-500 to-primary-600 bg-clip-text text-transparent",{variants:{size:{default:t.TEXT_TOKENS.fontSize.lg,compact:t.TEXT_TOKENS.fontSize.md}},defaultVariants:{size:"default"}}),da=l.forwardRef(({title:e,description:r,date:n,venueName:s,price:a,imageUrl:d,href:i,ticketUrl:c,featured:u=!1,showImage:N=!0,getTicketsLabel:f,featuredBadgeText:O,size:m="default",variant:p,className:T,animation:h,...g},S)=>{const x=gt({animation:(h==null?void 0:h.animation)||"fadeInUp",hoverAnimation:(h==null?void 0:h.hoverAnimation)||"hoverLift",animationProps:h==null?void 0:h.animationProps}),b=p||(u?"featured":"default");return o.jsx(q,{...x,children:o.jsxs(ze,{ref:S,size:m,variant:b,className:E("group relative",T),...g,children:[u&&O&&o.jsx("div",{className:Ii({size:m}),children:o.jsx("span",{className:vi({variant:"featured"}),children:O})}),N&&o.jsx(Me,{size:m,children:o.jsxs("div",{className:"relative w-full overflow-hidden bg-gradient-to-br from-surface-elevated1 to-surface-elevated2",children:[d?o.jsx("img",{src:d,alt:e,className:E("h-full w-full object-cover",t.DOMAIN_TOKENS.motion.hover.transition,t.DOMAIN_TOKENS.motion.hover.scale)}):o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsx(de,{name:"info",size:"xl",color:"muted",className:t.ICON_TOKENS.sizes["4xl"],"aria-hidden":"true"})}),o.jsx("div",{className:E("absolute inset-0 opacity-0 transition-opacity duration-normal group-hover:opacity-100",t.DOMAIN_TOKENS.image.overlay.gradient)})]})}),o.jsxs(ke,{size:m,children:[o.jsx(Se,{level:3,className:E("line-clamp-2 transition-colors group-hover:text-primary",t.TEXT_TOKENS.fontSize.lg,t.TEXT_TOKENS.fontWeight.bold,t.DOMAIN_TOKENS.spacing.section.titleToSubtitle),children:i?o.jsx(fe,{href:i,variant:"ghost",children:e}):e}),r&&o.jsx(W,{size:"sm",muted:!0,className:E("line-clamp-2",m==="compact"?t.DOMAIN_TOKENS.spacing.section.titleToSubtitle:t.DOMAIN_TOKENS.spacing.section.subtitleToMetadata),children:r}),o.jsxs("div",{className:_i({size:m}),children:[n&&o.jsxs("div",{className:on({size:m}),children:[o.jsx(Qe,{className:ln({size:m})}),o.jsx(W,{size:"xs",muted:!0,children:n})]}),s&&o.jsxs("div",{className:on({size:m}),children:[o.jsx(Je,{className:ln({size:m})}),o.jsx(W,{size:"xs",muted:!0,className:"line-clamp-1",children:s})]})]})]}),o.jsx(Pe,{size:m,children:o.jsxs("div",{className:E("w-full",Ki({size:m})),children:[c&&o.jsxs(fe,{href:c,className:E("w-full",wi({size:m})),target:"_blank",rel:"noopener noreferrer",children:[f,o.jsx(ce,{className:yi({size:m})})]}),!c&&a&&o.jsx("div",{className:"text-right",children:o.jsx(W,{size:m==="compact"?"md":"lg",weight:"bold",children:o.jsx("span",{className:Ai({size:m}),children:a})})})]})})]})})});da.displayName="EventCard";const Ci=K.cva("absolute z-10",{variants:{size:{default:t.DOMAIN_TOKENS.badges.position.default,compact:t.DOMAIN_TOKENS.badges.position.compact}},defaultVariants:{size:"default"}}),$i=K.cva(`inline-flex items-center ${t.DOMAIN_TOKENS.badges.radius} ${t.DOMAIN_TOKENS.badges.shadow} ${t.DOMAIN_TOKENS.badges.size.sm} ${t.DOMAIN_TOKENS.badges.text.color} ${t.TEXT_TOKENS.fontSize.xs} font-semibold`,{variants:{variant:{default:t.DOMAIN_TOKENS.badges.surface.default,featured:t.DOMAIN_TOKENS.badges.surface.featured}},defaultVariants:{variant:"featured"}}),dn=K.cva(`inline-flex items-center justify-center ${t.BUTTON_TOKENS.radius} ${t.BUTTON_TOKENS.variant.primary.background} ${t.BUTTON_TOKENS.variant.primary.text} ${t.BUTTON_TOKENS.shadow.primary} ${t.BUTTON_TOKENS.variant.primary.hover} ${t.BUTTON_TOKENS.transition.colors} font-semibold`,{variants:{size:{default:`${t.BUTTON_TOKENS.height.md} ${t.BUTTON_TOKENS.padding.horizontal.md} ${t.BUTTON_TOKENS.padding.vertical.sm} ${t.BUTTON_TOKENS.fontSize.md}`,compact:`${t.BUTTON_TOKENS.height.sm} ${t.BUTTON_TOKENS.padding.horizontal.sm} ${t.BUTTON_TOKENS.padding.vertical.sm} ${t.BUTTON_TOKENS.fontSize.sm}`}},defaultVariants:{size:"default"}}),cn=K.cva(`${t.ICON_TOKENS.sizes.md} ${t.DOMAIN_TOKENS.spacing.button.iconMarginLeft}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),ca=l.forwardRef(({title:e,description:r,imageUrl:n,href:s,ctaUrl:a,ctaLabel:d,featured:i=!1,showImage:c=!0,featuredBadgeText:u,size:N="default",variant:f,className:O,animation:m,...p},T)=>{const h=gt({animation:(m==null?void 0:m.animation)||"fadeInUp",hoverAnimation:(m==null?void 0:m.hoverAnimation)||"hoverLift",animationProps:m==null?void 0:m.animationProps}),g=f||(i?"featured":"default");return o.jsx(q,{...h,children:o.jsxs(ze,{ref:T,size:N,variant:g,className:E("group relative",O),...p,children:[i&&u&&o.jsx("div",{className:Ci({size:N}),children:o.jsx("span",{className:$i({variant:"featured"}),children:u})}),c&&o.jsx(Me,{size:N,children:o.jsxs("div",{className:"relative w-full overflow-hidden bg-gradient-to-br from-surface-elevated1 to-surface-elevated2",children:[n?o.jsx("img",{src:n,alt:e,className:E("h-full w-full object-cover",t.DOMAIN_TOKENS.motion.hover.transition,t.DOMAIN_TOKENS.motion.hover.scale)}):o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsx(de,{name:"info",size:"xl",color:"muted",className:t.ICON_TOKENS.sizes["4xl"],"aria-hidden":"true"})}),o.jsx("div",{className:E("absolute inset-0 opacity-0 transition-opacity duration-normal group-hover:opacity-100",t.DOMAIN_TOKENS.image.overlay.gradient)})]})}),o.jsxs(ke,{size:N,children:[o.jsx(Se,{level:3,className:E("line-clamp-2 transition-colors group-hover:text-primary",t.TEXT_TOKENS.fontSize.lg,t.TEXT_TOKENS.fontWeight.bold,t.DOMAIN_TOKENS.spacing.section.titleToSubtitle),children:s?o.jsx(fe,{href:s,variant:"ghost",children:e}):e}),r&&o.jsx(W,{size:"sm",variant:"muted",className:E("line-clamp-2",N==="compact"?t.DOMAIN_TOKENS.spacing.section.titleToSubtitle:t.DOMAIN_TOKENS.spacing.section.subtitleToMetadata),children:r})]}),o.jsx(Pe,{size:N,children:o.jsxs("div",{className:"w-full",children:[a&&o.jsxs(fe,{href:a,className:E("w-full",dn({size:N})),children:[d,o.jsx(ce,{className:cn({size:N})})]}),!a&&o.jsxs("div",{className:E("w-full",dn({size:N})),children:[d,o.jsx(ce,{className:cn({size:N})})]})]})})]})})});ca.displayName="PromoCard";const xt=K.cva("absolute z-10",{variants:{size:{default:t.DOMAIN_TOKENS.badges.position.default,compact:t.DOMAIN_TOKENS.badges.position.compact}},defaultVariants:{size:"default"}}),bt=K.cva(`inline-flex items-center ${t.DOMAIN_TOKENS.badges.radius} ${t.DOMAIN_TOKENS.badges.shadow} ${t.DOMAIN_TOKENS.badges.size.sm} ${t.DOMAIN_TOKENS.badges.text.color} ${t.TEXT_TOKENS.fontSize.xs} font-semibold`,{variants:{variant:{default:t.DOMAIN_TOKENS.badges.surface.default,featured:t.DOMAIN_TOKENS.badges.surface.featured,vip:t.DOMAIN_TOKENS.badges.surface.featured,discount:t.DOMAIN_TOKENS.badges.surface.default}},defaultVariants:{variant:"default"}}),Ri=K.cva(`flex items-center ${t.DOMAIN_TOKENS.priceCapacity.spacing}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),Vi=K.cva(`${t.DOMAIN_TOKENS.priceCapacity.text.primary} font-bold`,{variants:{size:{default:t.TEXT_TOKENS.fontSize.lg,compact:t.TEXT_TOKENS.fontSize.md}},defaultVariants:{size:"default"}}),ji=K.cva(`${t.DOMAIN_TOKENS.priceCapacity.text.secondary}`,{variants:{size:{default:t.TEXT_TOKENS.fontSize.sm,compact:t.TEXT_TOKENS.fontSize.xs}},defaultVariants:{size:"default"}}),zi=K.cva(`inline-flex items-center ${t.DOMAIN_TOKENS.metadata.spacing.horizontal} ${t.TEXT_TOKENS.fontSize.xs} font-medium`,{variants:{availability:{available:`${t.DOMAIN_TOKENS.metadata.text.primary}`,sold_out:`${t.DOMAIN_TOKENS.metadata.text.secondary} opacity-60`,available_soon:`${t.DOMAIN_TOKENS.metadata.text.secondary}`}},defaultVariants:{availability:"available"}}),Mi=K.cva("border-t border-border",{variants:{size:{default:t.DOMAIN_TOKENS.spacing.footer.paddingTopDefault,compact:t.DOMAIN_TOKENS.spacing.footer.paddingTopCompact}},defaultVariants:{size:"default"}}),un=K.cva(`inline-flex items-center justify-center ${t.DOMAIN_TOKENS.badges.surface.featured} ${t.DOMAIN_TOKENS.badges.text.color} ${t.DOMAIN_TOKENS.badges.shadow} ${t.DOMAIN_TOKENS.motion.hover.transition} font-semibold transform`,{variants:{size:{default:t.DOMAIN_TOKENS.spacing.button.paddingDefault,compact:t.DOMAIN_TOKENS.spacing.button.paddingCompact},disabled:{true:"opacity-50 cursor-not-allowed",false:"hover:scale-105 hover:from-accent-600 hover:to-primary-700"}},defaultVariants:{size:"default",disabled:!1}}),fn=K.cva(`${t.ICON_TOKENS.sizes.md} ${t.DOMAIN_TOKENS.spacing.button.iconMarginLeft}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),ua=l.forwardRef(({title:e,description:r,price:n,capacity:s,availability:a="available",imageUrl:d,href:i,purchaseUrl:c,purchaseLabel:u,vipBadgeText:N,discountBadgeText:f,featured:O=!1,featuredBadgeText:m,showImage:p=!0,size:T="default",variant:h,className:g,animation:S,...x},b)=>{const I=gt({animation:(S==null?void 0:S.animation)||"fadeInUp",hoverAnimation:(S==null?void 0:S.hoverAnimation)||"hoverLift",animationProps:S==null?void 0:S.animationProps}),v=h||(O?"featured":"default"),_=a==="sold_out"||a==="available_soon",$=()=>!O||!m?"":T==="compact"?`${t.DOMAIN_TOKENS.badges.position.compact} ${t.DOMAIN_TOKENS.badges.positionY.xl}`:`${t.DOMAIN_TOKENS.badges.position.default} ${t.DOMAIN_TOKENS.badges.positionY["2xl"]}`,y=()=>!(O&&m)&&!N?"":T==="compact"?`${t.DOMAIN_TOKENS.badges.position.compact} ${t.DOMAIN_TOKENS.badges.positionY["2xl"]}`:`${t.DOMAIN_TOKENS.badges.position.default} ${t.DOMAIN_TOKENS.badges.positionY["3xl"]}`,A=(()=>{switch(a){case"sold_out":return"Sold Out";case"available_soon":return"Available Soon";case"available":default:return null}})();return o.jsx(q,{...I,children:o.jsxs(ze,{ref:b,size:T,variant:v,className:E("group relative",g),...x,children:[O&&m&&o.jsx("div",{className:xt({size:T}),children:o.jsx("span",{className:bt({variant:"featured"}),children:m})}),N&&o.jsx("div",{className:E(xt({size:T}),$()),children:o.jsx("span",{className:bt({variant:"vip"}),children:N})}),f&&o.jsx("div",{className:E(xt({size:T}),y()),children:o.jsx("span",{className:bt({variant:"discount"}),children:f})}),p&&o.jsx(Me,{size:T,children:o.jsxs("div",{className:"relative w-full overflow-hidden bg-gradient-to-br from-surface-elevated1 to-surface-elevated2",children:[d?o.jsx("img",{src:d,alt:e,className:E("h-full w-full object-cover",t.DOMAIN_TOKENS.motion.hover.transition,t.DOMAIN_TOKENS.motion.hover.scale)}):o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsx(de,{name:"info",size:"xl",color:"muted",className:t.ICON_TOKENS.sizes["4xl"],"aria-hidden":"true"})}),o.jsx("div",{className:E("absolute inset-0 opacity-0 transition-opacity duration-normal group-hover:opacity-100",t.DOMAIN_TOKENS.image.overlay.gradient)})]})}),o.jsxs(ke,{size:T,children:[o.jsx(Se,{level:3,className:E("line-clamp-2 transition-colors group-hover:text-primary",t.TEXT_TOKENS.fontSize.lg,t.TEXT_TOKENS.fontWeight.bold,t.DOMAIN_TOKENS.spacing.section.titleToSubtitle),children:i?o.jsx(fe,{href:i,variant:"ghost",children:e}):e}),r&&o.jsx(W,{size:"sm",variant:"muted",className:E("line-clamp-2",T==="compact"?t.DOMAIN_TOKENS.spacing.section.titleToSubtitle:t.DOMAIN_TOKENS.spacing.section.subtitleToMetadata),children:r}),(n||s)&&o.jsxs("div",{className:Ri({size:T}),children:[n&&o.jsx(W,{size:T==="compact"?"md":"lg",weight:"bold",children:o.jsx("span",{className:Vi({size:T}),children:n})}),s&&o.jsx(W,{size:T==="compact"?"xs":"sm",children:o.jsx("span",{className:ji({size:T}),children:s})})]}),A&&o.jsx("div",{className:zi({availability:a}),children:o.jsx(W,{size:"xs",variant:a==="sold_out"?"muted":"primary",children:A})})]}),o.jsx(Pe,{size:T,children:o.jsxs("div",{className:E("w-full",Mi({size:T})),children:[c&&!_&&o.jsxs(fe,{href:c,className:E("w-full",un({size:T,disabled:!1})),target:"_blank",rel:"noopener noreferrer",children:[u,o.jsx(ce,{className:fn({size:T})})]}),(!c||_)&&o.jsxs("div",{className:E("w-full",un({size:T,disabled:_})),children:[u,o.jsx(ce,{className:fn({size:T})})]})]})})]})})});ua.displayName="TicketCard";exports.accentColors=B.accentColors;exports.animations=B.animations;exports.baseColors=B.baseColors;exports.chartColors=B.chartColors;exports.colorCSSVariables=B.colorCSSVariables;exports.cssVariableColorTokens=B.cssVariableColorTokens;exports.durations=B.durations;exports.easings=B.easings;exports.keyframes=B.keyframes;exports.motionCSSVariables=B.motionCSSVariables;exports.primaryColors=B.primaryColors;exports.reducedMotion=B.reducedMotion;exports.secondaryColors=B.secondaryColors;exports.semanticColors=B.semanticColors;exports.springs=B.springs;exports.surfaceColors=B.surfaceColors;exports.tailwindMotionConfig=B.tailwindMotionConfig;exports.tailwindThemeColors=B.tailwindThemeColors;exports.textColors=B.textColors;exports.transitions=B.transitions;exports.ALERT_TOKENS=t.ALERT_TOKENS;exports.BUTTON_TOKENS=t.BUTTON_TOKENS;exports.CARD_TOKENS=t.CARD_TOKENS;exports.CHECKBOX_TOKENS=t.CHECKBOX_TOKENS;exports.DATA_TOKENS=t.DATA_TOKENS;exports.DOMAIN_TOKENS=t.DOMAIN_TOKENS;exports.DROPDOWN_TOKENS=t.DROPDOWN_TOKENS;exports.ICON_TOKENS=t.ICON_TOKENS;exports.INPUT_TOKENS=t.INPUT_TOKENS;exports.MENU_TOKENS=t.MENU_TOKENS;exports.MOTION_TOKENS=t.MOTION_TOKENS;exports.NAVIGATION_TOKENS=t.NAVIGATION_TOKENS;exports.NOTIFICATION_TOKENS=t.NOTIFICATION_TOKENS;exports.OVERLAY_TOKENS=t.OVERLAY_TOKENS;exports.POPOVER_TOKENS=t.POPOVER_TOKENS;exports.RADIO_TOKENS=t.RADIO_TOKENS;exports.SECTION_TOKENS=t.SECTION_TOKENS;exports.SURFACE_TOKENS=t.SURFACE_TOKENS;exports.SWITCH_TOKENS=t.SWITCH_TOKENS;exports.TEXT_TOKENS=t.TEXT_TOKENS;exports.TOAST_TOKENS=t.TOAST_TOKENS;exports.TOOLTIP_TOKENS=t.TOOLTIP_TOKENS;exports.UI_COLORS=t.UI_COLORS;exports.allCSSVariables=t.allCSSVariables;exports.allCSSVariablesCSS=t.allCSSVariablesCSS;exports.generateCSSVariablesCSS=t.generateCSSVariablesCSS;exports.tokenSystemSummary=t.tokenSystemSummary;exports.accentColoredShadows=R.accentColoredShadows;exports.borderRadius=R.borderRadius;exports.componentRadius=R.componentRadius;exports.componentShadowMapping=R.componentShadowMapping;exports.elevationShadows=R.elevationShadows;exports.focusRings=R.focusRings;exports.fontFamily=R.fontFamily;exports.fontSize=R.fontSize;exports.fontSizeWithMd=R.fontSizeWithMd;exports.fontWeight=R.fontWeight;exports.glowEffects=R.glowEffects;exports.layoutSpacing=R.layoutSpacing;exports.letterSpacing=R.letterSpacing;exports.lineHeight=R.lineHeight;exports.motionV2CSSVariables=R.motionV2CSSVariables;exports.motionV2Combined=R.motionV2Combined;exports.motionV2Durations=R.motionV2Durations;exports.motionV2Easings=R.motionV2Easings;exports.motionV2Fade=R.motionV2Fade;exports.motionV2Scale=R.motionV2Scale;exports.motionV2Slide=R.motionV2Slide;exports.motionV2TailwindConfig=R.motionV2TailwindConfig;exports.motionV2Transitions=R.motionV2Transitions;exports.primaryColoredShadows=R.primaryColoredShadows;exports.radiusCSSVariables=R.radiusCSSVariables;exports.semanticSpacing=R.semanticSpacing;exports.shadowBase=R.shadowBase;exports.shadowCSSVariables=R.shadowCSSVariables;exports.shadowOpacity=R.shadowOpacity;exports.spacing=R.spacing;exports.spacingCSSVariables=R.spacingCSSVariables;exports.tailwindRadiusConfig=R.tailwindRadiusConfig;exports.tailwindShadowConfig=R.tailwindShadowConfig;exports.tailwindSpacingConfig=R.tailwindSpacingConfig;exports.tailwindTypographyConfig=R.tailwindTypographyConfig;exports.textStyles=R.textStyles;exports.typographyCSSVariables=R.typographyCSSVariables;exports.Alert=gn;exports.ArtistCard=la;exports.Backdrop=rt;exports.Body=hn;exports.Box=q;exports.Breadcrumbs=si;exports.Button=ne;exports.Caption=xn;exports.Card=Re;exports.CardBody=Zt;exports.CardFooter=Jt;exports.CardHeader=Qt;exports.Checkbox=Cn;exports.Code=In;exports.Column=ya;exports.ContainerSurface=tt;exports.ContextMenuContent=Ls;exports.ContextMenuGroup=Bs;exports.ContextMenuItem=Gs;exports.ContextMenuLabel=Hs;exports.ContextMenuRoot=Us;exports.ContextMenuSeparator=Xs;exports.ContextMenuTrigger=Fs;exports.DataList=we;exports.DataListItem=xr;exports.DataListLabel=br;exports.DataListRoot=we;exports.DataListValue=Ir;exports.Dialog=Ga;exports.DialogBody=or;exports.DialogDescription=ar;exports.DialogFooter=ir;exports.DialogHeader=nr;exports.DialogRoot=Ge;exports.DialogTitle=sr;exports.Display=_n;exports.DropdownMenuCheckItem=ws;exports.DropdownMenuContent=Tr;exports.DropdownMenuGroup=Or;exports.DropdownMenuItem=Ke;exports.DropdownMenuLabel=pr;exports.DropdownMenuRadioGroup=As;exports.DropdownMenuRadioItem=Cs;exports.DropdownMenuRoot=Ks;exports.DropdownMenuSeparator=gr;exports.DropdownMenuSub=$s;exports.DropdownMenuSubContent=Rs;exports.DropdownMenuSubTrigger=Vs;exports.DropdownMenuTrigger=js;exports.EmptyState=Ee;exports.EmptyStateAction=hr;exports.EmptyStateDescription=Er;exports.EmptyStateIcon=Tt;exports.EmptyStateTitle=Ot;exports.EventCard=da;exports.Field=$e;exports.Flex=Gn;exports.Grid=Hn;exports.Heading=Se;exports.HoverCardContent=zs;exports.HoverCardRoot=Ms;exports.HoverCardTrigger=ks;exports.ICONS_MAP=It;exports.Icon=de;exports.IconArrowRight=ce;exports.IconCalendar=Qe;exports.IconCheck=Ze;exports.IconChevronDown=zt;exports.IconChevronRight=Mt;exports.IconClose=kt;exports.IconError=Pt;exports.IconInfo=Dt;exports.IconLocation=Je;exports.IconMenu=Ut;exports.IconSearch=Lt;exports.IconSuccess=Bt;exports.IconWarning=Gt;exports.Input=Rn;exports.Label=qt;exports.Lead=yn;exports.Modal=ss;exports.ModalBody=tr;exports.ModalFooter=rr;exports.ModalHeader=er;exports.NotificationCenter=Ja;exports.NotificationCenterDismissAll=nt;exports.NotificationCenterGroupHeader=st;exports.NotificationCenterItem=at;exports.NotificationCenterList=ot;exports.NotificationCenterPanel=cr;exports.NotificationCenterProvider=ls;exports.NotificationCenterTrigger=ur;exports.Pagination=oi;exports.PopoverArrow=ds;exports.PopoverContent=Nt;exports.PopoverRoot=_e;exports.PopoverTrigger=mt;exports.Portal=Ne;exports.PromoCard=ca;exports.Radio=Mn;exports.RadioGroup=zn;exports.Row=et;exports.Section=es;exports.SegmentedControl=ni;exports.Select=Sa;exports.SelectListbox=Wt;exports.SelectOption=Yt;exports.SelectRoot=Xt;exports.SelectTrigger=Ft;exports.Skeleton=Sr;exports.Stack=ae;exports.Stepper=ii;exports.Surface=Fn;exports.Table=Z;exports.TableBody=vr;exports.TableCell=_r;exports.TableEmpty=Kr;exports.TableExpandableContent=wr;exports.TableHead=yr;exports.TableHeader=Ar;exports.TableLoadingState=Cr;exports.TableRoot=Z;exports.TableRow=$r;exports.TableSortIcon=pt;exports.Tabs=ti;exports.Text=W;exports.Textarea=Bn;exports.TicketCard=ua;exports.Toast=lr;exports.ToastProvider=Fa;exports.ToastViewport=dr;exports.alertVariants=pn;exports.bodyVariants=Sn;exports.buttonVariants=Tn;exports.captionVariants=En;exports.checkboxVariants=An;exports.codeVariants=bn;exports.containerSurfaceVariants=ts;exports.displayVariants=vn;exports.headingVariants=Kn;exports.iconVariants=ia;exports.inputVariants=$n;exports.labelVariants=Wn;exports.leadVariants=wn;exports.modalVariants=ns;exports.popoverContentVariants=vs;exports.radioVariants=Vn;exports.segmentedControlItemVariants=na;exports.segmentedControlRootVariants=ra;exports.selectListboxVariants=Pn;exports.selectOptionVariants=Dn;exports.selectTriggerVariants=kn;exports.skeletonVariants=Ws;exports.surfaceVariants=Xn;exports.tabsListVariants=Qs;exports.tabsTriggerVariants=Zs;exports.textVariants=On;exports.textareaVariants=Ln;exports.useNotificationCenter=Za;exports.useNotificationCenterContext=Ve;exports.useTableContext=qs;exports.useToast=Wa;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("./motion-DJx1TbXJ.cjs"),t=require("./tokens/index.cjs"),R=require("./typography-C-Nb4y0o.cjs"),o=require("react/jsx-runtime"),Qe=require("@radix-ui/react-slot"),K=require("class-variance-authority"),ie=require("react"),ga=require("clsx"),Sa=require("tailwind-merge"),ha=require("@radix-ui/react-label"),U=require("lucide-react"),Tn=require("react-dom");function zt(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const l=zt(ie),On=zt(ha),xa=zt(Tn);function x(...e){return Sa.twMerge(ga.clsx(e))}const pn=K.cva(`inline-flex items-center justify-center ${t.BUTTON_TOKENS.gap} whitespace-nowrap ${t.BUTTON_TOKENS.radius} ${t.BUTTON_TOKENS.fontSize.md} font-medium ${t.BUTTON_TOKENS.transition.colors} focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:${t.BUTTON_TOKENS.iconSize} [&_svg]:shrink-0`,{variants:{variant:{primary:`${t.BUTTON_TOKENS.variant.primary.background} ${t.BUTTON_TOKENS.variant.primary.text} ${t.BUTTON_TOKENS.shadow.primary} ${t.BUTTON_TOKENS.variant.primary.hover}`,secondary:`${t.BUTTON_TOKENS.variant.secondary.background} ${t.BUTTON_TOKENS.variant.secondary.text} ${t.BUTTON_TOKENS.shadow.default} ${t.BUTTON_TOKENS.variant.secondary.hover}`,accent:`${t.BUTTON_TOKENS.variant.accent.background} ${t.BUTTON_TOKENS.variant.accent.text} ${t.BUTTON_TOKENS.shadow.default} ${t.BUTTON_TOKENS.variant.accent.hover}`,outline:`${t.BUTTON_TOKENS.variant.outline.border} ${t.BUTTON_TOKENS.variant.outline.background} ${t.BUTTON_TOKENS.shadow.default} ${t.BUTTON_TOKENS.variant.outline.hover.background} ${t.BUTTON_TOKENS.variant.outline.hover.text}`,ghost:`${t.BUTTON_TOKENS.variant.ghost.hover.background} ${t.BUTTON_TOKENS.variant.ghost.hover.text}`,destructive:`${t.BUTTON_TOKENS.variant.destructive.background} ${t.BUTTON_TOKENS.variant.destructive.text} ${t.BUTTON_TOKENS.shadow.default} ${t.BUTTON_TOKENS.variant.destructive.hover}`},size:{sm:`${t.BUTTON_TOKENS.height.sm} ${t.BUTTON_TOKENS.radius} ${t.BUTTON_TOKENS.padding.horizontal.sm} ${t.BUTTON_TOKENS.padding.vertical.sm} ${t.BUTTON_TOKENS.fontSize.sm}`,md:`${t.BUTTON_TOKENS.height.md} ${t.BUTTON_TOKENS.radius} ${t.BUTTON_TOKENS.padding.horizontal.md} ${t.BUTTON_TOKENS.padding.vertical.md} ${t.BUTTON_TOKENS.fontSize.md}`,lg:`${t.BUTTON_TOKENS.height.lg} ${t.BUTTON_TOKENS.radius} ${t.BUTTON_TOKENS.padding.horizontal.lg} ${t.BUTTON_TOKENS.padding.vertical.md} ${t.BUTTON_TOKENS.fontSize.lg}`,icon:`${t.BUTTON_TOKENS.height.icon} ${t.BUTTON_TOKENS.width.icon}`}},defaultVariants:{variant:"primary",size:"md"}}),ne=l.forwardRef(({className:e,variant:r,size:n,asChild:s=!1,leftIcon:a,rightIcon:d,children:i,...c},u)=>{const N=s?Qe.Slot:"button";return o.jsxs(N,{className:x(pn({variant:r,size:n,className:e})),ref:u,...c,children:[a&&o.jsx("span",{className:"inline-flex items-center",children:a}),i,d&&o.jsx("span",{className:"inline-flex items-center",children:d})]})});ne.displayName="Button";const gn=K.cva("text-foreground",{variants:{size:{xs:t.TEXT_TOKENS.fontSize.xs,sm:t.TEXT_TOKENS.fontSize.sm,md:t.TEXT_TOKENS.fontSize.md,lg:t.TEXT_TOKENS.fontSize.lg,xl:t.TEXT_TOKENS.fontSize.xl},weight:{normal:t.TEXT_TOKENS.fontWeight.normal,medium:t.TEXT_TOKENS.fontWeight.medium,semibold:t.TEXT_TOKENS.fontWeight.semibold,bold:t.TEXT_TOKENS.fontWeight.bold},muted:{true:"text-muted-foreground",false:""},variant:{primary:"text-primary",secondary:"text-secondary-foreground",accent:"text-accent-foreground",outline:"text-foreground",ghost:"text-foreground",link:"text-primary hover:underline",destructive:"text-destructive",muted:"text-muted-foreground"}},defaultVariants:{size:"md",weight:"normal",muted:!1}}),W=l.forwardRef(({className:e,size:r,weight:n,muted:s,variant:a,...d},i)=>{const c=s!==void 0?s:a==="muted";return o.jsx("span",{ref:i,className:x(gn({size:r,weight:n,muted:c,variant:a}),e),...d})});W.displayName="Text";const Sn=K.cva(`${t.ALERT_TOKENS.radius} border ${t.ALERT_TOKENS.padding}`,{variants:{variant:{default:"bg-muted border-border text-foreground",primary:"bg-primary/10 border-primary/20 text-primary-foreground",secondary:"bg-secondary/10 border-secondary/20 text-secondary-foreground",accent:"bg-accent/10 border-accent/20 text-accent-foreground",destructive:"bg-destructive/10 border-destructive/20 text-destructive-foreground",success:"bg-accent/10 border-accent/20 text-accent-foreground",warning:"bg-secondary/10 border-secondary/20 text-secondary-foreground",danger:"bg-destructive/10 border-destructive/20 text-destructive-foreground",info:"bg-primary/10 border-primary/20 text-primary-foreground"}},defaultVariants:{variant:"default"}}),hn=l.forwardRef(({className:e,variant:r,...n},s)=>o.jsx("div",{ref:s,role:"alert",className:x(Sn({variant:r}),e),...n}));hn.displayName="Alert";const xn=K.cva("font-sans text-foreground",{variants:{size:{md:"text-md leading-relaxed tracking-normal",lg:"text-lg leading-relaxed tracking-normal"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},muted:{true:"text-muted-foreground",false:""}},defaultVariants:{size:"md",weight:"normal",muted:!1}}),En=l.forwardRef(({className:e,size:r,weight:n,muted:s,as:a="p",children:d,...i},c)=>{const u=a;return o.jsx(u,{ref:c,className:x(xn({size:r,weight:n,muted:s}),e),...i,children:d})});En.displayName="Body";const bn=K.cva("font-sans text-foreground",{variants:{weight:{normal:"font-normal",medium:"font-medium"},muted:{true:"text-muted-foreground",false:""}},defaultVariants:{weight:"normal",muted:!0}}),In=l.forwardRef(({className:e,weight:r,muted:n,as:s="span",children:a,...d},i)=>{const c=s;return o.jsx(c,{ref:i,className:x("text-xs leading-tight tracking-wide",bn({weight:r,muted:n}),e),...d,children:a})});In.displayName="Caption";const vn=K.cva("font-mono text-foreground",{variants:{variant:{inline:"rounded bg-muted px-xs py-0.5 text-sm font-semibold",block:"block rounded-md bg-muted p-md text-sm font-semibold"},muted:{true:"text-muted-foreground",false:""}},defaultVariants:{variant:"inline",muted:!1}}),_n=l.forwardRef(({className:e,variant:r,muted:n,as:s,children:a,...d},i)=>{const c=s||(r==="block"?"pre":"code");return o.jsx(c,{ref:i,className:x(vn({variant:r,muted:n}),e),...d,children:r==="block"?o.jsx("code",{children:a}):a})});_n.displayName="Code";const Kn=K.cva("font-display text-foreground",{variants:{size:{xl:"text-xl leading-normal tracking-normal","2xl":"text-2xl leading-tight tracking-tight","3xl":"text-3xl leading-tight tracking-tight","4xl":"text-4xl leading-none tracking-tight"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},muted:{true:"text-muted-foreground",false:""}},defaultVariants:{size:"4xl",weight:"bold",muted:!1}}),wn=l.forwardRef(({className:e,size:r,weight:n,muted:s,as:a="h1",children:d,...i},c)=>{const u=a==="h1"?"h1":a==="h2"?"h2":"div";return o.jsx(u,{ref:c,className:x(Kn({size:r,weight:n,muted:s}),e),...i,children:d})});wn.displayName="Display";const yn=K.cva("font-display text-foreground",{variants:{level:{1:"text-5xl font-bold leading-tight tracking-tight",2:"text-4xl font-bold leading-tight tracking-tight",3:"text-3xl font-semibold leading-snug tracking-normal",4:"text-2xl font-semibold leading-snug tracking-normal",5:"text-xl font-medium leading-normal tracking-normal",6:"text-lg font-medium leading-normal tracking-normal"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},muted:{true:"text-muted-foreground",false:""}},compoundVariants:[{level:1,weight:"normal",class:"text-5xl font-normal"},{level:1,weight:"medium",class:"text-5xl font-medium"},{level:1,weight:"semibold",class:"text-5xl font-semibold"},{level:1,weight:"bold",class:"text-5xl font-bold"},{level:2,weight:"normal",class:"text-4xl font-normal"},{level:2,weight:"medium",class:"text-4xl font-medium"},{level:2,weight:"semibold",class:"text-4xl font-semibold"},{level:2,weight:"bold",class:"text-4xl font-bold"},{level:3,weight:"normal",class:"text-3xl font-normal"},{level:3,weight:"medium",class:"text-3xl font-medium"},{level:3,weight:"semibold",class:"text-3xl font-semibold"},{level:3,weight:"bold",class:"text-3xl font-bold"},{level:4,weight:"normal",class:"text-2xl font-normal"},{level:4,weight:"medium",class:"text-2xl font-medium"},{level:4,weight:"semibold",class:"text-2xl font-semibold"},{level:4,weight:"bold",class:"text-2xl font-bold"},{level:5,weight:"normal",class:"text-xl font-normal"},{level:5,weight:"medium",class:"text-xl font-medium"},{level:5,weight:"semibold",class:"text-xl font-semibold"},{level:5,weight:"bold",class:"text-xl font-bold"},{level:6,weight:"normal",class:"text-lg font-normal"},{level:6,weight:"medium",class:"text-lg font-medium"},{level:6,weight:"semibold",class:"text-lg font-semibold"},{level:6,weight:"bold",class:"text-lg font-bold"}],defaultVariants:{level:1,muted:!1}}),Se=l.forwardRef(({className:e,level:r=1,weight:n,muted:s,as:a,children:d,...i},c)=>{const u=a||`h${r}`;return o.jsx(u,{ref:c,className:x(yn({level:r,weight:n,muted:s}),e),...i,children:d})});Se.displayName="Heading";const An=K.cva("font-sans text-foreground",{variants:{size:{lg:"text-lg leading-normal tracking-normal",xl:"text-xl leading-normal tracking-normal"},muted:{true:"text-muted-foreground",false:""}},defaultVariants:{size:"lg",muted:!0}}),Cn=l.forwardRef(({className:e,size:r,muted:n,as:s="p",children:a,...d},i)=>{const c=s;return o.jsx(c,{ref:i,className:x(An({size:r,muted:n}),e),...d,children:a})});Cn.displayName="Lead";const ce=({className:e,"aria-hidden":r=!0,...n})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:o.jsx("path",{d:"M14 5l7 7m0 0l-7 7m7-7H3"})});ce.displayName="IconArrowRight";const Ze=({className:e,"aria-hidden":r=!0,...n})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:o.jsx("path",{d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})});Ze.displayName="IconCalendar";const Je=({className:e,"aria-hidden":r=!0,...n})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:o.jsx("path",{d:"M20 6 9 17l-5-5"})});Je.displayName="IconCheck";const Mt=({className:e,"aria-hidden":r=!0,...n})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:o.jsx("path",{d:"m6 9 6 6 6-6"})});Mt.displayName="IconChevronDown";const kt=({className:e,"aria-hidden":r=!0,...n})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:o.jsx("path",{d:"m9 18 6-6-6-6"})});kt.displayName="IconChevronRight";const Pt=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("path",{d:"m18 6-12 12"}),o.jsx("path",{d:"m6 6 12 12"})]});Pt.displayName="IconClose";const Dt=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"m15 9-6 6"}),o.jsx("path",{d:"m9 9 6 6"})]});Dt.displayName="IconError";const Ut=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"M12 16v-4"}),o.jsx("path",{d:"M12 8h.01"})]});Ut.displayName="IconInfo";const et=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("path",{d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),o.jsx("path",{d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]});et.displayName="IconLocation";const Lt=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("line",{x1:"4",x2:"20",y1:"6",y2:"6"}),o.jsx("line",{x1:"4",x2:"20",y1:"12",y2:"12"}),o.jsx("line",{x1:"4",x2:"20",y1:"18",y2:"18"})]});Lt.displayName="IconMenu";const Bt=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("circle",{cx:"11",cy:"11",r:"8"}),o.jsx("path",{d:"m21 21-4.35-4.35"})]});Bt.displayName="IconSearch";const Gt=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"m9 12 2 2 4-4"})]});Gt.displayName="IconSuccess";const Ht=({className:e,"aria-hidden":r=!0,...n})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":r,...n,children:[o.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),o.jsx("path",{d:"M12 9v4"}),o.jsx("path",{d:"M12 17h.01"})]});Ht.displayName="IconWarning";const vt={arrowRight:ce,calendar:Ze,check:Je,chevronDown:Mt,chevronRight:kt,close:Pt,error:Dt,info:Ut,location:et,menu:Lt,search:Bt,success:Gt,warning:Ht},$n=K.cva(`inline-flex items-center justify-center border ${t.MOTION_TOKENS.transition.all} ${t.MOTION_TOKENS.duration[200]} ${t.MOTION_TOKENS.easing["in-out"]} focus-visible:outline-none disabled:cursor-not-allowed ${t.CHECKBOX_TOKENS.shadow}`,{variants:{variant:{primary:`${t.CHECKBOX_TOKENS.variant.primary.border} ${t.CHECKBOX_TOKENS.variant.primary.background} ${t.CHECKBOX_TOKENS.variant.primary.text} ${t.CHECKBOX_TOKENS.variant.primary.focus}`,secondary:`${t.CHECKBOX_TOKENS.variant.secondary.border} ${t.CHECKBOX_TOKENS.variant.secondary.background} ${t.CHECKBOX_TOKENS.variant.secondary.text} ${t.CHECKBOX_TOKENS.variant.secondary.focus}`,outline:`${t.CHECKBOX_TOKENS.variant.outline.border} ${t.CHECKBOX_TOKENS.variant.outline.background} ${t.CHECKBOX_TOKENS.variant.outline.text} ${t.CHECKBOX_TOKENS.variant.outline.focus}`,ghost:`${t.CHECKBOX_TOKENS.variant.ghost.border} ${t.CHECKBOX_TOKENS.variant.ghost.background} ${t.CHECKBOX_TOKENS.variant.ghost.text} ${t.CHECKBOX_TOKENS.variant.ghost.focus}`,destructive:`${t.CHECKBOX_TOKENS.variant.destructive.border} ${t.CHECKBOX_TOKENS.variant.destructive.background} ${t.CHECKBOX_TOKENS.variant.destructive.text} ${t.CHECKBOX_TOKENS.variant.destructive.focus}`},size:{xs:`${t.CHECKBOX_TOKENS.size.xs.width} ${t.CHECKBOX_TOKENS.size.xs.height} ${t.CHECKBOX_TOKENS.size.xs.radius}`,sm:`${t.CHECKBOX_TOKENS.size.sm.width} ${t.CHECKBOX_TOKENS.size.sm.height} ${t.CHECKBOX_TOKENS.size.sm.radius}`,md:`${t.CHECKBOX_TOKENS.size.md.width} ${t.CHECKBOX_TOKENS.size.md.height} ${t.CHECKBOX_TOKENS.size.md.radius}`,lg:`${t.CHECKBOX_TOKENS.size.lg.width} ${t.CHECKBOX_TOKENS.size.lg.height} ${t.CHECKBOX_TOKENS.size.lg.radius}`,xl:`${t.CHECKBOX_TOKENS.size.xl.width} ${t.CHECKBOX_TOKENS.size.xl.height} ${t.CHECKBOX_TOKENS.size.xl.radius}`},state:{default:`${t.CHECKBOX_TOKENS.state.border.default} ${t.CHECKBOX_TOKENS.state.background.default} ${t.CHECKBOX_TOKENS.state.text.default}`,checked:`${t.CHECKBOX_TOKENS.state.border.checked} ${t.CHECKBOX_TOKENS.state.background.checked} ${t.CHECKBOX_TOKENS.state.text.checked}`,indeterminate:`${t.CHECKBOX_TOKENS.state.border.indeterminate} ${t.CHECKBOX_TOKENS.state.background.indeterminate} ${t.CHECKBOX_TOKENS.state.text.indeterminate}`,error:`${t.CHECKBOX_TOKENS.state.border.error} ${t.CHECKBOX_TOKENS.state.background.default} ${t.CHECKBOX_TOKENS.state.text.default}`,disabled:`${t.CHECKBOX_TOKENS.state.border.disabled} ${t.CHECKBOX_TOKENS.state.background.disabled} ${t.CHECKBOX_TOKENS.state.text.disabled}`}},defaultVariants:{variant:"outline",size:"md",state:"default"}}),Rn=l.forwardRef(({className:e,variant:r,size:n,state:s,checked:a,indeterminate:d=!1,disabled:i=!1,onCheckedChange:c,icon:u,indeterminateIcon:N,"aria-label":f,"aria-labelledby":O,"aria-describedby":m,onClick:p,onKeyDown:T,...h},g)=>{const[S,E]=l.useState(!1),b=a!==void 0,I=b?a:S,v=i||s==="disabled",_=s==="error",$=l.useMemo(()=>v?"disabled":_?"error":d?"indeterminate":I?"checked":"default",[v,_,d,I]),y=l.useMemo(()=>d?"mixed":I?"true":"false",[d,I]),V=l.useCallback(z=>{if(v){z.preventDefault();return}b||E(X=>!X),c==null||c(!I),p==null||p(z)},[v,b,I,c,p]),A=l.useCallback(z=>{v||((z.key===" "||z.key==="Spacebar")&&(z.preventDefault(),z.stopPropagation(),b||E(X=>!X),c==null||c(!I)),T==null||T(z))},[v,b,I,c,T]),M=x($n({variant:r,size:n,state:$}),e),Y=n?t.CHECKBOX_TOKENS.icon.size[n]:t.CHECKBOX_TOKENS.icon.size.md,H=()=>d?N||o.jsx("span",{className:x(t.CHECKBOX_TOKENS.indeterminate.width,t.CHECKBOX_TOKENS.indeterminate.height,t.CHECKBOX_TOKENS.indeterminate.color,"block rounded-sm"),"aria-hidden":"true"}):I?u||o.jsx(Je,{className:x(Y,t.CHECKBOX_TOKENS.icon.stroke,v?t.CHECKBOX_TOKENS.icon.color.disabled:t.CHECKBOX_TOKENS.icon.color.default),"aria-hidden":!0}):null;return o.jsx("button",{type:"button",role:"checkbox","aria-checked":y,"aria-disabled":v,"aria-invalid":_,"aria-label":f,"aria-labelledby":O,"aria-describedby":m,disabled:v,className:M,onClick:V,onKeyDown:A,ref:g,...h,children:H()})});Rn.displayName="Checkbox";const Vn=K.cva(`flex ${t.INPUT_TOKENS.shadow} ${t.MOTION_TOKENS.transition.colors} file:border-0 file:bg-transparent ${t.TEXT_TOKENS.fontSize.sm} file:font-medium ${t.INPUT_TOKENS.file.text} disabled:cursor-not-allowed focus-visible:outline-none`,{variants:{variant:{primary:`${t.INPUT_TOKENS.variant.primary.border} ${t.INPUT_TOKENS.variant.primary.background} ${t.INPUT_TOKENS.variant.primary.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.primary.focus}`,secondary:`${t.INPUT_TOKENS.variant.secondary.border} ${t.INPUT_TOKENS.variant.secondary.background} ${t.INPUT_TOKENS.variant.secondary.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.secondary.focus}`,outline:`${t.INPUT_TOKENS.variant.outline.border} ${t.INPUT_TOKENS.variant.outline.background} ${t.INPUT_TOKENS.variant.outline.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.outline.focus}`,ghost:`${t.INPUT_TOKENS.variant.ghost.border} ${t.INPUT_TOKENS.variant.ghost.background} ${t.INPUT_TOKENS.variant.ghost.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.ghost.focus}`,destructive:`${t.INPUT_TOKENS.variant.destructive.border} ${t.INPUT_TOKENS.variant.destructive.background} ${t.INPUT_TOKENS.variant.destructive.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.destructive.focus}`},size:{xs:`${t.INPUT_TOKENS.size.xs.height} ${t.INPUT_TOKENS.size.xs.padding.horizontal} ${t.INPUT_TOKENS.size.xs.padding.vertical} ${t.INPUT_TOKENS.size.xs.radius} ${t.INPUT_TOKENS.size.xs.fontSize}`,sm:`${t.INPUT_TOKENS.size.sm.height} ${t.INPUT_TOKENS.size.sm.padding.horizontal} ${t.INPUT_TOKENS.size.sm.padding.vertical} ${t.INPUT_TOKENS.size.sm.radius} ${t.INPUT_TOKENS.size.sm.fontSize}`,md:`${t.INPUT_TOKENS.size.md.height} ${t.INPUT_TOKENS.size.md.padding.horizontal} ${t.INPUT_TOKENS.size.md.padding.vertical} ${t.INPUT_TOKENS.size.md.radius} ${t.INPUT_TOKENS.size.md.fontSize} ${t.INPUT_TOKENS.size.md.fontSizeResponsive}`,lg:`${t.INPUT_TOKENS.size.lg.height} ${t.INPUT_TOKENS.size.lg.padding.horizontal} ${t.INPUT_TOKENS.size.lg.padding.vertical} ${t.INPUT_TOKENS.size.lg.radius} ${t.INPUT_TOKENS.size.lg.fontSize}`,xl:`${t.INPUT_TOKENS.size.xl.height} ${t.INPUT_TOKENS.size.xl.padding.horizontal} ${t.INPUT_TOKENS.size.xl.padding.vertical} ${t.INPUT_TOKENS.size.xl.radius} ${t.INPUT_TOKENS.size.xl.fontSize}`},state:{default:`${t.INPUT_TOKENS.state.border.default} ${t.INPUT_TOKENS.state.background.default} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.border.focus}`,error:`${t.INPUT_TOKENS.state.border.error} ${t.INPUT_TOKENS.state.background.default} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.border.focus}`,success:`${t.INPUT_TOKENS.state.border.success} ${t.INPUT_TOKENS.state.background.default} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.border.focus}`,disabled:`${t.INPUT_TOKENS.state.border.disabled} ${t.INPUT_TOKENS.state.background.disabled} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.text.disabled}`},fullWidth:{true:t.INPUT_TOKENS.width.full,false:""}},defaultVariants:{variant:"outline",size:"md",state:"default",fullWidth:!0}}),jn=l.forwardRef(({className:e,type:r="text",variant:n,size:s,state:a,fullWidth:d,iconLeft:i,iconRight:c,disabled:u,"aria-invalid":N,"aria-describedby":f,...O},m)=>{const p=a==="error"||N===!0,T=u||a==="disabled",h=p?!0:N,g=l.useId(),[S]=l.useState(()=>{if(f)return f;if(a==="error"||a==="success")return`input-${g}-message`}),E=x(Vn({variant:n,size:s,state:a,fullWidth:d}),i&&t.INPUT_TOKENS.icon.paddingLeft,c&&t.INPUT_TOKENS.icon.paddingRight,e);return i||c?o.jsxs("div",{className:x("relative",d!==!1&&t.INPUT_TOKENS.width.full),children:[i&&o.jsx("span",{className:x("absolute left-0 top-0 flex h-full items-center",t.INPUT_TOKENS.icon.paddingLeft,t.INPUT_TOKENS.icon.size,t.INPUT_TOKENS.icon.color),children:i}),o.jsx("input",{type:r,className:E,ref:m,disabled:T,"aria-invalid":h,"aria-describedby":S,...O}),c&&o.jsx("span",{className:x("absolute right-0 top-0 flex h-full items-center",t.INPUT_TOKENS.icon.paddingRight,t.INPUT_TOKENS.icon.size,t.INPUT_TOKENS.icon.color),children:c})]}):o.jsx("input",{type:r,className:E,ref:m,disabled:T,"aria-invalid":h,"aria-describedby":S,...O})});jn.displayName="Input";const zn=K.cva(`inline-flex items-center justify-center border ${t.MOTION_TOKENS.transition.all} ${t.MOTION_TOKENS.duration[200]} ${t.MOTION_TOKENS.easing["in-out"]} focus-visible:outline-none disabled:cursor-not-allowed ${t.RADIO_TOKENS.shadow}`,{variants:{variant:{primary:`${t.RADIO_TOKENS.variant.primary.border} ${t.RADIO_TOKENS.variant.primary.background} ${t.RADIO_TOKENS.variant.primary.text} ${t.RADIO_TOKENS.variant.primary.focus}`,secondary:`${t.RADIO_TOKENS.variant.secondary.border} ${t.RADIO_TOKENS.variant.secondary.background} ${t.RADIO_TOKENS.variant.secondary.text} ${t.RADIO_TOKENS.variant.secondary.focus}`,outline:`${t.RADIO_TOKENS.variant.outline.border} ${t.RADIO_TOKENS.variant.outline.background} ${t.RADIO_TOKENS.variant.outline.text} ${t.RADIO_TOKENS.variant.outline.focus}`,ghost:`${t.RADIO_TOKENS.variant.ghost.border} ${t.RADIO_TOKENS.variant.ghost.background} ${t.RADIO_TOKENS.variant.ghost.text} ${t.RADIO_TOKENS.variant.ghost.focus}`,destructive:`${t.RADIO_TOKENS.variant.destructive.border} ${t.RADIO_TOKENS.variant.destructive.background} ${t.RADIO_TOKENS.variant.destructive.text} ${t.RADIO_TOKENS.variant.destructive.focus}`},size:{xs:`${t.RADIO_TOKENS.size.xs.width} ${t.RADIO_TOKENS.size.xs.height} ${t.RADIO_TOKENS.size.xs.radius}`,sm:`${t.RADIO_TOKENS.size.sm.width} ${t.RADIO_TOKENS.size.sm.height} ${t.RADIO_TOKENS.size.sm.radius}`,md:`${t.RADIO_TOKENS.size.md.width} ${t.RADIO_TOKENS.size.md.height} ${t.RADIO_TOKENS.size.md.radius}`,lg:`${t.RADIO_TOKENS.size.lg.width} ${t.RADIO_TOKENS.size.lg.height} ${t.RADIO_TOKENS.size.lg.radius}`,xl:`${t.RADIO_TOKENS.size.xl.width} ${t.RADIO_TOKENS.size.xl.height} ${t.RADIO_TOKENS.size.xl.radius}`},state:{default:`${t.RADIO_TOKENS.state.border.default} ${t.RADIO_TOKENS.state.background.default} ${t.RADIO_TOKENS.state.text.default}`,checked:`${t.RADIO_TOKENS.state.border.checked} ${t.RADIO_TOKENS.state.background.checked} ${t.RADIO_TOKENS.state.text.checked}`,error:`${t.RADIO_TOKENS.state.border.error} ${t.RADIO_TOKENS.state.background.default} ${t.RADIO_TOKENS.state.text.default}`,disabled:`${t.RADIO_TOKENS.state.border.disabled} ${t.RADIO_TOKENS.state.background.disabled} ${t.RADIO_TOKENS.state.text.disabled}`}},defaultVariants:{variant:"outline",size:"md",state:"default"}}),Mn=l.createContext(void 0),kn=l.forwardRef(({value:e,defaultValue:r,onValueChange:n,name:s,orientation:a="vertical",size:d,className:i,children:c,...u},N)=>{const[f,O]=l.useState(r||""),m=e!==void 0,p=m?e:f,T=l.useMemo(()=>s||(typeof document<"u"?`radio-group-${Math.random().toString(36).substr(2,9)}`:"radio-group"),[s]),h=l.useCallback(S=>{m||O(S),n==null||n(S)},[m,n]),g=l.useMemo(()=>({value:p,onValueChange:h,name:T,orientation:a??"vertical",size:d??"md"}),[p,h,T,a,d]);return o.jsx(Mn.Provider,{value:g,children:o.jsx("div",{ref:N,role:"radiogroup","aria-orientation":a??"vertical",className:x(a==="horizontal"?"flex flex-row items-center gap-md":"flex flex-col gap-md",i),...u,children:c})})});kn.displayName="RadioGroup";const Pn=l.forwardRef(({className:e,variant:r,size:n,state:s,checked:a,disabled:d=!1,value:i,onCheckedChange:c,icon:u,"aria-label":N,"aria-labelledby":f,"aria-describedby":O,onClick:m,onKeyDown:p,...T},h)=>{const g=l.useContext(Mn),S=a!==void 0,E=g!==void 0,b=E&&i!==void 0&&g?g.value===i:!1,[I,v]=l.useState(!1),_=S?a:E?b:I,$=n||(g==null?void 0:g.size)||"md",y=d||s==="disabled",V=s==="error",A=l.useMemo(()=>y?"disabled":V?"error":_?"checked":"default",[y,V,_]),M=l.useMemo(()=>E?_?0:-1:0,[E,_]),Y=l.useCallback(w=>{if(y){w.preventDefault();return}E&&i!==void 0?g==null||g.onValueChange(i):S||v(!0),c==null||c(!0),m==null||m(w)},[y,E,S,i,g,c,m]),H=l.useCallback(w=>{var C;if(!y){if((w.key===" "||w.key==="Spacebar")&&(w.preventDefault(),w.stopPropagation(),E&&i!==void 0?g==null||g.onValueChange(i):S||v(!0),c==null||c(!0)),E&&g){const j=w.currentTarget,k=Array.from(((C=j.parentElement)==null?void 0:C.querySelectorAll('[role="radio"]:not([disabled])'))||[]),B=k.findIndex(me=>me===j);let J=B;g.orientation==="horizontal"&&(w.key==="ArrowLeft"?(w.preventDefault(),J=B>0?B-1:k.length-1):w.key==="ArrowRight"&&(w.preventDefault(),J=B<k.length-1?B+1:0)),w.key==="ArrowUp"?(w.preventDefault(),J=B>0?B-1:k.length-1):w.key==="ArrowDown"&&(w.preventDefault(),J=B<k.length-1?B+1:0),g.orientation==="vertical"&&(w.key==="ArrowLeft"||w.key==="ArrowRight")&&(w.preventDefault(),w.key==="ArrowLeft"?J=B>0?B-1:k.length-1:J=B<k.length-1?B+1:0);const Ee=k[J];if(J!==B&&Ee){Ee.focus();const me=Ee.getAttribute("data-value");me&&g&&g.onValueChange(me)}}p==null||p(w)}},[y,E,S,i,g,c,p]),z=x(zn({variant:r,size:$,state:A}),e),X=t.RADIO_TOKENS.dot.size[$],L=()=>_?u||o.jsx("span",{className:x(X,t.RADIO_TOKENS.dot.radius,y?t.RADIO_TOKENS.dot.color.disabled:t.RADIO_TOKENS.dot.color.default,"block"),"aria-hidden":"true"}):null;return o.jsx("button",{type:"button",role:"radio","aria-checked":_,"aria-disabled":y,"aria-invalid":V,"aria-label":N,"aria-labelledby":f,"aria-describedby":O,tabIndex:M,disabled:y,"data-value":i,name:g==null?void 0:g.name,className:z,onClick:Y,onKeyDown:H,ref:h,...T,children:L()})});Pn.displayName="Radio";const Ne=l.forwardRef(({children:e,container:r,className:n,style:s},a)=>{const[d,i]=l.useState(!1);if(l.useEffect(()=>{i(!0)},[]),!d||typeof window>"u")return null;const c=r||document.body;return c?Tn.createPortal(o.jsx("div",{ref:a,className:x(n),style:s,children:e}),c):null});Ne.displayName="Portal";const Dn=K.cva(`flex ${t.INPUT_TOKENS.width.full} items-center justify-between ${t.INPUT_TOKENS.shadow} ${t.MOTION_TOKENS.transition.colors} disabled:cursor-not-allowed focus-visible:outline-none`,{variants:{variant:{primary:`${t.INPUT_TOKENS.variant.primary.border} ${t.INPUT_TOKENS.variant.primary.background} ${t.INPUT_TOKENS.variant.primary.text} ${t.INPUT_TOKENS.variant.primary.focus}`,secondary:`${t.INPUT_TOKENS.variant.secondary.border} ${t.INPUT_TOKENS.variant.secondary.background} ${t.INPUT_TOKENS.variant.secondary.text} ${t.INPUT_TOKENS.variant.secondary.focus}`,outline:`${t.INPUT_TOKENS.variant.outline.border} ${t.INPUT_TOKENS.variant.outline.background} ${t.INPUT_TOKENS.variant.outline.text} ${t.INPUT_TOKENS.variant.outline.focus}`,ghost:`${t.INPUT_TOKENS.variant.ghost.border} ${t.INPUT_TOKENS.variant.ghost.background} ${t.INPUT_TOKENS.variant.ghost.text} ${t.INPUT_TOKENS.variant.ghost.focus}`},size:{xs:`${t.INPUT_TOKENS.size.xs.height} ${t.INPUT_TOKENS.size.xs.padding.horizontal} ${t.INPUT_TOKENS.size.xs.padding.vertical} ${t.INPUT_TOKENS.size.xs.radius} ${t.INPUT_TOKENS.size.xs.fontSize}`,sm:`${t.INPUT_TOKENS.size.sm.height} ${t.INPUT_TOKENS.size.sm.padding.horizontal} ${t.INPUT_TOKENS.size.sm.padding.vertical} ${t.INPUT_TOKENS.size.sm.radius} ${t.INPUT_TOKENS.size.sm.fontSize}`,md:`${t.INPUT_TOKENS.size.md.height} ${t.INPUT_TOKENS.size.md.padding.horizontal} ${t.INPUT_TOKENS.size.md.padding.vertical} ${t.INPUT_TOKENS.size.md.radius} ${t.INPUT_TOKENS.size.md.fontSize} ${t.INPUT_TOKENS.size.md.fontSizeResponsive}`,lg:`${t.INPUT_TOKENS.size.lg.height} ${t.INPUT_TOKENS.size.lg.padding.horizontal} ${t.INPUT_TOKENS.size.lg.padding.vertical} ${t.INPUT_TOKENS.size.lg.radius} ${t.INPUT_TOKENS.size.lg.fontSize}`},state:{open:t.INPUT_TOKENS.state.border.focus,closed:"",disabled:`${t.INPUT_TOKENS.state.border.disabled} ${t.INPUT_TOKENS.state.background.disabled} ${t.INPUT_TOKENS.state.text.disabled}`}},defaultVariants:{variant:"outline",size:"md",state:"closed"}}),Un=K.cva(`relative z-50 min-w-[8rem] overflow-hidden ${t.INPUT_TOKENS.selectListbox.radius} ${t.INPUT_TOKENS.selectListbox.border} ${t.INPUT_TOKENS.selectListbox.background} ${t.INPUT_TOKENS.selectListbox.text} ${t.INPUT_TOKENS.selectListbox.shadow} ${t.MOTION_TOKENS.transition.colors}`,{variants:{size:{xs:t.TEXT_TOKENS.fontSize.xs,sm:t.TEXT_TOKENS.fontSize.sm,md:t.TEXT_TOKENS.fontSize.sm,lg:t.TEXT_TOKENS.fontSize.md}},defaultVariants:{size:"md"}}),Ln=K.cva(`relative flex ${t.INPUT_TOKENS.width.full} cursor-default select-none items-center outline-none ${t.MOTION_TOKENS.transition.colors} ${t.INPUT_TOKENS.selectOption.focus.background} ${t.INPUT_TOKENS.selectOption.focus.text} data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,{variants:{size:{xs:`${t.INPUT_TOKENS.size.xs.padding.horizontal} ${t.INPUT_TOKENS.size.xs.padding.vertical} ${t.INPUT_TOKENS.size.xs.fontSize}`,sm:`${t.INPUT_TOKENS.size.sm.padding.horizontal} ${t.INPUT_TOKENS.size.sm.padding.vertical} ${t.INPUT_TOKENS.size.sm.fontSize}`,md:`${t.INPUT_TOKENS.size.sm.padding.horizontal} ${t.INPUT_TOKENS.size.sm.padding.vertical} ${t.INPUT_TOKENS.size.sm.fontSize}`,lg:`${t.INPUT_TOKENS.size.md.padding.horizontal} ${t.INPUT_TOKENS.size.sm.padding.vertical} ${t.INPUT_TOKENS.size.md.fontSize}`},state:{selected:`${t.INPUT_TOKENS.selectOption.selected.background} ${t.INPUT_TOKENS.selectOption.selected.text}`,default:"",disabled:"pointer-events-none opacity-50"}},defaultVariants:{size:"md",state:"default"}}),Bn=l.createContext(null);function Xt(){const e=l.useContext(Bn);if(!e)throw new Error("Select components must be used within SelectRoot");return e}function Ft({value:e,defaultValue:r,onValueChange:n,disabled:s=!1,open:a,onOpenChange:d,defaultOpen:i=!1,children:c,variant:u="outline",size:N="md"}){const[f,O]=l.useState(r),[m,p]=l.useState(i),[T,h]=l.useState(null),[g,S]=l.useState([]),[E,b]=l.useState(new Map),I=l.useRef(`select-trigger-${Math.random().toString(36).substr(2,9)}`),v=l.useRef(`select-listbox-${Math.random().toString(36).substr(2,9)}`),_=e!==void 0,$=_?e:f,y=a!==void 0,V=y?a:m,A=l.useCallback(w=>{_||O(w),n==null||n(w),y?d==null||d(!1):p(!1)},[_,y,n,d]),M=l.useCallback(w=>{y||p(w),d==null||d(w),w||h(null)},[y,d]),Y=l.useCallback(w=>{S(C=>C.includes(w)?C:[...C,w])},[]),H=l.useCallback(w=>{S(C=>C.filter(j=>j!==w))},[]),z=l.useCallback((w,C)=>{b(j=>{const k=j.get(w);if(k&&k.label===C)return j;const B=new Map(j);return B.set(w,{label:C}),B})},[]),X=l.useCallback(w=>{b(C=>{if(!C.has(w))return C;const j=new Map(C);return j.delete(w),j})},[]),L=l.useMemo(()=>({value:$,onValueChange:A,open:V,onOpenChange:M,disabled:s,triggerId:I.current,listboxId:v.current,variant:u,size:N,focusedIndex:T,setFocusedIndex:h,itemIds:g,registerItem:Y,unregisterItem:H,options:E,registerOption:z,unregisterOption:X}),[$,A,V,M,s,u,N,T,g,Y,H,E,z,X]);return o.jsx(Bn.Provider,{value:L,children:c})}Ft.displayName="SelectRoot";function _t(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(Array.isArray(e))return e.map(_t).join("");if(l.isValidElement(e)){const r=e.props;if(r.children)return _t(r.children)}return""}const Wt=l.forwardRef(({className:e,variant:r,size:n,placeholder:s="Select an option...",...a},d)=>{const i=Xt(),{open:c,onOpenChange:u,listboxId:N}=i,f=l.useRef(null),O=l.useRef(null);l.useImperativeHandle(d,()=>f.current,[]),l.useEffect(()=>{if(typeof document>"u")return;const S=document.getElementById(N);S&&S instanceof HTMLDivElement&&(O.current=S)},[N,c]),l.useEffect(()=>{if(!c||!f.current||!O.current)return;const S=O.current,E=()=>{if(!f.current||!O.current)return;const I=f.current.getBoundingClientRect();S.style.position="fixed",S.style.top=`${I.bottom+4}px`,S.style.left=`${I.left}px`,S.style.width=`${I.width}px`,S.style.minWidth=`${I.width}px`},b=I=>{const v=I.target;f.current&&!f.current.contains(v)&&O.current&&!O.current.contains(v)&&u(!1)};return E(),window.addEventListener("scroll",E,!0),window.addEventListener("resize",E),document.addEventListener("mousedown",b),()=>{window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E),document.removeEventListener("mousedown",b)}},[c,u]);const m=r??i.variant,p=n??i.size,T=l.useCallback(S=>{var E;if(i.disabled){S.preventDefault();return}i.onOpenChange(!i.open),(E=a.onClick)==null||E.call(a,S)},[i,a]),h=l.useCallback(S=>{var E;i.disabled||(S.key==="Enter"||S.key===" "||S.key==="ArrowDown"?(S.preventDefault(),i.open||i.onOpenChange(!0)):S.key==="Escape"&&i.open&&(S.preventDefault(),i.onOpenChange(!1)),(E=a.onKeyDown)==null||E.call(a,S))},[i,a]),g=l.useMemo(()=>{if(!i.value)return s;const S=i.options.get(i.value);return(S==null?void 0:S.label)??s},[i.value,i.options,s]);return o.jsx(o.Fragment,{children:o.jsxs("button",{ref:f,type:"button",id:i.triggerId,disabled:i.disabled,"aria-haspopup":"listbox","aria-expanded":i.open,"aria-controls":i.open?i.listboxId:void 0,className:x(Dn({variant:m,size:p,state:i.disabled?"disabled":i.open?"open":"closed"}),e),onClick:T,onKeyDown:h,...a,children:[o.jsx("span",{className:"truncate",children:g}),o.jsx(U.ChevronDown,{className:x("ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform",i.open&&"rotate-180"),"aria-hidden":"true"})]})})});Wt.displayName="SelectTrigger";const Yt=l.forwardRef(({className:e,size:r,children:n,onKeyDown:s,...a},d)=>{const i=Xt(),c=l.useRef(null);l.useImperativeHandle(d,()=>c.current,[]);const u=r??i.size,N=i.open,f=l.useMemo(()=>i.itemIds.filter(m=>{const p=document.getElementById(m);return p&&!p.hasAttribute("aria-disabled")}),[i.itemIds]);l.useEffect(()=>{i.open&&(i.focusedIndex===null||i.focusedIndex===-1)&&f.length>0&&i.setFocusedIndex(0)},[i.open,i.focusedIndex,f.length]),l.useLayoutEffect(()=>{if(!i.open)return;const m=i.focusedIndex??-1;if(m<0||m>=f.length)return;const p=f[m];if(!p)return;const T=document.getElementById(p);T&&(T.getAttribute("tabindex")==="-1"&&T.setAttribute("tabindex","0"),T.focus())},[i.open,i.focusedIndex,f]);const O=l.useCallback(m=>{if(!N){s==null||s(m);return}if(f.length===0){s==null||s(m);return}let p=i.focusedIndex??0;switch(m.key){case"ArrowDown":m.preventDefault(),p=Math.min(p+1,f.length-1),i.setFocusedIndex(p);break;case"ArrowUp":m.preventDefault(),p=Math.max(p-1,0),i.setFocusedIndex(p);break;case"Home":m.preventDefault(),p=0,i.setFocusedIndex(p);break;case"End":m.preventDefault(),p=f.length-1,i.setFocusedIndex(p);break;case"Enter":{m.preventDefault();const h=i.focusedIndex??0,g=f[h];if(g){const S=document.getElementById(g);if(S&&S.hasAttribute("data-value")){const E=S.getAttribute("data-value");E&&(i.onValueChange(E),i.onOpenChange(!1))}}break}case"Escape":m.preventDefault(),i.onOpenChange(!1);const T=document.getElementById(i.triggerId);T==null||T.focus();break;case"Tab":m.preventDefault(),i.onOpenChange(!1);break;default:s==null||s(m);break}},[N,i,s,f]);return l.useEffect(()=>()=>{if(typeof document<"u"){const m=document.getElementById(i.listboxId);m&&m.parentNode&&m.parentNode.removeChild(m)}},[i.listboxId]),o.jsx(Ne,{children:o.jsx("div",{ref:c,id:N?i.listboxId:void 0,role:N?"listbox":void 0,"aria-labelledby":N?i.triggerId:void 0,"aria-hidden":N?void 0:"true",hidden:!N,className:x(Un({size:u}),e),onKeyDown:O,...a,children:n})})});Yt.displayName="SelectListbox";const qt=l.forwardRef(({className:e,value:r,label:n,disabled:s=!1,size:a,children:d,onClick:i,onKeyDown:c,...u},N)=>{const f=Xt(),O=l.useRef(null),m=l.useRef(`select-option-${Math.random().toString(36).substr(2,9)}`);l.useImperativeHandle(N,()=>O.current,[]),l.useEffect(()=>{const _=m.current;return f.registerItem(_),()=>{f.unregisterItem(_)}},[]);const p=l.useRef(f.registerOption),T=l.useRef(f.unregisterOption);p.current=f.registerOption,T.current=f.unregisterOption,l.useLayoutEffect(()=>{const _=typeof n=="string"?n:_t(d)||String(r);return p.current(r,_),()=>{T.current(r)}},[r,n,d]);const h=l.useMemo(()=>{if(s||f.disabled)return-1;const _=f.itemIds.indexOf(m.current);if(_<0)return-1;let $=0;for(let y=0;y<_;y++){const V=f.itemIds[y];if(!V)continue;const A=document.getElementById(V);A&&!A.hasAttribute("aria-disabled")&&$++}return $},[f.itemIds,s,f.disabled]),g=f.focusedIndex!==null&&f.focusedIndex===h&&h>=0,S=f.value===r,E=a??f.size,b=l.useCallback(_=>{if(s||f.disabled){_.preventDefault();return}f.onValueChange(r),i==null||i(_)},[s,f,r,i]),I=l.useCallback(_=>{if(!(s||f.disabled)){if(_.key==="Enter"||_.key===" "){_.preventDefault(),f.onValueChange(r);return}c==null||c(_)}},[s,f,r,c]);l.useEffect(()=>{S&&f.open&&O.current&&!s&&!f.disabled&&queueMicrotask(()=>{O.current&&(O.current.focus(),f.setFocusedIndex(h))})},[f.open,S,h,s,f]);const v=g;return o.jsx("div",{ref:O,id:m.current,role:"option",tabIndex:v?0:-1,"aria-selected":v?"true":"false","aria-disabled":s||f.disabled,"data-disabled":s||f.disabled,"data-value":r,className:x(Ln({size:E,state:S?"selected":s||f.disabled?"disabled":"default"}),e),onClick:b,onKeyDown:I,onFocus:()=>{!s&&!f.disabled&&f.setFocusedIndex(h)},...u,children:n??d??r})});qt.displayName="SelectOption";const Ea={Root:Ft,Trigger:Wt,Listbox:Yt,Option:qt},Gn=K.cva(`flex min-h-[80px] ${t.INPUT_TOKENS.shadow} ${t.MOTION_TOKENS.transition.colors} disabled:cursor-not-allowed focus-visible:outline-none resize-y`,{variants:{variant:{primary:`${t.INPUT_TOKENS.variant.primary.border} ${t.INPUT_TOKENS.variant.primary.background} ${t.INPUT_TOKENS.variant.primary.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.primary.focus}`,secondary:`${t.INPUT_TOKENS.variant.secondary.border} ${t.INPUT_TOKENS.variant.secondary.background} ${t.INPUT_TOKENS.variant.secondary.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.secondary.focus}`,outline:`${t.INPUT_TOKENS.variant.outline.border} ${t.INPUT_TOKENS.variant.outline.background} ${t.INPUT_TOKENS.variant.outline.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.outline.focus}`,ghost:`${t.INPUT_TOKENS.variant.ghost.border} ${t.INPUT_TOKENS.variant.ghost.background} ${t.INPUT_TOKENS.variant.ghost.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.ghost.focus}`,destructive:`${t.INPUT_TOKENS.variant.destructive.border} ${t.INPUT_TOKENS.variant.destructive.background} ${t.INPUT_TOKENS.variant.destructive.text} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.variant.destructive.focus}`},size:{xs:`${t.INPUT_TOKENS.size.xs.padding.horizontal} ${t.INPUT_TOKENS.size.xs.padding.vertical} ${t.INPUT_TOKENS.size.xs.radius} ${t.INPUT_TOKENS.size.xs.fontSize}`,sm:`${t.INPUT_TOKENS.size.sm.padding.horizontal} ${t.INPUT_TOKENS.size.sm.padding.vertical} ${t.INPUT_TOKENS.size.sm.radius} ${t.INPUT_TOKENS.size.sm.fontSize}`,md:`${t.INPUT_TOKENS.size.md.padding.horizontal} ${t.INPUT_TOKENS.size.md.padding.vertical} ${t.INPUT_TOKENS.size.md.radius} ${t.INPUT_TOKENS.size.md.fontSize} ${t.INPUT_TOKENS.size.md.fontSizeResponsive}`,lg:`${t.INPUT_TOKENS.size.lg.padding.horizontal} ${t.INPUT_TOKENS.size.lg.padding.vertical} ${t.INPUT_TOKENS.size.lg.radius} ${t.INPUT_TOKENS.size.lg.fontSize}`,xl:`${t.INPUT_TOKENS.size.xl.padding.horizontal} ${t.INPUT_TOKENS.size.xl.padding.vertical} ${t.INPUT_TOKENS.size.xl.radius} ${t.INPUT_TOKENS.size.xl.fontSize}`},state:{default:`${t.INPUT_TOKENS.state.border.default} ${t.INPUT_TOKENS.state.background.default} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.border.focus}`,error:`${t.INPUT_TOKENS.state.border.error} ${t.INPUT_TOKENS.state.background.default} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.border.focus}`,success:`${t.INPUT_TOKENS.state.border.success} ${t.INPUT_TOKENS.state.background.default} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.border.focus}`,disabled:`${t.INPUT_TOKENS.state.border.disabled} ${t.INPUT_TOKENS.state.background.disabled} ${t.INPUT_TOKENS.state.text.default} ${t.INPUT_TOKENS.state.text.placeholder} ${t.INPUT_TOKENS.state.text.disabled}`},fullWidth:{true:t.INPUT_TOKENS.width.full,false:""}},defaultVariants:{variant:"outline",size:"md",state:"default",fullWidth:!0}}),Hn=l.forwardRef(({className:e,variant:r,size:n,state:s,fullWidth:a,disabled:d,maxLength:i,showCharacterCount:c=!1,value:u,defaultValue:N,"aria-invalid":f,"aria-describedby":O,...m},p)=>{const T=s==="error"||f===!0,h=d||s==="disabled",g=T?!0:f,S=l.useId(),[E]=l.useState(()=>{if(O)return O;if(s==="error"||s==="success")return`textarea-${S}-message`}),b=x(Gn({variant:r,size:n,state:s,fullWidth:a}),e),I=u??N??"",v=typeof I=="string"?I.length:0;return c&&i!==void 0?o.jsxs("div",{className:x("relative",a!==!1&&t.INPUT_TOKENS.width.full),children:[o.jsx("textarea",{className:b,ref:p,disabled:h,maxLength:i,value:u,defaultValue:N,"aria-invalid":g,"aria-describedby":E,...m}),o.jsxs("div",{className:x("absolute",t.INPUT_TOKENS.message.position.bottom,t.INPUT_TOKENS.message.position.right,t.TEXT_TOKENS.fontSize.xs,t.INPUT_TOKENS.message.color.default,v>i&&t.INPUT_TOKENS.message.color.error),children:[v," / ",i]})]}):o.jsx("textarea",{className:b,ref:p,disabled:h,maxLength:i,value:u,defaultValue:N,"aria-invalid":g,"aria-describedby":E,...m})});Hn.displayName="Textarea";function ba(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Be(e){if(e!=null)return ba(e)?e.base:e}function P(e){if(typeof e=="number")return e%1!==0?`var(--spacing-${e.toString().replace(".","-")})`:`var(--spacing-${e})`;if(e==="none")return"var(--spacing-none)";if(e.includes("-")&&!e.startsWith("--")){const r=e.split("-");if(r.length>=2){const n=r[0],s=r.slice(1).join("-");if(n&&["section","container","grid","stack","component"].includes(n))return`var(--layout-${n}-${s})`}}return`var(--spacing-${e})`}function Ia(e){return`var(--radius-${e})`}function va(e){return e.startsWith("hsl(")||e.startsWith("var(")?e:`var(--${e})`}function F(e){return Be(e)}function _a(e){if(!(!e||e==="none"))return`shadow-${e}`}function Ka(e){if(e){if(e==="inline")return"inline";if(e==="inline-block")return"inline-block";if(e==="flex")return"flex";if(e==="inline-flex")return"inline-flex";if(e==="grid")return"grid";if(e==="inline-grid")return"inline-grid";if(e==="block")return"block";if(e==="none")return"hidden"}}function wa(e){if(e){if(e==="row")return"flex-row";if(e==="column")return"flex-col";if(e==="row-reverse")return"flex-row-reverse";if(e==="column-reverse")return"flex-col-reverse"}}function ya(e){if(e){if(e==="start")return"items-start";if(e==="end")return"items-end";if(e==="center")return"items-center";if(e==="baseline")return"items-baseline";if(e==="stretch")return"items-stretch"}}function Aa(e){if(e){if(e==="start")return"justify-start";if(e==="end")return"justify-end";if(e==="center")return"justify-center";if(e==="between")return"justify-between";if(e==="around")return"justify-around";if(e==="evenly")return"justify-evenly"}}const q=l.forwardRef(({as:e="div",p:r,px:n,py:s,pt:a,pr:d,pb:i,pl:c,m:u,mx:N,my:f,mt:O,mr:m,mb:p,ml:T,display:h,flexDirection:g,radius:S,shadow:E,bg:b,gap:I,align:v,justify:_,className:$,style:y,...V},A)=>{const M=F(r),Y=F(n),H=F(s),z=F(a),X=F(d),L=F(i),w=F(c),C=F(u),j=F(N),k=F(f),B=F(O),J=F(m),Ee=F(p),me=F(T),Xr=F(S),Fr=F(b),Wr=F(I),Yr={...M!==void 0&&{padding:P(M)},...!r&&Y!==void 0&&{paddingLeft:P(Y),paddingRight:P(Y)},...!r&&H!==void 0&&{paddingTop:P(H),paddingBottom:P(H)},...!r&&!s&&z!==void 0&&{paddingTop:P(z)},...!r&&!n&&X!==void 0&&{paddingRight:P(X)},...!r&&!s&&L!==void 0&&{paddingBottom:P(L)},...!r&&!n&&w!==void 0&&{paddingLeft:P(w)},...C!==void 0&&{margin:P(C)},...!u&&j!==void 0&&{marginLeft:P(j),marginRight:P(j)},...!u&&k!==void 0&&{marginTop:P(k),marginBottom:P(k)},...!u&&!f&&B!==void 0&&{marginTop:P(B)},...!u&&!N&&J!==void 0&&{marginRight:P(J)},...!u&&!f&&Ee!==void 0&&{marginBottom:P(Ee)},...!u&&!N&&me!==void 0&&{marginLeft:P(me)},...Xr!==void 0&&{borderRadius:Ia(Xr)},...Fr!==void 0&&{backgroundColor:va(Fr)},...Wr!==void 0&&{gap:P(Wr)},...y},Ta=x(Ka(h),wa(g),ya(v),Aa(_),_a(E),$),Oa=e,pa=Object.keys(Yr).length>0||y?{...Yr,...y}:void 0;return o.jsx(Oa,{ref:A,className:Ta,style:pa,...V})});q.displayName="Box";const ae=l.forwardRef(({direction:e="vertical",spacing:r,gap:n,align:s,justify:a,...d},i)=>{const c=r??n;return o.jsx(q,{ref:i,display:"flex",flexDirection:e==="horizontal"?"row":"column",gap:c,align:s,justify:a,...d})});ae.displayName="Stack";const Ca=ae,qr={sm:"var(--spacing-96)",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%"};function $a(e){const r=typeof e=="string"&&e in qr?qr[e]:void 0;return r||(typeof e=="string"&&(e.includes("px")||e.includes("rem")||e.includes("em")||e.includes("%")||e.includes("vw")||e.includes("calc"))?e:P(e))}const Xn=l.forwardRef(({maxWidth:e,padding:r,center:n=!0,className:s,style:a,...d},i)=>{const c=e?Be(e):void 0,u=Be(r||"container-md"),N={...c!==void 0&&{maxWidth:$a(c)},...n&&{marginLeft:"auto",marginRight:"auto"},...!n&&{marginLeft:void 0,marginRight:void 0},...u!==void 0&&{paddingLeft:P(u),paddingRight:P(u)},...a},f=(()=>{if(!r)return;const O=Be(r);if(typeof O=="string"){if(O.startsWith("container-"))return O.replace("container-","");if(["xs","sm","md","lg","xl","none"].includes(O))return O}})();return o.jsx("div",{ref:i,className:x("tm-container",s),"data-padding":f,style:N,...d})});Xn.displayName="Container";function De(e){if(e!=null){if(typeof e=="object"&&!Array.isArray(e)&&e!==null){if("base"in e&&e.base!==void 0)return e.base;if("sm"in e&&e.sm!==void 0)return e.sm;if("md"in e&&e.md!==void 0)return e.md;if("lg"in e&&e.lg!==void 0)return e.lg}return e}}function Ra(e){if(e){if(e==="row")return"flex-row";if(e==="column")return"flex-col";if(e==="row-reverse")return"flex-row-reverse";if(e==="column-reverse")return"flex-col-reverse"}}function Va(e){if(e){if(e==="nowrap")return"flex-nowrap";if(e==="wrap")return"flex-wrap";if(e==="wrap-reverse")return"flex-wrap-reverse"}}function ja(e){if(e){if(e==="start")return"items-start";if(e==="end")return"items-end";if(e==="center")return"items-center";if(e==="baseline")return"items-baseline";if(e==="stretch")return"items-stretch"}}function za(e){if(e){if(e==="start")return"justify-start";if(e==="end")return"justify-end";if(e==="center")return"justify-center";if(e==="between")return"justify-between";if(e==="around")return"justify-around";if(e==="evenly")return"justify-evenly"}}function Ma(e){if(!(e===void 0||e===!1||e===0)&&(e===!0||e===1))return"grow"}function ka(e){if(!(e===void 0||e===!1||e===0)&&(e===!0||e===1))return"shrink"}const Fn=l.forwardRef(({direction:e,wrap:r,grow:n,shrink:s,basis:a,align:d,justify:i,gap:c,className:u,style:N,...f},O)=>{const m=De(e),p=De(r),T=De(d),h=De(i),g=x(Ra(m),Va(p),Ma(n),ka(s),ja(T),za(h),u),S={...a?{flexBasis:a}:{},...N};return o.jsx(q,{ref:O,display:"flex",flexDirection:m,gap:c,className:g,style:Object.keys(S).length>0?S:void 0,...f})});Fn.displayName="Flex";function ye(e){if(e!=null){if(typeof e=="object"&&!Array.isArray(e)&&e!==null){if("base"in e&&e.base!==void 0)return e.base;if("sm"in e&&e.sm!==void 0)return e.sm;if("md"in e&&e.md!==void 0)return e.md;if("lg"in e&&e.lg!==void 0)return e.lg}return e}}function Te(e){if(e)return e==="none"?"grid-cols-none":`grid-cols-${e}`}function Pa(e){if(!(!e||e==="none"))return`grid-rows-${e}`}function Da(e){if(e){if(e==="row")return"grid-flow-row";if(e==="col")return"grid-flow-col";if(e==="dense")return"grid-flow-dense";if(e==="row-dense")return"grid-flow-row-dense";if(e==="col-dense")return"grid-flow-col-dense"}}function Ua(e){if(e){if(e==="start")return"items-start";if(e==="end")return"items-end";if(e==="center")return"items-center";if(e==="baseline")return"items-baseline";if(e==="stretch")return"items-stretch"}}function La(e){if(e){if(e==="start")return"justify-start";if(e==="end")return"justify-end";if(e==="center")return"justify-center";if(e==="between")return"justify-between";if(e==="around")return"justify-around";if(e==="evenly")return"justify-evenly"}}const Wn=l.forwardRef(({cols:e,sm:r,md:n,lg:s,xl:a,"2xl":d,rows:i,gap:c,flow:u,align:N,justify:f,className:O,...m},p)=>{let T=e;(r||n||s||a||d)&&(e!==void 0&&typeof e!="object"?T={base:e,...r&&{sm:r},...n&&{md:n},...s&&{lg:s},...a&&{xl:a},...d&&{"2xl":d}}:e===void 0?T={...r&&{sm:r},...n&&{md:n},...s&&{lg:s},...a&&{xl:a},...d&&{"2xl":d}}:T={...e,...r&&{sm:r},...n&&{md:n},...s&&{lg:s},...a&&{xl:a},...d&&{"2xl":d}});const h=ye(T),g=ye(i),S=ye(u),E=ye(N),b=ye(f),I=[];typeof T=="object"&&T!==null&&!Array.isArray(T)?(T.base!==void 0&&I.push(Te(T.base)||""),T.sm!==void 0&&I.push(`sm:${Te(T.sm)||""}`),T.md!==void 0&&I.push(`md:${Te(T.md)||""}`),T.lg!==void 0&&I.push(`lg:${Te(T.lg)||""}`),T.xl!==void 0&&I.push(`xl:${Te(T.xl)||""}`),T["2xl"]!==void 0&&I.push(`2xl:${Te(T["2xl"])||""}`)):h!==void 0&&I.push(Te(h)||"");const v=x(I,Pa(g),Da(S),Ua(E),La(b),O);return o.jsx(q,{ref:p,display:"grid",gap:c,className:v,...m})});Wn.displayName="Grid";const tt=l.forwardRef(({gap:e,align:r,justify:n,...s},a)=>o.jsx(q,{ref:a,display:"flex",flexDirection:"row",gap:e,align:r,justify:n,...s}));tt.displayName="Row";const Yn=K.cva("",{variants:{variant:{flat:"bg-background border border-border shadow-none",raised:"bg-card border border-border shadow-sm",sunken:"bg-muted border border-border shadow-none"}},defaultVariants:{variant:"flat"}}),qn=l.forwardRef(({variant:e,radius:r,className:n,...s},a)=>o.jsx(q,{ref:a,className:x(Yn({variant:e}),n),radius:r,...s}));qn.displayName="Surface";const Qn=K.cva(`${t.TEXT_TOKENS.fontSize.sm} ${t.TEXT_TOKENS.fontWeight.medium} ${t.TEXT_TOKENS.lineHeight.none} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),Qt=l.forwardRef(({className:e,required:r,children:n,...s},a)=>o.jsxs(On.Root,{ref:a,className:x(Qn(),e),...s,children:[n,r&&o.jsx("span",{className:x(t.INPUT_TOKENS.label.requiredMark,"ml-xs"),children:"*"})]}));Qt.displayName=On.Root.displayName;const Zn=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx(ae,{ref:s,gap:"sm",className:x(e),...n,children:r}));Zn.displayName="Field";const Jn=l.forwardRef(({className:e,...r},n)=>o.jsx(Qt,{ref:n,className:e,...r}));Jn.displayName="FieldLabel";const es=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("div",{ref:s,className:x(e),...n,children:r}));es.displayName="FieldControl";const ts=l.forwardRef(({className:e,...r},n)=>o.jsx(W,{ref:n,size:"sm",muted:!0,className:x(e),...r}));ts.displayName="FieldDescription";const rs=l.forwardRef(({className:e,...r},n)=>o.jsx(W,{ref:n,size:"sm",className:x("text-destructive",e),...r}));rs.displayName="FieldError";const $e=Zn;$e.Label=Jn;$e.Control=es;$e.Description=ts;$e.Error=rs;const Re=l.forwardRef(({size:e="md",radius:r,shadow:n,p:s,className:a,...d},i)=>{const c=t.CARD_TOKENS.size[e],u=r??c.radius.replace("rounded-",""),N=c.shadow,f=N==="shadow"?"xs":N.replace("shadow-",""),O=n??f,m=s??c.padding.replace("p-","");return o.jsx(q,{ref:i,className:x("border border-border bg-card text-card-foreground",a),radius:u,shadow:O,p:m,...d})});Re.displayName="Card";const Zt=l.forwardRef(({size:e="md",p:r,className:n,...s},a)=>{const d=t.CARD_TOKENS.size[e],i=r??d.padding.replace("p-",""),c=d.spacing.vertical.replace("space-y-","");return o.jsx(ae,{ref:a,gap:c,className:x(n),p:i,...s})});Zt.displayName="CardHeader";const Jt=l.forwardRef(({size:e="md",p:r,className:n,...s},a)=>{const d=t.CARD_TOKENS.size[e],i=r??d.padding.replace("p-","");return o.jsx(q,{ref:a,className:x(n),p:i,...s})});Jt.displayName="CardBody";const er=l.forwardRef(({size:e="md",p:r,className:n,...s},a)=>{const d=t.CARD_TOKENS.size[e],i=r??d.padding.replace("p-","");return o.jsx(tt,{ref:a,className:x("items-center",n),p:i,...s})});er.displayName="CardFooter";Re.Header=Zt;Re.Body=Jt;Re.Footer=er;const ns=l.forwardRef(({padding:e="md",gap:r,className:n,as:s,...a},d)=>{const c=t.SECTION_TOKENS.padding[e].replace("py-",""),u=r?t.SECTION_TOKENS.spacing[r].replace("gap-",""):void 0;return o.jsx(ae,{ref:d,as:s??"section",py:c,gap:u,className:x("w-full",n),...a})});ns.displayName="Section";const ss=K.cva("",{variants:{variant:{flat:`${t.SURFACE_TOKENS.variant.flat.bg} ${t.SURFACE_TOKENS.variant.flat.border} ${t.SURFACE_TOKENS.variant.flat.shadow}`,raised:`${t.SURFACE_TOKENS.variant.raised.bg} ${t.SURFACE_TOKENS.variant.raised.border} ${t.SURFACE_TOKENS.variant.raised.shadow}`,sunken:`${t.SURFACE_TOKENS.variant.sunken.bg} ${t.SURFACE_TOKENS.variant.sunken.border} ${t.SURFACE_TOKENS.variant.sunken.shadow}`,outline:`${t.SURFACE_TOKENS.variant.outline.bg} ${t.SURFACE_TOKENS.variant.outline.border} ${t.SURFACE_TOKENS.variant.outline.shadow}`,subtle:`${t.SURFACE_TOKENS.variant.subtle.bg} ${t.SURFACE_TOKENS.variant.subtle.border} ${t.SURFACE_TOKENS.variant.subtle.shadow}`}},defaultVariants:{variant:"flat"}}),rt=l.forwardRef(({variant:e="flat",p:r,radius:n,className:s,...a},d)=>{const c=t.SURFACE_TOKENS.variant[e].padding.replace("p-",""),N=t.SURFACE_TOKENS.variant[e].radius.replace("rounded-",""),f=r??c,O=n??N;return o.jsx(q,{ref:d,className:x(ss({variant:e}),s),p:f,radius:O,...a})});rt.displayName="Surface";const Ba=K.cva("fixed inset-0 z-40 transition-opacity",{variants:{variant:{default:`${t.OVERLAY_TOKENS.backdrop.default.bg} ${t.OVERLAY_TOKENS.backdrop.default.opacity}`,blurred:`${t.OVERLAY_TOKENS.backdrop.blurred.bg} ${t.OVERLAY_TOKENS.backdrop.blurred.opacity} ${t.OVERLAY_TOKENS.backdrop.blurred.backdropFilter}`,transparent:`${t.OVERLAY_TOKENS.backdrop.transparent.bg} ${t.OVERLAY_TOKENS.backdrop.transparent.opacity}`}},defaultVariants:{variant:"default"}}),nt=l.forwardRef(({variant:e="default",isVisible:r=!0,onClick:n,className:s,...a},d)=>o.jsx("div",{ref:d,className:x(Ba({variant:e}),r?"tm-motion-fade-in opacity-100":"tm-motion-fade-out opacity-0",s),onClick:n,"aria-hidden":"true",...a}));nt.displayName="Backdrop";function Ga(e){const r=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");return Array.from(e.querySelectorAll(r)).filter(n=>!n.hasAttribute("disabled")&&n.offsetParent!==null)}function as({containerRef:e,enabled:r,returnFocusRef:n,additionalFocusableElements:s=[]}){const a=l.useRef(null);l.useEffect(()=>{if(!r||!e.current)return;const d=e.current,i=document.activeElement;i&&d.contains(i),a.current=i;const c=[...Ga(d),...s].filter(Boolean);if(c.length===0)return;const u=c[0],N=c[c.length-1];u==null||u.focus();function f(m){var h,g;if(m.key!=="Tab")return;const p=m.shiftKey,T=c.indexOf(document.activeElement);if(p&&document.activeElement===u)m.preventDefault(),N==null||N.focus();else if(!p&&document.activeElement===N)m.preventDefault(),u==null||u.focus();else if(!p&&T>=0&&T<c.length-1){const S=T+1;(h=c[S])==null||h.focus()}else if(p&&T>0){const S=T-1;(g=c[S])==null||g.focus()}}d.addEventListener("keydown",f);const O=n==null?void 0:n.current;return()=>{d.removeEventListener("keydown",f),O?O.focus():a.current&&a.current.focus()}},[r,e,n,s])}function Ha(){var s;if(typeof window>"u")return 0;const e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);const r=document.createElement("div");e.appendChild(r);const n=e.offsetWidth-r.offsetWidth;return(s=e.parentNode)==null||s.removeChild(e),n}function Xa({enabled:e}){const r=l.useRef(0),n=l.useRef(""),s=l.useRef("");l.useEffect(()=>{if(typeof window>"u"||!e)return;const{body:a}=document,d=document.documentElement;n.current=a.style.overflow,s.current=a.style.paddingRight;const i=Ha();return r.current=i,a.style.overflow="hidden",d.style.overflow="hidden",i>0&&(a.style.paddingRight=`${i}px`),()=>{a.style.overflow=n.current,d.style.overflow="",a.style.paddingRight=s.current}},[e])}const os=K.cva(`fixed z-50 flex flex-col transform ${t.OVERLAY_TOKENS.modal.surface.primary.bg} ${t.OVERLAY_TOKENS.modal.surface.primary.border} ${t.OVERLAY_TOKENS.modal.position.center} ${t.MOTION_TOKENS.transition.all}`,{variants:{size:{sm:`${t.OVERLAY_TOKENS.modal.maxWidth.sm} ${t.OVERLAY_TOKENS.modal.radius.sm} ${t.OVERLAY_TOKENS.modal.padding.sm} ${t.OVERLAY_TOKENS.modal.shadow.sm}`,md:`${t.OVERLAY_TOKENS.modal.maxWidth.md} ${t.OVERLAY_TOKENS.modal.radius.md} ${t.OVERLAY_TOKENS.modal.padding.md} ${t.OVERLAY_TOKENS.modal.shadow.md}`,lg:`${t.OVERLAY_TOKENS.modal.maxWidth.lg} ${t.OVERLAY_TOKENS.modal.radius.lg} ${t.OVERLAY_TOKENS.modal.padding.lg} ${t.OVERLAY_TOKENS.modal.shadow.lg}`,fullscreen:`${t.OVERLAY_TOKENS.modal.maxWidth.fullscreen} ${t.OVERLAY_TOKENS.modal.radius.fullscreen} ${t.OVERLAY_TOKENS.modal.padding.lg} ${t.OVERLAY_TOKENS.modal.shadow.lg}`}},defaultVariants:{size:"md"}}),Kt=l.forwardRef(({open:e,onClose:r,size:n="md",backdropVariant:s="default",closeOnBackdropClick:a=!0,closeOnEscape:d=!0,returnFocusRef:i,children:c,className:u,...N},f)=>{const O=l.useRef(null),m=l.useRef(null);l.useEffect(()=>{f&&(typeof f=="function"?f(m.current):f.current=m.current)},[f]),l.useEffect(()=>{m.current=O.current},[]),as({containerRef:O,enabled:e,returnFocusRef:i}),Xa({enabled:e}),l.useEffect(()=>{if(!e||!d)return;function T(h){h.key==="Escape"&&r()}return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[e,d,r]);const p=l.useCallback(T=>{a&&T.target===T.currentTarget&&r()},[a,r]);return e?o.jsx(Ne,{children:o.jsxs("div",{className:t.OVERLAY_TOKENS.modal.container.layout,onClick:p,children:[o.jsx(nt,{variant:s,isVisible:e}),o.jsx("div",{ref:O,className:x(os({size:n}),e?"tm-motion-fade-scale":"tm-motion-fade-scale-out",u),role:"dialog","aria-modal":"true",onClick:T=>T.stopPropagation(),...N,children:c})]})}):null});Kt.displayName="ModalContent";const tr=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,className:x("flex flex-col",t.OVERLAY_TOKENS.modal.spacing.header.marginBottom,t.OVERLAY_TOKENS.modal.spacing.header.gap,e),...r}));tr.displayName="ModalHeader";const rr=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,className:x(t.OVERLAY_TOKENS.modal.spacing.body.layout,e),...r}));rr.displayName="ModalBody";const nr=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,className:x("flex flex-col-reverse sm:flex-row sm:justify-end",t.OVERLAY_TOKENS.modal.spacing.footer.marginTop,t.OVERLAY_TOKENS.modal.spacing.footer.gap,e),...r}));nr.displayName="ModalFooter";const is=Object.assign(Kt,{Content:Kt,Header:tr,Body:rr,Footer:nr}),He=l.forwardRef(({titleId:e,descriptionId:r,children:n,...s},a)=>{const d=l.useId(),i=l.useId(),c=e||d,u=r||i;return o.jsx(is,{ref:a,...s,"aria-labelledby":c,"aria-describedby":u,children:l.Children.map(n,N=>l.isValidElement(N)?l.cloneElement(N,{titleId:c,descriptionId:u}):N)})});He.displayName="DialogRoot";const sr=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,className:x("flex flex-col",t.OVERLAY_TOKENS.modal.spacing.header.marginBottom,t.OVERLAY_TOKENS.modal.spacing.header.gap,e),...r}));sr.displayName="DialogHeader";const ar=l.forwardRef(({titleId:e,className:r,children:n,...s},a)=>o.jsx(Se,{ref:a,as:"h2",level:4,weight:"semibold",id:e,className:x(r),...s,children:n}));ar.displayName="DialogTitle";const or=l.forwardRef(({descriptionId:e,className:r,children:n,...s},a)=>o.jsx("p",{ref:a,id:e,className:x(t.TEXT_TOKENS.fontSize.sm,t.ICON_TOKENS.colors.muted,r),...s,children:n}));or.displayName="DialogDescription";const ir=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,className:x(t.OVERLAY_TOKENS.modal.spacing.body.layout,e),...r}));ir.displayName="DialogBody";const lr=l.forwardRef(({className:e,...r},n)=>o.jsx(tt,{ref:n,justify:"end",gap:"sm",className:x(t.OVERLAY_TOKENS.modal.spacing.footer.marginTop,e),...r}));lr.displayName="DialogFooter";const Fa=Object.assign(He,{Root:He,Header:sr,Title:ar,Description:or,Body:ir,Footer:lr});function ls(e={}){const{threshold:r=50,velocityThreshold:n=.1,directions:s=["left","right","up","down"],onSwipe:a,enabled:d=!0}=e,[i,c]=ie.useState(!1),[u,N]=ie.useState(0),[f,O]=ie.useState(null),m=ie.useRef(null),p=ie.useRef(null);return ie.useEffect(()=>{if(typeof window>"u"||!d)return;const T=p.current;if(!T)return;const h=b=>{b.pointerType==="mouse"&&b.button!==0||(m.current={x:b.clientX,y:b.clientY,time:Date.now()},c(!0),N(0),O(null),T.setPointerCapture(b.pointerId))},g=b=>{if(!m.current)return;const I=b.clientX-m.current.x,v=b.clientY-m.current.y,_=Math.abs(I),$=Math.abs(v);let y=null,V=0;_>$?(V=_,I>0&&s.includes("right")?y="right":I<0&&s.includes("left")&&(y="left")):(V=$,v>0&&s.includes("down")?y="down":v<0&&s.includes("up")&&(y="up")),N(V),O(y)},S=b=>{if(!m.current)return;const I=b.clientX-m.current.x,v=b.clientY-m.current.y,_=Math.abs(I),$=Math.abs(v),y=Date.now()-m.current.time,V=Math.max(_,$)/y;let A=null,M=0;_>$?(M=_,I>0&&s.includes("right")?A="right":I<0&&s.includes("left")&&(A="left")):(M=$,v>0&&s.includes("down")?A="down":v<0&&s.includes("up")&&(A="up")),A&&M>=r&&V>=n&&(a==null||a({direction:A,distance:M,velocity:V})),m.current=null,c(!1),N(0),O(null),T.releasePointerCapture(b.pointerId)},E=b=>{m.current=null,c(!1),N(0),O(null),T.releasePointerCapture(b.pointerId)};return T.addEventListener("pointerdown",h),T.addEventListener("pointermove",g),T.addEventListener("pointerup",S),T.addEventListener("pointercancel",E),()=>{T.removeEventListener("pointerdown",h),T.removeEventListener("pointermove",g),T.removeEventListener("pointerup",S),T.removeEventListener("pointercancel",E)}},[r,n,s,a,d]),{isSwiping:i,distance:u,direction:f,handlers:{ref:T=>{p.current=T}}}}const Wa=K.cva(`group pointer-events-auto relative flex items-center justify-between overflow-hidden border ${t.TOAST_TOKENS.width.full} ${t.TOAST_TOKENS.spacing.gap} ${t.MOTION_TOKENS.transition.all}`,{variants:{variant:{default:`${t.TOAST_TOKENS.surface.default} ${t.TOAST_TOKENS.radius.default} ${t.TOAST_TOKENS.shadow.default} ${t.TOAST_TOKENS.spacing.padding}`,success:`${t.TOAST_TOKENS.surface.success} ${t.TOAST_TOKENS.radius.default} ${t.TOAST_TOKENS.shadow.default} ${t.TOAST_TOKENS.spacing.padding}`,info:`${t.TOAST_TOKENS.surface.info} ${t.TOAST_TOKENS.radius.default} ${t.TOAST_TOKENS.shadow.default} ${t.TOAST_TOKENS.spacing.padding}`,warning:`${t.TOAST_TOKENS.surface.warning} ${t.TOAST_TOKENS.radius.default} ${t.TOAST_TOKENS.shadow.default} ${t.TOAST_TOKENS.spacing.padding}`,danger:`${t.TOAST_TOKENS.surface.danger} ${t.TOAST_TOKENS.radius.default} ${t.TOAST_TOKENS.shadow.default} ${t.TOAST_TOKENS.spacing.padding}`}},defaultVariants:{variant:"default"}}),dr=l.forwardRef(({toast:e,onDismiss:r,isVisible:n=!0,variant:s,className:a,...d},i)=>{const c=s||e.variant||"default",u=c==="danger"?"assertive":"polite",{handlers:N}=ls({directions:["left","right"],threshold:50,onSwipe:()=>{r(e.id)},enabled:n}),f=l.useCallback(O=>{typeof i=="function"?i(O):i&&(i.current=O),N.ref&&N.ref(O)},[i,N]);return o.jsxs("div",{...N,ref:f,className:x(Wa({variant:c}),n?"tm-motion-fade-slide-right":"tm-motion-fade-slide-left-out",a),role:"alert","aria-live":u,...d,children:[o.jsx("div",{className:x(t.TOAST_TOKENS.content.layout,t.TOAST_TOKENS.content.gap),children:o.jsxs("div",{className:x("flex-1",t.TOAST_TOKENS.content.verticalSpacing),children:[e.title&&o.jsx("div",{className:x(t.TOAST_TOKENS.title.fontSize,t.TOAST_TOKENS.title.fontWeight),children:e.title}),e.description&&o.jsx("div",{className:x(t.TOAST_TOKENS.description.fontSize,t.TOAST_TOKENS.description.opacity),children:e.description}),e.action&&o.jsx("div",{className:"mt-sm",children:o.jsx(ne,{variant:"outline",size:"sm",onClick:e.action.onClick,className:x(t.TOAST_TOKENS.action.height,t.TOAST_TOKENS.action.padding,t.TOAST_TOKENS.action.fontSize),children:e.action.label})})]})}),o.jsx(ne,{variant:"ghost",size:"icon",className:x(t.TOAST_TOKENS.dismiss.position,t.TOAST_TOKENS.dismiss.size,t.TOAST_TOKENS.dismiss.radius,t.TOAST_TOKENS.dismiss.padding,t.TOAST_TOKENS.dismiss.colors.default,t.TOAST_TOKENS.dismiss.states.default,t.MOTION_TOKENS.transition.opacity,t.TOAST_TOKENS.dismiss.colors.hover,t.TOAST_TOKENS.dismiss.states.groupHover,t.TOAST_TOKENS.dismiss.states.focus,t.TOAST_TOKENS.dismiss.states.focusRing),onClick:()=>r(e.id),"aria-label":"Dismiss toast",children:o.jsx(U.X,{className:"h-4 w-4"})})]})});dr.displayName="Toast";const Ya={"top-left":"fixed top-md left-md z-[100] flex flex-col gap-sm","top-center":"fixed top-md inset-x-0 z-[100] flex flex-col items-center gap-sm","top-right":"fixed top-md right-md z-[100] flex flex-col gap-sm","bottom-left":"fixed bottom-md left-md z-[100] flex flex-col-reverse gap-sm","bottom-center":"fixed bottom-md inset-x-0 z-[100] flex flex-col-reverse items-center gap-sm","bottom-right":"fixed bottom-md right-md z-[100] flex flex-col-reverse gap-sm"},cr=l.forwardRef(({position:e="top-right",children:r,className:n},s)=>o.jsx(Ne,{children:o.jsx("div",{ref:s,className:x(Ya[e],"max-h-screen w-full max-w-md overflow-hidden p-0",n),style:{pointerEvents:"none"},"aria-live":"polite","aria-label":"Notifications",children:o.jsx("div",{className:"pointer-events-auto flex flex-col gap-sm",style:{pointerEvents:"auto"},children:r})})}));cr.displayName="ToastViewport";const ds=l.createContext(void 0);function qa({children:e,position:r="top-right",maxVisible:n=3,groupBy:s}){const[a,d]=l.useState([]),[i,c]=l.useState([]),u=l.useCallback(g=>{d(S=>{const E=S.filter(b=>b.id!==g);return E.length<n&&c(b=>{if(b.length>0){const I=b[0];if(I)return setTimeout(()=>{d(v=>v.find(_=>_.id===I.id)?v:[...v,I])},0),b.slice(1)}return b}),E}),c(S=>S.filter(E=>E.id!==g))},[n]),N=l.useCallback(g=>{const S=Math.random().toString(36).substr(2,9),E={id:S,...g,duration:g.duration??5e3};return d(b=>{const I=[...b,E],v=I.length;if(v>n){const _=I.slice(-n),$=I.slice(0,v-n);return c(y=>[...y,...$]),_}return I}),E.duration&&E.duration>0&&setTimeout(()=>{u(S)},E.duration),S},[n,u]),f=l.useCallback(()=>{d([]),c([])},[]),O=l.useCallback((g,S)=>{d(E=>E.map(b=>b.id===g?{...b,...S}:b)),c(E=>E.map(b=>b.id===g?{...b,...S}:b))},[]),m=l.useCallback(()=>i,[i]),p=l.useCallback(()=>s?a.reduce((g,S)=>{const E=s(S);return g[E]||(g[E]=[]),g[E].push(S),g},{}):{default:a},[a,s]),T=l.useMemo(()=>({toast:N,dismiss:u,dismissAll:f,updateToast:O,getQueue:m,getGrouped:p}),[N,u,f,O,m,p]),h=a.slice(-n);return o.jsxs(ds.Provider,{value:T,children:[e,o.jsx(cr,{position:r,children:h.map(g=>o.jsx(dr,{toast:g,onDismiss:u},g.id))})]})}function Qa(){const e=l.useContext(ds);if(e===void 0)throw new Error("useToast must be used within a ToastProvider");return e}const cs=l.createContext(void 0);function us({children:e,maxHistory:r=100,persistent:n=!0}){const[s,a]=l.useState([]),[d,i]=l.useState([]),c=l.useCallback(b=>{a(I=>I.filter(v=>v.id!==b))},[]),u=l.useCallback(b=>{const I=Math.random().toString(36).substr(2,9),v=Date.now(),_=A=>A==="danger"?"error":A==="success"?"success":A==="warning"?"warning":A==="system"?"system":A==="log"?"log":"info",$=A=>A==="error"?"danger":A==="success"?"success":"default",y=b.channel||_(b.variant),V={id:I,...b,channel:y,variant:b.variant||$(y),timestamp:v,read:!1,persistent:b.persistent??!1,duration:b.duration??(b.persistent?0:5e3)};return a(A=>[...A,V]),n&&i(A=>[V,...A].slice(0,r)),V.duration&&V.duration>0&&setTimeout(()=>{a(A=>A.filter(M=>M.id!==I))},V.duration),I},[r,n]),N=l.useCallback(()=>{a([])},[]),f=l.useCallback(b=>{a(I=>I.filter(v=>v.channel!==b))},[]),O=l.useCallback(b=>s.reduce((I,v)=>{const _=b(v);return I[_]||(I[_]=[]),I[_].push(v),I},{}),[s]),m=l.useCallback(()=>d,[d]),p=l.useCallback(b=>s.filter(I=>I.channel===b),[s]),T=l.useCallback(()=>s,[s]),h=l.useCallback(b=>{a(I=>I.map(v=>v.id===b?{...v,read:!0}:v)),i(I=>I.map(v=>v.id===b?{...v,read:!0}:v))},[]),g=l.useCallback(()=>{a(b=>b.map(I=>({...I,read:!0}))),i(b=>b.map(I=>({...I,read:!0})))},[]),S=l.useCallback(()=>s.filter(b=>!b.read).length,[s]),E=l.useMemo(()=>({push:u,remove:c,clearAll:N,clearChannel:f,groupBy:O,getHistory:m,getByChannel:p,getAll:T,markAsRead:h,markAllAsRead:g,getUnreadCount:S}),[u,c,N,f,O,m,p,T,h,g,S]);return o.jsx(cs.Provider,{value:E,children:e})}function Ve(){const e=l.useContext(cs);if(e===void 0)throw new Error("useNotificationCenterContext must be used within a NotificationCenterProvider");return e}const st=l.forwardRef(({confirm:e=!1,confirmMessage:r="Clear all notifications?",className:n,...s},a)=>{const{clearAll:d,getAll:i}=Ve(),c=i(),u=()=>{c.length!==0&&(e&&typeof window<"u"?window.confirm(r)&&d():d())};return c.length===0?null:o.jsx(ne,{ref:a,variant:"ghost",size:"sm",onClick:u,"aria-label":"Clear all notifications",className:n,...s,children:"Clear all"})});st.displayName="NotificationCenter.DismissAll";const at=l.forwardRef(({label:e,collapsed:r=!1,onToggleCollapse:n,collapsible:s=!1,className:a,...d},i)=>o.jsxs("div",{ref:i,className:x("flex items-center justify-between",t.NOTIFICATION_TOKENS.spacing.paddingVertical,a),...d,children:[o.jsx("h3",{className:"text-sm font-semibold text-foreground",children:e}),s&&n&&o.jsx(ne,{variant:"ghost",size:"icon",onClick:n,"aria-label":r?"Expand group":"Collapse group","aria-expanded":!r,className:"h-6 w-6",children:r?o.jsx(U.ChevronDown,{className:"h-4 w-4"}):o.jsx(U.ChevronUp,{className:"h-4 w-4"})})]}));at.displayName="NotificationCenter.GroupHeader";function Za(e="default"){switch(e){case"success":return U.CheckCircle2;case"info":return U.Info;case"warning":return U.AlertCircle;case"danger":return U.XCircle;case"system":return U.Bell;case"log":return U.FileText;default:return U.Info}}function Ja(e){const n=Date.now()-e,s=Math.floor(n/1e3),a=Math.floor(s/60),d=Math.floor(a/60),i=Math.floor(d/24);return s<60?"just now":a<60?`${a}m ago`:d<24?`${d}h ago`:i<7?`${i}d ago`:new Date(e).toLocaleDateString()}const ot=l.forwardRef(({notification:e,onDismiss:r,onClick:n,expandable:s=!1,className:a,...d},i)=>{const c=e.variant||"default",u=Za(c),N=e.read??!1,f=()=>{n&&n(e.id)},O=h=>{h.stopPropagation(),r&&r(e.id)},m=`notification-${e.id}`,p=`${m}-title`,T=`${m}-description`;return o.jsxs("li",{ref:i,role:"listitem","aria-labelledby":e.title?p:void 0,"aria-describedby":e.description?T:void 0,className:x("group relative flex items-start gap-sm rounded-md border transition-colors",t.NOTIFICATION_TOKENS.item.padding,t.NOTIFICATION_TOKENS.item.radius,t.NOTIFICATION_TOKENS.shadow.item,t.NOTIFICATION_TOKENS.surface[c],!N&&"ring-1 ring-primary/20",n&&"cursor-pointer hover:bg-accent/50",a),onClick:f,...d,children:[o.jsx("div",{className:"flex-shrink-0",children:o.jsx(u,{className:x(t.NOTIFICATION_TOKENS.item.iconSize,"text-foreground/70")})}),o.jsxs("div",{className:"min-w-0 flex-1 space-y-xs",children:[e.title&&o.jsx("div",{id:p,className:"text-sm font-semibold text-foreground",children:e.title}),e.description&&o.jsx("div",{id:T,className:"text-sm text-foreground/80",children:e.description}),o.jsx("div",{className:"text-xs text-muted-foreground",children:Ja(e.timestamp)}),e.action&&o.jsx("div",{className:"mt-sm",children:o.jsx(ne,{variant:"outline",size:"sm",onClick:h=>{var g;h.stopPropagation(),(g=e.action)==null||g.onClick()},className:"h-7 px-xs text-xs",children:e.action.label})})]}),r&&o.jsx(ne,{variant:"ghost",size:"icon",onClick:O,"aria-label":"Dismiss notification",className:"absolute right-xs top-xs h-6 w-6 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100",children:o.jsx(U.X,{className:"h-4 w-4"})})]})});ot.displayName="NotificationCenter.Item";const it=l.forwardRef(({children:e,className:r,"aria-label":n,...s},a)=>o.jsx(ae,{ref:a,as:"ul",role:"list","aria-label":n||"Notifications",className:x("list-none",t.NOTIFICATION_TOKENS.spacing.gap,r),...s,children:e}));it.displayName="NotificationCenter.List";function eo(e){const n=Date.now()-e.timestamp,s=Math.floor(n/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s<7?"This Week":s<30?"This Month":"Older"}const ur=l.forwardRef(({isOpen:e,onClose:r,groupBy:n=eo,width:s="md",autoCollapse:a=!0,returnFocusRef:d},i)=>{const c=l.useRef(null),{getAll:u,markAsRead:N}=Ve(),[f,O]=l.useState(new Set),{handlers:m}=ls({directions:["right"],threshold:100,onSwipe:()=>{r()},enabled:e}),p=u(),T=l.useMemo(()=>n?p.reduce((g,S)=>{const E=n(S);return g[E]||(g[E]=[]),g[E].push(S),g},{}):{default:p},[p,n]);if(l.useEffect(()=>{if(a&&e){const S=Object.keys(T).filter(E=>E!=="Today"&&E!=="Yesterday");O(new Set(S))}},[a,e,T]),as({containerRef:c,enabled:e,returnFocusRef:d}),l.useEffect(()=>{if(!e)return;function g(S){S.key==="Escape"&&r()}return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[e,r]),l.useEffect(()=>{e&&p.forEach(g=>{g.read||N(g.id)})},[e,p,N]),l.useEffect(()=>{if(e&&typeof window<"u")return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),!e)return null;const h=g=>{O(S=>{const E=new Set(S);return E.has(g)?E.delete(g):E.add(g),E})};return o.jsxs(Ne,{children:[o.jsx(nt,{variant:"default",onClick:r,isVisible:e,className:"z-40"}),o.jsx("div",{...m,ref:g=>{c.current=g,m.ref(g),typeof i=="function"?i(g):i&&typeof i=="object"&&(i.current=g)},className:x("fixed right-0 top-0 z-50 h-full",t.NOTIFICATION_TOKENS.panel.width[s],t.NOTIFICATION_TOKENS.panel.maxHeight,t.NOTIFICATION_TOKENS.panel.shadow.default,e?"tm-motion-fade-slide-right":"tm-motion-fade-slide-right-out"),role:"dialog","aria-modal":"true","aria-label":"Notifications",children:o.jsxs(rt,{ref:i,variant:"raised",className:x("flex h-full flex-col",t.NOTIFICATION_TOKENS.panel.radius.default),children:[o.jsxs("div",{className:x("flex items-center justify-between border-b",t.NOTIFICATION_TOKENS.panel.spacing.headerPadding),children:[o.jsx("h2",{className:"text-lg font-semibold",children:"Notifications"}),o.jsxs("div",{className:"flex items-center gap-xs",children:[o.jsx(st,{}),o.jsx(ne,{variant:"ghost",size:"icon",onClick:r,"aria-label":"Close notifications",className:"h-8 w-8",children:o.jsx(U.X,{className:"h-4 w-4"})})]})]}),o.jsx("div",{className:x("flex-1 overflow-y-auto",t.NOTIFICATION_TOKENS.panel.spacing.padding),children:Object.keys(T).length===0?o.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"No notifications"}):o.jsx(ae,{gap:"md",children:Object.entries(T).map(([g,S])=>{const E=f.has(g);return o.jsxs("div",{children:[o.jsx(at,{label:g,collapsed:E,onToggleCollapse:()=>h(g),collapsible:a}),!E&&o.jsx(it,{"aria-label":`${g} notifications`,children:S.map(b=>o.jsx(ot,{notification:b},b.id))})]},g)})})})]})})]})});ur.displayName="NotificationCenter.Panel";const fr=l.forwardRef(({onClick:e,showBadge:r=!0,className:n,...s},a)=>{const{getUnreadCount:d}=Ve(),i=d();return o.jsxs(ne,{ref:a,variant:"ghost",size:"icon",onClick:e,"aria-label":`Open notifications${i>0?` (${i} unread)`:""}`,className:x("relative",n),...s,children:[o.jsx(U.Bell,{className:"h-5 w-5"}),r&&i>0&&o.jsx("span",{className:x("absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-destructive text-xs font-semibold text-destructive-foreground"),"aria-hidden":"true",children:i>99?"99+":i})]})});fr.displayName="NotificationCenter.Trigger";function to(){const e=Ve(),r=l.useCallback((c,u)=>e.push({...u,description:c,variant:"success",channel:"success"}),[e]),n=l.useCallback((c,u)=>e.push({...u,description:c,variant:"danger",channel:"error"}),[e]),s=l.useCallback((c,u)=>e.push({...u,description:c,variant:"info",channel:"info"}),[e]),a=l.useCallback((c,u)=>e.push({...u,description:c,variant:"warning",channel:"warning"}),[e]),d=l.useCallback((c,u)=>e.push({...u,description:c,variant:"system",channel:"system"}),[e]),i=l.useCallback((c,u)=>e.push({...u,description:c,variant:"log",channel:"log"}),[e]);return l.useMemo(()=>({success:r,error:n,info:s,warning:a,system:d,log:i,push:e.push,remove:e.remove,clearAll:e.clearAll,clearChannel:e.clearChannel}),[r,n,s,a,d,i,e])}const ro={Provider:us,Panel:ur,Trigger:fr,List:it,Item:ot,GroupHeader:at,DismissAll:st},fs=l.forwardRef(({className:e,size:r="md",...n},s)=>o.jsx("div",{ref:s,className:x("absolute z-[-1] rotate-45 border border-border bg-popover",t.POPOVER_TOKENS.arrow.size[r],e),style:{transform:`${t.POPOVER_TOKENS.arrow.offset[r]} rotate(45deg)`},...n}));fs.displayName="PopoverArrow";const Xe=Math.min,Oe=Math.max,Fe=Math.round,Ue=Math.floor,re=e=>({x:e,y:e}),no={left:"right",right:"left",bottom:"top",top:"bottom"},so={start:"end",end:"start"};function Qr(e,r,n){return Oe(e,Xe(r,n))}function lt(e,r){return typeof e=="function"?e(r):e}function pe(e){return e.split("-")[0]}function dt(e){return e.split("-")[1]}function Ns(e){return e==="x"?"y":"x"}function ms(e){return e==="y"?"height":"width"}const ao=new Set(["top","bottom"]);function le(e){return ao.has(pe(e))?"y":"x"}function Ts(e){return Ns(le(e))}function oo(e,r,n){n===void 0&&(n=!1);const s=dt(e),a=Ts(e),d=ms(a);let i=a==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return r.reference[d]>r.floating[d]&&(i=We(i)),[i,We(i)]}function io(e){const r=We(e);return[wt(e),r,wt(r)]}function wt(e){return e.replace(/start|end/g,r=>so[r])}const Zr=["left","right"],Jr=["right","left"],lo=["top","bottom"],co=["bottom","top"];function uo(e,r,n){switch(e){case"top":case"bottom":return n?r?Jr:Zr:r?Zr:Jr;case"left":case"right":return r?lo:co;default:return[]}}function fo(e,r,n,s){const a=dt(e);let d=uo(pe(e),n==="start",s);return a&&(d=d.map(i=>i+"-"+a),r&&(d=d.concat(d.map(wt)))),d}function We(e){return e.replace(/left|right|bottom|top/g,r=>no[r])}function No(e){return{top:0,right:0,bottom:0,left:0,...e}}function mo(e){return typeof e!="number"?No(e):{top:e,right:e,bottom:e,left:e}}function Ye(e){const{x:r,y:n,width:s,height:a}=e;return{width:s,height:a,top:n,left:r,right:r+s,bottom:n+a,x:r,y:n}}function en(e,r,n){let{reference:s,floating:a}=e;const d=le(r),i=Ts(r),c=ms(i),u=pe(r),N=d==="y",f=s.x+s.width/2-a.width/2,O=s.y+s.height/2-a.height/2,m=s[c]/2-a[c]/2;let p;switch(u){case"top":p={x:f,y:s.y-a.height};break;case"bottom":p={x:f,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:O};break;case"left":p={x:s.x-a.width,y:O};break;default:p={x:s.x,y:s.y}}switch(dt(r)){case"start":p[i]-=m*(n&&N?-1:1);break;case"end":p[i]+=m*(n&&N?-1:1);break}return p}const To=async(e,r,n)=>{const{placement:s="bottom",strategy:a="absolute",middleware:d=[],platform:i}=n,c=d.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(r));let N=await i.getElementRects({reference:e,floating:r,strategy:a}),{x:f,y:O}=en(N,s,u),m=s,p={},T=0;for(let h=0;h<c.length;h++){const{name:g,fn:S}=c[h],{x:E,y:b,data:I,reset:v}=await S({x:f,y:O,initialPlacement:s,placement:m,strategy:a,middlewareData:p,rects:N,platform:i,elements:{reference:e,floating:r}});f=E??f,O=b??O,p={...p,[g]:{...p[g],...I}},v&&T<=50&&(T++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(N=v.rects===!0?await i.getElementRects({reference:e,floating:r,strategy:a}):v.rects),{x:f,y:O}=en(N,m,u)),h=-1)}return{x:f,y:O,placement:m,strategy:a,middlewareData:p}};async function Os(e,r){var n;r===void 0&&(r={});const{x:s,y:a,platform:d,rects:i,elements:c,strategy:u}=e,{boundary:N="clippingAncestors",rootBoundary:f="viewport",elementContext:O="floating",altBoundary:m=!1,padding:p=0}=lt(r,e),T=mo(p),g=c[m?O==="floating"?"reference":"floating":O],S=Ye(await d.getClippingRect({element:(n=await(d.isElement==null?void 0:d.isElement(g)))==null||n?g:g.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(c.floating)),boundary:N,rootBoundary:f,strategy:u})),E=O==="floating"?{x:s,y:a,width:i.floating.width,height:i.floating.height}:i.reference,b=await(d.getOffsetParent==null?void 0:d.getOffsetParent(c.floating)),I=await(d.isElement==null?void 0:d.isElement(b))?await(d.getScale==null?void 0:d.getScale(b))||{x:1,y:1}:{x:1,y:1},v=Ye(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:b,strategy:u}):E);return{top:(S.top-v.top+T.top)/I.y,bottom:(v.bottom-S.bottom+T.bottom)/I.y,left:(S.left-v.left+T.left)/I.x,right:(v.right-S.right+T.right)/I.x}}const Oo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var n,s;const{placement:a,middlewareData:d,rects:i,initialPlacement:c,platform:u,elements:N}=r,{mainAxis:f=!0,crossAxis:O=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:h=!0,...g}=lt(e,r);if((n=d.arrow)!=null&&n.alignmentOffset)return{};const S=pe(a),E=le(c),b=pe(c)===c,I=await(u.isRTL==null?void 0:u.isRTL(N.floating)),v=m||(b||!h?[We(c)]:io(c)),_=T!=="none";!m&&_&&v.push(...fo(c,h,T,I));const $=[c,...v],y=await Os(r,g),V=[];let A=((s=d.flip)==null?void 0:s.overflows)||[];if(f&&V.push(y[S]),O){const z=oo(a,i,I);V.push(y[z[0]],y[z[1]])}if(A=[...A,{placement:a,overflows:V}],!V.every(z=>z<=0)){var M,Y;const z=(((M=d.flip)==null?void 0:M.index)||0)+1,X=$[z];if(X&&(!(O==="alignment"?E!==le(X):!1)||A.every(C=>le(C.placement)===E?C.overflows[0]>0:!0)))return{data:{index:z,overflows:A},reset:{placement:X}};let L=(Y=A.filter(w=>w.overflows[0]<=0).sort((w,C)=>w.overflows[1]-C.overflows[1])[0])==null?void 0:Y.placement;if(!L)switch(p){case"bestFit":{var H;const w=(H=A.filter(C=>{if(_){const j=le(C.placement);return j===E||j==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(j=>j>0).reduce((j,k)=>j+k,0)]).sort((C,j)=>C[1]-j[1])[0])==null?void 0:H[0];w&&(L=w);break}case"initialPlacement":L=c;break}if(a!==L)return{reset:{placement:L}}}return{}}}},po=new Set(["left","top"]);async function go(e,r){const{placement:n,platform:s,elements:a}=e,d=await(s.isRTL==null?void 0:s.isRTL(a.floating)),i=pe(n),c=dt(n),u=le(n)==="y",N=po.has(i)?-1:1,f=d&&u?-1:1,O=lt(r,e);let{mainAxis:m,crossAxis:p,alignmentAxis:T}=typeof O=="number"?{mainAxis:O,crossAxis:0,alignmentAxis:null}:{mainAxis:O.mainAxis||0,crossAxis:O.crossAxis||0,alignmentAxis:O.alignmentAxis};return c&&typeof T=="number"&&(p=c==="end"?T*-1:T),u?{x:p*f,y:m*N}:{x:m*N,y:p*f}}const So=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var n,s;const{x:a,y:d,placement:i,middlewareData:c}=r,u=await go(r,e);return i===((n=c.offset)==null?void 0:n.placement)&&(s=c.arrow)!=null&&s.alignmentOffset?{}:{x:a+u.x,y:d+u.y,data:{...u,placement:i}}}}},ho=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:n,y:s,placement:a}=r,{mainAxis:d=!0,crossAxis:i=!1,limiter:c={fn:g=>{let{x:S,y:E}=g;return{x:S,y:E}}},...u}=lt(e,r),N={x:n,y:s},f=await Os(r,u),O=le(pe(a)),m=Ns(O);let p=N[m],T=N[O];if(d){const g=m==="y"?"top":"left",S=m==="y"?"bottom":"right",E=p+f[g],b=p-f[S];p=Qr(E,p,b)}if(i){const g=O==="y"?"top":"left",S=O==="y"?"bottom":"right",E=T+f[g],b=T-f[S];T=Qr(E,T,b)}const h=c.fn({...r,[m]:p,[O]:T});return{...h,data:{x:h.x-n,y:h.y-s,enabled:{[m]:d,[O]:i}}}}}};function ct(){return typeof window<"u"}function ve(e){return ps(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function oe(e){var r;return(r=(ps(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function ps(e){return ct()?e instanceof Node||e instanceof Q(e).Node:!1}function ee(e){return ct()?e instanceof Element||e instanceof Q(e).Element:!1}function se(e){return ct()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function tn(e){return!ct()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}const xo=new Set(["inline","contents"]);function je(e){const{overflow:r,overflowX:n,overflowY:s,display:a}=te(e);return/auto|scroll|overlay|hidden|clip/.test(r+s+n)&&!xo.has(a)}const Eo=new Set(["table","td","th"]);function bo(e){return Eo.has(ve(e))}const Io=[":popover-open",":modal"];function ut(e){return Io.some(r=>{try{return e.matches(r)}catch{return!1}})}const vo=["transform","translate","scale","rotate","perspective"],_o=["transform","translate","scale","rotate","perspective","filter"],Ko=["paint","layout","strict","content"];function Nr(e){const r=mr(),n=ee(e)?te(e):e;return vo.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!r&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!r&&(n.filter?n.filter!=="none":!1)||_o.some(s=>(n.willChange||"").includes(s))||Ko.some(s=>(n.contain||"").includes(s))}function wo(e){let r=ue(e);for(;se(r)&&!Ie(r);){if(Nr(r))return r;if(ut(r))return null;r=ue(r)}return null}function mr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const yo=new Set(["html","body","#document"]);function Ie(e){return yo.has(ve(e))}function te(e){return Q(e).getComputedStyle(e)}function ft(e){return ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ue(e){if(ve(e)==="html")return e;const r=e.assignedSlot||e.parentNode||tn(e)&&e.host||oe(e);return tn(r)?r.host:r}function gs(e){const r=ue(e);return Ie(r)?e.ownerDocument?e.ownerDocument.body:e.body:se(r)&&je(r)?r:gs(r)}function Ce(e,r,n){var s;r===void 0&&(r=[]),n===void 0&&(n=!0);const a=gs(e),d=a===((s=e.ownerDocument)==null?void 0:s.body),i=Q(a);if(d){const c=yt(i);return r.concat(i,i.visualViewport||[],je(a)?a:[],c&&n?Ce(c):[])}return r.concat(a,Ce(a,[],n))}function yt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ss(e){const r=te(e);let n=parseFloat(r.width)||0,s=parseFloat(r.height)||0;const a=se(e),d=a?e.offsetWidth:n,i=a?e.offsetHeight:s,c=Fe(n)!==d||Fe(s)!==i;return c&&(n=d,s=i),{width:n,height:s,$:c}}function Tr(e){return ee(e)?e:e.contextElement}function be(e){const r=Tr(e);if(!se(r))return re(1);const n=r.getBoundingClientRect(),{width:s,height:a,$:d}=Ss(r);let i=(d?Fe(n.width):n.width)/s,c=(d?Fe(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Ao=re(0);function hs(e){const r=Q(e);return!mr()||!r.visualViewport?Ao:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function Co(e,r,n){return r===void 0&&(r=!1),!n||r&&n!==Q(e)?!1:r}function ge(e,r,n,s){r===void 0&&(r=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),d=Tr(e);let i=re(1);r&&(s?ee(s)&&(i=be(s)):i=be(e));const c=Co(d,n,s)?hs(d):re(0);let u=(a.left+c.x)/i.x,N=(a.top+c.y)/i.y,f=a.width/i.x,O=a.height/i.y;if(d){const m=Q(d),p=s&&ee(s)?Q(s):s;let T=m,h=yt(T);for(;h&&s&&p!==T;){const g=be(h),S=h.getBoundingClientRect(),E=te(h),b=S.left+(h.clientLeft+parseFloat(E.paddingLeft))*g.x,I=S.top+(h.clientTop+parseFloat(E.paddingTop))*g.y;u*=g.x,N*=g.y,f*=g.x,O*=g.y,u+=b,N+=I,T=Q(h),h=yt(T)}}return Ye({width:f,height:O,x:u,y:N})}function Nt(e,r){const n=ft(e).scrollLeft;return r?r.left+n:ge(oe(e)).left+n}function xs(e,r){const n=e.getBoundingClientRect(),s=n.left+r.scrollLeft-Nt(e,n),a=n.top+r.scrollTop;return{x:s,y:a}}function $o(e){let{elements:r,rect:n,offsetParent:s,strategy:a}=e;const d=a==="fixed",i=oe(s),c=r?ut(r.floating):!1;if(s===i||c&&d)return n;let u={scrollLeft:0,scrollTop:0},N=re(1);const f=re(0),O=se(s);if((O||!O&&!d)&&((ve(s)!=="body"||je(i))&&(u=ft(s)),se(s))){const p=ge(s);N=be(s),f.x=p.x+s.clientLeft,f.y=p.y+s.clientTop}const m=i&&!O&&!d?xs(i,u):re(0);return{width:n.width*N.x,height:n.height*N.y,x:n.x*N.x-u.scrollLeft*N.x+f.x+m.x,y:n.y*N.y-u.scrollTop*N.y+f.y+m.y}}function Ro(e){return Array.from(e.getClientRects())}function Vo(e){const r=oe(e),n=ft(e),s=e.ownerDocument.body,a=Oe(r.scrollWidth,r.clientWidth,s.scrollWidth,s.clientWidth),d=Oe(r.scrollHeight,r.clientHeight,s.scrollHeight,s.clientHeight);let i=-n.scrollLeft+Nt(e);const c=-n.scrollTop;return te(s).direction==="rtl"&&(i+=Oe(r.clientWidth,s.clientWidth)-a),{width:a,height:d,x:i,y:c}}const rn=25;function jo(e,r){const n=Q(e),s=oe(e),a=n.visualViewport;let d=s.clientWidth,i=s.clientHeight,c=0,u=0;if(a){d=a.width,i=a.height;const f=mr();(!f||f&&r==="fixed")&&(c=a.offsetLeft,u=a.offsetTop)}const N=Nt(s);if(N<=0){const f=s.ownerDocument,O=f.body,m=getComputedStyle(O),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,T=Math.abs(s.clientWidth-O.clientWidth-p);T<=rn&&(d-=T)}else N<=rn&&(d+=N);return{width:d,height:i,x:c,y:u}}const zo=new Set(["absolute","fixed"]);function Mo(e,r){const n=ge(e,!0,r==="fixed"),s=n.top+e.clientTop,a=n.left+e.clientLeft,d=se(e)?be(e):re(1),i=e.clientWidth*d.x,c=e.clientHeight*d.y,u=a*d.x,N=s*d.y;return{width:i,height:c,x:u,y:N}}function nn(e,r,n){let s;if(r==="viewport")s=jo(e,n);else if(r==="document")s=Vo(oe(e));else if(ee(r))s=Mo(r,n);else{const a=hs(e);s={x:r.x-a.x,y:r.y-a.y,width:r.width,height:r.height}}return Ye(s)}function Es(e,r){const n=ue(e);return n===r||!ee(n)||Ie(n)?!1:te(n).position==="fixed"||Es(n,r)}function ko(e,r){const n=r.get(e);if(n)return n;let s=Ce(e,[],!1).filter(c=>ee(c)&&ve(c)!=="body"),a=null;const d=te(e).position==="fixed";let i=d?ue(e):e;for(;ee(i)&&!Ie(i);){const c=te(i),u=Nr(i);!u&&c.position==="fixed"&&(a=null),(d?!u&&!a:!u&&c.position==="static"&&!!a&&zo.has(a.position)||je(i)&&!u&&Es(e,i))?s=s.filter(f=>f!==i):a=c,i=ue(i)}return r.set(e,s),s}function Po(e){let{element:r,boundary:n,rootBoundary:s,strategy:a}=e;const i=[...n==="clippingAncestors"?ut(r)?[]:ko(r,this._c):[].concat(n),s],c=i[0],u=i.reduce((N,f)=>{const O=nn(r,f,a);return N.top=Oe(O.top,N.top),N.right=Xe(O.right,N.right),N.bottom=Xe(O.bottom,N.bottom),N.left=Oe(O.left,N.left),N},nn(r,c,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Do(e){const{width:r,height:n}=Ss(e);return{width:r,height:n}}function Uo(e,r,n){const s=se(r),a=oe(r),d=n==="fixed",i=ge(e,!0,d,r);let c={scrollLeft:0,scrollTop:0};const u=re(0);function N(){u.x=Nt(a)}if(s||!s&&!d)if((ve(r)!=="body"||je(a))&&(c=ft(r)),s){const p=ge(r,!0,d,r);u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}else a&&N();d&&!s&&a&&N();const f=a&&!s&&!d?xs(a,c):re(0),O=i.left+c.scrollLeft-u.x-f.x,m=i.top+c.scrollTop-u.y-f.y;return{x:O,y:m,width:i.width,height:i.height}}function ht(e){return te(e).position==="static"}function sn(e,r){if(!se(e)||te(e).position==="fixed")return null;if(r)return r(e);let n=e.offsetParent;return oe(e)===n&&(n=n.ownerDocument.body),n}function bs(e,r){const n=Q(e);if(ut(e))return n;if(!se(e)){let a=ue(e);for(;a&&!Ie(a);){if(ee(a)&&!ht(a))return a;a=ue(a)}return n}let s=sn(e,r);for(;s&&bo(s)&&ht(s);)s=sn(s,r);return s&&Ie(s)&&ht(s)&&!Nr(s)?n:s||wo(e)||n}const Lo=async function(e){const r=this.getOffsetParent||bs,n=this.getDimensions,s=await n(e.floating);return{reference:Uo(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Bo(e){return te(e).direction==="rtl"}const Go={convertOffsetParentRelativeRectToViewportRelativeRect:$o,getDocumentElement:oe,getClippingRect:Po,getOffsetParent:bs,getElementRects:Lo,getClientRects:Ro,getDimensions:Do,getScale:be,isElement:ee,isRTL:Bo};function Is(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function Ho(e,r){let n=null,s;const a=oe(e);function d(){var c;clearTimeout(s),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),d();const N=e.getBoundingClientRect(),{left:f,top:O,width:m,height:p}=N;if(c||r(),!m||!p)return;const T=Ue(O),h=Ue(a.clientWidth-(f+m)),g=Ue(a.clientHeight-(O+p)),S=Ue(f),b={rootMargin:-T+"px "+-h+"px "+-g+"px "+-S+"px",threshold:Oe(0,Xe(1,u))||1};let I=!0;function v(_){const $=_[0].intersectionRatio;if($!==u){if(!I)return i();$?i(!1,$):s=setTimeout(()=>{i(!1,1e-7)},1e3)}$===1&&!Is(N,e.getBoundingClientRect())&&i(),I=!1}try{n=new IntersectionObserver(v,{...b,root:a.ownerDocument})}catch{n=new IntersectionObserver(v,b)}n.observe(e)}return i(!0),d}function Xo(e,r,n,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:d=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=s,N=Tr(e),f=a||d?[...N?Ce(N):[],...Ce(r)]:[];f.forEach(S=>{a&&S.addEventListener("scroll",n,{passive:!0}),d&&S.addEventListener("resize",n)});const O=N&&c?Ho(N,n):null;let m=-1,p=null;i&&(p=new ResizeObserver(S=>{let[E]=S;E&&E.target===N&&p&&(p.unobserve(r),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(r)})),n()}),N&&!u&&p.observe(N),p.observe(r));let T,h=u?ge(e):null;u&&g();function g(){const S=ge(e);h&&!Is(h,S)&&n(),h=S,T=requestAnimationFrame(g)}return n(),()=>{var S;f.forEach(E=>{a&&E.removeEventListener("scroll",n),d&&E.removeEventListener("resize",n)}),O==null||O(),(S=p)==null||S.disconnect(),p=null,u&&cancelAnimationFrame(T)}}const Fo=So,Wo=ho,Yo=Oo,qo=(e,r,n)=>{const s=new Map,a={platform:Go,...n},d={...a.platform,_c:s};return To(e,r,{...a,platform:d})};var Qo=typeof document<"u",Zo=function(){},Ge=Qo?ie.useLayoutEffect:Zo;function qe(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let n,s,a;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==r.length)return!1;for(s=n;s--!==0;)if(!qe(e[s],r[s]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(r,a[s]))return!1;for(s=n;s--!==0;){const d=a[s];if(!(d==="_owner"&&e.$$typeof)&&!qe(e[d],r[d]))return!1}return!0}return e!==e&&r!==r}function vs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function an(e,r){const n=vs(e);return Math.round(r*n)/n}function xt(e){const r=l.useRef(e);return Ge(()=>{r.current=e}),r}function Jo(e){e===void 0&&(e={});const{placement:r="bottom",strategy:n="absolute",middleware:s=[],platform:a,elements:{reference:d,floating:i}={},transform:c=!0,whileElementsMounted:u,open:N}=e,[f,O]=l.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[m,p]=l.useState(s);qe(m,s)||p(s);const[T,h]=l.useState(null),[g,S]=l.useState(null),E=l.useCallback(C=>{C!==_.current&&(_.current=C,h(C))},[]),b=l.useCallback(C=>{C!==$.current&&($.current=C,S(C))},[]),I=d||T,v=i||g,_=l.useRef(null),$=l.useRef(null),y=l.useRef(f),V=u!=null,A=xt(u),M=xt(a),Y=xt(N),H=l.useCallback(()=>{if(!_.current||!$.current)return;const C={placement:r,strategy:n,middleware:m};M.current&&(C.platform=M.current),qo(_.current,$.current,C).then(j=>{const k={...j,isPositioned:Y.current!==!1};z.current&&!qe(y.current,k)&&(y.current=k,xa.flushSync(()=>{O(k)}))})},[m,r,n,M,Y]);Ge(()=>{N===!1&&y.current.isPositioned&&(y.current.isPositioned=!1,O(C=>({...C,isPositioned:!1})))},[N]);const z=l.useRef(!1);Ge(()=>(z.current=!0,()=>{z.current=!1}),[]),Ge(()=>{if(I&&(_.current=I),v&&($.current=v),I&&v){if(A.current)return A.current(I,v,H);H()}},[I,v,H,A,V]);const X=l.useMemo(()=>({reference:_,floating:$,setReference:E,setFloating:b}),[E,b]),L=l.useMemo(()=>({reference:I,floating:v}),[I,v]),w=l.useMemo(()=>{const C={position:n,left:0,top:0};if(!L.floating)return C;const j=an(L.floating,f.x),k=an(L.floating,f.y);return c?{...C,transform:"translate("+j+"px, "+k+"px)",...vs(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:k}},[n,c,L.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:H,refs:X,elements:L,floatingStyles:w}),[f,H,X,L,w])}const ei=(e,r)=>({...Fo(e),options:[e,r]}),ti=(e,r)=>({...Wo(e),options:[e,r]}),ri=(e,r)=>({...Yo(e),options:[e,r]});function _s({anchorRef:e,contentRef:r,placement:n="bottom",offset:s=4,enabled:a=!0,flip:d=!0,shift:i=!0}){const[c,u]=l.useState(!1),[N,f]=l.useState(!1);l.useEffect(()=>{f(!0)},[]);const O=l.useMemo(()=>{const T=[ei(s)];return d&&T.push(ri()),i&&T.push(ti({padding:8})),T},[s,d,i]),m=Jo({placement:n,middleware:O,whileElementsMounted:N&&a?Xo:void 0});return l.useLayoutEffect(()=>{if(!N||!a){u(!1);return}if(typeof window>"u")return;const T=e.current,h=r.current;if(!T||!h){u(!1);return}m.refs.setReference(T),m.refs.setFloating(h),u(!0)},[N,a,e,r,m.refs,n,s]),{position:l.useMemo(()=>!c||!m.x||!m.y?{position:"fixed",top:0,left:0,visibility:"hidden"}:{position:m.strategy,top:m.y??0,left:m.x??0},[c,m.x,m.y,m.strategy]),placement:m.placement,isPositioned:c}}const Ks=l.createContext(null);function he(){const e=l.useContext(Ks);if(!e)throw new Error("Popover components must be used within PopoverRoot");return e}function _e({open:e,onOpenChange:r,defaultOpen:n=!1,children:s}){const[a,d]=l.useState(n),i=l.useRef(`popover-trigger-${Math.random().toString(36).substr(2,9)}`),c=l.useRef(`popover-content-${Math.random().toString(36).substr(2,9)}`),u=e!==void 0,N=u?e:a,f=l.useCallback(m=>{u||d(m),r==null||r(m)},[u,r]),O=l.useMemo(()=>({open:N,onOpenChange:f,triggerId:i.current,contentId:c.current}),[N,f]);return o.jsx(Ks.Provider,{value:O,children:s})}_e.displayName="PopoverRoot";const ws=K.cva("z-50 outline-none border border-border bg-popover text-popover-foreground",{variants:{size:{xs:`${t.POPOVER_TOKENS.content.width.xs} ${t.POPOVER_TOKENS.content.padding.sm} ${t.POPOVER_TOKENS.content.radius.sm} ${t.POPOVER_TOKENS.content.shadow.sm}`,sm:`${t.POPOVER_TOKENS.content.width.sm} ${t.POPOVER_TOKENS.content.padding.sm} ${t.POPOVER_TOKENS.content.radius.sm} ${t.POPOVER_TOKENS.content.shadow.sm}`,md:`${t.POPOVER_TOKENS.content.width.md} ${t.POPOVER_TOKENS.content.padding.md} ${t.POPOVER_TOKENS.content.radius.md} ${t.POPOVER_TOKENS.content.shadow.md}`,lg:`${t.POPOVER_TOKENS.content.width.lg} ${t.POPOVER_TOKENS.content.padding.lg} ${t.POPOVER_TOKENS.content.radius.md} ${t.POPOVER_TOKENS.content.shadow.md}`}},defaultVariants:{size:"md"}}),mt=l.forwardRef(({className:e,size:r="md",placement:n="bottom",offset:s=4,closeOnInteractOutside:a=!0,children:d,...i},c)=>{const{open:u,onOpenChange:N,triggerId:f,contentId:O}=he(),m=l.useRef(null),p=l.useRef(null);l.useImperativeHandle(c,()=>m.current,[]),l.useEffect(()=>{if(typeof document>"u")return;const S=document.getElementById(f);S&&(p.current=S)},[f]);const{position:T,isPositioned:h}=_s({anchorRef:p,contentRef:m,placement:n,offset:s,enabled:u});if(l.useEffect(()=>{if(!u||!a)return;function S(E){const b=E.target;m.current&&!m.current.contains(b)&&p.current&&!p.current.contains(b)&&N(!1)}return document.addEventListener("mousedown",S,!0),()=>{document.removeEventListener("mousedown",S,!0)}},[u,a,N]),l.useEffect(()=>{if(!u)return;function S(E){E.key==="Escape"&&N(!1)}return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[u,N]),!u)return null;const g=()=>n!=null&&n.startsWith("top")?"tm-motion-fade-slide-down":n!=null&&n.startsWith("bottom")?"tm-motion-fade-slide-up":n!=null&&n.startsWith("left")?"tm-motion-fade-slide-right":n!=null&&n.startsWith("right")?"tm-motion-fade-slide-left":"tm-motion-fade-scale";return o.jsx(Ne,{children:o.jsx("div",{ref:m,id:O,role:"dialog","aria-labelledby":f,className:x(ws({size:r}),g(),!h&&"invisible",e),style:T,...i,children:d})})});mt.displayName="PopoverContent";const Tt=l.forwardRef(({asChild:e=!1,className:r,children:n,...s},a)=>{const{open:d,onOpenChange:i,triggerId:c,contentId:u}=he(),N=l.useRef(null);l.useImperativeHandle(a,()=>N.current,[]);const f=l.useCallback(p=>{var T;i(!d),(T=s.onClick)==null||T.call(s,p)},[d,i,s]),O=l.useCallback(p=>{var T;(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),i(!d)),(T=s.onKeyDown)==null||T.call(s,p)},[d,i,s]),m={...s,ref:N,id:c,"aria-haspopup":"dialog","aria-expanded":d,"aria-controls":d?u:void 0,onClick:f,onKeyDown:O,className:x(r)};return e?o.jsx(Qe.Slot,{...m,children:n}):o.jsx("button",{type:"button",...m,ref:N,children:n})});Tt.displayName="PopoverTrigger";const ys=l.createContext(null);function At(){const e=l.useContext(ys);if(!e)throw new Error("DropdownMenu components must be used within DropdownMenuRoot");return e}function As(e){const[r,n]=l.useState(null),[s,a]=l.useState([]),d=l.useCallback(u=>{a(N=>N.includes(u)?N:[...N,u])},[]),i=l.useCallback(u=>{a(N=>N.filter(f=>f!==u))},[]),c=l.useMemo(()=>({focusedIndex:r,setFocusedIndex:n,itemIds:s,registerItem:d,unregisterItem:i}),[r,s,d,i]);return l.useEffect(()=>{!e.open&&e.open!==void 0&&n(null)},[e.open]),o.jsx(_e,{...e,children:o.jsx(ys.Provider,{value:c,children:e.children})})}As.displayName="DropdownMenuRoot";const Ke=l.forwardRef(({className:e,disabled:r=!1,selected:n=!1,onSelect:s,inset:a=!1,children:d,onClick:i,onKeyDown:c,...u},N)=>{const{onOpenChange:f}=he(),{itemIds:O,focusedIndex:m,setFocusedIndex:p}=At(),T=l.useRef(null),h=l.useRef(`dropdown-item-${Math.random().toString(36).substr(2,9)}`);l.useImperativeHandle(N,()=>T.current,[]);const{registerItem:g,unregisterItem:S}=At();l.useEffect(()=>{const _=h.current;return g(_),()=>{S(_)}},[g,S]);const E=l.useMemo(()=>O.indexOf(h.current),[O]),b=m===E,I=l.useCallback(_=>{if(r){_.preventDefault();return}s==null||s(_.nativeEvent),i==null||i(_),f(!1)},[r,s,i,f]),v=l.useCallback(_=>{if(!r){if(_.key==="Enter"||_.key===" "){_.preventDefault(),s==null||s(_.nativeEvent),f(!1);return}c==null||c(_)}},[r,s,f,c]);return o.jsx("div",{ref:T,id:h.current,role:"menuitem",tabIndex:b?0:-1,"aria-disabled":r,"aria-selected":n,className:x("relative flex cursor-default select-none items-center outline-none transition-colors",t.MENU_TOKENS.item.padding.md,t.MENU_TOKENS.item.radius.md,a&&"pl-8",!r&&"focus:bg-accent focus:text-accent-foreground",n&&"bg-accent/50",r&&"pointer-events-none opacity-50",e),onClick:I,onKeyDown:v,onFocus:()=>p(E),...u,children:d})});Ke.displayName="DropdownMenuItem";const Cs=l.forwardRef(({className:e,checked:r=!1,children:n,...s},a)=>o.jsxs(Ke,{ref:a,selected:r,className:x("pl-8",e),...s,children:[o.jsx("span",{className:x("absolute left-2 flex items-center justify-center",t.MENU_TOKENS.indicator.size.sm),children:r&&o.jsx(U.Check,{className:t.MENU_TOKENS.indicator.size.sm})}),n]}));Cs.displayName="DropdownMenuCheckItem";const Or=l.forwardRef(({className:e,children:r,onKeyDown:n,...s},a)=>{const{itemIds:d,focusedIndex:i,setFocusedIndex:c}=At(),u=l.useCallback(N=>{var m,p,T,h;const f=d.filter(g=>{const S=document.getElementById(g);return S&&!S.hasAttribute("aria-disabled")});if(f.length===0){n==null||n(N);return}let O=i??0;switch(N.key){case"ArrowDown":N.preventDefault(),O=(O+1)%f.length,c(O);const g=f[O];g&&((m=document.getElementById(g))==null||m.focus());break;case"ArrowUp":N.preventDefault(),O=O<=0?f.length-1:O-1,c(O);const S=f[O];S&&((p=document.getElementById(S))==null||p.focus());break;case"Home":N.preventDefault(),O=0,c(O);const E=f[O];E&&((T=document.getElementById(E))==null||T.focus());break;case"End":N.preventDefault(),O=f.length-1,c(O);const b=f[O];b&&((h=document.getElementById(b))==null||h.focus());break;case"Tab":N.preventDefault();break;default:n==null||n(N);break}},[d,i,c,n]);return o.jsx(mt,{ref:a,className:x(`${t.MENU_TOKENS.content.padding.md} ${t.MENU_TOKENS.content.radius.md} ${t.MENU_TOKENS.content.shadow.md} ${t.MENU_TOKENS.content.minWidth.md}`,"tm-motion-fade-slide-up overflow-hidden",e),role:"menu",onKeyDown:u,placement:"bottom",...s,children:r})});Or.displayName="DropdownMenuContent";const pr=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,role:"group",className:x(e),...r}));pr.displayName="DropdownMenuGroup";const gr=l.forwardRef(({className:e,inset:r=!1,...n},s)=>o.jsx("div",{ref:s,className:x(t.MENU_TOKENS.label.padding.md,t.MENU_TOKENS.label.textStyle,r&&"pl-8",e),...n}));gr.displayName="DropdownMenuLabel";const $s=l.createContext(null);function ni(){return l.useContext($s)}const Rs=l.forwardRef(({className:e,value:r,onValueChange:n,...s},a)=>{const d=l.useMemo(()=>({value:r,onValueChange:n}),[r,n]);return o.jsx($s.Provider,{value:d,children:o.jsx("div",{ref:a,role:"radiogroup",className:x(e),...s})})});Rs.displayName="DropdownMenuRadioGroup";const Vs=l.forwardRef(({className:e,value:r,children:n,onSelect:s,...a},d)=>{const i=ni(),c=(i==null?void 0:i.value)===r,u=l.useCallback(N=>{var f;(f=i==null?void 0:i.onValueChange)==null||f.call(i,r),s==null||s(N)},[r,i,s]);return o.jsxs(Ke,{ref:d,selected:c,className:x("pl-8",e),onSelect:u,...a,children:[o.jsx("span",{className:x("absolute left-2 flex items-center justify-center",t.MENU_TOKENS.indicator.size.sm),children:c&&o.jsx(U.Circle,{className:"h-2 w-2 fill-current"})}),n]})});Vs.displayName="DropdownMenuRadioItem";const Sr=l.forwardRef(({className:e,...r},n)=>o.jsx("div",{ref:n,role:"separator",className:x(t.MENU_TOKENS.separator.margin.md,t.MENU_TOKENS.separator.height,t.MENU_TOKENS.separator.color,e),...r}));Sr.displayName="DropdownMenuSeparator";function js(e){return o.jsx(_e,{...e})}js.displayName="DropdownMenuSub";const zs=l.forwardRef((e,r)=>o.jsx(Or,{ref:r,...e}));zs.displayName="DropdownMenuSubContent";const Ms=l.forwardRef(({className:e,children:r,...n},s)=>o.jsxs(Ke,{ref:s,className:x(e),...n,children:[r,o.jsx(U.ChevronRight,{className:"ml-auto h-4 w-4"})]}));Ms.displayName="DropdownMenuSubTrigger";const ks=l.forwardRef((e,r)=>o.jsx(Tt,{ref:r,...e,"aria-haspopup":"menu"}));ks.displayName="DropdownMenuTrigger";const Ps=l.forwardRef(({onMouseEnter:e,onMouseLeave:r,...n},s)=>{const{onOpenChange:a}=he(),d=l.useCallback(c=>{a(!0),e==null||e(c)},[a,e]),i=l.useCallback(c=>{a(!1),r==null||r(c)},[a,r]);return o.jsx(mt,{ref:s,onMouseEnter:d,onMouseLeave:i,role:"tooltip",...n})});Ps.displayName="HoverCardContent";function Ds({openDelay:e=0,closeDelay:r=300,defaultOpen:n=!1,...s}){const[a,d]=l.useState(n),i=l.useRef(null),c=l.useRef(null),u=l.useCallback(N=>{i.current&&(clearTimeout(i.current),i.current=null),c.current&&(clearTimeout(c.current),c.current=null),N?e>0?i.current=setTimeout(()=>{d(!0)},e):d(!0):r>0?c.current=setTimeout(()=>{d(!1)},r):d(!1)},[e,r]);return l.useEffect(()=>()=>{i.current&&clearTimeout(i.current),c.current&&clearTimeout(c.current)},[]),o.jsx(_e,{...s,open:a,onOpenChange:u,defaultOpen:n})}Ds.displayName="HoverCardRoot";const Us=l.forwardRef(({onMouseEnter:e,onMouseLeave:r,onFocus:n,onBlur:s,...a},d)=>{const{onOpenChange:i}=he(),c=l.useCallback(O=>{i(!0),e==null||e(O)},[i,e]),u=l.useCallback(O=>{i(!1),r==null||r(O)},[i,r]),N=l.useCallback(O=>{i(!0),n==null||n(O)},[i,n]),f=l.useCallback(O=>{i(!1),s==null||s(O)},[i,s]);return o.jsx(Tt,{ref:d,onMouseEnter:c,onMouseLeave:u,onFocus:N,onBlur:f,"aria-haspopup":"dialog",...a})});Us.displayName="HoverCardTrigger";const Ls=l.createContext(null);function Bs(){const e=l.useContext(Ls);if(!e)throw new Error("ContextMenu components must be used within ContextMenuRoot");return e}function Gs(e){const[r,n]=l.useState(!1),[s,a]=l.useState(null),[d,i]=l.useState(null),[c,u]=l.useState([]),N=l.useCallback(m=>{u(p=>p.includes(m)?p:[...p,m])},[]),f=l.useCallback(m=>{u(p=>p.filter(T=>T!==m))},[]),O=l.useMemo(()=>({focusedIndex:d,setFocusedIndex:i,itemIds:c,registerItem:N,unregisterItem:f,position:s,setPosition:a}),[d,c,N,f,s]);return l.useEffect(()=>{r||(i(null),a(null))},[r]),o.jsx(_e,{...e,open:r,onOpenChange:n,children:o.jsx(Ls.Provider,{value:O,children:e.children})})}Gs.displayName="ContextMenuRoot";const Hs=l.forwardRef(({className:e,placement:r="bottom-start",offset:n=4,children:s,...a},d)=>{const{open:i,onOpenChange:c,triggerId:u,contentId:N}=he(),{position:f}=Bs(),O=l.useRef(null),m=l.useRef(null);l.useImperativeHandle(d,()=>O.current,[]),l.useEffect(()=>{if(!f||typeof document>"u")return;const h=document.createElement("div");return h.style.position="fixed",h.style.left=`${f.x}px`,h.style.top=`${f.y}px`,h.style.width="1px",h.style.height="1px",h.style.pointerEvents="none",h.style.visibility="hidden",document.body.appendChild(h),m.current=h,()=>{h.parentNode&&h.parentNode.removeChild(h)}},[f]);const{position:p,isPositioned:T}=_s({anchorRef:m,contentRef:O,placement:r,offset:n,enabled:i&&!!f});return l.useEffect(()=>{if(!i)return;function h(g){const S=g.target;O.current&&!O.current.contains(S)&&c(!1)}return document.addEventListener("mousedown",h,!0),()=>{document.removeEventListener("mousedown",h,!0)}},[i,c]),l.useEffect(()=>{if(!i)return;function h(g){g.key==="Escape"&&c(!1)}return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[i,c]),i?o.jsx(Ne,{children:o.jsx("div",{ref:O,id:N,role:"menu","aria-labelledby":u,className:x("z-50 border border-border bg-popover text-popover-foreground outline-none",`${t.MENU_TOKENS.content.padding.md} ${t.MENU_TOKENS.content.radius.md} ${t.MENU_TOKENS.content.shadow.md} ${t.MENU_TOKENS.content.minWidth.md}`,"overflow-hidden",!T&&"invisible",e),style:p,...a,children:s})}):null});Hs.displayName="ContextMenuContent";const Xs=l.forwardRef((e,r)=>o.jsx(pr,{ref:r,...e}));Xs.displayName="ContextMenuGroup";const Fs=l.forwardRef((e,r)=>o.jsx(Ke,{ref:r,...e}));Fs.displayName="ContextMenuItem";const Ws=l.forwardRef((e,r)=>o.jsx(gr,{ref:r,...e}));Ws.displayName="ContextMenuLabel";const Ys=l.forwardRef((e,r)=>o.jsx(Sr,{ref:r,...e}));Ys.displayName="ContextMenuSeparator";const qs=l.forwardRef(({asChild:e=!1,className:r,children:n,onContextMenu:s,...a},d)=>{const{onOpenChange:i}=he(),{setPosition:c}=Bs(),u=l.useRef(null);l.useImperativeHandle(d,()=>u.current,[]);const N=l.useCallback(f=>{f.preventDefault(),f.stopPropagation(),c({x:f.clientX,y:f.clientY}),i(!0),s==null||s(f)},[i,c,s]);if(e&&l.isValidElement(n)){const f=n.props;return l.cloneElement(n,{...a,...f,ref:u,onContextMenu:N,className:x(r,f.className)})}return o.jsx("div",{ref:u,onContextMenu:N,className:x(r),...a,children:n})});qs.displayName="ContextMenuTrigger";const Qs=K.cva(`${t.DATA_TOKENS.skeleton.background.default} ${t.DATA_TOKENS.skeleton.animation.pulse}`,{variants:{variant:{text:`${t.DATA_TOKENS.skeleton.height.text} ${t.DATA_TOKENS.skeleton.radius.text} ${t.DATA_TOKENS.skeleton.width.full}`,inline:`${t.DATA_TOKENS.skeleton.height.inline} ${t.DATA_TOKENS.skeleton.radius.inline} ${t.DATA_TOKENS.skeleton.width.inline}`,block:`${t.DATA_TOKENS.skeleton.height.block} ${t.DATA_TOKENS.skeleton.radius.block} ${t.DATA_TOKENS.skeleton.width.full}`,card:`${t.DATA_TOKENS.skeleton.height.card} ${t.DATA_TOKENS.skeleton.radius.card} ${t.DATA_TOKENS.skeleton.width.full}`,circle:`${t.DATA_TOKENS.skeleton.height.circle} ${t.DATA_TOKENS.skeleton.radius.circle}`}},defaultVariants:{variant:"text"}}),hr=l.forwardRef(({className:e,variant:r,"aria-hidden":n=!0,...s},a)=>o.jsx("div",{ref:a,className:x(Qs({variant:r}),e),"aria-hidden":n,...s}));hr.displayName="Skeleton";const xr=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("div",{ref:s,className:x("mt-2",e),...n,children:r}));xr.displayName="EmptyStateAction";const Er=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("p",{ref:s,className:x(t.DATA_TOKENS.emptyState.typography.description.fontSize,t.DATA_TOKENS.emptyState.typography.description.fontWeight,"max-w-md text-muted-foreground",e),...n,children:r}));Er.displayName="EmptyStateDescription";const Ot=l.forwardRef(({children:e,size:r="md",className:n,...s},a)=>{const d=t.DATA_TOKENS.emptyState.iconSize[r];return o.jsx("div",{ref:a,className:x("flex items-center justify-center text-muted-foreground",d,n),...s,children:e})});Ot.displayName="EmptyStateIcon";const pt=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("h3",{ref:s,className:x(t.DATA_TOKENS.emptyState.typography.title.fontSize,t.DATA_TOKENS.emptyState.typography.title.fontWeight,"text-foreground",e),...n,children:r}));pt.displayName="EmptyStateTitle";const xe=l.forwardRef(({id:e,className:r,children:n,...s},a)=>{const d=l.useId(),i=e||`empty-state-${d}`;return o.jsx(rt,{ref:a,variant:"flat",radius:"xl",p:"lg",className:x("text-center",r),id:i,...s,children:o.jsx(ae,{gap:"md",align:"center",justify:"center",children:n})})});xe.displayName="EmptyState";xe.Icon=Ot;xe.Title=pt;xe.Description=Er;xe.Action=xr;const br=l.forwardRef(({padding:e="md",className:r,children:n,...s},a)=>{const d=t.DATA_TOKENS.dataList.rowPadding[e];return o.jsx("div",{ref:a,className:x(d,"flex flex-col border-b border-border last:border-0 md:flex-row md:items-center",r),...s,children:n})});br.displayName="DataListItem";const Ir=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("dt",{ref:s,className:x("mb-1 font-semibold text-foreground md:mb-0","md:w-32",e),...n,children:r}));Ir.displayName="DataListLabel";const vr=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("dd",{ref:s,className:x("flex-1 text-muted-foreground",e),...n,children:r}));vr.displayName="DataListValue";const we=l.forwardRef(({labelWidth:e="md",className:r,children:n,...s},a)=>o.jsx("dl",{ref:a,className:x(t.DATA_TOKENS.dataList.spacing.gap,r),...s,children:n}));we.displayName="DataListRoot";we.Item=br;we.Label=Ir;we.Value=vr;const _r=l.forwardRef(({className:e,...r},n)=>o.jsx("tbody",{ref:n,className:x(e),role:"rowgroup",...r}));_r.displayName="TableBody";const Kr=l.forwardRef(({align:e="left",size:r="md",className:n,...s},a)=>{const d=t.DATA_TOKENS.table.padding.cell[r],i=t.DATA_TOKENS.table.typography.cell.fontSize,c=t.DATA_TOKENS.table.typography.cell.fontWeight,u={left:"text-left",center:"text-center",right:"text-right"};return o.jsx("td",{ref:a,className:x(d,i,c,u[e],n),role:"cell",...s})});Kr.displayName="TableCell";const wr=l.forwardRef(({colSpan:e,message:r="No data available",className:n,...s},a)=>o.jsx("tr",{ref:a,className:x(n),...s,children:o.jsx("td",{colSpan:e,className:"p-8",children:o.jsxs(xe,{children:[o.jsx(Ot,{children:"📭"}),o.jsx(pt,{children:r})]})})}));wr.displayName="TableEmpty";const yr=l.forwardRef(({colSpan:e,expanded:r,children:n,className:s,...a},d)=>o.jsx("td",{ref:d,colSpan:e,className:x("p-0","overflow-hidden transition-all duration-normal ease-in-out",r?"max-h-[100vh] opacity-100":"max-h-0 opacity-0",s),...a,children:o.jsx("div",{className:x("p-md",r?"block":"hidden"),children:n})}));yr.displayName="TableExpandableContent";const gt=l.forwardRef(({direction:e,className:r,...n},s)=>o.jsx("span",{ref:s,className:x("inline-flex size-4 items-center text-muted-foreground transition-transform",e==="desc"&&"rotate-180",!e&&"opacity-30",r),"aria-hidden":"true",...n,children:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"m7 15 5 5 5-5"}),o.jsx("path",{d:"m7 9 5-5 5 5"})]})}));gt.displayName="TableSortIcon";const Ar=l.forwardRef(({align:e="left",sortable:r=!1,columnKey:n,size:s="md",className:a,children:d,...i},c)=>{const{sortState:u,setSortState:N}=Js(),f=l.useCallback(()=>{if(!r||!n)return;const S=u.column===n?u.direction:null;let E=null;S===null?E="asc":S==="asc"?E="desc":E=null,N({column:E?n:null,direction:E})},[r,n,u,N]),O=t.DATA_TOKENS.table.padding.header[s],m=t.DATA_TOKENS.table.typography.header.fontSize,p=t.DATA_TOKENS.table.typography.header.fontWeight,T={left:"text-left",center:"text-center",right:"text-right"},g=u.column===n?u.direction:null;return o.jsx("th",{ref:c,className:x(O,m,p,T[e],t.DATA_TOKENS.table.colors.border,"border-b",r&&"cursor-pointer select-none hover:bg-muted/50",a),onClick:f,"aria-sort":(()=>{if(g==="asc")return"ascending";if(g==="desc")return"descending";if(r)return"none"})(),role:"columnheader",...i,children:o.jsxs("div",{className:"flex items-center gap-2",children:[d,r&&o.jsx(gt,{direction:g})]})})});Ar.displayName="TableHead";const Cr=l.forwardRef(({sticky:e=!1,className:r,...n},s)=>o.jsx("thead",{ref:s,className:x(e&&"sticky top-0 z-10 bg-background",r),role:"rowgroup",...n}));Cr.displayName="TableHeader";const $r=l.forwardRef(({colSpan:e,rows:r=5,className:n,...s},a)=>o.jsx(o.Fragment,{children:Array.from({length:r}).map((d,i)=>o.jsx("tr",{ref:i===0?a:void 0,className:x(n),...s,children:Array.from({length:e}).map((c,u)=>o.jsx("td",{className:"p-sm",children:o.jsx(hr,{variant:"text",className:"w-full"})},u))},i))}));$r.displayName="TableLoadingState";const Rr=l.forwardRef(({selected:e=!1,expandable:r=!1,rowKey:n,expanded:s=!1,className:a,...d},i)=>o.jsx("tr",{ref:i,className:x(t.DATA_TOKENS.table.colors.border,"border-b",t.DATA_TOKENS.table.colors.rowHover,e&&t.DATA_TOKENS.table.colors.rowSelected,r&&"cursor-pointer",a),"aria-expanded":r?s:void 0,role:"row",...d}));Rr.displayName="TableRow";const Zs=l.createContext(null);function Js(){const e=l.useContext(Zs);if(!e)throw new Error("Table components must be used within Table.Root");return e}function Z({data:e,columns:r,rowKey:n,sortable:s=!1,expandable:a=!1,renderExpandableContent:d,loading:i=!1,emptyMessage:c="No data available",stickyHeader:u=!1,rowSize:N="md",className:f,children:O,...m}){const[p,T]=l.useState({column:null,direction:null}),[h,g]=l.useState(new Set),S=l.useCallback(b=>{g(I=>{const v=new Set(I);return v.has(b)?v.delete(b):v.add(b),v})},[]),E=l.useMemo(()=>({sortState:p,setSortState:T,expandedRows:h,toggleRow:S,expandable:a,renderExpandableContent:d}),[p,h,S,a,d]);return o.jsx(Zs.Provider,{value:E,children:o.jsx("div",{className:"overflow-x-auto",children:o.jsx("table",{className:x("w-full border-collapse",t.DATA_TOKENS.table.radius.default,t.DATA_TOKENS.table.shadow.subtle,f),role:"table",...m,children:O})})})}Z.displayName="TableRoot";Z.Header=Cr;Z.Head=Ar;Z.Body=_r;Z.Row=Rr;Z.Cell=Kr;Z.SortIcon=gt;Z.Empty=wr;Z.LoadingState=$r;Z.ExpandableContent=yr;const ea=K.cva(`inline-flex items-center justify-center ${t.NAVIGATION_TOKENS.spacing.listGap.md} ${t.NAVIGATION_TOKENS.typography.default} ${t.NAVIGATION_TOKENS.shadow.sm}`,{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},size:{sm:`${t.NAVIGATION_TOKENS.sizes.sm.fontSize}`,md:`${t.NAVIGATION_TOKENS.sizes.md.fontSize}`,lg:`${t.NAVIGATION_TOKENS.sizes.lg.fontSize}`}},defaultVariants:{orientation:"horizontal",size:"md"}}),ta=K.cva(`inline-flex items-center justify-center whitespace-nowrap ${t.NAVIGATION_TOKENS.typography.fontWeight.medium} ${t.NAVIGATION_TOKENS.focus.ring} ${t.MOTION_TOKENS.transition.colors} disabled:pointer-events-none disabled:opacity-50 relative`,{variants:{size:{sm:`${t.NAVIGATION_TOKENS.sizes.sm.height} ${t.NAVIGATION_TOKENS.sizes.sm.padding.horizontal} ${t.NAVIGATION_TOKENS.sizes.sm.padding.vertical} ${t.NAVIGATION_TOKENS.sizes.sm.fontSize}`,md:`${t.NAVIGATION_TOKENS.sizes.md.height} ${t.NAVIGATION_TOKENS.sizes.md.padding.horizontal} ${t.NAVIGATION_TOKENS.sizes.md.padding.vertical} ${t.NAVIGATION_TOKENS.sizes.md.fontSize}`,lg:`${t.NAVIGATION_TOKENS.sizes.lg.height} ${t.NAVIGATION_TOKENS.sizes.lg.padding.horizontal} ${t.NAVIGATION_TOKENS.sizes.lg.padding.vertical} ${t.NAVIGATION_TOKENS.sizes.lg.fontSize}`},state:{default:`${t.NAVIGATION_TOKENS.states.default.background} ${t.NAVIGATION_TOKENS.states.default.text} ${t.NAVIGATION_TOKENS.states.hover.background} ${t.NAVIGATION_TOKENS.states.hover.text}`,selected:`${t.NAVIGATION_TOKENS.states.selected.background} ${t.NAVIGATION_TOKENS.states.selected.text} ${t.NAVIGATION_TOKENS.shadow.sm}`}},defaultVariants:{size:"md",state:"default"}}),Vr=l.createContext(void 0);function ra(){const e=l.useContext(Vr);if(!e)throw new Error("Tabs components must be used within Tabs.Root");return e}const Ct=l.forwardRef(({value:e,defaultValue:r,onValueChange:n,orientation:s="horizontal",className:a,children:d,...i},c)=>{const[u,N]=l.useState(r||""),f=e!==void 0,O=f?e:u,m=l.useCallback(g=>{f||N(g),n==null||n(g)},[f,n]),[p,T]=l.useState("md"),h=l.useMemo(()=>({value:O,onValueChange:m,orientation:s,size:p}),[O,m,s,p]);return o.jsx(Vr.Provider,{value:h,children:o.jsx("div",{ref:c,className:x("w-full",a),...i,children:l.Children.map(d,g=>{if(l.isValidElement(g)&&g.type===jr){const S=g.props;return l.cloneElement(g,{...S,onSizeChange:T})}return g})})})});Ct.displayName="Tabs.Root";const jr=l.forwardRef(({className:e,orientation:r,size:n="md",onSizeChange:s,children:a,...d},i)=>{const c=l.useContext(Vr),u=r||(c==null?void 0:c.orientation)||"horizontal",N=n||(c==null?void 0:c.size)||"md";return l.useEffect(()=>{s==null||s(N)},[N,s]),o.jsx("div",{ref:i,role:"tablist","aria-orientation":u,className:x(ea({orientation:u,size:N}),e),...d,children:a})});jr.displayName="Tabs.List";const na=l.forwardRef(({className:e,value:r,disabled:n,size:s,children:a,...d},i)=>{const c=ra(),u=c.value===r,N=s||c.size||"md",f=l.useRef(null);l.useImperativeHandle(i,()=>f.current);const O=u?0:-1,m=l.useCallback(h=>{var I,v;if(n)return;const g=Array.from(((v=(I=f.current)==null?void 0:I.parentElement)==null?void 0:v.querySelectorAll('[role="tab"]:not([disabled])'))||[]),S=g.findIndex(_=>_===f.current);let E=S;c.orientation==="horizontal"?h.key==="ArrowLeft"?(h.preventDefault(),E=S>0?S-1:g.length-1):h.key==="ArrowRight"&&(h.preventDefault(),E=S<g.length-1?S+1:0):h.key==="ArrowUp"?(h.preventDefault(),E=S>0?S-1:g.length-1):h.key==="ArrowDown"&&(h.preventDefault(),E=S<g.length-1?S+1:0),h.key==="Home"?(h.preventDefault(),E=0):h.key==="End"&&(h.preventDefault(),E=g.length-1);const b=g[E];if(E!==S&&b){b.focus();const _=b.getAttribute("data-value");_&&c.onValueChange(_)}},[n,c]),p=l.useMemo(()=>typeof document<"u"?`tabs-trigger-${r}-${Math.random().toString(36).substr(2,9)}`:`tabs-trigger-${r}`,[r]),T=l.useMemo(()=>`tabs-content-${r}`,[r]);return o.jsxs("button",{ref:f,type:"button",role:"tab",id:p,"aria-selected":u,"aria-controls":T,tabIndex:O,disabled:n,"data-value":r,className:x(ta({size:N,state:u?"selected":"default"}),e),onKeyDown:m,onClick:()=>!n&&c.onValueChange(r),...d,children:[a,u&&o.jsx("span",{className:x(t.NAVIGATION_TOKENS.indicator.height,t.NAVIGATION_TOKENS.indicator.background,t.NAVIGATION_TOKENS.indicator.radius,t.NAVIGATION_TOKENS.indicator.transition,t.NAVIGATION_TOKENS.indicator.position),"aria-hidden":"true"})]})});na.displayName="Tabs.Trigger";const sa=l.forwardRef(({className:e,value:r,forceMount:n,children:s,...a},d)=>{const c=ra().value===r,u=l.useMemo(()=>typeof document<"u"?`tabs-content-${r}-${Math.random().toString(36).substr(2,9)}`:`tabs-content-${r}`,[r]),N=l.useMemo(()=>`tabs-trigger-${r}`,[r]),[f,O]=l.useState(n||!1);return l.useEffect(()=>{typeof document<"u"&&O(!0)},[]),!f&&!n&&!c?null:o.jsx("div",{ref:d,role:"tabpanel",id:u,"aria-labelledby":N,hidden:!c,className:x("mt-2",c?"block":"hidden",t.NAVIGATION_TOKENS.focus.ring,e),...a,children:s})});sa.displayName="Tabs.Content";const si=Object.assign(Ct,{Root:Ct,List:jr,Trigger:na,Content:sa}),aa=K.cva(`inline-flex items-center ${t.NAVIGATION_TOKENS.spacing.listGap.xs} ${t.NAVIGATION_TOKENS.radius.default} ${t.NAVIGATION_TOKENS.shadow.sm} ${t.NAVIGATION_TOKENS.container.padding.xs} ${t.NAVIGATION_TOKENS.container.background.muted}`,{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},size:{sm:`${t.NAVIGATION_TOKENS.sizes.sm.fontSize}`,md:`${t.NAVIGATION_TOKENS.sizes.md.fontSize}`,lg:`${t.NAVIGATION_TOKENS.sizes.lg.fontSize}`}},defaultVariants:{orientation:"horizontal",size:"md"}}),oa=K.cva(`inline-flex items-center justify-center whitespace-nowrap ${t.NAVIGATION_TOKENS.typography.fontWeight.medium} ${t.NAVIGATION_TOKENS.focus.ring} ${t.MOTION_TOKENS.transition.all} disabled:pointer-events-none disabled:opacity-50 relative`,{variants:{size:{sm:`${t.NAVIGATION_TOKENS.sizes.sm.height} ${t.NAVIGATION_TOKENS.sizes.sm.padding.horizontal} ${t.NAVIGATION_TOKENS.sizes.sm.padding.vertical} ${t.NAVIGATION_TOKENS.sizes.sm.fontSize} ${t.NAVIGATION_TOKENS.radius.default}`,md:`${t.NAVIGATION_TOKENS.sizes.md.height} ${t.NAVIGATION_TOKENS.sizes.md.padding.horizontal} ${t.NAVIGATION_TOKENS.sizes.md.padding.vertical} ${t.NAVIGATION_TOKENS.sizes.md.fontSize} ${t.NAVIGATION_TOKENS.radius.default}`,lg:`${t.NAVIGATION_TOKENS.sizes.lg.height} ${t.NAVIGATION_TOKENS.sizes.lg.padding.horizontal} ${t.NAVIGATION_TOKENS.sizes.lg.padding.vertical} ${t.NAVIGATION_TOKENS.sizes.lg.fontSize} ${t.NAVIGATION_TOKENS.radius.default}`},state:{default:`${t.NAVIGATION_TOKENS.states.default.background} ${t.NAVIGATION_TOKENS.states.default.text} ${t.NAVIGATION_TOKENS.states.hover.background} ${t.NAVIGATION_TOKENS.states.hover.text}`,selected:`${t.NAVIGATION_TOKENS.states.selected.background} ${t.NAVIGATION_TOKENS.states.selected.text} ${t.NAVIGATION_TOKENS.shadow.sm}`}},defaultVariants:{size:"md",state:"default"}}),ia=l.createContext(void 0);function ai(){const e=l.useContext(ia);if(!e)throw new Error("SegmentedControl components must be used within SegmentedControl.Root");return e}const $t=l.forwardRef(({value:e,defaultValue:r,onValueChange:n,name:s,orientation:a="horizontal",size:d="md",className:i,children:c,...u},N)=>{const[f,O]=l.useState(r||""),m=e!==void 0,p=m?e:f,T=l.useMemo(()=>s||(typeof document<"u"?`segmented-control-${Math.random().toString(36).substr(2,9)}`:"segmented-control"),[s]),h=l.useCallback(S=>{m||O(S),n==null||n(S)},[m,n]),g=l.useMemo(()=>({value:p,onValueChange:h,name:T,orientation:a??"horizontal",size:d??"md"}),[p,h,T,a,d]);return o.jsx(ia.Provider,{value:g,children:o.jsx("div",{ref:N,role:"radiogroup","aria-orientation":a??"horizontal",className:x(aa({orientation:a,size:d}),i),...u,children:c})})});$t.displayName="SegmentedControl.Root";const la=l.forwardRef(({className:e,value:r,disabled:n,size:s,children:a,...d},i)=>{const c=ai(),u=c.value===r,N=s||c.size||"md",f=l.useRef(null);l.useImperativeHandle(i,()=>f.current);const O=u?0:-1,m=l.useCallback(p=>{var E,b;if(n)return;const T=Array.from(((b=(E=f.current)==null?void 0:E.parentElement)==null?void 0:b.querySelectorAll('[role="radio"]:not([disabled])'))||[]),h=T.findIndex(I=>I===f.current);let g=h;c.orientation==="horizontal"?p.key==="ArrowLeft"?(p.preventDefault(),g=h>0?h-1:T.length-1):p.key==="ArrowRight"&&(p.preventDefault(),g=h<T.length-1?h+1:0):p.key==="ArrowUp"?(p.preventDefault(),g=h>0?h-1:T.length-1):p.key==="ArrowDown"&&(p.preventDefault(),g=h<T.length-1?h+1:0),c.orientation==="horizontal"?(p.key==="ArrowUp"||p.key==="ArrowDown")&&(p.preventDefault(),p.key==="ArrowUp"?g=h>0?h-1:T.length-1:g=h<T.length-1?h+1:0):(p.key==="ArrowLeft"||p.key==="ArrowRight")&&(p.preventDefault(),p.key==="ArrowLeft"?g=h>0?h-1:T.length-1:g=h<T.length-1?h+1:0);const S=T[g];if(g!==h&&S){S.focus();const I=S.getAttribute("data-value");I&&c.onValueChange(I)}},[n,c]);return o.jsx("button",{ref:f,type:"button",role:"radio","aria-checked":u,tabIndex:O,disabled:n,"data-value":r,name:c.name,className:x(oa({size:N,state:u?"selected":"default"}),e),onKeyDown:m,onClick:()=>!n&&c.onValueChange(r),...d,children:a})});la.displayName="SegmentedControl.Item";const oi=Object.assign($t,{Root:$t,Item:la}),Rt=l.forwardRef(({items:e,separator:r,ariaLabel:n="Breadcrumb",className:s,children:a,...d},i)=>{const c=e.length-1,u=o.jsx(U.ChevronRight,{className:x("h-4 w-4",t.NAVIGATION_TOKENS.states.default.text),"aria-hidden":"true"});return o.jsx("nav",{ref:i,"aria-label":n,className:x(t.NAVIGATION_TOKENS.typography.default,s),...d,children:o.jsxs("ol",{className:x("flex items-center",t.NAVIGATION_TOKENS.spacing.listGap.sm),children:[e.map((N,f)=>{const O=f===c;return o.jsxs(zr,{isLast:O,disabled:N.disabled,children:[f>0&&o.jsx(Mr,{children:r||u}),N.href&&!O&&!N.disabled?o.jsx("a",{href:N.href,className:x(t.NAVIGATION_TOKENS.states.default.text,t.NAVIGATION_TOKENS.states.hover.text,t.MOTION_TOKENS.transition.colors),children:N.label}):o.jsx("span",{className:x(O?t.NAVIGATION_TOKENS.typography.fontWeight.medium:t.NAVIGATION_TOKENS.states.default.text,N.disabled&&t.NAVIGATION_TOKENS.states.disabled.text),"aria-current":O?"page":void 0,children:N.label})]},`${N.label}-${f}`)}),a]})})});Rt.displayName="Breadcrumbs.Root";const zr=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("li",{ref:s,className:x("flex items-center",e),...n,children:r}));zr.displayName="Breadcrumbs.Item";const Mr=l.forwardRef(({className:e,children:r,...n},s)=>o.jsx("span",{ref:s,className:x("mx-1",t.NAVIGATION_TOKENS.states.default.text,e),"aria-hidden":"true",...n,children:r}));Mr.displayName="Breadcrumbs.Separator";const ii=Object.assign(Rt,{Root:Rt,Item:zr,Separator:Mr}),kr="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background transition-shadow";function li(e,r,n=2){const a=r;if(r<=1)return[1];const d=[],i=[],c=Math.max(2,e-n),u=Math.min(a-1,e+n);for(let N=c;N<=u;N++)d.push(N);return e-n>2?i.push(1,"..."):i.push(1),i.push(...d),e+n<a-1?i.push("...",a):a!==1&&i.push(a),i}const Vt=l.forwardRef(({currentPage:e,totalPages:r,onPageChange:n,delta:s=2,ariaLabel:a="Pagination",className:d,children:i,...c},u)=>{const N=Math.max(1,r),f=Math.min(Math.max(1,e),N),O=l.useCallback(p=>{const T=Math.min(Math.max(p,1),N);T!==f&&n(T)},[f,N,n]),m=l.useMemo(()=>li(f,N,s),[f,N,s]);return o.jsxs("nav",{ref:u,"aria-label":a,className:x("flex items-center",t.NAVIGATION_TOKENS.spacing.listGap.xs,d),...c,children:[o.jsx(Dr,{disabled:f===1,onClick:()=>O(f-1)}),m.map((p,T)=>o.jsx(l.Fragment,{children:p==="..."?o.jsx(Lr,{}):o.jsx(Pr,{page:p,isCurrent:p===f,onClick:()=>O(p)})},`${p}-${T}`)),o.jsx(Ur,{disabled:f===N,onClick:()=>O(f+1)}),i]})});Vt.displayName="Pagination.Root";const Pr=l.forwardRef(({className:e,page:r,isCurrent:n,disabled:s,onClick:a,...d},i)=>r==="..."?null:o.jsx("button",{ref:i,type:"button",onClick:a,disabled:s,"aria-label":`Go to page ${r}`,"aria-current":n?"page":void 0,"aria-disabled":s,className:x(t.NAVIGATION_TOKENS.sizes.md.height,t.NAVIGATION_TOKENS.sizes.md.padding.horizontal,t.NAVIGATION_TOKENS.sizes.md.padding.vertical,t.NAVIGATION_TOKENS.radius.default,t.NAVIGATION_TOKENS.sizes.md.fontSize,t.NAVIGATION_TOKENS.typography.fontWeight.medium,"border",t.MOTION_TOKENS.transition.colors,n?`${t.NAVIGATION_TOKENS.states.selected.background} ${t.NAVIGATION_TOKENS.states.selected.text} ${t.NAVIGATION_TOKENS.states.selected.border} ${t.NAVIGATION_TOKENS.shadow.sm}`:`${t.NAVIGATION_TOKENS.states.default.border} border-input ${t.NAVIGATION_TOKENS.states.default.background} ${t.NAVIGATION_TOKENS.states.default.text} ${t.NAVIGATION_TOKENS.states.hover.background} ${t.NAVIGATION_TOKENS.states.hover.text}`,s&&t.NAVIGATION_TOKENS.states.disabled.cursor,kr,e),...d,children:r}));Pr.displayName="Pagination.Item";const Dr=l.forwardRef(({className:e,disabled:r,onClick:n,...s},a)=>o.jsxs("button",{ref:a,type:"button",onClick:n,disabled:r,"aria-label":"Previous page","aria-disabled":r,className:x(t.NAVIGATION_TOKENS.sizes.md.height,t.NAVIGATION_TOKENS.sizes.md.padding.horizontal,t.NAVIGATION_TOKENS.sizes.md.padding.vertical,t.NAVIGATION_TOKENS.radius.default,t.NAVIGATION_TOKENS.sizes.md.fontSize,"border border-input",t.MOTION_TOKENS.transition.colors,`${t.NAVIGATION_TOKENS.states.default.background} ${t.NAVIGATION_TOKENS.states.default.text} ${t.NAVIGATION_TOKENS.states.hover.background} ${t.NAVIGATION_TOKENS.states.hover.text}`,r&&t.NAVIGATION_TOKENS.states.disabled.cursor,kr,e),...s,children:[o.jsx(U.ChevronLeft,{className:"h-4 w-4","aria-hidden":"true"}),o.jsx("span",{className:"sr-only",children:"Previous"})]}));Dr.displayName="Pagination.Prev";const Ur=l.forwardRef(({className:e,disabled:r,onClick:n,...s},a)=>o.jsxs("button",{ref:a,type:"button",onClick:n,disabled:r,"aria-label":"Next page","aria-disabled":r,className:x(t.NAVIGATION_TOKENS.sizes.md.height,t.NAVIGATION_TOKENS.sizes.md.padding.horizontal,t.NAVIGATION_TOKENS.sizes.md.padding.vertical,t.NAVIGATION_TOKENS.radius.default,t.NAVIGATION_TOKENS.sizes.md.fontSize,"border border-input",t.MOTION_TOKENS.transition.colors,`${t.NAVIGATION_TOKENS.states.default.background} ${t.NAVIGATION_TOKENS.states.default.text} ${t.NAVIGATION_TOKENS.states.hover.background} ${t.NAVIGATION_TOKENS.states.hover.text}`,r&&t.NAVIGATION_TOKENS.states.disabled.cursor,kr,e),...s,children:[o.jsx(U.ChevronRight,{className:"h-4 w-4","aria-hidden":"true"}),o.jsx("span",{className:"sr-only",children:"Next"})]}));Ur.displayName="Pagination.Next";const Lr=l.forwardRef(({className:e,...r},n)=>o.jsx("span",{ref:n,className:x(t.NAVIGATION_TOKENS.sizes.md.padding.horizontal,t.NAVIGATION_TOKENS.sizes.md.padding.vertical,t.NAVIGATION_TOKENS.states.default.text,t.ICON_TOKENS.colors.muted,e),"aria-hidden":"true",...r,children:"…"}));Lr.displayName="Pagination.Ellipsis";const di=Object.assign(Vt,{Root:Vt,Item:Pr,Prev:Dr,Next:Ur,Ellipsis:Lr}),jt=l.forwardRef(({steps:e,activeStep:r,orientation:n="horizontal",showNumbers:s=!0,className:a,children:d,...i},c)=>{const u=Math.min(Math.max(0,r),e.length-1);return o.jsxs("div",{ref:c,className:x("flex",n==="horizontal"?"flex-row items-start":"flex-col",t.NAVIGATION_TOKENS.spacing.listGap.md,a),...i,children:[e.map((N,f)=>{const O=f===u,m=f<u;return o.jsx(Br,{step:N,index:f,isActive:O,isCompleted:m,showNumber:s,orientation:n},N.id)}),d]})});jt.displayName="Stepper.Root";const Br=l.forwardRef(({className:e,step:r,index:n,isActive:s,isCompleted:a,showNumber:d=!0,orientation:i="horizontal",...c},u)=>o.jsxs("div",{ref:u,className:x("flex items-start",i==="horizontal"?"flex-col":"flex-row",t.NAVIGATION_TOKENS.spacing.listGap.sm,e),...c,children:[o.jsx(Gr,{index:n,isActive:s,isCompleted:a,disabled:r.disabled,icon:r.icon,showNumber:d}),o.jsx(Hr,{label:r.label,description:r.description,isActive:s})]}));Br.displayName="Stepper.Item";const Gr=l.forwardRef(({className:e,index:r,isActive:n,isCompleted:s,disabled:a,icon:d,showNumber:i=!0,...c},u)=>{const N=x(t.NAVIGATION_TOKENS.sizes.sm.height,t.NAVIGATION_TOKENS.sizes.sm.width,"flex items-center justify-center",t.NAVIGATION_TOKENS.radius.full,t.NAVIGATION_TOKENS.typography.fontWeight.medium,t.NAVIGATION_TOKENS.sizes.sm.fontSize,"border-2",t.MOTION_TOKENS.transition.colors);return s?o.jsx("div",{ref:u,className:x(N,`${t.NAVIGATION_TOKENS.states.selected.background} ${t.NAVIGATION_TOKENS.states.selected.text} ${t.NAVIGATION_TOKENS.states.selected.border}`,e),"aria-current":n?"step":void 0,...c,children:o.jsx(U.Check,{className:"h-4 w-4","aria-hidden":"true"})}):n?o.jsx("div",{ref:u,className:x(N,`${t.NAVIGATION_TOKENS.states.selected.background} ${t.NAVIGATION_TOKENS.states.selected.text} ${t.NAVIGATION_TOKENS.states.selected.border}`,e),"aria-current":"step",...c,children:d||i&&o.jsx("span",{children:r+1})}):o.jsx("div",{ref:u,className:x(N,`${t.NAVIGATION_TOKENS.states.default.border} ${t.NAVIGATION_TOKENS.border.muted} ${t.NAVIGATION_TOKENS.states.default.background} ${t.NAVIGATION_TOKENS.states.default.text}`,a&&t.NAVIGATION_TOKENS.states.disabled.text,e),...c,children:d||i&&o.jsx("span",{children:r+1})})});Gr.displayName="Stepper.Indicator";const Hr=l.forwardRef(({className:e,label:r,description:n,isActive:s,...a},d)=>o.jsxs("div",{ref:d,className:x("flex flex-col",t.NAVIGATION_TOKENS.spacing.listGap.xs,e),...a,children:[o.jsx("span",{className:x(t.NAVIGATION_TOKENS.typography.default,s?t.NAVIGATION_TOKENS.typography.fontWeight.semibold:t.NAVIGATION_TOKENS.typography.fontWeight.normal,s?t.NAVIGATION_TOKENS.states.selected.text:t.NAVIGATION_TOKENS.states.default.text),children:r}),n&&o.jsx("span",{className:x(t.NAVIGATION_TOKENS.typography.sm,t.NAVIGATION_TOKENS.states.default.text,t.ICON_TOKENS.colors.muted),children:n})]}));Hr.displayName="Stepper.Label";const da=l.forwardRef(({className:e,isActive:r,children:n,...s},a)=>r?o.jsx("div",{ref:a,className:x(t.NAVIGATION_TOKENS.spacing.content.marginTop,e),...s,children:n}):null);da.displayName="Stepper.Content";const ci=Object.assign(jt,{Root:jt,Item:Br,Indicator:Gr,Label:Hr,Content:da}),ca=K.cva("shrink-0",{variants:{size:{sm:t.ICON_TOKENS.sizes.sm,md:t.ICON_TOKENS.sizes.md,lg:t.ICON_TOKENS.sizes.lg,xl:t.ICON_TOKENS.sizes.xl},color:{default:t.ICON_TOKENS.colors.default,muted:t.ICON_TOKENS.colors.muted,success:t.ICON_TOKENS.colors.success,warning:t.ICON_TOKENS.colors.warning,danger:t.ICON_TOKENS.colors.danger,info:t.ICON_TOKENS.colors.info},stroke:{thin:t.ICON_TOKENS.stroke.thin,normal:t.ICON_TOKENS.stroke.normal,bold:t.ICON_TOKENS.stroke.bold}},defaultVariants:{size:"md",color:"default",stroke:"normal"}}),de=l.forwardRef(({name:e,size:r,color:n,stroke:s,className:a,asChild:d=!1,...i},c)=>{const u=vt[e]||vt.error;if(!u)return null;const{name:N,asChild:f,size:O,color:m,stroke:p,...T}=i,h=o.jsx(u,{className:x(ca({size:r,color:n,stroke:s}),a),ref:c,...T});return d?o.jsx(Qe.Slot,{children:h}):h});de.displayName="Icon";function D(e){if(e===!0)return!0;if(e===!1||typeof window>"u")return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}const Ae={fadeIn:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-in"}),fadeOut:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-out"}),fadeInUp:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-up"}),fadeInDown:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-down"}),fadeInLeft:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-left"}),fadeInRight:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-right"})},Le={slideInUp:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-slide-up"}),slideInDown:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-slide-down"}),slideInLeft:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-slide-left"}),slideInRight:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-slide-right"}),slideOutUp:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-up-out"}),slideOutDown:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-down-out"}),slideOutLeft:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-left-out"}),slideOutRight:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-fade-slide-right-out"})},ui={scaleIn:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-scale-in"}),scaleOut:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-scale-out"}),scaleUp:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-hover-scale"}),scaleDown:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-tap-scale"})},Et={hoverLift:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-hover-lift"}),hoverScale:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-hover-scale"}),tapScale:e=>({className:D(e==null?void 0:e.reducedMotion)?"":"tm-motion-tap-scale"})};function fi(e){if(e){if(typeof e=="object")return e;switch(e){case"fadeIn":return Ae.fadeIn();case"fadeInUp":return Ae.fadeInUp();case"fadeInDown":return Ae.fadeInDown();case"fadeInLeft":return Ae.fadeInLeft();case"fadeInRight":return Ae.fadeInRight();case"slideInUp":return Le.slideInUp();case"slideInDown":return Le.slideInDown();case"slideInLeft":return Le.slideInLeft();case"slideInRight":return Le.slideInRight();case"scaleIn":return ui.scaleIn();default:return}}}function Ni(e){if(e){if(typeof e=="object")return e;switch(e){case"hoverLift":return Et.hoverLift();case"hoverScale":return Et.hoverScale();case"tapScale":return Et.tapScale();default:return}}}function St(e){if(!e)return{};const r=fi(e.animation),n=Ni(e.hoverAnimation),s=e.animationProps||{};return{...r,...n,...s}}const mi=K.cva(`${t.DOMAIN_TOKENS.surface.bg.default} ${t.DOMAIN_TOKENS.surface.border.default} ${t.DOMAIN_TOKENS.surface.radius.default} ${t.DOMAIN_TOKENS.surface.shadow.default} ${t.DOMAIN_TOKENS.surface.bg.hover} ${t.DOMAIN_TOKENS.surface.border.hover} ${t.DOMAIN_TOKENS.surface.elevation.hover} ${t.DOMAIN_TOKENS.motion.hover.transition} overflow-hidden`,{variants:{size:{default:`${t.DOMAIN_TOKENS.layout.padding.default} ${t.DOMAIN_TOKENS.layout.gap.default}`,compact:`${t.DOMAIN_TOKENS.layout.padding.compact} ${t.DOMAIN_TOKENS.layout.gap.compact}`},variant:{default:"",featured:`${t.DOMAIN_TOKENS.badges.surface.featured}`}},defaultVariants:{size:"default",variant:"default"}}),Ti=K.cva(`${t.DOMAIN_TOKENS.image.aspectRatio} ${t.DOMAIN_TOKENS.image.radius} overflow-hidden`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),Oi=K.cva("flex flex-col",{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),pi=K.cva("flex",{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),ze=l.forwardRef(({size:e="default",variant:r="default",className:n,children:s,...a},d)=>o.jsx("div",{ref:d,className:x(mi({size:e,variant:r}),n),...a,children:s}));ze.displayName="CardBase";const Me=l.forwardRef(({size:e="default",className:r,children:n,...s},a)=>o.jsx("div",{ref:a,className:x(Ti({size:e}),r),...s,children:n}));Me.displayName="CardBaseImageWrapper";const ke=l.forwardRef(({size:e="default",className:r,children:n,...s},a)=>o.jsx(ae,{ref:a,direction:"vertical",className:x(Oi({size:e}),r),...s,children:n}));ke.displayName="CardBaseContentWrapper";const Pe=l.forwardRef(({size:e="default",className:r,children:n,...s},a)=>o.jsx("div",{ref:a,className:x(pi({size:e}),r),...s,children:n}));Pe.displayName="CardBaseFooterWrapper";const gi=K.cva("inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"text-primary hover:text-primary/80 underline-offset-4 hover:underline",secondary:"text-secondary-foreground underline-offset-4 hover:underline",accent:"text-accent-foreground hover:text-accent-foreground/80 underline-offset-4 hover:underline",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground rounded-md px-md py-sm",ghost:"text-foreground hover:text-accent-foreground hover:bg-accent rounded-md px-sm py-sm",link:"text-primary underline-offset-4 hover:underline",destructive:"text-destructive hover:text-destructive/80 underline-offset-4 hover:underline"},size:{xs:"h-7 text-xs px-xs py-xs",sm:"h-8 text-xs px-sm py-xs",md:"h-9 text-sm px-md py-sm",lg:"h-10 text-sm px-lg py-sm",xl:"h-11 text-base px-xl py-md"}},defaultVariants:{variant:"link",size:"md"}}),fe=l.forwardRef(({className:e,variant:r,size:n,asChild:s=!1,leftIcon:a,rightIcon:d,children:i,...c},u)=>{const N=s?Qe.Slot:"a";return o.jsxs(N,{className:x(gi({variant:r,size:n,className:e})),ref:u,...c,children:[a&&o.jsx("span",{className:"inline-flex items-center",children:a}),i,d&&o.jsx("span",{className:"inline-flex items-center",children:d})]})});fe.displayName="Link";const Si=K.cva("group relative",{variants:{size:{default:"",compact:""},variant:{default:"",featured:""}},defaultVariants:{size:"default",variant:"default"}}),hi=K.cva("absolute z-10",{variants:{size:{default:t.DOMAIN_TOKENS.badges.position.default,compact:t.DOMAIN_TOKENS.badges.position.compact}},defaultVariants:{size:"default"}}),xi=K.cva(`inline-flex items-center ${t.DOMAIN_TOKENS.badges.radius} ${t.DOMAIN_TOKENS.badges.shadow} ${t.DOMAIN_TOKENS.badges.text.color} ${t.TEXT_TOKENS.fontSize.xs} ${t.TEXT_TOKENS.fontWeight.semibold}`,{variants:{size:{default:t.DOMAIN_TOKENS.badges.size.md,compact:t.DOMAIN_TOKENS.badges.size.sm},variant:{default:t.DOMAIN_TOKENS.badges.surface.default,featured:t.DOMAIN_TOKENS.badges.surface.featured}},defaultVariants:{size:"default",variant:"featured"}}),Ei=K.cva(`absolute inset-0 ${t.DOMAIN_TOKENS.image.overlay.gradient} opacity-0 ${t.MOTION_TOKENS.transition.opacity} ${t.MOTION_TOKENS.duration.normal} group-hover:opacity-100`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),bi=K.cva(`object-cover ${t.MOTION_TOKENS.transition.transform} ${t.MOTION_TOKENS.duration.slow} ${t.DOMAIN_TOKENS.motion.hover.scale}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),Ii=K.cva(`flex flex-col ${t.DOMAIN_TOKENS.metadata.spacing.vertical}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),on=K.cva(`flex items-center ${t.DOMAIN_TOKENS.metadata.spacing.horizontal} ${t.DOMAIN_TOKENS.metadata.text.secondary} ${t.TEXT_TOKENS.fontSize.xs}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),ln=K.cva(`${t.ICON_TOKENS.sizes.md} ${t.ICON_TOKENS.colors.muted}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),vi=K.cva(`${t.DOMAIN_TOKENS.metadata.text.secondary} ${t.TEXT_TOKENS.fontSize.xs}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),_i=K.cva("border-t border-border",{variants:{size:{default:t.DOMAIN_TOKENS.spacing.footer.paddingTopDefault,compact:t.DOMAIN_TOKENS.spacing.footer.paddingTopCompact}},defaultVariants:{size:"default"}}),ua=l.forwardRef(({name:e,description:r,genres:n,followers:s,plays:a,imageUrl:d,href:i,featured:c=!1,showImage:u=!0,popularBadgeText:N,followersLabel:f,playsLabel:O,size:m="default",variant:p,className:T,animation:h,...g},S)=>{if(!e||e.trim()==="")throw new Error('ArtistCard: "name" prop is required and cannot be empty');if(!f||f.trim()==="")throw new Error('ArtistCard: "followersLabel" prop is required and cannot be empty');if(!O||O.trim()==="")throw new Error('ArtistCard: "playsLabel" prop is required and cannot be empty');const E=St({animation:(h==null?void 0:h.animation)||"fadeInUp",hoverAnimation:(h==null?void 0:h.hoverAnimation)||"hoverLift",animationProps:h==null?void 0:h.animationProps}),b=p||(c?"featured":"default");return o.jsx(q,{...E,children:o.jsxs(ze,{ref:S,size:m,variant:b,className:x(Si({size:m,variant:p}),T),...g,children:[c&&N&&o.jsx("div",{className:hi({size:m}),children:o.jsx("span",{className:xi({size:m,variant:"featured"}),children:N})}),u&&o.jsx(Me,{size:m,children:o.jsxs("div",{className:"relative w-full overflow-hidden bg-gradient-to-br from-muted to-muted/50",children:[d?o.jsx("img",{src:d,alt:e,className:x("h-full w-full",bi({size:m}))}):o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsx(de,{name:"info",size:"xl",color:"muted",className:t.ICON_TOKENS.sizes["4xl"],"aria-hidden":"true"})}),o.jsx("div",{className:Ei({size:m})})]})}),o.jsxs(ke,{size:m,children:[o.jsx(Se,{level:3,className:x("line-clamp-2",t.TEXT_TOKENS.fontSize.lg,t.TEXT_TOKENS.fontWeight.bold,t.MOTION_TOKENS.transition.colors,"group-hover:text-primary",m==="compact"?t.DOMAIN_TOKENS.spacing.section.titleToSubtitle:t.DOMAIN_TOKENS.spacing.section.subtitleToMetadata),children:i?o.jsx(fe,{href:i,variant:"ghost",children:e}):e}),r&&o.jsx(W,{size:"sm",variant:"muted",className:x("line-clamp-2",m==="compact"?t.DOMAIN_TOKENS.spacing.section.titleToSubtitle:t.DOMAIN_TOKENS.spacing.section.subtitleToMetadata),children:r}),n&&o.jsx(W,{size:"xs",variant:"muted",className:x(vi({size:m}),m==="compact"?t.DOMAIN_TOKENS.spacing.section.titleToSubtitle:t.DOMAIN_TOKENS.spacing.section.subtitleToMetadata),children:n}),(s!==void 0||a!==void 0)&&o.jsxs("div",{className:Ii({size:m}),children:[s!==void 0&&o.jsxs("div",{className:on({size:m}),children:[o.jsx(de,{name:"info",size:"sm",color:"muted",className:ln({size:m}),"aria-hidden":"true"}),o.jsxs(W,{size:"xs",variant:"muted",children:[s.toLocaleString()," ",f]})]}),a!==void 0&&o.jsxs("div",{className:on({size:m}),children:[o.jsx(de,{name:"info",size:"sm",color:"muted",className:ln({size:m}),"aria-hidden":"true"}),o.jsxs(W,{size:"xs",variant:"muted",children:[a.toLocaleString()," ",O]})]})]})]}),(s!==void 0||a!==void 0)&&o.jsx(Pe,{size:m,children:o.jsx("div",{className:_i({size:m})})})]})})});ua.displayName="ArtistCard";const Ki=K.cva("absolute z-10",{variants:{size:{default:t.DOMAIN_TOKENS.badges.position.default,compact:t.DOMAIN_TOKENS.badges.position.compact}},defaultVariants:{size:"default"}}),wi=K.cva(`inline-flex items-center ${t.DOMAIN_TOKENS.badges.radius} ${t.DOMAIN_TOKENS.badges.shadow} ${t.DOMAIN_TOKENS.badges.size.sm} ${t.DOMAIN_TOKENS.badges.text.color} ${t.TEXT_TOKENS.fontSize.xs} font-semibold`,{variants:{variant:{default:t.DOMAIN_TOKENS.badges.surface.default,featured:t.DOMAIN_TOKENS.badges.surface.featured}},defaultVariants:{variant:"featured"}}),yi=K.cva(`flex flex-col ${t.DOMAIN_TOKENS.metadata.spacing.vertical}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),dn=K.cva(`flex items-center ${t.DOMAIN_TOKENS.metadata.spacing.horizontal} ${t.DOMAIN_TOKENS.metadata.text.secondary} ${t.TEXT_TOKENS.fontSize.xs}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),cn=K.cva(`${t.ICON_TOKENS.sizes.md} ${t.ICON_TOKENS.colors.muted}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),Ai=K.cva("border-t border-border",{variants:{size:{default:t.DOMAIN_TOKENS.spacing.footer.paddingTopDefault,compact:t.DOMAIN_TOKENS.spacing.footer.paddingTopCompact}},defaultVariants:{size:"default"}}),Ci=K.cva(`inline-flex items-center justify-center ${t.DOMAIN_TOKENS.badges.surface.featured} ${t.DOMAIN_TOKENS.badges.text.color} ${t.DOMAIN_TOKENS.badges.shadow} ${t.DOMAIN_TOKENS.motion.hover.transition} font-semibold transform`,{variants:{size:{default:t.DOMAIN_TOKENS.spacing.button.paddingDefault,compact:t.DOMAIN_TOKENS.spacing.button.paddingCompact}},defaultVariants:{size:"default"}}),$i=K.cva(`${t.ICON_TOKENS.sizes.md} ${t.DOMAIN_TOKENS.spacing.button.iconMarginLeft}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),Ri=K.cva("bg-gradient-to-r from-accent-500 to-primary-600 bg-clip-text text-transparent",{variants:{size:{default:t.TEXT_TOKENS.fontSize.lg,compact:t.TEXT_TOKENS.fontSize.md}},defaultVariants:{size:"default"}}),fa=l.forwardRef(({title:e,description:r,date:n,venueName:s,price:a,imageUrl:d,href:i,ticketUrl:c,featured:u=!1,showImage:N=!0,getTicketsLabel:f,featuredBadgeText:O,size:m="default",variant:p,className:T,animation:h,...g},S)=>{const E=St({animation:(h==null?void 0:h.animation)||"fadeInUp",hoverAnimation:(h==null?void 0:h.hoverAnimation)||"hoverLift",animationProps:h==null?void 0:h.animationProps}),b=p||(u?"featured":"default");return o.jsx(q,{...E,children:o.jsxs(ze,{ref:S,size:m,variant:b,className:x("group relative",T),...g,children:[u&&O&&o.jsx("div",{className:Ki({size:m}),children:o.jsx("span",{className:wi({variant:"featured"}),children:O})}),N&&o.jsx(Me,{size:m,children:o.jsxs("div",{className:"relative w-full overflow-hidden bg-gradient-to-br from-surface-elevated1 to-surface-elevated2",children:[d?o.jsx("img",{src:d,alt:e,className:x("h-full w-full object-cover",t.DOMAIN_TOKENS.motion.hover.transition,t.DOMAIN_TOKENS.motion.hover.scale)}):o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsx(de,{name:"info",size:"xl",color:"muted",className:t.ICON_TOKENS.sizes["4xl"],"aria-hidden":"true"})}),o.jsx("div",{className:x("absolute inset-0 opacity-0 transition-opacity duration-normal group-hover:opacity-100",t.DOMAIN_TOKENS.image.overlay.gradient)})]})}),o.jsxs(ke,{size:m,children:[o.jsx(Se,{level:3,className:x("line-clamp-2 transition-colors group-hover:text-primary",t.TEXT_TOKENS.fontSize.lg,t.TEXT_TOKENS.fontWeight.bold,t.DOMAIN_TOKENS.spacing.section.titleToSubtitle),children:i?o.jsx(fe,{href:i,variant:"ghost",children:e}):e}),r&&o.jsx(W,{size:"sm",muted:!0,className:x("line-clamp-2",m==="compact"?t.DOMAIN_TOKENS.spacing.section.titleToSubtitle:t.DOMAIN_TOKENS.spacing.section.subtitleToMetadata),children:r}),o.jsxs("div",{className:yi({size:m}),children:[n&&o.jsxs("div",{className:dn({size:m}),children:[o.jsx(Ze,{className:cn({size:m})}),o.jsx(W,{size:"xs",muted:!0,children:n})]}),s&&o.jsxs("div",{className:dn({size:m}),children:[o.jsx(et,{className:cn({size:m})}),o.jsx(W,{size:"xs",muted:!0,className:"line-clamp-1",children:s})]})]})]}),o.jsx(Pe,{size:m,children:o.jsxs("div",{className:x("w-full",Ai({size:m})),children:[c&&o.jsxs(fe,{href:c,className:x("w-full",Ci({size:m})),target:"_blank",rel:"noopener noreferrer",children:[f,o.jsx(ce,{className:$i({size:m})})]}),!c&&a&&o.jsx("div",{className:"text-right",children:o.jsx(W,{size:m==="compact"?"md":"lg",weight:"bold",children:o.jsx("span",{className:Ri({size:m}),children:a})})})]})})]})})});fa.displayName="EventCard";const Vi=K.cva("absolute z-10",{variants:{size:{default:t.DOMAIN_TOKENS.badges.position.default,compact:t.DOMAIN_TOKENS.badges.position.compact}},defaultVariants:{size:"default"}}),ji=K.cva(`inline-flex items-center ${t.DOMAIN_TOKENS.badges.radius} ${t.DOMAIN_TOKENS.badges.shadow} ${t.DOMAIN_TOKENS.badges.size.sm} ${t.DOMAIN_TOKENS.badges.text.color} ${t.TEXT_TOKENS.fontSize.xs} font-semibold`,{variants:{variant:{default:t.DOMAIN_TOKENS.badges.surface.default,featured:t.DOMAIN_TOKENS.badges.surface.featured}},defaultVariants:{variant:"featured"}}),un=K.cva(`inline-flex items-center justify-center ${t.BUTTON_TOKENS.radius} ${t.BUTTON_TOKENS.variant.primary.background} ${t.BUTTON_TOKENS.variant.primary.text} ${t.BUTTON_TOKENS.shadow.primary} ${t.BUTTON_TOKENS.variant.primary.hover} ${t.BUTTON_TOKENS.transition.colors} font-semibold`,{variants:{size:{default:`${t.BUTTON_TOKENS.height.md} ${t.BUTTON_TOKENS.padding.horizontal.md} ${t.BUTTON_TOKENS.padding.vertical.sm} ${t.BUTTON_TOKENS.fontSize.md}`,compact:`${t.BUTTON_TOKENS.height.sm} ${t.BUTTON_TOKENS.padding.horizontal.sm} ${t.BUTTON_TOKENS.padding.vertical.sm} ${t.BUTTON_TOKENS.fontSize.sm}`}},defaultVariants:{size:"default"}}),fn=K.cva(`${t.ICON_TOKENS.sizes.md} ${t.DOMAIN_TOKENS.spacing.button.iconMarginLeft}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),Na=l.forwardRef(({title:e,description:r,imageUrl:n,href:s,ctaUrl:a,ctaLabel:d,featured:i=!1,showImage:c=!0,featuredBadgeText:u,size:N="default",variant:f,className:O,animation:m,...p},T)=>{const h=St({animation:(m==null?void 0:m.animation)||"fadeInUp",hoverAnimation:(m==null?void 0:m.hoverAnimation)||"hoverLift",animationProps:m==null?void 0:m.animationProps}),g=f||(i?"featured":"default");return o.jsx(q,{...h,children:o.jsxs(ze,{ref:T,size:N,variant:g,className:x("group relative",O),...p,children:[i&&u&&o.jsx("div",{className:Vi({size:N}),children:o.jsx("span",{className:ji({variant:"featured"}),children:u})}),c&&o.jsx(Me,{size:N,children:o.jsxs("div",{className:"relative w-full overflow-hidden bg-gradient-to-br from-surface-elevated1 to-surface-elevated2",children:[n?o.jsx("img",{src:n,alt:e,className:x("h-full w-full object-cover",t.DOMAIN_TOKENS.motion.hover.transition,t.DOMAIN_TOKENS.motion.hover.scale)}):o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsx(de,{name:"info",size:"xl",color:"muted",className:t.ICON_TOKENS.sizes["4xl"],"aria-hidden":"true"})}),o.jsx("div",{className:x("absolute inset-0 opacity-0 transition-opacity duration-normal group-hover:opacity-100",t.DOMAIN_TOKENS.image.overlay.gradient)})]})}),o.jsxs(ke,{size:N,children:[o.jsx(Se,{level:3,className:x("line-clamp-2 transition-colors group-hover:text-primary",t.TEXT_TOKENS.fontSize.lg,t.TEXT_TOKENS.fontWeight.bold,t.DOMAIN_TOKENS.spacing.section.titleToSubtitle),children:s?o.jsx(fe,{href:s,variant:"ghost",children:e}):e}),r&&o.jsx(W,{size:"sm",variant:"muted",className:x("line-clamp-2",N==="compact"?t.DOMAIN_TOKENS.spacing.section.titleToSubtitle:t.DOMAIN_TOKENS.spacing.section.subtitleToMetadata),children:r})]}),o.jsx(Pe,{size:N,children:o.jsxs("div",{className:"w-full",children:[a&&o.jsxs(fe,{href:a,className:x("w-full",un({size:N})),children:[d,o.jsx(ce,{className:fn({size:N})})]}),!a&&o.jsxs("div",{className:x("w-full",un({size:N})),children:[d,o.jsx(ce,{className:fn({size:N})})]})]})})]})})});Na.displayName="PromoCard";const bt=K.cva("absolute z-10",{variants:{size:{default:t.DOMAIN_TOKENS.badges.position.default,compact:t.DOMAIN_TOKENS.badges.position.compact}},defaultVariants:{size:"default"}}),It=K.cva(`inline-flex items-center ${t.DOMAIN_TOKENS.badges.radius} ${t.DOMAIN_TOKENS.badges.shadow} ${t.DOMAIN_TOKENS.badges.size.sm} ${t.DOMAIN_TOKENS.badges.text.color} ${t.TEXT_TOKENS.fontSize.xs} font-semibold`,{variants:{variant:{default:t.DOMAIN_TOKENS.badges.surface.default,featured:t.DOMAIN_TOKENS.badges.surface.featured,vip:t.DOMAIN_TOKENS.badges.surface.featured,discount:t.DOMAIN_TOKENS.badges.surface.default}},defaultVariants:{variant:"default"}}),zi=K.cva(`flex items-center ${t.DOMAIN_TOKENS.priceCapacity.spacing}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),Mi=K.cva(`${t.DOMAIN_TOKENS.priceCapacity.text.primary} font-bold`,{variants:{size:{default:t.TEXT_TOKENS.fontSize.lg,compact:t.TEXT_TOKENS.fontSize.md}},defaultVariants:{size:"default"}}),ki=K.cva(`${t.DOMAIN_TOKENS.priceCapacity.text.secondary}`,{variants:{size:{default:t.TEXT_TOKENS.fontSize.sm,compact:t.TEXT_TOKENS.fontSize.xs}},defaultVariants:{size:"default"}}),Pi=K.cva(`inline-flex items-center ${t.DOMAIN_TOKENS.metadata.spacing.horizontal} ${t.TEXT_TOKENS.fontSize.xs} font-medium`,{variants:{availability:{available:`${t.DOMAIN_TOKENS.metadata.text.primary}`,sold_out:`${t.DOMAIN_TOKENS.metadata.text.secondary} opacity-60`,available_soon:`${t.DOMAIN_TOKENS.metadata.text.secondary}`}},defaultVariants:{availability:"available"}}),Di=K.cva("border-t border-border",{variants:{size:{default:t.DOMAIN_TOKENS.spacing.footer.paddingTopDefault,compact:t.DOMAIN_TOKENS.spacing.footer.paddingTopCompact}},defaultVariants:{size:"default"}}),Nn=K.cva(`inline-flex items-center justify-center ${t.DOMAIN_TOKENS.badges.surface.featured} ${t.DOMAIN_TOKENS.badges.text.color} ${t.DOMAIN_TOKENS.badges.shadow} ${t.DOMAIN_TOKENS.motion.hover.transition} font-semibold transform`,{variants:{size:{default:t.DOMAIN_TOKENS.spacing.button.paddingDefault,compact:t.DOMAIN_TOKENS.spacing.button.paddingCompact},disabled:{true:"opacity-50 cursor-not-allowed",false:"hover:scale-105 hover:from-accent-600 hover:to-primary-700"}},defaultVariants:{size:"default",disabled:!1}}),mn=K.cva(`${t.ICON_TOKENS.sizes.md} ${t.DOMAIN_TOKENS.spacing.button.iconMarginLeft}`,{variants:{size:{default:"",compact:""}},defaultVariants:{size:"default"}}),ma=l.forwardRef(({title:e,description:r,price:n,capacity:s,availability:a="available",imageUrl:d,href:i,purchaseUrl:c,purchaseLabel:u,vipBadgeText:N,discountBadgeText:f,featured:O=!1,featuredBadgeText:m,showImage:p=!0,size:T="default",variant:h,className:g,animation:S,...E},b)=>{const I=St({animation:(S==null?void 0:S.animation)||"fadeInUp",hoverAnimation:(S==null?void 0:S.hoverAnimation)||"hoverLift",animationProps:S==null?void 0:S.animationProps}),v=h||(O?"featured":"default"),_=a==="sold_out"||a==="available_soon",$=()=>!O||!m?"":T==="compact"?`${t.DOMAIN_TOKENS.badges.position.compact} ${t.DOMAIN_TOKENS.badges.positionY.xl}`:`${t.DOMAIN_TOKENS.badges.position.default} ${t.DOMAIN_TOKENS.badges.positionY["2xl"]}`,y=()=>!(O&&m)&&!N?"":T==="compact"?`${t.DOMAIN_TOKENS.badges.position.compact} ${t.DOMAIN_TOKENS.badges.positionY["2xl"]}`:`${t.DOMAIN_TOKENS.badges.position.default} ${t.DOMAIN_TOKENS.badges.positionY["3xl"]}`,A=(()=>{switch(a){case"sold_out":return"Sold Out";case"available_soon":return"Available Soon";case"available":default:return null}})();return o.jsx(q,{...I,children:o.jsxs(ze,{ref:b,size:T,variant:v,className:x("group relative",g),...E,children:[O&&m&&o.jsx("div",{className:bt({size:T}),children:o.jsx("span",{className:It({variant:"featured"}),children:m})}),N&&o.jsx("div",{className:x(bt({size:T}),$()),children:o.jsx("span",{className:It({variant:"vip"}),children:N})}),f&&o.jsx("div",{className:x(bt({size:T}),y()),children:o.jsx("span",{className:It({variant:"discount"}),children:f})}),p&&o.jsx(Me,{size:T,children:o.jsxs("div",{className:"relative w-full overflow-hidden bg-gradient-to-br from-surface-elevated1 to-surface-elevated2",children:[d?o.jsx("img",{src:d,alt:e,className:x("h-full w-full object-cover",t.DOMAIN_TOKENS.motion.hover.transition,t.DOMAIN_TOKENS.motion.hover.scale)}):o.jsx("div",{className:"flex h-full w-full items-center justify-center",children:o.jsx(de,{name:"info",size:"xl",color:"muted",className:t.ICON_TOKENS.sizes["4xl"],"aria-hidden":"true"})}),o.jsx("div",{className:x("absolute inset-0 opacity-0 transition-opacity duration-normal group-hover:opacity-100",t.DOMAIN_TOKENS.image.overlay.gradient)})]})}),o.jsxs(ke,{size:T,children:[o.jsx(Se,{level:3,className:x("line-clamp-2 transition-colors group-hover:text-primary",t.TEXT_TOKENS.fontSize.lg,t.TEXT_TOKENS.fontWeight.bold,t.DOMAIN_TOKENS.spacing.section.titleToSubtitle),children:i?o.jsx(fe,{href:i,variant:"ghost",children:e}):e}),r&&o.jsx(W,{size:"sm",variant:"muted",className:x("line-clamp-2",T==="compact"?t.DOMAIN_TOKENS.spacing.section.titleToSubtitle:t.DOMAIN_TOKENS.spacing.section.subtitleToMetadata),children:r}),(n||s)&&o.jsxs("div",{className:zi({size:T}),children:[n&&o.jsx(W,{size:T==="compact"?"md":"lg",weight:"bold",children:o.jsx("span",{className:Mi({size:T}),children:n})}),s&&o.jsx(W,{size:T==="compact"?"xs":"sm",children:o.jsx("span",{className:ki({size:T}),children:s})})]}),A&&o.jsx("div",{className:Pi({availability:a}),children:o.jsx(W,{size:"xs",variant:a==="sold_out"?"muted":"primary",children:A})})]}),o.jsx(Pe,{size:T,children:o.jsxs("div",{className:x("w-full",Di({size:T})),children:[c&&!_&&o.jsxs(fe,{href:c,className:x("w-full",Nn({size:T,disabled:!1})),target:"_blank",rel:"noopener noreferrer",children:[u,o.jsx(ce,{className:mn({size:T})})]}),(!c||_)&&o.jsxs("div",{className:x("w-full",Nn({size:T,disabled:_})),children:[u,o.jsx(ce,{className:mn({size:T})})]})]})})]})})});ma.displayName="TicketCard";exports.accentColors=G.accentColors;exports.animations=G.animations;exports.baseColors=G.baseColors;exports.chartColors=G.chartColors;exports.colorCSSVariables=G.colorCSSVariables;exports.cssVariableColorTokens=G.cssVariableColorTokens;exports.durations=G.durations;exports.easings=G.easings;exports.keyframes=G.keyframes;exports.motionCSSVariables=G.motionCSSVariables;exports.primaryColors=G.primaryColors;exports.reducedMotion=G.reducedMotion;exports.secondaryColors=G.secondaryColors;exports.semanticColors=G.semanticColors;exports.springs=G.springs;exports.surfaceColors=G.surfaceColors;exports.tailwindMotionConfig=G.tailwindMotionConfig;exports.tailwindThemeColors=G.tailwindThemeColors;exports.textColors=G.textColors;exports.transitions=G.transitions;exports.ALERT_TOKENS=t.ALERT_TOKENS;exports.BUTTON_TOKENS=t.BUTTON_TOKENS;exports.CARD_TOKENS=t.CARD_TOKENS;exports.CHECKBOX_TOKENS=t.CHECKBOX_TOKENS;exports.DATA_TOKENS=t.DATA_TOKENS;exports.DOMAIN_TOKENS=t.DOMAIN_TOKENS;exports.DROPDOWN_TOKENS=t.DROPDOWN_TOKENS;exports.ICON_TOKENS=t.ICON_TOKENS;exports.INPUT_TOKENS=t.INPUT_TOKENS;exports.MENU_TOKENS=t.MENU_TOKENS;exports.MOTION_TOKENS=t.MOTION_TOKENS;exports.NAVIGATION_TOKENS=t.NAVIGATION_TOKENS;exports.NOTIFICATION_TOKENS=t.NOTIFICATION_TOKENS;exports.OVERLAY_TOKENS=t.OVERLAY_TOKENS;exports.POPOVER_TOKENS=t.POPOVER_TOKENS;exports.RADIO_TOKENS=t.RADIO_TOKENS;exports.SECTION_TOKENS=t.SECTION_TOKENS;exports.SURFACE_TOKENS=t.SURFACE_TOKENS;exports.SWITCH_TOKENS=t.SWITCH_TOKENS;exports.TEXT_TOKENS=t.TEXT_TOKENS;exports.TOAST_TOKENS=t.TOAST_TOKENS;exports.TOOLTIP_TOKENS=t.TOOLTIP_TOKENS;exports.UI_COLORS=t.UI_COLORS;exports.allCSSVariables=t.allCSSVariables;exports.allCSSVariablesCSS=t.allCSSVariablesCSS;exports.generateCSSVariablesCSS=t.generateCSSVariablesCSS;exports.tokenSystemSummary=t.tokenSystemSummary;exports.accentColoredShadows=R.accentColoredShadows;exports.borderRadius=R.borderRadius;exports.componentRadius=R.componentRadius;exports.componentShadowMapping=R.componentShadowMapping;exports.elevationShadows=R.elevationShadows;exports.focusRings=R.focusRings;exports.fontFamily=R.fontFamily;exports.fontSize=R.fontSize;exports.fontSizeWithMd=R.fontSizeWithMd;exports.fontWeight=R.fontWeight;exports.glowEffects=R.glowEffects;exports.layoutSpacing=R.layoutSpacing;exports.letterSpacing=R.letterSpacing;exports.lineHeight=R.lineHeight;exports.motionV2CSSVariables=R.motionV2CSSVariables;exports.motionV2Combined=R.motionV2Combined;exports.motionV2Durations=R.motionV2Durations;exports.motionV2Easings=R.motionV2Easings;exports.motionV2Fade=R.motionV2Fade;exports.motionV2Scale=R.motionV2Scale;exports.motionV2Slide=R.motionV2Slide;exports.motionV2TailwindConfig=R.motionV2TailwindConfig;exports.motionV2Transitions=R.motionV2Transitions;exports.primaryColoredShadows=R.primaryColoredShadows;exports.radiusCSSVariables=R.radiusCSSVariables;exports.semanticSpacing=R.semanticSpacing;exports.shadowBase=R.shadowBase;exports.shadowCSSVariables=R.shadowCSSVariables;exports.shadowOpacity=R.shadowOpacity;exports.spacing=R.spacing;exports.spacingCSSVariables=R.spacingCSSVariables;exports.tailwindRadiusConfig=R.tailwindRadiusConfig;exports.tailwindShadowConfig=R.tailwindShadowConfig;exports.tailwindSpacingConfig=R.tailwindSpacingConfig;exports.tailwindTypographyConfig=R.tailwindTypographyConfig;exports.textStyles=R.textStyles;exports.typographyCSSVariables=R.typographyCSSVariables;exports.Alert=hn;exports.ArtistCard=ua;exports.Backdrop=nt;exports.Body=En;exports.Box=q;exports.Breadcrumbs=ii;exports.Button=ne;exports.Caption=In;exports.Card=Re;exports.CardBody=Jt;exports.CardFooter=er;exports.CardHeader=Zt;exports.Checkbox=Rn;exports.Code=_n;exports.Column=Ca;exports.Container=Xn;exports.ContainerSurface=rt;exports.ContextMenuContent=Hs;exports.ContextMenuGroup=Xs;exports.ContextMenuItem=Fs;exports.ContextMenuLabel=Ws;exports.ContextMenuRoot=Gs;exports.ContextMenuSeparator=Ys;exports.ContextMenuTrigger=qs;exports.DataList=we;exports.DataListItem=br;exports.DataListLabel=Ir;exports.DataListRoot=we;exports.DataListValue=vr;exports.Dialog=Fa;exports.DialogBody=ir;exports.DialogDescription=or;exports.DialogFooter=lr;exports.DialogHeader=sr;exports.DialogRoot=He;exports.DialogTitle=ar;exports.Display=wn;exports.DropdownMenuCheckItem=Cs;exports.DropdownMenuContent=Or;exports.DropdownMenuGroup=pr;exports.DropdownMenuItem=Ke;exports.DropdownMenuLabel=gr;exports.DropdownMenuRadioGroup=Rs;exports.DropdownMenuRadioItem=Vs;exports.DropdownMenuRoot=As;exports.DropdownMenuSeparator=Sr;exports.DropdownMenuSub=js;exports.DropdownMenuSubContent=zs;exports.DropdownMenuSubTrigger=Ms;exports.DropdownMenuTrigger=ks;exports.EmptyState=xe;exports.EmptyStateAction=xr;exports.EmptyStateDescription=Er;exports.EmptyStateIcon=Ot;exports.EmptyStateTitle=pt;exports.EventCard=fa;exports.Field=$e;exports.Flex=Fn;exports.Grid=Wn;exports.Heading=Se;exports.HoverCardContent=Ps;exports.HoverCardRoot=Ds;exports.HoverCardTrigger=Us;exports.ICONS_MAP=vt;exports.Icon=de;exports.IconArrowRight=ce;exports.IconCalendar=Ze;exports.IconCheck=Je;exports.IconChevronDown=Mt;exports.IconChevronRight=kt;exports.IconClose=Pt;exports.IconError=Dt;exports.IconInfo=Ut;exports.IconLocation=et;exports.IconMenu=Lt;exports.IconSearch=Bt;exports.IconSuccess=Gt;exports.IconWarning=Ht;exports.Input=jn;exports.Label=Qt;exports.Lead=Cn;exports.Modal=is;exports.ModalBody=rr;exports.ModalFooter=nr;exports.ModalHeader=tr;exports.NotificationCenter=ro;exports.NotificationCenterDismissAll=st;exports.NotificationCenterGroupHeader=at;exports.NotificationCenterItem=ot;exports.NotificationCenterList=it;exports.NotificationCenterPanel=ur;exports.NotificationCenterProvider=us;exports.NotificationCenterTrigger=fr;exports.Pagination=di;exports.PopoverArrow=fs;exports.PopoverContent=mt;exports.PopoverRoot=_e;exports.PopoverTrigger=Tt;exports.Portal=Ne;exports.PromoCard=Na;exports.Radio=Pn;exports.RadioGroup=kn;exports.Row=tt;exports.Section=ns;exports.SegmentedControl=oi;exports.Select=Ea;exports.SelectListbox=Yt;exports.SelectOption=qt;exports.SelectRoot=Ft;exports.SelectTrigger=Wt;exports.Skeleton=hr;exports.Stack=ae;exports.Stepper=ci;exports.Surface=qn;exports.Table=Z;exports.TableBody=_r;exports.TableCell=Kr;exports.TableEmpty=wr;exports.TableExpandableContent=yr;exports.TableHead=Ar;exports.TableHeader=Cr;exports.TableLoadingState=$r;exports.TableRoot=Z;exports.TableRow=Rr;exports.TableSortIcon=gt;exports.Tabs=si;exports.Text=W;exports.Textarea=Hn;exports.TicketCard=ma;exports.Toast=dr;exports.ToastProvider=qa;exports.ToastViewport=cr;exports.alertVariants=Sn;exports.bodyVariants=xn;exports.buttonVariants=pn;exports.captionVariants=bn;exports.checkboxVariants=$n;exports.codeVariants=vn;exports.containerSurfaceVariants=ss;exports.displayVariants=Kn;exports.headingVariants=yn;exports.iconVariants=ca;exports.inputVariants=Vn;exports.labelVariants=Qn;exports.leadVariants=An;exports.modalVariants=os;exports.popoverContentVariants=ws;exports.radioVariants=zn;exports.segmentedControlItemVariants=oa;exports.segmentedControlRootVariants=aa;exports.selectListboxVariants=Un;exports.selectOptionVariants=Ln;exports.selectTriggerVariants=Dn;exports.skeletonVariants=Qs;exports.surfaceVariants=Yn;exports.tabsListVariants=ea;exports.tabsTriggerVariants=ta;exports.textVariants=gn;exports.textareaVariants=Gn;exports.useNotificationCenter=to;exports.useNotificationCenterContext=Ve;exports.useTableContext=Js;exports.useToast=Qa;
|