@fabio.caffarello/react-design-system 3.12.0 → 3.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
- "use client";"use strict";var ai=Object.defineProperty,oi=Object.defineProperties;var ii=Object.getOwnPropertyDescriptors;var rr=Object.getOwnPropertySymbols;var vn=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable;var Xr=(e,t,r)=>t in e?ai(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t)=>{for(var r in t||(t={}))vn.call(t,r)&&Xr(e,r,t[r]);if(rr)for(var r of rr(t))yn.call(t,r)&&Xr(e,r,t[r]);return e},P=(e,t)=>oi(e,ii(t));var z=(e,t)=>{var r={};for(var s in e)vn.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&rr)for(var s of rr(e))t.indexOf(s)<0&&yn.call(e,s)&&(r[s]=e[s]);return r};var wn=(e,t,r)=>Xr(e,typeof t!="symbol"?t+"":t,r);var sr=(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"),Ye=require("react-dom");function li(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Se=li(l),rt={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 ci(e){return e<=0?rt.spacing.itemPaddingX:e===1?rt.spacing.nestedIndent:e===2?rt.spacing.nestedIndentLevel2:e===3?rt.spacing.nestedIndentLevel3:`pl-${4+e*4}`}class ve{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)}}wn(ve,"BASE_UNIT",4);const yr={none:ve.create(0),"0.5":ve.create(.5),xs:ve.create(1),"1.5":ve.create(1.5),sm:ve.create(2),"2.5":ve.create(2.5),md:ve.create(3),"3.5":ve.create(3.5),base:ve.create(4),lg:ve.create(6),xl:ve.create(8),"2xl":ve.create(10),"3xl":ve.create(12),"4xl":ve.create(16),"5xl":ve.create(20),"6xl":ve.create(24)};function di(e){return yr[e]}function m(e,t="p"){const s=yr[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-x":"space-x","space-y":"space-y"}[t]}-${s}`}class be{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 ui={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"}},fi={light:be.createFontWeight("light"),normal:be.createFontWeight("normal"),medium:be.createFontWeight("medium"),semibold:be.createFontWeight("semibold"),bold:be.createFontWeight("bold")},wt={h1:be.create("4xl","tight","bold"),h2:be.create("3xl","tight","bold"),h3:be.create("2xl","snug","semibold"),h4:be.create("xl","snug","semibold"),h5:be.create("lg","normal","medium"),h6:be.create("base","normal","medium"),body:be.create("base","relaxed","normal"),bodySmall:be.create("sm","relaxed","normal"),bodyLarge:be.create("lg","relaxed","normal"),label:be.create("sm","normal","medium"),caption:be.create("xs","normal","normal"),button:be.create("base","normal","medium")};function mi(e){return wt[e]}function ue(e){const t=wt[e];return`${t.fontSize.tailwind} ${t.lineHeight.tailwind} ${t.fontWeight.tailwind}`}function re(e){return wt[e].fontSize.tailwind}function je(e){return be.createFontSize(e).tailwind}function ze(e){return wt[e].fontWeight.tailwind}function It(e){return be.createFontWeight(e).tailwind}function pi(e){return wt[e].lineHeight.tailwind}const bi=[50,100,200,300,400,500,600,700,800,900,950];function de(e,t,r){const s=hi(e),a=xi(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function hi(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 xi(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 st={50:de("#f0f4f8","brand-primary",50),100:de("#d9e2ec","brand-primary",100),200:de("#bcccdc","brand-primary",200),300:de("#9fb3c8","brand-primary",300),400:de("#7390ad","brand-primary",400),500:de("#486581","brand-primary",500),600:de("#334e68","brand-primary",600),700:de("#243b53","brand-primary",700),800:de("#1a2a3a","brand-primary",800),900:de("#102a43","brand-primary",900),950:de("#061a35","brand-primary",950)},nt={50:de("#f7f5ff","brand-secondary",50),100:de("#eee9ff","brand-secondary",100),200:de("#e0d6ff","brand-secondary",200),300:de("#cbb8ff","brand-secondary",300),400:de("#aa89fc","brand-secondary",400),500:de("#8e58f2","brand-secondary",500),600:de("#703bc8","brand-secondary",600),700:de("#582aa2","brand-secondary",700),800:de("#44227e","brand-secondary",800),900:de("#32185d","brand-secondary",900),950:de("#180635","brand-secondary",950)};function E(e,t,r){const s=gi(e),a=vi(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function gi(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 vi(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 Un={50:E("#eef2ff","indigo",50),100:E("#e0e7ff","indigo",100),200:E("#c7d2fe","indigo",200),300:E("#a5b4fc","indigo",300),400:E("#818cf8","indigo",400),500:E("#6366f1","indigo",500),600:E("#4f46e5","indigo",600),700:E("#4338ca","indigo",700),800:E("#3730a3","indigo",800),900:E("#312e81","indigo",900),950:E("#1e1b4b","indigo",950)},Gn={50:E("#f5f3ff","violet",50),100:E("#ede9fe","violet",100),200:E("#ddd6fe","violet",200),300:E("#c4b5fd","violet",300),400:E("#a78bfa","violet",400),500:E("#8b5cf6","violet",500),600:E("#7c3aed","violet",600),700:E("#6d28d9","violet",700),800:E("#5b21b6","violet",800),900:E("#4c1d95","violet",900),950:E("#2e1065","violet",950)},at={50:E("#ecfeff","cyan",50),100:E("#cffafe","cyan",100),200:E("#a5f3fc","cyan",200),300:E("#67e8f9","cyan",300),400:E("#22d3ee","cyan",400),500:E("#06b6d4","cyan",500),600:E("#0891b2","cyan",600),700:E("#0e7490","cyan",700),800:E("#155e75","cyan",800),900:E("#164e63","cyan",900),950:E("#083344","cyan",950)},ot={50:E("#f8fafc","slate",50),100:E("#f1f5f9","slate",100),200:E("#e2e8f0","slate",200),300:E("#cbd5e1","slate",300),400:E("#94a3b8","slate",400),500:E("#64748b","slate",500),600:E("#475569","slate",600),700:E("#334155","slate",700),800:E("#1e293b","slate",800),900:E("#0f172a","slate",900),950:E("#020617","slate",950)},Kn={50:E("#f9fafb","gray",50),100:E("#f3f4f6","gray",100),200:E("#e5e7eb","gray",200),300:E("#d1d5db","gray",300),400:E("#9ca3af","gray",400),500:E("#6b7280","gray",500),600:E("#4b5563","gray",600),700:E("#374151","gray",700),800:E("#1f2937","gray",800),900:E("#111827","gray",900),950:E("#030712","gray",950)},it={50:E("#ecfdf5","emerald",50),100:E("#d1fae5","emerald",100),200:E("#a7f3d0","emerald",200),300:E("#6ee7b7","emerald",300),400:E("#34d399","emerald",400),500:E("#10b981","emerald",500),600:E("#059669","emerald",600),700:E("#047857","emerald",700),800:E("#065f46","emerald",800),900:E("#064e3b","emerald",900),950:E("#022c22","emerald",950)},Yn={50:E("#f0fdf4","green",50),100:E("#dcfce7","green",100),200:E("#bbf7d0","green",200),300:E("#86efac","green",300),400:E("#4ade80","green",400),500:E("#22c55e","green",500),600:E("#16a34a","green",600),700:E("#15803d","green",700),800:E("#166534","green",800),900:E("#14532d","green",900),950:E("#052e16","green",950)},lt={50:E("#fffbeb","amber",50),100:E("#fef3c7","amber",100),200:E("#fde68a","amber",200),300:E("#fcd34d","amber",300),400:E("#fbbf24","amber",400),500:E("#f59e0b","amber",500),600:E("#d97706","amber",600),700:E("#b45309","amber",700),800:E("#92400e","amber",800),900:E("#78350f","amber",900),950:E("#451a03","amber",950)},qn={50:E("#fefce8","yellow",50),100:E("#fef9c3","yellow",100),200:E("#fef08a","yellow",200),300:E("#fde047","yellow",300),400:E("#facc15","yellow",400),500:E("#eab308","yellow",500),600:E("#ca8a04","yellow",600),700:E("#a16207","yellow",700),800:E("#854d0e","yellow",800),900:E("#713f12","yellow",900),950:E("#422006","yellow",950)},Xn={50:E("#fff7ed","orange",50),100:E("#ffedd5","orange",100),200:E("#fed7aa","orange",200),300:E("#fdba74","orange",300),400:E("#fb923c","orange",400),500:E("#f97316","orange",500),600:E("#ea580c","orange",600),700:E("#c2410c","orange",700),800:E("#9a3412","orange",800),900:E("#7c2d12","orange",900),950:E("#431407","orange",950)},ct={50:E("#fff1f2","rose",50),100:E("#ffe4e6","rose",100),200:E("#fecdd3","rose",200),300:E("#fda4af","rose",300),400:E("#fb7185","rose",400),500:E("#f43f5e","rose",500),600:E("#e11d48","rose",600),700:E("#be123c","rose",700),800:E("#9f1239","rose",800),900:E("#881337","rose",900),950:E("#4c0519","rose",950)},Jn={50:E("#fef2f2","red",50),100:E("#fee2e2","red",100),200:E("#fecaca","red",200),300:E("#fca5a5","red",300),400:E("#f87171","red",400),500:E("#ef4444","red",500),600:E("#dc2626","red",600),700:E("#b91c1c","red",700),800:E("#991b1b","red",800),900:E("#7f1d1d","red",900),950:E("#450a0a","red",950)},dt={50:E("#f0f9ff","sky",50),100:E("#e0f2fe","sky",100),200:E("#bae6fd","sky",200),300:E("#7dd3fc","sky",300),400:E("#38bdf8","sky",400),500:E("#0ea5e9","sky",500),600:E("#0284c7","sky",600),700:E("#0369a1","sky",700),800:E("#075985","sky",800),900:E("#0c4a6e","sky",900),950:E("#082f49","sky",950)},Zn={50:E("#eff6ff","blue",50),100:E("#dbeafe","blue",100),200:E("#bfdbfe","blue",200),300:E("#93c5fd","blue",300),400:E("#60a5fa","blue",400),500:E("#3b82f6","blue",500),600:E("#2563eb","blue",600),700:E("#1d4ed8","blue",700),800:E("#1e40af","blue",800),900:E("#1e3a8a","blue",900),950:E("#172554","blue",950)},Qn={50:E("#fdf4ff","fuchsia",50),100:E("#fae8ff","fuchsia",100),200:E("#f5d0fe","fuchsia",200),300:E("#f0abfc","fuchsia",300),400:E("#e879f9","fuchsia",400),500:E("#d946ef","fuchsia",500),600:E("#c026d3","fuchsia",600),700:E("#a21caf","fuchsia",700),800:E("#86198f","fuchsia",800),900:E("#701a75","fuchsia",900),950:E("#4a044e","fuchsia",950)},ea={50:E("#fdf2f8","pink",50),100:E("#fce7f3","pink",100),200:E("#fbcfe8","pink",200),300:E("#f9a8d4","pink",300),400:E("#f472b6","pink",400),500:E("#ec4899","pink",500),600:E("#db2777","pink",600),700:E("#be185d","pink",700),800:E("#9d174d","pink",800),900:E("#831843","pink",900),950:E("#500724","pink",950)},ta={50:E("#faf5ff","purple",50),100:E("#f3e8ff","purple",100),200:E("#e9d5ff","purple",200),300:E("#d8b4fe","purple",300),400:E("#c084fc","purple",400),500:E("#a855f7","purple",500),600:E("#9333ea","purple",600),700:E("#7e22ce","purple",700),800:E("#6b21a8","purple",800),900:E("#581c87","purple",900),950:E("#3b0764","purple",950)},ra={50:E("#f0fdfa","teal",50),100:E("#ccfbf1","teal",100),200:E("#99f6e4","teal",200),300:E("#5eead4","teal",300),400:E("#2dd4bf","teal",400),500:E("#14b8a6","teal",500),600:E("#0d9488","teal",600),700:E("#0f766e","teal",700),800:E("#115e59","teal",800),900:E("#134e4a","teal",900),950:E("#042f2e","teal",950)},sa={50:E("#f7fee7","lime",50),100:E("#ecfccb","lime",100),200:E("#d9f99d","lime",200),300:E("#bef264","lime",300),400:E("#a3e635","lime",400),500:E("#84cc16","lime",500),600:E("#65a30d","lime",600),700:E("#4d7c0f","lime",700),800:E("#3f6212","lime",800),900:E("#365314","lime",900),950:E("#1a2e05","lime",950)},bs={"brand-primary":st,"brand-secondary":nt,indigo:Un,violet:Gn,cyan:at,slate:ot,gray:Kn,emerald:it,green:Yn,amber:lt,yellow:qn,orange:Xn,rose:ct,red:Jn,sky:dt,blue:Zn,fuchsia:Qn,pink:ea,purple:ta,teal:ra,lime:sa};function Lt(e,t){return bs[e][t]}function yi(e){return bs[e]}const Kt={primary:{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"}},secondary:{light:nt[400],DEFAULT:nt[500],dark:nt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{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"}},success:{light:it[400],DEFAULT:it[500],dark:it[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},warning:{light:lt[400],DEFAULT:lt[500],dark:lt[600],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:ct[400],DEFAULT:ct[500],dark:ct[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:dt[400],DEFAULT:dt[500],dark:dt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:ot[100],DEFAULT:ot[500],dark:ot[700],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},wr={primary:{light:st[500],DEFAULT:st[400],dark:st[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:nt[500],DEFAULT:nt[400],dark:nt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:at[500],DEFAULT:at[400],dark:at[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},success:{light:it[500],DEFAULT:it[400],dark:it[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},warning:{light:lt[500],DEFAULT:lt[400],dark:lt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:ct[500],DEFAULT:ct[400],dark:ct[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:dt[500],DEFAULT:dt[400],dark:dt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:ot[700],DEFAULT:ot[400],dark:ot[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},wi=Kt;function Ut(e,t="DEFAULT",r="light"){return(r==="dark"?wr:Kt)[e][t]}function ki(e,t="light"){return(t==="dark"?wr:Kt)[e]}function ji(e,t,r={}){const{format:s="hex",opacity:a}=r,o=Lt(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;default:i=o.hex}return i}function Ni(e,t="DEFAULT",r={}){const{format:s="hex",opacity:a}=r,o=Ut(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;default:i=o.hex}return i}function Si(e,t,r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Lt(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 $i(e,t="DEFAULT",r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Ut(e,t),d=[`${s}-${c.tailwind}`];if(a){const f=Ut(e,t==="DEFAULT"?"dark":"DEFAULT");d.push(`hover:${s}-${f.tailwind}`)}if(o&&d.push(`focus:${s}-${c.tailwind}`),i){const f=Ut(e,"dark");d.push(`active:${s}-${f.tailwind}`)}return d.join(" ")}function Ci(e,t,r="bg"){const s=Lt(e,t);return`hover:${r}-${s.tailwind}`}function Ei(e,t,r="border"){const s=Lt(e,t);return`focus:${r}-${s.tailwind}`}function Mi(e,t){return`focus:ring-${Lt(e,t).tailwind}`}function Ti(e,t){return`rgba(${e.rgb}, ${t})`}function na(e){const t=is(e);return t?.299*t[0]+.587*t[1]+.114*t[2]>128:!0}function Ai(e){return na(e)?"#000000":"#ffffff"}function is(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 hs(e,t,r=.5){const s=is(e),a=is(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 Ri(e,t){return hs(e,"#ffffff",t/100)}function Ii(e,t){return hs(e,"#000000",t/100)}const Di={primary:{name:"brand-primary",light:400,default:500,dark:600},secondary:{name:"brand-secondary",light:400,default:500,dark:600},accent:{name:"cyan",light:400,default:500,dark:600}};class Tt{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 kr={sm:Tt.create("sm"),md:Tt.create("md"),lg:Tt.create("lg"),xl:Tt.create("xl"),"2xl":Tt.create("2xl")};function _i(e){return kr[e]}function Fi(e,t="min"){const r=kr[e];return`@media (${t==="min"?"min-width":"max-width"}: ${r.px})`}function aa(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=aa(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function oa(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=aa(e))&&(s&&(s+=" "),s+=t);return s}const Li=(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},Pi=(e,t)=>({classGroupId:e,validator:t}),ia=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),fr="-",kn=[],Oi="arbitrary..",zi=e=>{const t=Wi(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Vi(i);const c=i.split(fr),u=c[0]===""&&c.length>1?1:0;return la(c,u,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const u=s[i],d=r[i];return u?d?Li(d,u):u:d||kn}return r[i]||kn}}},la=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const d=la(e,t+1,o);if(d)return d}const i=r.validators;if(i===null)return;const c=t===0?e.join(fr):e.slice(t).join(fr),u=i.length;for(let d=0;d<u;d++){const f=i[d];if(f.validator(c))return f.classGroupId}},Vi=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?Oi+s:void 0})(),Wi=e=>{const{theme:t,classGroups:r}=e;return Hi(r,t)},Hi=(e,t)=>{const r=ia();for(const s in e){const a=e[s];xs(a,r,s,t)}return r},xs=(e,t,r,s)=>{const a=e.length;for(let o=0;o<a;o++){const i=e[o];Bi(i,t,r,s)}},Bi=(e,t,r,s)=>{if(typeof e=="string"){Ui(e,t,r);return}if(typeof e=="function"){Gi(e,t,r,s);return}Ki(e,t,r,s)},Ui=(e,t,r)=>{const s=e===""?t:ca(t,e);s.classGroupId=r},Gi=(e,t,r,s)=>{if(Yi(e)){xs(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Pi(r,e))},Ki=(e,t,r,s)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[c,u]=a[i];xs(u,ca(t,c),r,s)}},ca=(e,t)=>{let r=e;const s=t.split(fr),a=s.length;for(let o=0;o<a;o++){const i=s[o];let c=r.nextPart.get(i);c||(c=ia(),r.nextPart.set(i,c)),r=c}return r},Yi=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,qi=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)}}},ls="!",jn=":",Xi=[],Nn=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),Ji=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 w=0;w<f;w++){const v=a[w];if(i===0&&c===0){if(v===jn){o.push(a.slice(u,w)),u=w+1;continue}if(v==="/"){d=w;continue}}v==="["?i++:v==="]"?i--:v==="("?c++:v===")"&&c--}const p=o.length===0?a:a.slice(u);let b=p,h=!1;p.endsWith(ls)?(b=p.slice(0,-1),h=!0):p.startsWith(ls)&&(b=p.slice(1),h=!0);const g=d&&d>u?d-u:void 0;return Nn(o,h,b,g)};if(t){const a=t+jn,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):Nn(Xi,!1,i,void 0,!0)}if(r){const a=s;s=o=>r({className:o,parseClassName:a})}return s},Zi=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}},Qi=e=>M({cache:qi(e.cacheSize),parseClassName:Ji(e),sortModifiers:Zi(e),postfixLookupClassGroupIds:el(e)},zi(e)),el=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let s=0;s<r.length;s++)t[r[s]]=!0;return t},tl=/\s+/,rl=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o,postfixLookupClassGroupIds:i}=t,c=[],u=e.trim().split(tl);let d="";for(let f=u.length-1;f>=0;f-=1){const p=u[f],{isExternal:b,modifiers:h,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:v}=r(p);if(b){d=p+(d.length>0?" "+d:d);continue}let x=!!v,j;if(x){const I=w.substring(0,v);j=s(I);const C=j&&i[j]?s(w):void 0;C&&C!==j&&(j=C,x=!1)}else j=s(w);if(!j){if(!x){d=p+(d.length>0?" "+d:d);continue}if(j=s(w),!j){d=p+(d.length>0?" "+d:d);continue}x=!1}const N=h.length===0?"":h.length===1?h[0]:o(h).join(":"),k=g?N+ls:N,$=k+j;if(c.indexOf($)>-1)continue;c.push($);const S=a(j,x);for(let I=0;I<S.length;++I){const C=S[I];c.push(k+C)}d=p+(d.length>0?" "+d:d)}return d},sl=(...e)=>{let t=0,r,s,a="";for(;t<e.length;)(r=e[t++])&&(s=da(r))&&(a&&(a+=" "),a+=s);return a},da=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=da(e[s]))&&(r&&(r+=" "),r+=t);return r},nl=(e,...t)=>{let r,s,a,o;const i=u=>{const d=t.reduce((f,p)=>p(f),e());return r=Qi(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=rl(u,r);return a(u,f),f};return o=i,(...u)=>o(sl(...u))},al=[],ge=e=>{const t=r=>r[e]||al;return t.isThemeGetter=!0,t},ua=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fa=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ol=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,il=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ll=/\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$/,cl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ul=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ze=e=>ol.test(e),ne=e=>!!e&&!Number.isNaN(Number(e)),Fe=e=>!!e&&Number.isInteger(Number(e)),Jr=e=>e.endsWith("%")&&ne(e.slice(0,-1)),He=e=>il.test(e),ma=()=>!0,fl=e=>ll.test(e)&&!cl.test(e),gs=()=>!1,ml=e=>dl.test(e),pl=e=>ul.test(e),bl=e=>!G(e)&&!K(e),hl=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),xl=e=>mt(e,ha,gs),G=e=>ua.test(e),xt=e=>mt(e,xa,fl),Sn=e=>mt(e,Sl,ne),gl=e=>mt(e,va,ma),vl=e=>mt(e,ga,gs),$n=e=>mt(e,pa,gs),yl=e=>mt(e,ba,pl),nr=e=>mt(e,ya,ml),K=e=>fa.test(e),Ot=e=>kt(e,xa),wl=e=>kt(e,ga),Cn=e=>kt(e,pa),kl=e=>kt(e,ha),jl=e=>kt(e,ba),ar=e=>kt(e,ya,!0),Nl=e=>kt(e,va,!0),mt=(e,t,r)=>{const s=ua.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},kt=(e,t,r=!1)=>{const s=fa.exec(e);return s?s[1]?t(s[1]):r:!1},pa=e=>e==="position"||e==="percentage",ba=e=>e==="image"||e==="url",ha=e=>e==="length"||e==="size"||e==="bg-size",xa=e=>e==="length",Sl=e=>e==="number",ga=e=>e==="family-name",va=e=>e==="number"||e==="weight",ya=e=>e==="shadow",$l=()=>{const e=ge("color"),t=ge("font"),r=ge("text"),s=ge("font-weight"),a=ge("tracking"),o=ge("leading"),i=ge("breakpoint"),c=ge("container"),u=ge("spacing"),d=ge("radius"),f=ge("shadow"),p=ge("inset-shadow"),b=ge("text-shadow"),h=ge("drop-shadow"),g=ge("blur"),w=ge("perspective"),v=ge("aspect"),x=ge("ease"),j=ge("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...k(),K,G],S=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],C=()=>[K,G,u],A=()=>[Ze,"full","auto",...C()],F=()=>[Fe,"none","subgrid",K,G],D=()=>["auto",{span:["full",Fe,K,G]},Fe,K,G],T=()=>[Fe,"auto",K,G],R=()=>["auto","min","max","fr",K,G],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...C()],X=()=>[Ze,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],Z=()=>[Ze,"screen","full","dvw","lvw","svw","min","max","fit",...C()],oe=()=>[Ze,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],H=()=>[e,K,G],L=()=>[...k(),Cn,$n,{position:[K,G]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",kl,xl,{size:[K,G]}],J=()=>[Jr,Ot,xt],te=()=>["","none","full",d,K,G],ae=()=>["",ne,Ot,xt],O=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[ne,Jr,Cn,$n],ce=()=>["","none",g,K,G],ie=()=>["none",ne,K,G],pe=()=>["none",ne,K,G],we=()=>[ne,K,G],Ae=()=>[Ze,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[He],breakpoint:[He],color:[ma],container:[He],"drop-shadow":[He],ease:["in","out","in-out"],font:[bl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[He],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[He],shadow:[He],spacing:["px",ne],text:[He],"text-shadow":[He],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ze,G,K,v]}],container:["container"],"container-type":[{"@container":["","normal","size",K,G]}],"container-named":[hl],columns:[{columns:[ne,G,K,c]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:$()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Fe,"auto",K,G]}],basis:[{basis:[Ze,"full","auto",c,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ne,Ze,"auto","initial","none",G]}],grow:[{grow:["",ne,K,G]}],shrink:[{shrink:["",ne,K,G]}],order:[{order:[Fe,"first","last","none",K,G]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...oe()]}],"min-block-size":[{"min-block":["auto",...oe()]}],"max-block-size":[{"max-block":["none",...oe()]}],w:[{w:[c,"screen",...X()]}],"min-w":[{"min-w":[c,"screen","none",...X()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Ot,xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Nl,gl]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jr,G]}],"font-family":[{font:[wl,vl,t]}],"font-features":[{"font-features":[G]}],"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,K,G]}],"line-clamp":[{"line-clamp":[ne,"none",K,Sn]}],leading:[{leading:[o,...C()]}],"list-image":[{"list-image":["none",K,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",K,xt]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[ne,"auto",K,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[Fe,K,G]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,G]}],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",K,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fe,K,G],radial:["",K,G],conic:[Fe,K,G]},jl,yl]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...O(),"hidden","none"]}],"divide-style":[{divide:[...O(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...O(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,K,G]}],"outline-w":[{outline:["",ne,Ot,xt]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",f,ar,nr]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",p,ar,nr]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[ne,xt]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",b,ar,nr]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[ne,K,G]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"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":[ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,G]}],filter:[{filter:["","none",K,G]}],blur:[{blur:ce()}],brightness:[{brightness:[ne,K,G]}],contrast:[{contrast:[ne,K,G]}],"drop-shadow":[{"drop-shadow":["","none",h,ar,nr]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",ne,K,G]}],"hue-rotate":[{"hue-rotate":[ne,K,G]}],invert:[{invert:["",ne,K,G]}],saturate:[{saturate:[ne,K,G]}],sepia:[{sepia:["",ne,K,G]}],"backdrop-filter":[{"backdrop-filter":["","none",K,G]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[ne,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[ne,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,K,G]}],"backdrop-invert":[{"backdrop-invert":["",ne,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[ne,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[ne,K,G]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,K,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",K,G]}],ease:[{ease:["linear","initial",x,K,G]}],delay:[{delay:[ne,K,G]}],animate:[{animate:["none",j,K,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,K,G]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:pe()}],"scale-x":[{"scale-x":pe()}],"scale-y":[{"scale-y":pe()}],"scale-z":[{"scale-z":pe()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[K,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ae()}],"translate-x":[{"translate-x":Ae()}],"translate-y":[{"translate-y":Ae()}],"translate-z":[{"translate-z":Ae()}],"translate-none":["translate-none"],zoom:[{zoom:[Fe,K,G]}],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",K,G]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":H()}],"scrollbar-track-color":[{"scrollbar-track":H()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",K,G]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[ne,Ot,xt,Sn]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Cl=nl($l);function y(...e){return Cl(oa(e))}const En=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Mn=oa,El=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return Mn(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 b=En(f)||En(p);return a[d][b]}),c=r&&Object.entries(r).reduce((d,f)=>{let[p,b]=f;return b===void 0||(d[p]=b),d},{}),u=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,f)=>{let g=f,{class:p,className:b}=g,h=z(g,["class","className"]);return Object.entries(h).every(w=>{let[v,x]=w;return Array.isArray(x)?x.includes(M(M({},o),c)[v]):M(M({},o),c)[v]===x})?[...d,p,b]:d},[]);return Mn(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},he=(e,t)=>{const r=El(e,t);return(s=>{const a=r(s);return y(a)})};function wa(...e){return t=>{for(const r of e)r&&(typeof r=="function"?r(t):r.current=t)}}class Ie{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 Ml={fast:Ie.create("fast"),base:Ie.create("base"),slow:Ie.create("slow"),slower:Ie.create("slower"),colors:Ie.createTransition(["color","background-color","border-color"],"base"),opacity:Ie.createTransition("opacity","fast"),transform:Ie.createTransition("transform","base"),all:Ie.createTransition("all","base")};function Tl(e,t){return Ie.create(e,t)}function ye(e,t="ease-in-out"){const r=Ie.create(e,t);return`${r.duration.tailwind} ${r.easing.tailwind}`}function Al(e,t="base",r="ease-in-out"){return Ie.createTransition(e,t,r).tailwind}class Re{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 Tn={base:Re.create("base"),dropdown:Re.create("dropdown"),sticky:Re.create("sticky"),fixed:Re.create("fixed"),"modal-backdrop":Re.create("modal-backdrop"),modal:Re.create("modal"),popover:Re.create("popover"),tooltip:Re.create("tooltip"),toast:Re.create("toast")};function Rl(e){return Re.create(e)}function xe(e){return Re.create(e).tailwind}class ka{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]}}}function Il(e){return ka.create(e)}function Dl(e){return ka.create(e).tailwind}var or={exports:{}},zt={};var An;function _l(){if(An)return zt;An=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(s,a,o){var i=null;if(o!==void 0&&(i=""+o),a.key!==void 0&&(i=""+a.key),"key"in a){o={};for(var c in a)c!=="key"&&(o[c]=a[c])}else o=a;return a=o.ref,{$$typeof:e,type:s,key:i,ref:a!==void 0?a:null,props:o}}return zt.Fragment=t,zt.jsx=r,zt.jsxs=r,zt}var Vt={};var Rn;function Fl(){return Rn||(Rn=1,process.env.NODE_ENV!=="production"&&(function(){function e(L){if(L==null)return null;if(typeof L=="function")return L.$$typeof===D?null:L.displayName||L.name||null;if(typeof L=="string")return L;switch(L){case v:return"Fragment";case j:return"Profiler";case x:return"StrictMode";case S:return"Suspense";case I:return"SuspenseList";case F:return"Activity"}if(typeof L=="object")switch(typeof L.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),L.$$typeof){case w:return"Portal";case k:return L.displayName||"Context";case N:return(L._context.displayName||"Context")+".Consumer";case $:var Y=L.render;return L=L.displayName,L||(L=Y.displayName||Y.name||"",L=L!==""?"ForwardRef("+L+")":"ForwardRef"),L;case C:return Y=L.displayName||null,Y!==null?Y:e(L.type)||"Memo";case A:Y=L._payload,L=L._init;try{return e(L(Y))}catch(ee){}}return null}function t(L){return""+L}function r(L){try{var Y=!1}catch(te){Y=!0}if(Y){Y=console;var ee=Y.error,J=typeof Symbol=="function"&&Symbol.toStringTag&&L[Symbol.toStringTag]||L.constructor.name||"Object";return ee.call(Y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",J),t(L)}}function s(L){if(L===v)return"<>";if(typeof L=="object"&&L!==null&&L.$$typeof===A)return"<...>";try{var Y=e(L);return Y?"<"+Y+">":"<...>"}catch(ee){return"<...>"}}function a(){var L=T.A;return L===null?null:L.getOwner()}function o(){return Error("react-stack-top-frame")}function i(L){if(R.call(L,"key")){var Y=Object.getOwnPropertyDescriptor(L,"key").get;if(Y&&Y.isReactWarning)return!1}return L.key!==void 0}function c(L,Y){function ee(){B||(B=!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)",Y))}ee.isReactWarning=!0,Object.defineProperty(L,"key",{get:ee,configurable:!0})}function u(){var L=e(this.type);return X[L]||(X[L]=!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.")),L=this.props.ref,L!==void 0?L:null}function d(L,Y,ee,J,te,ae){var O=ee.ref;return L={$$typeof:g,type:L,key:Y,props:ee,_owner:J},(O!==void 0?O:null)!==null?Object.defineProperty(L,"ref",{enumerable:!1,get:u}):Object.defineProperty(L,"ref",{enumerable:!1,value:null}),L._store={},Object.defineProperty(L._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(L,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(L,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.defineProperty(L,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ae}),Object.freeze&&(Object.freeze(L.props),Object.freeze(L)),L}function f(L,Y,ee,J,te,ae){var O=Y.children;if(O!==void 0)if(J)if(_(O)){for(J=0;J<O.length;J++)p(O[J]);Object.freeze&&Object.freeze(O)}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(O);if(R.call(Y,"key")){O=e(L);var W=Object.keys(Y).filter(function(ce){return ce!=="key"});J=0<W.length?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}",H[O+J]||(W=0<W.length?"{"+W.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ "use client";"use strict";var oi=Object.defineProperty,ii=Object.defineProperties;var li=Object.getOwnPropertyDescriptors;var rr=Object.getOwnPropertySymbols;var vn=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable;var Xr=(e,t,r)=>t in e?oi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t)=>{for(var r in t||(t={}))vn.call(t,r)&&Xr(e,r,t[r]);if(rr)for(var r of rr(t))yn.call(t,r)&&Xr(e,r,t[r]);return e},F=(e,t)=>ii(e,li(t));var z=(e,t)=>{var r={};for(var s in e)vn.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&rr)for(var s of rr(e))t.indexOf(s)<0&&yn.call(e,s)&&(r[s]=e[s]);return r};var wn=(e,t,r)=>Xr(e,typeof t!="symbol"?t+"":t,r);var sr=(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"),Ye=require("react-dom");function ci(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Se=ci(l),rt={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 di(e){return e<=0?rt.spacing.itemPaddingX:e===1?rt.spacing.nestedIndent:e===2?rt.spacing.nestedIndentLevel2:e===3?rt.spacing.nestedIndentLevel3:`pl-${4+e*4}`}class ve{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)}}wn(ve,"BASE_UNIT",4);const yr={none:ve.create(0),"0.5":ve.create(.5),xs:ve.create(1),"1.5":ve.create(1.5),sm:ve.create(2),"2.5":ve.create(2.5),md:ve.create(3),"3.5":ve.create(3.5),base:ve.create(4),lg:ve.create(6),xl:ve.create(8),"2xl":ve.create(10),"3xl":ve.create(12),"4xl":ve.create(16),"5xl":ve.create(20),"6xl":ve.create(24)};function ui(e){return yr[e]}function m(e,t="p"){const s=yr[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-x":"space-x","space-y":"space-y"}[t]}-${s}`}class ge{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 fi={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"}},mi={light:ge.createFontWeight("light"),normal:ge.createFontWeight("normal"),medium:ge.createFontWeight("medium"),semibold:ge.createFontWeight("semibold"),bold:ge.createFontWeight("bold")},wt={h1:ge.create("4xl","tight","bold"),h2:ge.create("3xl","tight","bold"),h3:ge.create("2xl","snug","semibold"),h4:ge.create("xl","snug","semibold"),h5:ge.create("lg","normal","medium"),h6:ge.create("base","normal","medium"),body:ge.create("base","relaxed","normal"),bodySmall:ge.create("sm","relaxed","normal"),bodyLarge:ge.create("lg","relaxed","normal"),label:ge.create("sm","normal","medium"),caption:ge.create("xs","normal","normal"),button:ge.create("base","normal","medium")};function pi(e){return wt[e]}function ue(e){const t=wt[e];return`${t.fontSize.tailwind} ${t.lineHeight.tailwind} ${t.fontWeight.tailwind}`}function re(e){return wt[e].fontSize.tailwind}function je(e){return ge.createFontSize(e).tailwind}function ze(e){return wt[e].fontWeight.tailwind}function It(e){return ge.createFontWeight(e).tailwind}function bi(e){return wt[e].lineHeight.tailwind}const gi=[50,100,200,300,400,500,600,700,800,900,950];function de(e,t,r){const s=hi(e),a=xi(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function hi(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 xi(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 st={50:de("#f0f4f8","brand-primary",50),100:de("#d9e2ec","brand-primary",100),200:de("#bcccdc","brand-primary",200),300:de("#9fb3c8","brand-primary",300),400:de("#7390ad","brand-primary",400),500:de("#486581","brand-primary",500),600:de("#334e68","brand-primary",600),700:de("#243b53","brand-primary",700),800:de("#1a2a3a","brand-primary",800),900:de("#102a43","brand-primary",900),950:de("#061a35","brand-primary",950)},nt={50:de("#f7f5ff","brand-secondary",50),100:de("#eee9ff","brand-secondary",100),200:de("#e0d6ff","brand-secondary",200),300:de("#cbb8ff","brand-secondary",300),400:de("#aa89fc","brand-secondary",400),500:de("#8e58f2","brand-secondary",500),600:de("#703bc8","brand-secondary",600),700:de("#582aa2","brand-secondary",700),800:de("#44227e","brand-secondary",800),900:de("#32185d","brand-secondary",900),950:de("#180635","brand-secondary",950)};function E(e,t,r){const s=vi(e),a=yi(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function vi(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 yi(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 Un={50:E("#eef2ff","indigo",50),100:E("#e0e7ff","indigo",100),200:E("#c7d2fe","indigo",200),300:E("#a5b4fc","indigo",300),400:E("#818cf8","indigo",400),500:E("#6366f1","indigo",500),600:E("#4f46e5","indigo",600),700:E("#4338ca","indigo",700),800:E("#3730a3","indigo",800),900:E("#312e81","indigo",900),950:E("#1e1b4b","indigo",950)},Gn={50:E("#f5f3ff","violet",50),100:E("#ede9fe","violet",100),200:E("#ddd6fe","violet",200),300:E("#c4b5fd","violet",300),400:E("#a78bfa","violet",400),500:E("#8b5cf6","violet",500),600:E("#7c3aed","violet",600),700:E("#6d28d9","violet",700),800:E("#5b21b6","violet",800),900:E("#4c1d95","violet",900),950:E("#2e1065","violet",950)},at={50:E("#ecfeff","cyan",50),100:E("#cffafe","cyan",100),200:E("#a5f3fc","cyan",200),300:E("#67e8f9","cyan",300),400:E("#22d3ee","cyan",400),500:E("#06b6d4","cyan",500),600:E("#0891b2","cyan",600),700:E("#0e7490","cyan",700),800:E("#155e75","cyan",800),900:E("#164e63","cyan",900),950:E("#083344","cyan",950)},ot={50:E("#f8fafc","slate",50),100:E("#f1f5f9","slate",100),200:E("#e2e8f0","slate",200),300:E("#cbd5e1","slate",300),400:E("#94a3b8","slate",400),500:E("#64748b","slate",500),600:E("#475569","slate",600),700:E("#334155","slate",700),800:E("#1e293b","slate",800),900:E("#0f172a","slate",900),950:E("#020617","slate",950)},Kn={50:E("#f9fafb","gray",50),100:E("#f3f4f6","gray",100),200:E("#e5e7eb","gray",200),300:E("#d1d5db","gray",300),400:E("#9ca3af","gray",400),500:E("#6b7280","gray",500),600:E("#4b5563","gray",600),700:E("#374151","gray",700),800:E("#1f2937","gray",800),900:E("#111827","gray",900),950:E("#030712","gray",950)},it={50:E("#ecfdf5","emerald",50),100:E("#d1fae5","emerald",100),200:E("#a7f3d0","emerald",200),300:E("#6ee7b7","emerald",300),400:E("#34d399","emerald",400),500:E("#10b981","emerald",500),600:E("#059669","emerald",600),700:E("#047857","emerald",700),800:E("#065f46","emerald",800),900:E("#064e3b","emerald",900),950:E("#022c22","emerald",950)},Yn={50:E("#f0fdf4","green",50),100:E("#dcfce7","green",100),200:E("#bbf7d0","green",200),300:E("#86efac","green",300),400:E("#4ade80","green",400),500:E("#22c55e","green",500),600:E("#16a34a","green",600),700:E("#15803d","green",700),800:E("#166534","green",800),900:E("#14532d","green",900),950:E("#052e16","green",950)},lt={50:E("#fffbeb","amber",50),100:E("#fef3c7","amber",100),200:E("#fde68a","amber",200),300:E("#fcd34d","amber",300),400:E("#fbbf24","amber",400),500:E("#f59e0b","amber",500),600:E("#d97706","amber",600),700:E("#b45309","amber",700),800:E("#92400e","amber",800),900:E("#78350f","amber",900),950:E("#451a03","amber",950)},qn={50:E("#fefce8","yellow",50),100:E("#fef9c3","yellow",100),200:E("#fef08a","yellow",200),300:E("#fde047","yellow",300),400:E("#facc15","yellow",400),500:E("#eab308","yellow",500),600:E("#ca8a04","yellow",600),700:E("#a16207","yellow",700),800:E("#854d0e","yellow",800),900:E("#713f12","yellow",900),950:E("#422006","yellow",950)},Xn={50:E("#fff7ed","orange",50),100:E("#ffedd5","orange",100),200:E("#fed7aa","orange",200),300:E("#fdba74","orange",300),400:E("#fb923c","orange",400),500:E("#f97316","orange",500),600:E("#ea580c","orange",600),700:E("#c2410c","orange",700),800:E("#9a3412","orange",800),900:E("#7c2d12","orange",900),950:E("#431407","orange",950)},ct={50:E("#fff1f2","rose",50),100:E("#ffe4e6","rose",100),200:E("#fecdd3","rose",200),300:E("#fda4af","rose",300),400:E("#fb7185","rose",400),500:E("#f43f5e","rose",500),600:E("#e11d48","rose",600),700:E("#be123c","rose",700),800:E("#9f1239","rose",800),900:E("#881337","rose",900),950:E("#4c0519","rose",950)},Jn={50:E("#fef2f2","red",50),100:E("#fee2e2","red",100),200:E("#fecaca","red",200),300:E("#fca5a5","red",300),400:E("#f87171","red",400),500:E("#ef4444","red",500),600:E("#dc2626","red",600),700:E("#b91c1c","red",700),800:E("#991b1b","red",800),900:E("#7f1d1d","red",900),950:E("#450a0a","red",950)},dt={50:E("#f0f9ff","sky",50),100:E("#e0f2fe","sky",100),200:E("#bae6fd","sky",200),300:E("#7dd3fc","sky",300),400:E("#38bdf8","sky",400),500:E("#0ea5e9","sky",500),600:E("#0284c7","sky",600),700:E("#0369a1","sky",700),800:E("#075985","sky",800),900:E("#0c4a6e","sky",900),950:E("#082f49","sky",950)},Zn={50:E("#eff6ff","blue",50),100:E("#dbeafe","blue",100),200:E("#bfdbfe","blue",200),300:E("#93c5fd","blue",300),400:E("#60a5fa","blue",400),500:E("#3b82f6","blue",500),600:E("#2563eb","blue",600),700:E("#1d4ed8","blue",700),800:E("#1e40af","blue",800),900:E("#1e3a8a","blue",900),950:E("#172554","blue",950)},Qn={50:E("#fdf4ff","fuchsia",50),100:E("#fae8ff","fuchsia",100),200:E("#f5d0fe","fuchsia",200),300:E("#f0abfc","fuchsia",300),400:E("#e879f9","fuchsia",400),500:E("#d946ef","fuchsia",500),600:E("#c026d3","fuchsia",600),700:E("#a21caf","fuchsia",700),800:E("#86198f","fuchsia",800),900:E("#701a75","fuchsia",900),950:E("#4a044e","fuchsia",950)},ea={50:E("#fdf2f8","pink",50),100:E("#fce7f3","pink",100),200:E("#fbcfe8","pink",200),300:E("#f9a8d4","pink",300),400:E("#f472b6","pink",400),500:E("#ec4899","pink",500),600:E("#db2777","pink",600),700:E("#be185d","pink",700),800:E("#9d174d","pink",800),900:E("#831843","pink",900),950:E("#500724","pink",950)},ta={50:E("#faf5ff","purple",50),100:E("#f3e8ff","purple",100),200:E("#e9d5ff","purple",200),300:E("#d8b4fe","purple",300),400:E("#c084fc","purple",400),500:E("#a855f7","purple",500),600:E("#9333ea","purple",600),700:E("#7e22ce","purple",700),800:E("#6b21a8","purple",800),900:E("#581c87","purple",900),950:E("#3b0764","purple",950)},ra={50:E("#f0fdfa","teal",50),100:E("#ccfbf1","teal",100),200:E("#99f6e4","teal",200),300:E("#5eead4","teal",300),400:E("#2dd4bf","teal",400),500:E("#14b8a6","teal",500),600:E("#0d9488","teal",600),700:E("#0f766e","teal",700),800:E("#115e59","teal",800),900:E("#134e4a","teal",900),950:E("#042f2e","teal",950)},sa={50:E("#f7fee7","lime",50),100:E("#ecfccb","lime",100),200:E("#d9f99d","lime",200),300:E("#bef264","lime",300),400:E("#a3e635","lime",400),500:E("#84cc16","lime",500),600:E("#65a30d","lime",600),700:E("#4d7c0f","lime",700),800:E("#3f6212","lime",800),900:E("#365314","lime",900),950:E("#1a2e05","lime",950)},bs={"brand-primary":st,"brand-secondary":nt,indigo:Un,violet:Gn,cyan:at,slate:ot,gray:Kn,emerald:it,green:Yn,amber:lt,yellow:qn,orange:Xn,rose:ct,red:Jn,sky:dt,blue:Zn,fuchsia:Qn,pink:ea,purple:ta,teal:ra,lime:sa};function Ft(e,t){return bs[e][t]}function wi(e){return bs[e]}const Kt={primary:{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"}},secondary:{light:nt[400],DEFAULT:nt[500],dark:nt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{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"}},success:{light:it[400],DEFAULT:it[500],dark:it[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},warning:{light:lt[400],DEFAULT:lt[500],dark:lt[600],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:ct[400],DEFAULT:ct[500],dark:ct[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:dt[400],DEFAULT:dt[500],dark:dt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:ot[100],DEFAULT:ot[500],dark:ot[700],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},wr={primary:{light:st[500],DEFAULT:st[400],dark:st[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:nt[500],DEFAULT:nt[400],dark:nt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:at[500],DEFAULT:at[400],dark:at[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},success:{light:it[500],DEFAULT:it[400],dark:it[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},warning:{light:lt[500],DEFAULT:lt[400],dark:lt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:ct[500],DEFAULT:ct[400],dark:ct[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:dt[500],DEFAULT:dt[400],dark:dt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:ot[700],DEFAULT:ot[400],dark:ot[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},ki=Kt;function Ut(e,t="DEFAULT",r="light"){return(r==="dark"?wr:Kt)[e][t]}function ji(e,t="light"){return(t==="dark"?wr:Kt)[e]}function Ni(e,t,r={}){const{format:s="hex",opacity:a}=r,o=Ft(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;default:i=o.hex}return i}function Si(e,t="DEFAULT",r={}){const{format:s="hex",opacity:a}=r,o=Ut(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;default:i=o.hex}return i}function $i(e,t,r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Ft(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 Ci(e,t="DEFAULT",r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Ut(e,t),d=[`${s}-${c.tailwind}`];if(a){const f=Ut(e,t==="DEFAULT"?"dark":"DEFAULT");d.push(`hover:${s}-${f.tailwind}`)}if(o&&d.push(`focus:${s}-${c.tailwind}`),i){const f=Ut(e,"dark");d.push(`active:${s}-${f.tailwind}`)}return d.join(" ")}function Ei(e,t,r="bg"){const s=Ft(e,t);return`hover:${r}-${s.tailwind}`}function Mi(e,t,r="border"){const s=Ft(e,t);return`focus:${r}-${s.tailwind}`}function Ti(e,t){return`focus:ring-${Ft(e,t).tailwind}`}function Ai(e,t){return`rgba(${e.rgb}, ${t})`}function na(e){const t=is(e);return t?.299*t[0]+.587*t[1]+.114*t[2]>128:!0}function Ri(e){return na(e)?"#000000":"#ffffff"}function is(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 gs(e,t,r=.5){const s=is(e),a=is(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 Ii(e,t){return gs(e,"#ffffff",t/100)}function Di(e,t){return gs(e,"#000000",t/100)}const _i={primary:{name:"brand-primary",light:400,default:500,dark:600},secondary:{name:"brand-secondary",light:400,default:500,dark:600},accent:{name:"cyan",light:400,default:500,dark:600}};class Tt{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 kr={sm:Tt.create("sm"),md:Tt.create("md"),lg:Tt.create("lg"),xl:Tt.create("xl"),"2xl":Tt.create("2xl")};function Li(e){return kr[e]}function Fi(e,t="min"){const r=kr[e];return`@media (${t==="min"?"min-width":"max-width"}: ${r.px})`}function aa(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=aa(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function oa(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=aa(e))&&(s&&(s+=" "),s+=t);return s}const Pi=(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},Oi=(e,t)=>({classGroupId:e,validator:t}),ia=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),fr="-",kn=[],zi="arbitrary..",Vi=e=>{const t=Hi(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Wi(i);const c=i.split(fr),u=c[0]===""&&c.length>1?1:0;return la(c,u,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const u=s[i],d=r[i];return u?d?Pi(d,u):u:d||kn}return r[i]||kn}}},la=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const d=la(e,t+1,o);if(d)return d}const i=r.validators;if(i===null)return;const c=t===0?e.join(fr):e.slice(t).join(fr),u=i.length;for(let d=0;d<u;d++){const f=i[d];if(f.validator(c))return f.classGroupId}},Wi=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?zi+s:void 0})(),Hi=e=>{const{theme:t,classGroups:r}=e;return Bi(r,t)},Bi=(e,t)=>{const r=ia();for(const s in e){const a=e[s];hs(a,r,s,t)}return r},hs=(e,t,r,s)=>{const a=e.length;for(let o=0;o<a;o++){const i=e[o];Ui(i,t,r,s)}},Ui=(e,t,r,s)=>{if(typeof e=="string"){Gi(e,t,r);return}if(typeof e=="function"){Ki(e,t,r,s);return}Yi(e,t,r,s)},Gi=(e,t,r)=>{const s=e===""?t:ca(t,e);s.classGroupId=r},Ki=(e,t,r,s)=>{if(qi(e)){hs(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Oi(r,e))},Yi=(e,t,r,s)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[c,u]=a[i];hs(u,ca(t,c),r,s)}},ca=(e,t)=>{let r=e;const s=t.split(fr),a=s.length;for(let o=0;o<a;o++){const i=s[o];let c=r.nextPart.get(i);c||(c=ia(),r.nextPart.set(i,c)),r=c}return r},qi=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Xi=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)}}},ls="!",jn=":",Ji=[],Nn=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),Zi=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 w=0;w<f;w++){const y=a[w];if(i===0&&c===0){if(y===jn){o.push(a.slice(u,w)),u=w+1;continue}if(y==="/"){d=w;continue}}y==="["?i++:y==="]"?i--:y==="("?c++:y===")"&&c--}const p=o.length===0?a:a.slice(u);let b=p,g=!1;p.endsWith(ls)?(b=p.slice(0,-1),g=!0):p.startsWith(ls)&&(b=p.slice(1),g=!0);const x=d&&d>u?d-u:void 0;return Nn(o,g,b,x)};if(t){const a=t+jn,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):Nn(Ji,!1,i,void 0,!0)}if(r){const a=s;s=o=>r({className:o,parseClassName:a})}return s},Qi=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}},el=e=>M({cache:Xi(e.cacheSize),parseClassName:Zi(e),sortModifiers:Qi(e),postfixLookupClassGroupIds:tl(e)},Vi(e)),tl=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let s=0;s<r.length;s++)t[r[s]]=!0;return t},rl=/\s+/,sl=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o,postfixLookupClassGroupIds:i}=t,c=[],u=e.trim().split(rl);let d="";for(let f=u.length-1;f>=0;f-=1){const p=u[f],{isExternal:b,modifiers:g,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:y}=r(p);if(b){d=p+(d.length>0?" "+d:d);continue}let h=!!y,j;if(h){const I=w.substring(0,y);j=s(I);const C=j&&i[j]?s(w):void 0;C&&C!==j&&(j=C,h=!1)}else j=s(w);if(!j){if(!h){d=p+(d.length>0?" "+d:d);continue}if(j=s(w),!j){d=p+(d.length>0?" "+d:d);continue}h=!1}const N=g.length===0?"":g.length===1?g[0]:o(g).join(":"),k=x?N+ls:N,$=k+j;if(c.indexOf($)>-1)continue;c.push($);const S=a(j,h);for(let I=0;I<S.length;++I){const C=S[I];c.push(k+C)}d=p+(d.length>0?" "+d:d)}return d},nl=(...e)=>{let t=0,r,s,a="";for(;t<e.length;)(r=e[t++])&&(s=da(r))&&(a&&(a+=" "),a+=s);return a},da=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=da(e[s]))&&(r&&(r+=" "),r+=t);return r},al=(e,...t)=>{let r,s,a,o;const i=u=>{const d=t.reduce((f,p)=>p(f),e());return r=el(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=sl(u,r);return a(u,f),f};return o=i,(...u)=>o(nl(...u))},ol=[],xe=e=>{const t=r=>r[e]||ol;return t.isThemeGetter=!0,t},ua=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fa=/^\((?:(\w[\w-]*):)?(.+)\)$/i,il=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ll=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cl=/\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$/,dl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ul=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ze=e=>il.test(e),ne=e=>!!e&&!Number.isNaN(Number(e)),Le=e=>!!e&&Number.isInteger(Number(e)),Jr=e=>e.endsWith("%")&&ne(e.slice(0,-1)),He=e=>ll.test(e),ma=()=>!0,ml=e=>cl.test(e)&&!dl.test(e),xs=()=>!1,pl=e=>ul.test(e),bl=e=>fl.test(e),gl=e=>!G(e)&&!K(e),hl=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),xl=e=>mt(e,ga,xs),G=e=>ua.test(e),ht=e=>mt(e,ha,ml),Sn=e=>mt(e,$l,ne),vl=e=>mt(e,va,ma),yl=e=>mt(e,xa,xs),$n=e=>mt(e,pa,xs),wl=e=>mt(e,ba,bl),nr=e=>mt(e,ya,pl),K=e=>fa.test(e),Ot=e=>kt(e,ha),kl=e=>kt(e,xa),Cn=e=>kt(e,pa),jl=e=>kt(e,ga),Nl=e=>kt(e,ba),ar=e=>kt(e,ya,!0),Sl=e=>kt(e,va,!0),mt=(e,t,r)=>{const s=ua.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},kt=(e,t,r=!1)=>{const s=fa.exec(e);return s?s[1]?t(s[1]):r:!1},pa=e=>e==="position"||e==="percentage",ba=e=>e==="image"||e==="url",ga=e=>e==="length"||e==="size"||e==="bg-size",ha=e=>e==="length",$l=e=>e==="number",xa=e=>e==="family-name",va=e=>e==="number"||e==="weight",ya=e=>e==="shadow",Cl=()=>{const e=xe("color"),t=xe("font"),r=xe("text"),s=xe("font-weight"),a=xe("tracking"),o=xe("leading"),i=xe("breakpoint"),c=xe("container"),u=xe("spacing"),d=xe("radius"),f=xe("shadow"),p=xe("inset-shadow"),b=xe("text-shadow"),g=xe("drop-shadow"),x=xe("blur"),w=xe("perspective"),y=xe("aspect"),h=xe("ease"),j=xe("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...k(),K,G],S=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],C=()=>[K,G,u],A=()=>[Ze,"full","auto",...C()],L=()=>[Le,"none","subgrid",K,G],D=()=>["auto",{span:["full",Le,K,G]},Le,K,G],T=()=>[Le,"auto",K,G],R=()=>["auto","min","max","fr",K,G],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...C()],X=()=>[Ze,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],Z=()=>[Ze,"screen","full","dvw","lvw","svw","min","max","fit",...C()],oe=()=>[Ze,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],H=()=>[e,K,G],P=()=>[...k(),Cn,$n,{position:[K,G]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",jl,xl,{size:[K,G]}],J=()=>[Jr,Ot,ht],te=()=>["","none","full",d,K,G],ae=()=>["",ne,Ot,ht],O=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[ne,Jr,Cn,$n],ce=()=>["","none",x,K,G],ie=()=>["none",ne,K,G],be=()=>["none",ne,K,G],we=()=>[ne,K,G],Ae=()=>[Ze,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[He],breakpoint:[He],color:[ma],container:[He],"drop-shadow":[He],ease:["in","out","in-out"],font:[gl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[He],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[He],shadow:[He],spacing:["px",ne],text:[He],"text-shadow":[He],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ze,G,K,y]}],container:["container"],"container-type":[{"@container":["","normal","size",K,G]}],"container-named":[hl],columns:[{columns:[ne,G,K,c]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:$()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Le,"auto",K,G]}],basis:[{basis:[Ze,"full","auto",c,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ne,Ze,"auto","initial","none",G]}],grow:[{grow:["",ne,K,G]}],shrink:[{shrink:["",ne,K,G]}],order:[{order:[Le,"first","last","none",K,G]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...oe()]}],"min-block-size":[{"min-block":["auto",...oe()]}],"max-block-size":[{"max-block":["none",...oe()]}],w:[{w:[c,"screen",...X()]}],"min-w":[{"min-w":[c,"screen","none",...X()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Ot,ht]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Sl,vl]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jr,G]}],"font-family":[{font:[kl,yl,t]}],"font-features":[{"font-features":[G]}],"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,K,G]}],"line-clamp":[{"line-clamp":[ne,"none",K,Sn]}],leading:[{leading:[o,...C()]}],"list-image":[{"list-image":["none",K,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",K,ht]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[ne,"auto",K,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[Le,K,G]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,G]}],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",K,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Le,K,G],radial:["",K,G],conic:[Le,K,G]},Nl,wl]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...O(),"hidden","none"]}],"divide-style":[{divide:[...O(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...O(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,K,G]}],"outline-w":[{outline:["",ne,Ot,ht]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",f,ar,nr]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",p,ar,nr]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[ne,ht]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",b,ar,nr]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[ne,K,G]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"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":[ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,G]}],filter:[{filter:["","none",K,G]}],blur:[{blur:ce()}],brightness:[{brightness:[ne,K,G]}],contrast:[{contrast:[ne,K,G]}],"drop-shadow":[{"drop-shadow":["","none",g,ar,nr]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",ne,K,G]}],"hue-rotate":[{"hue-rotate":[ne,K,G]}],invert:[{invert:["",ne,K,G]}],saturate:[{saturate:[ne,K,G]}],sepia:[{sepia:["",ne,K,G]}],"backdrop-filter":[{"backdrop-filter":["","none",K,G]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[ne,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[ne,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,K,G]}],"backdrop-invert":[{"backdrop-invert":["",ne,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[ne,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[ne,K,G]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,K,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",K,G]}],ease:[{ease:["linear","initial",h,K,G]}],delay:[{delay:[ne,K,G]}],animate:[{animate:["none",j,K,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,K,G]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[K,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ae()}],"translate-x":[{"translate-x":Ae()}],"translate-y":[{"translate-y":Ae()}],"translate-z":[{"translate-z":Ae()}],"translate-none":["translate-none"],zoom:[{zoom:[Le,K,G]}],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",K,G]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":H()}],"scrollbar-track-color":[{"scrollbar-track":H()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",K,G]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[ne,Ot,ht,Sn]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},El=al(Cl);function v(...e){return El(oa(e))}const En=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Mn=oa,Ml=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return Mn(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 b=En(f)||En(p);return a[d][b]}),c=r&&Object.entries(r).reduce((d,f)=>{let[p,b]=f;return b===void 0||(d[p]=b),d},{}),u=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,f)=>{let x=f,{class:p,className:b}=x,g=z(x,["class","className"]);return Object.entries(g).every(w=>{let[y,h]=w;return Array.isArray(h)?h.includes(M(M({},o),c)[y]):M(M({},o),c)[y]===h})?[...d,p,b]:d},[]);return Mn(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},pe=(e,t)=>{const r=Ml(e,t);return(s=>{const a=r(s);return v(a)})};function wa(...e){return t=>{for(const r of e)r&&(typeof r=="function"?r(t):r.current=t)}}class Ie{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 Tl={fast:Ie.create("fast"),base:Ie.create("base"),slow:Ie.create("slow"),slower:Ie.create("slower"),colors:Ie.createTransition(["color","background-color","border-color"],"base"),opacity:Ie.createTransition("opacity","fast"),transform:Ie.createTransition("transform","base"),all:Ie.createTransition("all","base")};function Al(e,t){return Ie.create(e,t)}function ye(e,t="ease-in-out"){const r=Ie.create(e,t);return`${r.duration.tailwind} ${r.easing.tailwind}`}function Rl(e,t="base",r="ease-in-out"){return Ie.createTransition(e,t,r).tailwind}class Re{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 Tn={base:Re.create("base"),dropdown:Re.create("dropdown"),sticky:Re.create("sticky"),fixed:Re.create("fixed"),"modal-backdrop":Re.create("modal-backdrop"),modal:Re.create("modal"),popover:Re.create("popover"),tooltip:Re.create("tooltip"),toast:Re.create("toast")};function Il(e){return Re.create(e)}function he(e){return Re.create(e).tailwind}class ka{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]}}}function Dl(e){return ka.create(e)}function _l(e){return ka.create(e).tailwind}var or={exports:{}},zt={};var An;function Ll(){if(An)return zt;An=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(s,a,o){var i=null;if(o!==void 0&&(i=""+o),a.key!==void 0&&(i=""+a.key),"key"in a){o={};for(var c in a)c!=="key"&&(o[c]=a[c])}else o=a;return a=o.ref,{$$typeof:e,type:s,key:i,ref:a!==void 0?a:null,props:o}}return zt.Fragment=t,zt.jsx=r,zt.jsxs=r,zt}var Vt={};var Rn;function Fl(){return Rn||(Rn=1,process.env.NODE_ENV!=="production"&&(function(){function e(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===D?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case y:return"Fragment";case j:return"Profiler";case h:return"StrictMode";case S:return"Suspense";case I:return"SuspenseList";case L: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 w:return"Portal";case k:return P.displayName||"Context";case N:return(P._context.displayName||"Context")+".Consumer";case $:var Y=P.render;return P=P.displayName,P||(P=Y.displayName||Y.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case C:return Y=P.displayName||null,Y!==null?Y:e(P.type)||"Memo";case A:Y=P._payload,P=P._init;try{return e(P(Y))}catch(ee){}}return null}function t(P){return""+P}function r(P){try{var Y=!1}catch(te){Y=!0}if(Y){Y=console;var ee=Y.error,J=typeof Symbol=="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return ee.call(Y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",J),t(P)}}function s(P){if(P===y)return"<>";if(typeof P=="object"&&P!==null&&P.$$typeof===A)return"<...>";try{var Y=e(P);return Y?"<"+Y+">":"<...>"}catch(ee){return"<...>"}}function a(){var P=T.A;return P===null?null:P.getOwner()}function o(){return Error("react-stack-top-frame")}function i(P){if(R.call(P,"key")){var Y=Object.getOwnPropertyDescriptor(P,"key").get;if(Y&&Y.isReactWarning)return!1}return P.key!==void 0}function c(P,Y){function ee(){B||(B=!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)",Y))}ee.isReactWarning=!0,Object.defineProperty(P,"key",{get:ee,configurable:!0})}function u(){var P=e(this.type);return X[P]||(X[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,Y,ee,J,te,ae){var O=ee.ref;return P={$$typeof:x,type:P,key:Y,props:ee,_owner:J},(O!==void 0?O: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:te}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ae}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function f(P,Y,ee,J,te,ae){var O=Y.children;if(O!==void 0)if(J)if(_(O)){for(J=0;J<O.length;J++)p(O[J]);Object.freeze&&Object.freeze(O)}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(O);if(R.call(Y,"key")){O=e(P);var W=Object.keys(Y).filter(function(ce){return ce!=="key"});J=0<W.length?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}",H[O+J]||(W=0<W.length?"{"+W.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,J,O,W,O),H[O+J]=!0)}if(O=null,ee!==void 0&&(r(ee),O=""+ee),i(Y)&&(r(Y.key),O=""+Y.key),"key"in Y){ee={};for(var q in Y)q!=="key"&&(ee[q]=Y[q])}else ee=Y;return O&&c(ee,typeof L=="function"?L.displayName||L.name||"Unknown":L),d(L,O,ee,a(),te,ae)}function p(L){b(L)?L._store&&(L._store.validated=1):typeof L=="object"&&L!==null&&L.$$typeof===A&&(L._payload.status==="fulfilled"?b(L._payload.value)&&L._payload.value._store&&(L._payload.value._store.validated=1):L._store&&(L._store.validated=1))}function b(L){return typeof L=="object"&&L!==null&&L.$$typeof===g}var h=l,g=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),k=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),T=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=Object.prototype.hasOwnProperty,_=Array.isArray,V=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(L){return L()}};var B,X={},Z=h.react_stack_bottom_frame.bind(h,o)(),oe=V(s(o)),H={};Vt.Fragment=v,Vt.jsx=function(L,Y,ee){var J=1e4>T.recentlyCreatedOwnerStacks++;return f(L,Y,ee,!1,J?Error("react-stack-top-frame"):Z,J?V(s(L)):oe)},Vt.jsxs=function(L,Y,ee){var J=1e4>T.recentlyCreatedOwnerStacks++;return f(L,Y,ee,!0,J?Error("react-stack-top-frame"):Z,J?V(s(L)):oe)}})()),Vt}var In;function Ll(){return In||(In=1,process.env.NODE_ENV==="production"?or.exports=_l():or.exports=Fl()),or.exports}var n=Ll();const ja=l.createContext(void 0);function Na({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"?Kt:wr,isDark:s==="dark"};return n.jsx(ja.Provider,{value:u,children:e})}function Pl(){const e=l.useContext(ja);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}const Ol={breakpoints:kr,spacing:yr,typography:wt,animations:Ml,features:{reducedMotion:!1,highContrast:!1,debug:!1},behavior:{defaultAnimationDuration:200,defaultTransitionDuration:150,focusVisible:!0}},Sa=l.createContext(void 0);function $a({children:e,config:t,strategy:r="default"}){const s=l.useMemo(()=>{const d=M({},Ol);return t?P(M(M({},d),t),{breakpoints:t.breakpoints||d.breakpoints,spacing:t.spacing||d.spacing,typography:t.typography||d.typography,animations:t.animations||d.animations,features:M(M({},d.features),t.features),behavior:M(M({},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(Sa.Provider,{value:u,children:e})}function zl(){const e=l.useContext(Sa);if(e===void 0)throw new Error("useConfig must be used within a ConfigProvider");return e}const jr=l.createContext(void 0);function vs(){const e=l.useContext(jr);if(!e)throw new Error("Toast components must be used within a ToastProvider");return e}function Vl(){return l.useContext(jr)}function Ca({children:e,defaultDuration:t=5e3,maxToasts:r=5}){const[s,a]=l.useState([]),o=l.useCallback(d=>{var b;const f=`toast-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,p=P(M({},d),{id:f,duration:(b=d.duration)!=null?b: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(jr.Provider,{value:u,children:e})}const Nr=l.createContext(void 0);function Pt(){const e=l.useContext(Nr);if(!e)throw new Error("Dialog components must be used within a Dialog component");return e}function Wl(){return l.useContext(Nr)}function Sr(e){const t=l.useRef(null);l.useEffect(()=>{var r;if(e)t.current=(r=document.activeElement)!=null?r:null;else{const s=t.current,a=setTimeout(()=>{s==null||s.focus()},0);return()=>clearTimeout(a)}},[e])}function ys({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,titleId:a,descriptionId:o}){const[i,c]=l.useState(r),u=t!==void 0?t:i,d=p=>{t===void 0&&c(p),s==null||s(p)};Sr(u),l.useEffect(()=>(u?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[u]);const f={isOpen:u,onOpenChange:d,onClose:()=>d(!1),titleId:a,descriptionId:o};return n.jsx(Nr.Provider,{value:f,children:e})}const Hl={ThemeProvider:Na,ConfigProvider:$a,ToastProvider:Ca,DialogProvider:ys},ir=Hl;function Bl(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(ir.DialogProvider,P(M({},o),{children:c}))),i.toast&&(c=n.jsx(ir.ToastProvider,P(M({},a),{children:c}))),i.config&&(c=n.jsx(ir.ConfigProvider,P(M({},s),{children:c}))),i.theme&&(c=n.jsx(ir.ThemeProvider,P(M({},r),{children:c}))),c}function Ul({children:e,config:t}){const r=l.useMemo(()=>Bl(e,t),[e,t]);return n.jsx(n.Fragment,{children:r})}function Gl(){return{}}class Qe{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 Kl={none:Qe.create("none"),sm:Qe.create("sm"),md:Qe.create("md"),lg:Qe.create("lg"),xl:Qe.create("xl"),"2xl":Qe.create("2xl"),"3xl":Qe.create("3xl"),full:Qe.create("full")};function U(e){return Kl[e].tailwind}function Yl(s){var a=s,{variant:e="info",className:t}=a,r=z(a,["variant","className"]);const o={warning:y("bg-warning-bg","text-warning-dark","border-warning"),error:y("bg-error-bg","text-error-dark","border-error"),info:y("bg-info-bg","text-info-dark","border-info")};return n.jsx("div",M({role:"alert",className:y("border",m("base","px"),m("sm","py"),U("lg"),o[e],t)},r))}const ql={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 Xl(d,u){var f=d,{variant:e="paragraph",bold:t,italic:r,className:s,as:a,colorRole:o="neutral",colorShade:i="dark"}=f,c=z(f,["variant","bold","italic","className","as","colorRole","colorShade"]);const p=[];let b;if(a)b=a;else switch(e){case"heading":b="h2";break;case"list":b="li";break;default:b="p";break}return e==="heading"?p.push(ue("h2")):e==="body"||e==="paragraph"?p.push(ue("body")):e==="bodySmall"?p.push(ue("bodySmall")):e==="bodyLarge"?p.push(ue("bodyLarge")):e==="caption"?p.push(ue("caption")):e==="label"?p.push(ue("label")):p.push(ue("body")),t&&p.push("font-bold"),r&&p.push("italic"),p.push(ql[o][i]),n.jsx(b,M({ref:u,className:y(...p,s)},c))}const $e=l.forwardRef(Xl);const Ea=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim();const Jl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Zl=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,s)=>s?s.toUpperCase():r.toLowerCase());const Dn=e=>{const t=Zl(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Zr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ql=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},ec=l.createContext({}),tc=()=>l.useContext(ec),rc=l.forwardRef((d,u)=>{var f=d,{color:e,size:t,strokeWidth:r,absoluteStrokeWidth:s,className:a="",children:o,iconNode:i}=f,c=z(f,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);var x,j,N;const{size:p=24,strokeWidth:b=2,absoluteStrokeWidth:h=!1,color:g="currentColor",className:w=""}=(x=tc())!=null?x:{},v=(s!=null?s:h)?Number(r!=null?r:b)*24/Number(t!=null?t:p):r!=null?r:b;return l.createElement("svg",M(M(P(M({ref:u},Zr),{width:(j=t!=null?t:p)!=null?j:Zr.width,height:(N=t!=null?t:p)!=null?N:Zr.height,stroke:e!=null?e:g,strokeWidth:v,className:Ea("lucide",w,a)}),!o&&!Ql(c)&&{"aria-hidden":"true"}),c),[...i.map(([k,$])=>l.createElement(k,$)),...Array.isArray(o)?o:[o]])});const le=(e,t)=>{const r=l.forwardRef((i,o)=>{var c=i,{className:s}=c,a=z(c,["className"]);return l.createElement(rc,M({ref:o,iconNode:t,className:Ea(`lucide-${Jl(Dn(e))}`,`lucide-${e}`,s)},a))});return r.displayName=Dn(e),r};const sc=[["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"}]],nc=le("calendar",sc);const ac=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],cs=le("check",ac);const oc=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$r=le("chevron-down",oc);const ic=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Gt=le("chevron-left",ic);const lc=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],yt=le("chevron-right",lc);const cc=[["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"}]],ws=le("circle-alert",cc);const dc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],mr=le("circle-check",dc);const uc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],fc=le("clock",uc);const mc=[["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"}]],pc=le("command",mc);const bc=[["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"}]],hc=le("download",bc);const xc=[["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"}]],gc=le("ellipsis-vertical",xc);const vc=[["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"}]],yc=le("eye-off",vc);const wc=[["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"}]],kc=le("eye",wc);const jc=[["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"}]],Nc=le("file",jc);const Sc=[["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"}]],$c=le("funnel",Sc);const Cc=[["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=le("grip-vertical",Cc);const Mc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Tc=le("info",Mc);const Ac=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ma=le("loader-circle",Ac);const Rc=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Ic=le("menu",Rc);const Dc=[["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"}]],_c=le("panel-left-close",Dc);const Fc=[["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"}]],Lc=le("panel-left-open",Fc);const Pc=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ds=le("search",Pc);const Oc=[["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"}]],Et=le("star",Oc);const zc=[["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"}]],Vc=le("triangle-alert",zc);const Wc=[["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=le("upload",Wc);const Bc=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ce=le("x",Bc);function _n(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Uc(...e){return t=>{let r=!1;const s=e.map(a=>{const o=_n(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a<s.length;a++){const o=s[a];typeof o=="function"?o():_n(e[a],null)}}}}function Gc(...e){return Se.useCallback(Uc(...e),e)}function Kc(e){const t=Se.forwardRef((r,s)=>{var h;let b=r,{children:a}=b,o=z(b,["children"]),i=null,c=!1;const u=[];Fn(a)&&typeof lr=="function"&&(a=lr(a._payload)),Se.Children.forEach(a,g=>{var w;if(Qc(g)){c=!0;const v=g;let x="child"in v.props?v.props.child:v.props.children;Fn(x)&&typeof lr=="function"&&(x=lr(x._payload)),i=Xc(v,x),u.push((w=i==null?void 0:i.props)==null?void 0:w.children)}else u.push(g)}),i?i=Se.cloneElement(i,void 0,u):!c&&Se.Children.count(a)===1&&Se.isValidElement(a)&&(i=a);const d=i?Zc(i):void 0,f=Gc(s,d);if(!i){if(a||a===0)throw new Error(c?sd(e):rd(e));return a}const p=Jc(o,(h=i.props)!=null?h:{});return i.type!==Se.Fragment&&(p.ref=s?f:d),Se.cloneElement(i,p)});return t.displayName=`${e}.Slot`,t}var Ta=Kc("Slot"),Aa=Symbol.for("radix.slottable");function Yc(e){const t=r=>"child"in r?r.children(r.child):r.children;return t.displayName=`${e}.Slottable`,t.__radixId=Aa,t}var qc=Yc("Slottable"),Xc=(e,t)=>{if("child"in e.props){const r=e.props.child;return Se.isValidElement(r)?Se.cloneElement(r,void 0,e.props.children(r.props.children)):null}return Se.isValidElement(t)?t:null};function Jc(e,t){const r=M({},t);for(const s in t){const a=e[s],o=t[s];/^on[A-Z]/.test(s)?a&&o?r[s]=(...c)=>{const u=o(...c);return a(...c),u}:a&&(r[s]=a):s==="style"?r[s]=M(M({},a),o):s==="className"&&(r[s]=[a,o].filter(Boolean).join(" "))}return M(M({},e),r)}function Zc(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Qc(e){return Se.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Aa}var ed=Symbol.for("react.lazy");function Fn(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ed&&"_payload"in e&&td(e._payload)}function td(e){return typeof e=="object"&&e!==null&&"then"in e}var rd=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,sd=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,lr=Se[" use ".trim().toString()];const nd=he("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"}}),ks=l.memo(function(i){var c=i,{size:t="md",variant:r="primary",label:s,className:a=""}=c,o=z(c,["size","variant","label","className"]);return n.jsxs("div",P(M({className:y("inline-flex","items-center",a),role:"status","aria-label":s||"Loading","aria-live":"polite"},o),{children:[n.jsx(Ma,{className:y(nd({size:t,variant:r})),"aria-hidden":"true"}),s&&n.jsx("span",{className:y(m("sm","ml"),re("bodySmall"),"text-fg-secondary","sr-only"),children:s})]}))});ks.displayName="Spinner";const ad=he(y("inline-flex","items-center","justify-center",ue("button").split(" ")[2]||"font-medium",U("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{primary:y("bg-surface-brand-strong","text-fg-inverse","hover:opacity-90","focus:ring-line-brand"),secondary:y("bg-surface-secondary","text-fg-inverse","hover:opacity-90","focus:ring-line-secondary"),error:y("bg-error","text-fg-inverse","hover:opacity-90","focus:ring-error"),outline:y("border-2","border-line-default","bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),ghost:y("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),iconOnly:y("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus",m("none","p")),link:y("bg-transparent","text-fg-brand","underline-offset-4","hover:underline","focus:ring-line-focus")},size:{sm:y(m("md","px"),m("1.5","py"),re("bodySmall"),m("1.5","gap")),md:y(m("base","px"),m("sm","py"),re("body"),m("sm","gap")),lg:y(m("lg","px"),m("md","py"),re("bodyLarge"),m("2.5","gap"))}},compoundVariants:[{variant:"iconOnly",size:"sm",class:y("h-8","w-8",m("none","p"))},{variant:"iconOnly",size:"md",class:y("h-10","w-10",m("none","p"))},{variant:"iconOnly",size:"lg",class:y("h-12","w-12",m("none","p"))},{variant:"link",size:"sm",class:y(m("none","px"),m("none","py"))},{variant:"link",size:"md",class:y(m("none","px"),m("none","py"))},{variant:"link",size:"lg",class:y(m("none","px"),m("none","py"))}],defaultVariants:{variant:"primary",size:"md"}});function cr({children:e,position:t}){return e?n.jsx("span",{className:`inline-flex items-center ${t==="left"?m("none","mr"):m("none","ml")}`,children:e}):null}const Q=l.memo(l.forwardRef(function(x,v){var j=x,{variant:t="primary",size:r="md",isLoading:s=!1,loadingText:a,loadingIcon:o,leftIcon:i,rightIcon:c,fullWidth:u=!1,asChild:d=!1,as:f,className:p="",disabled:b=!1,children:h,"aria-label":g}=j,w=z(j,["variant","size","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","asChild","as","className","disabled","children","aria-label"]);typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&d&&f!==void 0&&f!=="button"&&console.warn("[Button] `as` is ignored when `asChild` is true; the child element is used as the root. Drop one of the two props to silence this warning.");const N=d?Ta:f!=null?f:"button",k=l.useMemo(()=>y(ad({variant:t,size:r}),u&&"w-full",p),[t,r,u,p]),$=l.useMemo(()=>t==="iconOnly"||!h&&(i||c),[t,h,i,c]),S=l.useMemo(()=>$&&!g&&!h?"Button":g,[$,g,h]),I=l.useMemo(()=>t==="error"?"primary":t==="primary"||t==="secondary"?"neutral":"primary",[t]),C=l.useMemo(()=>r==="sm"?"sm":r==="lg"?"lg":"md",[r]),A=l.useMemo(()=>o||n.jsx(ks,{size:C,variant:I}),[o,C,I]),F=!d&&(f===void 0||f==="button")&&!w.type?"button":void 0,D=M(M({className:k,disabled:b||s,"aria-busy":s,"aria-label":S,"aria-disabled":b||s},F?{type:F}:{}),w);return d?n.jsxs(N,P(M({ref:v},D),{children:[i&&n.jsx(cr,{position:"left",children:i}),n.jsx(qc,{children:h}),c&&n.jsx(cr,{position:"right",children:c})]})):n.jsx(N,P(M({ref:v},D),{children:s?n.jsxs(n.Fragment,{children:[A,a&&n.jsx("span",{className:m("sm","ml"),children:a}),!a&&h&&n.jsx("span",{className:`${m("sm","ml")} opacity-0`,children:h})]}):n.jsxs(n.Fragment,{children:[i&&n.jsx(cr,{position:"left",children:i}),h,c&&n.jsx(cr,{position:"right",children:c})]})}))}));Q.displayName="Button";const od=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>y(m("xs","mt"),ue("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})}),Ee=l.memo(l.forwardRef(function(N,j){var k=N,{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:b="",disabled:h=!1,type:g="text",value:w,onChange:v}=k,x=z(k,["id","label","error","success","helperText","size","variant","leftIcon","rightIcon","showClearButton","onClear","className","disabled","type","value","onChange"]);const $=l.useId(),S=t||`input-${$}`,I=l.useMemo(()=>s?`${S}-error`:void 0,[s,S]),C=l.useMemo(()=>o?`${S}-helper`:void 0,[o,S]),[A,F]=l.useState(!1),D=l.useMemo(()=>g==="password",[g]),T=l.useMemo(()=>D&&A?"text":g,[D,A,g]),R=l.useMemo(()=>s?"error":a?"success":"default",[s,a]),_=l.useMemo(()=>w!=null&&w!=="",[w]),V=l.useMemo(()=>f&&_&&!h,[f,_,h]),B=l.useMemo(()=>"focus:border-line-focus",[]),X=l.useMemo(()=>"focus:border-error",[]),Z=l.useMemo(()=>"focus:border-success",[]),oe=l.useMemo(()=>B.replace("focus:border-","focus:ring-"),[B]),H=l.useCallback(W=>W==="error"?X.replace("focus:border-","focus:ring-"):Z.replace("focus:border-","focus:ring-"),[X,Z]),L=l.useMemo(()=>he(y("w-full",U("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{default:y("border-0","border-b-2","border-line-default","focus:border-line-focus"),outlined:y("border","border-line-default","focus:border-line-focus"),filled:y("bg-surface-muted","border-0","focus:bg-surface-base","focus:ring-2",oe)},size:{sm:y("h-8",re("bodySmall"),m("md","px")),md:y("h-10",re("body"),m("base","px")),lg:y("h-12",re("bodyLarge"),m("lg","px"))},state:{default:"",error:y("border-error","focus:border-error",H("error")),success:y("border-success","focus:border-success",H("success"))}},defaultVariants:{variant:"outlined",size:"md",state:"default"}}),[oe,H]),Y=l.useMemo(()=>y(L({variant:c,size:i,state:R}),u&&(i==="sm"?"pl-9":m(i==="lg"?"3xl":"2xl","pl")),(d||V||D)&&(i==="sm"?"pr-9":m(i==="lg"?"3xl":"2xl","pr")),b),[L,c,i,R,u,d,V,D,b]),ee=l.useMemo(()=>y("block",ue("label"),m("xs","mb"),h&&"opacity-50"),[h]),J=l.useMemo(()=>i==="sm"?"h-4 w-4":i==="lg"?"h-5 w-5":"h-4 w-4",[i]),te=l.useMemo(()=>i==="sm"?"top-2":i==="lg"?"top-3.5":"top-2.5",[i]),ae=l.useCallback(W=>{var q;if(W.stopPropagation(),p)p();else if(v){const ce=(q=W.currentTarget.closest(".relative"))==null?void 0:q.querySelector("input");if(ce){const ie={target:ce,currentTarget:ce,bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:2,isTrusted:!1,nativeEvent:new Event("change"),preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},timeStamp:Date.now()};Object.defineProperty(ie.target,"value",{value:"",writable:!0}),Object.defineProperty(ie.currentTarget,"value",{value:"",writable:!0}),v(ie)}}},[p,v]),O=l.useCallback(()=>{F(W=>!W)},[]);return n.jsxs("div",{className:"w-full",children:[r&&n.jsx("label",{htmlFor:S,className:ee,children:r}),n.jsxs("div",{className:"relative",children:[u&&n.jsx("div",{className:`absolute left-3 ${te} text-fg-secondary opacity-60 pointer-events-none`,children:n.jsx("div",{className:J,children:u})}),n.jsx("input",M({id:S,ref:j,type:T,className:Y,disabled:h,value:w,onChange:v,"aria-invalid":s,"aria-required":x.required,"aria-describedby":I||C,suppressHydrationWarning:!0},x)),n.jsxs("div",{className:`absolute right-3 top-0 bottom-0 flex items-center ${m("xs","gap")}`,children:[V&&n.jsx(Q,{variant:"ghost",size:"sm",onClick:ae,className:`h-auto ${m("xs","p")}`,"aria-label":"Clear input",children:n.jsx(Ce,{className:J})}),D&&n.jsx(Q,{variant:"ghost",size:"sm",onClick:O,className:`h-auto ${m("xs","p")}`,"aria-label":A?"Hide password":"Show password",children:A?n.jsx(yc,{className:J}):n.jsx(kc,{className:J})}),d&&!V&&!D&&n.jsx("div",{className:`text-fg-secondary opacity-60 pointer-events-none ${J}`,children:d})]})]}),(s||a||o)&&n.jsx(od,{error:s,success:a,helperText:o,errorId:I,helperId:C})]})}));Ee.displayName="Input";function Ra({href:e,active:t}){return{isActive:l.useMemo(()=>t!==void 0?t:!1,[t]),NextLink:void 0}}const id=he(y("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:y("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","focus:ring-line-brand"),underline:y("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","border-b-2","border-transparent","hover:border-current","focus:ring-line-brand"),background:y("text-fg-primary","hover:bg-surface-hover",U("md"),"focus:ring-line-brand")},size:{sm:y(m("sm","px"),m("xs","py"),re("bodySmall")),md:y(m("base","px"),m("sm","py"),re("body")),lg:y(m("lg","px"),m("md","py"),re("bodyLarge"))}},defaultVariants:{variant:"default",size:"md"},compoundVariants:[{variant:"underline",size:"sm",class:m("0.5","pb")},{variant:"underline",size:"md",class:m("xs","pb")},{variant:"underline",size:"lg",class:m("1.5","pb")},{variant:"background",size:"sm",class:m("xs","px")},{variant:"background",size:"md",class:m("sm","px")},{variant:"background",size:"lg",class:m("base","px")}]}),Cr=l.forwardRef(function(g,h){var w=g,{href:t,children:r,active:s,disabled:a=!1,variant:o="default",size:i="md",as:c,className:u,"aria-label":d,onClick:f,onKeyDown:p}=w,b=z(w,["href","children","active","disabled","variant","size","as","className","aria-label","onClick","onKeyDown"]);const v=l.useMemo(()=>s!==void 0?s:!1,[s]),{NextLink:x}=Ra({href:t,active:v}),j=c||x||"a",N=l.useMemo(()=>{if(!v)return"";switch(o){case"underline":return y("border-b-2","border-line-brand","text-fg-brand-emphasis");case"background":return y("bg-surface-brand-muted","text-fg-brand-emphasis");default:return y("text-fg-brand-emphasis","font-semibold")}},[v,o]),k=l.useCallback(I=>{if(a){I.preventDefault(),I.stopPropagation();return}f==null||f(I)},[a,f]),$=l.useCallback(I=>{if(a){(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),I.stopPropagation());return}p==null||p(I)},[a,p]),S=l.useMemo(()=>{const I=M({className:y(id({variant:o,size:i}),N,a&&"opacity-50 cursor-not-allowed pointer-events-none",u),"aria-current":v?"page":void 0,"aria-disabled":a?!0:void 0,"aria-label":d,tabIndex:a?-1:void 0,onClick:k,onKeyDown:$,"data-active":v,"data-disabled":a},b);return x&&!c?P(M({},I),{href:a?void 0:t}):P(M({},I),{href:a?void 0:t})},[o,i,N,a,u,v,d,k,$,t,x,c,b]);return n.jsx(j,P(M({ref:h},S),{children:r}))});Cr.displayName="NavLink";const ld=he(y("inline-flex","items-center","justify-center",ze("label"),U("md"),"border"),{variants:{variant:{success:"",warning:"",error:"",info:"",neutral:"",primary:"",secondary:""},size:{sm:y(m("1.5","px"),m("0.5","py"),re("caption")),md:y(m("sm","px"),m("xs","py"),re("caption")),lg:y(m("sm","px"),m("xs","py"),re("bodySmall"))},style:{solid:"",outline:""}},compoundVariants:[{variant:"success",style:"solid",class:y("bg-success-bg","text-success-dark","border-success")},{variant:"warning",style:"solid",class:y("bg-warning-bg","text-warning-dark","border-warning")},{variant:"error",style:"solid",class:y("bg-error-bg","text-error-dark","border-error")},{variant:"info",style:"solid",class:y("bg-info-bg","text-info-dark","border-info")},{variant:"neutral",style:"solid",class:y("bg-surface-muted","text-fg-primary","border-line-default")},{variant:"primary",style:"solid",class:y("bg-surface-brand-subtle","text-fg-brand-emphasis","border-line-brand")},{variant:"secondary",style:"solid",class:y("bg-pink-300","text-fg-brand-secondary-emphasis","border-line-secondary")},{variant:"success",style:"outline",class:y("bg-transparent","border-success","text-fg-success")},{variant:"warning",style:"outline",class:y("bg-transparent","border-warning","text-fg-warning")},{variant:"error",style:"outline",class:y("bg-transparent","border-error","text-fg-error")},{variant:"info",style:"outline",class:y("bg-transparent","border-info","text-fg-info")},{variant:"neutral",style:"outline",class:y("bg-transparent","border-line-default","text-fg-secondary")},{variant:"primary",style:"outline",class:y("bg-transparent","border-line-brand","text-fg-brand")},{variant:"secondary",style:"outline",class:y("bg-transparent","border-line-secondary","text-fg-brand-secondary")}],defaultVariants:{variant:"neutral",size:"md",style:"solid"}}),Ia=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=z(f,["variant","size","style","className","children","aria-label"]);const p=y(ld({variant:t,size:r,style:s}),a);let b;if(i)b=i;else if(typeof o=="string")b=o;else if(typeof o=="object"&&o!==null&&"props"in o){const h=o.props;h!=null&&h.children&&typeof h.children=="string"&&(b=h.children)}return n.jsx("span",P(M({ref:u,role:"status","aria-label":b,className:p},c),{children:o}))}));Ia.displayName="Badge";const cd=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>y(m("xs","mt"),ue("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})}),Er=l.memo(l.forwardRef(function(g,h){var w=g,{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}=w,b=z(w,["options","optionGroups","placeholder","label","error","success","helperText","size","className","disabled","id"]);const v=l.useId(),x=p||`select-${v}`,j=l.useMemo(()=>o?`${x}-error`:void 0,[o,x]),N=l.useMemo(()=>c?`${x}-helper`:void 0,[c,x]),k=l.useMemo(()=>"focus:border-line-focus",[]),$=l.useMemo(()=>"focus:border-error",[]),S=l.useMemo(()=>"focus:border-success",[]),I=l.useCallback(T=>T==="error"?$.replace("focus:border-","focus:ring-"):T==="success"?S.replace("focus:border-","focus:ring-"):k.replace("focus:border-","focus:ring-"),[$,S,k]),C=l.useMemo(()=>he(y("block","w-full",U("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:y("h-8",re("bodySmall"),m("md","px")),md:y("h-10",re("body"),m("base","px")),lg:y("h-12",re("bodyLarge"),m("lg","px"))},state:{default:y("border-line-default",I()),error:y("border-error",I("error")),success:y("border-success",I("success"))}},defaultVariants:{size:"md",state:"default"}}),[I]),A=l.useMemo(()=>o?"error":i?"success":"default",[o,i]),F=l.useMemo(()=>y(C({size:u,state:A}),d),[C,u,A,d]),D=l.useMemo(()=>y("block",ue("label"),m("xs","mb"),f&&"opacity-50"),[f]);return n.jsxs("div",{className:"w-full",children:[a&&n.jsx("label",{htmlFor:x,className:D,children:a}),n.jsxs("select",P(M({id:x,ref:h,className:F,disabled:f,"aria-invalid":o,"aria-required":b.required,"aria-describedby":j||N},b),{children:[s&&n.jsx("option",{value:"",disabled:!0,children:s}),r&&r.length>0?r.map((T,R)=>n.jsx("optgroup",{label:T.label,children:(T.options||[]).map(_=>n.jsx("option",{value:_.value,disabled:_.disabled,children:_.label},_.value))},R)):(t||[]).map(T=>n.jsx("option",{value:T.value,disabled:T.disabled,children:T.label},T.value))]})),(o||i||c)&&n.jsx(cd,{error:o,success:i,helperText:c,errorId:j,helperId:N})]})}));Er.displayName="Select";const Da=l.memo(l.forwardRef(function(f,d){var p=f,{error:t=!1,success:r=!1,resize:s="vertical",className:a="",label:o,helperText:i,id:c}=p,u=z(p,["error","success","resize","className","label","helperText","id"]);const b=l.useId(),h=c!=null?c:b,g=l.useMemo(()=>"focus:border-line-focus",[]),w=l.useMemo(()=>"focus:border-error",[]),v=l.useMemo(()=>t?w.replace("focus:border-","focus:ring-"):g.replace("focus:border-","focus:ring-"),[t,w,g]),x=l.useMemo(()=>({none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"}),[]),j=l.useMemo(()=>y("block","w-full",U("md"),m("base","px"),m("md","py"),"border",re("body"),"focus:outline-none","focus:ring-2","focus:ring-offset-2",x[s],y(t?"border-error":r?"border-success":"border-line-default",v),a),[s,x,t,r,v,a]),N=l.useMemo(()=>i?`${h}-helper`:void 0,[i,h]),k=l.useMemo(()=>N!=null?N:t?`${h}-error`:void 0,[N,t,h]),$=u["aria-label"],S=u["aria-labelledby"];l.useEffect(()=>{},[o,$,S,h]);const I=n.jsx("textarea",M({ref:d,id:h,className:j,"aria-invalid":t,"aria-describedby":k},u)),C=i?n.jsx("p",{id:N,className:y(m("xs","mt"),re("bodySmall"),t?"text-fg-error":r?"text-fg-success":"text-fg-secondary"),children:i}):null;return!o&&!C?I:n.jsxs("div",{className:"block w-full",children:[o&&n.jsx("label",{htmlFor:h,className:y("block",m("xs","mb"),re("label"),"font-medium","text-fg-primary"),children:o}),I,C]})}));Da.displayName="Textarea";const dd=y("block",re("label"),ze("label"),"text-fg-primary"),ud={default:"",required:y("after:content-['*']",`after:${m("0.5","ml")}`,"after:text-fg-error"),optional:y("after:content-['(optional)']",`after:${m("xs","ml")}`,"after:text-fg-tertiary","after:font-normal")},Dt=l.memo(l.forwardRef(function(i,o){var c=i,{variant:t="default",className:r="",children:s}=c,a=z(c,["variant","className","children"]);const u=y(dd,ud[t],r);return n.jsx("label",P(M({ref:o,className:u},a),{children:s}))}));Dt.displayName="Label";function _a(a){var o=a,{message:e,id:t,className:r=""}=o,s=z(o,["message","id","className"]);const i=[m("xs","mt"),re("bodySmall"),"text-fg-error","flex","items-center",m("xs","gap")],c=y(...i,r);return n.jsxs("div",P(M({role:"alert",id:t,className:c,"aria-live":"polite"},s),{children:[n.jsx(ws,{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 fd(e){return Le.createWidth(e).tailwind}class gt{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 md={none:gt.create("none"),sm:gt.create("sm"),md:gt.create("md"),lg:gt.create("lg"),xl:gt.create("xl"),"2xl":gt.create("2xl"),inner:gt.create("inner")};function fe(e){return md[e].tailwind}const _t=l.forwardRef(function(f,d){var p=f,{content:t,children:r,position:s="top",delay:a=200,className:o="","aria-label":i,preservePositioning:c=!1}=p,u=z(p,["content","children","position","delay","className","aria-label","preservePositioning"]);const[b,h]=l.useState(!1),g=l.useRef(null),w=l.useRef(null),v=l.useRef(null),x=`tooltip-${l.useId()}`,j=()=>{const T=setTimeout(()=>{h(!0)},a);g.current=T},N=()=>{g.current&&(clearTimeout(g.current),g.current=null),h(!1)},k=()=>{h(!0)},$=()=>{h(!1)},S=T=>{var R;T.key==="Escape"&&(h(!1),(R=v.current)==null||R.blur())};l.useEffect(()=>()=>{g.current&&(clearTimeout(g.current),g.current=null)},[]),l.useEffect(()=>{if(!b)return;const T=R=>{w.current&&!w.current.contains(R.target)&&v.current&&!v.current.contains(R.target)&&h(!1)};return document.addEventListener("mousedown",T),()=>{document.removeEventListener("mousedown",T)}},[b]);const I=T=>({top:"border-t-surface-inverse",bottom:"border-b-surface-inverse",left:"border-l-surface-inverse",right:"border-r-surface-inverse"})[T],C=he(y("absolute",xe("tooltip"),m("sm","px"),m("xs","py"),re("caption"),"text-fg-inverse","bg-surface-inverse",U("md"),fe("lg"),"whitespace-nowrap"),{variants:{position:{top:y("bottom-full","left-1/2","transform","-translate-x-1/2",m("sm","mb")),bottom:y("top-full","left-1/2","transform","-translate-x-1/2",m("sm","mt")),left:y("right-full","top-1/2","transform","-translate-y-1/2",m("sm","mr")),right:y("left-full","top-1/2","transform","-translate-y-1/2",m("sm","ml"))}},defaultVariants:{position:"top"}}),A=he(y("absolute","w-0","h-0",fd("thick"),"border-transparent"),{variants:{position:{top:y("top-full","left-1/2","transform","-translate-x-1/2",I("top")),bottom:y("bottom-full","left-1/2","transform","-translate-x-1/2",I("bottom")),left:y("left-full","top-1/2","transform","-translate-y-1/2",I("left")),right:y("right-full","top-1/2","transform","-translate-y-1/2",I("right"))}},defaultVariants:{position:"top"}}),F=l.isValidElement(r)?(()=>{const T=r,R=T.props,_=R.ref;return l.cloneElement(T,{ref:wa(v,_),"aria-describedby":b?x:R["aria-describedby"],onMouseEnter:V=>{var B;j(),(B=R.onMouseEnter)==null||B.call(R,V)},onMouseLeave:V=>{var B;N(),(B=R.onMouseLeave)==null||B.call(R,V)},onFocus:V=>{var B;k(),(B=R.onFocus)==null||B.call(R,V)},onBlur:V=>{var B;$(),(B=R.onBlur)==null||B.call(R,V)},onKeyDown:V=>{var B;S(V),(B=R.onKeyDown)==null||B.call(R,V)}})})():r,D=y(c?"static":"relative","inline-block",o);return n.jsxs("div",P(M({ref:d,className:D},u),{children:[F,b&&n.jsxs("div",{ref:w,id:x,className:y(C({position:s})),role:"tooltip","aria-live":"polite",children:[t,n.jsx("div",{className:y(A({position:s})),"aria-hidden":"true"})]})]}))});_t.displayName="Tooltip";function Fa(c){var u=c,{variant:e="text",width:t,height:r,lines:s=1,className:a="","aria-label":o}=u,i=z(u,["variant","width","height","lines","className","aria-label"]);const d=["motion-safe:animate-pulse","bg-surface-muted",U("sm")],f={text:"h-4",card:"h-32",list:"h-12",circle:U("full")},p=y(...d,f[e],a),b={};t&&(b.width=t),r&&(b.height=r);const h=o||`Loading ${e} content`;return e==="text"&&s>1?n.jsx("div",P(M({className:m("sm","space-y"),role:"status","aria-busy":"true","aria-label":h},i),{children:Array.from({length:s}).map((g,w)=>n.jsx("div",{className:p,style:w===s-1?{width:"75%"}:b,"aria-hidden":"true"},w))})):n.jsx("div",M({className:p,style:b,role:"status","aria-busy":"true","aria-label":h},i))}function pd({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}}const js=l.forwardRef(function(b,p){var h=b,{children:t,trigger:r,defaultOpen:s=!0,open:a,onOpenChange:o,disabled:i=!1,duration:c=200,storageKey:u,className:d=""}=h,f=z(h,["children","trigger","defaultOpen","open","onOpenChange","disabled","duration","storageKey","className"]);const{isOpen:g,toggle:w}=pd({defaultOpen:s,open:a,onOpenChange:o,storageKey:u}),v=l.useRef(null),[x,j]=l.useState(g?"auto":0);l.useEffect(()=>{v.current&&j(g?v.current.scrollHeight:0)},[g,t]),l.useEffect(()=>{if(!g||!v.current)return;const k=new ResizeObserver(()=>{v.current&&g&&j(v.current.scrollHeight)});return k.observe(v.current),()=>{k.disconnect()}},[g]);const N=`collapsible-content-${l.useId()}`;return n.jsxs("div",P(M({ref:p,className:d},f),{children:[r!==void 0&&n.jsx("button",{type:"button",onClick:w,onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),i||w())},disabled:i,"aria-expanded":g,"aria-controls":N,"aria-disabled":i,className:y("w-full","text-left","focus:outline-none","focus:ring-2","focus:ring-line-brand","focus:ring-offset-2",U("md")),children:r}),n.jsx("div",{id:N,ref:v,style:{height:typeof x=="number"?`${x}px`:x,overflow:"hidden",transition:`height ${c}ms ease-in-out`},"aria-hidden":!g,children:n.jsx("div",{children:t})})]}))});js.displayName="Collapsible";const Mr=l.memo(l.forwardRef(function(p,f){var b=p,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,className:i="",disabled:c=!1,indeterminate:u=!1}=b,d=z(b,["id","label","error","success","helperText","className","disabled","indeterminate"]);const h=l.useId(),g=t||`checkbox-${h}`,w=l.useMemo(()=>s?`${g}-error`:void 0,[s,g]),v=l.useMemo(()=>o?`${g}-helper`:void 0,[o,g]),x=l.useMemo(()=>"focus:border-line-focus",[]),j=l.useMemo(()=>"focus:border-error",[]),N=l.useMemo(()=>s?j.replace("focus:border-","focus:ring-"):x.replace("focus:border-","focus:ring-"),[s,j,x]),k=l.useMemo(()=>y("h-4","w-4",U("sm"),"border","border-line-default","text-fg-brand","focus:ring-2",N,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",!s&&a&&"border-success",i),[N,s,a,i]),$=l.useMemo(()=>y(ue("label"),m("sm","ml"),c?"opacity-50 cursor-not-allowed":"cursor-pointer"),[c]),S=l.useRef(null),I=l.useCallback(C=>{S.current=C,typeof f=="function"?f(C):f&&(f.current=C),C&&(C.indeterminate=u)},[f,u]);return l.useEffect(()=>{S.current&&(S.current.indeterminate=u)},[u]),n.jsxs("div",{className:y("flex","flex-col",m("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",M({type:"checkbox",id:g,ref:I,className:k,disabled:c,"aria-invalid":s,"aria-describedby":w||v||void 0,"aria-label":r?void 0:"Checkbox"},d)),r&&n.jsx("label",{htmlFor:g,className:$,children:r})]}),(s||a||o)&&n.jsx("div",{id:w||v,className:y(m("xs","mt"),ue("caption"),s?"text-fg-error":a?"text-fg-success":"text-fg-secondary"),role:s||a?"alert":void 0,children:s?o||"This field has an error":o})]})}));Mr.displayName="Checkbox";const La=l.memo(l.forwardRef(function(f,d){var p=f,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,className:i="",disabled:c=!1}=p,u=z(p,["id","label","error","success","helperText","className","disabled"]);const b=l.useId(),h=t||`radio-${b}`,g=l.useMemo(()=>s?`${h}-error`:void 0,[s,h]),w=l.useMemo(()=>o?`${h}-helper`:void 0,[o,h]),v=l.useMemo(()=>"focus:border-line-focus",[]),x=l.useMemo(()=>"focus:border-error",[]),j=l.useMemo(()=>s?x.replace("focus:border-","focus:ring-"):v.replace("focus:border-","focus:ring-"),[s,x,v]),N=l.useMemo(()=>y("h-4","w-4","border","border-line-default","text-fg-brand","focus:ring-2",j,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",!s&&a&&"border-success",i),[j,s,a,i]),k=l.useMemo(()=>y(ue("label"),m("sm","ml"),c?"opacity-50 cursor-not-allowed":"cursor-pointer"),[c]);return n.jsxs("div",{className:y("flex","flex-col",m("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",M({type:"radio",id:h,ref:d,className:N,disabled:c,"aria-invalid":s,"aria-describedby":g||w||void 0,"aria-label":r?void 0:"Radio button"},u)),r&&n.jsx("label",{htmlFor:h,className:k,children:r})]}),(s||a||o)&&n.jsx("div",{id:g||w,className:y(m("xs","mt"),ue("caption"),s?"text-fg-error":a?"text-fg-success":"text-fg-secondary"),role:s||a?"alert":void 0,children:s?o||"This field has an error":o})]})}));La.displayName="Radio";const Wt={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 bd(e){return{track:`${Wt.track[e].w} ${Wt.track[e].h}`,thumb:`${Wt.thumb[e].w} ${Wt.thumb[e].h}`,translate:Wt.translate[e]}}const hd=he("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"}}),Ln=he("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"}}),Ns=l.forwardRef(function(p,f){var b=p,{value:t,max:r=100,variant:s="primary",size:a="md",showLabel:o=!1,label:i,"aria-label":c,className:u=""}=b,d=z(b,["value","max","variant","size","showLabel","label","aria-label","className"]);const h=t===void 0,g=h?void 0:Math.min(Math.max(t/r*100,0),100),w=c||(h?"Loading in progress":`Progress: ${g==null?void 0:g.toFixed(0)}%`);return n.jsxs("div",P(M({ref:f,className:y("w-full",u)},d),{children:[o&&(i||!h)&&n.jsxs("div",{className:y("flex","items-center","justify-between",m("xs","mb")),children:[i&&n.jsx("span",{className:y(re("bodySmall"),ze("label"),"text-fg-primary"),children:i}),!h&&g!==void 0&&n.jsxs("span",{className:y(re("bodySmall"),"text-fg-secondary"),children:[g.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":w,"aria-busy":h,className:y("relative","w-full","overflow-hidden",hd({size:a,variant:s}),U("full")),children:h?n.jsx("div",{className:y("absolute","top-0","left-0","bottom-0",Ln({variant:s}),U("full"),"motion-reduce:animate-none"),style:{width:"30%",animation:"progress-indeterminate 1.5s ease-in-out infinite"}}):n.jsx("div",{className:y("h-full",Ln({variant:s}),U("full"),"transition-all","duration-300","ease-out"),style:{width:`${g}%`},"aria-hidden":"true"})})]}))});Ns.displayName="Progress";const Pa=l.memo(l.forwardRef(function(g,h){var w=g,{size:t="md",label:r,helperText:s,error:a=!1,success:o=!1,className:i="",disabled:c=!1,checked:u,defaultChecked:d,onChange:f,id:p}=w,b=z(w,["size","label","helperText","error","success","className","disabled","checked","defaultChecked","onChange","id"]);const v=u!==void 0,[x,j]=l.useState(d!=null?d:!1),N=v?!!u:x,k=l.useId(),$=p||`switch-${k}`,S=l.useMemo(()=>r?`${$}-label`:void 0,[r,$]),I=l.useMemo(()=>s?`${$}-helper`:void 0,[s,$]),C=l.useMemo(()=>bd(t),[t]),A=l.useMemo(()=>"focus:border-line-focus".replace("focus:border-","focus:ring-"),[]),F=l.useMemo(()=>y("relative","inline-flex","shrink-0","cursor-pointer",U("full"),"border-2","border-transparent",ye("base"),"focus:outline-none","focus:ring-2",A,"focus:ring-offset-2",C.track,N?"bg-surface-brand":"bg-surface-muted",a&&!N&&"border-error",!a&&o&&!N&&"border-success",c&&"opacity-50 cursor-not-allowed",i),[A,C.track,N,a,o,c,i]),D=l.useMemo(()=>y("pointer-events-none","inline-block",U("full"),"bg-surface-base","shadow","transform",ye("base"),C.thumb,N?C.translate:"translate-x-0"),[C.thumb,C.translate,N]);return n.jsxs("div",{className:y("flex","items-start",m("md","gap")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("button",{type:"button",className:F,role:"switch","aria-checked":N,"aria-labelledby":S,"aria-describedby":I,disabled:c,onClick:l.useCallback(T=>{if(c)return;const R=!N;if(v||j(R),f){const _=P(M({},T),{target:P(M({},T.target),{checked:R}),currentTarget:P(M({},T.currentTarget),{checked:R})});f(_)}},[c,f,N,v]),onKeyDown:l.useCallback(T=>{if(c||T.key!=="Enter"&&T.key!==" ")return;T.preventDefault();const R=!N;if(v||j(R),f){const _=P(M({},T),{target:P(M({},T.target),{checked:R}),currentTarget:P(M({},T.currentTarget),{checked:R})});f(_)}},[c,f,N,v]),children:n.jsx("span",{className:D})}),n.jsx("input",M({ref:h,type:"checkbox",id:$,checked:N,onChange:f!=null?f:(()=>{}),disabled:c,className:"sr-only","aria-hidden":"true",tabIndex:-1},b))]}),(r||s)&&n.jsxs("div",{className:"flex-1",children:[r&&n.jsx("label",{id:S,htmlFor:$,className:y("block",re("bodySmall"),ze("label"),a?"text-fg-error":"text-fg-primary",c?"opacity-50":"cursor-pointer"),children:r}),s&&n.jsx("p",{id:I,className:y(m("xs","mt"),re("bodySmall"),a?"text-fg-error":o?"text-fg-success":"text-fg-secondary"),children:s})]})]})}));Pa.displayName="Switch";const xd={horizontal:"w-full border-t",vertical:"h-full border-l self-stretch"},gd={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"},Ss=l.memo(function(o){var i=o,{orientation:t="horizontal",variant:r="solid",className:s=""}=i,a=z(i,["orientation","variant","className"]);const c=y("border-0","border-line-default",xd[t],gd[r],s);return t==="vertical"?n.jsx("div",M({className:c,role:"separator","aria-orientation":"vertical"},a)):n.jsx("hr",M({className:c,role:"separator","aria-orientation":"horizontal"},a))});Ss.displayName="Separator";const Oa=l.forwardRef(function(x,v){var j=x,{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:b,label:h,className:g=""}=j,w=z(j,["value","defaultValue","min","max","step","variant","size","disabled","showValue","marks","onChange","onValueChange","label","className"]);const N=l.useRef(null),k=l.useId(),$=l.useId(),S=l.useId(),[I,C]=l.useState(r||(i==="range"?[s,a]:s)),[A,F]=l.useState(!1),[D,T]=l.useState(null),R=t!==void 0,_=R?t:I,V=W=>(W-s)/(a-s)*100,B=W=>{if(!N.current)return s;const q=N.current.getBoundingClientRect(),ce=Math.max(0,Math.min(1,(W-q.left)/q.width)),ie=s+ce*(a-s);return Math.round(ie/o)*o},X=(W,q="min")=>{if(u)return;W.preventDefault(),F(!0),T(q);const ce=pe=>{if(!N.current)return;const we=B(pe.clientX);Z(we,q)},ie=()=>{F(!1),T(null),document.removeEventListener("mousemove",ce),document.removeEventListener("mouseup",ie)};document.addEventListener("mousemove",ce),document.addEventListener("mouseup",ie)},Z=(W,q="min")=>{const ce=Math.max(s,Math.min(a,W));if(i==="range"){const[ie,pe]=Array.isArray(_)?_:[s,a];let we;q==="min"?we=[Math.min(ce,pe),pe]:we=[ie,Math.max(ce,ie)],R||C(we),p==null||p(we),b==null||b(we)}else R||C(ce),p==null||p(ce),b==null||b(ce)},oe=W=>{if(u||A)return;const q=B(W.clientX);Z(q)},H=()=>"focus:ring-line-brand ring-offset-2",L=he(y("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}}),Y=he(y("absolute","bg-surface-brand",U("full"),"border-2","border-white",fe("md"),"cursor-grab","active:cursor-grabbing",ye("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:H(),false:""}},defaultVariants:{size:"md",active:!1}}),ee=typeof _=="number"?_:_[0],J=Array.isArray(_)?_[0]:s,te=Array.isArray(_)?_[1]:ee,ae=V(J),O=V(te);return n.jsxs("div",P(M({ref:v,className:y("w-full",g)},w),{children:[n.jsxs("label",{id:k,className:y("block",re("bodySmall"),ze("label"),"text-fg-primary",m("sm","mb")),children:[h,d&&n.jsx("span",{className:y(m("sm","ml"),"text-fg-secondary"),children:i==="range"?`${J} - ${te}`:ee})]}),i==="range"&&n.jsxs(n.Fragment,{children:[n.jsx("span",{id:$,className:"sr-only",children:"minimum"}),n.jsx("span",{id:S,className:"sr-only",children:"maximum"})]}),n.jsxs("div",{ref:N,className:y(L({size:c,disabled:u}),"bg-surface-muted",U("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:ee,"aria-disabled":i==="range"?void 0:u,"aria-labelledby":i==="range"?void 0:k,children:[n.jsx("div",{className:y("absolute",L({size:c}),"bg-surface-brand",U("full"),ye("base")),style:{left:`${ae}%`,width:`${O-ae}%`}}),f.map(W=>{const q=V(W);return n.jsx("div",{className:y("absolute","w-1","h-1","bg-line-strong",U("full"),"-translate-x-1/2"),style:{left:`${q}%`,top:"50%",transform:"translate(-50%, -50%)"}},W)}),i==="range"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:y(Y({size:c,active:D==="min"})),style:{left:`${ae}%`},onMouseDown:W=>X(W,"min"),role:"slider","aria-valuemin":s,"aria-valuemax":te,"aria-valuenow":J,"aria-labelledby":`${k} ${$}`}),n.jsx("div",{className:y(Y({size:c,active:D==="max"})),style:{left:`${O}%`},onMouseDown:W=>X(W,"max"),role:"slider","aria-valuemin":J,"aria-valuemax":a,"aria-valuenow":te,"aria-labelledby":`${k} ${S}`})]}):n.jsx("div",{className:y(Y({size:c,active:A})),style:{left:`${O}%`},onMouseDown:W=>X(W)}),d&&!h&&n.jsx("div",{className:"absolute -top-6 left-0 right-0 flex justify-center",children:n.jsx("span",{className:y(re("caption"),"text-fg-secondary","bg-surface-overlay",m("sm","px"),m("xs","py"),U("md"),"shadow"),children:i==="range"?`${J} - ${te}`:ee})})]})]}))});Oa.displayName="Slider";const Pn=he(y("inline-flex","items-center","font-medium",U("full"),m("xs","gap")),{variants:{variant:{default:y("bg-surface-muted","text-fg-primary","border","border-line-default"),outlined:y("bg-transparent","text-fg-primary","border","border-line-default"),filled:y("bg-surface-brand-strong","text-fg-inverse","border","border-transparent")},size:{sm:y(m("xs","px"),m("xs","py"),re("caption")),md:y(m("sm","px"),m("xs","py"),re("bodySmall")),lg:y(m("md","px"),m("sm","py"),re("body"))},selected:{true:y("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}}),$s=l.forwardRef(function(t,r){const{children:s,variant:a="default",size:o="md",selected:i=!1,disabled:c=!1,className:u="","aria-label":d,tabIndex:f,asChild:p=!1}=t,h=(()=>{if(d)return d;if(typeof s=="string")return s;if(typeof s=="object"&&s!==null&&"props"in s){const N=s.props;if(N!=null&&N.children&&typeof N.children=="string")return N.children}})();if(p)return n.jsx(Ta,{ref:r,className:y(Pn({variant:a,size:o,selected:i,disabled:c}),u),"aria-label":d,"aria-disabled":c||void 0,tabIndex:f,children:s});const{onRemove:g,onClick:w}=t,v=w!==void 0,x=v&&!c,j=N=>{c||(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),w==null||w())};return n.jsxs("div",{ref:r,className:y(Pn({variant:a,size:o,selected:i,disabled:c}),g&&m("xs","pr"),u),"aria-disabled":c,children:[v?n.jsx("button",{type:"button",onClick:c?void 0:w,onKeyDown:j,disabled:c,"aria-pressed":i?!0:void 0,"aria-label":d||h,tabIndex:f!==void 0?f:x?0:void 0,className:y("flex-1","bg-transparent","border-0",m("none","p"),"text-inherit","text-left","cursor-pointer","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",U("full")),children:s}):n.jsx("span",{children:s}),g&&!c&&n.jsx("button",{type:"button",onClick:N=>{N.stopPropagation(),g()},className:y(m("xs","ml"),"hover:bg-tint-hover",U("full"),m("xs","p"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1"),"aria-label":`Remove ${h||"chip"}`,children:n.jsx(Ce,{className:"h-3 w-3","aria-hidden":"true"})})]})});$s.displayName="Chip";const pr=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=z(p,["src","alt","fallback","size","variant","aria-label","className"]);const[b,h]=l.useState(!1),[g,w]=l.useState(!1),v={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"},x={circle:U("full"),square:U("none"),rounded:U("md")},j=!t||b,N=typeof s=="string"?s.toUpperCase().slice(0,2):s,k=i||r||"User avatar";return n.jsxs("div",P(M({ref:d,className:y("relative","inline-flex","items-center","justify-center","shrink-0","font-medium","overflow-hidden",v[a],x[o],"bg-surface-muted","text-fg-primary",c),role:"img","aria-label":k},u),{children:[!j&&t&&n.jsx("img",{src:t,alt:r||"",className:y("w-full","h-full","object-cover",x[o],g?"opacity-100":"opacity-0","transition-opacity","duration-200"),onLoad:()=>w(!0),onError:()=>{h(!0),w(!1)},"aria-hidden":"true"}),j&&n.jsx("span",{className:y("flex","items-center","justify-center","w-full","h-full",x[o]),"aria-hidden":"true",children:N||"?"})]}))});pr.displayName="Avatar";function vd(c){var u=c,{children:e,max:t=3,size:r="md",variant:s="circle",spacing:a="md",className:o=""}=u,i=z(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),b=f.length-t;return n.jsxs("div",P(M({className:y("flex","items-center",d[a],o),role:"group","aria-label":`${f.length} avatars`},i),{children:[p.map((h,g)=>{let w=h;if(l.isValidElement(h)&&h.type===pr){const v=h.props;w=l.cloneElement(h,{size:v.size||r,variant:v.variant||s})}return n.jsx("div",{className:"ring-2 ring-surface-base",style:{zIndex:f.length-g},children:w},g)}),b>0&&n.jsx(pr,{size:r,variant:s,fallback:`+${b}`,"aria-label":`${b} more avatars`,className:"ring-2 ring-surface-base",style:{zIndex:0}})]}))}function yd(s){var a=s,{children:e,className:t}=a,r=z(a,["children","className"]);return n.jsx("div",P(M({className:y("grid items-start",m("1.5","gap"),m("base","mb"),"[&:has([data-card-actions])]:grid-cols-[1fr_auto]","[&:has([data-card-actions])>[data-card-actions]]:row-span-full",t)},r),{children:e}))}function wd(i){var c=i,{children:e,icon:t,badge:r,as:s="h2",className:a}=c,o=z(c,["children","icon","badge","as","className"]);return n.jsxs(s,P(M({className:y("text-base font-semibold text-fg-primary","flex items-center",m("sm","gap"),a)},o),{children:[t?n.jsx("span",{className:"shrink-0 inline-flex",children:t}):null,n.jsx("span",{children:e}),r?n.jsx("span",{className:"inline-flex",children:r}):null]}))}function kd(s){var a=s,{children:e,className:t}=a,r=z(a,["children","className"]);return n.jsx("p",P(M({className:y("text-sm text-fg-secondary",t)},r),{children:e}))}function jd(s){var a=s,{children:e,className:t}=a,r=z(a,["children","className"]);return n.jsx("div",P(M({"data-card-actions":"",className:y("flex items-center self-start",m("sm","gap"),t)},r),{children:e}))}function Nd(s){var a=s,{children:e,className:t}=a,r=z(a,["children","className"]);return n.jsx("div",P(M({className:y(t)},r),{children:e}))}function Sd(d){var f=d,{variant:e="default",padding:t="medium",className:r="",onClick:s,"aria-label":a,"aria-labelledby":o,asSection:i=!1,children:c}=f,u=z(f,["variant","padding","className","onClick","aria-label","aria-labelledby","asSection","children"]);typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&i&&!a&&!o&&console.warn("[Card] `asSection={true}` requires an accessible name. Pass `aria-labelledby` pointing to your Card.Title `id`, or `aria-label`. A <section> without a name is an anonymous landmark that hurts screen-reader navigation.");const p=he(y("bg-surface-base",U("lg"),"border","border-line-default",fe("sm")),{variants:{variant:{default:"",hover:y(`hover:${fe("md")}`,"transition-shadow","cursor-pointer"),selected:y("border-line-brand",fe("md"))},padding:{none:"",small:m("xs","p"),medium:m("base","p"),large:m("lg","p")}},defaultVariants:{variant:"default",padding:"medium"}}),b=s!==void 0,h=b?"button":void 0,g=b?0:void 0,w=y(p({variant:e,padding:t}),r),x=M({className:w,role:h,tabIndex:g,onClick:s,onKeyDown:b?j=>{b&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),s==null||s())}:void 0,"aria-label":a,"aria-labelledby":o},u);return i?n.jsx("section",P(M({},x),{children:c})):n.jsx("div",P(M({},x),{children:c}))}const za=l.memo(Sd);za.displayName="Card";const ft=za;ft.Header=yd;ft.Title=wd;ft.Subtitle=kd;ft.Actions=jd;ft.Body=Nd;const $d={start:"items-start text-left",center:"items-center text-center"},Cd={neutral:"text-fg-tertiary",success:"text-fg-success",warning:"text-fg-warning",error:"text-fg-error"};function Ed(u){var d=u,{value:e,label:t,hint:r,icon:s,align:a="start",tone:o="neutral",className:i}=d,c=z(d,["value","label","hint","icon","align","tone","className"]);const f=e==null;return n.jsxs("div",P(M({className:y("bg-surface-base flex-1 flex flex-col",m("base","p"),m("xs","gap-y"),$d[a],i)},c),{children:[s?n.jsx("span",{className:"text-icon-default inline-flex",children:s}):null,f?n.jsx("span",{"aria-label":"No data",className:"text-fg-tertiary text-2xl font-semibold leading-tight",children:"—"}):n.jsx("span",{className:"text-fg-primary text-2xl font-semibold leading-tight",children:e}),n.jsx("span",{className:"text-fg-secondary text-sm",children:t}),r?n.jsx("span",{className:y("text-xs",Cd[o]),children:r}):null]}))}const Md={2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4"};function Td(o){var i=o,{layout:e="grid",cols:t=4,className:r,children:s}=i,a=z(i,["layout","cols","className","children"]);const c=e==="grid";return n.jsx("div",P(M({className:y("bg-line-default border border-line-default overflow-hidden gap-px",U("lg"),c?`grid grid-cols-2 ${Md[t]}`:"flex",r)},a),{children:s}))}function Ad(o){var i=o,{label:e,children:t,wrap:r=!0,className:s}=i,a=z(i,["label","children","wrap","className"]);const u=!(a["aria-label"]!=null||a["aria-labelledby"]!=null)&&typeof e=="string"&&e!==""?e:void 0;return n.jsxs("div",P(M({role:"group","aria-label":u,className:y("flex items-center",r?"flex-wrap":"flex-nowrap",m("sm","gap"),s)},a),{children:[e?n.jsx("span",{className:"shrink-0 text-fg-secondary text-sm",children:e}):null,t]}))}function Va(e){const t=l.createContext(void 0);t.displayName=e.displayName;function r({value:o,children:i}){return n.jsx(t.Provider,{value:o,children:i})}function s(){const o=l.useContext(t);if(o===void 0)throw new Error(e.errorMessage);return o}function a(){return l.useContext(t)}return{Context:t,Provider:r,useContextRequired:s,useContextOptional:a}}const Tr=Va({displayName:"FormContext",errorMessage:"useFormContext must be used within a Form component with react-hook-form integration"}),Rd=Tr.Context,Id=Tr.Provider;function Cs(){return Tr.useContextRequired()}function Dd(){return Tr.useContextOptional()}function Wa({form:e,loading:t=!1,children:r}){const s={form:e,loading:t};return n.jsx(Id,{value:s,children:r})}function _d(c){var u=c,{children:e,onSubmit:t,loading:r=!1,error:s=null,success:a=null,className:o=""}=u,i=z(u,["children","onSubmit","loading","error","success","className"]);const d=y(m("lg","gap"),"flex","flex-col",o);if("form"in i&&i.form!==void 0){const w=i,{form:x,onSubmit:j,onSubmitError:N}=w,k=z(w,["form","onSubmit","onSubmitError"]),$=x.handleSubmit(S=>sr(null,null,function*(){try{yield j(S)}catch(I){N==null||N(I)}}),S=>{N==null||N(S)});return n.jsx(Wa,{form:x,loading:r,children:n.jsxs("form",P(M({className:d,onSubmit:$,noValidate:!0},k),{children:[e,s&&n.jsx("div",{role:"alert",className:y(m("md","p"),je("sm"),"text-error-dark","bg-error-bg","border","border-error",U("md")),children:s}),a&&n.jsx("div",{role:"alert",className:y(m("md","p"),je("sm"),"text-success-dark","bg-success-bg","border","border-success",U("md")),children:a})]}))})}const p=i.onSubmit||t,v=i,{onSubmit:b}=v,h=z(v,["onSubmit"]),g=x=>{x.preventDefault(),p&&!r&&(p==null||p(x))};return n.jsxs("form",P(M({className:d,onSubmit:g,noValidate:!0},h),{children:[e,s&&n.jsx("div",{role:"alert",className:y(m("md","p"),je("sm"),"text-error-dark","bg-error-bg","border","border-error",U("md")),children:s}),a&&n.jsx("div",{role:"alert",className:y(m("md","p"),je("sm"),"text-success-dark","bg-success-bg","border","border-success",U("md")),children:a})]}))}function Fd({name:e,label:t,children:r,rules:s,className:a=""}){var b;const{form:o}=Cs();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=(b=c[e])==null?void 0:b.message,p=u(e);return n.jsxs("div",{className:y("flex","flex-col",m("sm","gap"),a),children:[t&&n.jsx(Dt,{htmlFor:e,className:y("block",je("sm"),It("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(_a,{message:f})]})}var Ld=e=>e.type==="checkbox",Pd=e=>e instanceof Date,Pe=e=>e==null;const Od=e=>typeof e=="object";var qe=e=>!Pe(e)&&!Array.isArray(e)&&Od(e)&&!Pd(e),zd=e=>{const t=e.constructor&&e.constructor.prototype;return qe(t)&&t.hasOwnProperty("isPrototypeOf")},Es=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function tt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList!="undefined"&&e instanceof FileList;if(Es&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(qe(e)&&zd(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=tt(e[a]));return s}const At={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Be={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Vd="root",Ha=["__proto__","constructor","prototype"];var Ms=e=>/^\w*$/.test(e),Ke=e=>e===void 0,Ts=e=>e.split(/[.[\]'"]/g).filter(Boolean),Oe=(e,t,r)=>{if(!t||!qe(e))return r;const s=Ms(t)?[t]:Ts(t);if(s.some(o=>Ha.includes(o)))return r;const a=s.reduce((o,i)=>Pe(o)?void 0:o[i],e);return Ke(a)||a===e?Ke(e[t])?r:e[t]:a},Ba=e=>typeof e=="boolean",Wd=e=>typeof e=="function",br=(e,t,r)=>{let s=-1;const a=Ms(t)?[t]:Ts(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=qe(d)||Array.isArray(d)?d:isNaN(+a[s+1])?{}:[]}if(Ha.includes(c))return;e[c]=u,e=e[c]}};const Ua=l.createContext(null);Ua.displayName="HookFormControlContext";const Hd=()=>l.useContext(Ua),Bd=Es?l.useLayoutEffect:l.useEffect;var Ue=e=>typeof e=="string";const Ud=l.createContext(null);Ud.displayName="HookFormContext";var Gd=(e,t,r,s,a)=>t?P(M({},r[e]),{types:P(M({},r[e]&&r[e].types?r[e].types:{}),{[s]:a||!0})}):{},Kd=e=>Array.isArray(e)?e.filter(Boolean):[],Ge=e=>Array.isArray(e)?e:[e],hr=e=>qe(e)&&!Object.keys(e).length,Yd=e=>e.type==="file",qd=e=>{if(!Es)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Xd=e=>e.type==="radio";function Jd(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;){if(Pe(e)){e=void 0;break}e=e[t[s]],s++}return e}function Zd(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ke(e[t]))return!1;return!0}function Ga(e,t){if(Ue(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const r=Array.isArray(t)?t:Ms(t)?[t]:Ts(t),s=r.length===1?e:Jd(e,r),a=r.length-1,o=r[a];return s&&delete s[o],a!==0&&(qe(s)&&hr(s)||Array.isArray(s)&&Zd(s))&&Ga(e,r.slice(0,-1)),e}var Ka=e=>e instanceof RegExp,dr=e=>({isOnSubmit:!e||e===At.onSubmit,isOnBlur:e===At.onBlur,isOnChange:e===At.onChange,isOnAll:e===At.all,isOnTouch:e===At.onTouched}),Qd=(e,t,r)=>t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(`${s}.`));const us=(e,t,r,s)=>{for(const o of Object.keys(e)){const i=Oe(e,o);if(i){const a=i,{_f:c}=a,u=z(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(us(u,t))break}else if(qe(u)&&us(u,t))break}}};var eu=(e,t,r)=>{const s=Oe(e,r),a=Array.isArray(s)?s:[];return br(a,Vd,t[r]),br(e,r,a),e};function On(e,t,r="validate"){if(Ue(e)||Array.isArray(e)&&e.every(Ue)||Ba(e)&&!e)return{type:r,message:Ue(e)?e:"",ref:t}}var Mt=e=>qe(e)&&!Ka(e)?e:{value:e,message:""},tu=(e,t,r,s,a,o)=>sr(null,null,function*(){const{ref:i,refs:c,required:u,maxLength:d,minLength:f,min:p,max:b,pattern:h,validate:g,name:w,valueAsNumber:v,mount:x}=e._f,j=Oe(r,w);if(!x||t.has(w))return{};const N=c?c[0]:i,k=A=>{a&&N.reportValidity&&(N.setCustomValidity(Ba(A)?"":A||""),N.reportValidity())},$={};Xd(i),Ld(i);const S=(v||Yd(i))&&Ke(i.value)&&Ke(j)||qd(i)&&i.value===""||j===""||Array.isArray(j)&&!j.length,I=Gd.bind(null,w,s,$),C=(A,F,D,T=Be.maxLength,R=Be.minLength)=>{const _=A?F:D;$[w]=M({type:A?T:R,message:_,ref:i},I(A?T:R,_))};if(!Array.isArray(j)||!j.length){const{value:A,message:F}=Ue(u)?{value:!!u,message:u}:Mt(u);if(A&&($[w]=M({type:Be.required,message:F,ref:N},I(Be.required,F)),!s))return k(F),$}if(!S&&(!Pe(p)||!Pe(b))){let A,F;const D=Mt(b),T=Mt(p);if(!Pe(j)&&!isNaN(j)){const R=i.valueAsNumber||j&&+j;Pe(D.value)||(A=R>D.value),Pe(T.value)||(F=R<T.value)}else{const R=i.valueAsDate||new Date(j),_=X=>new Date(new Date().toDateString()+" "+X),V=i.type=="time",B=i.type=="week";Ue(D.value)&&j&&(A=V?_(j)>_(D.value):B?j>D.value:R>new Date(D.value)),Ue(T.value)&&j&&(F=V?_(j)<_(T.value):B?j<T.value:R<new Date(T.value))}if((A||F)&&(C(!!A,D.message,T.message,Be.max,Be.min),!s))return k($[w].message),$}if((d||f)&&!S&&(Ue(j)||Array.isArray(j))){const A=Mt(d),F=Mt(f),D=!Pe(A.value)&&j.length>+A.value,T=!Pe(F.value)&&j.length<+F.value;if((D||T)&&(C(D,A.message,F.message),!s))return k($[w].message),$}if(h&&!S&&Ue(j)){const{value:A,message:F}=Mt(h);if(Ka(A)&&!j.match(A)&&($[w]=M({type:Be.pattern,message:F,ref:i},I(Be.pattern,F)),!s))return k(F),$}if(g){if(Wd(g)){const A=yield g(j,r),F=On(A,N);if(F&&($[w]=M(M({},F),I(Be.validate,F.message)),!s))return k(F.message),$}else if(qe(g)){let A={};for(const F in g){if(!hr(A)&&!s)break;const D=On(yield g[F](j,r),N,F);D&&(A=M(M({},D),I(F,D.message)),k(D.message),s&&($[w]=A))}if(!hr(A)&&($[w]=M({ref:N},A),!s))return $}}return k(!0),$}),et=()=>{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)})},Qr=(e,t,r={})=>r.shouldFocus||Ke(r.shouldFocus)?r.focusName||`${e}.${Ke(r.focusIndex)?t:r.focusIndex}.`:"",es=(e,t)=>[...e,...Ge(t)],ts=e=>Array.isArray(e)?e.map(()=>{}):void 0;function rs(e,t,r){return[...e.slice(0,t),...Ge(r),...e.slice(t)]}var ss=(e,t,r)=>Array.isArray(e)?(Ke(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],ns=(e,t)=>[...Ge(t),...Ge(e)];function ru(e,t){let r=0;const s=[...e];for(const a of t)s.splice(a-r,1),r++;return Kd(s).length?s:[]}var as=(e,t)=>Ke(t)?[]:ru(e,Ge(t).sort((r,s)=>r-s)),os=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},zn=(e,t,r)=>(e[t]=r,e);function su(e){const t=Hd(),{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(et)),f=l.useRef(!1);r._names.array.add(s),l.useMemo(()=>i&&c.length>=0&&r.register(s,i),[r,s,c.length,i]),Bd(()=>r._subjects.array.subscribe({next:({values:k,name:$})=>{if($===s||!$){const S=Oe(k,s);Array.isArray(S)?(u(S),d.current=S.map(et)):$||(u([]),d.current=[])}}}).unsubscribe,[r,s]);const p=l.useCallback(k=>{f.current=!0,r._setFieldArray(s,k)},[r,s]),b=(k,$)=>{const S=Ge(tt(k)),I=es(r._getFieldArray(s),S);r._names.focus=Qr(s,I.length-1,$),d.current=es(d.current,S.map(et)),p(I),u(I),r._setFieldArray(s,I,es,{argA:ts(k)})},h=(k,$)=>{const S=Ge(tt(k)),I=ns(r._getFieldArray(s),S);r._names.focus=Qr(s,0,$),d.current=ns(d.current,S.map(et)),p(I),u(I),r._setFieldArray(s,I,ns,{argA:ts(k)})},g=k=>{const $=as(r._getFieldArray(s),k);d.current=as(d.current,k),p($),u($),!Array.isArray(Oe(r._fields,s))&&br(r._fields,s,void 0),r._setFieldArray(s,$,as,{argA:k})},w=(k,$,S)=>{const I=Ge(tt($)),C=rs(r._getFieldArray(s),k,I);r._names.focus=Qr(s,k,S),d.current=rs(d.current,k,I.map(et)),p(C),u(C),r._setFieldArray(s,C,rs,{argA:k,argB:ts($)})},v=(k,$)=>{const S=r._getFieldArray(s);os(S,k,$),os(d.current,k,$),p(S),u(S),r._setFieldArray(s,S,os,{argA:k,argB:$},!1)},x=(k,$)=>{const S=r._getFieldArray(s);ss(S,k,$),ss(d.current,k,$),p(S),u(S),r._setFieldArray(s,S,ss,{argA:k,argB:$},!1)},j=(k,$)=>{const S=tt($),I=zn(r._getFieldArray(s),k,S);d.current=[...I].map((C,A)=>!C||A===k?et():d.current[A]),p(I),u([...I]),r._setFieldArray(s,I,zn,{argA:k,argB:S},!0,!1)},N=k=>{const $=Ge(tt(k));d.current=$.map(et),p([...$]),u([...$]),r._setFieldArray(s,[...$],S=>S,{},!0,!1)};return l.useEffect(()=>{r._state.action=!1,Qd(s,r._names)&&r._subjects.state.next(M({},r._formState));const k=dr(r._options.mode);if(f.current&&(!k.isOnSubmit||r._formState.isSubmitted)&&!dr(r._options.reValidateMode).isOnSubmit&&!k.isOnBlur)if(r._options.resolver)r._runSchema([s]).then($=>{r._updateIsValidating([s]);const S=Oe($.errors,s),I=Oe(r._formState.errors,s);(I?!S&&I.type||S&&(I.type!==S.type||I.message!==S.message):S&&S.type)&&(S?br(r._formState.errors,s,S):Ga(r._formState.errors,s),r._subjects.state.next({errors:r._formState.errors}))});else{const $=Oe(r._fields,s);$&&$._f&&!(dr(r._options.reValidateMode).isOnSubmit&&dr(r._options.mode).isOnSubmit)&&tu($,r._names.disabled,r._formValues,r._options.criteriaMode===At.all,r._options.shouldUseNativeValidation).then(S=>!hr(S)&&r._subjects.state.next({errors:eu(r._formState.errors,S,s)}))}r._subjects.state.next({name:s,values:tt(r._formValues)}),r._names.focus&&us(r._fields,($,S)=>{if(r._names.focus&&S.startsWith(r._names.focus)&&$.focus)return $.focus(),1}),r._names.focus="",r._setValid(),f.current=!1},[c,s,r]),l.useEffect(()=>(!Oe(r._formValues,s)&&r._setFieldArray(s),()=>{const k=!(r._options.shouldUnregister||o),$=(S,I)=>{const C=Oe(r._fields,S);C&&C._f&&(C._f.mount=I)};f.current&&k&&r._subjects.state.next({name:s,values:tt(r._formValues)}),k?$(s,!1):r.unregister(s)}),[s,r,a,o]),{swap:l.useCallback(v,[p,s,r]),move:l.useCallback(x,[p,s,r]),prepend:l.useCallback(h,[p,s,r]),append:l.useCallback(b,[p,s,r]),remove:l.useCallback(g,[p,s,r]),insert:l.useCallback(w,[p,s,r]),update:l.useCallback(j,[p,s,r]),replace:l.useCallback(N,[p,s,r]),fields:l.useMemo(()=>c.map((k,$)=>P(M({},k),{[a]:d.current[$]||et()})),[c,a])}}function nu(e){const{form:t}=Cs();if(!t)throw new Error("useFormFieldArray must be used within a Form component with react-hook-form integration");return su(P(M({},e),{control:t.control}))}function Ya(a){var o=a,{items:e,separator:t="/",className:r=""}=o,s=z(o,["items","separator","className"]);const i=["flex","items-center",m("sm","space-x"),re("bodySmall")],c=y(...i,r);return n.jsx("nav",P(M({"aria-label":"Breadcrumb",className:c},s),{children:n.jsx("ol",{className:y("flex","items-center",m("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:y(m("sm","mx"),"text-fg-tertiary"),"aria-hidden":"true",children:t}),f?n.jsx("span",{className:y("text-fg-primary",ze("label")),"aria-current":"page",children:u.label}):u.href?n.jsx("a",{href:u.href,className:y("inline-flex","items-center",m("xs","px"),m("xs","pt"),"border-b-2","border-transparent",re("bodySmall"),ze("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 qa(u){var d=u,{currentPage:e,totalPages:t,onPageChange:r,totalItems:s,itemsPerPage:a,showPageInfo:o=!0,className:i=""}=d,c=z(d,["currentPage","totalPages","onPageChange","totalItems","itemsPerPage","showPageInfo","className"]);const f=()=>{e>1&&r(e-1)},p=()=>{e<t&&r(e+1)},b=x=>{x>=1&&x<=t&&x!==e&&r(x)},h=()=>{const x=[];if(t<=5)for(let N=1;N<=t;N++)x.push(N);else if(e<=3){for(let N=1;N<=4;N++)x.push(N);x.push("ellipsis"),x.push(t)}else if(e>=t-2){x.push(1),x.push("ellipsis");for(let N=t-3;N<=t;N++)x.push(N)}else{x.push(1),x.push("ellipsis");for(let N=e-1;N<=e+1;N++)x.push(N);x.push("ellipsis"),x.push(t)}return x},g=s&&a?(e-1)*a+1:void 0,w=s&&a?Math.min(e*a,s):void 0,v=y("flex","items-center","justify-between",m("base","px"),m("md","py"),i);return n.jsxs("nav",P(M({className:v,"aria-label":"Pagination"},c),{children:[n.jsxs("div",{className:y("flex","items-center",m("sm","gap")),children:[n.jsx(Q,{variant:"secondary",onClick:f,disabled:e===1,size:"sm",children:"Previous"}),n.jsx("div",{className:y("flex","items-center",m("xs","gap")),children:h().map((x,j)=>{if(x==="ellipsis")return n.jsx("span",{className:y(m("sm","px"),"text-fg-tertiary"),children:"..."},`ellipsis-${j}`);const N=x,k=N===e;return n.jsx(Q,{variant:k?"primary":"ghost",onClick:()=>b(N),size:"sm","aria-current":k?"page":void 0,"aria-label":`Go to page ${N}`,children:N},N)})}),n.jsx(Q,{variant:"secondary",onClick:p,disabled:e===t,size:"sm",children:"Next"})]}),o&&s&&a&&n.jsxs("div",{className:y(je("sm"),"text-fg-primary"),children:["Showing ",g," to ",w," of ",s," results"]})]}))}function Xa(u){var d=u,{title:e,message:t,actionLabel:r,onAction:s,illustration:a,variant:o="default",className:i=""}=d,c=z(d,["title","message","actionLabel","onAction","illustration","variant","className"]);const f=y("flex","flex-col","items-center","justify-center","text-center",m("xl","py"),m("base","px"),i),p=o==="withAction"||r&&s,b=o==="withIllustration"||a;return n.jsxs("div",P(M({className:f,role:"status","aria-live":"polite","aria-label":`${e}. ${t}`},c),{children:[b&&a&&n.jsx("div",{className:y(m("base","mb")),"aria-hidden":"true",children:a}),n.jsx($e,{as:"h3",className:y(re("h4"),It("semibold"),"text-fg-primary",m("sm","mb")),children:e}),n.jsx($e,{as:"p",className:y(re("bodySmall"),"text-fg-secondary",m("md","mb"),"max-w-sm"),children:t}),p&&r&&s&&n.jsx(Q,{variant:"primary",onClick:s,children:r})]}))}function Ja(c){var u=c,{trigger:e,items:t,align:r="right",variant:s="default",className:a="","aria-label":o}=u,i=z(u,["trigger","items","align","variant","className","aria-label"]);const[d,f]=l.useState(!1),[p,b]=l.useState(-1),h=l.useRef(null),g=l.useRef(null),w=l.useRef(null),v=l.useRef([]),x=l.useId(),j=`dropdown-menu-${x}`,N=`dropdown-trigger-${x}`;l.useEffect(()=>{const A=F=>{h.current&&!h.current.contains(F.target)&&(f(!1),b(-1))};return d&&(document.addEventListener("mousedown",A),setTimeout(()=>{var D;const F=t.findIndex(T=>!T.disabled);F>=0&&(b(F),(D=v.current[F])==null||D.focus())},0)),()=>{document.removeEventListener("mousedown",A)}},[d,t]),l.useEffect(()=>{if(!d)return;const A=D=>{var _,V,B,X;const T=t.map((Z,oe)=>({item:Z,index:oe})).filter(({item:Z})=>!Z.disabled),R=T.findIndex(({index:Z})=>Z===p);switch(D.key){case"ArrowDown":{D.preventDefault();const Z=R<T.length-1?T[R+1].index:T[0].index;b(Z),(_=v.current[Z])==null||_.focus();break}case"ArrowUp":{D.preventDefault();const Z=R>0?T[R-1].index:T[T.length-1].index;b(Z),(V=v.current[Z])==null||V.focus();break}case"Home":{D.preventDefault();const Z=T[0].index;b(Z),(B=v.current[Z])==null||B.focus();break}case"End":{D.preventDefault();const Z=T[T.length-1].index;b(Z),(X=v.current[Z])==null||X.focus();break}case"Enter":case" ":D.preventDefault(),p>=0&&!t[p].disabled&&k(t[p]);break;case"Escape":D.preventDefault(),f(!1),b(-1),setTimeout(()=>{var Z;(Z=g.current)==null||Z.focus()},0);break}},F=w.current;if(F){const D=A;return F.addEventListener("keydown",D),()=>{F.removeEventListener("keydown",D)}}},[d,p,t]);const k=A=>{A.disabled||(A.onClick(),f(!1),b(-1),setTimeout(()=>{var F;(F=g.current)==null||F.focus()},0))},$=()=>{f(!d),b(-1)},S=A=>{(A.key==="Enter"||A.key===" "||A.key==="ArrowDown")&&(A.preventDefault(),f(!0))},I=r==="right"?"right-0":"left-0",C=l.isValidElement(e)?l.cloneElement(e,{onClick:A=>{var F,D;$(),(D=(F=e.props).onClick)==null||D.call(F,A)},onKeyDown:A=>{var F,D;S(A),(D=(F=e.props).onKeyDown)==null||D.call(F,A)},"aria-haspopup":"menu","aria-expanded":d,"aria-controls":j,"aria-label":o||e.props["aria-label"]||"Open menu",id:N,ref:wa(g,e.props.ref)}):n.jsx("div",{ref:A=>{g.current=A},onClick:$,onKeyDown:S,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":j,"aria-label":o||"Open menu",id:N,children:e});return n.jsxs("div",P(M({className:y("relative","inline-block",a),ref:h},i),{children:[C,d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:y("fixed","inset-0","z-10"),onClick:()=>{f(!1),b(-1)},"aria-hidden":"true"}),n.jsx("div",{ref:w,id:j,className:y("absolute","z-20",m("sm","mt"),"w-48",U("md"),fe("lg"),"bg-surface-overlay","ring-1","ring-line-strong","ring-opacity-5",I),role:"menu","aria-orientation":"vertical","aria-labelledby":N,"aria-activedescendant":p>=0?`${j}-item-${p}`:void 0,children:n.jsx("div",{className:y(m("xs","py")),role:"none",children:t.map((A,F)=>{const D=y("block",m("base","px"),m("xs","py"),re("bodySmall"),"w-full","text-left","focus:outline-none",A.disabled?y("text-fg-disabled","cursor-not-allowed","opacity-50"):A.variant==="danger"?y("text-error-dark","hover:bg-error-bg-emphasis","focus:bg-error-bg-emphasis"):y("text-fg-primary","hover:bg-surface-hover","focus:bg-surface-hover"));return n.jsx("button",{id:`${j}-item-${F}`,ref:T=>{v.current[F]=T},type:"button",className:D,onClick:()=>k(A),disabled:A.disabled,role:"menuitem","aria-disabled":A.disabled,tabIndex:A.disabled?-1:p===F?0:-1,children:A.label},F)})})})]})]}))}const Za=l.createContext(void 0);function Qa(){const e=l.useContext(Za);if(!e)throw new Error("DatePicker components must be used within a DatePicker component");return e}function fs({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&&s&&t==="range"&&typeof s=="object"&&"start"in s?s:{start:null,end:null},[p,b]=l.useState(d()),[h,g]=l.useState(f()),w=t==="single"?r instanceof Date?r:p:null,v=t==="range"?r&&typeof r=="object"&&"start"in r?r:h:null,N={selectedDate:w,selectedRange:v,mode:t,onDateChange:k=>{t==="single"&&(r===void 0&&b(k),a==null||a(k))},onRangeChange:k=>{t==="range"&&(r===void 0&&g(k),a==null||a(k))},minDate:o,maxDate:i,disabledDates:c,locale:u};return n.jsx(Za.Provider,{value:N,children:e})}function Ht(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 Vn(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 As(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=z(u,["placeholder","format","showCalendarButton","aria-label","onFocus","className"]);const{selectedDate:d,selectedRange:f,mode:p,onDateChange:b}=Qa(),[h,g]=l.useState(""),[w,v]=l.useState(!1),x=l.useRef(null);l.useEffect(()=>{p==="single"&&d?g(Ht(d,t)):p==="range"&&f?f.start&&f.end?g(`${Ht(f.start,t)} - ${Ht(f.end,t)}`):f.start?g(Ht(f.start,t)):g(""):g("")},[d,f,p,t]);const j=$=>{const S=$.target.value;if(g(S),p==="single"){const I=Vn(S);b(I)}},N=()=>{if(v(!1),h&&p==="single"){const $=Vn(h);$&&g(Ht($,t))}},k=()=>{var $;($=x.current)==null||$.focus()};return n.jsx("div",P(M({className:`relative ${o}`},i),{children:n.jsx(Ee,{ref:x,type:"text",value:h,onChange:j,onFocus:()=>{v(!0),a==null||a()},onBlur:N,placeholder:e,"aria-label":s||e,rightIcon:r?n.jsx(Q,{variant:"iconOnly",size:"sm",onClick:k,"aria-label":"Open calendar",type:"button",children:n.jsx(nc,{className:"h-4 w-4"})}):void 0})}))}function au(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function ou(e){return new Date(e.getFullYear(),e.getMonth(),1).getDay()}function vt(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Bt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function iu(e,t,r){if(!t||!r)return!1;const s=e.getTime();return s>=t.getTime()&&s<=r.getTime()}function Wn(e,t,r,s){return!!(t&&e<t||r&&e>r||s!=null&&s.some(a=>vt(e,a)))}const lu=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],cu=["January","February","March","April","May","June","July","August","September","October","November","December"];function Rs(a){var o=a,{month:e,onMonthChange:t,className:r=""}=o,s=z(o,["month","onMonthChange","className"]);const{selectedDate:i,selectedRange:c,mode:u,onDateChange:d,onRangeChange:f,minDate:p,maxDate:b,disabledDates:h}=Qa(),[g,w]=l.useState(e||i||(c==null?void 0:c.start)||new Date),v=l.useRef(null),[x,j]=l.useState(()=>{const T=new Date,R=e||i||(c==null?void 0:c.start)||T;return i&&Bt(i,R)?i:Bt(T,R)?T:new Date(R.getFullYear(),R.getMonth(),1)});l.useEffect(()=>{e&&w(e)},[e]),l.useEffect(()=>{if(!v.current)return;const T=v.current.querySelector(`[data-date="${x.toISOString()}"]`);T&&T.focus()},[x]);const N=(()=>{if(Bt(x,g))return x;const T=new Date;return Bt(T,g)?T:new Date(g.getFullYear(),g.getMonth(),1)})(),k=au(g),$=ou(g),S=[];for(let T=0;T<$;T++)S.push(null);for(let T=1;T<=k;T++)S.push(new Date(g.getFullYear(),g.getMonth(),T));const I=T=>{if(!Wn(T,p,b,h)){if(u==="single")d(T);else if(u==="range"){const R=c||{start:null,end:null};!R.start||R.start&&R.end?f({start:T,end:null}):R.start&&!R.end&&(T<R.start?f({start:T,end:R.start}):f({start:R.start,end:T}))}}},C=()=>{const T=new Date(g.getFullYear(),g.getMonth()-1,1);w(T),t==null||t(T)},A=()=>{const T=new Date(g.getFullYear(),g.getMonth()+1,1);w(T),t==null||t(T)},F=(T,R)=>{let _=null;switch(T.key){case"ArrowLeft":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),R.getDate()-1);break;case"ArrowRight":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),R.getDate()+1);break;case"ArrowUp":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),R.getDate()-7);break;case"ArrowDown":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),R.getDate()+7);break;case"Home":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),1);break;case"End":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth()+1,0);break;case"Enter":case" ":T.preventDefault(),I(R);return}_&&(Bt(_,g)||w(new Date(_.getFullYear(),_.getMonth(),1)),j(_))},D=[];for(let T=0;T<S.length;T+=7)D.push(S.slice(T,T+7));return n.jsxs("div",P(M({ref:v,className:`${m("base","p")} ${r}`},s),{children:[n.jsxs("div",{className:`flex items-center justify-between ${m("base","mb")}`,children:[n.jsx(Q,{variant:"iconOnly",size:"sm",onClick:C,"aria-label":"Previous month",children:n.jsx(Gt,{className:"h-4 w-4"})}),n.jsxs("div",{className:"text-sm font-semibold",children:[cu[g.getMonth()]," ",g.getFullYear()]}),n.jsx(Q,{variant:"iconOnly",size:"sm",onClick:A,"aria-label":"Next month",children:n.jsx(yt,{className:"h-4 w-4"})})]}),n.jsxs("div",{role:"grid","aria-label":"Calendar",children:[n.jsx("div",{role:"row",className:`grid grid-cols-7 ${m("xs","gap")} ${m("sm","mb")}`,children:lu.map(T=>n.jsx("div",{role:"columnheader",className:`text-center text-xs font-medium text-fg-tertiary ${m("xs","py")}`,children:T},T))}),D.map((T,R)=>n.jsx("div",{role:"row",className:`grid grid-cols-7 ${m("xs","gap")}`,children:T.map((_,V)=>{if(!_)return n.jsx("div",{role:"gridcell",className:"aspect-square"},`empty-${R}-${V}`);const B=u==="single"?vt(_,i):vt(_,(c==null?void 0:c.start)||null)||vt(_,(c==null?void 0:c.end)||null),X=u==="range"&&c?iu(_,c.start,c.end):!1,Z=Wn(_,p,b,h),oe=vt(_,new Date),H=vt(_,x),L=vt(_,N);return n.jsx("button",{role:"gridcell",type:"button","data-date":_.toISOString(),tabIndex:L?0:-1,onClick:()=>I(_),onKeyDown:Y=>F(Y,_),className:`
6
+ <%s key={someKey} {...props} />`,J,O,W,O),H[O+J]=!0)}if(O=null,ee!==void 0&&(r(ee),O=""+ee),i(Y)&&(r(Y.key),O=""+Y.key),"key"in Y){ee={};for(var q in Y)q!=="key"&&(ee[q]=Y[q])}else ee=Y;return O&&c(ee,typeof P=="function"?P.displayName||P.name||"Unknown":P),d(P,O,ee,a(),te,ae)}function p(P){b(P)?P._store&&(P._store.validated=1):typeof P=="object"&&P!==null&&P.$$typeof===A&&(P._payload.status==="fulfilled"?b(P._payload.value)&&P._payload.value._store&&(P._payload.value._store.validated=1):P._store&&(P._store.validated=1))}function b(P){return typeof P=="object"&&P!==null&&P.$$typeof===x}var g=l,x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),k=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),T=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=Object.prototype.hasOwnProperty,_=Array.isArray,V=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(P){return P()}};var B,X={},Z=g.react_stack_bottom_frame.bind(g,o)(),oe=V(s(o)),H={};Vt.Fragment=y,Vt.jsx=function(P,Y,ee){var J=1e4>T.recentlyCreatedOwnerStacks++;return f(P,Y,ee,!1,J?Error("react-stack-top-frame"):Z,J?V(s(P)):oe)},Vt.jsxs=function(P,Y,ee){var J=1e4>T.recentlyCreatedOwnerStacks++;return f(P,Y,ee,!0,J?Error("react-stack-top-frame"):Z,J?V(s(P)):oe)}})()),Vt}var In;function Pl(){return In||(In=1,process.env.NODE_ENV==="production"?or.exports=Ll():or.exports=Fl()),or.exports}var n=Pl();const ja=l.createContext(void 0);function Na({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"?Kt:wr,isDark:s==="dark"};return n.jsx(ja.Provider,{value:u,children:e})}function Ol(){const e=l.useContext(ja);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}const zl={breakpoints:kr,spacing:yr,typography:wt,animations:Tl,features:{reducedMotion:!1,highContrast:!1,debug:!1},behavior:{defaultAnimationDuration:200,defaultTransitionDuration:150,focusVisible:!0}},Sa=l.createContext(void 0);function $a({children:e,config:t,strategy:r="default"}){const s=l.useMemo(()=>{const d=M({},zl);return t?F(M(M({},d),t),{breakpoints:t.breakpoints||d.breakpoints,spacing:t.spacing||d.spacing,typography:t.typography||d.typography,animations:t.animations||d.animations,features:M(M({},d.features),t.features),behavior:M(M({},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(Sa.Provider,{value:u,children:e})}function Vl(){const e=l.useContext(Sa);if(e===void 0)throw new Error("useConfig must be used within a ConfigProvider");return e}const jr=l.createContext(void 0);function vs(){const e=l.useContext(jr);if(!e)throw new Error("Toast components must be used within a ToastProvider");return e}function Wl(){return l.useContext(jr)}function Ca({children:e,defaultDuration:t=5e3,maxToasts:r=5}){const[s,a]=l.useState([]),o=l.useCallback(d=>{var b;const f=`toast-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,p=F(M({},d),{id:f,duration:(b=d.duration)!=null?b:t});return a(g=>[p,...g].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(jr.Provider,{value:u,children:e})}const Nr=l.createContext(void 0);function Pt(){const e=l.useContext(Nr);if(!e)throw new Error("Dialog components must be used within a Dialog component");return e}function Hl(){return l.useContext(Nr)}function Sr(e){const t=l.useRef(null);l.useEffect(()=>{var r;if(e)t.current=(r=document.activeElement)!=null?r:null;else{const s=t.current,a=setTimeout(()=>{s==null||s.focus()},0);return()=>clearTimeout(a)}},[e])}function ys({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,titleId:a,descriptionId:o}){const[i,c]=l.useState(r),u=t!==void 0?t:i,d=p=>{t===void 0&&c(p),s==null||s(p)};Sr(u),l.useEffect(()=>(u?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[u]);const f={isOpen:u,onOpenChange:d,onClose:()=>d(!1),titleId:a,descriptionId:o};return n.jsx(Nr.Provider,{value:f,children:e})}const Bl={ThemeProvider:Na,ConfigProvider:$a,ToastProvider:Ca,DialogProvider:ys},ir=Bl;function Ul(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(ir.DialogProvider,F(M({},o),{children:c}))),i.toast&&(c=n.jsx(ir.ToastProvider,F(M({},a),{children:c}))),i.config&&(c=n.jsx(ir.ConfigProvider,F(M({},s),{children:c}))),i.theme&&(c=n.jsx(ir.ThemeProvider,F(M({},r),{children:c}))),c}function Gl({children:e,config:t}){const r=l.useMemo(()=>Ul(e,t),[e,t]);return n.jsx(n.Fragment,{children:r})}function Kl(){return{}}class Qe{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 Yl={none:Qe.create("none"),sm:Qe.create("sm"),md:Qe.create("md"),lg:Qe.create("lg"),xl:Qe.create("xl"),"2xl":Qe.create("2xl"),"3xl":Qe.create("3xl"),full:Qe.create("full")};function U(e){return Yl[e].tailwind}function ql(s){var a=s,{variant:e="info",className:t}=a,r=z(a,["variant","className"]);const o={warning:v("bg-warning-bg","text-warning-dark","border-warning"),error:v("bg-error-bg","text-error-dark","border-error"),info:v("bg-info-bg","text-info-dark","border-info")};return n.jsx("div",M({role:"alert",className:v("border",m("base","px"),m("sm","py"),U("lg"),o[e],t)},r))}const Xl={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 Jl(d,u){var f=d,{variant:e="paragraph",bold:t,italic:r,className:s,as:a,colorRole:o="neutral",colorShade:i="dark"}=f,c=z(f,["variant","bold","italic","className","as","colorRole","colorShade"]);const p=[];let b;if(a)b=a;else switch(e){case"heading":b="h2";break;case"list":b="li";break;default:b="p";break}return e==="heading"?p.push(ue("h2")):e==="body"||e==="paragraph"?p.push(ue("body")):e==="bodySmall"?p.push(ue("bodySmall")):e==="bodyLarge"?p.push(ue("bodyLarge")):e==="caption"?p.push(ue("caption")):e==="label"?p.push(ue("label")):p.push(ue("body")),t&&p.push("font-bold"),r&&p.push("italic"),p.push(Xl[o][i]),n.jsx(b,M({ref:u,className:v(...p,s)},c))}const $e=l.forwardRef(Jl);const Ea=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim();const Zl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Ql=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,s)=>s?s.toUpperCase():r.toLowerCase());const Dn=e=>{const t=Ql(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Zr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const ec=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},tc=l.createContext({}),rc=()=>l.useContext(tc),sc=l.forwardRef((d,u)=>{var f=d,{color:e,size:t,strokeWidth:r,absoluteStrokeWidth:s,className:a="",children:o,iconNode:i}=f,c=z(f,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);var h,j,N;const{size:p=24,strokeWidth:b=2,absoluteStrokeWidth:g=!1,color:x="currentColor",className:w=""}=(h=rc())!=null?h:{},y=(s!=null?s:g)?Number(r!=null?r:b)*24/Number(t!=null?t:p):r!=null?r:b;return l.createElement("svg",M(M(F(M({ref:u},Zr),{width:(j=t!=null?t:p)!=null?j:Zr.width,height:(N=t!=null?t:p)!=null?N:Zr.height,stroke:e!=null?e:x,strokeWidth:y,className:Ea("lucide",w,a)}),!o&&!ec(c)&&{"aria-hidden":"true"}),c),[...i.map(([k,$])=>l.createElement(k,$)),...Array.isArray(o)?o:[o]])});const le=(e,t)=>{const r=l.forwardRef((i,o)=>{var c=i,{className:s}=c,a=z(c,["className"]);return l.createElement(sc,M({ref:o,iconNode:t,className:Ea(`lucide-${Zl(Dn(e))}`,`lucide-${e}`,s)},a))});return r.displayName=Dn(e),r};const nc=[["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"}]],ac=le("calendar",nc);const oc=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],cs=le("check",oc);const ic=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$r=le("chevron-down",ic);const lc=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Gt=le("chevron-left",lc);const cc=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],yt=le("chevron-right",cc);const dc=[["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"}]],ws=le("circle-alert",dc);const uc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],mr=le("circle-check",uc);const fc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],mc=le("clock",fc);const pc=[["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"}]],bc=le("command",pc);const gc=[["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"}]],hc=le("download",gc);const xc=[["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"}]],vc=le("ellipsis-vertical",xc);const yc=[["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"}]],wc=le("eye-off",yc);const kc=[["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"}]],jc=le("eye",kc);const Nc=[["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"}]],Sc=le("file",Nc);const $c=[["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"}]],Cc=le("funnel",$c);const Ec=[["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"}]],Mc=le("grip-vertical",Ec);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"}]],Ac=le("info",Tc);const Rc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ma=le("loader-circle",Rc);const Ic=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Dc=le("menu",Ic);const _c=[["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"}]],Lc=le("panel-left-close",_c);const Fc=[["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"}]],Pc=le("panel-left-open",Fc);const Oc=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ds=le("search",Oc);const zc=[["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"}]],Et=le("star",zc);const Vc=[["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"}]],Wc=le("triangle-alert",Vc);const Hc=[["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"}]],Bc=le("upload",Hc);const Uc=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ce=le("x",Uc);function _n(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gc(...e){return t=>{let r=!1;const s=e.map(a=>{const o=_n(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a<s.length;a++){const o=s[a];typeof o=="function"?o():_n(e[a],null)}}}}function Kc(...e){return Se.useCallback(Gc(...e),e)}function Yc(e){const t=Se.forwardRef((r,s)=>{var g;let b=r,{children:a}=b,o=z(b,["children"]),i=null,c=!1;const u=[];Ln(a)&&typeof lr=="function"&&(a=lr(a._payload)),Se.Children.forEach(a,x=>{var w;if(ed(x)){c=!0;const y=x;let h="child"in y.props?y.props.child:y.props.children;Ln(h)&&typeof lr=="function"&&(h=lr(h._payload)),i=Jc(y,h),u.push((w=i==null?void 0:i.props)==null?void 0:w.children)}else u.push(x)}),i?i=Se.cloneElement(i,void 0,u):!c&&Se.Children.count(a)===1&&Se.isValidElement(a)&&(i=a);const d=i?Qc(i):void 0,f=Kc(s,d);if(!i){if(a||a===0)throw new Error(c?nd(e):sd(e));return a}const p=Zc(o,(g=i.props)!=null?g:{});return i.type!==Se.Fragment&&(p.ref=s?f:d),Se.cloneElement(i,p)});return t.displayName=`${e}.Slot`,t}var Ta=Yc("Slot"),Aa=Symbol.for("radix.slottable");function qc(e){const t=r=>"child"in r?r.children(r.child):r.children;return t.displayName=`${e}.Slottable`,t.__radixId=Aa,t}var Xc=qc("Slottable"),Jc=(e,t)=>{if("child"in e.props){const r=e.props.child;return Se.isValidElement(r)?Se.cloneElement(r,void 0,e.props.children(r.props.children)):null}return Se.isValidElement(t)?t:null};function Zc(e,t){const r=M({},t);for(const s in t){const a=e[s],o=t[s];/^on[A-Z]/.test(s)?a&&o?r[s]=(...c)=>{const u=o(...c);return a(...c),u}:a&&(r[s]=a):s==="style"?r[s]=M(M({},a),o):s==="className"&&(r[s]=[a,o].filter(Boolean).join(" "))}return M(M({},e),r)}function Qc(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function ed(e){return Se.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Aa}var td=Symbol.for("react.lazy");function Ln(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===td&&"_payload"in e&&rd(e._payload)}function rd(e){return typeof e=="object"&&e!==null&&"then"in e}var sd=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,nd=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,lr=Se[" use ".trim().toString()];const ad=pe("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"}}),ks=l.memo(function(i){var c=i,{size:t="md",variant:r="primary",label:s,className:a=""}=c,o=z(c,["size","variant","label","className"]);return n.jsxs("div",F(M({className:v("inline-flex","items-center",a),role:"status","aria-label":s||"Loading","aria-live":"polite"},o),{children:[n.jsx(Ma,{className:v(ad({size:t,variant:r})),"aria-hidden":"true"}),s&&n.jsx("span",{className:v(m("sm","ml"),re("bodySmall"),"text-fg-secondary","sr-only"),children:s})]}))});ks.displayName="Spinner";const od=pe(v("inline-flex","items-center","justify-center",ue("button").split(" ")[2]||"font-medium",U("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{primary:v("bg-surface-brand-strong","text-fg-inverse","hover:opacity-90","focus:ring-line-brand"),secondary:v("bg-surface-secondary","text-fg-inverse","hover:opacity-90","focus:ring-line-secondary"),error:v("bg-error","text-fg-inverse","hover:opacity-90","focus:ring-error"),outline:v("border-2","border-line-default","bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),ghost:v("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),iconOnly:v("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus",m("none","p")),link:v("bg-transparent","text-fg-brand","underline-offset-4","hover:underline","focus:ring-line-focus")},size:{sm:v(m("md","px"),m("1.5","py"),re("bodySmall"),m("1.5","gap")),md:v(m("base","px"),m("sm","py"),re("body"),m("sm","gap")),lg:v(m("lg","px"),m("md","py"),re("bodyLarge"),m("2.5","gap"))}},compoundVariants:[{variant:"iconOnly",size:"sm",class:v("h-8","w-8",m("none","p"))},{variant:"iconOnly",size:"md",class:v("h-10","w-10",m("none","p"))},{variant:"iconOnly",size:"lg",class:v("h-12","w-12",m("none","p"))},{variant:"link",size:"sm",class:v(m("none","px"),m("none","py"))},{variant:"link",size:"md",class:v(m("none","px"),m("none","py"))},{variant:"link",size:"lg",class:v(m("none","px"),m("none","py"))}],defaultVariants:{variant:"primary",size:"md"}});function cr({children:e,position:t}){return e?n.jsx("span",{className:`inline-flex items-center ${t==="left"?m("none","mr"):m("none","ml")}`,children:e}):null}const Q=l.memo(l.forwardRef(function(h,y){var j=h,{variant:t="primary",size:r="md",isLoading:s=!1,loadingText:a,loadingIcon:o,leftIcon:i,rightIcon:c,fullWidth:u=!1,asChild:d=!1,as:f,className:p="",disabled:b=!1,children:g,"aria-label":x}=j,w=z(j,["variant","size","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","asChild","as","className","disabled","children","aria-label"]);typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&d&&f!==void 0&&f!=="button"&&console.warn("[Button] `as` is ignored when `asChild` is true; the child element is used as the root. Drop one of the two props to silence this warning.");const N=d?Ta:f!=null?f:"button",k=l.useMemo(()=>v(od({variant:t,size:r}),u&&"w-full",p),[t,r,u,p]),$=l.useMemo(()=>t==="iconOnly"||!g&&(i||c),[t,g,i,c]),S=l.useMemo(()=>$&&!x&&!g?"Button":x,[$,x,g]),I=l.useMemo(()=>t==="error"?"primary":t==="primary"||t==="secondary"?"neutral":"primary",[t]),C=l.useMemo(()=>r==="sm"?"sm":r==="lg"?"lg":"md",[r]),A=l.useMemo(()=>o||n.jsx(ks,{size:C,variant:I}),[o,C,I]),L=!d&&(f===void 0||f==="button")&&!w.type?"button":void 0,D=M(M({className:k,disabled:b||s,"aria-busy":s,"aria-label":S,"aria-disabled":b||s},L?{type:L}:{}),w);return d?n.jsxs(N,F(M({ref:y},D),{children:[i&&n.jsx(cr,{position:"left",children:i}),n.jsx(Xc,{children:g}),c&&n.jsx(cr,{position:"right",children:c})]})):n.jsx(N,F(M({ref:y},D),{children:s?n.jsxs(n.Fragment,{children:[A,a&&n.jsx("span",{className:m("sm","ml"),children:a}),!a&&g&&n.jsx("span",{className:`${m("sm","ml")} opacity-0`,children:g})]}):n.jsxs(n.Fragment,{children:[i&&n.jsx(cr,{position:"left",children:i}),g,c&&n.jsx(cr,{position:"right",children:c})]})}))}));Q.displayName="Button";const id=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>v(m("xs","mt"),ue("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})}),Ee=l.memo(l.forwardRef(function(N,j){var k=N,{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:b="",disabled:g=!1,type:x="text",value:w,onChange:y}=k,h=z(k,["id","label","error","success","helperText","size","variant","leftIcon","rightIcon","showClearButton","onClear","className","disabled","type","value","onChange"]);const $=l.useId(),S=t||`input-${$}`,I=l.useMemo(()=>s?`${S}-error`:void 0,[s,S]),C=l.useMemo(()=>o?`${S}-helper`:void 0,[o,S]),[A,L]=l.useState(!1),D=l.useMemo(()=>x==="password",[x]),T=l.useMemo(()=>D&&A?"text":x,[D,A,x]),R=l.useMemo(()=>s?"error":a?"success":"default",[s,a]),_=l.useMemo(()=>w!=null&&w!=="",[w]),V=l.useMemo(()=>f&&_&&!g,[f,_,g]),B=l.useMemo(()=>"focus:border-line-focus",[]),X=l.useMemo(()=>"focus:border-error",[]),Z=l.useMemo(()=>"focus:border-success",[]),oe=l.useMemo(()=>B.replace("focus:border-","focus:ring-"),[B]),H=l.useCallback(W=>W==="error"?X.replace("focus:border-","focus:ring-"):Z.replace("focus:border-","focus:ring-"),[X,Z]),P=l.useMemo(()=>pe(v("w-full",U("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{default:v("border-0","border-b-2","border-line-default","focus:border-line-focus"),outlined:v("border","border-line-default","focus:border-line-focus"),filled:v("bg-surface-muted","border-0","focus:bg-surface-base","focus:ring-2",oe)},size:{sm:v("h-8",re("bodySmall"),m("md","px")),md:v("h-10",re("body"),m("base","px")),lg:v("h-12",re("bodyLarge"),m("lg","px"))},state:{default:"",error:v("border-error","focus:border-error",H("error")),success:v("border-success","focus:border-success",H("success"))}},defaultVariants:{variant:"outlined",size:"md",state:"default"}}),[oe,H]),Y=l.useMemo(()=>v(P({variant:c,size:i,state:R}),u&&(i==="sm"?"pl-9":m(i==="lg"?"3xl":"2xl","pl")),(d||V||D)&&(i==="sm"?"pr-9":m(i==="lg"?"3xl":"2xl","pr")),b),[P,c,i,R,u,d,V,D,b]),ee=l.useMemo(()=>v("block",ue("label"),m("xs","mb"),g&&"opacity-50"),[g]),J=l.useMemo(()=>i==="sm"?"h-4 w-4":i==="lg"?"h-5 w-5":"h-4 w-4",[i]),te=l.useMemo(()=>i==="sm"?"top-2":i==="lg"?"top-3.5":"top-2.5",[i]),ae=l.useCallback(W=>{var q;if(W.stopPropagation(),p)p();else if(y){const ce=(q=W.currentTarget.closest(".relative"))==null?void 0:q.querySelector("input");if(ce){const ie={target:ce,currentTarget:ce,bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:2,isTrusted:!1,nativeEvent:new Event("change"),preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},timeStamp:Date.now()};Object.defineProperty(ie.target,"value",{value:"",writable:!0}),Object.defineProperty(ie.currentTarget,"value",{value:"",writable:!0}),y(ie)}}},[p,y]),O=l.useCallback(()=>{L(W=>!W)},[]);return n.jsxs("div",{className:"w-full",children:[r&&n.jsx("label",{htmlFor:S,className:ee,children:r}),n.jsxs("div",{className:"relative",children:[u&&n.jsx("div",{className:`absolute left-3 ${te} text-fg-secondary opacity-60 pointer-events-none`,children:n.jsx("div",{className:J,children:u})}),n.jsx("input",M({id:S,ref:j,type:T,className:Y,disabled:g,value:w,onChange:y,"aria-invalid":s,"aria-required":h.required,"aria-describedby":I||C,suppressHydrationWarning:!0},h)),n.jsxs("div",{className:`absolute right-3 top-0 bottom-0 flex items-center ${m("xs","gap")}`,children:[V&&n.jsx(Q,{variant:"ghost",size:"sm",onClick:ae,className:`h-auto ${m("xs","p")}`,"aria-label":"Clear input",children:n.jsx(Ce,{className:J})}),D&&n.jsx(Q,{variant:"ghost",size:"sm",onClick:O,className:`h-auto ${m("xs","p")}`,"aria-label":A?"Hide password":"Show password",children:A?n.jsx(wc,{className:J}):n.jsx(jc,{className:J})}),d&&!V&&!D&&n.jsx("div",{className:`text-fg-secondary opacity-60 pointer-events-none ${J}`,children:d})]})]}),(s||a||o)&&n.jsx(id,{error:s,success:a,helperText:o,errorId:I,helperId:C})]})}));Ee.displayName="Input";function Ra({href:e,active:t}){return{isActive:l.useMemo(()=>t!==void 0?t:!1,[t]),NextLink:void 0}}const ld=pe(v("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:v("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","focus:ring-line-brand"),underline:v("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","border-b-2","border-transparent","hover:border-current","focus:ring-line-brand"),background:v("text-fg-primary","hover:bg-surface-hover",U("md"),"focus:ring-line-brand")},size:{sm:v(m("sm","px"),m("xs","py"),re("bodySmall")),md:v(m("base","px"),m("sm","py"),re("body")),lg:v(m("lg","px"),m("md","py"),re("bodyLarge"))}},defaultVariants:{variant:"default",size:"md"},compoundVariants:[{variant:"underline",size:"sm",class:m("0.5","pb")},{variant:"underline",size:"md",class:m("xs","pb")},{variant:"underline",size:"lg",class:m("1.5","pb")},{variant:"background",size:"sm",class:m("xs","px")},{variant:"background",size:"md",class:m("sm","px")},{variant:"background",size:"lg",class:m("base","px")}]}),Cr=l.forwardRef(function(x,g){var w=x,{href:t,children:r,active:s,disabled:a=!1,variant:o="default",size:i="md",as:c,className:u,"aria-label":d,onClick:f,onKeyDown:p}=w,b=z(w,["href","children","active","disabled","variant","size","as","className","aria-label","onClick","onKeyDown"]);const y=l.useMemo(()=>s!==void 0?s:!1,[s]),{NextLink:h}=Ra({href:t,active:y}),j=c||h||"a",N=l.useMemo(()=>{if(!y)return"";switch(o){case"underline":return v("border-b-2","border-line-brand","text-fg-brand-emphasis");case"background":return v("bg-surface-brand-muted","text-fg-brand-emphasis");default:return v("text-fg-brand-emphasis","font-semibold")}},[y,o]),k=l.useCallback(I=>{if(a){I.preventDefault(),I.stopPropagation();return}f==null||f(I)},[a,f]),$=l.useCallback(I=>{if(a){(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),I.stopPropagation());return}p==null||p(I)},[a,p]),S=l.useMemo(()=>{const I=M({className:v(ld({variant:o,size:i}),N,a&&"opacity-50 cursor-not-allowed pointer-events-none",u),"aria-current":y?"page":void 0,"aria-disabled":a?!0:void 0,"aria-label":d,tabIndex:a?-1:void 0,onClick:k,onKeyDown:$,"data-active":y,"data-disabled":a},b);return h&&!c?F(M({},I),{href:a?void 0:t}):F(M({},I),{href:a?void 0:t})},[o,i,N,a,u,y,d,k,$,t,h,c,b]);return n.jsx(j,F(M({ref:g},S),{children:r}))});Cr.displayName="NavLink";const cd=pe(v("inline-flex","items-center","justify-center",ze("label"),U("md"),"border"),{variants:{variant:{success:"",warning:"",error:"",info:"",neutral:"",primary:"",secondary:""},size:{sm:v(m("1.5","px"),m("0.5","py"),re("caption")),md:v(m("sm","px"),m("xs","py"),re("caption")),lg:v(m("sm","px"),m("xs","py"),re("bodySmall"))},style:{solid:"",outline:""}},compoundVariants:[{variant:"success",style:"solid",class:v("bg-success-bg","text-success-dark","border-success")},{variant:"warning",style:"solid",class:v("bg-warning-bg","text-warning-dark","border-warning")},{variant:"error",style:"solid",class:v("bg-error-bg","text-error-dark","border-error")},{variant:"info",style:"solid",class:v("bg-info-bg","text-info-dark","border-info")},{variant:"neutral",style:"solid",class:v("bg-surface-muted","text-fg-primary","border-line-default")},{variant:"primary",style:"solid",class:v("bg-surface-brand-subtle","text-fg-brand-emphasis","border-line-brand")},{variant:"secondary",style:"solid",class:v("bg-pink-300","text-fg-brand-secondary-emphasis","border-line-secondary")},{variant:"success",style:"outline",class:v("bg-transparent","border-success","text-fg-success")},{variant:"warning",style:"outline",class:v("bg-transparent","border-warning","text-fg-warning")},{variant:"error",style:"outline",class:v("bg-transparent","border-error","text-fg-error")},{variant:"info",style:"outline",class:v("bg-transparent","border-info","text-fg-info")},{variant:"neutral",style:"outline",class:v("bg-transparent","border-line-default","text-fg-secondary")},{variant:"primary",style:"outline",class:v("bg-transparent","border-line-brand","text-fg-brand")},{variant:"secondary",style:"outline",class:v("bg-transparent","border-line-secondary","text-fg-brand-secondary")}],defaultVariants:{variant:"neutral",size:"md",style:"solid"}}),Ia=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=z(f,["variant","size","style","className","children","aria-label"]);const p=v(cd({variant:t,size:r,style:s}),a);let b;if(i)b=i;else if(typeof o=="string")b=o;else if(typeof o=="object"&&o!==null&&"props"in o){const g=o.props;g!=null&&g.children&&typeof g.children=="string"&&(b=g.children)}return n.jsx("span",F(M({ref:u,role:"status","aria-label":b,className:p},c),{children:o}))}));Ia.displayName="Badge";const dd=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>v(m("xs","mt"),ue("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})}),Er=l.memo(l.forwardRef(function(x,g){var w=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}=w,b=z(w,["options","optionGroups","placeholder","label","error","success","helperText","size","className","disabled","id"]);const y=l.useId(),h=p||`select-${y}`,j=l.useMemo(()=>o?`${h}-error`:void 0,[o,h]),N=l.useMemo(()=>c?`${h}-helper`:void 0,[c,h]),k=l.useMemo(()=>"focus:border-line-focus",[]),$=l.useMemo(()=>"focus:border-error",[]),S=l.useMemo(()=>"focus:border-success",[]),I=l.useCallback(T=>T==="error"?$.replace("focus:border-","focus:ring-"):T==="success"?S.replace("focus:border-","focus:ring-"):k.replace("focus:border-","focus:ring-"),[$,S,k]),C=l.useMemo(()=>pe(v("block","w-full",U("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:v("h-8",re("bodySmall"),m("md","px")),md:v("h-10",re("body"),m("base","px")),lg:v("h-12",re("bodyLarge"),m("lg","px"))},state:{default:v("border-line-default",I()),error:v("border-error",I("error")),success:v("border-success",I("success"))}},defaultVariants:{size:"md",state:"default"}}),[I]),A=l.useMemo(()=>o?"error":i?"success":"default",[o,i]),L=l.useMemo(()=>v(C({size:u,state:A}),d),[C,u,A,d]),D=l.useMemo(()=>v("block",ue("label"),m("xs","mb"),f&&"opacity-50"),[f]);return n.jsxs("div",{className:"w-full",children:[a&&n.jsx("label",{htmlFor:h,className:D,children:a}),n.jsxs("select",F(M({id:h,ref:g,className:L,disabled:f,"aria-invalid":o,"aria-required":b.required,"aria-describedby":j||N},b),{children:[s&&n.jsx("option",{value:"",disabled:!0,children:s}),r&&r.length>0?r.map((T,R)=>n.jsx("optgroup",{label:T.label,children:(T.options||[]).map(_=>n.jsx("option",{value:_.value,disabled:_.disabled,children:_.label},_.value))},R)):(t||[]).map(T=>n.jsx("option",{value:T.value,disabled:T.disabled,children:T.label},T.value))]})),(o||i||c)&&n.jsx(dd,{error:o,success:i,helperText:c,errorId:j,helperId:N})]})}));Er.displayName="Select";const Da=l.memo(l.forwardRef(function(f,d){var p=f,{error:t=!1,success:r=!1,resize:s="vertical",className:a="",label:o,helperText:i,id:c}=p,u=z(p,["error","success","resize","className","label","helperText","id"]);const b=l.useId(),g=c!=null?c:b,x=l.useMemo(()=>"focus:border-line-focus",[]),w=l.useMemo(()=>"focus:border-error",[]),y=l.useMemo(()=>t?w.replace("focus:border-","focus:ring-"):x.replace("focus:border-","focus:ring-"),[t,w,x]),h=l.useMemo(()=>({none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"}),[]),j=l.useMemo(()=>v("block","w-full",U("md"),m("base","px"),m("md","py"),"border",re("body"),"focus:outline-none","focus:ring-2","focus:ring-offset-2",h[s],v(t?"border-error":r?"border-success":"border-line-default",y),a),[s,h,t,r,y,a]),N=l.useMemo(()=>i?`${g}-helper`:void 0,[i,g]),k=l.useMemo(()=>N!=null?N:t?`${g}-error`:void 0,[N,t,g]),$=u["aria-label"],S=u["aria-labelledby"];l.useEffect(()=>{},[o,$,S,g]);const I=n.jsx("textarea",M({ref:d,id:g,className:j,"aria-invalid":t,"aria-describedby":k},u)),C=i?n.jsx("p",{id:N,className:v(m("xs","mt"),re("bodySmall"),t?"text-fg-error":r?"text-fg-success":"text-fg-secondary"),children:i}):null;return!o&&!C?I:n.jsxs("div",{className:"block w-full",children:[o&&n.jsx("label",{htmlFor:g,className:v("block",m("xs","mb"),re("label"),"font-medium","text-fg-primary"),children:o}),I,C]})}));Da.displayName="Textarea";const ud=v("block",re("label"),ze("label"),"text-fg-primary"),fd={default:"",required:v("after:content-['*']",`after:${m("0.5","ml")}`,"after:text-fg-error"),optional:v("after:content-['(optional)']",`after:${m("xs","ml")}`,"after:text-fg-tertiary","after:font-normal")},Dt=l.memo(l.forwardRef(function(i,o){var c=i,{variant:t="default",className:r="",children:s}=c,a=z(c,["variant","className","children"]);const u=v(ud,fd[t],r);return n.jsx("label",F(M({ref:o,className:u},a),{children:s}))}));Dt.displayName="Label";function _a(a){var o=a,{message:e,id:t,className:r=""}=o,s=z(o,["message","id","className"]);const i=[m("xs","mt"),re("bodySmall"),"text-fg-error","flex","items-center",m("xs","gap")],c=v(...i,r);return n.jsxs("div",F(M({role:"alert",id:t,className:c,"aria-live":"polite"},s),{children:[n.jsx(ws,{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 md(e){return Fe.createWidth(e).tailwind}class xt{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 pd={none:xt.create("none"),sm:xt.create("sm"),md:xt.create("md"),lg:xt.create("lg"),xl:xt.create("xl"),"2xl":xt.create("2xl"),inner:xt.create("inner")};function fe(e){return pd[e].tailwind}const _t=l.forwardRef(function(f,d){var p=f,{content:t,children:r,position:s="top",delay:a=200,className:o="","aria-label":i,preservePositioning:c=!1}=p,u=z(p,["content","children","position","delay","className","aria-label","preservePositioning"]);const[b,g]=l.useState(!1),x=l.useRef(null),w=l.useRef(null),y=l.useRef(null),h=`tooltip-${l.useId()}`,j=()=>{const T=setTimeout(()=>{g(!0)},a);x.current=T},N=()=>{x.current&&(clearTimeout(x.current),x.current=null),g(!1)},k=()=>{g(!0)},$=()=>{g(!1)},S=T=>{var R;T.key==="Escape"&&(g(!1),(R=y.current)==null||R.blur())};l.useEffect(()=>()=>{x.current&&(clearTimeout(x.current),x.current=null)},[]),l.useEffect(()=>{if(!b)return;const T=R=>{w.current&&!w.current.contains(R.target)&&y.current&&!y.current.contains(R.target)&&g(!1)};return document.addEventListener("mousedown",T),()=>{document.removeEventListener("mousedown",T)}},[b]);const I=T=>({top:"border-t-surface-inverse",bottom:"border-b-surface-inverse",left:"border-l-surface-inverse",right:"border-r-surface-inverse"})[T],C=pe(v("absolute",he("tooltip"),m("sm","px"),m("xs","py"),re("caption"),"text-fg-inverse","bg-surface-inverse",U("md"),fe("lg"),"whitespace-nowrap"),{variants:{position:{top:v("bottom-full","left-1/2","transform","-translate-x-1/2",m("sm","mb")),bottom:v("top-full","left-1/2","transform","-translate-x-1/2",m("sm","mt")),left:v("right-full","top-1/2","transform","-translate-y-1/2",m("sm","mr")),right:v("left-full","top-1/2","transform","-translate-y-1/2",m("sm","ml"))}},defaultVariants:{position:"top"}}),A=pe(v("absolute","w-0","h-0",md("thick"),"border-transparent"),{variants:{position:{top:v("top-full","left-1/2","transform","-translate-x-1/2",I("top")),bottom:v("bottom-full","left-1/2","transform","-translate-x-1/2",I("bottom")),left:v("left-full","top-1/2","transform","-translate-y-1/2",I("left")),right:v("right-full","top-1/2","transform","-translate-y-1/2",I("right"))}},defaultVariants:{position:"top"}}),L=l.isValidElement(r)?(()=>{const T=r,R=T.props,_=R.ref;return l.cloneElement(T,{ref:wa(y,_),"aria-describedby":b?h:R["aria-describedby"],onMouseEnter:V=>{var B;j(),(B=R.onMouseEnter)==null||B.call(R,V)},onMouseLeave:V=>{var B;N(),(B=R.onMouseLeave)==null||B.call(R,V)},onFocus:V=>{var B;k(),(B=R.onFocus)==null||B.call(R,V)},onBlur:V=>{var B;$(),(B=R.onBlur)==null||B.call(R,V)},onKeyDown:V=>{var B;S(V),(B=R.onKeyDown)==null||B.call(R,V)}})})():r,D=v(c?"static":"relative","inline-block",o);return n.jsxs("div",F(M({ref:d,className:D},u),{children:[L,b&&n.jsxs("div",{ref:w,id:h,className:v(C({position:s})),role:"tooltip","aria-live":"polite",children:[t,n.jsx("div",{className:v(A({position:s})),"aria-hidden":"true"})]})]}))});_t.displayName="Tooltip";function La(c){var u=c,{variant:e="text",width:t,height:r,lines:s=1,className:a="","aria-label":o}=u,i=z(u,["variant","width","height","lines","className","aria-label"]);const d=["motion-safe:animate-pulse","bg-surface-muted",U("sm")],f={text:"h-4",card:"h-32",list:"h-12",circle:U("full")},p=v(...d,f[e],a),b={};t&&(b.width=t),r&&(b.height=r);const g=o||`Loading ${e} content`;return e==="text"&&s>1?n.jsx("div",F(M({className:m("sm","space-y"),role:"status","aria-busy":"true","aria-label":g},i),{children:Array.from({length:s}).map((x,w)=>n.jsx("div",{className:p,style:w===s-1?{width:"75%"}:b,"aria-hidden":"true"},w))})):n.jsx("div",M({className:p,style:b,role:"status","aria-busy":"true","aria-label":g},i))}function bd({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}}const js=l.forwardRef(function(b,p){var g=b,{children:t,trigger:r,defaultOpen:s=!0,open:a,onOpenChange:o,disabled:i=!1,duration:c=200,storageKey:u,className:d=""}=g,f=z(g,["children","trigger","defaultOpen","open","onOpenChange","disabled","duration","storageKey","className"]);const{isOpen:x,toggle:w}=bd({defaultOpen:s,open:a,onOpenChange:o,storageKey:u}),y=l.useRef(null),[h,j]=l.useState(x?"auto":0);l.useEffect(()=>{y.current&&j(x?y.current.scrollHeight:0)},[x,t]),l.useEffect(()=>{if(!x||!y.current)return;const k=new ResizeObserver(()=>{y.current&&x&&j(y.current.scrollHeight)});return k.observe(y.current),()=>{k.disconnect()}},[x]);const N=`collapsible-content-${l.useId()}`;return n.jsxs("div",F(M({ref:p,className:d},f),{children:[r!==void 0&&n.jsx("button",{type:"button",onClick:w,onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),i||w())},disabled:i,"aria-expanded":x,"aria-controls":N,"aria-disabled":i,className:v("w-full","text-left","focus:outline-none","focus:ring-2","focus:ring-line-brand","focus:ring-offset-2",U("md")),children:r}),n.jsx("div",{id:N,ref:y,style:{height:typeof h=="number"?`${h}px`:h,overflow:"hidden",transition:`height ${c}ms ease-in-out`},"aria-hidden":!x,children:n.jsx("div",{children:t})})]}))});js.displayName="Collapsible";const Mr=l.memo(l.forwardRef(function(p,f){var b=p,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,className:i="",disabled:c=!1,indeterminate:u=!1}=b,d=z(b,["id","label","error","success","helperText","className","disabled","indeterminate"]);const g=l.useId(),x=t||`checkbox-${g}`,w=l.useMemo(()=>s?`${x}-error`:void 0,[s,x]),y=l.useMemo(()=>o?`${x}-helper`:void 0,[o,x]),h=l.useMemo(()=>"focus:border-line-focus",[]),j=l.useMemo(()=>"focus:border-error",[]),N=l.useMemo(()=>s?j.replace("focus:border-","focus:ring-"):h.replace("focus:border-","focus:ring-"),[s,j,h]),k=l.useMemo(()=>v("h-4","w-4",U("sm"),"border","border-line-default","text-fg-brand","focus:ring-2",N,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",!s&&a&&"border-success",i),[N,s,a,i]),$=l.useMemo(()=>v(ue("label"),m("sm","ml"),c?"opacity-50 cursor-not-allowed":"cursor-pointer"),[c]),S=l.useRef(null),I=l.useCallback(C=>{S.current=C,typeof f=="function"?f(C):f&&(f.current=C),C&&(C.indeterminate=u)},[f,u]);return l.useEffect(()=>{S.current&&(S.current.indeterminate=u)},[u]),n.jsxs("div",{className:v("flex","flex-col",m("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",M({type:"checkbox",id:x,ref:I,className:k,disabled:c,"aria-invalid":s,"aria-describedby":w||y||void 0,"aria-label":r?void 0:"Checkbox"},d)),r&&n.jsx("label",{htmlFor:x,className:$,children:r})]}),(s||a||o)&&n.jsx("div",{id:w||y,className:v(m("xs","mt"),ue("caption"),s?"text-fg-error":a?"text-fg-success":"text-fg-secondary"),role:s||a?"alert":void 0,children:s?o||"This field has an error":o})]})}));Mr.displayName="Checkbox";const Fa=l.memo(l.forwardRef(function(f,d){var p=f,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,className:i="",disabled:c=!1}=p,u=z(p,["id","label","error","success","helperText","className","disabled"]);const b=l.useId(),g=t||`radio-${b}`,x=l.useMemo(()=>s?`${g}-error`:void 0,[s,g]),w=l.useMemo(()=>o?`${g}-helper`:void 0,[o,g]),y=l.useMemo(()=>"focus:border-line-focus",[]),h=l.useMemo(()=>"focus:border-error",[]),j=l.useMemo(()=>s?h.replace("focus:border-","focus:ring-"):y.replace("focus:border-","focus:ring-"),[s,h,y]),N=l.useMemo(()=>v("h-4","w-4","border","border-line-default","text-fg-brand","focus:ring-2",j,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",!s&&a&&"border-success",i),[j,s,a,i]),k=l.useMemo(()=>v(ue("label"),m("sm","ml"),c?"opacity-50 cursor-not-allowed":"cursor-pointer"),[c]);return n.jsxs("div",{className:v("flex","flex-col",m("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",M({type:"radio",id:g,ref:d,className:N,disabled:c,"aria-invalid":s,"aria-describedby":x||w||void 0,"aria-label":r?void 0:"Radio button"},u)),r&&n.jsx("label",{htmlFor:g,className:k,children:r})]}),(s||a||o)&&n.jsx("div",{id:x||w,className:v(m("xs","mt"),ue("caption"),s?"text-fg-error":a?"text-fg-success":"text-fg-secondary"),role:s||a?"alert":void 0,children:s?o||"This field has an error":o})]})}));Fa.displayName="Radio";const Wt={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 gd(e){return{track:`${Wt.track[e].w} ${Wt.track[e].h}`,thumb:`${Wt.thumb[e].w} ${Wt.thumb[e].h}`,translate:Wt.translate[e]}}const hd=pe("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"}}),Fn=pe("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"}}),Ns=l.forwardRef(function(p,f){var b=p,{value:t,max:r=100,variant:s="primary",size:a="md",showLabel:o=!1,label:i,"aria-label":c,className:u=""}=b,d=z(b,["value","max","variant","size","showLabel","label","aria-label","className"]);const g=t===void 0,x=g?void 0:Math.min(Math.max(t/r*100,0),100),w=c||(g?"Loading in progress":`Progress: ${x==null?void 0:x.toFixed(0)}%`);return n.jsxs("div",F(M({ref:f,className:v("w-full",u)},d),{children:[o&&(i||!g)&&n.jsxs("div",{className:v("flex","items-center","justify-between",m("xs","mb")),children:[i&&n.jsx("span",{className:v(re("bodySmall"),ze("label"),"text-fg-primary"),children:i}),!g&&x!==void 0&&n.jsxs("span",{className:v(re("bodySmall"),"text-fg-secondary"),children:[x.toFixed(0),"%"]})]}),n.jsx("div",{role:"progressbar","aria-valuemin":g?void 0:0,"aria-valuemax":g?void 0:r,"aria-valuenow":g?void 0:t,"aria-label":w,"aria-busy":g,className:v("relative","w-full","overflow-hidden",hd({size:a,variant:s}),U("full")),children:g?n.jsx("div",{className:v("absolute","top-0","left-0","bottom-0",Fn({variant:s}),U("full"),"motion-reduce:animate-none"),style:{width:"30%",animation:"progress-indeterminate 1.5s ease-in-out infinite"}}):n.jsx("div",{className:v("h-full",Fn({variant:s}),U("full"),"transition-all","duration-300","ease-out"),style:{width:`${x}%`},"aria-hidden":"true"})})]}))});Ns.displayName="Progress";const Pa=l.memo(l.forwardRef(function(x,g){var w=x,{size:t="md",label:r,helperText:s,error:a=!1,success:o=!1,className:i="",disabled:c=!1,checked:u,defaultChecked:d,onChange:f,id:p}=w,b=z(w,["size","label","helperText","error","success","className","disabled","checked","defaultChecked","onChange","id"]);const y=u!==void 0,[h,j]=l.useState(d!=null?d:!1),N=y?!!u:h,k=l.useId(),$=p||`switch-${k}`,S=l.useMemo(()=>r?`${$}-label`:void 0,[r,$]),I=l.useMemo(()=>s?`${$}-helper`:void 0,[s,$]),C=l.useMemo(()=>gd(t),[t]),A=l.useMemo(()=>"focus:border-line-focus".replace("focus:border-","focus:ring-"),[]),L=l.useMemo(()=>v("relative","inline-flex","shrink-0","cursor-pointer",U("full"),"border-2","border-transparent",ye("base"),"focus:outline-none","focus:ring-2",A,"focus:ring-offset-2",C.track,N?"bg-surface-brand":"bg-surface-muted",a&&!N&&"border-error",!a&&o&&!N&&"border-success",c&&"opacity-50 cursor-not-allowed",i),[A,C.track,N,a,o,c,i]),D=l.useMemo(()=>v("pointer-events-none","inline-block",U("full"),"bg-surface-base","shadow","transform",ye("base"),C.thumb,N?C.translate:"translate-x-0"),[C.thumb,C.translate,N]);return n.jsxs("div",{className:v("flex","items-start",m("md","gap")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("button",{type:"button",className:L,role:"switch","aria-checked":N,"aria-labelledby":S,"aria-describedby":I,disabled:c,onClick:l.useCallback(T=>{if(c)return;const R=!N;if(y||j(R),f){const _=F(M({},T),{target:F(M({},T.target),{checked:R}),currentTarget:F(M({},T.currentTarget),{checked:R})});f(_)}},[c,f,N,y]),onKeyDown:l.useCallback(T=>{if(c||T.key!=="Enter"&&T.key!==" ")return;T.preventDefault();const R=!N;if(y||j(R),f){const _=F(M({},T),{target:F(M({},T.target),{checked:R}),currentTarget:F(M({},T.currentTarget),{checked:R})});f(_)}},[c,f,N,y]),children:n.jsx("span",{className:D})}),n.jsx("input",M({ref:g,type:"checkbox",id:$,checked:N,onChange:f!=null?f:(()=>{}),disabled:c,className:"sr-only","aria-hidden":"true",tabIndex:-1},b))]}),(r||s)&&n.jsxs("div",{className:"flex-1",children:[r&&n.jsx("label",{id:S,htmlFor:$,className:v("block",re("bodySmall"),ze("label"),a?"text-fg-error":"text-fg-primary",c?"opacity-50":"cursor-pointer"),children:r}),s&&n.jsx("p",{id:I,className:v(m("xs","mt"),re("bodySmall"),a?"text-fg-error":o?"text-fg-success":"text-fg-secondary"),children:s})]})]})}));Pa.displayName="Switch";const xd={horizontal:"w-full border-t",vertical:"h-full border-l self-stretch"},vd={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"},Ss=l.memo(function(o){var i=o,{orientation:t="horizontal",variant:r="solid",className:s=""}=i,a=z(i,["orientation","variant","className"]);const c=v("border-0","border-line-default",xd[t],vd[r],s);return t==="vertical"?n.jsx("div",M({className:c,role:"separator","aria-orientation":"vertical"},a)):n.jsx("hr",M({className:c,role:"separator","aria-orientation":"horizontal"},a))});Ss.displayName="Separator";const Oa=l.forwardRef(function(h,y){var j=h,{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:b,label:g,className:x=""}=j,w=z(j,["value","defaultValue","min","max","step","variant","size","disabled","showValue","marks","onChange","onValueChange","label","className"]);const N=l.useRef(null),k=l.useId(),$=l.useId(),S=l.useId(),[I,C]=l.useState(r||(i==="range"?[s,a]:s)),[A,L]=l.useState(!1),[D,T]=l.useState(null),R=t!==void 0,_=R?t:I,V=W=>(W-s)/(a-s)*100,B=W=>{if(!N.current)return s;const q=N.current.getBoundingClientRect(),ce=Math.max(0,Math.min(1,(W-q.left)/q.width)),ie=s+ce*(a-s);return Math.round(ie/o)*o},X=(W,q="min")=>{if(u)return;W.preventDefault(),L(!0),T(q);const ce=be=>{if(!N.current)return;const we=B(be.clientX);Z(we,q)},ie=()=>{L(!1),T(null),document.removeEventListener("mousemove",ce),document.removeEventListener("mouseup",ie)};document.addEventListener("mousemove",ce),document.addEventListener("mouseup",ie)},Z=(W,q="min")=>{const ce=Math.max(s,Math.min(a,W));if(i==="range"){const[ie,be]=Array.isArray(_)?_:[s,a];let we;q==="min"?we=[Math.min(ce,be),be]:we=[ie,Math.max(ce,ie)],R||C(we),p==null||p(we),b==null||b(we)}else R||C(ce),p==null||p(ce),b==null||b(ce)},oe=W=>{if(u||A)return;const q=B(W.clientX);Z(q)},H=()=>"focus:ring-line-brand ring-offset-2",P=pe(v("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}}),Y=pe(v("absolute","bg-surface-brand",U("full"),"border-2","border-white",fe("md"),"cursor-grab","active:cursor-grabbing",ye("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:H(),false:""}},defaultVariants:{size:"md",active:!1}}),ee=typeof _=="number"?_:_[0],J=Array.isArray(_)?_[0]:s,te=Array.isArray(_)?_[1]:ee,ae=V(J),O=V(te);return n.jsxs("div",F(M({ref:y,className:v("w-full",x)},w),{children:[n.jsxs("label",{id:k,className:v("block",re("bodySmall"),ze("label"),"text-fg-primary",m("sm","mb")),children:[g,d&&n.jsx("span",{className:v(m("sm","ml"),"text-fg-secondary"),children:i==="range"?`${J} - ${te}`:ee})]}),i==="range"&&n.jsxs(n.Fragment,{children:[n.jsx("span",{id:$,className:"sr-only",children:"minimum"}),n.jsx("span",{id:S,className:"sr-only",children:"maximum"})]}),n.jsxs("div",{ref:N,className:v(P({size:c,disabled:u}),"bg-surface-muted",U("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:ee,"aria-disabled":i==="range"?void 0:u,"aria-labelledby":i==="range"?void 0:k,children:[n.jsx("div",{className:v("absolute",P({size:c}),"bg-surface-brand",U("full"),ye("base")),style:{left:`${ae}%`,width:`${O-ae}%`}}),f.map(W=>{const q=V(W);return n.jsx("div",{className:v("absolute","w-1","h-1","bg-line-strong",U("full"),"-translate-x-1/2"),style:{left:`${q}%`,top:"50%",transform:"translate(-50%, -50%)"}},W)}),i==="range"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:v(Y({size:c,active:D==="min"})),style:{left:`${ae}%`},onMouseDown:W=>X(W,"min"),role:"slider","aria-valuemin":s,"aria-valuemax":te,"aria-valuenow":J,"aria-labelledby":`${k} ${$}`}),n.jsx("div",{className:v(Y({size:c,active:D==="max"})),style:{left:`${O}%`},onMouseDown:W=>X(W,"max"),role:"slider","aria-valuemin":J,"aria-valuemax":a,"aria-valuenow":te,"aria-labelledby":`${k} ${S}`})]}):n.jsx("div",{className:v(Y({size:c,active:A})),style:{left:`${O}%`},onMouseDown:W=>X(W)}),d&&!g&&n.jsx("div",{className:"absolute -top-6 left-0 right-0 flex justify-center",children:n.jsx("span",{className:v(re("caption"),"text-fg-secondary","bg-surface-overlay",m("sm","px"),m("xs","py"),U("md"),"shadow"),children:i==="range"?`${J} - ${te}`:ee})})]})]}))});Oa.displayName="Slider";const Pn=pe(v("inline-flex","items-center","font-medium",U("full"),m("xs","gap")),{variants:{variant:{default:v("bg-surface-muted","text-fg-primary","border","border-line-default"),outlined:v("bg-transparent","text-fg-primary","border","border-line-default"),filled:v("bg-surface-brand-strong","text-fg-inverse","border","border-transparent")},size:{sm:v(m("xs","px"),m("xs","py"),re("caption")),md:v(m("sm","px"),m("xs","py"),re("bodySmall")),lg:v(m("md","px"),m("sm","py"),re("body"))},selected:{true:v("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}}),$s=l.forwardRef(function(t,r){const{children:s,variant:a="default",size:o="md",selected:i=!1,disabled:c=!1,className:u="","aria-label":d,tabIndex:f,asChild:p=!1}=t,g=(()=>{if(d)return d;if(typeof s=="string")return s;if(typeof s=="object"&&s!==null&&"props"in s){const N=s.props;if(N!=null&&N.children&&typeof N.children=="string")return N.children}})();if(p)return n.jsx(Ta,{ref:r,className:v(Pn({variant:a,size:o,selected:i,disabled:c}),u),"aria-label":d,"aria-disabled":c||void 0,tabIndex:f,children:s});const{onRemove:x,onClick:w}=t,y=w!==void 0,h=y&&!c,j=N=>{c||(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),w==null||w())};return n.jsxs("div",{ref:r,className:v(Pn({variant:a,size:o,selected:i,disabled:c}),x&&m("xs","pr"),u),"aria-disabled":c,children:[y?n.jsx("button",{type:"button",onClick:c?void 0:w,onKeyDown:j,disabled:c,"aria-pressed":i?!0:void 0,"aria-label":d||g,tabIndex:f!==void 0?f:h?0:void 0,className:v("flex-1","bg-transparent","border-0",m("none","p"),"text-inherit","text-left","cursor-pointer","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",U("full")),children:s}):n.jsx("span",{children:s}),x&&!c&&n.jsx("button",{type:"button",onClick:N=>{N.stopPropagation(),x()},className:v(m("xs","ml"),"hover:bg-tint-hover",U("full"),m("xs","p"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1"),"aria-label":`Remove ${g||"chip"}`,children:n.jsx(Ce,{className:"h-3 w-3","aria-hidden":"true"})})]})});$s.displayName="Chip";const pr=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=z(p,["src","alt","fallback","size","variant","aria-label","className"]);const[b,g]=l.useState(!1),[x,w]=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"},h={circle:U("full"),square:U("none"),rounded:U("md")},j=!t||b,N=typeof s=="string"?s.toUpperCase().slice(0,2):s,k=i||r||"User avatar";return n.jsxs("div",F(M({ref:d,className:v("relative","inline-flex","items-center","justify-center","shrink-0","font-medium","overflow-hidden",y[a],h[o],"bg-surface-muted","text-fg-primary",c),role:"img","aria-label":k},u),{children:[!j&&t&&n.jsx("img",{src:t,alt:r||"",className:v("w-full","h-full","object-cover",h[o],x?"opacity-100":"opacity-0","transition-opacity","duration-200"),onLoad:()=>w(!0),onError:()=>{g(!0),w(!1)},"aria-hidden":"true"}),j&&n.jsx("span",{className:v("flex","items-center","justify-center","w-full","h-full",h[o]),"aria-hidden":"true",children:N||"?"})]}))});pr.displayName="Avatar";function yd(c){var u=c,{children:e,max:t=3,size:r="md",variant:s="circle",spacing:a="md",className:o=""}=u,i=z(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),b=f.length-t;return n.jsxs("div",F(M({className:v("flex","items-center",d[a],o),role:"group","aria-label":`${f.length} avatars`},i),{children:[p.map((g,x)=>{let w=g;if(l.isValidElement(g)&&g.type===pr){const y=g.props;w=l.cloneElement(g,{size:y.size||r,variant:y.variant||s})}return n.jsx("div",{className:"ring-2 ring-surface-base",style:{zIndex:f.length-x},children:w},x)}),b>0&&n.jsx(pr,{size:r,variant:s,fallback:`+${b}`,"aria-label":`${b} more avatars`,className:"ring-2 ring-surface-base",style:{zIndex:0}})]}))}const wd=pe(v("inline-block",U("full")),{variants:{variant:{online:"",offline:"",pending:"",warning:"",error:"",info:""},size:{sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"}},compoundVariants:[{variant:"online",class:"bg-success"},{variant:"offline",class:"bg-status-neutral"},{variant:"pending",class:"bg-warning"},{variant:"warning",class:"bg-warning"},{variant:"error",class:"bg-error"},{variant:"info",class:"bg-info"}],defaultVariants:{variant:"offline",size:"md"}}),za=l.memo(l.forwardRef(function(c,i){var u=c,{variant:t="offline",size:r="md",className:s="","aria-label":a}=u,o=z(u,["variant","size","className","aria-label"]);const d=l.useMemo(()=>v(wd({variant:t,size:r}),s),[t,r,s]),f=l.useMemo(()=>a||{online:"Online",offline:"Offline",pending:"Pending",warning:"Warning",error:"Error",info:"Info"}[t],[a,t]);return n.jsx("span",M({ref:i,role:"status","aria-label":f,className:d},o))}));za.displayName="Dot";function kd(s){var a=s,{children:e,className:t}=a,r=z(a,["children","className"]);return n.jsx("div",F(M({className:v("grid items-start",m("1.5","gap"),m("base","mb"),"[&:has([data-card-actions])]:grid-cols-[1fr_auto]","[&:has([data-card-actions])>[data-card-actions]]:row-span-full",t)},r),{children:e}))}function jd(i){var c=i,{children:e,icon:t,badge:r,as:s="h2",className:a}=c,o=z(c,["children","icon","badge","as","className"]);return n.jsxs(s,F(M({className:v("text-base font-semibold text-fg-primary","flex items-center",m("sm","gap"),a)},o),{children:[t?n.jsx("span",{className:"shrink-0 inline-flex",children:t}):null,n.jsx("span",{children:e}),r?n.jsx("span",{className:"inline-flex",children:r}):null]}))}function Nd(s){var a=s,{children:e,className:t}=a,r=z(a,["children","className"]);return n.jsx("p",F(M({className:v("text-sm text-fg-secondary",t)},r),{children:e}))}function Sd(s){var a=s,{children:e,className:t}=a,r=z(a,["children","className"]);return n.jsx("div",F(M({"data-card-actions":"",className:v("flex items-center self-start",m("sm","gap"),t)},r),{children:e}))}function $d(s){var a=s,{children:e,className:t}=a,r=z(a,["children","className"]);return n.jsx("div",F(M({className:v(t)},r),{children:e}))}function Cd(d){var f=d,{variant:e="default",padding:t="medium",className:r="",onClick:s,"aria-label":a,"aria-labelledby":o,asSection:i=!1,children:c}=f,u=z(f,["variant","padding","className","onClick","aria-label","aria-labelledby","asSection","children"]);typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&i&&!a&&!o&&console.warn("[Card] `asSection={true}` requires an accessible name. Pass `aria-labelledby` pointing to your Card.Title `id`, or `aria-label`. A <section> without a name is an anonymous landmark that hurts screen-reader navigation.");const p=pe(v("bg-surface-base",U("lg"),"border","border-line-default",fe("sm")),{variants:{variant:{default:"",hover:v(`hover:${fe("md")}`,"transition-shadow","cursor-pointer"),selected:v("border-line-brand",fe("md"))},padding:{none:"",small:m("xs","p"),medium:m("base","p"),large:m("lg","p")}},defaultVariants:{variant:"default",padding:"medium"}}),b=s!==void 0,g=b?"button":void 0,x=b?0:void 0,w=v(p({variant:e,padding:t}),r),h=M({className:w,role:g,tabIndex:x,onClick:s,onKeyDown:b?j=>{b&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),s==null||s())}:void 0,"aria-label":a,"aria-labelledby":o},u);return i?n.jsx("section",F(M({},h),{children:c})):n.jsx("div",F(M({},h),{children:c}))}const Va=l.memo(Cd);Va.displayName="Card";const ft=Va;ft.Header=kd;ft.Title=jd;ft.Subtitle=Nd;ft.Actions=Sd;ft.Body=$d;const Ed={start:"items-start text-left",center:"items-center text-center"},Md={neutral:"text-fg-tertiary",success:"text-fg-success",warning:"text-fg-warning",error:"text-fg-error"};function Td(u){var d=u,{value:e,label:t,hint:r,icon:s,align:a="start",tone:o="neutral",className:i}=d,c=z(d,["value","label","hint","icon","align","tone","className"]);const f=e==null;return n.jsxs("div",F(M({className:v("bg-surface-base flex-1 flex flex-col",m("base","p"),m("xs","gap-y"),Ed[a],i)},c),{children:[s?n.jsx("span",{className:"text-icon-default inline-flex",children:s}):null,f?n.jsx("span",{"aria-label":"No data",className:"text-fg-tertiary text-2xl font-semibold leading-tight",children:"—"}):n.jsx("span",{className:"text-fg-primary text-2xl font-semibold leading-tight",children:e}),n.jsx("span",{className:"text-fg-secondary text-sm",children:t}),r?n.jsx("span",{className:v("text-xs",Md[o]),children:r}):null]}))}const Ad={2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4"};function Rd(o){var i=o,{layout:e="grid",cols:t=4,className:r,children:s}=i,a=z(i,["layout","cols","className","children"]);const c=e==="grid";return n.jsx("div",F(M({className:v("bg-line-default border border-line-default overflow-hidden gap-px",U("lg"),c?`grid grid-cols-2 ${Ad[t]}`:"flex",r)},a),{children:s}))}function Id(o){var i=o,{label:e,children:t,wrap:r=!0,className:s}=i,a=z(i,["label","children","wrap","className"]);const u=!(a["aria-label"]!=null||a["aria-labelledby"]!=null)&&typeof e=="string"&&e!==""?e:void 0;return n.jsxs("div",F(M({role:"group","aria-label":u,className:v("flex items-center",r?"flex-wrap":"flex-nowrap",m("sm","gap"),s)},a),{children:[e?n.jsx("span",{className:"shrink-0 text-fg-secondary text-sm",children:e}):null,t]}))}function Wa(e){const t=l.createContext(void 0);t.displayName=e.displayName;function r({value:o,children:i}){return n.jsx(t.Provider,{value:o,children:i})}function s(){const o=l.useContext(t);if(o===void 0)throw new Error(e.errorMessage);return o}function a(){return l.useContext(t)}return{Context:t,Provider:r,useContextRequired:s,useContextOptional:a}}const Tr=Wa({displayName:"FormContext",errorMessage:"useFormContext must be used within a Form component with react-hook-form integration"}),Dd=Tr.Context,_d=Tr.Provider;function Cs(){return Tr.useContextRequired()}function Ld(){return Tr.useContextOptional()}function Ha({form:e,loading:t=!1,children:r}){const s={form:e,loading:t};return n.jsx(_d,{value:s,children:r})}function Fd(c){var u=c,{children:e,onSubmit:t,loading:r=!1,error:s=null,success:a=null,className:o=""}=u,i=z(u,["children","onSubmit","loading","error","success","className"]);const d=v(m("lg","gap"),"flex","flex-col",o);if("form"in i&&i.form!==void 0){const w=i,{form:h,onSubmit:j,onSubmitError:N}=w,k=z(w,["form","onSubmit","onSubmitError"]),$=h.handleSubmit(S=>sr(null,null,function*(){try{yield j(S)}catch(I){N==null||N(I)}}),S=>{N==null||N(S)});return n.jsx(Ha,{form:h,loading:r,children:n.jsxs("form",F(M({className:d,onSubmit:$,noValidate:!0},k),{children:[e,s&&n.jsx("div",{role:"alert",className:v(m("md","p"),je("sm"),"text-error-dark","bg-error-bg","border","border-error",U("md")),children:s}),a&&n.jsx("div",{role:"alert",className:v(m("md","p"),je("sm"),"text-success-dark","bg-success-bg","border","border-success",U("md")),children:a})]}))})}const p=i.onSubmit||t,y=i,{onSubmit:b}=y,g=z(y,["onSubmit"]),x=h=>{h.preventDefault(),p&&!r&&(p==null||p(h))};return n.jsxs("form",F(M({className:d,onSubmit:x,noValidate:!0},g),{children:[e,s&&n.jsx("div",{role:"alert",className:v(m("md","p"),je("sm"),"text-error-dark","bg-error-bg","border","border-error",U("md")),children:s}),a&&n.jsx("div",{role:"alert",className:v(m("md","p"),je("sm"),"text-success-dark","bg-success-bg","border","border-success",U("md")),children:a})]}))}function Pd({name:e,label:t,children:r,rules:s,className:a=""}){var b;const{form:o}=Cs();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=(b=c[e])==null?void 0:b.message,p=u(e);return n.jsxs("div",{className:v("flex","flex-col",m("sm","gap"),a),children:[t&&n.jsx(Dt,{htmlFor:e,className:v("block",je("sm"),It("medium"),"text-fg-primary"),children:t}),r({name:e,register:g=>i(g,s),error:f,value:p,onChange:d.onChange,onBlur:d.onBlur}),f&&n.jsx(_a,{message:f})]})}var Od=e=>e.type==="checkbox",zd=e=>e instanceof Date,Pe=e=>e==null;const Vd=e=>typeof e=="object";var qe=e=>!Pe(e)&&!Array.isArray(e)&&Vd(e)&&!zd(e),Wd=e=>{const t=e.constructor&&e.constructor.prototype;return qe(t)&&t.hasOwnProperty("isPrototypeOf")},Es=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function tt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList!="undefined"&&e instanceof FileList;if(Es&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(qe(e)&&Wd(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=tt(e[a]));return s}const At={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Be={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Hd="root",Ba=["__proto__","constructor","prototype"];var Ms=e=>/^\w*$/.test(e),Ke=e=>e===void 0,Ts=e=>e.split(/[.[\]'"]/g).filter(Boolean),Oe=(e,t,r)=>{if(!t||!qe(e))return r;const s=Ms(t)?[t]:Ts(t);if(s.some(o=>Ba.includes(o)))return r;const a=s.reduce((o,i)=>Pe(o)?void 0:o[i],e);return Ke(a)||a===e?Ke(e[t])?r:e[t]:a},Ua=e=>typeof e=="boolean",Bd=e=>typeof e=="function",br=(e,t,r)=>{let s=-1;const a=Ms(t)?[t]:Ts(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=qe(d)||Array.isArray(d)?d:isNaN(+a[s+1])?{}:[]}if(Ba.includes(c))return;e[c]=u,e=e[c]}};const Ga=l.createContext(null);Ga.displayName="HookFormControlContext";const Ud=()=>l.useContext(Ga),Gd=Es?l.useLayoutEffect:l.useEffect;var Ue=e=>typeof e=="string";const Kd=l.createContext(null);Kd.displayName="HookFormContext";var Yd=(e,t,r,s,a)=>t?F(M({},r[e]),{types:F(M({},r[e]&&r[e].types?r[e].types:{}),{[s]:a||!0})}):{},qd=e=>Array.isArray(e)?e.filter(Boolean):[],Ge=e=>Array.isArray(e)?e:[e],gr=e=>qe(e)&&!Object.keys(e).length,Xd=e=>e.type==="file",Jd=e=>{if(!Es)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Zd=e=>e.type==="radio";function Qd(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;){if(Pe(e)){e=void 0;break}e=e[t[s]],s++}return e}function eu(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ke(e[t]))return!1;return!0}function Ka(e,t){if(Ue(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const r=Array.isArray(t)?t:Ms(t)?[t]:Ts(t),s=r.length===1?e:Qd(e,r),a=r.length-1,o=r[a];return s&&delete s[o],a!==0&&(qe(s)&&gr(s)||Array.isArray(s)&&eu(s))&&Ka(e,r.slice(0,-1)),e}var Ya=e=>e instanceof RegExp,dr=e=>({isOnSubmit:!e||e===At.onSubmit,isOnBlur:e===At.onBlur,isOnChange:e===At.onChange,isOnAll:e===At.all,isOnTouch:e===At.onTouched}),tu=(e,t,r)=>t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(`${s}.`));const us=(e,t,r,s)=>{for(const o of Object.keys(e)){const i=Oe(e,o);if(i){const a=i,{_f:c}=a,u=z(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(us(u,t))break}else if(qe(u)&&us(u,t))break}}};var ru=(e,t,r)=>{const s=Oe(e,r),a=Array.isArray(s)?s:[];return br(a,Hd,t[r]),br(e,r,a),e};function On(e,t,r="validate"){if(Ue(e)||Array.isArray(e)&&e.every(Ue)||Ua(e)&&!e)return{type:r,message:Ue(e)?e:"",ref:t}}var Mt=e=>qe(e)&&!Ya(e)?e:{value:e,message:""},su=(e,t,r,s,a,o)=>sr(null,null,function*(){const{ref:i,refs:c,required:u,maxLength:d,minLength:f,min:p,max:b,pattern:g,validate:x,name:w,valueAsNumber:y,mount:h}=e._f,j=Oe(r,w);if(!h||t.has(w))return{};const N=c?c[0]:i,k=A=>{a&&N.reportValidity&&(N.setCustomValidity(Ua(A)?"":A||""),N.reportValidity())},$={};Zd(i),Od(i);const S=(y||Xd(i))&&Ke(i.value)&&Ke(j)||Jd(i)&&i.value===""||j===""||Array.isArray(j)&&!j.length,I=Yd.bind(null,w,s,$),C=(A,L,D,T=Be.maxLength,R=Be.minLength)=>{const _=A?L:D;$[w]=M({type:A?T:R,message:_,ref:i},I(A?T:R,_))};if(!Array.isArray(j)||!j.length){const{value:A,message:L}=Ue(u)?{value:!!u,message:u}:Mt(u);if(A&&($[w]=M({type:Be.required,message:L,ref:N},I(Be.required,L)),!s))return k(L),$}if(!S&&(!Pe(p)||!Pe(b))){let A,L;const D=Mt(b),T=Mt(p);if(!Pe(j)&&!isNaN(j)){const R=i.valueAsNumber||j&&+j;Pe(D.value)||(A=R>D.value),Pe(T.value)||(L=R<T.value)}else{const R=i.valueAsDate||new Date(j),_=X=>new Date(new Date().toDateString()+" "+X),V=i.type=="time",B=i.type=="week";Ue(D.value)&&j&&(A=V?_(j)>_(D.value):B?j>D.value:R>new Date(D.value)),Ue(T.value)&&j&&(L=V?_(j)<_(T.value):B?j<T.value:R<new Date(T.value))}if((A||L)&&(C(!!A,D.message,T.message,Be.max,Be.min),!s))return k($[w].message),$}if((d||f)&&!S&&(Ue(j)||Array.isArray(j))){const A=Mt(d),L=Mt(f),D=!Pe(A.value)&&j.length>+A.value,T=!Pe(L.value)&&j.length<+L.value;if((D||T)&&(C(D,A.message,L.message),!s))return k($[w].message),$}if(g&&!S&&Ue(j)){const{value:A,message:L}=Mt(g);if(Ya(A)&&!j.match(A)&&($[w]=M({type:Be.pattern,message:L,ref:i},I(Be.pattern,L)),!s))return k(L),$}if(x){if(Bd(x)){const A=yield x(j,r),L=On(A,N);if(L&&($[w]=M(M({},L),I(Be.validate,L.message)),!s))return k(L.message),$}else if(qe(x)){let A={};for(const L in x){if(!gr(A)&&!s)break;const D=On(yield x[L](j,r),N,L);D&&(A=M(M({},D),I(L,D.message)),k(D.message),s&&($[w]=A))}if(!gr(A)&&($[w]=M({ref:N},A),!s))return $}}return k(!0),$}),et=()=>{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)})},Qr=(e,t,r={})=>r.shouldFocus||Ke(r.shouldFocus)?r.focusName||`${e}.${Ke(r.focusIndex)?t:r.focusIndex}.`:"",es=(e,t)=>[...e,...Ge(t)],ts=e=>Array.isArray(e)?e.map(()=>{}):void 0;function rs(e,t,r){return[...e.slice(0,t),...Ge(r),...e.slice(t)]}var ss=(e,t,r)=>Array.isArray(e)?(Ke(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],ns=(e,t)=>[...Ge(t),...Ge(e)];function nu(e,t){let r=0;const s=[...e];for(const a of t)s.splice(a-r,1),r++;return qd(s).length?s:[]}var as=(e,t)=>Ke(t)?[]:nu(e,Ge(t).sort((r,s)=>r-s)),os=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},zn=(e,t,r)=>(e[t]=r,e);function au(e){const t=Ud(),{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(et)),f=l.useRef(!1);r._names.array.add(s),l.useMemo(()=>i&&c.length>=0&&r.register(s,i),[r,s,c.length,i]),Gd(()=>r._subjects.array.subscribe({next:({values:k,name:$})=>{if($===s||!$){const S=Oe(k,s);Array.isArray(S)?(u(S),d.current=S.map(et)):$||(u([]),d.current=[])}}}).unsubscribe,[r,s]);const p=l.useCallback(k=>{f.current=!0,r._setFieldArray(s,k)},[r,s]),b=(k,$)=>{const S=Ge(tt(k)),I=es(r._getFieldArray(s),S);r._names.focus=Qr(s,I.length-1,$),d.current=es(d.current,S.map(et)),p(I),u(I),r._setFieldArray(s,I,es,{argA:ts(k)})},g=(k,$)=>{const S=Ge(tt(k)),I=ns(r._getFieldArray(s),S);r._names.focus=Qr(s,0,$),d.current=ns(d.current,S.map(et)),p(I),u(I),r._setFieldArray(s,I,ns,{argA:ts(k)})},x=k=>{const $=as(r._getFieldArray(s),k);d.current=as(d.current,k),p($),u($),!Array.isArray(Oe(r._fields,s))&&br(r._fields,s,void 0),r._setFieldArray(s,$,as,{argA:k})},w=(k,$,S)=>{const I=Ge(tt($)),C=rs(r._getFieldArray(s),k,I);r._names.focus=Qr(s,k,S),d.current=rs(d.current,k,I.map(et)),p(C),u(C),r._setFieldArray(s,C,rs,{argA:k,argB:ts($)})},y=(k,$)=>{const S=r._getFieldArray(s);os(S,k,$),os(d.current,k,$),p(S),u(S),r._setFieldArray(s,S,os,{argA:k,argB:$},!1)},h=(k,$)=>{const S=r._getFieldArray(s);ss(S,k,$),ss(d.current,k,$),p(S),u(S),r._setFieldArray(s,S,ss,{argA:k,argB:$},!1)},j=(k,$)=>{const S=tt($),I=zn(r._getFieldArray(s),k,S);d.current=[...I].map((C,A)=>!C||A===k?et():d.current[A]),p(I),u([...I]),r._setFieldArray(s,I,zn,{argA:k,argB:S},!0,!1)},N=k=>{const $=Ge(tt(k));d.current=$.map(et),p([...$]),u([...$]),r._setFieldArray(s,[...$],S=>S,{},!0,!1)};return l.useEffect(()=>{r._state.action=!1,tu(s,r._names)&&r._subjects.state.next(M({},r._formState));const k=dr(r._options.mode);if(f.current&&(!k.isOnSubmit||r._formState.isSubmitted)&&!dr(r._options.reValidateMode).isOnSubmit&&!k.isOnBlur)if(r._options.resolver)r._runSchema([s]).then($=>{r._updateIsValidating([s]);const S=Oe($.errors,s),I=Oe(r._formState.errors,s);(I?!S&&I.type||S&&(I.type!==S.type||I.message!==S.message):S&&S.type)&&(S?br(r._formState.errors,s,S):Ka(r._formState.errors,s),r._subjects.state.next({errors:r._formState.errors}))});else{const $=Oe(r._fields,s);$&&$._f&&!(dr(r._options.reValidateMode).isOnSubmit&&dr(r._options.mode).isOnSubmit)&&su($,r._names.disabled,r._formValues,r._options.criteriaMode===At.all,r._options.shouldUseNativeValidation).then(S=>!gr(S)&&r._subjects.state.next({errors:ru(r._formState.errors,S,s)}))}r._subjects.state.next({name:s,values:tt(r._formValues)}),r._names.focus&&us(r._fields,($,S)=>{if(r._names.focus&&S.startsWith(r._names.focus)&&$.focus)return $.focus(),1}),r._names.focus="",r._setValid(),f.current=!1},[c,s,r]),l.useEffect(()=>(!Oe(r._formValues,s)&&r._setFieldArray(s),()=>{const k=!(r._options.shouldUnregister||o),$=(S,I)=>{const C=Oe(r._fields,S);C&&C._f&&(C._f.mount=I)};f.current&&k&&r._subjects.state.next({name:s,values:tt(r._formValues)}),k?$(s,!1):r.unregister(s)}),[s,r,a,o]),{swap:l.useCallback(y,[p,s,r]),move:l.useCallback(h,[p,s,r]),prepend:l.useCallback(g,[p,s,r]),append:l.useCallback(b,[p,s,r]),remove:l.useCallback(x,[p,s,r]),insert:l.useCallback(w,[p,s,r]),update:l.useCallback(j,[p,s,r]),replace:l.useCallback(N,[p,s,r]),fields:l.useMemo(()=>c.map((k,$)=>F(M({},k),{[a]:d.current[$]||et()})),[c,a])}}function ou(e){const{form:t}=Cs();if(!t)throw new Error("useFormFieldArray must be used within a Form component with react-hook-form integration");return au(F(M({},e),{control:t.control}))}function qa(a){var o=a,{items:e,separator:t="/",className:r=""}=o,s=z(o,["items","separator","className"]);const i=["flex","items-center",m("sm","space-x"),re("bodySmall")],c=v(...i,r);return n.jsx("nav",F(M({"aria-label":"Breadcrumb",className:c},s),{children:n.jsx("ol",{className:v("flex","items-center",m("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:v(m("sm","mx"),"text-fg-tertiary"),"aria-hidden":"true",children:t}),f?n.jsx("span",{className:v("text-fg-primary",ze("label")),"aria-current":"page",children:u.label}):u.href?n.jsx("a",{href:u.href,className:v("inline-flex","items-center",m("xs","px"),m("xs","pt"),"border-b-2","border-transparent",re("bodySmall"),ze("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 Xa(u){var d=u,{currentPage:e,totalPages:t,onPageChange:r,totalItems:s,itemsPerPage:a,showPageInfo:o=!0,className:i=""}=d,c=z(d,["currentPage","totalPages","onPageChange","totalItems","itemsPerPage","showPageInfo","className"]);const f=()=>{e>1&&r(e-1)},p=()=>{e<t&&r(e+1)},b=h=>{h>=1&&h<=t&&h!==e&&r(h)},g=()=>{const h=[];if(t<=5)for(let N=1;N<=t;N++)h.push(N);else if(e<=3){for(let N=1;N<=4;N++)h.push(N);h.push("ellipsis"),h.push(t)}else if(e>=t-2){h.push(1),h.push("ellipsis");for(let N=t-3;N<=t;N++)h.push(N)}else{h.push(1),h.push("ellipsis");for(let N=e-1;N<=e+1;N++)h.push(N);h.push("ellipsis"),h.push(t)}return h},x=s&&a?(e-1)*a+1:void 0,w=s&&a?Math.min(e*a,s):void 0,y=v("flex","items-center","justify-between",m("base","px"),m("md","py"),i);return n.jsxs("nav",F(M({className:y,"aria-label":"Pagination"},c),{children:[n.jsxs("div",{className:v("flex","items-center",m("sm","gap")),children:[n.jsx(Q,{variant:"secondary",onClick:f,disabled:e===1,size:"sm",children:"Previous"}),n.jsx("div",{className:v("flex","items-center",m("xs","gap")),children:g().map((h,j)=>{if(h==="ellipsis")return n.jsx("span",{className:v(m("sm","px"),"text-fg-tertiary"),children:"..."},`ellipsis-${j}`);const N=h,k=N===e;return n.jsx(Q,{variant:k?"primary":"ghost",onClick:()=>b(N),size:"sm","aria-current":k?"page":void 0,"aria-label":`Go to page ${N}`,children:N},N)})}),n.jsx(Q,{variant:"secondary",onClick:p,disabled:e===t,size:"sm",children:"Next"})]}),o&&s&&a&&n.jsxs("div",{className:v(je("sm"),"text-fg-primary"),children:["Showing ",x," to ",w," of ",s," results"]})]}))}function Ja(u){var d=u,{title:e,message:t,actionLabel:r,onAction:s,illustration:a,variant:o="default",className:i=""}=d,c=z(d,["title","message","actionLabel","onAction","illustration","variant","className"]);const f=v("flex","flex-col","items-center","justify-center","text-center",m("xl","py"),m("base","px"),i),p=o==="withAction"||r&&s,b=o==="withIllustration"||a;return n.jsxs("div",F(M({className:f,role:"status","aria-live":"polite","aria-label":`${e}. ${t}`},c),{children:[b&&a&&n.jsx("div",{className:v(m("base","mb")),"aria-hidden":"true",children:a}),n.jsx($e,{as:"h3",className:v(re("h4"),It("semibold"),"text-fg-primary",m("sm","mb")),children:e}),n.jsx($e,{as:"p",className:v(re("bodySmall"),"text-fg-secondary",m("md","mb"),"max-w-sm"),children:t}),p&&r&&s&&n.jsx(Q,{variant:"primary",onClick:s,children:r})]}))}function Za(c){var u=c,{trigger:e,items:t,align:r="right",variant:s="default",className:a="","aria-label":o}=u,i=z(u,["trigger","items","align","variant","className","aria-label"]);const[d,f]=l.useState(!1),[p,b]=l.useState(-1),g=l.useRef(null),x=l.useRef(null),w=l.useRef(null),y=l.useRef([]),h=l.useId(),j=`dropdown-menu-${h}`,N=`dropdown-trigger-${h}`;l.useEffect(()=>{const A=L=>{g.current&&!g.current.contains(L.target)&&(f(!1),b(-1))};return d&&(document.addEventListener("mousedown",A),setTimeout(()=>{var D;const L=t.findIndex(T=>!T.disabled);L>=0&&(b(L),(D=y.current[L])==null||D.focus())},0)),()=>{document.removeEventListener("mousedown",A)}},[d,t]),l.useEffect(()=>{if(!d)return;const A=D=>{var _,V,B,X;const T=t.map((Z,oe)=>({item:Z,index:oe})).filter(({item:Z})=>!Z.disabled),R=T.findIndex(({index:Z})=>Z===p);switch(D.key){case"ArrowDown":{D.preventDefault();const Z=R<T.length-1?T[R+1].index:T[0].index;b(Z),(_=y.current[Z])==null||_.focus();break}case"ArrowUp":{D.preventDefault();const Z=R>0?T[R-1].index:T[T.length-1].index;b(Z),(V=y.current[Z])==null||V.focus();break}case"Home":{D.preventDefault();const Z=T[0].index;b(Z),(B=y.current[Z])==null||B.focus();break}case"End":{D.preventDefault();const Z=T[T.length-1].index;b(Z),(X=y.current[Z])==null||X.focus();break}case"Enter":case" ":D.preventDefault(),p>=0&&!t[p].disabled&&k(t[p]);break;case"Escape":D.preventDefault(),f(!1),b(-1),setTimeout(()=>{var Z;(Z=x.current)==null||Z.focus()},0);break}},L=w.current;if(L){const D=A;return L.addEventListener("keydown",D),()=>{L.removeEventListener("keydown",D)}}},[d,p,t]);const k=A=>{A.disabled||(A.onClick(),f(!1),b(-1),setTimeout(()=>{var L;(L=x.current)==null||L.focus()},0))},$=()=>{f(!d),b(-1)},S=A=>{(A.key==="Enter"||A.key===" "||A.key==="ArrowDown")&&(A.preventDefault(),f(!0))},I=r==="right"?"right-0":"left-0",C=l.isValidElement(e)?l.cloneElement(e,{onClick:A=>{var L,D;$(),(D=(L=e.props).onClick)==null||D.call(L,A)},onKeyDown:A=>{var L,D;S(A),(D=(L=e.props).onKeyDown)==null||D.call(L,A)},"aria-haspopup":"menu","aria-expanded":d,"aria-controls":j,"aria-label":o||e.props["aria-label"]||"Open menu",id:N,ref:wa(x,e.props.ref)}):n.jsx("div",{ref:A=>{x.current=A},onClick:$,onKeyDown:S,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":j,"aria-label":o||"Open menu",id:N,children:e});return n.jsxs("div",F(M({className:v("relative","inline-block",a),ref:g},i),{children:[C,d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:v("fixed","inset-0","z-10"),onClick:()=>{f(!1),b(-1)},"aria-hidden":"true"}),n.jsx("div",{ref:w,id:j,className:v("absolute","z-20",m("sm","mt"),"w-48",U("md"),fe("lg"),"bg-surface-overlay","ring-1","ring-line-strong","ring-opacity-5",I),role:"menu","aria-orientation":"vertical","aria-labelledby":N,"aria-activedescendant":p>=0?`${j}-item-${p}`:void 0,children:n.jsx("div",{className:v(m("xs","py")),role:"none",children:t.map((A,L)=>{const D=v("block",m("base","px"),m("xs","py"),re("bodySmall"),"w-full","text-left","focus:outline-none",A.disabled?v("text-fg-disabled","cursor-not-allowed","opacity-50"):A.variant==="danger"?v("text-error-dark","hover:bg-error-bg-emphasis","focus:bg-error-bg-emphasis"):v("text-fg-primary","hover:bg-surface-hover","focus:bg-surface-hover"));return n.jsx("button",{id:`${j}-item-${L}`,ref:T=>{y.current[L]=T},type:"button",className:D,onClick:()=>k(A),disabled:A.disabled,role:"menuitem","aria-disabled":A.disabled,tabIndex:A.disabled?-1:p===L?0:-1,children:A.label},L)})})})]})]}))}const Qa=l.createContext(void 0);function eo(){const e=l.useContext(Qa);if(!e)throw new Error("DatePicker components must be used within a DatePicker component");return e}function fs({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&&s&&t==="range"&&typeof s=="object"&&"start"in s?s:{start:null,end:null},[p,b]=l.useState(d()),[g,x]=l.useState(f()),w=t==="single"?r instanceof Date?r:p:null,y=t==="range"?r&&typeof r=="object"&&"start"in r?r:g:null,N={selectedDate:w,selectedRange:y,mode:t,onDateChange:k=>{t==="single"&&(r===void 0&&b(k),a==null||a(k))},onRangeChange:k=>{t==="range"&&(r===void 0&&x(k),a==null||a(k))},minDate:o,maxDate:i,disabledDates:c,locale:u};return n.jsx(Qa.Provider,{value:N,children:e})}function Ht(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 Vn(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 As(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=z(u,["placeholder","format","showCalendarButton","aria-label","onFocus","className"]);const{selectedDate:d,selectedRange:f,mode:p,onDateChange:b}=eo(),[g,x]=l.useState(""),[w,y]=l.useState(!1),h=l.useRef(null);l.useEffect(()=>{p==="single"&&d?x(Ht(d,t)):p==="range"&&f?f.start&&f.end?x(`${Ht(f.start,t)} - ${Ht(f.end,t)}`):f.start?x(Ht(f.start,t)):x(""):x("")},[d,f,p,t]);const j=$=>{const S=$.target.value;if(x(S),p==="single"){const I=Vn(S);b(I)}},N=()=>{if(y(!1),g&&p==="single"){const $=Vn(g);$&&x(Ht($,t))}},k=()=>{var $;($=h.current)==null||$.focus()};return n.jsx("div",F(M({className:`relative ${o}`},i),{children:n.jsx(Ee,{ref:h,type:"text",value:g,onChange:j,onFocus:()=>{y(!0),a==null||a()},onBlur:N,placeholder:e,"aria-label":s||e,rightIcon:r?n.jsx(Q,{variant:"iconOnly",size:"sm",onClick:k,"aria-label":"Open calendar",type:"button",children:n.jsx(ac,{className:"h-4 w-4"})}):void 0})}))}function iu(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function lu(e){return new Date(e.getFullYear(),e.getMonth(),1).getDay()}function vt(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Bt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function cu(e,t,r){if(!t||!r)return!1;const s=e.getTime();return s>=t.getTime()&&s<=r.getTime()}function Wn(e,t,r,s){return!!(t&&e<t||r&&e>r||s!=null&&s.some(a=>vt(e,a)))}const du=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],uu=["January","February","March","April","May","June","July","August","September","October","November","December"];function Rs(a){var o=a,{month:e,onMonthChange:t,className:r=""}=o,s=z(o,["month","onMonthChange","className"]);const{selectedDate:i,selectedRange:c,mode:u,onDateChange:d,onRangeChange:f,minDate:p,maxDate:b,disabledDates:g}=eo(),[x,w]=l.useState(e||i||(c==null?void 0:c.start)||new Date),y=l.useRef(null),[h,j]=l.useState(()=>{const T=new Date,R=e||i||(c==null?void 0:c.start)||T;return i&&Bt(i,R)?i:Bt(T,R)?T:new Date(R.getFullYear(),R.getMonth(),1)});l.useEffect(()=>{e&&w(e)},[e]),l.useEffect(()=>{if(!y.current)return;const T=y.current.querySelector(`[data-date="${h.toISOString()}"]`);T&&T.focus()},[h]);const N=(()=>{if(Bt(h,x))return h;const T=new Date;return Bt(T,x)?T:new Date(x.getFullYear(),x.getMonth(),1)})(),k=iu(x),$=lu(x),S=[];for(let T=0;T<$;T++)S.push(null);for(let T=1;T<=k;T++)S.push(new Date(x.getFullYear(),x.getMonth(),T));const I=T=>{if(!Wn(T,p,b,g)){if(u==="single")d(T);else if(u==="range"){const R=c||{start:null,end:null};!R.start||R.start&&R.end?f({start:T,end:null}):R.start&&!R.end&&(T<R.start?f({start:T,end:R.start}):f({start:R.start,end:T}))}}},C=()=>{const T=new Date(x.getFullYear(),x.getMonth()-1,1);w(T),t==null||t(T)},A=()=>{const T=new Date(x.getFullYear(),x.getMonth()+1,1);w(T),t==null||t(T)},L=(T,R)=>{let _=null;switch(T.key){case"ArrowLeft":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),R.getDate()-1);break;case"ArrowRight":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),R.getDate()+1);break;case"ArrowUp":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),R.getDate()-7);break;case"ArrowDown":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),R.getDate()+7);break;case"Home":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),1);break;case"End":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth()+1,0);break;case"Enter":case" ":T.preventDefault(),I(R);return}_&&(Bt(_,x)||w(new Date(_.getFullYear(),_.getMonth(),1)),j(_))},D=[];for(let T=0;T<S.length;T+=7)D.push(S.slice(T,T+7));return n.jsxs("div",F(M({ref:y,className:`${m("base","p")} ${r}`},s),{children:[n.jsxs("div",{className:`flex items-center justify-between ${m("base","mb")}`,children:[n.jsx(Q,{variant:"iconOnly",size:"sm",onClick:C,"aria-label":"Previous month",children:n.jsx(Gt,{className:"h-4 w-4"})}),n.jsxs("div",{className:"text-sm font-semibold",children:[uu[x.getMonth()]," ",x.getFullYear()]}),n.jsx(Q,{variant:"iconOnly",size:"sm",onClick:A,"aria-label":"Next month",children:n.jsx(yt,{className:"h-4 w-4"})})]}),n.jsxs("div",{role:"grid","aria-label":"Calendar",children:[n.jsx("div",{role:"row",className:`grid grid-cols-7 ${m("xs","gap")} ${m("sm","mb")}`,children:du.map(T=>n.jsx("div",{role:"columnheader",className:`text-center text-xs font-medium text-fg-tertiary ${m("xs","py")}`,children:T},T))}),D.map((T,R)=>n.jsx("div",{role:"row",className:`grid grid-cols-7 ${m("xs","gap")}`,children:T.map((_,V)=>{if(!_)return n.jsx("div",{role:"gridcell",className:"aspect-square"},`empty-${R}-${V}`);const B=u==="single"?vt(_,i):vt(_,(c==null?void 0:c.start)||null)||vt(_,(c==null?void 0:c.end)||null),X=u==="range"&&c?cu(_,c.start,c.end):!1,Z=Wn(_,p,b,g),oe=vt(_,new Date),H=vt(_,h),P=vt(_,N);return n.jsx("button",{role:"gridcell",type:"button","data-date":_.toISOString(),tabIndex:P?0:-1,onClick:()=>I(_),onKeyDown:Y=>L(Y,_),className:`
7
7
  aspect-square
8
8
  text-sm
9
9
  ${U("md")}
@@ -12,17 +12,17 @@ React keys must be passed directly to JSX without using spread:
12
12
  focus:ring-2
13
13
  focus:ring-offset-1
14
14
  ${Z?"text-fg-disabled cursor-not-allowed opacity-50":B?"bg-surface-brand-strong text-fg-inverse font-semibold":X?"bg-surface-brand-muted text-fg-brand-emphasis":oe?"border-2 border-line-brand font-semibold":H?"bg-surface-brand-muted":"hover:bg-surface-active"}
15
- `,"aria-label":_.toDateString(),"aria-selected":B,"aria-disabled":Z,children:_.getDate()},_.toISOString())})},`week-${R}`))]})]}))}function Ar({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:b=""}){const[h,g]=l.useState(!1),w=l.useRef(null),v=l.useRef(null);return l.useEffect(()=>{if(!h)return;const x=j=>{var S,I,C,A;const N=j.target,k=(I=(S=w.current)==null?void 0:S.contains(N))!=null?I:!1,$=(A=(C=v.current)==null?void 0:C.contains(N))!=null?A:!1;!k&&!$&&g(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[h]),l.useEffect(()=>{if(!h)return;const x=j=>{j.key==="Escape"&&g(!1)};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[h]),e?n.jsx(fs,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:e}):n.jsx("div",{ref:w,className:`relative ${b}`,children:n.jsxs(fs,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:[n.jsx(As,{placeholder:u,format:d,showCalendarButton:f,"aria-label":p,onFocus:()=>g(!0)}),h&&n.jsx(eo,{containerRef:w,popupRef:v,children:n.jsx(Rs,{})})]})})}function eo({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:`
16
- fixed ${xe("popover")}
15
+ `,"aria-label":_.toDateString(),"aria-selected":B,"aria-disabled":Z,children:_.getDate()},_.toISOString())})},`week-${R}`))]})]}))}function Ar({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:b=""}){const[g,x]=l.useState(!1),w=l.useRef(null),y=l.useRef(null);return l.useEffect(()=>{if(!g)return;const h=j=>{var S,I,C,A;const N=j.target,k=(I=(S=w.current)==null?void 0:S.contains(N))!=null?I:!1,$=(A=(C=y.current)==null?void 0:C.contains(N))!=null?A:!1;!k&&!$&&x(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[g]),l.useEffect(()=>{if(!g)return;const h=j=>{j.key==="Escape"&&x(!1)};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[g]),e?n.jsx(fs,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:e}):n.jsx("div",{ref:w,className:`relative ${b}`,children:n.jsxs(fs,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:[n.jsx(As,{placeholder:u,format:d,showCalendarButton:f,"aria-label":p,onFocus:()=>x(!0)}),g&&n.jsx(to,{containerRef:w,popupRef:y,children:n.jsx(Rs,{})})]})})}function to({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:`
16
+ fixed ${he("popover")}
17
17
  bg-surface-overlay
18
18
  ${U("lg")}
19
19
  ${fe("xl")}
20
20
  border border-line-default
21
- `,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"?Ye.createPortal(c,document.body):c}Ar.Input=As;Ar.Calendar=Rs;Ar.Popup=eo;const du=Ar,Rr=l.createContext(void 0);function Ir(){const e=l.useContext(Rr);if(e===void 0)throw new Error("useTabsContext must be used within a Tabs component");return e}function uu(){return l.useContext(Rr)}function to({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(b=>{u||c(b),r==null||r(b)},[u,r]),p={value:d,onValueChange:f,orientation:s,activationMode:a};return n.jsx(Rr.Provider,{value:p,children:o})}function ro(o){var i=o,{children:e,className:t="",variant:r="default",orientation:s}=i,a=z(i,["children","className","variant","orientation"]);var b;const{orientation:c}=Ir(),u=(b=s!=null?s:c)!=null?b:"horizontal",d=l.useRef(null);l.useEffect(()=>{const h=d.current;if(!h)return;const g=w=>{var N;const v=Array.from(h.querySelectorAll('[role="tab"]:not([disabled])')),x=v.findIndex(k=>k===document.activeElement);if(x===-1)return;let j=x;u==="horizontal"?w.key==="ArrowRight"?(w.preventDefault(),j=(x+1)%v.length):w.key==="ArrowLeft"&&(w.preventDefault(),j=(x-1+v.length)%v.length):w.key==="ArrowDown"?(w.preventDefault(),j=(x+1)%v.length):w.key==="ArrowUp"&&(w.preventDefault(),j=(x-1+v.length)%v.length),w.key==="Home"?(w.preventDefault(),j=0):w.key==="End"&&(w.preventDefault(),j=v.length-1),j!==x&&((N=v[j])==null||N.focus())};return h.addEventListener("keydown",g),()=>h.removeEventListener("keydown",g)},[u]);const f=r==="compact"&&u==="vertical"?"flex":"inline-flex",p=y(u==="vertical"?"flex-col":"flex-row",m("xs","gap"));return n.jsx("div",P(M({ref:d,role:"tablist","aria-orientation":u,className:y(f,p,m("xs","p"),"bg-surface-muted",U("md"),t)},a),{children:e}))}function so(c){var u=c,{value:e,children:t,disabled:r=!1,className:s="",onClick:a,onKeyDown:o}=u,i=z(u,["value","children","disabled","className","onClick","onKeyDown"]);const{value:d,onValueChange:f,orientation:p,activationMode:b}=Ir(),h=d===e,g=x=>{r||((b==="automatic"||h)&&f(e),a==null||a(x))},w=x=>{var j;b==="automatic"&&!r&&!h&&f(e),(j=i.onFocus)==null||j.call(i,x)},v=x=>{if(!r&&!(x.key==="ArrowRight"||x.key==="ArrowLeft"||x.key==="ArrowDown"||x.key==="ArrowUp"||x.key==="Home"||x.key==="End")){if(b==="manual"&&(x.key==="Enter"||x.key===" ")){x.preventDefault(),f(e);return}o==null||o(x)}};return n.jsx("button",P(M({type:"button",role:"tab","aria-selected":h,"aria-controls":`tabpanel-${e}`,id:`tab-${e}`,tabIndex:r?-1:h?0:-1,disabled:r,onClick:g,onFocus:w,onKeyDown:v,className:y("inline-flex","items-center","justify-center",m("sm","px"),m("xs","py"),re("bodySmall"),ze("label"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",U("sm"),h?y("bg-surface-brand-strong","text-fg-inverse"):y("text-fg-secondary","hover:bg-surface-active"),r?"opacity-50 cursor-not-allowed":"cursor-pointer",s)},i),{children:t}))}function no(o){var i=o,{value:e,children:t,forceMount:r=!1,className:s=""}=i,a=z(i,["value","children","forceMount","className"]);const{value:c}=Ir(),u=c===e;return!u&&!r?null:n.jsx("div",P(M({role:"tabpanel",id:`tabpanel-${e}`,"aria-labelledby":`tab-${e}`,hidden:!u,className:`
21
+ `,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"?Ye.createPortal(c,document.body):c}Ar.Input=As;Ar.Calendar=Rs;Ar.Popup=to;const fu=Ar,Rr=l.createContext(void 0);function Ir(){const e=l.useContext(Rr);if(e===void 0)throw new Error("useTabsContext must be used within a Tabs component");return e}function mu(){return l.useContext(Rr)}function ro({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(b=>{u||c(b),r==null||r(b)},[u,r]),p={value:d,onValueChange:f,orientation:s,activationMode:a};return n.jsx(Rr.Provider,{value:p,children:o})}function so(o){var i=o,{children:e,className:t="",variant:r="default",orientation:s}=i,a=z(i,["children","className","variant","orientation"]);var b;const{orientation:c}=Ir(),u=(b=s!=null?s:c)!=null?b:"horizontal",d=l.useRef(null);l.useEffect(()=>{const g=d.current;if(!g)return;const x=w=>{var N;const y=Array.from(g.querySelectorAll('[role="tab"]:not([disabled])')),h=y.findIndex(k=>k===document.activeElement);if(h===-1)return;let j=h;u==="horizontal"?w.key==="ArrowRight"?(w.preventDefault(),j=(h+1)%y.length):w.key==="ArrowLeft"&&(w.preventDefault(),j=(h-1+y.length)%y.length):w.key==="ArrowDown"?(w.preventDefault(),j=(h+1)%y.length):w.key==="ArrowUp"&&(w.preventDefault(),j=(h-1+y.length)%y.length),w.key==="Home"?(w.preventDefault(),j=0):w.key==="End"&&(w.preventDefault(),j=y.length-1),j!==h&&((N=y[j])==null||N.focus())};return g.addEventListener("keydown",x),()=>g.removeEventListener("keydown",x)},[u]);const f=r==="compact"&&u==="vertical"?"flex":"inline-flex",p=v(u==="vertical"?"flex-col":"flex-row",m("xs","gap"));return n.jsx("div",F(M({ref:d,role:"tablist","aria-orientation":u,className:v(f,p,m("xs","p"),"bg-surface-muted",U("md"),t)},a),{children:e}))}function no(c){var u=c,{value:e,children:t,disabled:r=!1,className:s="",onClick:a,onKeyDown:o}=u,i=z(u,["value","children","disabled","className","onClick","onKeyDown"]);const{value:d,onValueChange:f,orientation:p,activationMode:b}=Ir(),g=d===e,x=h=>{r||((b==="automatic"||g)&&f(e),a==null||a(h))},w=h=>{var j;b==="automatic"&&!r&&!g&&f(e),(j=i.onFocus)==null||j.call(i,h)},y=h=>{if(!r&&!(h.key==="ArrowRight"||h.key==="ArrowLeft"||h.key==="ArrowDown"||h.key==="ArrowUp"||h.key==="Home"||h.key==="End")){if(b==="manual"&&(h.key==="Enter"||h.key===" ")){h.preventDefault(),f(e);return}o==null||o(h)}};return n.jsx("button",F(M({type:"button",role:"tab","aria-selected":g,"aria-controls":`tabpanel-${e}`,id:`tab-${e}`,tabIndex:r?-1:g?0:-1,disabled:r,onClick:x,onFocus:w,onKeyDown:y,className:v("inline-flex","items-center","justify-center",m("sm","px"),m("xs","py"),re("bodySmall"),ze("label"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",U("sm"),g?v("bg-surface-brand-strong","text-fg-inverse"):v("text-fg-secondary","hover:bg-surface-active"),r?"opacity-50 cursor-not-allowed":"cursor-pointer",s)},i),{children:t}))}function ao(o){var i=o,{value:e,children:t,forceMount:r=!1,className:s=""}=i,a=z(i,["value","children","forceMount","className"]);const{value:c}=Ir(),u=c===e;return!u&&!r?null:n.jsx("div",F(M({role:"tabpanel",id:`tabpanel-${e}`,"aria-labelledby":`tab-${e}`,hidden:!u,className:`
22
22
  ${m("sm","mt")}
23
23
  focus:outline-none
24
24
  ${s}
25
- `},a),{children:t}))}function Dr(r){var s=r,{children:e}=s,t=z(s,["children"]);return n.jsx(to,P(M({},t),{children:e}))}Dr.List=ro;Dr.Trigger=so;Dr.Content=no;const fu=Dr,_r=l.forwardRef(function(b,p){var h=b,{onSearch:t,onClear:r,loading:s=!1,showClearButton:a=!0,debounceMs:o=300,value:i,defaultValue:c,onChange:u,className:d=""}=h,f=z(h,["onSearch","onClear","loading","showClearButton","debounceMs","value","defaultValue","onChange","className"]);const[g,w]=l.useState(typeof c=="string"?c:""),[v,x]=l.useState(null),j=i!==void 0,N=j?i:g,k=N!=null&&String(N).length>0,$=C=>{const A=C.target.value;j||w(A),u==null||u(C),v&&clearTimeout(v);const F=setTimeout(()=>{t==null||t(A)},o);x(F)},S=()=>{j||w("");const C={target:{value:""},currentTarget:{value:""}};u==null||u(C),r==null||r(),t==null||t("")},I=C=>{var A;C.key==="Enter"&&t&&t(String(N||"")),(A=f.onKeyDown)==null||A.call(f,C)};return n.jsx("div",{className:y("relative",d),children:n.jsx(Ee,P(M({ref:p},f),{type:"search",value:N,onChange:$,onKeyDown:I,leftIcon:s?n.jsx("div",{className:"animate-spin",children:n.jsx(ds,{className:"h-4 w-4"})}):n.jsx(ds,{className:"h-4 w-4"}),rightIcon:a&&k&&!s?n.jsx(Q,{variant:"ghost",size:"sm",onClick:S,className:`h-auto ${m("xs","p")}`,"aria-label":"Clear search",children:n.jsx(Ce,{className:"h-4 w-4"})}):void 0,className:y(m("lg","pr"))}))})});_r.displayName="SearchInput";const Is=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:`
25
+ `},a),{children:t}))}function Dr(r){var s=r,{children:e}=s,t=z(s,["children"]);return n.jsx(ro,F(M({},t),{children:e}))}Dr.List=so;Dr.Trigger=no;Dr.Content=ao;const pu=Dr,_r=l.forwardRef(function(b,p){var g=b,{onSearch:t,onClear:r,loading:s=!1,showClearButton:a=!0,debounceMs:o=300,value:i,defaultValue:c,onChange:u,className:d=""}=g,f=z(g,["onSearch","onClear","loading","showClearButton","debounceMs","value","defaultValue","onChange","className"]);const[x,w]=l.useState(typeof c=="string"?c:""),[y,h]=l.useState(null),j=i!==void 0,N=j?i:x,k=N!=null&&String(N).length>0,$=C=>{const A=C.target.value;j||w(A),u==null||u(C),y&&clearTimeout(y);const L=setTimeout(()=>{t==null||t(A)},o);h(L)},S=()=>{j||w("");const C={target:{value:""},currentTarget:{value:""}};u==null||u(C),r==null||r(),t==null||t("")},I=C=>{var A;C.key==="Enter"&&t&&t(String(N||"")),(A=f.onKeyDown)==null||A.call(f,C)};return n.jsx("div",{className:v("relative",d),children:n.jsx(Ee,F(M({ref:p},f),{type:"search",value:N,onChange:$,onKeyDown:I,leftIcon:s?n.jsx("div",{className:"animate-spin",children:n.jsx(ds,{className:"h-4 w-4"})}):n.jsx(ds,{className:"h-4 w-4"}),rightIcon:a&&k&&!s?n.jsx(Q,{variant:"ghost",size:"sm",onClick:S,className:`h-auto ${m("xs","p")}`,"aria-label":"Clear search",children:n.jsx(Ce,{className:"h-4 w-4"})}):void 0,className:v(m("lg","pr"))}))})});_r.displayName="SearchInput";const Is=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:`
26
26
  flex
27
27
  items-center
28
28
  ${m("sm","gap")}
@@ -33,9 +33,9 @@ React keys must be passed directly to JSX without using spread:
33
33
  transition-colors
34
34
  ${r?"bg-surface-active":""}
35
35
  ${t.disabled?"opacity-50 cursor-not-allowed":"hover:bg-surface-hover"}
36
- `,children:[t.icon&&n.jsx("span",{className:"flex-shrink-0",children:t.icon}),n.jsx("span",{className:"flex-1",children:t.label})]})});Is.displayName="AutocompleteOption";const Fr=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":b},h){const[g,w]=l.useState({top:0,left:0,width:0});l.useEffect(()=>{if(i.current){const x=i.current.getBoundingClientRect();w({top:x.bottom+window.scrollY+4,left:x.left+window.scrollX,width:x.width})}},[i]);const v=n.jsx("div",{ref:h,role:"listbox","aria-label":b?void 0:p,"aria-labelledby":b,className:`
36
+ `,children:[t.icon&&n.jsx("span",{className:"flex-shrink-0",children:t.icon}),n.jsx("span",{className:"flex-1",children:t.label})]})});Is.displayName="AutocompleteOption";const Lr=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":b},g){const[x,w]=l.useState({top:0,left:0,width:0});l.useEffect(()=>{if(i.current){const h=i.current.getBoundingClientRect();w({top:h.bottom+window.scrollY+4,left:h.left+window.scrollX,width:h.width})}},[i]);const y=n.jsx("div",{ref:g,role:"listbox","aria-label":b?void 0:p,"aria-labelledby":b,className:`
37
37
  absolute
38
- ${xe("popover")}
38
+ ${he("popover")}
39
39
  bg-surface-overlay
40
40
  ${U("md")}
41
41
  ${fe("lg")}
@@ -44,7 +44,7 @@ React keys must be passed directly to JSX without using spread:
44
44
  max-h-60
45
45
  overflow-y-auto
46
46
  ${m("xs","py")}
47
- `,style:{top:`${g.top}px`,left:`${g.left}px`,width:`${g.width}px`},children:a?n.jsx("div",{className:`
47
+ `,style:{top:`${x.top}px`,left:`${x.left}px`,width:`${x.width}px`},children:a?n.jsx("div",{className:`
48
48
  ${m("md","p")}
49
49
  text-sm
50
50
  text-fg-tertiary
@@ -63,9 +63,9 @@ React keys must be passed directly to JSX without using spread:
63
63
  hover:bg-surface-hover
64
64
  border-b
65
65
  border-line-default
66
- `,onClick:u?f:d,children:u?"Deselect All":"Select All"}),t.map((x,j)=>n.jsx(Is,{option:x,isHighlighted:j===r,onSelect:s},x.value))]})});return typeof window!="undefined"?Ye.createPortal(v,document.body):null});Fr.displayName="AutocompleteList";const ao=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:b="",inputClassName:h="",size:g="md",label:w,"aria-label":v,"aria-labelledby":x,id:j},N){const k=l.useId(),$=j!=null?j:k,[S,I]=l.useState(typeof s=="string"?s:""),[C,A]=l.useState(!1),[F,D]=l.useState(-1),[T,R]=l.useState(""),_=l.useRef(null),V=l.useRef(null),B=l.useRef(null),X=l.useRef(null),Z=r!==void 0,oe=Z?r:S,L=T.trim()?p?p(t,T):t.filter(O=>O.label.toLowerCase().includes(T.toLowerCase())):t,Y=L.length>0,ee=O=>{const W=O.target.value;R(W),Z||I(W),a==null||a(W),X.current&&clearTimeout(X.current),X.current=setTimeout(()=>{A(!0),D(-1)},f)},J=O=>{var W;O.disabled||(Z||I(O.value),R(O.label),A(!1),D(-1),a==null||a(O.value),o==null||o(O),(W=V.current)==null||W.focus())},te=O=>{if(!C||L.length===0){(O.key==="ArrowDown"||O.key==="Enter")&&A(!0);return}switch(O.key){case"ArrowDown":O.preventDefault(),D(W=>W<L.length-1?W+1:0);break;case"ArrowUp":O.preventDefault(),D(W=>W>0?W-1:L.length-1);break;case"Enter":O.preventDefault(),F>=0&&F<L.length&&J(L[F]);break;case"Escape":O.preventDefault(),A(!1),D(-1);break}};l.useEffect(()=>{if(!C)return;const O=W=>{_.current&&!_.current.contains(W.target)&&(A(!1),D(-1))};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[C]),l.useEffect(()=>{if(F>=0&&B.current){const O=B.current.querySelectorAll('[role="option"]');O[F]&&typeof O[F].scrollIntoView=="function"&&O[F].scrollIntoView({block:"nearest",behavior:"smooth"})}},[F]),l.useEffect(()=>{if(oe){const O=t.find(W=>W.value===oe);R(O?O.label:oe)}else R("")},[oe,t]),l.useEffect(()=>{},[w,v,x,$]);const ae=C&&(Y||c||d);return n.jsxs("div",{ref:_,className:`relative ${b}`,children:[n.jsx(Ee,{ref:V||N,id:$,label:w,"aria-label":v,"aria-labelledby":x,value:T,onChange:ee,onKeyDown:te,onFocus:()=>A(!0),placeholder:i,disabled:u,size:g,rightIcon:c?n.jsx(Ma,{className:"h-4 w-4 animate-spin"}):n.jsx($r,{className:`h-4 w-4 transition-transform ${C?"rotate-180":""}`}),className:h}),ae&&n.jsx(Fr,{ref:B,options:L,highlightedIndex:F,onSelect:J,loading:c,emptyMessage:d,containerRef:_,"aria-labelledby":x,"aria-label":x?void 0:v||w})]})});ao.displayName="Autocomplete";const oo=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:b="",inputClassName:h="",size:g="md",label:w},v){const x=l.useId(),[j,N]=l.useState(s),[k,$]=l.useState(!1),[S,I]=l.useState(-1),[C,A]=l.useState(""),F=l.useRef(null),D=l.useRef(null),T=l.useRef(null),R=r!==void 0,_=R?r:j,V=t.filter(O=>_.includes(O.value)),X=(()=>{let O=t;return C.trim()&&(O=t.filter(W=>W.label.toLowerCase().includes(C.toLowerCase()))),O})(),Z=X.length>0,oe=O=>{const W=O.target.value;A(W),$(!0),I(-1)},H=O=>{if(O.disabled||f&&_.length>=f&&!_.includes(O.value))return;const W=_.includes(O.value)?_.filter(q=>q!==O.value):[..._,O.value];R||N(W),a==null||a(W),o==null||o(t.filter(q=>W.includes(q.value))),A("")},L=()=>{const O=X.filter(q=>!q.disabled).map(q=>q.value),W=[...new Set([..._,...O])];R||N(W),a==null||a(W),o==null||o(t.filter(q=>W.includes(q.value)))},Y=()=>{const O=X.map(q=>q.value),W=_.filter(q=>!O.includes(q));R||N(W),a==null||a(W),o==null||o(t.filter(q=>W.includes(q.value)))},ee=O=>{const W=_.filter(q=>q!==O);R||N(W),a==null||a(W),o==null||o(t.filter(q=>W.includes(q.value)))},J=O=>{if(!k||X.length===0){(O.key==="ArrowDown"||O.key==="Enter")&&$(!0),O.key==="Backspace"&&C===""&&_.length>0&&ee(_[_.length-1]);return}switch(O.key){case"ArrowDown":O.preventDefault(),I(W=>W<X.length-1?W+1:0);break;case"ArrowUp":O.preventDefault(),I(W=>W>0?W-1:X.length-1);break;case"Enter":O.preventDefault(),S>=0&&S<X.length&&H(X[S]);break;case"Escape":O.preventDefault(),$(!1),I(-1);break}};l.useEffect(()=>{if(!k)return;const O=W=>{F.current&&!F.current.contains(W.target)&&($(!1),I(-1),A(""))};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[k]);const te=X.filter(O=>!O.disabled).every(O=>_.includes(O.value)),ae=k&&(Z||c||d);return n.jsxs("div",{ref:F,className:y("relative",b),children:[n.jsx("label",{htmlFor:x,className:y("block",m("sm","mb"),"text-sm","font-medium","text-fg-primary"),children:w}),n.jsxs("div",{className:y("flex","flex-wrap",m("sm","gap"),m("sm","p"),"border","border-line-default",U("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(O=>n.jsx($s,{onRemove:()=>ee(O.value),size:g==="sm"?"sm":g==="lg"?"lg":"md",children:O.label},O.value)),n.jsx("input",{id:x,ref:O=>{typeof v=="function"?v(O):v&&(v.current=O),D.current=O},type:"text",value:C,onChange:oe,onKeyDown:J,onFocus:()=>$(!0),placeholder:_.length===0?i:"",disabled:u,className:y("flex-1","min-w-32","outline-none","bg-transparent",h)})]}),ae&&n.jsx(Fr,{ref:T,"aria-label":w,options:X.map(O=>P(M({},O),{icon:_.includes(O.value)?n.jsx(cs,{className:y("h-4","w-4","text-fg-brand")}):O.icon})),highlightedIndex:S,onSelect:H,loading:c,emptyMessage:d,containerRef:F,showSelectAll:p&&X.length>0,allSelected:te,onSelectAll:L,onDeselectAll:Y})]})});oo.displayName="MultiSelect";function mu({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:b}){const[h,g]=l.useState(t),[w,v]=l.useState(null),x=e!==void 0,j=w!=null?w:x?e:h,N={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},k=C=>{o||(x||g(C),u==null||u(C))},$=C=>{o||(v(C),d==null||d(C))},S=()=>{o||v(null)},I=C=>{const A=C+1,F=i&&j>=A-.5&&j<A,D=j>=A,T=y(N[s],ye("base"),!o&&"cursor-pointer",D||F?"text-fg-warning":"text-fg-disabled"),R=p||n.jsx(Et,{className:T,fill:D?"currentColor":"none"}),_=b||n.jsx(Et,{className:T,fill:"none"});return n.jsx("span",{className:"relative inline-block",onClick:()=>k(A),onMouseEnter:()=>$(A),onMouseLeave:S,role:o?void 0:"button",tabIndex:o?void 0:0,"aria-label":o?void 0:`Rate ${A} out of ${r}`,onKeyDown:V=>{!o&&(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),k(A))},children:F?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(Et,{className:T,fill:"currentColor"}):R}),a==="filled"?n.jsx(Et,{className:T,fill:"none"}):_]}):D?a==="filled"?n.jsx(Et,{className:T,fill:"currentColor"}):R:a==="filled"?n.jsx(Et,{className:T,fill:"none"}):_},C)};return n.jsxs("div",{className:y("inline-flex","items-center",m("xs","gap"),f),children:[n.jsx("div",{className:y("flex","items-center"),role:o?"img":void 0,"aria-label":o?`Rating: ${j} out of ${r}`:void 0,children:Array.from({length:r},(C,A)=>I(A))}),c&&n.jsxs("span",{className:y(m("sm","ml"),je("sm"),"text-fg-secondary"),children:[j.toFixed(i?1:0),"/",r]})]})}function pu({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[b,h]=l.useState([]),[g,w]=l.useState(!1),v=l.useRef(null),x=D=>{if(D===0)return"0 Bytes";const T=1024,R=["Bytes","KB","MB","GB"],_=Math.floor(Math.log(D)/Math.log(T));return Math.round(D/Math.pow(T,_)*100)/100+" "+R[_]},j=D=>r&&D.size>r?`File size exceeds ${x(r)}`:null,N=D=>{const T=Array.from(D),R=[];return T.forEach(_=>{const V=j(_),B=`${Date.now()}-${Math.random().toString(36).slice(2,11)}`,X={file:_,id:B,error:V!=null?V:void 0,progress:c?0:void 0};if(i&&_.type.startsWith("image/")){const Z=new FileReader;Z.onload=oe=>{h(H=>H.map(L=>{var Y;return L.id===B?P(M({},L),{preview:(Y=oe.target)==null?void 0:Y.result}):L}))},Z.readAsDataURL(_)}R.push(X)}),R},k=D=>{const T=t?[...b,...D]:D,R=s?T.slice(0,s):T;h(R),a==null||a(R)},$=D=>{if(D.preventDefault(),w(!1),u)return;const T=D.dataTransfer.files;if(T.length>0){const R=N(T);k(R)}},S=D=>{D.preventDefault(),u||w(!0)},I=D=>{D.preventDefault(),w(!1)},C=D=>{if(D.target.files&&D.target.files.length>0){const T=N(D.target.files);k(T)}v.current&&(v.current.value="")},A=D=>{const T=b.filter(R=>R.id!==D);h(T),a==null||a(T),o==null||o(D)},F=()=>{var D;u||(D=v.current)==null||D.click()};return n.jsxs("div",{className:y(m("lg","gap"),"flex","flex-col",d),children:[(f||p)&&n.jsxs("div",{children:[f&&n.jsx("label",{className:y("block",je("sm"),It("medium"),"text-fg-primary",m("xs","mb")),children:f}),p&&n.jsx("p",{className:y(je("sm"),"text-fg-secondary"),children:p})]}),n.jsxs("div",{onDrop:$,onDragOver:S,onDragLeave:I,onClick:F,className:y("relative","border-2","border-dashed",g?"border-line-brand":"border-line-default",U("lg"),m("lg","p"),"text-center","cursor-pointer",ye("base"),"focus:border-line-focus",u?"opacity-50 cursor-not-allowed":y("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:v,type:"file",accept:e,multiple:t,onChange:C,disabled:u,className:"hidden"}),n.jsxs("div",{className:y("flex","flex-col","items-center",m("sm","gap")),children:[n.jsx(Hc,{className:y("h-8","w-8",g?"text-fg-brand":"text-fg-secondary")}),n.jsxs("div",{children:[n.jsx("span",{className:y(je("sm"),It("medium"),"text-fg-primary"),children:g?"Drop files here":"Click to upload or drag and drop"}),e&&n.jsxs("p",{className:y(je("xs"),"text-fg-secondary",m("xs","mt")),children:["Accepted: ",e]}),r&&n.jsxs("p",{className:y(je("xs"),"text-fg-secondary"),children:["Max size: ",x(r)]})]})]})]}),b.length>0&&n.jsx("div",{className:y("flex","flex-col",m("sm","gap")),children:b.map(D=>n.jsxs("div",{className:y("flex","items-center",m("md","gap"),m("base","p"),"border","border-line-default",U("md"),D.error?"bg-error-bg":"bg-surface-muted"),children:[i&&D.preview?n.jsx("img",{src:D.preview,alt:D.file.name,className:y("w-12","h-12","object-cover",U("md"))}):n.jsx(Nc,{className:y("h-8","w-8","text-fg-secondary")}),n.jsxs("div",{className:y("flex-1","min-w-0"),children:[n.jsx("p",{className:y(je("sm"),It("medium"),"text-fg-primary","truncate"),children:D.file.name}),n.jsx("p",{className:y(je("xs"),"text-fg-secondary"),children:x(D.file.size)}),D.error&&n.jsxs("div",{className:y("flex","items-center",m("xs","gap"),m("xs","mt")),children:[n.jsx(ws,{className:y("h-3","w-3","text-fg-error")}),n.jsx("span",{className:y(je("xs"),"text-fg-error"),children:D.error})]}),c&&D.progress!==void 0&&n.jsx("div",{className:y(m("sm","mt")),children:n.jsx(Ns,{value:D.progress,size:"sm"})})]}),!D.error&&!c&&n.jsx(mr,{className:y("h-5","w-5","text-fg-success")}),n.jsx(Q,{variant:"ghost",size:"sm",onClick:T=>{T.stopPropagation(),A(D.id)},className:`h-auto ${m("xs","p")}`,"aria-label":`Remove ${D.file.name}`,children:n.jsx(Ce,{className:"h-4 w-4"})})]},D.id))})]})}function Ds({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:b=""}){const[h,g]=l.useState(s),w=l.useRef(null),v=l.useRef(null),[x,j]=l.useState({top:0,left:0}),N=l.useId(),k=r!==void 0,$=k?r:h;Sr($);const S=l.useCallback(()=>{if(!w.current||!v.current)return;const F=w.current.getBoundingClientRect(),D=v.current.getBoundingClientRect(),T=window.scrollY,R=window.scrollX;let _=0,V=0;o.startsWith("top")?(_=F.top+T-D.height-8,o==="top-start"?V=F.left+R:o==="top-end"?V=F.right+R-D.width:V=F.left+R+(F.width-D.width)/2):o.startsWith("bottom")?(_=F.bottom+T+8,o==="bottom-start"?V=F.left+R:o==="bottom-end"?V=F.right+R-D.width:V=F.left+R+(F.width-D.width)/2):o.startsWith("left")?(V=F.left+R-D.width-8,o==="left-start"?_=F.top+T:o==="left-end"?_=F.bottom+T-D.height:_=F.top+T+(F.height-D.height)/2):o.startsWith("right")&&(V=F.right+R+8,o==="right-start"?_=F.top+T:o==="right-end"?_=F.bottom+T-D.height:_=F.top+T+(F.height-D.height)/2);const B=8;_=Math.max(B,Math.min(_,window.innerHeight+T-D.height-B)),V=Math.max(B,Math.min(V,window.innerWidth+R-D.width-B)),j({top:_,left:V})},[o]);l.useEffect(()=>{if($){S();const F=()=>S(),D=()=>S();return window.addEventListener("resize",F),window.addEventListener("scroll",D,!0),()=>{window.removeEventListener("resize",F),window.removeEventListener("scroll",D,!0)}}},[$,o,S]),l.useEffect(()=>{$&&v.current&&setTimeout(S,0)},[$,S]);const I=l.useCallback(F=>{k||g(F),a==null||a(F)},[k,a]),C=l.useCallback(()=>{I(!1)},[I]);l.useEffect(()=>{if($&&d){const F=D=>{D.key==="Escape"&&C()};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)}},[$,d,C]),l.useEffect(()=>{if($&&u){const F=D=>{v.current&&w.current&&!v.current.contains(D.target)&&!w.current.contains(D.target)&&C()};return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)}},[$,u,C]);const A=$?n.jsxs("div",{ref:v,className:`
66
+ `,onClick:u?f:d,children:u?"Deselect All":"Select All"}),t.map((h,j)=>n.jsx(Is,{option:h,isHighlighted:j===r,onSelect:s},h.value))]})});return typeof window!="undefined"?Ye.createPortal(y,document.body):null});Lr.displayName="AutocompleteList";const oo=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:b="",inputClassName:g="",size:x="md",label:w,"aria-label":y,"aria-labelledby":h,id:j},N){const k=l.useId(),$=j!=null?j:k,[S,I]=l.useState(typeof s=="string"?s:""),[C,A]=l.useState(!1),[L,D]=l.useState(-1),[T,R]=l.useState(""),_=l.useRef(null),V=l.useRef(null),B=l.useRef(null),X=l.useRef(null),Z=r!==void 0,oe=Z?r:S,P=T.trim()?p?p(t,T):t.filter(O=>O.label.toLowerCase().includes(T.toLowerCase())):t,Y=P.length>0,ee=O=>{const W=O.target.value;R(W),Z||I(W),a==null||a(W),X.current&&clearTimeout(X.current),X.current=setTimeout(()=>{A(!0),D(-1)},f)},J=O=>{var W;O.disabled||(Z||I(O.value),R(O.label),A(!1),D(-1),a==null||a(O.value),o==null||o(O),(W=V.current)==null||W.focus())},te=O=>{if(!C||P.length===0){(O.key==="ArrowDown"||O.key==="Enter")&&A(!0);return}switch(O.key){case"ArrowDown":O.preventDefault(),D(W=>W<P.length-1?W+1:0);break;case"ArrowUp":O.preventDefault(),D(W=>W>0?W-1:P.length-1);break;case"Enter":O.preventDefault(),L>=0&&L<P.length&&J(P[L]);break;case"Escape":O.preventDefault(),A(!1),D(-1);break}};l.useEffect(()=>{if(!C)return;const O=W=>{_.current&&!_.current.contains(W.target)&&(A(!1),D(-1))};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[C]),l.useEffect(()=>{if(L>=0&&B.current){const O=B.current.querySelectorAll('[role="option"]');O[L]&&typeof O[L].scrollIntoView=="function"&&O[L].scrollIntoView({block:"nearest",behavior:"smooth"})}},[L]),l.useEffect(()=>{if(oe){const O=t.find(W=>W.value===oe);R(O?O.label:oe)}else R("")},[oe,t]),l.useEffect(()=>{},[w,y,h,$]);const ae=C&&(Y||c||d);return n.jsxs("div",{ref:_,className:`relative ${b}`,children:[n.jsx(Ee,{ref:V||N,id:$,label:w,"aria-label":y,"aria-labelledby":h,value:T,onChange:ee,onKeyDown:te,onFocus:()=>A(!0),placeholder:i,disabled:u,size:x,rightIcon:c?n.jsx(Ma,{className:"h-4 w-4 animate-spin"}):n.jsx($r,{className:`h-4 w-4 transition-transform ${C?"rotate-180":""}`}),className:g}),ae&&n.jsx(Lr,{ref:B,options:P,highlightedIndex:L,onSelect:J,loading:c,emptyMessage:d,containerRef:_,"aria-labelledby":h,"aria-label":h?void 0:y||w})]})});oo.displayName="Autocomplete";const io=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:b="",inputClassName:g="",size:x="md",label:w},y){const h=l.useId(),[j,N]=l.useState(s),[k,$]=l.useState(!1),[S,I]=l.useState(-1),[C,A]=l.useState(""),L=l.useRef(null),D=l.useRef(null),T=l.useRef(null),R=r!==void 0,_=R?r:j,V=t.filter(O=>_.includes(O.value)),X=(()=>{let O=t;return C.trim()&&(O=t.filter(W=>W.label.toLowerCase().includes(C.toLowerCase()))),O})(),Z=X.length>0,oe=O=>{const W=O.target.value;A(W),$(!0),I(-1)},H=O=>{if(O.disabled||f&&_.length>=f&&!_.includes(O.value))return;const W=_.includes(O.value)?_.filter(q=>q!==O.value):[..._,O.value];R||N(W),a==null||a(W),o==null||o(t.filter(q=>W.includes(q.value))),A("")},P=()=>{const O=X.filter(q=>!q.disabled).map(q=>q.value),W=[...new Set([..._,...O])];R||N(W),a==null||a(W),o==null||o(t.filter(q=>W.includes(q.value)))},Y=()=>{const O=X.map(q=>q.value),W=_.filter(q=>!O.includes(q));R||N(W),a==null||a(W),o==null||o(t.filter(q=>W.includes(q.value)))},ee=O=>{const W=_.filter(q=>q!==O);R||N(W),a==null||a(W),o==null||o(t.filter(q=>W.includes(q.value)))},J=O=>{if(!k||X.length===0){(O.key==="ArrowDown"||O.key==="Enter")&&$(!0),O.key==="Backspace"&&C===""&&_.length>0&&ee(_[_.length-1]);return}switch(O.key){case"ArrowDown":O.preventDefault(),I(W=>W<X.length-1?W+1:0);break;case"ArrowUp":O.preventDefault(),I(W=>W>0?W-1:X.length-1);break;case"Enter":O.preventDefault(),S>=0&&S<X.length&&H(X[S]);break;case"Escape":O.preventDefault(),$(!1),I(-1);break}};l.useEffect(()=>{if(!k)return;const O=W=>{L.current&&!L.current.contains(W.target)&&($(!1),I(-1),A(""))};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[k]);const te=X.filter(O=>!O.disabled).every(O=>_.includes(O.value)),ae=k&&(Z||c||d);return n.jsxs("div",{ref:L,className:v("relative",b),children:[n.jsx("label",{htmlFor:h,className:v("block",m("sm","mb"),"text-sm","font-medium","text-fg-primary"),children:w}),n.jsxs("div",{className:v("flex","flex-wrap",m("sm","gap"),m("sm","p"),"border","border-line-default",U("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(O=>n.jsx($s,{onRemove:()=>ee(O.value),size:x==="sm"?"sm":x==="lg"?"lg":"md",children:O.label},O.value)),n.jsx("input",{id:h,ref:O=>{typeof y=="function"?y(O):y&&(y.current=O),D.current=O},type:"text",value:C,onChange:oe,onKeyDown:J,onFocus:()=>$(!0),placeholder:_.length===0?i:"",disabled:u,className:v("flex-1","min-w-32","outline-none","bg-transparent",g)})]}),ae&&n.jsx(Lr,{ref:T,"aria-label":w,options:X.map(O=>F(M({},O),{icon:_.includes(O.value)?n.jsx(cs,{className:v("h-4","w-4","text-fg-brand")}):O.icon})),highlightedIndex:S,onSelect:H,loading:c,emptyMessage:d,containerRef:L,showSelectAll:p&&X.length>0,allSelected:te,onSelectAll:P,onDeselectAll:Y})]})});io.displayName="MultiSelect";function bu({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:b}){const[g,x]=l.useState(t),[w,y]=l.useState(null),h=e!==void 0,j=w!=null?w:h?e:g,N={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},k=C=>{o||(h||x(C),u==null||u(C))},$=C=>{o||(y(C),d==null||d(C))},S=()=>{o||y(null)},I=C=>{const A=C+1,L=i&&j>=A-.5&&j<A,D=j>=A,T=v(N[s],ye("base"),!o&&"cursor-pointer",D||L?"text-fg-warning":"text-fg-disabled"),R=p||n.jsx(Et,{className:T,fill:D?"currentColor":"none"}),_=b||n.jsx(Et,{className:T,fill:"none"});return n.jsx("span",{className:"relative inline-block",onClick:()=>k(A),onMouseEnter:()=>$(A),onMouseLeave:S,role:o?void 0:"button",tabIndex:o?void 0:0,"aria-label":o?void 0:`Rate ${A} out of ${r}`,onKeyDown:V=>{!o&&(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),k(A))},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(Et,{className:T,fill:"currentColor"}):R}),a==="filled"?n.jsx(Et,{className:T,fill:"none"}):_]}):D?a==="filled"?n.jsx(Et,{className:T,fill:"currentColor"}):R:a==="filled"?n.jsx(Et,{className:T,fill:"none"}):_},C)};return n.jsxs("div",{className:v("inline-flex","items-center",m("xs","gap"),f),children:[n.jsx("div",{className:v("flex","items-center"),role:o?"img":void 0,"aria-label":o?`Rating: ${j} out of ${r}`:void 0,children:Array.from({length:r},(C,A)=>I(A))}),c&&n.jsxs("span",{className:v(m("sm","ml"),je("sm"),"text-fg-secondary"),children:[j.toFixed(i?1:0),"/",r]})]})}function gu({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[b,g]=l.useState([]),[x,w]=l.useState(!1),y=l.useRef(null),h=D=>{if(D===0)return"0 Bytes";const T=1024,R=["Bytes","KB","MB","GB"],_=Math.floor(Math.log(D)/Math.log(T));return Math.round(D/Math.pow(T,_)*100)/100+" "+R[_]},j=D=>r&&D.size>r?`File size exceeds ${h(r)}`:null,N=D=>{const T=Array.from(D),R=[];return T.forEach(_=>{const V=j(_),B=`${Date.now()}-${Math.random().toString(36).slice(2,11)}`,X={file:_,id:B,error:V!=null?V:void 0,progress:c?0:void 0};if(i&&_.type.startsWith("image/")){const Z=new FileReader;Z.onload=oe=>{g(H=>H.map(P=>{var Y;return P.id===B?F(M({},P),{preview:(Y=oe.target)==null?void 0:Y.result}):P}))},Z.readAsDataURL(_)}R.push(X)}),R},k=D=>{const T=t?[...b,...D]:D,R=s?T.slice(0,s):T;g(R),a==null||a(R)},$=D=>{if(D.preventDefault(),w(!1),u)return;const T=D.dataTransfer.files;if(T.length>0){const R=N(T);k(R)}},S=D=>{D.preventDefault(),u||w(!0)},I=D=>{D.preventDefault(),w(!1)},C=D=>{if(D.target.files&&D.target.files.length>0){const T=N(D.target.files);k(T)}y.current&&(y.current.value="")},A=D=>{const T=b.filter(R=>R.id!==D);g(T),a==null||a(T),o==null||o(D)},L=()=>{var D;u||(D=y.current)==null||D.click()};return n.jsxs("div",{className:v(m("lg","gap"),"flex","flex-col",d),children:[(f||p)&&n.jsxs("div",{children:[f&&n.jsx("label",{className:v("block",je("sm"),It("medium"),"text-fg-primary",m("xs","mb")),children:f}),p&&n.jsx("p",{className:v(je("sm"),"text-fg-secondary"),children:p})]}),n.jsxs("div",{onDrop:$,onDragOver:S,onDragLeave:I,onClick:L,className:v("relative","border-2","border-dashed",x?"border-line-brand":"border-line-default",U("lg"),m("lg","p"),"text-center","cursor-pointer",ye("base"),"focus:border-line-focus",u?"opacity-50 cursor-not-allowed":v("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:C,disabled:u,className:"hidden"}),n.jsxs("div",{className:v("flex","flex-col","items-center",m("sm","gap")),children:[n.jsx(Bc,{className:v("h-8","w-8",x?"text-fg-brand":"text-fg-secondary")}),n.jsxs("div",{children:[n.jsx("span",{className:v(je("sm"),It("medium"),"text-fg-primary"),children:x?"Drop files here":"Click to upload or drag and drop"}),e&&n.jsxs("p",{className:v(je("xs"),"text-fg-secondary",m("xs","mt")),children:["Accepted: ",e]}),r&&n.jsxs("p",{className:v(je("xs"),"text-fg-secondary"),children:["Max size: ",h(r)]})]})]})]}),b.length>0&&n.jsx("div",{className:v("flex","flex-col",m("sm","gap")),children:b.map(D=>n.jsxs("div",{className:v("flex","items-center",m("md","gap"),m("base","p"),"border","border-line-default",U("md"),D.error?"bg-error-bg":"bg-surface-muted"),children:[i&&D.preview?n.jsx("img",{src:D.preview,alt:D.file.name,className:v("w-12","h-12","object-cover",U("md"))}):n.jsx(Sc,{className:v("h-8","w-8","text-fg-secondary")}),n.jsxs("div",{className:v("flex-1","min-w-0"),children:[n.jsx("p",{className:v(je("sm"),It("medium"),"text-fg-primary","truncate"),children:D.file.name}),n.jsx("p",{className:v(je("xs"),"text-fg-secondary"),children:h(D.file.size)}),D.error&&n.jsxs("div",{className:v("flex","items-center",m("xs","gap"),m("xs","mt")),children:[n.jsx(ws,{className:v("h-3","w-3","text-fg-error")}),n.jsx("span",{className:v(je("xs"),"text-fg-error"),children:D.error})]}),c&&D.progress!==void 0&&n.jsx("div",{className:v(m("sm","mt")),children:n.jsx(Ns,{value:D.progress,size:"sm"})})]}),!D.error&&!c&&n.jsx(mr,{className:v("h-5","w-5","text-fg-success")}),n.jsx(Q,{variant:"ghost",size:"sm",onClick:T=>{T.stopPropagation(),A(D.id)},className:`h-auto ${m("xs","p")}`,"aria-label":`Remove ${D.file.name}`,children:n.jsx(Ce,{className:"h-4 w-4"})})]},D.id))})]})}function Ds({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:b=""}){const[g,x]=l.useState(s),w=l.useRef(null),y=l.useRef(null),[h,j]=l.useState({top:0,left:0}),N=l.useId(),k=r!==void 0,$=k?r:g;Sr($);const S=l.useCallback(()=>{if(!w.current||!y.current)return;const L=w.current.getBoundingClientRect(),D=y.current.getBoundingClientRect(),T=window.scrollY,R=window.scrollX;let _=0,V=0;o.startsWith("top")?(_=L.top+T-D.height-8,o==="top-start"?V=L.left+R:o==="top-end"?V=L.right+R-D.width:V=L.left+R+(L.width-D.width)/2):o.startsWith("bottom")?(_=L.bottom+T+8,o==="bottom-start"?V=L.left+R:o==="bottom-end"?V=L.right+R-D.width:V=L.left+R+(L.width-D.width)/2):o.startsWith("left")?(V=L.left+R-D.width-8,o==="left-start"?_=L.top+T:o==="left-end"?_=L.bottom+T-D.height:_=L.top+T+(L.height-D.height)/2):o.startsWith("right")&&(V=L.right+R+8,o==="right-start"?_=L.top+T:o==="right-end"?_=L.bottom+T-D.height:_=L.top+T+(L.height-D.height)/2);const B=8;_=Math.max(B,Math.min(_,window.innerHeight+T-D.height-B)),V=Math.max(B,Math.min(V,window.innerWidth+R-D.width-B)),j({top:_,left:V})},[o]);l.useEffect(()=>{if($){S();const L=()=>S(),D=()=>S();return window.addEventListener("resize",L),window.addEventListener("scroll",D,!0),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",D,!0)}}},[$,o,S]),l.useEffect(()=>{$&&y.current&&setTimeout(S,0)},[$,S]);const I=l.useCallback(L=>{k||x(L),a==null||a(L)},[k,a]),C=l.useCallback(()=>{I(!1)},[I]);l.useEffect(()=>{if($&&d){const L=D=>{D.key==="Escape"&&C()};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)}},[$,d,C]),l.useEffect(()=>{if($&&u){const L=D=>{y.current&&w.current&&!y.current.contains(D.target)&&!w.current.contains(D.target)&&C()};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)}},[$,u,C]);const A=$?n.jsxs("div",{ref:y,className:`
67
67
  absolute
68
- ${xe("popover")}
68
+ ${he("popover")}
69
69
  bg-surface-overlay
70
70
  ${U("lg")}
71
71
  ${fe("lg")}
@@ -75,7 +75,7 @@ React keys must be passed directly to JSX without using spread:
75
75
  max-w-96
76
76
  ${ye("base")}
77
77
  ${b}
78
- `,style:{top:`${x.top}px`,left:`${x.left}px`},role:"dialog","aria-modal":"false","aria-labelledby":c?N:void 0,children:[(c||i)&&n.jsxs("div",{className:`
78
+ `,style:{top:`${h.top}px`,left:`${h.left}px`},role:"dialog","aria-modal":"false","aria-labelledby":c?N:void 0,children:[(c||i)&&n.jsxs("div",{className:`
79
79
  flex
80
80
  items-center
81
81
  justify-between
@@ -86,7 +86,7 @@ React keys must be passed directly to JSX without using spread:
86
86
  `,children:[c&&n.jsx("h3",{id:N,className:`${re("bodySmall")} ${ze("h5")} text-fg-primary`,children:c}),i&&n.jsx(Q,{variant:"ghost",size:"sm",onClick:C,className:`h-auto ${m("xs","p")}`,"aria-label":"Close popover",children:n.jsx(Ce,{className:"h-4 w-4"})})]}),n.jsx("div",{className:`
87
87
  ${m("base","p")}
88
88
  ${c||i?"":m("md","p")}
89
- `,children:t})]}):null;return n.jsxs("div",{className:`inline-block ${f}`,children:[n.jsx("div",{ref:w,className:p,onClick:()=>I(!$),children:e}),typeof window!="undefined"&&Ye.createPortal(A,document.body)]})}function bu({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,b]=l.useState(12),[h,g]=l.useState(0),[w,v]=l.useState("AM"),x=e!==void 0,j=x?e:d,N=l.useCallback(R=>{if(!R)return{hours:12,minutes:0,amPm:"AM"};if(r==="24h"){const[_,V]=R.split(":").map(Number);return{hours:_||12,minutes:V||0,amPm:"AM"}}else{const _=R.match(/(\d+):(\d+)\s*(AM|PM)/i);return _?{hours:parseInt(_[1]),minutes:parseInt(_[2]),amPm:_[3].toUpperCase()}:{hours:12,minutes:0,amPm:"AM"}}},[r]),k=(R,_,V)=>{if(r==="24h")return`${String(R).padStart(2,"0")}:${String(_).padStart(2,"0")}`;{const B=V==="PM"&&R!==12?R+12:V==="AM"&&R===12?0:R;return`${String(B===0?12:B>12?B-12:B).padStart(2,"0")}:${String(_).padStart(2,"0")} ${V||"AM"}`}};l.useEffect(()=>{if(j){const R=N(j);b(R.hours),g(R.minutes),v(R.amPm)}},[j,N]);const $=R=>{const _=r==="24h"?Math.max(0,Math.min(23,R)):Math.max(1,Math.min(12,R));b(_);const V=k(_,h,r==="12h"?w:void 0);x||f(V),s==null||s(V)},S=R=>{const _=Math.max(0,Math.min(59,R));g(_);const V=k(p,_,r==="12h"?w:void 0);x||f(V),s==null||s(V)},I=()=>{const R=w==="AM"?"PM":"AM";v(R);const _=k(p,h,R);x||f(_),s==null||s(_)},C=()=>{if(r==="24h")$((p+1)%24);else{const R=p===12?1:p+1;$(R)}},A=()=>{if(r==="24h")$(p===0?23:p-1);else{const R=p===1?12:p-1;$(R)}},F=()=>{S((h+1)%60)},D=()=>{S(h===0?59:h-1)},T=n.jsx("div",{className:`${m("base","p")} min-w-48`,children:n.jsxs("div",{className:`flex items-center justify-center ${m("base","gap")}`,children:[n.jsxs("div",{className:`flex flex-col items-center ${m("sm","gap")}`,children:[n.jsx(Q,{variant:"ghost",size:"sm",onClick:C,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(Q,{variant:"ghost",size:"sm",onClick:A,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 ${m("sm","gap")}`,children:[n.jsx(Q,{variant:"ghost",size:"sm",onClick:F,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(Q,{variant:"ghost",size:"sm",onClick:D,disabled:a,"aria-label":"Decrement minutes",children:"↓"})]}),r==="12h"&&n.jsxs("div",{className:`flex flex-col ${m("sm","gap")} ${m("sm","ml")}`,children:[n.jsx(Q,{variant:w==="AM"?"primary":"outline",size:"sm",onClick:()=>I(),disabled:a,children:"AM"}),n.jsx(Q,{variant:w==="PM"?"primary":"outline",size:"sm",onClick:()=>I(),disabled:a,children:"PM"})]})]})});return n.jsx("div",{className:u,children:n.jsx(Ds,{trigger:n.jsx(Ee,{label:o,value:j||k(p,h,r==="12h"?w:void 0),readOnly:!0,disabled:a,error:i,helperText:c,leftIcon:n.jsx(fc,{className:"h-4 w-4"}),className:"cursor-pointer"}),placement:"bottom-start",showCloseButton:!0,title:"Select Time",children:T})})}function hu({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,b]=l.useState({r:0,g:0,b:0}),h=e!==void 0,g=h?e:d,w=S=>{const I=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(S);return I?{r:parseInt(I[1],16),g:parseInt(I[2],16),b:parseInt(I[3],16)}:{r:0,g:0,b:0}},v=(S,I,C)=>"#"+[S,I,C].map(A=>{const F=A.toString(16);return F.length===1?"0"+F:F}).join("");l.useEffect(()=>{if(g){const S=w(g);b(S)}},[g]);const x=S=>{const I=S.target.value;(/^#[0-9A-F]{6}$/i.test(I)||I==="")&&(h||f(I),s==null||s(I),I&&b(w(I)))},j=(S,I)=>{const C=P(M({},p),{[S]:Math.max(0,Math.min(255,I))});b(C);const A=v(C.r,C.g,C.b);h||f(A),s==null||s(A)},k=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#808080","#ffa500"],$=n.jsxs("div",{className:`${m("base","p")} min-w-[280px]`,children:[n.jsx("div",{className:`
89
+ `,children:t})]}):null;return n.jsxs("div",{className:`inline-block ${f}`,children:[n.jsx("div",{ref:w,className:p,onClick:()=>I(!$),children:e}),typeof window!="undefined"&&Ye.createPortal(A,document.body)]})}function hu({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,b]=l.useState(12),[g,x]=l.useState(0),[w,y]=l.useState("AM"),h=e!==void 0,j=h?e:d,N=l.useCallback(R=>{if(!R)return{hours:12,minutes:0,amPm:"AM"};if(r==="24h"){const[_,V]=R.split(":").map(Number);return{hours:_||12,minutes:V||0,amPm:"AM"}}else{const _=R.match(/(\d+):(\d+)\s*(AM|PM)/i);return _?{hours:parseInt(_[1]),minutes:parseInt(_[2]),amPm:_[3].toUpperCase()}:{hours:12,minutes:0,amPm:"AM"}}},[r]),k=(R,_,V)=>{if(r==="24h")return`${String(R).padStart(2,"0")}:${String(_).padStart(2,"0")}`;{const B=V==="PM"&&R!==12?R+12:V==="AM"&&R===12?0:R;return`${String(B===0?12:B>12?B-12:B).padStart(2,"0")}:${String(_).padStart(2,"0")} ${V||"AM"}`}};l.useEffect(()=>{if(j){const R=N(j);b(R.hours),x(R.minutes),y(R.amPm)}},[j,N]);const $=R=>{const _=r==="24h"?Math.max(0,Math.min(23,R)):Math.max(1,Math.min(12,R));b(_);const V=k(_,g,r==="12h"?w:void 0);h||f(V),s==null||s(V)},S=R=>{const _=Math.max(0,Math.min(59,R));x(_);const V=k(p,_,r==="12h"?w:void 0);h||f(V),s==null||s(V)},I=()=>{const R=w==="AM"?"PM":"AM";y(R);const _=k(p,g,R);h||f(_),s==null||s(_)},C=()=>{if(r==="24h")$((p+1)%24);else{const R=p===12?1:p+1;$(R)}},A=()=>{if(r==="24h")$(p===0?23:p-1);else{const R=p===1?12:p-1;$(R)}},L=()=>{S((g+1)%60)},D=()=>{S(g===0?59:g-1)},T=n.jsx("div",{className:`${m("base","p")} min-w-48`,children:n.jsxs("div",{className:`flex items-center justify-center ${m("base","gap")}`,children:[n.jsxs("div",{className:`flex flex-col items-center ${m("sm","gap")}`,children:[n.jsx(Q,{variant:"ghost",size:"sm",onClick:C,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(Q,{variant:"ghost",size:"sm",onClick:A,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 ${m("sm","gap")}`,children:[n.jsx(Q,{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(g).padStart(2,"0")}),n.jsx(Q,{variant:"ghost",size:"sm",onClick:D,disabled:a,"aria-label":"Decrement minutes",children:"↓"})]}),r==="12h"&&n.jsxs("div",{className:`flex flex-col ${m("sm","gap")} ${m("sm","ml")}`,children:[n.jsx(Q,{variant:w==="AM"?"primary":"outline",size:"sm",onClick:()=>I(),disabled:a,children:"AM"}),n.jsx(Q,{variant:w==="PM"?"primary":"outline",size:"sm",onClick:()=>I(),disabled:a,children:"PM"})]})]})});return n.jsx("div",{className:u,children:n.jsx(Ds,{trigger:n.jsx(Ee,{label:o,value:j||k(p,g,r==="12h"?w:void 0),readOnly:!0,disabled:a,error:i,helperText:c,leftIcon:n.jsx(mc,{className:"h-4 w-4"}),className:"cursor-pointer"}),placement:"bottom-start",showCloseButton:!0,title:"Select Time",children:T})})}function xu({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,b]=l.useState({r:0,g:0,b:0}),g=e!==void 0,x=g?e:d,w=S=>{const I=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(S);return I?{r:parseInt(I[1],16),g:parseInt(I[2],16),b:parseInt(I[3],16)}:{r:0,g:0,b:0}},y=(S,I,C)=>"#"+[S,I,C].map(A=>{const L=A.toString(16);return L.length===1?"0"+L:L}).join("");l.useEffect(()=>{if(x){const S=w(x);b(S)}},[x]);const h=S=>{const I=S.target.value;(/^#[0-9A-F]{6}$/i.test(I)||I==="")&&(g||f(I),s==null||s(I),I&&b(w(I)))},j=(S,I)=>{const C=F(M({},p),{[S]:Math.max(0,Math.min(255,I))});b(C);const A=y(C.r,C.g,C.b);g||f(A),s==null||s(A)},k=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#808080","#ffa500"],$=n.jsxs("div",{className:`${m("base","p")} min-w-[280px]`,children:[n.jsx("div",{className:`
90
90
  w-full
91
91
  h-32
92
92
  ${U("md")}
@@ -94,7 +94,7 @@ React keys must be passed directly to JSX without using spread:
94
94
  ${m("base","mb")}
95
95
  border
96
96
  border-line-default
97
- `,style:{backgroundColor:g}}),n.jsxs("div",{className:`${m("md","space-y")} ${m("base","mb")}`,children:[n.jsxs("div",{children:[n.jsxs("label",{className:`block text-xs font-medium text-fg-secondary ${m("xs","mb")}`,children:["Red: ",p.r]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.r,onChange:S=>j("r",parseInt(S.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:`block text-xs font-medium text-fg-secondary ${m("xs","mb")}`,children:["Green: ",p.g]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.g,onChange:S=>j("g",parseInt(S.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:`block text-xs font-medium text-fg-secondary ${m("xs","mb")}`,children:["Blue: ",p.b]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.b,onChange:S=>j("b",parseInt(S.target.value)),disabled:i,className:"w-full"})]})]}),o&&n.jsx("div",{className:m("base","mb"),children:n.jsx(Ee,{label:"Hex",value:g,onChange:x,disabled:i,placeholder:"#000000",className:"font-mono"})}),k.length>0&&n.jsxs("div",{children:[n.jsx("label",{className:`block text-xs font-medium text-fg-secondary ${m("sm","mb")}`,children:"Presets"}),n.jsx("div",{className:`grid grid-cols-10 ${m("xs","gap")}`,children:k.map((S,I)=>n.jsx("button",{type:"button",onClick:()=>{i||(h||f(S),s==null||s(S),b(w(S)))},disabled:i,className:`
97
+ `,style:{backgroundColor:x}}),n.jsxs("div",{className:`${m("md","space-y")} ${m("base","mb")}`,children:[n.jsxs("div",{children:[n.jsxs("label",{className:`block text-xs font-medium text-fg-secondary ${m("xs","mb")}`,children:["Red: ",p.r]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.r,onChange:S=>j("r",parseInt(S.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:`block text-xs font-medium text-fg-secondary ${m("xs","mb")}`,children:["Green: ",p.g]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.g,onChange:S=>j("g",parseInt(S.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:`block text-xs font-medium text-fg-secondary ${m("xs","mb")}`,children:["Blue: ",p.b]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.b,onChange:S=>j("b",parseInt(S.target.value)),disabled:i,className:"w-full"})]})]}),o&&n.jsx("div",{className:m("base","mb"),children:n.jsx(Ee,{label:"Hex",value:x,onChange:h,disabled:i,placeholder:"#000000",className:"font-mono"})}),k.length>0&&n.jsxs("div",{children:[n.jsx("label",{className:`block text-xs font-medium text-fg-secondary ${m("sm","mb")}`,children:"Presets"}),n.jsx("div",{className:`grid grid-cols-10 ${m("xs","gap")}`,children:k.map((S,I)=>n.jsx("button",{type:"button",onClick:()=>{i||(g||f(S),s==null||s(S),b(w(S)))},disabled:i,className:`
98
98
  w-6
99
99
  h-6
100
100
  ${U("sm")}
@@ -102,7 +102,7 @@ React keys must be passed directly to JSX without using spread:
102
102
  border-line-emphasis
103
103
  hover:scale-110
104
104
  ${fe("sm")}
105
- ${g.toLowerCase()===S.toLowerCase()?"ring-2 ring-offset-1 ring-line-brand":""}
105
+ ${x.toLowerCase()===S.toLowerCase()?"ring-2 ring-offset-1 ring-line-brand":""}
106
106
  `,style:{backgroundColor:S},"aria-label":`Select color ${S}`},I))})]})]});return n.jsx("div",{className:u,children:n.jsx(Ds,{trigger:n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[c&&n.jsx("label",{className:"text-sm font-medium text-fg-secondary",children:c}),n.jsx("div",{className:`
107
107
  w-10
108
108
  h-10
@@ -112,21 +112,21 @@ React keys must be passed directly to JSX without using spread:
112
112
  ${fe("sm")}
113
113
  cursor-pointer
114
114
  ${i?"opacity-50 cursor-not-allowed":""}
115
- `,style:{backgroundColor:g}}),o&&n.jsx(Ee,{value:g,onChange:x,disabled:i,placeholder:"#000000",className:"w-24 font-mono"})]}),placement:"bottom-start",showCloseButton:!0,title:"Pick a Color",children:$})})}const io=l.createContext(void 0);function xu({children:e,value:t}){return n.jsx(io.Provider,{value:t,children:e})}function gu(){const e=l.useContext(io);if(!e)throw new Error("Drawer components must be used within Drawer");return e}const vu='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function lo(e){return Array.from(e.querySelectorAll(vu)).filter(t=>!t.disabled&&t.offsetParent!==null)}function _s(e,t){l.useEffect(()=>{if(!t)return;function r(s){if(s.key!=="Tab")return;const a=e.current;if(!a)return;const o=lo(a);if(o.length===0){s.preventDefault();return}const i=o[0],c=o[o.length-1],u=document.activeElement;if(!a.contains(u)){s.preventDefault(),(s.shiftKey?c:i).focus();return}s.shiftKey?u===i&&(s.preventDefault(),c.focus()):u===c&&(s.preventDefault(),i.focus())}return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[t,e])}function Fs(e,t){l.useEffect(()=>{if(!t)return;const r=setTimeout(()=>{const s=e.current;if(!s)return;const a=lo(s);if(a.length>0){a[0].focus();return}s.hasAttribute("tabindex")||s.setAttribute("tabindex","-1"),s.focus()},0);return()=>clearTimeout(r)},[t,e])}function Ls({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:b,closeOnEscape:h}=gu(),g=l.useRef(null);if(Sr(u),_s(g,u),Fs(g,u),l.useEffect(()=>{if(u&&h){const j=N=>{N.key==="Escape"&&d()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)}},[u,h,d]),l.useEffect(()=>{if(u)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[u]),l.useEffect(()=>{},[u,s,a,c]),!u)return null;const w={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"},x=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`
115
+ `,style:{backgroundColor:x}}),o&&n.jsx(Ee,{value:x,onChange:h,disabled:i,placeholder:"#000000",className:"w-24 font-mono"})]}),placement:"bottom-start",showCloseButton:!0,title:"Pick a Color",children:$})})}const lo=l.createContext(void 0);function vu({children:e,value:t}){return n.jsx(lo.Provider,{value:t,children:e})}function yu(){const e=l.useContext(lo);if(!e)throw new Error("Drawer components must be used within Drawer");return e}const wu='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function co(e){return Array.from(e.querySelectorAll(wu)).filter(t=>!t.disabled&&t.offsetParent!==null)}function _s(e,t){l.useEffect(()=>{if(!t)return;function r(s){if(s.key!=="Tab")return;const a=e.current;if(!a)return;const o=co(a);if(o.length===0){s.preventDefault();return}const i=o[0],c=o[o.length-1],u=document.activeElement;if(!a.contains(u)){s.preventDefault(),(s.shiftKey?c:i).focus();return}s.shiftKey?u===i&&(s.preventDefault(),c.focus()):u===c&&(s.preventDefault(),i.focus())}return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[t,e])}function Ls(e,t){l.useEffect(()=>{if(!t)return;const r=setTimeout(()=>{const s=e.current;if(!s)return;const a=co(s);if(a.length>0){a[0].focus();return}s.hasAttribute("tabindex")||s.setAttribute("tabindex","-1"),s.focus()},0);return()=>clearTimeout(r)},[t,e])}function Fs({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:b,closeOnEscape:g}=yu(),x=l.useRef(null);if(Sr(u),_s(x,u),Ls(x,u),l.useEffect(()=>{if(u&&g){const j=N=>{N.key==="Escape"&&d()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)}},[u,g,d]),l.useEffect(()=>{if(u)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[u]),l.useEffect(()=>{},[u,s,a,c]),!u)return null;const w={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"},y={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"},h=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`
116
116
  fixed
117
117
  inset-0
118
118
  bg-scrim
119
- ${xe("modal")}
119
+ ${he("modal")}
120
120
  ${ye("base")}
121
121
  ${u?"opacity-100":"opacity-0"}
122
- `,onClick:b?d:void 0,"aria-hidden":"true"}),n.jsxs("div",{ref:g,className:`
122
+ `,onClick:b?d:void 0,"aria-hidden":"true"}),n.jsxs("div",{ref:x,className:`
123
123
  fixed
124
- ${v[f]}
124
+ ${y[f]}
125
125
  ${w[p]}
126
126
  ${f==="left"||f==="right"?"max-w-[90vw]":"max-h-[90vh]"}
127
127
  bg-surface-overlay
128
128
  ${fe("xl")}
129
- ${xe("modal")}
129
+ ${he("modal")}
130
130
  ${ye("base")}
131
131
  flex
132
132
  flex-col
@@ -139,12 +139,12 @@ React keys must be passed directly to JSX without using spread:
139
139
  ${m("md","py")}
140
140
  border-b
141
141
  border-line-default
142
- `,children:[s?n.jsx("h2",{id:i,className:"text-lg font-semibold text-fg-primary",children:s}):n.jsx("span",{}),r&&n.jsx(Q,{variant:"ghost",size:"sm",onClick:d,className:`h-auto ${m("xs","p")}`,"aria-label":"Close drawer",children:n.jsx(Ce,{className:"h-4 w-4"})})]}),e]})]});return typeof window!="undefined"?Ye.createPortal(x,document.body):null}function co(s){var a=s,{children:e,className:t=""}=a,r=z(a,["children","className"]);return n.jsx("div",P(M({className:`
142
+ `,children:[s?n.jsx("h2",{id:i,className:"text-lg font-semibold text-fg-primary",children:s}):n.jsx("span",{}),r&&n.jsx(Q,{variant:"ghost",size:"sm",onClick:d,className:`h-auto ${m("xs","p")}`,"aria-label":"Close drawer",children:n.jsx(Ce,{className:"h-4 w-4"})})]}),e]})]});return typeof window!="undefined"?Ye.createPortal(h,document.body):null}function uo(s){var a=s,{children:e,className:t=""}=a,r=z(a,["children","className"]);return n.jsx("div",F(M({className:`
143
143
  ${m("lg","p")}
144
144
  border-b
145
145
  border-line-default
146
146
  ${t}
147
- `},r),{children:e}))}function uo(s){var a=s,{children:e,className:t=""}=a,r=z(a,["children","className"]);return n.jsx("div",P(M({className:`
147
+ `},r),{children:e}))}function fo(s){var a=s,{children:e,className:t=""}=a,r=z(a,["children","className"]);return n.jsx("div",F(M({className:`
148
148
  ${m("lg","p")}
149
149
  border-t
150
150
  border-line-default
@@ -152,9 +152,9 @@ React keys must be passed directly to JSX without using spread:
152
152
  justify-end
153
153
  ${m("sm","gap")}
154
154
  ${t}
155
- `},r),{children:e}))}function Yt({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,b=g=>{f||d(g),s==null||s(g)},h=()=>{b(!1)};return n.jsx(xu,{value:{isOpen:p,closeDrawer:h,position:a,size:o,closeOnOverlayClick:i,closeOnEscape:c},children:e})}Yt.Content=Ls;Yt.Header=co;Yt.Footer=uo;const fo=l.createContext(void 0);function yu({children:e,value:t}){return n.jsx(fo.Provider,{value:t,children:e})}function Ps(){const e=l.useContext(fo);if(!e)throw new Error("Menu components must be used within Menu");return e}function wu(...e){return t=>{for(const r of e)r&&(typeof r=="function"?r(t):r.current=t)}}const Os=l.forwardRef(function(i,o){var c=i,{children:t,asChild:r,onClick:s}=c,a=z(c,["children","asChild","onClick"]);var h,g;const{isOpen:u,setIsOpen:d}=Ps(),f=w=>{s==null||s(w),d(!u)},p=l.Children.count(t)===1&&l.isValidElement(t);if(r===!0||r===void 0&&p){const w=l.Children.only(t),v=w.props.onClick,x=j=>{v==null||v(j),j.defaultPrevented||f(j)};return l.cloneElement(w,P(M({},a),{role:(h=w.props.role)!=null?h:"button",tabIndex:(g=w.props.tabIndex)!=null?g:0,"aria-haspopup":"menu","aria-expanded":u,onClick:x,ref:wu(o,w.props.ref)}))}return n.jsx("div",P(M({ref:o,onClick:f,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":u},a),{children:t}))});Os.displayName="MenuTrigger";function mo({children:e,className:t="",align:r="start"}){const{isOpen:s,closeMenu:a,placement:o}=Ps(),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 g=c.current.getBoundingClientRect(),w=i.current.getBoundingClientRect(),v=window.scrollY,x=window.scrollX;let j=0,N=0;o==="bottom"?(j=g.bottom+v+4,r==="start"?N=g.left+x:r==="end"?N=g.right+x-w.width:N=g.left+x+(g.width-w.width)/2):o==="top"?(j=g.top+v-w.height-4,r==="start"?N=g.left+x:r==="end"?N=g.right+x-w.width:N=g.left+x+(g.width-w.width)/2):o==="right"?(N=g.right+x+4,r==="start"?j=g.top+v:r==="end"?j=g.bottom+v-w.height:j=g.top+v+(g.height-w.height)/2):o==="left"&&(N=g.left+x-w.width-4,r==="start"?j=g.top+v:r==="end"?j=g.bottom+v-w.height:j=g.top+v+(g.height-w.height)/2);const k=8;j=Math.max(k,Math.min(j,window.innerHeight+v-w.height-k)),N=Math.max(k,Math.min(N,window.innerWidth+x-w.width-k)),d({top:j,left:N})};p();const b=()=>p(),h=()=>p();return window.addEventListener("resize",b),window.addEventListener("scroll",h,!0),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",h,!0)}}},[s,o,r]),l.useEffect(()=>{if(s){const p=b=>{b.key==="Escape"&&a()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)}},[s,a]),l.useEffect(()=>{if(s){const p=b=>{i.current&&c.current&&!i.current.contains(b.target)&&!c.current.contains(b.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:`
155
+ `},r),{children:e}))}function Yt({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,b=x=>{f||d(x),s==null||s(x)},g=()=>{b(!1)};return n.jsx(vu,{value:{isOpen:p,closeDrawer:g,position:a,size:o,closeOnOverlayClick:i,closeOnEscape:c},children:e})}Yt.Content=Fs;Yt.Header=uo;Yt.Footer=fo;const mo=l.createContext(void 0);function ku({children:e,value:t}){return n.jsx(mo.Provider,{value:t,children:e})}function Ps(){const e=l.useContext(mo);if(!e)throw new Error("Menu components must be used within Menu");return e}function ju(...e){return t=>{for(const r of e)r&&(typeof r=="function"?r(t):r.current=t)}}const Os=l.forwardRef(function(i,o){var c=i,{children:t,asChild:r,onClick:s}=c,a=z(c,["children","asChild","onClick"]);var g,x;const{isOpen:u,setIsOpen:d}=Ps(),f=w=>{s==null||s(w),d(!u)},p=l.Children.count(t)===1&&l.isValidElement(t);if(r===!0||r===void 0&&p){const w=l.Children.only(t),y=w.props.onClick,h=j=>{y==null||y(j),j.defaultPrevented||f(j)};return l.cloneElement(w,F(M({},a),{role:(g=w.props.role)!=null?g:"button",tabIndex:(x=w.props.tabIndex)!=null?x:0,"aria-haspopup":"menu","aria-expanded":u,onClick:h,ref:ju(o,w.props.ref)}))}return n.jsx("div",F(M({ref:o,onClick:f,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":u},a),{children:t}))});Os.displayName="MenuTrigger";function po({children:e,className:t="",align:r="start"}){const{isOpen:s,closeMenu:a,placement:o}=Ps(),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(),w=i.current.getBoundingClientRect(),y=window.scrollY,h=window.scrollX;let j=0,N=0;o==="bottom"?(j=x.bottom+y+4,r==="start"?N=x.left+h:r==="end"?N=x.right+h-w.width:N=x.left+h+(x.width-w.width)/2):o==="top"?(j=x.top+y-w.height-4,r==="start"?N=x.left+h:r==="end"?N=x.right+h-w.width:N=x.left+h+(x.width-w.width)/2):o==="right"?(N=x.right+h+4,r==="start"?j=x.top+y:r==="end"?j=x.bottom+y-w.height:j=x.top+y+(x.height-w.height)/2):o==="left"&&(N=x.left+h-w.width-4,r==="start"?j=x.top+y:r==="end"?j=x.bottom+y-w.height:j=x.top+y+(x.height-w.height)/2);const k=8;j=Math.max(k,Math.min(j,window.innerHeight+y-w.height-k)),N=Math.max(k,Math.min(N,window.innerWidth+h-w.width-k)),d({top:j,left:N})};p();const b=()=>p(),g=()=>p();return window.addEventListener("resize",b),window.addEventListener("scroll",g,!0),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",g,!0)}}},[s,o,r]),l.useEffect(()=>{if(s){const p=b=>{b.key==="Escape"&&a()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)}},[s,a]),l.useEffect(()=>{if(s){const p=b=>{i.current&&c.current&&!i.current.contains(b.target)&&!c.current.contains(b.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:`
156
156
  absolute
157
- ${xe("popover")}
157
+ ${he("popover")}
158
158
  bg-surface-overlay
159
159
  ${U("md")}
160
160
  ${fe("lg")}
@@ -163,7 +163,7 @@ React keys must be passed directly to JSX without using spread:
163
163
  min-w-40
164
164
  ${m("xs","py")}
165
165
  ${t}
166
- `,style:{top:`${u.top}px`,left:`${u.left}px`},children:e});return typeof window!="undefined"?Ye.createPortal(f,document.body):null}const zs=l.forwardRef(function(p,f){var b=p,{children:t,icon:r,rightIcon:s,disabled:a=!1,onClick:o,onSelect:i,hasSubmenu:c=!1,className:u=""}=b,d=z(b,["children","icon","rightIcon","disabled","onClick","onSelect","hasSubmenu","className"]);const{closeMenu:h}=Ps(),g=v=>{a||(o==null||o(v),i==null||i(v),!c&&!v.defaultPrevented&&h())},w=v=>{a||(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),g(v))};return n.jsxs("div",P(M({ref:f,role:"menuitem",tabIndex:a?-1:0,"aria-disabled":a,onClick:g,onKeyDown:w,className:`
166
+ `,style:{top:`${u.top}px`,left:`${u.left}px`},children:e});return typeof window!="undefined"?Ye.createPortal(f,document.body):null}const zs=l.forwardRef(function(p,f){var b=p,{children:t,icon:r,rightIcon:s,disabled:a=!1,onClick:o,onSelect:i,hasSubmenu:c=!1,className:u=""}=b,d=z(b,["children","icon","rightIcon","disabled","onClick","onSelect","hasSubmenu","className"]);const{closeMenu:g}=Ps(),x=y=>{a||(o==null||o(y),i==null||i(y),!c&&!y.defaultPrevented&&g())},w=y=>{a||(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),x(y))};return n.jsxs("div",F(M({ref:f,role:"menuitem",tabIndex:a?-1:0,"aria-disabled":a,onClick:x,onKeyDown:w,className:`
167
167
  flex
168
168
  items-center
169
169
  ${m("sm","gap")}
@@ -178,17 +178,17 @@ React keys must be passed directly to JSX without using spread:
178
178
  focus:outline-none
179
179
  ${a?"opacity-50 cursor-not-allowed":""}
180
180
  ${u}
181
- `},d),{children:[r&&n.jsx("span",{className:"shrink-0",children:r}),n.jsx("span",{className:"flex-1",children:t}),c&&n.jsx(yt,{className:"h-4 w-4 text-fg-secondary shrink-0"}),s&&!c&&n.jsx("span",{className:"shrink-0",children:s})]}))});zs.displayName="MenuItem";function po(r){var s=r,{className:e=""}=s,t=z(s,["className"]);return n.jsx("div",M({role:"separator",className:`
181
+ `},d),{children:[r&&n.jsx("span",{className:"shrink-0",children:r}),n.jsx("span",{className:"flex-1",children:t}),c&&n.jsx(yt,{className:"h-4 w-4 text-fg-secondary shrink-0"}),s&&!c&&n.jsx("span",{className:"shrink-0",children:s})]}))});zs.displayName="MenuItem";function bo(r){var s=r,{className:e=""}=s,t=z(s,["className"]);return n.jsx("div",M({role:"separator",className:`
182
182
  h-px
183
183
  bg-line-default
184
184
  ${m("sm","my")}
185
185
  ${e}
186
- `},t))}function qt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,placement:a="bottom"}){const[o,i]=l.useState(r),c=t!==void 0,u=c?t:o,d=p=>{c||i(p),s==null||s(p)},f=()=>{d(!1)};return n.jsx(yu,{value:{isOpen:u,setIsOpen:d,closeMenu:f,placement:a},children:e})}qt.Trigger=Os;qt.Content=mo;qt.Item=zs;qt.Separator=po;function ku({items:e,type:t="single",defaultOpen:r,onValueChange:s,className:a=""}){const o=()=>r===void 0?[]:Array.isArray(r)?r:[r],[i,c]=l.useState(o),u=d=>{var p;if((p=e.find(b=>b.id===d))!=null&&p.disabled)return;let f;t==="single"?f=i.includes(d)?[]:[d]:f=i.includes(d)?i.filter(b=>b!==d):[...i,d],c(f),s==null||s(t==="single"?f[0]||"":f)};return n.jsx("div",{className:`${m("xs","space-y")} ${a}`,children:e.map(d=>{const f=i.includes(d.id),p=d.disabled;return n.jsxs("div",{className:y("border border-line-default",U("md"),"overflow-hidden",d.className),children:[n.jsxs("button",{type:"button",onClick:()=>u(d.id),disabled:p,className:y("w-full flex items-center justify-between",m("base","px"),m("md","py"),ue("label"),"text-left text-fg-primary bg-surface-base hover:bg-surface-hover","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-line-focus",ye("base"),p?"opacity-50 cursor-not-allowed":"cursor-pointer",d.triggerClassName),"aria-expanded":f,"aria-controls":`accordion-content-${d.id}`,"aria-disabled":p,children:[n.jsx("span",{children:d.title}),n.jsx($r,{className:`
186
+ `},t))}function qt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,placement:a="bottom"}){const[o,i]=l.useState(r),c=t!==void 0,u=c?t:o,d=p=>{c||i(p),s==null||s(p)},f=()=>{d(!1)};return n.jsx(ku,{value:{isOpen:u,setIsOpen:d,closeMenu:f,placement:a},children:e})}qt.Trigger=Os;qt.Content=po;qt.Item=zs;qt.Separator=bo;function Nu({items:e,type:t="single",defaultOpen:r,onValueChange:s,className:a=""}){const o=()=>r===void 0?[]:Array.isArray(r)?r:[r],[i,c]=l.useState(o),u=d=>{var p;if((p=e.find(b=>b.id===d))!=null&&p.disabled)return;let f;t==="single"?f=i.includes(d)?[]:[d]:f=i.includes(d)?i.filter(b=>b!==d):[...i,d],c(f),s==null||s(t==="single"?f[0]||"":f)};return n.jsx("div",{className:`${m("xs","space-y")} ${a}`,children:e.map(d=>{const f=i.includes(d.id),p=d.disabled;return n.jsxs("div",{className:v("border border-line-default",U("md"),"overflow-hidden",d.className),children:[n.jsxs("button",{type:"button",onClick:()=>u(d.id),disabled:p,className:v("w-full flex items-center justify-between",m("base","px"),m("md","py"),ue("label"),"text-left text-fg-primary bg-surface-base hover:bg-surface-hover","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-line-focus",ye("base"),p?"opacity-50 cursor-not-allowed":"cursor-pointer",d.triggerClassName),"aria-expanded":f,"aria-controls":`accordion-content-${d.id}`,"aria-disabled":p,children:[n.jsx("span",{children:d.title}),n.jsx($r,{className:`
187
187
  ${m("sm","ml")}
188
188
  ${ye("base")}
189
189
  ${f?"transform rotate-180":""}
190
190
  ${p?"opacity-50":""}
191
- `,"aria-hidden":"true"})]}),n.jsx("div",{id:`accordion-content-${d.id}`,className:y("grid",ye("base"),f?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),"aria-hidden":!f,children:n.jsx("div",{className:"min-h-0 overflow-hidden",children:n.jsx("div",{className:y(m("base","px"),m("md","py"),"text-fg-secondary",d.contentClassName),children:d.content})})})]},d.id)})})}const bo=l.createContext(void 0);function ms({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(b=>{i||o(b),r==null||r(b)},[i,r]),d=l.useCallback(()=>{u(!c)},[c,u]),f=l.useCallback(()=>{u(!0)},[u]),p=l.useCallback(()=>{u(!1)},[u]);return n.jsx(bo.Provider,{value:{isMobileMenuOpen:c,toggleMobileMenu:d,setMobileMenuOpen:u,openMobileMenu:f,closeMobileMenu:p},children:e})}function Vs(){const e=l.useContext(bo);if(!e)throw new Error("useHeaderContext must be used within HeaderProvider");return e}function ho(a){var o=a,{children:e,className:t,href:r}=o,s=z(o,["children","className","href"]);return n.jsx("div",{className:"flex-shrink-0",children:n.jsx(Cr,P(M({href:r||"/",variant:"default",className:y("flex items-center font-semibold text-lg",t)},s),{children:e}))})}function xo({children:e,className:t}){return n.jsx("nav",{className:y("flex-1 flex items-center justify-center",m("base","gap"),"hidden md:flex",t),"aria-label":"Main navigation",children:e})}function go({children:e,className:t}){return n.jsx("div",{className:y("flex-shrink-0 flex items-center",m("sm","gap"),t),children:e})}function vo({className:e,icon:t,closeIcon:r,variant:s="ghost",size:a="md"}){const{isMobileMenuOpen:o,toggleMobileMenu:i}=Vs(),c=t||n.jsx(Ic,{className:"h-5 w-5"}),u=r||n.jsx(Ce,{className:"h-5 w-5"});return n.jsx(Q,{variant:s,size:a,onClick:i,className:y("md:hidden",e),"aria-label":o?"Close menu":"Open menu","aria-expanded":o,children:o?u:c})}function yo({children:e,className:t}){const{isMobileMenuOpen:r,closeMobileMenu:s}=Vs();return n.jsx(Yt,{open:r,onOpenChange:a=>{a||s()},position:"left",size:"sm",closeOnOverlayClick:!0,closeOnEscape:!0,children:n.jsx(Ls,{className:y(m("base","p"),t),children:n.jsx("nav",{className:`flex flex-col ${m("sm","gap")}`,"aria-label":"Mobile navigation",children:e})})})}const ju={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"},ut=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=z(d,["className","maxWidth","paddingX","paddingY","center","children"]);return n.jsx("div",P(M({ref:c,className:y("w-full",ju[t],m(r,"px"),m(s,"py"),a&&"mx-auto",e)},i),{children:o}))});ut.displayName="Container";const Ft=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=z(d,["className","spacing","align","justify","direction","children"]);const f=a==="column"?m(t,"gap-y"):m(t,"gap-x"),p={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},b={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsx("div",P(M({ref:c,className:y("flex",a==="column"?"flex-col":"flex-row",f,p[r],b[s],e)},i),{children:o}))});Ft.displayName="Stack";const Nu=he(y("w-full","bg-surface-base","transition-shadow","transition-colors"),{variants:{variant:{default:"",elevated:fe("sm"),bordered:y("border-b","border-line-muted")}},defaultVariants:{variant:"default"}});function jt(c){var u=c,{children:e,variant:t="default",sticky:r=!1,maxWidth:s="full",bare:a=!1,className:o}=u,i=z(u,["children","variant","sticky","maxWidth","bare","className"]);const d=n.jsx("div",{className:`flex items-center justify-between ${m("base","gap")}`,children:e});return a?n.jsx(ms,{children:n.jsx("div",P(M({className:y(o)},i),{children:d}))}):n.jsx(ms,{children:n.jsx("header",P(M({className:y(Nu({variant:t}),r&&`sticky top-0 ${xe("sticky")}`,r&&"backdrop-blur-sm bg-surface-base/95",o)},i),{children:n.jsx(ut,{maxWidth:s,paddingX:"base",paddingY:"sm",children:d})}))})}jt.Logo=ho;jt.Navigation=xo;jt.Actions=go;jt.Hamburger=vo;jt.MobileMenu=yo;const Hn=he(y("flex","items-center",m("sm","gap")),{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 Su(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=z(d,["items","orientation","variant","className","aria-label","bare","pathname"]);const f=i!=null?i:typeof window!="undefined"?window.location.pathname:void 0,p=l.useMemo(()=>e.map(h=>{if(h.active!==void 0)return h;if(f){const g=f===h.href||h.href!=="/"&&f.startsWith(`${h.href}/`);return P(M({},h),{active:g})}return P(M({},h),{active:!1})}),[e,f]),b=n.jsx(n.Fragment,{children:p.map((h,g)=>{const w=r==="pills"?"background":r==="tabs"?"underline":"default";return n.jsxs(Cr,{href:h.href,active:h.active,disabled:h.disabled,variant:w,className:y("flex items-center",m("sm","gap"),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||g)})});return o?n.jsx("div",P(M({className:y(Hn({orientation:t,variant:r}),s)},c),{children:b})):n.jsx("nav",P(M({className:y(Hn({orientation:t,variant:r}),s),"aria-label":a},c),{children:b}))}function wo(e){return n.jsx(Su,P(M({},e),{pathname:e.pathname}))}const $u=he(y("w-full","flex","flex-col",m("sm","gap")),{variants:{variant:{default:y(m("base","mb")),compact:y(m("sm","mb"))}},defaultVariants:{variant:"default"}});function ko(c){var u=c,{title:e,description:t,breadcrumb:r,actions:s,variant:a="default",className:o}=u,i=z(u,["title","description","breadcrumb","actions","variant","className"]);return n.jsxs("div",P(M({className:y($u({variant:a}),o)},i),{children:[r&&r.length>0&&n.jsx(Ya,{items:r}),n.jsxs("div",{className:`flex items-start justify-between ${m("base","gap")}`,children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx($e,{variant:"heading",as:"h1",className:`${m("sm","mb")} text-2xl font-bold`,children:e}),t&&n.jsx($e,{variant:"body",className:"text-fg-secondary",children:t})]}),s&&n.jsx("div",{className:`flex items-center ${m("sm","gap")} flex-shrink-0`,children:s})]})]}))}function Cu(s){var a=s,{onForgotPasswordClick:e,className:t}=a,r=z(a,["onForgotPasswordClick","className"]);return n.jsx("div",{className:y(m("base","p"),"bg-surface-muted",U("md"),t),children:n.jsxs("form",P(M({},r),{onSubmit:o=>{o.preventDefault(),r.onSubmit&&r.onSubmit(o)},className:m("base","space-y"),children:[n.jsxs("div",{className:m("sm","space-y"),children:[n.jsx(Dt,{htmlFor:"login-email",variant:"required",children:"Your email"}),n.jsx(Ee,{id:"login-email",placeholder:"myname@email.com",type:"email"})]}),n.jsxs("div",{className:m("sm","space-y"),children:[n.jsx(Dt,{htmlFor:"login-password",variant:"required",children:"Your password"}),n.jsx(Ee,{id:"login-password",placeholder:"••••••••",type:"password"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx(Q,{variant:"secondary",type:"button",onClick:e,children:"Forgot password?"}),n.jsx(Q,{variant:"primary",type:"submit",children:"Sign in"})]})]}))})}function Eu(d){var f=d,{isOpen:e,onClose:t,title:r,children:s,variant:a="default",showCloseButton:o=!0,footer:i,className:c=""}=f,u=z(f,["isOpen","onClose","title","children","variant","showCloseButton","footer","className"]);const p=l.useRef(null);if(Sr(e),_s(p,e),Fs(p,e),l.useEffect(()=>{if(!e)return;const x=j=>{j.key==="Escape"&&t()};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[e,t]),l.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const b=["fixed","inset-0",xe("modal"),"overflow-y-auto"],h=["fixed","inset-0","bg-scrim","transition-opacity"],g={default:"max-w-md",large:"max-w-2xl",fullscreen:"max-w-full h-full"},w=["relative","bg-surface-overlay",U("lg"),fe("xl"),m("xl","my"),"mx-auto",g[a],m("lg","p"),c].filter(Boolean).join(" "),v=n.jsxs("div",{className:b.join(" "),role:"dialog","aria-modal":"true","aria-labelledby":r?"modal-title":void 0,onClick:x=>{x.target===x.currentTarget&&t()},children:[n.jsx("div",{className:h.join(" "),"aria-hidden":"true"}),n.jsx("div",{className:`flex min-h-full items-center justify-center ${m("base","p")}`,children:n.jsxs("div",P(M({ref:p,tabIndex:-1,className:w,onClick:x=>x.stopPropagation()},u),{children:[r&&n.jsxs("div",{className:`flex justify-between items-center ${m("base","mb")}`,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(Ce,{className:"h-6 w-6"})})]}),!r&&o&&n.jsx("div",{className:`flex justify-end ${m("base","mb")}`,children:n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Ce,{className:"h-6 w-6"})})}),n.jsx("div",{className:m("base","mb"),children:s}),i&&n.jsx("div",{className:`flex justify-end ${m("sm","gap")} ${m("base","mt")}`,children:i})]}))})]});return typeof window!="undefined"?Ye.createPortal(v,document.body):v}const Lr=Va({displayName:"TableContext",errorMessage:"useTableContext must be used within a Table component"}),Mu=Lr.Context,Tu=Lr.Provider;function Ve(){return Lr.useContextRequired()}function Au(){return Lr.useContextOptional()}function ps({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:b,onSort:h,defaultSortColumn:g,defaultSortDirection:w="asc",filters:v,filterValues:x,onFilter:j,initialFilterValues:N={},selectable:k=!1,selectedRows:$,onSelectionChange:S,rowId:I,actions:C,emptyMessage:A="No data available",emptyStateTitle:F,emptyStateMessage:D,emptyStateIllustration:T,emptyStateAction:R,onRowClick:_,resizable:V=!1,columnWidths:B,onColumnResize:X,virtualScrolling:Z,virtualScrollingOptions:oe,children:H}){const L=l.useMemo(()=>s||(i!==void 0&&c?"server":"client"),[s,i,c]),Y=a!==void 0,[ee,J]=l.useState(1),[te,ae]=l.useState(d),O=Y?a:ee,W=o!=null?o:te,q=l.useMemo(()=>L==="server"?i!=null?i:0:t.length,[L,i,t.length]),ce=l.useMemo(()=>Math.ceil(q/W),[q,W]),ie=p!==void 0,[pe,we]=l.useState(g||""),[Ae,Xo]=l.useState(w),St=ie?p:pe,Jt=ie?b||"asc":Ae,Gr=x!==void 0,[Jo,Zo]=l.useState(N),Zt=Gr?x:Jo,Kr=$!==void 0,[Qo,ei]=l.useState([]),_e=Kr?$:Qo,Qt=l.useMemo(()=>!v||v.length===0?t:t.filter(se=>v.every(me=>{const ke=Zt[me.key];if(!ke||ke==="")return!0;const tr=se[me.key];return me.type==="text"?String(tr||"").toLowerCase().includes(String(ke).toLowerCase()):String(tr)===String(ke)})),[t,v,Zt]),Yr=l.useMemo(()=>{if(ie&&h||!St)return Qt;const se=[...Qt];return se.sort((me,ke)=>{const tr=me[St],ni=ke[St],gn=String(tr||"").localeCompare(String(ni||""));return Jt==="asc"?gn:-gn}),se},[Qt,St,Jt,h,ie]),We=l.useMemo(()=>{if(L==="server")return Yr;const se=(O-1)*W,me=se+W;return Yr.slice(se,me)},[Yr,L,O,W]),$t=l.useCallback((se,me)=>{var ke;return I?I(se):((ke=se==null?void 0:se.id)==null?void 0:ke.toString())||me.toString()},[I]),er=l.useMemo(()=>!k||We.length===0?!1:We.every((se,me)=>{const ke=$t(se,me);return _e.includes(ke)}),[k,We,_e,$t]),dn=l.useMemo(()=>{if(!k)return!1;const se=_e.length;return se>0&&se<We.length},[k,_e.length,We.length]),Ct=l.useCallback(se=>{Y?c==null||c(se):J(se)},[Y,c]),un=l.useCallback(se=>{u?u(se):ae(se),Ct(1)},[u,Ct]),fn=l.useCallback((se,me)=>{ie?h==null||h(se,me):(we(se),Xo(me))},[ie,h]),mn=l.useCallback(se=>{Gr?j==null||j(se):Zo(se),Ct(1)},[Gr,j,Ct]),ht=l.useCallback(se=>{Kr?S==null||S(se):ei(se)},[Kr,S]),pn=l.useCallback(se=>{const me=_e.includes(se)?_e.filter(ke=>ke!==se):[..._e,se];ht(me)},[_e,ht]),bn=l.useCallback(()=>{if(er)ht([]);else{const se=We.map((me,ke)=>$t(me,ke));ht(se)}},[er,We,$t,ht]),[ti,ri]=l.useState({}),qr=B!==void 0,hn=qr?B:ti,xn=l.useCallback((se,me)=>{qr?X==null||X(se,me):ri(ke=>P(M({},ke),{[se]:me}))},[qr,X]),si=l.useMemo(()=>({columns:e,data:t,paginatedData:We,loading:r,paginationState:{page:O,pageSize:W,total:q,totalPages:ce},sortState:{column:St,direction:Jt},filterState:{values:Zt,config:v||[]},selectionState:{selectedRows:_e,isAllSelected:er,isIndeterminate:dn},paginationMode:L,selectable:k,rowId:I,actions:C,resizable:V,columnWidths:hn,virtualScrolling:Z,virtualScrollingOptions:oe,emptyMessage:A,emptyStateTitle:F,emptyStateMessage:D,emptyStateIllustration:T,emptyStateAction:R,setPage:Ct,setPageSize:un,setSorting:fn,setFilters:mn,setSelection:ht,toggleRowSelection:pn,toggleSelectAll:bn,getRowId:$t,setColumnWidth:xn,onPageChange:c,onPageSizeChange:u,onSort:h,onFilter:j,onSelectionChange:S,onRowClick:_,onColumnResize:X}),[e,t,We,r,O,W,q,ce,St,Jt,Zt,v,_e,er,dn,L,k,I,C,A,F,D,T,R,Ct,un,fn,mn,ht,pn,bn,$t,xn,c,u,h,j,S,_,X,V,hn,Z,oe]);return n.jsx(Tu,{value:si,children:H})}function Ws(u){var d=u,{column:e,resizable:t=!1,width:r,onResize:s,minWidth:a=50,maxWidth:o,className:i=""}=d,c=z(d,["column","resizable","width","onResize","minWidth","maxWidth","className"]);const{sortState:f,setSorting:p,onSort:b}=Ve(),h=l.useRef(null),g=l.useRef(null),w=l.useRef(null),v=()=>{if(!e.sortable||!b&&!p)return;const S=f.column===e.key&&f.direction==="asc"?"desc":"asc";b?b(e.key,S):p(e.key,S)},x=S=>{k&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),v())},j=S=>{if(S.preventDefault(),S.stopPropagation(),!g.current||!s)return;const I=r||g.current.offsetWidth;w.current={x:S.clientX,width:I};const C=F=>{if(!w.current)return;const D=F.clientX-w.current.x,T=w.current.width+D,R=Math.max(a,o?Math.min(T,o):T);s(e.key,R)},A=()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",A),w.current=null};document.addEventListener("mousemove",C),document.addEventListener("mouseup",A)},N=f.column===e.key,k=e.sortable&&(b||p),$=N?f.direction:void 0;return n.jsx("th",P(M({ref:g,scope:"col",role:"columnheader","aria-sort":N?$==="asc"?"ascending":"descending":k?"none":void 0,className:`${m("lg","px")} ${m("md","py")} text-left text-xs font-medium text-fg-tertiary uppercase tracking-wider ${k?"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:k?v:void 0,onKeyDown:k?x:void 0,tabIndex:k?0:void 0,style:r?{width:`${r}px`,minWidth:`${r}px`}:void 0},c),{children:n.jsxs("div",{className:`flex items-center ${m("sm","gap")} relative`,children:[n.jsx("span",{children:e.label}),N&&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 Hs(r){var s=r,{className:e=""}=s,t=z(s,["className"]);const{columns:a,selectable:o,selectionState:i,toggleSelectAll:c,actions:u,resizable:d,columnWidths:f,setColumnWidth:p}=Ve();return n.jsxs("tr",P(M({role:"row",className:e},t),{children:[o&&n.jsx("th",{scope:"col",role:"columnheader",className:`${m("lg","px")} ${m("md","py")} w-12`,"aria-label":"Select all",children:n.jsx(Mr,{checked:i.isAllSelected,onChange:c,"aria-label":"Select all rows",className:m("none","my"),indeterminate:i.isIndeterminate})}),a.map(b=>n.jsx(Ws,{column:b,resizable:d,width:f==null?void 0:f[b.key],onResize:p},b.key)),u&&n.jsx("th",{scope:"col",role:"columnheader",className:`${m("lg","px")} ${m("md","py")} 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 Bs(r){var s=r,{className:e=""}=s,t=z(s,["className"]);return Ve(),n.jsx("thead",P(M({className:`bg-surface-subtle sticky top-0 ${xe("sticky")} ${e}`},t),{children:n.jsx(Hs,{})}))}function Us(a){var o=a,{column:e,row:t,className:r=""}=o,s=z(o,["column","row","className"]);const i=e.key in t?t[e.key]:void 0;return n.jsx("td",P(M({className:`${m("lg","px")} ${m("base","py")} 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 Ru(o){var i=o,{actions:e,row:t,align:r="right",className:s=""}=i,a=z(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(M({className:`inline-flex ${s}`},a),{children:n.jsx(Ja,{trigger:n.jsx(Q,{variant:"ghost",size:"sm","aria-label":"Row actions",className:`h-8 w-8 ${m("none","p")}`,children:n.jsx(gc,{className:"h-4 w-4"})}),items:c,align:r})}))}function Gs(a){var o=a,{row:e,align:t="right",className:r=""}=o,s=z(o,["row","align","className"]);const{actions:i}=Ve();if(!i)return null;const c=i(e);return c.length===0?null:n.jsx(Ru,M({row:e,actions:c,align:t,className:r},s))}function xr(i){var c=i,{row:e,rowIndex:t,className:r="",onClick:s,style:a}=c,o=z(c,["row","rowIndex","className","onClick","style"]);const{columns:u,selectable:d,selectionState:f,toggleRowSelection:p,getRowId:b,actions:h,onRowClick:g}=Ve(),w=b(e,t),v=f.selectedRows.includes(w),x=j=>{s&&s(j),g&&g(e)};return n.jsxs("tr",P(M({role:"row","aria-selected":d?v:void 0,"aria-rowindex":t+1,className:`hover:bg-surface-hover ${v?"bg-surface-selected":""} ${r}`,onClick:x,style:a},o),{children:[d&&n.jsx("td",{className:`${m("lg","px")} ${m("base","py")}`,children:n.jsx(Mr,{checked:v,onChange:()=>p(w),"aria-label":`Select row ${w}`,className:m("none","my")})}),u.map(j=>n.jsx(Us,{column:j,row:e},String(j.key))),h&&n.jsx("td",{className:`${m("lg","px")} ${m("base","py")} text-right`,children:n.jsx(Gs,{row:e})})]}))}function Ks(r){var s=r,{className:e=""}=s,t=z(s,["className"]);const{emptyMessage:a,emptyStateTitle:o,emptyStateMessage:i,emptyStateIllustration:c,emptyStateAction:u}=Ve();return o||i||c?n.jsxs("div",P(M({className:e},t),{children:[n.jsx(Xa,{title:o||"No data available",message:i||a||"No data available",variant:c?"withIllustration":"default",illustration:c}),u&&n.jsx("div",{className:`${m("base","mt")} flex justify-center`,children:u})]})):n.jsx("div",P(M({className:`text-center text-fg-secondary ${e}`},t),{children:a||"No data available"}))}function jo(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((w,v)=>({index:v,start:v*r,end:(v+1)*r,size:r}));const b=Math.max(0,Math.floor(i/r)-a),h=s?Math.min(e.length,Math.ceil((i+s)/r)+a):e.length,g=[];for(let w=b;w<h;w++)g.push({index:w,start:w*r,end:(w+1)*r,size:r});return g},[e,r,i,s,a,o]),f=e.length*r;return l.useEffect(()=>{if(!o||!u.current)return;const b=u.current,h=()=>{c(b.scrollTop)};return b.addEventListener("scroll",h,{passive:!0}),()=>b.removeEventListener("scroll",h)},[o]),{virtualItems:d,totalHeight:f,scrollOffset:i,setScrollOffset:c,scrollToIndex:b=>{if(!u.current)return;const h=b*r;u.current.scrollTop=h,c(h)},containerRef:u}}function Ys(s){var a=s,{children:e,className:t=""}=a,r=z(a,["children","className"]);var w,v;const{paginatedData:o,loading:i,columns:c,selectable:u,actions:d,virtualScrolling:f,virtualScrollingOptions:p}=Ve(),b=c.length+(u?1:0)+(d?1:0),h=jo(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}),g=l.useMemo(()=>f&&h.virtualItems.length>0?h.virtualItems.map(x=>({row:o[x.index],index:x.index})).filter(x=>x.row!==void 0):o.map((x,j)=>({row:x,index:j})),[f,h.virtualItems,o]);return i?n.jsx("tbody",P(M({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:Array.from({length:5}).map((x,j)=>n.jsx("tr",{children:Array.from({length:b}).map((N,k)=>n.jsx("td",{className:`${m("lg","px")} ${m("base","py")}`,children:n.jsx(Fa,{className:"h-4 w-full"})},k))},j))})):o.length===0?n.jsx("tbody",P(M({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:n.jsx("tr",{children:n.jsx("td",{colSpan:b,className:`${m("lg","px")} ${m("3xl","py")}`,children:n.jsx(Ks,{})})})})):typeof e=="function"?n.jsx("tbody",P(M({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:o.map((x,j)=>e(x,j))})):n.jsx("tbody",P(M({className:`bg-surface-base divide-y divide-line-default ${t}`,role:"rowgroup"},r),{children:f&&h.virtualItems.length>0&&g.length>0?n.jsxs(n.Fragment,{children:[((w=h.virtualItems[0])==null?void 0:w.start)>0&&n.jsx("tr",{style:{height:h.virtualItems[0].start},"aria-hidden":"true",children:n.jsx("td",{colSpan:b})}),g.map(({row:x,index:j})=>n.jsx(xr,{row:x,rowIndex:j},j)),h.virtualItems.length>0&&n.jsx("tr",{style:{height:Math.max(0,h.totalHeight-(((v=h.virtualItems[h.virtualItems.length-1])==null?void 0:v.end)||0))},"aria-hidden":"true",children:n.jsx("td",{colSpan:b})})]}):g.map(({row:x,index:j})=>n.jsx(xr,{row:x,rowIndex:j},j))}))}function Iu(i){var c=i,{filters:e,onFilter:t,initialValues:r={},showClearAll:s=!0,className:a=""}=c,o=z(c,["filters","onFilter","initialValues","showClearAll","className"]);const[u,d]=l.useState(r),[f,p]=l.useState(!1),b=Object.values(u).some(x=>x!==""&&x!==null&&x!==void 0),h=(x,j)=>{const N=P(M({},u),{[x]:j});d(N),t(N)},g=()=>{const x={};e.forEach(j=>{x[j.key]=""}),d(x),t(x)},w=x=>{const j=P(M({},u),{[x]:""});d(j),t(j)},v=Object.values(u).filter(x=>x!==""&&x!==null&&x!==void 0).length;return n.jsx("div",P(M({className:`bg-surface-base border-b border-line-default ${a}`},o),{children:n.jsxs("div",{className:`${m("base","px")} ${m("md","py")} sm:${m("lg","px")}`,children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("button",{type:"button",onClick:()=>p(!f),className:`flex items-center ${m("sm","gap")} text-sm font-medium text-fg-secondary hover:text-fg-primary`,children:[n.jsx($c,{className:"h-4 w-4"}),n.jsx("span",{children:"Filters"}),v>0&&n.jsx("span",{className:`inline-flex items-center ${m("sm","px")} ${m("0.5","py")} rounded text-xs font-medium bg-surface-brand-muted text-fg-brand-emphasis`,children:v})]}),b&&s&&n.jsx(Q,{variant:"ghost",size:"sm",onClick:g,className:"text-sm",children:"Clear all"})]}),f&&n.jsx("div",{className:`${m("base","mt")} grid grid-cols-1 ${m("base","gap")} sm:grid-cols-2 lg:grid-cols-3`,children:e.map(x=>{const j=u[x.key],N=j==null?"":String(j);return n.jsxs("div",{className:m("xs","space-y"),children:[n.jsx(Dt,{htmlFor:`filter-${x.key}`,variant:"optional",children:x.label}),n.jsxs("div",{className:"relative",children:[x.type==="text"&&n.jsx(Ee,{id:`filter-${x.key}`,type:"text",value:N,onChange:k=>h(x.key,k.target.value),placeholder:x.placeholder||`Filter by ${x.label.toLowerCase()}`,size:"sm",variant:"outlined"}),x.type==="select"&&n.jsxs("div",{className:"relative",children:[n.jsx(Er,{id:`filter-${x.key}`,options:[{value:"",label:`All ${x.label}`},...x.options||[]],value:N,onChange:k=>h(x.key,k.target.value)}),N&&n.jsx("button",{type:"button",onClick:()=>w(x.key),className:"absolute right-8 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${x.label} filter`,children:n.jsx(Ce,{className:"h-4 w-4"})})]}),x.type==="date"&&n.jsx(Ee,{id:`filter-${x.key}`,type:"date",value:N,onChange:k=>h(x.key,k.target.value),size:"sm",variant:"outlined"}),N&&x.type!=="select"&&n.jsx("button",{type:"button",onClick:()=>w(x.key),className:"absolute right-2 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${x.label} filter`,children:n.jsx(Ce,{className:"h-4 w-4"})})]})]},x.key)})})]})}))}function qs(s){var a=s,{showClearAll:e=!0,className:t=""}=a,r=z(a,["showClearAll","className"]);const{filterState:o,setFilters:i}=Ve();return o.config.length===0?null:n.jsx(Iu,M({filters:o.config,onFilter:i,initialValues:o.values,showClearAll:e,className:t},r))}function Du(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=z(p,["page","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showPageInfo","className"]);const b=Math.ceil(r/t),h=r===0?0:(e-1)*t+1,g=Math.min(e*t,r),w=()=>{e>1&&s(e-1)},v=()=>{e<b&&s(e+1)},x=()=>{e>1&&s(1)},j=()=>{e<b&&s(b)};return n.jsxs("div",P(M({className:`flex items-center justify-between ${m("base","px")} ${m("md","py")} bg-surface-base border-t border-line-default sm:${m("lg","px")} ${u}`},d),{children:[n.jsxs("div",{className:"flex flex-1 justify-between sm:hidden",children:[n.jsx(Q,{variant:"outline",size:"sm",onClick:w,disabled:e===1,children:"Previous"}),n.jsx(Q,{variant:"outline",size:"sm",onClick:v,disabled:e>=b,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($e,{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:g})," of"," ",n.jsx("span",{className:"font-medium",children:r})," results"]})}),n.jsxs("div",{className:`flex items-center ${m("base","gap")}`,children:[i&&n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[n.jsx($e,{as:"span",className:"text-sm text-fg-secondary",children:"Show:"}),n.jsx(Er,{"aria-label":"Items per page",options:o.map(N=>({value:N.toString(),label:N.toString()})),value:t.toString(),onChange:N=>{const k=parseInt(N.target.value);a(k),s(1)},className:"w-20"})]}),n.jsxs("nav",{className:`flex items-center ${m("xs","gap")}`,"aria-label":"Pagination",children:[n.jsxs(Q,{variant:"ghost",size:"sm",onClick:x,disabled:e===1,"aria-label":"First page",children:[n.jsx(Gt,{className:"h-4 w-4"}),n.jsx(Gt,{className:"h-4 w-4 -ml-2"})]}),n.jsx(Q,{variant:"ghost",size:"sm",onClick:w,disabled:e===1,"aria-label":"Previous page",children:n.jsx(Gt,{className:"h-4 w-4"})}),n.jsx("div",{className:`flex items-center ${m("xs","gap")}`,children:Array.from({length:Math.min(5,b)},(N,k)=>{let $;return b<=5||e<=3?$=k+1:e>=b-2?$=b-4+k:$=e-2+k,n.jsx(Q,{variant:e===$?"primary":"ghost",size:"sm",onClick:()=>s($),className:"min-w-10","aria-label":`Page ${$}`,"aria-current":e===$?"page":void 0,children:$},$)})}),n.jsx(Q,{variant:"ghost",size:"sm",onClick:v,disabled:e>=b,"aria-label":"Next page",children:n.jsx(yt,{className:"h-4 w-4"})}),n.jsxs(Q,{variant:"ghost",size:"sm",onClick:j,disabled:e>=b,"aria-label":"Last page",children:[n.jsx(yt,{className:"h-4 w-4"}),n.jsx(yt,{className:"h-4 w-4 -ml-2"})]})]})]})]})]}))}function Xs(o){var i=o,{showPageSizeSelector:e=!0,showPageInfo:t=!0,pageSizeOptions:r,className:s=""}=i,a=z(i,["showPageSizeSelector","showPageInfo","pageSizeOptions","className"]);const{paginationState:c,setPage:u,setPageSize:d,paginationMode:f}=Ve();return f==="client"&&c.totalPages<=1?null:n.jsx(Du,M({page:c.page,pageSize:c.pageSize,total:c.total,onPageChange:u,onPageSizeChange:d,pageSizeOptions:r,showPageSizeSelector:e,showPageInfo:t,className:s},a))}function Me(e){const c=e,{className:t="","aria-label":r,"aria-labelledby":s}=c,a=z(c,["className","aria-label","aria-labelledby"]),o="children"in e&&e.children!==void 0,i=o?a:_u(a);return o?n.jsx("div",{className:`bg-surface-base shadow ${U("lg")} overflow-hidden ${t}`,children:n.jsx(ps,P(M({},i),{children:e.children}))}):n.jsx("div",{className:`bg-surface-base shadow ${U("lg")} overflow-hidden ${t}`,children:n.jsxs(ps,P(M({},i),{children:[i.filters&&i.filters.length>0&&n.jsx(qs,{}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-line-default",role:"table","aria-label":r,"aria-labelledby":s,"aria-rowcount":i.total||i.data.length,"aria-colcount":i.columns.length+(i.selectable?1:0)+(i.actions?1:0),children:[n.jsx(Bs,{}),n.jsx(Ys,{})]})}),n.jsx(Xs,{})]}))})}function _u(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:b,filters:h,selectable:g,selectedRows:w,onSelectionChange:v,rowId:x,actions:j,onRowClick:N,paginationMode:k,defaultPageSize:$,resizable:S,columnWidths:I,onColumnResize:C,virtualScrolling:A,virtualScrollingOptions:F}=e;let D=k||"auto";return D==="auto"&&(D=b&&b.total!==void 0?"server":"client"),{columns:t,data:r,loading:s,paginationMode:D,page:b==null?void 0:b.page,pageSize:b==null?void 0:b.pageSize,total:b==null?void 0:b.total,onPageChange:b==null?void 0:b.onPageChange,onPageSizeChange:b==null?void 0:b.onPageSizeChange,defaultPageSize:$||(b==null?void 0:b.pageSize)||10,pageSizeOptions:b==null?void 0:b.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:g,selectedRows:w,onSelectionChange:v,rowId:x,actions:j,onRowClick:N,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,resizable:S,columnWidths:I,onColumnResize:C,virtualScrolling:A,virtualScrollingOptions:F,children:n.jsx(n.Fragment,{})}}Me.Header=Bs;Me.HeaderRow=Hs;Me.HeaderCell=Ws;Me.Body=Ys;Me.Row=xr;Me.Cell=Us;Me.Filters=qs;Me.Pagination=Xs;Me.EmptyState=Ks;Me.Actions=Gs;function Fu(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),b=l.useCallback((N,k)=>{const $=Math.max(r,s?Math.min(k,s):k);i(S=>P(M({},S),{[N]:$}))},[r,s]),h=l.useCallback(()=>{i(t)},[t]),g=l.useCallback((N,k,$)=>{a&&(u(!0),f(N),p.current={startX:k,startWidth:$})},[a]),w=l.useCallback(N=>{if(!c||!d||!p.current)return;const k=N-p.current.startX,$=p.current.startWidth+k;b(d,$)},[c,d,b]),v=l.useCallback(()=>{u(!1),f(null),p.current=null},[]),x=l.useRef(void 0),j=l.useRef(void 0);return typeof window!="undefined"&&(x.current=N=>{c&&w(N.clientX)},j.current=()=>{c&&v()},c?(document.addEventListener("mousemove",x.current),document.addEventListener("mouseup",j.current)):(x.current&&document.removeEventListener("mousemove",x.current),j.current&&document.removeEventListener("mouseup",j.current))),{columnWidths:o,setColumnWidth:b,resetColumnWidths:h,isResizing:c,resizingColumn:d,startResize:g,handleResize:w,endResize:v}}const Pr=l.createContext(null);function Lu(){return l.useContext(Pr)}function Xe(){const e=l.useContext(Pr);if(!e)throw new Error("useSideNavbarThemeRequired must be used within SideNavbarThemeProvider");return e}const Rt={variant:"default",navigationWidth:"56px",contentWidth:"320px",animationDuration:300,animationEasing:"ease-in-out"};function Js({children:e,variant:t=Rt.variant,navigationWidth:r=Rt.navigationWidth,contentWidth:s=Rt.contentWidth,animationDuration:a=Rt.animationDuration,animationEasing:o=Rt.animationEasing}){const i=l.useMemo(()=>({variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o}),[t,r,s,a,o]);return n.jsx(Pr.Provider,{value:i,children:e})}const Or=l.createContext(null);function Pu(){return l.useContext(Or)}function Nt(){const e=l.useContext(Or);if(!e)throw new Error("useSideNavbarConfigRequired must be used within SideNavbarConfigProvider");return e}const Ne={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 Zs({children:e,mode:t=Ne.mode,resizable:r=Ne.resizable,minWidth:s=Ne.minWidth,maxWidth:a=Ne.maxWidth,snapPoints:o=Ne.snapPoints,responsive:i=Ne.responsive,mobileBreakpoint:c=Ne.mobileBreakpoint,mobileVariant:u=Ne.mobileVariant,overlayBackdrop:d=Ne.overlayBackdrop,persistState:f=Ne.persistState,persistWidth:p=Ne.persistWidth,storageKey:b=Ne.storageKey,keyboardShortcut:h=Ne.keyboardShortcut,enableKeyboardShortcut:g=Ne.enableKeyboardShortcut}){const w=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:b,keyboardShortcut:h,enableKeyboardShortcut:g}),[t,r,s,a,o,i,c,u,d,f,p,b,h,g]);return n.jsx(Or.Provider,{value:w,children:e})}const zr=l.createContext(null);function Ou(){return l.useContext(zr)}function Je(){const e=l.useContext(zr);if(!e)throw new Error("useSideNavbarStateRequired must be used within SideNavbarStateProvider");return e}function gr(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 zu(e,t){return e===void 0||t===void 0?!0:e<t}function ur(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 Vu=["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(Vu.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 Wu(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 So({initialWidth:e,minWidth:t,maxWidth:r,snapPoints:s,snapThreshold:a=20,onWidthChange:o,enabled:i=!0}){const c=ur(e,t,r),[u,d]=l.useState(c),[f,p]=l.useState(!1),b=l.useRef(0),h=l.useRef(c),g=l.useCallback(j=>{let N=ur(j,t,r);if(s&&s.length>0){const k=s.reduce(($,S)=>{const I=Math.abs(N-S),C=Math.abs(N-$);return I<C?S:$},s[0]);Math.abs(N-k)<=a&&(N=k)}d(N),o==null||o(N)},[t,r,s,a,o]),w=l.useCallback(j=>{if(!i||!f)return;const N=j.clientX-b.current,k=h.current+N;g(k)},[i,f,g]),v=l.useCallback(()=>{i&&(p(!1),b.current=0,h.current=u)},[i,u]),x=l.useCallback(j=>{i&&(j.preventDefault(),j.stopPropagation(),p(!0),b.current=j.clientX,h.current=u)},[i,u]);return l.useEffect(()=>{if(f)return document.addEventListener("mousemove",w),document.addEventListener("mouseup",v),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",v),document.body.style.userSelect="",document.body.style.cursor=""}},[f,w,v]),l.useEffect(()=>{f||d(ur(e,t,r))},[e,t,r,f]),{width:u,isResizing:f,startResize:x,setWidth:g}}function $o({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 Co({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 Eo({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 b=e.length===1?d.key.toLowerCase()===e.toLowerCase():d.key===e,h=t?d.ctrlKey||d.metaKey:!d.ctrlKey&&!d.metaKey,g=r?d.shiftKey:!d.shiftKey,w=s?d.altKey:!d.altKey,v=a?d.metaKey:!d.metaKey,x=t?(d.ctrlKey||d.metaKey)&&!a:h&&v;b&&x&&g&&w&&(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 Qs({children:e,defaultCollapsed:t=!1,collapsed:r,onCollapseChange:s,onWidthChange:a,onMobileChange:o,exclusiveGroups:i=!1}){const c=Xe(),u=Nt(),d=l.useRef(null),f=r!==void 0,p=()=>{if(f)return r;if(u.storageKey&&u.persistState&&typeof window!="undefined"){const _=localStorage.getItem(`${u.storageKey}-collapsed`);if(_!==null)return _==="true"}return t},b=()=>{if(u.storageKey&&u.persistWidth&&typeof window!="undefined"){const _=localStorage.getItem(`${u.storageKey}-width`);if(_!==null){const V=parseInt(_,10);if(!isNaN(V))return V}}return gr(c.contentWidth)},[h,g]=l.useState(p),[w,v]=l.useState({}),{isMobile:x}=$o({mobileBreakpoint:u.mobileBreakpoint,onMobileChange:_=>{o==null||o(_),_&&u.mobileVariant==="collapse"&&!f&&g(!0)},enabled:u.responsive}),{width:j,isResizing:N,startResize:k,setWidth:$}=So({initialWidth:b(),minWidth:u.minWidth,maxWidth:u.maxWidth,snapPoints:u.snapPoints,onWidthChange:_=>{a==null||a(_),u.storageKey&&u.persistWidth&&typeof window!="undefined"&&localStorage.setItem(`${u.storageKey}-width`,String(_))},enabled:u.resizable&&!x});Co({isActive:x&&u.mobileVariant==="overlay"&&!h,containerRef:d,restoreFocus:!0});const S=f?r:h,I=l.useCallback(_=>{f||g(_),s==null||s(_)},[f,s]),C=l.useCallback(()=>{I(!S)},[S,I]),A=No(u.keyboardShortcut);Eo({key:A.key,ctrl:A.ctrl,shift:A.shift,alt:A.alt,meta:A.meta,onTrigger:C,enabled:u.enableKeyboardShortcut});const F=l.useCallback(_=>{$(_)},[$]),D=l.useCallback(_=>{v(i?V=>{const X=V[_]===!1,Z={},oe=new Set([...Object.keys(V),_]);return X?oe.forEach(H=>{Z[H]=!0}):oe.forEach(H=>{Z[H]=H!==_}),Z}:V=>P(M({},V),{[_]:!V[_]}))},[i]),T=l.useCallback((_,V)=>{v(B=>P(M({},B),{[_]:V}))},[]);l.useEffect(()=>{f&&r!==h&&g(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 R=l.useMemo(()=>({collapsed:S,toggle:C,setCollapsed:I,currentWidth:j,setWidth:F,isMobile:x,isResizing:N,startResize:k,groupStates:w,toggleGroup:D,setGroupCollapsed:T,sidebarRef:d}),[S,C,I,j,F,x,N,k,w,D,T]);return n.jsx(zr.Provider,{value:R,children:e})}function en({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:b,mobileVariant:h,overlayBackdrop:g,persistState:w,persistWidth:v,storageKey:x,keyboardShortcut:j,enableKeyboardShortcut:N,defaultCollapsed:k,collapsed:$,onCollapseChange:S,onWidthChange:I,onMobileChange:C,exclusiveGroups:A}){return n.jsx(Js,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,children:n.jsx(Zs,{mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:b,mobileVariant:h,overlayBackdrop:g,persistState:w,persistWidth:v,storageKey:x,keyboardShortcut:j,enableKeyboardShortcut:N,children:n.jsx(Qs,{defaultCollapsed:k,collapsed:$,onCollapseChange:S,onWidthChange:I,onMobileChange:C,exclusiveGroups:A,children:e})})})}const Vr=l.createContext(null);function tn(){return l.useContext(Vr)}function rn(){const e=l.useContext(Vr);if(!e)throw new Error("useSidebarSlotRequired must be used within SidebarSlotProvider");return e}function Mo({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(Vr.Provider,{value:c,children:e})}const Wr=l.createContext(null);function Hu(){return l.useContext(Wr)}function To(){const e=l.useContext(Wr);return e||{showMainToggle:!0,mainTogglePosition:"floating"}}function sn(r){var s=r,{className:e=""}=s,t=z(s,["className"]);const{currentWidth:a,setWidth:o,isResizing:i,startResize:c}=Je(),{resizable:u}=Nt();return u?n.jsxs("div",P(M({className:`
191
+ `,"aria-hidden":"true"})]}),n.jsx("div",{id:`accordion-content-${d.id}`,className:v("grid",ye("base"),f?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),"aria-hidden":!f,children:n.jsx("div",{className:"min-h-0 overflow-hidden",children:n.jsx("div",{className:v(m("base","px"),m("md","py"),"text-fg-secondary",d.contentClassName),children:d.content})})})]},d.id)})})}const go=l.createContext(void 0);function ms({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(b=>{i||o(b),r==null||r(b)},[i,r]),d=l.useCallback(()=>{u(!c)},[c,u]),f=l.useCallback(()=>{u(!0)},[u]),p=l.useCallback(()=>{u(!1)},[u]);return n.jsx(go.Provider,{value:{isMobileMenuOpen:c,toggleMobileMenu:d,setMobileMenuOpen:u,openMobileMenu:f,closeMobileMenu:p},children:e})}function Vs(){const e=l.useContext(go);if(!e)throw new Error("useHeaderContext must be used within HeaderProvider");return e}function ho(a){var o=a,{children:e,className:t,href:r}=o,s=z(o,["children","className","href"]);return n.jsx("div",{className:"flex-shrink-0",children:n.jsx(Cr,F(M({href:r||"/",variant:"default",className:v("flex items-center font-semibold text-lg",t)},s),{children:e}))})}function xo({children:e,className:t}){return n.jsx("nav",{className:v("flex-1 flex items-center justify-center",m("base","gap"),"hidden md:flex",t),"aria-label":"Main navigation",children:e})}function vo({children:e,className:t}){return n.jsx("div",{className:v("flex-shrink-0 flex items-center",m("sm","gap"),t),children:e})}function yo({className:e,icon:t,closeIcon:r,variant:s="ghost",size:a="md"}){const{isMobileMenuOpen:o,toggleMobileMenu:i}=Vs(),c=t||n.jsx(Dc,{className:"h-5 w-5"}),u=r||n.jsx(Ce,{className:"h-5 w-5"});return n.jsx(Q,{variant:s,size:a,onClick:i,className:v("md:hidden",e),"aria-label":o?"Close menu":"Open menu","aria-expanded":o,children:o?u:c})}function wo({children:e,className:t}){const{isMobileMenuOpen:r,closeMobileMenu:s}=Vs();return n.jsx(Yt,{open:r,onOpenChange:a=>{a||s()},position:"left",size:"sm",closeOnOverlayClick:!0,closeOnEscape:!0,children:n.jsx(Fs,{className:v(m("base","p"),t),children:n.jsx("nav",{className:`flex flex-col ${m("sm","gap")}`,"aria-label":"Mobile navigation",children:e})})})}const Su={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"},ut=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=z(d,["className","maxWidth","paddingX","paddingY","center","children"]);return n.jsx("div",F(M({ref:c,className:v("w-full",Su[t],m(r,"px"),m(s,"py"),a&&"mx-auto",e)},i),{children:o}))});ut.displayName="Container";const Lt=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=z(d,["className","spacing","align","justify","direction","children"]);const f=a==="column"?m(t,"gap-y"):m(t,"gap-x"),p={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},b={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsx("div",F(M({ref:c,className:v("flex",a==="column"?"flex-col":"flex-row",f,p[r],b[s],e)},i),{children:o}))});Lt.displayName="Stack";const $u=pe(v("w-full","bg-surface-base","transition-shadow","transition-colors"),{variants:{variant:{default:"",elevated:fe("sm"),bordered:v("border-b","border-line-muted")}},defaultVariants:{variant:"default"}});function jt(c){var u=c,{children:e,variant:t="default",sticky:r=!1,maxWidth:s="full",bare:a=!1,className:o}=u,i=z(u,["children","variant","sticky","maxWidth","bare","className"]);const d=n.jsx("div",{className:`flex items-center justify-between ${m("base","gap")}`,children:e});return a?n.jsx(ms,{children:n.jsx("div",F(M({className:v(o)},i),{children:d}))}):n.jsx(ms,{children:n.jsx("header",F(M({className:v($u({variant:t}),r&&`sticky top-0 ${he("sticky")}`,r&&"backdrop-blur-sm bg-surface-base/95",o)},i),{children:n.jsx(ut,{maxWidth:s,paddingX:"base",paddingY:"sm",children:d})}))})}jt.Logo=ho;jt.Navigation=xo;jt.Actions=vo;jt.Hamburger=yo;jt.MobileMenu=wo;const Hn=pe(v("flex","items-center",m("sm","gap")),{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 Cu(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=z(d,["items","orientation","variant","className","aria-label","bare","pathname"]);const f=i!=null?i:typeof window!="undefined"?window.location.pathname:void 0,p=l.useMemo(()=>e.map(g=>{if(g.active!==void 0)return g;if(f){const x=f===g.href||g.href!=="/"&&f.startsWith(`${g.href}/`);return F(M({},g),{active:x})}return F(M({},g),{active:!1})}),[e,f]),b=n.jsx(n.Fragment,{children:p.map((g,x)=>{const w=r==="pills"?"background":r==="tabs"?"underline":"default";return n.jsxs(Cr,{href:g.href,active:g.active,disabled:g.disabled,variant:w,className:v("flex items-center",m("sm","gap"),t==="vertical"&&"w-full justify-start",g.className),children:[g.icon&&n.jsx("span",{className:"flex-shrink-0","aria-hidden":"true",children:g.icon}),n.jsx("span",{children:g.label}),g.badge&&n.jsx("span",{className:"ml-auto",children:g.badge})]},g.href||x)})});return o?n.jsx("div",F(M({className:v(Hn({orientation:t,variant:r}),s)},c),{children:b})):n.jsx("nav",F(M({className:v(Hn({orientation:t,variant:r}),s),"aria-label":a},c),{children:b}))}function ko(e){return n.jsx(Cu,F(M({},e),{pathname:e.pathname}))}const Eu=pe(v("w-full","flex","flex-col",m("sm","gap")),{variants:{variant:{default:v(m("base","mb")),compact:v(m("sm","mb"))}},defaultVariants:{variant:"default"}});function jo(c){var u=c,{title:e,description:t,breadcrumb:r,actions:s,variant:a="default",className:o}=u,i=z(u,["title","description","breadcrumb","actions","variant","className"]);return n.jsxs("div",F(M({className:v(Eu({variant:a}),o)},i),{children:[r&&r.length>0&&n.jsx(qa,{items:r}),n.jsxs("div",{className:`flex items-start justify-between ${m("base","gap")}`,children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx($e,{variant:"heading",as:"h1",className:`${m("sm","mb")} text-2xl font-bold`,children:e}),t&&n.jsx($e,{variant:"body",className:"text-fg-secondary",children:t})]}),s&&n.jsx("div",{className:`flex items-center ${m("sm","gap")} flex-shrink-0`,children:s})]})]}))}function Mu(s){var a=s,{onForgotPasswordClick:e,className:t}=a,r=z(a,["onForgotPasswordClick","className"]);return n.jsx("div",{className:v(m("base","p"),"bg-surface-muted",U("md"),t),children:n.jsxs("form",F(M({},r),{onSubmit:o=>{o.preventDefault(),r.onSubmit&&r.onSubmit(o)},className:m("base","space-y"),children:[n.jsxs("div",{className:m("sm","space-y"),children:[n.jsx(Dt,{htmlFor:"login-email",variant:"required",children:"Your email"}),n.jsx(Ee,{id:"login-email",placeholder:"myname@email.com",type:"email"})]}),n.jsxs("div",{className:m("sm","space-y"),children:[n.jsx(Dt,{htmlFor:"login-password",variant:"required",children:"Your password"}),n.jsx(Ee,{id:"login-password",placeholder:"••••••••",type:"password"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx(Q,{variant:"secondary",type:"button",onClick:e,children:"Forgot password?"}),n.jsx(Q,{variant:"primary",type:"submit",children:"Sign in"})]})]}))})}function Tu(d){var f=d,{isOpen:e,onClose:t,title:r,children:s,variant:a="default",showCloseButton:o=!0,footer:i,className:c=""}=f,u=z(f,["isOpen","onClose","title","children","variant","showCloseButton","footer","className"]);const p=l.useRef(null);if(Sr(e),_s(p,e),Ls(p,e),l.useEffect(()=>{if(!e)return;const h=j=>{j.key==="Escape"&&t()};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[e,t]),l.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const b=["fixed","inset-0",he("modal"),"overflow-y-auto"],g=["fixed","inset-0","bg-scrim","transition-opacity"],x={default:"max-w-md",large:"max-w-2xl",fullscreen:"max-w-full h-full"},w=["relative","bg-surface-overlay",U("lg"),fe("xl"),m("xl","my"),"mx-auto",x[a],m("lg","p"),c].filter(Boolean).join(" "),y=n.jsxs("div",{className:b.join(" "),role:"dialog","aria-modal":"true","aria-labelledby":r?"modal-title":void 0,onClick:h=>{h.target===h.currentTarget&&t()},children:[n.jsx("div",{className:g.join(" "),"aria-hidden":"true"}),n.jsx("div",{className:`flex min-h-full items-center justify-center ${m("base","p")}`,children:n.jsxs("div",F(M({ref:p,tabIndex:-1,className:w,onClick:h=>h.stopPropagation()},u),{children:[r&&n.jsxs("div",{className:`flex justify-between items-center ${m("base","mb")}`,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(Ce,{className:"h-6 w-6"})})]}),!r&&o&&n.jsx("div",{className:`flex justify-end ${m("base","mb")}`,children:n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Ce,{className:"h-6 w-6"})})}),n.jsx("div",{className:m("base","mb"),children:s}),i&&n.jsx("div",{className:`flex justify-end ${m("sm","gap")} ${m("base","mt")}`,children:i})]}))})]});return typeof window!="undefined"?Ye.createPortal(y,document.body):y}const Fr=Wa({displayName:"TableContext",errorMessage:"useTableContext must be used within a Table component"}),Au=Fr.Context,Ru=Fr.Provider;function Ve(){return Fr.useContextRequired()}function Iu(){return Fr.useContextOptional()}function ps({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:b,onSort:g,defaultSortColumn:x,defaultSortDirection:w="asc",filters:y,filterValues:h,onFilter:j,initialFilterValues:N={},selectable:k=!1,selectedRows:$,onSelectionChange:S,rowId:I,actions:C,emptyMessage:A="No data available",emptyStateTitle:L,emptyStateMessage:D,emptyStateIllustration:T,emptyStateAction:R,onRowClick:_,resizable:V=!1,columnWidths:B,onColumnResize:X,virtualScrolling:Z,virtualScrollingOptions:oe,children:H}){const P=l.useMemo(()=>s||(i!==void 0&&c?"server":"client"),[s,i,c]),Y=a!==void 0,[ee,J]=l.useState(1),[te,ae]=l.useState(d),O=Y?a:ee,W=o!=null?o:te,q=l.useMemo(()=>P==="server"?i!=null?i:0:t.length,[P,i,t.length]),ce=l.useMemo(()=>Math.ceil(q/W),[q,W]),ie=p!==void 0,[be,we]=l.useState(x||""),[Ae,Jo]=l.useState(w),St=ie?p:be,Jt=ie?b||"asc":Ae,Gr=h!==void 0,[Zo,Qo]=l.useState(N),Zt=Gr?h:Zo,Kr=$!==void 0,[ei,ti]=l.useState([]),_e=Kr?$:ei,Qt=l.useMemo(()=>!y||y.length===0?t:t.filter(se=>y.every(me=>{const ke=Zt[me.key];if(!ke||ke==="")return!0;const tr=se[me.key];return me.type==="text"?String(tr||"").toLowerCase().includes(String(ke).toLowerCase()):String(tr)===String(ke)})),[t,y,Zt]),Yr=l.useMemo(()=>{if(ie&&g||!St)return Qt;const se=[...Qt];return se.sort((me,ke)=>{const tr=me[St],ai=ke[St],xn=String(tr||"").localeCompare(String(ai||""));return Jt==="asc"?xn:-xn}),se},[Qt,St,Jt,g,ie]),We=l.useMemo(()=>{if(P==="server")return Yr;const se=(O-1)*W,me=se+W;return Yr.slice(se,me)},[Yr,P,O,W]),$t=l.useCallback((se,me)=>{var ke;return I?I(se):((ke=se==null?void 0:se.id)==null?void 0:ke.toString())||me.toString()},[I]),er=l.useMemo(()=>!k||We.length===0?!1:We.every((se,me)=>{const ke=$t(se,me);return _e.includes(ke)}),[k,We,_e,$t]),dn=l.useMemo(()=>{if(!k)return!1;const se=_e.length;return se>0&&se<We.length},[k,_e.length,We.length]),Ct=l.useCallback(se=>{Y?c==null||c(se):J(se)},[Y,c]),un=l.useCallback(se=>{u?u(se):ae(se),Ct(1)},[u,Ct]),fn=l.useCallback((se,me)=>{ie?g==null||g(se,me):(we(se),Jo(me))},[ie,g]),mn=l.useCallback(se=>{Gr?j==null||j(se):Qo(se),Ct(1)},[Gr,j,Ct]),gt=l.useCallback(se=>{Kr?S==null||S(se):ti(se)},[Kr,S]),pn=l.useCallback(se=>{const me=_e.includes(se)?_e.filter(ke=>ke!==se):[..._e,se];gt(me)},[_e,gt]),bn=l.useCallback(()=>{if(er)gt([]);else{const se=We.map((me,ke)=>$t(me,ke));gt(se)}},[er,We,$t,gt]),[ri,si]=l.useState({}),qr=B!==void 0,gn=qr?B:ri,hn=l.useCallback((se,me)=>{qr?X==null||X(se,me):si(ke=>F(M({},ke),{[se]:me}))},[qr,X]),ni=l.useMemo(()=>({columns:e,data:t,paginatedData:We,loading:r,paginationState:{page:O,pageSize:W,total:q,totalPages:ce},sortState:{column:St,direction:Jt},filterState:{values:Zt,config:y||[]},selectionState:{selectedRows:_e,isAllSelected:er,isIndeterminate:dn},paginationMode:P,selectable:k,rowId:I,actions:C,resizable:V,columnWidths:gn,virtualScrolling:Z,virtualScrollingOptions:oe,emptyMessage:A,emptyStateTitle:L,emptyStateMessage:D,emptyStateIllustration:T,emptyStateAction:R,setPage:Ct,setPageSize:un,setSorting:fn,setFilters:mn,setSelection:gt,toggleRowSelection:pn,toggleSelectAll:bn,getRowId:$t,setColumnWidth:hn,onPageChange:c,onPageSizeChange:u,onSort:g,onFilter:j,onSelectionChange:S,onRowClick:_,onColumnResize:X}),[e,t,We,r,O,W,q,ce,St,Jt,Zt,y,_e,er,dn,P,k,I,C,A,L,D,T,R,Ct,un,fn,mn,gt,pn,bn,$t,hn,c,u,g,j,S,_,X,V,gn,Z,oe]);return n.jsx(Ru,{value:ni,children:H})}function Ws(u){var d=u,{column:e,resizable:t=!1,width:r,onResize:s,minWidth:a=50,maxWidth:o,className:i=""}=d,c=z(d,["column","resizable","width","onResize","minWidth","maxWidth","className"]);const{sortState:f,setSorting:p,onSort:b}=Ve(),g=l.useRef(null),x=l.useRef(null),w=l.useRef(null),y=()=>{if(!e.sortable||!b&&!p)return;const S=f.column===e.key&&f.direction==="asc"?"desc":"asc";b?b(e.key,S):p(e.key,S)},h=S=>{k&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),y())},j=S=>{if(S.preventDefault(),S.stopPropagation(),!x.current||!s)return;const I=r||x.current.offsetWidth;w.current={x:S.clientX,width:I};const C=L=>{if(!w.current)return;const D=L.clientX-w.current.x,T=w.current.width+D,R=Math.max(a,o?Math.min(T,o):T);s(e.key,R)},A=()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",A),w.current=null};document.addEventListener("mousemove",C),document.addEventListener("mouseup",A)},N=f.column===e.key,k=e.sortable&&(b||p),$=N?f.direction:void 0;return n.jsx("th",F(M({ref:x,scope:"col",role:"columnheader","aria-sort":N?$==="asc"?"ascending":"descending":k?"none":void 0,className:`${m("lg","px")} ${m("md","py")} text-left text-xs font-medium text-fg-tertiary uppercase tracking-wider ${k?"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:k?y:void 0,onKeyDown:k?h:void 0,tabIndex:k?0:void 0,style:r?{width:`${r}px`,minWidth:`${r}px`}:void 0},c),{children:n.jsxs("div",{className:`flex items-center ${m("sm","gap")} relative`,children:[n.jsx("span",{children:e.label}),N&&n.jsx("span",{className:"text-fg-tertiary","aria-hidden":"true",children:f.direction==="asc"?"↑":"↓"}),t&&s&&n.jsx("div",{ref:g,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 Hs(r){var s=r,{className:e=""}=s,t=z(s,["className"]);const{columns:a,selectable:o,selectionState:i,toggleSelectAll:c,actions:u,resizable:d,columnWidths:f,setColumnWidth:p}=Ve();return n.jsxs("tr",F(M({role:"row",className:e},t),{children:[o&&n.jsx("th",{scope:"col",role:"columnheader",className:`${m("lg","px")} ${m("md","py")} w-12`,"aria-label":"Select all",children:n.jsx(Mr,{checked:i.isAllSelected,onChange:c,"aria-label":"Select all rows",className:m("none","my"),indeterminate:i.isIndeterminate})}),a.map(b=>n.jsx(Ws,{column:b,resizable:d,width:f==null?void 0:f[b.key],onResize:p},b.key)),u&&n.jsx("th",{scope:"col",role:"columnheader",className:`${m("lg","px")} ${m("md","py")} 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 Bs(r){var s=r,{className:e=""}=s,t=z(s,["className"]);return Ve(),n.jsx("thead",F(M({className:`bg-surface-subtle sticky top-0 ${he("sticky")} ${e}`},t),{children:n.jsx(Hs,{})}))}function Us(a){var o=a,{column:e,row:t,className:r=""}=o,s=z(o,["column","row","className"]);const i=e.key in t?t[e.key]:void 0;return n.jsx("td",F(M({className:`${m("lg","px")} ${m("base","py")} 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 Du(o){var i=o,{actions:e,row:t,align:r="right",className:s=""}=i,a=z(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",F(M({className:`inline-flex ${s}`},a),{children:n.jsx(Za,{trigger:n.jsx(Q,{variant:"ghost",size:"sm","aria-label":"Row actions",className:`h-8 w-8 ${m("none","p")}`,children:n.jsx(vc,{className:"h-4 w-4"})}),items:c,align:r})}))}function Gs(a){var o=a,{row:e,align:t="right",className:r=""}=o,s=z(o,["row","align","className"]);const{actions:i}=Ve();if(!i)return null;const c=i(e);return c.length===0?null:n.jsx(Du,M({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=z(c,["row","rowIndex","className","onClick","style"]);const{columns:u,selectable:d,selectionState:f,toggleRowSelection:p,getRowId:b,actions:g,onRowClick:x}=Ve(),w=b(e,t),y=f.selectedRows.includes(w),h=j=>{s&&s(j),x&&x(e)};return n.jsxs("tr",F(M({role:"row","aria-selected":d?y:void 0,"aria-rowindex":t+1,className:`hover:bg-surface-hover ${y?"bg-surface-selected":""} ${r}`,onClick:h,style:a},o),{children:[d&&n.jsx("td",{className:`${m("lg","px")} ${m("base","py")}`,children:n.jsx(Mr,{checked:y,onChange:()=>p(w),"aria-label":`Select row ${w}`,className:m("none","my")})}),u.map(j=>n.jsx(Us,{column:j,row:e},String(j.key))),g&&n.jsx("td",{className:`${m("lg","px")} ${m("base","py")} text-right`,children:n.jsx(Gs,{row:e})})]}))}function Ks(r){var s=r,{className:e=""}=s,t=z(s,["className"]);const{emptyMessage:a,emptyStateTitle:o,emptyStateMessage:i,emptyStateIllustration:c,emptyStateAction:u}=Ve();return o||i||c?n.jsxs("div",F(M({className:e},t),{children:[n.jsx(Ja,{title:o||"No data available",message:i||a||"No data available",variant:c?"withIllustration":"default",illustration:c}),u&&n.jsx("div",{className:`${m("base","mt")} flex justify-center`,children:u})]})):n.jsx("div",F(M({className:`text-center text-fg-secondary ${e}`},t),{children:a||"No data available"}))}function No(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((w,y)=>({index:y,start:y*r,end:(y+1)*r,size:r}));const b=Math.max(0,Math.floor(i/r)-a),g=s?Math.min(e.length,Math.ceil((i+s)/r)+a):e.length,x=[];for(let w=b;w<g;w++)x.push({index:w,start:w*r,end:(w+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 b=u.current,g=()=>{c(b.scrollTop)};return b.addEventListener("scroll",g,{passive:!0}),()=>b.removeEventListener("scroll",g)},[o]),{virtualItems:d,totalHeight:f,scrollOffset:i,setScrollOffset:c,scrollToIndex:b=>{if(!u.current)return;const g=b*r;u.current.scrollTop=g,c(g)},containerRef:u}}function Ys(s){var a=s,{children:e,className:t=""}=a,r=z(a,["children","className"]);var w,y;const{paginatedData:o,loading:i,columns:c,selectable:u,actions:d,virtualScrolling:f,virtualScrollingOptions:p}=Ve(),b=c.length+(u?1:0)+(d?1:0),g=No(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&&g.virtualItems.length>0?g.virtualItems.map(h=>({row:o[h.index],index:h.index})).filter(h=>h.row!==void 0):o.map((h,j)=>({row:h,index:j})),[f,g.virtualItems,o]);return i?n.jsx("tbody",F(M({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:Array.from({length:5}).map((h,j)=>n.jsx("tr",{children:Array.from({length:b}).map((N,k)=>n.jsx("td",{className:`${m("lg","px")} ${m("base","py")}`,children:n.jsx(La,{className:"h-4 w-full"})},k))},j))})):o.length===0?n.jsx("tbody",F(M({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:n.jsx("tr",{children:n.jsx("td",{colSpan:b,className:`${m("lg","px")} ${m("3xl","py")}`,children:n.jsx(Ks,{})})})})):typeof e=="function"?n.jsx("tbody",F(M({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:o.map((h,j)=>e(h,j))})):n.jsx("tbody",F(M({className:`bg-surface-base divide-y divide-line-default ${t}`,role:"rowgroup"},r),{children:f&&g.virtualItems.length>0&&x.length>0?n.jsxs(n.Fragment,{children:[((w=g.virtualItems[0])==null?void 0:w.start)>0&&n.jsx("tr",{style:{height:g.virtualItems[0].start},"aria-hidden":"true",children:n.jsx("td",{colSpan:b})}),x.map(({row:h,index:j})=>n.jsx(hr,{row:h,rowIndex:j},j)),g.virtualItems.length>0&&n.jsx("tr",{style:{height:Math.max(0,g.totalHeight-(((y=g.virtualItems[g.virtualItems.length-1])==null?void 0:y.end)||0))},"aria-hidden":"true",children:n.jsx("td",{colSpan:b})})]}):x.map(({row:h,index:j})=>n.jsx(hr,{row:h,rowIndex:j},j))}))}function _u(i){var c=i,{filters:e,onFilter:t,initialValues:r={},showClearAll:s=!0,className:a=""}=c,o=z(c,["filters","onFilter","initialValues","showClearAll","className"]);const[u,d]=l.useState(r),[f,p]=l.useState(!1),b=Object.values(u).some(h=>h!==""&&h!==null&&h!==void 0),g=(h,j)=>{const N=F(M({},u),{[h]:j});d(N),t(N)},x=()=>{const h={};e.forEach(j=>{h[j.key]=""}),d(h),t(h)},w=h=>{const j=F(M({},u),{[h]:""});d(j),t(j)},y=Object.values(u).filter(h=>h!==""&&h!==null&&h!==void 0).length;return n.jsx("div",F(M({className:`bg-surface-base border-b border-line-default ${a}`},o),{children:n.jsxs("div",{className:`${m("base","px")} ${m("md","py")} sm:${m("lg","px")}`,children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("button",{type:"button",onClick:()=>p(!f),className:`flex items-center ${m("sm","gap")} text-sm font-medium text-fg-secondary hover:text-fg-primary`,children:[n.jsx(Cc,{className:"h-4 w-4"}),n.jsx("span",{children:"Filters"}),y>0&&n.jsx("span",{className:`inline-flex items-center ${m("sm","px")} ${m("0.5","py")} rounded text-xs font-medium bg-surface-brand-muted text-fg-brand-emphasis`,children:y})]}),b&&s&&n.jsx(Q,{variant:"ghost",size:"sm",onClick:x,className:"text-sm",children:"Clear all"})]}),f&&n.jsx("div",{className:`${m("base","mt")} grid grid-cols-1 ${m("base","gap")} sm:grid-cols-2 lg:grid-cols-3`,children:e.map(h=>{const j=u[h.key],N=j==null?"":String(j);return n.jsxs("div",{className:m("xs","space-y"),children:[n.jsx(Dt,{htmlFor:`filter-${h.key}`,variant:"optional",children:h.label}),n.jsxs("div",{className:"relative",children:[h.type==="text"&&n.jsx(Ee,{id:`filter-${h.key}`,type:"text",value:N,onChange:k=>g(h.key,k.target.value),placeholder:h.placeholder||`Filter by ${h.label.toLowerCase()}`,size:"sm",variant:"outlined"}),h.type==="select"&&n.jsxs("div",{className:"relative",children:[n.jsx(Er,{id:`filter-${h.key}`,options:[{value:"",label:`All ${h.label}`},...h.options||[]],value:N,onChange:k=>g(h.key,k.target.value)}),N&&n.jsx("button",{type:"button",onClick:()=>w(h.key),className:"absolute right-8 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${h.label} filter`,children:n.jsx(Ce,{className:"h-4 w-4"})})]}),h.type==="date"&&n.jsx(Ee,{id:`filter-${h.key}`,type:"date",value:N,onChange:k=>g(h.key,k.target.value),size:"sm",variant:"outlined"}),N&&h.type!=="select"&&n.jsx("button",{type:"button",onClick:()=>w(h.key),className:"absolute right-2 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${h.label} filter`,children:n.jsx(Ce,{className:"h-4 w-4"})})]})]},h.key)})})]})}))}function qs(s){var a=s,{showClearAll:e=!0,className:t=""}=a,r=z(a,["showClearAll","className"]);const{filterState:o,setFilters:i}=Ve();return o.config.length===0?null:n.jsx(_u,M({filters:o.config,onFilter:i,initialValues:o.values,showClearAll:e,className:t},r))}function Lu(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=z(p,["page","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showPageInfo","className"]);const b=Math.ceil(r/t),g=r===0?0:(e-1)*t+1,x=Math.min(e*t,r),w=()=>{e>1&&s(e-1)},y=()=>{e<b&&s(e+1)},h=()=>{e>1&&s(1)},j=()=>{e<b&&s(b)};return n.jsxs("div",F(M({className:`flex items-center justify-between ${m("base","px")} ${m("md","py")} bg-surface-base border-t border-line-default sm:${m("lg","px")} ${u}`},d),{children:[n.jsxs("div",{className:"flex flex-1 justify-between sm:hidden",children:[n.jsx(Q,{variant:"outline",size:"sm",onClick:w,disabled:e===1,children:"Previous"}),n.jsx(Q,{variant:"outline",size:"sm",onClick:y,disabled:e>=b,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($e,{as:"p",className:"text-sm text-fg-secondary",children:["Showing ",n.jsx("span",{className:"font-medium",children:g})," 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 ${m("base","gap")}`,children:[i&&n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[n.jsx($e,{as:"span",className:"text-sm text-fg-secondary",children:"Show:"}),n.jsx(Er,{"aria-label":"Items per page",options:o.map(N=>({value:N.toString(),label:N.toString()})),value:t.toString(),onChange:N=>{const k=parseInt(N.target.value);a(k),s(1)},className:"w-20"})]}),n.jsxs("nav",{className:`flex items-center ${m("xs","gap")}`,"aria-label":"Pagination",children:[n.jsxs(Q,{variant:"ghost",size:"sm",onClick:h,disabled:e===1,"aria-label":"First page",children:[n.jsx(Gt,{className:"h-4 w-4"}),n.jsx(Gt,{className:"h-4 w-4 -ml-2"})]}),n.jsx(Q,{variant:"ghost",size:"sm",onClick:w,disabled:e===1,"aria-label":"Previous page",children:n.jsx(Gt,{className:"h-4 w-4"})}),n.jsx("div",{className:`flex items-center ${m("xs","gap")}`,children:Array.from({length:Math.min(5,b)},(N,k)=>{let $;return b<=5||e<=3?$=k+1:e>=b-2?$=b-4+k:$=e-2+k,n.jsx(Q,{variant:e===$?"primary":"ghost",size:"sm",onClick:()=>s($),className:"min-w-10","aria-label":`Page ${$}`,"aria-current":e===$?"page":void 0,children:$},$)})}),n.jsx(Q,{variant:"ghost",size:"sm",onClick:y,disabled:e>=b,"aria-label":"Next page",children:n.jsx(yt,{className:"h-4 w-4"})}),n.jsxs(Q,{variant:"ghost",size:"sm",onClick:j,disabled:e>=b,"aria-label":"Last page",children:[n.jsx(yt,{className:"h-4 w-4"}),n.jsx(yt,{className:"h-4 w-4 -ml-2"})]})]})]})]})]}))}function Xs(o){var i=o,{showPageSizeSelector:e=!0,showPageInfo:t=!0,pageSizeOptions:r,className:s=""}=i,a=z(i,["showPageSizeSelector","showPageInfo","pageSizeOptions","className"]);const{paginationState:c,setPage:u,setPageSize:d,paginationMode:f}=Ve();return f==="client"&&c.totalPages<=1?null:n.jsx(Lu,M({page:c.page,pageSize:c.pageSize,total:c.total,onPageChange:u,onPageSizeChange:d,pageSizeOptions:r,showPageSizeSelector:e,showPageInfo:t,className:s},a))}function Me(e){const c=e,{className:t="","aria-label":r,"aria-labelledby":s}=c,a=z(c,["className","aria-label","aria-labelledby"]),o="children"in e&&e.children!==void 0,i=o?a:Fu(a);return o?n.jsx("div",{className:`bg-surface-base shadow ${U("lg")} overflow-hidden ${t}`,children:n.jsx(ps,F(M({},i),{children:e.children}))}):n.jsx("div",{className:`bg-surface-base shadow ${U("lg")} overflow-hidden ${t}`,children:n.jsxs(ps,F(M({},i),{children:[i.filters&&i.filters.length>0&&n.jsx(qs,{}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-line-default",role:"table","aria-label":r,"aria-labelledby":s,"aria-rowcount":i.total||i.data.length,"aria-colcount":i.columns.length+(i.selectable?1:0)+(i.actions?1:0),children:[n.jsx(Bs,{}),n.jsx(Ys,{})]})}),n.jsx(Xs,{})]}))})}function Fu(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:b,filters:g,selectable:x,selectedRows:w,onSelectionChange:y,rowId:h,actions:j,onRowClick:N,paginationMode:k,defaultPageSize:$,resizable:S,columnWidths:I,onColumnResize:C,virtualScrolling:A,virtualScrollingOptions:L}=e;let D=k||"auto";return D==="auto"&&(D=b&&b.total!==void 0?"server":"client"),{columns:t,data:r,loading:s,paginationMode:D,page:b==null?void 0:b.page,pageSize:b==null?void 0:b.pageSize,total:b==null?void 0:b.total,onPageChange:b==null?void 0:b.onPageChange,onPageSizeChange:b==null?void 0:b.onPageSizeChange,defaultPageSize:$||(b==null?void 0:b.pageSize)||10,pageSizeOptions:b==null?void 0:b.pageSizeOptions,sortColumn:o,sortDirection:i,onSort:a,filters:g==null?void 0:g.config,filterValues:g==null?void 0:g.initialValues,onFilter:g==null?void 0:g.onFilter,initialFilterValues:g==null?void 0:g.initialValues,selectable:x,selectedRows:w,onSelectionChange:y,rowId:h,actions:j,onRowClick:N,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,resizable:S,columnWidths:I,onColumnResize:C,virtualScrolling:A,virtualScrollingOptions:L,children:n.jsx(n.Fragment,{})}}Me.Header=Bs;Me.HeaderRow=Hs;Me.HeaderCell=Ws;Me.Body=Ys;Me.Row=hr;Me.Cell=Us;Me.Filters=qs;Me.Pagination=Xs;Me.EmptyState=Ks;Me.Actions=Gs;function Pu(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),b=l.useCallback((N,k)=>{const $=Math.max(r,s?Math.min(k,s):k);i(S=>F(M({},S),{[N]:$}))},[r,s]),g=l.useCallback(()=>{i(t)},[t]),x=l.useCallback((N,k,$)=>{a&&(u(!0),f(N),p.current={startX:k,startWidth:$})},[a]),w=l.useCallback(N=>{if(!c||!d||!p.current)return;const k=N-p.current.startX,$=p.current.startWidth+k;b(d,$)},[c,d,b]),y=l.useCallback(()=>{u(!1),f(null),p.current=null},[]),h=l.useRef(void 0),j=l.useRef(void 0);return typeof window!="undefined"&&(h.current=N=>{c&&w(N.clientX)},j.current=()=>{c&&y()},c?(document.addEventListener("mousemove",h.current),document.addEventListener("mouseup",j.current)):(h.current&&document.removeEventListener("mousemove",h.current),j.current&&document.removeEventListener("mouseup",j.current))),{columnWidths:o,setColumnWidth:b,resetColumnWidths:g,isResizing:c,resizingColumn:d,startResize:x,handleResize:w,endResize:y}}const Pr=l.createContext(null);function Ou(){return l.useContext(Pr)}function Xe(){const e=l.useContext(Pr);if(!e)throw new Error("useSideNavbarThemeRequired must be used within SideNavbarThemeProvider");return e}const Rt={variant:"default",navigationWidth:"56px",contentWidth:"320px",animationDuration:300,animationEasing:"ease-in-out"};function Js({children:e,variant:t=Rt.variant,navigationWidth:r=Rt.navigationWidth,contentWidth:s=Rt.contentWidth,animationDuration:a=Rt.animationDuration,animationEasing:o=Rt.animationEasing}){const i=l.useMemo(()=>({variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o}),[t,r,s,a,o]);return n.jsx(Pr.Provider,{value:i,children:e})}const Or=l.createContext(null);function zu(){return l.useContext(Or)}function Nt(){const e=l.useContext(Or);if(!e)throw new Error("useSideNavbarConfigRequired must be used within SideNavbarConfigProvider");return e}const Ne={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 Zs({children:e,mode:t=Ne.mode,resizable:r=Ne.resizable,minWidth:s=Ne.minWidth,maxWidth:a=Ne.maxWidth,snapPoints:o=Ne.snapPoints,responsive:i=Ne.responsive,mobileBreakpoint:c=Ne.mobileBreakpoint,mobileVariant:u=Ne.mobileVariant,overlayBackdrop:d=Ne.overlayBackdrop,persistState:f=Ne.persistState,persistWidth:p=Ne.persistWidth,storageKey:b=Ne.storageKey,keyboardShortcut:g=Ne.keyboardShortcut,enableKeyboardShortcut:x=Ne.enableKeyboardShortcut}){const w=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:b,keyboardShortcut:g,enableKeyboardShortcut:x}),[t,r,s,a,o,i,c,u,d,f,p,b,g,x]);return n.jsx(Or.Provider,{value:w,children:e})}const zr=l.createContext(null);function Vu(){return l.useContext(zr)}function Je(){const e=l.useContext(zr);if(!e)throw new Error("useSideNavbarStateRequired must be used within SideNavbarStateProvider");return e}function xr(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 Wu(e,t){return e===void 0||t===void 0?!0:e<t}function ur(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 Hu=["ctrl","cmd","control","shift","alt","meta","option"];function So(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(Hu.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 Bu(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 $o({initialWidth:e,minWidth:t,maxWidth:r,snapPoints:s,snapThreshold:a=20,onWidthChange:o,enabled:i=!0}){const c=ur(e,t,r),[u,d]=l.useState(c),[f,p]=l.useState(!1),b=l.useRef(0),g=l.useRef(c),x=l.useCallback(j=>{let N=ur(j,t,r);if(s&&s.length>0){const k=s.reduce(($,S)=>{const I=Math.abs(N-S),C=Math.abs(N-$);return I<C?S:$},s[0]);Math.abs(N-k)<=a&&(N=k)}d(N),o==null||o(N)},[t,r,s,a,o]),w=l.useCallback(j=>{if(!i||!f)return;const N=j.clientX-b.current,k=g.current+N;x(k)},[i,f,x]),y=l.useCallback(()=>{i&&(p(!1),b.current=0,g.current=u)},[i,u]),h=l.useCallback(j=>{i&&(j.preventDefault(),j.stopPropagation(),p(!0),b.current=j.clientX,g.current=u)},[i,u]);return l.useEffect(()=>{if(f)return document.addEventListener("mousemove",w),document.addEventListener("mouseup",y),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",y),document.body.style.userSelect="",document.body.style.cursor=""}},[f,w,y]),l.useEffect(()=>{f||d(ur(e,t,r))},[e,t,r,f]),{width:u,isResizing:f,startResize:h,setWidth:x}}function Co({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 Eo({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 Mo({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 b=e.length===1?d.key.toLowerCase()===e.toLowerCase():d.key===e,g=t?d.ctrlKey||d.metaKey:!d.ctrlKey&&!d.metaKey,x=r?d.shiftKey:!d.shiftKey,w=s?d.altKey:!d.altKey,y=a?d.metaKey:!d.metaKey,h=t?(d.ctrlKey||d.metaKey)&&!a:g&&y;b&&h&&x&&w&&(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 Qs({children:e,defaultCollapsed:t=!1,collapsed:r,onCollapseChange:s,onWidthChange:a,onMobileChange:o,exclusiveGroups:i=!1}){const c=Xe(),u=Nt(),d=l.useRef(null),f=r!==void 0,p=()=>{if(f)return r;if(u.storageKey&&u.persistState&&typeof window!="undefined"){const _=localStorage.getItem(`${u.storageKey}-collapsed`);if(_!==null)return _==="true"}return t},b=()=>{if(u.storageKey&&u.persistWidth&&typeof window!="undefined"){const _=localStorage.getItem(`${u.storageKey}-width`);if(_!==null){const V=parseInt(_,10);if(!isNaN(V))return V}}return xr(c.contentWidth)},[g,x]=l.useState(p),[w,y]=l.useState({}),{isMobile:h}=Co({mobileBreakpoint:u.mobileBreakpoint,onMobileChange:_=>{o==null||o(_),_&&u.mobileVariant==="collapse"&&!f&&x(!0)},enabled:u.responsive}),{width:j,isResizing:N,startResize:k,setWidth:$}=$o({initialWidth:b(),minWidth:u.minWidth,maxWidth:u.maxWidth,snapPoints:u.snapPoints,onWidthChange:_=>{a==null||a(_),u.storageKey&&u.persistWidth&&typeof window!="undefined"&&localStorage.setItem(`${u.storageKey}-width`,String(_))},enabled:u.resizable&&!h});Eo({isActive:h&&u.mobileVariant==="overlay"&&!g,containerRef:d,restoreFocus:!0});const S=f?r:g,I=l.useCallback(_=>{f||x(_),s==null||s(_)},[f,s]),C=l.useCallback(()=>{I(!S)},[S,I]),A=So(u.keyboardShortcut);Mo({key:A.key,ctrl:A.ctrl,shift:A.shift,alt:A.alt,meta:A.meta,onTrigger:C,enabled:u.enableKeyboardShortcut});const L=l.useCallback(_=>{$(_)},[$]),D=l.useCallback(_=>{y(i?V=>{const X=V[_]===!1,Z={},oe=new Set([...Object.keys(V),_]);return X?oe.forEach(H=>{Z[H]=!0}):oe.forEach(H=>{Z[H]=H!==_}),Z}:V=>F(M({},V),{[_]:!V[_]}))},[i]),T=l.useCallback((_,V)=>{y(B=>F(M({},B),{[_]:V}))},[]);l.useEffect(()=>{f&&r!==g&&x(r)},[f,r,g]),l.useEffect(()=>{u.storageKey&&u.persistState&&typeof window!="undefined"&&!f&&localStorage.setItem(`${u.storageKey}-collapsed`,String(g))},[u.storageKey,u.persistState,g,f]);const R=l.useMemo(()=>({collapsed:S,toggle:C,setCollapsed:I,currentWidth:j,setWidth:L,isMobile:h,isResizing:N,startResize:k,groupStates:w,toggleGroup:D,setGroupCollapsed:T,sidebarRef:d}),[S,C,I,j,L,h,N,k,w,D,T]);return n.jsx(zr.Provider,{value:R,children:e})}function en({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:b,mobileVariant:g,overlayBackdrop:x,persistState:w,persistWidth:y,storageKey:h,keyboardShortcut:j,enableKeyboardShortcut:N,defaultCollapsed:k,collapsed:$,onCollapseChange:S,onWidthChange:I,onMobileChange:C,exclusiveGroups:A}){return n.jsx(Js,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,children:n.jsx(Zs,{mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:b,mobileVariant:g,overlayBackdrop:x,persistState:w,persistWidth:y,storageKey:h,keyboardShortcut:j,enableKeyboardShortcut:N,children:n.jsx(Qs,{defaultCollapsed:k,collapsed:$,onCollapseChange:S,onWidthChange:I,onMobileChange:C,exclusiveGroups:A,children:e})})})}const Vr=l.createContext(null);function tn(){return l.useContext(Vr)}function rn(){const e=l.useContext(Vr);if(!e)throw new Error("useSidebarSlotRequired must be used within SidebarSlotProvider");return e}function To({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(Vr.Provider,{value:c,children:e})}const Wr=l.createContext(null);function Uu(){return l.useContext(Wr)}function Ao(){const e=l.useContext(Wr);return e||{showMainToggle:!0,mainTogglePosition:"floating"}}function sn(r){var s=r,{className:e=""}=s,t=z(s,["className"]);const{currentWidth:a,setWidth:o,isResizing:i,startResize:c}=Je(),{resizable:u}=Nt();return u?n.jsxs("div",F(M({className:`
192
192
  group
193
193
  absolute
194
194
  top-0
@@ -215,7 +215,7 @@ React keys must be passed directly to JSX without using spread:
215
215
  group-hover:opacity-100
216
216
  transition-opacity
217
217
  ${i?"opacity-100":""}
218
- `}),n.jsx(Ec,{className:`
218
+ `}),n.jsx(Mc,{className:`
219
219
  h-4
220
220
  w-4
221
221
  text-fg-tertiary
@@ -224,21 +224,21 @@ React keys must be passed directly to JSX without using spread:
224
224
  transition-opacity
225
225
  absolute
226
226
  ${i?"opacity-100":""}
227
- `,"aria-hidden":"true"})]})):null}function nn(o){var i=o,{visible:e,onBackdropClick:t,className:r="",style:s}=i,a=z(i,["visible","onBackdropClick","className","style"]);const{collapsed:c,setCollapsed:u,isMobile:d}=Je(),{animationDuration:f}=Xe(),{mobileVariant:p,overlayBackdrop:b}=Nt(),h=d&&p==="overlay",g=e!=null?e:h&&b&&!c,w=()=>{t?t():u(!0)};return g?n.jsx("div",M({className:`
227
+ `,"aria-hidden":"true"})]})):null}function nn(o){var i=o,{visible:e,onBackdropClick:t,className:r="",style:s}=i,a=z(i,["visible","onBackdropClick","className","style"]);const{collapsed:c,setCollapsed:u,isMobile:d}=Je(),{animationDuration:f}=Xe(),{mobileVariant:p,overlayBackdrop:b}=Nt(),g=d&&p==="overlay",x=e!=null?e:g&&b&&!c,w=()=>{t?t():u(!0)};return x?n.jsx("div",M({className:`
228
228
  fixed inset-0
229
229
  bg-scrim
230
- ${xe("modal-backdrop")}
230
+ ${he("modal-backdrop")}
231
231
  ${r}
232
- `,style:M({animation:`fadeIn ${f}ms ease-in-out`},s),onClick:w,"aria-hidden":"true","data-testid":"side-navbar-backdrop"},a)):null}const Bu={xs:"w-5 h-5",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},Uu={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},Gu={floating:`absolute ${xe("fixed")}`,top:"absolute top-2 right-2 z-10",bottom:"absolute bottom-2 right-2 z-10",inside:"relative z-10","navigation-top":`relative ${m("sm","mt")} mx-auto z-10`,"navigation-bottom":`relative mt-auto ${m("sm","mb")} mx-auto z-10`},Ku={default:`bg-surface-raised border border-line-default ${fe("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"},Yu={floating:"right",top:"bottom",bottom:"top",inside:"right","navigation-top":"right","navigation-bottom":"right"};function an(w){var v=w,{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:b,"aria-label":h}=v,g=z(v,["position","offset","icon","expandIcon","collapseIcon","size","variant","showTooltip","tooltipPosition","keyboardShortcut","enableKeyboardShortcut","className","style","aria-label"]);var V,B;const{collapsed:x,toggle:j}=Je(),{animationDuration:N,animationEasing:k}=Xe(),$=Nt(),S=d!=null?d:$.keyboardShortcut,I=f!=null?f:$.enableKeyboardShortcut,C=()=>{if(typeof r=="function")return r(x);if(r)return r;if(x&&s)return s;if(!x&&a)return a;const X=x?Lc:_c;return n.jsx(X,{className:Uu[o],style:{transition:"none",transform:"none",willChange:"auto"}})},A=x?"Expand sidebar":"Collapse sidebar",F=u!=null?u:Yu[e],D=c?`${x?"Expand":"Collapse"} sidebar${I?` (${S})`:""}`:void 0,T=t?{transform:`translate(${(V=t.x)!=null?V:0}px, ${(B=t.y)!=null?B:0}px)`}:{},R=e==="floating"?M({right:"-12px",top:"1rem",transform:"translateY(-50%)",transition:`right ${N}ms ${k}`},T):T,_=n.jsx("button",P(M({type:"button",onClick:j,className:`
233
- ${Bu[o]}
234
- ${Ku[i]}
232
+ `,style:M({animation:`fadeIn ${f}ms ease-in-out`},s),onClick:w,"aria-hidden":"true","data-testid":"side-navbar-backdrop"},a)):null}const Gu={xs:"w-5 h-5",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},Ku={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},Yu={floating:`absolute ${he("fixed")}`,top:"absolute top-2 right-2 z-10",bottom:"absolute bottom-2 right-2 z-10",inside:"relative z-10","navigation-top":`relative ${m("sm","mt")} mx-auto z-10`,"navigation-bottom":`relative mt-auto ${m("sm","mb")} mx-auto z-10`},qu={default:`bg-surface-raised border border-line-default ${fe("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"},Xu={floating:"right",top:"bottom",bottom:"top",inside:"right","navigation-top":"right","navigation-bottom":"right"};function an(w){var y=w,{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:b,"aria-label":g}=y,x=z(y,["position","offset","icon","expandIcon","collapseIcon","size","variant","showTooltip","tooltipPosition","keyboardShortcut","enableKeyboardShortcut","className","style","aria-label"]);var V,B;const{collapsed:h,toggle:j}=Je(),{animationDuration:N,animationEasing:k}=Xe(),$=Nt(),S=d!=null?d:$.keyboardShortcut,I=f!=null?f:$.enableKeyboardShortcut,C=()=>{if(typeof r=="function")return r(h);if(r)return r;if(h&&s)return s;if(!h&&a)return a;const X=h?Pc:Lc;return n.jsx(X,{className:Ku[o],style:{transition:"none",transform:"none",willChange:"auto"}})},A=h?"Expand sidebar":"Collapse sidebar",L=u!=null?u:Xu[e],D=c?`${h?"Expand":"Collapse"} sidebar${I?` (${S})`:""}`:void 0,T=t?{transform:`translate(${(V=t.x)!=null?V:0}px, ${(B=t.y)!=null?B:0}px)`}:{},R=e==="floating"?M({right:"-12px",top:"1rem",transform:"translateY(-50%)",transition:`right ${N}ms ${k}`},T):T,_=n.jsx("button",F(M({type:"button",onClick:j,className:`
233
+ ${Gu[o]}
234
+ ${qu[i]}
235
235
  ${U("full")}
236
236
  flex items-center justify-center
237
237
  text-fg-secondary hover:text-fg-primary
238
238
  focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-1
239
- ${e==="floating"?"":Gu[e]}
239
+ ${e==="floating"?"":Yu[e]}
240
240
  ${p}
241
- `,style:M(M(M(M({},e==="floating"?{position:"absolute",right:"-11px",left:"auto"}:{}),e!=="floating"?R:{}),e==="floating"?{zIndex:Tn.fixed.value}:{}),b),"aria-label":h||A,"aria-expanded":!x,"aria-controls":"side-navbar-sidebar","data-position":e},g),{children:C()}));if(e==="floating"){const X=c&&D?n.jsx(_t,{content:D,position:F,preservePositioning:!0,children:_}):_;return n.jsx("div",{style:{position:"absolute",right:"0",top:"1rem",transform:"translateY(-50%)",zIndex:Tn.fixed.value},children:X})}return c&&D?n.jsx(_t,{content:D,position:F,children:_}):_}function Bn(e){return!l.isValidElement(e)||typeof e.type=="string"?!1:e.type.__SIDENAVBAR_KIND__==="navbar"}function qu(e){let t,r,s=0,a=!1;for(const o of l.Children.toArray(e)){if(Bn(o)){const{showMainToggle:c,mainTogglePosition:u}=o.props;if(!(c!==void 0||u!==void 0))continue;s++,s===1&&(t=c,r=u);continue}if(!l.isValidElement(o))continue;const i=o.props;if(i.children!==void 0)for(const c of l.Children.toArray(i.children)){if(!Bn(c))continue;const{showMainToggle:u,mainTogglePosition:d}=c.props;if(u!==void 0||d!==void 0){a=!0;break}}}return{show:t,position:r,overrideCount:s,wrappedNavbarWithOverride:a}}const Xu={default:"",compact:"text-sm",elevated:fe("lg"),minimal:"border-0",bordered:"border-2"};function Ao(o){var i=o,{children:e,className:t="",style:r,"aria-label":s}=i,a=z(i,["children","className","style","aria-label"]);var Y,ee;const c=Je(),u=Xe(),d=Nt(),f=To(),p=qu(e),b=(Y=p.show)!=null?Y:f.showMainToggle,h=(ee=p.position)!=null?ee:f.mainTogglePosition,{collapsed:g,setCollapsed:w,currentWidth:v,isResizing:x,sidebarRef:j,isMobile:N}=c,{variant:k,navigationWidth:$,contentWidth:S,animationDuration:I,animationEasing:C}=u,{mode:A,resizable:F,mobileVariant:D,overlayBackdrop:T}=d,R=typeof $=="number"?`${$}px`:$,_=typeof S=="number"?`${S}px`:S,B=A==="navigation"||g?R:F?`${v}px`:_,[X,Z]=l.useState(!1);l.useEffect(()=>{Z(!0)},[]);const oe=N&&D==="overlay",H=X&&oe,L=H?`fixed left-0 top-0 ${xe("fixed")}`:"relative";return n.jsxs(n.Fragment,{children:[X&&oe&&T&&!g&&n.jsx(nn,{}),n.jsxs("aside",P(M({ref:j,id:"side-navbar-sidebar",className:y(L,"flex","h-full","overflow-visible",Xu[k],H&&g?"-translate-x-full":"translate-x-0",t),style:M({position:H?"fixed":"relative",backgroundColor:"var(--color-surface-subtle)",borderRight:"1px solid var(--color-line-default)",width:B,minWidth:B,transitionProperty:x?"none":"width, min-width, transform",transitionDuration:`${I}ms`,transitionTimingFunction:C},r),role:"complementary","aria-label":s||"Sidebar navigation","aria-expanded":A!=="navigation"?!g:void 0,"data-mode":A,"data-collapsed":g},a),{children:[F&&A!=="navigation"&&!g&&n.jsx(sn,{}),b&&A!=="navigation"&&n.jsx(an,{position:h}),n.jsx("div",{className:"flex h-full w-full overflow-visible",children:e})]}))]})}const Hr=l.createContext(null);function Ju(){return l.useContext(Hr)}function Br(){const e=l.useContext(Hr);if(!e)throw new Error("useNavbarRequired must be used within a SideNavbar.Navbar component");return e}function vr(o){var i=o,{icon:e,size:t="sm",variant:r="ghost",className:s=""}=i,a=z(i,["icon","size","variant","className"]);const{collapsed:c,toggle:u}=Br(),d=()=>{if(e)return typeof e=="function"?e(c):e;const h=c?yt:Gt;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"},b={default:`bg-surface-base border border-line-default ${fe("sm")} hover:bg-surface-hover`,ghost:"hover:bg-surface-active",outline:"border border-line-emphasis hover:bg-surface-hover"};return n.jsx(_t,{content:c?"Expand sidebar":"Collapse sidebar",position:"right",children:n.jsx("button",P(M({type:"button",onClick:u,className:`
241
+ `,style:M(M(M(M({},e==="floating"?{position:"absolute",right:"-11px",left:"auto"}:{}),e!=="floating"?R:{}),e==="floating"?{zIndex:Tn.fixed.value}:{}),b),"aria-label":g||A,"aria-expanded":!h,"aria-controls":"side-navbar-sidebar","data-position":e},x),{children:C()}));if(e==="floating"){const X=c&&D?n.jsx(_t,{content:D,position:L,preservePositioning:!0,children:_}):_;return n.jsx("div",{style:{position:"absolute",right:"0",top:"1rem",transform:"translateY(-50%)",zIndex:Tn.fixed.value},children:X})}return c&&D?n.jsx(_t,{content:D,position:L,children:_}):_}function Bn(e){return!l.isValidElement(e)||typeof e.type=="string"?!1:e.type.__SIDENAVBAR_KIND__==="navbar"}function Ju(e){let t,r,s=0,a=!1;for(const o of l.Children.toArray(e)){if(Bn(o)){const{showMainToggle:c,mainTogglePosition:u}=o.props;if(!(c!==void 0||u!==void 0))continue;s++,s===1&&(t=c,r=u);continue}if(!l.isValidElement(o))continue;const i=o.props;if(i.children!==void 0)for(const c of l.Children.toArray(i.children)){if(!Bn(c))continue;const{showMainToggle:u,mainTogglePosition:d}=c.props;if(u!==void 0||d!==void 0){a=!0;break}}}return{show:t,position:r,overrideCount:s,wrappedNavbarWithOverride:a}}const Zu={default:"",compact:"text-sm",elevated:fe("lg"),minimal:"border-0",bordered:"border-2"};function Ro(o){var i=o,{children:e,className:t="",style:r,"aria-label":s}=i,a=z(i,["children","className","style","aria-label"]);var Y,ee;const c=Je(),u=Xe(),d=Nt(),f=Ao(),p=Ju(e),b=(Y=p.show)!=null?Y:f.showMainToggle,g=(ee=p.position)!=null?ee:f.mainTogglePosition,{collapsed:x,setCollapsed:w,currentWidth:y,isResizing:h,sidebarRef:j,isMobile:N}=c,{variant:k,navigationWidth:$,contentWidth:S,animationDuration:I,animationEasing:C}=u,{mode:A,resizable:L,mobileVariant:D,overlayBackdrop:T}=d,R=typeof $=="number"?`${$}px`:$,_=typeof S=="number"?`${S}px`:S,B=A==="navigation"||x?R:L?`${y}px`:_,[X,Z]=l.useState(!1);l.useEffect(()=>{Z(!0)},[]);const oe=N&&D==="overlay",H=X&&oe,P=H?`fixed left-0 top-0 ${he("fixed")}`:"relative";return n.jsxs(n.Fragment,{children:[X&&oe&&T&&!x&&n.jsx(nn,{}),n.jsxs("aside",F(M({ref:j,id:"side-navbar-sidebar",className:v(P,"flex","h-full","overflow-visible",Zu[k],H&&x?"-translate-x-full":"translate-x-0",t),style:M({position:H?"fixed":"relative",backgroundColor:"var(--color-surface-subtle)",borderRight:"1px solid var(--color-line-default)",width:B,minWidth:B,transitionProperty:h?"none":"width, min-width, transform",transitionDuration:`${I}ms`,transitionTimingFunction:C},r),role:"complementary","aria-label":s||"Sidebar navigation","aria-expanded":A!=="navigation"?!x:void 0,"data-mode":A,"data-collapsed":x},a),{children:[L&&A!=="navigation"&&!x&&n.jsx(sn,{}),b&&A!=="navigation"&&n.jsx(an,{position:g}),n.jsx("div",{className:"flex h-full w-full overflow-visible",children:e})]}))]})}const Hr=l.createContext(null);function Qu(){return l.useContext(Hr)}function Br(){const e=l.useContext(Hr);if(!e)throw new Error("useNavbarRequired must be used within a SideNavbar.Navbar component");return e}function vr(o){var i=o,{icon:e,size:t="sm",variant:r="ghost",className:s=""}=i,a=z(i,["icon","size","variant","className"]);const{collapsed:c,toggle:u}=Br(),d=()=>{if(e)return typeof e=="function"?e(c):e;const g=c?yt:Gt;return n.jsx(g,{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"},b={default:`bg-surface-base border border-line-default ${fe("sm")} hover:bg-surface-hover`,ghost:"hover:bg-surface-active",outline:"border border-line-emphasis hover:bg-surface-hover"};return n.jsx(_t,{content:c?"Expand sidebar":"Collapse sidebar",position:"right",children:n.jsx("button",F(M({type:"button",onClick:u,className:`
242
242
  flex
243
243
  items-center
244
244
  justify-center
@@ -253,7 +253,7 @@ React keys must be passed directly to JSX without using spread:
253
253
  ${b[r]}
254
254
  [&:hover]:!transform-none
255
255
  ${s}
256
- `,style:{willChange:"auto",transform:"none",transition:"none"},"aria-label":c?"Expand sidebar":"Collapse sidebar","aria-expanded":!c},a),{children:d()}))})}const Zu={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"}},Qu={default:"bg-error",success:"bg-success",warning:"bg-warning",danger:"bg-error-dark"},ef={tooltip:"",inline:`flex-row ${m("sm","gap")} w-full ${m("md","px")}`,below:`flex-col ${m("1.5","gap")}`};function Ro(x){var j=x,{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:b,onClick:h,disabled:g=!1,className:w=""}=j,v=z(j,["id","icon","label","labelMode","showLabel","active","showTooltip","badge","badgeVariant","variant","size","href","target","onClick","disabled","className"]);var B;const{activeItem:N,setActiveItem:k,labelMode:$}=Br(),S=(B=s!=null?s:$)!=null?B:"tooltip",I=o||e&&N===e,C=Zu[f],A=X=>{if(g){X.preventDefault();return}e&&k(e),h==null||h()},F=S!=="tooltip"&&a&&r&&n.jsx("span",{className:y("text-xs","flex-shrink-0","relative z-10",S==="below"&&"text-center",S==="inline"&&"truncate"),style:{willChange:"auto",transform:"none"},children:r}),D=y("relative","flex","items-center",S==="inline"?"justify-start":"justify-center",S==="below"&&"flex-col",U("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",S==="tooltip"?C.container:y(m("sm","px"),m("1.5","py")),S!=="tooltip"&&ef[S],g?"opacity-50 cursor-not-allowed":"cursor-pointer",w),T={default:I?"bg-surface-brand-muted text-fg-brand-emphasis":g?"text-fg-disabled":"text-fg-secondary hover:bg-surface-active hover:text-fg-primary [&:hover]:!transform-none",ghost:I?"text-fg-brand-emphasis":g?"text-fg-disabled":"text-fg-secondary hover:text-fg-primary [&:hover]:!transform-none",subtle:I?"bg-surface-active text-fg-primary":g?"text-fg-disabled":"text-fg-tertiary hover:bg-surface-hover hover:text-fg-primary [&:hover]:!transform-none"},R=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:y("flex-shrink-0",C.icon,"[&>svg]:transition-none","[&>svg]:!transform-none","[&>svg]:!will-change-auto","box-border","flex items-center justify-center",`relative ${xe("base")}`),style:{minWidth:C.icon==="w-4 h-4"?"1rem":C.icon==="w-5 h-5"?"1.25rem":"1.5rem",minHeight:C.icon==="w-4 h-4"?"1rem":C.icon==="w-5 h-5"?"1.25rem":"1.5rem",willChange:"auto",transform:"none",transition:"none",zIndex:S!=="tooltip"?0:"auto"},children:t}),F,c!=null&&n.jsx("span",{className:y("absolute","-top-1","-right-1","flex","items-center","justify-center",m("xs","px"),"font-medium","text-fg-inverse",U("full"),C.badge,Qu[u]),children:c})]}),_={willChange:"auto",transform:"none",transition:"none"},V=p?n.jsx("a",{href:p,target:b,rel:b==="_blank"?"noopener noreferrer":void 0,onClick:A,className:y(D,T[d]),style:_,"aria-label":r,"aria-current":I?"page":void 0,"aria-disabled":g,children:R}):n.jsx("button",P(M({type:"button",onClick:A,disabled:g,className:y(D,T[d]),style:_,"aria-label":r,"aria-current":I?"page":void 0},v),{children:R}));return S==="tooltip"&&i&&r&&!g?n.jsx(_t,{content:r,position:"right",children:V}):V}function Io(s){var a=s,{orientation:e="horizontal",className:t=""}=a,r=z(a,["orientation","className"]);return e==="vertical"?n.jsx("div",M({className:y("w-px","h-6","bg-line-default","mx-auto",t),role:"separator","aria-orientation":"vertical"},r)):n.jsx("div",M({className:y("w-full","h-px","bg-line-default",m("sm","my"),"flex-shrink-0",t),role:"separator","aria-orientation":"horizontal",style:{willChange:"auto",transform:"none"}},r))}function Do(c){var u=c,{id:e,label:t,collapsible:r=!1,defaultCollapsed:s=!1,children:a,className:o}=u,i=z(u,["id","label","collapsible","defaultCollapsed","children","className"]);const[d,f]=l.useState(s);return n.jsxs("div",P(M({id:e,className:y("flex flex-col",o)},i),{children:[t&&n.jsx("div",{className:y(m("sm","px"),m("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:y("flex items-center",m("1.5","gap")),children:[" ",r&&n.jsx("span",{className:"shrink-0",children:d?n.jsx(yt,{className:"w-3 h-3",style:{transition:"none",transform:"none"}}):n.jsx($r,{className:"w-3 h-3",style:{transition:"none",transform:"none"}})}),n.jsx("span",{children:t})]})}),!d&&n.jsx("div",{className:`flex flex-col ${m("sm","gap")}`,children:a})]}))}function pt(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=z(p,["children","showMainToggle","mainTogglePosition","showToggle","togglePosition","labelMode","expandedWidth","className","style"]);const b=Je(),h=Xe(),g=l.useRef(null),[w,v]=l.useState(null),[x,j]=l.useState(!1),N=o==="inline"&&!b.collapsed,k=N?typeof i=="number"?`${i}px`:i:h.navigationWidth,$=l.useMemo(()=>({collapsed:b.collapsed,toggle:b.toggle,navbarRef:g,activeItem:w,setActiveItem:v,isHovered:x,showInternalToggle:s,togglePosition:a,labelMode:o}),[b.collapsed,b.toggle,w,x,s,a,o]);return n.jsx(Hr.Provider,{value:$,children:n.jsxs("nav",P(M({ref:g,className:y("relative","flex-shrink-0","flex","flex-col","h-full",N?"items-stretch":"items-center",c),style:M({position:"relative",backgroundColor:"var(--color-surface-raised)",borderRight:"1px solid var(--color-line-default)",width:k,transitionProperty:"width",transitionDuration:`${h.animationDuration}ms`,transitionTimingFunction:h.animationEasing},u),onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),"aria-label":"Side navigation"},d),{children:[s&&a==="top"&&n.jsx("div",{className:`flex-shrink-0 ${m("sm","p")}`,style:{borderBottom:"1px solid var(--color-line-default)"},children:n.jsx(vr,{})}),n.jsx("div",{className:y("relative","flex-1","flex","flex-col","overflow-y-auto","overflow-x-hidden",m("sm","p"),m("sm","gap"),"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 ${m("sm","p")}`,style:{borderTop:"1px solid var(--color-line-default)"},children:n.jsx(vr,{})})]}))})}pt.Toggle=vr;pt.Item=Ro;pt.Separator=Io;pt.Group=Do;pt.displayName="Navbar";pt.__SIDENAVBAR_KIND__="navbar";const Ur=l.createContext(null);function _o(){return l.useContext(Ur)}function Xt(){const e=l.useContext(Ur);if(!e)throw new Error("useSidebarRequired must be used within a SideNavbar.Sidebar component");return e}function Fo(c){var u=c,{title:e,subtitle:t,showBorder:r=!0,children:s,className:a="",style:o}=u,i=z(u,["title","subtitle","showBorder","children","className","style"]);const{collapsed:d,registerHeader:f,unregisterHeader:p}=Xt();return l.useEffect(()=>(f(),()=>p()),[f,p]),d?null:n.jsx("div",P(M({className:`
256
+ `,style:{willChange:"auto",transform:"none",transition:"none"},"aria-label":c?"Expand sidebar":"Collapse sidebar","aria-expanded":!c},a),{children:d()}))})}const ef={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"}},tf={default:"bg-error",success:"bg-success",warning:"bg-warning",danger:"bg-error-dark"},rf={tooltip:"",inline:`flex-row ${m("sm","gap")} w-full ${m("md","px")}`,below:`flex-col ${m("1.5","gap")}`};function Io(h){var j=h,{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:b,onClick:g,disabled:x=!1,className:w=""}=j,y=z(j,["id","icon","label","labelMode","showLabel","active","showTooltip","badge","badgeVariant","variant","size","href","target","onClick","disabled","className"]);var B;const{activeItem:N,setActiveItem:k,labelMode:$}=Br(),S=(B=s!=null?s:$)!=null?B:"tooltip",I=o||e&&N===e,C=ef[f],A=X=>{if(x){X.preventDefault();return}e&&k(e),g==null||g()},L=S!=="tooltip"&&a&&r&&n.jsx("span",{className:v("text-xs","flex-shrink-0","relative z-10",S==="below"&&"text-center",S==="inline"&&"truncate"),style:{willChange:"auto",transform:"none"},children:r}),D=v("relative","flex","items-center",S==="inline"?"justify-start":"justify-center",S==="below"&&"flex-col",U("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",S==="tooltip"?C.container:v(m("sm","px"),m("1.5","py")),S!=="tooltip"&&rf[S],x?"opacity-50 cursor-not-allowed":"cursor-pointer",w),T={default:I?"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:I?"text-fg-brand-emphasis":x?"text-fg-disabled":"text-fg-secondary hover:text-fg-primary [&:hover]:!transform-none",subtle:I?"bg-surface-active text-fg-primary":x?"text-fg-disabled":"text-fg-tertiary hover:bg-surface-hover hover:text-fg-primary [&:hover]:!transform-none"},R=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:v("flex-shrink-0",C.icon,"[&>svg]:transition-none","[&>svg]:!transform-none","[&>svg]:!will-change-auto","box-border","flex items-center justify-center",`relative ${he("base")}`),style:{minWidth:C.icon==="w-4 h-4"?"1rem":C.icon==="w-5 h-5"?"1.25rem":"1.5rem",minHeight:C.icon==="w-4 h-4"?"1rem":C.icon==="w-5 h-5"?"1.25rem":"1.5rem",willChange:"auto",transform:"none",transition:"none",zIndex:S!=="tooltip"?0:"auto"},children:t}),L,c!=null&&n.jsx("span",{className:v("absolute","-top-1","-right-1","flex","items-center","justify-center",m("xs","px"),"font-medium","text-fg-inverse",U("full"),C.badge,tf[u]),children:c})]}),_={willChange:"auto",transform:"none",transition:"none"},V=p?n.jsx("a",{href:p,target:b,rel:b==="_blank"?"noopener noreferrer":void 0,onClick:A,className:v(D,T[d]),style:_,"aria-label":r,"aria-current":I?"page":void 0,"aria-disabled":x,children:R}):n.jsx("button",F(M({type:"button",onClick:A,disabled:x,className:v(D,T[d]),style:_,"aria-label":r,"aria-current":I?"page":void 0},y),{children:R}));return S==="tooltip"&&i&&r&&!x?n.jsx(_t,{content:r,position:"right",children:V}):V}function Do(s){var a=s,{orientation:e="horizontal",className:t=""}=a,r=z(a,["orientation","className"]);return e==="vertical"?n.jsx("div",M({className:v("w-px","h-6","bg-line-default","mx-auto",t),role:"separator","aria-orientation":"vertical"},r)):n.jsx("div",M({className:v("w-full","h-px","bg-line-default",m("sm","my"),"flex-shrink-0",t),role:"separator","aria-orientation":"horizontal",style:{willChange:"auto",transform:"none"}},r))}function _o(c){var u=c,{id:e,label:t,collapsible:r=!1,defaultCollapsed:s=!1,children:a,className:o}=u,i=z(u,["id","label","collapsible","defaultCollapsed","children","className"]);const[d,f]=l.useState(s);return n.jsxs("div",F(M({id:e,className:v("flex flex-col",o)},i),{children:[t&&n.jsx("div",{className:v(m("sm","px"),m("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:v("flex items-center",m("1.5","gap")),children:[" ",r&&n.jsx("span",{className:"shrink-0",children:d?n.jsx(yt,{className:"w-3 h-3",style:{transition:"none",transform:"none"}}):n.jsx($r,{className:"w-3 h-3",style:{transition:"none",transform:"none"}})}),n.jsx("span",{children:t})]})}),!d&&n.jsx("div",{className:`flex flex-col ${m("sm","gap")}`,children:a})]}))}function pt(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=z(p,["children","showMainToggle","mainTogglePosition","showToggle","togglePosition","labelMode","expandedWidth","className","style"]);const b=Je(),g=Xe(),x=l.useRef(null),[w,y]=l.useState(null),[h,j]=l.useState(!1),N=o==="inline"&&!b.collapsed,k=N?typeof i=="number"?`${i}px`:i:g.navigationWidth,$=l.useMemo(()=>({collapsed:b.collapsed,toggle:b.toggle,navbarRef:x,activeItem:w,setActiveItem:y,isHovered:h,showInternalToggle:s,togglePosition:a,labelMode:o}),[b.collapsed,b.toggle,w,h,s,a,o]);return n.jsx(Hr.Provider,{value:$,children:n.jsxs("nav",F(M({ref:x,className:v("relative","flex-shrink-0","flex","flex-col","h-full",N?"items-stretch":"items-center",c),style:M({position:"relative",backgroundColor:"var(--color-surface-raised)",borderRight:"1px solid var(--color-line-default)",width:k,transitionProperty:"width",transitionDuration:`${g.animationDuration}ms`,transitionTimingFunction:g.animationEasing},u),onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),"aria-label":"Side navigation"},d),{children:[s&&a==="top"&&n.jsx("div",{className:`flex-shrink-0 ${m("sm","p")}`,style:{borderBottom:"1px solid var(--color-line-default)"},children:n.jsx(vr,{})}),n.jsx("div",{className:v("relative","flex-1","flex","flex-col","overflow-y-auto","overflow-x-hidden",m("sm","p"),m("sm","gap"),"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 ${m("sm","p")}`,style:{borderTop:"1px solid var(--color-line-default)"},children:n.jsx(vr,{})})]}))})}pt.Toggle=vr;pt.Item=Io;pt.Separator=Do;pt.Group=_o;pt.displayName="Navbar";pt.__SIDENAVBAR_KIND__="navbar";const Ur=l.createContext(null);function Lo(){return l.useContext(Ur)}function Xt(){const e=l.useContext(Ur);if(!e)throw new Error("useSidebarRequired must be used within a SideNavbar.Sidebar component");return e}function Fo(c){var u=c,{title:e,subtitle:t,showBorder:r=!0,children:s,className:a="",style:o}=u,i=z(u,["title","subtitle","showBorder","children","className","style"]);const{collapsed:d,registerHeader:f,unregisterHeader:p}=Xt();return l.useEffect(()=>(f(),()=>p()),[f,p]),d?null:n.jsx("div",F(M({className:`
257
257
  flex-shrink-0
258
258
  ${m("md","px")}
259
259
  ${m("sm","py")}
@@ -270,19 +270,19 @@ React keys must be passed directly to JSX without using spread:
270
270
  text-fg-secondary
271
271
  ${m("none","m")}
272
272
  ${m("xs","mt")}
273
- `,children:t})]})}))}function Lo(i){var c=i,{scrollable:e=!0,padding:t="md",children:r,className:s="",style:a}=c,o=z(c,["scrollable","padding","children","className","style"]);const{collapsed:u,setScrollPosition:d}=Xt();if(u)return null;const f=t!=="none"?m(t,"p"):"",p=e?"overflow-y-auto overflow-x-hidden":"overflow-hidden",b=e?{scrollbarWidth:rt.content.scrollbar.width,scrollbarColor:`${rt.content.scrollbar.color.thumb} ${rt.content.scrollbar.color.track}`}:{},h=g=>{e&&d(g.currentTarget.scrollTop)};return n.jsx("div",P(M({className:`
273
+ `,children:t})]})}))}function Po(i){var c=i,{scrollable:e=!0,padding:t="md",children:r,className:s="",style:a}=c,o=z(c,["scrollable","padding","children","className","style"]);const{collapsed:u,setScrollPosition:d}=Xt();if(u)return null;const f=t!=="none"?m(t,"p"):"",p=e?"overflow-y-auto overflow-x-hidden":"overflow-hidden",b=e?{scrollbarWidth:rt.content.scrollbar.width,scrollbarColor:`${rt.content.scrollbar.color.thumb} ${rt.content.scrollbar.color.track}`}:{},g=x=>{e&&d(x.currentTarget.scrollTop)};return n.jsx("div",F(M({className:`
274
274
  flex-1
275
275
  min-h-0
276
276
  ${p}
277
277
  ${f}
278
278
  ${s}
279
- `,style:M(M({},b),a),onScroll:h,tabIndex:e?0:void 0},o),{children:r}))}function Po(i){var c=i,{padding:e="md",showBorder:t=!0,children:r,className:s="",style:a}=c,o=z(c,["padding","showBorder","children","className","style"]);const{collapsed:u,registerFooter:d,unregisterFooter:f}=Xt();if(l.useEffect(()=>(d(),()=>f()),[d,f]),u)return null;const p=e!=="none"?m(e,"p"):"";return n.jsx("div",P(M({className:`
279
+ `,style:M(M({},b),a),onScroll:g,tabIndex:e?0:void 0},o),{children:r}))}function Oo(i){var c=i,{padding:e="md",showBorder:t=!0,children:r,className:s="",style:a}=c,o=z(c,["padding","showBorder","children","className","style"]);const{collapsed:u,registerFooter:d,unregisterFooter:f}=Xt();if(l.useEffect(()=>(d(),()=>f()),[d,f]),u)return null;const p=e!=="none"?m(e,"p"):"";return n.jsx("div",F(M({className:`
280
280
  flex-shrink-0
281
281
  ${p}
282
282
  ${t?"border-t border-line-default":""}
283
283
  bg-surface-subtle
284
284
  ${s}
285
- `,style:a},o),{children:r}))}function Oo(d){var f=d,{id:e,title:t,icon:r,actions:s,collapsible:a=!0,defaultCollapsed:o=!1,children:i,className:c=""}=f,u=z(f,["id","title","icon","actions","collapsible","defaultCollapsed","children","className"]);var S;const{collapsed:p,activeGroup:b,setActiveGroup:h}=Xt(),{groupStates:g,toggleGroup:w,setGroupCollapsed:v}=Je(),{animationDuration:x}=Xe(),j=l.useRef(!1);if(l.useEffect(()=>{!j.current&&g[e]===void 0&&(j.current=!0,v(e,o))},[e,o,g,v]),p)return null;const N=(S=g[e])!=null?S:o,k=b===e,$=()=>{h(e),a&&w(e)};return n.jsxs("div",P(M({className:`
285
+ `,style:a},o),{children:r}))}function zo(d){var f=d,{id:e,title:t,icon:r,actions:s,collapsible:a=!0,defaultCollapsed:o=!1,children:i,className:c=""}=f,u=z(f,["id","title","icon","actions","collapsible","defaultCollapsed","children","className"]);var S;const{collapsed:p,activeGroup:b,setActiveGroup:g}=Xt(),{groupStates:x,toggleGroup:w,setGroupCollapsed:y}=Je(),{animationDuration:h}=Xe(),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=(S=x[e])!=null?S:o,k=b===e,$=()=>{g(e),a&&w(e)};return n.jsxs("div",F(M({className:`
286
286
  border-b
287
287
  border-line-default
288
288
  last:border-b-0
@@ -305,15 +305,15 @@ React keys must be passed directly to JSX without using spread:
305
305
  text-fg-tertiary
306
306
  transition-transform
307
307
  ${N?"-rotate-90":"rotate-0"}
308
- `,style:{transitionDuration:`${x}ms`},"aria-hidden":"true"})]})]}),a?n.jsx(js,{open:!N,duration:x,children:n.jsx("div",{id:`sidebar-group-${e}`,className:`${m("md","px")} ${m("sm","py")}`,children:i})}):n.jsx("div",{className:`${m("md","px")} ${m("sm","py")}`,children:i})]}))}function zo({id:e,children:t}){const{activeSlot:r,registerSlot:s,unregisterSlot:a}=rn();return l.useEffect(()=>(s(e,t),()=>a(e)),[e,t,s,a]),r!==e?null:n.jsx(n.Fragment,{children:t})}function Vo({fallback:e=null}){const{activeSlot:t,slots:r}=rn();return!t||!r.has(t)?n.jsx(n.Fragment,{children:e}):n.jsx(n.Fragment,{children:r.get(t)})}function bt(a){var o=a,{children:e,className:t="",style:r}=o,s=z(o,["children","className","style"]);const i=Je(),c=Xe(),u=l.useRef(null),[d,f]=l.useState(0),[p,b]=l.useState(!1),[h,g]=l.useState(!1),[w,v]=l.useState(null),x=l.useCallback(()=>b(!0),[]),j=l.useCallback(()=>b(!1),[]),N=l.useCallback(()=>g(!0),[]),k=l.useCallback(()=>g(!1),[]),$=l.useMemo(()=>({collapsed:i.collapsed,currentWidth:i.currentWidth,isMobile:i.isMobile,sidebarRef:u,scrollPosition:d,setScrollPosition:f,hasHeader:p,hasFooter:h,registerHeader:x,unregisterHeader:j,registerFooter:N,unregisterFooter:k,activeGroup:w,setActiveGroup:v}),[i.collapsed,i.currentWidth,i.isMobile,d,p,h,x,j,N,k,w]),S=gr(c.contentWidth),I=gr(c.navigationWidth),C=S-I;return n.jsx(Ur.Provider,{value:$,children:n.jsx("div",P(M({ref:u,className:y("flex","flex-col","h-full","bg-surface-subtle","border-r","border-line-default","overflow-hidden",t),style:M({width:i.collapsed?0:C,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}))})}bt.Header=Fo;bt.Content=Lo;bt.Footer=Po;bt.Group=Oo;bt.Slot=zo;bt.SlotContent=Vo;function Te(A){var F=A,{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:b=!0,storageKey:h,persistWidth:g=!1,defaultCollapsed:w=!1,collapsed:v,onCollapseChange:x,onWidthChange:j,onMobileChange:N,exclusiveGroups:k=!1,showToggle:$=!0,togglePosition:S="floating",children:I}=F,C=z(F,["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 D=l.useMemo(()=>({showMainToggle:$,mainTogglePosition:S}),[$,S]);return n.jsx(Wr.Provider,{value:D,children:n.jsx(en,{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:b,storageKey:h,persistWidth:g,defaultCollapsed:w,collapsed:v,onCollapseChange:x,onWidthChange:j,onMobileChange:N,exclusiveGroups:k,children:n.jsx(Ao,P(M({},C),{children:I}))})})}Te.Navbar=pt;Te.Sidebar=bt;Te.Toggle=an;Te.ResizeHandle=sn;Te.Backdrop=nn;Te.Provider=en;Te.ThemeProvider=Js;Te.ConfigProvider=Zs;Te.StateProvider=Qs;Te.SlotProvider=Mo;function tf({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 M(M({},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(M({},f),{[d]:!f[d]}))},[]),c=l.useCallback((d,f)=>{o(p=>P(M({},p),{[d]:f}))},[]),u=l.useCallback(()=>{o(e)},[e]);return{groupStates:a,toggleGroup:i,setGroupCollapsed:c,resetGroups:u}}function rf(){const{activeItem:e,setActiveItem:t}=Br(),r=tn(),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 sf(){var r,s,a,o;const e=tn(),t=_o();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 nf(){const e=Xe(),t=Nt(),r=Je();return{theme:e,config:t,state:r}}function Wo({children:e,asChild:t=!1}){const{onOpenChange:r}=Pt();return t&&l.isValidElement(e)?l.cloneElement(e,{onClick:s=>{var a,o;r(!0),(o=(a=e.props).onClick)==null||o.call(a,s)}}):n.jsx("button",{type:"button",onClick:()=>r(!0),"aria-haspopup":"dialog",children:e})}function on(i){var c=i,{children:e,size:t="md",closeOnOverlayClick:r=!0,closeOnEscape:s=!0,className:a=""}=c,o=z(c,["children","size","closeOnOverlayClick","closeOnEscape","className"]);const{isOpen:u,onClose:d,titleId:f,descriptionId:p}=Pt(),b=l.useRef(null),h=l.useRef(null);if(_s(b,u),Fs(b,u),l.useEffect(()=>{if(!u||!s)return;const x=j=>{j.key==="Escape"&&d()};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[u,d,s]),!u)return null;const g={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",fullscreen:`max-w-full h-full ${m("none","m")} ${U("none")}`},w=x=>{r&&x.target===h.current&&d()},v=n.jsxs("div",{className:`fixed inset-0 ${xe("modal")} overflow-y-auto`,onClick:w,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 ${m("base","p")}`,children:n.jsx("div",P(M({ref:b,role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":p,className:`
308
+ `,style:{transitionDuration:`${h}ms`},"aria-hidden":"true"})]})]}),a?n.jsx(js,{open:!N,duration:h,children:n.jsx("div",{id:`sidebar-group-${e}`,className:`${m("md","px")} ${m("sm","py")}`,children:i})}):n.jsx("div",{className:`${m("md","px")} ${m("sm","py")}`,children:i})]}))}function Vo({id:e,children:t}){const{activeSlot:r,registerSlot:s,unregisterSlot:a}=rn();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}=rn();return!t||!r.has(t)?n.jsx(n.Fragment,{children:e}):n.jsx(n.Fragment,{children:r.get(t)})}function bt(a){var o=a,{children:e,className:t="",style:r}=o,s=z(o,["children","className","style"]);const i=Je(),c=Xe(),u=l.useRef(null),[d,f]=l.useState(0),[p,b]=l.useState(!1),[g,x]=l.useState(!1),[w,y]=l.useState(null),h=l.useCallback(()=>b(!0),[]),j=l.useCallback(()=>b(!1),[]),N=l.useCallback(()=>x(!0),[]),k=l.useCallback(()=>x(!1),[]),$=l.useMemo(()=>({collapsed:i.collapsed,currentWidth:i.currentWidth,isMobile:i.isMobile,sidebarRef:u,scrollPosition:d,setScrollPosition:f,hasHeader:p,hasFooter:g,registerHeader:h,unregisterHeader:j,registerFooter:N,unregisterFooter:k,activeGroup:w,setActiveGroup:y}),[i.collapsed,i.currentWidth,i.isMobile,d,p,g,h,j,N,k,w]),S=xr(c.contentWidth),I=xr(c.navigationWidth),C=S-I;return n.jsx(Ur.Provider,{value:$,children:n.jsx("div",F(M({ref:u,className:v("flex","flex-col","h-full","bg-surface-subtle","border-r","border-line-default","overflow-hidden",t),style:M({width:i.collapsed?0:C,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}))})}bt.Header=Fo;bt.Content=Po;bt.Footer=Oo;bt.Group=zo;bt.Slot=Vo;bt.SlotContent=Wo;function Te(A){var L=A,{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:b=!0,storageKey:g,persistWidth:x=!1,defaultCollapsed:w=!1,collapsed:y,onCollapseChange:h,onWidthChange:j,onMobileChange:N,exclusiveGroups:k=!1,showToggle:$=!0,togglePosition:S="floating",children:I}=L,C=z(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 D=l.useMemo(()=>({showMainToggle:$,mainTogglePosition:S}),[$,S]);return n.jsx(Wr.Provider,{value:D,children:n.jsx(en,{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:b,storageKey:g,persistWidth:x,defaultCollapsed:w,collapsed:y,onCollapseChange:h,onWidthChange:j,onMobileChange:N,exclusiveGroups:k,children:n.jsx(Ro,F(M({},C),{children:I}))})})}Te.Navbar=pt;Te.Sidebar=bt;Te.Toggle=an;Te.ResizeHandle=sn;Te.Backdrop=nn;Te.Provider=en;Te.ThemeProvider=Js;Te.ConfigProvider=Zs;Te.StateProvider=Qs;Te.SlotProvider=To;function sf({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 M(M({},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=>F(M({},f),{[d]:!f[d]}))},[]),c=l.useCallback((d,f)=>{o(p=>F(M({},p),{[d]:f}))},[]),u=l.useCallback(()=>{o(e)},[e]);return{groupStates:a,toggleGroup:i,setGroupCollapsed:c,resetGroups:u}}function nf(){const{activeItem:e,setActiveItem:t}=Br(),r=tn(),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 af(){var r,s,a,o;const e=tn(),t=Lo();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 of(){const e=Xe(),t=Nt(),r=Je();return{theme:e,config:t,state:r}}function Ho({children:e,asChild:t=!1}){const{onOpenChange:r}=Pt();return t&&l.isValidElement(e)?l.cloneElement(e,{onClick:s=>{var a,o;r(!0),(o=(a=e.props).onClick)==null||o.call(a,s)}}):n.jsx("button",{type:"button",onClick:()=>r(!0),"aria-haspopup":"dialog",children:e})}function on(i){var c=i,{children:e,size:t="md",closeOnOverlayClick:r=!0,closeOnEscape:s=!0,className:a=""}=c,o=z(c,["children","size","closeOnOverlayClick","closeOnEscape","className"]);const{isOpen:u,onClose:d,titleId:f,descriptionId:p}=Pt(),b=l.useRef(null),g=l.useRef(null);if(_s(b,u),Ls(b,u),l.useEffect(()=>{if(!u||!s)return;const h=j=>{j.key==="Escape"&&d()};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[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("none","m")} ${U("none")}`},w=h=>{r&&h.target===g.current&&d()},y=n.jsxs("div",{className:`fixed inset-0 ${he("modal")} overflow-y-auto`,onClick:w,children:[n.jsx("div",{ref:g,className:"fixed inset-0 bg-scrim transition-opacity","aria-hidden":"true"}),n.jsx("div",{className:`flex min-h-full items-center justify-center ${m("base","p")}`,children:n.jsx("div",F(M({ref:b,role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":p,className:`
309
309
  relative w-full
310
- ${g[t]}
310
+ ${x[t]}
311
311
  bg-surface-overlay
312
312
  ${U("lg")}
313
313
  ${fe("xl")}
314
314
  ${a}
315
- `,tabIndex:-1},o),{children:e}))})]});return typeof window!="undefined"?Ye.createPortal(v,document.body):v}function ln(s){var a=s,{children:e,className:t=""}=a,r=z(a,["children","className"]);return n.jsx("div",P(M({className:`flex flex-col ${m("1.5","space-y")} ${m("lg","p")} ${m("base","pb")} ${t}`},r),{children:e}))}function Ho(o){var i=o,{as:e="h2",children:t,className:r="",id:s}=i,a=z(i,["as","children","className","id"]);const c=Pt(),u=l.useId(),d=s||c.titleId||u;return n.jsx(e,P(M({id:d,className:`${ue("h3")} font-semibold leading-none tracking-tight ${r}`},a),{children:t}))}function Bo(a){var o=a,{children:e,className:t="",id:r}=o,s=z(o,["children","className","id"]);const i=Pt(),c=l.useId(),u=r||i.descriptionId||c;return n.jsx("p",P(M({id:u,className:`${ue("bodySmall")} text-fg-secondary ${t}`},s),{children:e}))}function cn(s){var a=s,{children:e,className:t=""}=a,r=z(a,["children","className"]);return n.jsx("div",P(M({className:`flex flex-col-reverse sm:flex-row sm:justify-end sm:${m("sm","space-x")} ${m("lg","p")} ${m("base","pt")} ${t}`},r),{children:e}))}function Uo({"aria-label":e="Close dialog",className:t="",asChild:r=!1,children:s}){const{onClose:a}=Pt();return r&&l.isValidElement(s)?l.cloneElement(s,{onClick:o=>{var i,c;a(),(c=(i=s.props).onClick)==null||c.call(i,o)}}):n.jsx(Q,{variant:"iconOnly",size:"sm",onClick:a,className:`absolute right-4 top-4 ${t}`,"aria-label":e,children:n.jsx(Ce,{className:"h-4 w-4"})})}function De({children:e,open:t,defaultOpen:r,onOpenChange:s}){const a=l.useId(),o=l.useId();return n.jsx(ys,{open:t,defaultOpen:r,onOpenChange:s,titleId:a,descriptionId:o,children:e})}De.Trigger=Wo;De.Content=on;De.Header=ln;De.Title=Ho;De.Description=Bo;De.Footer=cn;De.Close=Uo;function af({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)},b=()=>{d==null||d(),r==null||r(!1)};return n.jsx(De,{open:e,defaultOpen:t,onOpenChange:r,children:n.jsx(on,{size:"sm",closeOnOverlayClick:!1,children:f||n.jsxs(n.Fragment,{children:[n.jsxs(ln,{children:[n.jsx(De.Title,{children:s}),a&&n.jsx(De.Description,{children:a})]}),n.jsxs(cn,{children:[n.jsx(Q,{variant:"outline",onClick:b,children:i}),n.jsx(Q,{variant:c==="destructive"?"error":"primary",onClick:p,children:o})]})]})})})}const of={success:mr,error:ws,warning:Vc,info:Tc},lf={success:"border-success",error:"border-error",warning:"border-warning",info:"border-info"},cf={success:"text-fg-success",error:"text-fg-error",warning:"text-fg-warning",info:"text-fg-info"};function Go(i){var c=i,{toast:e,onDismiss:t,position:r="top-right",className:s="",style:a}=c,o=z(c,["toast","onDismiss","position","className","style"]);const[u,d]=l.useState(!1),[f,p]=l.useState(!1),b=of[e.variant];l.useEffect(()=>{if(e.duration===void 0)return;d(!0);const w=setTimeout(()=>{p(!0),setTimeout(()=>{t(e.id)},300)},e.duration);return()=>clearTimeout(w)},[e.duration,e.id,t]),l.useEffect(()=>{const w=setTimeout(()=>d(!0),10);return()=>clearTimeout(w)},[]);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"},g=()=>{p(!0),setTimeout(()=>{t(e.id)},300)};return n.jsx("div",P(M({className:`
316
- fixed ${h[r]} ${xe("toast")}
315
+ `,tabIndex:-1},o),{children:e}))})]});return typeof window!="undefined"?Ye.createPortal(y,document.body):y}function ln(s){var a=s,{children:e,className:t=""}=a,r=z(a,["children","className"]);return n.jsx("div",F(M({className:`flex flex-col ${m("1.5","space-y")} ${m("lg","p")} ${m("base","pb")} ${t}`},r),{children:e}))}function Bo(o){var i=o,{as:e="h2",children:t,className:r="",id:s}=i,a=z(i,["as","children","className","id"]);const c=Pt(),u=l.useId(),d=s||c.titleId||u;return n.jsx(e,F(M({id:d,className:`${ue("h3")} font-semibold leading-none tracking-tight ${r}`},a),{children:t}))}function Uo(a){var o=a,{children:e,className:t="",id:r}=o,s=z(o,["children","className","id"]);const i=Pt(),c=l.useId(),u=r||i.descriptionId||c;return n.jsx("p",F(M({id:u,className:`${ue("bodySmall")} text-fg-secondary ${t}`},s),{children:e}))}function cn(s){var a=s,{children:e,className:t=""}=a,r=z(a,["children","className"]);return n.jsx("div",F(M({className:`flex flex-col-reverse sm:flex-row sm:justify-end sm:${m("sm","space-x")} ${m("lg","p")} ${m("base","pt")} ${t}`},r),{children:e}))}function Go({"aria-label":e="Close dialog",className:t="",asChild:r=!1,children:s}){const{onClose:a}=Pt();return r&&l.isValidElement(s)?l.cloneElement(s,{onClick:o=>{var i,c;a(),(c=(i=s.props).onClick)==null||c.call(i,o)}}):n.jsx(Q,{variant:"iconOnly",size:"sm",onClick:a,className:`absolute right-4 top-4 ${t}`,"aria-label":e,children:n.jsx(Ce,{className:"h-4 w-4"})})}function De({children:e,open:t,defaultOpen:r,onOpenChange:s}){const a=l.useId(),o=l.useId();return n.jsx(ys,{open:t,defaultOpen:r,onOpenChange:s,titleId:a,descriptionId:o,children:e})}De.Trigger=Ho;De.Content=on;De.Header=ln;De.Title=Bo;De.Description=Uo;De.Footer=cn;De.Close=Go;function lf({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)},b=()=>{d==null||d(),r==null||r(!1)};return n.jsx(De,{open:e,defaultOpen:t,onOpenChange:r,children:n.jsx(on,{size:"sm",closeOnOverlayClick:!1,children:f||n.jsxs(n.Fragment,{children:[n.jsxs(ln,{children:[n.jsx(De.Title,{children:s}),a&&n.jsx(De.Description,{children:a})]}),n.jsxs(cn,{children:[n.jsx(Q,{variant:"outline",onClick:b,children:i}),n.jsx(Q,{variant:c==="destructive"?"error":"primary",onClick:p,children:o})]})]})})})}const cf={success:mr,error:ws,warning:Wc,info:Ac},df={success:"border-success",error:"border-error",warning:"border-warning",info:"border-info"},uf={success:"text-fg-success",error:"text-fg-error",warning:"text-fg-warning",info:"text-fg-info"};function Ko(i){var c=i,{toast:e,onDismiss:t,position:r="top-right",className:s="",style:a}=c,o=z(c,["toast","onDismiss","position","className","style"]);const[u,d]=l.useState(!1),[f,p]=l.useState(!1),b=cf[e.variant];l.useEffect(()=>{if(e.duration===void 0)return;d(!0);const w=setTimeout(()=>{p(!0),setTimeout(()=>{t(e.id)},300)},e.duration);return()=>clearTimeout(w)},[e.duration,e.id,t]),l.useEffect(()=>{const w=setTimeout(()=>d(!0),10);return()=>clearTimeout(w)},[]);const g={"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",F(M({className:`
316
+ fixed ${g[r]} ${he("toast")}
317
317
  w-full max-w-sm
318
318
  transition-all duration-300 ease-in-out
319
319
  ${u&&!f?"opacity-100 translate-y-0":"opacity-0 -translate-y-2"}
@@ -326,8 +326,8 @@ React keys must be passed directly to JSX without using spread:
326
326
  ${U("lg")}
327
327
  ${fe("lg")}
328
328
  border
329
- ${lf[e.variant]}
330
- `,children:[n.jsx("div",{className:`flex-shrink-0 ${cf[e.variant]}`,children:n.jsx(b,{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:`${m("xs","mt")} text-sm text-fg-secondary`,children:e.description}),e.action&&n.jsx("div",{className:m("md","mt"),children:n.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{var w;(w=e.action)==null||w.onClick(),g()},children:e.action.label})})]}),n.jsx(Q,{variant:"iconOnly",size:"sm",onClick:g,className:"flex-shrink-0","aria-label":"Dismiss notification",children:n.jsx(Ce,{className:"h-4 w-4"})})]})}))}function df({position:e="top-right",maxToasts:t}){const{toasts:r,removeToast:s}=vs(),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 ${xe("toast")}`,"aria-live":"polite","aria-label":"Notifications",children:a.map((i,c)=>{const u=e.includes("top"),d=1+c*5;return n.jsx(Go,{toast:i,onDismiss:s,position:e,style:{[u?"top":"bottom"]:`${d}rem`}},i.id)})});return typeof window!="undefined"?Ye.createPortal(o,document.body):o}function uf(){const{addToast:e,removeToast:t,clearAll:r}=vs(),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(M({title:d,description:f,variant:"success"},p)),[s]),o=l.useCallback((d,f,p)=>s(M({title:d,description:f,variant:"error"},p)),[s]),i=l.useCallback((d,f,p)=>s(M({title:d,description:f,variant:"warning"},p)),[s]),c=l.useCallback((d,f,p)=>s(M({title:d,description:f,variant:"info"},p)),[s]),u=l.useCallback((d,f,p,b="info",h)=>s({title:d,description:f,variant:b,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 Ko({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,b=p?t:d,h=k=>k<b?"completed":k===b?"active":"pending",g=()=>{if(b<e.length-1){const k=b+1;p||f(k),s==null||s(k)}else a==null||a()},w=()=>{if(b>0){const k=b-1;p||f(k),s==null||s(k)}},v=k=>{o&&(e[k].disabled||(p||f(k),s==null||s(k)))},x=e[b],j=b===0,N=b===e.length-1;return c==="vertical"?n.jsxs("div",{className:`flex ${m("base","gap")} ${u}`,children:[n.jsx("div",{className:"flex flex-col",children:e.map((k,$)=>{const S=k.status||h($),I=$===b;return n.jsxs("div",{className:`flex items-start ${m("md","gap")}`,children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("button",P(M({type:"button",onClick:()=>v($),disabled:!o||k.disabled,"aria-label":k.title?`Step ${$+1}: ${k.title}`:`Step ${$+1}`},S==="pending"?{"data-marker":"pending"}:{}),{className:`
329
+ ${df[e.variant]}
330
+ `,children:[n.jsx("div",{className:`flex-shrink-0 ${uf[e.variant]}`,children:n.jsx(b,{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:`${m("xs","mt")} text-sm text-fg-secondary`,children:e.description}),e.action&&n.jsx("div",{className:m("md","mt"),children:n.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{var w;(w=e.action)==null||w.onClick(),x()},children:e.action.label})})]}),n.jsx(Q,{variant:"iconOnly",size:"sm",onClick:x,className:"flex-shrink-0","aria-label":"Dismiss notification",children:n.jsx(Ce,{className:"h-4 w-4"})})]})}))}function ff({position:e="top-right",maxToasts:t}){const{toasts:r,removeToast:s}=vs(),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 ${he("toast")}`,"aria-live":"polite","aria-label":"Notifications",children:a.map((i,c)=>{const u=e.includes("top"),d=1+c*5;return n.jsx(Ko,{toast:i,onDismiss:s,position:e,style:{[u?"top":"bottom"]:`${d}rem`}},i.id)})});return typeof window!="undefined"?Ye.createPortal(o,document.body):o}function mf(){const{addToast:e,removeToast:t,clearAll:r}=vs(),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(M({title:d,description:f,variant:"success"},p)),[s]),o=l.useCallback((d,f,p)=>s(M({title:d,description:f,variant:"error"},p)),[s]),i=l.useCallback((d,f,p)=>s(M({title:d,description:f,variant:"warning"},p)),[s]),c=l.useCallback((d,f,p)=>s(M({title:d,description:f,variant:"info"},p)),[s]),u=l.useCallback((d,f,p,b="info",g)=>s({title:d,description:f,variant:b,duration:g,action:{label:"Undo",onClick:p}}),[s]);return{show:s,success:a,error:o,warning:i,info:c,withUndo:u,dismiss:t,clearAll:r}}function Yo({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,b=p?t:d,g=k=>k<b?"completed":k===b?"active":"pending",x=()=>{if(b<e.length-1){const k=b+1;p||f(k),s==null||s(k)}else a==null||a()},w=()=>{if(b>0){const k=b-1;p||f(k),s==null||s(k)}},y=k=>{o&&(e[k].disabled||(p||f(k),s==null||s(k)))},h=e[b],j=b===0,N=b===e.length-1;return c==="vertical"?n.jsxs("div",{className:`flex ${m("base","gap")} ${u}`,children:[n.jsx("div",{className:"flex flex-col",children:e.map((k,$)=>{const S=k.status||g($),I=$===b;return n.jsxs("div",{className:`flex items-start ${m("md","gap")}`,children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("button",F(M({type:"button",onClick:()=>y($),disabled:!o||k.disabled,"aria-label":k.title?`Step ${$+1}: ${k.title}`:`Step ${$+1}`},S==="pending"?{"data-marker":"pending"}:{}),{className:`
331
331
  flex
332
332
  items-center
333
333
  justify-center
@@ -343,7 +343,7 @@ React keys must be passed directly to JSX without using spread:
343
343
  h-12
344
344
  ${m("sm","mt")}
345
345
  ${S==="completed"?"bg-success":"bg-line-emphasis"}
346
- `})]}),n.jsxs("div",{className:`flex-1 ${m("xl","pb")}`,children:[n.jsx("button",{type:"button",onClick:()=>v($),disabled:!o||k.disabled,className:`
346
+ `})]}),n.jsxs("div",{className:`flex-1 ${m("xl","pb")}`,children:[n.jsx("button",{type:"button",onClick:()=>y($),disabled:!o||k.disabled,className:`
347
347
  text-left
348
348
  ${I?"font-semibold":"font-medium"}
349
349
  ${S==="active"?"text-fg-brand-emphasis":"text-fg-secondary"}
@@ -354,7 +354,7 @@ React keys must be passed directly to JSX without using spread:
354
354
  border-line-default
355
355
  ${U("lg")}
356
356
  bg-surface-base
357
- `,children:x.content}),n.jsxs("div",{className:`flex justify-between ${m("base","mt")} ${m("base","gap")}`,children:[n.jsx(Q,{variant:"outline",onClick:w,disabled:j,children:"Previous"}),n.jsx(Q,{variant:"primary",onClick:g,children:N?"Complete":"Next"})]})]})]}):n.jsxs("div",{className:`${m("lg","space-y")} ${u}`,children:[n.jsx("div",{className:"flex items-center",children:e.map((k,$)=>{const S=k.status||h($),I=$===b;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(M({type:"button",onClick:()=>v($),disabled:!o||k.disabled,"aria-label":k.title?`Step ${$+1}: ${k.title}`:`Step ${$+1}`},S==="pending"?{"data-marker":"pending"}:{}),{className:`
357
+ `,children:h.content}),n.jsxs("div",{className:`flex justify-between ${m("base","mt")} ${m("base","gap")}`,children:[n.jsx(Q,{variant:"outline",onClick:w,disabled:j,children:"Previous"}),n.jsx(Q,{variant:"primary",onClick:x,children:N?"Complete":"Next"})]})]})]}):n.jsxs("div",{className:`${m("lg","space-y")} ${u}`,children:[n.jsx("div",{className:"flex items-center",children:e.map((k,$)=>{const S=k.status||g($),I=$===b;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",F(M({type:"button",onClick:()=>y($),disabled:!o||k.disabled,"aria-label":k.title?`Step ${$+1}: ${k.title}`:`Step ${$+1}`},S==="pending"?{"data-marker":"pending"}:{}),{className:`
358
358
  flex
359
359
  items-center
360
360
  justify-center
@@ -377,7 +377,7 @@ React keys must be passed directly to JSX without using spread:
377
377
  border-line-default
378
378
  ${U("lg")}
379
379
  bg-surface-base
380
- `,children:x.content}),n.jsxs("div",{className:`flex justify-between ${m("base","gap")}`,children:[n.jsx(Q,{variant:"outline",onClick:w,disabled:j,children:"Previous"}),n.jsx(Q,{variant:"primary",onClick:g,children:N?"Complete":"Next"})]})]})}function ff({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(M({},o==="default"?{"data-marker":"pending"}:{}),{className:`
380
+ `,children:h.content}),n.jsxs("div",{className:`flex justify-between ${m("base","gap")}`,children:[n.jsx(Q,{variant:"outline",onClick:w,disabled:j,children:"Previous"}),n.jsx(Q,{variant:"primary",onClick:x,children:N?"Complete":"Next"})]})]})}function pf({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",F(M({},o==="default"?{"data-marker":"pending"}:{}),{className:`
381
381
  flex
382
382
  items-center
383
383
  justify-center
@@ -391,7 +391,7 @@ React keys must be passed directly to JSX without using spread:
391
391
  h-0.5
392
392
  ${m("sm","mt")}
393
393
  ${o==="completed"?"bg-success":"bg-line-emphasis"}
394
- `}),n.jsxs("div",{className:`${m("base","mt")} text-center ${m("base","px")}`,children:[s.timestamp&&n.jsx("p",{className:`text-xs text-fg-tertiary ${m("xs","mb")}`,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 ${m("xs","mt")}`,children:s.description}),s.content&&n.jsx("div",{className:m("sm","mt"),children:s.content})]})]})},s.id)})}):n.jsx("div",{className:`${m("none","space-y")} ${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 ${m("base","gap")}`,children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("div",P(M({},o==="default"?{"data-marker":"pending"}:{}),{className:`
394
+ `}),n.jsxs("div",{className:`${m("base","mt")} text-center ${m("base","px")}`,children:[s.timestamp&&n.jsx("p",{className:`text-xs text-fg-tertiary ${m("xs","mb")}`,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 ${m("xs","mt")}`,children:s.description}),s.content&&n.jsx("div",{className:m("sm","mt"),children:s.content})]})]})},s.id)})}):n.jsx("div",{className:`${m("none","space-y")} ${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 ${m("base","gap")}`,children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("div",F(M({},o==="default"?{"data-marker":"pending"}:{}),{className:`
395
395
  flex
396
396
  items-center
397
397
  justify-center
@@ -410,10 +410,10 @@ React keys must be passed directly to JSX without using spread:
410
410
  text-base
411
411
  font-semibold
412
412
  ${o==="active"?"text-fg-brand-emphasis":"text-fg-primary"}
413
- `,children:s.title}),s.description&&n.jsx("p",{className:`text-sm text-fg-secondary ${m("xs","mt")}`,children:s.description}),s.content&&n.jsx("div",{className:m("md","mt"),children:s.content})]})]},s.id)})})}function mf({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(""),[b,h]=l.useState(0),g=l.useRef(null),w=l.useRef(null),v=t!==void 0,x=v?t:u,j=e.filter(C=>{var R,_;if(!f)return!0;const A=f.toLowerCase(),F=C.label.toLowerCase().includes(A),D=(R=C.description)==null?void 0:R.toLowerCase().includes(A),T=(_=C.keywords)==null?void 0:_.some(V=>V.toLowerCase().includes(A));return F||D||T}),N=j.reduce((C,A)=>{const F=A.group||"Other";return C[F]||(C[F]=[]),C[F].push(A),C},{}),k=l.useCallback(C=>{v||d(C),s==null||s(C),C&&(p(""),h(0),setTimeout(()=>{var A;return(A=g.current)==null?void 0:A.focus()},0))},[v,s]),$=C=>{C.action(),k(!1)},S=C=>{if(C.key==="Escape"){k(!1);return}if(C.key==="ArrowDown"){C.preventDefault(),h(A=>Math.min(A+1,j.length-1));return}if(C.key==="ArrowUp"){C.preventDefault(),h(A=>Math.max(A-1,0));return}if(C.key==="Enter"){C.preventDefault(),j[b]&&$(j[b]);return}};l.useEffect(()=>{if(w.current&&b>=0){const C=w.current.querySelector(`[data-index="${b}"]`);C&&typeof C.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest",behavior:"smooth"})}},[b]),l.useEffect(()=>{h(0)},[f]),l.useEffect(()=>{const C=A=>{(A.metaKey||A.ctrlKey)&&A.key==="k"&&(A.preventDefault(),k(!x))};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[x,k]);const I=x?n.jsx("div",{className:`
413
+ `,children:s.title}),s.description&&n.jsx("p",{className:`text-sm text-fg-secondary ${m("xs","mt")}`,children:s.description}),s.content&&n.jsx("div",{className:m("md","mt"),children:s.content})]})]},s.id)})})}function bf({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(""),[b,g]=l.useState(0),x=l.useRef(null),w=l.useRef(null),y=t!==void 0,h=y?t:u,j=e.filter(C=>{var R,_;if(!f)return!0;const A=f.toLowerCase(),L=C.label.toLowerCase().includes(A),D=(R=C.description)==null?void 0:R.toLowerCase().includes(A),T=(_=C.keywords)==null?void 0:_.some(V=>V.toLowerCase().includes(A));return L||D||T}),N=j.reduce((C,A)=>{const L=A.group||"Other";return C[L]||(C[L]=[]),C[L].push(A),C},{}),k=l.useCallback(C=>{y||d(C),s==null||s(C),C&&(p(""),g(0),setTimeout(()=>{var A;return(A=x.current)==null?void 0:A.focus()},0))},[y,s]),$=C=>{C.action(),k(!1)},S=C=>{if(C.key==="Escape"){k(!1);return}if(C.key==="ArrowDown"){C.preventDefault(),g(A=>Math.min(A+1,j.length-1));return}if(C.key==="ArrowUp"){C.preventDefault(),g(A=>Math.max(A-1,0));return}if(C.key==="Enter"){C.preventDefault(),j[b]&&$(j[b]);return}};l.useEffect(()=>{if(w.current&&b>=0){const C=w.current.querySelector(`[data-index="${b}"]`);C&&typeof C.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest",behavior:"smooth"})}},[b]),l.useEffect(()=>{g(0)},[f]),l.useEffect(()=>{const C=A=>{(A.metaKey||A.ctrlKey)&&A.key==="k"&&(A.preventDefault(),k(!h))};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[h,k]);const I=h?n.jsx("div",{className:`
414
414
  fixed
415
415
  inset-0
416
- ${xe("modal-backdrop")}
416
+ ${he("modal-backdrop")}
417
417
  bg-scrim
418
418
  flex
419
419
  items-start
@@ -427,7 +427,7 @@ React keys must be passed directly to JSX without using spread:
427
427
  bg-surface-overlay
428
428
  ${U("lg")}
429
429
  ${fe("xl")}
430
- ${xe("modal")}
430
+ ${he("modal")}
431
431
  ${ye("base")}
432
432
  ${c}
433
433
  `,onClick:C=>C.stopPropagation(),children:[n.jsxs("div",{className:`
@@ -437,7 +437,7 @@ React keys must be passed directly to JSX without using spread:
437
437
  ${m("base","p")}
438
438
  border-b
439
439
  border-line-default
440
- `,children:[n.jsx(ds,{className:"h-5 w-5 text-fg-secondary"}),n.jsx(Ee,{ref:g,value:f,onChange:C=>p(C.target.value),onKeyDown:S,placeholder:o,className:"flex-1 border-0 focus:ring-0",autoFocus:!0}),n.jsxs("div",{className:`
440
+ `,children:[n.jsx(ds,{className:"h-5 w-5 text-fg-secondary"}),n.jsx(Ee,{ref:x,value:f,onChange:C=>p(C.target.value),onKeyDown:S,placeholder:o,className:"flex-1 border-0 focus:ring-0",autoFocus:!0}),n.jsxs("div",{className:`
441
441
  flex
442
442
  items-center
443
443
  ${m("xs","gap")}
@@ -447,7 +447,7 @@ React keys must be passed directly to JSX without using spread:
447
447
  bg-surface-muted
448
448
  text-xs
449
449
  text-fg-tertiary
450
- `,children:[n.jsx(pc,{className:"h-3 w-3"}),n.jsx("span",{children:"K"})]})]}),n.jsx("div",{ref:w,className:`
450
+ `,children:[n.jsx(bc,{className:"h-3 w-3"}),n.jsx("span",{children:"K"})]})]}),n.jsx("div",{ref:w,className:`
451
451
  max-h-96
452
452
  overflow-y-auto
453
453
  ${m("sm","py")}
@@ -464,7 +464,7 @@ React keys must be passed directly to JSX without using spread:
464
464
  text-fg-tertiary
465
465
  uppercase
466
466
  tracking-wider
467
- `,children:C}),A.map((F,D)=>{const T=j.indexOf(F),R=T===b;return n.jsxs("button",{type:"button","data-index":T,onClick:()=>$(F),className:`
467
+ `,children:C}),A.map((L,D)=>{const T=j.indexOf(L),R=T===b;return n.jsxs("button",{type:"button","data-index":T,onClick:()=>$(L),className:`
468
468
  w-full
469
469
  flex
470
470
  items-center
@@ -474,13 +474,13 @@ React keys must be passed directly to JSX without using spread:
474
474
  text-left
475
475
  ${ye("base")}
476
476
  ${R?"bg-surface-brand-muted":"hover:bg-surface-hover"}
477
- `,children:[F.icon&&n.jsx("div",{className:`
477
+ `,children:[L.icon&&n.jsx("div",{className:`
478
478
  ${R?"text-fg-brand-emphasis":"text-fg-secondary"}
479
- `,children:F.icon}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:`
479
+ `,children:L.icon}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:`
480
480
  text-sm
481
481
  font-medium
482
482
  ${R?"text-fg-brand-emphasis":"text-fg-primary"}
483
- `,children:F.label}),F.description&&n.jsx("div",{className:`text-xs ${R?"text-fg-secondary":"text-fg-tertiary"} ${m("0.5","mt")}`,children:F.description})]})]},F.id)})]},C))})]})}):null;return n.jsxs(n.Fragment,{children:[a?n.jsx("div",{onClick:()=>k(!0),children:a}):null,typeof window!="undefined"&&Ye.createPortal(I,document.body)]})}function pf({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:b,columnWidths:h,onColumnResize:g,selectable:w=!1,selectedRows:v,onSelectionChange:x,rowId:j,exportable:N=!1,onExport:k,exportFormats:$=["csv","xlsx","json"],pagination:S,filters:I,actions:C,toolbarActions:A,virtualScrolling:F=!1,virtualScrollingOptions:D,emptyMessage:T,emptyStateTitle:R,emptyStateMessage:_,emptyStateIllustration:V,emptyStateAction:B,className:X=""}){const[Z,oe]=l.useState(h||{}),H=l.useMemo(()=>e.map(J=>P(M({},J),{width:Z[J.key]||J.defaultWidth})),[e,Z]),L=J=>{k?k(J):J==="csv"?Y(t,e):J==="json"&&ee(t)},Y=(J,te)=>{const ae=te.filter(pe=>pe.exportable!==!1).map(pe=>pe.label||pe.key),O=J.map(pe=>te.filter(we=>we.exportable!==!1).map(we=>{const Ae=pe[we.key];return typeof Ae=="string"&&Ae.includes(",")?`"${Ae}"`:Ae})),W=[ae.join(","),...O.map(pe=>pe.join(","))].join(`
483
+ `,children:L.label}),L.description&&n.jsx("div",{className:`text-xs ${R?"text-fg-secondary":"text-fg-tertiary"} ${m("0.5","mt")}`,children:L.description})]})]},L.id)})]},C))})]})}):null;return n.jsxs(n.Fragment,{children:[a?n.jsx("div",{onClick:()=>k(!0),children:a}):null,typeof window!="undefined"&&Ye.createPortal(I,document.body)]})}function gf({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:b,columnWidths:g,onColumnResize:x,selectable:w=!1,selectedRows:y,onSelectionChange:h,rowId:j,exportable:N=!1,onExport:k,exportFormats:$=["csv","xlsx","json"],pagination:S,filters:I,actions:C,toolbarActions:A,virtualScrolling:L=!1,virtualScrollingOptions:D,emptyMessage:T,emptyStateTitle:R,emptyStateMessage:_,emptyStateIllustration:V,emptyStateAction:B,className:X=""}){const[Z,oe]=l.useState(g||{}),H=l.useMemo(()=>e.map(J=>F(M({},J),{width:Z[J.key]||J.defaultWidth})),[e,Z]),P=J=>{k?k(J):J==="csv"?Y(t,e):J==="json"&&ee(t)},Y=(J,te)=>{const ae=te.filter(be=>be.exportable!==!1).map(be=>be.label||be.key),O=J.map(be=>te.filter(we=>we.exportable!==!1).map(we=>{const Ae=be[we.key];return typeof Ae=="string"&&Ae.includes(",")?`"${Ae}"`:Ae})),W=[ae.join(","),...O.map(be=>be.join(","))].join(`
484
484
  `),q=new Blob([W],{type:"text/csv"}),ce=URL.createObjectURL(q),ie=document.createElement("a");ie.href=ce,ie.download=`export-${Date.now()}.csv`,ie.click(),URL.revokeObjectURL(ce)},ee=J=>{const te=JSON.stringify(J,null,2),ae=new Blob([te],{type:"application/json"}),O=URL.createObjectURL(ae),W=document.createElement("a");W.href=O,W.download=`export-${Date.now()}.json`,W.click(),URL.revokeObjectURL(O)};return n.jsxs("div",{className:`${m("base","space-y")} ${X}`,children:[(N||A)&&n.jsxs("div",{className:`
485
485
  flex
486
486
  items-center
@@ -490,5 +490,5 @@ React keys must be passed directly to JSX without using spread:
490
490
  border
491
491
  border-line-default
492
492
  ${U("lg")}
493
- `,children:[n.jsx("div",{className:`flex items-center ${m("sm","gap")}`}),n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[A,N&&n.jsx("div",{className:`flex items-center ${m("xs","gap")}`,children:$.map(J=>n.jsx(Q,{variant:"outline",size:"sm",leftIcon:n.jsx(hc,{className:"h-4 w-4"}),onClick:()=>L(J),children:J.toUpperCase()},J))})]})]}),n.jsx(Me,{columns:H,data:t,loading:r,onSort:s,sortColumn:a,sortDirection:o,pagination:S,filters:I,selectable:w,selectedRows:v,onSelectionChange:x,rowId:j,actions:C,resizable:f,columnWidths:Z,onColumnResize:(J,te)=>{oe(ae=>P(M({},ae),{[J]:te})),g==null||g(J,te)},virtualScrolling:F,virtualScrollingOptions:D,emptyMessage:T,emptyStateTitle:R,emptyStateMessage:_,emptyStateIllustration:V,emptyStateAction:B})]})}function bf({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(""),[b,h]=l.useState(1),g=l.useMemo(()=>e.map(k=>{if(k.accessor||k.header){const $=k.key||(typeof k.accessor=="string"?k.accessor:String(k.accessor)),S=k.label||k.header||"";return P(M({},k),{key:$,label:S})}return k}),[e]),w=l.useMemo(()=>{if(!f.trim())return t;const k=f.toLowerCase();return t.filter($=>g.some(S=>{const I=$[String(S.key)];return String(I).toLowerCase().includes(k)}))},[t,f,g]),v=l.useMemo(()=>{if(!o)return w;const k=(b-1)*a,$=k+a;return w.slice(k,$)},[w,b,a,o]),x=o?Math.ceil(w.length/a):1,j=k=>{h(k)},N=k=>{p(k),h(1)};return n.jsx(ut,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Ft,{spacing:"md",children:[n.jsxs("div",{className:`flex items-center justify-between ${m("base","gap")}`,children:[s&&n.jsx("div",{className:"flex-1 max-w-md",children:n.jsx(_r,{placeholder:r,value:f,onSearch:N})}),i&&n.jsx("div",{className:`flex ${m("sm","gap")}`,children:i})]}),n.jsx(Me,{columns:g,data:v,loading:u,emptyMessage:d,onRowClick:c?k=>{const $=w.findIndex(S=>S===k);c(k,$>=0?$:v.findIndex(S=>S===k))}:void 0}),o&&x>1&&n.jsx("div",{className:"flex justify-center",children:n.jsx(qa,{currentPage:b,totalPages:x,onPageChange:j})}),s&&n.jsxs("div",{className:"text-sm text-fg-secondary text-center",children:["Showing ",v.length," of ",w.length," results"]})]})})}function hf({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=()=>sr(null,null,function*(){const v=e[a];if(v.validate&&!(yield v.validate())){d(P(M({},u),{[a]:!0}));return}d(P(M({},u),{[a]:!1})),v.onSubmit&&(yield v.onSubmit(i)),a<e.length-1?o(a+1):t&&t(i)}),p=()=>{a>0&&r&&(o(a-1),d(P(M({},u),{[a-1]:!1})))},b=v=>{r&&v<a&&o(v)},h=e[a],g=a===e.length-1,w=u[a]===!0;return n.jsx(ut,{maxWidth:"lg",paddingX:"base",paddingY:"lg",children:n.jsxs(Ft,{spacing:"lg",children:[n.jsx(Ko,{steps:e.map((v,x)=>({id:v.id,title:v.title,content:v.content,description:v.description,status:x<a?"completed":x===a?w?"error":"active":"pending"})),currentStep:a,onStepChange:b,allowNavigation:r}),n.jsx("div",{className:`bg-surface-base ${U("lg")} border ${m("lg","p")}`,children:n.jsxs(Ft,{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 ${m("xs","mt")}`,children:h.description})]}),w&&n.jsx("div",{className:`bg-error-bg border border-error-border rounded ${m("md","p")}`,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 ${m("base","pt")} border-t`,children:[n.jsx(Q,{variant:"outline",onClick:p,disabled:a===0,children:"Back"}),n.jsx(Q,{variant:"primary",onClick:f,children:g?"Complete":"Next"})]})]})})]})})}function xf({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({}),b=l.useMemo(()=>{let v=e;if(u.trim()&&t){const x=u.toLowerCase();v=v.filter(j=>t(x,j))}return r&&Object.keys(f).length>0&&(v=v.filter(x=>r(f,x))),v},[e,u,f,t,r]),h=(v,x)=>{p(j=>P(M({},j),{[v]:x}))},g=()=>{p({}),d("")},w=u.trim().length>0||Object.keys(f).length>0;return n.jsx(ut,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Ft,{spacing:"md",children:[n.jsx(ft,{padding:"medium",children:n.jsxs(Ft,{spacing:"md",children:[n.jsx("div",{children:n.jsx(_r,{placeholder:o,value:u,onSearch:d})}),a.length>0&&n.jsx("div",{className:`flex flex-wrap ${m("sm","gap")}`,children:a.map(v=>{var x;return n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[n.jsxs($e,{className:"text-fg-secondary text-sm",children:[v.label,":"]}),n.jsxs("select",{className:`${m("md","px")} ${m("xs","py")} border rounded text-sm`,"aria-label":v.label,value:String(f[v.id]||""),onChange:j=>h(v.id,j.target.value||void 0),children:[n.jsx("option",{value:"",children:"All"}),(x=v.options)==null?void 0:x.map(j=>n.jsx("option",{value:String(j.value||""),children:j.label},j.id))]})]},v.id)})}),w&&n.jsx("div",{children:n.jsx(Q,{variant:"outline",size:"sm",onClick:g,children:"Clear Filters"})})]})}),c&&n.jsxs("div",{className:"text-sm text-fg-secondary",children:["Showing ",b.length," of ",e.length," results",w&&" (filtered)"]}),b.length===0?n.jsx(ft,{padding:"large",children:n.jsx("div",{className:"text-center text-fg-secondary",children:n.jsx($e,{children:i})})}):n.jsx("div",{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 ${m("base","gap")}`,children:b.map((v,x)=>n.jsx("div",{children:s(v,x)},x))})]})})}function gf({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(Te,P(M({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(ut,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:r})}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsx(ut,{maxWidth:"xl",paddingX:"base",paddingY:"base",children:t})}),s&&n.jsx("footer",{className:"border-t bg-surface-base",children:n.jsx(ut,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:s})})]})]})}const vf=he(y("w-full flex flex-col",m("2xl","py"),m("lg","px"),m("xl","gap-y")),{variants:{variant:{plain:"",gradient:"hero-gradient","gradient-glow":y("hero-gradient","hero-glow")},align:{start:"text-left",center:"text-center"}},defaultVariants:{variant:"plain",align:"start"}}),yf={start:"items-start",center:"items-center"},wf={start:"justify-start",center:"justify-center"},Yo=l.forwardRef(function(g,h){var w=g,{kicker:t,title:r,description:s,actions:a,kpis:o,meta:i,variant:c="plain",align:u="start",className:d,"aria-label":f,"aria-labelledby":p}=w,b=z(w,["kicker","title","description","actions","kpis","meta","variant","align","className","aria-label","aria-labelledby"]);const v=f!=null||p!=null,x=f!=null?f:typeof r=="string"?r:void 0;return typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&!v&&typeof r!="string"&&console.warn("[HeroSection] A non-string `title` was provided without `aria-label` or `aria-labelledby`. The hero <section> landmark will have no accessible name. Pass `aria-label`, or set `aria-labelledby` to your title's id."),n.jsxs("section",P(M({ref:h,className:y(vf({variant:c,align:u}),d),"aria-label":x,"aria-labelledby":p},b),{children:[n.jsxs("div",{className:y("flex flex-col",m("md","gap-y"),yf[u]),children:[t?n.jsx($e,{as:"span",variant:"caption",colorRole:"primary",colorShade:"DEFAULT",className:"text-sm font-semibold tracking-wide uppercase",children:t}):null,n.jsx($e,{as:"h1",variant:"heading",className:"text-3xl font-bold tracking-tight sm:text-4xl",children:r}),s?n.jsx($e,{as:"p",variant:"body",colorRole:"neutral",colorShade:"DEFAULT",className:"max-w-2xl text-base leading-relaxed sm:text-lg",children:s}):null]}),a?n.jsx("div",{className:y("flex flex-wrap",m("sm","gap"),wf[u]),children:a}):null,o?n.jsx("div",{className:"w-full",children:o}):null,i?n.jsx($e,{as:"p",variant:"caption",colorRole:"neutral",colorShade:"light",className:"text-sm",children:i}):null]}))});Yo.displayName="HeroSection";const kf=he(y("flex items-center","border-b"),{variants:{variant:{default:y("border-line-default",m("base","gap-x")),sub:y("border-line-muted",m("sm","gap-x"))}},defaultVariants:{variant:"default"}}),jf=he(y("relative -mb-px inline-flex items-center",m("xs","gap-x"),"border-b-2 border-transparent","transition-colors","focus:outline-none","focus-visible:ring-2","focus-visible:ring-line-focus","focus-visible:ring-offset-2",U("sm")),{variants:{variant:{default:y(m("sm","px"),m("sm","py"),re("body")),sub:y(m("sm","px"),m("xs","py"),re("bodySmall"))},active:{true:y("border-line-brand","text-fg-brand-emphasis","font-medium"),false:y("text-fg-secondary","hover:text-fg-primary","hover:border-line-muted")}},compoundVariants:[{variant:"sub",active:!1,class:y("text-fg-tertiary","hover:text-fg-secondary")}],defaultVariants:{variant:"default",active:!1}}),Nf=y("inline-flex items-center justify-center",U("full"),m("xs","px"),"bg-surface-muted text-fg-secondary text-xs"),qo=l.forwardRef(function(d,u){var f=d,{items:t,variant:r="default",linkComponent:s,className:a,"aria-label":o,"aria-labelledby":i}=f,c=z(f,["items","variant","linkComponent","className","aria-label","aria-labelledby"]);typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&!o&&!i&&console.warn('[TabsAsLinks] renders a <nav> landmark and should have an accessible name. Pass `aria-label` (e.g. "Painel") or `aria-labelledby` — multiple unnamed navs on a page are ambiguous to screen readers.');const p=s!=null?s:"a";return n.jsx("nav",P(M({ref:u,className:y(kf({variant:r}),a),"aria-label":o,"aria-labelledby":i},c),{children:t.map((b,h)=>n.jsxs(p,{href:b.href,"aria-current":b.active?"page":void 0,"data-active":b.active?"true":void 0,className:jf({variant:r,active:!!b.active}),children:[b.icon?n.jsx("span",{"aria-hidden":"true",className:"inline-flex shrink-0",children:b.icon}):null,n.jsx("span",{children:b.label}),b.count!==void 0?n.jsx("span",{className:Nf,children:b.count}):null]},b.href||h))}))});qo.displayName="TabsAsLinks";function Sf(e,t={}){const{rootMargin:r="0px 0px -50% 0px",threshold:s=0}=t,[a,o]=l.useState(null),i=e.join("|");return l.useEffect(()=>{if(typeof window=="undefined"||typeof IntersectionObserver=="undefined")return;const c=e.map(d=>document.getElementById(d)).filter(d=>d!==null);if(c.length===0)return;const u=new IntersectionObserver(d=>{const f=d.filter(p=>p.isIntersecting).sort((p,b)=>p.boundingClientRect.top-b.boundingClientRect.top);f.length>0&&o(f[0].target.id)},{rootMargin:r,threshold:s});return c.forEach(d=>u.observe(d)),()=>u.disconnect()},[i,r,s]),a}exports.AMBER=lt;exports.Accordion=ku;exports.AlertDialog=af;exports.AppProvider=Ul;exports.Autocomplete=ao;exports.AutocompleteList=Fr;exports.AutocompleteOption=Is;exports.Avatar=pr;exports.AvatarGroup=vd;exports.BLUE=Zn;exports.BRAND_COLORS=Di;exports.BRAND_PRIMARY=st;exports.BRAND_SECONDARY=nt;exports.BREAKPOINT_TOKENS=kr;exports.Badge=Ia;exports.Breadcrumb=Ya;exports.BreakpointTokenFactory=Tt;exports.Button=Q;exports.COLOR_SCALES=bi;exports.CYAN=at;exports.Card=ft;exports.Checkbox=Mr;exports.Chip=$s;exports.Collapsible=js;exports.ColorPicker=hu;exports.CommandPalette=mf;exports.ConfigProvider=$a;exports.DashboardLayout=gf;exports.DataGrid=pf;exports.DataTablePattern=bf;exports.DatePicker=du;exports.DatePickerCalendar=Rs;exports.DatePickerInput=As;exports.DatePickerProvider=fs;exports.Dialog=De;exports.DialogClose=Uo;exports.DialogContent=on;exports.DialogContext=Nr;exports.DialogDescription=Bo;exports.DialogFooter=cn;exports.DialogHeader=ln;exports.DialogProvider=ys;exports.DialogTitle=Ho;exports.DialogTrigger=Wo;exports.Drawer=Yt;exports.DrawerContent=Ls;exports.DrawerFooter=uo;exports.DrawerHeader=co;exports.Dropdown=Ja;exports.EMERALD=it;exports.EmptyState=Xa;exports.ErrorMessage=_a;exports.FONT_FAMILY_TOKENS=ui;exports.FONT_WEIGHT_TOKENS=fi;exports.FUCHSIA=Qn;exports.FileUpload=pu;exports.FilterChips=Ad;exports.Form=_d;exports.FormContext=Rd;exports.FormField=Fd;exports.FormProvider=Wa;exports.FormWizardPattern=hf;exports.GRAY=Kn;exports.GREEN=Yn;exports.Header=jt;exports.HeaderActions=go;exports.HeaderComponent=jt;exports.HeaderHamburger=vo;exports.HeaderLogo=ho;exports.HeaderMobileMenu=yo;exports.HeaderNavigation=xo;exports.HeaderProvider=ms;exports.HeroSection=Yo;exports.INDIGO=Un;exports.Info=Yl;exports.Input=Ee;exports.LIME=sa;exports.Label=Dt;exports.LoginBox=Cu;exports.Menu=qt;exports.MenuContent=mo;exports.MenuItem=zs;exports.MenuSeparator=po;exports.MenuTrigger=Os;exports.Modal=Eu;exports.MultiSelect=oo;exports.NavLink=Cr;exports.Navbar=pt;exports.NavbarContext=Hr;exports.NavbarGroup=Do;exports.NavbarItem=Ro;exports.NavbarSeparator=Io;exports.NavbarToggle=vr;exports.Navigation=wo;exports.NavigationComponent=wo;exports.ORANGE=Xn;exports.PINK=ea;exports.PRIMITIVE_COLORS=bs;exports.PURPLE=ta;exports.PageHeader=ko;exports.PageHeaderComponent=ko;exports.Pagination=qa;exports.Popover=Ds;exports.Progress=Ns;exports.RED=Jn;exports.ROSE=ct;exports.Radio=La;exports.Rating=mu;exports.SEMANTIC_COLORS=wi;exports.SEMANTIC_COLORS_DARK=wr;exports.SEMANTIC_COLORS_LIGHT=Kt;exports.SIDEBAR_TOKENS=rt;exports.SKY=dt;exports.SLATE=ot;exports.SPACING_TOKENS=yr;exports.SearchAndFilterPattern=xf;exports.SearchInput=_r;exports.Select=Er;exports.Separator=Ss;exports.SideNavbar=Te;exports.SideNavbarBackdrop=nn;exports.SideNavbarConfigContext=Or;exports.SideNavbarConfigProvider=Zs;exports.SideNavbarProvider=en;exports.SideNavbarResizeHandle=sn;exports.SideNavbarRoot=Ao;exports.SideNavbarStateContext=zr;exports.SideNavbarStateProvider=Qs;exports.SideNavbarThemeContext=Pr;exports.SideNavbarThemeProvider=Js;exports.SideNavbarToggle=an;exports.SideNavbarToggleContext=Wr;exports.Sidebar=bt;exports.SidebarContent=Lo;exports.SidebarContext=Ur;exports.SidebarFooter=Po;exports.SidebarGroup=Oo;exports.SidebarHeader=Fo;exports.SidebarSlot=zo;exports.SidebarSlotContent=Vo;exports.SidebarSlotContext=Vr;exports.SidebarSlotProvider=Mo;exports.Skeleton=Fa;exports.Slider=Oa;exports.SpacingTokenFactory=ve;exports.Spinner=ks;exports.Stat=Ed;exports.StatGroup=Td;exports.Stepper=Ko;exports.Switch=Pa;exports.TEAL=ra;exports.TYPOGRAPHY_TOKENS=wt;exports.Table=Me;exports.TableActions=Gs;exports.TableBody=Ys;exports.TableCell=Us;exports.TableContext=Mu;exports.TableEmptyState=Ks;exports.TableFilters=qs;exports.TableHeader=Bs;exports.TableHeaderCell=Ws;exports.TableHeaderRow=Hs;exports.TablePagination=Xs;exports.TableProvider=ps;exports.TableRow=xr;exports.Tabs=fu;exports.TabsAsLinks=qo;exports.TabsContent=no;exports.TabsContext=Rr;exports.TabsList=ro;exports.TabsProvider=to;exports.TabsTrigger=so;exports.Text=$e;exports.Textarea=Da;exports.ThemeProvider=Na;exports.TimePicker=bu;exports.Timeline=ff;exports.Toast=Go;exports.ToastContainer=df;exports.ToastContext=jr;exports.ToastProvider=Ca;exports.Tooltip=_t;exports.TypographyTokenFactory=be;exports.VIOLET=Gn;exports.YELLOW=qn;exports.blendColors=hs;exports.clampWidth=ur;exports.cn=y;exports.darken=Ii;exports.defaultConfigValues=Ne;exports.defaultThemeValues=Rt;exports.formatKeyboardShortcut=Wu;exports.getAnimation=Tl;exports.getAnimationClass=ye;exports.getBreakpoint=_i;exports.getColor=ji;exports.getColorClass=Si;exports.getContrastColor=Ai;exports.getFocusColorClass=Ei;exports.getFocusRingClass=Mi;exports.getHoverColorClass=Ci;exports.getMediaQuery=Fi;exports.getNestedIndentClass=ci;exports.getOpacity=Il;exports.getOpacityClass=Dl;exports.getPrimitiveColor=Lt;exports.getPrimitiveColorPalette=yi;exports.getSemanticColor=Ut;exports.getSemanticColorClass=$i;exports.getSemanticColorRole=ki;exports.getSemanticColorValue=Ni;exports.getSpacing=di;exports.getSpacingClass=m;exports.getTransitionClass=Al;exports.getTypography=mi;exports.getTypographyClasses=ue;exports.getTypographyLineHeight=pi;exports.getTypographySize=re;exports.getTypographySizeFromFontSize=je;exports.getTypographyWeight=ze;exports.getTypographyWeightFromFontWeight=It;exports.getZIndex=Rl;exports.getZIndexClass=xe;exports.isLightColor=na;exports.lighten=Ri;exports.parseKeyboardShortcut=No;exports.parseWidthToPixels=gr;exports.useApp=Gl;exports.useColumnResizing=Fu;exports.useConfig=zl;exports.useDialogContext=Pt;exports.useDialogContextOptional=Wl;exports.useFocusManagement=Co;exports.useFormContext=Cs;exports.useFormContextOptional=Dd;exports.useFormFieldArray=nu;exports.useGroupState=tf;exports.useHeaderContext=Vs;exports.useKeyboardShortcut=Eo;exports.useNavLink=Ra;exports.useNavbar=Ju;exports.useNavbarRequired=Br;exports.useResize=So;exports.useResponsiveSidebar=$o;exports.useScrollSpy=Sf;exports.useSideNavbarCombined=nf;exports.useSideNavbarConfig=Pu;exports.useSideNavbarConfigRequired=Nt;exports.useSideNavbarContent=sf;exports.useSideNavbarNavigation=rf;exports.useSideNavbarState=Ou;exports.useSideNavbarStateRequired=Je;exports.useSideNavbarTheme=Lu;exports.useSideNavbarThemeRequired=Xe;exports.useSideNavbarToggleContext=Hu;exports.useSideNavbarToggleContextRequired=To;exports.useSidebar=_o;exports.useSidebarRequired=Xt;exports.useSidebarSlot=tn;exports.useSidebarSlotRequired=rn;exports.useTableContext=Ve;exports.useTableContextOptional=Au;exports.useTabsContext=Ir;exports.useTabsContextOptional=uu;exports.useTheme=Pl;exports.useToast=uf;exports.useToastContext=vs;exports.useToastContextOptional=Vl;exports.useVirtualScrolling=jo;exports.validateWidthBounds=zu;exports.withOpacity=Ti;
493
+ `,children:[n.jsx("div",{className:`flex items-center ${m("sm","gap")}`}),n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[A,N&&n.jsx("div",{className:`flex items-center ${m("xs","gap")}`,children:$.map(J=>n.jsx(Q,{variant:"outline",size:"sm",leftIcon:n.jsx(hc,{className:"h-4 w-4"}),onClick:()=>P(J),children:J.toUpperCase()},J))})]})]}),n.jsx(Me,{columns:H,data:t,loading:r,onSort:s,sortColumn:a,sortDirection:o,pagination:S,filters:I,selectable:w,selectedRows:y,onSelectionChange:h,rowId:j,actions:C,resizable:f,columnWidths:Z,onColumnResize:(J,te)=>{oe(ae=>F(M({},ae),{[J]:te})),x==null||x(J,te)},virtualScrolling:L,virtualScrollingOptions:D,emptyMessage:T,emptyStateTitle:R,emptyStateMessage:_,emptyStateIllustration:V,emptyStateAction:B})]})}function hf({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(""),[b,g]=l.useState(1),x=l.useMemo(()=>e.map(k=>{if(k.accessor||k.header){const $=k.key||(typeof k.accessor=="string"?k.accessor:String(k.accessor)),S=k.label||k.header||"";return F(M({},k),{key:$,label:S})}return k}),[e]),w=l.useMemo(()=>{if(!f.trim())return t;const k=f.toLowerCase();return t.filter($=>x.some(S=>{const I=$[String(S.key)];return String(I).toLowerCase().includes(k)}))},[t,f,x]),y=l.useMemo(()=>{if(!o)return w;const k=(b-1)*a,$=k+a;return w.slice(k,$)},[w,b,a,o]),h=o?Math.ceil(w.length/a):1,j=k=>{g(k)},N=k=>{p(k),g(1)};return n.jsx(ut,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Lt,{spacing:"md",children:[n.jsxs("div",{className:`flex items-center justify-between ${m("base","gap")}`,children:[s&&n.jsx("div",{className:"flex-1 max-w-md",children:n.jsx(_r,{placeholder:r,value:f,onSearch:N})}),i&&n.jsx("div",{className:`flex ${m("sm","gap")}`,children:i})]}),n.jsx(Me,{columns:x,data:y,loading:u,emptyMessage:d,onRowClick:c?k=>{const $=w.findIndex(S=>S===k);c(k,$>=0?$:y.findIndex(S=>S===k))}:void 0}),o&&h>1&&n.jsx("div",{className:"flex justify-center",children:n.jsx(Xa,{currentPage:b,totalPages:h,onPageChange:j})}),s&&n.jsxs("div",{className:"text-sm text-fg-secondary text-center",children:["Showing ",y.length," of ",w.length," results"]})]})})}function xf({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=()=>sr(null,null,function*(){const y=e[a];if(y.validate&&!(yield y.validate())){d(F(M({},u),{[a]:!0}));return}d(F(M({},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(F(M({},u),{[a-1]:!1})))},b=y=>{r&&y<a&&o(y)},g=e[a],x=a===e.length-1,w=u[a]===!0;return n.jsx(ut,{maxWidth:"lg",paddingX:"base",paddingY:"lg",children:n.jsxs(Lt,{spacing:"lg",children:[n.jsx(Yo,{steps:e.map((y,h)=>({id:y.id,title:y.title,content:y.content,description:y.description,status:h<a?"completed":h===a?w?"error":"active":"pending"})),currentStep:a,onStepChange:b,allowNavigation:r}),n.jsx("div",{className:`bg-surface-base ${U("lg")} border ${m("lg","p")}`,children:n.jsxs(Lt,{spacing:"md",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-semibold",children:g.title}),g.description&&n.jsx("p",{className:`text-fg-secondary ${m("xs","mt")}`,children:g.description})]}),w&&n.jsx("div",{className:`bg-error-bg border border-error-border rounded ${m("md","p")}`,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:g.fields}),n.jsxs("div",{className:`flex justify-between ${m("base","pt")} border-t`,children:[n.jsx(Q,{variant:"outline",onClick:p,disabled:a===0,children:"Back"}),n.jsx(Q,{variant:"primary",onClick:f,children:x?"Complete":"Next"})]})]})})]})})}function vf({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({}),b=l.useMemo(()=>{let y=e;if(u.trim()&&t){const h=u.toLowerCase();y=y.filter(j=>t(h,j))}return r&&Object.keys(f).length>0&&(y=y.filter(h=>r(f,h))),y},[e,u,f,t,r]),g=(y,h)=>{p(j=>F(M({},j),{[y]:h}))},x=()=>{p({}),d("")},w=u.trim().length>0||Object.keys(f).length>0;return n.jsx(ut,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Lt,{spacing:"md",children:[n.jsx(ft,{padding:"medium",children:n.jsxs(Lt,{spacing:"md",children:[n.jsx("div",{children:n.jsx(_r,{placeholder:o,value:u,onSearch:d})}),a.length>0&&n.jsx("div",{className:`flex flex-wrap ${m("sm","gap")}`,children:a.map(y=>{var h;return n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[n.jsxs($e,{className:"text-fg-secondary text-sm",children:[y.label,":"]}),n.jsxs("select",{className:`${m("md","px")} ${m("xs","py")} border rounded text-sm`,"aria-label":y.label,value:String(f[y.id]||""),onChange:j=>g(y.id,j.target.value||void 0),children:[n.jsx("option",{value:"",children:"All"}),(h=y.options)==null?void 0:h.map(j=>n.jsx("option",{value:String(j.value||""),children:j.label},j.id))]})]},y.id)})}),w&&n.jsx("div",{children:n.jsx(Q,{variant:"outline",size:"sm",onClick:x,children:"Clear Filters"})})]})}),c&&n.jsxs("div",{className:"text-sm text-fg-secondary",children:["Showing ",b.length," of ",e.length," results",w&&" (filtered)"]}),b.length===0?n.jsx(ft,{padding:"large",children:n.jsx("div",{className:"text-center text-fg-secondary",children:n.jsx($e,{children:i})})}):n.jsx("div",{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 ${m("base","gap")}`,children:b.map((y,h)=>n.jsx("div",{children:s(y,h)},h))})]})})}function yf({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(Te,F(M({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(ut,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:r})}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsx(ut,{maxWidth:"xl",paddingX:"base",paddingY:"base",children:t})}),s&&n.jsx("footer",{className:"border-t bg-surface-base",children:n.jsx(ut,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:s})})]})]})}const wf=pe(v("w-full flex flex-col",m("2xl","py"),m("lg","px"),m("xl","gap-y")),{variants:{variant:{plain:"",gradient:"hero-gradient","gradient-glow":v("hero-gradient","hero-glow")},align:{start:"text-left",center:"text-center"}},defaultVariants:{variant:"plain",align:"start"}}),kf={start:"items-start",center:"items-center"},jf={start:"justify-start",center:"justify-center"},qo=l.forwardRef(function(x,g){var w=x,{kicker:t,title:r,description:s,actions:a,kpis:o,meta:i,variant:c="plain",align:u="start",className:d,"aria-label":f,"aria-labelledby":p}=w,b=z(w,["kicker","title","description","actions","kpis","meta","variant","align","className","aria-label","aria-labelledby"]);const y=f!=null||p!=null,h=f!=null?f:typeof r=="string"?r:void 0;return typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&!y&&typeof r!="string"&&console.warn("[HeroSection] A non-string `title` was provided without `aria-label` or `aria-labelledby`. The hero <section> landmark will have no accessible name. Pass `aria-label`, or set `aria-labelledby` to your title's id."),n.jsxs("section",F(M({ref:g,className:v(wf({variant:c,align:u}),d),"aria-label":h,"aria-labelledby":p},b),{children:[n.jsxs("div",{className:v("flex flex-col",m("md","gap-y"),kf[u]),children:[t?n.jsx($e,{as:"span",variant:"caption",colorRole:"primary",colorShade:"DEFAULT",className:"text-sm font-semibold tracking-wide uppercase",children:t}):null,n.jsx($e,{as:"h1",variant:"heading",className:"text-3xl font-bold tracking-tight sm:text-4xl",children:r}),s?n.jsx($e,{as:"p",variant:"body",colorRole:"neutral",colorShade:"DEFAULT",className:"max-w-2xl text-base leading-relaxed sm:text-lg",children:s}):null]}),a?n.jsx("div",{className:v("flex flex-wrap",m("sm","gap"),jf[u]),children:a}):null,o?n.jsx("div",{className:"w-full",children:o}):null,i?n.jsx($e,{as:"p",variant:"caption",colorRole:"neutral",colorShade:"light",className:"text-sm",children:i}):null]}))});qo.displayName="HeroSection";const Nf=pe(v("flex items-center","border-b"),{variants:{variant:{default:v("border-line-default",m("base","gap-x")),sub:v("border-line-muted",m("sm","gap-x"))}},defaultVariants:{variant:"default"}}),Sf=pe(v("relative -mb-px inline-flex items-center",m("xs","gap-x"),"border-b-2 border-transparent","transition-colors","focus:outline-none","focus-visible:ring-2","focus-visible:ring-line-focus","focus-visible:ring-offset-2",U("sm")),{variants:{variant:{default:v(m("sm","px"),m("sm","py"),re("body")),sub:v(m("sm","px"),m("xs","py"),re("bodySmall"))},active:{true:v("border-line-brand","text-fg-brand-emphasis","font-medium"),false:v("text-fg-secondary","hover:text-fg-primary","hover:border-line-muted")}},compoundVariants:[{variant:"sub",active:!1,class:v("text-fg-tertiary","hover:text-fg-secondary")}],defaultVariants:{variant:"default",active:!1}}),$f=v("inline-flex items-center justify-center",U("full"),m("xs","px"),"bg-surface-muted text-fg-secondary text-xs"),Xo=l.forwardRef(function(d,u){var f=d,{items:t,variant:r="default",linkComponent:s,className:a,"aria-label":o,"aria-labelledby":i}=f,c=z(f,["items","variant","linkComponent","className","aria-label","aria-labelledby"]);typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&!o&&!i&&console.warn('[TabsAsLinks] renders a <nav> landmark and should have an accessible name. Pass `aria-label` (e.g. "Painel") or `aria-labelledby` — multiple unnamed navs on a page are ambiguous to screen readers.');const p=s!=null?s:"a";return n.jsx("nav",F(M({ref:u,className:v(Nf({variant:r}),a),"aria-label":o,"aria-labelledby":i},c),{children:t.map((b,g)=>n.jsxs(p,{href:b.href,"aria-current":b.active?"page":void 0,"data-active":b.active?"true":void 0,className:Sf({variant:r,active:!!b.active}),children:[b.icon?n.jsx("span",{"aria-hidden":"true",className:"inline-flex shrink-0",children:b.icon}):null,n.jsx("span",{children:b.label}),b.count!==void 0?n.jsx("span",{className:$f,children:b.count}):null]},b.href||g))}))});Xo.displayName="TabsAsLinks";function Cf(i){var c=i,{children:e,orientation:t="horizontal",size:r="md",attached:s=!1,className:a=""}=c,o=z(c,["children","orientation","size","attached","className"]);const u={horizontal:"flex-row",vertical:"flex-col"},d={sm:s?"":m("xs","gap"),md:s?"":m("sm","gap"),lg:s?"":m("md","gap")};return n.jsx("div",F(M({role:"group",className:v("inline-flex",u[t],d[r],s&&U("md"),a)},o),{children:e}))}function Ef(e,t={}){const{rootMargin:r="0px 0px -50% 0px",threshold:s=0}=t,[a,o]=l.useState(null),i=e.join("|");return l.useEffect(()=>{if(typeof window=="undefined"||typeof IntersectionObserver=="undefined")return;const c=e.map(d=>document.getElementById(d)).filter(d=>d!==null);if(c.length===0)return;const u=new IntersectionObserver(d=>{const f=d.filter(p=>p.isIntersecting).sort((p,b)=>p.boundingClientRect.top-b.boundingClientRect.top);f.length>0&&o(f[0].target.id)},{rootMargin:r,threshold:s});return c.forEach(d=>u.observe(d)),()=>u.disconnect()},[i,r,s]),a}exports.AMBER=lt;exports.Accordion=Nu;exports.AlertDialog=lf;exports.AppProvider=Gl;exports.Autocomplete=oo;exports.AutocompleteList=Lr;exports.AutocompleteOption=Is;exports.Avatar=pr;exports.AvatarGroup=yd;exports.BLUE=Zn;exports.BRAND_COLORS=_i;exports.BRAND_PRIMARY=st;exports.BRAND_SECONDARY=nt;exports.BREAKPOINT_TOKENS=kr;exports.Badge=Ia;exports.Breadcrumb=qa;exports.BreakpointTokenFactory=Tt;exports.Button=Q;exports.ButtonGroup=Cf;exports.COLOR_SCALES=gi;exports.CYAN=at;exports.Card=ft;exports.Checkbox=Mr;exports.Chip=$s;exports.Collapsible=js;exports.ColorPicker=xu;exports.CommandPalette=bf;exports.ConfigProvider=$a;exports.DashboardLayout=yf;exports.DataGrid=gf;exports.DataTablePattern=hf;exports.DatePicker=fu;exports.DatePickerCalendar=Rs;exports.DatePickerInput=As;exports.DatePickerProvider=fs;exports.Dialog=De;exports.DialogClose=Go;exports.DialogContent=on;exports.DialogContext=Nr;exports.DialogDescription=Uo;exports.DialogFooter=cn;exports.DialogHeader=ln;exports.DialogProvider=ys;exports.DialogTitle=Bo;exports.DialogTrigger=Ho;exports.Dot=za;exports.Drawer=Yt;exports.DrawerContent=Fs;exports.DrawerFooter=fo;exports.DrawerHeader=uo;exports.Dropdown=Za;exports.EMERALD=it;exports.EmptyState=Ja;exports.ErrorMessage=_a;exports.FONT_FAMILY_TOKENS=fi;exports.FONT_WEIGHT_TOKENS=mi;exports.FUCHSIA=Qn;exports.FileUpload=gu;exports.FilterChips=Id;exports.Form=Fd;exports.FormContext=Dd;exports.FormField=Pd;exports.FormProvider=Ha;exports.FormWizardPattern=xf;exports.GRAY=Kn;exports.GREEN=Yn;exports.Header=jt;exports.HeaderActions=vo;exports.HeaderComponent=jt;exports.HeaderHamburger=yo;exports.HeaderLogo=ho;exports.HeaderMobileMenu=wo;exports.HeaderNavigation=xo;exports.HeaderProvider=ms;exports.HeroSection=qo;exports.INDIGO=Un;exports.Info=ql;exports.Input=Ee;exports.LIME=sa;exports.Label=Dt;exports.LoginBox=Mu;exports.Menu=qt;exports.MenuContent=po;exports.MenuItem=zs;exports.MenuSeparator=bo;exports.MenuTrigger=Os;exports.Modal=Tu;exports.MultiSelect=io;exports.NavLink=Cr;exports.Navbar=pt;exports.NavbarContext=Hr;exports.NavbarGroup=_o;exports.NavbarItem=Io;exports.NavbarSeparator=Do;exports.NavbarToggle=vr;exports.Navigation=ko;exports.NavigationComponent=ko;exports.ORANGE=Xn;exports.PINK=ea;exports.PRIMITIVE_COLORS=bs;exports.PURPLE=ta;exports.PageHeader=jo;exports.PageHeaderComponent=jo;exports.Pagination=Xa;exports.Popover=Ds;exports.Progress=Ns;exports.RED=Jn;exports.ROSE=ct;exports.Radio=Fa;exports.Rating=bu;exports.SEMANTIC_COLORS=ki;exports.SEMANTIC_COLORS_DARK=wr;exports.SEMANTIC_COLORS_LIGHT=Kt;exports.SIDEBAR_TOKENS=rt;exports.SKY=dt;exports.SLATE=ot;exports.SPACING_TOKENS=yr;exports.SearchAndFilterPattern=vf;exports.SearchInput=_r;exports.Select=Er;exports.Separator=Ss;exports.SideNavbar=Te;exports.SideNavbarBackdrop=nn;exports.SideNavbarConfigContext=Or;exports.SideNavbarConfigProvider=Zs;exports.SideNavbarProvider=en;exports.SideNavbarResizeHandle=sn;exports.SideNavbarRoot=Ro;exports.SideNavbarStateContext=zr;exports.SideNavbarStateProvider=Qs;exports.SideNavbarThemeContext=Pr;exports.SideNavbarThemeProvider=Js;exports.SideNavbarToggle=an;exports.SideNavbarToggleContext=Wr;exports.Sidebar=bt;exports.SidebarContent=Po;exports.SidebarContext=Ur;exports.SidebarFooter=Oo;exports.SidebarGroup=zo;exports.SidebarHeader=Fo;exports.SidebarSlot=Vo;exports.SidebarSlotContent=Wo;exports.SidebarSlotContext=Vr;exports.SidebarSlotProvider=To;exports.Skeleton=La;exports.Slider=Oa;exports.SpacingTokenFactory=ve;exports.Spinner=ks;exports.Stat=Td;exports.StatGroup=Rd;exports.Stepper=Yo;exports.Switch=Pa;exports.TEAL=ra;exports.TYPOGRAPHY_TOKENS=wt;exports.Table=Me;exports.TableActions=Gs;exports.TableBody=Ys;exports.TableCell=Us;exports.TableContext=Au;exports.TableEmptyState=Ks;exports.TableFilters=qs;exports.TableHeader=Bs;exports.TableHeaderCell=Ws;exports.TableHeaderRow=Hs;exports.TablePagination=Xs;exports.TableProvider=ps;exports.TableRow=hr;exports.Tabs=pu;exports.TabsAsLinks=Xo;exports.TabsContent=ao;exports.TabsContext=Rr;exports.TabsList=so;exports.TabsProvider=ro;exports.TabsTrigger=no;exports.Text=$e;exports.Textarea=Da;exports.ThemeProvider=Na;exports.TimePicker=hu;exports.Timeline=pf;exports.Toast=Ko;exports.ToastContainer=ff;exports.ToastContext=jr;exports.ToastProvider=Ca;exports.Tooltip=_t;exports.TypographyTokenFactory=ge;exports.VIOLET=Gn;exports.YELLOW=qn;exports.blendColors=gs;exports.clampWidth=ur;exports.cn=v;exports.darken=Di;exports.defaultConfigValues=Ne;exports.defaultThemeValues=Rt;exports.formatKeyboardShortcut=Bu;exports.getAnimation=Al;exports.getAnimationClass=ye;exports.getBreakpoint=Li;exports.getColor=Ni;exports.getColorClass=$i;exports.getContrastColor=Ri;exports.getFocusColorClass=Mi;exports.getFocusRingClass=Ti;exports.getHoverColorClass=Ei;exports.getMediaQuery=Fi;exports.getNestedIndentClass=di;exports.getOpacity=Dl;exports.getOpacityClass=_l;exports.getPrimitiveColor=Ft;exports.getPrimitiveColorPalette=wi;exports.getSemanticColor=Ut;exports.getSemanticColorClass=Ci;exports.getSemanticColorRole=ji;exports.getSemanticColorValue=Si;exports.getSpacing=ui;exports.getSpacingClass=m;exports.getTransitionClass=Rl;exports.getTypography=pi;exports.getTypographyClasses=ue;exports.getTypographyLineHeight=bi;exports.getTypographySize=re;exports.getTypographySizeFromFontSize=je;exports.getTypographyWeight=ze;exports.getTypographyWeightFromFontWeight=It;exports.getZIndex=Il;exports.getZIndexClass=he;exports.isLightColor=na;exports.lighten=Ii;exports.parseKeyboardShortcut=So;exports.parseWidthToPixels=xr;exports.useApp=Kl;exports.useColumnResizing=Pu;exports.useConfig=Vl;exports.useDialogContext=Pt;exports.useDialogContextOptional=Hl;exports.useFocusManagement=Eo;exports.useFormContext=Cs;exports.useFormContextOptional=Ld;exports.useFormFieldArray=ou;exports.useGroupState=sf;exports.useHeaderContext=Vs;exports.useKeyboardShortcut=Mo;exports.useNavLink=Ra;exports.useNavbar=Qu;exports.useNavbarRequired=Br;exports.useResize=$o;exports.useResponsiveSidebar=Co;exports.useScrollSpy=Ef;exports.useSideNavbarCombined=of;exports.useSideNavbarConfig=zu;exports.useSideNavbarConfigRequired=Nt;exports.useSideNavbarContent=af;exports.useSideNavbarNavigation=nf;exports.useSideNavbarState=Vu;exports.useSideNavbarStateRequired=Je;exports.useSideNavbarTheme=Ou;exports.useSideNavbarThemeRequired=Xe;exports.useSideNavbarToggleContext=Uu;exports.useSideNavbarToggleContextRequired=Ao;exports.useSidebar=Lo;exports.useSidebarRequired=Xt;exports.useSidebarSlot=tn;exports.useSidebarSlotRequired=rn;exports.useTableContext=Ve;exports.useTableContextOptional=Iu;exports.useTabsContext=Ir;exports.useTabsContextOptional=mu;exports.useTheme=Ol;exports.useToast=mf;exports.useToastContext=vs;exports.useToastContextOptional=Wl;exports.useVirtualScrolling=No;exports.validateWidthBounds=Wu;exports.withOpacity=Ai;
494
494
  //# sourceMappingURL=index.cjs.map