@fabio.caffarello/react-design-system 1.23.13 → 1.23.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Fo=Object.defineProperty,_o=Object.defineProperties;var Po=Object.getOwnPropertyDescriptors;var tr=Object.getOwnPropertySymbols;var fn=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable;var Ur=(e,t,r)=>t in e?Fo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))fn.call(t,r)&&Ur(e,r,t[r]);if(tr)for(var r of tr(t))mn.call(t,r)&&Ur(e,r,t[r]);return e},P=(e,t)=>_o(e,Po(t));var O=(e,t)=>{var r={};for(var s in e)fn.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&tr)for(var s of tr(e))t.indexOf(s)<0&&mn.call(e,s)&&(r[s]=e[s]);return r};var pn=(e,t,r)=>Ur(e,typeof t!="symbol"?t+"":t,r);var rr=(e,t,r)=>new Promise((s,a)=>{var o=u=>{try{c(r.next(u))}catch(d){a(d)}},i=u=>{try{c(r.throw(u))}catch(d){a(d)}},c=u=>u.done?s(u.value):Promise.resolve(u.value).then(o,i);c((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),qe=require("react-dom"),Qe={icon:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},text:{xs:"text-xs",sm:"text-sm",base:"text-base"},spacing:{itemPaddingX:"px-4",itemPaddingY:"py-2",nestedIndent:"pl-6",nestedIndentLevel2:"pl-10",nestedIndentLevel3:"pl-14",groupTitlePadding:"px-4 py-2",iconMargin:"mr-3"},colors:{active:{bg:"bg-surface-brand-muted",text:"text-fg-brand-emphasis",border:"border-line-brand"},inactive:{text:"text-fg-secondary",hover:"hover:bg-surface-hover hover:text-fg-primary"},groupTitle:"text-fg-tertiary"},chevron:{size:"h-3 w-3",color:"text-fg-quaternary"},navigation:{width:{default:"56px",compact:"48px",expanded:"200px"},background:{default:"#fafafa",hover:"#f5f5f5"}},split:{transition:"transition-all duration-300",collapsedWidth:"0px"},content:{scrollbar:{width:"thin",color:{thumb:"#cbd5e1",track:"#f1f5f9"}}}};function zo(e){return e<=0?Qe.spacing.itemPaddingX:e===1?Qe.spacing.nestedIndent:e===2?Qe.spacing.nestedIndentLevel2:e===3?Qe.spacing.nestedIndentLevel3:`pl-${4+e*4}`}class he{static create(t){const r=t*this.BASE_UNIT,s=r/16;return{value:r,rem:`${s}rem`,px:`${r}px`,tailwind:this.getTailwindClass(t)}}static getTailwindClass(t){return{0:"0",.5:"0.5",1:"1",1.5:"1.5",2:"2",2.5:"2.5",3:"3",3.5:"3.5",4:"4",5:"5",6:"6",8:"8",10:"10",12:"12",16:"16",20:"20",24:"24",32:"32",40:"40",48:"48",64:"64",80:"80",96:"96"}[t]||String(t)}}pn(he,"BASE_UNIT",4);const xr={none:he.create(0),"0.5":he.create(.5),xs:he.create(1),"1.5":he.create(1.5),sm:he.create(2),"2.5":he.create(2.5),md:he.create(3),"3.5":he.create(3.5),base:he.create(4),lg:he.create(6),xl:he.create(8),"2xl":he.create(10),"3xl":he.create(12),"4xl":he.create(16),"5xl":he.create(20),"6xl":he.create(24)};function Oo(e){return xr[e]}function E(e,t="p"){const s=xr[e].tailwind;return`${{p:"p",m:"m",px:"px",mx:"mx",py:"py",my:"my",pt:"pt",mt:"mt",pr:"pr",mr:"mr",pb:"pb",mb:"mb",pl:"pl",ml:"ml",gap:"gap","gap-x":"gap-x","gap-y":"gap-y","space-y":"space-y"}[t]}-${s}`}class me{static createFontSize(t){const s={"2xs":{px:10,tailwind:"text-2xs"},xs:{px:12,tailwind:"text-xs"},sm:{px:14,tailwind:"text-sm"},base:{px:16,tailwind:"text-base"},lg:{px:18,tailwind:"text-lg"},xl:{px:20,tailwind:"text-xl"},"2xl":{px:24,tailwind:"text-2xl"},"3xl":{px:30,tailwind:"text-3xl"},"4xl":{px:36,tailwind:"text-4xl"},"5xl":{px:48,tailwind:"text-5xl"},"6xl":{px:60,tailwind:"text-6xl"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind}}static createLineHeight(t){const s={none:{value:1,tailwind:"leading-none"},tight:{value:1.25,tailwind:"leading-tight"},snug:{value:1.375,tailwind:"leading-snug"},normal:{value:1.5,tailwind:"leading-normal"},relaxed:{value:1.625,tailwind:"leading-relaxed"},loose:{value:2,tailwind:"leading-loose"}}[t];return{value:s.value,tailwind:s.tailwind}}static createFontWeight(t){const s={light:{value:300,tailwind:"font-light"},normal:{value:400,tailwind:"font-normal"},medium:{value:500,tailwind:"font-medium"},semibold:{value:600,tailwind:"font-semibold"},bold:{value:700,tailwind:"font-bold"}}[t];return{value:s.value,tailwind:s.tailwind}}static create(t,r="normal",s="normal"){return{fontSize:this.createFontSize(t),lineHeight:this.createLineHeight(r),fontWeight:this.createFontWeight(s)}}}const Vo={sans:{name:"sans",stack:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',tailwind:"font-sans"},serif:{name:"serif",stack:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',tailwind:"font-serif"},mono:{name:"mono",stack:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',tailwind:"font-mono"}},Wo={light:me.createFontWeight("light"),normal:me.createFontWeight("normal"),medium:me.createFontWeight("medium"),semibold:me.createFontWeight("semibold"),bold:me.createFontWeight("bold")},gt={h1:me.create("4xl","tight","bold"),h2:me.create("3xl","tight","bold"),h3:me.create("2xl","snug","semibold"),h4:me.create("xl","snug","semibold"),h5:me.create("lg","normal","medium"),h6:me.create("base","normal","medium"),body:me.create("base","relaxed","normal"),bodySmall:me.create("sm","relaxed","normal"),bodyLarge:me.create("lg","relaxed","normal"),label:me.create("sm","normal","medium"),caption:me.create("xs","normal","normal"),button:me.create("base","normal","medium")};function Ho(e){return gt[e]}function ce(e){const t=gt[e];return`${t.fontSize.tailwind} ${t.lineHeight.tailwind} ${t.fontWeight.tailwind}`}function re(e){return gt[e].fontSize.tailwind}function ye(e){return me.createFontSize(e).tailwind}function Pe(e){return gt[e].fontWeight.tailwind}function Mt(e){return me.createFontWeight(e).tailwind}function Bo(e){return gt[e].lineHeight.tailwind}const Uo=[50,100,200,300,400,500,600,700,800,900,950];function $(e,t,r){const s=qo(e),a=Go(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function qo(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)}, ${parseInt(t[2],16)}, ${parseInt(t[3],16)}`:"0, 0, 0"}function Go(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return"0, 0%, 0%";const r=parseInt(t[1],16)/255,s=parseInt(t[2],16)/255,a=parseInt(t[3],16)/255,o=Math.max(r,s,a),i=Math.min(r,s,a);let c=0,u=0;const d=(o+i)/2;if(o!==i){const f=o-i;switch(u=d>.5?f/(2-o-i):f/(o+i),o){case r:c=((s-a)/f+(s<a?6:0))/6;break;case s:c=((a-r)/f+2)/6;break;case a:c=((r-s)/f+4)/6;break}}return`${Math.round(c*360)}, ${Math.round(u*100)}%, ${Math.round(d*100)}%`}const Ze={50:$("#eef2ff","indigo",50),100:$("#e0e7ff","indigo",100),200:$("#c7d2fe","indigo",200),300:$("#a5b4fc","indigo",300),400:$("#818cf8","indigo",400),500:$("#6366f1","indigo",500),600:$("#4f46e5","indigo",600),700:$("#4338ca","indigo",700),800:$("#3730a3","indigo",800),900:$("#312e81","indigo",900),950:$("#1e1b4b","indigo",950)},et={50:$("#f5f3ff","violet",50),100:$("#ede9fe","violet",100),200:$("#ddd6fe","violet",200),300:$("#c4b5fd","violet",300),400:$("#a78bfa","violet",400),500:$("#8b5cf6","violet",500),600:$("#7c3aed","violet",600),700:$("#6d28d9","violet",700),800:$("#5b21b6","violet",800),900:$("#4c1d95","violet",900),950:$("#2e1065","violet",950)},tt={50:$("#ecfeff","cyan",50),100:$("#cffafe","cyan",100),200:$("#a5f3fc","cyan",200),300:$("#67e8f9","cyan",300),400:$("#22d3ee","cyan",400),500:$("#06b6d4","cyan",500),600:$("#0891b2","cyan",600),700:$("#0e7490","cyan",700),800:$("#155e75","cyan",800),900:$("#164e63","cyan",900),950:$("#083344","cyan",950)},rt={50:$("#f8fafc","slate",50),100:$("#f1f5f9","slate",100),200:$("#e2e8f0","slate",200),300:$("#cbd5e1","slate",300),400:$("#94a3b8","slate",400),500:$("#64748b","slate",500),600:$("#475569","slate",600),700:$("#334155","slate",700),800:$("#1e293b","slate",800),900:$("#0f172a","slate",900),950:$("#020617","slate",950)},Dn={50:$("#f9fafb","gray",50),100:$("#f3f4f6","gray",100),200:$("#e5e7eb","gray",200),300:$("#d1d5db","gray",300),400:$("#9ca3af","gray",400),500:$("#6b7280","gray",500),600:$("#4b5563","gray",600),700:$("#374151","gray",700),800:$("#1f2937","gray",800),900:$("#111827","gray",900),950:$("#030712","gray",950)},st={50:$("#ecfdf5","emerald",50),100:$("#d1fae5","emerald",100),200:$("#a7f3d0","emerald",200),300:$("#6ee7b7","emerald",300),400:$("#34d399","emerald",400),500:$("#10b981","emerald",500),600:$("#059669","emerald",600),700:$("#047857","emerald",700),800:$("#065f46","emerald",800),900:$("#064e3b","emerald",900),950:$("#022c22","emerald",950)},Ln={50:$("#f0fdf4","green",50),100:$("#dcfce7","green",100),200:$("#bbf7d0","green",200),300:$("#86efac","green",300),400:$("#4ade80","green",400),500:$("#22c55e","green",500),600:$("#16a34a","green",600),700:$("#15803d","green",700),800:$("#166534","green",800),900:$("#14532d","green",900),950:$("#052e16","green",950)},nt={50:$("#fffbeb","amber",50),100:$("#fef3c7","amber",100),200:$("#fde68a","amber",200),300:$("#fcd34d","amber",300),400:$("#fbbf24","amber",400),500:$("#f59e0b","amber",500),600:$("#d97706","amber",600),700:$("#b45309","amber",700),800:$("#92400e","amber",800),900:$("#78350f","amber",900),950:$("#451a03","amber",950)},Fn={50:$("#fefce8","yellow",50),100:$("#fef9c3","yellow",100),200:$("#fef08a","yellow",200),300:$("#fde047","yellow",300),400:$("#facc15","yellow",400),500:$("#eab308","yellow",500),600:$("#ca8a04","yellow",600),700:$("#a16207","yellow",700),800:$("#854d0e","yellow",800),900:$("#713f12","yellow",900),950:$("#422006","yellow",950)},_n={50:$("#fff7ed","orange",50),100:$("#ffedd5","orange",100),200:$("#fed7aa","orange",200),300:$("#fdba74","orange",300),400:$("#fb923c","orange",400),500:$("#f97316","orange",500),600:$("#ea580c","orange",600),700:$("#c2410c","orange",700),800:$("#9a3412","orange",800),900:$("#7c2d12","orange",900),950:$("#431407","orange",950)},at={50:$("#fff1f2","rose",50),100:$("#ffe4e6","rose",100),200:$("#fecdd3","rose",200),300:$("#fda4af","rose",300),400:$("#fb7185","rose",400),500:$("#f43f5e","rose",500),600:$("#e11d48","rose",600),700:$("#be123c","rose",700),800:$("#9f1239","rose",800),900:$("#881337","rose",900),950:$("#4c0519","rose",950)},Pn={50:$("#fef2f2","red",50),100:$("#fee2e2","red",100),200:$("#fecaca","red",200),300:$("#fca5a5","red",300),400:$("#f87171","red",400),500:$("#ef4444","red",500),600:$("#dc2626","red",600),700:$("#b91c1c","red",700),800:$("#991b1b","red",800),900:$("#7f1d1d","red",900),950:$("#450a0a","red",950)},ot={50:$("#f0f9ff","sky",50),100:$("#e0f2fe","sky",100),200:$("#bae6fd","sky",200),300:$("#7dd3fc","sky",300),400:$("#38bdf8","sky",400),500:$("#0ea5e9","sky",500),600:$("#0284c7","sky",600),700:$("#0369a1","sky",700),800:$("#075985","sky",800),900:$("#0c4a6e","sky",900),950:$("#082f49","sky",950)},zn={50:$("#eff6ff","blue",50),100:$("#dbeafe","blue",100),200:$("#bfdbfe","blue",200),300:$("#93c5fd","blue",300),400:$("#60a5fa","blue",400),500:$("#3b82f6","blue",500),600:$("#2563eb","blue",600),700:$("#1d4ed8","blue",700),800:$("#1e40af","blue",800),900:$("#1e3a8a","blue",900),950:$("#172554","blue",950)},On={50:$("#fdf4ff","fuchsia",50),100:$("#fae8ff","fuchsia",100),200:$("#f5d0fe","fuchsia",200),300:$("#f0abfc","fuchsia",300),400:$("#e879f9","fuchsia",400),500:$("#d946ef","fuchsia",500),600:$("#c026d3","fuchsia",600),700:$("#a21caf","fuchsia",700),800:$("#86198f","fuchsia",800),900:$("#701a75","fuchsia",900),950:$("#4a044e","fuchsia",950)},Vn={50:$("#fdf2f8","pink",50),100:$("#fce7f3","pink",100),200:$("#fbcfe8","pink",200),300:$("#f9a8d4","pink",300),400:$("#f472b6","pink",400),500:$("#ec4899","pink",500),600:$("#db2777","pink",600),700:$("#be185d","pink",700),800:$("#9d174d","pink",800),900:$("#831843","pink",900),950:$("#500724","pink",950)},Wn={50:$("#faf5ff","purple",50),100:$("#f3e8ff","purple",100),200:$("#e9d5ff","purple",200),300:$("#d8b4fe","purple",300),400:$("#c084fc","purple",400),500:$("#a855f7","purple",500),600:$("#9333ea","purple",600),700:$("#7e22ce","purple",700),800:$("#6b21a8","purple",800),900:$("#581c87","purple",900),950:$("#3b0764","purple",950)},Hn={50:$("#f0fdfa","teal",50),100:$("#ccfbf1","teal",100),200:$("#99f6e4","teal",200),300:$("#5eead4","teal",300),400:$("#2dd4bf","teal",400),500:$("#14b8a6","teal",500),600:$("#0d9488","teal",600),700:$("#0f766e","teal",700),800:$("#115e59","teal",800),900:$("#134e4a","teal",900),950:$("#042f2e","teal",950)},Bn={50:$("#f7fee7","lime",50),100:$("#ecfccb","lime",100),200:$("#d9f99d","lime",200),300:$("#bef264","lime",300),400:$("#a3e635","lime",400),500:$("#84cc16","lime",500),600:$("#65a30d","lime",600),700:$("#4d7c0f","lime",700),800:$("#3f6212","lime",800),900:$("#365314","lime",900),950:$("#1a2e05","lime",950)},ds={indigo:Ze,violet:et,cyan:tt,slate:rt,gray:Dn,emerald:st,green:Ln,amber:nt,yellow:Fn,orange:_n,rose:at,red:Pn,sky:ot,blue:zn,fuchsia:On,pink:Vn,purple:Wn,teal:Hn,lime:Bn};function Rt(e,t){return ds[e][t]}function Ko(e){return ds[e]}const qt={primary:{light:Ze[400],DEFAULT:Ze[500],dark:Ze[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:et[400],DEFAULT:et[500],dark:et[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:tt[400],DEFAULT:tt[500],dark:tt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},success:{light:st[400],DEFAULT:st[500],dark:st[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},warning:{light:nt[400],DEFAULT:nt[500],dark:nt[600],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:at[400],DEFAULT:at[500],dark:at[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:ot[400],DEFAULT:ot[500],dark:ot[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:rt[100],DEFAULT:rt[500],dark:rt[700],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},vr={primary:{light:Ze[500],DEFAULT:Ze[400],dark:Ze[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:et[500],DEFAULT:et[400],dark:et[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:tt[500],DEFAULT:tt[400],dark:tt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},success:{light:st[500],DEFAULT:st[400],dark:st[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},warning:{light:nt[500],DEFAULT:nt[400],dark:nt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:at[500],DEFAULT:at[400],dark:at[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:ot[500],DEFAULT:ot[400],dark:ot[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:rt[700],DEFAULT:rt[400],dark:rt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},Yo=qt;function Ht(e,t="DEFAULT",r="light"){return(r==="dark"?vr:qt)[e][t]}function Xo(e,t="light"){return(t==="dark"?vr:qt)[e]}function Jo(e,t,r={}){const{format:s="hex",opacity:a}=r,o=Rt(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Qo(e,t="DEFAULT",r={}){const{format:s="hex",opacity:a}=r,o=Ht(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Zo(e,t,r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Rt(e,t),d=[`${s}-${c.tailwind}`];return a&&d.push(`hover:${s}-${c.tailwind}`),o&&d.push(`focus:${s}-${c.tailwind}`),i&&d.push(`active:${s}-${c.tailwind}`),d.join(" ")}function ei(e,t="DEFAULT",r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Ht(e,t),d=[`${s}-${c.tailwind}`];if(a){const f=Ht(e,t==="DEFAULT"?"dark":"DEFAULT");d.push(`hover:${s}-${f.tailwind}`)}if(o&&d.push(`focus:${s}-${c.tailwind}`),i){const f=Ht(e,"dark");d.push(`active:${s}-${f.tailwind}`)}return d.join(" ")}function ti(e,t,r="bg"){const s=Rt(e,t);return`hover:${r}-${s.tailwind}`}function ri(e,t,r="border"){const s=Rt(e,t);return`focus:${r}-${s.tailwind}`}function si(e,t){return`focus:ring-${Rt(e,t).tailwind}`}function ni(e,t){return`rgba(${e.rgb}, ${t})`}function Un(e){const t=rs(e);return t?.299*t[0]+.587*t[1]+.114*t[2]>128:!0}function ai(e){return Un(e)?"#000000":"#ffffff"}function rs(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null}function us(e,t,r=.5){const s=rs(e),a=rs(t);if(!s||!a)return e;const o=Math.round(s[0]*(1-r)+a[0]*r),i=Math.round(s[1]*(1-r)+a[1]*r),c=Math.round(s[2]*(1-r)+a[2]*r);return`#${((1<<24)+(o<<16)+(i<<8)+c).toString(16).slice(1)}`}function oi(e,t){return us(e,"#ffffff",t/100)}function ii(e,t){return us(e,"#000000",t/100)}const li={primary:{name:"indigo",light:400,default:500,dark:600},secondary:{name:"violet",light:400,default:500,dark:600},accent:{name:"cyan",light:400,default:500,dark:600}};class Ct{static create(t){const s={sm:{minWidth:640,tailwind:"sm"},md:{minWidth:768,tailwind:"md"},lg:{minWidth:1024,tailwind:"lg"},xl:{minWidth:1280,tailwind:"xl"},"2xl":{minWidth:1536,tailwind:"2xl"}}[t];return{name:t,minWidth:s.minWidth,px:`${s.minWidth}px`,rem:`${s.minWidth/16}rem`,tailwind:s.tailwind}}}const yr={sm:Ct.create("sm"),md:Ct.create("md"),lg:Ct.create("lg"),xl:Ct.create("xl"),"2xl":Ct.create("2xl")};function ci(e){return yr[e]}function di(e,t="min"){const r=yr[e];return`@media (${t==="min"?"min-width":"max-width"}: ${r.px})`}function qn(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=qn(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Gn(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=qn(e))&&(s&&(s+=" "),s+=t);return s}const ui=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},fi=(e,t)=>({classGroupId:e,validator:t}),Kn=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),cr="-",hn=[],mi="arbitrary..",pi=e=>{const t=bi(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return hi(i);const c=i.split(cr),u=c[0]===""&&c.length>1?1:0;return Yn(c,u,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const u=s[i],d=r[i];return u?d?ui(d,u):u:d||hn}return r[i]||hn}}},Yn=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const d=Yn(e,t+1,o);if(d)return d}const i=r.validators;if(i===null)return;const c=t===0?e.join(cr):e.slice(t).join(cr),u=i.length;for(let d=0;d<u;d++){const f=i[d];if(f.validator(c))return f.classGroupId}},hi=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?mi+s:void 0})(),bi=e=>{const{theme:t,classGroups:r}=e;return gi(r,t)},gi=(e,t)=>{const r=Kn();for(const s in e){const a=e[s];fs(a,r,s,t)}return r},fs=(e,t,r,s)=>{const a=e.length;for(let o=0;o<a;o++){const i=e[o];xi(i,t,r,s)}},xi=(e,t,r,s)=>{if(typeof e=="string"){vi(e,t,r);return}if(typeof e=="function"){yi(e,t,r,s);return}wi(e,t,r,s)},vi=(e,t,r)=>{const s=e===""?t:Xn(t,e);s.classGroupId=r},yi=(e,t,r,s)=>{if(ki(e)){fs(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(fi(r,e))},wi=(e,t,r,s)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[c,u]=a[i];fs(u,Xn(t,c),r,s)}},Xn=(e,t)=>{let r=e;const s=t.split(cr),a=s.length;for(let o=0;o<a;o++){const i=s[o];let c=r.nextPart.get(i);c||(c=Kn(),r.nextPart.set(i,c)),r=c}return r},ki=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ji=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const a=(o,i)=>{r[o]=i,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(o){let i=r[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return a(o,i),i},set(o,i){o in r?r[o]=i:a(o,i)}}},ss="!",bn=":",Ni=[],gn=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),Si=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=a=>{const o=[];let i=0,c=0,u=0,d;const f=a.length;for(let v=0;v<f;v++){const y=a[v];if(i===0&&c===0){if(y===bn){o.push(a.slice(u,v)),u=v+1;continue}if(y==="/"){d=v;continue}}y==="["?i++:y==="]"?i--:y==="("?c++:y===")"&&c--}const p=o.length===0?a:a.slice(u);let m=p,h=!1;p.endsWith(ss)?(m=p.slice(0,-1),h=!0):p.startsWith(ss)&&(m=p.slice(1),h=!0);const x=d&&d>u?d-u:void 0;return gn(o,h,m,x)};if(t){const a=t+bn,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):gn(Ni,!1,i,void 0,!0)}if(r){const a=s;s=o=>r({className:o,parseClassName:a})}return s},Ci=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let a=[];for(let o=0;o<r.length;o++){const i=r[o],c=i[0]==="[",u=t.has(i);c||u?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},$i=e=>T({cache:ji(e.cacheSize),parseClassName:Si(e),sortModifiers:Ci(e)},pi(e)),Ei=/\s+/,Mi=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o}=t,i=[],c=e.trim().split(Ei);let u="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{isExternal:p,modifiers:m,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:v}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let y=!!v,g=s(y?x.substring(0,v):x);if(!g){if(!y){u=f+(u.length>0?" "+u:u);continue}if(g=s(x),!g){u=f+(u.length>0?" "+u:u);continue}y=!1}const j=m.length===0?"":m.length===1?m[0]:o(m).join(":"),C=h?j+ss:j,b=C+g;if(i.indexOf(b)>-1)continue;i.push(b);const k=a(g,y);for(let N=0;N<k.length;++N){const _=k[N];i.push(C+_)}u=f+(u.length>0?" "+u:u)}return u},Ti=(...e)=>{let t=0,r,s,a="";for(;t<e.length;)(r=e[t++])&&(s=Jn(r))&&(a&&(a+=" "),a+=s);return a},Jn=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=Jn(e[s]))&&(r&&(r+=" "),r+=t);return r},Ai=(e,...t)=>{let r,s,a,o;const i=u=>{const d=t.reduce((f,p)=>p(f),e());return r=$i(d),s=r.cache.get,a=r.cache.set,o=c,c(u)},c=u=>{const d=s(u);if(d)return d;const f=Mi(u,r);return a(u,f),f};return o=i,(...u)=>o(Ti(...u))},Ri=[],pe=e=>{const t=r=>r[e]||Ri;return t.isThemeGetter=!0,t},Qn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Zn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ii=/^\d+\/\d+$/,Di=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Li=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Fi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_i=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jt=e=>Ii.test(e),te=e=>!!e&&!Number.isNaN(Number(e)),Ke=e=>!!e&&Number.isInteger(Number(e)),qr=e=>e.endsWith("%")&&te(e.slice(0,-1)),We=e=>Di.test(e),zi=()=>!0,Oi=e=>Li.test(e)&&!Fi.test(e),ea=()=>!1,Vi=e=>_i.test(e),Wi=e=>Pi.test(e),Hi=e=>!q(e)&&!G(e),Bi=e=>It(e,sa,ea),q=e=>Qn.test(e),ft=e=>It(e,na,Oi),Gr=e=>It(e,Yi,te),xn=e=>It(e,ta,ea),Ui=e=>It(e,ra,Wi),sr=e=>It(e,aa,Vi),G=e=>Zn.test(e),_t=e=>Dt(e,na),qi=e=>Dt(e,Xi),vn=e=>Dt(e,ta),Gi=e=>Dt(e,sa),Ki=e=>Dt(e,ra),nr=e=>Dt(e,aa,!0),It=(e,t,r)=>{const s=Qn.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},Dt=(e,t,r=!1)=>{const s=Zn.exec(e);return s?s[1]?t(s[1]):r:!1},ta=e=>e==="position"||e==="percentage",ra=e=>e==="image"||e==="url",sa=e=>e==="length"||e==="size"||e==="bg-size",na=e=>e==="length",Yi=e=>e==="number",Xi=e=>e==="family-name",aa=e=>e==="shadow",Ji=()=>{const e=pe("color"),t=pe("font"),r=pe("text"),s=pe("font-weight"),a=pe("tracking"),o=pe("leading"),i=pe("breakpoint"),c=pe("container"),u=pe("spacing"),d=pe("radius"),f=pe("shadow"),p=pe("inset-shadow"),m=pe("text-shadow"),h=pe("drop-shadow"),x=pe("blur"),v=pe("perspective"),y=pe("aspect"),g=pe("ease"),j=pe("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...b(),G,q],N=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],S=()=>[G,q,u],M=()=>[jt,"full","auto",...S()],L=()=>[Ke,"none","subgrid",G,q],R=()=>["auto",{span:["full",Ke,G,q]},Ke,G,q],D=()=>[Ke,"auto",G,q],I=()=>["auto","min","max","fr",G,q],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...S()],H=()=>[jt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],W=()=>[e,G,q],ie=()=>[...b(),vn,xn,{position:[G,q]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",Gi,Bi,{size:[G,q]}],B=()=>[qr,_t,ft],K=()=>["","none","full",d,G,q],Q=()=>["",te,_t,ft],le=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[te,qr,vn,xn],U=()=>["","none",x,G,q],X=()=>["none",te,G,q],ae=()=>["none",te,G,q],fe=()=>[te,G,q],ke=()=>[jt,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[We],breakpoint:[We],color:[zi],container:[We],"drop-shadow":[We],ease:["in","out","in-out"],font:[Hi],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[We],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[We],shadow:[We],spacing:["px",te],text:[We],"text-shadow":[We],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",jt,q,G,y]}],container:["container"],columns:[{columns:[te,q,G,c]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Ke,"auto",G,q]}],basis:[{basis:[jt,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[te,jt,"auto","initial","none",q]}],grow:[{grow:["",te,G,q]}],shrink:[{shrink:["",te,G,q]}],order:[{order:[Ke,"first","last","none",G,q]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[c,"screen",...H()]}],"min-w":[{"min-w":[c,"screen","none",...H()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",r,_t,ft]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,G,Gr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qr,q]}],"font-family":[{font:[qi,q,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,G,q]}],"line-clamp":[{"line-clamp":[te,"none",G,Gr]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",G,q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",G,q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[te,"from-font","auto",G,ft]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[te,"auto",G,q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G,q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",G,q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ke,G,q],radial:["",G,q],conic:[Ke,G,q]},Ki,Ui]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[te,G,q]}],"outline-w":[{outline:["",te,_t,ft]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",f,nr,sr]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",p,nr,sr]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[te,ft]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",m,nr,sr]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[te,G,q]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[te]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[G,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[te]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",G,q]}],filter:[{filter:["","none",G,q]}],blur:[{blur:U()}],brightness:[{brightness:[te,G,q]}],contrast:[{contrast:[te,G,q]}],"drop-shadow":[{"drop-shadow":["","none",h,nr,sr]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",te,G,q]}],"hue-rotate":[{"hue-rotate":[te,G,q]}],invert:[{invert:["",te,G,q]}],saturate:[{saturate:[te,G,q]}],sepia:[{sepia:["",te,G,q]}],"backdrop-filter":[{"backdrop-filter":["","none",G,q]}],"backdrop-blur":[{"backdrop-blur":U()}],"backdrop-brightness":[{"backdrop-brightness":[te,G,q]}],"backdrop-contrast":[{"backdrop-contrast":[te,G,q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",te,G,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[te,G,q]}],"backdrop-invert":[{"backdrop-invert":["",te,G,q]}],"backdrop-opacity":[{"backdrop-opacity":[te,G,q]}],"backdrop-saturate":[{"backdrop-saturate":[te,G,q]}],"backdrop-sepia":[{"backdrop-sepia":["",te,G,q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",G,q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[te,"initial",G,q]}],ease:[{ease:["linear","initial",g,G,q]}],delay:[{delay:[te,G,q]}],animate:[{animate:["none",j,G,q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,G,q]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[G,q,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",G,q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",G,q]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[te,_t,ft,Gr]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Qi=Ai(Ji);function w(...e){return Qi(Gn(e))}const yn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wn=Gn,Zi=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return wn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(d=>{const f=r==null?void 0:r[d],p=o==null?void 0:o[d];if(f===null)return null;const m=yn(f)||yn(p);return a[d][m]}),c=r&&Object.entries(r).reduce((d,f)=>{let[p,m]=f;return m===void 0||(d[p]=m),d},{}),u=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,f)=>{let x=f,{class:p,className:m}=x,h=O(x,["class","className"]);return Object.entries(h).every(v=>{let[y,g]=v;return Array.isArray(g)?g.includes(T(T({},o),c)[y]):T(T({},o),c)[y]===g})?[...d,p,m]:d},[]);return wn(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},ve=(e,t)=>{const r=Zi(e,t);return(s=>{const a=r(s);return w(a)})};class Ae{static create(t,r="ease-in-out"){const s={fast:{value:"150ms",ms:150,tailwind:"duration-150"},base:{value:"200ms",ms:200,tailwind:"duration-200"},slow:{value:"300ms",ms:300,tailwind:"duration-300"},slower:{value:"500ms",ms:500,tailwind:"duration-500"}},a={"ease-in":{value:"cubic-bezier(0.4, 0, 1, 1)",tailwind:"ease-in",description:"Slow start, fast end"},"ease-out":{value:"cubic-bezier(0, 0, 0.2, 1)",tailwind:"ease-out",description:"Fast start, slow end"},"ease-in-out":{value:"cubic-bezier(0.4, 0, 0.2, 1)",tailwind:"ease-in-out",description:"Slow start and end, fast middle"},spring:{value:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",tailwind:"ease-[cubic-bezier(0.68,-0.55,0.265,1.55)]",description:"Spring-like bounce effect"}};return{duration:s[t],easing:a[r]}}static createTransition(t,r="base",s="ease-in-out"){const a=this.create(r,s),o=Array.isArray(t)?t.join(", "):t,i=[a.duration.tailwind,a.easing.tailwind].join(" ");return{property:o,duration:a.duration.value,timingFunction:a.easing.value,tailwind:i}}}const el={fast:Ae.create("fast"),base:Ae.create("base"),slow:Ae.create("slow"),slower:Ae.create("slower"),colors:Ae.createTransition(["color","background-color","border-color"],"base"),opacity:Ae.createTransition("opacity","fast"),transform:Ae.createTransition("transform","base"),all:Ae.createTransition("all","base")};function tl(e,t){return Ae.create(e,t)}function be(e,t="ease-in-out"){const r=Ae.create(e,t);return`${r.duration.tailwind} ${r.easing.tailwind}`}function rl(e,t="base",r="ease-in-out"){return Ae.createTransition(e,t,r).tailwind}class Te{static create(t){return{base:{value:0,tailwind:"z-0",description:"Base layer for normal content"},dropdown:{value:1e3,tailwind:"z-[1000]",description:"Dropdown menus and select options"},sticky:{value:1020,tailwind:"z-[1020]",description:"Sticky headers and navigation"},fixed:{value:1030,tailwind:"z-[1030]",description:"Fixed position elements"},"modal-backdrop":{value:1040,tailwind:"z-[1040]",description:"Modal backdrop/overlay"},modal:{value:1050,tailwind:"z-[1050]",description:"Modal dialogs and drawers"},popover:{value:1060,tailwind:"z-[1060]",description:"Popovers and tooltips"},tooltip:{value:1070,tailwind:"z-[1070]",description:"Tooltips (highest priority)"},toast:{value:1080,tailwind:"z-[1080]",description:"Toast notifications (highest priority)"}}[t]}}const kn={base:Te.create("base"),dropdown:Te.create("dropdown"),sticky:Te.create("sticky"),fixed:Te.create("fixed"),"modal-backdrop":Te.create("modal-backdrop"),modal:Te.create("modal"),popover:Te.create("popover"),tooltip:Te.create("tooltip"),toast:Te.create("toast")};function sl(e){return Te.create(e)}function ue(e){return Te.create(e).tailwind}class xe{static create(t){const r=t/100,s={0:"Fully transparent",5:"Very light overlay",10:"Light overlay",20:"Subtle overlay",25:"Quarter opacity",30:"Light background",40:"Semi-transparent",50:"Half opacity",60:"Semi-opaque",70:"Mostly opaque",75:"Three-quarter opacity",80:"High opacity",90:"Very high opacity",95:"Nearly opaque",100:"Fully opaque"};return{value:t,decimal:r,tailwind:{0:"opacity-0",5:"opacity-5",10:"opacity-10",20:"opacity-20",25:"opacity-25",30:"opacity-30",40:"opacity-40",50:"opacity-50",60:"opacity-60",70:"opacity-70",75:"opacity-75",80:"opacity-80",90:"opacity-90",95:"opacity-95",100:"opacity-100"}[t],description:s[t]}}}xe.create(0),xe.create(5),xe.create(10),xe.create(20),xe.create(25),xe.create(30),xe.create(40),xe.create(50),xe.create(60),xe.create(70),xe.create(75),xe.create(80),xe.create(90),xe.create(95),xe.create(100);function nl(e){return xe.create(e)}function al(e){return xe.create(e).tailwind}var ar={exports:{}},Pt={};/**
1
+ "use strict";var Lo=Object.defineProperty,_o=Object.defineProperties;var Po=Object.getOwnPropertyDescriptors;var tr=Object.getOwnPropertySymbols;var fn=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable;var Br=(e,t,r)=>t in e?Lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))fn.call(t,r)&&Br(e,r,t[r]);if(tr)for(var r of tr(t))mn.call(t,r)&&Br(e,r,t[r]);return e},z=(e,t)=>_o(e,Po(t));var O=(e,t)=>{var r={};for(var s in e)fn.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&tr)for(var s of tr(e))t.indexOf(s)<0&&mn.call(e,s)&&(r[s]=e[s]);return r};var pn=(e,t,r)=>Br(e,typeof t!="symbol"?t+"":t,r);var rr=(e,t,r)=>new Promise((s,a)=>{var o=u=>{try{c(r.next(u))}catch(d){a(d)}},i=u=>{try{c(r.throw(u))}catch(d){a(d)}},c=u=>u.done?s(u.value):Promise.resolve(u.value).then(o,i);c((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),qe=require("react-dom"),Qe={icon:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},text:{xs:"text-xs",sm:"text-sm",base:"text-base"},spacing:{itemPaddingX:"px-4",itemPaddingY:"py-2",nestedIndent:"pl-6",nestedIndentLevel2:"pl-10",nestedIndentLevel3:"pl-14",groupTitlePadding:"px-4 py-2",iconMargin:"mr-3"},colors:{active:{bg:"bg-surface-brand-muted",text:"text-fg-brand-emphasis",border:"border-line-brand"},inactive:{text:"text-fg-secondary",hover:"hover:bg-surface-hover hover:text-fg-primary"},groupTitle:"text-fg-tertiary"},chevron:{size:"h-3 w-3",color:"text-fg-quaternary"},navigation:{width:{default:"56px",compact:"48px",expanded:"200px"},background:{default:"#fafafa",hover:"#f5f5f5"}},split:{transition:"transition-all duration-300",collapsedWidth:"0px"},content:{scrollbar:{width:"thin",color:{thumb:"#cbd5e1",track:"#f1f5f9"}}}};function zo(e){return e<=0?Qe.spacing.itemPaddingX:e===1?Qe.spacing.nestedIndent:e===2?Qe.spacing.nestedIndentLevel2:e===3?Qe.spacing.nestedIndentLevel3:`pl-${4+e*4}`}class he{static create(t){const r=t*this.BASE_UNIT,s=r/16;return{value:r,rem:`${s}rem`,px:`${r}px`,tailwind:this.getTailwindClass(t)}}static getTailwindClass(t){return{0:"0",.5:"0.5",1:"1",1.5:"1.5",2:"2",2.5:"2.5",3:"3",3.5:"3.5",4:"4",5:"5",6:"6",8:"8",10:"10",12:"12",16:"16",20:"20",24:"24",32:"32",40:"40",48:"48",64:"64",80:"80",96:"96"}[t]||String(t)}}pn(he,"BASE_UNIT",4);const xr={none:he.create(0),"0.5":he.create(.5),xs:he.create(1),"1.5":he.create(1.5),sm:he.create(2),"2.5":he.create(2.5),md:he.create(3),"3.5":he.create(3.5),base:he.create(4),lg:he.create(6),xl:he.create(8),"2xl":he.create(10),"3xl":he.create(12),"4xl":he.create(16),"5xl":he.create(20),"6xl":he.create(24)};function Oo(e){return xr[e]}function E(e,t="p"){const s=xr[e].tailwind;return`${{p:"p",m:"m",px:"px",mx:"mx",py:"py",my:"my",pt:"pt",mt:"mt",pr:"pr",mr:"mr",pb:"pb",mb:"mb",pl:"pl",ml:"ml",gap:"gap","gap-x":"gap-x","gap-y":"gap-y","space-y":"space-y"}[t]}-${s}`}class me{static createFontSize(t){const s={"2xs":{px:10,tailwind:"text-2xs"},xs:{px:12,tailwind:"text-xs"},sm:{px:14,tailwind:"text-sm"},base:{px:16,tailwind:"text-base"},lg:{px:18,tailwind:"text-lg"},xl:{px:20,tailwind:"text-xl"},"2xl":{px:24,tailwind:"text-2xl"},"3xl":{px:30,tailwind:"text-3xl"},"4xl":{px:36,tailwind:"text-4xl"},"5xl":{px:48,tailwind:"text-5xl"},"6xl":{px:60,tailwind:"text-6xl"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind}}static createLineHeight(t){const s={none:{value:1,tailwind:"leading-none"},tight:{value:1.25,tailwind:"leading-tight"},snug:{value:1.375,tailwind:"leading-snug"},normal:{value:1.5,tailwind:"leading-normal"},relaxed:{value:1.625,tailwind:"leading-relaxed"},loose:{value:2,tailwind:"leading-loose"}}[t];return{value:s.value,tailwind:s.tailwind}}static createFontWeight(t){const s={light:{value:300,tailwind:"font-light"},normal:{value:400,tailwind:"font-normal"},medium:{value:500,tailwind:"font-medium"},semibold:{value:600,tailwind:"font-semibold"},bold:{value:700,tailwind:"font-bold"}}[t];return{value:s.value,tailwind:s.tailwind}}static create(t,r="normal",s="normal"){return{fontSize:this.createFontSize(t),lineHeight:this.createLineHeight(r),fontWeight:this.createFontWeight(s)}}}const Vo={sans:{name:"sans",stack:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',tailwind:"font-sans"},serif:{name:"serif",stack:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',tailwind:"font-serif"},mono:{name:"mono",stack:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',tailwind:"font-mono"}},Wo={light:me.createFontWeight("light"),normal:me.createFontWeight("normal"),medium:me.createFontWeight("medium"),semibold:me.createFontWeight("semibold"),bold:me.createFontWeight("bold")},gt={h1:me.create("4xl","tight","bold"),h2:me.create("3xl","tight","bold"),h3:me.create("2xl","snug","semibold"),h4:me.create("xl","snug","semibold"),h5:me.create("lg","normal","medium"),h6:me.create("base","normal","medium"),body:me.create("base","relaxed","normal"),bodySmall:me.create("sm","relaxed","normal"),bodyLarge:me.create("lg","relaxed","normal"),label:me.create("sm","normal","medium"),caption:me.create("xs","normal","normal"),button:me.create("base","normal","medium")};function Ho(e){return gt[e]}function ce(e){const t=gt[e];return`${t.fontSize.tailwind} ${t.lineHeight.tailwind} ${t.fontWeight.tailwind}`}function re(e){return gt[e].fontSize.tailwind}function ye(e){return me.createFontSize(e).tailwind}function Pe(e){return gt[e].fontWeight.tailwind}function Mt(e){return me.createFontWeight(e).tailwind}function Uo(e){return gt[e].lineHeight.tailwind}const Bo=[50,100,200,300,400,500,600,700,800,900,950];function C(e,t,r){const s=qo(e),a=Go(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function qo(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)}, ${parseInt(t[2],16)}, ${parseInt(t[3],16)}`:"0, 0, 0"}function Go(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return"0, 0%, 0%";const r=parseInt(t[1],16)/255,s=parseInt(t[2],16)/255,a=parseInt(t[3],16)/255,o=Math.max(r,s,a),i=Math.min(r,s,a);let c=0,u=0;const d=(o+i)/2;if(o!==i){const f=o-i;switch(u=d>.5?f/(2-o-i):f/(o+i),o){case r:c=((s-a)/f+(s<a?6:0))/6;break;case s:c=((a-r)/f+2)/6;break;case a:c=((r-s)/f+4)/6;break}}return`${Math.round(c*360)}, ${Math.round(u*100)}%, ${Math.round(d*100)}%`}const Ze={50:C("#eef2ff","indigo",50),100:C("#e0e7ff","indigo",100),200:C("#c7d2fe","indigo",200),300:C("#a5b4fc","indigo",300),400:C("#818cf8","indigo",400),500:C("#6366f1","indigo",500),600:C("#4f46e5","indigo",600),700:C("#4338ca","indigo",700),800:C("#3730a3","indigo",800),900:C("#312e81","indigo",900),950:C("#1e1b4b","indigo",950)},et={50:C("#f5f3ff","violet",50),100:C("#ede9fe","violet",100),200:C("#ddd6fe","violet",200),300:C("#c4b5fd","violet",300),400:C("#a78bfa","violet",400),500:C("#8b5cf6","violet",500),600:C("#7c3aed","violet",600),700:C("#6d28d9","violet",700),800:C("#5b21b6","violet",800),900:C("#4c1d95","violet",900),950:C("#2e1065","violet",950)},tt={50:C("#ecfeff","cyan",50),100:C("#cffafe","cyan",100),200:C("#a5f3fc","cyan",200),300:C("#67e8f9","cyan",300),400:C("#22d3ee","cyan",400),500:C("#06b6d4","cyan",500),600:C("#0891b2","cyan",600),700:C("#0e7490","cyan",700),800:C("#155e75","cyan",800),900:C("#164e63","cyan",900),950:C("#083344","cyan",950)},rt={50:C("#f8fafc","slate",50),100:C("#f1f5f9","slate",100),200:C("#e2e8f0","slate",200),300:C("#cbd5e1","slate",300),400:C("#94a3b8","slate",400),500:C("#64748b","slate",500),600:C("#475569","slate",600),700:C("#334155","slate",700),800:C("#1e293b","slate",800),900:C("#0f172a","slate",900),950:C("#020617","slate",950)},Dn={50:C("#f9fafb","gray",50),100:C("#f3f4f6","gray",100),200:C("#e5e7eb","gray",200),300:C("#d1d5db","gray",300),400:C("#9ca3af","gray",400),500:C("#6b7280","gray",500),600:C("#4b5563","gray",600),700:C("#374151","gray",700),800:C("#1f2937","gray",800),900:C("#111827","gray",900),950:C("#030712","gray",950)},st={50:C("#ecfdf5","emerald",50),100:C("#d1fae5","emerald",100),200:C("#a7f3d0","emerald",200),300:C("#6ee7b7","emerald",300),400:C("#34d399","emerald",400),500:C("#10b981","emerald",500),600:C("#059669","emerald",600),700:C("#047857","emerald",700),800:C("#065f46","emerald",800),900:C("#064e3b","emerald",900),950:C("#022c22","emerald",950)},Fn={50:C("#f0fdf4","green",50),100:C("#dcfce7","green",100),200:C("#bbf7d0","green",200),300:C("#86efac","green",300),400:C("#4ade80","green",400),500:C("#22c55e","green",500),600:C("#16a34a","green",600),700:C("#15803d","green",700),800:C("#166534","green",800),900:C("#14532d","green",900),950:C("#052e16","green",950)},nt={50:C("#fffbeb","amber",50),100:C("#fef3c7","amber",100),200:C("#fde68a","amber",200),300:C("#fcd34d","amber",300),400:C("#fbbf24","amber",400),500:C("#f59e0b","amber",500),600:C("#d97706","amber",600),700:C("#b45309","amber",700),800:C("#92400e","amber",800),900:C("#78350f","amber",900),950:C("#451a03","amber",950)},Ln={50:C("#fefce8","yellow",50),100:C("#fef9c3","yellow",100),200:C("#fef08a","yellow",200),300:C("#fde047","yellow",300),400:C("#facc15","yellow",400),500:C("#eab308","yellow",500),600:C("#ca8a04","yellow",600),700:C("#a16207","yellow",700),800:C("#854d0e","yellow",800),900:C("#713f12","yellow",900),950:C("#422006","yellow",950)},_n={50:C("#fff7ed","orange",50),100:C("#ffedd5","orange",100),200:C("#fed7aa","orange",200),300:C("#fdba74","orange",300),400:C("#fb923c","orange",400),500:C("#f97316","orange",500),600:C("#ea580c","orange",600),700:C("#c2410c","orange",700),800:C("#9a3412","orange",800),900:C("#7c2d12","orange",900),950:C("#431407","orange",950)},at={50:C("#fff1f2","rose",50),100:C("#ffe4e6","rose",100),200:C("#fecdd3","rose",200),300:C("#fda4af","rose",300),400:C("#fb7185","rose",400),500:C("#f43f5e","rose",500),600:C("#e11d48","rose",600),700:C("#be123c","rose",700),800:C("#9f1239","rose",800),900:C("#881337","rose",900),950:C("#4c0519","rose",950)},Pn={50:C("#fef2f2","red",50),100:C("#fee2e2","red",100),200:C("#fecaca","red",200),300:C("#fca5a5","red",300),400:C("#f87171","red",400),500:C("#ef4444","red",500),600:C("#dc2626","red",600),700:C("#b91c1c","red",700),800:C("#991b1b","red",800),900:C("#7f1d1d","red",900),950:C("#450a0a","red",950)},ot={50:C("#f0f9ff","sky",50),100:C("#e0f2fe","sky",100),200:C("#bae6fd","sky",200),300:C("#7dd3fc","sky",300),400:C("#38bdf8","sky",400),500:C("#0ea5e9","sky",500),600:C("#0284c7","sky",600),700:C("#0369a1","sky",700),800:C("#075985","sky",800),900:C("#0c4a6e","sky",900),950:C("#082f49","sky",950)},zn={50:C("#eff6ff","blue",50),100:C("#dbeafe","blue",100),200:C("#bfdbfe","blue",200),300:C("#93c5fd","blue",300),400:C("#60a5fa","blue",400),500:C("#3b82f6","blue",500),600:C("#2563eb","blue",600),700:C("#1d4ed8","blue",700),800:C("#1e40af","blue",800),900:C("#1e3a8a","blue",900),950:C("#172554","blue",950)},On={50:C("#fdf4ff","fuchsia",50),100:C("#fae8ff","fuchsia",100),200:C("#f5d0fe","fuchsia",200),300:C("#f0abfc","fuchsia",300),400:C("#e879f9","fuchsia",400),500:C("#d946ef","fuchsia",500),600:C("#c026d3","fuchsia",600),700:C("#a21caf","fuchsia",700),800:C("#86198f","fuchsia",800),900:C("#701a75","fuchsia",900),950:C("#4a044e","fuchsia",950)},Vn={50:C("#fdf2f8","pink",50),100:C("#fce7f3","pink",100),200:C("#fbcfe8","pink",200),300:C("#f9a8d4","pink",300),400:C("#f472b6","pink",400),500:C("#ec4899","pink",500),600:C("#db2777","pink",600),700:C("#be185d","pink",700),800:C("#9d174d","pink",800),900:C("#831843","pink",900),950:C("#500724","pink",950)},Wn={50:C("#faf5ff","purple",50),100:C("#f3e8ff","purple",100),200:C("#e9d5ff","purple",200),300:C("#d8b4fe","purple",300),400:C("#c084fc","purple",400),500:C("#a855f7","purple",500),600:C("#9333ea","purple",600),700:C("#7e22ce","purple",700),800:C("#6b21a8","purple",800),900:C("#581c87","purple",900),950:C("#3b0764","purple",950)},Hn={50:C("#f0fdfa","teal",50),100:C("#ccfbf1","teal",100),200:C("#99f6e4","teal",200),300:C("#5eead4","teal",300),400:C("#2dd4bf","teal",400),500:C("#14b8a6","teal",500),600:C("#0d9488","teal",600),700:C("#0f766e","teal",700),800:C("#115e59","teal",800),900:C("#134e4a","teal",900),950:C("#042f2e","teal",950)},Un={50:C("#f7fee7","lime",50),100:C("#ecfccb","lime",100),200:C("#d9f99d","lime",200),300:C("#bef264","lime",300),400:C("#a3e635","lime",400),500:C("#84cc16","lime",500),600:C("#65a30d","lime",600),700:C("#4d7c0f","lime",700),800:C("#3f6212","lime",800),900:C("#365314","lime",900),950:C("#1a2e05","lime",950)},ds={indigo:Ze,violet:et,cyan:tt,slate:rt,gray:Dn,emerald:st,green:Fn,amber:nt,yellow:Ln,orange:_n,rose:at,red:Pn,sky:ot,blue:zn,fuchsia:On,pink:Vn,purple:Wn,teal:Hn,lime:Un};function Rt(e,t){return ds[e][t]}function Ko(e){return ds[e]}const qt={primary:{light:Ze[400],DEFAULT:Ze[500],dark:Ze[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:et[400],DEFAULT:et[500],dark:et[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:tt[400],DEFAULT:tt[500],dark:tt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},success:{light:st[400],DEFAULT:st[500],dark:st[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},warning:{light:nt[400],DEFAULT:nt[500],dark:nt[600],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:at[400],DEFAULT:at[500],dark:at[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:ot[400],DEFAULT:ot[500],dark:ot[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:rt[100],DEFAULT:rt[500],dark:rt[700],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},vr={primary:{light:Ze[500],DEFAULT:Ze[400],dark:Ze[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:et[500],DEFAULT:et[400],dark:et[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:tt[500],DEFAULT:tt[400],dark:tt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},success:{light:st[500],DEFAULT:st[400],dark:st[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},warning:{light:nt[500],DEFAULT:nt[400],dark:nt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:at[500],DEFAULT:at[400],dark:at[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:ot[500],DEFAULT:ot[400],dark:ot[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:rt[700],DEFAULT:rt[400],dark:rt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},Yo=qt;function Ht(e,t="DEFAULT",r="light"){return(r==="dark"?vr:qt)[e][t]}function Xo(e,t="light"){return(t==="dark"?vr:qt)[e]}function Jo(e,t,r={}){const{format:s="hex",opacity:a}=r,o=Rt(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Qo(e,t="DEFAULT",r={}){const{format:s="hex",opacity:a}=r,o=Ht(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Zo(e,t,r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Rt(e,t),d=[`${s}-${c.tailwind}`];return a&&d.push(`hover:${s}-${c.tailwind}`),o&&d.push(`focus:${s}-${c.tailwind}`),i&&d.push(`active:${s}-${c.tailwind}`),d.join(" ")}function ei(e,t="DEFAULT",r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Ht(e,t),d=[`${s}-${c.tailwind}`];if(a){const f=Ht(e,t==="DEFAULT"?"dark":"DEFAULT");d.push(`hover:${s}-${f.tailwind}`)}if(o&&d.push(`focus:${s}-${c.tailwind}`),i){const f=Ht(e,"dark");d.push(`active:${s}-${f.tailwind}`)}return d.join(" ")}function ti(e,t,r="bg"){const s=Rt(e,t);return`hover:${r}-${s.tailwind}`}function ri(e,t,r="border"){const s=Rt(e,t);return`focus:${r}-${s.tailwind}`}function si(e,t){return`focus:ring-${Rt(e,t).tailwind}`}function ni(e,t){return`rgba(${e.rgb}, ${t})`}function Bn(e){const t=rs(e);return t?.299*t[0]+.587*t[1]+.114*t[2]>128:!0}function ai(e){return Bn(e)?"#000000":"#ffffff"}function rs(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null}function us(e,t,r=.5){const s=rs(e),a=rs(t);if(!s||!a)return e;const o=Math.round(s[0]*(1-r)+a[0]*r),i=Math.round(s[1]*(1-r)+a[1]*r),c=Math.round(s[2]*(1-r)+a[2]*r);return`#${((1<<24)+(o<<16)+(i<<8)+c).toString(16).slice(1)}`}function oi(e,t){return us(e,"#ffffff",t/100)}function ii(e,t){return us(e,"#000000",t/100)}const li={primary:{name:"indigo",light:400,default:500,dark:600},secondary:{name:"violet",light:400,default:500,dark:600},accent:{name:"cyan",light:400,default:500,dark:600}};class Ct{static create(t){const s={sm:{minWidth:640,tailwind:"sm"},md:{minWidth:768,tailwind:"md"},lg:{minWidth:1024,tailwind:"lg"},xl:{minWidth:1280,tailwind:"xl"},"2xl":{minWidth:1536,tailwind:"2xl"}}[t];return{name:t,minWidth:s.minWidth,px:`${s.minWidth}px`,rem:`${s.minWidth/16}rem`,tailwind:s.tailwind}}}const yr={sm:Ct.create("sm"),md:Ct.create("md"),lg:Ct.create("lg"),xl:Ct.create("xl"),"2xl":Ct.create("2xl")};function ci(e){return yr[e]}function di(e,t="min"){const r=yr[e];return`@media (${t==="min"?"min-width":"max-width"}: ${r.px})`}function qn(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=qn(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Gn(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=qn(e))&&(s&&(s+=" "),s+=t);return s}const ui=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},fi=(e,t)=>({classGroupId:e,validator:t}),Kn=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),cr="-",hn=[],mi="arbitrary..",pi=e=>{const t=bi(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return hi(i);const c=i.split(cr),u=c[0]===""&&c.length>1?1:0;return Yn(c,u,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const u=s[i],d=r[i];return u?d?ui(d,u):u:d||hn}return r[i]||hn}}},Yn=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const d=Yn(e,t+1,o);if(d)return d}const i=r.validators;if(i===null)return;const c=t===0?e.join(cr):e.slice(t).join(cr),u=i.length;for(let d=0;d<u;d++){const f=i[d];if(f.validator(c))return f.classGroupId}},hi=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?mi+s:void 0})(),bi=e=>{const{theme:t,classGroups:r}=e;return gi(r,t)},gi=(e,t)=>{const r=Kn();for(const s in e){const a=e[s];fs(a,r,s,t)}return r},fs=(e,t,r,s)=>{const a=e.length;for(let o=0;o<a;o++){const i=e[o];xi(i,t,r,s)}},xi=(e,t,r,s)=>{if(typeof e=="string"){vi(e,t,r);return}if(typeof e=="function"){yi(e,t,r,s);return}wi(e,t,r,s)},vi=(e,t,r)=>{const s=e===""?t:Xn(t,e);s.classGroupId=r},yi=(e,t,r,s)=>{if(ki(e)){fs(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(fi(r,e))},wi=(e,t,r,s)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[c,u]=a[i];fs(u,Xn(t,c),r,s)}},Xn=(e,t)=>{let r=e;const s=t.split(cr),a=s.length;for(let o=0;o<a;o++){const i=s[o];let c=r.nextPart.get(i);c||(c=Kn(),r.nextPart.set(i,c)),r=c}return r},ki=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ji=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const a=(o,i)=>{r[o]=i,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(o){let i=r[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return a(o,i),i},set(o,i){o in r?r[o]=i:a(o,i)}}},ss="!",bn=":",Ni=[],gn=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),Si=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=a=>{const o=[];let i=0,c=0,u=0,d;const f=a.length;for(let v=0;v<f;v++){const y=a[v];if(i===0&&c===0){if(y===bn){o.push(a.slice(u,v)),u=v+1;continue}if(y==="/"){d=v;continue}}y==="["?i++:y==="]"?i--:y==="("?c++:y===")"&&c--}const p=o.length===0?a:a.slice(u);let m=p,h=!1;p.endsWith(ss)?(m=p.slice(0,-1),h=!0):p.startsWith(ss)&&(m=p.slice(1),h=!0);const x=d&&d>u?d-u:void 0;return gn(o,h,m,x)};if(t){const a=t+bn,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):gn(Ni,!1,i,void 0,!0)}if(r){const a=s;s=o=>r({className:o,parseClassName:a})}return s},Ci=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let a=[];for(let o=0;o<r.length;o++){const i=r[o],c=i[0]==="[",u=t.has(i);c||u?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},$i=e=>T({cache:ji(e.cacheSize),parseClassName:Si(e),sortModifiers:Ci(e)},pi(e)),Ei=/\s+/,Mi=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o}=t,i=[],c=e.trim().split(Ei);let u="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{isExternal:p,modifiers:m,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:v}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let y=!!v,b=s(y?x.substring(0,v):x);if(!b){if(!y){u=f+(u.length>0?" "+u:u);continue}if(b=s(x),!b){u=f+(u.length>0?" "+u:u);continue}y=!1}const j=m.length===0?"":m.length===1?m[0]:o(m).join(":"),$=h?j+ss:j,g=$+b;if(i.indexOf(g)>-1)continue;i.push(g);const k=a(b,y);for(let N=0;N<k.length;++N){const L=k[N];i.push($+L)}u=f+(u.length>0?" "+u:u)}return u},Ti=(...e)=>{let t=0,r,s,a="";for(;t<e.length;)(r=e[t++])&&(s=Jn(r))&&(a&&(a+=" "),a+=s);return a},Jn=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=Jn(e[s]))&&(r&&(r+=" "),r+=t);return r},Ai=(e,...t)=>{let r,s,a,o;const i=u=>{const d=t.reduce((f,p)=>p(f),e());return r=$i(d),s=r.cache.get,a=r.cache.set,o=c,c(u)},c=u=>{const d=s(u);if(d)return d;const f=Mi(u,r);return a(u,f),f};return o=i,(...u)=>o(Ti(...u))},Ri=[],pe=e=>{const t=r=>r[e]||Ri;return t.isThemeGetter=!0,t},Qn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Zn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ii=/^\d+\/\d+$/,Di=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Li=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_i=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jt=e=>Ii.test(e),te=e=>!!e&&!Number.isNaN(Number(e)),Ke=e=>!!e&&Number.isInteger(Number(e)),qr=e=>e.endsWith("%")&&te(e.slice(0,-1)),We=e=>Di.test(e),zi=()=>!0,Oi=e=>Fi.test(e)&&!Li.test(e),ea=()=>!1,Vi=e=>_i.test(e),Wi=e=>Pi.test(e),Hi=e=>!B(e)&&!q(e),Ui=e=>It(e,sa,ea),B=e=>Qn.test(e),ft=e=>It(e,na,Oi),Gr=e=>It(e,Yi,te),xn=e=>It(e,ta,ea),Bi=e=>It(e,ra,Wi),sr=e=>It(e,aa,Vi),q=e=>Zn.test(e),_t=e=>Dt(e,na),qi=e=>Dt(e,Xi),vn=e=>Dt(e,ta),Gi=e=>Dt(e,sa),Ki=e=>Dt(e,ra),nr=e=>Dt(e,aa,!0),It=(e,t,r)=>{const s=Qn.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},Dt=(e,t,r=!1)=>{const s=Zn.exec(e);return s?s[1]?t(s[1]):r:!1},ta=e=>e==="position"||e==="percentage",ra=e=>e==="image"||e==="url",sa=e=>e==="length"||e==="size"||e==="bg-size",na=e=>e==="length",Yi=e=>e==="number",Xi=e=>e==="family-name",aa=e=>e==="shadow",Ji=()=>{const e=pe("color"),t=pe("font"),r=pe("text"),s=pe("font-weight"),a=pe("tracking"),o=pe("leading"),i=pe("breakpoint"),c=pe("container"),u=pe("spacing"),d=pe("radius"),f=pe("shadow"),p=pe("inset-shadow"),m=pe("text-shadow"),h=pe("drop-shadow"),x=pe("blur"),v=pe("perspective"),y=pe("aspect"),b=pe("ease"),j=pe("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],g=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...g(),q,B],N=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],S=()=>[q,B,u],D=()=>[jt,"full","auto",...S()],R=()=>[Ke,"none","subgrid",q,B],M=()=>["auto",{span:["full",Ke,q,B]},Ke,q,B],F=()=>[Ke,"auto",q,B],I=()=>["auto","min","max","fr",q,B],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...S()],H=()=>[jt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],U=()=>[e,q,B],oe=()=>[...g(),vn,xn,{position:[q,B]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",Gi,Ui,{size:[q,B]}],G=()=>[qr,_t,ft],Y=()=>["","none","full",d,q,B],Q=()=>["",te,_t,ft],le=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>[te,qr,vn,xn],V=()=>["","none",x,q,B],X=()=>["none",te,q,B],ae=()=>["none",te,q,B],fe=()=>[te,q,B],ke=()=>[jt,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[We],breakpoint:[We],color:[zi],container:[We],"drop-shadow":[We],ease:["in","out","in-out"],font:[Hi],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[We],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[We],shadow:[We],spacing:["px",te],text:[We],"text-shadow":[We],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",jt,B,q,y]}],container:["container"],columns:[{columns:[te,B,q,c]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Ke,"auto",q,B]}],basis:[{basis:[jt,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[te,jt,"auto","initial","none",B]}],grow:[{grow:["",te,q,B]}],shrink:[{shrink:["",te,q,B]}],order:[{order:[Ke,"first","last","none",q,B]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[c,"screen",...H()]}],"min-w":[{"min-w":[c,"screen","none",...H()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",r,_t,ft]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,q,Gr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qr,B]}],"font-family":[{font:[qi,B,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,q,B]}],"line-clamp":[{"line-clamp":[te,"none",q,Gr]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",q,B]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",q,B]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[te,"from-font","auto",q,ft]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[te,"auto",q,B]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",q,B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",q,B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ke,q,B],radial:["",q,B],conic:[Ke,q,B]},Ki,Bi]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[te,q,B]}],"outline-w":[{outline:["",te,_t,ft]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",f,nr,sr]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",p,nr,sr]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[te,ft]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",m,nr,sr]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[te,q,B]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[te]}],"mask-image-linear-from-pos":[{"mask-linear-from":_()}],"mask-image-linear-to-pos":[{"mask-linear-to":_()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":_()}],"mask-image-t-to-pos":[{"mask-t-to":_()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":_()}],"mask-image-r-to-pos":[{"mask-r-to":_()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":_()}],"mask-image-b-to-pos":[{"mask-b-to":_()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":_()}],"mask-image-l-to-pos":[{"mask-l-to":_()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":_()}],"mask-image-x-to-pos":[{"mask-x-to":_()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":_()}],"mask-image-y-to-pos":[{"mask-y-to":_()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[q,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":_()}],"mask-image-radial-to-pos":[{"mask-radial-to":_()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":g()}],"mask-image-conic-pos":[{"mask-conic":[te]}],"mask-image-conic-from-pos":[{"mask-conic-from":_()}],"mask-image-conic-to-pos":[{"mask-conic-to":_()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",q,B]}],filter:[{filter:["","none",q,B]}],blur:[{blur:V()}],brightness:[{brightness:[te,q,B]}],contrast:[{contrast:[te,q,B]}],"drop-shadow":[{"drop-shadow":["","none",h,nr,sr]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",te,q,B]}],"hue-rotate":[{"hue-rotate":[te,q,B]}],invert:[{invert:["",te,q,B]}],saturate:[{saturate:[te,q,B]}],sepia:[{sepia:["",te,q,B]}],"backdrop-filter":[{"backdrop-filter":["","none",q,B]}],"backdrop-blur":[{"backdrop-blur":V()}],"backdrop-brightness":[{"backdrop-brightness":[te,q,B]}],"backdrop-contrast":[{"backdrop-contrast":[te,q,B]}],"backdrop-grayscale":[{"backdrop-grayscale":["",te,q,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[te,q,B]}],"backdrop-invert":[{"backdrop-invert":["",te,q,B]}],"backdrop-opacity":[{"backdrop-opacity":[te,q,B]}],"backdrop-saturate":[{"backdrop-saturate":[te,q,B]}],"backdrop-sepia":[{"backdrop-sepia":["",te,q,B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",q,B]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[te,"initial",q,B]}],ease:[{ease:["linear","initial",b,q,B]}],delay:[{delay:[te,q,B]}],animate:[{animate:["none",j,q,B]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,q,B]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[q,B,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",q,B]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",q,B]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[te,_t,ft,Gr]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Qi=Ai(Ji);function w(...e){return Qi(Gn(e))}const yn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wn=Gn,Zi=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return wn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(d=>{const f=r==null?void 0:r[d],p=o==null?void 0:o[d];if(f===null)return null;const m=yn(f)||yn(p);return a[d][m]}),c=r&&Object.entries(r).reduce((d,f)=>{let[p,m]=f;return m===void 0||(d[p]=m),d},{}),u=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,f)=>{let x=f,{class:p,className:m}=x,h=O(x,["class","className"]);return Object.entries(h).every(v=>{let[y,b]=v;return Array.isArray(b)?b.includes(T(T({},o),c)[y]):T(T({},o),c)[y]===b})?[...d,p,m]:d},[]);return wn(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},ve=(e,t)=>{const r=Zi(e,t);return(s=>{const a=r(s);return w(a)})};class Ae{static create(t,r="ease-in-out"){const s={fast:{value:"150ms",ms:150,tailwind:"duration-150"},base:{value:"200ms",ms:200,tailwind:"duration-200"},slow:{value:"300ms",ms:300,tailwind:"duration-300"},slower:{value:"500ms",ms:500,tailwind:"duration-500"}},a={"ease-in":{value:"cubic-bezier(0.4, 0, 1, 1)",tailwind:"ease-in",description:"Slow start, fast end"},"ease-out":{value:"cubic-bezier(0, 0, 0.2, 1)",tailwind:"ease-out",description:"Fast start, slow end"},"ease-in-out":{value:"cubic-bezier(0.4, 0, 0.2, 1)",tailwind:"ease-in-out",description:"Slow start and end, fast middle"},spring:{value:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",tailwind:"ease-[cubic-bezier(0.68,-0.55,0.265,1.55)]",description:"Spring-like bounce effect"}};return{duration:s[t],easing:a[r]}}static createTransition(t,r="base",s="ease-in-out"){const a=this.create(r,s),o=Array.isArray(t)?t.join(", "):t,i=[a.duration.tailwind,a.easing.tailwind].join(" ");return{property:o,duration:a.duration.value,timingFunction:a.easing.value,tailwind:i}}}const el={fast:Ae.create("fast"),base:Ae.create("base"),slow:Ae.create("slow"),slower:Ae.create("slower"),colors:Ae.createTransition(["color","background-color","border-color"],"base"),opacity:Ae.createTransition("opacity","fast"),transform:Ae.createTransition("transform","base"),all:Ae.createTransition("all","base")};function tl(e,t){return Ae.create(e,t)}function be(e,t="ease-in-out"){const r=Ae.create(e,t);return`${r.duration.tailwind} ${r.easing.tailwind}`}function rl(e,t="base",r="ease-in-out"){return Ae.createTransition(e,t,r).tailwind}class Te{static create(t){return{base:{value:0,tailwind:"z-0",description:"Base layer for normal content"},dropdown:{value:1e3,tailwind:"z-[1000]",description:"Dropdown menus and select options"},sticky:{value:1020,tailwind:"z-[1020]",description:"Sticky headers and navigation"},fixed:{value:1030,tailwind:"z-[1030]",description:"Fixed position elements"},"modal-backdrop":{value:1040,tailwind:"z-[1040]",description:"Modal backdrop/overlay"},modal:{value:1050,tailwind:"z-[1050]",description:"Modal dialogs and drawers"},popover:{value:1060,tailwind:"z-[1060]",description:"Popovers and tooltips"},tooltip:{value:1070,tailwind:"z-[1070]",description:"Tooltips (highest priority)"},toast:{value:1080,tailwind:"z-[1080]",description:"Toast notifications (highest priority)"}}[t]}}const kn={base:Te.create("base"),dropdown:Te.create("dropdown"),sticky:Te.create("sticky"),fixed:Te.create("fixed"),"modal-backdrop":Te.create("modal-backdrop"),modal:Te.create("modal"),popover:Te.create("popover"),tooltip:Te.create("tooltip"),toast:Te.create("toast")};function sl(e){return Te.create(e)}function ue(e){return Te.create(e).tailwind}class xe{static create(t){const r=t/100,s={0:"Fully transparent",5:"Very light overlay",10:"Light overlay",20:"Subtle overlay",25:"Quarter opacity",30:"Light background",40:"Semi-transparent",50:"Half opacity",60:"Semi-opaque",70:"Mostly opaque",75:"Three-quarter opacity",80:"High opacity",90:"Very high opacity",95:"Nearly opaque",100:"Fully opaque"};return{value:t,decimal:r,tailwind:{0:"opacity-0",5:"opacity-5",10:"opacity-10",20:"opacity-20",25:"opacity-25",30:"opacity-30",40:"opacity-40",50:"opacity-50",60:"opacity-60",70:"opacity-70",75:"opacity-75",80:"opacity-80",90:"opacity-90",95:"opacity-95",100:"opacity-100"}[t],description:s[t]}}}xe.create(0),xe.create(5),xe.create(10),xe.create(20),xe.create(25),xe.create(30),xe.create(40),xe.create(50),xe.create(60),xe.create(70),xe.create(75),xe.create(80),xe.create(90),xe.create(95),xe.create(100);function nl(e){return xe.create(e)}function al(e){return xe.create(e).tailwind}var ar={exports:{}},Pt={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -14,12 +14,12 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Nn;function il(){return Nn||(Nn=1,process.env.NODE_ENV!=="production"&&(function(){function e(F){if(F==null)return null;if(typeof F=="function")return F.$$typeof===R?null:F.displayName||F.name||null;if(typeof F=="string")return F;switch(F){case y:return"Fragment";case j:return"Profiler";case g:return"StrictMode";case N:return"Suspense";case _:return"SuspenseList";case L:return"Activity"}if(typeof F=="object")switch(typeof F.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),F.$$typeof){case v:return"Portal";case b:return F.displayName||"Context";case C:return(F._context.displayName||"Context")+".Consumer";case k:var B=F.render;return F=F.displayName,F||(F=B.displayName||B.name||"",F=F!==""?"ForwardRef("+F+")":"ForwardRef"),F;case S:return B=F.displayName||null,B!==null?B:e(F.type)||"Memo";case M:B=F._payload,F=F._init;try{return e(F(B))}catch(K){}}return null}function t(F){return""+F}function r(F){try{var B=!1}catch(le){B=!0}if(B){B=console;var K=B.error,Q=typeof Symbol=="function"&&Symbol.toStringTag&&F[Symbol.toStringTag]||F.constructor.name||"Object";return K.call(B,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Q),t(F)}}function s(F){if(F===y)return"<>";if(typeof F=="object"&&F!==null&&F.$$typeof===M)return"<...>";try{var B=e(F);return B?"<"+B+">":"<...>"}catch(K){return"<...>"}}function a(){var F=D.A;return F===null?null:F.getOwner()}function o(){return Error("react-stack-top-frame")}function i(F){if(I.call(F,"key")){var B=Object.getOwnPropertyDescriptor(F,"key").get;if(B&&B.isReactWarning)return!1}return F.key!==void 0}function c(F,B){function K(){Y||(Y=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",B))}K.isReactWarning=!0,Object.defineProperty(F,"key",{get:K,configurable:!0})}function u(){var F=e(this.type);return H[F]||(H[F]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),F=this.props.ref,F!==void 0?F:null}function d(F,B,K,Q,le,se){var z=K.ref;return F={$$typeof:x,type:F,key:B,props:K,_owner:Q},(z!==void 0?z:null)!==null?Object.defineProperty(F,"ref",{enumerable:!1,get:u}):Object.defineProperty(F,"ref",{enumerable:!1,value:null}),F._store={},Object.defineProperty(F._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(F,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(F,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.defineProperty(F,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(F.props),Object.freeze(F)),F}function f(F,B,K,Q,le,se){var z=B.children;if(z!==void 0)if(Q)if(A(z)){for(Q=0;Q<z.length;Q++)p(z[Q]);Object.freeze&&Object.freeze(z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(z);if(I.call(B,"key")){z=e(F);var U=Object.keys(B).filter(function(ae){return ae!=="key"});Q=0<U.length?"{key: someKey, "+U.join(": ..., ")+": ...}":"{key: someKey}",ne[z+Q]||(U=0<U.length?"{"+U.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Nn;function il(){return Nn||(Nn=1,process.env.NODE_ENV!=="production"&&(function(){function e(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===M?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case y:return"Fragment";case j:return"Profiler";case b:return"StrictMode";case N:return"Suspense";case L:return"SuspenseList";case R:return"Activity"}if(typeof P=="object")switch(typeof P.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case v:return"Portal";case g:return P.displayName||"Context";case $:return(P._context.displayName||"Context")+".Consumer";case k:var G=P.render;return P=P.displayName,P||(P=G.displayName||G.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case S:return G=P.displayName||null,G!==null?G:e(P.type)||"Memo";case D:G=P._payload,P=P._init;try{return e(P(G))}catch(Y){}}return null}function t(P){return""+P}function r(P){try{var G=!1}catch(le){G=!0}if(G){G=console;var Y=G.error,Q=typeof Symbol=="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return Y.call(G,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Q),t(P)}}function s(P){if(P===y)return"<>";if(typeof P=="object"&&P!==null&&P.$$typeof===D)return"<...>";try{var G=e(P);return G?"<"+G+">":"<...>"}catch(Y){return"<...>"}}function a(){var P=F.A;return P===null?null:P.getOwner()}function o(){return Error("react-stack-top-frame")}function i(P){if(I.call(P,"key")){var G=Object.getOwnPropertyDescriptor(P,"key").get;if(G&&G.isReactWarning)return!1}return P.key!==void 0}function c(P,G){function Y(){K||(K=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",G))}Y.isReactWarning=!0,Object.defineProperty(P,"key",{get:Y,configurable:!0})}function u(){var P=e(this.type);return H[P]||(H[P]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),P=this.props.ref,P!==void 0?P:null}function d(P,G,Y,Q,le,se){var _=Y.ref;return P={$$typeof:x,type:P,key:G,props:Y,_owner:Q},(_!==void 0?_:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:u}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function f(P,G,Y,Q,le,se){var _=G.children;if(_!==void 0)if(Q)if(A(_)){for(Q=0;Q<_.length;Q++)p(_[Q]);Object.freeze&&Object.freeze(_)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(_);if(I.call(G,"key")){_=e(P);var V=Object.keys(G).filter(function(ae){return ae!=="key"});Q=0<V.length?"{key: someKey, "+V.join(": ..., ")+": ...}":"{key: someKey}",ne[_+Q]||(V=0<V.length?"{"+V.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,Q,z,U,z),ne[z+Q]=!0)}if(z=null,K!==void 0&&(r(K),z=""+K),i(B)&&(r(B.key),z=""+B.key),"key"in B){K={};for(var X in B)X!=="key"&&(K[X]=B[X])}else K=B;return z&&c(K,typeof F=="function"?F.displayName||F.name||"Unknown":F),d(F,z,K,a(),le,se)}function p(F){m(F)?F._store&&(F._store.validated=1):typeof F=="object"&&F!==null&&F.$$typeof===M&&(F._payload.status==="fulfilled"?m(F._payload.value)&&F._payload.value._store&&(F._payload.value._store.validated=1):F._store&&(F._store.validated=1))}function m(F){return typeof F=="object"&&F!==null&&F.$$typeof===x}var h=l,x=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),b=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),R=Symbol.for("react.client.reference"),D=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,A=Array.isArray,V=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(F){return F()}};var Y,H={},W=h.react_stack_bottom_frame.bind(h,o)(),ie=V(s(o)),ne={};zt.Fragment=y,zt.jsx=function(F,B,K){var Q=1e4>D.recentlyCreatedOwnerStacks++;return f(F,B,K,!1,Q?Error("react-stack-top-frame"):W,Q?V(s(F)):ie)},zt.jsxs=function(F,B,K){var Q=1e4>D.recentlyCreatedOwnerStacks++;return f(F,B,K,!0,Q?Error("react-stack-top-frame"):W,Q?V(s(F)):ie)}})()),zt}var Sn;function ll(){return Sn||(Sn=1,process.env.NODE_ENV==="production"?ar.exports=ol():ar.exports=il()),ar.exports}var n=ll();const oa=l.createContext(void 0);function ia({children:e,defaultTheme:t="light",storageKey:r="theme"}){const[s,a]=l.useState(()=>{if(typeof window=="undefined")return t;try{const d=localStorage.getItem(r);if(d==="light"||d==="dark")return d}catch(d){console.warn("Failed to read theme from localStorage:",d)}return t});l.useEffect(()=>{if(typeof window!="undefined"){try{localStorage.setItem(r,s)}catch(d){console.warn("Failed to save theme to localStorage:",d)}typeof document!="undefined"&&(document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(s))}},[s,r]);const u={theme:s,toggleTheme:()=>{a(d=>d==="light"?"dark":"light")},setTheme:d=>{a(d)},colors:s==="light"?qt:vr,isDark:s==="dark"};return n.jsx(oa.Provider,{value:u,children:e})}function cl(){const e=l.useContext(oa);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}const dl={breakpoints:yr,spacing:xr,typography:gt,animations:el,features:{reducedMotion:!1,highContrast:!1,debug:!1},behavior:{defaultAnimationDuration:200,defaultTransitionDuration:150,focusVisible:!0}},la=l.createContext(void 0);function ca({children:e,config:t,strategy:r="default"}){const s=l.useMemo(()=>{const d=T({},dl);return t?P(T(T({},d),t),{breakpoints:t.breakpoints||d.breakpoints,spacing:t.spacing||d.spacing,typography:t.typography||d.typography,animations:t.animations||d.animations,features:T(T({},d.features),t.features),behavior:T(T({},d.behavior),t.behavior)}):d},[t]);l.useEffect(()=>{typeof document!="undefined"&&(s.features.reducedMotion?document.documentElement.style.setProperty("--motion-reduce","1"):document.documentElement.style.removeProperty("--motion-reduce"))},[s.features.reducedMotion]),l.useEffect(()=>{typeof document!="undefined"&&(s.features.highContrast?document.documentElement.classList.add("high-contrast"):document.documentElement.classList.remove("high-contrast"))},[s.features.highContrast]);const a=l.useMemo(()=>d=>s.spacing[d],[s.spacing]),o=l.useMemo(()=>d=>s.breakpoints[d],[s.breakpoints]),i=l.useMemo(()=>d=>{var f;return(f=s.features[d])!=null?f:!1},[s.features]),c=l.useMemo(()=>d=>{console.warn("ConfigProvider: updateConfig called but config is immutable. Consider using state management for dynamic updates.")},[]),u={config:s,getSpacing:a,getBreakpoint:o,isFeatureEnabled:i,updateConfig:c};return n.jsx(la.Provider,{value:u,children:e})}function ul(){const e=l.useContext(la);if(e===void 0)throw new Error("useConfig must be used within a ConfigProvider");return e}const wr=l.createContext(void 0);function ms(){const e=l.useContext(wr);if(!e)throw new Error("Toast components must be used within a ToastProvider");return e}function fl(){return l.useContext(wr)}function da({children:e,defaultDuration:t=5e3,maxToasts:r=5}){const[s,a]=l.useState([]),o=l.useCallback(d=>{var m;const f=`toast-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,p=P(T({},d),{id:f,duration:(m=d.duration)!=null?m:t});return a(h=>[p,...h].slice(0,r)),f},[t,r]),i=l.useCallback(d=>{a(f=>f.filter(p=>p.id!==d))},[]),c=l.useCallback(()=>{a([])},[]),u={toasts:s,addToast:o,removeToast:i,clearAll:c};return n.jsx(wr.Provider,{value:u,children:e})}const kr=l.createContext(void 0);function Lt(){const e=l.useContext(kr);if(!e)throw new Error("Dialog components must be used within a Dialog component");return e}function ml(){return l.useContext(kr)}function ps({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,titleId:a,descriptionId:o}){const[i,c]=l.useState(r),u=l.useRef(null),d=t!==void 0?t:i,f=m=>{t===void 0&&c(m),s==null||s(m)};l.useEffect(()=>{if(d)u.current=document.activeElement;else{const m=setTimeout(()=>{var h;(h=u.current)==null||h.focus()},0);return()=>clearTimeout(m)}},[d]),l.useEffect(()=>(d?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[d]);const p={isOpen:d,onOpenChange:f,onClose:()=>f(!1),titleId:a,descriptionId:o};return n.jsx(kr.Provider,{value:p,children:e})}const pl={ThemeProvider:ia,ConfigProvider:ca,ToastProvider:da,DialogProvider:ps},or=pl;function hl(e,t){const{theme:r,config:s,toast:a,dialog:o,providers:i={theme:!0,config:!0,toast:!0,dialog:!0}}=t||{};let c=e;return i.dialog&&(c=n.jsx(or.DialogProvider,P(T({},o),{children:c}))),i.toast&&(c=n.jsx(or.ToastProvider,P(T({},a),{children:c}))),i.config&&(c=n.jsx(or.ConfigProvider,P(T({},s),{children:c}))),i.theme&&(c=n.jsx(or.ThemeProvider,P(T({},r),{children:c}))),c}function bl({children:e,config:t}){const r=l.useMemo(()=>hl(e,t),[e,t]);return n.jsx(n.Fragment,{children:r})}function gl(){return{}}class Ye{static create(t){const s={none:{px:0,tailwind:"rounded-none",description:"No border radius"},sm:{px:2,tailwind:"rounded-sm",description:"Small radius (2px) for subtle rounding"},md:{px:6,tailwind:"rounded-md",description:"Medium radius (6px) for buttons and inputs"},lg:{px:8,tailwind:"rounded-lg",description:"Large radius (8px) for cards and containers"},xl:{px:12,tailwind:"rounded-xl",description:"Extra large radius (12px) for prominent elements"},"2xl":{px:16,tailwind:"rounded-2xl",description:"2X large radius (16px) for large containers"},"3xl":{px:24,tailwind:"rounded-3xl",description:"3X large radius (24px) for very large containers"},full:{px:9999,tailwind:"rounded-full",description:"Full radius for circular elements"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind,description:s.description}}}const xl={none:Ye.create("none"),sm:Ye.create("sm"),md:Ye.create("md"),lg:Ye.create("lg"),xl:Ye.create("xl"),"2xl":Ye.create("2xl"),"3xl":Ye.create("3xl"),full:Ye.create("full")};function J(e){return xl[e].tailwind}function vl(s){var a=s,{variant:e="info",className:t}=a,r=O(a,["variant","className"]);const o={warning:w("bg-warning-bg","text-warning-dark","border-warning"),error:w("bg-error-bg","text-error-dark","border-error"),info:w("bg-info-bg","text-info-dark","border-info")};return n.jsx("div",T({role:"alert",className:w("border",E("base","px"),E("sm","py"),J("lg"),o[e],t)},r))}const yl={primary:{light:"text-indigo-400",DEFAULT:"text-fg-brand",dark:"text-indigo-600",contrast:"text-fg-inverse"},secondary:{light:"text-pink-300",DEFAULT:"text-fg-brand-secondary",dark:"text-pink-600",contrast:"text-fg-inverse"},success:{light:"text-green-300",DEFAULT:"text-fg-success",dark:"text-success-dark",contrast:"text-fg-inverse"},warning:{light:"text-yellow-300",DEFAULT:"text-fg-warning",dark:"text-warning-dark",contrast:"text-fg-inverse"},error:{light:"text-red-300",DEFAULT:"text-fg-error",dark:"text-error-dark",contrast:"text-fg-inverse"},info:{light:"text-blue-300",DEFAULT:"text-fg-info",dark:"text-info-dark",contrast:"text-fg-inverse"},neutral:{light:"text-fg-tertiary",DEFAULT:"text-fg-secondary",dark:"text-fg-primary",contrast:"text-fg-inverse"}};function wl(f,d){var p=f,{variant:e="paragraph",bold:t,italic:r,className:s,as:a,color:o,colorRole:i="neutral",colorShade:c="dark"}=p,u=O(p,["variant","bold","italic","className","as","color","colorRole","colorShade"]);const m=[];let h;if(a)h=a;else switch(e){case"heading":h="h2";break;case"list":h="li";break;case"paragraph":default:h="p";break}return e==="heading"?m.push(ce("h2")):e==="body"||e==="paragraph"?m.push(ce("body")):e==="bodySmall"?m.push(ce("bodySmall")):e==="bodyLarge"?m.push(ce("bodyLarge")):e==="caption"?m.push(ce("caption")):e==="label"?m.push(ce("label")):m.push(ce("body")),t&&m.push("font-bold"),r&&m.push("italic"),m.push(yl[i][c]),n.jsx(h,T({ref:d,className:w(...m,s)},u))}const Ue=l.forwardRef(wl);/**
22
+ <%s key={someKey} {...props} />`,Q,_,V,_),ne[_+Q]=!0)}if(_=null,Y!==void 0&&(r(Y),_=""+Y),i(G)&&(r(G.key),_=""+G.key),"key"in G){Y={};for(var X in G)X!=="key"&&(Y[X]=G[X])}else Y=G;return _&&c(Y,typeof P=="function"?P.displayName||P.name||"Unknown":P),d(P,_,Y,a(),le,se)}function p(P){m(P)?P._store&&(P._store.validated=1):typeof P=="object"&&P!==null&&P.$$typeof===D&&(P._payload.status==="fulfilled"?m(P._payload.value)&&P._payload.value._store&&(P._payload.value._store.validated=1):P._store&&(P._store.validated=1))}function m(P){return typeof P=="object"&&P!==null&&P.$$typeof===x}var h=l,x=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),g=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),F=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,A=Array.isArray,W=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(P){return P()}};var K,H={},U=h.react_stack_bottom_frame.bind(h,o)(),oe=W(s(o)),ne={};zt.Fragment=y,zt.jsx=function(P,G,Y){var Q=1e4>F.recentlyCreatedOwnerStacks++;return f(P,G,Y,!1,Q?Error("react-stack-top-frame"):U,Q?W(s(P)):oe)},zt.jsxs=function(P,G,Y){var Q=1e4>F.recentlyCreatedOwnerStacks++;return f(P,G,Y,!0,Q?Error("react-stack-top-frame"):U,Q?W(s(P)):oe)}})()),zt}var Sn;function ll(){return Sn||(Sn=1,process.env.NODE_ENV==="production"?ar.exports=ol():ar.exports=il()),ar.exports}var n=ll();const oa=l.createContext(void 0);function ia({children:e,defaultTheme:t="light",storageKey:r="theme"}){const[s,a]=l.useState(()=>{if(typeof window=="undefined")return t;try{const d=localStorage.getItem(r);if(d==="light"||d==="dark")return d}catch(d){console.warn("Failed to read theme from localStorage:",d)}return t});l.useEffect(()=>{if(typeof window!="undefined"){try{localStorage.setItem(r,s)}catch(d){console.warn("Failed to save theme to localStorage:",d)}typeof document!="undefined"&&(document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(s))}},[s,r]);const u={theme:s,toggleTheme:()=>{a(d=>d==="light"?"dark":"light")},setTheme:d=>{a(d)},colors:s==="light"?qt:vr,isDark:s==="dark"};return n.jsx(oa.Provider,{value:u,children:e})}function cl(){const e=l.useContext(oa);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}const dl={breakpoints:yr,spacing:xr,typography:gt,animations:el,features:{reducedMotion:!1,highContrast:!1,debug:!1},behavior:{defaultAnimationDuration:200,defaultTransitionDuration:150,focusVisible:!0}},la=l.createContext(void 0);function ca({children:e,config:t,strategy:r="default"}){const s=l.useMemo(()=>{const d=T({},dl);return t?z(T(T({},d),t),{breakpoints:t.breakpoints||d.breakpoints,spacing:t.spacing||d.spacing,typography:t.typography||d.typography,animations:t.animations||d.animations,features:T(T({},d.features),t.features),behavior:T(T({},d.behavior),t.behavior)}):d},[t]);l.useEffect(()=>{typeof document!="undefined"&&(s.features.reducedMotion?document.documentElement.style.setProperty("--motion-reduce","1"):document.documentElement.style.removeProperty("--motion-reduce"))},[s.features.reducedMotion]),l.useEffect(()=>{typeof document!="undefined"&&(s.features.highContrast?document.documentElement.classList.add("high-contrast"):document.documentElement.classList.remove("high-contrast"))},[s.features.highContrast]);const a=l.useMemo(()=>d=>s.spacing[d],[s.spacing]),o=l.useMemo(()=>d=>s.breakpoints[d],[s.breakpoints]),i=l.useMemo(()=>d=>{var f;return(f=s.features[d])!=null?f:!1},[s.features]),c=l.useMemo(()=>d=>{console.warn("ConfigProvider: updateConfig called but config is immutable. Consider using state management for dynamic updates.")},[]),u={config:s,getSpacing:a,getBreakpoint:o,isFeatureEnabled:i,updateConfig:c};return n.jsx(la.Provider,{value:u,children:e})}function ul(){const e=l.useContext(la);if(e===void 0)throw new Error("useConfig must be used within a ConfigProvider");return e}const wr=l.createContext(void 0);function ms(){const e=l.useContext(wr);if(!e)throw new Error("Toast components must be used within a ToastProvider");return e}function fl(){return l.useContext(wr)}function da({children:e,defaultDuration:t=5e3,maxToasts:r=5}){const[s,a]=l.useState([]),o=l.useCallback(d=>{var m;const f=`toast-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,p=z(T({},d),{id:f,duration:(m=d.duration)!=null?m:t});return a(h=>[p,...h].slice(0,r)),f},[t,r]),i=l.useCallback(d=>{a(f=>f.filter(p=>p.id!==d))},[]),c=l.useCallback(()=>{a([])},[]),u={toasts:s,addToast:o,removeToast:i,clearAll:c};return n.jsx(wr.Provider,{value:u,children:e})}const kr=l.createContext(void 0);function Ft(){const e=l.useContext(kr);if(!e)throw new Error("Dialog components must be used within a Dialog component");return e}function ml(){return l.useContext(kr)}function ps({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,titleId:a,descriptionId:o}){const[i,c]=l.useState(r),u=l.useRef(null),d=t!==void 0?t:i,f=m=>{t===void 0&&c(m),s==null||s(m)};l.useEffect(()=>{if(d)u.current=document.activeElement;else{const m=setTimeout(()=>{var h;(h=u.current)==null||h.focus()},0);return()=>clearTimeout(m)}},[d]),l.useEffect(()=>(d?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[d]);const p={isOpen:d,onOpenChange:f,onClose:()=>f(!1),titleId:a,descriptionId:o};return n.jsx(kr.Provider,{value:p,children:e})}const pl={ThemeProvider:ia,ConfigProvider:ca,ToastProvider:da,DialogProvider:ps},or=pl;function hl(e,t){const{theme:r,config:s,toast:a,dialog:o,providers:i={theme:!0,config:!0,toast:!0,dialog:!0}}=t||{};let c=e;return i.dialog&&(c=n.jsx(or.DialogProvider,z(T({},o),{children:c}))),i.toast&&(c=n.jsx(or.ToastProvider,z(T({},a),{children:c}))),i.config&&(c=n.jsx(or.ConfigProvider,z(T({},s),{children:c}))),i.theme&&(c=n.jsx(or.ThemeProvider,z(T({},r),{children:c}))),c}function bl({children:e,config:t}){const r=l.useMemo(()=>hl(e,t),[e,t]);return n.jsx(n.Fragment,{children:r})}function gl(){return{}}class Ye{static create(t){const s={none:{px:0,tailwind:"rounded-none",description:"No border radius"},sm:{px:2,tailwind:"rounded-sm",description:"Small radius (2px) for subtle rounding"},md:{px:6,tailwind:"rounded-md",description:"Medium radius (6px) for buttons and inputs"},lg:{px:8,tailwind:"rounded-lg",description:"Large radius (8px) for cards and containers"},xl:{px:12,tailwind:"rounded-xl",description:"Extra large radius (12px) for prominent elements"},"2xl":{px:16,tailwind:"rounded-2xl",description:"2X large radius (16px) for large containers"},"3xl":{px:24,tailwind:"rounded-3xl",description:"3X large radius (24px) for very large containers"},full:{px:9999,tailwind:"rounded-full",description:"Full radius for circular elements"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind,description:s.description}}}const xl={none:Ye.create("none"),sm:Ye.create("sm"),md:Ye.create("md"),lg:Ye.create("lg"),xl:Ye.create("xl"),"2xl":Ye.create("2xl"),"3xl":Ye.create("3xl"),full:Ye.create("full")};function J(e){return xl[e].tailwind}function vl(s){var a=s,{variant:e="info",className:t}=a,r=O(a,["variant","className"]);const o={warning:w("bg-warning-bg","text-warning-dark","border-warning"),error:w("bg-error-bg","text-error-dark","border-error"),info:w("bg-info-bg","text-info-dark","border-info")};return n.jsx("div",T({role:"alert",className:w("border",E("base","px"),E("sm","py"),J("lg"),o[e],t)},r))}const yl={primary:{light:"text-indigo-400",DEFAULT:"text-fg-brand",dark:"text-indigo-600",contrast:"text-fg-inverse"},secondary:{light:"text-pink-300",DEFAULT:"text-fg-brand-secondary",dark:"text-pink-600",contrast:"text-fg-inverse"},success:{light:"text-green-300",DEFAULT:"text-fg-success",dark:"text-success-dark",contrast:"text-fg-inverse"},warning:{light:"text-yellow-300",DEFAULT:"text-fg-warning",dark:"text-warning-dark",contrast:"text-fg-inverse"},error:{light:"text-red-300",DEFAULT:"text-fg-error",dark:"text-error-dark",contrast:"text-fg-inverse"},info:{light:"text-blue-300",DEFAULT:"text-fg-info",dark:"text-info-dark",contrast:"text-fg-inverse"},neutral:{light:"text-fg-tertiary",DEFAULT:"text-fg-secondary",dark:"text-fg-primary",contrast:"text-fg-inverse"}};function wl(f,d){var p=f,{variant:e="paragraph",bold:t,italic:r,className:s,as:a,color:o,colorRole:i="neutral",colorShade:c="dark"}=p,u=O(p,["variant","bold","italic","className","as","color","colorRole","colorShade"]);const m=[];let h;if(a)h=a;else switch(e){case"heading":h="h2";break;case"list":h="li";break;case"paragraph":default:h="p";break}return e==="heading"?m.push(ce("h2")):e==="body"||e==="paragraph"?m.push(ce("body")):e==="bodySmall"?m.push(ce("bodySmall")):e==="bodyLarge"?m.push(ce("bodyLarge")):e==="caption"?m.push(ce("caption")):e==="label"?m.push(ce("label")):m.push(ce("body")),t&&m.push("font-bold"),r&&m.push("italic"),m.push(yl[i][c]),n.jsx(h,T({ref:d,className:w(...m,s)},u))}const Be=l.forwardRef(wl);/**
23
23
  * @license lucide-react v0.552.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
@@ -34,147 +34,147 @@ React keys must be passed directly to JSX without using spread:
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */const Cl=l.forwardRef((d,u)=>{var f=d,{color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:a="",children:o,iconNode:i}=f,c=O(f,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);return l.createElement("svg",T(T(P(T({ref:u},Sl),{width:t,height:t,stroke:e,strokeWidth:s?Number(r)*24/Number(t):r,className:ua("lucide",a)}),!o&&!Nl(c)&&{"aria-hidden":"true"}),c),[...i.map(([p,m])=>l.createElement(p,m)),...Array.isArray(o)?o:[o]])});/**
37
+ */const Cl=l.forwardRef((d,u)=>{var f=d,{color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:a="",children:o,iconNode:i}=f,c=O(f,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);return l.createElement("svg",T(T(z(T({ref:u},Sl),{width:t,height:t,stroke:e,strokeWidth:s?Number(r)*24/Number(t):r,className:ua("lucide",a)}),!o&&!Nl(c)&&{"aria-hidden":"true"}),c),[...i.map(([p,m])=>l.createElement(p,m)),...Array.isArray(o)?o:[o]])});/**
38
38
  * @license lucide-react v0.552.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const oe=(e,t)=>{const r=l.forwardRef((i,o)=>{var c=i,{className:s}=c,a=O(c,["className"]);return l.createElement(Cl,T({ref:o,iconNode:t,className:ua(`lucide-${kl(Cn(e))}`,`lucide-${e}`,s)},a))});return r.displayName=Cn(e),r};/**
42
+ */const ie=(e,t)=>{const r=l.forwardRef((i,o)=>{var c=i,{className:s}=c,a=O(c,["className"]);return l.createElement(Cl,T({ref:o,iconNode:t,className:ua(`lucide-${kl(Cn(e))}`,`lucide-${e}`,s)},a))});return r.displayName=Cn(e),r};/**
43
43
  * @license lucide-react v0.552.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const $l=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],El=oe("arrow-up-down",$l);/**
47
+ */const $l=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],El=ie("arrow-up-down",$l);/**
48
48
  * @license lucide-react v0.552.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const Ml=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Tl=oe("calendar",Ml);/**
52
+ */const Ml=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Tl=ie("calendar",Ml);/**
53
53
  * @license lucide-react v0.552.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const Al=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ns=oe("check",Al);/**
57
+ */const Al=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ns=ie("check",Al);/**
58
58
  * @license lucide-react v0.552.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const Rl=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hs=oe("chevron-down",Rl);/**
62
+ */const Rl=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hs=ie("chevron-down",Rl);/**
63
63
  * @license lucide-react v0.552.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const Il=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Bt=oe("chevron-left",Il);/**
67
+ */const Il=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ut=ie("chevron-left",Il);/**
68
68
  * @license lucide-react v0.552.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const Dl=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],bt=oe("chevron-right",Dl);/**
72
+ */const Dl=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],bt=ie("chevron-right",Dl);/**
73
73
  * @license lucide-react v0.552.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const Ll=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],bs=oe("circle-alert",Ll);/**
77
+ */const Fl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],bs=ie("circle-alert",Fl);/**
78
78
  * @license lucide-react v0.552.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const Fl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],dr=oe("circle-check",Fl);/**
82
+ */const Ll=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],dr=ie("circle-check",Ll);/**
83
83
  * @license lucide-react v0.552.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const _l=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Pl=oe("clock",_l);/**
87
+ */const _l=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Pl=ie("clock",_l);/**
88
88
  * @license lucide-react v0.552.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const zl=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],Ol=oe("command",zl);/**
92
+ */const zl=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],Ol=ie("command",zl);/**
93
93
  * @license lucide-react v0.552.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const Vl=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Wl=oe("download",Vl);/**
97
+ */const Vl=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Wl=ie("download",Vl);/**
98
98
  * @license lucide-react v0.552.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const Hl=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],Bl=oe("ellipsis-vertical",Hl);/**
102
+ */const Hl=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],Ul=ie("ellipsis-vertical",Hl);/**
103
103
  * @license lucide-react v0.552.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const Ul=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],ql=oe("eye-off",Ul);/**
107
+ */const Bl=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],ql=ie("eye-off",Bl);/**
108
108
  * @license lucide-react v0.552.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const Gl=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Kl=oe("eye",Gl);/**
112
+ */const Gl=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Kl=ie("eye",Gl);/**
113
113
  * @license lucide-react v0.552.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const Yl=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Xl=oe("file",Yl);/**
117
+ */const Yl=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Xl=ie("file",Yl);/**
118
118
  * @license lucide-react v0.552.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const Jl=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Ql=oe("funnel",Jl);/**
122
+ */const Jl=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Ql=ie("funnel",Jl);/**
123
123
  * @license lucide-react v0.552.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const Zl=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],ec=oe("grip-vertical",Zl);/**
127
+ */const Zl=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],ec=ie("grip-vertical",Zl);/**
128
128
  * @license lucide-react v0.552.0 - ISC
129
129
  *
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
- */const tc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],rc=oe("info",tc);/**
132
+ */const tc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],rc=ie("info",tc);/**
133
133
  * @license lucide-react v0.552.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
- */const sc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],fa=oe("loader-circle",sc);/**
137
+ */const sc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],fa=ie("loader-circle",sc);/**
138
138
  * @license lucide-react v0.552.0 - ISC
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const nc=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],ac=oe("menu",nc);/**
142
+ */const nc=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],ac=ie("menu",nc);/**
143
143
  * @license lucide-react v0.552.0 - ISC
144
144
  *
145
145
  * This source code is licensed under the ISC license.
146
146
  * See the LICENSE file in the root directory of this source tree.
147
- */const oc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],ic=oe("panel-left-close",oc);/**
147
+ */const oc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],ic=ie("panel-left-close",oc);/**
148
148
  * @license lucide-react v0.552.0 - ISC
149
149
  *
150
150
  * This source code is licensed under the ISC license.
151
151
  * See the LICENSE file in the root directory of this source tree.
152
- */const lc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],cc=oe("panel-left-open",lc);/**
152
+ */const lc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],cc=ie("panel-left-open",lc);/**
153
153
  * @license lucide-react v0.552.0 - ISC
154
154
  *
155
155
  * This source code is licensed under the ISC license.
156
156
  * See the LICENSE file in the root directory of this source tree.
157
- */const dc=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],as=oe("search",dc);/**
157
+ */const dc=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],as=ie("search",dc);/**
158
158
  * @license lucide-react v0.552.0 - ISC
159
159
  *
160
160
  * This source code is licensed under the ISC license.
161
161
  * See the LICENSE file in the root directory of this source tree.
162
- */const uc=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Nt=oe("star",uc);/**
162
+ */const uc=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Nt=ie("star",uc);/**
163
163
  * @license lucide-react v0.552.0 - ISC
164
164
  *
165
165
  * This source code is licensed under the ISC license.
166
166
  * See the LICENSE file in the root directory of this source tree.
167
- */const fc=[["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-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],mc=oe("triangle-alert",fc);/**
167
+ */const fc=[["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-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],mc=ie("triangle-alert",fc);/**
168
168
  * @license lucide-react v0.552.0 - ISC
169
169
  *
170
170
  * This source code is licensed under the ISC license.
171
171
  * See the LICENSE file in the root directory of this source tree.
172
- */const pc=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],hc=oe("upload",pc);/**
172
+ */const pc=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],hc=ie("upload",pc);/**
173
173
  * @license lucide-react v0.552.0 - ISC
174
174
  *
175
175
  * This source code is licensed under the ISC license.
176
176
  * See the LICENSE file in the root directory of this source tree.
177
- */const bc=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ne=oe("x",bc),gc=ve("motion-safe:animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-8 w-8"},variant:{primary:"text-fg-brand",secondary:"text-fg-brand-secondary",neutral:"text-fg-secondary"}},defaultVariants:{size:"md",variant:"primary"}}),gs=l.memo(function(i){var c=i,{size:t="md",variant:r="primary",label:s,className:a=""}=c,o=O(c,["size","variant","label","className"]);return n.jsxs("div",P(T({className:w("inline-flex","items-center",a),role:"status","aria-label":s||"Loading","aria-live":"polite"},o),{children:[n.jsx(fa,{className:w(gc({size:t,variant:r})),"aria-hidden":"true"}),s&&n.jsx("span",{className:w(E("sm","ml"),re("bodySmall"),"text-fg-secondary","sr-only"),children:s})]}))});gs.displayName="Spinner";const xc=ve(w("inline-flex","items-center","justify-center",ce("button").split(" ")[2]||"font-medium",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{primary:w("bg-surface-brand-strong","text-fg-inverse","hover:opacity-90","focus:ring-line-brand"),secondary:w("bg-surface-secondary","text-fg-inverse","hover:opacity-90","focus:ring-line-secondary"),error:w("bg-error","text-fg-inverse","hover:opacity-90","focus:ring-error"),outline:w("border-2","border-line-default","bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),ghost:w("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),iconOnly:w("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus","p-0")},size:{sm:w(E("md","px"),E("1.5","py"),re("bodySmall"),E("1.5","gap")),md:w(E("base","px"),E("sm","py"),re("body"),E("sm","gap")),lg:w(E("lg","px"),E("md","py"),re("bodyLarge"),E("2.5","gap"))}},compoundVariants:[{variant:"iconOnly",size:"sm",class:w("h-8","w-8","p-0")},{variant:"iconOnly",size:"md",class:w("h-10","w-10","p-0")},{variant:"iconOnly",size:"lg",class:w("h-12","w-12","p-0")}],defaultVariants:{variant:"primary",size:"md"}});function $n({children:e,position:t}){return e?n.jsx("span",{className:`inline-flex items-center ${t==="left"?"mr-0":"ml-0"}`,children:e}):null}const Z=l.memo(l.forwardRef(function(y,v){var g=y,{variant:t="primary",size:r="md",isLoading:s=!1,loadingText:a,loadingIcon:o,leftIcon:i,rightIcon:c,fullWidth:u=!1,as:d="button",className:f="",disabled:p=!1,children:m,"aria-label":h}=g,x=O(g,["variant","size","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","as","className","disabled","children","aria-label"]);const j=l.useMemo(()=>w(xc({variant:t,size:r}),u&&"w-full",f),[t,r,u,f]),C=l.useMemo(()=>t==="iconOnly"||!m&&(i||c),[t,m,i,c]),b=l.useMemo(()=>C&&!h&&!m?"Button":h,[C,h,m]),k=l.useMemo(()=>t==="error"?"primary":t==="primary"||t==="secondary"?"neutral":"primary",[t]),N=l.useMemo(()=>r==="sm"?"sm":r==="lg"?"lg":"md",[r]),_=l.useMemo(()=>o||n.jsx(gs,{size:N,variant:k}),[o,N,k]),S=d==="button"&&!x.type?"button":void 0,M=T(T({className:j,disabled:p||s,"aria-busy":s,"aria-label":b,"aria-disabled":p||s},S?{type:S}:{}),x);return n.jsx(d,P(T({ref:v},M),{children:s?n.jsxs(n.Fragment,{children:[_,a&&n.jsx("span",{className:"ml-2",children:a}),!a&&m&&n.jsx("span",{className:"ml-2 opacity-0",children:m})]}):n.jsxs(n.Fragment,{children:[i&&n.jsx($n,{position:"left",children:i}),m,c&&n.jsx($n,{position:"right",children:c})]})}))}));Z.displayName="Button";const vc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>w(E("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),Se=l.memo(l.forwardRef(function(C,j){var b=C,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,size:i="md",variant:c="outlined",leftIcon:u,rightIcon:d,showClearButton:f=!1,onClear:p,className:m="",disabled:h=!1,type:x="text",value:v,onChange:y}=b,g=O(b,["id","label","error","success","helperText","size","variant","leftIcon","rightIcon","showClearButton","onClear","className","disabled","type","value","onChange"]);const k=l.useMemo(()=>t||`input-${Math.random().toString(36).substr(2,9)}`,[t]),N=l.useMemo(()=>s?`${k}-error`:void 0,[s,k]),_=l.useMemo(()=>o?`${k}-helper`:void 0,[o,k]),[S,M]=l.useState(!1),L=l.useMemo(()=>x==="password",[x]),R=l.useMemo(()=>L&&S?"text":x,[L,S,x]),D=l.useMemo(()=>s?"error":a?"success":"default",[s,a]),I=l.useMemo(()=>v!=null&&v!=="",[v]),A=l.useMemo(()=>f&&I&&!h,[f,I,h]),V=l.useMemo(()=>"focus:border-line-focus",[]),Y=l.useMemo(()=>"focus:border-error",[]),H=l.useMemo(()=>"focus:border-success",[]),W=l.useMemo(()=>V.replace("focus:border-","focus:ring-"),[V]),ie=l.useCallback(z=>z==="error"?Y.replace("focus:border-","focus:ring-"):H.replace("focus:border-","focus:ring-"),[Y,H]),ne=ve(w("w-full",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{default:w("border-0","border-b-2","border-line-default","focus:border-line-focus"),outlined:w("border","border-line-default","focus:border-line-focus"),filled:w("bg-surface-muted","border-0","focus:bg-surface-base","focus:ring-2",W)},size:{sm:w("h-8",re("bodySmall"),E("md","px")),md:w("h-10",re("body"),E("base","px")),lg:w("h-12",re("bodyLarge"),E("lg","px"))},state:{default:"",error:w("border-error","focus:border-error",ie("error")),success:w("border-success","focus:border-success",ie("success"))}},defaultVariants:{variant:"outlined",size:"md",state:"default"}}),F=l.useMemo(()=>w(ne({variant:c,size:i,state:D}),u&&(i==="sm"?"pl-9":i==="lg"?"pl-12":"pl-10"),(d||A||L)&&(i==="sm"?"pr-9":i==="lg"?"pr-12":"pr-10"),m),[c,i,D,u,d,A,L,m]),B=l.useMemo(()=>w("block",ce("label"),E("xs","mb"),h&&"opacity-50"),[h]),K=l.useMemo(()=>i==="sm"?"h-4 w-4":i==="lg"?"h-5 w-5":"h-4 w-4",[i]),Q=l.useMemo(()=>i==="sm"?"top-2":i==="lg"?"top-3.5":"top-2.5",[i]),le=l.useCallback(z=>{var U;if(z.stopPropagation(),p)p();else if(y){const X=(U=z.currentTarget.closest(".relative"))==null?void 0:U.querySelector("input");if(X){const ae={target:X,currentTarget:X,bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:2,isTrusted:!1,nativeEvent:new Event("change"),preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},timeStamp:Date.now()};Object.defineProperty(ae.target,"value",{value:"",writable:!0}),Object.defineProperty(ae.currentTarget,"value",{value:"",writable:!0}),y(ae)}}},[p,y]),se=l.useCallback(()=>{M(z=>!z)},[]);return n.jsxs("div",{className:"w-full",children:[r&&n.jsx("label",{htmlFor:k,className:B,children:r}),n.jsxs("div",{className:"relative",children:[u&&n.jsx("div",{className:`absolute left-3 ${Q} text-fg-secondary opacity-60 pointer-events-none`,children:n.jsx("div",{className:K,children:u})}),n.jsx("input",T({id:k,ref:j,type:R,className:F,disabled:h,value:v,onChange:y,"aria-invalid":s,"aria-required":g.required,"aria-describedby":N||_,suppressHydrationWarning:!0},g)),n.jsxs("div",{className:"absolute right-3 top-0 bottom-0 flex items-center gap-1",children:[A&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:le,className:"h-auto p-1","aria-label":"Clear input",children:n.jsx(Ne,{className:K})}),L&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:se,className:"h-auto p-1","aria-label":S?"Hide password":"Show password",children:S?n.jsx(ql,{className:K}):n.jsx(Kl,{className:K})}),d&&!A&&!L&&n.jsx("div",{className:`text-fg-secondary opacity-60 pointer-events-none ${K}`,children:d})]})]}),(s||a||o)&&n.jsx(vc,{error:s,success:a,helperText:o,errorId:N,helperId:_})]})}));Se.displayName="Input";function ma({href:e,active:t}){const r=l.useMemo(()=>t!==void 0?t:!1,[t]),s=l.useMemo(()=>{try{const a=typeof require!="undefined"?require("next/link"):null;return a==null?void 0:a.default}catch(a){return}},[]);return{isActive:r,NextLink:s}}const yc=ve(w("inline-flex","items-center","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","disabled:pointer-events-none","no-underline"),{variants:{variant:{default:w("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","focus:ring-line-brand"),underline:w("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","border-b-2","border-transparent","hover:border-current","focus:ring-line-brand"),background:w("text-fg-primary","hover:bg-surface-hover","rounded-md",J("md"),"focus:ring-line-brand")},size:{sm:w(E("sm","px"),E("xs","py"),re("bodySmall")),md:w(E("base","px"),E("sm","py"),re("body")),lg:w(E("lg","px"),E("md","py"),re("bodyLarge"))}},defaultVariants:{variant:"default",size:"md"},compoundVariants:[{variant:"underline",size:"sm",class:E("0.5","pb")},{variant:"underline",size:"md",class:E("xs","pb")},{variant:"underline",size:"lg",class:E("1.5","pb")},{variant:"background",size:"sm",class:E("xs","px")},{variant:"background",size:"md",class:E("sm","px")},{variant:"background",size:"lg",class:E("base","px")}]});function xs(m){var h=m,{href:e,children:t,active:r,disabled:s=!1,variant:a="default",size:o="md",as:i,className:c,"aria-label":u,onClick:d,onKeyDown:f}=h,p=O(h,["href","children","active","disabled","variant","size","as","className","aria-label","onClick","onKeyDown"]);const x=l.useMemo(()=>r!==void 0?r:!1,[r]),{NextLink:v}=ma({href:e,active:x}),y=i||v||"a",g=l.useMemo(()=>{if(!x)return"";switch(a){case"underline":return w("border-b-2","border-line-brand","text-fg-brand-emphasis");case"background":return w("bg-surface-brand-muted","text-fg-brand-emphasis");case"default":default:return w("text-fg-brand-emphasis","font-semibold")}},[x,a]),j=l.useCallback(k=>{if(s){k.preventDefault(),k.stopPropagation();return}d==null||d(k)},[s,d]),C=l.useCallback(k=>{if(s){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation());return}f==null||f(k)},[s,f]),b=l.useMemo(()=>{const k=T({className:w(yc({variant:a,size:o}),g,s&&"opacity-50 cursor-not-allowed pointer-events-none",c),"aria-current":x?"page":void 0,"aria-disabled":s?!0:void 0,"aria-label":u,tabIndex:s?-1:void 0,onClick:j,onKeyDown:C,"data-active":x,"data-disabled":s},p);return v&&!i?P(T({},k),{href:s?void 0:e}):P(T({},k),{href:s?void 0:e})},[a,o,g,s,c,x,u,j,C,e,v,i,p]);return n.jsx(y,P(T({},b),{children:t}))}const wc=ve(w("inline-flex","items-center","justify-center",Pe("label"),J("md"),"border"),{variants:{variant:{success:"",warning:"",error:"",info:"",neutral:"",primary:"",secondary:""},size:{sm:w(E("1.5","px"),E("0.5","py"),re("caption")),md:w(E("sm","px"),E("xs","py"),re("caption")),lg:w(E("sm","px"),E("xs","py"),re("bodySmall"))},style:{solid:"",outline:""}},compoundVariants:[{variant:"success",style:"solid",class:w("bg-success-bg","text-success-dark","border-success")},{variant:"warning",style:"solid",class:w("bg-warning-bg","text-warning-dark","border-warning")},{variant:"error",style:"solid",class:w("bg-error-bg","text-error-dark","border-error")},{variant:"info",style:"solid",class:w("bg-info-bg","text-info-dark","border-info")},{variant:"neutral",style:"solid",class:w("bg-surface-muted","text-fg-primary","border-line-default")},{variant:"primary",style:"solid",class:w("bg-surface-brand-subtle","text-fg-brand-emphasis","border-line-brand")},{variant:"secondary",style:"solid",class:w("bg-pink-300","text-fg-brand-secondary-emphasis","border-line-secondary")},{variant:"success",style:"outline",class:w("bg-transparent","border-success","text-fg-success")},{variant:"warning",style:"outline",class:w("bg-transparent","border-warning","text-fg-warning")},{variant:"error",style:"outline",class:w("bg-transparent","border-error","text-fg-error")},{variant:"info",style:"outline",class:w("bg-transparent","border-info","text-fg-info")},{variant:"neutral",style:"outline",class:w("bg-transparent","border-line-default","text-fg-secondary")},{variant:"primary",style:"outline",class:w("bg-transparent","border-line-brand","text-fg-brand")},{variant:"secondary",style:"outline",class:w("bg-transparent","border-line-secondary","text-fg-brand-secondary")}],defaultVariants:{variant:"neutral",size:"md",style:"solid"}}),pa=l.memo(l.forwardRef(function(d,u){var f=d,{variant:t="neutral",size:r="md",style:s="solid",className:a="",children:o,"aria-label":i}=f,c=O(f,["variant","size","style","className","children","aria-label"]);const p=l.useMemo(()=>w(wc({variant:t,size:r,style:s}),a),[t,r,s,a]),m=l.useMemo(()=>{if(i)return i;if(typeof o=="string")return o;if(typeof o=="object"&&o!==null&&"props"in o){const h=o.props;if(h!=null&&h.children&&typeof h.children=="string")return h.children}},[i,o]);return n.jsx("span",P(T({ref:u,role:"status","aria-label":m,className:p},c),{children:o}))}));pa.displayName="Badge";const kc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>w(E("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),jr=l.memo(l.forwardRef(function(x,h){var v=x,{options:t=[],optionGroups:r,placeholder:s,label:a,error:o=!1,success:i=!1,helperText:c,size:u="md",className:d="",disabled:f=!1,id:p}=v,m=O(v,["options","optionGroups","placeholder","label","error","success","helperText","size","className","disabled","id"]);const y=l.useMemo(()=>p||`select-${Math.random().toString(36).substr(2,9)}`,[p]),g=l.useMemo(()=>o?`${y}-error`:void 0,[o,y]),j=l.useMemo(()=>c?`${y}-helper`:void 0,[c,y]),C=l.useMemo(()=>"focus:border-line-focus",[]),b=l.useMemo(()=>"focus:border-error",[]),k=l.useMemo(()=>"focus:border-success",[]),N=l.useCallback(R=>R==="error"?b.replace("focus:border-","focus:ring-"):R==="success"?k.replace("focus:border-","focus:ring-"):C.replace("focus:border-","focus:ring-"),[b,k,C]),_=ve(w("block","w-full",J("md"),"border","bg-surface-base","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{size:{sm:w("h-8",re("bodySmall"),E("md","px")),md:w("h-10",re("body"),E("base","px")),lg:w("h-12",re("bodyLarge"),E("lg","px"))},state:{default:w("border-line-default",N()),error:w("border-error",N("error")),success:w("border-success",N("success"))}},defaultVariants:{size:"md",state:"default"}}),S=l.useMemo(()=>o?"error":i?"success":"default",[o,i]),M=l.useMemo(()=>w(_({size:u,state:S}),d),[u,S,d]),L=l.useMemo(()=>w("block",ce("label"),E("xs","mb"),f&&"opacity-50"),[f]);return n.jsxs("div",{className:"w-full",children:[a&&n.jsx("label",{htmlFor:y,className:L,children:a}),n.jsxs("select",P(T({id:y,ref:h,className:M,disabled:f,"aria-invalid":o,"aria-required":m.required,"aria-describedby":g||j},m),{children:[s&&n.jsx("option",{value:"",disabled:!0,children:s}),r&&r.length>0?r.map((R,D)=>n.jsx("optgroup",{label:R.label,children:(R.options||[]).map(I=>n.jsx("option",{value:I.value,disabled:I.disabled,children:I.label},I.value))},D)):(t||[]).map(R=>n.jsx("option",{value:R.value,disabled:R.disabled,children:R.label},R.value))]})),(o||i||c)&&n.jsx(kc,{error:o,success:i,helperText:c,errorId:g,helperId:j})]})}));jr.displayName="Select";const ha=l.memo(l.forwardRef(function(u,c){var d=u,{error:t=!1,resize:r="vertical",className:s="",label:a,id:o}=d,i=O(d,["error","resize","className","label","id"]);const f=l.useId(),p=o!=null?o:f,m=l.useMemo(()=>"focus:border-line-focus",[]),h=l.useMemo(()=>"focus:border-error",[]),x=l.useMemo(()=>t?h.replace("focus:border-","focus:ring-"):m.replace("focus:border-","focus:ring-"),[t,h,m]),v=l.useMemo(()=>({none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"}),[]),y=l.useMemo(()=>w("block","w-full",J("md"),E("base","px"),E("md","py"),"border",re("body"),"focus:outline-none","focus:ring-2","focus:ring-offset-2",v[r],w(t?"border-error":"border-line-default",x),s),[r,v,t,x,s]),g=l.useMemo(()=>t?`${p}-error`:void 0,[t,p]),j=i["aria-label"],C=i["aria-labelledby"];l.useEffect(()=>{process.env.NODE_ENV==="production"||a||j||C||typeof document!="undefined"&&document.querySelector(`label[for="${CSS.escape(p)}"]`)||console.warn("[Textarea] Missing accessible name. Provide a `label` prop, `aria-label`, `aria-labelledby`, or pair an external `<Label htmlFor={id}>` with the same `id`.")},[a,j,C,p]);const b=n.jsx("textarea",T({ref:c,id:p,className:y,"aria-invalid":t,"aria-describedby":g},i));return a?n.jsxs("div",{className:"block w-full",children:[n.jsx("label",{htmlFor:p,className:w("block","mb-1",re("label"),"font-medium","text-fg-primary"),children:a}),b]}):b}));ha.displayName="Textarea";const Tt=l.memo(l.forwardRef(function(i,o){var c=i,{variant:t="default",className:r="",children:s}=c,a=O(c,["variant","className","children"]);const u=l.useMemo(()=>w("block",re("label"),Pe("label"),"text-fg-primary"),[]),d=l.useMemo(()=>({default:"",required:w("after:content-['*']",`after:${E("0.5","ml")}`,"after:text-fg-error"),optional:w("after:content-['(optional)']","after:ml-1","after:text-fg-tertiary","after:font-normal")}),[]),f=l.useMemo(()=>w(u,d[t],r),[u,d,t,r]);return n.jsx("label",P(T({ref:o,className:f},a),{children:s}))}));Tt.displayName="Label";function ba(a){var o=a,{message:e,id:t,className:r=""}=o,s=O(o,["message","id","className"]);const i=[E("xs","mt"),re("bodySmall"),"text-fg-error","flex","items-center",E("xs","gap")],c=w(...i,r);return n.jsxs("div",P(T({role:"alert",id:t,className:c,"aria-live":"polite"},s),{children:[n.jsx(bs,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:e})]}))}class Le{static createWidth(t){const s={none:{px:0,tailwind:"border-0"},thin:{px:1,tailwind:"border"},base:{px:1,tailwind:"border"},medium:{px:2,tailwind:"border-2"},thick:{px:4,tailwind:"border-4"}}[t];return{value:s.px,px:`${s.px}px`,tailwind:s.tailwind}}static create(t,r="solid"){return{width:this.createWidth(t),style:r,description:`${t} ${r} border`}}}Le.create("none"),Le.create("thin"),Le.create("base"),Le.create("medium"),Le.create("thick"),Le.create("thin","dashed"),Le.create("base","dashed"),Le.create("thin","dotted"),Le.create("base","dotted");function jc(e){return Le.createWidth(e).tailwind}function Ut(u){var d=u,{content:e,children:t,position:r="top",delay:s=200,className:a="","aria-label":o,preservePositioning:i=!1}=d,c=O(d,["content","children","position","delay","className","aria-label","preservePositioning"]);const[f,p]=l.useState(!1),m=l.useRef(null),h=l.useRef(null),x=l.useRef(null),v=`tooltip-${Math.random().toString(36).substr(2,9)}`,y=()=>{const L=setTimeout(()=>{p(!0)},s);m.current=L},g=()=>{m.current&&(clearTimeout(m.current),m.current=null),p(!1)},j=()=>{p(!0)},C=()=>{p(!1)},b=L=>{var R;L.key==="Escape"&&(p(!1),(R=x.current)==null||R.blur())};l.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),l.useEffect(()=>{if(!f)return;const L=R=>{h.current&&!h.current.contains(R.target)&&x.current&&!x.current.contains(R.target)&&p(!1)};return document.addEventListener("mousedown",L),()=>{document.removeEventListener("mousedown",L)}},[f]);const k=L=>({top:"border-t-surface-inverse",bottom:"border-b-surface-inverse",left:"border-l-surface-inverse",right:"border-r-surface-inverse"})[L],N=ve(w("absolute",ue("tooltip"),E("sm","px"),E("xs","py"),re("caption"),"text-fg-inverse","bg-surface-inverse",J("md"),"shadow-lg","whitespace-nowrap"),{variants:{position:{top:w("bottom-full","left-1/2","transform","-translate-x-1/2",E("sm","mb")),bottom:w("top-full","left-1/2","transform","-translate-x-1/2",E("sm","mt")),left:w("right-full","top-1/2","transform","-translate-y-1/2",E("sm","mr")),right:w("left-full","top-1/2","transform","-translate-y-1/2",E("sm","ml"))}},defaultVariants:{position:"top"}}),_=ve(w("absolute","w-0","h-0",jc("thick"),"border-transparent"),{variants:{position:{top:w("top-full","left-1/2","transform","-translate-x-1/2",k("top")),bottom:w("bottom-full","left-1/2","transform","-translate-x-1/2",k("bottom")),left:w("left-full","top-1/2","transform","-translate-y-1/2",k("left")),right:w("right-full","top-1/2","transform","-translate-y-1/2",k("right"))}},defaultVariants:{position:"top"}}),S=l.isValidElement(t)?(()=>{const L=t,R=L.props,D=R.ref;return l.cloneElement(L,{ref:I=>{x.current=I,typeof D=="function"?D(I):D&&typeof D=="object"&&"current"in D&&(D.current=I)},"aria-describedby":f?v:R["aria-describedby"],onMouseEnter:I=>{var A;y(),(A=R.onMouseEnter)==null||A.call(R,I)},onMouseLeave:I=>{var A;g(),(A=R.onMouseLeave)==null||A.call(R,I)},onFocus:I=>{var A;j(),(A=R.onFocus)==null||A.call(R,I)},onBlur:I=>{var A;C(),(A=R.onBlur)==null||A.call(R,I)},onKeyDown:I=>{var A;b(I),(A=R.onKeyDown)==null||A.call(R,I)}})})():t,M=w(i?"static":"relative","inline-block",a);return n.jsxs("div",P(T({className:M},c),{children:[S,f&&n.jsxs("div",{ref:h,id:v,className:w(N({position:r})),role:"tooltip","aria-live":"polite",children:[e,n.jsx("div",{className:w(_({position:r})),"aria-hidden":"true"})]})]}))}function ga(c){var u=c,{variant:e="text",width:t,height:r,lines:s=1,className:a="","aria-label":o}=u,i=O(u,["variant","width","height","lines","className","aria-label"]);const d=["motion-safe:animate-pulse","bg-surface-muted",J("sm")],f={text:"h-4",card:"h-32",list:"h-12",circle:"rounded-full"},p=w(...d,f[e],a),m={};t&&(m.width=t),r&&(m.height=r);const h=o||`Loading ${e} content`;return e==="text"&&s>1?n.jsx("div",P(T({className:E("sm","space-y"),role:"status","aria-busy":"true","aria-label":h},i),{children:Array.from({length:s}).map((x,v)=>n.jsx("div",{className:p,style:v===s-1?{width:"75%"}:m,"aria-hidden":"true"},v))})):n.jsx("div",T({className:p,style:m,role:"status","aria-busy":"true","aria-label":h},i))}function Nc({defaultOpen:e=!0,open:t,onOpenChange:r,storageKey:s}){const a=l.useCallback(()=>{if(s&&typeof window!="undefined"){const f=localStorage.getItem(s);if(f!==null)return f==="true"}return e},[e,s]),[o,i]=l.useState(a),c=t!==void 0?t:o;l.useEffect(()=>{s&&typeof window!="undefined"&&t===void 0&&localStorage.setItem(s,String(o))},[o,s,t]);const u=l.useCallback(f=>{t===void 0&&i(f),r==null||r(f)},[t,r]),d=l.useCallback(()=>{u(!c)},[c,u]);return{isOpen:c,toggle:d,setOpen:u}}function xa(f){var p=f,{children:e,trigger:t,defaultOpen:r=!0,open:s,onOpenChange:a,disabled:o=!1,duration:i=200,storageKey:c,className:u=""}=p,d=O(p,["children","trigger","defaultOpen","open","onOpenChange","disabled","duration","storageKey","className"]);const{isOpen:m,toggle:h}=Nc({defaultOpen:r,open:s,onOpenChange:a,storageKey:c}),x=l.useRef(null),[v,y]=l.useState(m?"auto":0);l.useEffect(()=>{x.current&&y(m?x.current.scrollHeight:0)},[m,e]),l.useEffect(()=>{if(!m||!x.current)return;const j=new ResizeObserver(()=>{x.current&&m&&y(x.current.scrollHeight)});return j.observe(x.current),()=>{j.disconnect()}},[m]);const g=`collapsible-content-${Math.random().toString(36).substr(2,9)}`;return n.jsxs("div",P(T({className:u},d),{children:[n.jsx("button",{type:"button",onClick:h,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),o||h())},disabled:o,"aria-expanded":m,"aria-controls":g,"aria-disabled":o,className:w("w-full","text-left","focus:outline-none","focus:ring-2","focus:ring-line-brand","focus:ring-offset-2",J("md")),children:t}),n.jsx("div",{id:g,ref:x,style:{height:typeof v=="number"?`${v}px`:v,overflow:"hidden",transition:`height ${i}ms ease-in-out`},"aria-hidden":!m,children:n.jsx("div",{children:e})})]}))}const Nr=l.memo(l.forwardRef(function(f,d){var p=f,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1,indeterminate:c=!1}=p,u=O(p,["id","label","error","helperText","className","disabled","indeterminate"]);const m=l.useMemo(()=>t||`checkbox-${Math.random().toString(36).substr(2,9)}`,[t]),h=l.useMemo(()=>s?`${m}-error`:void 0,[s,m]),x=l.useMemo(()=>a?`${m}-helper`:void 0,[a,m]),v=l.useMemo(()=>"focus:border-line-focus",[]),y=l.useMemo(()=>"focus:border-error",[]),g=l.useMemo(()=>s?y.replace("focus:border-","focus:ring-"):v.replace("focus:border-","focus:ring-"),[s,y,v]),j=l.useMemo(()=>w("h-4","w-4",J("sm"),"border","border-line-default","text-fg-brand","focus:ring-2",g,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[g,s,o]),C=l.useMemo(()=>w(ce("label"),E("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]),b=l.useRef(null),k=l.useCallback(N=>{b.current=N,typeof d=="function"?d(N):d&&(d.current=N),N&&(N.indeterminate=c)},[d,c]);return l.useEffect(()=>{b.current&&(b.current.indeterminate=c)},[c]),n.jsxs("div",{className:w("flex","flex-col",E("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",T({type:"checkbox",id:m,ref:k,className:j,disabled:i,"aria-invalid":s,"aria-describedby":h||x||void 0,"aria-label":r?void 0:"Checkbox"},u)),r&&n.jsx("label",{htmlFor:m,className:C,children:r})]}),(s||a)&&n.jsx("div",{id:h||x,className:w(E("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));Nr.displayName="Checkbox";const va=l.memo(l.forwardRef(function(d,u){var f=d,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1}=f,c=O(f,["id","label","error","helperText","className","disabled"]);const p=l.useMemo(()=>t||`radio-${Math.random().toString(36).substr(2,9)}`,[t]),m=l.useMemo(()=>s?`${p}-error`:void 0,[s,p]),h=l.useMemo(()=>a?`${p}-helper`:void 0,[a,p]),x=l.useMemo(()=>"focus:border-line-focus",[]),v=l.useMemo(()=>"focus:border-error",[]),y=l.useMemo(()=>s?v.replace("focus:border-","focus:ring-"):x.replace("focus:border-","focus:ring-"),[s,v,x]),g=l.useMemo(()=>w("h-4","w-4","border","border-line-default","text-fg-brand","focus:ring-2",y,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[y,s,o]),j=l.useMemo(()=>w(ce("label"),E("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]);return n.jsxs("div",{className:w("flex","flex-col",E("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",T({type:"radio",id:p,ref:u,className:g,disabled:i,"aria-invalid":s,"aria-describedby":m||h||void 0,"aria-label":r?void 0:"Radio button"},c)),r&&n.jsx("label",{htmlFor:p,className:j,children:r})]}),(s||a)&&n.jsx("div",{id:m||h,className:w(E("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));va.displayName="Radio";class mt{static create(t){return{none:{value:"none",tailwind:"shadow-none",description:"No shadow"},sm:{value:"0 1px 2px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-sm",description:"Small shadow for subtle elevation"},md:{value:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",tailwind:"shadow-md",description:"Medium shadow for cards and elevated elements"},lg:{value:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",tailwind:"shadow-lg",description:"Large shadow for modals and dropdowns"},xl:{value:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",tailwind:"shadow-xl",description:"Extra large shadow for prominent modals"},"2xl":{value:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",tailwind:"shadow-2xl",description:"2X large shadow for maximum elevation"},inner:{value:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-inner",description:"Inner shadow for inset elements"}}[t]}}const Sc={none:mt.create("none"),sm:mt.create("sm"),md:mt.create("md"),lg:mt.create("lg"),xl:mt.create("xl"),"2xl":mt.create("2xl"),inner:mt.create("inner")};function $e(e){return Sc[e].tailwind}const Ot={track:{sm:{w:"w-9",h:"h-5"},md:{w:"w-11",h:"h-6"},lg:{w:"w-14",h:"h-7"}},thumb:{sm:{w:"w-4",h:"h-4"},md:{w:"w-5",h:"h-5"},lg:{w:"w-6",h:"h-6"}},translate:{sm:"translate-x-4",md:"translate-x-5",lg:"translate-x-7"}};function Cc(e){return{track:`${Ot.track[e].w} ${Ot.track[e].h}`,thumb:`${Ot.thumb[e].w} ${Ot.thumb[e].h}`,translate:Ot.translate[e]}}const $c=ve("w-full",{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},variant:{primary:"bg-surface-muted",secondary:"bg-surface-muted",success:"bg-success-bg-emphasis",error:"bg-error-bg-emphasis",warning:"bg-warning-bg-emphasis",info:"bg-info-bg-emphasis"}},defaultVariants:{size:"md",variant:"primary"}}),En=ve("transition-all",{variants:{variant:{primary:"bg-surface-brand",secondary:"bg-surface-secondary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info"}},defaultVariants:{variant:"primary"}}),vs=l.forwardRef(function(p,f){var m=p,{value:t,max:r=100,variant:s="primary",size:a="md",showLabel:o=!1,label:i,"aria-label":c,className:u=""}=m,d=O(m,["value","max","variant","size","showLabel","label","aria-label","className"]);const h=t===void 0,x=h?void 0:Math.min(Math.max(t/r*100,0),100),v=c||(h?"Loading in progress":`Progress: ${x==null?void 0:x.toFixed(0)}%`);return n.jsxs("div",P(T({ref:f,className:w("w-full",u)},d),{children:[o&&(i||!h)&&n.jsxs("div",{className:w("flex","items-center","justify-between",E("xs","mb")),children:[i&&n.jsx("span",{className:w(re("bodySmall"),Pe("label"),"text-fg-primary"),children:i}),!h&&x!==void 0&&n.jsxs("span",{className:w(re("bodySmall"),"text-fg-secondary"),children:[x.toFixed(0),"%"]})]}),n.jsx("div",{role:"progressbar","aria-valuemin":h?void 0:0,"aria-valuemax":h?void 0:r,"aria-valuenow":h?void 0:t,"aria-label":v,"aria-busy":h,className:w("relative","w-full","overflow-hidden",$c({size:a,variant:s}),J("full")),children:h?n.jsx("div",{className:w("absolute","top-0","left-0","bottom-0",En({variant:s}),J("full"),"motion-reduce:animate-none"),style:{width:"30%",animation:"progress-indeterminate 1.5s ease-in-out infinite"}}):n.jsx("div",{className:w("h-full",En({variant:s}),J("full"),"transition-all","duration-300","ease-out"),style:{width:`${x}%`},"aria-hidden":"true"})})]}))});vs.displayName="Progress";const ya=l.memo(l.forwardRef(function(m,p){var h=m,{size:t="md",label:r,description:s,error:a=!1,className:o="",disabled:i=!1,checked:c,onChange:u,id:d}=h,f=O(h,["size","label","description","error","className","disabled","checked","onChange","id"]);const x=l.useMemo(()=>d||`switch-${Math.random().toString(36).substr(2,9)}`,[d]),v=l.useMemo(()=>r?`${x}-label`:void 0,[r,x]),y=l.useMemo(()=>s?`${x}-description`:void 0,[s,x]),g=l.useMemo(()=>Cc(t),[t]),j=l.useMemo(()=>"focus:border-line-focus".replace("focus:border-","focus:ring-"),[]),C=l.useMemo(()=>w("relative","inline-flex","shrink-0","cursor-pointer","rounded-full","border-2","border-transparent",be("base"),"focus:outline-none","focus:ring-2",j,"focus:ring-offset-2",g.track,c?"bg-surface-brand":"bg-surface-muted",a&&!c&&"border-error",i&&"opacity-50 cursor-not-allowed",o),[j,g.track,c,a,i,o]),b=l.useMemo(()=>w("pointer-events-none","inline-block","rounded-full","bg-surface-base","shadow","transform",be("base"),g.thumb,c?g.translate:"translate-x-0"),[g.thumb,g.translate,c]);return n.jsxs("div",{className:w("flex","items-start",E("md","gap")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("button",{type:"button",className:C,role:"switch","aria-checked":c,"aria-labelledby":v,"aria-describedby":y,disabled:i,onClick:l.useCallback(k=>{if(!i&&u){const N=P(T({},k),{target:P(T({},k.target),{checked:!c}),currentTarget:P(T({},k.currentTarget),{checked:!c})});u(N)}},[i,u,c]),onKeyDown:l.useCallback(k=>{if((k.key==="Enter"||k.key===" ")&&!i&&u){k.preventDefault();const N=P(T({},k),{target:P(T({},k.target),{checked:!c}),currentTarget:P(T({},k.currentTarget),{checked:!c})});u(N)}},[i,u,c]),children:n.jsx("span",{className:b})}),n.jsx("input",T({ref:p,type:"checkbox",id:x,checked:c,onChange:u,disabled:i,className:"sr-only","aria-hidden":"true",tabIndex:-1},f))]}),(r||s)&&n.jsxs("div",{className:"flex-1",children:[r&&n.jsx("label",{id:v,htmlFor:x,className:w("block",re("bodySmall"),Pe("label"),a?"text-fg-error":"text-fg-primary",i?"opacity-50":"cursor-pointer"),children:r}),s&&n.jsx("p",{id:y,className:w(E("xs","mt"),re("bodySmall"),a?"text-fg-error":"text-fg-secondary"),children:s})]})]})}));ya.displayName="Switch";const ys=l.memo(function(o){var i=o,{orientation:t="horizontal",variant:r="solid",className:s=""}=i,a=O(i,["orientation","variant","className"]);const c=l.useMemo(()=>{const u=["border-0","border-line-default"],d={horizontal:"w-full border-t",vertical:"h-full border-l self-stretch"},f={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"};return w(...u,d[t],f[r],s)},[t,r,s]);return t==="vertical"?n.jsx("div",T({className:c,role:"separator","aria-orientation":"vertical"},a)):n.jsx("hr",T({className:c,role:"separator","aria-orientation":"horizontal"},a))});ys.displayName="Separator";const wa=l.forwardRef(function(g,y){var j=g,{value:t,defaultValue:r,min:s=0,max:a=100,step:o=1,variant:i="single",size:c="md",disabled:u=!1,showValue:d=!1,marks:f=[],onChange:p,onValueChange:m,label:h,className:x=""}=j,v=O(j,["value","defaultValue","min","max","step","variant","size","disabled","showValue","marks","onChange","onValueChange","label","className"]);const C=l.useRef(null),b=l.useId(),k=l.useId(),N=l.useId(),[_,S]=l.useState(r||(i==="range"?[s,a]:s)),[M,L]=l.useState(!1),[R,D]=l.useState(null),I=t!==void 0,A=I?t:_,V=U=>(U-s)/(a-s)*100,Y=U=>{if(!C.current)return s;const X=C.current.getBoundingClientRect(),ae=Math.max(0,Math.min(1,(U-X.left)/X.width)),fe=s+ae*(a-s);return Math.round(fe/o)*o},H=(U,X="min")=>{if(u)return;U.preventDefault(),L(!0),D(X);const ae=ke=>{if(!C.current)return;const je=Y(ke.clientX);W(je,X)},fe=()=>{L(!1),D(null),document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",fe)};document.addEventListener("mousemove",ae),document.addEventListener("mouseup",fe)},W=(U,X="min")=>{const ae=Math.max(s,Math.min(a,U));if(i==="range"){const[fe,ke]=Array.isArray(A)?A:[s,a];let je;X==="min"?je=[Math.min(ae,ke),ke]:je=[fe,Math.max(ae,fe)],I||S(je),p==null||p(je),m==null||m(je)}else I||S(ae),p==null||p(ae),m==null||m(ae)},ie=U=>{if(u||M)return;const X=Y(U.clientX);W(X)},ne=()=>"focus:ring-line-brand ring-offset-2",F=ve(w("relative","cursor-pointer"),{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),B=ve(w("absolute","bg-surface-brand","rounded-full","border-2","border-white","shadow-md","cursor-grab","active:cursor-grabbing",be("base"),"-translate-x-1/2","-translate-y-1/2","top-1/2"),{variants:{size:{sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"},active:{true:ne(),false:""}},defaultVariants:{size:"md",active:!1}}),K=typeof A=="number"?A:A[0],Q=Array.isArray(A)?A[0]:s,le=Array.isArray(A)?A[1]:K,se=V(Q),z=V(le);return n.jsxs("div",P(T({ref:y,className:w("w-full",x)},v),{children:[n.jsxs("label",{id:b,className:w("block",re("bodySmall"),Pe("label"),"text-fg-primary",E("sm","mb")),children:[h,d&&n.jsx("span",{className:w(E("sm","ml"),"text-fg-secondary"),children:i==="range"?`${Q} - ${le}`:K})]}),i==="range"&&n.jsxs(n.Fragment,{children:[n.jsx("span",{id:k,className:"sr-only",children:"minimum"}),n.jsx("span",{id:N,className:"sr-only",children:"maximum"})]}),n.jsxs("div",{ref:C,className:w(F({size:c,disabled:u}),"bg-surface-muted",J("full")),onClick:ie,role:i==="range"?void 0:"slider","aria-valuemin":i==="range"?void 0:s,"aria-valuemax":i==="range"?void 0:a,"aria-valuenow":i==="range"?void 0:K,"aria-disabled":i==="range"?void 0:u,"aria-labelledby":i==="range"?void 0:b,children:[n.jsx("div",{className:w("absolute",F({size:c}),"bg-surface-brand",J("full"),be("base")),style:{left:`${se}%`,width:`${z-se}%`}}),f.map(U=>{const X=V(U);return n.jsx("div",{className:w("absolute","w-1","h-1","bg-line-strong",J("full"),"-translate-x-1/2"),style:{left:`${X}%`,top:"50%",transform:"translate(-50%, -50%)"}},U)}),i==="range"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:w(B({size:c,active:R==="min"})),style:{left:`${se}%`},onMouseDown:U=>H(U,"min"),role:"slider","aria-valuemin":s,"aria-valuemax":le,"aria-valuenow":Q,"aria-labelledby":`${b} ${k}`}),n.jsx("div",{className:w(B({size:c,active:R==="max"})),style:{left:`${z}%`},onMouseDown:U=>H(U,"max"),role:"slider","aria-valuemin":Q,"aria-valuemax":a,"aria-valuenow":le,"aria-labelledby":`${b} ${N}`})]}):n.jsx("div",{className:w(B({size:c,active:M})),style:{left:`${z}%`},onMouseDown:U=>H(U)}),d&&!h&&n.jsx("div",{className:"absolute -top-6 left-0 right-0 flex justify-center",children:n.jsx("span",{className:w(re("caption"),"text-fg-secondary","bg-surface-overlay",E("sm","px"),E("xs","py"),J("md"),"shadow"),children:i==="range"?`${Q} - ${le}`:K})})]})]}))});wa.displayName="Slider";const Ec=ve(w("inline-flex","items-center","font-medium",J("full"),E("xs","gap")),{variants:{variant:{default:w("bg-surface-muted","text-fg-primary","border","border-line-default"),outlined:w("bg-transparent","text-fg-primary","border","border-line-default"),filled:w("bg-surface-brand-strong","text-fg-inverse","border","border-transparent")},size:{sm:w(E("xs","px"),E("xs","py"),re("caption")),md:w(E("sm","px"),E("xs","py"),re("bodySmall")),lg:w(E("md","px"),E("sm","py"),re("body"))},selected:{true:w("bg-surface-brand-strong","text-fg-inverse","border","border-line-brand"),false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},compoundVariants:[{selected:!0,variant:"default",class:""},{selected:!0,variant:"outlined",class:""},{selected:!0,variant:"filled",class:""}],defaultVariants:{variant:"default",size:"md",selected:!1,disabled:!1}}),ws=l.forwardRef(function(h,m){var x=h,{children:t,variant:r="default",size:s="md",onRemove:a,selected:o=!1,disabled:i=!1,className:c="","aria-label":u,onClick:d,tabIndex:f}=x,p=O(x,["children","variant","size","onRemove","selected","disabled","className","aria-label","onClick","tabIndex"]);const y=(()=>{if(u)return u;if(typeof t=="string")return t;if(typeof t=="object"&&t!==null&&"props"in t){const b=t.props;if(b!=null&&b.children&&typeof b.children=="string")return b.children}})(),g=d!==void 0,j=g&&!i,C=b=>{i||(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),d==null||d())};return n.jsxs("div",P(T({ref:m,className:w(Ec({variant:r,size:s,selected:o,disabled:i}),a&&E("xs","pr"),c),"aria-disabled":i},p),{children:[g?n.jsx("button",{type:"button",onClick:i?void 0:d,onKeyDown:C,disabled:i,"aria-pressed":o?!0:void 0,"aria-label":u||y,tabIndex:f!==void 0?f:j?0:void 0,className:w("flex-1","bg-transparent","border-0","p-0","text-inherit","text-left","cursor-pointer","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",J("full")),children:t}):n.jsx("span",{children:t}),a&&!i&&n.jsx("button",{type:"button",onClick:b=>{b.stopPropagation(),a()},className:w(E("xs","ml"),"hover:bg-tint-hover",J("full"),E("xs","p"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1"),"aria-label":`Remove ${y||"chip"}`,children:n.jsx(Ne,{className:"h-3 w-3","aria-hidden":"true"})})]}))});ws.displayName="Chip";const ur=l.forwardRef(function(f,d){var p=f,{src:t,alt:r,fallback:s,size:a="md",variant:o="circle","aria-label":i,className:c=""}=p,u=O(p,["src","alt","fallback","size","variant","aria-label","className"]);const[m,h]=l.useState(!1),[x,v]=l.useState(!1),y={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},g={circle:"rounded-full",square:"rounded-none",rounded:"rounded-md"},j=!t||m,C=typeof s=="string"?s.toUpperCase().slice(0,2):s,b=i||r||"User avatar";return n.jsxs("div",P(T({ref:d,className:w("relative","inline-flex","items-center","justify-center","shrink-0","font-medium","overflow-hidden",y[a],g[o],"bg-surface-muted","text-fg-primary",c),role:"img","aria-label":b},u),{children:[!j&&t&&n.jsx("img",{src:t,alt:r||"",className:w("w-full","h-full","object-cover",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md",x?"opacity-100":"opacity-0","transition-opacity","duration-200"),onLoad:()=>v(!0),onError:()=>{h(!0),v(!1)},"aria-hidden":"true"}),j&&n.jsx("span",{className:w("flex","items-center","justify-center","w-full","h-full",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md"),"aria-hidden":"true",children:C||"?"})]}))});ur.displayName="Avatar";function Mc(c){var u=c,{children:e,max:t=3,size:r="md",variant:s="circle",spacing:a="md",className:o=""}=u,i=O(u,["children","max","size","variant","spacing","className"]);const d={none:"",sm:"-space-x-1",md:"-space-x-2",lg:"-space-x-3"},f=l.Children.toArray(e).filter(Boolean),p=f.slice(0,t),m=f.length-t;return n.jsxs("div",P(T({className:w("flex","items-center",d[a],o),role:"group","aria-label":`${f.length} avatars`},i),{children:[p.map((h,x)=>{let v=h;if(l.isValidElement(h)&&h.type===ur){const y=h.props;v=l.cloneElement(h,{size:y.size||r,variant:y.variant||s})}return n.jsx("div",{className:"ring-2 ring-surface-base",style:{zIndex:f.length-x},children:v},x)}),m>0&&n.jsx(ur,{size:r,variant:s,fallback:`+${m}`,"aria-label":`${m} more avatars`,className:"ring-2 ring-surface-base",style:{zIndex:0}})]}))}const fr=l.memo(function(d){var f=d,{variant:t="default",padding:r="medium",className:s="",onClick:a,"aria-label":o,"aria-labelledby":i,children:c}=f,u=O(f,["variant","padding","className","onClick","aria-label","aria-labelledby","children"]);const p=ve(w("bg-surface-base",J("lg"),"border","border-line-default","shadow-sm"),{variants:{variant:{default:"",hover:w("hover:shadow-md","transition-shadow","cursor-pointer"),selected:w("border-line-brand","shadow-md")},padding:{none:"",small:E("xs","p"),medium:E("base","p"),large:E("lg","p")}},defaultVariants:{variant:"default",padding:"medium"}}),m=l.useMemo(()=>a!==void 0||t==="hover",[a,t]),h=m?"button":void 0,x=m?0:void 0,v=w(p({variant:t,padding:r}),s),y=l.useCallback(g=>{m&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),a==null||a())},[m,a]);return n.jsx("div",P(T({className:v,role:h,tabIndex:x,onClick:a,onKeyDown:y,"aria-label":o,"aria-labelledby":i},u),{children:c}))});fr.displayName="Card";const Sr=l.createContext(void 0);function ks(){const e=l.useContext(Sr);if(e===void 0)throw new Error("useFormContext must be used within a Form component with react-hook-form integration");return e}function Tc(){return l.useContext(Sr)}function ka({form:e,loading:t=!1,children:r}){const s={form:e,loading:t};return n.jsx(Sr.Provider,{value:s,children:r})}function Ac(c){var u=c,{children:e,onSubmit:t,loading:r=!1,error:s=null,success:a=null,className:o=""}=u,i=O(u,["children","onSubmit","loading","error","success","className"]);const d=w(E("lg","gap"),"flex","flex-col",o);if("form"in i&&i.form!==void 0){const v=i,{form:g,onSubmit:j,onSubmitError:C}=v,b=O(v,["form","onSubmit","onSubmitError"]),k=g.handleSubmit(N=>rr(null,null,function*(){try{yield j(N)}catch(_){C==null||C(_)}}),N=>{C==null||C(N)});return n.jsx(ka,{form:g,loading:r,children:n.jsxs("form",P(T({className:d,onSubmit:k,noValidate:!0},b),{children:[e,s&&n.jsx("div",{role:"alert",className:w(E("md","p"),ye("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:w(E("md","p"),ye("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))})}const p=i.onSubmit||t,y=i,{onSubmit:m}=y,h=O(y,["onSubmit"]),x=g=>{g.preventDefault(),p&&!r&&p(g)};return n.jsxs("form",P(T({className:d,onSubmit:x,noValidate:!0},h),{children:[e,s&&n.jsx("div",{role:"alert",className:w(E("md","p"),ye("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:w(E("md","p"),ye("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))}function Rc({name:e,label:t,children:r,rules:s,className:a=""}){var m;const{form:o}=ks();if(!o)throw new Error("FormField must be used within a Form component with react-hook-form integration");const{register:i,formState:{errors:c},watch:u}=o,d=i(e,s),f=(m=c[e])==null?void 0:m.message,p=u(e);return n.jsxs("div",{className:w("flex","flex-col",E("sm","gap"),a),children:[t&&n.jsx(Tt,{htmlFor:e,className:w("block",ye("sm"),Mt("medium"),"text-fg-primary"),children:t}),r({name:e,register:h=>i(h,s),error:f,value:p,onChange:d.onChange,onBlur:d.onBlur}),f&&n.jsx(ba,{message:f})]})}var Ic=e=>e.type==="checkbox",Dc=e=>e instanceof Date,Be=e=>e==null;const Lc=e=>typeof e=="object";var Ge=e=>!Be(e)&&!Array.isArray(e)&&Lc(e)&&!Dc(e),Fc=e=>{const t=e.constructor&&e.constructor.prototype;return Ge(t)&&t.hasOwnProperty("isPrototypeOf")},ja=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function pt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList!="undefined"&&e instanceof FileList;if(ja&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(Ge(e)&&Fc(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=pt(e[a]));return s}var js=e=>/^\w*$/.test(e),ze=e=>e===void 0,Na=e=>Array.isArray(e)?e.filter(Boolean):[],Ns=e=>Na(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Fe=(e,t,r)=>{if(!t||!Ge(e))return r;const s=(js(t)?[t]:Ns(t)).reduce((a,o)=>Be(a)?a:a[o],e);return ze(s)||s===e?ze(e[t])?r:e[t]:s},Sa=e=>typeof e=="boolean",_c=e=>typeof e=="function",mr=(e,t,r)=>{let s=-1;const a=js(t)?[t]:Ns(t),o=a.length,i=o-1;for(;++s<o;){const c=a[s];let u=r;if(s!==i){const d=e[c];u=Ge(d)||Array.isArray(d)?d:isNaN(+a[s+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=u,e=e[c]}};const $t={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},He={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ca=l.createContext(null);Ca.displayName="HookFormControlContext";const Pc=()=>l.useContext(Ca),zc=typeof window!="undefined"?l.useLayoutEffect:l.useEffect;var Je=e=>typeof e=="string";const Oc=l.createContext(null);Oc.displayName="HookFormContext";var Vc=(e,t,r,s,a)=>t?P(T({},r[e]),{types:P(T({},r[e]&&r[e].types?r[e].types:{}),{[s]:a||!0})}):{},_e=e=>Array.isArray(e)?e:[e],pr=e=>Ge(e)&&!Object.keys(e).length,Wc=e=>e.type==="file",Hc=e=>{if(!ja)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Bc=e=>e.type==="radio";function Uc(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;)e=ze(e)?s++:e[t[s++]];return e}function qc(e){for(const t in e)if(e.hasOwnProperty(t)&&!ze(e[t]))return!1;return!0}function $a(e,t){const r=Array.isArray(t)?t:js(t)?[t]:Ns(t),s=r.length===1?e:Uc(e,r),a=r.length-1,o=r[a];return s&&delete s[o],a!==0&&(Ge(s)&&pr(s)||Array.isArray(s)&&qc(s))&&$a(e,r.slice(0,-1)),e}var Ea=e=>e instanceof RegExp,ir=e=>({isOnSubmit:!e||e===$t.onSubmit,isOnBlur:e===$t.onBlur,isOnChange:e===$t.onChange,isOnAll:e===$t.all,isOnTouch:e===$t.onTouched}),Gc=(e,t,r)=>t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length)));const os=(e,t,r,s)=>{for(const o of Object.keys(e)){const i=Fe(e,o);if(i){const a=i,{_f:c}=a,u=O(a,["_f"]);if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],o))return!0;if(c.ref&&t(c.ref,c.name))return!0;if(os(u,t))break}else if(Ge(u)&&os(u,t))break}}};var Kc=(e,t,r)=>{const s=_e(Fe(e,r));return mr(s,"root",t[r]),mr(e,r,s),e};function Mn(e,t,r="validate"){if(Je(e)||Array.isArray(e)&&e.every(Je)||Sa(e)&&!e)return{type:r,message:Je(e)?e:"",ref:t}}var St=e=>Ge(e)&&!Ea(e)?e:{value:e,message:""},Yc=(e,t,r,s,a,o)=>rr(null,null,function*(){const{ref:i,refs:c,required:u,maxLength:d,minLength:f,min:p,max:m,pattern:h,validate:x,name:v,valueAsNumber:y,mount:g}=e._f,j=Fe(r,v);if(!g||t.has(v))return{};const C=c?c[0]:i,b=M=>{a&&C.reportValidity&&(C.setCustomValidity(Sa(M)?"":M||""),C.reportValidity())},k={};Bc(i),Ic(i);const N=(y||Wc(i))&&ze(i.value)&&ze(j)||Hc(i)&&i.value===""||j===""||Array.isArray(j)&&!j.length,_=Vc.bind(null,v,s,k),S=(M,L,R,D=He.maxLength,I=He.minLength)=>{const A=M?L:R;k[v]=T({type:M?D:I,message:A,ref:i},_(M?D:I,A))};if(!Array.isArray(j)||!j.length){const{value:M,message:L}=Je(u)?{value:!!u,message:u}:St(u);if(M&&(k[v]=T({type:He.required,message:L,ref:C},_(He.required,L)),!s))return b(L),k}if(!N&&(!Be(p)||!Be(m))){let M,L;const R=St(m),D=St(p);if(!Be(j)&&!isNaN(j)){const I=i.valueAsNumber||j&&+j;Be(R.value)||(M=I>R.value),Be(D.value)||(L=I<D.value)}else{const I=i.valueAsDate||new Date(j),A=H=>new Date(new Date().toDateString()+" "+H),V=i.type=="time",Y=i.type=="week";Je(R.value)&&j&&(M=V?A(j)>A(R.value):Y?j>R.value:I>new Date(R.value)),Je(D.value)&&j&&(L=V?A(j)<A(D.value):Y?j<D.value:I<new Date(D.value))}if((M||L)&&(S(!!M,R.message,D.message,He.max,He.min),!s))return b(k[v].message),k}if((d||f)&&!N&&(Je(j)||Array.isArray(j))){const M=St(d),L=St(f),R=!Be(M.value)&&j.length>+M.value,D=!Be(L.value)&&j.length<+L.value;if((R||D)&&(S(R,M.message,L.message),!s))return b(k[v].message),k}if(h&&!N&&Je(j)){const{value:M,message:L}=St(h);if(Ea(M)&&!j.match(M)&&(k[v]=T({type:He.pattern,message:L,ref:i},_(He.pattern,L)),!s))return b(L),k}if(x){if(_c(x)){const M=yield x(j,r),L=Mn(M,C);if(L&&(k[v]=T(T({},L),_(He.validate,L.message)),!s))return b(L.message),k}else if(Ge(x)){let M={};for(const L in x){if(!pr(M)&&!s)break;const R=Mn(yield x[L](j,r),C,L);R&&(M=T(T({},R),_(L,R.message)),b(R.message),s&&(k[v]=M))}if(!pr(M)&&(k[v]=T({ref:C},M),!s))return k}}return b(!0),k}),Xe=()=>{if(typeof crypto!="undefined"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance=="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Kr=(e,t,r={})=>r.shouldFocus||ze(r.shouldFocus)?r.focusName||`${e}.${ze(r.focusIndex)?t:r.focusIndex}.`:"",Yr=(e,t)=>[...e,..._e(t)],Xr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Jr(e,t,r){return[...e.slice(0,t),..._e(r),...e.slice(t)]}var Qr=(e,t,r)=>Array.isArray(e)?(ze(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Zr=(e,t)=>[..._e(t),..._e(e)];function Xc(e,t){let r=0;const s=[...e];for(const a of t)s.splice(a-r,1),r++;return Na(s).length?s:[]}var es=(e,t)=>ze(t)?[]:Xc(e,_e(t).sort((r,s)=>r-s)),ts=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Tn=(e,t,r)=>(e[t]=r,e);function Jc(e){const t=Pc(),{control:r=t,name:s,keyName:a="id",shouldUnregister:o,rules:i}=e,[c,u]=l.useState(r._getFieldArray(s)),d=l.useRef(r._getFieldArray(s).map(Xe)),f=l.useRef(!1);r._names.array.add(s),l.useMemo(()=>i&&c.length>=0&&r.register(s,i),[r,s,c.length,i]),zc(()=>r._subjects.array.subscribe({next:({values:b,name:k})=>{if(k===s||!k){const N=Fe(b,s);Array.isArray(N)&&(u(N),d.current=N.map(Xe))}}}).unsubscribe,[r,s]);const p=l.useCallback(b=>{f.current=!0,r._setFieldArray(s,b)},[r,s]),m=(b,k)=>{const N=_e(pt(b)),_=Yr(r._getFieldArray(s),N);r._names.focus=Kr(s,_.length-1,k),d.current=Yr(d.current,N.map(Xe)),p(_),u(_),r._setFieldArray(s,_,Yr,{argA:Xr(b)})},h=(b,k)=>{const N=_e(pt(b)),_=Zr(r._getFieldArray(s),N);r._names.focus=Kr(s,0,k),d.current=Zr(d.current,N.map(Xe)),p(_),u(_),r._setFieldArray(s,_,Zr,{argA:Xr(b)})},x=b=>{const k=es(r._getFieldArray(s),b);d.current=es(d.current,b),p(k),u(k),!Array.isArray(Fe(r._fields,s))&&mr(r._fields,s,void 0),r._setFieldArray(s,k,es,{argA:b})},v=(b,k,N)=>{const _=_e(pt(k)),S=Jr(r._getFieldArray(s),b,_);r._names.focus=Kr(s,b,N),d.current=Jr(d.current,b,_.map(Xe)),p(S),u(S),r._setFieldArray(s,S,Jr,{argA:b,argB:Xr(k)})},y=(b,k)=>{const N=r._getFieldArray(s);ts(N,b,k),ts(d.current,b,k),p(N),u(N),r._setFieldArray(s,N,ts,{argA:b,argB:k},!1)},g=(b,k)=>{const N=r._getFieldArray(s);Qr(N,b,k),Qr(d.current,b,k),p(N),u(N),r._setFieldArray(s,N,Qr,{argA:b,argB:k},!1)},j=(b,k)=>{const N=pt(k),_=Tn(r._getFieldArray(s),b,N);d.current=[..._].map((S,M)=>!S||M===b?Xe():d.current[M]),p(_),u([..._]),r._setFieldArray(s,_,Tn,{argA:b,argB:N},!0,!1)},C=b=>{const k=_e(pt(b));d.current=k.map(Xe),p([...k]),u([...k]),r._setFieldArray(s,[...k],N=>N,{},!0,!1)};return l.useEffect(()=>{if(r._state.action=!1,Gc(s,r._names)&&r._subjects.state.next(T({},r._formState)),f.current&&(!ir(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!ir(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([s]).then(b=>{r._updateIsValidating([s]);const k=Fe(b.errors,s),N=Fe(r._formState.errors,s);(N?!k&&N.type||k&&(N.type!==k.type||N.message!==k.message):k&&k.type)&&(k?mr(r._formState.errors,s,k):$a(r._formState.errors,s),r._subjects.state.next({errors:r._formState.errors}))});else{const b=Fe(r._fields,s);b&&b._f&&!(ir(r._options.reValidateMode).isOnSubmit&&ir(r._options.mode).isOnSubmit)&&Yc(b,r._names.disabled,r._formValues,r._options.criteriaMode===$t.all,r._options.shouldUseNativeValidation).then(k=>!pr(k)&&r._subjects.state.next({errors:Kc(r._formState.errors,k,s)}))}r._subjects.state.next({name:s,values:pt(r._formValues)}),r._names.focus&&os(r._fields,(b,k)=>{if(r._names.focus&&k.startsWith(r._names.focus)&&b.focus)return b.focus(),1}),r._names.focus="",r._setValid(),f.current=!1},[c,s,r]),l.useEffect(()=>(!Fe(r._formValues,s)&&r._setFieldArray(s),()=>{const b=(k,N)=>{const _=Fe(r._fields,k);_&&_._f&&(_._f.mount=N)};r._options.shouldUnregister||o?r.unregister(s):b(s,!1)}),[s,r,a,o]),{swap:l.useCallback(y,[p,s,r]),move:l.useCallback(g,[p,s,r]),prepend:l.useCallback(h,[p,s,r]),append:l.useCallback(m,[p,s,r]),remove:l.useCallback(x,[p,s,r]),insert:l.useCallback(v,[p,s,r]),update:l.useCallback(j,[p,s,r]),replace:l.useCallback(C,[p,s,r]),fields:l.useMemo(()=>c.map((b,k)=>P(T({},b),{[a]:d.current[k]||Xe()})),[c,a])}}function Qc(e){const{form:t}=ks();if(!t)throw new Error("useFormFieldArray must be used within a Form component with react-hook-form integration");return Jc(P(T({},e),{control:t.control}))}function Ma(a){var o=a,{items:e,separator:t="/",className:r=""}=o,s=O(o,["items","separator","className"]);const i=["flex","items-center",E("sm","space-x"),re("bodySmall")],c=w(...i,r);return n.jsx("nav",P(T({"aria-label":"Breadcrumb",className:c},s),{children:n.jsx("ol",{className:w("flex","items-center",E("sm","space-x")),children:e.map((u,d)=>{const f=d===e.length-1;return n.jsxs("li",{className:"flex items-center",children:[d>0&&n.jsx("span",{className:w(E("sm","mx"),"text-fg-tertiary"),"aria-hidden":"true",children:t}),f?n.jsx("span",{className:w("text-fg-primary",Pe("label")),"aria-current":"page",children:u.label}):u.href?n.jsx("a",{href:u.href,className:w("inline-flex","items-center",E("xs","px"),E("xs","pt"),"border-b-2","border-transparent",re("bodySmall"),Pe("label"),"transition-colors","text-fg-secondary","hover:border-line-emphasis","hover:text-fg-primary"),children:u.label}):n.jsx("span",{className:"text-fg-secondary",children:u.label})]},d)})})}))}function Ta(u){var d=u,{currentPage:e,totalPages:t,onPageChange:r,totalItems:s,itemsPerPage:a,showPageInfo:o=!0,className:i=""}=d,c=O(d,["currentPage","totalPages","onPageChange","totalItems","itemsPerPage","showPageInfo","className"]);const f=()=>{e>1&&r(e-1)},p=()=>{e<t&&r(e+1)},m=g=>{g>=1&&g<=t&&g!==e&&r(g)},h=()=>{const g=[];if(t<=5)for(let C=1;C<=t;C++)g.push(C);else if(e<=3){for(let C=1;C<=4;C++)g.push(C);g.push("ellipsis"),g.push(t)}else if(e>=t-2){g.push(1),g.push("ellipsis");for(let C=t-3;C<=t;C++)g.push(C)}else{g.push(1),g.push("ellipsis");for(let C=e-1;C<=e+1;C++)g.push(C);g.push("ellipsis"),g.push(t)}return g},x=s&&a?(e-1)*a+1:void 0,v=s&&a?Math.min(e*a,s):void 0,y=w("flex","items-center","justify-between",E("base","px"),E("md","py"),i);return n.jsxs("nav",P(T({className:y,"aria-label":"Pagination"},c),{children:[n.jsxs("div",{className:w("flex","items-center",E("sm","gap")),children:[n.jsx(Z,{variant:"secondary",onClick:f,disabled:e===1,size:"sm",children:"Previous"}),n.jsx("div",{className:w("flex","items-center",E("xs","gap")),children:h().map((g,j)=>{if(g==="ellipsis")return n.jsx("span",{className:w(E("sm","px"),"text-fg-tertiary"),children:"..."},`ellipsis-${j}`);const C=g,b=C===e;return n.jsx(Z,{variant:b?"primary":"ghost",onClick:()=>m(C),size:"sm","aria-current":b?"page":void 0,"aria-label":`Go to page ${C}`,children:C},C)})}),n.jsx(Z,{variant:"secondary",onClick:p,disabled:e===t,size:"sm",children:"Next"})]}),o&&s&&a&&n.jsxs("div",{className:w(ye("sm"),"text-fg-primary"),children:["Showing ",x," to ",v," of ",s," results"]})]}))}function Aa(u){var d=u,{title:e,message:t,actionLabel:r,onAction:s,illustration:a,variant:o="default",className:i=""}=d,c=O(d,["title","message","actionLabel","onAction","illustration","variant","className"]);const f=w("flex","flex-col","items-center","justify-center","text-center",E("xl","py"),E("base","px"),i),p=o==="withAction"||r&&s,m=o==="withIllustration"||a;return n.jsxs("div",P(T({className:f,role:"status","aria-live":"polite","aria-label":`${e}. ${t}`},c),{children:[m&&a&&n.jsx("div",{className:w(E("base","mb")),"aria-hidden":"true",children:a}),n.jsx(Ue,{as:"h3",className:w(re("h4"),Mt("semibold"),"text-fg-primary",E("sm","mb")),children:e}),n.jsx(Ue,{as:"p",className:w(re("bodySmall"),"text-fg-secondary",E("md","mb"),"max-w-sm"),children:t}),p&&r&&s&&n.jsx(Z,{variant:"primary",onClick:s,children:r})]}))}function Ra(c){var u=c,{trigger:e,items:t,align:r="right",variant:s="default",className:a="","aria-label":o}=u,i=O(u,["trigger","items","align","variant","className","aria-label"]);const[d,f]=l.useState(!1),[p,m]=l.useState(-1),h=l.useRef(null),x=l.useRef(null),v=l.useRef(null),y=l.useRef([]),g=`dropdown-menu-${Math.random().toString(36).substr(2,9)}`,j=`dropdown-trigger-${Math.random().toString(36).substr(2,9)}`;l.useEffect(()=>{const S=M=>{h.current&&!h.current.contains(M.target)&&(f(!1),m(-1))};return d&&(document.addEventListener("mousedown",S),setTimeout(()=>{var L;const M=t.findIndex(R=>!R.disabled);M>=0&&(m(M),(L=y.current[M])==null||L.focus())},0)),()=>{document.removeEventListener("mousedown",S)}},[d,t]),l.useEffect(()=>{if(!d)return;const S=L=>{var I,A,V,Y;const R=t.map((H,W)=>({item:H,index:W})).filter(({item:H})=>!H.disabled),D=R.findIndex(({index:H})=>H===p);switch(L.key){case"ArrowDown":{L.preventDefault();const H=D<R.length-1?R[D+1].index:R[0].index;m(H),(I=y.current[H])==null||I.focus();break}case"ArrowUp":{L.preventDefault();const H=D>0?R[D-1].index:R[R.length-1].index;m(H),(A=y.current[H])==null||A.focus();break}case"Home":{L.preventDefault();const H=R[0].index;m(H),(V=y.current[H])==null||V.focus();break}case"End":{L.preventDefault();const H=R[R.length-1].index;m(H),(Y=y.current[H])==null||Y.focus();break}case"Enter":case" ":L.preventDefault(),p>=0&&!t[p].disabled&&C(t[p]);break;case"Escape":L.preventDefault(),f(!1),m(-1),setTimeout(()=>{var H;(H=x.current)==null||H.focus()},0);break}},M=v.current;if(M){const L=S;return M.addEventListener("keydown",L),()=>{M.removeEventListener("keydown",L)}}},[d,p,t]);const C=S=>{S.disabled||(S.onClick(),f(!1),m(-1),setTimeout(()=>{var M;(M=x.current)==null||M.focus()},0))},b=()=>{f(!d),m(-1)},k=S=>{(S.key==="Enter"||S.key===" "||S.key==="ArrowDown")&&(S.preventDefault(),f(!0))},N=r==="right"?"right-0":"left-0",_=l.isValidElement(e)?l.cloneElement(e,{onClick:S=>{b(),e.props.onClick&&e.props.onClick(S)},onKeyDown:S=>{k(S),e.props.onKeyDown&&e.props.onKeyDown(S)},"aria-haspopup":"menu","aria-expanded":d,"aria-controls":g,"aria-label":o||e.props["aria-label"]||"Open menu",id:j,ref:S=>{x.current=S,typeof e.ref=="function"?e.ref(S):e.ref&&(e.ref.current=S)}}):n.jsx("div",{ref:x,onClick:b,onKeyDown:k,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":g,"aria-label":o||"Open menu",id:j,children:e});return n.jsxs("div",P(T({className:w("relative","inline-block",a),ref:h},i),{children:[_,d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:w("fixed","inset-0","z-10"),onClick:()=>{f(!1),m(-1)},"aria-hidden":"true"}),n.jsx("div",{ref:v,id:g,className:w("absolute","z-20",E("sm","mt"),"w-48",J("md"),$e("lg"),"bg-surface-overlay","ring-1","ring-line-strong","ring-opacity-5",N),role:"menu","aria-orientation":"vertical","aria-labelledby":j,"aria-activedescendant":p>=0?`${g}-item-${p}`:void 0,children:n.jsx("div",{className:w(E("xs","py")),role:"none",children:t.map((S,M)=>{const L=w("block",E("base","px"),E("xs","py"),re("bodySmall"),"w-full","text-left","focus:outline-none",S.disabled?w("text-fg-disabled","cursor-not-allowed","opacity-50"):S.variant==="danger"?w("text-error-dark","hover:bg-error-bg-emphasis","focus:bg-error-bg-emphasis"):w("text-fg-primary","hover:bg-surface-hover","focus:bg-surface-hover"));return n.jsx("button",{id:`${g}-item-${M}`,ref:R=>{y.current[M]=R},type:"button",className:L,onClick:()=>C(S),disabled:S.disabled,role:"menuitem","aria-disabled":S.disabled,tabIndex:S.disabled?-1:p===M?0:-1,children:S.label},M)})})})]})]}))}const Ia=l.createContext(void 0);function Da(){const e=l.useContext(Ia);if(!e)throw new Error("DatePicker components must be used within a DatePicker component");return e}function is({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,locale:u}){const d=()=>{if(r!==void 0)return null;if(s){if(t==="single"&&s instanceof Date)return s;if(t==="range"&&typeof s=="object"&&"start"in s)return null}return null},f=()=>r!==void 0?null:s&&t==="range"&&typeof s=="object"&&"start"in s?s:{start:null,end:null},[p,m]=l.useState(d()),[h,x]=l.useState(f()),v=t==="single"?r instanceof Date?r:p:null,y=t==="range"?r&&typeof r=="object"&&"start"in r?r:h:null,C={selectedDate:v,selectedRange:y,mode:t,onDateChange:b=>{t==="single"&&(r===void 0&&m(b),a==null||a(b))},onRangeChange:b=>{t==="range"&&(r===void 0&&x(b),a==null||a(b))},minDate:o,maxDate:i,disabledDates:c,locale:u};return n.jsx(Ia.Provider,{value:C,children:e})}function Vt(e,t="yyyy-MM-dd"){const r=e.getFullYear(),s=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",s).replace("dd",a).replace("MM/dd/yyyy",`${s}/${a}/${r}`).replace("dd/MM/yyyy",`${a}/${s}/${r}`)}function An(e){if(!e)return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(t){const[,a,o,i]=t,c=new Date(parseInt(a),parseInt(o)-1,parseInt(i));if(!isNaN(c.getTime()))return c}const r=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(r){const[,a,o,i]=r,c=new Date(parseInt(i),parseInt(a)-1,parseInt(o));if(!isNaN(c.getTime()))return c}const s=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(s){const[,a,o,i]=s,c=new Date(parseInt(i),parseInt(o)-1,parseInt(a));if(!isNaN(c.getTime()))return c}return null}function Ss(c){var u=c,{placeholder:e="Select date",format:t="yyyy-MM-dd",showCalendarButton:r=!0,"aria-label":s,onFocus:a,className:o=""}=u,i=O(u,["placeholder","format","showCalendarButton","aria-label","onFocus","className"]);const{selectedDate:d,selectedRange:f,mode:p,onDateChange:m}=Da(),[h,x]=l.useState(""),[v,y]=l.useState(!1),g=l.useRef(null);l.useEffect(()=>{p==="single"&&d?x(Vt(d,t)):p==="range"&&f?f.start&&f.end?x(`${Vt(f.start,t)} - ${Vt(f.end,t)}`):f.start?x(Vt(f.start,t)):x(""):x("")},[d,f,p,t]);const j=k=>{const N=k.target.value;if(x(N),p==="single"){const _=An(N);m(_)}},C=()=>{if(y(!1),h&&p==="single"){const k=An(h);k&&x(Vt(k,t))}},b=()=>{var k;(k=g.current)==null||k.focus()};return n.jsx("div",P(T({className:`relative ${o}`},i),{children:n.jsx(Se,{ref:g,type:"text",value:h,onChange:j,onFocus:()=>{y(!0),a==null||a()},onBlur:C,placeholder:e,"aria-label":s||e,rightIcon:r?n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:b,"aria-label":"Open calendar",type:"button",children:n.jsx(Tl,{className:"h-4 w-4"})}):void 0})}))}function Zc(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function ed(e){return new Date(e.getFullYear(),e.getMonth(),1).getDay()}function ht(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Wt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function td(e,t,r){if(!t||!r)return!1;const s=e.getTime();return s>=t.getTime()&&s<=r.getTime()}function Rn(e,t,r,s){return!!(t&&e<t||r&&e>r||s!=null&&s.some(a=>ht(e,a)))}const rd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],sd=["January","February","March","April","May","June","July","August","September","October","November","December"];function Cs(a){var o=a,{month:e,onMonthChange:t,className:r=""}=o,s=O(o,["month","onMonthChange","className"]);const{selectedDate:i,selectedRange:c,mode:u,onDateChange:d,onRangeChange:f,minDate:p,maxDate:m,disabledDates:h}=Da(),[x,v]=l.useState(e||i||(c==null?void 0:c.start)||new Date),y=l.useRef(null),[g,j]=l.useState(()=>{const D=new Date,I=e||i||(c==null?void 0:c.start)||D;return i&&Wt(i,I)?i:Wt(D,I)?D:new Date(I.getFullYear(),I.getMonth(),1)});l.useEffect(()=>{e&&v(e)},[e]),l.useEffect(()=>{if(!y.current)return;const D=y.current.querySelector(`[data-date="${g.toISOString()}"]`);D&&D.focus()},[g]);const C=(()=>{if(Wt(g,x))return g;const D=new Date;return Wt(D,x)?D:new Date(x.getFullYear(),x.getMonth(),1)})(),b=Zc(x),k=ed(x),N=[];for(let D=0;D<k;D++)N.push(null);for(let D=1;D<=b;D++)N.push(new Date(x.getFullYear(),x.getMonth(),D));const _=D=>{if(!Rn(D,p,m,h)){if(u==="single")d(D);else if(u==="range"){const I=c||{start:null,end:null};!I.start||I.start&&I.end?f({start:D,end:null}):I.start&&!I.end&&(D<I.start?f({start:D,end:I.start}):f({start:I.start,end:D}))}}},S=()=>{const D=new Date(x.getFullYear(),x.getMonth()-1,1);v(D),t==null||t(D)},M=()=>{const D=new Date(x.getFullYear(),x.getMonth()+1,1);v(D),t==null||t(D)},L=(D,I)=>{let A=null;switch(D.key){case"ArrowLeft":D.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),I.getDate()-1);break;case"ArrowRight":D.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),I.getDate()+1);break;case"ArrowUp":D.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),I.getDate()-7);break;case"ArrowDown":D.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),I.getDate()+7);break;case"Home":D.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),1);break;case"End":D.preventDefault(),A=new Date(I.getFullYear(),I.getMonth()+1,0);break;case"Enter":case" ":D.preventDefault(),_(I);return}A&&(Wt(A,x)||v(new Date(A.getFullYear(),A.getMonth(),1)),j(A))},R=[];for(let D=0;D<N.length;D+=7)R.push(N.slice(D,D+7));return n.jsxs("div",P(T({ref:y,className:`p-4 ${r}`},s),{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:S,"aria-label":"Previous month",children:n.jsx(Bt,{className:"h-4 w-4"})}),n.jsxs("div",{className:"text-sm font-semibold",children:[sd[x.getMonth()]," ",x.getFullYear()]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:M,"aria-label":"Next month",children:n.jsx(bt,{className:"h-4 w-4"})})]}),n.jsxs("div",{role:"grid","aria-label":"Calendar",children:[n.jsx("div",{role:"row",className:"grid grid-cols-7 gap-1 mb-2",children:rd.map(D=>n.jsx("div",{role:"columnheader",className:"text-center text-xs font-medium text-fg-tertiary py-1",children:D},D))}),R.map((D,I)=>n.jsx("div",{role:"row",className:"grid grid-cols-7 gap-1",children:D.map((A,V)=>{if(!A)return n.jsx("div",{role:"gridcell",className:"aspect-square"},`empty-${I}-${V}`);const Y=u==="single"?ht(A,i):ht(A,(c==null?void 0:c.start)||null)||ht(A,(c==null?void 0:c.end)||null),H=u==="range"&&c?td(A,c.start,c.end):!1,W=Rn(A,p,m,h),ie=ht(A,new Date),ne=ht(A,g),F=ht(A,C);return n.jsx("button",{role:"gridcell",type:"button","data-date":A.toISOString(),tabIndex:F?0:-1,onClick:()=>_(A),onKeyDown:B=>L(B,A),className:`
177
+ */const bc=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ne=ie("x",bc),gc=ve("motion-safe:animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-8 w-8"},variant:{primary:"text-fg-brand",secondary:"text-fg-brand-secondary",neutral:"text-fg-secondary"}},defaultVariants:{size:"md",variant:"primary"}}),gs=l.memo(function(i){var c=i,{size:t="md",variant:r="primary",label:s,className:a=""}=c,o=O(c,["size","variant","label","className"]);return n.jsxs("div",z(T({className:w("inline-flex","items-center",a),role:"status","aria-label":s||"Loading","aria-live":"polite"},o),{children:[n.jsx(fa,{className:w(gc({size:t,variant:r})),"aria-hidden":"true"}),s&&n.jsx("span",{className:w(E("sm","ml"),re("bodySmall"),"text-fg-secondary","sr-only"),children:s})]}))});gs.displayName="Spinner";const xc=ve(w("inline-flex","items-center","justify-center",ce("button").split(" ")[2]||"font-medium",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{primary:w("bg-surface-brand-strong","text-fg-inverse","hover:opacity-90","focus:ring-line-brand"),secondary:w("bg-surface-secondary","text-fg-inverse","hover:opacity-90","focus:ring-line-secondary"),error:w("bg-error","text-fg-inverse","hover:opacity-90","focus:ring-error"),outline:w("border-2","border-line-default","bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),ghost:w("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),iconOnly:w("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus","p-0")},size:{sm:w(E("md","px"),E("1.5","py"),re("bodySmall"),E("1.5","gap")),md:w(E("base","px"),E("sm","py"),re("body"),E("sm","gap")),lg:w(E("lg","px"),E("md","py"),re("bodyLarge"),E("2.5","gap"))}},compoundVariants:[{variant:"iconOnly",size:"sm",class:w("h-8","w-8","p-0")},{variant:"iconOnly",size:"md",class:w("h-10","w-10","p-0")},{variant:"iconOnly",size:"lg",class:w("h-12","w-12","p-0")}],defaultVariants:{variant:"primary",size:"md"}});function $n({children:e,position:t}){return e?n.jsx("span",{className:`inline-flex items-center ${t==="left"?"mr-0":"ml-0"}`,children:e}):null}const Z=l.memo(l.forwardRef(function(y,v){var b=y,{variant:t="primary",size:r="md",isLoading:s=!1,loadingText:a,loadingIcon:o,leftIcon:i,rightIcon:c,fullWidth:u=!1,as:d="button",className:f="",disabled:p=!1,children:m,"aria-label":h}=b,x=O(b,["variant","size","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","as","className","disabled","children","aria-label"]);const j=l.useMemo(()=>w(xc({variant:t,size:r}),u&&"w-full",f),[t,r,u,f]),$=l.useMemo(()=>t==="iconOnly"||!m&&(i||c),[t,m,i,c]),g=l.useMemo(()=>$&&!h&&!m?"Button":h,[$,h,m]),k=l.useMemo(()=>t==="error"?"primary":t==="primary"||t==="secondary"?"neutral":"primary",[t]),N=l.useMemo(()=>r==="sm"?"sm":r==="lg"?"lg":"md",[r]),L=l.useMemo(()=>o||n.jsx(gs,{size:N,variant:k}),[o,N,k]),S=d==="button"&&!x.type?"button":void 0,D=T(T({className:j,disabled:p||s,"aria-busy":s,"aria-label":g,"aria-disabled":p||s},S?{type:S}:{}),x);return n.jsx(d,z(T({ref:v},D),{children:s?n.jsxs(n.Fragment,{children:[L,a&&n.jsx("span",{className:"ml-2",children:a}),!a&&m&&n.jsx("span",{className:"ml-2 opacity-0",children:m})]}):n.jsxs(n.Fragment,{children:[i&&n.jsx($n,{position:"left",children:i}),m,c&&n.jsx($n,{position:"right",children:c})]})}))}));Z.displayName="Button";const vc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>w(E("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),Se=l.memo(l.forwardRef(function($,j){var g=$,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,size:i="md",variant:c="outlined",leftIcon:u,rightIcon:d,showClearButton:f=!1,onClear:p,className:m="",disabled:h=!1,type:x="text",value:v,onChange:y}=g,b=O(g,["id","label","error","success","helperText","size","variant","leftIcon","rightIcon","showClearButton","onClear","className","disabled","type","value","onChange"]);const k=l.useMemo(()=>t||`input-${Math.random().toString(36).substr(2,9)}`,[t]),N=l.useMemo(()=>s?`${k}-error`:void 0,[s,k]),L=l.useMemo(()=>o?`${k}-helper`:void 0,[o,k]),[S,D]=l.useState(!1),R=l.useMemo(()=>x==="password",[x]),M=l.useMemo(()=>R&&S?"text":x,[R,S,x]),F=l.useMemo(()=>s?"error":a?"success":"default",[s,a]),I=l.useMemo(()=>v!=null&&v!=="",[v]),A=l.useMemo(()=>f&&I&&!h,[f,I,h]),W=l.useMemo(()=>"focus:border-line-focus",[]),K=l.useMemo(()=>"focus:border-error",[]),H=l.useMemo(()=>"focus:border-success",[]),U=l.useMemo(()=>W.replace("focus:border-","focus:ring-"),[W]),oe=l.useCallback(_=>_==="error"?K.replace("focus:border-","focus:ring-"):H.replace("focus:border-","focus:ring-"),[K,H]),ne=ve(w("w-full",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{default:w("border-0","border-b-2","border-line-default","focus:border-line-focus"),outlined:w("border","border-line-default","focus:border-line-focus"),filled:w("bg-surface-muted","border-0","focus:bg-surface-base","focus:ring-2",U)},size:{sm:w("h-8",re("bodySmall"),E("md","px")),md:w("h-10",re("body"),E("base","px")),lg:w("h-12",re("bodyLarge"),E("lg","px"))},state:{default:"",error:w("border-error","focus:border-error",oe("error")),success:w("border-success","focus:border-success",oe("success"))}},defaultVariants:{variant:"outlined",size:"md",state:"default"}}),P=l.useMemo(()=>w(ne({variant:c,size:i,state:F}),u&&(i==="sm"?"pl-9":i==="lg"?"pl-12":"pl-10"),(d||A||R)&&(i==="sm"?"pr-9":i==="lg"?"pr-12":"pr-10"),m),[c,i,F,u,d,A,R,m]),G=l.useMemo(()=>w("block",ce("label"),E("xs","mb"),h&&"opacity-50"),[h]),Y=l.useMemo(()=>i==="sm"?"h-4 w-4":i==="lg"?"h-5 w-5":"h-4 w-4",[i]),Q=l.useMemo(()=>i==="sm"?"top-2":i==="lg"?"top-3.5":"top-2.5",[i]),le=l.useCallback(_=>{var V;if(_.stopPropagation(),p)p();else if(y){const X=(V=_.currentTarget.closest(".relative"))==null?void 0:V.querySelector("input");if(X){const ae={target:X,currentTarget:X,bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:2,isTrusted:!1,nativeEvent:new Event("change"),preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},timeStamp:Date.now()};Object.defineProperty(ae.target,"value",{value:"",writable:!0}),Object.defineProperty(ae.currentTarget,"value",{value:"",writable:!0}),y(ae)}}},[p,y]),se=l.useCallback(()=>{D(_=>!_)},[]);return n.jsxs("div",{className:"w-full",children:[r&&n.jsx("label",{htmlFor:k,className:G,children:r}),n.jsxs("div",{className:"relative",children:[u&&n.jsx("div",{className:`absolute left-3 ${Q} text-fg-secondary opacity-60 pointer-events-none`,children:n.jsx("div",{className:Y,children:u})}),n.jsx("input",T({id:k,ref:j,type:M,className:P,disabled:h,value:v,onChange:y,"aria-invalid":s,"aria-required":b.required,"aria-describedby":N||L,suppressHydrationWarning:!0},b)),n.jsxs("div",{className:"absolute right-3 top-0 bottom-0 flex items-center gap-1",children:[A&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:le,className:"h-auto p-1","aria-label":"Clear input",children:n.jsx(Ne,{className:Y})}),R&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:se,className:"h-auto p-1","aria-label":S?"Hide password":"Show password",children:S?n.jsx(ql,{className:Y}):n.jsx(Kl,{className:Y})}),d&&!A&&!R&&n.jsx("div",{className:`text-fg-secondary opacity-60 pointer-events-none ${Y}`,children:d})]})]}),(s||a||o)&&n.jsx(vc,{error:s,success:a,helperText:o,errorId:N,helperId:L})]})}));Se.displayName="Input";function ma({href:e,active:t}){const r=l.useMemo(()=>t!==void 0?t:!1,[t]),s=l.useMemo(()=>{try{const a=typeof require!="undefined"?require("next/link"):null;return a==null?void 0:a.default}catch(a){return}},[]);return{isActive:r,NextLink:s}}const yc=ve(w("inline-flex","items-center","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","disabled:pointer-events-none","no-underline"),{variants:{variant:{default:w("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","focus:ring-line-brand"),underline:w("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","border-b-2","border-transparent","hover:border-current","focus:ring-line-brand"),background:w("text-fg-primary","hover:bg-surface-hover","rounded-md",J("md"),"focus:ring-line-brand")},size:{sm:w(E("sm","px"),E("xs","py"),re("bodySmall")),md:w(E("base","px"),E("sm","py"),re("body")),lg:w(E("lg","px"),E("md","py"),re("bodyLarge"))}},defaultVariants:{variant:"default",size:"md"},compoundVariants:[{variant:"underline",size:"sm",class:E("0.5","pb")},{variant:"underline",size:"md",class:E("xs","pb")},{variant:"underline",size:"lg",class:E("1.5","pb")},{variant:"background",size:"sm",class:E("xs","px")},{variant:"background",size:"md",class:E("sm","px")},{variant:"background",size:"lg",class:E("base","px")}]});function xs(m){var h=m,{href:e,children:t,active:r,disabled:s=!1,variant:a="default",size:o="md",as:i,className:c,"aria-label":u,onClick:d,onKeyDown:f}=h,p=O(h,["href","children","active","disabled","variant","size","as","className","aria-label","onClick","onKeyDown"]);const x=l.useMemo(()=>r!==void 0?r:!1,[r]),{NextLink:v}=ma({href:e,active:x}),y=i||v||"a",b=l.useMemo(()=>{if(!x)return"";switch(a){case"underline":return w("border-b-2","border-line-brand","text-fg-brand-emphasis");case"background":return w("bg-surface-brand-muted","text-fg-brand-emphasis");case"default":default:return w("text-fg-brand-emphasis","font-semibold")}},[x,a]),j=l.useCallback(k=>{if(s){k.preventDefault(),k.stopPropagation();return}d==null||d(k)},[s,d]),$=l.useCallback(k=>{if(s){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation());return}f==null||f(k)},[s,f]),g=l.useMemo(()=>{const k=T({className:w(yc({variant:a,size:o}),b,s&&"opacity-50 cursor-not-allowed pointer-events-none",c),"aria-current":x?"page":void 0,"aria-disabled":s?!0:void 0,"aria-label":u,tabIndex:s?-1:void 0,onClick:j,onKeyDown:$,"data-active":x,"data-disabled":s},p);return v&&!i?z(T({},k),{href:s?void 0:e}):z(T({},k),{href:s?void 0:e})},[a,o,b,s,c,x,u,j,$,e,v,i,p]);return n.jsx(y,z(T({},g),{children:t}))}const wc=ve(w("inline-flex","items-center","justify-center",Pe("label"),J("md"),"border"),{variants:{variant:{success:"",warning:"",error:"",info:"",neutral:"",primary:"",secondary:""},size:{sm:w(E("1.5","px"),E("0.5","py"),re("caption")),md:w(E("sm","px"),E("xs","py"),re("caption")),lg:w(E("sm","px"),E("xs","py"),re("bodySmall"))},style:{solid:"",outline:""}},compoundVariants:[{variant:"success",style:"solid",class:w("bg-success-bg","text-success-dark","border-success")},{variant:"warning",style:"solid",class:w("bg-warning-bg","text-warning-dark","border-warning")},{variant:"error",style:"solid",class:w("bg-error-bg","text-error-dark","border-error")},{variant:"info",style:"solid",class:w("bg-info-bg","text-info-dark","border-info")},{variant:"neutral",style:"solid",class:w("bg-surface-muted","text-fg-primary","border-line-default")},{variant:"primary",style:"solid",class:w("bg-surface-brand-subtle","text-fg-brand-emphasis","border-line-brand")},{variant:"secondary",style:"solid",class:w("bg-pink-300","text-fg-brand-secondary-emphasis","border-line-secondary")},{variant:"success",style:"outline",class:w("bg-transparent","border-success","text-fg-success")},{variant:"warning",style:"outline",class:w("bg-transparent","border-warning","text-fg-warning")},{variant:"error",style:"outline",class:w("bg-transparent","border-error","text-fg-error")},{variant:"info",style:"outline",class:w("bg-transparent","border-info","text-fg-info")},{variant:"neutral",style:"outline",class:w("bg-transparent","border-line-default","text-fg-secondary")},{variant:"primary",style:"outline",class:w("bg-transparent","border-line-brand","text-fg-brand")},{variant:"secondary",style:"outline",class:w("bg-transparent","border-line-secondary","text-fg-brand-secondary")}],defaultVariants:{variant:"neutral",size:"md",style:"solid"}}),pa=l.memo(l.forwardRef(function(d,u){var f=d,{variant:t="neutral",size:r="md",style:s="solid",className:a="",children:o,"aria-label":i}=f,c=O(f,["variant","size","style","className","children","aria-label"]);const p=l.useMemo(()=>w(wc({variant:t,size:r,style:s}),a),[t,r,s,a]),m=l.useMemo(()=>{if(i)return i;if(typeof o=="string")return o;if(typeof o=="object"&&o!==null&&"props"in o){const h=o.props;if(h!=null&&h.children&&typeof h.children=="string")return h.children}},[i,o]);return n.jsx("span",z(T({ref:u,role:"status","aria-label":m,className:p},c),{children:o}))}));pa.displayName="Badge";const kc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>w(E("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),jr=l.memo(l.forwardRef(function(x,h){var v=x,{options:t=[],optionGroups:r,placeholder:s,label:a,error:o=!1,success:i=!1,helperText:c,size:u="md",className:d="",disabled:f=!1,id:p}=v,m=O(v,["options","optionGroups","placeholder","label","error","success","helperText","size","className","disabled","id"]);const y=l.useMemo(()=>p||`select-${Math.random().toString(36).substr(2,9)}`,[p]),b=l.useMemo(()=>o?`${y}-error`:void 0,[o,y]),j=l.useMemo(()=>c?`${y}-helper`:void 0,[c,y]),$=l.useMemo(()=>"focus:border-line-focus",[]),g=l.useMemo(()=>"focus:border-error",[]),k=l.useMemo(()=>"focus:border-success",[]),N=l.useCallback(M=>M==="error"?g.replace("focus:border-","focus:ring-"):M==="success"?k.replace("focus:border-","focus:ring-"):$.replace("focus:border-","focus:ring-"),[g,k,$]),L=ve(w("block","w-full",J("md"),"border","bg-surface-base","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{size:{sm:w("h-8",re("bodySmall"),E("md","px")),md:w("h-10",re("body"),E("base","px")),lg:w("h-12",re("bodyLarge"),E("lg","px"))},state:{default:w("border-line-default",N()),error:w("border-error",N("error")),success:w("border-success",N("success"))}},defaultVariants:{size:"md",state:"default"}}),S=l.useMemo(()=>o?"error":i?"success":"default",[o,i]),D=l.useMemo(()=>w(L({size:u,state:S}),d),[u,S,d]),R=l.useMemo(()=>w("block",ce("label"),E("xs","mb"),f&&"opacity-50"),[f]);return n.jsxs("div",{className:"w-full",children:[a&&n.jsx("label",{htmlFor:y,className:R,children:a}),n.jsxs("select",z(T({id:y,ref:h,className:D,disabled:f,"aria-invalid":o,"aria-required":m.required,"aria-describedby":b||j},m),{children:[s&&n.jsx("option",{value:"",disabled:!0,children:s}),r&&r.length>0?r.map((M,F)=>n.jsx("optgroup",{label:M.label,children:(M.options||[]).map(I=>n.jsx("option",{value:I.value,disabled:I.disabled,children:I.label},I.value))},F)):(t||[]).map(M=>n.jsx("option",{value:M.value,disabled:M.disabled,children:M.label},M.value))]})),(o||i||c)&&n.jsx(kc,{error:o,success:i,helperText:c,errorId:b,helperId:j})]})}));jr.displayName="Select";const ha=l.memo(l.forwardRef(function(u,c){var d=u,{error:t=!1,resize:r="vertical",className:s="",label:a,id:o}=d,i=O(d,["error","resize","className","label","id"]);const f=l.useId(),p=o!=null?o:f,m=l.useMemo(()=>"focus:border-line-focus",[]),h=l.useMemo(()=>"focus:border-error",[]),x=l.useMemo(()=>t?h.replace("focus:border-","focus:ring-"):m.replace("focus:border-","focus:ring-"),[t,h,m]),v=l.useMemo(()=>({none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"}),[]),y=l.useMemo(()=>w("block","w-full",J("md"),E("base","px"),E("md","py"),"border",re("body"),"focus:outline-none","focus:ring-2","focus:ring-offset-2",v[r],w(t?"border-error":"border-line-default",x),s),[r,v,t,x,s]),b=l.useMemo(()=>t?`${p}-error`:void 0,[t,p]),j=i["aria-label"],$=i["aria-labelledby"];l.useEffect(()=>{process.env.NODE_ENV==="production"||a||j||$||typeof document!="undefined"&&document.querySelector(`label[for="${CSS.escape(p)}"]`)||console.warn("[Textarea] Missing accessible name. Provide a `label` prop, `aria-label`, `aria-labelledby`, or pair an external `<Label htmlFor={id}>` with the same `id`.")},[a,j,$,p]);const g=n.jsx("textarea",T({ref:c,id:p,className:y,"aria-invalid":t,"aria-describedby":b},i));return a?n.jsxs("div",{className:"block w-full",children:[n.jsx("label",{htmlFor:p,className:w("block","mb-1",re("label"),"font-medium","text-fg-primary"),children:a}),g]}):g}));ha.displayName="Textarea";const Tt=l.memo(l.forwardRef(function(i,o){var c=i,{variant:t="default",className:r="",children:s}=c,a=O(c,["variant","className","children"]);const u=l.useMemo(()=>w("block",re("label"),Pe("label"),"text-fg-primary"),[]),d=l.useMemo(()=>({default:"",required:w("after:content-['*']",`after:${E("0.5","ml")}`,"after:text-fg-error"),optional:w("after:content-['(optional)']","after:ml-1","after:text-fg-tertiary","after:font-normal")}),[]),f=l.useMemo(()=>w(u,d[t],r),[u,d,t,r]);return n.jsx("label",z(T({ref:o,className:f},a),{children:s}))}));Tt.displayName="Label";function ba(a){var o=a,{message:e,id:t,className:r=""}=o,s=O(o,["message","id","className"]);const i=[E("xs","mt"),re("bodySmall"),"text-fg-error","flex","items-center",E("xs","gap")],c=w(...i,r);return n.jsxs("div",z(T({role:"alert",id:t,className:c,"aria-live":"polite"},s),{children:[n.jsx(bs,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:e})]}))}class Fe{static createWidth(t){const s={none:{px:0,tailwind:"border-0"},thin:{px:1,tailwind:"border"},base:{px:1,tailwind:"border"},medium:{px:2,tailwind:"border-2"},thick:{px:4,tailwind:"border-4"}}[t];return{value:s.px,px:`${s.px}px`,tailwind:s.tailwind}}static create(t,r="solid"){return{width:this.createWidth(t),style:r,description:`${t} ${r} border`}}}Fe.create("none"),Fe.create("thin"),Fe.create("base"),Fe.create("medium"),Fe.create("thick"),Fe.create("thin","dashed"),Fe.create("base","dashed"),Fe.create("thin","dotted"),Fe.create("base","dotted");function jc(e){return Fe.createWidth(e).tailwind}function Bt(u){var d=u,{content:e,children:t,position:r="top",delay:s=200,className:a="","aria-label":o,preservePositioning:i=!1}=d,c=O(d,["content","children","position","delay","className","aria-label","preservePositioning"]);const[f,p]=l.useState(!1),m=l.useRef(null),h=l.useRef(null),x=l.useRef(null),v=`tooltip-${Math.random().toString(36).substr(2,9)}`,y=()=>{const R=setTimeout(()=>{p(!0)},s);m.current=R},b=()=>{m.current&&(clearTimeout(m.current),m.current=null),p(!1)},j=()=>{p(!0)},$=()=>{p(!1)},g=R=>{var M;R.key==="Escape"&&(p(!1),(M=x.current)==null||M.blur())};l.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),l.useEffect(()=>{if(!f)return;const R=M=>{h.current&&!h.current.contains(M.target)&&x.current&&!x.current.contains(M.target)&&p(!1)};return document.addEventListener("mousedown",R),()=>{document.removeEventListener("mousedown",R)}},[f]);const k=R=>({top:"border-t-surface-inverse",bottom:"border-b-surface-inverse",left:"border-l-surface-inverse",right:"border-r-surface-inverse"})[R],N=ve(w("absolute",ue("tooltip"),E("sm","px"),E("xs","py"),re("caption"),"text-fg-inverse","bg-surface-inverse",J("md"),"shadow-lg","whitespace-nowrap"),{variants:{position:{top:w("bottom-full","left-1/2","transform","-translate-x-1/2",E("sm","mb")),bottom:w("top-full","left-1/2","transform","-translate-x-1/2",E("sm","mt")),left:w("right-full","top-1/2","transform","-translate-y-1/2",E("sm","mr")),right:w("left-full","top-1/2","transform","-translate-y-1/2",E("sm","ml"))}},defaultVariants:{position:"top"}}),L=ve(w("absolute","w-0","h-0",jc("thick"),"border-transparent"),{variants:{position:{top:w("top-full","left-1/2","transform","-translate-x-1/2",k("top")),bottom:w("bottom-full","left-1/2","transform","-translate-x-1/2",k("bottom")),left:w("left-full","top-1/2","transform","-translate-y-1/2",k("left")),right:w("right-full","top-1/2","transform","-translate-y-1/2",k("right"))}},defaultVariants:{position:"top"}}),S=l.isValidElement(t)?(()=>{const R=t,M=R.props,F=M.ref;return l.cloneElement(R,{ref:I=>{x.current=I,typeof F=="function"?F(I):F&&typeof F=="object"&&"current"in F&&(F.current=I)},"aria-describedby":f?v:M["aria-describedby"],onMouseEnter:I=>{var A;y(),(A=M.onMouseEnter)==null||A.call(M,I)},onMouseLeave:I=>{var A;b(),(A=M.onMouseLeave)==null||A.call(M,I)},onFocus:I=>{var A;j(),(A=M.onFocus)==null||A.call(M,I)},onBlur:I=>{var A;$(),(A=M.onBlur)==null||A.call(M,I)},onKeyDown:I=>{var A;g(I),(A=M.onKeyDown)==null||A.call(M,I)}})})():t,D=w(i?"static":"relative","inline-block",a);return n.jsxs("div",z(T({className:D},c),{children:[S,f&&n.jsxs("div",{ref:h,id:v,className:w(N({position:r})),role:"tooltip","aria-live":"polite",children:[e,n.jsx("div",{className:w(L({position:r})),"aria-hidden":"true"})]})]}))}function ga(c){var u=c,{variant:e="text",width:t,height:r,lines:s=1,className:a="","aria-label":o}=u,i=O(u,["variant","width","height","lines","className","aria-label"]);const d=["motion-safe:animate-pulse","bg-surface-muted",J("sm")],f={text:"h-4",card:"h-32",list:"h-12",circle:"rounded-full"},p=w(...d,f[e],a),m={};t&&(m.width=t),r&&(m.height=r);const h=o||`Loading ${e} content`;return e==="text"&&s>1?n.jsx("div",z(T({className:E("sm","space-y"),role:"status","aria-busy":"true","aria-label":h},i),{children:Array.from({length:s}).map((x,v)=>n.jsx("div",{className:p,style:v===s-1?{width:"75%"}:m,"aria-hidden":"true"},v))})):n.jsx("div",T({className:p,style:m,role:"status","aria-busy":"true","aria-label":h},i))}function Nc({defaultOpen:e=!0,open:t,onOpenChange:r,storageKey:s}){const a=l.useCallback(()=>{if(s&&typeof window!="undefined"){const f=localStorage.getItem(s);if(f!==null)return f==="true"}return e},[e,s]),[o,i]=l.useState(a),c=t!==void 0?t:o;l.useEffect(()=>{s&&typeof window!="undefined"&&t===void 0&&localStorage.setItem(s,String(o))},[o,s,t]);const u=l.useCallback(f=>{t===void 0&&i(f),r==null||r(f)},[t,r]),d=l.useCallback(()=>{u(!c)},[c,u]);return{isOpen:c,toggle:d,setOpen:u}}function xa(f){var p=f,{children:e,trigger:t,defaultOpen:r=!0,open:s,onOpenChange:a,disabled:o=!1,duration:i=200,storageKey:c,className:u=""}=p,d=O(p,["children","trigger","defaultOpen","open","onOpenChange","disabled","duration","storageKey","className"]);const{isOpen:m,toggle:h}=Nc({defaultOpen:r,open:s,onOpenChange:a,storageKey:c}),x=l.useRef(null),[v,y]=l.useState(m?"auto":0);l.useEffect(()=>{x.current&&y(m?x.current.scrollHeight:0)},[m,e]),l.useEffect(()=>{if(!m||!x.current)return;const j=new ResizeObserver(()=>{x.current&&m&&y(x.current.scrollHeight)});return j.observe(x.current),()=>{j.disconnect()}},[m]);const b=`collapsible-content-${Math.random().toString(36).substr(2,9)}`;return n.jsxs("div",z(T({className:u},d),{children:[n.jsx("button",{type:"button",onClick:h,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),o||h())},disabled:o,"aria-expanded":m,"aria-controls":b,"aria-disabled":o,className:w("w-full","text-left","focus:outline-none","focus:ring-2","focus:ring-line-brand","focus:ring-offset-2",J("md")),children:t}),n.jsx("div",{id:b,ref:x,style:{height:typeof v=="number"?`${v}px`:v,overflow:"hidden",transition:`height ${i}ms ease-in-out`},"aria-hidden":!m,children:n.jsx("div",{children:e})})]}))}const Nr=l.memo(l.forwardRef(function(f,d){var p=f,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1,indeterminate:c=!1}=p,u=O(p,["id","label","error","helperText","className","disabled","indeterminate"]);const m=l.useMemo(()=>t||`checkbox-${Math.random().toString(36).substr(2,9)}`,[t]),h=l.useMemo(()=>s?`${m}-error`:void 0,[s,m]),x=l.useMemo(()=>a?`${m}-helper`:void 0,[a,m]),v=l.useMemo(()=>"focus:border-line-focus",[]),y=l.useMemo(()=>"focus:border-error",[]),b=l.useMemo(()=>s?y.replace("focus:border-","focus:ring-"):v.replace("focus:border-","focus:ring-"),[s,y,v]),j=l.useMemo(()=>w("h-4","w-4",J("sm"),"border","border-line-default","text-fg-brand","focus:ring-2",b,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[b,s,o]),$=l.useMemo(()=>w(ce("label"),E("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]),g=l.useRef(null),k=l.useCallback(N=>{g.current=N,typeof d=="function"?d(N):d&&(d.current=N),N&&(N.indeterminate=c)},[d,c]);return l.useEffect(()=>{g.current&&(g.current.indeterminate=c)},[c]),n.jsxs("div",{className:w("flex","flex-col",E("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",T({type:"checkbox",id:m,ref:k,className:j,disabled:i,"aria-invalid":s,"aria-describedby":h||x||void 0,"aria-label":r?void 0:"Checkbox"},u)),r&&n.jsx("label",{htmlFor:m,className:$,children:r})]}),(s||a)&&n.jsx("div",{id:h||x,className:w(E("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));Nr.displayName="Checkbox";const va=l.memo(l.forwardRef(function(d,u){var f=d,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1}=f,c=O(f,["id","label","error","helperText","className","disabled"]);const p=l.useMemo(()=>t||`radio-${Math.random().toString(36).substr(2,9)}`,[t]),m=l.useMemo(()=>s?`${p}-error`:void 0,[s,p]),h=l.useMemo(()=>a?`${p}-helper`:void 0,[a,p]),x=l.useMemo(()=>"focus:border-line-focus",[]),v=l.useMemo(()=>"focus:border-error",[]),y=l.useMemo(()=>s?v.replace("focus:border-","focus:ring-"):x.replace("focus:border-","focus:ring-"),[s,v,x]),b=l.useMemo(()=>w("h-4","w-4","border","border-line-default","text-fg-brand","focus:ring-2",y,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[y,s,o]),j=l.useMemo(()=>w(ce("label"),E("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]);return n.jsxs("div",{className:w("flex","flex-col",E("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",T({type:"radio",id:p,ref:u,className:b,disabled:i,"aria-invalid":s,"aria-describedby":m||h||void 0,"aria-label":r?void 0:"Radio button"},c)),r&&n.jsx("label",{htmlFor:p,className:j,children:r})]}),(s||a)&&n.jsx("div",{id:m||h,className:w(E("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));va.displayName="Radio";class mt{static create(t){return{none:{value:"none",tailwind:"shadow-none",description:"No shadow"},sm:{value:"0 1px 2px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-sm",description:"Small shadow for subtle elevation"},md:{value:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",tailwind:"shadow-md",description:"Medium shadow for cards and elevated elements"},lg:{value:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",tailwind:"shadow-lg",description:"Large shadow for modals and dropdowns"},xl:{value:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",tailwind:"shadow-xl",description:"Extra large shadow for prominent modals"},"2xl":{value:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",tailwind:"shadow-2xl",description:"2X large shadow for maximum elevation"},inner:{value:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-inner",description:"Inner shadow for inset elements"}}[t]}}const Sc={none:mt.create("none"),sm:mt.create("sm"),md:mt.create("md"),lg:mt.create("lg"),xl:mt.create("xl"),"2xl":mt.create("2xl"),inner:mt.create("inner")};function $e(e){return Sc[e].tailwind}const Ot={track:{sm:{w:"w-9",h:"h-5"},md:{w:"w-11",h:"h-6"},lg:{w:"w-14",h:"h-7"}},thumb:{sm:{w:"w-4",h:"h-4"},md:{w:"w-5",h:"h-5"},lg:{w:"w-6",h:"h-6"}},translate:{sm:"translate-x-4",md:"translate-x-5",lg:"translate-x-7"}};function Cc(e){return{track:`${Ot.track[e].w} ${Ot.track[e].h}`,thumb:`${Ot.thumb[e].w} ${Ot.thumb[e].h}`,translate:Ot.translate[e]}}const $c=ve("w-full",{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},variant:{primary:"bg-surface-muted",secondary:"bg-surface-muted",success:"bg-success-bg-emphasis",error:"bg-error-bg-emphasis",warning:"bg-warning-bg-emphasis",info:"bg-info-bg-emphasis"}},defaultVariants:{size:"md",variant:"primary"}}),En=ve("transition-all",{variants:{variant:{primary:"bg-surface-brand",secondary:"bg-surface-secondary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info"}},defaultVariants:{variant:"primary"}}),vs=l.forwardRef(function(p,f){var m=p,{value:t,max:r=100,variant:s="primary",size:a="md",showLabel:o=!1,label:i,"aria-label":c,className:u=""}=m,d=O(m,["value","max","variant","size","showLabel","label","aria-label","className"]);const h=t===void 0,x=h?void 0:Math.min(Math.max(t/r*100,0),100),v=c||(h?"Loading in progress":`Progress: ${x==null?void 0:x.toFixed(0)}%`);return n.jsxs("div",z(T({ref:f,className:w("w-full",u)},d),{children:[o&&(i||!h)&&n.jsxs("div",{className:w("flex","items-center","justify-between",E("xs","mb")),children:[i&&n.jsx("span",{className:w(re("bodySmall"),Pe("label"),"text-fg-primary"),children:i}),!h&&x!==void 0&&n.jsxs("span",{className:w(re("bodySmall"),"text-fg-secondary"),children:[x.toFixed(0),"%"]})]}),n.jsx("div",{role:"progressbar","aria-valuemin":h?void 0:0,"aria-valuemax":h?void 0:r,"aria-valuenow":h?void 0:t,"aria-label":v,"aria-busy":h,className:w("relative","w-full","overflow-hidden",$c({size:a,variant:s}),J("full")),children:h?n.jsx("div",{className:w("absolute","top-0","left-0","bottom-0",En({variant:s}),J("full"),"motion-reduce:animate-none"),style:{width:"30%",animation:"progress-indeterminate 1.5s ease-in-out infinite"}}):n.jsx("div",{className:w("h-full",En({variant:s}),J("full"),"transition-all","duration-300","ease-out"),style:{width:`${x}%`},"aria-hidden":"true"})})]}))});vs.displayName="Progress";const ya=l.memo(l.forwardRef(function(m,p){var h=m,{size:t="md",label:r,description:s,error:a=!1,className:o="",disabled:i=!1,checked:c,onChange:u,id:d}=h,f=O(h,["size","label","description","error","className","disabled","checked","onChange","id"]);const x=l.useMemo(()=>d||`switch-${Math.random().toString(36).substr(2,9)}`,[d]),v=l.useMemo(()=>r?`${x}-label`:void 0,[r,x]),y=l.useMemo(()=>s?`${x}-description`:void 0,[s,x]),b=l.useMemo(()=>Cc(t),[t]),j=l.useMemo(()=>"focus:border-line-focus".replace("focus:border-","focus:ring-"),[]),$=l.useMemo(()=>w("relative","inline-flex","shrink-0","cursor-pointer","rounded-full","border-2","border-transparent",be("base"),"focus:outline-none","focus:ring-2",j,"focus:ring-offset-2",b.track,c?"bg-surface-brand":"bg-surface-muted",a&&!c&&"border-error",i&&"opacity-50 cursor-not-allowed",o),[j,b.track,c,a,i,o]),g=l.useMemo(()=>w("pointer-events-none","inline-block","rounded-full","bg-surface-base","shadow","transform",be("base"),b.thumb,c?b.translate:"translate-x-0"),[b.thumb,b.translate,c]);return n.jsxs("div",{className:w("flex","items-start",E("md","gap")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("button",{type:"button",className:$,role:"switch","aria-checked":c,"aria-labelledby":v,"aria-describedby":y,disabled:i,onClick:l.useCallback(k=>{if(!i&&u){const N=z(T({},k),{target:z(T({},k.target),{checked:!c}),currentTarget:z(T({},k.currentTarget),{checked:!c})});u(N)}},[i,u,c]),onKeyDown:l.useCallback(k=>{if((k.key==="Enter"||k.key===" ")&&!i&&u){k.preventDefault();const N=z(T({},k),{target:z(T({},k.target),{checked:!c}),currentTarget:z(T({},k.currentTarget),{checked:!c})});u(N)}},[i,u,c]),children:n.jsx("span",{className:g})}),n.jsx("input",T({ref:p,type:"checkbox",id:x,checked:c,onChange:u,disabled:i,className:"sr-only","aria-hidden":"true",tabIndex:-1},f))]}),(r||s)&&n.jsxs("div",{className:"flex-1",children:[r&&n.jsx("label",{id:v,htmlFor:x,className:w("block",re("bodySmall"),Pe("label"),a?"text-fg-error":"text-fg-primary",i?"opacity-50":"cursor-pointer"),children:r}),s&&n.jsx("p",{id:y,className:w(E("xs","mt"),re("bodySmall"),a?"text-fg-error":"text-fg-secondary"),children:s})]})]})}));ya.displayName="Switch";const ys=l.memo(function(o){var i=o,{orientation:t="horizontal",variant:r="solid",className:s=""}=i,a=O(i,["orientation","variant","className"]);const c=l.useMemo(()=>{const u=["border-0","border-line-default"],d={horizontal:"w-full border-t",vertical:"h-full border-l self-stretch"},f={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"};return w(...u,d[t],f[r],s)},[t,r,s]);return t==="vertical"?n.jsx("div",T({className:c,role:"separator","aria-orientation":"vertical"},a)):n.jsx("hr",T({className:c,role:"separator","aria-orientation":"horizontal"},a))});ys.displayName="Separator";const wa=l.forwardRef(function(b,y){var j=b,{value:t,defaultValue:r,min:s=0,max:a=100,step:o=1,variant:i="single",size:c="md",disabled:u=!1,showValue:d=!1,marks:f=[],onChange:p,onValueChange:m,label:h,className:x=""}=j,v=O(j,["value","defaultValue","min","max","step","variant","size","disabled","showValue","marks","onChange","onValueChange","label","className"]);const $=l.useRef(null),g=l.useId(),k=l.useId(),N=l.useId(),[L,S]=l.useState(r||(i==="range"?[s,a]:s)),[D,R]=l.useState(!1),[M,F]=l.useState(null),I=t!==void 0,A=I?t:L,W=V=>(V-s)/(a-s)*100,K=V=>{if(!$.current)return s;const X=$.current.getBoundingClientRect(),ae=Math.max(0,Math.min(1,(V-X.left)/X.width)),fe=s+ae*(a-s);return Math.round(fe/o)*o},H=(V,X="min")=>{if(u)return;V.preventDefault(),R(!0),F(X);const ae=ke=>{if(!$.current)return;const je=K(ke.clientX);U(je,X)},fe=()=>{R(!1),F(null),document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",fe)};document.addEventListener("mousemove",ae),document.addEventListener("mouseup",fe)},U=(V,X="min")=>{const ae=Math.max(s,Math.min(a,V));if(i==="range"){const[fe,ke]=Array.isArray(A)?A:[s,a];let je;X==="min"?je=[Math.min(ae,ke),ke]:je=[fe,Math.max(ae,fe)],I||S(je),p==null||p(je),m==null||m(je)}else I||S(ae),p==null||p(ae),m==null||m(ae)},oe=V=>{if(u||D)return;const X=K(V.clientX);U(X)},ne=()=>"focus:ring-line-brand ring-offset-2",P=ve(w("relative","cursor-pointer"),{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),G=ve(w("absolute","bg-surface-brand","rounded-full","border-2","border-white","shadow-md","cursor-grab","active:cursor-grabbing",be("base"),"-translate-x-1/2","-translate-y-1/2","top-1/2"),{variants:{size:{sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"},active:{true:ne(),false:""}},defaultVariants:{size:"md",active:!1}}),Y=typeof A=="number"?A:A[0],Q=Array.isArray(A)?A[0]:s,le=Array.isArray(A)?A[1]:Y,se=W(Q),_=W(le);return n.jsxs("div",z(T({ref:y,className:w("w-full",x)},v),{children:[n.jsxs("label",{id:g,className:w("block",re("bodySmall"),Pe("label"),"text-fg-primary",E("sm","mb")),children:[h,d&&n.jsx("span",{className:w(E("sm","ml"),"text-fg-secondary"),children:i==="range"?`${Q} - ${le}`:Y})]}),i==="range"&&n.jsxs(n.Fragment,{children:[n.jsx("span",{id:k,className:"sr-only",children:"minimum"}),n.jsx("span",{id:N,className:"sr-only",children:"maximum"})]}),n.jsxs("div",{ref:$,className:w(P({size:c,disabled:u}),"bg-surface-muted",J("full")),onClick:oe,role:i==="range"?void 0:"slider","aria-valuemin":i==="range"?void 0:s,"aria-valuemax":i==="range"?void 0:a,"aria-valuenow":i==="range"?void 0:Y,"aria-disabled":i==="range"?void 0:u,"aria-labelledby":i==="range"?void 0:g,children:[n.jsx("div",{className:w("absolute",P({size:c}),"bg-surface-brand",J("full"),be("base")),style:{left:`${se}%`,width:`${_-se}%`}}),f.map(V=>{const X=W(V);return n.jsx("div",{className:w("absolute","w-1","h-1","bg-line-strong",J("full"),"-translate-x-1/2"),style:{left:`${X}%`,top:"50%",transform:"translate(-50%, -50%)"}},V)}),i==="range"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:w(G({size:c,active:M==="min"})),style:{left:`${se}%`},onMouseDown:V=>H(V,"min"),role:"slider","aria-valuemin":s,"aria-valuemax":le,"aria-valuenow":Q,"aria-labelledby":`${g} ${k}`}),n.jsx("div",{className:w(G({size:c,active:M==="max"})),style:{left:`${_}%`},onMouseDown:V=>H(V,"max"),role:"slider","aria-valuemin":Q,"aria-valuemax":a,"aria-valuenow":le,"aria-labelledby":`${g} ${N}`})]}):n.jsx("div",{className:w(G({size:c,active:D})),style:{left:`${_}%`},onMouseDown:V=>H(V)}),d&&!h&&n.jsx("div",{className:"absolute -top-6 left-0 right-0 flex justify-center",children:n.jsx("span",{className:w(re("caption"),"text-fg-secondary","bg-surface-overlay",E("sm","px"),E("xs","py"),J("md"),"shadow"),children:i==="range"?`${Q} - ${le}`:Y})})]})]}))});wa.displayName="Slider";const Ec=ve(w("inline-flex","items-center","font-medium",J("full"),E("xs","gap")),{variants:{variant:{default:w("bg-surface-muted","text-fg-primary","border","border-line-default"),outlined:w("bg-transparent","text-fg-primary","border","border-line-default"),filled:w("bg-surface-brand-strong","text-fg-inverse","border","border-transparent")},size:{sm:w(E("xs","px"),E("xs","py"),re("caption")),md:w(E("sm","px"),E("xs","py"),re("bodySmall")),lg:w(E("md","px"),E("sm","py"),re("body"))},selected:{true:w("bg-surface-brand-strong","text-fg-inverse","border","border-line-brand"),false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},compoundVariants:[{selected:!0,variant:"default",class:""},{selected:!0,variant:"outlined",class:""},{selected:!0,variant:"filled",class:""}],defaultVariants:{variant:"default",size:"md",selected:!1,disabled:!1}}),ws=l.forwardRef(function(h,m){var x=h,{children:t,variant:r="default",size:s="md",onRemove:a,selected:o=!1,disabled:i=!1,className:c="","aria-label":u,onClick:d,tabIndex:f}=x,p=O(x,["children","variant","size","onRemove","selected","disabled","className","aria-label","onClick","tabIndex"]);const y=(()=>{if(u)return u;if(typeof t=="string")return t;if(typeof t=="object"&&t!==null&&"props"in t){const g=t.props;if(g!=null&&g.children&&typeof g.children=="string")return g.children}})(),b=d!==void 0,j=b&&!i,$=g=>{i||(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),d==null||d())};return n.jsxs("div",z(T({ref:m,className:w(Ec({variant:r,size:s,selected:o,disabled:i}),a&&E("xs","pr"),c),"aria-disabled":i},p),{children:[b?n.jsx("button",{type:"button",onClick:i?void 0:d,onKeyDown:$,disabled:i,"aria-pressed":o?!0:void 0,"aria-label":u||y,tabIndex:f!==void 0?f:j?0:void 0,className:w("flex-1","bg-transparent","border-0","p-0","text-inherit","text-left","cursor-pointer","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",J("full")),children:t}):n.jsx("span",{children:t}),a&&!i&&n.jsx("button",{type:"button",onClick:g=>{g.stopPropagation(),a()},className:w(E("xs","ml"),"hover:bg-tint-hover",J("full"),E("xs","p"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1"),"aria-label":`Remove ${y||"chip"}`,children:n.jsx(Ne,{className:"h-3 w-3","aria-hidden":"true"})})]}))});ws.displayName="Chip";const ur=l.forwardRef(function(f,d){var p=f,{src:t,alt:r,fallback:s,size:a="md",variant:o="circle","aria-label":i,className:c=""}=p,u=O(p,["src","alt","fallback","size","variant","aria-label","className"]);const[m,h]=l.useState(!1),[x,v]=l.useState(!1),y={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},b={circle:"rounded-full",square:"rounded-none",rounded:"rounded-md"},j=!t||m,$=typeof s=="string"?s.toUpperCase().slice(0,2):s,g=i||r||"User avatar";return n.jsxs("div",z(T({ref:d,className:w("relative","inline-flex","items-center","justify-center","shrink-0","font-medium","overflow-hidden",y[a],b[o],"bg-surface-muted","text-fg-primary",c),role:"img","aria-label":g},u),{children:[!j&&t&&n.jsx("img",{src:t,alt:r||"",className:w("w-full","h-full","object-cover",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md",x?"opacity-100":"opacity-0","transition-opacity","duration-200"),onLoad:()=>v(!0),onError:()=>{h(!0),v(!1)},"aria-hidden":"true"}),j&&n.jsx("span",{className:w("flex","items-center","justify-center","w-full","h-full",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md"),"aria-hidden":"true",children:$||"?"})]}))});ur.displayName="Avatar";function Mc(c){var u=c,{children:e,max:t=3,size:r="md",variant:s="circle",spacing:a="md",className:o=""}=u,i=O(u,["children","max","size","variant","spacing","className"]);const d={none:"",sm:"-space-x-1",md:"-space-x-2",lg:"-space-x-3"},f=l.Children.toArray(e).filter(Boolean),p=f.slice(0,t),m=f.length-t;return n.jsxs("div",z(T({className:w("flex","items-center",d[a],o),role:"group","aria-label":`${f.length} avatars`},i),{children:[p.map((h,x)=>{let v=h;if(l.isValidElement(h)&&h.type===ur){const y=h.props;v=l.cloneElement(h,{size:y.size||r,variant:y.variant||s})}return n.jsx("div",{className:"ring-2 ring-surface-base",style:{zIndex:f.length-x},children:v},x)}),m>0&&n.jsx(ur,{size:r,variant:s,fallback:`+${m}`,"aria-label":`${m} more avatars`,className:"ring-2 ring-surface-base",style:{zIndex:0}})]}))}const fr=l.memo(function(d){var f=d,{variant:t="default",padding:r="medium",className:s="",onClick:a,"aria-label":o,"aria-labelledby":i,children:c}=f,u=O(f,["variant","padding","className","onClick","aria-label","aria-labelledby","children"]);const p=ve(w("bg-surface-base",J("lg"),"border","border-line-default","shadow-sm"),{variants:{variant:{default:"",hover:w("hover:shadow-md","transition-shadow","cursor-pointer"),selected:w("border-line-brand","shadow-md")},padding:{none:"",small:E("xs","p"),medium:E("base","p"),large:E("lg","p")}},defaultVariants:{variant:"default",padding:"medium"}}),m=l.useMemo(()=>a!==void 0||t==="hover",[a,t]),h=m?"button":void 0,x=m?0:void 0,v=w(p({variant:t,padding:r}),s),y=l.useCallback(b=>{m&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),a==null||a())},[m,a]);return n.jsx("div",z(T({className:v,role:h,tabIndex:x,onClick:a,onKeyDown:y,"aria-label":o,"aria-labelledby":i},u),{children:c}))});fr.displayName="Card";const Sr=l.createContext(void 0);function ks(){const e=l.useContext(Sr);if(e===void 0)throw new Error("useFormContext must be used within a Form component with react-hook-form integration");return e}function Tc(){return l.useContext(Sr)}function ka({form:e,loading:t=!1,children:r}){const s={form:e,loading:t};return n.jsx(Sr.Provider,{value:s,children:r})}function Ac(c){var u=c,{children:e,onSubmit:t,loading:r=!1,error:s=null,success:a=null,className:o=""}=u,i=O(u,["children","onSubmit","loading","error","success","className"]);const d=w(E("lg","gap"),"flex","flex-col",o);if("form"in i&&i.form!==void 0){const v=i,{form:b,onSubmit:j,onSubmitError:$}=v,g=O(v,["form","onSubmit","onSubmitError"]),k=b.handleSubmit(N=>rr(null,null,function*(){try{yield j(N)}catch(L){$==null||$(L)}}),N=>{$==null||$(N)});return n.jsx(ka,{form:b,loading:r,children:n.jsxs("form",z(T({className:d,onSubmit:k,noValidate:!0},g),{children:[e,s&&n.jsx("div",{role:"alert",className:w(E("md","p"),ye("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:w(E("md","p"),ye("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))})}const p=i.onSubmit||t,y=i,{onSubmit:m}=y,h=O(y,["onSubmit"]),x=b=>{b.preventDefault(),p&&!r&&p(b)};return n.jsxs("form",z(T({className:d,onSubmit:x,noValidate:!0},h),{children:[e,s&&n.jsx("div",{role:"alert",className:w(E("md","p"),ye("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:w(E("md","p"),ye("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))}function Rc({name:e,label:t,children:r,rules:s,className:a=""}){var m;const{form:o}=ks();if(!o)throw new Error("FormField must be used within a Form component with react-hook-form integration");const{register:i,formState:{errors:c},watch:u}=o,d=i(e,s),f=(m=c[e])==null?void 0:m.message,p=u(e);return n.jsxs("div",{className:w("flex","flex-col",E("sm","gap"),a),children:[t&&n.jsx(Tt,{htmlFor:e,className:w("block",ye("sm"),Mt("medium"),"text-fg-primary"),children:t}),r({name:e,register:h=>i(h,s),error:f,value:p,onChange:d.onChange,onBlur:d.onBlur}),f&&n.jsx(ba,{message:f})]})}var Ic=e=>e.type==="checkbox",Dc=e=>e instanceof Date,Ue=e=>e==null;const Fc=e=>typeof e=="object";var Ge=e=>!Ue(e)&&!Array.isArray(e)&&Fc(e)&&!Dc(e),Lc=e=>{const t=e.constructor&&e.constructor.prototype;return Ge(t)&&t.hasOwnProperty("isPrototypeOf")},ja=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function pt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList!="undefined"&&e instanceof FileList;if(ja&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(Ge(e)&&Lc(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=pt(e[a]));return s}var js=e=>/^\w*$/.test(e),ze=e=>e===void 0,Na=e=>Array.isArray(e)?e.filter(Boolean):[],Ns=e=>Na(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Le=(e,t,r)=>{if(!t||!Ge(e))return r;const s=(js(t)?[t]:Ns(t)).reduce((a,o)=>Ue(a)?a:a[o],e);return ze(s)||s===e?ze(e[t])?r:e[t]:s},Sa=e=>typeof e=="boolean",_c=e=>typeof e=="function",mr=(e,t,r)=>{let s=-1;const a=js(t)?[t]:Ns(t),o=a.length,i=o-1;for(;++s<o;){const c=a[s];let u=r;if(s!==i){const d=e[c];u=Ge(d)||Array.isArray(d)?d:isNaN(+a[s+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=u,e=e[c]}};const $t={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},He={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ca=l.createContext(null);Ca.displayName="HookFormControlContext";const Pc=()=>l.useContext(Ca),zc=typeof window!="undefined"?l.useLayoutEffect:l.useEffect;var Je=e=>typeof e=="string";const Oc=l.createContext(null);Oc.displayName="HookFormContext";var Vc=(e,t,r,s,a)=>t?z(T({},r[e]),{types:z(T({},r[e]&&r[e].types?r[e].types:{}),{[s]:a||!0})}):{},_e=e=>Array.isArray(e)?e:[e],pr=e=>Ge(e)&&!Object.keys(e).length,Wc=e=>e.type==="file",Hc=e=>{if(!ja)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Uc=e=>e.type==="radio";function Bc(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;)e=ze(e)?s++:e[t[s++]];return e}function qc(e){for(const t in e)if(e.hasOwnProperty(t)&&!ze(e[t]))return!1;return!0}function $a(e,t){const r=Array.isArray(t)?t:js(t)?[t]:Ns(t),s=r.length===1?e:Bc(e,r),a=r.length-1,o=r[a];return s&&delete s[o],a!==0&&(Ge(s)&&pr(s)||Array.isArray(s)&&qc(s))&&$a(e,r.slice(0,-1)),e}var Ea=e=>e instanceof RegExp,ir=e=>({isOnSubmit:!e||e===$t.onSubmit,isOnBlur:e===$t.onBlur,isOnChange:e===$t.onChange,isOnAll:e===$t.all,isOnTouch:e===$t.onTouched}),Gc=(e,t,r)=>t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length)));const os=(e,t,r,s)=>{for(const o of Object.keys(e)){const i=Le(e,o);if(i){const a=i,{_f:c}=a,u=O(a,["_f"]);if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],o))return!0;if(c.ref&&t(c.ref,c.name))return!0;if(os(u,t))break}else if(Ge(u)&&os(u,t))break}}};var Kc=(e,t,r)=>{const s=_e(Le(e,r));return mr(s,"root",t[r]),mr(e,r,s),e};function Mn(e,t,r="validate"){if(Je(e)||Array.isArray(e)&&e.every(Je)||Sa(e)&&!e)return{type:r,message:Je(e)?e:"",ref:t}}var St=e=>Ge(e)&&!Ea(e)?e:{value:e,message:""},Yc=(e,t,r,s,a,o)=>rr(null,null,function*(){const{ref:i,refs:c,required:u,maxLength:d,minLength:f,min:p,max:m,pattern:h,validate:x,name:v,valueAsNumber:y,mount:b}=e._f,j=Le(r,v);if(!b||t.has(v))return{};const $=c?c[0]:i,g=D=>{a&&$.reportValidity&&($.setCustomValidity(Sa(D)?"":D||""),$.reportValidity())},k={};Uc(i),Ic(i);const N=(y||Wc(i))&&ze(i.value)&&ze(j)||Hc(i)&&i.value===""||j===""||Array.isArray(j)&&!j.length,L=Vc.bind(null,v,s,k),S=(D,R,M,F=He.maxLength,I=He.minLength)=>{const A=D?R:M;k[v]=T({type:D?F:I,message:A,ref:i},L(D?F:I,A))};if(!Array.isArray(j)||!j.length){const{value:D,message:R}=Je(u)?{value:!!u,message:u}:St(u);if(D&&(k[v]=T({type:He.required,message:R,ref:$},L(He.required,R)),!s))return g(R),k}if(!N&&(!Ue(p)||!Ue(m))){let D,R;const M=St(m),F=St(p);if(!Ue(j)&&!isNaN(j)){const I=i.valueAsNumber||j&&+j;Ue(M.value)||(D=I>M.value),Ue(F.value)||(R=I<F.value)}else{const I=i.valueAsDate||new Date(j),A=H=>new Date(new Date().toDateString()+" "+H),W=i.type=="time",K=i.type=="week";Je(M.value)&&j&&(D=W?A(j)>A(M.value):K?j>M.value:I>new Date(M.value)),Je(F.value)&&j&&(R=W?A(j)<A(F.value):K?j<F.value:I<new Date(F.value))}if((D||R)&&(S(!!D,M.message,F.message,He.max,He.min),!s))return g(k[v].message),k}if((d||f)&&!N&&(Je(j)||Array.isArray(j))){const D=St(d),R=St(f),M=!Ue(D.value)&&j.length>+D.value,F=!Ue(R.value)&&j.length<+R.value;if((M||F)&&(S(M,D.message,R.message),!s))return g(k[v].message),k}if(h&&!N&&Je(j)){const{value:D,message:R}=St(h);if(Ea(D)&&!j.match(D)&&(k[v]=T({type:He.pattern,message:R,ref:i},L(He.pattern,R)),!s))return g(R),k}if(x){if(_c(x)){const D=yield x(j,r),R=Mn(D,$);if(R&&(k[v]=T(T({},R),L(He.validate,R.message)),!s))return g(R.message),k}else if(Ge(x)){let D={};for(const R in x){if(!pr(D)&&!s)break;const M=Mn(yield x[R](j,r),$,R);M&&(D=T(T({},M),L(R,M.message)),g(M.message),s&&(k[v]=D))}if(!pr(D)&&(k[v]=T({ref:$},D),!s))return k}}return g(!0),k}),Xe=()=>{if(typeof crypto!="undefined"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance=="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Kr=(e,t,r={})=>r.shouldFocus||ze(r.shouldFocus)?r.focusName||`${e}.${ze(r.focusIndex)?t:r.focusIndex}.`:"",Yr=(e,t)=>[...e,..._e(t)],Xr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Jr(e,t,r){return[...e.slice(0,t),..._e(r),...e.slice(t)]}var Qr=(e,t,r)=>Array.isArray(e)?(ze(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Zr=(e,t)=>[..._e(t),..._e(e)];function Xc(e,t){let r=0;const s=[...e];for(const a of t)s.splice(a-r,1),r++;return Na(s).length?s:[]}var es=(e,t)=>ze(t)?[]:Xc(e,_e(t).sort((r,s)=>r-s)),ts=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Tn=(e,t,r)=>(e[t]=r,e);function Jc(e){const t=Pc(),{control:r=t,name:s,keyName:a="id",shouldUnregister:o,rules:i}=e,[c,u]=l.useState(r._getFieldArray(s)),d=l.useRef(r._getFieldArray(s).map(Xe)),f=l.useRef(!1);r._names.array.add(s),l.useMemo(()=>i&&c.length>=0&&r.register(s,i),[r,s,c.length,i]),zc(()=>r._subjects.array.subscribe({next:({values:g,name:k})=>{if(k===s||!k){const N=Le(g,s);Array.isArray(N)&&(u(N),d.current=N.map(Xe))}}}).unsubscribe,[r,s]);const p=l.useCallback(g=>{f.current=!0,r._setFieldArray(s,g)},[r,s]),m=(g,k)=>{const N=_e(pt(g)),L=Yr(r._getFieldArray(s),N);r._names.focus=Kr(s,L.length-1,k),d.current=Yr(d.current,N.map(Xe)),p(L),u(L),r._setFieldArray(s,L,Yr,{argA:Xr(g)})},h=(g,k)=>{const N=_e(pt(g)),L=Zr(r._getFieldArray(s),N);r._names.focus=Kr(s,0,k),d.current=Zr(d.current,N.map(Xe)),p(L),u(L),r._setFieldArray(s,L,Zr,{argA:Xr(g)})},x=g=>{const k=es(r._getFieldArray(s),g);d.current=es(d.current,g),p(k),u(k),!Array.isArray(Le(r._fields,s))&&mr(r._fields,s,void 0),r._setFieldArray(s,k,es,{argA:g})},v=(g,k,N)=>{const L=_e(pt(k)),S=Jr(r._getFieldArray(s),g,L);r._names.focus=Kr(s,g,N),d.current=Jr(d.current,g,L.map(Xe)),p(S),u(S),r._setFieldArray(s,S,Jr,{argA:g,argB:Xr(k)})},y=(g,k)=>{const N=r._getFieldArray(s);ts(N,g,k),ts(d.current,g,k),p(N),u(N),r._setFieldArray(s,N,ts,{argA:g,argB:k},!1)},b=(g,k)=>{const N=r._getFieldArray(s);Qr(N,g,k),Qr(d.current,g,k),p(N),u(N),r._setFieldArray(s,N,Qr,{argA:g,argB:k},!1)},j=(g,k)=>{const N=pt(k),L=Tn(r._getFieldArray(s),g,N);d.current=[...L].map((S,D)=>!S||D===g?Xe():d.current[D]),p(L),u([...L]),r._setFieldArray(s,L,Tn,{argA:g,argB:N},!0,!1)},$=g=>{const k=_e(pt(g));d.current=k.map(Xe),p([...k]),u([...k]),r._setFieldArray(s,[...k],N=>N,{},!0,!1)};return l.useEffect(()=>{if(r._state.action=!1,Gc(s,r._names)&&r._subjects.state.next(T({},r._formState)),f.current&&(!ir(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!ir(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([s]).then(g=>{r._updateIsValidating([s]);const k=Le(g.errors,s),N=Le(r._formState.errors,s);(N?!k&&N.type||k&&(N.type!==k.type||N.message!==k.message):k&&k.type)&&(k?mr(r._formState.errors,s,k):$a(r._formState.errors,s),r._subjects.state.next({errors:r._formState.errors}))});else{const g=Le(r._fields,s);g&&g._f&&!(ir(r._options.reValidateMode).isOnSubmit&&ir(r._options.mode).isOnSubmit)&&Yc(g,r._names.disabled,r._formValues,r._options.criteriaMode===$t.all,r._options.shouldUseNativeValidation).then(k=>!pr(k)&&r._subjects.state.next({errors:Kc(r._formState.errors,k,s)}))}r._subjects.state.next({name:s,values:pt(r._formValues)}),r._names.focus&&os(r._fields,(g,k)=>{if(r._names.focus&&k.startsWith(r._names.focus)&&g.focus)return g.focus(),1}),r._names.focus="",r._setValid(),f.current=!1},[c,s,r]),l.useEffect(()=>(!Le(r._formValues,s)&&r._setFieldArray(s),()=>{const g=(k,N)=>{const L=Le(r._fields,k);L&&L._f&&(L._f.mount=N)};r._options.shouldUnregister||o?r.unregister(s):g(s,!1)}),[s,r,a,o]),{swap:l.useCallback(y,[p,s,r]),move:l.useCallback(b,[p,s,r]),prepend:l.useCallback(h,[p,s,r]),append:l.useCallback(m,[p,s,r]),remove:l.useCallback(x,[p,s,r]),insert:l.useCallback(v,[p,s,r]),update:l.useCallback(j,[p,s,r]),replace:l.useCallback($,[p,s,r]),fields:l.useMemo(()=>c.map((g,k)=>z(T({},g),{[a]:d.current[k]||Xe()})),[c,a])}}function Qc(e){const{form:t}=ks();if(!t)throw new Error("useFormFieldArray must be used within a Form component with react-hook-form integration");return Jc(z(T({},e),{control:t.control}))}function Ma(a){var o=a,{items:e,separator:t="/",className:r=""}=o,s=O(o,["items","separator","className"]);const i=["flex","items-center",E("sm","space-x"),re("bodySmall")],c=w(...i,r);return n.jsx("nav",z(T({"aria-label":"Breadcrumb",className:c},s),{children:n.jsx("ol",{className:w("flex","items-center",E("sm","space-x")),children:e.map((u,d)=>{const f=d===e.length-1;return n.jsxs("li",{className:"flex items-center",children:[d>0&&n.jsx("span",{className:w(E("sm","mx"),"text-fg-tertiary"),"aria-hidden":"true",children:t}),f?n.jsx("span",{className:w("text-fg-primary",Pe("label")),"aria-current":"page",children:u.label}):u.href?n.jsx("a",{href:u.href,className:w("inline-flex","items-center",E("xs","px"),E("xs","pt"),"border-b-2","border-transparent",re("bodySmall"),Pe("label"),"transition-colors","text-fg-secondary","hover:border-line-emphasis","hover:text-fg-primary"),children:u.label}):n.jsx("span",{className:"text-fg-secondary",children:u.label})]},d)})})}))}function Ta(u){var d=u,{currentPage:e,totalPages:t,onPageChange:r,totalItems:s,itemsPerPage:a,showPageInfo:o=!0,className:i=""}=d,c=O(d,["currentPage","totalPages","onPageChange","totalItems","itemsPerPage","showPageInfo","className"]);const f=()=>{e>1&&r(e-1)},p=()=>{e<t&&r(e+1)},m=b=>{b>=1&&b<=t&&b!==e&&r(b)},h=()=>{const b=[];if(t<=5)for(let $=1;$<=t;$++)b.push($);else if(e<=3){for(let $=1;$<=4;$++)b.push($);b.push("ellipsis"),b.push(t)}else if(e>=t-2){b.push(1),b.push("ellipsis");for(let $=t-3;$<=t;$++)b.push($)}else{b.push(1),b.push("ellipsis");for(let $=e-1;$<=e+1;$++)b.push($);b.push("ellipsis"),b.push(t)}return b},x=s&&a?(e-1)*a+1:void 0,v=s&&a?Math.min(e*a,s):void 0,y=w("flex","items-center","justify-between",E("base","px"),E("md","py"),i);return n.jsxs("nav",z(T({className:y,"aria-label":"Pagination"},c),{children:[n.jsxs("div",{className:w("flex","items-center",E("sm","gap")),children:[n.jsx(Z,{variant:"secondary",onClick:f,disabled:e===1,size:"sm",children:"Previous"}),n.jsx("div",{className:w("flex","items-center",E("xs","gap")),children:h().map((b,j)=>{if(b==="ellipsis")return n.jsx("span",{className:w(E("sm","px"),"text-fg-tertiary"),children:"..."},`ellipsis-${j}`);const $=b,g=$===e;return n.jsx(Z,{variant:g?"primary":"ghost",onClick:()=>m($),size:"sm","aria-current":g?"page":void 0,"aria-label":`Go to page ${$}`,children:$},$)})}),n.jsx(Z,{variant:"secondary",onClick:p,disabled:e===t,size:"sm",children:"Next"})]}),o&&s&&a&&n.jsxs("div",{className:w(ye("sm"),"text-fg-primary"),children:["Showing ",x," to ",v," of ",s," results"]})]}))}function Aa(u){var d=u,{title:e,message:t,actionLabel:r,onAction:s,illustration:a,variant:o="default",className:i=""}=d,c=O(d,["title","message","actionLabel","onAction","illustration","variant","className"]);const f=w("flex","flex-col","items-center","justify-center","text-center",E("xl","py"),E("base","px"),i),p=o==="withAction"||r&&s,m=o==="withIllustration"||a;return n.jsxs("div",z(T({className:f,role:"status","aria-live":"polite","aria-label":`${e}. ${t}`},c),{children:[m&&a&&n.jsx("div",{className:w(E("base","mb")),"aria-hidden":"true",children:a}),n.jsx(Be,{as:"h3",className:w(re("h4"),Mt("semibold"),"text-fg-primary",E("sm","mb")),children:e}),n.jsx(Be,{as:"p",className:w(re("bodySmall"),"text-fg-secondary",E("md","mb"),"max-w-sm"),children:t}),p&&r&&s&&n.jsx(Z,{variant:"primary",onClick:s,children:r})]}))}function Ra(c){var u=c,{trigger:e,items:t,align:r="right",variant:s="default",className:a="","aria-label":o}=u,i=O(u,["trigger","items","align","variant","className","aria-label"]);const[d,f]=l.useState(!1),[p,m]=l.useState(-1),h=l.useRef(null),x=l.useRef(null),v=l.useRef(null),y=l.useRef([]),b=`dropdown-menu-${Math.random().toString(36).substr(2,9)}`,j=`dropdown-trigger-${Math.random().toString(36).substr(2,9)}`;l.useEffect(()=>{const S=D=>{h.current&&!h.current.contains(D.target)&&(f(!1),m(-1))};return d&&(document.addEventListener("mousedown",S),setTimeout(()=>{var R;const D=t.findIndex(M=>!M.disabled);D>=0&&(m(D),(R=y.current[D])==null||R.focus())},0)),()=>{document.removeEventListener("mousedown",S)}},[d,t]),l.useEffect(()=>{if(!d)return;const S=R=>{var I,A,W,K;const M=t.map((H,U)=>({item:H,index:U})).filter(({item:H})=>!H.disabled),F=M.findIndex(({index:H})=>H===p);switch(R.key){case"ArrowDown":{R.preventDefault();const H=F<M.length-1?M[F+1].index:M[0].index;m(H),(I=y.current[H])==null||I.focus();break}case"ArrowUp":{R.preventDefault();const H=F>0?M[F-1].index:M[M.length-1].index;m(H),(A=y.current[H])==null||A.focus();break}case"Home":{R.preventDefault();const H=M[0].index;m(H),(W=y.current[H])==null||W.focus();break}case"End":{R.preventDefault();const H=M[M.length-1].index;m(H),(K=y.current[H])==null||K.focus();break}case"Enter":case" ":R.preventDefault(),p>=0&&!t[p].disabled&&$(t[p]);break;case"Escape":R.preventDefault(),f(!1),m(-1),setTimeout(()=>{var H;(H=x.current)==null||H.focus()},0);break}},D=v.current;if(D){const R=S;return D.addEventListener("keydown",R),()=>{D.removeEventListener("keydown",R)}}},[d,p,t]);const $=S=>{S.disabled||(S.onClick(),f(!1),m(-1),setTimeout(()=>{var D;(D=x.current)==null||D.focus()},0))},g=()=>{f(!d),m(-1)},k=S=>{(S.key==="Enter"||S.key===" "||S.key==="ArrowDown")&&(S.preventDefault(),f(!0))},N=r==="right"?"right-0":"left-0",L=l.isValidElement(e)?l.cloneElement(e,{onClick:S=>{g(),e.props.onClick&&e.props.onClick(S)},onKeyDown:S=>{k(S),e.props.onKeyDown&&e.props.onKeyDown(S)},"aria-haspopup":"menu","aria-expanded":d,"aria-controls":b,"aria-label":o||e.props["aria-label"]||"Open menu",id:j,ref:S=>{x.current=S,typeof e.ref=="function"?e.ref(S):e.ref&&(e.ref.current=S)}}):n.jsx("div",{ref:x,onClick:g,onKeyDown:k,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":b,"aria-label":o||"Open menu",id:j,children:e});return n.jsxs("div",z(T({className:w("relative","inline-block",a),ref:h},i),{children:[L,d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:w("fixed","inset-0","z-10"),onClick:()=>{f(!1),m(-1)},"aria-hidden":"true"}),n.jsx("div",{ref:v,id:b,className:w("absolute","z-20",E("sm","mt"),"w-48",J("md"),$e("lg"),"bg-surface-overlay","ring-1","ring-line-strong","ring-opacity-5",N),role:"menu","aria-orientation":"vertical","aria-labelledby":j,"aria-activedescendant":p>=0?`${b}-item-${p}`:void 0,children:n.jsx("div",{className:w(E("xs","py")),role:"none",children:t.map((S,D)=>{const R=w("block",E("base","px"),E("xs","py"),re("bodySmall"),"w-full","text-left","focus:outline-none",S.disabled?w("text-fg-disabled","cursor-not-allowed","opacity-50"):S.variant==="danger"?w("text-error-dark","hover:bg-error-bg-emphasis","focus:bg-error-bg-emphasis"):w("text-fg-primary","hover:bg-surface-hover","focus:bg-surface-hover"));return n.jsx("button",{id:`${b}-item-${D}`,ref:M=>{y.current[D]=M},type:"button",className:R,onClick:()=>$(S),disabled:S.disabled,role:"menuitem","aria-disabled":S.disabled,tabIndex:S.disabled?-1:p===D?0:-1,children:S.label},D)})})})]})]}))}const Ia=l.createContext(void 0);function Da(){const e=l.useContext(Ia);if(!e)throw new Error("DatePicker components must be used within a DatePicker component");return e}function is({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,locale:u}){const d=()=>{if(r!==void 0)return null;if(s){if(t==="single"&&s instanceof Date)return s;if(t==="range"&&typeof s=="object"&&"start"in s)return null}return null},f=()=>r!==void 0?null:s&&t==="range"&&typeof s=="object"&&"start"in s?s:{start:null,end:null},[p,m]=l.useState(d()),[h,x]=l.useState(f()),v=t==="single"?r instanceof Date?r:p:null,y=t==="range"?r&&typeof r=="object"&&"start"in r?r:h:null,$={selectedDate:v,selectedRange:y,mode:t,onDateChange:g=>{t==="single"&&(r===void 0&&m(g),a==null||a(g))},onRangeChange:g=>{t==="range"&&(r===void 0&&x(g),a==null||a(g))},minDate:o,maxDate:i,disabledDates:c,locale:u};return n.jsx(Ia.Provider,{value:$,children:e})}function Vt(e,t="yyyy-MM-dd"){const r=e.getFullYear(),s=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",s).replace("dd",a).replace("MM/dd/yyyy",`${s}/${a}/${r}`).replace("dd/MM/yyyy",`${a}/${s}/${r}`)}function An(e){if(!e)return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(t){const[,a,o,i]=t,c=new Date(parseInt(a),parseInt(o)-1,parseInt(i));if(!isNaN(c.getTime()))return c}const r=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(r){const[,a,o,i]=r,c=new Date(parseInt(i),parseInt(a)-1,parseInt(o));if(!isNaN(c.getTime()))return c}const s=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(s){const[,a,o,i]=s,c=new Date(parseInt(i),parseInt(o)-1,parseInt(a));if(!isNaN(c.getTime()))return c}return null}function Ss(c){var u=c,{placeholder:e="Select date",format:t="yyyy-MM-dd",showCalendarButton:r=!0,"aria-label":s,onFocus:a,className:o=""}=u,i=O(u,["placeholder","format","showCalendarButton","aria-label","onFocus","className"]);const{selectedDate:d,selectedRange:f,mode:p,onDateChange:m}=Da(),[h,x]=l.useState(""),[v,y]=l.useState(!1),b=l.useRef(null);l.useEffect(()=>{p==="single"&&d?x(Vt(d,t)):p==="range"&&f?f.start&&f.end?x(`${Vt(f.start,t)} - ${Vt(f.end,t)}`):f.start?x(Vt(f.start,t)):x(""):x("")},[d,f,p,t]);const j=k=>{const N=k.target.value;if(x(N),p==="single"){const L=An(N);m(L)}},$=()=>{if(y(!1),h&&p==="single"){const k=An(h);k&&x(Vt(k,t))}},g=()=>{var k;(k=b.current)==null||k.focus()};return n.jsx("div",z(T({className:`relative ${o}`},i),{children:n.jsx(Se,{ref:b,type:"text",value:h,onChange:j,onFocus:()=>{y(!0),a==null||a()},onBlur:$,placeholder:e,"aria-label":s||e,rightIcon:r?n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:g,"aria-label":"Open calendar",type:"button",children:n.jsx(Tl,{className:"h-4 w-4"})}):void 0})}))}function Zc(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function ed(e){return new Date(e.getFullYear(),e.getMonth(),1).getDay()}function ht(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Wt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function td(e,t,r){if(!t||!r)return!1;const s=e.getTime();return s>=t.getTime()&&s<=r.getTime()}function Rn(e,t,r,s){return!!(t&&e<t||r&&e>r||s!=null&&s.some(a=>ht(e,a)))}const rd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],sd=["January","February","March","April","May","June","July","August","September","October","November","December"];function Cs(a){var o=a,{month:e,onMonthChange:t,className:r=""}=o,s=O(o,["month","onMonthChange","className"]);const{selectedDate:i,selectedRange:c,mode:u,onDateChange:d,onRangeChange:f,minDate:p,maxDate:m,disabledDates:h}=Da(),[x,v]=l.useState(e||i||(c==null?void 0:c.start)||new Date),y=l.useRef(null),[b,j]=l.useState(()=>{const F=new Date,I=e||i||(c==null?void 0:c.start)||F;return i&&Wt(i,I)?i:Wt(F,I)?F:new Date(I.getFullYear(),I.getMonth(),1)});l.useEffect(()=>{e&&v(e)},[e]),l.useEffect(()=>{if(!y.current)return;const F=y.current.querySelector(`[data-date="${b.toISOString()}"]`);F&&F.focus()},[b]);const $=(()=>{if(Wt(b,x))return b;const F=new Date;return Wt(F,x)?F:new Date(x.getFullYear(),x.getMonth(),1)})(),g=Zc(x),k=ed(x),N=[];for(let F=0;F<k;F++)N.push(null);for(let F=1;F<=g;F++)N.push(new Date(x.getFullYear(),x.getMonth(),F));const L=F=>{if(!Rn(F,p,m,h)){if(u==="single")d(F);else if(u==="range"){const I=c||{start:null,end:null};!I.start||I.start&&I.end?f({start:F,end:null}):I.start&&!I.end&&(F<I.start?f({start:F,end:I.start}):f({start:I.start,end:F}))}}},S=()=>{const F=new Date(x.getFullYear(),x.getMonth()-1,1);v(F),t==null||t(F)},D=()=>{const F=new Date(x.getFullYear(),x.getMonth()+1,1);v(F),t==null||t(F)},R=(F,I)=>{let A=null;switch(F.key){case"ArrowLeft":F.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),I.getDate()-1);break;case"ArrowRight":F.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),I.getDate()+1);break;case"ArrowUp":F.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),I.getDate()-7);break;case"ArrowDown":F.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),I.getDate()+7);break;case"Home":F.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),1);break;case"End":F.preventDefault(),A=new Date(I.getFullYear(),I.getMonth()+1,0);break;case"Enter":case" ":F.preventDefault(),L(I);return}A&&(Wt(A,x)||v(new Date(A.getFullYear(),A.getMonth(),1)),j(A))},M=[];for(let F=0;F<N.length;F+=7)M.push(N.slice(F,F+7));return n.jsxs("div",z(T({ref:y,className:`p-4 ${r}`},s),{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:S,"aria-label":"Previous month",children:n.jsx(Ut,{className:"h-4 w-4"})}),n.jsxs("div",{className:"text-sm font-semibold",children:[sd[x.getMonth()]," ",x.getFullYear()]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:D,"aria-label":"Next month",children:n.jsx(bt,{className:"h-4 w-4"})})]}),n.jsxs("div",{role:"grid","aria-label":"Calendar",children:[n.jsx("div",{role:"row",className:"grid grid-cols-7 gap-1 mb-2",children:rd.map(F=>n.jsx("div",{role:"columnheader",className:"text-center text-xs font-medium text-fg-tertiary py-1",children:F},F))}),M.map((F,I)=>n.jsx("div",{role:"row",className:"grid grid-cols-7 gap-1",children:F.map((A,W)=>{if(!A)return n.jsx("div",{role:"gridcell",className:"aspect-square"},`empty-${I}-${W}`);const K=u==="single"?ht(A,i):ht(A,(c==null?void 0:c.start)||null)||ht(A,(c==null?void 0:c.end)||null),H=u==="range"&&c?td(A,c.start,c.end):!1,U=Rn(A,p,m,h),oe=ht(A,new Date),ne=ht(A,b),P=ht(A,$);return n.jsx("button",{role:"gridcell",type:"button","data-date":A.toISOString(),tabIndex:P?0:-1,onClick:()=>L(A),onKeyDown:G=>R(G,A),className:`
178
178
  aspect-square
179
179
  text-sm
180
180
  ${J("md")}
@@ -182,18 +182,18 @@ React keys must be passed directly to JSX without using spread:
182
182
  focus:outline-none
183
183
  focus:ring-2
184
184
  focus:ring-offset-1
185
- ${W?"text-fg-disabled cursor-not-allowed opacity-50":Y?"bg-surface-brand-strong text-fg-inverse font-semibold":H?"bg-surface-brand-muted text-fg-brand-emphasis":ie?"border-2 border-line-brand font-semibold":ne?"bg-surface-brand-muted":"hover:bg-surface-active"}
186
- `,"aria-label":A.toDateString(),"aria-selected":Y,"aria-disabled":W,children:A.getDate()},A.toISOString())})},`week-${I}`))]})]}))}function Cr({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,placeholder:u,format:d,showCalendarButton:f=!0,"aria-label":p,className:m=""}){const[h,x]=l.useState(!1),v=l.useRef(null),y=l.useRef(null);return l.useEffect(()=>{if(!h)return;const g=j=>{var N,_,S,M;const C=j.target,b=(_=(N=v.current)==null?void 0:N.contains(C))!=null?_:!1,k=(M=(S=y.current)==null?void 0:S.contains(C))!=null?M:!1;!b&&!k&&x(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[h]),l.useEffect(()=>{if(!h)return;const g=j=>{j.key==="Escape"&&x(!1)};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[h]),e?n.jsx(is,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:e}):n.jsx("div",{ref:v,className:`relative ${m}`,children:n.jsxs(is,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:[n.jsx(Ss,{placeholder:u,format:d,showCalendarButton:f,"aria-label":p,onFocus:()=>x(!0)}),h&&n.jsx(La,{containerRef:v,popupRef:y,children:n.jsx(Cs,{})})]})})}function La({children:e,containerRef:t,popupRef:r}){const s=l.useRef(null),a=r||s,[o,i]=l.useState(null);if(l.useEffect(()=>{if(t!=null&&t.current){const u=t.current.getBoundingClientRect();i({top:u.bottom+window.scrollY+8,left:u.left+window.scrollX})}},[t]),!o)return null;const c=n.jsx("div",{ref:a,className:`
185
+ ${U?"text-fg-disabled cursor-not-allowed opacity-50":K?"bg-surface-brand-strong text-fg-inverse font-semibold":H?"bg-surface-brand-muted text-fg-brand-emphasis":oe?"border-2 border-line-brand font-semibold":ne?"bg-surface-brand-muted":"hover:bg-surface-active"}
186
+ `,"aria-label":A.toDateString(),"aria-selected":K,"aria-disabled":U,children:A.getDate()},A.toISOString())})},`week-${I}`))]})]}))}function Cr({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,placeholder:u,format:d,showCalendarButton:f=!0,"aria-label":p,className:m=""}){const[h,x]=l.useState(!1),v=l.useRef(null),y=l.useRef(null);return l.useEffect(()=>{if(!h)return;const b=j=>{var N,L,S,D;const $=j.target,g=(L=(N=v.current)==null?void 0:N.contains($))!=null?L:!1,k=(D=(S=y.current)==null?void 0:S.contains($))!=null?D:!1;!g&&!k&&x(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[h]),l.useEffect(()=>{if(!h)return;const b=j=>{j.key==="Escape"&&x(!1)};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[h]),e?n.jsx(is,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:e}):n.jsx("div",{ref:v,className:`relative ${m}`,children:n.jsxs(is,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:[n.jsx(Ss,{placeholder:u,format:d,showCalendarButton:f,"aria-label":p,onFocus:()=>x(!0)}),h&&n.jsx(Fa,{containerRef:v,popupRef:y,children:n.jsx(Cs,{})})]})})}function Fa({children:e,containerRef:t,popupRef:r}){const s=l.useRef(null),a=r||s,[o,i]=l.useState(null);if(l.useEffect(()=>{if(t!=null&&t.current){const u=t.current.getBoundingClientRect();i({top:u.bottom+window.scrollY+8,left:u.left+window.scrollX})}},[t]),!o)return null;const c=n.jsx("div",{ref:a,className:`
187
187
  fixed ${ue("popover")}
188
188
  bg-surface-overlay
189
189
  ${J("lg")}
190
190
  ${$e("xl")}
191
191
  border border-line-default
192
- `,role:"dialog","aria-modal":"false","aria-label":"Date picker calendar",style:{top:`${o.top}px`,left:`${o.left}px`},children:e});return typeof window!="undefined"?qe.createPortal(c,document.body):c}Cr.Input=Ss;Cr.Calendar=Cs;Cr.Popup=La;const nd=Cr,$r=l.createContext(void 0);function Er(){const e=l.useContext($r);if(e===void 0)throw new Error("useTabsContext must be used within a Tabs component");return e}function ad(){return l.useContext($r)}function Fa({defaultValue:e,value:t,onValueChange:r,orientation:s="horizontal",activationMode:a="automatic",children:o}){const[i,c]=l.useState(e||""),u=t!==void 0,d=u?t:i,f=l.useCallback(m=>{u||c(m),r==null||r(m)},[u,r]),p={value:d,onValueChange:f,orientation:s,activationMode:a};return n.jsx($r.Provider,{value:p,children:o})}function _a(a){var o=a,{children:e,className:t="",variant:r="default"}=o,s=O(o,["children","className","variant"]);const{orientation:i}=Er(),c=l.useRef(null);l.useEffect(()=>{const f=c.current;if(!f)return;const p=m=>{var y;const h=Array.from(f.querySelectorAll('[role="tab"]:not([disabled])')),x=h.findIndex(g=>g===document.activeElement);if(x===-1)return;let v=x;i==="horizontal"?m.key==="ArrowRight"?(m.preventDefault(),v=(x+1)%h.length):m.key==="ArrowLeft"&&(m.preventDefault(),v=(x-1+h.length)%h.length):m.key==="ArrowDown"?(m.preventDefault(),v=(x+1)%h.length):m.key==="ArrowUp"&&(m.preventDefault(),v=(x-1+h.length)%h.length),m.key==="Home"?(m.preventDefault(),v=0):m.key==="End"&&(m.preventDefault(),v=h.length-1),v!==x&&((y=h[v])==null||y.focus())};return f.addEventListener("keydown",p),()=>f.removeEventListener("keydown",p)},[i]);const u=r==="compact"&&i==="vertical"?"flex":"inline-flex",d=w(i==="vertical"?"flex-col":"flex-row",E("xs","gap"));return n.jsx("div",P(T({ref:c,role:"tablist","aria-orientation":i,className:w(u,d,E("xs","p"),"bg-surface-muted",J("md"),t)},s),{children:e}))}function Pa(c){var u=c,{value:e,children:t,disabled:r=!1,className:s="",onClick:a,onKeyDown:o}=u,i=O(u,["value","children","disabled","className","onClick","onKeyDown"]);const{value:d,onValueChange:f,orientation:p,activationMode:m}=Er(),h=d===e,x=g=>{r||((m==="automatic"||h)&&f(e),a==null||a(g))},v=g=>{var j;m==="automatic"&&!r&&!h&&f(e),(j=i.onFocus)==null||j.call(i,g)},y=g=>{if(!r&&!(g.key==="ArrowRight"||g.key==="ArrowLeft"||g.key==="ArrowDown"||g.key==="ArrowUp"||g.key==="Home"||g.key==="End")){if(m==="manual"&&(g.key==="Enter"||g.key===" ")){g.preventDefault(),f(e);return}o==null||o(g)}};return n.jsx("button",P(T({type:"button",role:"tab","aria-selected":h,"aria-controls":`tabpanel-${e}`,id:`tab-${e}`,tabIndex:r?-1:h?0:-1,disabled:r,onClick:x,onFocus:v,onKeyDown:y,className:w("inline-flex","items-center","justify-center",E("sm","px"),E("xs","py"),re("bodySmall"),Pe("label"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",J("sm"),h?w("bg-surface-brand-strong","text-fg-inverse"):w("text-fg-secondary","hover:bg-surface-active"),r?"opacity-50 cursor-not-allowed":"cursor-pointer",s)},i),{children:t}))}function za(o){var i=o,{value:e,children:t,forceMount:r=!1,className:s=""}=i,a=O(i,["value","children","forceMount","className"]);const{value:c}=Er(),u=c===e;return!u&&!r?null:n.jsx("div",P(T({role:"tabpanel",id:`tabpanel-${e}`,"aria-labelledby":`tab-${e}`,hidden:!u,className:`
192
+ `,role:"dialog","aria-modal":"false","aria-label":"Date picker calendar",style:{top:`${o.top}px`,left:`${o.left}px`},children:e});return typeof window!="undefined"?qe.createPortal(c,document.body):c}Cr.Input=Ss;Cr.Calendar=Cs;Cr.Popup=Fa;const nd=Cr,$r=l.createContext(void 0);function Er(){const e=l.useContext($r);if(e===void 0)throw new Error("useTabsContext must be used within a Tabs component");return e}function ad(){return l.useContext($r)}function La({defaultValue:e,value:t,onValueChange:r,orientation:s="horizontal",activationMode:a="automatic",children:o}){const[i,c]=l.useState(e||""),u=t!==void 0,d=u?t:i,f=l.useCallback(m=>{u||c(m),r==null||r(m)},[u,r]),p={value:d,onValueChange:f,orientation:s,activationMode:a};return n.jsx($r.Provider,{value:p,children:o})}function _a(a){var o=a,{children:e,className:t="",variant:r="default"}=o,s=O(o,["children","className","variant"]);const{orientation:i}=Er(),c=l.useRef(null);l.useEffect(()=>{const f=c.current;if(!f)return;const p=m=>{var y;const h=Array.from(f.querySelectorAll('[role="tab"]:not([disabled])')),x=h.findIndex(b=>b===document.activeElement);if(x===-1)return;let v=x;i==="horizontal"?m.key==="ArrowRight"?(m.preventDefault(),v=(x+1)%h.length):m.key==="ArrowLeft"&&(m.preventDefault(),v=(x-1+h.length)%h.length):m.key==="ArrowDown"?(m.preventDefault(),v=(x+1)%h.length):m.key==="ArrowUp"&&(m.preventDefault(),v=(x-1+h.length)%h.length),m.key==="Home"?(m.preventDefault(),v=0):m.key==="End"&&(m.preventDefault(),v=h.length-1),v!==x&&((y=h[v])==null||y.focus())};return f.addEventListener("keydown",p),()=>f.removeEventListener("keydown",p)},[i]);const u=r==="compact"&&i==="vertical"?"flex":"inline-flex",d=w(i==="vertical"?"flex-col":"flex-row",E("xs","gap"));return n.jsx("div",z(T({ref:c,role:"tablist","aria-orientation":i,className:w(u,d,E("xs","p"),"bg-surface-muted",J("md"),t)},s),{children:e}))}function Pa(c){var u=c,{value:e,children:t,disabled:r=!1,className:s="",onClick:a,onKeyDown:o}=u,i=O(u,["value","children","disabled","className","onClick","onKeyDown"]);const{value:d,onValueChange:f,orientation:p,activationMode:m}=Er(),h=d===e,x=b=>{r||((m==="automatic"||h)&&f(e),a==null||a(b))},v=b=>{var j;m==="automatic"&&!r&&!h&&f(e),(j=i.onFocus)==null||j.call(i,b)},y=b=>{if(!r&&!(b.key==="ArrowRight"||b.key==="ArrowLeft"||b.key==="ArrowDown"||b.key==="ArrowUp"||b.key==="Home"||b.key==="End")){if(m==="manual"&&(b.key==="Enter"||b.key===" ")){b.preventDefault(),f(e);return}o==null||o(b)}};return n.jsx("button",z(T({type:"button",role:"tab","aria-selected":h,"aria-controls":`tabpanel-${e}`,id:`tab-${e}`,tabIndex:r?-1:h?0:-1,disabled:r,onClick:x,onFocus:v,onKeyDown:y,className:w("inline-flex","items-center","justify-center",E("sm","px"),E("xs","py"),re("bodySmall"),Pe("label"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",J("sm"),h?w("bg-surface-brand-strong","text-fg-inverse"):w("text-fg-secondary","hover:bg-surface-active"),r?"opacity-50 cursor-not-allowed":"cursor-pointer",s)},i),{children:t}))}function za(o){var i=o,{value:e,children:t,forceMount:r=!1,className:s=""}=i,a=O(i,["value","children","forceMount","className"]);const{value:c}=Er(),u=c===e;return!u&&!r?null:n.jsx("div",z(T({role:"tabpanel",id:`tabpanel-${e}`,"aria-labelledby":`tab-${e}`,hidden:!u,className:`
193
193
  mt-2
194
194
  focus:outline-none
195
195
  ${s}
196
- `},a),{children:t}))}function Mr(r){var s=r,{children:e}=s,t=O(s,["children"]);return n.jsx(Fa,P(T({},t),{children:e}))}Mr.List=_a;Mr.Trigger=Pa;Mr.Content=za;const od=Mr,Tr=l.forwardRef(function(m,p){var h=m,{onSearch:t,onClear:r,loading:s=!1,showClearButton:a=!0,debounceMs:o=300,value:i,defaultValue:c,onChange:u,className:d=""}=h,f=O(h,["onSearch","onClear","loading","showClearButton","debounceMs","value","defaultValue","onChange","className"]);const[x,v]=l.useState(typeof c=="string"?c:""),[y,g]=l.useState(null),j=i!==void 0,C=j?i:x,b=C!=null&&String(C).length>0,k=S=>{const M=S.target.value;j||v(M),u==null||u(S),y&&clearTimeout(y);const L=setTimeout(()=>{t==null||t(M)},o);g(L)},N=()=>{j||v("");const S={target:{value:""},currentTarget:{value:""}};u==null||u(S),r==null||r(),t==null||t("")},_=S=>{var M;S.key==="Enter"&&t&&t(String(C||"")),(M=f.onKeyDown)==null||M.call(f,S)};return n.jsx("div",{className:w("relative",d),children:n.jsx(Se,P(T({ref:p},f),{type:"search",value:C,onChange:k,onKeyDown:_,leftIcon:s?n.jsx("div",{className:"animate-spin",children:n.jsx(as,{className:"h-4 w-4"})}):n.jsx(as,{className:"h-4 w-4"}),rightIcon:a&&b&&!s?n.jsx(Z,{variant:"ghost",size:"sm",onClick:N,className:"h-auto p-1","aria-label":"Clear search",children:n.jsx(Ne,{className:"h-4 w-4"})}):void 0,className:w(E("lg","pr"))}))})});Tr.displayName="SearchInput";const $s=l.forwardRef(function({option:t,isHighlighted:r,onSelect:s},a){const o=()=>{t.disabled||s(t)};return n.jsxs("div",{ref:a,role:"option","aria-selected":r,"aria-disabled":t.disabled,onClick:o,className:`
196
+ `},a),{children:t}))}function Mr(r){var s=r,{children:e}=s,t=O(s,["children"]);return n.jsx(La,z(T({},t),{children:e}))}Mr.List=_a;Mr.Trigger=Pa;Mr.Content=za;const od=Mr,Tr=l.forwardRef(function(m,p){var h=m,{onSearch:t,onClear:r,loading:s=!1,showClearButton:a=!0,debounceMs:o=300,value:i,defaultValue:c,onChange:u,className:d=""}=h,f=O(h,["onSearch","onClear","loading","showClearButton","debounceMs","value","defaultValue","onChange","className"]);const[x,v]=l.useState(typeof c=="string"?c:""),[y,b]=l.useState(null),j=i!==void 0,$=j?i:x,g=$!=null&&String($).length>0,k=S=>{const D=S.target.value;j||v(D),u==null||u(S),y&&clearTimeout(y);const R=setTimeout(()=>{t==null||t(D)},o);b(R)},N=()=>{j||v("");const S={target:{value:""},currentTarget:{value:""}};u==null||u(S),r==null||r(),t==null||t("")},L=S=>{var D;S.key==="Enter"&&t&&t(String($||"")),(D=f.onKeyDown)==null||D.call(f,S)};return n.jsx("div",{className:w("relative",d),children:n.jsx(Se,z(T({ref:p},f),{type:"search",value:$,onChange:k,onKeyDown:L,leftIcon:s?n.jsx("div",{className:"animate-spin",children:n.jsx(as,{className:"h-4 w-4"})}):n.jsx(as,{className:"h-4 w-4"}),rightIcon:a&&g&&!s?n.jsx(Z,{variant:"ghost",size:"sm",onClick:N,className:"h-auto p-1","aria-label":"Clear search",children:n.jsx(Ne,{className:"h-4 w-4"})}):void 0,className:w(E("lg","pr"))}))})});Tr.displayName="SearchInput";const $s=l.forwardRef(function({option:t,isHighlighted:r,onSelect:s},a){const o=()=>{t.disabled||s(t)};return n.jsxs("div",{ref:a,role:"option","aria-selected":r,"aria-disabled":t.disabled,onClick:o,className:`
197
197
  flex
198
198
  items-center
199
199
  gap-2
@@ -204,7 +204,7 @@ React keys must be passed directly to JSX without using spread:
204
204
  transition-colors
205
205
  ${r?"bg-surface-active":""}
206
206
  ${t.disabled?"opacity-50 cursor-not-allowed":"hover:bg-surface-hover"}
207
- `,children:[t.icon&&n.jsx("span",{className:"flex-shrink-0",children:t.icon}),n.jsx("span",{className:"flex-1",children:t.label})]})});$s.displayName="AutocompleteOption";const Ar=l.forwardRef(function({options:t,highlightedIndex:r,onSelect:s,loading:a=!1,emptyMessage:o="No options found",containerRef:i,showSelectAll:c=!1,allSelected:u=!1,onSelectAll:d,onDeselectAll:f},p){const[m,h]=l.useState({top:0,left:0,width:0});l.useEffect(()=>{if(i.current){const v=i.current.getBoundingClientRect();h({top:v.bottom+window.scrollY+4,left:v.left+window.scrollX,width:v.width})}},[i]);const x=n.jsx("div",{ref:p,role:"listbox",className:`
207
+ `,children:[t.icon&&n.jsx("span",{className:"flex-shrink-0",children:t.icon}),n.jsx("span",{className:"flex-1",children:t.label})]})});$s.displayName="AutocompleteOption";const Ar=l.forwardRef(function({options:t,highlightedIndex:r,onSelect:s,loading:a=!1,emptyMessage:o="No options found",containerRef:i,showSelectAll:c=!1,allSelected:u=!1,onSelectAll:d,onDeselectAll:f,"aria-label":p,"aria-labelledby":m},h){const[x,v]=l.useState({top:0,left:0,width:0});l.useEffect(()=>{if(i.current){const b=i.current.getBoundingClientRect();v({top:b.bottom+window.scrollY+4,left:b.left+window.scrollX,width:b.width})}},[i]);const y=n.jsx("div",{ref:h,role:"listbox","aria-label":m?void 0:p,"aria-labelledby":m,className:`
208
208
  absolute
209
209
  ${ue("popover")}
210
210
  bg-surface-overlay
@@ -215,7 +215,7 @@ React keys must be passed directly to JSX without using spread:
215
215
  max-h-60
216
216
  overflow-y-auto
217
217
  ${E("xs","py")}
218
- `,style:{top:`${m.top}px`,left:`${m.left}px`,width:`${m.width}px`},children:a?n.jsx("div",{className:`
218
+ `,style:{top:`${x.top}px`,left:`${x.left}px`,width:`${x.width}px`},children:a?n.jsx("div",{className:`
219
219
  ${E("md","p")}
220
220
  text-sm
221
221
  text-fg-tertiary
@@ -234,7 +234,7 @@ React keys must be passed directly to JSX without using spread:
234
234
  hover:bg-surface-hover
235
235
  border-b
236
236
  border-line-default
237
- `,onClick:u?f:d,children:u?"Deselect All":"Select All"}),t.map((v,y)=>n.jsx($s,{option:v,isHighlighted:y===r,onSelect:s},v.value))]})});return typeof window!="undefined"?qe.createPortal(x,document.body):null});Ar.displayName="AutocompleteList";const Oa=l.forwardRef(function({options:t,value:r,defaultValue:s,onChange:a,onSelect:o,placeholder:i="Type to search...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",debounceMs:f=300,filterOptions:p,className:m="",inputClassName:h="",size:x="md"},v){const[y,g]=l.useState(typeof s=="string"?s:""),[j,C]=l.useState(!1),[b,k]=l.useState(-1),[N,_]=l.useState(""),S=l.useRef(null),M=l.useRef(null),L=l.useRef(null),R=l.useRef(null),D=r!==void 0,I=D?r:y,V=N.trim()?p?p(t,N):t.filter(F=>F.label.toLowerCase().includes(N.toLowerCase())):t,Y=V.length>0,H=F=>{const B=F.target.value;_(B),D||g(B),a==null||a(B),R.current&&clearTimeout(R.current),R.current=setTimeout(()=>{C(!0),k(-1)},f)},W=F=>{var B;F.disabled||(D||g(F.value),_(F.label),C(!1),k(-1),a==null||a(F.value),o==null||o(F),(B=M.current)==null||B.focus())},ie=F=>{if(!j||V.length===0){(F.key==="ArrowDown"||F.key==="Enter")&&C(!0);return}switch(F.key){case"ArrowDown":F.preventDefault(),k(B=>B<V.length-1?B+1:0);break;case"ArrowUp":F.preventDefault(),k(B=>B>0?B-1:V.length-1);break;case"Enter":F.preventDefault(),b>=0&&b<V.length&&W(V[b]);break;case"Escape":F.preventDefault(),C(!1),k(-1);break}};l.useEffect(()=>{if(!j)return;const F=B=>{S.current&&!S.current.contains(B.target)&&(C(!1),k(-1))};return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)},[j]),l.useEffect(()=>{if(b>=0&&L.current){const F=L.current.querySelectorAll('[role="option"]');F[b]&&typeof F[b].scrollIntoView=="function"&&F[b].scrollIntoView({block:"nearest",behavior:"smooth"})}},[b]),l.useEffect(()=>{if(I){const F=t.find(B=>B.value===I);_(F?F.label:I)}else _("")},[I,t]);const ne=j&&(Y||c||d);return n.jsxs("div",{ref:S,className:`relative ${m}`,children:[n.jsx(Se,{ref:M||v,value:N,onChange:H,onKeyDown:ie,onFocus:()=>C(!0),placeholder:i,disabled:u,size:x,rightIcon:c?n.jsx(fa,{className:"h-4 w-4 animate-spin"}):n.jsx(hs,{className:`h-4 w-4 transition-transform ${j?"rotate-180":""}`}),className:h}),ne&&n.jsx(Ar,{ref:L,options:V,highlightedIndex:b,onSelect:W,loading:c,emptyMessage:d,containerRef:S})]})});Oa.displayName="Autocomplete";const Va=l.forwardRef(function({options:t,value:r,defaultValue:s=[],onChange:a,onSelect:o,placeholder:i="Select options...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",maxSelected:f,showSelectAll:p=!1,className:m="",inputClassName:h="",size:x="md",label:v},y){const g=l.useId(),[j,C]=l.useState(s),[b,k]=l.useState(!1),[N,_]=l.useState(-1),[S,M]=l.useState(""),L=l.useRef(null),R=l.useRef(null),D=l.useRef(null),I=r!==void 0,A=I?r:j,V=t.filter(z=>A.includes(z.value)),H=(()=>{let z=t;return S.trim()&&(z=t.filter(U=>U.label.toLowerCase().includes(S.toLowerCase()))),z})(),W=H.length>0,ie=z=>{const U=z.target.value;M(U),k(!0),_(-1)},ne=z=>{if(z.disabled||f&&A.length>=f&&!A.includes(z.value))return;const U=A.includes(z.value)?A.filter(X=>X!==z.value):[...A,z.value];I||C(U),a==null||a(U),o==null||o(t.filter(X=>U.includes(X.value))),M("")},F=()=>{const z=H.filter(X=>!X.disabled).map(X=>X.value),U=[...new Set([...A,...z])];I||C(U),a==null||a(U),o==null||o(t.filter(X=>U.includes(X.value)))},B=()=>{const z=H.map(X=>X.value),U=A.filter(X=>!z.includes(X));I||C(U),a==null||a(U),o==null||o(t.filter(X=>U.includes(X.value)))},K=z=>{const U=A.filter(X=>X!==z);I||C(U),a==null||a(U),o==null||o(t.filter(X=>U.includes(X.value)))},Q=z=>{if(!b||H.length===0){(z.key==="ArrowDown"||z.key==="Enter")&&k(!0),z.key==="Backspace"&&S===""&&A.length>0&&K(A[A.length-1]);return}switch(z.key){case"ArrowDown":z.preventDefault(),_(U=>U<H.length-1?U+1:0);break;case"ArrowUp":z.preventDefault(),_(U=>U>0?U-1:H.length-1);break;case"Enter":z.preventDefault(),N>=0&&N<H.length&&ne(H[N]);break;case"Escape":z.preventDefault(),k(!1),_(-1);break}};l.useEffect(()=>{if(!b)return;const z=U=>{L.current&&!L.current.contains(U.target)&&(k(!1),_(-1),M(""))};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[b]);const le=H.filter(z=>!z.disabled).every(z=>A.includes(z.value)),se=b&&(W||c||d);return n.jsxs("div",{ref:L,className:w("relative",m),children:[n.jsx("label",{htmlFor:g,className:w("block",E("sm","mb"),"text-sm","font-medium","text-fg-primary"),children:v}),n.jsxs("div",{className:w("flex","flex-wrap",E("sm","gap"),E("sm","p"),"border","border-line-default",J("md"),"min-h-10","focus-within:outline-none","focus-within:ring-2","focus-within:ring-offset-2","focus-within:border-line-brand","focus-within:ring-line-brand"),children:[V.map(z=>n.jsx(ws,{onRemove:()=>K(z.value),size:x==="sm"?"sm":x==="lg"?"lg":"md",children:z.label},z.value)),n.jsx("input",{id:g,ref:z=>{typeof y=="function"?y(z):y&&(y.current=z),R.current=z},type:"text",value:S,onChange:ie,onKeyDown:Q,onFocus:()=>k(!0),placeholder:A.length===0?i:"",disabled:u,className:w("flex-1","min-w-32","outline-none","bg-transparent",h)})]}),se&&n.jsx(Ar,{ref:D,options:H.map(z=>P(T({},z),{icon:A.includes(z.value)?n.jsx(ns,{className:w("h-4","w-4","text-fg-brand")}):z.icon})),highlightedIndex:N,onSelect:ne,loading:c,emptyMessage:d,containerRef:L,showSelectAll:p&&H.length>0,allSelected:le,onSelectAll:F,onDeselectAll:B})]})});Va.displayName="MultiSelect";function id({value:e,defaultValue:t=0,max:r=5,size:s="md",variant:a="filled",readOnly:o=!1,allowHalf:i=!1,showValue:c=!1,onChange:u,onHover:d,className:f="",icon:p,emptyIcon:m}){const[h,x]=l.useState(t),[v,y]=l.useState(null),g=e!==void 0,j=v!=null?v:g?e:h,C={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},b=S=>{o||(g||x(S),u==null||u(S))},k=S=>{o||(y(S),d==null||d(S))},N=()=>{o||y(null)},_=S=>{const M=S+1,L=i&&j>=M-.5&&j<M,R=j>=M,D=w(C[s],be("base"),!o&&"cursor-pointer",R||L?"text-fg-warning":"text-fg-disabled"),I=p||n.jsx(Nt,{className:D,fill:R?"currentColor":"none"}),A=m||n.jsx(Nt,{className:D,fill:"none"});return n.jsx("span",{className:"relative inline-block",onClick:()=>b(M),onMouseEnter:()=>k(M),onMouseLeave:N,role:o?void 0:"button",tabIndex:o?void 0:0,"aria-label":o?void 0:`Rate ${M} out of ${r}`,onKeyDown:V=>{!o&&(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),b(M))},children:L?n.jsxs("span",{className:"relative inline-block",children:[n.jsx("span",{className:"absolute inset-0 overflow-hidden",style:{width:"50%"},children:a==="filled"?n.jsx(Nt,{className:D,fill:"currentColor"}):I}),a==="filled"?n.jsx(Nt,{className:D,fill:"none"}):A]}):R?a==="filled"?n.jsx(Nt,{className:D,fill:"currentColor"}):I:a==="filled"?n.jsx(Nt,{className:D,fill:"none"}):A},S)};return n.jsxs("div",{className:w("inline-flex","items-center",E("xs","gap"),f),children:[n.jsx("div",{className:w("flex","items-center"),role:o?"img":void 0,"aria-label":o?`Rating: ${j} out of ${r}`:void 0,children:Array.from({length:r},(S,M)=>_(M))}),c&&n.jsxs("span",{className:w(E("sm","ml"),ye("sm"),"text-fg-secondary"),children:[j.toFixed(i?1:0),"/",r]})]})}function ld({accept:e,multiple:t=!1,maxSize:r,maxFiles:s,onFilesChange:a,onFileRemove:o,showPreview:i=!0,showProgress:c=!1,disabled:u=!1,className:d="",label:f,description:p}){const[m,h]=l.useState([]),[x,v]=l.useState(!1),y=l.useRef(null),g=R=>{if(R===0)return"0 Bytes";const D=1024,I=["Bytes","KB","MB","GB"],A=Math.floor(Math.log(R)/Math.log(D));return Math.round(R/Math.pow(D,A)*100)/100+" "+I[A]},j=R=>r&&R.size>r?`File size exceeds ${g(r)}`:null,C=R=>{const D=Array.from(R),I=[];return D.forEach(A=>{const V=j(A),Y=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,H={file:A,id:Y,error:V,progress:c?0:void 0};if(i&&A.type.startsWith("image/")){const W=new FileReader;W.onload=ie=>{h(ne=>ne.map(F=>{var B;return F.id===Y?P(T({},F),{preview:(B=ie.target)==null?void 0:B.result}):F}))},W.readAsDataURL(A)}I.push(H)}),I},b=R=>{const D=t?[...m,...R]:R,I=s?D.slice(0,s):D;h(I),a==null||a(I)},k=R=>{if(R.preventDefault(),v(!1),u)return;const D=R.dataTransfer.files;if(D.length>0){const I=C(D);b(I)}},N=R=>{R.preventDefault(),u||v(!0)},_=R=>{R.preventDefault(),v(!1)},S=R=>{if(R.target.files&&R.target.files.length>0){const D=C(R.target.files);b(D)}y.current&&(y.current.value="")},M=R=>{const D=m.filter(I=>I.id!==R);h(D),a==null||a(D),o==null||o(R)},L=()=>{var R;u||(R=y.current)==null||R.click()};return n.jsxs("div",{className:w(E("lg","gap"),"flex","flex-col",d),children:[(f||p)&&n.jsxs("div",{children:[f&&n.jsx("label",{className:w("block",ye("sm"),Mt("medium"),"text-fg-primary",E("xs","mb")),children:f}),p&&n.jsx("p",{className:w(ye("sm"),"text-fg-secondary"),children:p})]}),n.jsxs("div",{onDrop:k,onDragOver:N,onDragLeave:_,onClick:L,className:w("relative","border-2","border-dashed",x?"border-line-brand":"border-line-default",J("lg"),E("lg","p"),"text-center","cursor-pointer",be("base"),"focus:border-line-focus",u?"opacity-50 cursor-not-allowed":w("hover:border-line-strong","focus:outline-none","focus:ring-2","focus:ring-offset-2")),role:"button",tabIndex:u?-1:0,"aria-label":"Upload files","aria-disabled":u,children:[n.jsx("input",{ref:y,type:"file",accept:e,multiple:t,onChange:S,disabled:u,className:"hidden"}),n.jsxs("div",{className:w("flex","flex-col","items-center",E("sm","gap")),children:[n.jsx(hc,{className:w("h-8","w-8",x?"text-fg-brand":"text-fg-secondary")}),n.jsxs("div",{children:[n.jsx("span",{className:w(ye("sm"),Mt("medium"),"text-fg-primary"),children:x?"Drop files here":"Click to upload or drag and drop"}),e&&n.jsxs("p",{className:w(ye("xs"),"text-fg-secondary",E("xs","mt")),children:["Accepted: ",e]}),r&&n.jsxs("p",{className:w(ye("xs"),"text-fg-secondary"),children:["Max size: ",g(r)]})]})]})]}),m.length>0&&n.jsx("div",{className:w("flex","flex-col",E("sm","gap")),children:m.map(R=>n.jsxs("div",{className:w("flex","items-center",E("md","gap"),E("base","p"),"border","border-line-default",J("md"),R.error?"bg-error-bg":"bg-surface-muted"),children:[i&&R.preview?n.jsx("img",{src:R.preview,alt:R.file.name,className:w("w-12","h-12","object-cover",J("md"))}):n.jsx(Xl,{className:w("h-8","w-8","text-fg-secondary")}),n.jsxs("div",{className:w("flex-1","min-w-0"),children:[n.jsx("p",{className:w(ye("sm"),Mt("medium"),"text-fg-primary","truncate"),children:R.file.name}),n.jsx("p",{className:w(ye("xs"),"text-fg-secondary"),children:g(R.file.size)}),R.error&&n.jsxs("div",{className:w("flex","items-center",E("xs","gap"),E("xs","mt")),children:[n.jsx(bs,{className:w("h-3","w-3","text-fg-error")}),n.jsx("span",{className:w(ye("xs"),"text-fg-error"),children:R.error})]}),c&&R.progress!==void 0&&n.jsx("div",{className:w(E("sm","mt")),children:n.jsx(vs,{value:R.progress,size:"sm"})})]}),!R.error&&!c&&n.jsx(dr,{className:w("h-5","w-5","text-fg-success")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:D=>{D.stopPropagation(),M(R.id)},className:"h-auto p-1","aria-label":`Remove ${R.file.name}`,children:n.jsx(Ne,{className:"h-4 w-4"})})]},R.id))})]})}function Es({trigger:e,children:t,open:r,defaultOpen:s=!1,onOpenChange:a,placement:o="bottom",showCloseButton:i=!1,title:c,closeOnClickOutside:u=!0,closeOnEscape:d=!0,className:f="",triggerClassName:p="",contentClassName:m=""}){const[h,x]=l.useState(s),v=l.useRef(null),y=l.useRef(null),[g,j]=l.useState({top:0,left:0}),C=r!==void 0,b=C?r:h,k=l.useCallback(()=>{if(!v.current||!y.current)return;const M=v.current.getBoundingClientRect(),L=y.current.getBoundingClientRect(),R=window.scrollY,D=window.scrollX;let I=0,A=0;o.startsWith("top")?(I=M.top+R-L.height-8,o==="top-start"?A=M.left+D:o==="top-end"?A=M.right+D-L.width:A=M.left+D+(M.width-L.width)/2):o.startsWith("bottom")?(I=M.bottom+R+8,o==="bottom-start"?A=M.left+D:o==="bottom-end"?A=M.right+D-L.width:A=M.left+D+(M.width-L.width)/2):o.startsWith("left")?(A=M.left+D-L.width-8,o==="left-start"?I=M.top+R:o==="left-end"?I=M.bottom+R-L.height:I=M.top+R+(M.height-L.height)/2):o.startsWith("right")&&(A=M.right+D+8,o==="right-start"?I=M.top+R:o==="right-end"?I=M.bottom+R-L.height:I=M.top+R+(M.height-L.height)/2);const V=8;I=Math.max(V,Math.min(I,window.innerHeight+R-L.height-V)),A=Math.max(V,Math.min(A,window.innerWidth+D-L.width-V)),j({top:I,left:A})},[o]);l.useEffect(()=>{if(b){k();const M=()=>k(),L=()=>k();return window.addEventListener("resize",M),window.addEventListener("scroll",L,!0),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",L,!0)}}},[b,o,k]),l.useEffect(()=>{b&&y.current&&setTimeout(k,0)},[b,k]);const N=l.useCallback(M=>{C||x(M),a==null||a(M)},[C,a]),_=l.useCallback(()=>{N(!1)},[N]);l.useEffect(()=>{if(b&&d){const M=L=>{L.key==="Escape"&&_()};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)}},[b,d,_]),l.useEffect(()=>{if(b&&u){const M=L=>{y.current&&v.current&&!y.current.contains(L.target)&&!v.current.contains(L.target)&&_()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)}},[b,u,_]);const S=b?n.jsxs("div",{ref:y,className:`
237
+ `,onClick:u?f:d,children:u?"Deselect All":"Select All"}),t.map((b,j)=>n.jsx($s,{option:b,isHighlighted:j===r,onSelect:s},b.value))]})});return typeof window!="undefined"?qe.createPortal(y,document.body):null});Ar.displayName="AutocompleteList";const Oa=l.forwardRef(function({options:t,value:r,defaultValue:s,onChange:a,onSelect:o,placeholder:i="Type to search...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",debounceMs:f=300,filterOptions:p,className:m="",inputClassName:h="",size:x="md",label:v,"aria-label":y,"aria-labelledby":b,id:j},$){const g=l.useId(),k=j!=null?j:g,[N,L]=l.useState(typeof s=="string"?s:""),[S,D]=l.useState(!1),[R,M]=l.useState(-1),[F,I]=l.useState(""),A=l.useRef(null),W=l.useRef(null),K=l.useRef(null),H=l.useRef(null),U=r!==void 0,oe=U?r:N,P=F.trim()?p?p(t,F):t.filter(_=>_.label.toLowerCase().includes(F.toLowerCase())):t,G=P.length>0,Y=_=>{const V=_.target.value;I(V),U||L(V),a==null||a(V),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{D(!0),M(-1)},f)},Q=_=>{var V;_.disabled||(U||L(_.value),I(_.label),D(!1),M(-1),a==null||a(_.value),o==null||o(_),(V=W.current)==null||V.focus())},le=_=>{if(!S||P.length===0){(_.key==="ArrowDown"||_.key==="Enter")&&D(!0);return}switch(_.key){case"ArrowDown":_.preventDefault(),M(V=>V<P.length-1?V+1:0);break;case"ArrowUp":_.preventDefault(),M(V=>V>0?V-1:P.length-1);break;case"Enter":_.preventDefault(),R>=0&&R<P.length&&Q(P[R]);break;case"Escape":_.preventDefault(),D(!1),M(-1);break}};l.useEffect(()=>{if(!S)return;const _=V=>{A.current&&!A.current.contains(V.target)&&(D(!1),M(-1))};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[S]),l.useEffect(()=>{if(R>=0&&K.current){const _=K.current.querySelectorAll('[role="option"]');_[R]&&typeof _[R].scrollIntoView=="function"&&_[R].scrollIntoView({block:"nearest",behavior:"smooth"})}},[R]),l.useEffect(()=>{if(oe){const _=t.find(V=>V.value===oe);I(_?_.label:oe)}else I("")},[oe,t]),l.useEffect(()=>{process.env.NODE_ENV==="production"||v||y||b||typeof document!="undefined"&&document.querySelector(`label[for="${CSS.escape(k)}"]`)||console.warn("[Autocomplete] Missing accessible name. Provide a `label` prop, `aria-label`, `aria-labelledby`, or pair an external `<label htmlFor={id}>` with the same `id`.")},[v,y,b,k]);const se=S&&(G||c||d);return n.jsxs("div",{ref:A,className:`relative ${m}`,children:[n.jsx(Se,{ref:W||$,id:k,label:v,"aria-label":y,"aria-labelledby":b,value:F,onChange:Y,onKeyDown:le,onFocus:()=>D(!0),placeholder:i,disabled:u,size:x,rightIcon:c?n.jsx(fa,{className:"h-4 w-4 animate-spin"}):n.jsx(hs,{className:`h-4 w-4 transition-transform ${S?"rotate-180":""}`}),className:h}),se&&n.jsx(Ar,{ref:K,options:P,highlightedIndex:R,onSelect:Q,loading:c,emptyMessage:d,containerRef:A,"aria-labelledby":b,"aria-label":b?void 0:y||v})]})});Oa.displayName="Autocomplete";const Va=l.forwardRef(function({options:t,value:r,defaultValue:s=[],onChange:a,onSelect:o,placeholder:i="Select options...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",maxSelected:f,showSelectAll:p=!1,className:m="",inputClassName:h="",size:x="md",label:v},y){const b=l.useId(),[j,$]=l.useState(s),[g,k]=l.useState(!1),[N,L]=l.useState(-1),[S,D]=l.useState(""),R=l.useRef(null),M=l.useRef(null),F=l.useRef(null),I=r!==void 0,A=I?r:j,W=t.filter(_=>A.includes(_.value)),H=(()=>{let _=t;return S.trim()&&(_=t.filter(V=>V.label.toLowerCase().includes(S.toLowerCase()))),_})(),U=H.length>0,oe=_=>{const V=_.target.value;D(V),k(!0),L(-1)},ne=_=>{if(_.disabled||f&&A.length>=f&&!A.includes(_.value))return;const V=A.includes(_.value)?A.filter(X=>X!==_.value):[...A,_.value];I||$(V),a==null||a(V),o==null||o(t.filter(X=>V.includes(X.value))),D("")},P=()=>{const _=H.filter(X=>!X.disabled).map(X=>X.value),V=[...new Set([...A,..._])];I||$(V),a==null||a(V),o==null||o(t.filter(X=>V.includes(X.value)))},G=()=>{const _=H.map(X=>X.value),V=A.filter(X=>!_.includes(X));I||$(V),a==null||a(V),o==null||o(t.filter(X=>V.includes(X.value)))},Y=_=>{const V=A.filter(X=>X!==_);I||$(V),a==null||a(V),o==null||o(t.filter(X=>V.includes(X.value)))},Q=_=>{if(!g||H.length===0){(_.key==="ArrowDown"||_.key==="Enter")&&k(!0),_.key==="Backspace"&&S===""&&A.length>0&&Y(A[A.length-1]);return}switch(_.key){case"ArrowDown":_.preventDefault(),L(V=>V<H.length-1?V+1:0);break;case"ArrowUp":_.preventDefault(),L(V=>V>0?V-1:H.length-1);break;case"Enter":_.preventDefault(),N>=0&&N<H.length&&ne(H[N]);break;case"Escape":_.preventDefault(),k(!1),L(-1);break}};l.useEffect(()=>{if(!g)return;const _=V=>{R.current&&!R.current.contains(V.target)&&(k(!1),L(-1),D(""))};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[g]);const le=H.filter(_=>!_.disabled).every(_=>A.includes(_.value)),se=g&&(U||c||d);return n.jsxs("div",{ref:R,className:w("relative",m),children:[n.jsx("label",{htmlFor:b,className:w("block",E("sm","mb"),"text-sm","font-medium","text-fg-primary"),children:v}),n.jsxs("div",{className:w("flex","flex-wrap",E("sm","gap"),E("sm","p"),"border","border-line-default",J("md"),"min-h-10","focus-within:outline-none","focus-within:ring-2","focus-within:ring-offset-2","focus-within:border-line-brand","focus-within:ring-line-brand"),children:[W.map(_=>n.jsx(ws,{onRemove:()=>Y(_.value),size:x==="sm"?"sm":x==="lg"?"lg":"md",children:_.label},_.value)),n.jsx("input",{id:b,ref:_=>{typeof y=="function"?y(_):y&&(y.current=_),M.current=_},type:"text",value:S,onChange:oe,onKeyDown:Q,onFocus:()=>k(!0),placeholder:A.length===0?i:"",disabled:u,className:w("flex-1","min-w-32","outline-none","bg-transparent",h)})]}),se&&n.jsx(Ar,{ref:F,"aria-label":v,options:H.map(_=>z(T({},_),{icon:A.includes(_.value)?n.jsx(ns,{className:w("h-4","w-4","text-fg-brand")}):_.icon})),highlightedIndex:N,onSelect:ne,loading:c,emptyMessage:d,containerRef:R,showSelectAll:p&&H.length>0,allSelected:le,onSelectAll:P,onDeselectAll:G})]})});Va.displayName="MultiSelect";function id({value:e,defaultValue:t=0,max:r=5,size:s="md",variant:a="filled",readOnly:o=!1,allowHalf:i=!1,showValue:c=!1,onChange:u,onHover:d,className:f="",icon:p,emptyIcon:m}){const[h,x]=l.useState(t),[v,y]=l.useState(null),b=e!==void 0,j=v!=null?v:b?e:h,$={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},g=S=>{o||(b||x(S),u==null||u(S))},k=S=>{o||(y(S),d==null||d(S))},N=()=>{o||y(null)},L=S=>{const D=S+1,R=i&&j>=D-.5&&j<D,M=j>=D,F=w($[s],be("base"),!o&&"cursor-pointer",M||R?"text-fg-warning":"text-fg-disabled"),I=p||n.jsx(Nt,{className:F,fill:M?"currentColor":"none"}),A=m||n.jsx(Nt,{className:F,fill:"none"});return n.jsx("span",{className:"relative inline-block",onClick:()=>g(D),onMouseEnter:()=>k(D),onMouseLeave:N,role:o?void 0:"button",tabIndex:o?void 0:0,"aria-label":o?void 0:`Rate ${D} out of ${r}`,onKeyDown:W=>{!o&&(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),g(D))},children:R?n.jsxs("span",{className:"relative inline-block",children:[n.jsx("span",{className:"absolute inset-0 overflow-hidden",style:{width:"50%"},children:a==="filled"?n.jsx(Nt,{className:F,fill:"currentColor"}):I}),a==="filled"?n.jsx(Nt,{className:F,fill:"none"}):A]}):M?a==="filled"?n.jsx(Nt,{className:F,fill:"currentColor"}):I:a==="filled"?n.jsx(Nt,{className:F,fill:"none"}):A},S)};return n.jsxs("div",{className:w("inline-flex","items-center",E("xs","gap"),f),children:[n.jsx("div",{className:w("flex","items-center"),role:o?"img":void 0,"aria-label":o?`Rating: ${j} out of ${r}`:void 0,children:Array.from({length:r},(S,D)=>L(D))}),c&&n.jsxs("span",{className:w(E("sm","ml"),ye("sm"),"text-fg-secondary"),children:[j.toFixed(i?1:0),"/",r]})]})}function ld({accept:e,multiple:t=!1,maxSize:r,maxFiles:s,onFilesChange:a,onFileRemove:o,showPreview:i=!0,showProgress:c=!1,disabled:u=!1,className:d="",label:f,description:p}){const[m,h]=l.useState([]),[x,v]=l.useState(!1),y=l.useRef(null),b=M=>{if(M===0)return"0 Bytes";const F=1024,I=["Bytes","KB","MB","GB"],A=Math.floor(Math.log(M)/Math.log(F));return Math.round(M/Math.pow(F,A)*100)/100+" "+I[A]},j=M=>r&&M.size>r?`File size exceeds ${b(r)}`:null,$=M=>{const F=Array.from(M),I=[];return F.forEach(A=>{const W=j(A),K=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,H={file:A,id:K,error:W,progress:c?0:void 0};if(i&&A.type.startsWith("image/")){const U=new FileReader;U.onload=oe=>{h(ne=>ne.map(P=>{var G;return P.id===K?z(T({},P),{preview:(G=oe.target)==null?void 0:G.result}):P}))},U.readAsDataURL(A)}I.push(H)}),I},g=M=>{const F=t?[...m,...M]:M,I=s?F.slice(0,s):F;h(I),a==null||a(I)},k=M=>{if(M.preventDefault(),v(!1),u)return;const F=M.dataTransfer.files;if(F.length>0){const I=$(F);g(I)}},N=M=>{M.preventDefault(),u||v(!0)},L=M=>{M.preventDefault(),v(!1)},S=M=>{if(M.target.files&&M.target.files.length>0){const F=$(M.target.files);g(F)}y.current&&(y.current.value="")},D=M=>{const F=m.filter(I=>I.id!==M);h(F),a==null||a(F),o==null||o(M)},R=()=>{var M;u||(M=y.current)==null||M.click()};return n.jsxs("div",{className:w(E("lg","gap"),"flex","flex-col",d),children:[(f||p)&&n.jsxs("div",{children:[f&&n.jsx("label",{className:w("block",ye("sm"),Mt("medium"),"text-fg-primary",E("xs","mb")),children:f}),p&&n.jsx("p",{className:w(ye("sm"),"text-fg-secondary"),children:p})]}),n.jsxs("div",{onDrop:k,onDragOver:N,onDragLeave:L,onClick:R,className:w("relative","border-2","border-dashed",x?"border-line-brand":"border-line-default",J("lg"),E("lg","p"),"text-center","cursor-pointer",be("base"),"focus:border-line-focus",u?"opacity-50 cursor-not-allowed":w("hover:border-line-strong","focus:outline-none","focus:ring-2","focus:ring-offset-2")),role:"button",tabIndex:u?-1:0,"aria-label":"Upload files","aria-disabled":u,children:[n.jsx("input",{ref:y,type:"file",accept:e,multiple:t,onChange:S,disabled:u,className:"hidden"}),n.jsxs("div",{className:w("flex","flex-col","items-center",E("sm","gap")),children:[n.jsx(hc,{className:w("h-8","w-8",x?"text-fg-brand":"text-fg-secondary")}),n.jsxs("div",{children:[n.jsx("span",{className:w(ye("sm"),Mt("medium"),"text-fg-primary"),children:x?"Drop files here":"Click to upload or drag and drop"}),e&&n.jsxs("p",{className:w(ye("xs"),"text-fg-secondary",E("xs","mt")),children:["Accepted: ",e]}),r&&n.jsxs("p",{className:w(ye("xs"),"text-fg-secondary"),children:["Max size: ",b(r)]})]})]})]}),m.length>0&&n.jsx("div",{className:w("flex","flex-col",E("sm","gap")),children:m.map(M=>n.jsxs("div",{className:w("flex","items-center",E("md","gap"),E("base","p"),"border","border-line-default",J("md"),M.error?"bg-error-bg":"bg-surface-muted"),children:[i&&M.preview?n.jsx("img",{src:M.preview,alt:M.file.name,className:w("w-12","h-12","object-cover",J("md"))}):n.jsx(Xl,{className:w("h-8","w-8","text-fg-secondary")}),n.jsxs("div",{className:w("flex-1","min-w-0"),children:[n.jsx("p",{className:w(ye("sm"),Mt("medium"),"text-fg-primary","truncate"),children:M.file.name}),n.jsx("p",{className:w(ye("xs"),"text-fg-secondary"),children:b(M.file.size)}),M.error&&n.jsxs("div",{className:w("flex","items-center",E("xs","gap"),E("xs","mt")),children:[n.jsx(bs,{className:w("h-3","w-3","text-fg-error")}),n.jsx("span",{className:w(ye("xs"),"text-fg-error"),children:M.error})]}),c&&M.progress!==void 0&&n.jsx("div",{className:w(E("sm","mt")),children:n.jsx(vs,{value:M.progress,size:"sm"})})]}),!M.error&&!c&&n.jsx(dr,{className:w("h-5","w-5","text-fg-success")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:F=>{F.stopPropagation(),D(M.id)},className:"h-auto p-1","aria-label":`Remove ${M.file.name}`,children:n.jsx(Ne,{className:"h-4 w-4"})})]},M.id))})]})}function Es({trigger:e,children:t,open:r,defaultOpen:s=!1,onOpenChange:a,placement:o="bottom",showCloseButton:i=!1,title:c,closeOnClickOutside:u=!0,closeOnEscape:d=!0,className:f="",triggerClassName:p="",contentClassName:m=""}){const[h,x]=l.useState(s),v=l.useRef(null),y=l.useRef(null),[b,j]=l.useState({top:0,left:0}),$=l.useId(),g=r!==void 0,k=g?r:h,N=l.useCallback(()=>{if(!v.current||!y.current)return;const R=v.current.getBoundingClientRect(),M=y.current.getBoundingClientRect(),F=window.scrollY,I=window.scrollX;let A=0,W=0;o.startsWith("top")?(A=R.top+F-M.height-8,o==="top-start"?W=R.left+I:o==="top-end"?W=R.right+I-M.width:W=R.left+I+(R.width-M.width)/2):o.startsWith("bottom")?(A=R.bottom+F+8,o==="bottom-start"?W=R.left+I:o==="bottom-end"?W=R.right+I-M.width:W=R.left+I+(R.width-M.width)/2):o.startsWith("left")?(W=R.left+I-M.width-8,o==="left-start"?A=R.top+F:o==="left-end"?A=R.bottom+F-M.height:A=R.top+F+(R.height-M.height)/2):o.startsWith("right")&&(W=R.right+I+8,o==="right-start"?A=R.top+F:o==="right-end"?A=R.bottom+F-M.height:A=R.top+F+(R.height-M.height)/2);const K=8;A=Math.max(K,Math.min(A,window.innerHeight+F-M.height-K)),W=Math.max(K,Math.min(W,window.innerWidth+I-M.width-K)),j({top:A,left:W})},[o]);l.useEffect(()=>{if(k){N();const R=()=>N(),M=()=>N();return window.addEventListener("resize",R),window.addEventListener("scroll",M,!0),()=>{window.removeEventListener("resize",R),window.removeEventListener("scroll",M,!0)}}},[k,o,N]),l.useEffect(()=>{k&&y.current&&setTimeout(N,0)},[k,N]);const L=l.useCallback(R=>{g||x(R),a==null||a(R)},[g,a]),S=l.useCallback(()=>{L(!1)},[L]);l.useEffect(()=>{if(k&&d){const R=M=>{M.key==="Escape"&&S()};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)}},[k,d,S]),l.useEffect(()=>{if(k&&u){const R=M=>{y.current&&v.current&&!y.current.contains(M.target)&&!v.current.contains(M.target)&&S()};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)}},[k,u,S]);const D=k?n.jsxs("div",{ref:y,className:`
238
238
  absolute
239
239
  ${ue("popover")}
240
240
  bg-surface-overlay
@@ -246,7 +246,7 @@ React keys must be passed directly to JSX without using spread:
246
246
  max-w-96
247
247
  ${be("base")}
248
248
  ${m}
249
- `,style:{top:`${g.top}px`,left:`${g.left}px`},role:"dialog","aria-modal":"false",children:[(c||i)&&n.jsxs("div",{className:`
249
+ `,style:{top:`${b.top}px`,left:`${b.left}px`},role:"dialog","aria-modal":"false","aria-labelledby":c?$:void 0,children:[(c||i)&&n.jsxs("div",{className:`
250
250
  flex
251
251
  items-center
252
252
  justify-between
@@ -254,10 +254,10 @@ React keys must be passed directly to JSX without using spread:
254
254
  ${E("md","py")}
255
255
  border-b
256
256
  border-line-default
257
- `,children:[c&&n.jsx("h3",{className:`${re("bodySmall")} ${Pe("h5")} text-fg-primary`,children:c}),i&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:_,className:"h-auto p-1","aria-label":"Close popover",children:n.jsx(Ne,{className:"h-4 w-4"})})]}),n.jsx("div",{className:`
257
+ `,children:[c&&n.jsx("h3",{id:$,className:`${re("bodySmall")} ${Pe("h5")} text-fg-primary`,children:c}),i&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:S,className:"h-auto p-1","aria-label":"Close popover",children:n.jsx(Ne,{className:"h-4 w-4"})})]}),n.jsx("div",{className:`
258
258
  ${E("base","p")}
259
259
  ${c||i?"":E("md","p")}
260
- `,children:t})]}):null;return n.jsxs("div",{className:`inline-block ${f}`,children:[n.jsx("div",{ref:v,className:p,onClick:()=>N(!b),children:e}),typeof window!="undefined"&&qe.createPortal(S,document.body)]})}function cd({value:e,defaultValue:t,format:r="24h",onChange:s,disabled:a=!1,label:o,error:i=!1,helperText:c,className:u=""}){const[d,f]=l.useState(t||""),[p,m]=l.useState(12),[h,x]=l.useState(0),[v,y]=l.useState("AM"),g=e!==void 0,j=g?e:d,C=l.useCallback(I=>{if(!I)return{hours:12,minutes:0,amPm:"AM"};if(r==="24h"){const[A,V]=I.split(":").map(Number);return{hours:A||12,minutes:V||0,amPm:"AM"}}else{const A=I.match(/(\d+):(\d+)\s*(AM|PM)/i);return A?{hours:parseInt(A[1]),minutes:parseInt(A[2]),amPm:A[3].toUpperCase()}:{hours:12,minutes:0,amPm:"AM"}}},[r]),b=(I,A,V)=>{if(r==="24h")return`${String(I).padStart(2,"0")}:${String(A).padStart(2,"0")}`;{const Y=V==="PM"&&I!==12?I+12:V==="AM"&&I===12?0:I;return`${String(Y===0?12:Y>12?Y-12:Y).padStart(2,"0")}:${String(A).padStart(2,"0")} ${V||"AM"}`}};l.useEffect(()=>{if(j){const I=C(j);m(I.hours),x(I.minutes),y(I.amPm)}},[j,C]);const k=I=>{const A=r==="24h"?Math.max(0,Math.min(23,I)):Math.max(1,Math.min(12,I));m(A);const V=b(A,h,r==="12h"?v:void 0);g||f(V),s==null||s(V)},N=I=>{const A=Math.max(0,Math.min(59,I));x(A);const V=b(p,A,r==="12h"?v:void 0);g||f(V),s==null||s(V)},_=()=>{const I=v==="AM"?"PM":"AM";y(I);const A=b(p,h,I);g||f(A),s==null||s(A)},S=()=>{if(r==="24h")k((p+1)%24);else{const I=p===12?1:p+1;k(I)}},M=()=>{if(r==="24h")k(p===0?23:p-1);else{const I=p===1?12:p-1;k(I)}},L=()=>{N((h+1)%60)},R=()=>{N(h===0?59:h-1)},D=n.jsx("div",{className:`${E("base","p")} min-w-48`,children:n.jsxs("div",{className:"flex items-center justify-center gap-4",children:[n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx(Z,{variant:"ghost",size:"sm",onClick:S,disabled:a,"aria-label":"Increment hours",children:"↑"}),n.jsx("div",{className:"text-2xl font-mono font-semibold w-12 text-center",children:String(p).padStart(2,"0")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:M,disabled:a,"aria-label":"Decrement hours",children:"↓"})]}),n.jsx("div",{className:"text-2xl font-semibold",children:":"}),n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx(Z,{variant:"ghost",size:"sm",onClick:L,disabled:a,"aria-label":"Increment minutes",children:"↑"}),n.jsx("div",{className:"text-2xl font-mono font-semibold w-12 text-center",children:String(h).padStart(2,"0")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:R,disabled:a,"aria-label":"Decrement minutes",children:"↓"})]}),r==="12h"&&n.jsxs("div",{className:"flex flex-col gap-2 ml-2",children:[n.jsx(Z,{variant:v==="AM"?"primary":"outline",size:"sm",onClick:()=>_(),disabled:a,children:"AM"}),n.jsx(Z,{variant:v==="PM"?"primary":"outline",size:"sm",onClick:()=>_(),disabled:a,children:"PM"})]})]})});return n.jsx("div",{className:u,children:n.jsx(Es,{trigger:n.jsx(Se,{label:o,value:j||b(p,h,r==="12h"?v:void 0),readOnly:!0,disabled:a,error:i,helperText:c,leftIcon:n.jsx(Pl,{className:"h-4 w-4"}),className:"cursor-pointer"}),placement:"bottom-start",showCloseButton:!0,title:"Select Time",children:D})})}function dd({value:e,defaultValue:t="#000000",format:r="hex",onChange:s,presets:a,showInput:o=!0,disabled:i=!1,label:c,className:u=""}){const[d,f]=l.useState(t),[p,m]=l.useState({r:0,g:0,b:0}),h=e!==void 0,x=h?e:d,v=N=>{const _=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(N);return _?{r:parseInt(_[1],16),g:parseInt(_[2],16),b:parseInt(_[3],16)}:{r:0,g:0,b:0}},y=(N,_,S)=>"#"+[N,_,S].map(M=>{const L=M.toString(16);return L.length===1?"0"+L:L}).join("");l.useEffect(()=>{if(x){const N=v(x);m(N)}},[x]);const g=N=>{const _=N.target.value;(/^#[0-9A-F]{6}$/i.test(_)||_==="")&&(h||f(_),s==null||s(_),_&&m(v(_)))},j=(N,_)=>{const S=P(T({},p),{[N]:Math.max(0,Math.min(255,_))});m(S);const M=y(S.r,S.g,S.b);h||f(M),s==null||s(M)},b=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#808080","#ffa500"],k=n.jsxs("div",{className:`${E("base","p")} min-w-[280px]`,children:[n.jsx("div",{className:`
260
+ `,children:t})]}):null;return n.jsxs("div",{className:`inline-block ${f}`,children:[n.jsx("div",{ref:v,className:p,onClick:()=>L(!k),children:e}),typeof window!="undefined"&&qe.createPortal(D,document.body)]})}function cd({value:e,defaultValue:t,format:r="24h",onChange:s,disabled:a=!1,label:o,error:i=!1,helperText:c,className:u=""}){const[d,f]=l.useState(t||""),[p,m]=l.useState(12),[h,x]=l.useState(0),[v,y]=l.useState("AM"),b=e!==void 0,j=b?e:d,$=l.useCallback(I=>{if(!I)return{hours:12,minutes:0,amPm:"AM"};if(r==="24h"){const[A,W]=I.split(":").map(Number);return{hours:A||12,minutes:W||0,amPm:"AM"}}else{const A=I.match(/(\d+):(\d+)\s*(AM|PM)/i);return A?{hours:parseInt(A[1]),minutes:parseInt(A[2]),amPm:A[3].toUpperCase()}:{hours:12,minutes:0,amPm:"AM"}}},[r]),g=(I,A,W)=>{if(r==="24h")return`${String(I).padStart(2,"0")}:${String(A).padStart(2,"0")}`;{const K=W==="PM"&&I!==12?I+12:W==="AM"&&I===12?0:I;return`${String(K===0?12:K>12?K-12:K).padStart(2,"0")}:${String(A).padStart(2,"0")} ${W||"AM"}`}};l.useEffect(()=>{if(j){const I=$(j);m(I.hours),x(I.minutes),y(I.amPm)}},[j,$]);const k=I=>{const A=r==="24h"?Math.max(0,Math.min(23,I)):Math.max(1,Math.min(12,I));m(A);const W=g(A,h,r==="12h"?v:void 0);b||f(W),s==null||s(W)},N=I=>{const A=Math.max(0,Math.min(59,I));x(A);const W=g(p,A,r==="12h"?v:void 0);b||f(W),s==null||s(W)},L=()=>{const I=v==="AM"?"PM":"AM";y(I);const A=g(p,h,I);b||f(A),s==null||s(A)},S=()=>{if(r==="24h")k((p+1)%24);else{const I=p===12?1:p+1;k(I)}},D=()=>{if(r==="24h")k(p===0?23:p-1);else{const I=p===1?12:p-1;k(I)}},R=()=>{N((h+1)%60)},M=()=>{N(h===0?59:h-1)},F=n.jsx("div",{className:`${E("base","p")} min-w-48`,children:n.jsxs("div",{className:"flex items-center justify-center gap-4",children:[n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx(Z,{variant:"ghost",size:"sm",onClick:S,disabled:a,"aria-label":"Increment hours",children:"↑"}),n.jsx("div",{className:"text-2xl font-mono font-semibold w-12 text-center",children:String(p).padStart(2,"0")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:D,disabled:a,"aria-label":"Decrement hours",children:"↓"})]}),n.jsx("div",{className:"text-2xl font-semibold",children:":"}),n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx(Z,{variant:"ghost",size:"sm",onClick:R,disabled:a,"aria-label":"Increment minutes",children:"↑"}),n.jsx("div",{className:"text-2xl font-mono font-semibold w-12 text-center",children:String(h).padStart(2,"0")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:M,disabled:a,"aria-label":"Decrement minutes",children:"↓"})]}),r==="12h"&&n.jsxs("div",{className:"flex flex-col gap-2 ml-2",children:[n.jsx(Z,{variant:v==="AM"?"primary":"outline",size:"sm",onClick:()=>L(),disabled:a,children:"AM"}),n.jsx(Z,{variant:v==="PM"?"primary":"outline",size:"sm",onClick:()=>L(),disabled:a,children:"PM"})]})]})});return n.jsx("div",{className:u,children:n.jsx(Es,{trigger:n.jsx(Se,{label:o,value:j||g(p,h,r==="12h"?v:void 0),readOnly:!0,disabled:a,error:i,helperText:c,leftIcon:n.jsx(Pl,{className:"h-4 w-4"}),className:"cursor-pointer"}),placement:"bottom-start",showCloseButton:!0,title:"Select Time",children:F})})}function dd({value:e,defaultValue:t="#000000",format:r="hex",onChange:s,presets:a,showInput:o=!0,disabled:i=!1,label:c,className:u=""}){const[d,f]=l.useState(t),[p,m]=l.useState({r:0,g:0,b:0}),h=e!==void 0,x=h?e:d,v=N=>{const L=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(N);return L?{r:parseInt(L[1],16),g:parseInt(L[2],16),b:parseInt(L[3],16)}:{r:0,g:0,b:0}},y=(N,L,S)=>"#"+[N,L,S].map(D=>{const R=D.toString(16);return R.length===1?"0"+R:R}).join("");l.useEffect(()=>{if(x){const N=v(x);m(N)}},[x]);const b=N=>{const L=N.target.value;(/^#[0-9A-F]{6}$/i.test(L)||L==="")&&(h||f(L),s==null||s(L),L&&m(v(L)))},j=(N,L)=>{const S=z(T({},p),{[N]:Math.max(0,Math.min(255,L))});m(S);const D=y(S.r,S.g,S.b);h||f(D),s==null||s(D)},g=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#808080","#ffa500"],k=n.jsxs("div",{className:`${E("base","p")} min-w-[280px]`,children:[n.jsx("div",{className:`
261
261
  w-full
262
262
  h-32
263
263
  ${J("md")}
@@ -265,7 +265,7 @@ React keys must be passed directly to JSX without using spread:
265
265
  mb-4
266
266
  border
267
267
  border-line-default
268
- `,style:{backgroundColor:x}}),n.jsxs("div",{className:"space-y-3 mb-4",children:[n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Red: ",p.r]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.r,onChange:N=>j("r",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Green: ",p.g]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.g,onChange:N=>j("g",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Blue: ",p.b]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.b,onChange:N=>j("b",parseInt(N.target.value)),disabled:i,className:"w-full"})]})]}),o&&n.jsx("div",{className:"mb-4",children:n.jsx(Se,{label:"Hex",value:x,onChange:g,disabled:i,placeholder:"#000000",className:"font-mono"})}),b.length>0&&n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-fg-secondary mb-2",children:"Presets"}),n.jsx("div",{className:"grid grid-cols-10 gap-1",children:b.map((N,_)=>n.jsx("button",{type:"button",onClick:()=>{i||(h||f(N),s==null||s(N),m(v(N)))},disabled:i,className:`
268
+ `,style:{backgroundColor:x}}),n.jsxs("div",{className:"space-y-3 mb-4",children:[n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Red: ",p.r]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.r,onChange:N=>j("r",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Green: ",p.g]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.g,onChange:N=>j("g",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Blue: ",p.b]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.b,onChange:N=>j("b",parseInt(N.target.value)),disabled:i,className:"w-full"})]})]}),o&&n.jsx("div",{className:"mb-4",children:n.jsx(Se,{label:"Hex",value:x,onChange:b,disabled:i,placeholder:"#000000",className:"font-mono"})}),g.length>0&&n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-fg-secondary mb-2",children:"Presets"}),n.jsx("div",{className:"grid grid-cols-10 gap-1",children:g.map((N,L)=>n.jsx("button",{type:"button",onClick:()=>{i||(h||f(N),s==null||s(N),m(v(N)))},disabled:i,className:`
269
269
  w-6
270
270
  h-6
271
271
  ${J("sm")}
@@ -274,7 +274,7 @@ React keys must be passed directly to JSX without using spread:
274
274
  hover:scale-110
275
275
  ${$e("sm")}
276
276
  ${x.toLowerCase()===N.toLowerCase()?"ring-2 ring-offset-1 ring-line-brand":""}
277
- `,style:{backgroundColor:N},"aria-label":`Select color ${N}`},_))})]})]});return n.jsx("div",{className:u,children:n.jsx(Es,{trigger:n.jsxs("div",{className:"flex items-center gap-2",children:[c&&n.jsx("label",{className:"text-sm font-medium text-fg-secondary",children:c}),n.jsx("div",{className:`
277
+ `,style:{backgroundColor:N},"aria-label":`Select color ${N}`},L))})]})]});return n.jsx("div",{className:u,children:n.jsx(Es,{trigger:n.jsxs("div",{className:"flex items-center gap-2",children:[c&&n.jsx("label",{className:"text-sm font-medium text-fg-secondary",children:c}),n.jsx("div",{className:`
278
278
  w-10
279
279
  h-10
280
280
  ${J("md")}
@@ -283,18 +283,18 @@ React keys must be passed directly to JSX without using spread:
283
283
  ${$e("sm")}
284
284
  cursor-pointer
285
285
  ${i?"opacity-50 cursor-not-allowed":""}
286
- `,style:{backgroundColor:x}}),o&&n.jsx(Se,{value:x,onChange:g,disabled:i,placeholder:"#000000",className:"w-24 font-mono"})]}),placement:"bottom-start",showCloseButton:!0,title:"Pick a Color",children:k})})}const Wa=l.createContext(void 0);function ud({children:e,value:t}){return n.jsx(Wa.Provider,{value:t,children:e})}function fd(){const e=l.useContext(Wa);if(!e)throw new Error("Drawer components must be used within Drawer");return e}function Ms({children:e,className:t="",showCloseButton:r=!1}){const{isOpen:s,closeDrawer:a,position:o,size:i,closeOnOverlayClick:c,closeOnEscape:u}=fd();if(l.useEffect(()=>{if(s&&u){const m=h=>{h.key==="Escape"&&a()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)}},[s,u,a]),l.useEffect(()=>{if(s)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[s]),!s)return null;const d={sm:o==="left"||o==="right"?"w-64":"h-64",md:o==="left"||o==="right"?"w-96":"h-96",lg:o==="left"||o==="right"?"w-[32rem]":"h-[32rem]",xl:o==="left"||o==="right"?"w-[42rem]":"h-[42rem]",full:o==="left"||o==="right"?"w-full":"h-full"},f={left:"left-0 top-0 bottom-0",right:"right-0 top-0 bottom-0",top:"top-0 left-0 right-0",bottom:"bottom-0 left-0 right-0"},p=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`
286
+ `,style:{backgroundColor:x}}),o&&n.jsx(Se,{value:x,onChange:b,disabled:i,placeholder:"#000000",className:"w-24 font-mono"})]}),placement:"bottom-start",showCloseButton:!0,title:"Pick a Color",children:k})})}const Wa=l.createContext(void 0);function ud({children:e,value:t}){return n.jsx(Wa.Provider,{value:t,children:e})}function fd(){const e=l.useContext(Wa);if(!e)throw new Error("Drawer components must be used within Drawer");return e}function Ms({children:e,className:t="",showCloseButton:r=!1,title:s,"aria-label":a,"aria-labelledby":o}){const i=l.useId(),c=o!=null?o:s?i:void 0,{isOpen:u,closeDrawer:d,position:f,size:p,closeOnOverlayClick:m,closeOnEscape:h}=fd();if(l.useEffect(()=>{if(u&&h){const b=j=>{j.key==="Escape"&&d()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)}},[u,h,d]),l.useEffect(()=>{if(u)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[u]),l.useEffect(()=>{process.env.NODE_ENV!=="production"&&u&&(s||a||c||console.warn('[DrawerContent] Missing accessible name. Provide `title`, `aria-label`, or `aria-labelledby` — `role="dialog"` without a name fails axe `aria-dialog-name`.'))},[u,s,a,c]),!u)return null;const x={sm:f==="left"||f==="right"?"w-64":"h-64",md:f==="left"||f==="right"?"w-96":"h-96",lg:f==="left"||f==="right"?"w-[32rem]":"h-[32rem]",xl:f==="left"||f==="right"?"w-[42rem]":"h-[42rem]",full:f==="left"||f==="right"?"w-full":"h-full"},v={left:"left-0 top-0 bottom-0",right:"right-0 top-0 bottom-0",top:"top-0 left-0 right-0",bottom:"bottom-0 left-0 right-0"},y=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`
287
287
  fixed
288
288
  inset-0
289
289
  bg-scrim
290
290
  ${ue("modal")}
291
291
  ${be("base")}
292
- ${s?"opacity-100":"opacity-0"}
293
- `,onClick:c?a:void 0,"aria-hidden":"true"}),n.jsxs("div",{className:`
292
+ ${u?"opacity-100":"opacity-0"}
293
+ `,onClick:m?d:void 0,"aria-hidden":"true"}),n.jsxs("div",{className:`
294
294
  fixed
295
- ${f[o]}
296
- ${d[i]}
297
- ${o==="left"||o==="right"?"max-w-[90vw]":"max-h-[90vh]"}
295
+ ${v[f]}
296
+ ${x[p]}
297
+ ${f==="left"||f==="right"?"max-w-[90vw]":"max-h-[90vh]"}
298
298
  bg-surface-overlay
299
299
  ${$e("xl")}
300
300
  ${ue("modal")}
@@ -302,18 +302,20 @@ React keys must be passed directly to JSX without using spread:
302
302
  flex
303
303
  flex-col
304
304
  ${t}
305
- `,role:"dialog","aria-modal":"true",onClick:m=>m.stopPropagation(),children:[r&&n.jsx("div",{className:`
305
+ `,role:"dialog","aria-modal":"true","aria-labelledby":c,"aria-label":c?void 0:a,onClick:b=>b.stopPropagation(),children:[(s||r)&&n.jsxs("div",{className:`
306
306
  flex
307
- justify-end
308
- ${E("sm","p")}
307
+ items-center
308
+ justify-between
309
+ ${E("base","px")}
310
+ ${E("md","py")}
309
311
  border-b
310
312
  border-line-default
311
- `,children:n.jsx(Z,{variant:"ghost",size:"sm",onClick:a,className:"h-auto p-1","aria-label":"Close drawer",children:n.jsx(Ne,{className:"h-4 w-4"})})}),e]})]});return typeof window!="undefined"?qe.createPortal(p,document.body):null}function Ha(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",P(T({className:`
313
+ `,children:[s?n.jsx("h2",{id:i,className:"text-lg font-semibold text-fg-primary",children:s}):n.jsx("span",{}),r&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:d,className:"h-auto p-1","aria-label":"Close drawer",children:n.jsx(Ne,{className:"h-4 w-4"})})]}),e]})]});return typeof window!="undefined"?qe.createPortal(y,document.body):null}function Ha(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",z(T({className:`
312
314
  ${E("lg","p")}
313
315
  border-b
314
316
  border-line-default
315
317
  ${t}
316
- `},r),{children:e}))}function Ba(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",P(T({className:`
318
+ `},r),{children:e}))}function Ua(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",z(T({className:`
317
319
  ${E("lg","p")}
318
320
  border-t
319
321
  border-line-default
@@ -321,7 +323,7 @@ React keys must be passed directly to JSX without using spread:
321
323
  justify-end
322
324
  ${E("sm","gap")}
323
325
  ${t}
324
- `},r),{children:e}))}function Gt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,position:a="right",size:o="md",closeOnOverlayClick:i=!0,closeOnEscape:c=!0}){const[u,d]=l.useState(r),f=t!==void 0,p=f?t:u,m=x=>{f||d(x),s==null||s(x)},h=()=>{m(!1)};return n.jsx(ud,{value:{isOpen:p,closeDrawer:h,position:a,size:o,closeOnOverlayClick:i,closeOnEscape:c},children:e})}Gt.Content=Ms;Gt.Header=Ha;Gt.Footer=Ba;const Ua=l.createContext(void 0);function md({children:e,value:t}){return n.jsx(Ua.Provider,{value:t,children:e})}function Ts(){const e=l.useContext(Ua);if(!e)throw new Error("Menu components must be used within Menu");return e}function pd(...e){return t=>{for(const r of e)r&&(typeof r=="function"?r(t):r.current=t)}}const As=l.forwardRef(function(i,o){var c=i,{children:t,asChild:r,onClick:s}=c,a=O(c,["children","asChild","onClick"]);var h,x;const{isOpen:u,setIsOpen:d}=Ts(),f=v=>{s==null||s(v),d(!u)},p=l.Children.count(t)===1&&l.isValidElement(t);if(r===!0||r===void 0&&p){const v=l.Children.only(t),y=v.props.onClick,g=j=>{y==null||y(j),j.defaultPrevented||f(j)};return l.cloneElement(v,P(T({},a),{role:(h=v.props.role)!=null?h:"button",tabIndex:(x=v.props.tabIndex)!=null?x:0,"aria-haspopup":"menu","aria-expanded":u,onClick:g,ref:pd(o,v.props.ref)}))}return n.jsx("div",P(T({ref:o,onClick:f,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":u},a),{children:t}))});As.displayName="MenuTrigger";function qa({children:e,className:t="",align:r="start"}){const{isOpen:s,closeMenu:a,placement:o}=Ts(),i=l.useRef(null),c=l.useRef(null),[u,d]=l.useState({top:0,left:0});if(l.useEffect(()=>{if(s){const p=document.querySelector('[aria-haspopup="menu"]');c.current=p}},[s]),l.useEffect(()=>{if(s&&i.current&&c.current){const p=()=>{const x=c.current.getBoundingClientRect(),v=i.current.getBoundingClientRect(),y=window.scrollY,g=window.scrollX;let j=0,C=0;o==="bottom"?(j=x.bottom+y+4,r==="start"?C=x.left+g:r==="end"?C=x.right+g-v.width:C=x.left+g+(x.width-v.width)/2):o==="top"?(j=x.top+y-v.height-4,r==="start"?C=x.left+g:r==="end"?C=x.right+g-v.width:C=x.left+g+(x.width-v.width)/2):o==="right"?(C=x.right+g+4,r==="start"?j=x.top+y:r==="end"?j=x.bottom+y-v.height:j=x.top+y+(x.height-v.height)/2):o==="left"&&(C=x.left+g-v.width-4,r==="start"?j=x.top+y:r==="end"?j=x.bottom+y-v.height:j=x.top+y+(x.height-v.height)/2);const b=8;j=Math.max(b,Math.min(j,window.innerHeight+y-v.height-b)),C=Math.max(b,Math.min(C,window.innerWidth+g-v.width-b)),d({top:j,left:C})};p();const m=()=>p(),h=()=>p();return window.addEventListener("resize",m),window.addEventListener("scroll",h,!0),()=>{window.removeEventListener("resize",m),window.removeEventListener("scroll",h,!0)}}},[s,o,r]),l.useEffect(()=>{if(s){const p=m=>{m.key==="Escape"&&a()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)}},[s,a]),l.useEffect(()=>{if(s){const p=m=>{i.current&&c.current&&!i.current.contains(m.target)&&!c.current.contains(m.target)&&a()};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)}},[s,a]),!s)return null;const f=n.jsx("div",{ref:i,role:"menu",className:`
326
+ `},r),{children:e}))}function Gt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,position:a="right",size:o="md",closeOnOverlayClick:i=!0,closeOnEscape:c=!0}){const[u,d]=l.useState(r),f=t!==void 0,p=f?t:u,m=x=>{f||d(x),s==null||s(x)},h=()=>{m(!1)};return n.jsx(ud,{value:{isOpen:p,closeDrawer:h,position:a,size:o,closeOnOverlayClick:i,closeOnEscape:c},children:e})}Gt.Content=Ms;Gt.Header=Ha;Gt.Footer=Ua;const Ba=l.createContext(void 0);function md({children:e,value:t}){return n.jsx(Ba.Provider,{value:t,children:e})}function Ts(){const e=l.useContext(Ba);if(!e)throw new Error("Menu components must be used within Menu");return e}function pd(...e){return t=>{for(const r of e)r&&(typeof r=="function"?r(t):r.current=t)}}const As=l.forwardRef(function(i,o){var c=i,{children:t,asChild:r,onClick:s}=c,a=O(c,["children","asChild","onClick"]);var h,x;const{isOpen:u,setIsOpen:d}=Ts(),f=v=>{s==null||s(v),d(!u)},p=l.Children.count(t)===1&&l.isValidElement(t);if(r===!0||r===void 0&&p){const v=l.Children.only(t),y=v.props.onClick,b=j=>{y==null||y(j),j.defaultPrevented||f(j)};return l.cloneElement(v,z(T({},a),{role:(h=v.props.role)!=null?h:"button",tabIndex:(x=v.props.tabIndex)!=null?x:0,"aria-haspopup":"menu","aria-expanded":u,onClick:b,ref:pd(o,v.props.ref)}))}return n.jsx("div",z(T({ref:o,onClick:f,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":u},a),{children:t}))});As.displayName="MenuTrigger";function qa({children:e,className:t="",align:r="start"}){const{isOpen:s,closeMenu:a,placement:o}=Ts(),i=l.useRef(null),c=l.useRef(null),[u,d]=l.useState({top:0,left:0});if(l.useEffect(()=>{if(s){const p=document.querySelector('[aria-haspopup="menu"]');c.current=p}},[s]),l.useEffect(()=>{if(s&&i.current&&c.current){const p=()=>{const x=c.current.getBoundingClientRect(),v=i.current.getBoundingClientRect(),y=window.scrollY,b=window.scrollX;let j=0,$=0;o==="bottom"?(j=x.bottom+y+4,r==="start"?$=x.left+b:r==="end"?$=x.right+b-v.width:$=x.left+b+(x.width-v.width)/2):o==="top"?(j=x.top+y-v.height-4,r==="start"?$=x.left+b:r==="end"?$=x.right+b-v.width:$=x.left+b+(x.width-v.width)/2):o==="right"?($=x.right+b+4,r==="start"?j=x.top+y:r==="end"?j=x.bottom+y-v.height:j=x.top+y+(x.height-v.height)/2):o==="left"&&($=x.left+b-v.width-4,r==="start"?j=x.top+y:r==="end"?j=x.bottom+y-v.height:j=x.top+y+(x.height-v.height)/2);const g=8;j=Math.max(g,Math.min(j,window.innerHeight+y-v.height-g)),$=Math.max(g,Math.min($,window.innerWidth+b-v.width-g)),d({top:j,left:$})};p();const m=()=>p(),h=()=>p();return window.addEventListener("resize",m),window.addEventListener("scroll",h,!0),()=>{window.removeEventListener("resize",m),window.removeEventListener("scroll",h,!0)}}},[s,o,r]),l.useEffect(()=>{if(s){const p=m=>{m.key==="Escape"&&a()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)}},[s,a]),l.useEffect(()=>{if(s){const p=m=>{i.current&&c.current&&!i.current.contains(m.target)&&!c.current.contains(m.target)&&a()};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)}},[s,a]),!s)return null;const f=n.jsx("div",{ref:i,role:"menu",className:`
325
327
  absolute
326
328
  ${ue("popover")}
327
329
  bg-surface-overlay
@@ -332,7 +334,7 @@ React keys must be passed directly to JSX without using spread:
332
334
  min-w-40
333
335
  ${E("xs","py")}
334
336
  ${t}
335
- `,style:{top:`${u.top}px`,left:`${u.left}px`},children:e});return typeof window!="undefined"?qe.createPortal(f,document.body):null}const Rs=l.forwardRef(function(p,f){var m=p,{children:t,icon:r,rightIcon:s,disabled:a=!1,onClick:o,onSelect:i,hasSubmenu:c=!1,className:u=""}=m,d=O(m,["children","icon","rightIcon","disabled","onClick","onSelect","hasSubmenu","className"]);const{closeMenu:h}=Ts(),x=y=>{a||(o==null||o(y),i==null||i(y),!c&&!y.defaultPrevented&&h())},v=y=>{a||(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),x(y))};return n.jsxs("div",P(T({ref:f,role:"menuitem",tabIndex:a?-1:0,"aria-disabled":a,onClick:x,onKeyDown:v,className:`
337
+ `,style:{top:`${u.top}px`,left:`${u.left}px`},children:e});return typeof window!="undefined"?qe.createPortal(f,document.body):null}const Rs=l.forwardRef(function(p,f){var m=p,{children:t,icon:r,rightIcon:s,disabled:a=!1,onClick:o,onSelect:i,hasSubmenu:c=!1,className:u=""}=m,d=O(m,["children","icon","rightIcon","disabled","onClick","onSelect","hasSubmenu","className"]);const{closeMenu:h}=Ts(),x=y=>{a||(o==null||o(y),i==null||i(y),!c&&!y.defaultPrevented&&h())},v=y=>{a||(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),x(y))};return n.jsxs("div",z(T({ref:f,role:"menuitem",tabIndex:a?-1:0,"aria-disabled":a,onClick:x,onKeyDown:v,className:`
336
338
  flex
337
339
  items-center
338
340
  gap-2
@@ -383,7 +385,7 @@ React keys must be passed directly to JSX without using spread:
383
385
  ${E("base","px")}
384
386
  ${E("md","py")}
385
387
  text-fg-secondary
386
- `,children:d.content})})]},d.id)})})}const Ka=l.createContext(void 0);function ls({children:e,mobileMenuOpen:t,onMobileMenuChange:r,defaultMobileMenuOpen:s=!1}){const[a,o]=l.useState(s),i=t!==void 0,c=i?t:a,u=l.useCallback(m=>{i||o(m),r==null||r(m)},[i,r]),d=l.useCallback(()=>{u(!c)},[c,u]),f=l.useCallback(()=>{u(!0)},[u]),p=l.useCallback(()=>{u(!1)},[u]);return n.jsx(Ka.Provider,{value:{isMobileMenuOpen:c,toggleMobileMenu:d,setMobileMenuOpen:u,openMobileMenu:f,closeMobileMenu:p},children:e})}function Is(){const e=l.useContext(Ka);if(!e)throw new Error("useHeaderContext must be used within HeaderProvider");return e}function Ya(s){var a=s,{children:e,className:t}=a,r=O(a,["children","className"]);return n.jsx("div",{className:"flex-shrink-0",children:n.jsx(xs,P(T({href:r.href||"/",variant:"default",className:w("flex items-center font-semibold text-lg",t)},r),{children:e}))})}function Xa({children:e,className:t}){return n.jsx("nav",{className:w("flex-1 flex items-center justify-center gap-4","hidden md:flex",t),"aria-label":"Main navigation",children:e})}function Ja({children:e,className:t}){return n.jsx("div",{className:w("flex-shrink-0 flex items-center gap-2",t),children:e})}function Qa({className:e,icon:t,closeIcon:r,variant:s="ghost",size:a="md"}){const{isMobileMenuOpen:o,toggleMobileMenu:i}=Is(),c=t||n.jsx(ac,{className:"h-5 w-5"}),u=r||n.jsx(Ne,{className:"h-5 w-5"});return n.jsx(Z,{variant:s,size:a,onClick:i,className:w("md:hidden",e),"aria-label":o?"Close menu":"Open menu","aria-expanded":o,children:o?u:c})}function Za({children:e,className:t}){const{isMobileMenuOpen:r,closeMobileMenu:s}=Is();return n.jsx(Gt,{open:r,onOpenChange:a=>{a||s()},position:"left",size:"sm",closeOnOverlayClick:!0,closeOnEscape:!0,children:n.jsx(Ms,{className:w("p-4",t),children:n.jsx("nav",{className:"flex flex-col gap-2","aria-label":"Mobile navigation",children:e})})})}const bd={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},it=l.forwardRef((u,c)=>{var d=u,{className:e,maxWidth:t="lg",paddingX:r="base",paddingY:s="base",center:a=!0,children:o}=d,i=O(d,["className","maxWidth","paddingX","paddingY","center","children"]);return n.jsx("div",P(T({ref:c,className:w("w-full",bd[t],E(r,"px"),E(s,"py"),a&&"mx-auto",e)},i),{children:o}))});it.displayName="Container";const At=l.forwardRef((u,c)=>{var d=u,{className:e,spacing:t="base",align:r="stretch",justify:s="start",direction:a="column",children:o}=d,i=O(d,["className","spacing","align","justify","direction","children"]);const f=a==="column"?E(t,"gap-y"):E(t,"gap-x"),p={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},m={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsx("div",P(T({ref:c,className:w("flex",a==="column"?"flex-col":"flex-row",f,p[r],m[s],e)},i),{children:o}))});At.displayName="Stack";const gd=ve(w("w-full","bg-surface-base","transition-shadow","transition-colors"),{variants:{variant:{default:"",elevated:"shadow-sm",bordered:w("border-b","border-line-muted")}},defaultVariants:{variant:"default"}});function xt(c){var u=c,{children:e,variant:t="default",sticky:r=!1,maxWidth:s="full",bare:a=!1,className:o}=u,i=O(u,["children","variant","sticky","maxWidth","bare","className"]);const d=n.jsx("div",{className:"flex items-center justify-between gap-4",children:e});return a?n.jsx(ls,{children:n.jsx("div",P(T({className:w(o)},i),{children:d}))}):n.jsx(ls,{children:n.jsx("header",P(T({className:w(gd({variant:t}),r&&`sticky top-0 ${ue("sticky")}`,r&&"backdrop-blur-sm bg-surface-base/95",o)},i),{children:n.jsx(it,{maxWidth:s,paddingX:"base",paddingY:"sm",children:d})}))})}xt.Logo=Ya;xt.Navigation=Xa;xt.Actions=Ja;xt.Hamburger=Qa;xt.MobileMenu=Za;const In=ve(w("flex","items-center","gap-2"),{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},variant:{default:"",pills:"",tabs:""}},defaultVariants:{orientation:"horizontal",variant:"default"},compoundVariants:[{orientation:"vertical",variant:"default",class:"items-stretch"},{orientation:"vertical",variant:"pills",class:"items-stretch"},{orientation:"vertical",variant:"tabs",class:"items-stretch"}]});function xd(u){var d=u,{items:e,orientation:t="horizontal",variant:r="default",className:s,"aria-label":a="Main navigation",bare:o=!1,pathname:i}=d,c=O(d,["items","orientation","variant","className","aria-label","bare","pathname"]);let f=i;if(!f)try{const h=typeof require!="undefined"?require("next/navigation"):null;if(h!=null&&h.usePathname){const x=h.usePathname;f=x()}}catch(h){f=void 0}const p=l.useMemo(()=>e.map(h=>{if(h.active!==void 0)return h;if(f){const x=f===h.href||h.href!=="/"&&f.startsWith(`${h.href}/`);return P(T({},h),{active:x})}return P(T({},h),{active:!1})}),[e,f]),m=n.jsx(n.Fragment,{children:p.map((h,x)=>{const v=r==="pills"?"background":r==="tabs"?"underline":"default";return n.jsxs(xs,{href:h.href,active:h.active,disabled:h.disabled,variant:v,className:w("flex items-center gap-2",t==="vertical"&&"w-full justify-start",h.className),children:[h.icon&&n.jsx("span",{className:"flex-shrink-0","aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.label}),h.badge&&n.jsx("span",{className:"ml-auto",children:h.badge})]},h.href||x)})});return o?n.jsx("div",P(T({className:w(In({orientation:t,variant:r}),s)},c),{children:m})):n.jsx("nav",P(T({className:w(In({orientation:t,variant:r}),s),"aria-label":a},c),{children:m}))}function eo(e){return n.jsx(xd,P(T({},e),{pathname:e.pathname}))}const vd=ve(w("w-full","flex","flex-col","gap-2"),{variants:{variant:{default:w(E("base","mb")),compact:w(E("sm","mb"))}},defaultVariants:{variant:"default"}});function to(c){var u=c,{title:e,description:t,breadcrumb:r,actions:s,variant:a="default",className:o}=u,i=O(u,["title","description","breadcrumb","actions","variant","className"]);return n.jsxs("div",P(T({className:w(vd({variant:a}),o)},i),{children:[r&&r.length>0&&n.jsx(Ma,{items:r}),n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx(Ue,{variant:"heading",as:"h1",className:"mb-2 text-2xl font-bold",children:e}),t&&n.jsx(Ue,{variant:"body",className:"text-fg-secondary",children:t})]}),s&&n.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:s})]})]}))}function yd(s){var a=s,{onForgotPasswordClick:e,className:t}=a,r=O(a,["onForgotPasswordClick","className"]);return n.jsx("div",{className:w(E("base","p"),"bg-surface-muted",J("md"),t),children:n.jsxs("form",P(T({},r),{onSubmit:o=>{o.preventDefault(),r.onSubmit&&r.onSubmit(o)},className:w("space-y-4",r.className),children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(Tt,{htmlFor:"login-email",variant:"required",children:"Your email"}),n.jsx(Se,{id:"login-email",placeholder:"myname@email.com",type:"email"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(Tt,{htmlFor:"login-password",variant:"required",children:"Your password"}),n.jsx(Se,{id:"login-password",placeholder:"••••••••",type:"password"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx(Z,{variant:"secondary",type:"button",onClick:e,children:"Forgot password?"}),n.jsx(Z,{variant:"regular",type:"submit",children:"Sign in"})]})]}))})}function wd(d){var f=d,{isOpen:e,onClose:t,title:r,children:s,variant:a="default",showCloseButton:o=!0,footer:i,className:c=""}=f,u=O(f,["isOpen","onClose","title","children","variant","showCloseButton","footer","className"]);const p=l.useRef(null),m=l.useRef(null);if(l.useEffect(()=>{if(!e)return;m.current=document.activeElement;const j=setTimeout(()=>{var b;(b=p.current)==null||b.focus()},0),C=b=>{b.key==="Escape"&&t()};return document.addEventListener("keydown",C),()=>{var b;clearTimeout(j),document.removeEventListener("keydown",C),(b=m.current)==null||b.focus()}},[e,t]),l.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const h=["fixed","inset-0",ue("modal"),"overflow-y-auto"],x=["fixed","inset-0","bg-scrim","transition-opacity"],y=["relative","bg-surface-overlay","rounded-lg","shadow-xl","my-8","mx-auto",{default:"max-w-md",large:"max-w-2xl",fullscreen:"max-w-full h-full"}[a],"p-6",c].filter(Boolean).join(" "),g=n.jsxs("div",{className:h.join(" "),role:"dialog","aria-modal":"true","aria-labelledby":r?"modal-title":void 0,onClick:j=>{j.target===j.currentTarget&&t()},children:[n.jsx("div",{className:x.join(" "),"aria-hidden":"true"}),n.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:n.jsxs("div",P(T({ref:p,tabIndex:-1,className:y,onClick:j=>j.stopPropagation()},u),{children:[r&&n.jsxs("div",{className:"flex justify-between items-center mb-4",children:[n.jsx("h2",{id:"modal-title",className:"text-xl font-semibold text-fg-primary",children:r}),o&&n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Ne,{className:"h-6 w-6"})})]}),!r&&o&&n.jsx("div",{className:"flex justify-end mb-4",children:n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Ne,{className:"h-6 w-6"})})}),n.jsx("div",{className:"mb-4",children:s}),i&&n.jsx("div",{className:"flex justify-end gap-2 mt-4",children:i})]}))})]});return typeof window!="undefined"?qe.createPortal(g,document.body):g}const Rr=l.createContext(void 0);function Oe(){const e=l.useContext(Rr);if(e===void 0)throw new Error("useTableContext must be used within a Table component");return e}function kd(){const e=l.useContext(Rr);return e||void 0}function cs({columns:e,data:t,loading:r=!1,paginationMode:s,page:a,pageSize:o,total:i,onPageChange:c,onPageSizeChange:u,defaultPageSize:d=10,pageSizeOptions:f,sortColumn:p,sortDirection:m,onSort:h,defaultSortColumn:x,defaultSortDirection:v="asc",filters:y,filterValues:g,onFilter:j,initialFilterValues:C={},selectable:b=!1,selectedRows:k,onSelectionChange:N,rowId:_,actions:S,emptyMessage:M="No data available",emptyStateTitle:L,emptyStateMessage:R,emptyStateIllustration:D,emptyStateAction:I,onRowClick:A,resizable:V=!1,columnWidths:Y,onColumnResize:H,virtualScrolling:W,virtualScrollingOptions:ie,children:ne}){const F=l.useMemo(()=>s||(i!==void 0&&c?"server":"client"),[s,i,c]),B=a!==void 0,[K,Q]=l.useState(1),[le,se]=l.useState(d),z=B?a:K,U=o!=null?o:le,X=l.useMemo(()=>F==="server"?i!=null?i:0:t.length,[F,i,t.length]),ae=l.useMemo(()=>Math.ceil(X/U),[X,U]),fe=p!==void 0,[ke,je]=l.useState(x||""),[Ie,Ft]=l.useState(v),Me=fe?p:ke,Xt=fe?m||"asc":Ie,Vr=g!==void 0,[Eo,Mo]=l.useState(C),Jt=Vr?g:Eo,Wr=k!==void 0,[To,Ao]=l.useState([]),De=Wr?k:To,Qt=l.useMemo(()=>!y||y.length===0?t:t.filter(ee=>y.every(de=>{const ge=Jt[de.key];if(!ge||ge==="")return!0;const er=ee[de.key];return de.type==="text"?String(er||"").toLowerCase().includes(String(ge).toLowerCase()):String(er)===String(ge)})),[t,y,Jt]),Hr=l.useMemo(()=>{if(fe&&h||!Me)return Qt;const ee=[...Qt];return ee.sort((de,ge)=>{const er=de[Me],Lo=ge[Me],un=String(er||"").localeCompare(String(Lo||""));return Xt==="asc"?un:-un}),ee},[Qt,Me,Xt,h,fe]),Ve=l.useMemo(()=>{if(F==="server")return Hr;const ee=(z-1)*U,de=ee+U;return Hr.slice(ee,de)},[Hr,F,z,U]),wt=l.useCallback((ee,de)=>{var ge;return _?_(ee):((ge=ee==null?void 0:ee.id)==null?void 0:ge.toString())||de.toString()},[_]),Zt=l.useMemo(()=>!b||Ve.length===0?!1:Ve.every((ee,de)=>{const ge=wt(ee,de);return De.includes(ge)}),[b,Ve,De,wt]),rn=l.useMemo(()=>{if(!b)return!1;const ee=De.length;return ee>0&&ee<Ve.length},[b,De.length,Ve.length]),kt=l.useCallback(ee=>{B?c==null||c(ee):Q(ee)},[B,c]),sn=l.useCallback(ee=>{u?u(ee):se(ee),kt(1)},[u,kt]),nn=l.useCallback((ee,de)=>{fe?h==null||h(ee,de):(je(ee),Ft(de))},[fe,h]),an=l.useCallback(ee=>{Vr?j==null||j(ee):Mo(ee),kt(1)},[Vr,j,kt]),ut=l.useCallback(ee=>{Wr?N==null||N(ee):Ao(ee)},[Wr,N]),on=l.useCallback(ee=>{const de=De.includes(ee)?De.filter(ge=>ge!==ee):[...De,ee];ut(de)},[De,ut]),ln=l.useCallback(()=>{if(Zt)ut([]);else{const ee=Ve.map((de,ge)=>wt(de,ge));ut(ee)}},[Zt,Ve,wt,ut]),[Ro,Io]=l.useState({}),Br=Y!==void 0,cn=Br?Y:Ro,dn=l.useCallback((ee,de)=>{Br?H==null||H(ee,de):Io(ge=>P(T({},ge),{[ee]:de}))},[Br,H]),Do=l.useMemo(()=>({columns:e,data:t,paginatedData:Ve,loading:r,paginationState:{page:z,pageSize:U,total:X,totalPages:ae},sortState:{column:Me,direction:Xt},filterState:{values:Jt,config:y||[]},selectionState:{selectedRows:De,isAllSelected:Zt,isIndeterminate:rn},paginationMode:F,selectable:b,rowId:_,actions:S,resizable:V,columnWidths:cn,virtualScrolling:W,emptyMessage:M,emptyStateTitle:L,emptyStateMessage:R,emptyStateIllustration:D,emptyStateAction:I,setPage:kt,setPageSize:sn,setSorting:nn,setFilters:an,setSelection:ut,toggleRowSelection:on,toggleSelectAll:ln,getRowId:wt,setColumnWidth:dn,onPageChange:c,onPageSizeChange:u,onSort:h,onFilter:j,onSelectionChange:N,onRowClick:A,onColumnResize:H}),[e,t,Ve,r,z,U,X,ae,Me,Xt,Jt,y,De,Zt,rn,F,b,_,S,M,L,R,D,I,kt,sn,nn,an,ut,on,ln,wt,dn,c,u,h,j,N,A,H,V,cn,W]);return n.jsx(Rr.Provider,{value:Do,children:ne})}function Ds(u){var d=u,{column:e,resizable:t=!1,width:r,onResize:s,minWidth:a=50,maxWidth:o,className:i=""}=d,c=O(d,["column","resizable","width","onResize","minWidth","maxWidth","className"]);const{sortState:f,setSorting:p,onSort:m}=Oe(),h=l.useRef(null),x=l.useRef(null),v=l.useRef(null),y=()=>{if(!e.sortable||!m&&!p)return;const N=f.column===e.key&&f.direction==="asc"?"desc":"asc";m?m(e.key,N):p(e.key,N)},g=N=>{b&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),y())},j=N=>{if(N.preventDefault(),N.stopPropagation(),!x.current||!s)return;const _=r||x.current.offsetWidth;v.current={x:N.clientX,width:_};const S=L=>{if(!v.current)return;const R=L.clientX-v.current.x,D=v.current.width+R,I=Math.max(a,o?Math.min(D,o):D);s(e.key,I)},M=()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",M),v.current=null};document.addEventListener("mousemove",S),document.addEventListener("mouseup",M)},C=f.column===e.key,b=e.sortable&&(m||p),k=C?f.direction:void 0;return n.jsx("th",P(T({ref:x,scope:"col",role:"columnheader","aria-sort":C?k==="asc"?"ascending":"descending":b?"none":void 0,className:`px-6 py-3 text-left text-xs font-medium text-fg-tertiary uppercase tracking-wider ${b?"cursor-pointer hover:bg-surface-active focus:bg-surface-active focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2 select-none":""} ${e.hiddenOnMobile?"hidden md:table-cell":""} ${i}`,onClick:b?y:void 0,onKeyDown:b?g:void 0,tabIndex:b?0:void 0,style:r?{width:`${r}px`,minWidth:`${r}px`}:void 0},c),{children:n.jsxs("div",{className:"flex items-center gap-2 relative",children:[n.jsx("span",{children:e.label}),C&&n.jsx("span",{className:"text-fg-tertiary","aria-hidden":"true",children:f.direction==="asc"?"↑":"↓"}),t&&s&&n.jsx("div",{ref:h,className:"absolute right-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-surface-brand transition-colors",onMouseDown:j,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${e.label} column`,style:{touchAction:"none"}})]})}))}function Ls(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{columns:a,selectable:o,selectionState:i,toggleSelectAll:c,actions:u,resizable:d,columnWidths:f,setColumnWidth:p}=Oe();return n.jsxs("tr",P(T({role:"row",className:e},t),{children:[o&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 w-12","aria-label":"Select all",children:n.jsx(Nr,{checked:i.isAllSelected,onChange:c,"aria-label":"Select all rows",className:"my-0",indeterminate:i.isIndeterminate})}),a.map(m=>n.jsx(Ds,{column:m,resizable:d,width:f==null?void 0:f[m.key],onResize:p},m.key)),u&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 text-right text-xs font-medium text-fg-tertiary uppercase tracking-wider w-12","aria-label":"Actions",children:n.jsx("span",{className:"sr-only",children:"Actions"})})]}))}function Fs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);return Oe(),n.jsx("thead",P(T({className:`bg-surface-subtle sticky top-0 ${ue("sticky")} ${e}`},t),{children:n.jsx(Ls,{})}))}function _s(a){var o=a,{column:e,row:t,className:r=""}=o,s=O(o,["column","row","className"]);const i=e.key in t?t[e.key]:void 0;return n.jsx("td",P(T({className:`px-6 py-4 whitespace-nowrap text-sm text-fg-primary ${e.hiddenOnMobile?"hidden md:table-cell":""} ${r}`},s),{children:e.render?e.render(i,t):String(i!=null?i:"")}))}function jd(o){var i=o,{actions:e,row:t,align:r="right",className:s=""}=i,a=O(i,["actions","row","align","className"]);const c=e.map(u=>({label:u.label,onClick:()=>u.onClick(t),variant:u.variant,disabled:u.disabled}));return n.jsx("div",P(T({className:`inline-flex ${s}`},a),{children:n.jsx(Ra,{trigger:n.jsx(Z,{variant:"ghost",size:"sm","aria-label":"Row actions",className:"h-8 w-8 p-0",children:n.jsx(Bl,{className:"h-4 w-4"})}),items:c,align:r})}))}function Ps(a){var o=a,{row:e,align:t="right",className:r=""}=o,s=O(o,["row","align","className"]);const{actions:i}=Oe();if(!i)return null;const c=i(e);return c.length===0?null:n.jsx(jd,T({row:e,actions:c,align:t,className:r},s))}function hr(i){var c=i,{row:e,rowIndex:t,className:r="",onClick:s,style:a}=c,o=O(c,["row","rowIndex","className","onClick","style"]);const{columns:u,selectable:d,selectionState:f,toggleRowSelection:p,getRowId:m,actions:h,onRowClick:x}=Oe(),v=m(e,t),y=f.selectedRows.includes(v),g=j=>{s&&s(j),x&&x(e)};return n.jsxs("tr",P(T({role:"row","aria-selected":d?y:void 0,"aria-rowindex":t+1,className:`hover:bg-surface-hover ${y?"bg-surface-selected":""} ${r}`,onClick:g,style:a},o),{children:[d&&n.jsx("td",{className:"px-6 py-4",children:n.jsx(Nr,{checked:y,onChange:()=>p(v),"aria-label":`Select row ${v}`,className:"my-0"})}),u.map(j=>n.jsx(_s,{column:j,row:e},String(j.key))),h&&n.jsx("td",{className:"px-6 py-4 text-right",children:n.jsx(Ps,{row:e})})]}))}function zs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{emptyMessage:a,emptyStateTitle:o,emptyStateMessage:i,emptyStateIllustration:c,emptyStateAction:u}=Oe();return o||i||c?n.jsxs("div",P(T({className:e},t),{children:[n.jsx(Aa,{title:o||"No data available",message:i||a||"No data available",variant:c?"withIllustration":"default",illustration:c}),u&&n.jsx("div",{className:"mt-4 flex justify-center",children:u})]})):n.jsx("div",P(T({className:`text-center text-fg-secondary ${e}`},t),{children:a||"No data available"}))}function ro(e,t){const{itemHeight:r,containerHeight:s,overscan:a=5,enabled:o=!0}=t,[i,c]=l.useState(0),u=l.useRef(null),d=l.useMemo(()=>{if(!o||e.length===0)return e.map((v,y)=>({index:y,start:y*r,end:(y+1)*r,size:r}));const m=Math.max(0,Math.floor(i/r)-a),h=s?Math.min(e.length,Math.ceil((i+s)/r)+a):e.length,x=[];for(let v=m;v<h;v++)x.push({index:v,start:v*r,end:(v+1)*r,size:r});return x},[e,r,i,s,a,o]),f=e.length*r;return l.useEffect(()=>{if(!o||!u.current)return;const m=u.current,h=()=>{c(m.scrollTop)};return m.addEventListener("scroll",h,{passive:!0}),()=>m.removeEventListener("scroll",h)},[o]),{virtualItems:d,totalHeight:f,scrollOffset:i,setScrollOffset:c,scrollToIndex:m=>{if(!u.current)return;const h=m*r;u.current.scrollTop=h,c(h)},containerRef:u}}function Os(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);var v,y;const{paginatedData:o,loading:i,columns:c,selectable:u,actions:d,virtualScrolling:f,virtualScrollingOptions:p}=Oe(),m=c.length+(u?1:0)+(d?1:0),h=ro(o,{itemHeight:(p==null?void 0:p.itemHeight)||50,containerHeight:p==null?void 0:p.containerHeight,overscan:(p==null?void 0:p.overscan)||5,enabled:f||!1}),x=l.useMemo(()=>f&&h.virtualItems.length>0?h.virtualItems.map(g=>({row:o[g.index],index:g.index})).filter(g=>g.row!==void 0):o.map((g,j)=>({row:g,index:j})),[f,h.virtualItems,o]);return i?n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:Array.from({length:5}).map((g,j)=>n.jsx("tr",{children:Array.from({length:m}).map((C,b)=>n.jsx("td",{className:"px-6 py-4",children:n.jsx(ga,{className:"h-4 w-full"})},b))},j))})):o.length===0?n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:n.jsx("tr",{children:n.jsx("td",{colSpan:m,className:"px-6 py-12",children:n.jsx(zs,{})})})})):typeof e=="function"?n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:o.map((g,j)=>e(g,j))})):n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`,role:"rowgroup"},r),{children:f&&h.virtualItems.length>0&&x.length>0?n.jsxs(n.Fragment,{children:[((v=h.virtualItems[0])==null?void 0:v.start)>0&&n.jsx("tr",{style:{height:h.virtualItems[0].start},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})}),x.map(({row:g,index:j})=>n.jsx(hr,{row:g,rowIndex:j},j)),h.virtualItems.length>0&&n.jsx("tr",{style:{height:Math.max(0,h.totalHeight-(((y=h.virtualItems[h.virtualItems.length-1])==null?void 0:y.end)||0))},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})})]}):x.map(({row:g,index:j})=>n.jsx(hr,{row:g,rowIndex:j},j))}))}function Nd(i){var c=i,{filters:e,onFilter:t,initialValues:r={},showClearAll:s=!0,className:a=""}=c,o=O(c,["filters","onFilter","initialValues","showClearAll","className"]);const[u,d]=l.useState(r),[f,p]=l.useState(!1),m=Object.values(u).some(g=>g!==""&&g!==null&&g!==void 0),h=(g,j)=>{const C=P(T({},u),{[g]:j});d(C),t(C)},x=()=>{const g={};e.forEach(j=>{g[j.key]=""}),d(g),t(g)},v=g=>{const j=P(T({},u),{[g]:""});d(j),t(j)},y=Object.values(u).filter(g=>g!==""&&g!==null&&g!==void 0).length;return n.jsx("div",P(T({className:`bg-surface-base border-b border-line-default ${a}`},o),{children:n.jsxs("div",{className:"px-4 py-3 sm:px-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("button",{type:"button",onClick:()=>p(!f),className:"flex items-center gap-2 text-sm font-medium text-fg-secondary hover:text-fg-primary",children:[n.jsx(Ql,{className:"h-4 w-4"}),n.jsx("span",{children:"Filters"}),y>0&&n.jsx("span",{className:`inline-flex items-center ${E("sm","px")} ${E("0.5","py")} rounded text-xs font-medium bg-surface-brand-muted text-fg-brand-emphasis`,children:y})]}),m&&s&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:x,className:"text-sm",children:"Clear all"})]}),f&&n.jsx("div",{className:"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(g=>{const j=u[g.key]||"";return n.jsxs("div",{className:"space-y-1",children:[n.jsx(Tt,{htmlFor:`filter-${g.key}`,variant:"optional",children:g.label}),n.jsxs("div",{className:"relative",children:[g.type==="text"&&n.jsx(Se,{id:`filter-${g.key}`,type:"text",value:j,onChange:C=>h(g.key,C.target.value),placeholder:g.placeholder||`Filter by ${g.label.toLowerCase()}`,size:"sm",variant:"outlined"}),g.type==="select"&&n.jsxs("div",{className:"relative",children:[n.jsx(jr,{id:`filter-${g.key}`,options:[{value:"",label:`All ${g.label}`},...g.options||[]],value:j,onChange:C=>h(g.key,C.target.value)}),j&&n.jsx("button",{type:"button",onClick:()=>v(g.key),className:"absolute right-8 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${g.label} filter`,children:n.jsx(Ne,{className:"h-4 w-4"})})]}),g.type==="date"&&n.jsx(Se,{id:`filter-${g.key}`,type:"date",value:j,onChange:C=>h(g.key,C.target.value),size:"sm",variant:"outlined"}),j&&g.type!=="select"&&n.jsx("button",{type:"button",onClick:()=>v(g.key),className:"absolute right-2 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${g.label} filter`,children:n.jsx(Ne,{className:"h-4 w-4"})})]})]},g.key)})})]})}))}function Vs(s){var a=s,{showClearAll:e=!0,className:t=""}=a,r=O(a,["showClearAll","className"]);const{filterState:o,setFilters:i}=Oe();return o.config.length===0?null:n.jsx(Nd,T({filters:o.config,onFilter:i,initialValues:o.values,showClearAll:e,className:t},r))}function Sd(f){var p=f,{page:e,pageSize:t,total:r,onPageChange:s,onPageSizeChange:a,pageSizeOptions:o=[10,25,50,100],showPageSizeSelector:i=!0,showPageInfo:c=!0,className:u=""}=p,d=O(p,["page","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showPageInfo","className"]);const m=Math.ceil(r/t),h=r===0?0:(e-1)*t+1,x=Math.min(e*t,r),v=()=>{e>1&&s(e-1)},y=()=>{e<m&&s(e+1)},g=()=>{e>1&&s(1)},j=()=>{e<m&&s(m)};return n.jsxs("div",P(T({className:`flex items-center justify-between px-4 py-3 bg-surface-base border-t border-line-default sm:px-6 ${u}`},d),{children:[n.jsxs("div",{className:"flex flex-1 justify-between sm:hidden",children:[n.jsx(Z,{variant:"outline",size:"sm",onClick:v,disabled:e===1,children:"Previous"}),n.jsx(Z,{variant:"outline",size:"sm",onClick:y,disabled:e>=m,children:"Next"})]}),n.jsxs("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[c&&n.jsx("div",{children:n.jsxs(Ue,{as:"p",className:"text-sm text-fg-secondary",children:["Showing ",n.jsx("span",{className:"font-medium",children:h})," to"," ",n.jsx("span",{className:"font-medium",children:x})," of"," ",n.jsx("span",{className:"font-medium",children:r})," results"]})}),n.jsxs("div",{className:"flex items-center gap-4",children:[i&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Ue,{as:"span",className:"text-sm text-fg-secondary",children:"Show:"}),n.jsx(jr,{"aria-label":"Items per page",options:o.map(C=>({value:C.toString(),label:C.toString()})),value:t.toString(),onChange:C=>{const b=parseInt(C.target.value);a(b),s(1)},className:"w-20"})]}),n.jsxs("nav",{className:"flex items-center gap-1","aria-label":"Pagination",children:[n.jsxs(Z,{variant:"ghost",size:"sm",onClick:g,disabled:e===1,"aria-label":"First page",children:[n.jsx(Bt,{className:"h-4 w-4"}),n.jsx(Bt,{className:"h-4 w-4 -ml-2"})]}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:v,disabled:e===1,"aria-label":"Previous page",children:n.jsx(Bt,{className:"h-4 w-4"})}),n.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(5,m)},(C,b)=>{let k;return m<=5||e<=3?k=b+1:e>=m-2?k=m-4+b:k=e-2+b,n.jsx(Z,{variant:e===k?"primary":"ghost",size:"sm",onClick:()=>s(k),className:"min-w-10","aria-label":`Page ${k}`,"aria-current":e===k?"page":void 0,children:k},k)})}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:y,disabled:e>=m,"aria-label":"Next page",children:n.jsx(bt,{className:"h-4 w-4"})}),n.jsxs(Z,{variant:"ghost",size:"sm",onClick:j,disabled:e>=m,"aria-label":"Last page",children:[n.jsx(bt,{className:"h-4 w-4"}),n.jsx(bt,{className:"h-4 w-4 -ml-2"})]})]})]})]})]}))}function Ws(o){var i=o,{showPageSizeSelector:e=!0,showPageInfo:t=!0,pageSizeOptions:r,className:s=""}=i,a=O(i,["showPageSizeSelector","showPageInfo","pageSizeOptions","className"]);const{paginationState:c,setPage:u,setPageSize:d,paginationMode:f}=Oe();return f==="client"&&c.totalPages<=1?null:n.jsx(Sd,T({page:c.page,pageSize:c.pageSize,total:c.total,onPageChange:u,onPageSizeChange:d,pageSizeOptions:r,showPageSizeSelector:e,showPageInfo:t,className:s},a))}function Ce(e){const o=e,{className:t=""}=o,r=O(o,["className"]),s="children"in e&&e.children!==void 0,a=s?r:Cd(r);return s?n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsx(cs,P(T({},a),{children:e.children}))}):n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsxs(cs,P(T({},a),{children:[a.filters&&a.filters.length>0&&n.jsx(Vs,{}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-line-default",role:"table","aria-label":e["aria-label"],"aria-labelledby":e["aria-labelledby"],"aria-rowcount":a.total||a.data.length,"aria-colcount":a.columns.length+(a.selectable?1:0)+(a.actions?1:0),children:[n.jsx(Fs,{}),n.jsx(Os,{})]})}),n.jsx(Ws,{})]}))})}function Cd(e){const{columns:t,data:r,loading:s,onSort:a,sortColumn:o,sortDirection:i,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,pagination:m,filters:h,selectable:x,selectedRows:v,onSelectionChange:y,rowId:g,actions:j,onRowClick:C,paginationMode:b,defaultPageSize:k,resizable:N,columnWidths:_,onColumnResize:S,virtualScrolling:M,virtualScrollingOptions:L}=e;let R=b||"auto";return R==="auto"&&(R=m&&m.total!==void 0&&m.onPageChange?"server":"client"),{columns:t,data:r,loading:s,paginationMode:R,page:m==null?void 0:m.page,pageSize:m==null?void 0:m.pageSize,total:m==null?void 0:m.total,onPageChange:m==null?void 0:m.onPageChange,onPageSizeChange:m==null?void 0:m.onPageSizeChange,defaultPageSize:k||(m==null?void 0:m.pageSize)||10,pageSizeOptions:m==null?void 0:m.pageSizeOptions,sortColumn:o,sortDirection:i,onSort:a,filters:h==null?void 0:h.config,filterValues:h==null?void 0:h.initialValues,onFilter:h==null?void 0:h.onFilter,initialFilterValues:h==null?void 0:h.initialValues,selectable:x,selectedRows:v,onSelectionChange:y,rowId:g,actions:j,onRowClick:C,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,resizable:N,columnWidths:_,onColumnResize:S,virtualScrolling:M,virtualScrollingOptions:L,children:n.jsx(n.Fragment,{})}}Ce.Header=Fs;Ce.HeaderRow=Ls;Ce.HeaderCell=Ds;Ce.Body=Os;Ce.Row=hr;Ce.Cell=_s;Ce.Filters=Vs;Ce.Pagination=Ws;Ce.EmptyState=zs;Ce.Actions=Ps;function $d(e={}){const{defaultWidths:t={},minWidth:r=50,maxWidth:s,resizable:a=!0}=e,[o,i]=l.useState(t),[c,u]=l.useState(!1),[d,f]=l.useState(null),p=l.useRef(null),m=l.useCallback((C,b)=>{const k=Math.max(r,s?Math.min(b,s):b);i(N=>P(T({},N),{[C]:k}))},[r,s]),h=l.useCallback(()=>{i(t)},[t]),x=l.useCallback((C,b,k)=>{a&&(u(!0),f(C),p.current={startX:b,startWidth:k})},[a]),v=l.useCallback(C=>{if(!c||!d||!p.current)return;const b=C-p.current.startX,k=p.current.startWidth+b;m(d,k)},[c,d,m]),y=l.useCallback(()=>{u(!1),f(null),p.current=null},[]),g=l.useRef(void 0),j=l.useRef(void 0);return typeof window!="undefined"&&(g.current=C=>{c&&v(C.clientX)},j.current=()=>{c&&y()},c?(document.addEventListener("mousemove",g.current),document.addEventListener("mouseup",j.current)):(g.current&&document.removeEventListener("mousemove",g.current),j.current&&document.removeEventListener("mouseup",j.current))),{columnWidths:o,setColumnWidth:m,resetColumnWidths:h,isResizing:c,resizingColumn:d,startResize:x,handleResize:v,endResize:y}}const Ir=l.createContext(null);function Ed(){return l.useContext(Ir)}function lt(){const e=l.useContext(Ir);if(!e)throw new Error("useSideNavbarThemeRequired must be used within SideNavbarThemeProvider");return e}const Et={variant:"default",navigationWidth:"56px",contentWidth:"320px",animationDuration:300,animationEasing:"ease-in-out"};function Hs({children:e,variant:t=Et.variant,navigationWidth:r=Et.navigationWidth,contentWidth:s=Et.contentWidth,animationDuration:a=Et.animationDuration,animationEasing:o=Et.animationEasing}){const i=l.useMemo(()=>({variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o}),[t,r,s,a,o]);return n.jsx(Ir.Provider,{value:i,children:e})}const Dr=l.createContext(null);function Md(){return l.useContext(Dr)}function vt(){const e=l.useContext(Dr);if(!e)throw new Error("useSideNavbarConfigRequired must be used within SideNavbarConfigProvider");return e}const we={mode:"full",resizable:!1,minWidth:void 0,maxWidth:void 0,snapPoints:void 0,responsive:!1,mobileBreakpoint:768,mobileVariant:"collapse",overlayBackdrop:!0,persistState:!0,persistWidth:!1,storageKey:void 0,keyboardShortcut:"Ctrl+B",enableKeyboardShortcut:!0};function Bs({children:e,mode:t=we.mode,resizable:r=we.resizable,minWidth:s=we.minWidth,maxWidth:a=we.maxWidth,snapPoints:o=we.snapPoints,responsive:i=we.responsive,mobileBreakpoint:c=we.mobileBreakpoint,mobileVariant:u=we.mobileVariant,overlayBackdrop:d=we.overlayBackdrop,persistState:f=we.persistState,persistWidth:p=we.persistWidth,storageKey:m=we.storageKey,keyboardShortcut:h=we.keyboardShortcut,enableKeyboardShortcut:x=we.enableKeyboardShortcut}){const v=l.useMemo(()=>({mode:t,resizable:r,minWidth:s,maxWidth:a,snapPoints:o,responsive:i,mobileBreakpoint:c,mobileVariant:u,overlayBackdrop:d,persistState:f,persistWidth:p,storageKey:m,keyboardShortcut:h,enableKeyboardShortcut:x}),[t,r,s,a,o,i,c,u,d,f,p,m,h,x]);return n.jsx(Dr.Provider,{value:v,children:e})}const Lr=l.createContext(null);function Td(){return l.useContext(Lr)}function ct(){const e=l.useContext(Lr);if(!e)throw new Error("useSideNavbarStateRequired must be used within SideNavbarStateProvider");return e}function br(e){if(typeof e=="number")return e;const t=parseFloat(e);return isNaN(t)?0:e.endsWith("rem")||e.endsWith("em")?t*16:(e.endsWith("px"),t)}function so(e,t){return e===void 0||t===void 0?!0:e<t}function lr(e,t,r){let s=e;return t!==void 0&&(s=Math.max(s,t)),r!==void 0&&(s=Math.min(s,r)),s}const Ad=["ctrl","cmd","control","shift","alt","meta","option"];function no(e){const t={key:"",ctrl:!1,shift:!1,alt:!1,meta:!1,isValid:!1};if(!e||typeof e!="string")return t;const r=e.trim();if(!r)return t;const s=r.split("+").map(u=>u.trim().toLowerCase()).filter(u=>u.length>0);if(s.length===0)return t;const a=new Set;let o="";for(let u=0;u<s.length;u++){const d=s[u];if(Ad.includes(d))a.add(d);else if(u===s.length-1)o=d;else return t}if(!o)return t;const i=a.has("ctrl")||a.has("cmd")||a.has("control"),c=a.has("alt")||a.has("option");return{key:o,ctrl:i,shift:a.has("shift"),alt:c,meta:a.has("meta"),isValid:!0}}function Rd(e,t="windows"){if(!e.isValid)return"";const r=[];return t==="mac"?(e.ctrl&&r.push("⌘"),e.shift&&r.push("⇧"),e.alt&&r.push("⌥"),e.meta&&r.push("⌃"),r.push(e.key.toUpperCase()),r.join("")):(e.ctrl&&r.push("Ctrl"),e.shift&&r.push("Shift"),e.alt&&r.push("Alt"),e.meta&&r.push("Meta"),r.push(e.key.toUpperCase()),r.join("+"))}function ao({initialWidth:e,minWidth:t,maxWidth:r,snapPoints:s,snapThreshold:a=20,onWidthChange:o,enabled:i=!0}){process.env.NODE_ENV==="development"&&(so(t,r)||console.warn("[useResize] Invalid bounds: minWidth must be less than maxWidth",{minWidth:t,maxWidth:r}));const c=lr(e,t,r),[u,d]=l.useState(c),[f,p]=l.useState(!1),m=l.useRef(0),h=l.useRef(c),x=l.useCallback(j=>{let C=lr(j,t,r);if(s&&s.length>0){const b=s.reduce((k,N)=>{const _=Math.abs(C-N),S=Math.abs(C-k);return _<S?N:k},s[0]);Math.abs(C-b)<=a&&(C=b)}d(C),o==null||o(C)},[t,r,s,a,o]),v=l.useCallback(j=>{if(!i||!f)return;const C=j.clientX-m.current,b=h.current+C;x(b)},[i,f,x]),y=l.useCallback(()=>{i&&(p(!1),m.current=0,h.current=u)},[i,u]),g=l.useCallback(j=>{i&&(j.preventDefault(),j.stopPropagation(),p(!0),m.current=j.clientX,h.current=u)},[i,u]);return l.useEffect(()=>{if(f)return document.addEventListener("mousemove",v),document.addEventListener("mouseup",y),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",y),document.body.style.userSelect="",document.body.style.cursor=""}},[f,v,y]),l.useEffect(()=>{f||d(lr(e,t,r))},[e,t,r,f]),{width:u,isResizing:f,startResize:g,setWidth:x}}function oo({mobileBreakpoint:e=768,onMobileChange:t,enabled:r=!0}={}){const[s,a]=l.useState(typeof window!="undefined"?window.innerWidth:1024),[o,i]=l.useState(typeof window!="undefined"?window.innerWidth<e:!1),c=l.useCallback(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),d!==o&&(i(d),t==null||t(d))},[r,e,o,t]);return l.useEffect(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),i(d),window.addEventListener("resize",c);let f=null;return window.ResizeObserver&&(f=new ResizeObserver(()=>{c()}),f.observe(document.body)),()=>{window.removeEventListener("resize",c),f==null||f.disconnect()}},[r,e,c]),{isMobile:o,viewportWidth:s}}function io({isActive:e,containerRef:t,restoreFocus:r=!0,initialFocusRef:s}){const a=l.useRef(null);l.useEffect(()=>{if(e){if(a.current=document.activeElement,s!=null&&s.current)s.current.focus();else if(t.current){const i=t.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');i==null||i.focus()}}else r&&a.current&&(a.current.focus(),a.current=null)},[e,t,s,r]);const o=l.useCallback(i=>{if(!(!e||!t.current)&&i.key==="Tab"){const c=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),u=c[0],d=c[c.length-1];i.shiftKey?document.activeElement===u&&(i.preventDefault(),d==null||d.focus()):document.activeElement===d&&(i.preventDefault(),u==null||u.focus())}},[e,t]);l.useEffect(()=>{if(e)return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[e,o])}function lo({key:e,ctrl:t=!1,shift:r=!1,alt:s=!1,meta:a=!1,onTrigger:o,enabled:i=!0,preventDefault:c=!0}){const u=l.useCallback(d=>{if(!i)return;const f=d.target;if((f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.isContentEditable)&&!t&&!a)return;const m=e.length===1?d.key.toLowerCase()===e.toLowerCase():d.key===e,h=t?d.ctrlKey||d.metaKey:!d.ctrlKey&&!d.metaKey,x=r?d.shiftKey:!d.shiftKey,v=s?d.altKey:!d.altKey,y=a?d.metaKey:!d.metaKey,g=t?(d.ctrlKey||d.metaKey)&&!a:h&&y;m&&g&&x&&v&&(c&&(d.preventDefault(),d.stopPropagation()),o())},[i,e,t,r,s,a,o,c]);l.useEffect(()=>{if(i)return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[i,u])}function Us({children:e,defaultCollapsed:t=!1,collapsed:r,onCollapseChange:s,onWidthChange:a,onMobileChange:o,exclusiveGroups:i=!1}){const c=lt(),u=vt(),d=l.useRef(null),f=r!==void 0,p=()=>{if(f)return r;if(u.storageKey&&u.persistState&&typeof window!="undefined"){const A=localStorage.getItem(`${u.storageKey}-collapsed`);if(A!==null)return A==="true"}return t},m=()=>{if(u.storageKey&&u.persistWidth&&typeof window!="undefined"){const A=localStorage.getItem(`${u.storageKey}-width`);if(A!==null){const V=parseInt(A,10);if(!isNaN(V))return V}}return br(c.contentWidth)},[h,x]=l.useState(p),[v,y]=l.useState({}),{isMobile:g}=oo({mobileBreakpoint:u.mobileBreakpoint,onMobileChange:A=>{o==null||o(A),A&&u.mobileVariant==="collapse"&&!f&&x(!0)},enabled:u.responsive}),{width:j,isResizing:C,startResize:b,setWidth:k}=ao({initialWidth:m(),minWidth:u.minWidth,maxWidth:u.maxWidth,snapPoints:u.snapPoints,onWidthChange:A=>{a==null||a(A),u.storageKey&&u.persistWidth&&typeof window!="undefined"&&localStorage.setItem(`${u.storageKey}-width`,String(A))},enabled:u.resizable&&!g});io({isActive:g&&u.mobileVariant==="overlay"&&!h,containerRef:d,restoreFocus:!0});const N=f?r:h,_=l.useCallback(A=>{f||x(A),s==null||s(A)},[f,s]),S=l.useCallback(()=>{_(!N)},[N,_]),M=no(u.keyboardShortcut);lo({key:M.key,ctrl:M.ctrl,shift:M.shift,alt:M.alt,meta:M.meta,onTrigger:S,enabled:u.enableKeyboardShortcut});const L=l.useCallback(A=>{k(A)},[k]),R=l.useCallback(A=>{y(i?V=>{const H=V[A]===!1,W={},ie=new Set([...Object.keys(V),A]);return H?ie.forEach(ne=>{W[ne]=!0}):ie.forEach(ne=>{W[ne]=ne!==A}),W}:V=>P(T({},V),{[A]:!V[A]}))},[i]),D=l.useCallback((A,V)=>{y(Y=>P(T({},Y),{[A]:V}))},[]);l.useEffect(()=>{f&&r!==h&&x(r)},[f,r,h]),l.useEffect(()=>{u.storageKey&&u.persistState&&typeof window!="undefined"&&!f&&localStorage.setItem(`${u.storageKey}-collapsed`,String(h))},[u.storageKey,u.persistState,h,f]);const I=l.useMemo(()=>({collapsed:N,toggle:S,setCollapsed:_,currentWidth:j,setWidth:L,isMobile:g,isResizing:C,startResize:b,groupStates:v,toggleGroup:R,setGroupCollapsed:D,sidebarRef:d}),[N,S,_,j,L,g,C,b,v,R,D]);return n.jsx(Lr.Provider,{value:I,children:e})}function qs({children:e,variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:v,persistWidth:y,storageKey:g,keyboardShortcut:j,enableKeyboardShortcut:C,defaultCollapsed:b,collapsed:k,onCollapseChange:N,onWidthChange:_,onMobileChange:S,exclusiveGroups:M}){return n.jsx(Hs,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,children:n.jsx(Bs,{mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:v,persistWidth:y,storageKey:g,keyboardShortcut:j,enableKeyboardShortcut:C,children:n.jsx(Us,{defaultCollapsed:b,collapsed:k,onCollapseChange:N,onWidthChange:_,onMobileChange:S,exclusiveGroups:M,children:e})})})}const Fr=l.createContext(null);function Gs(){return l.useContext(Fr)}function Ks(){const e=l.useContext(Fr);if(!e)throw new Error("useSidebarSlotRequired must be used within SidebarSlotProvider");return e}function co({children:e,defaultSlot:t=null}){const[r,s]=l.useState(t),a=l.useRef(new Map),o=l.useCallback((u,d)=>{a.current.set(u,d)},[]),i=l.useCallback(u=>{a.current.delete(u)},[]),c=l.useMemo(()=>({activeSlot:r,setActiveSlot:s,slots:a.current,registerSlot:o,unregisterSlot:i}),[r,o,i]);return n.jsx(Fr.Provider,{value:c,children:e})}const _r=l.createContext(null);function Id(){return l.useContext(_r)}function Ys(){const e=l.useContext(_r);return e||{showMainToggle:!0,mainTogglePosition:"floating"}}function Xs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{currentWidth:a,setWidth:o,isResizing:i,startResize:c}=ct(),{resizable:u}=vt();return u?n.jsxs("div",P(T({className:`
388
+ `,children:d.content})})]},d.id)})})}const Ka=l.createContext(void 0);function ls({children:e,mobileMenuOpen:t,onMobileMenuChange:r,defaultMobileMenuOpen:s=!1}){const[a,o]=l.useState(s),i=t!==void 0,c=i?t:a,u=l.useCallback(m=>{i||o(m),r==null||r(m)},[i,r]),d=l.useCallback(()=>{u(!c)},[c,u]),f=l.useCallback(()=>{u(!0)},[u]),p=l.useCallback(()=>{u(!1)},[u]);return n.jsx(Ka.Provider,{value:{isMobileMenuOpen:c,toggleMobileMenu:d,setMobileMenuOpen:u,openMobileMenu:f,closeMobileMenu:p},children:e})}function Is(){const e=l.useContext(Ka);if(!e)throw new Error("useHeaderContext must be used within HeaderProvider");return e}function Ya(s){var a=s,{children:e,className:t}=a,r=O(a,["children","className"]);return n.jsx("div",{className:"flex-shrink-0",children:n.jsx(xs,z(T({href:r.href||"/",variant:"default",className:w("flex items-center font-semibold text-lg",t)},r),{children:e}))})}function Xa({children:e,className:t}){return n.jsx("nav",{className:w("flex-1 flex items-center justify-center gap-4","hidden md:flex",t),"aria-label":"Main navigation",children:e})}function Ja({children:e,className:t}){return n.jsx("div",{className:w("flex-shrink-0 flex items-center gap-2",t),children:e})}function Qa({className:e,icon:t,closeIcon:r,variant:s="ghost",size:a="md"}){const{isMobileMenuOpen:o,toggleMobileMenu:i}=Is(),c=t||n.jsx(ac,{className:"h-5 w-5"}),u=r||n.jsx(Ne,{className:"h-5 w-5"});return n.jsx(Z,{variant:s,size:a,onClick:i,className:w("md:hidden",e),"aria-label":o?"Close menu":"Open menu","aria-expanded":o,children:o?u:c})}function Za({children:e,className:t}){const{isMobileMenuOpen:r,closeMobileMenu:s}=Is();return n.jsx(Gt,{open:r,onOpenChange:a=>{a||s()},position:"left",size:"sm",closeOnOverlayClick:!0,closeOnEscape:!0,children:n.jsx(Ms,{className:w("p-4",t),children:n.jsx("nav",{className:"flex flex-col gap-2","aria-label":"Mobile navigation",children:e})})})}const bd={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},it=l.forwardRef((u,c)=>{var d=u,{className:e,maxWidth:t="lg",paddingX:r="base",paddingY:s="base",center:a=!0,children:o}=d,i=O(d,["className","maxWidth","paddingX","paddingY","center","children"]);return n.jsx("div",z(T({ref:c,className:w("w-full",bd[t],E(r,"px"),E(s,"py"),a&&"mx-auto",e)},i),{children:o}))});it.displayName="Container";const At=l.forwardRef((u,c)=>{var d=u,{className:e,spacing:t="base",align:r="stretch",justify:s="start",direction:a="column",children:o}=d,i=O(d,["className","spacing","align","justify","direction","children"]);const f=a==="column"?E(t,"gap-y"):E(t,"gap-x"),p={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},m={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsx("div",z(T({ref:c,className:w("flex",a==="column"?"flex-col":"flex-row",f,p[r],m[s],e)},i),{children:o}))});At.displayName="Stack";const gd=ve(w("w-full","bg-surface-base","transition-shadow","transition-colors"),{variants:{variant:{default:"",elevated:"shadow-sm",bordered:w("border-b","border-line-muted")}},defaultVariants:{variant:"default"}});function xt(c){var u=c,{children:e,variant:t="default",sticky:r=!1,maxWidth:s="full",bare:a=!1,className:o}=u,i=O(u,["children","variant","sticky","maxWidth","bare","className"]);const d=n.jsx("div",{className:"flex items-center justify-between gap-4",children:e});return a?n.jsx(ls,{children:n.jsx("div",z(T({className:w(o)},i),{children:d}))}):n.jsx(ls,{children:n.jsx("header",z(T({className:w(gd({variant:t}),r&&`sticky top-0 ${ue("sticky")}`,r&&"backdrop-blur-sm bg-surface-base/95",o)},i),{children:n.jsx(it,{maxWidth:s,paddingX:"base",paddingY:"sm",children:d})}))})}xt.Logo=Ya;xt.Navigation=Xa;xt.Actions=Ja;xt.Hamburger=Qa;xt.MobileMenu=Za;const In=ve(w("flex","items-center","gap-2"),{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},variant:{default:"",pills:"",tabs:""}},defaultVariants:{orientation:"horizontal",variant:"default"},compoundVariants:[{orientation:"vertical",variant:"default",class:"items-stretch"},{orientation:"vertical",variant:"pills",class:"items-stretch"},{orientation:"vertical",variant:"tabs",class:"items-stretch"}]});function xd(u){var d=u,{items:e,orientation:t="horizontal",variant:r="default",className:s,"aria-label":a="Main navigation",bare:o=!1,pathname:i}=d,c=O(d,["items","orientation","variant","className","aria-label","bare","pathname"]);let f=i;if(!f)try{const h=typeof require!="undefined"?require("next/navigation"):null;if(h!=null&&h.usePathname){const x=h.usePathname;f=x()}}catch(h){f=void 0}const p=l.useMemo(()=>e.map(h=>{if(h.active!==void 0)return h;if(f){const x=f===h.href||h.href!=="/"&&f.startsWith(`${h.href}/`);return z(T({},h),{active:x})}return z(T({},h),{active:!1})}),[e,f]),m=n.jsx(n.Fragment,{children:p.map((h,x)=>{const v=r==="pills"?"background":r==="tabs"?"underline":"default";return n.jsxs(xs,{href:h.href,active:h.active,disabled:h.disabled,variant:v,className:w("flex items-center gap-2",t==="vertical"&&"w-full justify-start",h.className),children:[h.icon&&n.jsx("span",{className:"flex-shrink-0","aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.label}),h.badge&&n.jsx("span",{className:"ml-auto",children:h.badge})]},h.href||x)})});return o?n.jsx("div",z(T({className:w(In({orientation:t,variant:r}),s)},c),{children:m})):n.jsx("nav",z(T({className:w(In({orientation:t,variant:r}),s),"aria-label":a},c),{children:m}))}function eo(e){return n.jsx(xd,z(T({},e),{pathname:e.pathname}))}const vd=ve(w("w-full","flex","flex-col","gap-2"),{variants:{variant:{default:w(E("base","mb")),compact:w(E("sm","mb"))}},defaultVariants:{variant:"default"}});function to(c){var u=c,{title:e,description:t,breadcrumb:r,actions:s,variant:a="default",className:o}=u,i=O(u,["title","description","breadcrumb","actions","variant","className"]);return n.jsxs("div",z(T({className:w(vd({variant:a}),o)},i),{children:[r&&r.length>0&&n.jsx(Ma,{items:r}),n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx(Be,{variant:"heading",as:"h1",className:"mb-2 text-2xl font-bold",children:e}),t&&n.jsx(Be,{variant:"body",className:"text-fg-secondary",children:t})]}),s&&n.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:s})]})]}))}function yd(s){var a=s,{onForgotPasswordClick:e,className:t}=a,r=O(a,["onForgotPasswordClick","className"]);return n.jsx("div",{className:w(E("base","p"),"bg-surface-muted",J("md"),t),children:n.jsxs("form",z(T({},r),{onSubmit:o=>{o.preventDefault(),r.onSubmit&&r.onSubmit(o)},className:w("space-y-4",r.className),children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(Tt,{htmlFor:"login-email",variant:"required",children:"Your email"}),n.jsx(Se,{id:"login-email",placeholder:"myname@email.com",type:"email"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(Tt,{htmlFor:"login-password",variant:"required",children:"Your password"}),n.jsx(Se,{id:"login-password",placeholder:"••••••••",type:"password"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx(Z,{variant:"secondary",type:"button",onClick:e,children:"Forgot password?"}),n.jsx(Z,{variant:"regular",type:"submit",children:"Sign in"})]})]}))})}function wd(d){var f=d,{isOpen:e,onClose:t,title:r,children:s,variant:a="default",showCloseButton:o=!0,footer:i,className:c=""}=f,u=O(f,["isOpen","onClose","title","children","variant","showCloseButton","footer","className"]);const p=l.useRef(null),m=l.useRef(null);if(l.useEffect(()=>{if(!e)return;m.current=document.activeElement;const j=setTimeout(()=>{var g;(g=p.current)==null||g.focus()},0),$=g=>{g.key==="Escape"&&t()};return document.addEventListener("keydown",$),()=>{var g;clearTimeout(j),document.removeEventListener("keydown",$),(g=m.current)==null||g.focus()}},[e,t]),l.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const h=["fixed","inset-0",ue("modal"),"overflow-y-auto"],x=["fixed","inset-0","bg-scrim","transition-opacity"],y=["relative","bg-surface-overlay","rounded-lg","shadow-xl","my-8","mx-auto",{default:"max-w-md",large:"max-w-2xl",fullscreen:"max-w-full h-full"}[a],"p-6",c].filter(Boolean).join(" "),b=n.jsxs("div",{className:h.join(" "),role:"dialog","aria-modal":"true","aria-labelledby":r?"modal-title":void 0,onClick:j=>{j.target===j.currentTarget&&t()},children:[n.jsx("div",{className:x.join(" "),"aria-hidden":"true"}),n.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:n.jsxs("div",z(T({ref:p,tabIndex:-1,className:y,onClick:j=>j.stopPropagation()},u),{children:[r&&n.jsxs("div",{className:"flex justify-between items-center mb-4",children:[n.jsx("h2",{id:"modal-title",className:"text-xl font-semibold text-fg-primary",children:r}),o&&n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Ne,{className:"h-6 w-6"})})]}),!r&&o&&n.jsx("div",{className:"flex justify-end mb-4",children:n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Ne,{className:"h-6 w-6"})})}),n.jsx("div",{className:"mb-4",children:s}),i&&n.jsx("div",{className:"flex justify-end gap-2 mt-4",children:i})]}))})]});return typeof window!="undefined"?qe.createPortal(b,document.body):b}const Rr=l.createContext(void 0);function Oe(){const e=l.useContext(Rr);if(e===void 0)throw new Error("useTableContext must be used within a Table component");return e}function kd(){const e=l.useContext(Rr);return e||void 0}function cs({columns:e,data:t,loading:r=!1,paginationMode:s,page:a,pageSize:o,total:i,onPageChange:c,onPageSizeChange:u,defaultPageSize:d=10,pageSizeOptions:f,sortColumn:p,sortDirection:m,onSort:h,defaultSortColumn:x,defaultSortDirection:v="asc",filters:y,filterValues:b,onFilter:j,initialFilterValues:$={},selectable:g=!1,selectedRows:k,onSelectionChange:N,rowId:L,actions:S,emptyMessage:D="No data available",emptyStateTitle:R,emptyStateMessage:M,emptyStateIllustration:F,emptyStateAction:I,onRowClick:A,resizable:W=!1,columnWidths:K,onColumnResize:H,virtualScrolling:U,virtualScrollingOptions:oe,children:ne}){const P=l.useMemo(()=>s||(i!==void 0&&c?"server":"client"),[s,i,c]),G=a!==void 0,[Y,Q]=l.useState(1),[le,se]=l.useState(d),_=G?a:Y,V=o!=null?o:le,X=l.useMemo(()=>P==="server"?i!=null?i:0:t.length,[P,i,t.length]),ae=l.useMemo(()=>Math.ceil(X/V),[X,V]),fe=p!==void 0,[ke,je]=l.useState(x||""),[Ie,Lt]=l.useState(v),Me=fe?p:ke,Xt=fe?m||"asc":Ie,Vr=b!==void 0,[Eo,Mo]=l.useState($),Jt=Vr?b:Eo,Wr=k!==void 0,[To,Ao]=l.useState([]),De=Wr?k:To,Qt=l.useMemo(()=>!y||y.length===0?t:t.filter(ee=>y.every(de=>{const ge=Jt[de.key];if(!ge||ge==="")return!0;const er=ee[de.key];return de.type==="text"?String(er||"").toLowerCase().includes(String(ge).toLowerCase()):String(er)===String(ge)})),[t,y,Jt]),Hr=l.useMemo(()=>{if(fe&&h||!Me)return Qt;const ee=[...Qt];return ee.sort((de,ge)=>{const er=de[Me],Fo=ge[Me],un=String(er||"").localeCompare(String(Fo||""));return Xt==="asc"?un:-un}),ee},[Qt,Me,Xt,h,fe]),Ve=l.useMemo(()=>{if(P==="server")return Hr;const ee=(_-1)*V,de=ee+V;return Hr.slice(ee,de)},[Hr,P,_,V]),wt=l.useCallback((ee,de)=>{var ge;return L?L(ee):((ge=ee==null?void 0:ee.id)==null?void 0:ge.toString())||de.toString()},[L]),Zt=l.useMemo(()=>!g||Ve.length===0?!1:Ve.every((ee,de)=>{const ge=wt(ee,de);return De.includes(ge)}),[g,Ve,De,wt]),rn=l.useMemo(()=>{if(!g)return!1;const ee=De.length;return ee>0&&ee<Ve.length},[g,De.length,Ve.length]),kt=l.useCallback(ee=>{G?c==null||c(ee):Q(ee)},[G,c]),sn=l.useCallback(ee=>{u?u(ee):se(ee),kt(1)},[u,kt]),nn=l.useCallback((ee,de)=>{fe?h==null||h(ee,de):(je(ee),Lt(de))},[fe,h]),an=l.useCallback(ee=>{Vr?j==null||j(ee):Mo(ee),kt(1)},[Vr,j,kt]),ut=l.useCallback(ee=>{Wr?N==null||N(ee):Ao(ee)},[Wr,N]),on=l.useCallback(ee=>{const de=De.includes(ee)?De.filter(ge=>ge!==ee):[...De,ee];ut(de)},[De,ut]),ln=l.useCallback(()=>{if(Zt)ut([]);else{const ee=Ve.map((de,ge)=>wt(de,ge));ut(ee)}},[Zt,Ve,wt,ut]),[Ro,Io]=l.useState({}),Ur=K!==void 0,cn=Ur?K:Ro,dn=l.useCallback((ee,de)=>{Ur?H==null||H(ee,de):Io(ge=>z(T({},ge),{[ee]:de}))},[Ur,H]),Do=l.useMemo(()=>({columns:e,data:t,paginatedData:Ve,loading:r,paginationState:{page:_,pageSize:V,total:X,totalPages:ae},sortState:{column:Me,direction:Xt},filterState:{values:Jt,config:y||[]},selectionState:{selectedRows:De,isAllSelected:Zt,isIndeterminate:rn},paginationMode:P,selectable:g,rowId:L,actions:S,resizable:W,columnWidths:cn,virtualScrolling:U,emptyMessage:D,emptyStateTitle:R,emptyStateMessage:M,emptyStateIllustration:F,emptyStateAction:I,setPage:kt,setPageSize:sn,setSorting:nn,setFilters:an,setSelection:ut,toggleRowSelection:on,toggleSelectAll:ln,getRowId:wt,setColumnWidth:dn,onPageChange:c,onPageSizeChange:u,onSort:h,onFilter:j,onSelectionChange:N,onRowClick:A,onColumnResize:H}),[e,t,Ve,r,_,V,X,ae,Me,Xt,Jt,y,De,Zt,rn,P,g,L,S,D,R,M,F,I,kt,sn,nn,an,ut,on,ln,wt,dn,c,u,h,j,N,A,H,W,cn,U]);return n.jsx(Rr.Provider,{value:Do,children:ne})}function Ds(u){var d=u,{column:e,resizable:t=!1,width:r,onResize:s,minWidth:a=50,maxWidth:o,className:i=""}=d,c=O(d,["column","resizable","width","onResize","minWidth","maxWidth","className"]);const{sortState:f,setSorting:p,onSort:m}=Oe(),h=l.useRef(null),x=l.useRef(null),v=l.useRef(null),y=()=>{if(!e.sortable||!m&&!p)return;const N=f.column===e.key&&f.direction==="asc"?"desc":"asc";m?m(e.key,N):p(e.key,N)},b=N=>{g&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),y())},j=N=>{if(N.preventDefault(),N.stopPropagation(),!x.current||!s)return;const L=r||x.current.offsetWidth;v.current={x:N.clientX,width:L};const S=R=>{if(!v.current)return;const M=R.clientX-v.current.x,F=v.current.width+M,I=Math.max(a,o?Math.min(F,o):F);s(e.key,I)},D=()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",D),v.current=null};document.addEventListener("mousemove",S),document.addEventListener("mouseup",D)},$=f.column===e.key,g=e.sortable&&(m||p),k=$?f.direction:void 0;return n.jsx("th",z(T({ref:x,scope:"col",role:"columnheader","aria-sort":$?k==="asc"?"ascending":"descending":g?"none":void 0,className:`px-6 py-3 text-left text-xs font-medium text-fg-tertiary uppercase tracking-wider ${g?"cursor-pointer hover:bg-surface-active focus:bg-surface-active focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2 select-none":""} ${e.hiddenOnMobile?"hidden md:table-cell":""} ${i}`,onClick:g?y:void 0,onKeyDown:g?b:void 0,tabIndex:g?0:void 0,style:r?{width:`${r}px`,minWidth:`${r}px`}:void 0},c),{children:n.jsxs("div",{className:"flex items-center gap-2 relative",children:[n.jsx("span",{children:e.label}),$&&n.jsx("span",{className:"text-fg-tertiary","aria-hidden":"true",children:f.direction==="asc"?"↑":"↓"}),t&&s&&n.jsx("div",{ref:h,className:"absolute right-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-surface-brand transition-colors",onMouseDown:j,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${e.label} column`,style:{touchAction:"none"}})]})}))}function Fs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{columns:a,selectable:o,selectionState:i,toggleSelectAll:c,actions:u,resizable:d,columnWidths:f,setColumnWidth:p}=Oe();return n.jsxs("tr",z(T({role:"row",className:e},t),{children:[o&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 w-12","aria-label":"Select all",children:n.jsx(Nr,{checked:i.isAllSelected,onChange:c,"aria-label":"Select all rows",className:"my-0",indeterminate:i.isIndeterminate})}),a.map(m=>n.jsx(Ds,{column:m,resizable:d,width:f==null?void 0:f[m.key],onResize:p},m.key)),u&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 text-right text-xs font-medium text-fg-tertiary uppercase tracking-wider w-12","aria-label":"Actions",children:n.jsx("span",{className:"sr-only",children:"Actions"})})]}))}function Ls(r){var s=r,{className:e=""}=s,t=O(s,["className"]);return Oe(),n.jsx("thead",z(T({className:`bg-surface-subtle sticky top-0 ${ue("sticky")} ${e}`},t),{children:n.jsx(Fs,{})}))}function _s(a){var o=a,{column:e,row:t,className:r=""}=o,s=O(o,["column","row","className"]);const i=e.key in t?t[e.key]:void 0;return n.jsx("td",z(T({className:`px-6 py-4 whitespace-nowrap text-sm text-fg-primary ${e.hiddenOnMobile?"hidden md:table-cell":""} ${r}`},s),{children:e.render?e.render(i,t):String(i!=null?i:"")}))}function jd(o){var i=o,{actions:e,row:t,align:r="right",className:s=""}=i,a=O(i,["actions","row","align","className"]);const c=e.map(u=>({label:u.label,onClick:()=>u.onClick(t),variant:u.variant,disabled:u.disabled}));return n.jsx("div",z(T({className:`inline-flex ${s}`},a),{children:n.jsx(Ra,{trigger:n.jsx(Z,{variant:"ghost",size:"sm","aria-label":"Row actions",className:"h-8 w-8 p-0",children:n.jsx(Ul,{className:"h-4 w-4"})}),items:c,align:r})}))}function Ps(a){var o=a,{row:e,align:t="right",className:r=""}=o,s=O(o,["row","align","className"]);const{actions:i}=Oe();if(!i)return null;const c=i(e);return c.length===0?null:n.jsx(jd,T({row:e,actions:c,align:t,className:r},s))}function hr(i){var c=i,{row:e,rowIndex:t,className:r="",onClick:s,style:a}=c,o=O(c,["row","rowIndex","className","onClick","style"]);const{columns:u,selectable:d,selectionState:f,toggleRowSelection:p,getRowId:m,actions:h,onRowClick:x}=Oe(),v=m(e,t),y=f.selectedRows.includes(v),b=j=>{s&&s(j),x&&x(e)};return n.jsxs("tr",z(T({role:"row","aria-selected":d?y:void 0,"aria-rowindex":t+1,className:`hover:bg-surface-hover ${y?"bg-surface-selected":""} ${r}`,onClick:b,style:a},o),{children:[d&&n.jsx("td",{className:"px-6 py-4",children:n.jsx(Nr,{checked:y,onChange:()=>p(v),"aria-label":`Select row ${v}`,className:"my-0"})}),u.map(j=>n.jsx(_s,{column:j,row:e},String(j.key))),h&&n.jsx("td",{className:"px-6 py-4 text-right",children:n.jsx(Ps,{row:e})})]}))}function zs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{emptyMessage:a,emptyStateTitle:o,emptyStateMessage:i,emptyStateIllustration:c,emptyStateAction:u}=Oe();return o||i||c?n.jsxs("div",z(T({className:e},t),{children:[n.jsx(Aa,{title:o||"No data available",message:i||a||"No data available",variant:c?"withIllustration":"default",illustration:c}),u&&n.jsx("div",{className:"mt-4 flex justify-center",children:u})]})):n.jsx("div",z(T({className:`text-center text-fg-secondary ${e}`},t),{children:a||"No data available"}))}function ro(e,t){const{itemHeight:r,containerHeight:s,overscan:a=5,enabled:o=!0}=t,[i,c]=l.useState(0),u=l.useRef(null),d=l.useMemo(()=>{if(!o||e.length===0)return e.map((v,y)=>({index:y,start:y*r,end:(y+1)*r,size:r}));const m=Math.max(0,Math.floor(i/r)-a),h=s?Math.min(e.length,Math.ceil((i+s)/r)+a):e.length,x=[];for(let v=m;v<h;v++)x.push({index:v,start:v*r,end:(v+1)*r,size:r});return x},[e,r,i,s,a,o]),f=e.length*r;return l.useEffect(()=>{if(!o||!u.current)return;const m=u.current,h=()=>{c(m.scrollTop)};return m.addEventListener("scroll",h,{passive:!0}),()=>m.removeEventListener("scroll",h)},[o]),{virtualItems:d,totalHeight:f,scrollOffset:i,setScrollOffset:c,scrollToIndex:m=>{if(!u.current)return;const h=m*r;u.current.scrollTop=h,c(h)},containerRef:u}}function Os(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);var v,y;const{paginatedData:o,loading:i,columns:c,selectable:u,actions:d,virtualScrolling:f,virtualScrollingOptions:p}=Oe(),m=c.length+(u?1:0)+(d?1:0),h=ro(o,{itemHeight:(p==null?void 0:p.itemHeight)||50,containerHeight:p==null?void 0:p.containerHeight,overscan:(p==null?void 0:p.overscan)||5,enabled:f||!1}),x=l.useMemo(()=>f&&h.virtualItems.length>0?h.virtualItems.map(b=>({row:o[b.index],index:b.index})).filter(b=>b.row!==void 0):o.map((b,j)=>({row:b,index:j})),[f,h.virtualItems,o]);return i?n.jsx("tbody",z(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:Array.from({length:5}).map((b,j)=>n.jsx("tr",{children:Array.from({length:m}).map(($,g)=>n.jsx("td",{className:"px-6 py-4",children:n.jsx(ga,{className:"h-4 w-full"})},g))},j))})):o.length===0?n.jsx("tbody",z(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:n.jsx("tr",{children:n.jsx("td",{colSpan:m,className:"px-6 py-12",children:n.jsx(zs,{})})})})):typeof e=="function"?n.jsx("tbody",z(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:o.map((b,j)=>e(b,j))})):n.jsx("tbody",z(T({className:`bg-surface-base divide-y divide-line-default ${t}`,role:"rowgroup"},r),{children:f&&h.virtualItems.length>0&&x.length>0?n.jsxs(n.Fragment,{children:[((v=h.virtualItems[0])==null?void 0:v.start)>0&&n.jsx("tr",{style:{height:h.virtualItems[0].start},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})}),x.map(({row:b,index:j})=>n.jsx(hr,{row:b,rowIndex:j},j)),h.virtualItems.length>0&&n.jsx("tr",{style:{height:Math.max(0,h.totalHeight-(((y=h.virtualItems[h.virtualItems.length-1])==null?void 0:y.end)||0))},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})})]}):x.map(({row:b,index:j})=>n.jsx(hr,{row:b,rowIndex:j},j))}))}function Nd(i){var c=i,{filters:e,onFilter:t,initialValues:r={},showClearAll:s=!0,className:a=""}=c,o=O(c,["filters","onFilter","initialValues","showClearAll","className"]);const[u,d]=l.useState(r),[f,p]=l.useState(!1),m=Object.values(u).some(b=>b!==""&&b!==null&&b!==void 0),h=(b,j)=>{const $=z(T({},u),{[b]:j});d($),t($)},x=()=>{const b={};e.forEach(j=>{b[j.key]=""}),d(b),t(b)},v=b=>{const j=z(T({},u),{[b]:""});d(j),t(j)},y=Object.values(u).filter(b=>b!==""&&b!==null&&b!==void 0).length;return n.jsx("div",z(T({className:`bg-surface-base border-b border-line-default ${a}`},o),{children:n.jsxs("div",{className:"px-4 py-3 sm:px-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("button",{type:"button",onClick:()=>p(!f),className:"flex items-center gap-2 text-sm font-medium text-fg-secondary hover:text-fg-primary",children:[n.jsx(Ql,{className:"h-4 w-4"}),n.jsx("span",{children:"Filters"}),y>0&&n.jsx("span",{className:`inline-flex items-center ${E("sm","px")} ${E("0.5","py")} rounded text-xs font-medium bg-surface-brand-muted text-fg-brand-emphasis`,children:y})]}),m&&s&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:x,className:"text-sm",children:"Clear all"})]}),f&&n.jsx("div",{className:"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(b=>{const j=u[b.key]||"";return n.jsxs("div",{className:"space-y-1",children:[n.jsx(Tt,{htmlFor:`filter-${b.key}`,variant:"optional",children:b.label}),n.jsxs("div",{className:"relative",children:[b.type==="text"&&n.jsx(Se,{id:`filter-${b.key}`,type:"text",value:j,onChange:$=>h(b.key,$.target.value),placeholder:b.placeholder||`Filter by ${b.label.toLowerCase()}`,size:"sm",variant:"outlined"}),b.type==="select"&&n.jsxs("div",{className:"relative",children:[n.jsx(jr,{id:`filter-${b.key}`,options:[{value:"",label:`All ${b.label}`},...b.options||[]],value:j,onChange:$=>h(b.key,$.target.value)}),j&&n.jsx("button",{type:"button",onClick:()=>v(b.key),className:"absolute right-8 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${b.label} filter`,children:n.jsx(Ne,{className:"h-4 w-4"})})]}),b.type==="date"&&n.jsx(Se,{id:`filter-${b.key}`,type:"date",value:j,onChange:$=>h(b.key,$.target.value),size:"sm",variant:"outlined"}),j&&b.type!=="select"&&n.jsx("button",{type:"button",onClick:()=>v(b.key),className:"absolute right-2 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${b.label} filter`,children:n.jsx(Ne,{className:"h-4 w-4"})})]})]},b.key)})})]})}))}function Vs(s){var a=s,{showClearAll:e=!0,className:t=""}=a,r=O(a,["showClearAll","className"]);const{filterState:o,setFilters:i}=Oe();return o.config.length===0?null:n.jsx(Nd,T({filters:o.config,onFilter:i,initialValues:o.values,showClearAll:e,className:t},r))}function Sd(f){var p=f,{page:e,pageSize:t,total:r,onPageChange:s,onPageSizeChange:a,pageSizeOptions:o=[10,25,50,100],showPageSizeSelector:i=!0,showPageInfo:c=!0,className:u=""}=p,d=O(p,["page","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showPageInfo","className"]);const m=Math.ceil(r/t),h=r===0?0:(e-1)*t+1,x=Math.min(e*t,r),v=()=>{e>1&&s(e-1)},y=()=>{e<m&&s(e+1)},b=()=>{e>1&&s(1)},j=()=>{e<m&&s(m)};return n.jsxs("div",z(T({className:`flex items-center justify-between px-4 py-3 bg-surface-base border-t border-line-default sm:px-6 ${u}`},d),{children:[n.jsxs("div",{className:"flex flex-1 justify-between sm:hidden",children:[n.jsx(Z,{variant:"outline",size:"sm",onClick:v,disabled:e===1,children:"Previous"}),n.jsx(Z,{variant:"outline",size:"sm",onClick:y,disabled:e>=m,children:"Next"})]}),n.jsxs("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[c&&n.jsx("div",{children:n.jsxs(Be,{as:"p",className:"text-sm text-fg-secondary",children:["Showing ",n.jsx("span",{className:"font-medium",children:h})," to"," ",n.jsx("span",{className:"font-medium",children:x})," of"," ",n.jsx("span",{className:"font-medium",children:r})," results"]})}),n.jsxs("div",{className:"flex items-center gap-4",children:[i&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Be,{as:"span",className:"text-sm text-fg-secondary",children:"Show:"}),n.jsx(jr,{"aria-label":"Items per page",options:o.map($=>({value:$.toString(),label:$.toString()})),value:t.toString(),onChange:$=>{const g=parseInt($.target.value);a(g),s(1)},className:"w-20"})]}),n.jsxs("nav",{className:"flex items-center gap-1","aria-label":"Pagination",children:[n.jsxs(Z,{variant:"ghost",size:"sm",onClick:b,disabled:e===1,"aria-label":"First page",children:[n.jsx(Ut,{className:"h-4 w-4"}),n.jsx(Ut,{className:"h-4 w-4 -ml-2"})]}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:v,disabled:e===1,"aria-label":"Previous page",children:n.jsx(Ut,{className:"h-4 w-4"})}),n.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(5,m)},($,g)=>{let k;return m<=5||e<=3?k=g+1:e>=m-2?k=m-4+g:k=e-2+g,n.jsx(Z,{variant:e===k?"primary":"ghost",size:"sm",onClick:()=>s(k),className:"min-w-10","aria-label":`Page ${k}`,"aria-current":e===k?"page":void 0,children:k},k)})}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:y,disabled:e>=m,"aria-label":"Next page",children:n.jsx(bt,{className:"h-4 w-4"})}),n.jsxs(Z,{variant:"ghost",size:"sm",onClick:j,disabled:e>=m,"aria-label":"Last page",children:[n.jsx(bt,{className:"h-4 w-4"}),n.jsx(bt,{className:"h-4 w-4 -ml-2"})]})]})]})]})]}))}function Ws(o){var i=o,{showPageSizeSelector:e=!0,showPageInfo:t=!0,pageSizeOptions:r,className:s=""}=i,a=O(i,["showPageSizeSelector","showPageInfo","pageSizeOptions","className"]);const{paginationState:c,setPage:u,setPageSize:d,paginationMode:f}=Oe();return f==="client"&&c.totalPages<=1?null:n.jsx(Sd,T({page:c.page,pageSize:c.pageSize,total:c.total,onPageChange:u,onPageSizeChange:d,pageSizeOptions:r,showPageSizeSelector:e,showPageInfo:t,className:s},a))}function Ce(e){const o=e,{className:t=""}=o,r=O(o,["className"]),s="children"in e&&e.children!==void 0,a=s?r:Cd(r);return s?n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsx(cs,z(T({},a),{children:e.children}))}):n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsxs(cs,z(T({},a),{children:[a.filters&&a.filters.length>0&&n.jsx(Vs,{}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-line-default",role:"table","aria-label":e["aria-label"],"aria-labelledby":e["aria-labelledby"],"aria-rowcount":a.total||a.data.length,"aria-colcount":a.columns.length+(a.selectable?1:0)+(a.actions?1:0),children:[n.jsx(Ls,{}),n.jsx(Os,{})]})}),n.jsx(Ws,{})]}))})}function Cd(e){const{columns:t,data:r,loading:s,onSort:a,sortColumn:o,sortDirection:i,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,pagination:m,filters:h,selectable:x,selectedRows:v,onSelectionChange:y,rowId:b,actions:j,onRowClick:$,paginationMode:g,defaultPageSize:k,resizable:N,columnWidths:L,onColumnResize:S,virtualScrolling:D,virtualScrollingOptions:R}=e;let M=g||"auto";return M==="auto"&&(M=m&&m.total!==void 0&&m.onPageChange?"server":"client"),{columns:t,data:r,loading:s,paginationMode:M,page:m==null?void 0:m.page,pageSize:m==null?void 0:m.pageSize,total:m==null?void 0:m.total,onPageChange:m==null?void 0:m.onPageChange,onPageSizeChange:m==null?void 0:m.onPageSizeChange,defaultPageSize:k||(m==null?void 0:m.pageSize)||10,pageSizeOptions:m==null?void 0:m.pageSizeOptions,sortColumn:o,sortDirection:i,onSort:a,filters:h==null?void 0:h.config,filterValues:h==null?void 0:h.initialValues,onFilter:h==null?void 0:h.onFilter,initialFilterValues:h==null?void 0:h.initialValues,selectable:x,selectedRows:v,onSelectionChange:y,rowId:b,actions:j,onRowClick:$,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,resizable:N,columnWidths:L,onColumnResize:S,virtualScrolling:D,virtualScrollingOptions:R,children:n.jsx(n.Fragment,{})}}Ce.Header=Ls;Ce.HeaderRow=Fs;Ce.HeaderCell=Ds;Ce.Body=Os;Ce.Row=hr;Ce.Cell=_s;Ce.Filters=Vs;Ce.Pagination=Ws;Ce.EmptyState=zs;Ce.Actions=Ps;function $d(e={}){const{defaultWidths:t={},minWidth:r=50,maxWidth:s,resizable:a=!0}=e,[o,i]=l.useState(t),[c,u]=l.useState(!1),[d,f]=l.useState(null),p=l.useRef(null),m=l.useCallback(($,g)=>{const k=Math.max(r,s?Math.min(g,s):g);i(N=>z(T({},N),{[$]:k}))},[r,s]),h=l.useCallback(()=>{i(t)},[t]),x=l.useCallback(($,g,k)=>{a&&(u(!0),f($),p.current={startX:g,startWidth:k})},[a]),v=l.useCallback($=>{if(!c||!d||!p.current)return;const g=$-p.current.startX,k=p.current.startWidth+g;m(d,k)},[c,d,m]),y=l.useCallback(()=>{u(!1),f(null),p.current=null},[]),b=l.useRef(void 0),j=l.useRef(void 0);return typeof window!="undefined"&&(b.current=$=>{c&&v($.clientX)},j.current=()=>{c&&y()},c?(document.addEventListener("mousemove",b.current),document.addEventListener("mouseup",j.current)):(b.current&&document.removeEventListener("mousemove",b.current),j.current&&document.removeEventListener("mouseup",j.current))),{columnWidths:o,setColumnWidth:m,resetColumnWidths:h,isResizing:c,resizingColumn:d,startResize:x,handleResize:v,endResize:y}}const Ir=l.createContext(null);function Ed(){return l.useContext(Ir)}function lt(){const e=l.useContext(Ir);if(!e)throw new Error("useSideNavbarThemeRequired must be used within SideNavbarThemeProvider");return e}const Et={variant:"default",navigationWidth:"56px",contentWidth:"320px",animationDuration:300,animationEasing:"ease-in-out"};function Hs({children:e,variant:t=Et.variant,navigationWidth:r=Et.navigationWidth,contentWidth:s=Et.contentWidth,animationDuration:a=Et.animationDuration,animationEasing:o=Et.animationEasing}){const i=l.useMemo(()=>({variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o}),[t,r,s,a,o]);return n.jsx(Ir.Provider,{value:i,children:e})}const Dr=l.createContext(null);function Md(){return l.useContext(Dr)}function vt(){const e=l.useContext(Dr);if(!e)throw new Error("useSideNavbarConfigRequired must be used within SideNavbarConfigProvider");return e}const we={mode:"full",resizable:!1,minWidth:void 0,maxWidth:void 0,snapPoints:void 0,responsive:!1,mobileBreakpoint:768,mobileVariant:"collapse",overlayBackdrop:!0,persistState:!0,persistWidth:!1,storageKey:void 0,keyboardShortcut:"Ctrl+B",enableKeyboardShortcut:!0};function Us({children:e,mode:t=we.mode,resizable:r=we.resizable,minWidth:s=we.minWidth,maxWidth:a=we.maxWidth,snapPoints:o=we.snapPoints,responsive:i=we.responsive,mobileBreakpoint:c=we.mobileBreakpoint,mobileVariant:u=we.mobileVariant,overlayBackdrop:d=we.overlayBackdrop,persistState:f=we.persistState,persistWidth:p=we.persistWidth,storageKey:m=we.storageKey,keyboardShortcut:h=we.keyboardShortcut,enableKeyboardShortcut:x=we.enableKeyboardShortcut}){const v=l.useMemo(()=>({mode:t,resizable:r,minWidth:s,maxWidth:a,snapPoints:o,responsive:i,mobileBreakpoint:c,mobileVariant:u,overlayBackdrop:d,persistState:f,persistWidth:p,storageKey:m,keyboardShortcut:h,enableKeyboardShortcut:x}),[t,r,s,a,o,i,c,u,d,f,p,m,h,x]);return n.jsx(Dr.Provider,{value:v,children:e})}const Fr=l.createContext(null);function Td(){return l.useContext(Fr)}function ct(){const e=l.useContext(Fr);if(!e)throw new Error("useSideNavbarStateRequired must be used within SideNavbarStateProvider");return e}function br(e){if(typeof e=="number")return e;const t=parseFloat(e);return isNaN(t)?0:e.endsWith("rem")||e.endsWith("em")?t*16:(e.endsWith("px"),t)}function so(e,t){return e===void 0||t===void 0?!0:e<t}function lr(e,t,r){let s=e;return t!==void 0&&(s=Math.max(s,t)),r!==void 0&&(s=Math.min(s,r)),s}const Ad=["ctrl","cmd","control","shift","alt","meta","option"];function no(e){const t={key:"",ctrl:!1,shift:!1,alt:!1,meta:!1,isValid:!1};if(!e||typeof e!="string")return t;const r=e.trim();if(!r)return t;const s=r.split("+").map(u=>u.trim().toLowerCase()).filter(u=>u.length>0);if(s.length===0)return t;const a=new Set;let o="";for(let u=0;u<s.length;u++){const d=s[u];if(Ad.includes(d))a.add(d);else if(u===s.length-1)o=d;else return t}if(!o)return t;const i=a.has("ctrl")||a.has("cmd")||a.has("control"),c=a.has("alt")||a.has("option");return{key:o,ctrl:i,shift:a.has("shift"),alt:c,meta:a.has("meta"),isValid:!0}}function Rd(e,t="windows"){if(!e.isValid)return"";const r=[];return t==="mac"?(e.ctrl&&r.push("⌘"),e.shift&&r.push("⇧"),e.alt&&r.push("⌥"),e.meta&&r.push("⌃"),r.push(e.key.toUpperCase()),r.join("")):(e.ctrl&&r.push("Ctrl"),e.shift&&r.push("Shift"),e.alt&&r.push("Alt"),e.meta&&r.push("Meta"),r.push(e.key.toUpperCase()),r.join("+"))}function ao({initialWidth:e,minWidth:t,maxWidth:r,snapPoints:s,snapThreshold:a=20,onWidthChange:o,enabled:i=!0}){process.env.NODE_ENV==="development"&&(so(t,r)||console.warn("[useResize] Invalid bounds: minWidth must be less than maxWidth",{minWidth:t,maxWidth:r}));const c=lr(e,t,r),[u,d]=l.useState(c),[f,p]=l.useState(!1),m=l.useRef(0),h=l.useRef(c),x=l.useCallback(j=>{let $=lr(j,t,r);if(s&&s.length>0){const g=s.reduce((k,N)=>{const L=Math.abs($-N),S=Math.abs($-k);return L<S?N:k},s[0]);Math.abs($-g)<=a&&($=g)}d($),o==null||o($)},[t,r,s,a,o]),v=l.useCallback(j=>{if(!i||!f)return;const $=j.clientX-m.current,g=h.current+$;x(g)},[i,f,x]),y=l.useCallback(()=>{i&&(p(!1),m.current=0,h.current=u)},[i,u]),b=l.useCallback(j=>{i&&(j.preventDefault(),j.stopPropagation(),p(!0),m.current=j.clientX,h.current=u)},[i,u]);return l.useEffect(()=>{if(f)return document.addEventListener("mousemove",v),document.addEventListener("mouseup",y),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",y),document.body.style.userSelect="",document.body.style.cursor=""}},[f,v,y]),l.useEffect(()=>{f||d(lr(e,t,r))},[e,t,r,f]),{width:u,isResizing:f,startResize:b,setWidth:x}}function oo({mobileBreakpoint:e=768,onMobileChange:t,enabled:r=!0}={}){const[s,a]=l.useState(typeof window!="undefined"?window.innerWidth:1024),[o,i]=l.useState(typeof window!="undefined"?window.innerWidth<e:!1),c=l.useCallback(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),d!==o&&(i(d),t==null||t(d))},[r,e,o,t]);return l.useEffect(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),i(d),window.addEventListener("resize",c);let f=null;return window.ResizeObserver&&(f=new ResizeObserver(()=>{c()}),f.observe(document.body)),()=>{window.removeEventListener("resize",c),f==null||f.disconnect()}},[r,e,c]),{isMobile:o,viewportWidth:s}}function io({isActive:e,containerRef:t,restoreFocus:r=!0,initialFocusRef:s}){const a=l.useRef(null);l.useEffect(()=>{if(e){if(a.current=document.activeElement,s!=null&&s.current)s.current.focus();else if(t.current){const i=t.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');i==null||i.focus()}}else r&&a.current&&(a.current.focus(),a.current=null)},[e,t,s,r]);const o=l.useCallback(i=>{if(!(!e||!t.current)&&i.key==="Tab"){const c=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),u=c[0],d=c[c.length-1];i.shiftKey?document.activeElement===u&&(i.preventDefault(),d==null||d.focus()):document.activeElement===d&&(i.preventDefault(),u==null||u.focus())}},[e,t]);l.useEffect(()=>{if(e)return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[e,o])}function lo({key:e,ctrl:t=!1,shift:r=!1,alt:s=!1,meta:a=!1,onTrigger:o,enabled:i=!0,preventDefault:c=!0}){const u=l.useCallback(d=>{if(!i)return;const f=d.target;if((f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.isContentEditable)&&!t&&!a)return;const m=e.length===1?d.key.toLowerCase()===e.toLowerCase():d.key===e,h=t?d.ctrlKey||d.metaKey:!d.ctrlKey&&!d.metaKey,x=r?d.shiftKey:!d.shiftKey,v=s?d.altKey:!d.altKey,y=a?d.metaKey:!d.metaKey,b=t?(d.ctrlKey||d.metaKey)&&!a:h&&y;m&&b&&x&&v&&(c&&(d.preventDefault(),d.stopPropagation()),o())},[i,e,t,r,s,a,o,c]);l.useEffect(()=>{if(i)return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[i,u])}function Bs({children:e,defaultCollapsed:t=!1,collapsed:r,onCollapseChange:s,onWidthChange:a,onMobileChange:o,exclusiveGroups:i=!1}){const c=lt(),u=vt(),d=l.useRef(null),f=r!==void 0,p=()=>{if(f)return r;if(u.storageKey&&u.persistState&&typeof window!="undefined"){const A=localStorage.getItem(`${u.storageKey}-collapsed`);if(A!==null)return A==="true"}return t},m=()=>{if(u.storageKey&&u.persistWidth&&typeof window!="undefined"){const A=localStorage.getItem(`${u.storageKey}-width`);if(A!==null){const W=parseInt(A,10);if(!isNaN(W))return W}}return br(c.contentWidth)},[h,x]=l.useState(p),[v,y]=l.useState({}),{isMobile:b}=oo({mobileBreakpoint:u.mobileBreakpoint,onMobileChange:A=>{o==null||o(A),A&&u.mobileVariant==="collapse"&&!f&&x(!0)},enabled:u.responsive}),{width:j,isResizing:$,startResize:g,setWidth:k}=ao({initialWidth:m(),minWidth:u.minWidth,maxWidth:u.maxWidth,snapPoints:u.snapPoints,onWidthChange:A=>{a==null||a(A),u.storageKey&&u.persistWidth&&typeof window!="undefined"&&localStorage.setItem(`${u.storageKey}-width`,String(A))},enabled:u.resizable&&!b});io({isActive:b&&u.mobileVariant==="overlay"&&!h,containerRef:d,restoreFocus:!0});const N=f?r:h,L=l.useCallback(A=>{f||x(A),s==null||s(A)},[f,s]),S=l.useCallback(()=>{L(!N)},[N,L]),D=no(u.keyboardShortcut);lo({key:D.key,ctrl:D.ctrl,shift:D.shift,alt:D.alt,meta:D.meta,onTrigger:S,enabled:u.enableKeyboardShortcut});const R=l.useCallback(A=>{k(A)},[k]),M=l.useCallback(A=>{y(i?W=>{const H=W[A]===!1,U={},oe=new Set([...Object.keys(W),A]);return H?oe.forEach(ne=>{U[ne]=!0}):oe.forEach(ne=>{U[ne]=ne!==A}),U}:W=>z(T({},W),{[A]:!W[A]}))},[i]),F=l.useCallback((A,W)=>{y(K=>z(T({},K),{[A]:W}))},[]);l.useEffect(()=>{f&&r!==h&&x(r)},[f,r,h]),l.useEffect(()=>{u.storageKey&&u.persistState&&typeof window!="undefined"&&!f&&localStorage.setItem(`${u.storageKey}-collapsed`,String(h))},[u.storageKey,u.persistState,h,f]);const I=l.useMemo(()=>({collapsed:N,toggle:S,setCollapsed:L,currentWidth:j,setWidth:R,isMobile:b,isResizing:$,startResize:g,groupStates:v,toggleGroup:M,setGroupCollapsed:F,sidebarRef:d}),[N,S,L,j,R,b,$,g,v,M,F]);return n.jsx(Fr.Provider,{value:I,children:e})}function qs({children:e,variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:v,persistWidth:y,storageKey:b,keyboardShortcut:j,enableKeyboardShortcut:$,defaultCollapsed:g,collapsed:k,onCollapseChange:N,onWidthChange:L,onMobileChange:S,exclusiveGroups:D}){return n.jsx(Hs,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,children:n.jsx(Us,{mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:v,persistWidth:y,storageKey:b,keyboardShortcut:j,enableKeyboardShortcut:$,children:n.jsx(Bs,{defaultCollapsed:g,collapsed:k,onCollapseChange:N,onWidthChange:L,onMobileChange:S,exclusiveGroups:D,children:e})})})}const Lr=l.createContext(null);function Gs(){return l.useContext(Lr)}function Ks(){const e=l.useContext(Lr);if(!e)throw new Error("useSidebarSlotRequired must be used within SidebarSlotProvider");return e}function co({children:e,defaultSlot:t=null}){const[r,s]=l.useState(t),a=l.useRef(new Map),o=l.useCallback((u,d)=>{a.current.set(u,d)},[]),i=l.useCallback(u=>{a.current.delete(u)},[]),c=l.useMemo(()=>({activeSlot:r,setActiveSlot:s,slots:a.current,registerSlot:o,unregisterSlot:i}),[r,o,i]);return n.jsx(Lr.Provider,{value:c,children:e})}const _r=l.createContext(null);function Id(){return l.useContext(_r)}function Ys(){const e=l.useContext(_r);return e||{showMainToggle:!0,mainTogglePosition:"floating"}}function Xs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{currentWidth:a,setWidth:o,isResizing:i,startResize:c}=ct(),{resizable:u}=vt();return u?n.jsxs("div",z(T({className:`
387
389
  group
388
390
  absolute
389
391
  top-0
@@ -424,16 +426,16 @@ React keys must be passed directly to JSX without using spread:
424
426
  bg-scrim
425
427
  ${ue("modal-backdrop")}
426
428
  ${r}
427
- `,style:T({animation:`fadeIn ${f}ms ease-in-out`},s),onClick:v,"aria-hidden":"true","data-testid":"side-navbar-backdrop"},a)):null}const Dd={xs:"w-5 h-5",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},Ld={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},Fd={floating:`absolute ${ue("fixed")}`,top:"absolute top-2 right-2 z-10",bottom:"absolute bottom-2 right-2 z-10",inside:"relative z-10","navigation-top":"relative mt-2 mx-auto z-10","navigation-bottom":"relative mt-auto mb-2 mx-auto z-10"},_d={default:"bg-surface-raised border border-line-default shadow-sm hover:bg-surface-hover hover:shadow",ghost:"bg-transparent hover:bg-surface-hover border-0",outline:"bg-transparent border border-line-default hover:bg-surface-hover"},Pd={floating:"right",top:"bottom",bottom:"top",inside:"right","navigation-top":"right","navigation-bottom":"right"};function Qs(v){var y=v,{position:e="floating",offset:t,icon:r,expandIcon:s,collapseIcon:a,size:o="sm",variant:i="default",showTooltip:c=!0,tooltipPosition:u,keyboardShortcut:d,enableKeyboardShortcut:f,className:p="",style:m,"aria-label":h}=y,x=O(y,["position","offset","icon","expandIcon","collapseIcon","size","variant","showTooltip","tooltipPosition","keyboardShortcut","enableKeyboardShortcut","className","style","aria-label"]);var W,ie;const{collapsed:g,toggle:j}=ct(),{animationDuration:C,animationEasing:b,navigationWidth:k,contentWidth:N,minWidth:_}=lt(),S=vt(),M=d!=null?d:S.keyboardShortcut,L=f!=null?f:S.enableKeyboardShortcut,R=()=>{if(typeof r=="function")return r(g);if(r)return r;if(g&&s)return s;if(!g&&a)return a;const ne=g?cc:ic;return n.jsx(ne,{className:Ld[o],style:{transition:"none",transform:"none",willChange:"auto"}})},D=g?"Expand sidebar":"Collapse sidebar",I=u!=null?u:Pd[e],A=c?`${g?"Expand":"Collapse"} sidebar${L?` (${M})`:""}`:void 0,V=t?{transform:`translate(${(W=t.x)!=null?W:0}px, ${(ie=t.y)!=null?ie:0}px)`}:{},Y=e==="floating"?T({right:"-12px",top:"1rem",transform:"translateY(-50%)",transition:`right ${C}ms ${b}`},V):V,H=n.jsx("button",P(T({type:"button",onClick:j,className:`
429
+ `,style:T({animation:`fadeIn ${f}ms ease-in-out`},s),onClick:v,"aria-hidden":"true","data-testid":"side-navbar-backdrop"},a)):null}const Dd={xs:"w-5 h-5",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},Fd={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},Ld={floating:`absolute ${ue("fixed")}`,top:"absolute top-2 right-2 z-10",bottom:"absolute bottom-2 right-2 z-10",inside:"relative z-10","navigation-top":"relative mt-2 mx-auto z-10","navigation-bottom":"relative mt-auto mb-2 mx-auto z-10"},_d={default:"bg-surface-raised border border-line-default shadow-sm hover:bg-surface-hover hover:shadow",ghost:"bg-transparent hover:bg-surface-hover border-0",outline:"bg-transparent border border-line-default hover:bg-surface-hover"},Pd={floating:"right",top:"bottom",bottom:"top",inside:"right","navigation-top":"right","navigation-bottom":"right"};function Qs(v){var y=v,{position:e="floating",offset:t,icon:r,expandIcon:s,collapseIcon:a,size:o="sm",variant:i="default",showTooltip:c=!0,tooltipPosition:u,keyboardShortcut:d,enableKeyboardShortcut:f,className:p="",style:m,"aria-label":h}=y,x=O(y,["position","offset","icon","expandIcon","collapseIcon","size","variant","showTooltip","tooltipPosition","keyboardShortcut","enableKeyboardShortcut","className","style","aria-label"]);var U,oe;const{collapsed:b,toggle:j}=ct(),{animationDuration:$,animationEasing:g,navigationWidth:k,contentWidth:N,minWidth:L}=lt(),S=vt(),D=d!=null?d:S.keyboardShortcut,R=f!=null?f:S.enableKeyboardShortcut,M=()=>{if(typeof r=="function")return r(b);if(r)return r;if(b&&s)return s;if(!b&&a)return a;const ne=b?cc:ic;return n.jsx(ne,{className:Fd[o],style:{transition:"none",transform:"none",willChange:"auto"}})},F=b?"Expand sidebar":"Collapse sidebar",I=u!=null?u:Pd[e],A=c?`${b?"Expand":"Collapse"} sidebar${R?` (${D})`:""}`:void 0,W=t?{transform:`translate(${(U=t.x)!=null?U:0}px, ${(oe=t.y)!=null?oe:0}px)`}:{},K=e==="floating"?T({right:"-12px",top:"1rem",transform:"translateY(-50%)",transition:`right ${$}ms ${g}`},W):W,H=n.jsx("button",z(T({type:"button",onClick:j,className:`
428
430
  ${Dd[o]}
429
431
  ${_d[i]}
430
432
  rounded-full
431
433
  flex items-center justify-center
432
434
  text-fg-secondary hover:text-fg-primary
433
435
  focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-1
434
- ${e==="floating"?"":Fd[e]}
436
+ ${e==="floating"?"":Ld[e]}
435
437
  ${p}
436
- `,style:T(T(T(T({},e==="floating"?{position:"absolute",right:"-11px",left:"auto"}:{}),e!=="floating"?Y:{}),e==="floating"?{zIndex:kn.fixed.value}:{}),m),"aria-label":h||D,"aria-expanded":!g,"aria-controls":"side-navbar-sidebar","data-position":e},x),{children:R()}));if(e==="floating"){const ne=c&&A?n.jsx(Ut,{content:A,position:I,preservePositioning:!0,children:H}):H;return n.jsx("div",{style:{position:"absolute",right:"0",top:"1rem",transform:"translateY(-50%)",zIndex:kn.fixed.value},children:ne})}return c&&A?n.jsx(Ut,{content:A,position:I,children:H}):H}const zd={default:"",compact:"text-sm",elevated:"shadow-lg",minimal:"border-0",bordered:"border-2"};function uo(o){var i=o,{children:e,className:t="",style:r,"aria-label":s}=i,a=O(i,["children","className","style","aria-label"]);const c=ct(),u=lt(),d=vt(),f=Ys(),{collapsed:p,setCollapsed:m,currentWidth:h,isResizing:x,sidebarRef:v,isMobile:y}=c,{variant:g,navigationWidth:j,contentWidth:C,animationDuration:b,animationEasing:k}=u,{mode:N,resizable:_,mobileVariant:S,overlayBackdrop:M}=d,L=typeof j=="number"?`${j}px`:j,R=typeof C=="number"?`${C}px`:C,I=N==="navigation"||p?L:_?`${h}px`:R,[A,V]=l.useState(!1);l.useEffect(()=>{V(!0)},[]);const Y=y&&S==="overlay",H=A&&Y,W=H?`fixed left-0 top-0 ${ue("fixed")}`:"relative";return n.jsxs(n.Fragment,{children:[A&&Y&&M&&!p&&n.jsx(Js,{}),n.jsxs("aside",P(T({ref:v,id:"side-navbar-sidebar",className:w(W,"flex","h-full","overflow-visible",zd[g],H&&p?"-translate-x-full":"translate-x-0",t),style:T({position:H?"fixed":"relative",backgroundColor:"var(--color-surface-subtle)",borderRight:"1px solid var(--color-line-default)",width:I,minWidth:I,transitionProperty:x?"none":"width, min-width, transform",transitionDuration:`${b}ms`,transitionTimingFunction:k},r),role:"complementary","aria-label":s||"Sidebar navigation","aria-expanded":N!=="navigation"?!p:void 0,"data-mode":N,"data-collapsed":p},a),{children:[_&&N!=="navigation"&&!p&&n.jsx(Xs,{}),f.showMainToggle&&N!=="navigation"&&n.jsx(Qs,{position:f.mainTogglePosition}),n.jsx("div",{className:"flex h-full w-full overflow-visible",children:e})]}))]})}const Pr=l.createContext(null);function Od(){return l.useContext(Pr)}function zr(){const e=l.useContext(Pr);if(!e)throw new Error("useNavbarRequired must be used within a SideNavbar.Navbar component");return e}function gr(o){var i=o,{icon:e,size:t="sm",variant:r="ghost",className:s=""}=i,a=O(i,["icon","size","variant","className"]);const{collapsed:c,toggle:u}=zr(),d=()=>{if(e)return typeof e=="function"?e(c):e;const h=c?bt:Bt;return n.jsx(h,{className:p[t],style:{transition:"none",transform:"none",willChange:"auto"}})},f={xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10"},p={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5"},m={default:"bg-surface-base border border-line-default shadow-sm hover:bg-surface-hover",ghost:"hover:bg-surface-active",outline:"border border-line-emphasis hover:bg-surface-hover"};return n.jsx(Ut,{content:c?"Expand sidebar":"Collapse sidebar",position:"right",children:n.jsx("button",P(T({type:"button",onClick:u,className:`
438
+ `,style:T(T(T(T({},e==="floating"?{position:"absolute",right:"-11px",left:"auto"}:{}),e!=="floating"?K:{}),e==="floating"?{zIndex:kn.fixed.value}:{}),m),"aria-label":h||F,"aria-expanded":!b,"aria-controls":"side-navbar-sidebar","data-position":e},x),{children:M()}));if(e==="floating"){const ne=c&&A?n.jsx(Bt,{content:A,position:I,preservePositioning:!0,children:H}):H;return n.jsx("div",{style:{position:"absolute",right:"0",top:"1rem",transform:"translateY(-50%)",zIndex:kn.fixed.value},children:ne})}return c&&A?n.jsx(Bt,{content:A,position:I,children:H}):H}const zd={default:"",compact:"text-sm",elevated:"shadow-lg",minimal:"border-0",bordered:"border-2"};function uo(o){var i=o,{children:e,className:t="",style:r,"aria-label":s}=i,a=O(i,["children","className","style","aria-label"]);const c=ct(),u=lt(),d=vt(),f=Ys(),{collapsed:p,setCollapsed:m,currentWidth:h,isResizing:x,sidebarRef:v,isMobile:y}=c,{variant:b,navigationWidth:j,contentWidth:$,animationDuration:g,animationEasing:k}=u,{mode:N,resizable:L,mobileVariant:S,overlayBackdrop:D}=d,R=typeof j=="number"?`${j}px`:j,M=typeof $=="number"?`${$}px`:$,I=N==="navigation"||p?R:L?`${h}px`:M,[A,W]=l.useState(!1);l.useEffect(()=>{W(!0)},[]);const K=y&&S==="overlay",H=A&&K,U=H?`fixed left-0 top-0 ${ue("fixed")}`:"relative";return n.jsxs(n.Fragment,{children:[A&&K&&D&&!p&&n.jsx(Js,{}),n.jsxs("aside",z(T({ref:v,id:"side-navbar-sidebar",className:w(U,"flex","h-full","overflow-visible",zd[b],H&&p?"-translate-x-full":"translate-x-0",t),style:T({position:H?"fixed":"relative",backgroundColor:"var(--color-surface-subtle)",borderRight:"1px solid var(--color-line-default)",width:I,minWidth:I,transitionProperty:x?"none":"width, min-width, transform",transitionDuration:`${g}ms`,transitionTimingFunction:k},r),role:"complementary","aria-label":s||"Sidebar navigation","aria-expanded":N!=="navigation"?!p:void 0,"data-mode":N,"data-collapsed":p},a),{children:[L&&N!=="navigation"&&!p&&n.jsx(Xs,{}),f.showMainToggle&&N!=="navigation"&&n.jsx(Qs,{position:f.mainTogglePosition}),n.jsx("div",{className:"flex h-full w-full overflow-visible",children:e})]}))]})}const Pr=l.createContext(null);function Od(){return l.useContext(Pr)}function zr(){const e=l.useContext(Pr);if(!e)throw new Error("useNavbarRequired must be used within a SideNavbar.Navbar component");return e}function gr(o){var i=o,{icon:e,size:t="sm",variant:r="ghost",className:s=""}=i,a=O(i,["icon","size","variant","className"]);const{collapsed:c,toggle:u}=zr(),d=()=>{if(e)return typeof e=="function"?e(c):e;const h=c?bt:Ut;return n.jsx(h,{className:p[t],style:{transition:"none",transform:"none",willChange:"auto"}})},f={xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10"},p={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5"},m={default:"bg-surface-base border border-line-default shadow-sm hover:bg-surface-hover",ghost:"hover:bg-surface-active",outline:"border border-line-emphasis hover:bg-surface-hover"};return n.jsx(Bt,{content:c?"Expand sidebar":"Collapse sidebar",position:"right",children:n.jsx("button",z(T({type:"button",onClick:u,className:`
437
439
  flex
438
440
  items-center
439
441
  justify-center
@@ -448,7 +450,7 @@ React keys must be passed directly to JSX without using spread:
448
450
  ${m[r]}
449
451
  [&:hover]:!transform-none
450
452
  ${s}
451
- `,style:{willChange:"auto",transform:"none",transition:"none"},"aria-label":c?"Expand sidebar":"Collapse sidebar","aria-expanded":!c},a),{children:d()}))})}const Vd={sm:{container:"w-8 h-8",icon:"w-4 h-4",badge:"min-w-3.5 h-3.5 text-2xs"},md:{container:"w-10 h-10",icon:"w-5 h-5",badge:"min-w-5 h-5 text-xs"},lg:{container:"w-12 h-12",icon:"w-6 h-6",badge:"min-w-5 h-5 text-xs"}},Wd={default:"bg-error",success:"bg-success",warning:"bg-warning",danger:"bg-error-dark"},Hd={tooltip:"",inline:`flex-row ${E("sm","gap")} w-full ${E("md","px")}`,below:`flex-col ${E("1.5","gap")}`};function fo(g){var j=g,{id:e,icon:t,label:r,labelMode:s,showLabel:a=!0,active:o=!1,showTooltip:i=!0,badge:c,badgeVariant:u="default",variant:d="default",size:f="md",href:p,target:m,onClick:h,disabled:x=!1,className:v=""}=j,y=O(j,["id","icon","label","labelMode","showLabel","active","showTooltip","badge","badgeVariant","variant","size","href","target","onClick","disabled","className"]);var Y;const{activeItem:C,setActiveItem:b,labelMode:k}=zr(),N=(Y=s!=null?s:k)!=null?Y:"tooltip",_=o||e&&C===e,S=Vd[f],M=H=>{if(x){H.preventDefault();return}e&&b(e),h==null||h()},L=N!=="tooltip"&&a&&r&&n.jsx("span",{className:w("text-xs","flex-shrink-0","relative z-10",N==="below"&&"text-center",N==="inline"&&"truncate"),style:{willChange:"auto",transform:"none",zIndex:10},children:r}),R=w("relative","flex","items-center",N==="inline"?"justify-start":"justify-center",N==="below"&&"flex-col","rounded-lg","box-border","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1","w-full","flex-shrink-0","min-w-0","[&>*]:!transition-none","[&>*]:!transform-none",N==="tooltip"?S.container:w(E("sm","px"),E("1.5","py")),N!=="tooltip"&&Hd[N],x?"opacity-50 cursor-not-allowed":"cursor-pointer",v),D={default:_?"bg-surface-brand-muted text-fg-brand-emphasis":x?"text-fg-disabled":"text-fg-secondary hover:bg-surface-active hover:text-fg-primary [&:hover]:!transform-none",ghost:_?"text-fg-brand-emphasis":x?"text-fg-disabled":"text-fg-secondary hover:text-fg-primary [&:hover]:!transform-none",subtle:_?"bg-surface-active text-fg-primary":x?"text-fg-disabled":"text-fg-tertiary hover:bg-surface-hover hover:text-fg-primary [&:hover]:!transform-none"},I=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:w("flex-shrink-0",S.icon,"[&>svg]:transition-none","[&>svg]:!transform-none","[&>svg]:!will-change-auto","box-border","flex items-center justify-center",`relative ${ue("base")}`),style:{minWidth:S.icon==="w-4 h-4"?"1rem":S.icon==="w-5 h-5"?"1.25rem":"1.5rem",minHeight:S.icon==="w-4 h-4"?"1rem":S.icon==="w-5 h-5"?"1.25rem":"1.5rem",willChange:"auto",transform:"none",transition:"none",zIndex:N!=="tooltip"?0:"auto"},children:t}),L,c!=null&&n.jsx("span",{className:w("absolute","-top-1","-right-1","flex","items-center","justify-center","px-1","font-medium","text-fg-inverse","rounded-full",S.badge,Wd[u]),children:c})]}),A={willChange:"auto",transform:"none",transition:"none"},V=p?n.jsx("a",{href:p,target:m,rel:m==="_blank"?"noopener noreferrer":void 0,onClick:M,className:w(R,D[d]),style:A,"aria-label":r,"aria-current":_?"page":void 0,"aria-disabled":x,children:I}):n.jsx("button",P(T({type:"button",onClick:M,disabled:x,className:w(R,D[d]),style:A,"aria-label":r,"aria-current":_?"page":void 0},y),{children:I}));return N==="tooltip"&&i&&r&&!x?n.jsx(Ut,{content:r,position:"right",children:V}):V}function mo(s){var a=s,{orientation:e="horizontal",className:t=""}=a,r=O(a,["orientation","className"]);return e==="vertical"?n.jsx("div",T({className:w("w-px","h-6","bg-line-default","mx-auto",t),role:"separator","aria-orientation":"vertical"},r)):n.jsx("div",T({className:w("w-full","h-px","bg-line-default","my-2","flex-shrink-0",t),role:"separator","aria-orientation":"horizontal",style:{willChange:"auto",transform:"none"}},r))}function po(c){var u=c,{id:e,label:t,collapsible:r=!1,defaultCollapsed:s=!1,children:a,className:o}=u,i=O(u,["id","label","collapsible","defaultCollapsed","children","className"]);const[d,f]=l.useState(s);return n.jsxs("div",P(T({id:e,className:w("flex flex-col",o)},i),{children:[t&&n.jsx("div",{className:w(E("sm","px"),E("1.5","py"),"text-xs text-fg-tertiary uppercase tracking-wider",r&&"cursor-pointer hover:text-fg-secondary"),onClick:r?()=>f(!d):void 0,children:n.jsxs("div",{className:w("flex items-center",E("1.5","gap")),children:[" ",r&&n.jsx("span",{className:"shrink-0",children:d?n.jsx(bt,{className:"w-3 h-3",style:{transition:"none",transform:"none"}}):n.jsx(hs,{className:"w-3 h-3",style:{transition:"none",transform:"none"}})}),n.jsx("span",{children:t})]})}),!d&&n.jsxs("div",{className:"flex flex-col gap-2",children:[" ",a]})]}))}function yt(f){var p=f,{children:e,showMainToggle:t,mainTogglePosition:r,showToggle:s=!1,togglePosition:a="bottom",labelMode:o="tooltip",expandedWidth:i=200,className:c="",style:u}=p,d=O(p,["children","showMainToggle","mainTogglePosition","showToggle","togglePosition","labelMode","expandedWidth","className","style"]);const m=ct(),h=lt(),x=vt(),v=Ys(),y=l.useRef(null),[g,j]=l.useState(null),[C,b]=l.useState(!1),k=t!=null?t:v.showMainToggle;r!=null||v.mainTogglePosition;const N=o==="inline"&&!m.collapsed,_=N?typeof i=="number"?`${i}px`:i:h.navigationWidth,S=l.useMemo(()=>({collapsed:m.collapsed,toggle:m.toggle,navbarRef:y,activeItem:g,setActiveItem:j,isHovered:C,showInternalToggle:s,togglePosition:a,labelMode:o}),[m.collapsed,m.toggle,g,C,s,a,o]);return k&&x.mode,n.jsx(Pr.Provider,{value:S,children:n.jsxs("nav",P(T({ref:y,className:w("relative","flex-shrink-0","flex","flex-col","h-full",N?"items-stretch":"items-center",c),style:T({position:"relative",backgroundColor:"var(--color-surface-raised)",borderRight:"1px solid var(--color-line-default)",width:_,transitionProperty:"width",transitionDuration:`${h.animationDuration}ms`,transitionTimingFunction:h.animationEasing},u),onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),"aria-label":"Side navigation"},d),{children:[s&&a==="top"&&n.jsx("div",{className:"flex-shrink-0 p-2",style:{borderBottom:"1px solid var(--color-line-default)"},children:n.jsx(gr,{})}),n.jsx("div",{className:w("relative","flex-1","flex","flex-col","overflow-y-auto","overflow-x-hidden","p-2","gap-2","w-full","min-w-0",N?"items-stretch":"items-center","justify-start"),style:{zIndex:1},children:e}),s&&a==="bottom"&&n.jsx("div",{className:"flex-shrink-0 p-2",style:{borderTop:"1px solid var(--color-line-default)"},children:n.jsx(gr,{})})]}))})}yt.Toggle=gr;yt.Item=fo;yt.Separator=mo;yt.Group=po;yt.displayName="Navbar";const Or=l.createContext(null);function ho(){return l.useContext(Or)}function Yt(){const e=l.useContext(Or);if(!e)throw new Error("useSidebarRequired must be used within a SideNavbar.Sidebar component");return e}function bo(c){var u=c,{title:e,subtitle:t,showBorder:r=!0,children:s,className:a="",style:o}=u,i=O(u,["title","subtitle","showBorder","children","className","style"]);const{collapsed:d,registerHeader:f,unregisterHeader:p}=Yt();return l.useEffect(()=>(f(),()=>p()),[f,p]),d?null:n.jsx("div",P(T({className:`
453
+ `,style:{willChange:"auto",transform:"none",transition:"none"},"aria-label":c?"Expand sidebar":"Collapse sidebar","aria-expanded":!c},a),{children:d()}))})}const Vd={sm:{container:"w-8 h-8",icon:"w-4 h-4",badge:"min-w-3.5 h-3.5 text-2xs"},md:{container:"w-10 h-10",icon:"w-5 h-5",badge:"min-w-5 h-5 text-xs"},lg:{container:"w-12 h-12",icon:"w-6 h-6",badge:"min-w-5 h-5 text-xs"}},Wd={default:"bg-error",success:"bg-success",warning:"bg-warning",danger:"bg-error-dark"},Hd={tooltip:"",inline:`flex-row ${E("sm","gap")} w-full ${E("md","px")}`,below:`flex-col ${E("1.5","gap")}`};function fo(b){var j=b,{id:e,icon:t,label:r,labelMode:s,showLabel:a=!0,active:o=!1,showTooltip:i=!0,badge:c,badgeVariant:u="default",variant:d="default",size:f="md",href:p,target:m,onClick:h,disabled:x=!1,className:v=""}=j,y=O(j,["id","icon","label","labelMode","showLabel","active","showTooltip","badge","badgeVariant","variant","size","href","target","onClick","disabled","className"]);var K;const{activeItem:$,setActiveItem:g,labelMode:k}=zr(),N=(K=s!=null?s:k)!=null?K:"tooltip",L=o||e&&$===e,S=Vd[f],D=H=>{if(x){H.preventDefault();return}e&&g(e),h==null||h()},R=N!=="tooltip"&&a&&r&&n.jsx("span",{className:w("text-xs","flex-shrink-0","relative z-10",N==="below"&&"text-center",N==="inline"&&"truncate"),style:{willChange:"auto",transform:"none",zIndex:10},children:r}),M=w("relative","flex","items-center",N==="inline"?"justify-start":"justify-center",N==="below"&&"flex-col","rounded-lg","box-border","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1","w-full","flex-shrink-0","min-w-0","[&>*]:!transition-none","[&>*]:!transform-none",N==="tooltip"?S.container:w(E("sm","px"),E("1.5","py")),N!=="tooltip"&&Hd[N],x?"opacity-50 cursor-not-allowed":"cursor-pointer",v),F={default:L?"bg-surface-brand-muted text-fg-brand-emphasis":x?"text-fg-disabled":"text-fg-secondary hover:bg-surface-active hover:text-fg-primary [&:hover]:!transform-none",ghost:L?"text-fg-brand-emphasis":x?"text-fg-disabled":"text-fg-secondary hover:text-fg-primary [&:hover]:!transform-none",subtle:L?"bg-surface-active text-fg-primary":x?"text-fg-disabled":"text-fg-tertiary hover:bg-surface-hover hover:text-fg-primary [&:hover]:!transform-none"},I=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:w("flex-shrink-0",S.icon,"[&>svg]:transition-none","[&>svg]:!transform-none","[&>svg]:!will-change-auto","box-border","flex items-center justify-center",`relative ${ue("base")}`),style:{minWidth:S.icon==="w-4 h-4"?"1rem":S.icon==="w-5 h-5"?"1.25rem":"1.5rem",minHeight:S.icon==="w-4 h-4"?"1rem":S.icon==="w-5 h-5"?"1.25rem":"1.5rem",willChange:"auto",transform:"none",transition:"none",zIndex:N!=="tooltip"?0:"auto"},children:t}),R,c!=null&&n.jsx("span",{className:w("absolute","-top-1","-right-1","flex","items-center","justify-center","px-1","font-medium","text-fg-inverse","rounded-full",S.badge,Wd[u]),children:c})]}),A={willChange:"auto",transform:"none",transition:"none"},W=p?n.jsx("a",{href:p,target:m,rel:m==="_blank"?"noopener noreferrer":void 0,onClick:D,className:w(M,F[d]),style:A,"aria-label":r,"aria-current":L?"page":void 0,"aria-disabled":x,children:I}):n.jsx("button",z(T({type:"button",onClick:D,disabled:x,className:w(M,F[d]),style:A,"aria-label":r,"aria-current":L?"page":void 0},y),{children:I}));return N==="tooltip"&&i&&r&&!x?n.jsx(Bt,{content:r,position:"right",children:W}):W}function mo(s){var a=s,{orientation:e="horizontal",className:t=""}=a,r=O(a,["orientation","className"]);return e==="vertical"?n.jsx("div",T({className:w("w-px","h-6","bg-line-default","mx-auto",t),role:"separator","aria-orientation":"vertical"},r)):n.jsx("div",T({className:w("w-full","h-px","bg-line-default","my-2","flex-shrink-0",t),role:"separator","aria-orientation":"horizontal",style:{willChange:"auto",transform:"none"}},r))}function po(c){var u=c,{id:e,label:t,collapsible:r=!1,defaultCollapsed:s=!1,children:a,className:o}=u,i=O(u,["id","label","collapsible","defaultCollapsed","children","className"]);const[d,f]=l.useState(s);return n.jsxs("div",z(T({id:e,className:w("flex flex-col",o)},i),{children:[t&&n.jsx("div",{className:w(E("sm","px"),E("1.5","py"),"text-xs text-fg-tertiary uppercase tracking-wider",r&&"cursor-pointer hover:text-fg-secondary"),onClick:r?()=>f(!d):void 0,children:n.jsxs("div",{className:w("flex items-center",E("1.5","gap")),children:[" ",r&&n.jsx("span",{className:"shrink-0",children:d?n.jsx(bt,{className:"w-3 h-3",style:{transition:"none",transform:"none"}}):n.jsx(hs,{className:"w-3 h-3",style:{transition:"none",transform:"none"}})}),n.jsx("span",{children:t})]})}),!d&&n.jsxs("div",{className:"flex flex-col gap-2",children:[" ",a]})]}))}function yt(f){var p=f,{children:e,showMainToggle:t,mainTogglePosition:r,showToggle:s=!1,togglePosition:a="bottom",labelMode:o="tooltip",expandedWidth:i=200,className:c="",style:u}=p,d=O(p,["children","showMainToggle","mainTogglePosition","showToggle","togglePosition","labelMode","expandedWidth","className","style"]);const m=ct(),h=lt(),x=vt(),v=Ys(),y=l.useRef(null),[b,j]=l.useState(null),[$,g]=l.useState(!1),k=t!=null?t:v.showMainToggle;r!=null||v.mainTogglePosition;const N=o==="inline"&&!m.collapsed,L=N?typeof i=="number"?`${i}px`:i:h.navigationWidth,S=l.useMemo(()=>({collapsed:m.collapsed,toggle:m.toggle,navbarRef:y,activeItem:b,setActiveItem:j,isHovered:$,showInternalToggle:s,togglePosition:a,labelMode:o}),[m.collapsed,m.toggle,b,$,s,a,o]);return k&&x.mode,n.jsx(Pr.Provider,{value:S,children:n.jsxs("nav",z(T({ref:y,className:w("relative","flex-shrink-0","flex","flex-col","h-full",N?"items-stretch":"items-center",c),style:T({position:"relative",backgroundColor:"var(--color-surface-raised)",borderRight:"1px solid var(--color-line-default)",width:L,transitionProperty:"width",transitionDuration:`${h.animationDuration}ms`,transitionTimingFunction:h.animationEasing},u),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),"aria-label":"Side navigation"},d),{children:[s&&a==="top"&&n.jsx("div",{className:"flex-shrink-0 p-2",style:{borderBottom:"1px solid var(--color-line-default)"},children:n.jsx(gr,{})}),n.jsx("div",{className:w("relative","flex-1","flex","flex-col","overflow-y-auto","overflow-x-hidden","p-2","gap-2","w-full","min-w-0",N?"items-stretch":"items-center","justify-start"),style:{zIndex:1},children:e}),s&&a==="bottom"&&n.jsx("div",{className:"flex-shrink-0 p-2",style:{borderTop:"1px solid var(--color-line-default)"},children:n.jsx(gr,{})})]}))})}yt.Toggle=gr;yt.Item=fo;yt.Separator=mo;yt.Group=po;yt.displayName="Navbar";const Or=l.createContext(null);function ho(){return l.useContext(Or)}function Yt(){const e=l.useContext(Or);if(!e)throw new Error("useSidebarRequired must be used within a SideNavbar.Sidebar component");return e}function bo(c){var u=c,{title:e,subtitle:t,showBorder:r=!0,children:s,className:a="",style:o}=u,i=O(u,["title","subtitle","showBorder","children","className","style"]);const{collapsed:d,registerHeader:f,unregisterHeader:p}=Yt();return l.useEffect(()=>(f(),()=>p()),[f,p]),d?null:n.jsx("div",z(T({className:`
452
454
  flex-shrink-0
453
455
  ${E("md","px")}
454
456
  ${E("sm","py")}
@@ -465,19 +467,19 @@ React keys must be passed directly to JSX without using spread:
465
467
  text-fg-secondary
466
468
  m-0
467
469
  mt-1
468
- `,children:t})]})}))}function go(i){var c=i,{scrollable:e=!0,padding:t="md",children:r,className:s="",style:a}=c,o=O(c,["scrollable","padding","children","className","style"]);const{collapsed:u,setScrollPosition:d}=Yt();if(u)return null;const f=t!=="none"?E(t,"p"):"",p=e?"overflow-y-auto overflow-x-hidden":"overflow-hidden",m=e?{scrollbarWidth:Qe.content.scrollbar.width,scrollbarColor:`${Qe.content.scrollbar.color.thumb} ${Qe.content.scrollbar.color.track}`}:{},h=x=>{e&&d(x.currentTarget.scrollTop)};return n.jsx("div",P(T({className:`
470
+ `,children:t})]})}))}function go(i){var c=i,{scrollable:e=!0,padding:t="md",children:r,className:s="",style:a}=c,o=O(c,["scrollable","padding","children","className","style"]);const{collapsed:u,setScrollPosition:d}=Yt();if(u)return null;const f=t!=="none"?E(t,"p"):"",p=e?"overflow-y-auto overflow-x-hidden":"overflow-hidden",m=e?{scrollbarWidth:Qe.content.scrollbar.width,scrollbarColor:`${Qe.content.scrollbar.color.thumb} ${Qe.content.scrollbar.color.track}`}:{},h=x=>{e&&d(x.currentTarget.scrollTop)};return n.jsx("div",z(T({className:`
469
471
  flex-1
470
472
  min-h-0
471
473
  ${p}
472
474
  ${f}
473
475
  ${s}
474
- `,style:T(T({},m),a),onScroll:h},o),{children:r}))}function xo(i){var c=i,{padding:e="md",showBorder:t=!0,children:r,className:s="",style:a}=c,o=O(c,["padding","showBorder","children","className","style"]);const{collapsed:u,registerFooter:d,unregisterFooter:f}=Yt();if(l.useEffect(()=>(d(),()=>f()),[d,f]),u)return null;const p=e!=="none"?E(e,"p"):"";return n.jsx("div",P(T({className:`
476
+ `,style:T(T({},m),a),onScroll:h},o),{children:r}))}function xo(i){var c=i,{padding:e="md",showBorder:t=!0,children:r,className:s="",style:a}=c,o=O(c,["padding","showBorder","children","className","style"]);const{collapsed:u,registerFooter:d,unregisterFooter:f}=Yt();if(l.useEffect(()=>(d(),()=>f()),[d,f]),u)return null;const p=e!=="none"?E(e,"p"):"";return n.jsx("div",z(T({className:`
475
477
  flex-shrink-0
476
478
  ${p}
477
479
  ${t?"border-t border-line-default":""}
478
480
  bg-surface-subtle
479
481
  ${s}
480
- `,style:a},o),{children:r}))}function vo(d){var f=d,{id:e,title:t,icon:r,actions:s,collapsible:a=!0,defaultCollapsed:o=!1,children:i,className:c=""}=f,u=O(f,["id","title","icon","actions","collapsible","defaultCollapsed","children","className"]);var N;const{collapsed:p,activeGroup:m,setActiveGroup:h}=Yt(),{groupStates:x,toggleGroup:v,setGroupCollapsed:y}=ct(),{animationDuration:g}=lt(),j=l.useRef(!1);if(l.useEffect(()=>{!j.current&&x[e]===void 0&&(j.current=!0,y(e,o))},[e,o,x,y]),p)return null;const C=(N=x[e])!=null?N:o,b=m===e,k=()=>{h(e),a&&v(e)};return n.jsxs("div",P(T({className:`
482
+ `,style:a},o),{children:r}))}function vo(d){var f=d,{id:e,title:t,icon:r,actions:s,collapsible:a=!0,defaultCollapsed:o=!1,children:i,className:c=""}=f,u=O(f,["id","title","icon","actions","collapsible","defaultCollapsed","children","className"]);var N;const{collapsed:p,activeGroup:m,setActiveGroup:h}=Yt(),{groupStates:x,toggleGroup:v,setGroupCollapsed:y}=ct(),{animationDuration:b}=lt(),j=l.useRef(!1);if(l.useEffect(()=>{!j.current&&x[e]===void 0&&(j.current=!0,y(e,o))},[e,o,x,y]),p)return null;const $=(N=x[e])!=null?N:o,g=m===e,k=()=>{h(e),a&&v(e)};return n.jsxs("div",z(T({className:`
481
483
  border-b
482
484
  border-line-default
483
485
  last:border-b-0
@@ -492,22 +494,22 @@ React keys must be passed directly to JSX without using spread:
492
494
  text-left
493
495
  transition-colors
494
496
  duration-150
495
- ${b?"bg-surface-active":"hover:bg-surface-active"}
497
+ ${g?"bg-surface-active":"hover:bg-surface-active"}
496
498
  ${a?"cursor-pointer":"cursor-default"}
497
- `,"aria-expanded":a?!C:void 0,"aria-controls":a?`sidebar-group-${e}`:void 0,children:[n.jsxs("div",{className:"flex items-center gap-2",children:[r&&n.jsx("span",{className:"w-4 h-4 text-fg-tertiary",children:r}),n.jsx("span",{className:"text-sm font-medium text-fg-secondary",children:t})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[s,a&&n.jsx(ChevronDown,{className:`
499
+ `,"aria-expanded":a?!$:void 0,"aria-controls":a?`sidebar-group-${e}`:void 0,children:[n.jsxs("div",{className:"flex items-center gap-2",children:[r&&n.jsx("span",{className:"w-4 h-4 text-fg-tertiary",children:r}),n.jsx("span",{className:"text-sm font-medium text-fg-secondary",children:t})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[s,a&&n.jsx(ChevronDown,{className:`
498
500
  w-4
499
501
  h-4
500
502
  text-fg-tertiary
501
503
  transition-transform
502
- ${C?"-rotate-90":"rotate-0"}
503
- `,style:{transitionDuration:`${g}ms`},"aria-hidden":"true"})]})]}),a?n.jsx(xa,{open:!C,duration:g,children:n.jsx("div",{id:`sidebar-group-${e}`,className:"px-3 py-2",children:i})}):n.jsx("div",{className:"px-3 py-2",children:i})]}))}function yo({id:e,children:t}){const{activeSlot:r,registerSlot:s,unregisterSlot:a}=Ks();return l.useEffect(()=>(s(e,t),()=>a(e)),[e,t,s,a]),r!==e?null:n.jsx(n.Fragment,{children:t})}function wo({fallback:e=null}){const{activeSlot:t,slots:r}=Ks();return!t||!r.has(t)?n.jsx(n.Fragment,{children:e}):n.jsx(n.Fragment,{children:r.get(t)})}function dt(a){var o=a,{children:e,className:t="",style:r}=o,s=O(o,["children","className","style"]);const i=ct(),c=lt(),u=l.useRef(null),[d,f]=l.useState(0),[p,m]=l.useState(!1),[h,x]=l.useState(!1),[v,y]=l.useState(null),g=l.useCallback(()=>m(!0),[]),j=l.useCallback(()=>m(!1),[]),C=l.useCallback(()=>x(!0),[]),b=l.useCallback(()=>x(!1),[]),k=l.useMemo(()=>({collapsed:i.collapsed,currentWidth:i.currentWidth,isMobile:i.isMobile,sidebarRef:u,scrollPosition:d,setScrollPosition:f,hasHeader:p,hasFooter:h,registerHeader:g,unregisterHeader:j,registerFooter:C,unregisterFooter:b,activeGroup:v,setActiveGroup:y}),[i.collapsed,i.currentWidth,i.isMobile,d,p,h,g,j,C,b,v]),N=br(c.contentWidth),_=br(c.navigationWidth),S=N-_;return n.jsx(Or.Provider,{value:k,children:n.jsx("div",P(T({ref:u,className:w("flex","flex-col","h-full","bg-surface-subtle","border-r","border-line-default","overflow-hidden",t),style:T({width:i.collapsed?0:S,opacity:i.collapsed?0:1,visibility:i.collapsed?"hidden":"visible",transitionProperty:"width, opacity, visibility",transitionDuration:`${c.animationDuration}ms`,transitionTimingFunction:c.animationEasing},r),"aria-hidden":i.collapsed},s),{children:e}))})}dt.Header=bo;dt.Content=go;dt.Footer=xo;dt.Group=vo;dt.Slot=yo;dt.SlotContent=wo;function Ee(M){var L=M,{mode:e="full",variant:t="default",navigationWidth:r="56px",width:s="320px",animationDuration:a=300,resizable:o=!1,minWidth:i,maxWidth:c,snapPoints:u,responsive:d=!1,mobileBreakpoint:f=768,mobileVariant:p="collapse",overlayBackdrop:m=!0,storageKey:h,persistWidth:x=!1,defaultCollapsed:v=!1,collapsed:y,onCollapseChange:g,onWidthChange:j,onMobileChange:C,exclusiveGroups:b=!1,showToggle:k=!0,togglePosition:N="floating",children:_}=L,S=O(L,["mode","variant","navigationWidth","width","animationDuration","resizable","minWidth","maxWidth","snapPoints","responsive","mobileBreakpoint","mobileVariant","overlayBackdrop","storageKey","persistWidth","defaultCollapsed","collapsed","onCollapseChange","onWidthChange","onMobileChange","exclusiveGroups","showToggle","togglePosition","children"]);const R=l.useMemo(()=>({showMainToggle:k,mainTogglePosition:N}),[k,N]);return n.jsx(_r.Provider,{value:R,children:n.jsx(qs,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,mode:e,resizable:o,minWidth:i,maxWidth:c,snapPoints:u,responsive:d,mobileBreakpoint:f,mobileVariant:p,overlayBackdrop:m,storageKey:h,persistWidth:x,defaultCollapsed:v,collapsed:y,onCollapseChange:g,onWidthChange:j,onMobileChange:C,exclusiveGroups:b,children:n.jsx(uo,P(T({},S),{children:_}))})})}Ee.Navbar=yt;Ee.Sidebar=dt;Ee.Toggle=Qs;Ee.ResizeHandle=Xs;Ee.Backdrop=Js;Ee.Provider=qs;Ee.ThemeProvider=Hs;Ee.ConfigProvider=Bs;Ee.StateProvider=Us;Ee.SlotProvider=co;function Bd({defaultStates:e={},persist:t=!1,storageKey:r}={}){const s=()=>{if(t&&r&&typeof window!="undefined"){const d=localStorage.getItem(`${r}-groups`);if(d)try{const f=JSON.parse(d);return T(T({},e),f)}catch(f){}}return e},[a,o]=l.useState(s);l.useEffect(()=>{t&&r&&typeof window!="undefined"&&localStorage.setItem(`${r}-groups`,JSON.stringify(a))},[t,r,a]);const i=l.useCallback(d=>{o(f=>P(T({},f),{[d]:!f[d]}))},[]),c=l.useCallback((d,f)=>{o(p=>P(T({},p),{[d]:f}))},[]),u=l.useCallback(()=>{o(e)},[e]);return{groupStates:a,toggleGroup:i,setGroupCollapsed:c,resetGroups:u}}function Ud(){const{activeItem:e,setActiveItem:t}=zr(),r=Gs(),s=l.useCallback((a,o)=>{t(a),o&&(r!=null&&r.setActiveSlot)&&r.setActiveSlot(o)},[t,r]);return{activeItem:e,setActiveItem:t,navigate:s}}function qd(){var r,s,a,o;const e=Gs(),t=ho();return{activeSlot:(r=e==null?void 0:e.activeSlot)!=null?r:null,setActiveSlot:(s=e==null?void 0:e.setActiveSlot)!=null?s:(()=>{}),scrollPosition:(a=t==null?void 0:t.scrollPosition)!=null?a:0,setScrollPosition:(o=t==null?void 0:t.setScrollPosition)!=null?o:(()=>{})}}function Gd(){const e=useSideNavbarThemeRequired(),t=useSideNavbarConfigRequired(),r=useSideNavbarStateRequired();return{theme:e,config:t,state:r}}function ko({children:e,asChild:t=!1}){const{onOpenChange:r}=Lt();return t&&l.isValidElement(e)?l.cloneElement(e,{onClick:s=>{r(!0),e.props.onClick&&e.props.onClick(s)}}):n.jsx("button",{type:"button",onClick:()=>r(!0),"aria-haspopup":"dialog",children:e})}function Zs(i){var c=i,{children:e,size:t="md",closeOnOverlayClick:r=!0,closeOnEscape:s=!0,className:a=""}=c,o=O(c,["children","size","closeOnOverlayClick","closeOnEscape","className"]);const{isOpen:u,onClose:d,titleId:f,descriptionId:p}=Lt(),m=l.useRef(null),h=l.useRef(null);if(l.useEffect(()=>{if(!u)return;const g=setTimeout(()=>{var N;const b=(N=m.current)==null?void 0:N.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),k=b==null?void 0:b[0];k==null||k.focus()},0),j=b=>{s&&b.key==="Escape"&&d()},C=b=>{if(b.key!=="Tab"||!m.current)return;const k=Array.from(m.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(S=>!S.disabled&&S.offsetParent!==null);if(k.length===0){b.preventDefault();return}const N=k[0],_=k[k.length-1];b.shiftKey?document.activeElement===N&&(b.preventDefault(),_.focus()):document.activeElement===_&&(b.preventDefault(),N.focus())};return document.addEventListener("keydown",j),document.addEventListener("keydown",C),()=>{clearTimeout(g),document.removeEventListener("keydown",j),document.removeEventListener("keydown",C)}},[u,d,s]),!u)return null;const x={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",fullscreen:"max-w-full h-full m-0 rounded-none"},v=g=>{r&&g.target===h.current&&d()},y=n.jsxs("div",{className:`fixed inset-0 ${ue("modal")} overflow-y-auto`,onClick:v,children:[n.jsx("div",{ref:h,className:"fixed inset-0 bg-scrim transition-opacity","aria-hidden":"true"}),n.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:n.jsx("div",P(T({ref:m,role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":p,className:`
504
+ ${$?"-rotate-90":"rotate-0"}
505
+ `,style:{transitionDuration:`${b}ms`},"aria-hidden":"true"})]})]}),a?n.jsx(xa,{open:!$,duration:b,children:n.jsx("div",{id:`sidebar-group-${e}`,className:"px-3 py-2",children:i})}):n.jsx("div",{className:"px-3 py-2",children:i})]}))}function yo({id:e,children:t}){const{activeSlot:r,registerSlot:s,unregisterSlot:a}=Ks();return l.useEffect(()=>(s(e,t),()=>a(e)),[e,t,s,a]),r!==e?null:n.jsx(n.Fragment,{children:t})}function wo({fallback:e=null}){const{activeSlot:t,slots:r}=Ks();return!t||!r.has(t)?n.jsx(n.Fragment,{children:e}):n.jsx(n.Fragment,{children:r.get(t)})}function dt(a){var o=a,{children:e,className:t="",style:r}=o,s=O(o,["children","className","style"]);const i=ct(),c=lt(),u=l.useRef(null),[d,f]=l.useState(0),[p,m]=l.useState(!1),[h,x]=l.useState(!1),[v,y]=l.useState(null),b=l.useCallback(()=>m(!0),[]),j=l.useCallback(()=>m(!1),[]),$=l.useCallback(()=>x(!0),[]),g=l.useCallback(()=>x(!1),[]),k=l.useMemo(()=>({collapsed:i.collapsed,currentWidth:i.currentWidth,isMobile:i.isMobile,sidebarRef:u,scrollPosition:d,setScrollPosition:f,hasHeader:p,hasFooter:h,registerHeader:b,unregisterHeader:j,registerFooter:$,unregisterFooter:g,activeGroup:v,setActiveGroup:y}),[i.collapsed,i.currentWidth,i.isMobile,d,p,h,b,j,$,g,v]),N=br(c.contentWidth),L=br(c.navigationWidth),S=N-L;return n.jsx(Or.Provider,{value:k,children:n.jsx("div",z(T({ref:u,className:w("flex","flex-col","h-full","bg-surface-subtle","border-r","border-line-default","overflow-hidden",t),style:T({width:i.collapsed?0:S,opacity:i.collapsed?0:1,visibility:i.collapsed?"hidden":"visible",transitionProperty:"width, opacity, visibility",transitionDuration:`${c.animationDuration}ms`,transitionTimingFunction:c.animationEasing},r),"aria-hidden":i.collapsed},s),{children:e}))})}dt.Header=bo;dt.Content=go;dt.Footer=xo;dt.Group=vo;dt.Slot=yo;dt.SlotContent=wo;function Ee(D){var R=D,{mode:e="full",variant:t="default",navigationWidth:r="56px",width:s="320px",animationDuration:a=300,resizable:o=!1,minWidth:i,maxWidth:c,snapPoints:u,responsive:d=!1,mobileBreakpoint:f=768,mobileVariant:p="collapse",overlayBackdrop:m=!0,storageKey:h,persistWidth:x=!1,defaultCollapsed:v=!1,collapsed:y,onCollapseChange:b,onWidthChange:j,onMobileChange:$,exclusiveGroups:g=!1,showToggle:k=!0,togglePosition:N="floating",children:L}=R,S=O(R,["mode","variant","navigationWidth","width","animationDuration","resizable","minWidth","maxWidth","snapPoints","responsive","mobileBreakpoint","mobileVariant","overlayBackdrop","storageKey","persistWidth","defaultCollapsed","collapsed","onCollapseChange","onWidthChange","onMobileChange","exclusiveGroups","showToggle","togglePosition","children"]);const M=l.useMemo(()=>({showMainToggle:k,mainTogglePosition:N}),[k,N]);return n.jsx(_r.Provider,{value:M,children:n.jsx(qs,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,mode:e,resizable:o,minWidth:i,maxWidth:c,snapPoints:u,responsive:d,mobileBreakpoint:f,mobileVariant:p,overlayBackdrop:m,storageKey:h,persistWidth:x,defaultCollapsed:v,collapsed:y,onCollapseChange:b,onWidthChange:j,onMobileChange:$,exclusiveGroups:g,children:n.jsx(uo,z(T({},S),{children:L}))})})}Ee.Navbar=yt;Ee.Sidebar=dt;Ee.Toggle=Qs;Ee.ResizeHandle=Xs;Ee.Backdrop=Js;Ee.Provider=qs;Ee.ThemeProvider=Hs;Ee.ConfigProvider=Us;Ee.StateProvider=Bs;Ee.SlotProvider=co;function Ud({defaultStates:e={},persist:t=!1,storageKey:r}={}){const s=()=>{if(t&&r&&typeof window!="undefined"){const d=localStorage.getItem(`${r}-groups`);if(d)try{const f=JSON.parse(d);return T(T({},e),f)}catch(f){}}return e},[a,o]=l.useState(s);l.useEffect(()=>{t&&r&&typeof window!="undefined"&&localStorage.setItem(`${r}-groups`,JSON.stringify(a))},[t,r,a]);const i=l.useCallback(d=>{o(f=>z(T({},f),{[d]:!f[d]}))},[]),c=l.useCallback((d,f)=>{o(p=>z(T({},p),{[d]:f}))},[]),u=l.useCallback(()=>{o(e)},[e]);return{groupStates:a,toggleGroup:i,setGroupCollapsed:c,resetGroups:u}}function Bd(){const{activeItem:e,setActiveItem:t}=zr(),r=Gs(),s=l.useCallback((a,o)=>{t(a),o&&(r!=null&&r.setActiveSlot)&&r.setActiveSlot(o)},[t,r]);return{activeItem:e,setActiveItem:t,navigate:s}}function qd(){var r,s,a,o;const e=Gs(),t=ho();return{activeSlot:(r=e==null?void 0:e.activeSlot)!=null?r:null,setActiveSlot:(s=e==null?void 0:e.setActiveSlot)!=null?s:(()=>{}),scrollPosition:(a=t==null?void 0:t.scrollPosition)!=null?a:0,setScrollPosition:(o=t==null?void 0:t.setScrollPosition)!=null?o:(()=>{})}}function Gd(){const e=useSideNavbarThemeRequired(),t=useSideNavbarConfigRequired(),r=useSideNavbarStateRequired();return{theme:e,config:t,state:r}}function ko({children:e,asChild:t=!1}){const{onOpenChange:r}=Ft();return t&&l.isValidElement(e)?l.cloneElement(e,{onClick:s=>{r(!0),e.props.onClick&&e.props.onClick(s)}}):n.jsx("button",{type:"button",onClick:()=>r(!0),"aria-haspopup":"dialog",children:e})}function Zs(i){var c=i,{children:e,size:t="md",closeOnOverlayClick:r=!0,closeOnEscape:s=!0,className:a=""}=c,o=O(c,["children","size","closeOnOverlayClick","closeOnEscape","className"]);const{isOpen:u,onClose:d,titleId:f,descriptionId:p}=Ft(),m=l.useRef(null),h=l.useRef(null);if(l.useEffect(()=>{if(!u)return;const b=setTimeout(()=>{var N;const g=(N=m.current)==null?void 0:N.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),k=g==null?void 0:g[0];k==null||k.focus()},0),j=g=>{s&&g.key==="Escape"&&d()},$=g=>{if(g.key!=="Tab"||!m.current)return;const k=Array.from(m.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(S=>!S.disabled&&S.offsetParent!==null);if(k.length===0){g.preventDefault();return}const N=k[0],L=k[k.length-1];g.shiftKey?document.activeElement===N&&(g.preventDefault(),L.focus()):document.activeElement===L&&(g.preventDefault(),N.focus())};return document.addEventListener("keydown",j),document.addEventListener("keydown",$),()=>{clearTimeout(b),document.removeEventListener("keydown",j),document.removeEventListener("keydown",$)}},[u,d,s]),!u)return null;const x={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",fullscreen:"max-w-full h-full m-0 rounded-none"},v=b=>{r&&b.target===h.current&&d()},y=n.jsxs("div",{className:`fixed inset-0 ${ue("modal")} overflow-y-auto`,onClick:v,children:[n.jsx("div",{ref:h,className:"fixed inset-0 bg-scrim transition-opacity","aria-hidden":"true"}),n.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:n.jsx("div",z(T({ref:m,role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":p,className:`
504
506
  relative ${ue("modal")} w-full
505
507
  ${x[t]}
506
508
  bg-surface-overlay
507
509
  ${J("lg")}
508
510
  ${$e("xl")}
509
511
  ${a}
510
- `,tabIndex:-1},o),{children:e}))})]});return typeof window!="undefined"?qe.createPortal(y,document.body):y}function en(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",P(T({className:`flex flex-col space-y-1.5 p-6 pb-4 ${t}`},r),{children:e}))}function jo(o){var i=o,{as:e="h2",children:t,className:r="",id:s}=i,a=O(i,["as","children","className","id"]);const c=Lt(),u=l.useId(),d=s||c.titleId||u;return n.jsx(e,P(T({id:d,className:`${ce("h3")} font-semibold leading-none tracking-tight ${r}`},a),{children:t}))}function No(a){var o=a,{children:e,className:t="",id:r}=o,s=O(o,["children","className","id"]);const i=Lt(),c=l.useId(),u=r||i.descriptionId||c;return n.jsx("p",P(T({id:u,className:`${ce("bodySmall")} text-fg-secondary ${t}`},s),{children:e}))}function tn(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",P(T({className:`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 p-6 pt-4 ${t}`},r),{children:e}))}function So({"aria-label":e="Close dialog",className:t="",asChild:r=!1,children:s}){const{onClose:a}=Lt();return r&&l.isValidElement(s)?l.cloneElement(s,{onClick:o=>{a(),s.props.onClick&&s.props.onClick(o)}}):n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:a,className:`absolute right-4 top-4 ${t}`,"aria-label":e,children:n.jsx(Ne,{className:"h-4 w-4"})})}function Re({children:e,open:t,defaultOpen:r,onOpenChange:s}){const a=l.useId(),o=l.useId();return n.jsx(ps,{open:t,defaultOpen:r,onOpenChange:s,titleId:a,descriptionId:o,children:e})}Re.Trigger=ko;Re.Content=Zs;Re.Header=en;Re.Title=jo;Re.Description=No;Re.Footer=tn;Re.Close=So;function Kd({open:e,defaultOpen:t,onOpenChange:r,title:s,description:a,confirmLabel:o="Confirm",cancelLabel:i="Cancel",variant:c="default",onConfirm:u,onCancel:d,children:f}){const p=()=>{u==null||u(),r==null||r(!1)},m=()=>{d==null||d(),r==null||r(!1)};return n.jsx(Re,{open:e,defaultOpen:t,onOpenChange:r,children:n.jsx(Zs,{size:"sm",closeOnOverlayClick:!1,children:f||n.jsxs(n.Fragment,{children:[n.jsxs(en,{children:[n.jsx(Re.Title,{children:s}),a&&n.jsx(Re.Description,{children:a})]}),n.jsxs(tn,{children:[n.jsx(Z,{variant:"outline",onClick:m,children:i}),n.jsx(Z,{variant:c==="destructive"?"error":"primary",onClick:p,children:o})]})]})})})}const Yd={success:dr,error:bs,warning:mc,info:rc},Xd={success:"border-success",error:"border-error",warning:"border-warning",info:"border-info"},Jd={success:"text-fg-success",error:"text-fg-error",warning:"text-fg-warning",info:"text-fg-info"};function Co(i){var c=i,{toast:e,onDismiss:t,position:r="top-right",className:s="",style:a}=c,o=O(c,["toast","onDismiss","position","className","style"]);const[u,d]=l.useState(!1),[f,p]=l.useState(!1),m=Yd[e.variant];l.useEffect(()=>{if(e.duration===void 0)return;d(!0);const v=setTimeout(()=>{p(!0),setTimeout(()=>{t(e.id)},300)},e.duration);return()=>clearTimeout(v)},[e.duration,e.id,t]),l.useEffect(()=>{const v=setTimeout(()=>d(!0),10);return()=>clearTimeout(v)},[]);const h={"top-right":"top-4 right-4","top-left":"top-4 left-4","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","bottom-center":"bottom-4 left-1/2 -translate-x-1/2"},x=()=>{p(!0),setTimeout(()=>{t(e.id)},300)};return n.jsx("div",P(T({className:`
512
+ `,tabIndex:-1},o),{children:e}))})]});return typeof window!="undefined"?qe.createPortal(y,document.body):y}function en(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",z(T({className:`flex flex-col space-y-1.5 p-6 pb-4 ${t}`},r),{children:e}))}function jo(o){var i=o,{as:e="h2",children:t,className:r="",id:s}=i,a=O(i,["as","children","className","id"]);const c=Ft(),u=l.useId(),d=s||c.titleId||u;return n.jsx(e,z(T({id:d,className:`${ce("h3")} font-semibold leading-none tracking-tight ${r}`},a),{children:t}))}function No(a){var o=a,{children:e,className:t="",id:r}=o,s=O(o,["children","className","id"]);const i=Ft(),c=l.useId(),u=r||i.descriptionId||c;return n.jsx("p",z(T({id:u,className:`${ce("bodySmall")} text-fg-secondary ${t}`},s),{children:e}))}function tn(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",z(T({className:`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 p-6 pt-4 ${t}`},r),{children:e}))}function So({"aria-label":e="Close dialog",className:t="",asChild:r=!1,children:s}){const{onClose:a}=Ft();return r&&l.isValidElement(s)?l.cloneElement(s,{onClick:o=>{a(),s.props.onClick&&s.props.onClick(o)}}):n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:a,className:`absolute right-4 top-4 ${t}`,"aria-label":e,children:n.jsx(Ne,{className:"h-4 w-4"})})}function Re({children:e,open:t,defaultOpen:r,onOpenChange:s}){const a=l.useId(),o=l.useId();return n.jsx(ps,{open:t,defaultOpen:r,onOpenChange:s,titleId:a,descriptionId:o,children:e})}Re.Trigger=ko;Re.Content=Zs;Re.Header=en;Re.Title=jo;Re.Description=No;Re.Footer=tn;Re.Close=So;function Kd({open:e,defaultOpen:t,onOpenChange:r,title:s,description:a,confirmLabel:o="Confirm",cancelLabel:i="Cancel",variant:c="default",onConfirm:u,onCancel:d,children:f}){const p=()=>{u==null||u(),r==null||r(!1)},m=()=>{d==null||d(),r==null||r(!1)};return n.jsx(Re,{open:e,defaultOpen:t,onOpenChange:r,children:n.jsx(Zs,{size:"sm",closeOnOverlayClick:!1,children:f||n.jsxs(n.Fragment,{children:[n.jsxs(en,{children:[n.jsx(Re.Title,{children:s}),a&&n.jsx(Re.Description,{children:a})]}),n.jsxs(tn,{children:[n.jsx(Z,{variant:"outline",onClick:m,children:i}),n.jsx(Z,{variant:c==="destructive"?"error":"primary",onClick:p,children:o})]})]})})})}const Yd={success:dr,error:bs,warning:mc,info:rc},Xd={success:"border-success",error:"border-error",warning:"border-warning",info:"border-info"},Jd={success:"text-fg-success",error:"text-fg-error",warning:"text-fg-warning",info:"text-fg-info"};function Co(i){var c=i,{toast:e,onDismiss:t,position:r="top-right",className:s="",style:a}=c,o=O(c,["toast","onDismiss","position","className","style"]);const[u,d]=l.useState(!1),[f,p]=l.useState(!1),m=Yd[e.variant];l.useEffect(()=>{if(e.duration===void 0)return;d(!0);const v=setTimeout(()=>{p(!0),setTimeout(()=>{t(e.id)},300)},e.duration);return()=>clearTimeout(v)},[e.duration,e.id,t]),l.useEffect(()=>{const v=setTimeout(()=>d(!0),10);return()=>clearTimeout(v)},[]);const h={"top-right":"top-4 right-4","top-left":"top-4 left-4","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","bottom-center":"bottom-4 left-1/2 -translate-x-1/2"},x=()=>{p(!0),setTimeout(()=>{t(e.id)},300)};return n.jsx("div",z(T({className:`
511
513
  fixed ${h[r]} ${ue("toast")}
512
514
  w-full max-w-sm
513
515
  transition-all duration-300 ease-in-out
@@ -522,7 +524,7 @@ React keys must be passed directly to JSX without using spread:
522
524
  ${$e("lg")}
523
525
  border
524
526
  ${Xd[e.variant]}
525
- `,children:[n.jsx("div",{className:`flex-shrink-0 ${Jd[e.variant]}`,children:n.jsx(m,{className:"h-5 w-5","aria-hidden":"true"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"font-medium text-fg-primary",children:e.title}),e.description&&n.jsx("div",{className:"mt-1 text-sm text-fg-secondary",children:e.description}),e.action&&n.jsx("div",{className:"mt-3",children:n.jsx(Z,{variant:"outline",size:"sm",onClick:()=>{var v;(v=e.action)==null||v.onClick(),x()},children:e.action.label})})]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:x,className:"flex-shrink-0","aria-label":"Dismiss notification",children:n.jsx(Ne,{className:"h-4 w-4"})})]})}))}function Qd({position:e="top-right",maxToasts:t}){const{toasts:r,removeToast:s}=ms(),a=t?r.slice(0,t):r;if(a.length===0)return null;const o=n.jsx("div",{className:`fixed inset-0 pointer-events-none ${ue("toast")}`,"aria-live":"polite","aria-label":"Notifications",children:a.map((i,c)=>{const u=e.includes("top"),d=1+c*5;return n.jsx(Co,{toast:i,onDismiss:s,position:e,style:{[u?"top":"bottom"]:`${d}rem`}},i.id)})});return typeof window!="undefined"?qe.createPortal(o,document.body):o}function Zd(){const{addToast:e,removeToast:t,clearAll:r}=ms(),s=l.useCallback(d=>e({title:d.title,description:d.description,variant:d.variant||"info",duration:d.duration,action:d.action}),[e]),a=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"success"},p)),[s]),o=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"error"},p)),[s]),i=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"warning"},p)),[s]),c=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"info"},p)),[s]),u=l.useCallback((d,f,p,m="info",h)=>s({title:d,description:f,variant:m,duration:h,action:{label:"Undo",onClick:p}}),[s]);return{show:s,success:a,error:o,warning:i,info:c,withUndo:u,dismiss:t,clearAll:r}}function $o({steps:e,currentStep:t,defaultCurrentStep:r=0,onStepChange:s,onComplete:a,allowNavigation:o=!0,showStepNumbers:i=!0,orientation:c="horizontal",className:u=""}){const[d,f]=l.useState(r),p=t!==void 0,m=p?t:d,h=b=>b<m?"completed":b===m?"active":"pending",x=()=>{if(m<e.length-1){const b=m+1;p||f(b),s==null||s(b)}else a==null||a()},v=()=>{if(m>0){const b=m-1;p||f(b),s==null||s(b)}},y=b=>{o&&(e[b].disabled||(p||f(b),s==null||s(b)))},g=e[m],j=m===0,C=m===e.length-1;return c==="vertical"?n.jsxs("div",{className:`flex gap-4 ${u}`,children:[n.jsx("div",{className:"flex flex-col",children:e.map((b,k)=>{const N=b.status||h(k),_=k===m;return n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("button",P(T({type:"button",onClick:()=>y(k),disabled:!o||b.disabled,"aria-label":b.title?`Step ${k+1}: ${b.title}`:`Step ${k+1}`},N==="pending"?{"data-marker":"pending"}:{}),{className:`
527
+ `,children:[n.jsx("div",{className:`flex-shrink-0 ${Jd[e.variant]}`,children:n.jsx(m,{className:"h-5 w-5","aria-hidden":"true"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"font-medium text-fg-primary",children:e.title}),e.description&&n.jsx("div",{className:"mt-1 text-sm text-fg-secondary",children:e.description}),e.action&&n.jsx("div",{className:"mt-3",children:n.jsx(Z,{variant:"outline",size:"sm",onClick:()=>{var v;(v=e.action)==null||v.onClick(),x()},children:e.action.label})})]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:x,className:"flex-shrink-0","aria-label":"Dismiss notification",children:n.jsx(Ne,{className:"h-4 w-4"})})]})}))}function Qd({position:e="top-right",maxToasts:t}){const{toasts:r,removeToast:s}=ms(),a=t?r.slice(0,t):r;if(a.length===0)return null;const o=n.jsx("div",{className:`fixed inset-0 pointer-events-none ${ue("toast")}`,"aria-live":"polite","aria-label":"Notifications",children:a.map((i,c)=>{const u=e.includes("top"),d=1+c*5;return n.jsx(Co,{toast:i,onDismiss:s,position:e,style:{[u?"top":"bottom"]:`${d}rem`}},i.id)})});return typeof window!="undefined"?qe.createPortal(o,document.body):o}function Zd(){const{addToast:e,removeToast:t,clearAll:r}=ms(),s=l.useCallback(d=>e({title:d.title,description:d.description,variant:d.variant||"info",duration:d.duration,action:d.action}),[e]),a=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"success"},p)),[s]),o=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"error"},p)),[s]),i=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"warning"},p)),[s]),c=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"info"},p)),[s]),u=l.useCallback((d,f,p,m="info",h)=>s({title:d,description:f,variant:m,duration:h,action:{label:"Undo",onClick:p}}),[s]);return{show:s,success:a,error:o,warning:i,info:c,withUndo:u,dismiss:t,clearAll:r}}function $o({steps:e,currentStep:t,defaultCurrentStep:r=0,onStepChange:s,onComplete:a,allowNavigation:o=!0,showStepNumbers:i=!0,orientation:c="horizontal",className:u=""}){const[d,f]=l.useState(r),p=t!==void 0,m=p?t:d,h=g=>g<m?"completed":g===m?"active":"pending",x=()=>{if(m<e.length-1){const g=m+1;p||f(g),s==null||s(g)}else a==null||a()},v=()=>{if(m>0){const g=m-1;p||f(g),s==null||s(g)}},y=g=>{o&&(e[g].disabled||(p||f(g),s==null||s(g)))},b=e[m],j=m===0,$=m===e.length-1;return c==="vertical"?n.jsxs("div",{className:`flex gap-4 ${u}`,children:[n.jsx("div",{className:"flex flex-col",children:e.map((g,k)=>{const N=g.status||h(k),L=k===m;return n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("button",z(T({type:"button",onClick:()=>y(k),disabled:!o||g.disabled,"aria-label":g.title?`Step ${k+1}: ${g.title}`:`Step ${k+1}`},N==="pending"?{"data-marker":"pending"}:{}),{className:`
526
528
  flex
527
529
  items-center
528
530
  justify-center
@@ -532,24 +534,24 @@ React keys must be passed directly to JSX without using spread:
532
534
  border-2
533
535
  ${be("base")}
534
536
  ${N==="completed"?"bg-success border-success text-fg-inverse":N==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":N==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
535
- ${!o||b.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
537
+ ${!o||g.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
536
538
  `,children:N==="completed"?n.jsx(ns,{className:"h-5 w-5"}):i?k+1:null})),k<e.length-1&&n.jsx("div",{className:`
537
539
  w-0.5
538
540
  h-12
539
541
  mt-2
540
542
  ${N==="completed"?"bg-success":"bg-line-emphasis"}
541
- `})]}),n.jsxs("div",{className:"flex-1 pb-8",children:[n.jsx("button",{type:"button",onClick:()=>y(k),disabled:!o||b.disabled,className:`
543
+ `})]}),n.jsxs("div",{className:"flex-1 pb-8",children:[n.jsx("button",{type:"button",onClick:()=>y(k),disabled:!o||g.disabled,className:`
542
544
  text-left
543
- ${_?"font-semibold":"font-medium"}
545
+ ${L?"font-semibold":"font-medium"}
544
546
  ${N==="active"?"text-fg-brand-emphasis":"text-fg-secondary"}
545
- ${!o||b.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
546
- `,children:b.title}),b.description&&n.jsx("p",{className:"text-sm text-fg-tertiary mt-1",children:b.description})]})]},b.id)})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:`
547
+ ${!o||g.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
548
+ `,children:g.title}),g.description&&n.jsx("p",{className:"text-sm text-fg-tertiary mt-1",children:g.description})]})]},g.id)})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:`
547
549
  ${E("lg","p")}
548
550
  border
549
551
  border-line-default
550
552
  ${J("lg")}
551
553
  bg-surface-base
552
- `,children:g.content}),n.jsxs("div",{className:`flex justify-between mt-4 ${E("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:v,disabled:j,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:C?"Complete":"Next"})]})]})]}):n.jsxs("div",{className:`space-y-6 ${u}`,children:[n.jsx("div",{className:"flex items-center",children:e.map((b,k)=>{const N=b.status||h(k),_=k===m;return n.jsxs("div",{className:"flex items-center flex-1",children:[n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("button",P(T({type:"button",onClick:()=>y(k),disabled:!o||b.disabled,"aria-label":b.title?`Step ${k+1}: ${b.title}`:`Step ${k+1}`},N==="pending"?{"data-marker":"pending"}:{}),{className:`
554
+ `,children:b.content}),n.jsxs("div",{className:`flex justify-between mt-4 ${E("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:v,disabled:j,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:$?"Complete":"Next"})]})]})]}):n.jsxs("div",{className:`space-y-6 ${u}`,children:[n.jsx("div",{className:"flex items-center",children:e.map((g,k)=>{const N=g.status||h(k),L=k===m;return n.jsxs("div",{className:"flex items-center flex-1",children:[n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("button",z(T({type:"button",onClick:()=>y(k),disabled:!o||g.disabled,"aria-label":g.title?`Step ${k+1}: ${g.title}`:`Step ${k+1}`},N==="pending"?{"data-marker":"pending"}:{}),{className:`
553
555
  flex
554
556
  items-center
555
557
  justify-center
@@ -559,20 +561,20 @@ React keys must be passed directly to JSX without using spread:
559
561
  border-2
560
562
  ${be("base")}
561
563
  ${N==="completed"?"bg-success border-success text-fg-inverse":N==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":N==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
562
- ${!o||b.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
564
+ ${!o||g.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
563
565
  `,children:N==="completed"?n.jsx(ns,{className:"h-5 w-5"}):i?k+1:null})),n.jsxs("div",{className:`mt-2 text-center ${E("sm","px")}`,children:[n.jsx("p",{className:`
564
566
  text-sm
565
567
  font-medium
566
- ${_?"text-fg-brand-emphasis":"text-fg-secondary"}
567
- `,children:b.title}),b.description&&n.jsx("p",{className:"text-xs text-fg-tertiary mt-1",children:b.description})]})]}),k<e.length-1&&n.jsx("div",{className:`flex-1 mx-2 ${E("base","mx")}`,children:n.jsx(ys,{className:`
568
+ ${L?"text-fg-brand-emphasis":"text-fg-secondary"}
569
+ `,children:g.title}),g.description&&n.jsx("p",{className:"text-xs text-fg-tertiary mt-1",children:g.description})]})]}),k<e.length-1&&n.jsx("div",{className:`flex-1 mx-2 ${E("base","mx")}`,children:n.jsx(ys,{className:`
568
570
  ${N==="completed"?"border-success":"border-line-emphasis"}
569
- `})})]},b.id)})}),n.jsx("div",{className:`
571
+ `})})]},g.id)})}),n.jsx("div",{className:`
570
572
  ${E("lg","p")}
571
573
  border
572
574
  border-line-default
573
575
  ${J("lg")}
574
576
  bg-surface-base
575
- `,children:g.content}),n.jsxs("div",{className:`flex justify-between ${E("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:v,disabled:j,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:C?"Complete":"Next"})]})]})}function eu({items:e,orientation:t="vertical",className:r=""}){return t==="horizontal"?n.jsx("div",{className:`flex items-start ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(c=>c.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsx("div",{className:"flex items-start flex-1",children:n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("div",P(T({},o==="default"?{"data-marker":"pending"}:{}),{className:`
577
+ `,children:b.content}),n.jsxs("div",{className:`flex justify-between ${E("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:v,disabled:j,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:$?"Complete":"Next"})]})]})}function eu({items:e,orientation:t="vertical",className:r=""}){return t==="horizontal"?n.jsx("div",{className:`flex items-start ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(c=>c.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsx("div",{className:"flex items-start flex-1",children:n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("div",z(T({},o==="default"?{"data-marker":"pending"}:{}),{className:`
576
578
  flex
577
579
  items-center
578
580
  justify-center
@@ -586,7 +588,7 @@ React keys must be passed directly to JSX without using spread:
586
588
  h-0.5
587
589
  mt-2
588
590
  ${o==="completed"?"bg-success":"bg-line-emphasis"}
589
- `}),n.jsxs("div",{className:`mt-4 text-center ${E("base","px")}`,children:[s.timestamp&&n.jsx("p",{className:"text-xs text-fg-tertiary mb-1",children:s.timestamp}),n.jsx("h3",{className:"text-sm font-semibold text-fg-primary",children:s.title}),s.description&&n.jsx("p",{className:"text-xs text-fg-secondary mt-1",children:s.description}),s.content&&n.jsx("div",{className:"mt-2",children:s.content})]})]})},s.id)})}):n.jsx("div",{className:`space-y-0 ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(c=>c.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsxs("div",{className:"flex items-start gap-4",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("div",P(T({},o==="default"?{"data-marker":"pending"}:{}),{className:`
591
+ `}),n.jsxs("div",{className:`mt-4 text-center ${E("base","px")}`,children:[s.timestamp&&n.jsx("p",{className:"text-xs text-fg-tertiary mb-1",children:s.timestamp}),n.jsx("h3",{className:"text-sm font-semibold text-fg-primary",children:s.title}),s.description&&n.jsx("p",{className:"text-xs text-fg-secondary mt-1",children:s.description}),s.content&&n.jsx("div",{className:"mt-2",children:s.content})]})]})},s.id)})}):n.jsx("div",{className:`space-y-0 ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(c=>c.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsxs("div",{className:"flex items-start gap-4",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("div",z(T({},o==="default"?{"data-marker":"pending"}:{}),{className:`
590
592
  flex
591
593
  items-center
592
594
  justify-center
@@ -605,7 +607,7 @@ React keys must be passed directly to JSX without using spread:
605
607
  text-base
606
608
  font-semibold
607
609
  ${o==="active"?"text-fg-brand-emphasis":"text-fg-primary"}
608
- `,children:s.title}),s.description&&n.jsx("p",{className:"text-sm text-fg-secondary mt-1",children:s.description}),s.content&&n.jsx("div",{className:"mt-3",children:s.content})]})]},s.id)})})}function tu({items:e,open:t,defaultOpen:r=!1,onOpenChange:s,trigger:a,placeholder:o="Type a command or search...",emptyMessage:i="No commands found",className:c=""}){const[u,d]=l.useState(r),[f,p]=l.useState(""),[m,h]=l.useState(0),x=l.useRef(null),v=l.useRef(null),y=t!==void 0,g=y?t:u,j=e.filter(S=>{var I,A;if(!f)return!0;const M=f.toLowerCase(),L=S.label.toLowerCase().includes(M),R=(I=S.description)==null?void 0:I.toLowerCase().includes(M),D=(A=S.keywords)==null?void 0:A.some(V=>V.toLowerCase().includes(M));return L||R||D}),C=j.reduce((S,M)=>{const L=M.group||"Other";return S[L]||(S[L]=[]),S[L].push(M),S},{}),b=l.useCallback(S=>{y||d(S),s==null||s(S),S&&(p(""),h(0),setTimeout(()=>{var M;return(M=x.current)==null?void 0:M.focus()},0))},[y,s]),k=S=>{S.action(),b(!1)},N=S=>{if(S.key==="Escape"){b(!1);return}if(S.key==="ArrowDown"){S.preventDefault(),h(M=>Math.min(M+1,j.length-1));return}if(S.key==="ArrowUp"){S.preventDefault(),h(M=>Math.max(M-1,0));return}if(S.key==="Enter"){S.preventDefault(),j[m]&&k(j[m]);return}};l.useEffect(()=>{if(v.current&&m>=0){const S=v.current.querySelector(`[data-index="${m}"]`);S&&typeof S.scrollIntoView=="function"&&S.scrollIntoView({block:"nearest",behavior:"smooth"})}},[m]),l.useEffect(()=>{h(0)},[f]),l.useEffect(()=>{const S=M=>{(M.metaKey||M.ctrlKey)&&M.key==="k"&&(M.preventDefault(),b(!g))};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[g,b]);const _=g?n.jsx("div",{className:`
610
+ `,children:s.title}),s.description&&n.jsx("p",{className:"text-sm text-fg-secondary mt-1",children:s.description}),s.content&&n.jsx("div",{className:"mt-3",children:s.content})]})]},s.id)})})}function tu({items:e,open:t,defaultOpen:r=!1,onOpenChange:s,trigger:a,placeholder:o="Type a command or search...",emptyMessage:i="No commands found",className:c=""}){const[u,d]=l.useState(r),[f,p]=l.useState(""),[m,h]=l.useState(0),x=l.useRef(null),v=l.useRef(null),y=t!==void 0,b=y?t:u,j=e.filter(S=>{var I,A;if(!f)return!0;const D=f.toLowerCase(),R=S.label.toLowerCase().includes(D),M=(I=S.description)==null?void 0:I.toLowerCase().includes(D),F=(A=S.keywords)==null?void 0:A.some(W=>W.toLowerCase().includes(D));return R||M||F}),$=j.reduce((S,D)=>{const R=D.group||"Other";return S[R]||(S[R]=[]),S[R].push(D),S},{}),g=l.useCallback(S=>{y||d(S),s==null||s(S),S&&(p(""),h(0),setTimeout(()=>{var D;return(D=x.current)==null?void 0:D.focus()},0))},[y,s]),k=S=>{S.action(),g(!1)},N=S=>{if(S.key==="Escape"){g(!1);return}if(S.key==="ArrowDown"){S.preventDefault(),h(D=>Math.min(D+1,j.length-1));return}if(S.key==="ArrowUp"){S.preventDefault(),h(D=>Math.max(D-1,0));return}if(S.key==="Enter"){S.preventDefault(),j[m]&&k(j[m]);return}};l.useEffect(()=>{if(v.current&&m>=0){const S=v.current.querySelector(`[data-index="${m}"]`);S&&typeof S.scrollIntoView=="function"&&S.scrollIntoView({block:"nearest",behavior:"smooth"})}},[m]),l.useEffect(()=>{h(0)},[f]),l.useEffect(()=>{const S=D=>{(D.metaKey||D.ctrlKey)&&D.key==="k"&&(D.preventDefault(),g(!b))};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[b,g]);const L=b?n.jsx("div",{className:`
609
611
  fixed
610
612
  inset-0
611
613
  ${ue("modal-backdrop")}
@@ -615,7 +617,7 @@ React keys must be passed directly to JSX without using spread:
615
617
  justify-center
616
618
  pt-[20vh]
617
619
  ${be("base")}
618
- `,onClick:()=>b(!1),children:n.jsxs("div",{className:`
620
+ `,onClick:()=>g(!1),children:n.jsxs("div",{className:`
619
621
  w-full
620
622
  max-w-2xl
621
623
  ${E("base","mx")}
@@ -646,12 +648,12 @@ React keys must be passed directly to JSX without using spread:
646
648
  max-h-96
647
649
  overflow-y-auto
648
650
  ${E("sm","py")}
649
- `,children:Object.keys(C).length===0?n.jsx("div",{className:`
651
+ `,children:Object.keys($).length===0?n.jsx("div",{className:`
650
652
  ${E("lg","p")}
651
653
  text-center
652
654
  text-sm
653
655
  text-fg-secondary
654
- `,children:i}):Object.entries(C).map(([S,M])=>n.jsxs("div",{children:[S!=="Other"&&n.jsx("div",{className:`
656
+ `,children:i}):Object.entries($).map(([S,D])=>n.jsxs("div",{children:[S!=="Other"&&n.jsx("div",{className:`
655
657
  ${E("sm","px")}
656
658
  ${E("xs","py")}
657
659
  text-xs
@@ -659,7 +661,7 @@ React keys must be passed directly to JSX without using spread:
659
661
  text-fg-tertiary
660
662
  uppercase
661
663
  tracking-wider
662
- `,children:S}),M.map((L,R)=>{const D=j.indexOf(L),I=D===m;return n.jsxs("button",{type:"button","data-index":D,onClick:()=>k(L),className:`
664
+ `,children:S}),D.map((R,M)=>{const F=j.indexOf(R),I=F===m;return n.jsxs("button",{type:"button","data-index":F,onClick:()=>k(R),className:`
663
665
  w-full
664
666
  flex
665
667
  items-center
@@ -669,14 +671,14 @@ React keys must be passed directly to JSX without using spread:
669
671
  text-left
670
672
  ${be("base")}
671
673
  ${I?"bg-surface-brand-muted":"hover:bg-surface-hover"}
672
- `,children:[L.icon&&n.jsx("div",{className:`
674
+ `,children:[R.icon&&n.jsx("div",{className:`
673
675
  ${I?"text-fg-brand-emphasis":"text-fg-secondary"}
674
- `,children:L.icon}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:`
676
+ `,children:R.icon}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:`
675
677
  text-sm
676
678
  font-medium
677
679
  ${I?"text-fg-brand-emphasis":"text-fg-primary"}
678
- `,children:L.label}),L.description&&n.jsx("div",{className:`text-xs ${I?"text-fg-secondary":"text-fg-tertiary"} ${E("0.5","mt")}`,children:L.description})]})]},L.id)})]},S))})]})}):null;return n.jsxs(n.Fragment,{children:[a?n.jsx("div",{onClick:()=>b(!0),children:a}):null,typeof window!="undefined"&&qe.createPortal(_,document.body)]})}function ru({columns:e,data:t,loading:r=!1,onSort:s,sortColumn:a,sortDirection:o,multiSort:i=!1,groups:c=[],onGroupChange:u,groupable:d=!1,resizable:f=!0,reorderable:p=!1,onColumnReorder:m,columnWidths:h,onColumnResize:x,selectable:v=!1,selectedRows:y,onSelectionChange:g,rowId:j,exportable:C=!1,onExport:b,exportFormats:k=["csv","xlsx","json"],pagination:N,filters:_,actions:S,toolbarActions:M,virtualScrolling:L=!1,virtualScrollingOptions:R,emptyMessage:D,emptyStateTitle:I,emptyStateMessage:A,emptyStateIllustration:V,emptyStateAction:Y,className:H=""}){const[W,ie]=l.useState(c),[ne,F]=l.useState(h||{}),B=l.useMemo(()=>e.map(se=>P(T({},se),{width:ne[se.key]||se.defaultWidth})),[e,ne]),K=se=>{b?b(se):se==="csv"?Q(t,e):se==="json"&&le(t)},Q=(se,z)=>{const U=z.filter(Ie=>Ie.exportable!==!1).map(Ie=>Ie.label||Ie.key),X=se.map(Ie=>z.filter(Ft=>Ft.exportable!==!1).map(Ft=>{const Me=Ie[Ft.key];return typeof Me=="string"&&Me.includes(",")?`"${Me}"`:Me})),ae=[U.join(","),...X.map(Ie=>Ie.join(","))].join(`
679
- `),fe=new Blob([ae],{type:"text/csv"}),ke=URL.createObjectURL(fe),je=document.createElement("a");je.href=ke,je.download=`export-${Date.now()}.csv`,je.click(),URL.revokeObjectURL(ke)},le=se=>{const z=JSON.stringify(se,null,2),U=new Blob([z],{type:"application/json"}),X=URL.createObjectURL(U),ae=document.createElement("a");ae.href=X,ae.download=`export-${Date.now()}.json`,ae.click(),URL.revokeObjectURL(X)};return n.jsxs("div",{className:`space-y-4 ${H}`,children:[(C||d||M)&&n.jsxs("div",{className:`
680
+ `,children:R.label}),R.description&&n.jsx("div",{className:`text-xs ${I?"text-fg-secondary":"text-fg-tertiary"} ${E("0.5","mt")}`,children:R.description})]})]},R.id)})]},S))})]})}):null;return n.jsxs(n.Fragment,{children:[a?n.jsx("div",{onClick:()=>g(!0),children:a}):null,typeof window!="undefined"&&qe.createPortal(L,document.body)]})}function ru({columns:e,data:t,loading:r=!1,onSort:s,sortColumn:a,sortDirection:o,multiSort:i=!1,groups:c=[],onGroupChange:u,groupable:d=!1,resizable:f=!0,reorderable:p=!1,onColumnReorder:m,columnWidths:h,onColumnResize:x,selectable:v=!1,selectedRows:y,onSelectionChange:b,rowId:j,exportable:$=!1,onExport:g,exportFormats:k=["csv","xlsx","json"],pagination:N,filters:L,actions:S,toolbarActions:D,virtualScrolling:R=!1,virtualScrollingOptions:M,emptyMessage:F,emptyStateTitle:I,emptyStateMessage:A,emptyStateIllustration:W,emptyStateAction:K,className:H=""}){const[U,oe]=l.useState(c),[ne,P]=l.useState(h||{}),G=l.useMemo(()=>e.map(se=>z(T({},se),{width:ne[se.key]||se.defaultWidth})),[e,ne]),Y=se=>{g?g(se):se==="csv"?Q(t,e):se==="json"&&le(t)},Q=(se,_)=>{const V=_.filter(Ie=>Ie.exportable!==!1).map(Ie=>Ie.label||Ie.key),X=se.map(Ie=>_.filter(Lt=>Lt.exportable!==!1).map(Lt=>{const Me=Ie[Lt.key];return typeof Me=="string"&&Me.includes(",")?`"${Me}"`:Me})),ae=[V.join(","),...X.map(Ie=>Ie.join(","))].join(`
681
+ `),fe=new Blob([ae],{type:"text/csv"}),ke=URL.createObjectURL(fe),je=document.createElement("a");je.href=ke,je.download=`export-${Date.now()}.csv`,je.click(),URL.revokeObjectURL(ke)},le=se=>{const _=JSON.stringify(se,null,2),V=new Blob([_],{type:"application/json"}),X=URL.createObjectURL(V),ae=document.createElement("a");ae.href=X,ae.download=`export-${Date.now()}.json`,ae.click(),URL.revokeObjectURL(X)};return n.jsxs("div",{className:`space-y-4 ${H}`,children:[($||d||D)&&n.jsxs("div",{className:`
680
682
  flex
681
683
  items-center
682
684
  justify-between
@@ -685,5 +687,5 @@ React keys must be passed directly to JSX without using spread:
685
687
  border
686
688
  border-line-default
687
689
  rounded-lg
688
- `,children:[n.jsx("div",{className:"flex items-center gap-2",children:d&&n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(El,{className:"h-4 w-4"}),children:"Group"})}),n.jsxs("div",{className:"flex items-center gap-2",children:[M,C&&n.jsx("div",{className:"flex items-center gap-1",children:k.map(se=>n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(Wl,{className:"h-4 w-4"}),onClick:()=>K(se),children:se.toUpperCase()},se))})]})]}),n.jsx(Ce,{columns:B,data:t,loading:r,onSort:s,sortColumn:a,sortDirection:o,pagination:N,filters:_,selectable:v,selectedRows:y,onSelectionChange:g,rowId:j,actions:S,resizable:f,columnWidths:ne,onColumnResize:(se,z)=>{F(U=>P(T({},U),{[se]:z})),x==null||x(se,z)},virtualScrolling:L,virtualScrollingOptions:R,emptyMessage:D,emptyStateTitle:I,emptyStateMessage:A,emptyStateIllustration:V,emptyStateAction:Y})]})}function su({columns:e,data:t,searchPlaceholder:r="Search...",enableSearch:s=!0,itemsPerPage:a=10,enablePagination:o=!0,actions:i,onRowClick:c,loading:u=!1,emptyMessage:d="No data available"}){const[f,p]=l.useState(""),[m,h]=l.useState(1),x=l.useMemo(()=>e.map(b=>{if(b.accessor||b.header){const k=b.key||(typeof b.accessor=="string"?b.accessor:String(b.accessor)),N=b.label||b.header||"";return P(T({},b),{key:k,label:N})}return b}),[e]),v=l.useMemo(()=>{if(!f.trim())return t;const b=f.toLowerCase();return t.filter(k=>x.some(N=>{const _=k[String(N.key)];return String(_).toLowerCase().includes(b)}))},[t,f,x]),y=l.useMemo(()=>{if(!o)return v;const b=(m-1)*a,k=b+a;return v.slice(b,k)},[v,m,a,o]),g=o?Math.ceil(v.length/a):1,j=b=>{h(b)},C=b=>{p(b),h(1)};return n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(At,{spacing:"md",children:[n.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s&&n.jsx("div",{className:"flex-1 max-w-md",children:n.jsx(Tr,{placeholder:r,value:f,onSearch:C})}),i&&n.jsx("div",{className:"flex gap-2",children:i})]}),n.jsx(Ce,{columns:x,data:y,loading:u,emptyMessage:d,onRowClick:c?b=>{const k=v.findIndex(N=>N===b);c(b,k>=0?k:y.findIndex(N=>N===b))}:void 0}),o&&g>1&&n.jsx("div",{className:"flex justify-center",children:n.jsx(Ta,{currentPage:m,totalPages:g,onPageChange:j})}),s&&n.jsxs("div",{className:"text-sm text-fg-secondary text-center",children:["Showing ",y.length," of ",v.length," results"]})]})})}function nu({steps:e,onComplete:t,allowBackNavigation:r=!0,showStepNumbers:s=!0}){const[a,o]=l.useState(0),[i,c]=l.useState({}),[u,d]=l.useState({}),f=()=>rr(null,null,function*(){const y=e[a];if(y.validate&&!(yield y.validate())){d(P(T({},u),{[a]:!0}));return}d(P(T({},u),{[a]:!1})),y.onSubmit&&(yield y.onSubmit(i)),a<e.length-1?o(a+1):t&&t(i)}),p=()=>{a>0&&r&&(o(a-1),d(P(T({},u),{[a-1]:!1})))},m=y=>{r&&y<a&&o(y)},h=e[a],x=a===e.length-1,v=u[a]===!0;return n.jsx(it,{maxWidth:"lg",paddingX:"base",paddingY:"lg",children:n.jsxs(At,{spacing:"lg",children:[n.jsx($o,{steps:e.map((y,g)=>({id:y.id,title:y.title,content:y.content,description:y.description,status:g<a?"completed":g===a?v?"error":"active":"pending"})),currentStep:a,onStepChange:m,allowNavigation:r}),n.jsx("div",{className:"bg-surface-base rounded-lg border p-6",children:n.jsxs(At,{spacing:"md",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-semibold",children:h.title}),h.description&&n.jsx("p",{className:"text-fg-secondary mt-1",children:h.description})]}),v&&n.jsx("div",{className:"bg-error-bg border border-error-border rounded p-3",children:n.jsx("p",{className:"text-sm text-fg-error",children:"Please fix the errors before proceeding."})}),n.jsx("div",{className:"min-h-48",children:h.fields}),n.jsxs("div",{className:"flex justify-between pt-4 border-t",children:[n.jsx(Z,{variant:"outline",onClick:p,disabled:a===0,children:"Back"}),n.jsx(Z,{variant:"primary",onClick:f,children:x?"Complete":"Next"})]})]})})]})})}function au({items:e,searchFn:t,filterFn:r,renderItem:s,filters:a=[],searchPlaceholder:o="Search...",emptyMessage:i="No results found",showResultsCount:c=!0}){const[u,d]=l.useState(""),[f,p]=l.useState({}),m=l.useMemo(()=>{let y=e;if(u.trim()&&t){const g=u.toLowerCase();y=y.filter(j=>t(g,j))}return r&&Object.keys(f).length>0&&(y=y.filter(g=>r(f,g))),y},[e,u,f,t,r]),h=(y,g)=>{p(j=>P(T({},j),{[y]:g}))},x=()=>{p({}),d("")},v=u.trim().length>0||Object.keys(f).length>0;return n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(At,{spacing:"md",children:[n.jsx(fr,{padding:"medium",children:n.jsxs(At,{spacing:"md",children:[n.jsx("div",{children:n.jsx(Tr,{placeholder:o,value:u,onSearch:d})}),a.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:a.map(y=>{var g;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(Ue,{className:"text-fg-secondary text-sm",children:[y.label,":"]}),n.jsxs("select",{className:"px-3 py-1 border rounded text-sm","aria-label":y.label,value:String(f[y.id]||""),onChange:j=>h(y.id,j.target.value||void 0),children:[n.jsx("option",{value:"",children:"All"}),(g=y.options)==null?void 0:g.map(j=>n.jsx("option",{value:String(j.value||""),children:j.label},j.id))]})]},y.id)})}),v&&n.jsx("div",{children:n.jsx(Z,{variant:"outline",size:"sm",onClick:x,children:"Clear Filters"})})]})}),c&&n.jsxs("div",{className:"text-sm text-fg-secondary",children:["Showing ",m.length," of ",e.length," results",v&&" (filtered)"]}),m.length===0?n.jsx(fr,{padding:"large",children:n.jsx("div",{className:"text-center text-fg-secondary",children:n.jsx(Ue,{children:i})})}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:m.map((y,g)=>n.jsx("div",{children:s(y,g)},g))})]})})}function ou({sidebar:e,children:t,header:r,footer:s,defaultCollapsed:a=!1,sidebarProps:o}){return n.jsxs("div",{className:"flex h-screen overflow-hidden",children:[e&&n.jsx(Ee,P(T({defaultCollapsed:a},o),{children:e})),n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r&&n.jsx("header",{className:"border-b bg-surface-base",children:n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:r})}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsx(it,{maxWidth:"xl",paddingX:"base",paddingY:"base",children:t})}),s&&n.jsx("footer",{className:"border-t bg-surface-base",children:n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:s})})]})]})}exports.AMBER=nt;exports.Accordion=hd;exports.AlertDialog=Kd;exports.AppProvider=bl;exports.Autocomplete=Oa;exports.AutocompleteList=Ar;exports.AutocompleteOption=$s;exports.Avatar=ur;exports.AvatarGroup=Mc;exports.BLUE=zn;exports.BRAND_COLORS=li;exports.BREAKPOINT_TOKENS=yr;exports.Badge=pa;exports.Breadcrumb=Ma;exports.BreakpointTokenFactory=Ct;exports.Button=Z;exports.COLOR_SCALES=Uo;exports.CYAN=tt;exports.Card=fr;exports.Checkbox=Nr;exports.Chip=ws;exports.Collapsible=xa;exports.ColorPicker=dd;exports.CommandPalette=tu;exports.ConfigProvider=ca;exports.DashboardLayout=ou;exports.DataGrid=ru;exports.DataTablePattern=su;exports.DatePicker=nd;exports.DatePickerCalendar=Cs;exports.DatePickerInput=Ss;exports.DatePickerProvider=is;exports.Dialog=Re;exports.DialogClose=So;exports.DialogContent=Zs;exports.DialogContext=kr;exports.DialogDescription=No;exports.DialogFooter=tn;exports.DialogHeader=en;exports.DialogProvider=ps;exports.DialogTitle=jo;exports.DialogTrigger=ko;exports.Drawer=Gt;exports.DrawerContent=Ms;exports.DrawerFooter=Ba;exports.DrawerHeader=Ha;exports.Dropdown=Ra;exports.EMERALD=st;exports.EmptyState=Aa;exports.ErrorMessage=ba;exports.FONT_FAMILY_TOKENS=Vo;exports.FONT_WEIGHT_TOKENS=Wo;exports.FUCHSIA=On;exports.FileUpload=ld;exports.Form=Ac;exports.FormContext=Sr;exports.FormField=Rc;exports.FormProvider=ka;exports.FormWizardPattern=nu;exports.GRAY=Dn;exports.GREEN=Ln;exports.Header=xt;exports.HeaderActions=Ja;exports.HeaderComponent=xt;exports.HeaderHamburger=Qa;exports.HeaderLogo=Ya;exports.HeaderMobileMenu=Za;exports.HeaderNavigation=Xa;exports.HeaderProvider=ls;exports.INDIGO=Ze;exports.Info=vl;exports.Input=Se;exports.LIME=Bn;exports.Label=Tt;exports.LoginBox=yd;exports.Menu=Kt;exports.MenuContent=qa;exports.MenuItem=Rs;exports.MenuSeparator=Ga;exports.MenuTrigger=As;exports.Modal=wd;exports.MultiSelect=Va;exports.NavLink=xs;exports.Navbar=yt;exports.NavbarContext=Pr;exports.NavbarGroup=po;exports.NavbarItem=fo;exports.NavbarSeparator=mo;exports.NavbarToggle=gr;exports.Navigation=eo;exports.NavigationComponent=eo;exports.ORANGE=_n;exports.PINK=Vn;exports.PRIMITIVE_COLORS=ds;exports.PURPLE=Wn;exports.PageHeader=to;exports.PageHeaderComponent=to;exports.Pagination=Ta;exports.Popover=Es;exports.Progress=vs;exports.RED=Pn;exports.ROSE=at;exports.Radio=va;exports.Rating=id;exports.SEMANTIC_COLORS=Yo;exports.SEMANTIC_COLORS_DARK=vr;exports.SEMANTIC_COLORS_LIGHT=qt;exports.SIDEBAR_TOKENS=Qe;exports.SKY=ot;exports.SLATE=rt;exports.SPACING_TOKENS=xr;exports.SearchAndFilterPattern=au;exports.SearchInput=Tr;exports.Select=jr;exports.Separator=ys;exports.SideNavbar=Ee;exports.SideNavbarBackdrop=Js;exports.SideNavbarConfigContext=Dr;exports.SideNavbarConfigProvider=Bs;exports.SideNavbarProvider=qs;exports.SideNavbarResizeHandle=Xs;exports.SideNavbarRoot=uo;exports.SideNavbarStateContext=Lr;exports.SideNavbarStateProvider=Us;exports.SideNavbarThemeContext=Ir;exports.SideNavbarThemeProvider=Hs;exports.SideNavbarToggle=Qs;exports.SideNavbarToggleContext=_r;exports.Sidebar=dt;exports.SidebarContent=go;exports.SidebarContext=Or;exports.SidebarFooter=xo;exports.SidebarGroup=vo;exports.SidebarHeader=bo;exports.SidebarSlot=yo;exports.SidebarSlotContent=wo;exports.SidebarSlotContext=Fr;exports.SidebarSlotProvider=co;exports.Skeleton=ga;exports.Slider=wa;exports.SpacingTokenFactory=he;exports.Spinner=gs;exports.Stepper=$o;exports.Switch=ya;exports.TEAL=Hn;exports.TYPOGRAPHY_TOKENS=gt;exports.Table=Ce;exports.TableActions=Ps;exports.TableBody=Os;exports.TableCell=_s;exports.TableContext=Rr;exports.TableEmptyState=zs;exports.TableFilters=Vs;exports.TableHeader=Fs;exports.TableHeaderCell=Ds;exports.TableHeaderRow=Ls;exports.TablePagination=Ws;exports.TableProvider=cs;exports.TableRow=hr;exports.Tabs=od;exports.TabsContent=za;exports.TabsContext=$r;exports.TabsList=_a;exports.TabsProvider=Fa;exports.TabsTrigger=Pa;exports.Text=Ue;exports.Textarea=ha;exports.ThemeProvider=ia;exports.TimePicker=cd;exports.Timeline=eu;exports.Toast=Co;exports.ToastContainer=Qd;exports.ToastContext=wr;exports.ToastProvider=da;exports.Tooltip=Ut;exports.TypographyTokenFactory=me;exports.VIOLET=et;exports.YELLOW=Fn;exports.blendColors=us;exports.clampWidth=lr;exports.cn=w;exports.darken=ii;exports.defaultConfigValues=we;exports.defaultThemeValues=Et;exports.formatKeyboardShortcut=Rd;exports.getAnimation=tl;exports.getAnimationClass=be;exports.getBreakpoint=ci;exports.getColor=Jo;exports.getColorClass=Zo;exports.getContrastColor=ai;exports.getFocusColorClass=ri;exports.getFocusRingClass=si;exports.getHoverColorClass=ti;exports.getMediaQuery=di;exports.getNestedIndentClass=zo;exports.getOpacity=nl;exports.getOpacityClass=al;exports.getPrimitiveColor=Rt;exports.getPrimitiveColorPalette=Ko;exports.getSemanticColor=Ht;exports.getSemanticColorClass=ei;exports.getSemanticColorRole=Xo;exports.getSemanticColorValue=Qo;exports.getSpacing=Oo;exports.getSpacingClass=E;exports.getTransitionClass=rl;exports.getTypography=Ho;exports.getTypographyClasses=ce;exports.getTypographyLineHeight=Bo;exports.getTypographySize=re;exports.getTypographySizeFromFontSize=ye;exports.getTypographyWeight=Pe;exports.getTypographyWeightFromFontWeight=Mt;exports.getZIndex=sl;exports.getZIndexClass=ue;exports.isLightColor=Un;exports.lighten=oi;exports.parseKeyboardShortcut=no;exports.parseWidthToPixels=br;exports.useApp=gl;exports.useColumnResizing=$d;exports.useConfig=ul;exports.useDialogContext=Lt;exports.useDialogContextOptional=ml;exports.useFocusManagement=io;exports.useFormContext=ks;exports.useFormContextOptional=Tc;exports.useFormFieldArray=Qc;exports.useGroupState=Bd;exports.useHeaderContext=Is;exports.useKeyboardShortcut=lo;exports.useNavLink=ma;exports.useNavbar=Od;exports.useNavbarRequired=zr;exports.useResize=ao;exports.useResponsiveSidebar=oo;exports.useSideNavbarCombined=Gd;exports.useSideNavbarConfig=Md;exports.useSideNavbarConfigRequired=vt;exports.useSideNavbarContent=qd;exports.useSideNavbarNavigation=Ud;exports.useSideNavbarState=Td;exports.useSideNavbarStateRequired=ct;exports.useSideNavbarTheme=Ed;exports.useSideNavbarThemeRequired=lt;exports.useSideNavbarToggleContext=Id;exports.useSideNavbarToggleContextRequired=Ys;exports.useSidebar=ho;exports.useSidebarRequired=Yt;exports.useSidebarSlot=Gs;exports.useSidebarSlotRequired=Ks;exports.useTableContext=Oe;exports.useTableContextOptional=kd;exports.useTabsContext=Er;exports.useTabsContextOptional=ad;exports.useTheme=cl;exports.useToast=Zd;exports.useToastContext=ms;exports.useToastContextOptional=fl;exports.useVirtualScrolling=ro;exports.validateWidthBounds=so;exports.withOpacity=ni;
690
+ `,children:[n.jsx("div",{className:"flex items-center gap-2",children:d&&n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(El,{className:"h-4 w-4"}),children:"Group"})}),n.jsxs("div",{className:"flex items-center gap-2",children:[D,$&&n.jsx("div",{className:"flex items-center gap-1",children:k.map(se=>n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(Wl,{className:"h-4 w-4"}),onClick:()=>Y(se),children:se.toUpperCase()},se))})]})]}),n.jsx(Ce,{columns:G,data:t,loading:r,onSort:s,sortColumn:a,sortDirection:o,pagination:N,filters:L,selectable:v,selectedRows:y,onSelectionChange:b,rowId:j,actions:S,resizable:f,columnWidths:ne,onColumnResize:(se,_)=>{P(V=>z(T({},V),{[se]:_})),x==null||x(se,_)},virtualScrolling:R,virtualScrollingOptions:M,emptyMessage:F,emptyStateTitle:I,emptyStateMessage:A,emptyStateIllustration:W,emptyStateAction:K})]})}function su({columns:e,data:t,searchPlaceholder:r="Search...",enableSearch:s=!0,itemsPerPage:a=10,enablePagination:o=!0,actions:i,onRowClick:c,loading:u=!1,emptyMessage:d="No data available"}){const[f,p]=l.useState(""),[m,h]=l.useState(1),x=l.useMemo(()=>e.map(g=>{if(g.accessor||g.header){const k=g.key||(typeof g.accessor=="string"?g.accessor:String(g.accessor)),N=g.label||g.header||"";return z(T({},g),{key:k,label:N})}return g}),[e]),v=l.useMemo(()=>{if(!f.trim())return t;const g=f.toLowerCase();return t.filter(k=>x.some(N=>{const L=k[String(N.key)];return String(L).toLowerCase().includes(g)}))},[t,f,x]),y=l.useMemo(()=>{if(!o)return v;const g=(m-1)*a,k=g+a;return v.slice(g,k)},[v,m,a,o]),b=o?Math.ceil(v.length/a):1,j=g=>{h(g)},$=g=>{p(g),h(1)};return n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(At,{spacing:"md",children:[n.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s&&n.jsx("div",{className:"flex-1 max-w-md",children:n.jsx(Tr,{placeholder:r,value:f,onSearch:$})}),i&&n.jsx("div",{className:"flex gap-2",children:i})]}),n.jsx(Ce,{columns:x,data:y,loading:u,emptyMessage:d,onRowClick:c?g=>{const k=v.findIndex(N=>N===g);c(g,k>=0?k:y.findIndex(N=>N===g))}:void 0}),o&&b>1&&n.jsx("div",{className:"flex justify-center",children:n.jsx(Ta,{currentPage:m,totalPages:b,onPageChange:j})}),s&&n.jsxs("div",{className:"text-sm text-fg-secondary text-center",children:["Showing ",y.length," of ",v.length," results"]})]})})}function nu({steps:e,onComplete:t,allowBackNavigation:r=!0,showStepNumbers:s=!0}){const[a,o]=l.useState(0),[i,c]=l.useState({}),[u,d]=l.useState({}),f=()=>rr(null,null,function*(){const y=e[a];if(y.validate&&!(yield y.validate())){d(z(T({},u),{[a]:!0}));return}d(z(T({},u),{[a]:!1})),y.onSubmit&&(yield y.onSubmit(i)),a<e.length-1?o(a+1):t&&t(i)}),p=()=>{a>0&&r&&(o(a-1),d(z(T({},u),{[a-1]:!1})))},m=y=>{r&&y<a&&o(y)},h=e[a],x=a===e.length-1,v=u[a]===!0;return n.jsx(it,{maxWidth:"lg",paddingX:"base",paddingY:"lg",children:n.jsxs(At,{spacing:"lg",children:[n.jsx($o,{steps:e.map((y,b)=>({id:y.id,title:y.title,content:y.content,description:y.description,status:b<a?"completed":b===a?v?"error":"active":"pending"})),currentStep:a,onStepChange:m,allowNavigation:r}),n.jsx("div",{className:"bg-surface-base rounded-lg border p-6",children:n.jsxs(At,{spacing:"md",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-semibold",children:h.title}),h.description&&n.jsx("p",{className:"text-fg-secondary mt-1",children:h.description})]}),v&&n.jsx("div",{className:"bg-error-bg border border-error-border rounded p-3",children:n.jsx("p",{className:"text-sm text-fg-error",children:"Please fix the errors before proceeding."})}),n.jsx("div",{className:"min-h-48",children:h.fields}),n.jsxs("div",{className:"flex justify-between pt-4 border-t",children:[n.jsx(Z,{variant:"outline",onClick:p,disabled:a===0,children:"Back"}),n.jsx(Z,{variant:"primary",onClick:f,children:x?"Complete":"Next"})]})]})})]})})}function au({items:e,searchFn:t,filterFn:r,renderItem:s,filters:a=[],searchPlaceholder:o="Search...",emptyMessage:i="No results found",showResultsCount:c=!0}){const[u,d]=l.useState(""),[f,p]=l.useState({}),m=l.useMemo(()=>{let y=e;if(u.trim()&&t){const b=u.toLowerCase();y=y.filter(j=>t(b,j))}return r&&Object.keys(f).length>0&&(y=y.filter(b=>r(f,b))),y},[e,u,f,t,r]),h=(y,b)=>{p(j=>z(T({},j),{[y]:b}))},x=()=>{p({}),d("")},v=u.trim().length>0||Object.keys(f).length>0;return n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(At,{spacing:"md",children:[n.jsx(fr,{padding:"medium",children:n.jsxs(At,{spacing:"md",children:[n.jsx("div",{children:n.jsx(Tr,{placeholder:o,value:u,onSearch:d})}),a.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:a.map(y=>{var b;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(Be,{className:"text-fg-secondary text-sm",children:[y.label,":"]}),n.jsxs("select",{className:"px-3 py-1 border rounded text-sm","aria-label":y.label,value:String(f[y.id]||""),onChange:j=>h(y.id,j.target.value||void 0),children:[n.jsx("option",{value:"",children:"All"}),(b=y.options)==null?void 0:b.map(j=>n.jsx("option",{value:String(j.value||""),children:j.label},j.id))]})]},y.id)})}),v&&n.jsx("div",{children:n.jsx(Z,{variant:"outline",size:"sm",onClick:x,children:"Clear Filters"})})]})}),c&&n.jsxs("div",{className:"text-sm text-fg-secondary",children:["Showing ",m.length," of ",e.length," results",v&&" (filtered)"]}),m.length===0?n.jsx(fr,{padding:"large",children:n.jsx("div",{className:"text-center text-fg-secondary",children:n.jsx(Be,{children:i})})}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:m.map((y,b)=>n.jsx("div",{children:s(y,b)},b))})]})})}function ou({sidebar:e,children:t,header:r,footer:s,defaultCollapsed:a=!1,sidebarProps:o}){return n.jsxs("div",{className:"flex h-screen overflow-hidden",children:[e&&n.jsx(Ee,z(T({defaultCollapsed:a},o),{children:e})),n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r&&n.jsx("header",{className:"border-b bg-surface-base",children:n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:r})}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsx(it,{maxWidth:"xl",paddingX:"base",paddingY:"base",children:t})}),s&&n.jsx("footer",{className:"border-t bg-surface-base",children:n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:s})})]})]})}exports.AMBER=nt;exports.Accordion=hd;exports.AlertDialog=Kd;exports.AppProvider=bl;exports.Autocomplete=Oa;exports.AutocompleteList=Ar;exports.AutocompleteOption=$s;exports.Avatar=ur;exports.AvatarGroup=Mc;exports.BLUE=zn;exports.BRAND_COLORS=li;exports.BREAKPOINT_TOKENS=yr;exports.Badge=pa;exports.Breadcrumb=Ma;exports.BreakpointTokenFactory=Ct;exports.Button=Z;exports.COLOR_SCALES=Bo;exports.CYAN=tt;exports.Card=fr;exports.Checkbox=Nr;exports.Chip=ws;exports.Collapsible=xa;exports.ColorPicker=dd;exports.CommandPalette=tu;exports.ConfigProvider=ca;exports.DashboardLayout=ou;exports.DataGrid=ru;exports.DataTablePattern=su;exports.DatePicker=nd;exports.DatePickerCalendar=Cs;exports.DatePickerInput=Ss;exports.DatePickerProvider=is;exports.Dialog=Re;exports.DialogClose=So;exports.DialogContent=Zs;exports.DialogContext=kr;exports.DialogDescription=No;exports.DialogFooter=tn;exports.DialogHeader=en;exports.DialogProvider=ps;exports.DialogTitle=jo;exports.DialogTrigger=ko;exports.Drawer=Gt;exports.DrawerContent=Ms;exports.DrawerFooter=Ua;exports.DrawerHeader=Ha;exports.Dropdown=Ra;exports.EMERALD=st;exports.EmptyState=Aa;exports.ErrorMessage=ba;exports.FONT_FAMILY_TOKENS=Vo;exports.FONT_WEIGHT_TOKENS=Wo;exports.FUCHSIA=On;exports.FileUpload=ld;exports.Form=Ac;exports.FormContext=Sr;exports.FormField=Rc;exports.FormProvider=ka;exports.FormWizardPattern=nu;exports.GRAY=Dn;exports.GREEN=Fn;exports.Header=xt;exports.HeaderActions=Ja;exports.HeaderComponent=xt;exports.HeaderHamburger=Qa;exports.HeaderLogo=Ya;exports.HeaderMobileMenu=Za;exports.HeaderNavigation=Xa;exports.HeaderProvider=ls;exports.INDIGO=Ze;exports.Info=vl;exports.Input=Se;exports.LIME=Un;exports.Label=Tt;exports.LoginBox=yd;exports.Menu=Kt;exports.MenuContent=qa;exports.MenuItem=Rs;exports.MenuSeparator=Ga;exports.MenuTrigger=As;exports.Modal=wd;exports.MultiSelect=Va;exports.NavLink=xs;exports.Navbar=yt;exports.NavbarContext=Pr;exports.NavbarGroup=po;exports.NavbarItem=fo;exports.NavbarSeparator=mo;exports.NavbarToggle=gr;exports.Navigation=eo;exports.NavigationComponent=eo;exports.ORANGE=_n;exports.PINK=Vn;exports.PRIMITIVE_COLORS=ds;exports.PURPLE=Wn;exports.PageHeader=to;exports.PageHeaderComponent=to;exports.Pagination=Ta;exports.Popover=Es;exports.Progress=vs;exports.RED=Pn;exports.ROSE=at;exports.Radio=va;exports.Rating=id;exports.SEMANTIC_COLORS=Yo;exports.SEMANTIC_COLORS_DARK=vr;exports.SEMANTIC_COLORS_LIGHT=qt;exports.SIDEBAR_TOKENS=Qe;exports.SKY=ot;exports.SLATE=rt;exports.SPACING_TOKENS=xr;exports.SearchAndFilterPattern=au;exports.SearchInput=Tr;exports.Select=jr;exports.Separator=ys;exports.SideNavbar=Ee;exports.SideNavbarBackdrop=Js;exports.SideNavbarConfigContext=Dr;exports.SideNavbarConfigProvider=Us;exports.SideNavbarProvider=qs;exports.SideNavbarResizeHandle=Xs;exports.SideNavbarRoot=uo;exports.SideNavbarStateContext=Fr;exports.SideNavbarStateProvider=Bs;exports.SideNavbarThemeContext=Ir;exports.SideNavbarThemeProvider=Hs;exports.SideNavbarToggle=Qs;exports.SideNavbarToggleContext=_r;exports.Sidebar=dt;exports.SidebarContent=go;exports.SidebarContext=Or;exports.SidebarFooter=xo;exports.SidebarGroup=vo;exports.SidebarHeader=bo;exports.SidebarSlot=yo;exports.SidebarSlotContent=wo;exports.SidebarSlotContext=Lr;exports.SidebarSlotProvider=co;exports.Skeleton=ga;exports.Slider=wa;exports.SpacingTokenFactory=he;exports.Spinner=gs;exports.Stepper=$o;exports.Switch=ya;exports.TEAL=Hn;exports.TYPOGRAPHY_TOKENS=gt;exports.Table=Ce;exports.TableActions=Ps;exports.TableBody=Os;exports.TableCell=_s;exports.TableContext=Rr;exports.TableEmptyState=zs;exports.TableFilters=Vs;exports.TableHeader=Ls;exports.TableHeaderCell=Ds;exports.TableHeaderRow=Fs;exports.TablePagination=Ws;exports.TableProvider=cs;exports.TableRow=hr;exports.Tabs=od;exports.TabsContent=za;exports.TabsContext=$r;exports.TabsList=_a;exports.TabsProvider=La;exports.TabsTrigger=Pa;exports.Text=Be;exports.Textarea=ha;exports.ThemeProvider=ia;exports.TimePicker=cd;exports.Timeline=eu;exports.Toast=Co;exports.ToastContainer=Qd;exports.ToastContext=wr;exports.ToastProvider=da;exports.Tooltip=Bt;exports.TypographyTokenFactory=me;exports.VIOLET=et;exports.YELLOW=Ln;exports.blendColors=us;exports.clampWidth=lr;exports.cn=w;exports.darken=ii;exports.defaultConfigValues=we;exports.defaultThemeValues=Et;exports.formatKeyboardShortcut=Rd;exports.getAnimation=tl;exports.getAnimationClass=be;exports.getBreakpoint=ci;exports.getColor=Jo;exports.getColorClass=Zo;exports.getContrastColor=ai;exports.getFocusColorClass=ri;exports.getFocusRingClass=si;exports.getHoverColorClass=ti;exports.getMediaQuery=di;exports.getNestedIndentClass=zo;exports.getOpacity=nl;exports.getOpacityClass=al;exports.getPrimitiveColor=Rt;exports.getPrimitiveColorPalette=Ko;exports.getSemanticColor=Ht;exports.getSemanticColorClass=ei;exports.getSemanticColorRole=Xo;exports.getSemanticColorValue=Qo;exports.getSpacing=Oo;exports.getSpacingClass=E;exports.getTransitionClass=rl;exports.getTypography=Ho;exports.getTypographyClasses=ce;exports.getTypographyLineHeight=Uo;exports.getTypographySize=re;exports.getTypographySizeFromFontSize=ye;exports.getTypographyWeight=Pe;exports.getTypographyWeightFromFontWeight=Mt;exports.getZIndex=sl;exports.getZIndexClass=ue;exports.isLightColor=Bn;exports.lighten=oi;exports.parseKeyboardShortcut=no;exports.parseWidthToPixels=br;exports.useApp=gl;exports.useColumnResizing=$d;exports.useConfig=ul;exports.useDialogContext=Ft;exports.useDialogContextOptional=ml;exports.useFocusManagement=io;exports.useFormContext=ks;exports.useFormContextOptional=Tc;exports.useFormFieldArray=Qc;exports.useGroupState=Ud;exports.useHeaderContext=Is;exports.useKeyboardShortcut=lo;exports.useNavLink=ma;exports.useNavbar=Od;exports.useNavbarRequired=zr;exports.useResize=ao;exports.useResponsiveSidebar=oo;exports.useSideNavbarCombined=Gd;exports.useSideNavbarConfig=Md;exports.useSideNavbarConfigRequired=vt;exports.useSideNavbarContent=qd;exports.useSideNavbarNavigation=Bd;exports.useSideNavbarState=Td;exports.useSideNavbarStateRequired=ct;exports.useSideNavbarTheme=Ed;exports.useSideNavbarThemeRequired=lt;exports.useSideNavbarToggleContext=Id;exports.useSideNavbarToggleContextRequired=Ys;exports.useSidebar=ho;exports.useSidebarRequired=Yt;exports.useSidebarSlot=Gs;exports.useSidebarSlotRequired=Ks;exports.useTableContext=Oe;exports.useTableContextOptional=kd;exports.useTabsContext=Er;exports.useTabsContextOptional=ad;exports.useTheme=cl;exports.useToast=Zd;exports.useToastContext=ms;exports.useToastContextOptional=fl;exports.useVirtualScrolling=ro;exports.validateWidthBounds=so;exports.withOpacity=ni;
689
691
  //# sourceMappingURL=index.cjs.map