@fabio.caffarello/react-design-system 1.23.7 → 1.23.9
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 +87 -87
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2473 -2450
- package/dist/index.js.map +1 -1
- package/dist/ui/components/MultiSelect/MultiSelect.d.ts +6 -0
- package/dist/ui/primitives/Slider/Slider.d.ts +9 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Fo=Object.defineProperty,_o=Object.defineProperties;var Po=Object.getOwnPropertyDescriptors;var tr=Object.getOwnPropertySymbols;var fn=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable;var Ur=(e,t,r)=>t in e?Fo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))fn.call(t,r)&&Ur(e,r,t[r]);if(tr)for(var r of tr(t))mn.call(t,r)&&Ur(e,r,t[r]);return e},P=(e,t)=>_o(e,Po(t));var O=(e,t)=>{var r={};for(var s in e)fn.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&tr)for(var s of tr(e))t.indexOf(s)<0&&mn.call(e,s)&&(r[s]=e[s]);return r};var pn=(e,t,r)=>Ur(e,typeof t!="symbol"?t+"":t,r);var rr=(e,t,r)=>new Promise((s,a)=>{var o=u=>{try{c(r.next(u))}catch(d){a(d)}},i=u=>{try{c(r.throw(u))}catch(d){a(d)}},c=u=>u.done?s(u.value):Promise.resolve(u.value).then(o,i);c((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),Ue=require("react-dom"),Je={icon:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},text:{xs:"text-xs",sm:"text-sm",base:"text-base"},spacing:{itemPaddingX:"px-4",itemPaddingY:"py-2",nestedIndent:"pl-6",nestedIndentLevel2:"pl-10",nestedIndentLevel3:"pl-14",groupTitlePadding:"px-4 py-2",iconMargin:"mr-3"},colors:{active:{bg:"bg-surface-brand-muted",text:"text-fg-brand-emphasis",border:"border-line-brand"},inactive:{text:"text-fg-secondary",hover:"hover:bg-surface-hover hover:text-fg-primary"},groupTitle:"text-fg-tertiary"},chevron:{size:"h-3 w-3",color:"text-fg-quaternary"},navigation:{width:{default:"56px",compact:"48px",expanded:"200px"},background:{default:"#fafafa",hover:"#f5f5f5"}},split:{transition:"transition-all duration-300",collapsedWidth:"0px"},content:{scrollbar:{width:"thin",color:{thumb:"#cbd5e1",track:"#f1f5f9"}}}};function zo(e){return e<=0?Je.spacing.itemPaddingX:e===1?Je.spacing.nestedIndent:e===2?Je.spacing.nestedIndentLevel2:e===3?Je.spacing.nestedIndentLevel3:`pl-${4+e*4}`}class pe{static create(t){const r=t*this.BASE_UNIT,s=r/16;return{value:r,rem:`${s}rem`,px:`${r}px`,tailwind:this.getTailwindClass(t)}}static getTailwindClass(t){return{0:"0",.5:"0.5",1:"1",1.5:"1.5",2:"2",2.5:"2.5",3:"3",3.5:"3.5",4:"4",5:"5",6:"6",8:"8",10:"10",12:"12",16:"16",20:"20",24:"24",32:"32",40:"40",48:"48",64:"64",80:"80",96:"96"}[t]||String(t)}}pn(pe,"BASE_UNIT",4);const xr={none:pe.create(0),"0.5":pe.create(.5),xs:pe.create(1),"1.5":pe.create(1.5),sm:pe.create(2),"2.5":pe.create(2.5),md:pe.create(3),"3.5":pe.create(3.5),base:pe.create(4),lg:pe.create(6),xl:pe.create(8),"2xl":pe.create(10),"3xl":pe.create(12),"4xl":pe.create(16),"5xl":pe.create(20),"6xl":pe.create(24)};function Oo(e){return xr[e]}function E(e,t="p"){const s=xr[e].tailwind;return`${{p:"p",m:"m",px:"px",mx:"mx",py:"py",my:"my",pt:"pt",mt:"mt",pr:"pr",mr:"mr",pb:"pb",mb:"mb",pl:"pl",ml:"ml",gap:"gap","gap-x":"gap-x","gap-y":"gap-y","space-y":"space-y"}[t]}-${s}`}class fe{static createFontSize(t){const s={"2xs":{px:10,tailwind:"text-2xs"},xs:{px:12,tailwind:"text-xs"},sm:{px:14,tailwind:"text-sm"},base:{px:16,tailwind:"text-base"},lg:{px:18,tailwind:"text-lg"},xl:{px:20,tailwind:"text-xl"},"2xl":{px:24,tailwind:"text-2xl"},"3xl":{px:30,tailwind:"text-3xl"},"4xl":{px:36,tailwind:"text-4xl"},"5xl":{px:48,tailwind:"text-5xl"},"6xl":{px:60,tailwind:"text-6xl"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind}}static createLineHeight(t){const s={none:{value:1,tailwind:"leading-none"},tight:{value:1.25,tailwind:"leading-tight"},snug:{value:1.375,tailwind:"leading-snug"},normal:{value:1.5,tailwind:"leading-normal"},relaxed:{value:1.625,tailwind:"leading-relaxed"},loose:{value:2,tailwind:"leading-loose"}}[t];return{value:s.value,tailwind:s.tailwind}}static createFontWeight(t){const s={light:{value:300,tailwind:"font-light"},normal:{value:400,tailwind:"font-normal"},medium:{value:500,tailwind:"font-medium"},semibold:{value:600,tailwind:"font-semibold"},bold:{value:700,tailwind:"font-bold"}}[t];return{value:s.value,tailwind:s.tailwind}}static create(t,r="normal",s="normal"){return{fontSize:this.createFontSize(t),lineHeight:this.createLineHeight(r),fontWeight:this.createFontWeight(s)}}}const Vo={sans:{name:"sans",stack:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',tailwind:"font-sans"},serif:{name:"serif",stack:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',tailwind:"font-serif"},mono:{name:"mono",stack:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',tailwind:"font-mono"}},Wo={light:fe.createFontWeight("light"),normal:fe.createFontWeight("normal"),medium:fe.createFontWeight("medium"),semibold:fe.createFontWeight("semibold"),bold:fe.createFontWeight("bold")},bt={h1:fe.create("4xl","tight","bold"),h2:fe.create("3xl","tight","bold"),h3:fe.create("2xl","snug","semibold"),h4:fe.create("xl","snug","semibold"),h5:fe.create("lg","normal","medium"),h6:fe.create("base","normal","medium"),body:fe.create("base","relaxed","normal"),bodySmall:fe.create("sm","relaxed","normal"),bodyLarge:fe.create("lg","relaxed","normal"),label:fe.create("sm","normal","medium"),caption:fe.create("xs","normal","normal"),button:fe.create("base","normal","medium")};function Ho(e){return bt[e]}function ce(e){const t=bt[e];return`${t.fontSize.tailwind} ${t.lineHeight.tailwind} ${t.fontWeight.tailwind}`}function re(e){return bt[e].fontSize.tailwind}function ve(e){return fe.createFontSize(e).tailwind}function Fe(e){return bt[e].fontWeight.tailwind}function Et(e){return fe.createFontWeight(e).tailwind}function Bo(e){return bt[e].lineHeight.tailwind}const Uo=[50,100,200,300,400,500,600,700,800,900,950];function $(e,t,r){const s=qo(e),a=Go(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function qo(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)}, ${parseInt(t[2],16)}, ${parseInt(t[3],16)}`:"0, 0, 0"}function Go(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return"0, 0%, 0%";const r=parseInt(t[1],16)/255,s=parseInt(t[2],16)/255,a=parseInt(t[3],16)/255,o=Math.max(r,s,a),i=Math.min(r,s,a);let c=0,u=0;const d=(o+i)/2;if(o!==i){const f=o-i;switch(u=d>.5?f/(2-o-i):f/(o+i),o){case r:c=((s-a)/f+(s<a?6:0))/6;break;case s:c=((a-r)/f+2)/6;break;case a:c=((r-s)/f+4)/6;break}}return`${Math.round(c*360)}, ${Math.round(u*100)}%, ${Math.round(d*100)}%`}const Ze={50:$("#eef2ff","indigo",50),100:$("#e0e7ff","indigo",100),200:$("#c7d2fe","indigo",200),300:$("#a5b4fc","indigo",300),400:$("#818cf8","indigo",400),500:$("#6366f1","indigo",500),600:$("#4f46e5","indigo",600),700:$("#4338ca","indigo",700),800:$("#3730a3","indigo",800),900:$("#312e81","indigo",900),950:$("#1e1b4b","indigo",950)},Qe={50:$("#f5f3ff","violet",50),100:$("#ede9fe","violet",100),200:$("#ddd6fe","violet",200),300:$("#c4b5fd","violet",300),400:$("#a78bfa","violet",400),500:$("#8b5cf6","violet",500),600:$("#7c3aed","violet",600),700:$("#6d28d9","violet",700),800:$("#5b21b6","violet",800),900:$("#4c1d95","violet",900),950:$("#2e1065","violet",950)},et={50:$("#ecfeff","cyan",50),100:$("#cffafe","cyan",100),200:$("#a5f3fc","cyan",200),300:$("#67e8f9","cyan",300),400:$("#22d3ee","cyan",400),500:$("#06b6d4","cyan",500),600:$("#0891b2","cyan",600),700:$("#0e7490","cyan",700),800:$("#155e75","cyan",800),900:$("#164e63","cyan",900),950:$("#083344","cyan",950)},tt={50:$("#f8fafc","slate",50),100:$("#f1f5f9","slate",100),200:$("#e2e8f0","slate",200),300:$("#cbd5e1","slate",300),400:$("#94a3b8","slate",400),500:$("#64748b","slate",500),600:$("#475569","slate",600),700:$("#334155","slate",700),800:$("#1e293b","slate",800),900:$("#0f172a","slate",900),950:$("#020617","slate",950)},Dn={50:$("#f9fafb","gray",50),100:$("#f3f4f6","gray",100),200:$("#e5e7eb","gray",200),300:$("#d1d5db","gray",300),400:$("#9ca3af","gray",400),500:$("#6b7280","gray",500),600:$("#4b5563","gray",600),700:$("#374151","gray",700),800:$("#1f2937","gray",800),900:$("#111827","gray",900),950:$("#030712","gray",950)},rt={50:$("#ecfdf5","emerald",50),100:$("#d1fae5","emerald",100),200:$("#a7f3d0","emerald",200),300:$("#6ee7b7","emerald",300),400:$("#34d399","emerald",400),500:$("#10b981","emerald",500),600:$("#059669","emerald",600),700:$("#047857","emerald",700),800:$("#065f46","emerald",800),900:$("#064e3b","emerald",900),950:$("#022c22","emerald",950)},Ln={50:$("#f0fdf4","green",50),100:$("#dcfce7","green",100),200:$("#bbf7d0","green",200),300:$("#86efac","green",300),400:$("#4ade80","green",400),500:$("#22c55e","green",500),600:$("#16a34a","green",600),700:$("#15803d","green",700),800:$("#166534","green",800),900:$("#14532d","green",900),950:$("#052e16","green",950)},st={50:$("#fffbeb","amber",50),100:$("#fef3c7","amber",100),200:$("#fde68a","amber",200),300:$("#fcd34d","amber",300),400:$("#fbbf24","amber",400),500:$("#f59e0b","amber",500),600:$("#d97706","amber",600),700:$("#b45309","amber",700),800:$("#92400e","amber",800),900:$("#78350f","amber",900),950:$("#451a03","amber",950)},Fn={50:$("#fefce8","yellow",50),100:$("#fef9c3","yellow",100),200:$("#fef08a","yellow",200),300:$("#fde047","yellow",300),400:$("#facc15","yellow",400),500:$("#eab308","yellow",500),600:$("#ca8a04","yellow",600),700:$("#a16207","yellow",700),800:$("#854d0e","yellow",800),900:$("#713f12","yellow",900),950:$("#422006","yellow",950)},_n={50:$("#fff7ed","orange",50),100:$("#ffedd5","orange",100),200:$("#fed7aa","orange",200),300:$("#fdba74","orange",300),400:$("#fb923c","orange",400),500:$("#f97316","orange",500),600:$("#ea580c","orange",600),700:$("#c2410c","orange",700),800:$("#9a3412","orange",800),900:$("#7c2d12","orange",900),950:$("#431407","orange",950)},nt={50:$("#fff1f2","rose",50),100:$("#ffe4e6","rose",100),200:$("#fecdd3","rose",200),300:$("#fda4af","rose",300),400:$("#fb7185","rose",400),500:$("#f43f5e","rose",500),600:$("#e11d48","rose",600),700:$("#be123c","rose",700),800:$("#9f1239","rose",800),900:$("#881337","rose",900),950:$("#4c0519","rose",950)},Pn={50:$("#fef2f2","red",50),100:$("#fee2e2","red",100),200:$("#fecaca","red",200),300:$("#fca5a5","red",300),400:$("#f87171","red",400),500:$("#ef4444","red",500),600:$("#dc2626","red",600),700:$("#b91c1c","red",700),800:$("#991b1b","red",800),900:$("#7f1d1d","red",900),950:$("#450a0a","red",950)},at={50:$("#f0f9ff","sky",50),100:$("#e0f2fe","sky",100),200:$("#bae6fd","sky",200),300:$("#7dd3fc","sky",300),400:$("#38bdf8","sky",400),500:$("#0ea5e9","sky",500),600:$("#0284c7","sky",600),700:$("#0369a1","sky",700),800:$("#075985","sky",800),900:$("#0c4a6e","sky",900),950:$("#082f49","sky",950)},zn={50:$("#eff6ff","blue",50),100:$("#dbeafe","blue",100),200:$("#bfdbfe","blue",200),300:$("#93c5fd","blue",300),400:$("#60a5fa","blue",400),500:$("#3b82f6","blue",500),600:$("#2563eb","blue",600),700:$("#1d4ed8","blue",700),800:$("#1e40af","blue",800),900:$("#1e3a8a","blue",900),950:$("#172554","blue",950)},On={50:$("#fdf4ff","fuchsia",50),100:$("#fae8ff","fuchsia",100),200:$("#f5d0fe","fuchsia",200),300:$("#f0abfc","fuchsia",300),400:$("#e879f9","fuchsia",400),500:$("#d946ef","fuchsia",500),600:$("#c026d3","fuchsia",600),700:$("#a21caf","fuchsia",700),800:$("#86198f","fuchsia",800),900:$("#701a75","fuchsia",900),950:$("#4a044e","fuchsia",950)},Vn={50:$("#fdf2f8","pink",50),100:$("#fce7f3","pink",100),200:$("#fbcfe8","pink",200),300:$("#f9a8d4","pink",300),400:$("#f472b6","pink",400),500:$("#ec4899","pink",500),600:$("#db2777","pink",600),700:$("#be185d","pink",700),800:$("#9d174d","pink",800),900:$("#831843","pink",900),950:$("#500724","pink",950)},Wn={50:$("#faf5ff","purple",50),100:$("#f3e8ff","purple",100),200:$("#e9d5ff","purple",200),300:$("#d8b4fe","purple",300),400:$("#c084fc","purple",400),500:$("#a855f7","purple",500),600:$("#9333ea","purple",600),700:$("#7e22ce","purple",700),800:$("#6b21a8","purple",800),900:$("#581c87","purple",900),950:$("#3b0764","purple",950)},Hn={50:$("#f0fdfa","teal",50),100:$("#ccfbf1","teal",100),200:$("#99f6e4","teal",200),300:$("#5eead4","teal",300),400:$("#2dd4bf","teal",400),500:$("#14b8a6","teal",500),600:$("#0d9488","teal",600),700:$("#0f766e","teal",700),800:$("#115e59","teal",800),900:$("#134e4a","teal",900),950:$("#042f2e","teal",950)},Bn={50:$("#f7fee7","lime",50),100:$("#ecfccb","lime",100),200:$("#d9f99d","lime",200),300:$("#bef264","lime",300),400:$("#a3e635","lime",400),500:$("#84cc16","lime",500),600:$("#65a30d","lime",600),700:$("#4d7c0f","lime",700),800:$("#3f6212","lime",800),900:$("#365314","lime",900),950:$("#1a2e05","lime",950)},ds={indigo:Ze,violet:Qe,cyan:et,slate:tt,gray:Dn,emerald:rt,green:Ln,amber:st,yellow:Fn,orange:_n,rose:nt,red:Pn,sky:at,blue:zn,fuchsia:On,pink:Vn,purple:Wn,teal:Hn,lime:Bn};function At(e,t){return ds[e][t]}function Ko(e){return ds[e]}const qt={primary:{light:Ze[400],DEFAULT:Ze[500],dark:Ze[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:Qe[400],DEFAULT:Qe[500],dark:Qe[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:et[400],DEFAULT:et[500],dark:et[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},success:{light:rt[400],DEFAULT:rt[500],dark:rt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},warning:{light:st[400],DEFAULT:st[500],dark:st[600],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{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"}},info:{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"}},neutral:{light:tt[100],DEFAULT:tt[500],dark:tt[700],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},vr={primary:{light:Ze[500],DEFAULT:Ze[400],dark:Ze[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:Qe[500],DEFAULT:Qe[400],dark:Qe[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:et[500],DEFAULT:et[400],dark:et[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},success:{light:rt[500],DEFAULT:rt[400],dark:rt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},warning:{light:st[500],DEFAULT:st[400],dark:st[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{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"}},info:{light:at[500],DEFAULT:at[400],dark:at[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:tt[700],DEFAULT:tt[400],dark:tt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},Yo=qt;function Ht(e,t="DEFAULT",r="light"){return(r==="dark"?vr:qt)[e][t]}function Xo(e,t="light"){return(t==="dark"?vr:qt)[e]}function Jo(e,t,r={}){const{format:s="hex",opacity:a}=r,o=At(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Zo(e,t="DEFAULT",r={}){const{format:s="hex",opacity:a}=r,o=Ht(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Qo(e,t,r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=At(e,t),d=[`${s}-${c.tailwind}`];return a&&d.push(`hover:${s}-${c.tailwind}`),o&&d.push(`focus:${s}-${c.tailwind}`),i&&d.push(`active:${s}-${c.tailwind}`),d.join(" ")}function ei(e,t="DEFAULT",r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Ht(e,t),d=[`${s}-${c.tailwind}`];if(a){const f=Ht(e,t==="DEFAULT"?"dark":"DEFAULT");d.push(`hover:${s}-${f.tailwind}`)}if(o&&d.push(`focus:${s}-${c.tailwind}`),i){const f=Ht(e,"dark");d.push(`active:${s}-${f.tailwind}`)}return d.join(" ")}function ti(e,t,r="bg"){const s=At(e,t);return`hover:${r}-${s.tailwind}`}function ri(e,t,r="border"){const s=At(e,t);return`focus:${r}-${s.tailwind}`}function si(e,t){return`focus:ring-${At(e,t).tailwind}`}function ni(e,t){return`rgba(${e.rgb}, ${t})`}function Un(e){const t=rs(e);return t?.299*t[0]+.587*t[1]+.114*t[2]>128:!0}function ai(e){return Un(e)?"#000000":"#ffffff"}function rs(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null}function us(e,t,r=.5){const s=rs(e),a=rs(t);if(!s||!a)return e;const o=Math.round(s[0]*(1-r)+a[0]*r),i=Math.round(s[1]*(1-r)+a[1]*r),c=Math.round(s[2]*(1-r)+a[2]*r);return`#${((1<<24)+(o<<16)+(i<<8)+c).toString(16).slice(1)}`}function oi(e,t){return us(e,"#ffffff",t/100)}function ii(e,t){return us(e,"#000000",t/100)}const li={primary:{name:"indigo",light:400,default:500,dark:600},secondary:{name:"violet",light:400,default:500,dark:600},accent:{name:"cyan",light:400,default:500,dark:600}};class St{static create(t){const s={sm:{minWidth:640,tailwind:"sm"},md:{minWidth:768,tailwind:"md"},lg:{minWidth:1024,tailwind:"lg"},xl:{minWidth:1280,tailwind:"xl"},"2xl":{minWidth:1536,tailwind:"2xl"}}[t];return{name:t,minWidth:s.minWidth,px:`${s.minWidth}px`,rem:`${s.minWidth/16}rem`,tailwind:s.tailwind}}}const yr={sm:St.create("sm"),md:St.create("md"),lg:St.create("lg"),xl:St.create("xl"),"2xl":St.create("2xl")};function ci(e){return yr[e]}function di(e,t="min"){const r=yr[e];return`@media (${t==="min"?"min-width":"max-width"}: ${r.px})`}function qn(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=qn(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Gn(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=qn(e))&&(s&&(s+=" "),s+=t);return s}const ui=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},fi=(e,t)=>({classGroupId:e,validator:t}),Kn=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),cr="-",hn=[],mi="arbitrary..",pi=e=>{const t=bi(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return hi(i);const c=i.split(cr),u=c[0]===""&&c.length>1?1:0;return Yn(c,u,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const u=s[i],d=r[i];return u?d?ui(d,u):u:d||hn}return r[i]||hn}}},Yn=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const d=Yn(e,t+1,o);if(d)return d}const i=r.validators;if(i===null)return;const c=t===0?e.join(cr):e.slice(t).join(cr),u=i.length;for(let d=0;d<u;d++){const f=i[d];if(f.validator(c))return f.classGroupId}},hi=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?mi+s:void 0})(),bi=e=>{const{theme:t,classGroups:r}=e;return gi(r,t)},gi=(e,t)=>{const r=Kn();for(const s in e){const a=e[s];fs(a,r,s,t)}return r},fs=(e,t,r,s)=>{const a=e.length;for(let o=0;o<a;o++){const i=e[o];xi(i,t,r,s)}},xi=(e,t,r,s)=>{if(typeof e=="string"){vi(e,t,r);return}if(typeof e=="function"){yi(e,t,r,s);return}wi(e,t,r,s)},vi=(e,t,r)=>{const s=e===""?t:Xn(t,e);s.classGroupId=r},yi=(e,t,r,s)=>{if(ki(e)){fs(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(fi(r,e))},wi=(e,t,r,s)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[c,u]=a[i];fs(u,Xn(t,c),r,s)}},Xn=(e,t)=>{let r=e;const s=t.split(cr),a=s.length;for(let o=0;o<a;o++){const i=s[o];let c=r.nextPart.get(i);c||(c=Kn(),r.nextPart.set(i,c)),r=c}return r},ki=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ji=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const a=(o,i)=>{r[o]=i,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(o){let i=r[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return a(o,i),i},set(o,i){o in r?r[o]=i:a(o,i)}}},ss="!",bn=":",Ni=[],gn=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),Si=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=a=>{const o=[];let i=0,c=0,u=0,d;const f=a.length;for(let y=0;y<f;y++){const k=a[y];if(i===0&&c===0){if(k===bn){o.push(a.slice(u,y)),u=y+1;continue}if(k==="/"){d=y;continue}}k==="["?i++:k==="]"?i--:k==="("?c++:k===")"&&c--}const p=o.length===0?a:a.slice(u);let m=p,h=!1;p.endsWith(ss)?(m=p.slice(0,-1),h=!0):p.startsWith(ss)&&(m=p.slice(1),h=!0);const x=d&&d>u?d-u:void 0;return gn(o,h,m,x)};if(t){const a=t+bn,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):gn(Ni,!1,i,void 0,!0)}if(r){const a=s;s=o=>r({className:o,parseClassName:a})}return s},Ci=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let a=[];for(let o=0;o<r.length;o++){const i=r[o],c=i[0]==="[",u=t.has(i);c||u?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},$i=e=>T({cache:ji(e.cacheSize),parseClassName:Si(e),sortModifiers:Ci(e)},pi(e)),Ei=/\s+/,Mi=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o}=t,i=[],c=e.trim().split(Ei);let u="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{isExternal:p,modifiers:m,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:y}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let k=!!y,g=s(k?x.substring(0,y):x);if(!g){if(!k){u=f+(u.length>0?" "+u:u);continue}if(g=s(x),!g){u=f+(u.length>0?" "+u:u);continue}k=!1}const j=m.length===0?"":m.length===1?m[0]:o(m).join(":"),C=h?j+ss:j,b=C+g;if(i.indexOf(b)>-1)continue;i.push(b);const v=a(g,k);for(let N=0;N<v.length;++N){const _=v[N];i.push(C+_)}u=f+(u.length>0?" "+u:u)}return u},Ti=(...e)=>{let t=0,r,s,a="";for(;t<e.length;)(r=e[t++])&&(s=Jn(r))&&(a&&(a+=" "),a+=s);return a},Jn=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=Jn(e[s]))&&(r&&(r+=" "),r+=t);return r},Ai=(e,...t)=>{let r,s,a,o;const i=u=>{const d=t.reduce((f,p)=>p(f),e());return r=$i(d),s=r.cache.get,a=r.cache.set,o=c,c(u)},c=u=>{const d=s(u);if(d)return d;const f=Mi(u,r);return a(u,f),f};return o=i,(...u)=>o(Ti(...u))},Ri=[],me=e=>{const t=r=>r[e]||Ri;return t.isThemeGetter=!0,t},Zn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ii=/^\d+\/\d+$/,Di=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Li=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Fi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_i=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kt=e=>Ii.test(e),te=e=>!!e&&!Number.isNaN(Number(e)),Ge=e=>!!e&&Number.isInteger(Number(e)),qr=e=>e.endsWith("%")&&te(e.slice(0,-1)),Ve=e=>Di.test(e),zi=()=>!0,Oi=e=>Li.test(e)&&!Fi.test(e),ea=()=>!1,Vi=e=>_i.test(e),Wi=e=>Pi.test(e),Hi=e=>!G(e)&&!K(e),Bi=e=>Rt(e,sa,ea),G=e=>Zn.test(e),ut=e=>Rt(e,na,Oi),Gr=e=>Rt(e,Yi,te),xn=e=>Rt(e,ta,ea),Ui=e=>Rt(e,ra,Wi),sr=e=>Rt(e,aa,Vi),K=e=>Qn.test(e),_t=e=>It(e,na),qi=e=>It(e,Xi),vn=e=>It(e,ta),Gi=e=>It(e,sa),Ki=e=>It(e,ra),nr=e=>It(e,aa,!0),Rt=(e,t,r)=>{const s=Zn.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},It=(e,t,r=!1)=>{const s=Qn.exec(e);return s?s[1]?t(s[1]):r:!1},ta=e=>e==="position"||e==="percentage",ra=e=>e==="image"||e==="url",sa=e=>e==="length"||e==="size"||e==="bg-size",na=e=>e==="length",Yi=e=>e==="number",Xi=e=>e==="family-name",aa=e=>e==="shadow",Ji=()=>{const e=me("color"),t=me("font"),r=me("text"),s=me("font-weight"),a=me("tracking"),o=me("leading"),i=me("breakpoint"),c=me("container"),u=me("spacing"),d=me("radius"),f=me("shadow"),p=me("inset-shadow"),m=me("text-shadow"),h=me("drop-shadow"),x=me("blur"),y=me("perspective"),k=me("aspect"),g=me("ease"),j=me("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...b(),K,G],N=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],S=()=>[K,G,u],M=()=>[kt,"full","auto",...S()],F=()=>[Ge,"none","subgrid",K,G],A=()=>["auto",{span:["full",Ge,K,G]},Ge,K,G],R=()=>[Ge,"auto",K,G],I=()=>["auto","min","max","fr",K,G],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...S()],q=()=>[kt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],W=()=>[e,K,G],ae=()=>[...b(),vn,xn,{position:[K,G]}],se=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",Gi,Bi,{size:[K,G]}],B=()=>[qr,_t,ut],X=()=>["","none","full",d,K,G],Q=()=>["",te,_t,ut],H=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>[te,qr,vn,xn],ne=()=>["","none",x,K,G],oe=()=>["none",te,K,G],ie=()=>["none",te,K,G],Ne=()=>[te,K,G],ze=()=>[kt,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ve],breakpoint:[Ve],color:[zi],container:[Ve],"drop-shadow":[Ve],ease:["in","out","in-out"],font:[Hi],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ve],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ve],shadow:[Ve],spacing:["px",te],text:[Ve],"text-shadow":[Ve],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kt,G,K,k]}],container:["container"],columns:[{columns:[te,G,K,c]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Ge,"auto",K,G]}],basis:[{basis:[kt,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[te,kt,"auto","initial","none",G]}],grow:[{grow:["",te,K,G]}],shrink:[{shrink:["",te,K,G]}],order:[{order:[Ge,"first","last","none",K,G]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[c,"screen",...q()]}],"min-w":[{"min-w":[c,"screen","none",...q()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",r,_t,ut]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,K,Gr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qr,G]}],"font-family":[{font:[qi,G,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,K,G]}],"line-clamp":[{"line-clamp":[te,"none",K,Gr]}],leading:[{leading:[o,...S()]}],"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:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:[te,"from-font","auto",K,ut]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[te,"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:S()}],"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:ae()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ge,K,G],radial:["",K,G],conic:[Ge,K,G]},Ki,Ui]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...H(),"hidden","none"]}],"divide-style":[{divide:[...H(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...H(),"none","hidden"]}],"outline-offset":[{"outline-offset":[te,K,G]}],"outline-w":[{outline:["",te,_t,ut]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",f,nr,sr]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",p,nr,sr]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[te,ut]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",m,nr,sr]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[te,K,G]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[te]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[te]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,G]}],filter:[{filter:["","none",K,G]}],blur:[{blur:ne()}],brightness:[{brightness:[te,K,G]}],contrast:[{contrast:[te,K,G]}],"drop-shadow":[{"drop-shadow":["","none",h,nr,sr]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",te,K,G]}],"hue-rotate":[{"hue-rotate":[te,K,G]}],invert:[{invert:["",te,K,G]}],saturate:[{saturate:[te,K,G]}],sepia:[{sepia:["",te,K,G]}],"backdrop-filter":[{"backdrop-filter":["","none",K,G]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[te,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[te,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",te,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[te,K,G]}],"backdrop-invert":[{"backdrop-invert":["",te,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[te,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[te,K,G]}],"backdrop-sepia":[{"backdrop-sepia":["",te,K,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[te,"initial",K,G]}],ease:[{ease:["linear","initial",g,K,G]}],delay:[{delay:[te,K,G]}],animate:[{animate:["none",j,K,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,K,G]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[K,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ze()}],"translate-x":[{"translate-x":ze()}],"translate-y":[{"translate-y":ze()}],"translate-z":[{"translate-z":ze()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K,G]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K,G]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[te,_t,ut,Gr]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Zi=Ai(Ji);function w(...e){return Zi(Gn(e))}const yn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wn=Gn,Qi=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return wn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(d=>{const f=r==null?void 0:r[d],p=o==null?void 0:o[d];if(f===null)return null;const m=yn(f)||yn(p);return a[d][m]}),c=r&&Object.entries(r).reduce((d,f)=>{let[p,m]=f;return m===void 0||(d[p]=m),d},{}),u=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,f)=>{let x=f,{class:p,className:m}=x,h=O(x,["class","className"]);return Object.entries(h).every(y=>{let[k,g]=y;return Array.isArray(g)?g.includes(T(T({},o),c)[k]):T(T({},o),c)[k]===g})?[...d,p,m]:d},[]);return wn(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},xe=(e,t)=>{const r=Qi(e,t);return(s=>{const a=r(s);return w(a)})};class Me{static create(t,r="ease-in-out"){const s={fast:{value:"150ms",ms:150,tailwind:"duration-150"},base:{value:"200ms",ms:200,tailwind:"duration-200"},slow:{value:"300ms",ms:300,tailwind:"duration-300"},slower:{value:"500ms",ms:500,tailwind:"duration-500"}},a={"ease-in":{value:"cubic-bezier(0.4, 0, 1, 1)",tailwind:"ease-in",description:"Slow start, fast end"},"ease-out":{value:"cubic-bezier(0, 0, 0.2, 1)",tailwind:"ease-out",description:"Fast start, slow end"},"ease-in-out":{value:"cubic-bezier(0.4, 0, 0.2, 1)",tailwind:"ease-in-out",description:"Slow start and end, fast middle"},spring:{value:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",tailwind:"ease-[cubic-bezier(0.68,-0.55,0.265,1.55)]",description:"Spring-like bounce effect"}};return{duration:s[t],easing:a[r]}}static createTransition(t,r="base",s="ease-in-out"){const a=this.create(r,s),o=Array.isArray(t)?t.join(", "):t,i=[a.duration.tailwind,a.easing.tailwind].join(" ");return{property:o,duration:a.duration.value,timingFunction:a.easing.value,tailwind:i}}}const el={fast:Me.create("fast"),base:Me.create("base"),slow:Me.create("slow"),slower:Me.create("slower"),colors:Me.createTransition(["color","background-color","border-color"],"base"),opacity:Me.createTransition("opacity","fast"),transform:Me.createTransition("transform","base"),all:Me.createTransition("all","base")};function tl(e,t){return Me.create(e,t)}function he(e,t="ease-in-out"){const r=Me.create(e,t);return`${r.duration.tailwind} ${r.easing.tailwind}`}function rl(e,t="base",r="ease-in-out"){return Me.createTransition(e,t,r).tailwind}class Ee{static create(t){return{base:{value:0,tailwind:"z-0",description:"Base layer for normal content"},dropdown:{value:1e3,tailwind:"z-[1000]",description:"Dropdown menus and select options"},sticky:{value:1020,tailwind:"z-[1020]",description:"Sticky headers and navigation"},fixed:{value:1030,tailwind:"z-[1030]",description:"Fixed position elements"},"modal-backdrop":{value:1040,tailwind:"z-[1040]",description:"Modal backdrop/overlay"},modal:{value:1050,tailwind:"z-[1050]",description:"Modal dialogs and drawers"},popover:{value:1060,tailwind:"z-[1060]",description:"Popovers and tooltips"},tooltip:{value:1070,tailwind:"z-[1070]",description:"Tooltips (highest priority)"},toast:{value:1080,tailwind:"z-[1080]",description:"Toast notifications (highest priority)"}}[t]}}const kn={base:Ee.create("base"),dropdown:Ee.create("dropdown"),sticky:Ee.create("sticky"),fixed:Ee.create("fixed"),"modal-backdrop":Ee.create("modal-backdrop"),modal:Ee.create("modal"),popover:Ee.create("popover"),tooltip:Ee.create("tooltip"),toast:Ee.create("toast")};function sl(e){return Ee.create(e)}function ue(e){return Ee.create(e).tailwind}class ge{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]}}}ge.create(0),ge.create(5),ge.create(10),ge.create(20),ge.create(25),ge.create(30),ge.create(40),ge.create(50),ge.create(60),ge.create(70),ge.create(75),ge.create(80),ge.create(90),ge.create(95),ge.create(100);function nl(e){return ge.create(e)}function al(e){return ge.create(e).tailwind}var ar={exports:{}},Pt={};/**
|
|
1
|
+
"use strict";var Lo=Object.defineProperty,_o=Object.defineProperties;var Po=Object.getOwnPropertyDescriptors;var tr=Object.getOwnPropertySymbols;var fn=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable;var Ur=(e,t,r)=>t in e?Lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))fn.call(t,r)&&Ur(e,r,t[r]);if(tr)for(var r of tr(t))mn.call(t,r)&&Ur(e,r,t[r]);return e},P=(e,t)=>_o(e,Po(t));var O=(e,t)=>{var r={};for(var s in e)fn.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&tr)for(var s of tr(e))t.indexOf(s)<0&&mn.call(e,s)&&(r[s]=e[s]);return r};var pn=(e,t,r)=>Ur(e,typeof t!="symbol"?t+"":t,r);var rr=(e,t,r)=>new Promise((s,a)=>{var o=u=>{try{c(r.next(u))}catch(d){a(d)}},i=u=>{try{c(r.throw(u))}catch(d){a(d)}},c=u=>u.done?s(u.value):Promise.resolve(u.value).then(o,i);c((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),qe=require("react-dom"),Qe={icon:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},text:{xs:"text-xs",sm:"text-sm",base:"text-base"},spacing:{itemPaddingX:"px-4",itemPaddingY:"py-2",nestedIndent:"pl-6",nestedIndentLevel2:"pl-10",nestedIndentLevel3:"pl-14",groupTitlePadding:"px-4 py-2",iconMargin:"mr-3"},colors:{active:{bg:"bg-surface-brand-muted",text:"text-fg-brand-emphasis",border:"border-line-brand"},inactive:{text:"text-fg-secondary",hover:"hover:bg-surface-hover hover:text-fg-primary"},groupTitle:"text-fg-tertiary"},chevron:{size:"h-3 w-3",color:"text-fg-quaternary"},navigation:{width:{default:"56px",compact:"48px",expanded:"200px"},background:{default:"#fafafa",hover:"#f5f5f5"}},split:{transition:"transition-all duration-300",collapsedWidth:"0px"},content:{scrollbar:{width:"thin",color:{thumb:"#cbd5e1",track:"#f1f5f9"}}}};function zo(e){return e<=0?Qe.spacing.itemPaddingX:e===1?Qe.spacing.nestedIndent:e===2?Qe.spacing.nestedIndentLevel2:e===3?Qe.spacing.nestedIndentLevel3:`pl-${4+e*4}`}class he{static create(t){const r=t*this.BASE_UNIT,s=r/16;return{value:r,rem:`${s}rem`,px:`${r}px`,tailwind:this.getTailwindClass(t)}}static getTailwindClass(t){return{0:"0",.5:"0.5",1:"1",1.5:"1.5",2:"2",2.5:"2.5",3:"3",3.5:"3.5",4:"4",5:"5",6:"6",8:"8",10:"10",12:"12",16:"16",20:"20",24:"24",32:"32",40:"40",48:"48",64:"64",80:"80",96:"96"}[t]||String(t)}}pn(he,"BASE_UNIT",4);const xr={none:he.create(0),"0.5":he.create(.5),xs:he.create(1),"1.5":he.create(1.5),sm:he.create(2),"2.5":he.create(2.5),md:he.create(3),"3.5":he.create(3.5),base:he.create(4),lg:he.create(6),xl:he.create(8),"2xl":he.create(10),"3xl":he.create(12),"4xl":he.create(16),"5xl":he.create(20),"6xl":he.create(24)};function Oo(e){return xr[e]}function E(e,t="p"){const s=xr[e].tailwind;return`${{p:"p",m:"m",px:"px",mx:"mx",py:"py",my:"my",pt:"pt",mt:"mt",pr:"pr",mr:"mr",pb:"pb",mb:"mb",pl:"pl",ml:"ml",gap:"gap","gap-x":"gap-x","gap-y":"gap-y","space-y":"space-y"}[t]}-${s}`}class me{static createFontSize(t){const s={"2xs":{px:10,tailwind:"text-2xs"},xs:{px:12,tailwind:"text-xs"},sm:{px:14,tailwind:"text-sm"},base:{px:16,tailwind:"text-base"},lg:{px:18,tailwind:"text-lg"},xl:{px:20,tailwind:"text-xl"},"2xl":{px:24,tailwind:"text-2xl"},"3xl":{px:30,tailwind:"text-3xl"},"4xl":{px:36,tailwind:"text-4xl"},"5xl":{px:48,tailwind:"text-5xl"},"6xl":{px:60,tailwind:"text-6xl"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind}}static createLineHeight(t){const s={none:{value:1,tailwind:"leading-none"},tight:{value:1.25,tailwind:"leading-tight"},snug:{value:1.375,tailwind:"leading-snug"},normal:{value:1.5,tailwind:"leading-normal"},relaxed:{value:1.625,tailwind:"leading-relaxed"},loose:{value:2,tailwind:"leading-loose"}}[t];return{value:s.value,tailwind:s.tailwind}}static createFontWeight(t){const s={light:{value:300,tailwind:"font-light"},normal:{value:400,tailwind:"font-normal"},medium:{value:500,tailwind:"font-medium"},semibold:{value:600,tailwind:"font-semibold"},bold:{value:700,tailwind:"font-bold"}}[t];return{value:s.value,tailwind:s.tailwind}}static create(t,r="normal",s="normal"){return{fontSize:this.createFontSize(t),lineHeight:this.createLineHeight(r),fontWeight:this.createFontWeight(s)}}}const Vo={sans:{name:"sans",stack:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',tailwind:"font-sans"},serif:{name:"serif",stack:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',tailwind:"font-serif"},mono:{name:"mono",stack:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',tailwind:"font-mono"}},Wo={light:me.createFontWeight("light"),normal:me.createFontWeight("normal"),medium:me.createFontWeight("medium"),semibold:me.createFontWeight("semibold"),bold:me.createFontWeight("bold")},gt={h1:me.create("4xl","tight","bold"),h2:me.create("3xl","tight","bold"),h3:me.create("2xl","snug","semibold"),h4:me.create("xl","snug","semibold"),h5:me.create("lg","normal","medium"),h6:me.create("base","normal","medium"),body:me.create("base","relaxed","normal"),bodySmall:me.create("sm","relaxed","normal"),bodyLarge:me.create("lg","relaxed","normal"),label:me.create("sm","normal","medium"),caption:me.create("xs","normal","normal"),button:me.create("base","normal","medium")};function Ho(e){return gt[e]}function ce(e){const t=gt[e];return`${t.fontSize.tailwind} ${t.lineHeight.tailwind} ${t.fontWeight.tailwind}`}function re(e){return gt[e].fontSize.tailwind}function ye(e){return me.createFontSize(e).tailwind}function Pe(e){return gt[e].fontWeight.tailwind}function Mt(e){return me.createFontWeight(e).tailwind}function Bo(e){return gt[e].lineHeight.tailwind}const Uo=[50,100,200,300,400,500,600,700,800,900,950];function $(e,t,r){const s=qo(e),a=Go(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function qo(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)}, ${parseInt(t[2],16)}, ${parseInt(t[3],16)}`:"0, 0, 0"}function Go(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return"0, 0%, 0%";const r=parseInt(t[1],16)/255,s=parseInt(t[2],16)/255,a=parseInt(t[3],16)/255,o=Math.max(r,s,a),i=Math.min(r,s,a);let c=0,u=0;const d=(o+i)/2;if(o!==i){const f=o-i;switch(u=d>.5?f/(2-o-i):f/(o+i),o){case r:c=((s-a)/f+(s<a?6:0))/6;break;case s:c=((a-r)/f+2)/6;break;case a:c=((r-s)/f+4)/6;break}}return`${Math.round(c*360)}, ${Math.round(u*100)}%, ${Math.round(d*100)}%`}const Ze={50:$("#eef2ff","indigo",50),100:$("#e0e7ff","indigo",100),200:$("#c7d2fe","indigo",200),300:$("#a5b4fc","indigo",300),400:$("#818cf8","indigo",400),500:$("#6366f1","indigo",500),600:$("#4f46e5","indigo",600),700:$("#4338ca","indigo",700),800:$("#3730a3","indigo",800),900:$("#312e81","indigo",900),950:$("#1e1b4b","indigo",950)},et={50:$("#f5f3ff","violet",50),100:$("#ede9fe","violet",100),200:$("#ddd6fe","violet",200),300:$("#c4b5fd","violet",300),400:$("#a78bfa","violet",400),500:$("#8b5cf6","violet",500),600:$("#7c3aed","violet",600),700:$("#6d28d9","violet",700),800:$("#5b21b6","violet",800),900:$("#4c1d95","violet",900),950:$("#2e1065","violet",950)},tt={50:$("#ecfeff","cyan",50),100:$("#cffafe","cyan",100),200:$("#a5f3fc","cyan",200),300:$("#67e8f9","cyan",300),400:$("#22d3ee","cyan",400),500:$("#06b6d4","cyan",500),600:$("#0891b2","cyan",600),700:$("#0e7490","cyan",700),800:$("#155e75","cyan",800),900:$("#164e63","cyan",900),950:$("#083344","cyan",950)},rt={50:$("#f8fafc","slate",50),100:$("#f1f5f9","slate",100),200:$("#e2e8f0","slate",200),300:$("#cbd5e1","slate",300),400:$("#94a3b8","slate",400),500:$("#64748b","slate",500),600:$("#475569","slate",600),700:$("#334155","slate",700),800:$("#1e293b","slate",800),900:$("#0f172a","slate",900),950:$("#020617","slate",950)},Dn={50:$("#f9fafb","gray",50),100:$("#f3f4f6","gray",100),200:$("#e5e7eb","gray",200),300:$("#d1d5db","gray",300),400:$("#9ca3af","gray",400),500:$("#6b7280","gray",500),600:$("#4b5563","gray",600),700:$("#374151","gray",700),800:$("#1f2937","gray",800),900:$("#111827","gray",900),950:$("#030712","gray",950)},st={50:$("#ecfdf5","emerald",50),100:$("#d1fae5","emerald",100),200:$("#a7f3d0","emerald",200),300:$("#6ee7b7","emerald",300),400:$("#34d399","emerald",400),500:$("#10b981","emerald",500),600:$("#059669","emerald",600),700:$("#047857","emerald",700),800:$("#065f46","emerald",800),900:$("#064e3b","emerald",900),950:$("#022c22","emerald",950)},Fn={50:$("#f0fdf4","green",50),100:$("#dcfce7","green",100),200:$("#bbf7d0","green",200),300:$("#86efac","green",300),400:$("#4ade80","green",400),500:$("#22c55e","green",500),600:$("#16a34a","green",600),700:$("#15803d","green",700),800:$("#166534","green",800),900:$("#14532d","green",900),950:$("#052e16","green",950)},nt={50:$("#fffbeb","amber",50),100:$("#fef3c7","amber",100),200:$("#fde68a","amber",200),300:$("#fcd34d","amber",300),400:$("#fbbf24","amber",400),500:$("#f59e0b","amber",500),600:$("#d97706","amber",600),700:$("#b45309","amber",700),800:$("#92400e","amber",800),900:$("#78350f","amber",900),950:$("#451a03","amber",950)},Ln={50:$("#fefce8","yellow",50),100:$("#fef9c3","yellow",100),200:$("#fef08a","yellow",200),300:$("#fde047","yellow",300),400:$("#facc15","yellow",400),500:$("#eab308","yellow",500),600:$("#ca8a04","yellow",600),700:$("#a16207","yellow",700),800:$("#854d0e","yellow",800),900:$("#713f12","yellow",900),950:$("#422006","yellow",950)},_n={50:$("#fff7ed","orange",50),100:$("#ffedd5","orange",100),200:$("#fed7aa","orange",200),300:$("#fdba74","orange",300),400:$("#fb923c","orange",400),500:$("#f97316","orange",500),600:$("#ea580c","orange",600),700:$("#c2410c","orange",700),800:$("#9a3412","orange",800),900:$("#7c2d12","orange",900),950:$("#431407","orange",950)},at={50:$("#fff1f2","rose",50),100:$("#ffe4e6","rose",100),200:$("#fecdd3","rose",200),300:$("#fda4af","rose",300),400:$("#fb7185","rose",400),500:$("#f43f5e","rose",500),600:$("#e11d48","rose",600),700:$("#be123c","rose",700),800:$("#9f1239","rose",800),900:$("#881337","rose",900),950:$("#4c0519","rose",950)},Pn={50:$("#fef2f2","red",50),100:$("#fee2e2","red",100),200:$("#fecaca","red",200),300:$("#fca5a5","red",300),400:$("#f87171","red",400),500:$("#ef4444","red",500),600:$("#dc2626","red",600),700:$("#b91c1c","red",700),800:$("#991b1b","red",800),900:$("#7f1d1d","red",900),950:$("#450a0a","red",950)},ot={50:$("#f0f9ff","sky",50),100:$("#e0f2fe","sky",100),200:$("#bae6fd","sky",200),300:$("#7dd3fc","sky",300),400:$("#38bdf8","sky",400),500:$("#0ea5e9","sky",500),600:$("#0284c7","sky",600),700:$("#0369a1","sky",700),800:$("#075985","sky",800),900:$("#0c4a6e","sky",900),950:$("#082f49","sky",950)},zn={50:$("#eff6ff","blue",50),100:$("#dbeafe","blue",100),200:$("#bfdbfe","blue",200),300:$("#93c5fd","blue",300),400:$("#60a5fa","blue",400),500:$("#3b82f6","blue",500),600:$("#2563eb","blue",600),700:$("#1d4ed8","blue",700),800:$("#1e40af","blue",800),900:$("#1e3a8a","blue",900),950:$("#172554","blue",950)},On={50:$("#fdf4ff","fuchsia",50),100:$("#fae8ff","fuchsia",100),200:$("#f5d0fe","fuchsia",200),300:$("#f0abfc","fuchsia",300),400:$("#e879f9","fuchsia",400),500:$("#d946ef","fuchsia",500),600:$("#c026d3","fuchsia",600),700:$("#a21caf","fuchsia",700),800:$("#86198f","fuchsia",800),900:$("#701a75","fuchsia",900),950:$("#4a044e","fuchsia",950)},Vn={50:$("#fdf2f8","pink",50),100:$("#fce7f3","pink",100),200:$("#fbcfe8","pink",200),300:$("#f9a8d4","pink",300),400:$("#f472b6","pink",400),500:$("#ec4899","pink",500),600:$("#db2777","pink",600),700:$("#be185d","pink",700),800:$("#9d174d","pink",800),900:$("#831843","pink",900),950:$("#500724","pink",950)},Wn={50:$("#faf5ff","purple",50),100:$("#f3e8ff","purple",100),200:$("#e9d5ff","purple",200),300:$("#d8b4fe","purple",300),400:$("#c084fc","purple",400),500:$("#a855f7","purple",500),600:$("#9333ea","purple",600),700:$("#7e22ce","purple",700),800:$("#6b21a8","purple",800),900:$("#581c87","purple",900),950:$("#3b0764","purple",950)},Hn={50:$("#f0fdfa","teal",50),100:$("#ccfbf1","teal",100),200:$("#99f6e4","teal",200),300:$("#5eead4","teal",300),400:$("#2dd4bf","teal",400),500:$("#14b8a6","teal",500),600:$("#0d9488","teal",600),700:$("#0f766e","teal",700),800:$("#115e59","teal",800),900:$("#134e4a","teal",900),950:$("#042f2e","teal",950)},Bn={50:$("#f7fee7","lime",50),100:$("#ecfccb","lime",100),200:$("#d9f99d","lime",200),300:$("#bef264","lime",300),400:$("#a3e635","lime",400),500:$("#84cc16","lime",500),600:$("#65a30d","lime",600),700:$("#4d7c0f","lime",700),800:$("#3f6212","lime",800),900:$("#365314","lime",900),950:$("#1a2e05","lime",950)},ds={indigo:Ze,violet:et,cyan:tt,slate:rt,gray:Dn,emerald:st,green:Fn,amber:nt,yellow:Ln,orange:_n,rose:at,red:Pn,sky:ot,blue:zn,fuchsia:On,pink:Vn,purple:Wn,teal:Hn,lime:Bn};function Rt(e,t){return ds[e][t]}function Ko(e){return ds[e]}const qt={primary:{light:Ze[400],DEFAULT:Ze[500],dark:Ze[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:et[400],DEFAULT:et[500],dark:et[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:tt[400],DEFAULT:tt[500],dark:tt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},success:{light:st[400],DEFAULT:st[500],dark:st[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},warning:{light:nt[400],DEFAULT:nt[500],dark:nt[600],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:at[400],DEFAULT:at[500],dark:at[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:ot[400],DEFAULT:ot[500],dark:ot[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:rt[100],DEFAULT:rt[500],dark:rt[700],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},vr={primary:{light:Ze[500],DEFAULT:Ze[400],dark:Ze[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:et[500],DEFAULT:et[400],dark:et[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:tt[500],DEFAULT:tt[400],dark:tt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},success:{light:st[500],DEFAULT:st[400],dark:st[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},warning:{light:nt[500],DEFAULT:nt[400],dark:nt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:at[500],DEFAULT:at[400],dark:at[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:ot[500],DEFAULT:ot[400],dark:ot[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:rt[700],DEFAULT:rt[400],dark:rt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},Yo=qt;function Ht(e,t="DEFAULT",r="light"){return(r==="dark"?vr:qt)[e][t]}function Xo(e,t="light"){return(t==="dark"?vr:qt)[e]}function Jo(e,t,r={}){const{format:s="hex",opacity:a}=r,o=Rt(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Qo(e,t="DEFAULT",r={}){const{format:s="hex",opacity:a}=r,o=Ht(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Zo(e,t,r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Rt(e,t),d=[`${s}-${c.tailwind}`];return a&&d.push(`hover:${s}-${c.tailwind}`),o&&d.push(`focus:${s}-${c.tailwind}`),i&&d.push(`active:${s}-${c.tailwind}`),d.join(" ")}function ei(e,t="DEFAULT",r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Ht(e,t),d=[`${s}-${c.tailwind}`];if(a){const f=Ht(e,t==="DEFAULT"?"dark":"DEFAULT");d.push(`hover:${s}-${f.tailwind}`)}if(o&&d.push(`focus:${s}-${c.tailwind}`),i){const f=Ht(e,"dark");d.push(`active:${s}-${f.tailwind}`)}return d.join(" ")}function ti(e,t,r="bg"){const s=Rt(e,t);return`hover:${r}-${s.tailwind}`}function ri(e,t,r="border"){const s=Rt(e,t);return`focus:${r}-${s.tailwind}`}function si(e,t){return`focus:ring-${Rt(e,t).tailwind}`}function ni(e,t){return`rgba(${e.rgb}, ${t})`}function Un(e){const t=rs(e);return t?.299*t[0]+.587*t[1]+.114*t[2]>128:!0}function ai(e){return Un(e)?"#000000":"#ffffff"}function rs(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null}function us(e,t,r=.5){const s=rs(e),a=rs(t);if(!s||!a)return e;const o=Math.round(s[0]*(1-r)+a[0]*r),i=Math.round(s[1]*(1-r)+a[1]*r),c=Math.round(s[2]*(1-r)+a[2]*r);return`#${((1<<24)+(o<<16)+(i<<8)+c).toString(16).slice(1)}`}function oi(e,t){return us(e,"#ffffff",t/100)}function ii(e,t){return us(e,"#000000",t/100)}const li={primary:{name:"indigo",light:400,default:500,dark:600},secondary:{name:"violet",light:400,default:500,dark:600},accent:{name:"cyan",light:400,default:500,dark:600}};class Ct{static create(t){const s={sm:{minWidth:640,tailwind:"sm"},md:{minWidth:768,tailwind:"md"},lg:{minWidth:1024,tailwind:"lg"},xl:{minWidth:1280,tailwind:"xl"},"2xl":{minWidth:1536,tailwind:"2xl"}}[t];return{name:t,minWidth:s.minWidth,px:`${s.minWidth}px`,rem:`${s.minWidth/16}rem`,tailwind:s.tailwind}}}const yr={sm:Ct.create("sm"),md:Ct.create("md"),lg:Ct.create("lg"),xl:Ct.create("xl"),"2xl":Ct.create("2xl")};function ci(e){return yr[e]}function di(e,t="min"){const r=yr[e];return`@media (${t==="min"?"min-width":"max-width"}: ${r.px})`}function qn(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=qn(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Gn(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=qn(e))&&(s&&(s+=" "),s+=t);return s}const ui=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},fi=(e,t)=>({classGroupId:e,validator:t}),Kn=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),cr="-",hn=[],mi="arbitrary..",pi=e=>{const t=bi(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return hi(i);const c=i.split(cr),u=c[0]===""&&c.length>1?1:0;return Yn(c,u,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const u=s[i],d=r[i];return u?d?ui(d,u):u:d||hn}return r[i]||hn}}},Yn=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const d=Yn(e,t+1,o);if(d)return d}const i=r.validators;if(i===null)return;const c=t===0?e.join(cr):e.slice(t).join(cr),u=i.length;for(let d=0;d<u;d++){const f=i[d];if(f.validator(c))return f.classGroupId}},hi=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?mi+s:void 0})(),bi=e=>{const{theme:t,classGroups:r}=e;return gi(r,t)},gi=(e,t)=>{const r=Kn();for(const s in e){const a=e[s];fs(a,r,s,t)}return r},fs=(e,t,r,s)=>{const a=e.length;for(let o=0;o<a;o++){const i=e[o];xi(i,t,r,s)}},xi=(e,t,r,s)=>{if(typeof e=="string"){vi(e,t,r);return}if(typeof e=="function"){yi(e,t,r,s);return}wi(e,t,r,s)},vi=(e,t,r)=>{const s=e===""?t:Xn(t,e);s.classGroupId=r},yi=(e,t,r,s)=>{if(ki(e)){fs(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(fi(r,e))},wi=(e,t,r,s)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[c,u]=a[i];fs(u,Xn(t,c),r,s)}},Xn=(e,t)=>{let r=e;const s=t.split(cr),a=s.length;for(let o=0;o<a;o++){const i=s[o];let c=r.nextPart.get(i);c||(c=Kn(),r.nextPart.set(i,c)),r=c}return r},ki=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ji=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const a=(o,i)=>{r[o]=i,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(o){let i=r[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return a(o,i),i},set(o,i){o in r?r[o]=i:a(o,i)}}},ss="!",bn=":",Ni=[],gn=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),Si=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=a=>{const o=[];let i=0,c=0,u=0,d;const f=a.length;for(let y=0;y<f;y++){const w=a[y];if(i===0&&c===0){if(w===bn){o.push(a.slice(u,y)),u=y+1;continue}if(w==="/"){d=y;continue}}w==="["?i++:w==="]"?i--:w==="("?c++:w===")"&&c--}const p=o.length===0?a:a.slice(u);let m=p,h=!1;p.endsWith(ss)?(m=p.slice(0,-1),h=!0):p.startsWith(ss)&&(m=p.slice(1),h=!0);const x=d&&d>u?d-u:void 0;return gn(o,h,m,x)};if(t){const a=t+bn,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):gn(Ni,!1,i,void 0,!0)}if(r){const a=s;s=o=>r({className:o,parseClassName:a})}return s},Ci=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let a=[];for(let o=0;o<r.length;o++){const i=r[o],c=i[0]==="[",u=t.has(i);c||u?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},$i=e=>T({cache:ji(e.cacheSize),parseClassName:Si(e),sortModifiers:Ci(e)},pi(e)),Ei=/\s+/,Mi=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o}=t,i=[],c=e.trim().split(Ei);let u="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{isExternal:p,modifiers:m,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:y}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let w=!!y,g=s(w?x.substring(0,y):x);if(!g){if(!w){u=f+(u.length>0?" "+u:u);continue}if(g=s(x),!g){u=f+(u.length>0?" "+u:u);continue}w=!1}const j=m.length===0?"":m.length===1?m[0]:o(m).join(":"),C=h?j+ss:j,b=C+g;if(i.indexOf(b)>-1)continue;i.push(b);const v=a(g,w);for(let N=0;N<v.length;++N){const _=v[N];i.push(C+_)}u=f+(u.length>0?" "+u:u)}return u},Ti=(...e)=>{let t=0,r,s,a="";for(;t<e.length;)(r=e[t++])&&(s=Jn(r))&&(a&&(a+=" "),a+=s);return a},Jn=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=Jn(e[s]))&&(r&&(r+=" "),r+=t);return r},Ai=(e,...t)=>{let r,s,a,o;const i=u=>{const d=t.reduce((f,p)=>p(f),e());return r=$i(d),s=r.cache.get,a=r.cache.set,o=c,c(u)},c=u=>{const d=s(u);if(d)return d;const f=Mi(u,r);return a(u,f),f};return o=i,(...u)=>o(Ti(...u))},Ri=[],pe=e=>{const t=r=>r[e]||Ri;return t.isThemeGetter=!0,t},Qn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Zn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ii=/^\d+\/\d+$/,Di=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Li=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_i=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jt=e=>Ii.test(e),te=e=>!!e&&!Number.isNaN(Number(e)),Ke=e=>!!e&&Number.isInteger(Number(e)),qr=e=>e.endsWith("%")&&te(e.slice(0,-1)),We=e=>Di.test(e),zi=()=>!0,Oi=e=>Fi.test(e)&&!Li.test(e),ea=()=>!1,Vi=e=>_i.test(e),Wi=e=>Pi.test(e),Hi=e=>!q(e)&&!G(e),Bi=e=>It(e,sa,ea),q=e=>Qn.test(e),ft=e=>It(e,na,Oi),Gr=e=>It(e,Yi,te),xn=e=>It(e,ta,ea),Ui=e=>It(e,ra,Wi),sr=e=>It(e,aa,Vi),G=e=>Zn.test(e),_t=e=>Dt(e,na),qi=e=>Dt(e,Xi),vn=e=>Dt(e,ta),Gi=e=>Dt(e,sa),Ki=e=>Dt(e,ra),nr=e=>Dt(e,aa,!0),It=(e,t,r)=>{const s=Qn.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},Dt=(e,t,r=!1)=>{const s=Zn.exec(e);return s?s[1]?t(s[1]):r:!1},ta=e=>e==="position"||e==="percentage",ra=e=>e==="image"||e==="url",sa=e=>e==="length"||e==="size"||e==="bg-size",na=e=>e==="length",Yi=e=>e==="number",Xi=e=>e==="family-name",aa=e=>e==="shadow",Ji=()=>{const e=pe("color"),t=pe("font"),r=pe("text"),s=pe("font-weight"),a=pe("tracking"),o=pe("leading"),i=pe("breakpoint"),c=pe("container"),u=pe("spacing"),d=pe("radius"),f=pe("shadow"),p=pe("inset-shadow"),m=pe("text-shadow"),h=pe("drop-shadow"),x=pe("blur"),y=pe("perspective"),w=pe("aspect"),g=pe("ease"),j=pe("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...b(),G,q],N=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],S=()=>[G,q,u],M=()=>[jt,"full","auto",...S()],F=()=>[Ke,"none","subgrid",G,q],R=()=>["auto",{span:["full",Ke,G,q]},Ke,G,q],D=()=>[Ke,"auto",G,q],I=()=>["auto","min","max","fr",G,q],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...S()],H=()=>[jt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],W=()=>[e,G,q],ie=()=>[...b(),vn,xn,{position:[G,q]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",Gi,Bi,{size:[G,q]}],B=()=>[qr,_t,ft],K=()=>["","none","full",d,G,q],Q=()=>["",te,_t,ft],le=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[te,qr,vn,xn],U=()=>["","none",x,G,q],X=()=>["none",te,G,q],ae=()=>["none",te,G,q],fe=()=>[te,G,q],ke=()=>[jt,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[We],breakpoint:[We],color:[zi],container:[We],"drop-shadow":[We],ease:["in","out","in-out"],font:[Hi],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[We],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[We],shadow:[We],spacing:["px",te],text:[We],"text-shadow":[We],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",jt,q,G,w]}],container:["container"],columns:[{columns:[te,q,G,c]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Ke,"auto",G,q]}],basis:[{basis:[jt,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[te,jt,"auto","initial","none",q]}],grow:[{grow:["",te,G,q]}],shrink:[{shrink:["",te,G,q]}],order:[{order:[Ke,"first","last","none",G,q]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[c,"screen",...H()]}],"min-w":[{"min-w":[c,"screen","none",...H()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",r,_t,ft]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,G,Gr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qr,q]}],"font-family":[{font:[qi,q,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,G,q]}],"line-clamp":[{"line-clamp":[te,"none",G,Gr]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",G,q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",G,q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[te,"from-font","auto",G,ft]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[te,"auto",G,q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G,q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",G,q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ke,G,q],radial:["",G,q],conic:[Ke,G,q]},Ki,Ui]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[te,G,q]}],"outline-w":[{outline:["",te,_t,ft]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",f,nr,sr]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",p,nr,sr]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[te,ft]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",m,nr,sr]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[te,G,q]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[te]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[G,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[te]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",G,q]}],filter:[{filter:["","none",G,q]}],blur:[{blur:U()}],brightness:[{brightness:[te,G,q]}],contrast:[{contrast:[te,G,q]}],"drop-shadow":[{"drop-shadow":["","none",h,nr,sr]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",te,G,q]}],"hue-rotate":[{"hue-rotate":[te,G,q]}],invert:[{invert:["",te,G,q]}],saturate:[{saturate:[te,G,q]}],sepia:[{sepia:["",te,G,q]}],"backdrop-filter":[{"backdrop-filter":["","none",G,q]}],"backdrop-blur":[{"backdrop-blur":U()}],"backdrop-brightness":[{"backdrop-brightness":[te,G,q]}],"backdrop-contrast":[{"backdrop-contrast":[te,G,q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",te,G,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[te,G,q]}],"backdrop-invert":[{"backdrop-invert":["",te,G,q]}],"backdrop-opacity":[{"backdrop-opacity":[te,G,q]}],"backdrop-saturate":[{"backdrop-saturate":[te,G,q]}],"backdrop-sepia":[{"backdrop-sepia":["",te,G,q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",G,q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[te,"initial",G,q]}],ease:[{ease:["linear","initial",g,G,q]}],delay:[{delay:[te,G,q]}],animate:[{animate:["none",j,G,q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,G,q]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[G,q,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",G,q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",G,q]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[te,_t,ft,Gr]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Qi=Ai(Ji);function k(...e){return Qi(Gn(e))}const yn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wn=Gn,Zi=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return wn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(d=>{const f=r==null?void 0:r[d],p=o==null?void 0:o[d];if(f===null)return null;const m=yn(f)||yn(p);return a[d][m]}),c=r&&Object.entries(r).reduce((d,f)=>{let[p,m]=f;return m===void 0||(d[p]=m),d},{}),u=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,f)=>{let x=f,{class:p,className:m}=x,h=O(x,["class","className"]);return Object.entries(h).every(y=>{let[w,g]=y;return Array.isArray(g)?g.includes(T(T({},o),c)[w]):T(T({},o),c)[w]===g})?[...d,p,m]:d},[]);return wn(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},ve=(e,t)=>{const r=Zi(e,t);return(s=>{const a=r(s);return k(a)})};class Ae{static create(t,r="ease-in-out"){const s={fast:{value:"150ms",ms:150,tailwind:"duration-150"},base:{value:"200ms",ms:200,tailwind:"duration-200"},slow:{value:"300ms",ms:300,tailwind:"duration-300"},slower:{value:"500ms",ms:500,tailwind:"duration-500"}},a={"ease-in":{value:"cubic-bezier(0.4, 0, 1, 1)",tailwind:"ease-in",description:"Slow start, fast end"},"ease-out":{value:"cubic-bezier(0, 0, 0.2, 1)",tailwind:"ease-out",description:"Fast start, slow end"},"ease-in-out":{value:"cubic-bezier(0.4, 0, 0.2, 1)",tailwind:"ease-in-out",description:"Slow start and end, fast middle"},spring:{value:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",tailwind:"ease-[cubic-bezier(0.68,-0.55,0.265,1.55)]",description:"Spring-like bounce effect"}};return{duration:s[t],easing:a[r]}}static createTransition(t,r="base",s="ease-in-out"){const a=this.create(r,s),o=Array.isArray(t)?t.join(", "):t,i=[a.duration.tailwind,a.easing.tailwind].join(" ");return{property:o,duration:a.duration.value,timingFunction:a.easing.value,tailwind:i}}}const el={fast:Ae.create("fast"),base:Ae.create("base"),slow:Ae.create("slow"),slower:Ae.create("slower"),colors:Ae.createTransition(["color","background-color","border-color"],"base"),opacity:Ae.createTransition("opacity","fast"),transform:Ae.createTransition("transform","base"),all:Ae.createTransition("all","base")};function tl(e,t){return Ae.create(e,t)}function be(e,t="ease-in-out"){const r=Ae.create(e,t);return`${r.duration.tailwind} ${r.easing.tailwind}`}function rl(e,t="base",r="ease-in-out"){return Ae.createTransition(e,t,r).tailwind}class Te{static create(t){return{base:{value:0,tailwind:"z-0",description:"Base layer for normal content"},dropdown:{value:1e3,tailwind:"z-[1000]",description:"Dropdown menus and select options"},sticky:{value:1020,tailwind:"z-[1020]",description:"Sticky headers and navigation"},fixed:{value:1030,tailwind:"z-[1030]",description:"Fixed position elements"},"modal-backdrop":{value:1040,tailwind:"z-[1040]",description:"Modal backdrop/overlay"},modal:{value:1050,tailwind:"z-[1050]",description:"Modal dialogs and drawers"},popover:{value:1060,tailwind:"z-[1060]",description:"Popovers and tooltips"},tooltip:{value:1070,tailwind:"z-[1070]",description:"Tooltips (highest priority)"},toast:{value:1080,tailwind:"z-[1080]",description:"Toast notifications (highest priority)"}}[t]}}const kn={base:Te.create("base"),dropdown:Te.create("dropdown"),sticky:Te.create("sticky"),fixed:Te.create("fixed"),"modal-backdrop":Te.create("modal-backdrop"),modal:Te.create("modal"),popover:Te.create("popover"),tooltip:Te.create("tooltip"),toast:Te.create("toast")};function sl(e){return Te.create(e)}function ue(e){return Te.create(e).tailwind}class xe{static create(t){const r=t/100,s={0:"Fully transparent",5:"Very light overlay",10:"Light overlay",20:"Subtle overlay",25:"Quarter opacity",30:"Light background",40:"Semi-transparent",50:"Half opacity",60:"Semi-opaque",70:"Mostly opaque",75:"Three-quarter opacity",80:"High opacity",90:"Very high opacity",95:"Nearly opaque",100:"Fully opaque"};return{value:t,decimal:r,tailwind:{0:"opacity-0",5:"opacity-5",10:"opacity-10",20:"opacity-20",25:"opacity-25",30:"opacity-30",40:"opacity-40",50:"opacity-50",60:"opacity-60",70:"opacity-70",75:"opacity-75",80:"opacity-80",90:"opacity-90",95:"opacity-95",100:"opacity-100"}[t],description:s[t]}}}xe.create(0),xe.create(5),xe.create(10),xe.create(20),xe.create(25),xe.create(30),xe.create(40),xe.create(50),xe.create(60),xe.create(70),xe.create(75),xe.create(80),xe.create(90),xe.create(95),xe.create(100);function nl(e){return xe.create(e)}function al(e){return xe.create(e).tailwind}var ar={exports:{}},Pt={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Nn;function il(){return Nn||(Nn=1,process.env.NODE_ENV!=="production"&&(function(){function e(
|
|
17
|
+
*/var Nn;function il(){return Nn||(Nn=1,process.env.NODE_ENV!=="production"&&(function(){function e(L){if(L==null)return null;if(typeof L=="function")return L.$$typeof===R?null:L.displayName||L.name||null;if(typeof L=="string")return L;switch(L){case w:return"Fragment";case j:return"Profiler";case g:return"StrictMode";case N:return"Suspense";case _: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 y:return"Portal";case b:return L.displayName||"Context";case C:return(L._context.displayName||"Context")+".Consumer";case v:var B=L.render;return L=L.displayName,L||(L=B.displayName||B.name||"",L=L!==""?"ForwardRef("+L+")":"ForwardRef"),L;case S:return B=L.displayName||null,B!==null?B:e(L.type)||"Memo";case M:B=L._payload,L=L._init;try{return e(L(B))}catch(K){}}return null}function t(L){return""+L}function r(L){try{var B=!1}catch(le){B=!0}if(B){B=console;var K=B.error,Q=typeof Symbol=="function"&&Symbol.toStringTag&&L[Symbol.toStringTag]||L.constructor.name||"Object";return K.call(B,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Q),t(L)}}function s(L){if(L===w)return"<>";if(typeof L=="object"&&L!==null&&L.$$typeof===M)return"<...>";try{var B=e(L);return B?"<"+B+">":"<...>"}catch(K){return"<...>"}}function a(){var L=D.A;return L===null?null:L.getOwner()}function o(){return Error("react-stack-top-frame")}function i(L){if(I.call(L,"key")){var B=Object.getOwnPropertyDescriptor(L,"key").get;if(B&&B.isReactWarning)return!1}return L.key!==void 0}function c(L,B){function K(){Y||(Y=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",B))}K.isReactWarning=!0,Object.defineProperty(L,"key",{get:K,configurable:!0})}function u(){var L=e(this.type);return H[L]||(H[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,B,K,Q,le,se){var z=K.ref;return L={$$typeof:x,type:L,key:B,props:K,_owner:Q},(z!==void 0?z: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:le}),Object.defineProperty(L,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(L.props),Object.freeze(L)),L}function f(L,B,K,Q,le,se){var z=B.children;if(z!==void 0)if(Q)if(A(z)){for(Q=0;Q<z.length;Q++)p(z[Q]);Object.freeze&&Object.freeze(z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(z);if(I.call(B,"key")){z=e(L);var U=Object.keys(B).filter(function(ae){return ae!=="key"});Q=0<U.length?"{key: someKey, "+U.join(": ..., ")+": ...}":"{key: someKey}",ne[z+Q]||(U=0<U.length?"{"+U.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,Q,
|
|
22
|
+
<%s key={someKey} {...props} />`,Q,z,U,z),ne[z+Q]=!0)}if(z=null,K!==void 0&&(r(K),z=""+K),i(B)&&(r(B.key),z=""+B.key),"key"in B){K={};for(var X in B)X!=="key"&&(K[X]=B[X])}else K=B;return z&&c(K,typeof L=="function"?L.displayName||L.name||"Unknown":L),d(L,z,K,a(),le,se)}function p(L){m(L)?L._store&&(L._store.validated=1):typeof L=="object"&&L!==null&&L.$$typeof===M&&(L._payload.status==="fulfilled"?m(L._payload.value)&&L._payload.value._store&&(L._payload.value._store.validated=1):L._store&&(L._store.validated=1))}function m(L){return typeof L=="object"&&L!==null&&L.$$typeof===x}var h=l,x=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),b=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),R=Symbol.for("react.client.reference"),D=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,A=Array.isArray,V=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(L){return L()}};var Y,H={},W=h.react_stack_bottom_frame.bind(h,o)(),ie=V(s(o)),ne={};zt.Fragment=w,zt.jsx=function(L,B,K){var Q=1e4>D.recentlyCreatedOwnerStacks++;return f(L,B,K,!1,Q?Error("react-stack-top-frame"):W,Q?V(s(L)):ie)},zt.jsxs=function(L,B,K){var Q=1e4>D.recentlyCreatedOwnerStacks++;return f(L,B,K,!0,Q?Error("react-stack-top-frame"):W,Q?V(s(L)):ie)}})()),zt}var Sn;function ll(){return Sn||(Sn=1,process.env.NODE_ENV==="production"?ar.exports=ol():ar.exports=il()),ar.exports}var n=ll();const oa=l.createContext(void 0);function ia({children:e,defaultTheme:t="light",storageKey:r="theme"}){const[s,a]=l.useState(()=>{if(typeof window=="undefined")return t;try{const d=localStorage.getItem(r);if(d==="light"||d==="dark")return d}catch(d){console.warn("Failed to read theme from localStorage:",d)}return t});l.useEffect(()=>{if(typeof window!="undefined"){try{localStorage.setItem(r,s)}catch(d){console.warn("Failed to save theme to localStorage:",d)}typeof document!="undefined"&&(document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(s))}},[s,r]);const u={theme:s,toggleTheme:()=>{a(d=>d==="light"?"dark":"light")},setTheme:d=>{a(d)},colors:s==="light"?qt:vr,isDark:s==="dark"};return n.jsx(oa.Provider,{value:u,children:e})}function cl(){const e=l.useContext(oa);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}const dl={breakpoints:yr,spacing:xr,typography:gt,animations:el,features:{reducedMotion:!1,highContrast:!1,debug:!1},behavior:{defaultAnimationDuration:200,defaultTransitionDuration:150,focusVisible:!0}},la=l.createContext(void 0);function ca({children:e,config:t,strategy:r="default"}){const s=l.useMemo(()=>{const d=T({},dl);return t?P(T(T({},d),t),{breakpoints:t.breakpoints||d.breakpoints,spacing:t.spacing||d.spacing,typography:t.typography||d.typography,animations:t.animations||d.animations,features:T(T({},d.features),t.features),behavior:T(T({},d.behavior),t.behavior)}):d},[t]);l.useEffect(()=>{typeof document!="undefined"&&(s.features.reducedMotion?document.documentElement.style.setProperty("--motion-reduce","1"):document.documentElement.style.removeProperty("--motion-reduce"))},[s.features.reducedMotion]),l.useEffect(()=>{typeof document!="undefined"&&(s.features.highContrast?document.documentElement.classList.add("high-contrast"):document.documentElement.classList.remove("high-contrast"))},[s.features.highContrast]);const a=l.useMemo(()=>d=>s.spacing[d],[s.spacing]),o=l.useMemo(()=>d=>s.breakpoints[d],[s.breakpoints]),i=l.useMemo(()=>d=>{var f;return(f=s.features[d])!=null?f:!1},[s.features]),c=l.useMemo(()=>d=>{console.warn("ConfigProvider: updateConfig called but config is immutable. Consider using state management for dynamic updates.")},[]),u={config:s,getSpacing:a,getBreakpoint:o,isFeatureEnabled:i,updateConfig:c};return n.jsx(la.Provider,{value:u,children:e})}function ul(){const e=l.useContext(la);if(e===void 0)throw new Error("useConfig must be used within a ConfigProvider");return e}const wr=l.createContext(void 0);function ms(){const e=l.useContext(wr);if(!e)throw new Error("Toast components must be used within a ToastProvider");return e}function fl(){return l.useContext(wr)}function da({children:e,defaultDuration:t=5e3,maxToasts:r=5}){const[s,a]=l.useState([]),o=l.useCallback(d=>{var m;const f=`toast-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,p=P(T({},d),{id:f,duration:(m=d.duration)!=null?m:t});return a(h=>[p,...h].slice(0,r)),f},[t,r]),i=l.useCallback(d=>{a(f=>f.filter(p=>p.id!==d))},[]),c=l.useCallback(()=>{a([])},[]),u={toasts:s,addToast:o,removeToast:i,clearAll:c};return n.jsx(wr.Provider,{value:u,children:e})}const kr=l.createContext(void 0);function Ft(){const e=l.useContext(kr);if(!e)throw new Error("Dialog components must be used within a Dialog component");return e}function ml(){return l.useContext(kr)}function ps({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,titleId:a,descriptionId:o}){const[i,c]=l.useState(r),u=l.useRef(null),d=t!==void 0?t:i,f=m=>{t===void 0&&c(m),s==null||s(m)};l.useEffect(()=>{if(d)u.current=document.activeElement;else{const m=setTimeout(()=>{var h;(h=u.current)==null||h.focus()},0);return()=>clearTimeout(m)}},[d]),l.useEffect(()=>(d?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[d]);const p={isOpen:d,onOpenChange:f,onClose:()=>f(!1),titleId:a,descriptionId:o};return n.jsx(kr.Provider,{value:p,children:e})}const pl={ThemeProvider:ia,ConfigProvider:ca,ToastProvider:da,DialogProvider:ps},or=pl;function hl(e,t){const{theme:r,config:s,toast:a,dialog:o,providers:i={theme:!0,config:!0,toast:!0,dialog:!0}}=t||{};let c=e;return i.dialog&&(c=n.jsx(or.DialogProvider,P(T({},o),{children:c}))),i.toast&&(c=n.jsx(or.ToastProvider,P(T({},a),{children:c}))),i.config&&(c=n.jsx(or.ConfigProvider,P(T({},s),{children:c}))),i.theme&&(c=n.jsx(or.ThemeProvider,P(T({},r),{children:c}))),c}function bl({children:e,config:t}){const r=l.useMemo(()=>hl(e,t),[e,t]);return n.jsx(n.Fragment,{children:r})}function gl(){return{}}class Ye{static create(t){const s={none:{px:0,tailwind:"rounded-none",description:"No border radius"},sm:{px:2,tailwind:"rounded-sm",description:"Small radius (2px) for subtle rounding"},md:{px:6,tailwind:"rounded-md",description:"Medium radius (6px) for buttons and inputs"},lg:{px:8,tailwind:"rounded-lg",description:"Large radius (8px) for cards and containers"},xl:{px:12,tailwind:"rounded-xl",description:"Extra large radius (12px) for prominent elements"},"2xl":{px:16,tailwind:"rounded-2xl",description:"2X large radius (16px) for large containers"},"3xl":{px:24,tailwind:"rounded-3xl",description:"3X large radius (24px) for very large containers"},full:{px:9999,tailwind:"rounded-full",description:"Full radius for circular elements"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind,description:s.description}}}const xl={none:Ye.create("none"),sm:Ye.create("sm"),md:Ye.create("md"),lg:Ye.create("lg"),xl:Ye.create("xl"),"2xl":Ye.create("2xl"),"3xl":Ye.create("3xl"),full:Ye.create("full")};function J(e){return xl[e].tailwind}function vl(s){var a=s,{variant:e="info",className:t}=a,r=O(a,["variant","className"]);const o={warning:k("bg-warning-bg","text-warning-dark","border-warning"),error:k("bg-error-bg","text-error-dark","border-error"),info:k("bg-info-bg","text-info-dark","border-info")};return n.jsx("div",T({role:"alert",className:k("border",E("base","px"),E("sm","py"),J("lg"),o[e],t)},r))}const yl={primary:{light:"text-indigo-400",DEFAULT:"text-fg-brand",dark:"text-indigo-600",contrast:"text-fg-inverse"},secondary:{light:"text-pink-300",DEFAULT:"text-fg-brand-secondary",dark:"text-pink-600",contrast:"text-fg-inverse"},success:{light:"text-green-300",DEFAULT:"text-fg-success",dark:"text-success-dark",contrast:"text-fg-inverse"},warning:{light:"text-yellow-300",DEFAULT:"text-fg-warning",dark:"text-warning-dark",contrast:"text-fg-inverse"},error:{light:"text-red-300",DEFAULT:"text-fg-error",dark:"text-error-dark",contrast:"text-fg-inverse"},info:{light:"text-blue-300",DEFAULT:"text-fg-info",dark:"text-info-dark",contrast:"text-fg-inverse"},neutral:{light:"text-fg-tertiary",DEFAULT:"text-fg-secondary",dark:"text-fg-primary",contrast:"text-fg-inverse"}};function wl(f,d){var p=f,{variant:e="paragraph",bold:t,italic:r,className:s,as:a,color:o,colorRole:i="neutral",colorShade:c="dark"}=p,u=O(p,["variant","bold","italic","className","as","color","colorRole","colorShade"]);const m=[];let h;if(a)h=a;else switch(e){case"heading":h="h2";break;case"list":h="li";break;case"paragraph":default:h="p";break}return e==="heading"?m.push(ce("h2")):e==="body"||e==="paragraph"?m.push(ce("body")):e==="bodySmall"?m.push(ce("bodySmall")):e==="bodyLarge"?m.push(ce("bodyLarge")):e==="caption"?m.push(ce("caption")):e==="label"?m.push(ce("label")):m.push(ce("body")),t&&m.push("font-bold"),r&&m.push("italic"),m.push(yl[i][c]),n.jsx(h,T({ref:d,className:k(...m,s)},u))}const Ue=l.forwardRef(wl);/**
|
|
23
23
|
* @license lucide-react v0.552.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
@@ -39,142 +39,142 @@ React keys must be passed directly to JSX without using spread:
|
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
42
|
+
*/const oe=(e,t)=>{const r=l.forwardRef((i,o)=>{var c=i,{className:s}=c,a=O(c,["className"]);return l.createElement(Cl,T({ref:o,iconNode:t,className:ua(`lucide-${kl(Cn(e))}`,`lucide-${e}`,s)},a))});return r.displayName=Cn(e),r};/**
|
|
43
43
|
* @license lucide-react v0.552.0 - ISC
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const $l=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],El=
|
|
47
|
+
*/const $l=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],El=oe("arrow-up-down",$l);/**
|
|
48
48
|
* @license lucide-react v0.552.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const Ml=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Tl=
|
|
52
|
+
*/const Ml=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Tl=oe("calendar",Ml);/**
|
|
53
53
|
* @license lucide-react v0.552.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const Al=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ns=
|
|
57
|
+
*/const Al=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ns=oe("check",Al);/**
|
|
58
58
|
* @license lucide-react v0.552.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const Rl=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hs=
|
|
62
|
+
*/const Rl=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hs=oe("chevron-down",Rl);/**
|
|
63
63
|
* @license lucide-react v0.552.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const Il=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Bt=
|
|
67
|
+
*/const Il=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Bt=oe("chevron-left",Il);/**
|
|
68
68
|
* @license lucide-react v0.552.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const Dl=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],
|
|
72
|
+
*/const Dl=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],bt=oe("chevron-right",Dl);/**
|
|
73
73
|
* @license lucide-react v0.552.0 - ISC
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
77
|
+
*/const Fl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],bs=oe("circle-alert",Fl);/**
|
|
78
78
|
* @license lucide-react v0.552.0 - ISC
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
81
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const
|
|
82
|
+
*/const Ll=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],dr=oe("circle-check",Ll);/**
|
|
83
83
|
* @license lucide-react v0.552.0 - ISC
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the ISC license.
|
|
86
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const _l=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Pl=
|
|
87
|
+
*/const _l=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Pl=oe("clock",_l);/**
|
|
88
88
|
* @license lucide-react v0.552.0 - ISC
|
|
89
89
|
*
|
|
90
90
|
* This source code is licensed under the ISC license.
|
|
91
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const zl=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],Ol=
|
|
92
|
+
*/const zl=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],Ol=oe("command",zl);/**
|
|
93
93
|
* @license lucide-react v0.552.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const Vl=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Wl=
|
|
97
|
+
*/const Vl=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Wl=oe("download",Vl);/**
|
|
98
98
|
* @license lucide-react v0.552.0 - ISC
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const Hl=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],Bl=
|
|
102
|
+
*/const Hl=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],Bl=oe("ellipsis-vertical",Hl);/**
|
|
103
103
|
* @license lucide-react v0.552.0 - ISC
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const Ul=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],ql=
|
|
107
|
+
*/const Ul=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],ql=oe("eye-off",Ul);/**
|
|
108
108
|
* @license lucide-react v0.552.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const Gl=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Kl=
|
|
112
|
+
*/const Gl=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Kl=oe("eye",Gl);/**
|
|
113
113
|
* @license lucide-react v0.552.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const Yl=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Xl=
|
|
117
|
+
*/const Yl=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Xl=oe("file",Yl);/**
|
|
118
118
|
* @license lucide-react v0.552.0 - ISC
|
|
119
119
|
*
|
|
120
120
|
* This source code is licensed under the ISC license.
|
|
121
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const Jl=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],
|
|
122
|
+
*/const Jl=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Ql=oe("funnel",Jl);/**
|
|
123
123
|
* @license lucide-react v0.552.0 - ISC
|
|
124
124
|
*
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const
|
|
127
|
+
*/const Zl=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],ec=oe("grip-vertical",Zl);/**
|
|
128
128
|
* @license lucide-react v0.552.0 - ISC
|
|
129
129
|
*
|
|
130
130
|
* This source code is licensed under the ISC license.
|
|
131
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const tc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],rc=
|
|
132
|
+
*/const tc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],rc=oe("info",tc);/**
|
|
133
133
|
* @license lucide-react v0.552.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const sc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],fa=
|
|
137
|
+
*/const sc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],fa=oe("loader-circle",sc);/**
|
|
138
138
|
* @license lucide-react v0.552.0 - ISC
|
|
139
139
|
*
|
|
140
140
|
* This source code is licensed under the ISC license.
|
|
141
141
|
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const nc=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],ac=
|
|
142
|
+
*/const nc=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],ac=oe("menu",nc);/**
|
|
143
143
|
* @license lucide-react v0.552.0 - ISC
|
|
144
144
|
*
|
|
145
145
|
* This source code is licensed under the ISC license.
|
|
146
146
|
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const oc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],ic=
|
|
147
|
+
*/const oc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],ic=oe("panel-left-close",oc);/**
|
|
148
148
|
* @license lucide-react v0.552.0 - ISC
|
|
149
149
|
*
|
|
150
150
|
* This source code is licensed under the ISC license.
|
|
151
151
|
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const lc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],cc=
|
|
152
|
+
*/const lc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],cc=oe("panel-left-open",lc);/**
|
|
153
153
|
* @license lucide-react v0.552.0 - ISC
|
|
154
154
|
*
|
|
155
155
|
* This source code is licensed under the ISC license.
|
|
156
156
|
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const dc=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],as=
|
|
157
|
+
*/const dc=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],as=oe("search",dc);/**
|
|
158
158
|
* @license lucide-react v0.552.0 - ISC
|
|
159
159
|
*
|
|
160
160
|
* This source code is licensed under the ISC license.
|
|
161
161
|
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const uc=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],
|
|
162
|
+
*/const uc=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Nt=oe("star",uc);/**
|
|
163
163
|
* @license lucide-react v0.552.0 - ISC
|
|
164
164
|
*
|
|
165
165
|
* This source code is licensed under the ISC license.
|
|
166
166
|
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const fc=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],mc=
|
|
167
|
+
*/const fc=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],mc=oe("triangle-alert",fc);/**
|
|
168
168
|
* @license lucide-react v0.552.0 - ISC
|
|
169
169
|
*
|
|
170
170
|
* This source code is licensed under the ISC license.
|
|
171
171
|
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const pc=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],hc=
|
|
172
|
+
*/const pc=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],hc=oe("upload",pc);/**
|
|
173
173
|
* @license lucide-react v0.552.0 - ISC
|
|
174
174
|
*
|
|
175
175
|
* This source code is licensed under the ISC license.
|
|
176
176
|
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const bc=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],we=le("x",bc),gc=xe("motion-safe:animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-8 w-8"},variant:{primary:"text-fg-brand",secondary:"text-fg-brand-secondary",neutral:"text-fg-secondary"}},defaultVariants:{size:"md",variant:"primary"}}),gs=l.memo(function(i){var c=i,{size:t="md",variant:r="primary",label:s,className:a=""}=c,o=O(c,["size","variant","label","className"]);return n.jsxs("div",P(T({className:w("inline-flex","items-center",a),role:"status","aria-label":s||"Loading","aria-live":"polite"},o),{children:[n.jsx(fa,{className:w(gc({size:t,variant:r})),"aria-hidden":"true"}),s&&n.jsx("span",{className:w(E("sm","ml"),re("bodySmall"),"text-fg-secondary","sr-only"),children:s})]}))});gs.displayName="Spinner";const xc=xe(w("inline-flex","items-center","justify-center",ce("button").split(" ")[2]||"font-medium",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{primary:w("bg-surface-brand-strong","text-fg-inverse","hover:opacity-90","focus:ring-line-brand"),secondary:w("bg-surface-secondary","text-fg-inverse","hover:opacity-90","focus:ring-line-secondary"),error:w("bg-error","text-fg-inverse","hover:opacity-90","focus:ring-error"),outline:w("border-2","border-line-default","bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),ghost:w("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),iconOnly:w("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus","p-0")},size:{sm:w(E("md","px"),E("1.5","py"),re("bodySmall"),E("1.5","gap")),md:w(E("base","px"),E("sm","py"),re("body"),E("sm","gap")),lg:w(E("lg","px"),E("md","py"),re("bodyLarge"),E("2.5","gap"))}},compoundVariants:[{variant:"iconOnly",size:"sm",class:w("h-8","w-8","p-0")},{variant:"iconOnly",size:"md",class:w("h-10","w-10","p-0")},{variant:"iconOnly",size:"lg",class:w("h-12","w-12","p-0")}],defaultVariants:{variant:"primary",size:"md"}});function $n({children:e,position:t}){return e?n.jsx("span",{className:`inline-flex items-center ${t==="left"?"mr-0":"ml-0"}`,children:e}):null}const Z=l.memo(l.forwardRef(function(k,y){var g=k,{variant:t="primary",size:r="md",isLoading:s=!1,loadingText:a,loadingIcon:o,leftIcon:i,rightIcon:c,fullWidth:u=!1,as:d="button",className:f="",disabled:p=!1,children:m,"aria-label":h}=g,x=O(g,["variant","size","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","as","className","disabled","children","aria-label"]);const j=l.useMemo(()=>w(xc({variant:t,size:r}),u&&"w-full",f),[t,r,u,f]),C=l.useMemo(()=>t==="iconOnly"||!m&&(i||c),[t,m,i,c]),b=l.useMemo(()=>C&&!h&&!m?"Button":h,[C,h,m]),v=l.useMemo(()=>t==="error"?"primary":t==="primary"||t==="secondary"?"neutral":"primary",[t]),N=l.useMemo(()=>r==="sm"?"sm":r==="lg"?"lg":"md",[r]),_=l.useMemo(()=>o||n.jsx(gs,{size:N,variant:v}),[o,N,v]),S=d==="button"&&!x.type?"button":void 0,M=T(T({className:j,disabled:p||s,"aria-busy":s,"aria-label":b,"aria-disabled":p||s},S?{type:S}:{}),x);return n.jsx(d,P(T({ref:y},M),{children:s?n.jsxs(n.Fragment,{children:[_,a&&n.jsx("span",{className:"ml-2",children:a}),!a&&m&&n.jsx("span",{className:"ml-2 opacity-0",children:m})]}):n.jsxs(n.Fragment,{children:[i&&n.jsx($n,{position:"left",children:i}),m,c&&n.jsx($n,{position:"right",children:c})]})}))}));Z.displayName="Button";const vc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>w(E("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),ke=l.memo(l.forwardRef(function(C,j){var b=C,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,size:i="md",variant:c="outlined",leftIcon:u,rightIcon:d,showClearButton:f=!1,onClear:p,className:m="",disabled:h=!1,type:x="text",value:y,onChange:k}=b,g=O(b,["id","label","error","success","helperText","size","variant","leftIcon","rightIcon","showClearButton","onClear","className","disabled","type","value","onChange"]);const v=l.useMemo(()=>t||`input-${Math.random().toString(36).substr(2,9)}`,[t]),N=l.useMemo(()=>s?`${v}-error`:void 0,[s,v]),_=l.useMemo(()=>o?`${v}-helper`:void 0,[o,v]),[S,M]=l.useState(!1),F=l.useMemo(()=>x==="password",[x]),A=l.useMemo(()=>F&&S?"text":x,[F,S,x]),R=l.useMemo(()=>s?"error":a?"success":"default",[s,a]),I=l.useMemo(()=>y!=null&&y!=="",[y]),L=l.useMemo(()=>f&&I&&!h,[f,I,h]),z=l.useMemo(()=>"focus:border-line-focus",[]),Y=l.useMemo(()=>"focus:border-error",[]),q=l.useMemo(()=>"focus:border-success",[]),W=l.useMemo(()=>z.replace("focus:border-","focus:ring-"),[z]),ae=l.useCallback(V=>V==="error"?Y.replace("focus:border-","focus:ring-"):q.replace("focus:border-","focus:ring-"),[Y,q]),se=xe(w("w-full",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{default:w("border-0","border-b-2","border-line-default","focus:border-line-focus"),outlined:w("border","border-line-default","focus:border-line-focus"),filled:w("bg-surface-muted","border-0","focus:bg-surface-base","focus:ring-2",W)},size:{sm:w("h-8",re("bodySmall"),E("md","px")),md:w("h-10",re("body"),E("base","px")),lg:w("h-12",re("bodyLarge"),E("lg","px"))},state:{default:"",error:w("border-error","focus:border-error",ae("error")),success:w("border-success","focus:border-success",ae("success"))}},defaultVariants:{variant:"outlined",size:"md",state:"default"}}),D=l.useMemo(()=>w(se({variant:c,size:i,state:R}),u&&(i==="sm"?"pl-9":i==="lg"?"pl-12":"pl-10"),(d||L||F)&&(i==="sm"?"pr-9":i==="lg"?"pr-12":"pr-10"),m),[c,i,R,u,d,L,F,m]),B=l.useMemo(()=>w("block",ce("label"),E("xs","mb"),h&&"opacity-50"),[h]),X=l.useMemo(()=>i==="sm"?"h-4 w-4":i==="lg"?"h-5 w-5":"h-4 w-4",[i]),Q=l.useMemo(()=>i==="sm"?"top-2":i==="lg"?"top-3.5":"top-2.5",[i]),H=l.useCallback(V=>{var ne;if(V.stopPropagation(),p)p();else if(k){const oe=(ne=V.currentTarget.closest(".relative"))==null?void 0:ne.querySelector("input");if(oe){const ie={target:oe,currentTarget:oe,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}),k(ie)}}},[p,k]),U=l.useCallback(()=>{M(V=>!V)},[]);return n.jsxs("div",{className:"w-full",children:[r&&n.jsx("label",{htmlFor:v,className:B,children:r}),n.jsxs("div",{className:"relative",children:[u&&n.jsx("div",{className:`absolute left-3 ${Q} text-fg-secondary opacity-60 pointer-events-none`,children:n.jsx("div",{className:X,children:u})}),n.jsx("input",T({id:v,ref:j,type:A,className:D,disabled:h,value:y,onChange:k,"aria-invalid":s,"aria-required":g.required,"aria-describedby":N||_,suppressHydrationWarning:!0},g)),n.jsxs("div",{className:"absolute right-3 top-0 bottom-0 flex items-center gap-1",children:[L&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:H,className:"h-auto p-1","aria-label":"Clear input",children:n.jsx(we,{className:X})}),F&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:U,className:"h-auto p-1","aria-label":S?"Hide password":"Show password",children:S?n.jsx(ql,{className:X}):n.jsx(Kl,{className:X})}),d&&!L&&!F&&n.jsx("div",{className:`text-fg-secondary opacity-60 pointer-events-none ${X}`,children:d})]})]}),(s||a||o)&&n.jsx(vc,{error:s,success:a,helperText:o,errorId:N,helperId:_})]})}));ke.displayName="Input";function ma({href:e,active:t}){const r=l.useMemo(()=>t!==void 0?t:!1,[t]),s=l.useMemo(()=>{try{const a=typeof require!="undefined"?require("next/link"):null;return a==null?void 0:a.default}catch(a){return}},[]);return{isActive:r,NextLink:s}}const yc=xe(w("inline-flex","items-center","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","disabled:pointer-events-none","no-underline"),{variants:{variant:{default:w("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","focus:ring-line-brand"),underline:w("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","border-b-2","border-transparent","hover:border-current","focus:ring-line-brand"),background:w("text-fg-primary","hover:bg-surface-hover","rounded-md",J("md"),"focus:ring-line-brand")},size:{sm:w(E("sm","px"),E("xs","py"),re("bodySmall")),md:w(E("base","px"),E("sm","py"),re("body")),lg:w(E("lg","px"),E("md","py"),re("bodyLarge"))}},defaultVariants:{variant:"default",size:"md"},compoundVariants:[{variant:"underline",size:"sm",class:E("0.5","pb")},{variant:"underline",size:"md",class:E("xs","pb")},{variant:"underline",size:"lg",class:E("1.5","pb")},{variant:"background",size:"sm",class:E("xs","px")},{variant:"background",size:"md",class:E("sm","px")},{variant:"background",size:"lg",class:E("base","px")}]});function xs(m){var h=m,{href:e,children:t,active:r,disabled:s=!1,variant:a="default",size:o="md",as:i,className:c,"aria-label":u,onClick:d,onKeyDown:f}=h,p=O(h,["href","children","active","disabled","variant","size","as","className","aria-label","onClick","onKeyDown"]);const x=l.useMemo(()=>r!==void 0?r:!1,[r]),{NextLink:y}=ma({href:e,active:x}),k=i||y||"a",g=l.useMemo(()=>{if(!x)return"";switch(a){case"underline":return w("border-b-2","border-line-brand","text-fg-brand-emphasis");case"background":return w("bg-surface-brand-muted","text-fg-brand-emphasis");case"default":default:return w("text-fg-brand-emphasis","font-semibold")}},[x,a]),j=l.useCallback(v=>{if(s){v.preventDefault(),v.stopPropagation();return}d==null||d(v)},[s,d]),C=l.useCallback(v=>{if(s){(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),v.stopPropagation());return}f==null||f(v)},[s,f]),b=l.useMemo(()=>{const v=T({className:w(yc({variant:a,size:o}),g,s&&"opacity-50 cursor-not-allowed pointer-events-none",c),"aria-current":x?"page":void 0,"aria-disabled":s?!0:void 0,"aria-label":u,tabIndex:s?-1:void 0,onClick:j,onKeyDown:C,"data-active":x,"data-disabled":s},p);return y&&!i?P(T({},v),{href:s?void 0:e}):P(T({},v),{href:s?void 0:e})},[a,o,g,s,c,x,u,j,C,e,y,i,p]);return n.jsx(k,P(T({},b),{children:t}))}const wc=xe(w("inline-flex","items-center","justify-center",Fe("label"),J("md"),"border"),{variants:{variant:{success:"",warning:"",error:"",info:"",neutral:"",primary:"",secondary:""},size:{sm:w(E("1.5","px"),E("0.5","py"),re("caption")),md:w(E("sm","px"),E("xs","py"),re("caption")),lg:w(E("sm","px"),E("xs","py"),re("bodySmall"))},style:{solid:"",outline:""}},compoundVariants:[{variant:"success",style:"solid",class:w("bg-success-bg","text-success-dark","border-success")},{variant:"warning",style:"solid",class:w("bg-warning-bg","text-warning-dark","border-warning")},{variant:"error",style:"solid",class:w("bg-error-bg","text-error-dark","border-error")},{variant:"info",style:"solid",class:w("bg-info-bg","text-info-dark","border-info")},{variant:"neutral",style:"solid",class:w("bg-surface-muted","text-fg-primary","border-line-default")},{variant:"primary",style:"solid",class:w("bg-surface-brand-subtle","text-fg-brand-emphasis","border-line-brand")},{variant:"secondary",style:"solid",class:w("bg-pink-300","text-fg-brand-secondary-emphasis","border-line-secondary")},{variant:"success",style:"outline",class:w("bg-transparent","border-success","text-fg-success")},{variant:"warning",style:"outline",class:w("bg-transparent","border-warning","text-fg-warning")},{variant:"error",style:"outline",class:w("bg-transparent","border-error","text-fg-error")},{variant:"info",style:"outline",class:w("bg-transparent","border-info","text-fg-info")},{variant:"neutral",style:"outline",class:w("bg-transparent","border-line-default","text-fg-secondary")},{variant:"primary",style:"outline",class:w("bg-transparent","border-line-brand","text-fg-brand")},{variant:"secondary",style:"outline",class:w("bg-transparent","border-line-secondary","text-fg-brand-secondary")}],defaultVariants:{variant:"neutral",size:"md",style:"solid"}}),pa=l.memo(l.forwardRef(function(d,u){var f=d,{variant:t="neutral",size:r="md",style:s="solid",className:a="",children:o,"aria-label":i}=f,c=O(f,["variant","size","style","className","children","aria-label"]);const p=l.useMemo(()=>w(wc({variant:t,size:r,style:s}),a),[t,r,s,a]),m=l.useMemo(()=>{if(i)return i;if(typeof o=="string")return o;if(typeof o=="object"&&o!==null&&"props"in o){const h=o.props;if(h!=null&&h.children&&typeof h.children=="string")return h.children}},[i,o]);return n.jsx("span",P(T({ref:u,role:"status","aria-label":m,className:p},c),{children:o}))}));pa.displayName="Badge";const kc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>w(E("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),jr=l.memo(l.forwardRef(function(x,h){var y=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}=y,m=O(y,["options","optionGroups","placeholder","label","error","success","helperText","size","className","disabled","id"]);const k=l.useMemo(()=>p||`select-${Math.random().toString(36).substr(2,9)}`,[p]),g=l.useMemo(()=>o?`${k}-error`:void 0,[o,k]),j=l.useMemo(()=>c?`${k}-helper`:void 0,[c,k]),C=l.useMemo(()=>"focus:border-line-focus",[]),b=l.useMemo(()=>"focus:border-error",[]),v=l.useMemo(()=>"focus:border-success",[]),N=l.useCallback(A=>A==="error"?b.replace("focus:border-","focus:ring-"):A==="success"?v.replace("focus:border-","focus:ring-"):C.replace("focus:border-","focus:ring-"),[b,v,C]),_=xe(w("block","w-full",J("md"),"border","bg-surface-base","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{size:{sm:w("h-8",re("bodySmall"),E("md","px")),md:w("h-10",re("body"),E("base","px")),lg:w("h-12",re("bodyLarge"),E("lg","px"))},state:{default:w("border-line-default",N()),error:w("border-error",N("error")),success:w("border-success",N("success"))}},defaultVariants:{size:"md",state:"default"}}),S=l.useMemo(()=>o?"error":i?"success":"default",[o,i]),M=l.useMemo(()=>w(_({size:u,state:S}),d),[u,S,d]),F=l.useMemo(()=>w("block",ce("label"),E("xs","mb"),f&&"opacity-50"),[f]);return n.jsxs("div",{className:"w-full",children:[a&&n.jsx("label",{htmlFor:k,className:F,children:a}),n.jsxs("select",P(T({id:k,ref:h,className:M,disabled:f,"aria-invalid":o,"aria-required":m.required,"aria-describedby":g||j},m),{children:[s&&n.jsx("option",{value:"",disabled:!0,children:s}),r&&r.length>0?r.map((A,R)=>n.jsx("optgroup",{label:A.label,children:(A.options||[]).map(I=>n.jsx("option",{value:I.value,disabled:I.disabled,children:I.label},I.value))},R)):(t||[]).map(A=>n.jsx("option",{value:A.value,disabled:A.disabled,children:A.label},A.value))]})),(o||i||c)&&n.jsx(kc,{error:o,success:i,helperText:c,errorId:g,helperId:j})]})}));jr.displayName="Select";const ha=l.memo(l.forwardRef(function(i,o){var c=i,{error:t=!1,resize:r="vertical",className:s=""}=c,a=O(c,["error","resize","className"]);const u=l.useMemo(()=>"focus:border-line-focus",[]),d=l.useMemo(()=>"focus:border-error",[]),f=l.useMemo(()=>t?d.replace("focus:border-","focus:ring-"):u.replace("focus:border-","focus:ring-"),[t,d,u]),p=l.useMemo(()=>({none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"}),[]),m=l.useMemo(()=>w("block","w-full",J("md"),E("base","px"),E("md","py"),"border",re("body"),"focus:outline-none","focus:ring-2","focus:ring-offset-2",p[r],w(t?"border-error":"border-line-default",f),s),[r,p,t,f,s]),h=l.useMemo(()=>t&&a.id?`${a.id}-error`:void 0,[t,a.id]);return n.jsx("textarea",T({ref:o,className:m,"aria-invalid":t,"aria-describedby":h},a))}));ha.displayName="Textarea";const Mt=l.memo(l.forwardRef(function(i,o){var c=i,{variant:t="default",className:r="",children:s}=c,a=O(c,["variant","className","children"]);const u=l.useMemo(()=>w("block",re("label"),Fe("label"),"text-fg-primary"),[]),d=l.useMemo(()=>({default:"",required:w("after:content-['*']",`after:${E("0.5","ml")}`,"after:text-fg-error"),optional:w("after:content-['(optional)']","after:ml-1","after:text-fg-tertiary","after:font-normal")}),[]),f=l.useMemo(()=>w(u,d[t],r),[u,d,t,r]);return n.jsx("label",P(T({ref:o,className:f},a),{children:s}))}));Mt.displayName="Label";function ba(a){var o=a,{message:e,id:t,className:r=""}=o,s=O(o,["message","id","className"]);const i=[E("xs","mt"),re("bodySmall"),"text-fg-error","flex","items-center",E("xs","gap")],c=w(...i,r);return n.jsxs("div",P(T({role:"alert",id:t,className:c,"aria-live":"polite"},s),{children:[n.jsx(bs,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:e})]}))}class Ie{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`}}}Ie.create("none"),Ie.create("thin"),Ie.create("base"),Ie.create("medium"),Ie.create("thick"),Ie.create("thin","dashed"),Ie.create("base","dashed"),Ie.create("thin","dotted"),Ie.create("base","dotted");function jc(e){return Ie.createWidth(e).tailwind}function Ut(u){var d=u,{content:e,children:t,position:r="top",delay:s=200,className:a="","aria-label":o,preservePositioning:i=!1}=d,c=O(d,["content","children","position","delay","className","aria-label","preservePositioning"]);const[f,p]=l.useState(!1),m=l.useRef(null),h=l.useRef(null),x=l.useRef(null),y=`tooltip-${Math.random().toString(36).substr(2,9)}`,k=()=>{const F=setTimeout(()=>{p(!0)},s);m.current=F},g=()=>{m.current&&(clearTimeout(m.current),m.current=null),p(!1)},j=()=>{p(!0)},C=()=>{p(!1)},b=F=>{var A;F.key==="Escape"&&(p(!1),(A=x.current)==null||A.blur())};l.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),l.useEffect(()=>{if(!f)return;const F=A=>{h.current&&!h.current.contains(A.target)&&x.current&&!x.current.contains(A.target)&&p(!1)};return document.addEventListener("mousedown",F),()=>{document.removeEventListener("mousedown",F)}},[f]);const v=F=>({top:"border-t-surface-inverse",bottom:"border-b-surface-inverse",left:"border-l-surface-inverse",right:"border-r-surface-inverse"})[F],N=xe(w("absolute",ue("tooltip"),E("sm","px"),E("xs","py"),re("caption"),"text-fg-inverse","bg-surface-inverse",J("md"),"shadow-lg","whitespace-nowrap"),{variants:{position:{top:w("bottom-full","left-1/2","transform","-translate-x-1/2",E("sm","mb")),bottom:w("top-full","left-1/2","transform","-translate-x-1/2",E("sm","mt")),left:w("right-full","top-1/2","transform","-translate-y-1/2",E("sm","mr")),right:w("left-full","top-1/2","transform","-translate-y-1/2",E("sm","ml"))}},defaultVariants:{position:"top"}}),_=xe(w("absolute","w-0","h-0",jc("thick"),"border-transparent"),{variants:{position:{top:w("top-full","left-1/2","transform","-translate-x-1/2",v("top")),bottom:w("bottom-full","left-1/2","transform","-translate-x-1/2",v("bottom")),left:w("left-full","top-1/2","transform","-translate-y-1/2",v("left")),right:w("right-full","top-1/2","transform","-translate-y-1/2",v("right"))}},defaultVariants:{position:"top"}}),S=l.isValidElement(t)?(()=>{const F=t,A=F.props,R=A.ref;return l.cloneElement(F,{ref:I=>{x.current=I,typeof R=="function"?R(I):R&&typeof R=="object"&&"current"in R&&(R.current=I)},"aria-describedby":f?y:A["aria-describedby"],onMouseEnter:I=>{var L;k(),(L=A.onMouseEnter)==null||L.call(A,I)},onMouseLeave:I=>{var L;g(),(L=A.onMouseLeave)==null||L.call(A,I)},onFocus:I=>{var L;j(),(L=A.onFocus)==null||L.call(A,I)},onBlur:I=>{var L;C(),(L=A.onBlur)==null||L.call(A,I)},onKeyDown:I=>{var L;b(I),(L=A.onKeyDown)==null||L.call(A,I)}})})():t,M=w(i?"static":"relative","inline-block",a);return n.jsxs("div",P(T({className:M},c),{children:[S,f&&n.jsxs("div",{ref:h,id:y,className:w(N({position:r})),role:"tooltip","aria-live":"polite",children:[e,n.jsx("div",{className:w(_({position:r})),"aria-hidden":"true"})]})]}))}function ga(c){var u=c,{variant:e="text",width:t,height:r,lines:s=1,className:a="","aria-label":o}=u,i=O(u,["variant","width","height","lines","className","aria-label"]);const d=["motion-safe:animate-pulse","bg-surface-muted",J("sm")],f={text:"h-4",card:"h-32",list:"h-12",circle:"rounded-full"},p=w(...d,f[e],a),m={};t&&(m.width=t),r&&(m.height=r);const h=o||`Loading ${e} content`;return e==="text"&&s>1?n.jsx("div",P(T({className:E("sm","space-y"),role:"status","aria-busy":"true","aria-label":h},i),{children:Array.from({length:s}).map((x,y)=>n.jsx("div",{className:p,style:y===s-1?{width:"75%"}:m,"aria-hidden":"true"},y))})):n.jsx("div",T({className:p,style:m,role:"status","aria-busy":"true","aria-label":h},i))}function Nc({defaultOpen:e=!0,open:t,onOpenChange:r,storageKey:s}){const a=l.useCallback(()=>{if(s&&typeof window!="undefined"){const f=localStorage.getItem(s);if(f!==null)return f==="true"}return e},[e,s]),[o,i]=l.useState(a),c=t!==void 0?t:o;l.useEffect(()=>{s&&typeof window!="undefined"&&t===void 0&&localStorage.setItem(s,String(o))},[o,s,t]);const u=l.useCallback(f=>{t===void 0&&i(f),r==null||r(f)},[t,r]),d=l.useCallback(()=>{u(!c)},[c,u]);return{isOpen:c,toggle:d,setOpen:u}}function xa(f){var p=f,{children:e,trigger:t,defaultOpen:r=!0,open:s,onOpenChange:a,disabled:o=!1,duration:i=200,storageKey:c,className:u=""}=p,d=O(p,["children","trigger","defaultOpen","open","onOpenChange","disabled","duration","storageKey","className"]);const{isOpen:m,toggle:h}=Nc({defaultOpen:r,open:s,onOpenChange:a,storageKey:c}),x=l.useRef(null),[y,k]=l.useState(m?"auto":0);l.useEffect(()=>{x.current&&k(m?x.current.scrollHeight:0)},[m,e]),l.useEffect(()=>{if(!m||!x.current)return;const j=new ResizeObserver(()=>{x.current&&m&&k(x.current.scrollHeight)});return j.observe(x.current),()=>{j.disconnect()}},[m]);const g=`collapsible-content-${Math.random().toString(36).substr(2,9)}`;return n.jsxs("div",P(T({className:u},d),{children:[n.jsx("button",{type:"button",onClick:h,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),o||h())},disabled:o,"aria-expanded":m,"aria-controls":g,"aria-disabled":o,className:w("w-full","text-left","focus:outline-none","focus:ring-2","focus:ring-line-brand","focus:ring-offset-2",J("md")),children:t}),n.jsx("div",{id:g,ref:x,style:{height:typeof y=="number"?`${y}px`:y,overflow:"hidden",transition:`height ${i}ms ease-in-out`},"aria-hidden":!m,children:n.jsx("div",{children:e})})]}))}const Nr=l.memo(l.forwardRef(function(f,d){var p=f,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1,indeterminate:c=!1}=p,u=O(p,["id","label","error","helperText","className","disabled","indeterminate"]);const m=l.useMemo(()=>t||`checkbox-${Math.random().toString(36).substr(2,9)}`,[t]),h=l.useMemo(()=>s?`${m}-error`:void 0,[s,m]),x=l.useMemo(()=>a?`${m}-helper`:void 0,[a,m]),y=l.useMemo(()=>"focus:border-line-focus",[]),k=l.useMemo(()=>"focus:border-error",[]),g=l.useMemo(()=>s?k.replace("focus:border-","focus:ring-"):y.replace("focus:border-","focus:ring-"),[s,k,y]),j=l.useMemo(()=>w("h-4","w-4",J("sm"),"border","border-line-default","text-fg-brand","focus:ring-2",g,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[g,s,o]),C=l.useMemo(()=>w(ce("label"),E("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]),b=l.useRef(null),v=l.useCallback(N=>{b.current=N,typeof d=="function"?d(N):d&&(d.current=N),N&&(N.indeterminate=c)},[d,c]);return l.useEffect(()=>{b.current&&(b.current.indeterminate=c)},[c]),n.jsxs("div",{className:w("flex","flex-col",E("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",T({type:"checkbox",id:m,ref:v,className:j,disabled:i,"aria-invalid":s,"aria-describedby":h||x||void 0,"aria-label":r?void 0:"Checkbox"},u)),r&&n.jsx("label",{htmlFor:m,className:C,children:r})]}),(s||a)&&n.jsx("div",{id:h||x,className:w(E("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));Nr.displayName="Checkbox";const va=l.memo(l.forwardRef(function(d,u){var f=d,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1}=f,c=O(f,["id","label","error","helperText","className","disabled"]);const p=l.useMemo(()=>t||`radio-${Math.random().toString(36).substr(2,9)}`,[t]),m=l.useMemo(()=>s?`${p}-error`:void 0,[s,p]),h=l.useMemo(()=>a?`${p}-helper`:void 0,[a,p]),x=l.useMemo(()=>"focus:border-line-focus",[]),y=l.useMemo(()=>"focus:border-error",[]),k=l.useMemo(()=>s?y.replace("focus:border-","focus:ring-"):x.replace("focus:border-","focus:ring-"),[s,y,x]),g=l.useMemo(()=>w("h-4","w-4","border","border-line-default","text-fg-brand","focus:ring-2",k,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[k,s,o]),j=l.useMemo(()=>w(ce("label"),E("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]);return n.jsxs("div",{className:w("flex","flex-col",E("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",T({type:"radio",id:p,ref:u,className:g,disabled:i,"aria-invalid":s,"aria-describedby":m||h||void 0,"aria-label":r?void 0:"Radio button"},c)),r&&n.jsx("label",{htmlFor:p,className:j,children:r})]}),(s||a)&&n.jsx("div",{id:m||h,className:w(E("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));va.displayName="Radio";class ft{static create(t){return{none:{value:"none",tailwind:"shadow-none",description:"No shadow"},sm:{value:"0 1px 2px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-sm",description:"Small shadow for subtle elevation"},md:{value:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",tailwind:"shadow-md",description:"Medium shadow for cards and elevated elements"},lg:{value:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",tailwind:"shadow-lg",description:"Large shadow for modals and dropdowns"},xl:{value:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",tailwind:"shadow-xl",description:"Extra large shadow for prominent modals"},"2xl":{value:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",tailwind:"shadow-2xl",description:"2X large shadow for maximum elevation"},inner:{value:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-inner",description:"Inner shadow for inset elements"}}[t]}}const Sc={none:ft.create("none"),sm:ft.create("sm"),md:ft.create("md"),lg:ft.create("lg"),xl:ft.create("xl"),"2xl":ft.create("2xl"),inner:ft.create("inner")};function Se(e){return Sc[e].tailwind}const Ot={track:{sm:{w:"w-9",h:"h-5"},md:{w:"w-11",h:"h-6"},lg:{w:"w-14",h:"h-7"}},thumb:{sm:{w:"w-4",h:"h-4"},md:{w:"w-5",h:"h-5"},lg:{w:"w-6",h:"h-6"}},translate:{sm:"translate-x-4",md:"translate-x-5",lg:"translate-x-7"}};function Cc(e){return{track:`${Ot.track[e].w} ${Ot.track[e].h}`,thumb:`${Ot.thumb[e].w} ${Ot.thumb[e].h}`,translate:Ot.translate[e]}}const $c=xe("w-full",{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},variant:{primary:"bg-surface-muted",secondary:"bg-surface-muted",success:"bg-success-bg-emphasis",error:"bg-error-bg-emphasis",warning:"bg-warning-bg-emphasis",info:"bg-info-bg-emphasis"}},defaultVariants:{size:"md",variant:"primary"}}),En=xe("transition-all",{variants:{variant:{primary:"bg-surface-brand",secondary:"bg-surface-secondary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info"}},defaultVariants:{variant:"primary"}}),vs=l.forwardRef(function(p,f){var m=p,{value:t,max:r=100,variant:s="primary",size:a="md",showLabel:o=!1,label:i,"aria-label":c,className:u=""}=m,d=O(m,["value","max","variant","size","showLabel","label","aria-label","className"]);const h=t===void 0,x=h?void 0:Math.min(Math.max(t/r*100,0),100),y=c||(h?"Loading in progress":`Progress: ${x==null?void 0:x.toFixed(0)}%`);return n.jsxs("div",P(T({ref:f,className:w("w-full",u)},d),{children:[o&&(i||!h)&&n.jsxs("div",{className:w("flex","items-center","justify-between",E("xs","mb")),children:[i&&n.jsx("span",{className:w(re("bodySmall"),Fe("label"),"text-fg-primary"),children:i}),!h&&x!==void 0&&n.jsxs("span",{className:w(re("bodySmall"),"text-fg-secondary"),children:[x.toFixed(0),"%"]})]}),n.jsx("div",{role:"progressbar","aria-valuemin":h?void 0:0,"aria-valuemax":h?void 0:r,"aria-valuenow":h?void 0:t,"aria-label":y,"aria-busy":h,className:w("relative","w-full","overflow-hidden",$c({size:a,variant:s}),J("full")),children:h?n.jsx("div",{className:w("absolute","top-0","left-0","bottom-0",En({variant:s}),J("full"),"motion-reduce:animate-none"),style:{width:"30%",animation:"progress-indeterminate 1.5s ease-in-out infinite"}}):n.jsx("div",{className:w("h-full",En({variant:s}),J("full"),"transition-all","duration-300","ease-out"),style:{width:`${x}%`},"aria-hidden":"true"})})]}))});vs.displayName="Progress";const ya=l.memo(l.forwardRef(function(m,p){var h=m,{size:t="md",label:r,description:s,error:a=!1,className:o="",disabled:i=!1,checked:c,onChange:u,id:d}=h,f=O(h,["size","label","description","error","className","disabled","checked","onChange","id"]);const x=l.useMemo(()=>d||`switch-${Math.random().toString(36).substr(2,9)}`,[d]),y=l.useMemo(()=>r?`${x}-label`:void 0,[r,x]),k=l.useMemo(()=>s?`${x}-description`:void 0,[s,x]),g=l.useMemo(()=>Cc(t),[t]),j=l.useMemo(()=>"focus:border-line-focus".replace("focus:border-","focus:ring-"),[]),C=l.useMemo(()=>w("relative","inline-flex","shrink-0","cursor-pointer","rounded-full","border-2","border-transparent",he("base"),"focus:outline-none","focus:ring-2",j,"focus:ring-offset-2",g.track,c?"bg-surface-brand":"bg-surface-muted",a&&!c&&"border-error",i&&"opacity-50 cursor-not-allowed",o),[j,g.track,c,a,i,o]),b=l.useMemo(()=>w("pointer-events-none","inline-block","rounded-full","bg-surface-base","shadow","transform",he("base"),g.thumb,c?g.translate:"translate-x-0"),[g.thumb,g.translate,c]);return n.jsxs("div",{className:w("flex","items-start",E("md","gap")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("button",{type:"button",className:C,role:"switch","aria-checked":c,"aria-labelledby":y,"aria-describedby":k,disabled:i,onClick:l.useCallback(v=>{if(!i&&u){const N=P(T({},v),{target:P(T({},v.target),{checked:!c}),currentTarget:P(T({},v.currentTarget),{checked:!c})});u(N)}},[i,u,c]),onKeyDown:l.useCallback(v=>{if((v.key==="Enter"||v.key===" ")&&!i&&u){v.preventDefault();const N=P(T({},v),{target:P(T({},v.target),{checked:!c}),currentTarget:P(T({},v.currentTarget),{checked:!c})});u(N)}},[i,u,c]),children:n.jsx("span",{className:b})}),n.jsx("input",T({ref:p,type:"checkbox",id:x,checked:c,onChange:u,disabled:i,className:"sr-only","aria-hidden":"true",tabIndex:-1},f))]}),(r||s)&&n.jsxs("div",{className:"flex-1",children:[r&&n.jsx("label",{id:y,htmlFor:x,className:w("block",re("bodySmall"),Fe("label"),a?"text-fg-error":"text-fg-primary",i?"opacity-50":"cursor-pointer"),children:r}),s&&n.jsx("p",{id:k,className:w(E("xs","mt"),re("bodySmall"),a?"text-fg-error":"text-fg-secondary"),children:s})]})]})}));ya.displayName="Switch";const ys=l.memo(function(o){var i=o,{orientation:t="horizontal",variant:r="solid",className:s=""}=i,a=O(i,["orientation","variant","className"]);const c=l.useMemo(()=>{const u=["border-0","border-line-default"],d={horizontal:"w-full border-t",vertical:"h-full border-l self-stretch"},f={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"};return w(...u,d[t],f[r],s)},[t,r,s]);return t==="vertical"?n.jsx("div",T({className:c,role:"separator","aria-orientation":"vertical"},a)):n.jsx("hr",T({className:c,role:"separator","aria-orientation":"horizontal"},a))});ys.displayName="Separator";const wa=l.forwardRef(function(g,k){var j=g,{value:t,defaultValue:r,min:s=0,max:a=100,step:o=1,variant:i="single",size:c="md",disabled:u=!1,showValue:d=!1,marks:f=[],onChange:p,onValueChange:m,label:h,className:x=""}=j,y=O(j,["value","defaultValue","min","max","step","variant","size","disabled","showValue","marks","onChange","onValueChange","label","className"]);const C=l.useRef(null),[b,v]=l.useState(r||(i==="range"?[s,a]:s)),[N,_]=l.useState(!1),[S,M]=l.useState(null),F=t!==void 0,A=F?t:b,R=H=>(H-s)/(a-s)*100,I=H=>{if(!C.current)return s;const U=C.current.getBoundingClientRect(),V=Math.max(0,Math.min(1,(H-U.left)/U.width)),ne=s+V*(a-s);return Math.round(ne/o)*o},L=(H,U="min")=>{if(u)return;H.preventDefault(),_(!0),M(U);const V=oe=>{if(!C.current)return;const ie=I(oe.clientX);z(ie,U)},ne=()=>{_(!1),M(null),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",ne)};document.addEventListener("mousemove",V),document.addEventListener("mouseup",ne)},z=(H,U="min")=>{const V=Math.max(s,Math.min(a,H));if(i==="range"){const[ne,oe]=Array.isArray(A)?A:[s,a];let ie;U==="min"?ie=[Math.min(V,oe),oe]:ie=[ne,Math.max(V,ne)],F||v(ie),p==null||p(ie),m==null||m(ie)}else F||v(V),p==null||p(V),m==null||m(V)},Y=H=>{if(u||N)return;const U=I(H.clientX);z(U)},q=()=>"focus:ring-line-brand ring-offset-2",W=xe(w("relative","cursor-pointer"),{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),ae=xe(w("absolute","bg-surface-brand","rounded-full","border-2","border-white","shadow-md","cursor-grab","active:cursor-grabbing",he("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:q(),false:""}},defaultVariants:{size:"md",active:!1}}),se=typeof A=="number"?A:A[0],D=Array.isArray(A)?A[0]:s,B=Array.isArray(A)?A[1]:se,X=R(D),Q=R(B);return n.jsxs("div",P(T({ref:k,className:w("w-full",x)},y),{children:[h&&n.jsxs("label",{className:w("block",re("bodySmall"),Fe("label"),"text-fg-primary",E("sm","mb")),children:[h,d&&n.jsx("span",{className:w(E("sm","ml"),"text-fg-secondary"),children:i==="range"?`${D} - ${B}`:se})]}),n.jsxs("div",{ref:C,className:w(W({size:c,disabled:u}),"bg-surface-muted",J("full")),onClick:Y,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:se,"aria-disabled":i==="range"?void 0:u,"aria-label":i==="range"?void 0:h,children:[n.jsx("div",{className:w("absolute",W({size:c}),"bg-surface-brand",J("full"),he("base")),style:{left:`${X}%`,width:`${Q-X}%`}}),f.map(H=>{const U=R(H);return n.jsx("div",{className:w("absolute","w-1","h-1","bg-line-strong",J("full"),"-translate-x-1/2"),style:{left:`${U}%`,top:"50%",transform:"translate(-50%, -50%)"}},H)}),i==="range"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:w(ae({size:c,active:S==="min"})),style:{left:`${X}%`},onMouseDown:H=>L(H,"min"),role:"slider","aria-valuemin":s,"aria-valuemax":B,"aria-valuenow":D}),n.jsx("div",{className:w(ae({size:c,active:S==="max"})),style:{left:`${Q}%`},onMouseDown:H=>L(H,"max"),role:"slider","aria-valuemin":D,"aria-valuemax":a,"aria-valuenow":B})]}):n.jsx("div",{className:w(ae({size:c,active:N})),style:{left:`${Q}%`},onMouseDown:H=>L(H)}),d&&!h&&n.jsx("div",{className:"absolute -top-6 left-0 right-0 flex justify-center",children:n.jsx("span",{className:w(re("caption"),"text-fg-secondary","bg-surface-overlay",E("sm","px"),E("xs","py"),J("md"),"shadow"),children:i==="range"?`${D} - ${B}`:se})})]})]}))});wa.displayName="Slider";const Ec=xe(w("inline-flex","items-center","font-medium",J("full"),E("xs","gap")),{variants:{variant:{default:w("bg-surface-muted","text-fg-primary","border","border-line-default"),outlined:w("bg-transparent","text-fg-primary","border","border-line-default"),filled:w("bg-surface-brand-strong","text-fg-inverse","border","border-transparent")},size:{sm:w(E("xs","px"),E("xs","py"),re("caption")),md:w(E("sm","px"),E("xs","py"),re("bodySmall")),lg:w(E("md","px"),E("sm","py"),re("body"))},selected:{true:w("bg-surface-brand-strong","text-fg-inverse","border","border-line-brand"),false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},compoundVariants:[{selected:!0,variant:"default",class:""},{selected:!0,variant:"outlined",class:""},{selected:!0,variant:"filled",class:""}],defaultVariants:{variant:"default",size:"md",selected:!1,disabled:!1}}),ws=l.forwardRef(function(h,m){var x=h,{children:t,variant:r="default",size:s="md",onRemove:a,selected:o=!1,disabled:i=!1,className:c="","aria-label":u,onClick:d,tabIndex:f}=x,p=O(x,["children","variant","size","onRemove","selected","disabled","className","aria-label","onClick","tabIndex"]);const y=d!==void 0||o!==!1&&o!==void 0,k=o?"option":y?"button":void 0,j=(()=>{if(u)return u;if(typeof t=="string")return t;if(typeof t=="object"&&t!==null&&"props"in t){const v=t.props;if(v!=null&&v.children&&typeof v.children=="string")return v.children}})(),C=k==="button"&&!j,b=v=>{i||(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),d&&d())};return n.jsxs("div",P(T({ref:m,className:w(Ec({variant:r,size:s,selected:o,disabled:i}),a&&E("xs","pr"),y&&!i&&"cursor-pointer focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2",c),role:k,"aria-selected":o?!0:void 0,"aria-disabled":i,"aria-label":C?"Chip":u||(k==="button"?j:void 0),tabIndex:f!==void 0?f:y&&!i?0:void 0,onClick:i?void 0:d,onKeyDown:b},p),{children:[n.jsx("span",{children:t}),a&&!i&&n.jsx("button",{type:"button",onClick:v=>{v.stopPropagation(),a()},className:w(E("xs","ml"),"hover:bg-tint-hover",J("full"),E("xs","p"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1"),"aria-label":`Remove ${j||"chip"}`,children:n.jsx(we,{className:"h-3 w-3","aria-hidden":"true"})})]}))});ws.displayName="Chip";const ur=l.forwardRef(function(f,d){var p=f,{src:t,alt:r,fallback:s,size:a="md",variant:o="circle","aria-label":i,className:c=""}=p,u=O(p,["src","alt","fallback","size","variant","aria-label","className"]);const[m,h]=l.useState(!1),[x,y]=l.useState(!1),k={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},g={circle:"rounded-full",square:"rounded-none",rounded:"rounded-md"},j=!t||m,C=typeof s=="string"?s.toUpperCase().slice(0,2):s,b=i||r||"User avatar";return n.jsxs("div",P(T({ref:d,className:w("relative","inline-flex","items-center","justify-center","shrink-0","font-medium","overflow-hidden",k[a],g[o],"bg-surface-muted","text-fg-primary",c),role:"img","aria-label":b},u),{children:[!j&&t&&n.jsx("img",{src:t,alt:r||"",className:w("w-full","h-full","object-cover",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md",x?"opacity-100":"opacity-0","transition-opacity","duration-200"),onLoad:()=>y(!0),onError:()=>{h(!0),y(!1)},"aria-hidden":"true"}),j&&n.jsx("span",{className:w("flex","items-center","justify-center","w-full","h-full",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md"),"aria-hidden":"true",children:C||"?"})]}))});ur.displayName="Avatar";function Mc(c){var u=c,{children:e,max:t=3,size:r="md",variant:s="circle",spacing:a="md",className:o=""}=u,i=O(u,["children","max","size","variant","spacing","className"]);const d={none:"",sm:"-space-x-1",md:"-space-x-2",lg:"-space-x-3"},f=l.Children.toArray(e).filter(Boolean),p=f.slice(0,t),m=f.length-t;return n.jsxs("div",P(T({className:w("flex","items-center",d[a],o),role:"group","aria-label":`${f.length} avatars`},i),{children:[p.map((h,x)=>{let y=h;if(l.isValidElement(h)&&h.type===ur){const k=h.props;y=l.cloneElement(h,{size:k.size||r,variant:k.variant||s})}return n.jsx("div",{className:"ring-2 ring-surface-base",style:{zIndex:f.length-x},children:y},x)}),m>0&&n.jsx(ur,{size:r,variant:s,fallback:`+${m}`,"aria-label":`${m} more avatars`,className:"ring-2 ring-surface-base",style:{zIndex:0}})]}))}const fr=l.memo(function(d){var f=d,{variant:t="default",padding:r="medium",className:s="",onClick:a,"aria-label":o,"aria-labelledby":i,children:c}=f,u=O(f,["variant","padding","className","onClick","aria-label","aria-labelledby","children"]);const p=xe(w("bg-surface-base",J("lg"),"border","border-line-default","shadow-sm"),{variants:{variant:{default:"",hover:w("hover:shadow-md","transition-shadow","cursor-pointer"),selected:w("border-line-brand","shadow-md")},padding:{none:"",small:E("xs","p"),medium:E("base","p"),large:E("lg","p")}},defaultVariants:{variant:"default",padding:"medium"}}),m=l.useMemo(()=>a!==void 0||t==="hover",[a,t]),h=m?"button":void 0,x=m?0:void 0,y=w(p({variant:t,padding:r}),s),k=l.useCallback(g=>{m&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),a==null||a())},[m,a]);return n.jsx("div",P(T({className:y,role:h,tabIndex:x,onClick:a,onKeyDown:k,"aria-label":o,"aria-labelledby":i},u),{children:c}))});fr.displayName="Card";const Sr=l.createContext(void 0);function ks(){const e=l.useContext(Sr);if(e===void 0)throw new Error("useFormContext must be used within a Form component with react-hook-form integration");return e}function Tc(){return l.useContext(Sr)}function ka({form:e,loading:t=!1,children:r}){const s={form:e,loading:t};return n.jsx(Sr.Provider,{value:s,children:r})}function Ac(c){var u=c,{children:e,onSubmit:t,loading:r=!1,error:s=null,success:a=null,className:o=""}=u,i=O(u,["children","onSubmit","loading","error","success","className"]);const d=w(E("lg","gap"),"flex","flex-col",o);if("form"in i&&i.form!==void 0){const y=i,{form:g,onSubmit:j,onSubmitError:C}=y,b=O(y,["form","onSubmit","onSubmitError"]),v=g.handleSubmit(N=>rr(null,null,function*(){try{yield j(N)}catch(_){C==null||C(_)}}),N=>{C==null||C(N)});return n.jsx(ka,{form:g,loading:r,children:n.jsxs("form",P(T({className:d,onSubmit:v,noValidate:!0},b),{children:[e,s&&n.jsx("div",{role:"alert",className:w(E("md","p"),ve("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:w(E("md","p"),ve("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))})}const p=i.onSubmit||t,k=i,{onSubmit:m}=k,h=O(k,["onSubmit"]),x=g=>{g.preventDefault(),p&&!r&&p(g)};return n.jsxs("form",P(T({className:d,onSubmit:x,noValidate:!0},h),{children:[e,s&&n.jsx("div",{role:"alert",className:w(E("md","p"),ve("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:w(E("md","p"),ve("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))}function Rc({name:e,label:t,children:r,rules:s,className:a=""}){var m;const{form:o}=ks();if(!o)throw new Error("FormField must be used within a Form component with react-hook-form integration");const{register:i,formState:{errors:c},watch:u}=o,d=i(e,s),f=(m=c[e])==null?void 0:m.message,p=u(e);return n.jsxs("div",{className:w("flex","flex-col",E("sm","gap"),a),children:[t&&n.jsx(Mt,{htmlFor:e,className:w("block",ve("sm"),Et("medium"),"text-fg-primary"),children:t}),r({name:e,register:h=>i(h,s),error:f,value:p,onChange:d.onChange,onBlur:d.onBlur}),f&&n.jsx(ba,{message:f})]})}var Ic=e=>e.type==="checkbox",Dc=e=>e instanceof Date,He=e=>e==null;const Lc=e=>typeof e=="object";var qe=e=>!He(e)&&!Array.isArray(e)&&Lc(e)&&!Dc(e),Fc=e=>{const t=e.constructor&&e.constructor.prototype;return qe(t)&&t.hasOwnProperty("isPrototypeOf")},ja=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function mt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList!="undefined"&&e instanceof FileList;if(ja&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(qe(e)&&Fc(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=mt(e[a]));return s}var js=e=>/^\w*$/.test(e),_e=e=>e===void 0,Na=e=>Array.isArray(e)?e.filter(Boolean):[],Ns=e=>Na(e.replace(/["|']|\]/g,"").split(/\.|\[/)),De=(e,t,r)=>{if(!t||!qe(e))return r;const s=(js(t)?[t]:Ns(t)).reduce((a,o)=>He(a)?a:a[o],e);return _e(s)||s===e?_e(e[t])?r:e[t]:s},Sa=e=>typeof e=="boolean",_c=e=>typeof e=="function",mr=(e,t,r)=>{let s=-1;const a=js(t)?[t]:Ns(t),o=a.length,i=o-1;for(;++s<o;){const c=a[s];let u=r;if(s!==i){const d=e[c];u=qe(d)||Array.isArray(d)?d:isNaN(+a[s+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=u,e=e[c]}};const Ct={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},We={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ca=l.createContext(null);Ca.displayName="HookFormControlContext";const Pc=()=>l.useContext(Ca),zc=typeof window!="undefined"?l.useLayoutEffect:l.useEffect;var Xe=e=>typeof e=="string";const Oc=l.createContext(null);Oc.displayName="HookFormContext";var Vc=(e,t,r,s,a)=>t?P(T({},r[e]),{types:P(T({},r[e]&&r[e].types?r[e].types:{}),{[s]:a||!0})}):{},Le=e=>Array.isArray(e)?e:[e],pr=e=>qe(e)&&!Object.keys(e).length,Wc=e=>e.type==="file",Hc=e=>{if(!ja)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Bc=e=>e.type==="radio";function Uc(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;)e=_e(e)?s++:e[t[s++]];return e}function qc(e){for(const t in e)if(e.hasOwnProperty(t)&&!_e(e[t]))return!1;return!0}function $a(e,t){const r=Array.isArray(t)?t:js(t)?[t]:Ns(t),s=r.length===1?e:Uc(e,r),a=r.length-1,o=r[a];return s&&delete s[o],a!==0&&(qe(s)&&pr(s)||Array.isArray(s)&&qc(s))&&$a(e,r.slice(0,-1)),e}var Ea=e=>e instanceof RegExp,ir=e=>({isOnSubmit:!e||e===Ct.onSubmit,isOnBlur:e===Ct.onBlur,isOnChange:e===Ct.onChange,isOnAll:e===Ct.all,isOnTouch:e===Ct.onTouched}),Gc=(e,t,r)=>t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length)));const os=(e,t,r,s)=>{for(const o of Object.keys(e)){const i=De(e,o);if(i){const a=i,{_f:c}=a,u=O(a,["_f"]);if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],o))return!0;if(c.ref&&t(c.ref,c.name))return!0;if(os(u,t))break}else if(qe(u)&&os(u,t))break}}};var Kc=(e,t,r)=>{const s=Le(De(e,r));return mr(s,"root",t[r]),mr(e,r,s),e};function Mn(e,t,r="validate"){if(Xe(e)||Array.isArray(e)&&e.every(Xe)||Sa(e)&&!e)return{type:r,message:Xe(e)?e:"",ref:t}}var Nt=e=>qe(e)&&!Ea(e)?e:{value:e,message:""},Yc=(e,t,r,s,a,o)=>rr(null,null,function*(){const{ref:i,refs:c,required:u,maxLength:d,minLength:f,min:p,max:m,pattern:h,validate:x,name:y,valueAsNumber:k,mount:g}=e._f,j=De(r,y);if(!g||t.has(y))return{};const C=c?c[0]:i,b=M=>{a&&C.reportValidity&&(C.setCustomValidity(Sa(M)?"":M||""),C.reportValidity())},v={};Bc(i),Ic(i);const N=(k||Wc(i))&&_e(i.value)&&_e(j)||Hc(i)&&i.value===""||j===""||Array.isArray(j)&&!j.length,_=Vc.bind(null,y,s,v),S=(M,F,A,R=We.maxLength,I=We.minLength)=>{const L=M?F:A;v[y]=T({type:M?R:I,message:L,ref:i},_(M?R:I,L))};if(!Array.isArray(j)||!j.length){const{value:M,message:F}=Xe(u)?{value:!!u,message:u}:Nt(u);if(M&&(v[y]=T({type:We.required,message:F,ref:C},_(We.required,F)),!s))return b(F),v}if(!N&&(!He(p)||!He(m))){let M,F;const A=Nt(m),R=Nt(p);if(!He(j)&&!isNaN(j)){const I=i.valueAsNumber||j&&+j;He(A.value)||(M=I>A.value),He(R.value)||(F=I<R.value)}else{const I=i.valueAsDate||new Date(j),L=q=>new Date(new Date().toDateString()+" "+q),z=i.type=="time",Y=i.type=="week";Xe(A.value)&&j&&(M=z?L(j)>L(A.value):Y?j>A.value:I>new Date(A.value)),Xe(R.value)&&j&&(F=z?L(j)<L(R.value):Y?j<R.value:I<new Date(R.value))}if((M||F)&&(S(!!M,A.message,R.message,We.max,We.min),!s))return b(v[y].message),v}if((d||f)&&!N&&(Xe(j)||Array.isArray(j))){const M=Nt(d),F=Nt(f),A=!He(M.value)&&j.length>+M.value,R=!He(F.value)&&j.length<+F.value;if((A||R)&&(S(A,M.message,F.message),!s))return b(v[y].message),v}if(h&&!N&&Xe(j)){const{value:M,message:F}=Nt(h);if(Ea(M)&&!j.match(M)&&(v[y]=T({type:We.pattern,message:F,ref:i},_(We.pattern,F)),!s))return b(F),v}if(x){if(_c(x)){const M=yield x(j,r),F=Mn(M,C);if(F&&(v[y]=T(T({},F),_(We.validate,F.message)),!s))return b(F.message),v}else if(qe(x)){let M={};for(const F in x){if(!pr(M)&&!s)break;const A=Mn(yield x[F](j,r),C,F);A&&(M=T(T({},A),_(F,A.message)),b(A.message),s&&(v[y]=M))}if(!pr(M)&&(v[y]=T({ref:C},M),!s))return v}}return b(!0),v}),Ye=()=>{if(typeof crypto!="undefined"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance=="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Kr=(e,t,r={})=>r.shouldFocus||_e(r.shouldFocus)?r.focusName||`${e}.${_e(r.focusIndex)?t:r.focusIndex}.`:"",Yr=(e,t)=>[...e,...Le(t)],Xr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Jr(e,t,r){return[...e.slice(0,t),...Le(r),...e.slice(t)]}var Zr=(e,t,r)=>Array.isArray(e)?(_e(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Qr=(e,t)=>[...Le(t),...Le(e)];function Xc(e,t){let r=0;const s=[...e];for(const a of t)s.splice(a-r,1),r++;return Na(s).length?s:[]}var es=(e,t)=>_e(t)?[]:Xc(e,Le(t).sort((r,s)=>r-s)),ts=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Tn=(e,t,r)=>(e[t]=r,e);function Jc(e){const t=Pc(),{control:r=t,name:s,keyName:a="id",shouldUnregister:o,rules:i}=e,[c,u]=l.useState(r._getFieldArray(s)),d=l.useRef(r._getFieldArray(s).map(Ye)),f=l.useRef(!1);r._names.array.add(s),l.useMemo(()=>i&&c.length>=0&&r.register(s,i),[r,s,c.length,i]),zc(()=>r._subjects.array.subscribe({next:({values:b,name:v})=>{if(v===s||!v){const N=De(b,s);Array.isArray(N)&&(u(N),d.current=N.map(Ye))}}}).unsubscribe,[r,s]);const p=l.useCallback(b=>{f.current=!0,r._setFieldArray(s,b)},[r,s]),m=(b,v)=>{const N=Le(mt(b)),_=Yr(r._getFieldArray(s),N);r._names.focus=Kr(s,_.length-1,v),d.current=Yr(d.current,N.map(Ye)),p(_),u(_),r._setFieldArray(s,_,Yr,{argA:Xr(b)})},h=(b,v)=>{const N=Le(mt(b)),_=Qr(r._getFieldArray(s),N);r._names.focus=Kr(s,0,v),d.current=Qr(d.current,N.map(Ye)),p(_),u(_),r._setFieldArray(s,_,Qr,{argA:Xr(b)})},x=b=>{const v=es(r._getFieldArray(s),b);d.current=es(d.current,b),p(v),u(v),!Array.isArray(De(r._fields,s))&&mr(r._fields,s,void 0),r._setFieldArray(s,v,es,{argA:b})},y=(b,v,N)=>{const _=Le(mt(v)),S=Jr(r._getFieldArray(s),b,_);r._names.focus=Kr(s,b,N),d.current=Jr(d.current,b,_.map(Ye)),p(S),u(S),r._setFieldArray(s,S,Jr,{argA:b,argB:Xr(v)})},k=(b,v)=>{const N=r._getFieldArray(s);ts(N,b,v),ts(d.current,b,v),p(N),u(N),r._setFieldArray(s,N,ts,{argA:b,argB:v},!1)},g=(b,v)=>{const N=r._getFieldArray(s);Zr(N,b,v),Zr(d.current,b,v),p(N),u(N),r._setFieldArray(s,N,Zr,{argA:b,argB:v},!1)},j=(b,v)=>{const N=mt(v),_=Tn(r._getFieldArray(s),b,N);d.current=[..._].map((S,M)=>!S||M===b?Ye():d.current[M]),p(_),u([..._]),r._setFieldArray(s,_,Tn,{argA:b,argB:N},!0,!1)},C=b=>{const v=Le(mt(b));d.current=v.map(Ye),p([...v]),u([...v]),r._setFieldArray(s,[...v],N=>N,{},!0,!1)};return l.useEffect(()=>{if(r._state.action=!1,Gc(s,r._names)&&r._subjects.state.next(T({},r._formState)),f.current&&(!ir(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!ir(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([s]).then(b=>{r._updateIsValidating([s]);const v=De(b.errors,s),N=De(r._formState.errors,s);(N?!v&&N.type||v&&(N.type!==v.type||N.message!==v.message):v&&v.type)&&(v?mr(r._formState.errors,s,v):$a(r._formState.errors,s),r._subjects.state.next({errors:r._formState.errors}))});else{const b=De(r._fields,s);b&&b._f&&!(ir(r._options.reValidateMode).isOnSubmit&&ir(r._options.mode).isOnSubmit)&&Yc(b,r._names.disabled,r._formValues,r._options.criteriaMode===Ct.all,r._options.shouldUseNativeValidation).then(v=>!pr(v)&&r._subjects.state.next({errors:Kc(r._formState.errors,v,s)}))}r._subjects.state.next({name:s,values:mt(r._formValues)}),r._names.focus&&os(r._fields,(b,v)=>{if(r._names.focus&&v.startsWith(r._names.focus)&&b.focus)return b.focus(),1}),r._names.focus="",r._setValid(),f.current=!1},[c,s,r]),l.useEffect(()=>(!De(r._formValues,s)&&r._setFieldArray(s),()=>{const b=(v,N)=>{const _=De(r._fields,v);_&&_._f&&(_._f.mount=N)};r._options.shouldUnregister||o?r.unregister(s):b(s,!1)}),[s,r,a,o]),{swap:l.useCallback(k,[p,s,r]),move:l.useCallback(g,[p,s,r]),prepend:l.useCallback(h,[p,s,r]),append:l.useCallback(m,[p,s,r]),remove:l.useCallback(x,[p,s,r]),insert:l.useCallback(y,[p,s,r]),update:l.useCallback(j,[p,s,r]),replace:l.useCallback(C,[p,s,r]),fields:l.useMemo(()=>c.map((b,v)=>P(T({},b),{[a]:d.current[v]||Ye()})),[c,a])}}function Zc(e){const{form:t}=ks();if(!t)throw new Error("useFormFieldArray must be used within a Form component with react-hook-form integration");return Jc(P(T({},e),{control:t.control}))}function Ma(a){var o=a,{items:e,separator:t="/",className:r=""}=o,s=O(o,["items","separator","className"]);const i=["flex","items-center",E("sm","space-x"),re("bodySmall")],c=w(...i,r);return n.jsx("nav",P(T({"aria-label":"Breadcrumb",className:c},s),{children:n.jsx("ol",{className:w("flex","items-center",E("sm","space-x")),children:e.map((u,d)=>{const f=d===e.length-1;return n.jsxs("li",{className:"flex items-center",children:[d>0&&n.jsx("span",{className:w(E("sm","mx"),"text-fg-tertiary"),"aria-hidden":"true",children:t}),f?n.jsx("span",{className:w("text-fg-primary",Fe("label")),"aria-current":"page",children:u.label}):u.href?n.jsx("a",{href:u.href,className:w("inline-flex","items-center",E("xs","px"),E("xs","pt"),"border-b-2","border-transparent",re("bodySmall"),Fe("label"),"transition-colors","text-fg-secondary","hover:border-line-emphasis","hover:text-fg-primary"),children:u.label}):n.jsx("span",{className:"text-fg-secondary",children:u.label})]},d)})})}))}function Ta(u){var d=u,{currentPage:e,totalPages:t,onPageChange:r,totalItems:s,itemsPerPage:a,showPageInfo:o=!0,className:i=""}=d,c=O(d,["currentPage","totalPages","onPageChange","totalItems","itemsPerPage","showPageInfo","className"]);const f=()=>{e>1&&r(e-1)},p=()=>{e<t&&r(e+1)},m=g=>{g>=1&&g<=t&&g!==e&&r(g)},h=()=>{const g=[];if(t<=5)for(let C=1;C<=t;C++)g.push(C);else if(e<=3){for(let C=1;C<=4;C++)g.push(C);g.push("ellipsis"),g.push(t)}else if(e>=t-2){g.push(1),g.push("ellipsis");for(let C=t-3;C<=t;C++)g.push(C)}else{g.push(1),g.push("ellipsis");for(let C=e-1;C<=e+1;C++)g.push(C);g.push("ellipsis"),g.push(t)}return g},x=s&&a?(e-1)*a+1:void 0,y=s&&a?Math.min(e*a,s):void 0,k=w("flex","items-center","justify-between",E("base","px"),E("md","py"),i);return n.jsxs("nav",P(T({className:k,"aria-label":"Pagination"},c),{children:[n.jsxs("div",{className:w("flex","items-center",E("sm","gap")),children:[n.jsx(Z,{variant:"secondary",onClick:f,disabled:e===1,size:"sm",children:"Previous"}),n.jsx("div",{className:w("flex","items-center",E("xs","gap")),children:h().map((g,j)=>{if(g==="ellipsis")return n.jsx("span",{className:w(E("sm","px"),"text-fg-tertiary"),children:"..."},`ellipsis-${j}`);const C=g,b=C===e;return n.jsx(Z,{variant:b?"primary":"ghost",onClick:()=>m(C),size:"sm","aria-current":b?"page":void 0,"aria-label":`Go to page ${C}`,children:C},C)})}),n.jsx(Z,{variant:"secondary",onClick:p,disabled:e===t,size:"sm",children:"Next"})]}),o&&s&&a&&n.jsxs("div",{className:w(ve("sm"),"text-fg-primary"),children:["Showing ",x," to ",y," of ",s," results"]})]}))}function Aa(u){var d=u,{title:e,message:t,actionLabel:r,onAction:s,illustration:a,variant:o="default",className:i=""}=d,c=O(d,["title","message","actionLabel","onAction","illustration","variant","className"]);const f=w("flex","flex-col","items-center","justify-center","text-center",E("xl","py"),E("base","px"),i),p=o==="withAction"||r&&s,m=o==="withIllustration"||a;return n.jsxs("div",P(T({className:f,role:"status","aria-live":"polite","aria-label":`${e}. ${t}`},c),{children:[m&&a&&n.jsx("div",{className:w(E("base","mb")),"aria-hidden":"true",children:a}),n.jsx(Be,{as:"h3",className:w(re("h4"),Et("semibold"),"text-fg-primary",E("sm","mb")),children:e}),n.jsx(Be,{as:"p",className:w(re("bodySmall"),"text-fg-secondary",E("md","mb"),"max-w-sm"),children:t}),p&&r&&s&&n.jsx(Z,{variant:"primary",onClick:s,children:r})]}))}function Ra(c){var u=c,{trigger:e,items:t,align:r="right",variant:s="default",className:a="","aria-label":o}=u,i=O(u,["trigger","items","align","variant","className","aria-label"]);const[d,f]=l.useState(!1),[p,m]=l.useState(-1),h=l.useRef(null),x=l.useRef(null),y=l.useRef(null),k=l.useRef([]),g=`dropdown-menu-${Math.random().toString(36).substr(2,9)}`,j=`dropdown-trigger-${Math.random().toString(36).substr(2,9)}`;l.useEffect(()=>{const S=M=>{h.current&&!h.current.contains(M.target)&&(f(!1),m(-1))};return d&&(document.addEventListener("mousedown",S),setTimeout(()=>{var F;const M=t.findIndex(A=>!A.disabled);M>=0&&(m(M),(F=k.current[M])==null||F.focus())},0)),()=>{document.removeEventListener("mousedown",S)}},[d,t]),l.useEffect(()=>{if(!d)return;const S=F=>{var I,L,z,Y;const A=t.map((q,W)=>({item:q,index:W})).filter(({item:q})=>!q.disabled),R=A.findIndex(({index:q})=>q===p);switch(F.key){case"ArrowDown":{F.preventDefault();const q=R<A.length-1?A[R+1].index:A[0].index;m(q),(I=k.current[q])==null||I.focus();break}case"ArrowUp":{F.preventDefault();const q=R>0?A[R-1].index:A[A.length-1].index;m(q),(L=k.current[q])==null||L.focus();break}case"Home":{F.preventDefault();const q=A[0].index;m(q),(z=k.current[q])==null||z.focus();break}case"End":{F.preventDefault();const q=A[A.length-1].index;m(q),(Y=k.current[q])==null||Y.focus();break}case"Enter":case" ":F.preventDefault(),p>=0&&!t[p].disabled&&C(t[p]);break;case"Escape":F.preventDefault(),f(!1),m(-1),setTimeout(()=>{var q;(q=x.current)==null||q.focus()},0);break}},M=y.current;if(M){const F=S;return M.addEventListener("keydown",F),()=>{M.removeEventListener("keydown",F)}}},[d,p,t]);const C=S=>{S.disabled||(S.onClick(),f(!1),m(-1),setTimeout(()=>{var M;(M=x.current)==null||M.focus()},0))},b=()=>{f(!d),m(-1)},v=S=>{(S.key==="Enter"||S.key===" "||S.key==="ArrowDown")&&(S.preventDefault(),f(!0))},N=r==="right"?"right-0":"left-0",_=l.isValidElement(e)?l.cloneElement(e,{onClick:S=>{b(),e.props.onClick&&e.props.onClick(S)},onKeyDown:S=>{v(S),e.props.onKeyDown&&e.props.onKeyDown(S)},"aria-haspopup":"menu","aria-expanded":d,"aria-controls":g,"aria-label":o||e.props["aria-label"]||"Open menu",id:j,ref:S=>{x.current=S,typeof e.ref=="function"?e.ref(S):e.ref&&(e.ref.current=S)}}):n.jsx("div",{ref:x,onClick:b,onKeyDown:v,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":g,"aria-label":o||"Open menu",id:j,children:e});return n.jsxs("div",P(T({className:w("relative","inline-block",a),ref:h},i),{children:[_,d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:w("fixed","inset-0","z-10"),onClick:()=>{f(!1),m(-1)},"aria-hidden":"true"}),n.jsx("div",{ref:y,id:g,className:w("absolute","z-20",E("sm","mt"),"w-48",J("md"),Se("lg"),"bg-surface-overlay","ring-1","ring-line-strong","ring-opacity-5",N),role:"menu","aria-orientation":"vertical","aria-labelledby":j,"aria-activedescendant":p>=0?`${g}-item-${p}`:void 0,children:n.jsx("div",{className:w(E("xs","py")),role:"none",children:t.map((S,M)=>{const F=w("block",E("base","px"),E("xs","py"),re("bodySmall"),"w-full","text-left","focus:outline-none",S.disabled?w("text-fg-disabled","cursor-not-allowed","opacity-50"):S.variant==="danger"?w("text-error-dark","hover:bg-error-bg-emphasis","focus:bg-error-bg-emphasis"):w("text-fg-primary","hover:bg-surface-hover","focus:bg-surface-hover"));return n.jsx("button",{id:`${g}-item-${M}`,ref:A=>{k.current[M]=A},type:"button",className:F,onClick:()=>C(S),disabled:S.disabled,role:"menuitem","aria-disabled":S.disabled,tabIndex:S.disabled?-1:p===M?0:-1,children:S.label},M)})})})]})]}))}const Ia=l.createContext(void 0);function Da(){const e=l.useContext(Ia);if(!e)throw new Error("DatePicker components must be used within a DatePicker component");return e}function is({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,locale:u}){const d=()=>{if(r!==void 0)return null;if(s){if(t==="single"&&s instanceof Date)return s;if(t==="range"&&typeof s=="object"&&"start"in s)return null}return null},f=()=>r!==void 0?null:s&&t==="range"&&typeof s=="object"&&"start"in s?s:{start:null,end:null},[p,m]=l.useState(d()),[h,x]=l.useState(f()),y=t==="single"?r instanceof Date?r:p:null,k=t==="range"?r&&typeof r=="object"&&"start"in r?r:h:null,C={selectedDate:y,selectedRange:k,mode:t,onDateChange:b=>{t==="single"&&(r===void 0&&m(b),a==null||a(b))},onRangeChange:b=>{t==="range"&&(r===void 0&&x(b),a==null||a(b))},minDate:o,maxDate:i,disabledDates:c,locale:u};return n.jsx(Ia.Provider,{value:C,children:e})}function Vt(e,t="yyyy-MM-dd"){const r=e.getFullYear(),s=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",s).replace("dd",a).replace("MM/dd/yyyy",`${s}/${a}/${r}`).replace("dd/MM/yyyy",`${a}/${s}/${r}`)}function An(e){if(!e)return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(t){const[,a,o,i]=t,c=new Date(parseInt(a),parseInt(o)-1,parseInt(i));if(!isNaN(c.getTime()))return c}const r=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(r){const[,a,o,i]=r,c=new Date(parseInt(i),parseInt(a)-1,parseInt(o));if(!isNaN(c.getTime()))return c}const s=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(s){const[,a,o,i]=s,c=new Date(parseInt(i),parseInt(o)-1,parseInt(a));if(!isNaN(c.getTime()))return c}return null}function Ss(c){var u=c,{placeholder:e="Select date",format:t="yyyy-MM-dd",showCalendarButton:r=!0,"aria-label":s,onFocus:a,className:o=""}=u,i=O(u,["placeholder","format","showCalendarButton","aria-label","onFocus","className"]);const{selectedDate:d,selectedRange:f,mode:p,onDateChange:m}=Da(),[h,x]=l.useState(""),[y,k]=l.useState(!1),g=l.useRef(null);l.useEffect(()=>{p==="single"&&d?x(Vt(d,t)):p==="range"&&f?f.start&&f.end?x(`${Vt(f.start,t)} - ${Vt(f.end,t)}`):f.start?x(Vt(f.start,t)):x(""):x("")},[d,f,p,t]);const j=v=>{const N=v.target.value;if(x(N),p==="single"){const _=An(N);m(_)}},C=()=>{if(k(!1),h&&p==="single"){const v=An(h);v&&x(Vt(v,t))}},b=()=>{var v;(v=g.current)==null||v.focus()};return n.jsx("div",P(T({className:`relative ${o}`},i),{children:n.jsx(ke,{ref:g,type:"text",value:h,onChange:j,onFocus:()=>{k(!0),a==null||a()},onBlur:C,placeholder:e,"aria-label":s||e,rightIcon:r?n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:b,"aria-label":"Open calendar",type:"button",children:n.jsx(Tl,{className:"h-4 w-4"})}):void 0})}))}function Qc(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function ed(e){return new Date(e.getFullYear(),e.getMonth(),1).getDay()}function pt(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Wt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function td(e,t,r){if(!t||!r)return!1;const s=e.getTime();return s>=t.getTime()&&s<=r.getTime()}function Rn(e,t,r,s){return!!(t&&e<t||r&&e>r||s!=null&&s.some(a=>pt(e,a)))}const rd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],sd=["January","February","March","April","May","June","July","August","September","October","November","December"];function Cs(a){var o=a,{month:e,onMonthChange:t,className:r=""}=o,s=O(o,["month","onMonthChange","className"]);const{selectedDate:i,selectedRange:c,mode:u,onDateChange:d,onRangeChange:f,minDate:p,maxDate:m,disabledDates:h}=Da(),[x,y]=l.useState(e||i||(c==null?void 0:c.start)||new Date),k=l.useRef(null),[g,j]=l.useState(()=>{const R=new Date,I=e||i||(c==null?void 0:c.start)||R;return i&&Wt(i,I)?i:Wt(R,I)?R:new Date(I.getFullYear(),I.getMonth(),1)});l.useEffect(()=>{e&&y(e)},[e]),l.useEffect(()=>{if(!k.current)return;const R=k.current.querySelector(`[data-date="${g.toISOString()}"]`);R&&R.focus()},[g]);const C=(()=>{if(Wt(g,x))return g;const R=new Date;return Wt(R,x)?R:new Date(x.getFullYear(),x.getMonth(),1)})(),b=Qc(x),v=ed(x),N=[];for(let R=0;R<v;R++)N.push(null);for(let R=1;R<=b;R++)N.push(new Date(x.getFullYear(),x.getMonth(),R));const _=R=>{if(!Rn(R,p,m,h)){if(u==="single")d(R);else if(u==="range"){const I=c||{start:null,end:null};!I.start||I.start&&I.end?f({start:R,end:null}):I.start&&!I.end&&(R<I.start?f({start:R,end:I.start}):f({start:I.start,end:R}))}}},S=()=>{const R=new Date(x.getFullYear(),x.getMonth()-1,1);y(R),t==null||t(R)},M=()=>{const R=new Date(x.getFullYear(),x.getMonth()+1,1);y(R),t==null||t(R)},F=(R,I)=>{let L=null;switch(R.key){case"ArrowLeft":R.preventDefault(),L=new Date(I.getFullYear(),I.getMonth(),I.getDate()-1);break;case"ArrowRight":R.preventDefault(),L=new Date(I.getFullYear(),I.getMonth(),I.getDate()+1);break;case"ArrowUp":R.preventDefault(),L=new Date(I.getFullYear(),I.getMonth(),I.getDate()-7);break;case"ArrowDown":R.preventDefault(),L=new Date(I.getFullYear(),I.getMonth(),I.getDate()+7);break;case"Home":R.preventDefault(),L=new Date(I.getFullYear(),I.getMonth(),1);break;case"End":R.preventDefault(),L=new Date(I.getFullYear(),I.getMonth()+1,0);break;case"Enter":case" ":R.preventDefault(),_(I);return}L&&(Wt(L,x)||y(new Date(L.getFullYear(),L.getMonth(),1)),j(L))},A=[];for(let R=0;R<N.length;R+=7)A.push(N.slice(R,R+7));return n.jsxs("div",P(T({ref:k,className:`p-4 ${r}`},s),{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:S,"aria-label":"Previous month",children:n.jsx(Bt,{className:"h-4 w-4"})}),n.jsxs("div",{className:"text-sm font-semibold",children:[sd[x.getMonth()]," ",x.getFullYear()]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:M,"aria-label":"Next month",children:n.jsx(ht,{className:"h-4 w-4"})})]}),n.jsxs("div",{role:"grid","aria-label":"Calendar",children:[n.jsx("div",{role:"row",className:"grid grid-cols-7 gap-1 mb-2",children:rd.map(R=>n.jsx("div",{role:"columnheader",className:"text-center text-xs font-medium text-fg-tertiary py-1",children:R},R))}),A.map((R,I)=>n.jsx("div",{role:"row",className:"grid grid-cols-7 gap-1",children:R.map((L,z)=>{if(!L)return n.jsx("div",{role:"gridcell",className:"aspect-square"},`empty-${I}-${z}`);const Y=u==="single"?pt(L,i):pt(L,(c==null?void 0:c.start)||null)||pt(L,(c==null?void 0:c.end)||null),q=u==="range"&&c?td(L,c.start,c.end):!1,W=Rn(L,p,m,h),ae=pt(L,new Date),se=pt(L,g),D=pt(L,C);return n.jsx("button",{role:"gridcell",type:"button","data-date":L.toISOString(),tabIndex:D?0:-1,onClick:()=>_(L),onKeyDown:B=>F(B,L),className:`
|
|
177
|
+
*/const bc=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ne=oe("x",bc),gc=ve("motion-safe:animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-8 w-8"},variant:{primary:"text-fg-brand",secondary:"text-fg-brand-secondary",neutral:"text-fg-secondary"}},defaultVariants:{size:"md",variant:"primary"}}),gs=l.memo(function(i){var c=i,{size:t="md",variant:r="primary",label:s,className:a=""}=c,o=O(c,["size","variant","label","className"]);return n.jsxs("div",P(T({className:k("inline-flex","items-center",a),role:"status","aria-label":s||"Loading","aria-live":"polite"},o),{children:[n.jsx(fa,{className:k(gc({size:t,variant:r})),"aria-hidden":"true"}),s&&n.jsx("span",{className:k(E("sm","ml"),re("bodySmall"),"text-fg-secondary","sr-only"),children:s})]}))});gs.displayName="Spinner";const xc=ve(k("inline-flex","items-center","justify-center",ce("button").split(" ")[2]||"font-medium",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{primary:k("bg-surface-brand-strong","text-fg-inverse","hover:opacity-90","focus:ring-line-brand"),secondary:k("bg-surface-secondary","text-fg-inverse","hover:opacity-90","focus:ring-line-secondary"),error:k("bg-error","text-fg-inverse","hover:opacity-90","focus:ring-error"),outline:k("border-2","border-line-default","bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),ghost:k("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),iconOnly:k("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus","p-0")},size:{sm:k(E("md","px"),E("1.5","py"),re("bodySmall"),E("1.5","gap")),md:k(E("base","px"),E("sm","py"),re("body"),E("sm","gap")),lg:k(E("lg","px"),E("md","py"),re("bodyLarge"),E("2.5","gap"))}},compoundVariants:[{variant:"iconOnly",size:"sm",class:k("h-8","w-8","p-0")},{variant:"iconOnly",size:"md",class:k("h-10","w-10","p-0")},{variant:"iconOnly",size:"lg",class:k("h-12","w-12","p-0")}],defaultVariants:{variant:"primary",size:"md"}});function $n({children:e,position:t}){return e?n.jsx("span",{className:`inline-flex items-center ${t==="left"?"mr-0":"ml-0"}`,children:e}):null}const Z=l.memo(l.forwardRef(function(w,y){var g=w,{variant:t="primary",size:r="md",isLoading:s=!1,loadingText:a,loadingIcon:o,leftIcon:i,rightIcon:c,fullWidth:u=!1,as:d="button",className:f="",disabled:p=!1,children:m,"aria-label":h}=g,x=O(g,["variant","size","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","as","className","disabled","children","aria-label"]);const j=l.useMemo(()=>k(xc({variant:t,size:r}),u&&"w-full",f),[t,r,u,f]),C=l.useMemo(()=>t==="iconOnly"||!m&&(i||c),[t,m,i,c]),b=l.useMemo(()=>C&&!h&&!m?"Button":h,[C,h,m]),v=l.useMemo(()=>t==="error"?"primary":t==="primary"||t==="secondary"?"neutral":"primary",[t]),N=l.useMemo(()=>r==="sm"?"sm":r==="lg"?"lg":"md",[r]),_=l.useMemo(()=>o||n.jsx(gs,{size:N,variant:v}),[o,N,v]),S=d==="button"&&!x.type?"button":void 0,M=T(T({className:j,disabled:p||s,"aria-busy":s,"aria-label":b,"aria-disabled":p||s},S?{type:S}:{}),x);return n.jsx(d,P(T({ref:y},M),{children:s?n.jsxs(n.Fragment,{children:[_,a&&n.jsx("span",{className:"ml-2",children:a}),!a&&m&&n.jsx("span",{className:"ml-2 opacity-0",children:m})]}):n.jsxs(n.Fragment,{children:[i&&n.jsx($n,{position:"left",children:i}),m,c&&n.jsx($n,{position:"right",children:c})]})}))}));Z.displayName="Button";const vc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>k(E("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),Se=l.memo(l.forwardRef(function(C,j){var b=C,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,size:i="md",variant:c="outlined",leftIcon:u,rightIcon:d,showClearButton:f=!1,onClear:p,className:m="",disabled:h=!1,type:x="text",value:y,onChange:w}=b,g=O(b,["id","label","error","success","helperText","size","variant","leftIcon","rightIcon","showClearButton","onClear","className","disabled","type","value","onChange"]);const v=l.useMemo(()=>t||`input-${Math.random().toString(36).substr(2,9)}`,[t]),N=l.useMemo(()=>s?`${v}-error`:void 0,[s,v]),_=l.useMemo(()=>o?`${v}-helper`:void 0,[o,v]),[S,M]=l.useState(!1),F=l.useMemo(()=>x==="password",[x]),R=l.useMemo(()=>F&&S?"text":x,[F,S,x]),D=l.useMemo(()=>s?"error":a?"success":"default",[s,a]),I=l.useMemo(()=>y!=null&&y!=="",[y]),A=l.useMemo(()=>f&&I&&!h,[f,I,h]),V=l.useMemo(()=>"focus:border-line-focus",[]),Y=l.useMemo(()=>"focus:border-error",[]),H=l.useMemo(()=>"focus:border-success",[]),W=l.useMemo(()=>V.replace("focus:border-","focus:ring-"),[V]),ie=l.useCallback(z=>z==="error"?Y.replace("focus:border-","focus:ring-"):H.replace("focus:border-","focus:ring-"),[Y,H]),ne=ve(k("w-full",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{default:k("border-0","border-b-2","border-line-default","focus:border-line-focus"),outlined:k("border","border-line-default","focus:border-line-focus"),filled:k("bg-surface-muted","border-0","focus:bg-surface-base","focus:ring-2",W)},size:{sm:k("h-8",re("bodySmall"),E("md","px")),md:k("h-10",re("body"),E("base","px")),lg:k("h-12",re("bodyLarge"),E("lg","px"))},state:{default:"",error:k("border-error","focus:border-error",ie("error")),success:k("border-success","focus:border-success",ie("success"))}},defaultVariants:{variant:"outlined",size:"md",state:"default"}}),L=l.useMemo(()=>k(ne({variant:c,size:i,state:D}),u&&(i==="sm"?"pl-9":i==="lg"?"pl-12":"pl-10"),(d||A||F)&&(i==="sm"?"pr-9":i==="lg"?"pr-12":"pr-10"),m),[c,i,D,u,d,A,F,m]),B=l.useMemo(()=>k("block",ce("label"),E("xs","mb"),h&&"opacity-50"),[h]),K=l.useMemo(()=>i==="sm"?"h-4 w-4":i==="lg"?"h-5 w-5":"h-4 w-4",[i]),Q=l.useMemo(()=>i==="sm"?"top-2":i==="lg"?"top-3.5":"top-2.5",[i]),le=l.useCallback(z=>{var U;if(z.stopPropagation(),p)p();else if(w){const X=(U=z.currentTarget.closest(".relative"))==null?void 0:U.querySelector("input");if(X){const ae={target:X,currentTarget:X,bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:2,isTrusted:!1,nativeEvent:new Event("change"),preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},timeStamp:Date.now()};Object.defineProperty(ae.target,"value",{value:"",writable:!0}),Object.defineProperty(ae.currentTarget,"value",{value:"",writable:!0}),w(ae)}}},[p,w]),se=l.useCallback(()=>{M(z=>!z)},[]);return n.jsxs("div",{className:"w-full",children:[r&&n.jsx("label",{htmlFor:v,className:B,children:r}),n.jsxs("div",{className:"relative",children:[u&&n.jsx("div",{className:`absolute left-3 ${Q} text-fg-secondary opacity-60 pointer-events-none`,children:n.jsx("div",{className:K,children:u})}),n.jsx("input",T({id:v,ref:j,type:R,className:L,disabled:h,value:y,onChange:w,"aria-invalid":s,"aria-required":g.required,"aria-describedby":N||_,suppressHydrationWarning:!0},g)),n.jsxs("div",{className:"absolute right-3 top-0 bottom-0 flex items-center gap-1",children:[A&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:le,className:"h-auto p-1","aria-label":"Clear input",children:n.jsx(Ne,{className:K})}),F&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:se,className:"h-auto p-1","aria-label":S?"Hide password":"Show password",children:S?n.jsx(ql,{className:K}):n.jsx(Kl,{className:K})}),d&&!A&&!F&&n.jsx("div",{className:`text-fg-secondary opacity-60 pointer-events-none ${K}`,children:d})]})]}),(s||a||o)&&n.jsx(vc,{error:s,success:a,helperText:o,errorId:N,helperId:_})]})}));Se.displayName="Input";function ma({href:e,active:t}){const r=l.useMemo(()=>t!==void 0?t:!1,[t]),s=l.useMemo(()=>{try{const a=typeof require!="undefined"?require("next/link"):null;return a==null?void 0:a.default}catch(a){return}},[]);return{isActive:r,NextLink:s}}const yc=ve(k("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:k("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","focus:ring-line-brand"),underline:k("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","border-b-2","border-transparent","hover:border-current","focus:ring-line-brand"),background:k("text-fg-primary","hover:bg-surface-hover","rounded-md",J("md"),"focus:ring-line-brand")},size:{sm:k(E("sm","px"),E("xs","py"),re("bodySmall")),md:k(E("base","px"),E("sm","py"),re("body")),lg:k(E("lg","px"),E("md","py"),re("bodyLarge"))}},defaultVariants:{variant:"default",size:"md"},compoundVariants:[{variant:"underline",size:"sm",class:E("0.5","pb")},{variant:"underline",size:"md",class:E("xs","pb")},{variant:"underline",size:"lg",class:E("1.5","pb")},{variant:"background",size:"sm",class:E("xs","px")},{variant:"background",size:"md",class:E("sm","px")},{variant:"background",size:"lg",class:E("base","px")}]});function xs(m){var h=m,{href:e,children:t,active:r,disabled:s=!1,variant:a="default",size:o="md",as:i,className:c,"aria-label":u,onClick:d,onKeyDown:f}=h,p=O(h,["href","children","active","disabled","variant","size","as","className","aria-label","onClick","onKeyDown"]);const x=l.useMemo(()=>r!==void 0?r:!1,[r]),{NextLink:y}=ma({href:e,active:x}),w=i||y||"a",g=l.useMemo(()=>{if(!x)return"";switch(a){case"underline":return k("border-b-2","border-line-brand","text-fg-brand-emphasis");case"background":return k("bg-surface-brand-muted","text-fg-brand-emphasis");case"default":default:return k("text-fg-brand-emphasis","font-semibold")}},[x,a]),j=l.useCallback(v=>{if(s){v.preventDefault(),v.stopPropagation();return}d==null||d(v)},[s,d]),C=l.useCallback(v=>{if(s){(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),v.stopPropagation());return}f==null||f(v)},[s,f]),b=l.useMemo(()=>{const v=T({className:k(yc({variant:a,size:o}),g,s&&"opacity-50 cursor-not-allowed pointer-events-none",c),"aria-current":x?"page":void 0,"aria-disabled":s?!0:void 0,"aria-label":u,tabIndex:s?-1:void 0,onClick:j,onKeyDown:C,"data-active":x,"data-disabled":s},p);return y&&!i?P(T({},v),{href:s?void 0:e}):P(T({},v),{href:s?void 0:e})},[a,o,g,s,c,x,u,j,C,e,y,i,p]);return n.jsx(w,P(T({},b),{children:t}))}const wc=ve(k("inline-flex","items-center","justify-center",Pe("label"),J("md"),"border"),{variants:{variant:{success:"",warning:"",error:"",info:"",neutral:"",primary:"",secondary:""},size:{sm:k(E("1.5","px"),E("0.5","py"),re("caption")),md:k(E("sm","px"),E("xs","py"),re("caption")),lg:k(E("sm","px"),E("xs","py"),re("bodySmall"))},style:{solid:"",outline:""}},compoundVariants:[{variant:"success",style:"solid",class:k("bg-success-bg","text-success-dark","border-success")},{variant:"warning",style:"solid",class:k("bg-warning-bg","text-warning-dark","border-warning")},{variant:"error",style:"solid",class:k("bg-error-bg","text-error-dark","border-error")},{variant:"info",style:"solid",class:k("bg-info-bg","text-info-dark","border-info")},{variant:"neutral",style:"solid",class:k("bg-surface-muted","text-fg-primary","border-line-default")},{variant:"primary",style:"solid",class:k("bg-surface-brand-subtle","text-fg-brand-emphasis","border-line-brand")},{variant:"secondary",style:"solid",class:k("bg-pink-300","text-fg-brand-secondary-emphasis","border-line-secondary")},{variant:"success",style:"outline",class:k("bg-transparent","border-success","text-fg-success")},{variant:"warning",style:"outline",class:k("bg-transparent","border-warning","text-fg-warning")},{variant:"error",style:"outline",class:k("bg-transparent","border-error","text-fg-error")},{variant:"info",style:"outline",class:k("bg-transparent","border-info","text-fg-info")},{variant:"neutral",style:"outline",class:k("bg-transparent","border-line-default","text-fg-secondary")},{variant:"primary",style:"outline",class:k("bg-transparent","border-line-brand","text-fg-brand")},{variant:"secondary",style:"outline",class:k("bg-transparent","border-line-secondary","text-fg-brand-secondary")}],defaultVariants:{variant:"neutral",size:"md",style:"solid"}}),pa=l.memo(l.forwardRef(function(d,u){var f=d,{variant:t="neutral",size:r="md",style:s="solid",className:a="",children:o,"aria-label":i}=f,c=O(f,["variant","size","style","className","children","aria-label"]);const p=l.useMemo(()=>k(wc({variant:t,size:r,style:s}),a),[t,r,s,a]),m=l.useMemo(()=>{if(i)return i;if(typeof o=="string")return o;if(typeof o=="object"&&o!==null&&"props"in o){const h=o.props;if(h!=null&&h.children&&typeof h.children=="string")return h.children}},[i,o]);return n.jsx("span",P(T({ref:u,role:"status","aria-label":m,className:p},c),{children:o}))}));pa.displayName="Badge";const kc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>k(E("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),jr=l.memo(l.forwardRef(function(x,h){var y=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}=y,m=O(y,["options","optionGroups","placeholder","label","error","success","helperText","size","className","disabled","id"]);const w=l.useMemo(()=>p||`select-${Math.random().toString(36).substr(2,9)}`,[p]),g=l.useMemo(()=>o?`${w}-error`:void 0,[o,w]),j=l.useMemo(()=>c?`${w}-helper`:void 0,[c,w]),C=l.useMemo(()=>"focus:border-line-focus",[]),b=l.useMemo(()=>"focus:border-error",[]),v=l.useMemo(()=>"focus:border-success",[]),N=l.useCallback(R=>R==="error"?b.replace("focus:border-","focus:ring-"):R==="success"?v.replace("focus:border-","focus:ring-"):C.replace("focus:border-","focus:ring-"),[b,v,C]),_=ve(k("block","w-full",J("md"),"border","bg-surface-base","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{size:{sm:k("h-8",re("bodySmall"),E("md","px")),md:k("h-10",re("body"),E("base","px")),lg:k("h-12",re("bodyLarge"),E("lg","px"))},state:{default:k("border-line-default",N()),error:k("border-error",N("error")),success:k("border-success",N("success"))}},defaultVariants:{size:"md",state:"default"}}),S=l.useMemo(()=>o?"error":i?"success":"default",[o,i]),M=l.useMemo(()=>k(_({size:u,state:S}),d),[u,S,d]),F=l.useMemo(()=>k("block",ce("label"),E("xs","mb"),f&&"opacity-50"),[f]);return n.jsxs("div",{className:"w-full",children:[a&&n.jsx("label",{htmlFor:w,className:F,children:a}),n.jsxs("select",P(T({id:w,ref:h,className:M,disabled:f,"aria-invalid":o,"aria-required":m.required,"aria-describedby":g||j},m),{children:[s&&n.jsx("option",{value:"",disabled:!0,children:s}),r&&r.length>0?r.map((R,D)=>n.jsx("optgroup",{label:R.label,children:(R.options||[]).map(I=>n.jsx("option",{value:I.value,disabled:I.disabled,children:I.label},I.value))},D)):(t||[]).map(R=>n.jsx("option",{value:R.value,disabled:R.disabled,children:R.label},R.value))]})),(o||i||c)&&n.jsx(kc,{error:o,success:i,helperText:c,errorId:g,helperId:j})]})}));jr.displayName="Select";const ha=l.memo(l.forwardRef(function(i,o){var c=i,{error:t=!1,resize:r="vertical",className:s=""}=c,a=O(c,["error","resize","className"]);const u=l.useMemo(()=>"focus:border-line-focus",[]),d=l.useMemo(()=>"focus:border-error",[]),f=l.useMemo(()=>t?d.replace("focus:border-","focus:ring-"):u.replace("focus:border-","focus:ring-"),[t,d,u]),p=l.useMemo(()=>({none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"}),[]),m=l.useMemo(()=>k("block","w-full",J("md"),E("base","px"),E("md","py"),"border",re("body"),"focus:outline-none","focus:ring-2","focus:ring-offset-2",p[r],k(t?"border-error":"border-line-default",f),s),[r,p,t,f,s]),h=l.useMemo(()=>t&&a.id?`${a.id}-error`:void 0,[t,a.id]);return n.jsx("textarea",T({ref:o,className:m,"aria-invalid":t,"aria-describedby":h},a))}));ha.displayName="Textarea";const Tt=l.memo(l.forwardRef(function(i,o){var c=i,{variant:t="default",className:r="",children:s}=c,a=O(c,["variant","className","children"]);const u=l.useMemo(()=>k("block",re("label"),Pe("label"),"text-fg-primary"),[]),d=l.useMemo(()=>({default:"",required:k("after:content-['*']",`after:${E("0.5","ml")}`,"after:text-fg-error"),optional:k("after:content-['(optional)']","after:ml-1","after:text-fg-tertiary","after:font-normal")}),[]),f=l.useMemo(()=>k(u,d[t],r),[u,d,t,r]);return n.jsx("label",P(T({ref:o,className:f},a),{children:s}))}));Tt.displayName="Label";function ba(a){var o=a,{message:e,id:t,className:r=""}=o,s=O(o,["message","id","className"]);const i=[E("xs","mt"),re("bodySmall"),"text-fg-error","flex","items-center",E("xs","gap")],c=k(...i,r);return n.jsxs("div",P(T({role:"alert",id:t,className:c,"aria-live":"polite"},s),{children:[n.jsx(bs,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:e})]}))}class Fe{static createWidth(t){const s={none:{px:0,tailwind:"border-0"},thin:{px:1,tailwind:"border"},base:{px:1,tailwind:"border"},medium:{px:2,tailwind:"border-2"},thick:{px:4,tailwind:"border-4"}}[t];return{value:s.px,px:`${s.px}px`,tailwind:s.tailwind}}static create(t,r="solid"){return{width:this.createWidth(t),style:r,description:`${t} ${r} border`}}}Fe.create("none"),Fe.create("thin"),Fe.create("base"),Fe.create("medium"),Fe.create("thick"),Fe.create("thin","dashed"),Fe.create("base","dashed"),Fe.create("thin","dotted"),Fe.create("base","dotted");function jc(e){return Fe.createWidth(e).tailwind}function Ut(u){var d=u,{content:e,children:t,position:r="top",delay:s=200,className:a="","aria-label":o,preservePositioning:i=!1}=d,c=O(d,["content","children","position","delay","className","aria-label","preservePositioning"]);const[f,p]=l.useState(!1),m=l.useRef(null),h=l.useRef(null),x=l.useRef(null),y=`tooltip-${Math.random().toString(36).substr(2,9)}`,w=()=>{const F=setTimeout(()=>{p(!0)},s);m.current=F},g=()=>{m.current&&(clearTimeout(m.current),m.current=null),p(!1)},j=()=>{p(!0)},C=()=>{p(!1)},b=F=>{var R;F.key==="Escape"&&(p(!1),(R=x.current)==null||R.blur())};l.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),l.useEffect(()=>{if(!f)return;const F=R=>{h.current&&!h.current.contains(R.target)&&x.current&&!x.current.contains(R.target)&&p(!1)};return document.addEventListener("mousedown",F),()=>{document.removeEventListener("mousedown",F)}},[f]);const v=F=>({top:"border-t-surface-inverse",bottom:"border-b-surface-inverse",left:"border-l-surface-inverse",right:"border-r-surface-inverse"})[F],N=ve(k("absolute",ue("tooltip"),E("sm","px"),E("xs","py"),re("caption"),"text-fg-inverse","bg-surface-inverse",J("md"),"shadow-lg","whitespace-nowrap"),{variants:{position:{top:k("bottom-full","left-1/2","transform","-translate-x-1/2",E("sm","mb")),bottom:k("top-full","left-1/2","transform","-translate-x-1/2",E("sm","mt")),left:k("right-full","top-1/2","transform","-translate-y-1/2",E("sm","mr")),right:k("left-full","top-1/2","transform","-translate-y-1/2",E("sm","ml"))}},defaultVariants:{position:"top"}}),_=ve(k("absolute","w-0","h-0",jc("thick"),"border-transparent"),{variants:{position:{top:k("top-full","left-1/2","transform","-translate-x-1/2",v("top")),bottom:k("bottom-full","left-1/2","transform","-translate-x-1/2",v("bottom")),left:k("left-full","top-1/2","transform","-translate-y-1/2",v("left")),right:k("right-full","top-1/2","transform","-translate-y-1/2",v("right"))}},defaultVariants:{position:"top"}}),S=l.isValidElement(t)?(()=>{const F=t,R=F.props,D=R.ref;return l.cloneElement(F,{ref:I=>{x.current=I,typeof D=="function"?D(I):D&&typeof D=="object"&&"current"in D&&(D.current=I)},"aria-describedby":f?y:R["aria-describedby"],onMouseEnter:I=>{var A;w(),(A=R.onMouseEnter)==null||A.call(R,I)},onMouseLeave:I=>{var A;g(),(A=R.onMouseLeave)==null||A.call(R,I)},onFocus:I=>{var A;j(),(A=R.onFocus)==null||A.call(R,I)},onBlur:I=>{var A;C(),(A=R.onBlur)==null||A.call(R,I)},onKeyDown:I=>{var A;b(I),(A=R.onKeyDown)==null||A.call(R,I)}})})():t,M=k(i?"static":"relative","inline-block",a);return n.jsxs("div",P(T({className:M},c),{children:[S,f&&n.jsxs("div",{ref:h,id:y,className:k(N({position:r})),role:"tooltip","aria-live":"polite",children:[e,n.jsx("div",{className:k(_({position:r})),"aria-hidden":"true"})]})]}))}function ga(c){var u=c,{variant:e="text",width:t,height:r,lines:s=1,className:a="","aria-label":o}=u,i=O(u,["variant","width","height","lines","className","aria-label"]);const d=["motion-safe:animate-pulse","bg-surface-muted",J("sm")],f={text:"h-4",card:"h-32",list:"h-12",circle:"rounded-full"},p=k(...d,f[e],a),m={};t&&(m.width=t),r&&(m.height=r);const h=o||`Loading ${e} content`;return e==="text"&&s>1?n.jsx("div",P(T({className:E("sm","space-y"),role:"status","aria-busy":"true","aria-label":h},i),{children:Array.from({length:s}).map((x,y)=>n.jsx("div",{className:p,style:y===s-1?{width:"75%"}:m,"aria-hidden":"true"},y))})):n.jsx("div",T({className:p,style:m,role:"status","aria-busy":"true","aria-label":h},i))}function Nc({defaultOpen:e=!0,open:t,onOpenChange:r,storageKey:s}){const a=l.useCallback(()=>{if(s&&typeof window!="undefined"){const f=localStorage.getItem(s);if(f!==null)return f==="true"}return e},[e,s]),[o,i]=l.useState(a),c=t!==void 0?t:o;l.useEffect(()=>{s&&typeof window!="undefined"&&t===void 0&&localStorage.setItem(s,String(o))},[o,s,t]);const u=l.useCallback(f=>{t===void 0&&i(f),r==null||r(f)},[t,r]),d=l.useCallback(()=>{u(!c)},[c,u]);return{isOpen:c,toggle:d,setOpen:u}}function xa(f){var p=f,{children:e,trigger:t,defaultOpen:r=!0,open:s,onOpenChange:a,disabled:o=!1,duration:i=200,storageKey:c,className:u=""}=p,d=O(p,["children","trigger","defaultOpen","open","onOpenChange","disabled","duration","storageKey","className"]);const{isOpen:m,toggle:h}=Nc({defaultOpen:r,open:s,onOpenChange:a,storageKey:c}),x=l.useRef(null),[y,w]=l.useState(m?"auto":0);l.useEffect(()=>{x.current&&w(m?x.current.scrollHeight:0)},[m,e]),l.useEffect(()=>{if(!m||!x.current)return;const j=new ResizeObserver(()=>{x.current&&m&&w(x.current.scrollHeight)});return j.observe(x.current),()=>{j.disconnect()}},[m]);const g=`collapsible-content-${Math.random().toString(36).substr(2,9)}`;return n.jsxs("div",P(T({className:u},d),{children:[n.jsx("button",{type:"button",onClick:h,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),o||h())},disabled:o,"aria-expanded":m,"aria-controls":g,"aria-disabled":o,className:k("w-full","text-left","focus:outline-none","focus:ring-2","focus:ring-line-brand","focus:ring-offset-2",J("md")),children:t}),n.jsx("div",{id:g,ref:x,style:{height:typeof y=="number"?`${y}px`:y,overflow:"hidden",transition:`height ${i}ms ease-in-out`},"aria-hidden":!m,children:n.jsx("div",{children:e})})]}))}const Nr=l.memo(l.forwardRef(function(f,d){var p=f,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1,indeterminate:c=!1}=p,u=O(p,["id","label","error","helperText","className","disabled","indeterminate"]);const m=l.useMemo(()=>t||`checkbox-${Math.random().toString(36).substr(2,9)}`,[t]),h=l.useMemo(()=>s?`${m}-error`:void 0,[s,m]),x=l.useMemo(()=>a?`${m}-helper`:void 0,[a,m]),y=l.useMemo(()=>"focus:border-line-focus",[]),w=l.useMemo(()=>"focus:border-error",[]),g=l.useMemo(()=>s?w.replace("focus:border-","focus:ring-"):y.replace("focus:border-","focus:ring-"),[s,w,y]),j=l.useMemo(()=>k("h-4","w-4",J("sm"),"border","border-line-default","text-fg-brand","focus:ring-2",g,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[g,s,o]),C=l.useMemo(()=>k(ce("label"),E("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]),b=l.useRef(null),v=l.useCallback(N=>{b.current=N,typeof d=="function"?d(N):d&&(d.current=N),N&&(N.indeterminate=c)},[d,c]);return l.useEffect(()=>{b.current&&(b.current.indeterminate=c)},[c]),n.jsxs("div",{className:k("flex","flex-col",E("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",T({type:"checkbox",id:m,ref:v,className:j,disabled:i,"aria-invalid":s,"aria-describedby":h||x||void 0,"aria-label":r?void 0:"Checkbox"},u)),r&&n.jsx("label",{htmlFor:m,className:C,children:r})]}),(s||a)&&n.jsx("div",{id:h||x,className:k(E("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));Nr.displayName="Checkbox";const va=l.memo(l.forwardRef(function(d,u){var f=d,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1}=f,c=O(f,["id","label","error","helperText","className","disabled"]);const p=l.useMemo(()=>t||`radio-${Math.random().toString(36).substr(2,9)}`,[t]),m=l.useMemo(()=>s?`${p}-error`:void 0,[s,p]),h=l.useMemo(()=>a?`${p}-helper`:void 0,[a,p]),x=l.useMemo(()=>"focus:border-line-focus",[]),y=l.useMemo(()=>"focus:border-error",[]),w=l.useMemo(()=>s?y.replace("focus:border-","focus:ring-"):x.replace("focus:border-","focus:ring-"),[s,y,x]),g=l.useMemo(()=>k("h-4","w-4","border","border-line-default","text-fg-brand","focus:ring-2",w,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[w,s,o]),j=l.useMemo(()=>k(ce("label"),E("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]);return n.jsxs("div",{className:k("flex","flex-col",E("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",T({type:"radio",id:p,ref:u,className:g,disabled:i,"aria-invalid":s,"aria-describedby":m||h||void 0,"aria-label":r?void 0:"Radio button"},c)),r&&n.jsx("label",{htmlFor:p,className:j,children:r})]}),(s||a)&&n.jsx("div",{id:m||h,className:k(E("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));va.displayName="Radio";class mt{static create(t){return{none:{value:"none",tailwind:"shadow-none",description:"No shadow"},sm:{value:"0 1px 2px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-sm",description:"Small shadow for subtle elevation"},md:{value:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",tailwind:"shadow-md",description:"Medium shadow for cards and elevated elements"},lg:{value:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",tailwind:"shadow-lg",description:"Large shadow for modals and dropdowns"},xl:{value:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",tailwind:"shadow-xl",description:"Extra large shadow for prominent modals"},"2xl":{value:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",tailwind:"shadow-2xl",description:"2X large shadow for maximum elevation"},inner:{value:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-inner",description:"Inner shadow for inset elements"}}[t]}}const Sc={none:mt.create("none"),sm:mt.create("sm"),md:mt.create("md"),lg:mt.create("lg"),xl:mt.create("xl"),"2xl":mt.create("2xl"),inner:mt.create("inner")};function $e(e){return Sc[e].tailwind}const Ot={track:{sm:{w:"w-9",h:"h-5"},md:{w:"w-11",h:"h-6"},lg:{w:"w-14",h:"h-7"}},thumb:{sm:{w:"w-4",h:"h-4"},md:{w:"w-5",h:"h-5"},lg:{w:"w-6",h:"h-6"}},translate:{sm:"translate-x-4",md:"translate-x-5",lg:"translate-x-7"}};function Cc(e){return{track:`${Ot.track[e].w} ${Ot.track[e].h}`,thumb:`${Ot.thumb[e].w} ${Ot.thumb[e].h}`,translate:Ot.translate[e]}}const $c=ve("w-full",{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},variant:{primary:"bg-surface-muted",secondary:"bg-surface-muted",success:"bg-success-bg-emphasis",error:"bg-error-bg-emphasis",warning:"bg-warning-bg-emphasis",info:"bg-info-bg-emphasis"}},defaultVariants:{size:"md",variant:"primary"}}),En=ve("transition-all",{variants:{variant:{primary:"bg-surface-brand",secondary:"bg-surface-secondary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info"}},defaultVariants:{variant:"primary"}}),vs=l.forwardRef(function(p,f){var m=p,{value:t,max:r=100,variant:s="primary",size:a="md",showLabel:o=!1,label:i,"aria-label":c,className:u=""}=m,d=O(m,["value","max","variant","size","showLabel","label","aria-label","className"]);const h=t===void 0,x=h?void 0:Math.min(Math.max(t/r*100,0),100),y=c||(h?"Loading in progress":`Progress: ${x==null?void 0:x.toFixed(0)}%`);return n.jsxs("div",P(T({ref:f,className:k("w-full",u)},d),{children:[o&&(i||!h)&&n.jsxs("div",{className:k("flex","items-center","justify-between",E("xs","mb")),children:[i&&n.jsx("span",{className:k(re("bodySmall"),Pe("label"),"text-fg-primary"),children:i}),!h&&x!==void 0&&n.jsxs("span",{className:k(re("bodySmall"),"text-fg-secondary"),children:[x.toFixed(0),"%"]})]}),n.jsx("div",{role:"progressbar","aria-valuemin":h?void 0:0,"aria-valuemax":h?void 0:r,"aria-valuenow":h?void 0:t,"aria-label":y,"aria-busy":h,className:k("relative","w-full","overflow-hidden",$c({size:a,variant:s}),J("full")),children:h?n.jsx("div",{className:k("absolute","top-0","left-0","bottom-0",En({variant:s}),J("full"),"motion-reduce:animate-none"),style:{width:"30%",animation:"progress-indeterminate 1.5s ease-in-out infinite"}}):n.jsx("div",{className:k("h-full",En({variant:s}),J("full"),"transition-all","duration-300","ease-out"),style:{width:`${x}%`},"aria-hidden":"true"})})]}))});vs.displayName="Progress";const ya=l.memo(l.forwardRef(function(m,p){var h=m,{size:t="md",label:r,description:s,error:a=!1,className:o="",disabled:i=!1,checked:c,onChange:u,id:d}=h,f=O(h,["size","label","description","error","className","disabled","checked","onChange","id"]);const x=l.useMemo(()=>d||`switch-${Math.random().toString(36).substr(2,9)}`,[d]),y=l.useMemo(()=>r?`${x}-label`:void 0,[r,x]),w=l.useMemo(()=>s?`${x}-description`:void 0,[s,x]),g=l.useMemo(()=>Cc(t),[t]),j=l.useMemo(()=>"focus:border-line-focus".replace("focus:border-","focus:ring-"),[]),C=l.useMemo(()=>k("relative","inline-flex","shrink-0","cursor-pointer","rounded-full","border-2","border-transparent",be("base"),"focus:outline-none","focus:ring-2",j,"focus:ring-offset-2",g.track,c?"bg-surface-brand":"bg-surface-muted",a&&!c&&"border-error",i&&"opacity-50 cursor-not-allowed",o),[j,g.track,c,a,i,o]),b=l.useMemo(()=>k("pointer-events-none","inline-block","rounded-full","bg-surface-base","shadow","transform",be("base"),g.thumb,c?g.translate:"translate-x-0"),[g.thumb,g.translate,c]);return n.jsxs("div",{className:k("flex","items-start",E("md","gap")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("button",{type:"button",className:C,role:"switch","aria-checked":c,"aria-labelledby":y,"aria-describedby":w,disabled:i,onClick:l.useCallback(v=>{if(!i&&u){const N=P(T({},v),{target:P(T({},v.target),{checked:!c}),currentTarget:P(T({},v.currentTarget),{checked:!c})});u(N)}},[i,u,c]),onKeyDown:l.useCallback(v=>{if((v.key==="Enter"||v.key===" ")&&!i&&u){v.preventDefault();const N=P(T({},v),{target:P(T({},v.target),{checked:!c}),currentTarget:P(T({},v.currentTarget),{checked:!c})});u(N)}},[i,u,c]),children:n.jsx("span",{className:b})}),n.jsx("input",T({ref:p,type:"checkbox",id:x,checked:c,onChange:u,disabled:i,className:"sr-only","aria-hidden":"true",tabIndex:-1},f))]}),(r||s)&&n.jsxs("div",{className:"flex-1",children:[r&&n.jsx("label",{id:y,htmlFor:x,className:k("block",re("bodySmall"),Pe("label"),a?"text-fg-error":"text-fg-primary",i?"opacity-50":"cursor-pointer"),children:r}),s&&n.jsx("p",{id:w,className:k(E("xs","mt"),re("bodySmall"),a?"text-fg-error":"text-fg-secondary"),children:s})]})]})}));ya.displayName="Switch";const ys=l.memo(function(o){var i=o,{orientation:t="horizontal",variant:r="solid",className:s=""}=i,a=O(i,["orientation","variant","className"]);const c=l.useMemo(()=>{const u=["border-0","border-line-default"],d={horizontal:"w-full border-t",vertical:"h-full border-l self-stretch"},f={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"};return k(...u,d[t],f[r],s)},[t,r,s]);return t==="vertical"?n.jsx("div",T({className:c,role:"separator","aria-orientation":"vertical"},a)):n.jsx("hr",T({className:c,role:"separator","aria-orientation":"horizontal"},a))});ys.displayName="Separator";const wa=l.forwardRef(function(g,w){var j=g,{value:t,defaultValue:r,min:s=0,max:a=100,step:o=1,variant:i="single",size:c="md",disabled:u=!1,showValue:d=!1,marks:f=[],onChange:p,onValueChange:m,label:h,className:x=""}=j,y=O(j,["value","defaultValue","min","max","step","variant","size","disabled","showValue","marks","onChange","onValueChange","label","className"]);const C=l.useRef(null),b=l.useId(),v=l.useId(),N=l.useId(),[_,S]=l.useState(r||(i==="range"?[s,a]:s)),[M,F]=l.useState(!1),[R,D]=l.useState(null),I=t!==void 0,A=I?t:_,V=U=>(U-s)/(a-s)*100,Y=U=>{if(!C.current)return s;const X=C.current.getBoundingClientRect(),ae=Math.max(0,Math.min(1,(U-X.left)/X.width)),fe=s+ae*(a-s);return Math.round(fe/o)*o},H=(U,X="min")=>{if(u)return;U.preventDefault(),F(!0),D(X);const ae=ke=>{if(!C.current)return;const je=Y(ke.clientX);W(je,X)},fe=()=>{F(!1),D(null),document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",fe)};document.addEventListener("mousemove",ae),document.addEventListener("mouseup",fe)},W=(U,X="min")=>{const ae=Math.max(s,Math.min(a,U));if(i==="range"){const[fe,ke]=Array.isArray(A)?A:[s,a];let je;X==="min"?je=[Math.min(ae,ke),ke]:je=[fe,Math.max(ae,fe)],I||S(je),p==null||p(je),m==null||m(je)}else I||S(ae),p==null||p(ae),m==null||m(ae)},ie=U=>{if(u||M)return;const X=Y(U.clientX);W(X)},ne=()=>"focus:ring-line-brand ring-offset-2",L=ve(k("relative","cursor-pointer"),{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),B=ve(k("absolute","bg-surface-brand","rounded-full","border-2","border-white","shadow-md","cursor-grab","active:cursor-grabbing",be("base"),"-translate-x-1/2","-translate-y-1/2","top-1/2"),{variants:{size:{sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"},active:{true:ne(),false:""}},defaultVariants:{size:"md",active:!1}}),K=typeof A=="number"?A:A[0],Q=Array.isArray(A)?A[0]:s,le=Array.isArray(A)?A[1]:K,se=V(Q),z=V(le);return n.jsxs("div",P(T({ref:w,className:k("w-full",x)},y),{children:[n.jsxs("label",{id:b,className:k("block",re("bodySmall"),Pe("label"),"text-fg-primary",E("sm","mb")),children:[h,d&&n.jsx("span",{className:k(E("sm","ml"),"text-fg-secondary"),children:i==="range"?`${Q} - ${le}`:K})]}),i==="range"&&n.jsxs(n.Fragment,{children:[n.jsx("span",{id:v,className:"sr-only",children:"minimum"}),n.jsx("span",{id:N,className:"sr-only",children:"maximum"})]}),n.jsxs("div",{ref:C,className:k(L({size:c,disabled:u}),"bg-surface-muted",J("full")),onClick:ie,role:i==="range"?void 0:"slider","aria-valuemin":i==="range"?void 0:s,"aria-valuemax":i==="range"?void 0:a,"aria-valuenow":i==="range"?void 0:K,"aria-disabled":i==="range"?void 0:u,"aria-labelledby":i==="range"?void 0:b,children:[n.jsx("div",{className:k("absolute",L({size:c}),"bg-surface-brand",J("full"),be("base")),style:{left:`${se}%`,width:`${z-se}%`}}),f.map(U=>{const X=V(U);return n.jsx("div",{className:k("absolute","w-1","h-1","bg-line-strong",J("full"),"-translate-x-1/2"),style:{left:`${X}%`,top:"50%",transform:"translate(-50%, -50%)"}},U)}),i==="range"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:k(B({size:c,active:R==="min"})),style:{left:`${se}%`},onMouseDown:U=>H(U,"min"),role:"slider","aria-valuemin":s,"aria-valuemax":le,"aria-valuenow":Q,"aria-labelledby":`${b} ${v}`}),n.jsx("div",{className:k(B({size:c,active:R==="max"})),style:{left:`${z}%`},onMouseDown:U=>H(U,"max"),role:"slider","aria-valuemin":Q,"aria-valuemax":a,"aria-valuenow":le,"aria-labelledby":`${b} ${N}`})]}):n.jsx("div",{className:k(B({size:c,active:M})),style:{left:`${z}%`},onMouseDown:U=>H(U)}),d&&!h&&n.jsx("div",{className:"absolute -top-6 left-0 right-0 flex justify-center",children:n.jsx("span",{className:k(re("caption"),"text-fg-secondary","bg-surface-overlay",E("sm","px"),E("xs","py"),J("md"),"shadow"),children:i==="range"?`${Q} - ${le}`:K})})]})]}))});wa.displayName="Slider";const Ec=ve(k("inline-flex","items-center","font-medium",J("full"),E("xs","gap")),{variants:{variant:{default:k("bg-surface-muted","text-fg-primary","border","border-line-default"),outlined:k("bg-transparent","text-fg-primary","border","border-line-default"),filled:k("bg-surface-brand-strong","text-fg-inverse","border","border-transparent")},size:{sm:k(E("xs","px"),E("xs","py"),re("caption")),md:k(E("sm","px"),E("xs","py"),re("bodySmall")),lg:k(E("md","px"),E("sm","py"),re("body"))},selected:{true:k("bg-surface-brand-strong","text-fg-inverse","border","border-line-brand"),false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},compoundVariants:[{selected:!0,variant:"default",class:""},{selected:!0,variant:"outlined",class:""},{selected:!0,variant:"filled",class:""}],defaultVariants:{variant:"default",size:"md",selected:!1,disabled:!1}}),ws=l.forwardRef(function(h,m){var x=h,{children:t,variant:r="default",size:s="md",onRemove:a,selected:o=!1,disabled:i=!1,className:c="","aria-label":u,onClick:d,tabIndex:f}=x,p=O(x,["children","variant","size","onRemove","selected","disabled","className","aria-label","onClick","tabIndex"]);const y=d!==void 0||o!==!1&&o!==void 0,w=o?"option":y?"button":void 0,j=(()=>{if(u)return u;if(typeof t=="string")return t;if(typeof t=="object"&&t!==null&&"props"in t){const v=t.props;if(v!=null&&v.children&&typeof v.children=="string")return v.children}})(),C=w==="button"&&!j,b=v=>{i||(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),d&&d())};return n.jsxs("div",P(T({ref:m,className:k(Ec({variant:r,size:s,selected:o,disabled:i}),a&&E("xs","pr"),y&&!i&&"cursor-pointer focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2",c),role:w,"aria-selected":o?!0:void 0,"aria-disabled":i,"aria-label":C?"Chip":u||(w==="button"?j:void 0),tabIndex:f!==void 0?f:y&&!i?0:void 0,onClick:i?void 0:d,onKeyDown:b},p),{children:[n.jsx("span",{children:t}),a&&!i&&n.jsx("button",{type:"button",onClick:v=>{v.stopPropagation(),a()},className:k(E("xs","ml"),"hover:bg-tint-hover",J("full"),E("xs","p"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1"),"aria-label":`Remove ${j||"chip"}`,children:n.jsx(Ne,{className:"h-3 w-3","aria-hidden":"true"})})]}))});ws.displayName="Chip";const ur=l.forwardRef(function(f,d){var p=f,{src:t,alt:r,fallback:s,size:a="md",variant:o="circle","aria-label":i,className:c=""}=p,u=O(p,["src","alt","fallback","size","variant","aria-label","className"]);const[m,h]=l.useState(!1),[x,y]=l.useState(!1),w={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},g={circle:"rounded-full",square:"rounded-none",rounded:"rounded-md"},j=!t||m,C=typeof s=="string"?s.toUpperCase().slice(0,2):s,b=i||r||"User avatar";return n.jsxs("div",P(T({ref:d,className:k("relative","inline-flex","items-center","justify-center","shrink-0","font-medium","overflow-hidden",w[a],g[o],"bg-surface-muted","text-fg-primary",c),role:"img","aria-label":b},u),{children:[!j&&t&&n.jsx("img",{src:t,alt:r||"",className:k("w-full","h-full","object-cover",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md",x?"opacity-100":"opacity-0","transition-opacity","duration-200"),onLoad:()=>y(!0),onError:()=>{h(!0),y(!1)},"aria-hidden":"true"}),j&&n.jsx("span",{className:k("flex","items-center","justify-center","w-full","h-full",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md"),"aria-hidden":"true",children:C||"?"})]}))});ur.displayName="Avatar";function Mc(c){var u=c,{children:e,max:t=3,size:r="md",variant:s="circle",spacing:a="md",className:o=""}=u,i=O(u,["children","max","size","variant","spacing","className"]);const d={none:"",sm:"-space-x-1",md:"-space-x-2",lg:"-space-x-3"},f=l.Children.toArray(e).filter(Boolean),p=f.slice(0,t),m=f.length-t;return n.jsxs("div",P(T({className:k("flex","items-center",d[a],o),role:"group","aria-label":`${f.length} avatars`},i),{children:[p.map((h,x)=>{let y=h;if(l.isValidElement(h)&&h.type===ur){const w=h.props;y=l.cloneElement(h,{size:w.size||r,variant:w.variant||s})}return n.jsx("div",{className:"ring-2 ring-surface-base",style:{zIndex:f.length-x},children:y},x)}),m>0&&n.jsx(ur,{size:r,variant:s,fallback:`+${m}`,"aria-label":`${m} more avatars`,className:"ring-2 ring-surface-base",style:{zIndex:0}})]}))}const fr=l.memo(function(d){var f=d,{variant:t="default",padding:r="medium",className:s="",onClick:a,"aria-label":o,"aria-labelledby":i,children:c}=f,u=O(f,["variant","padding","className","onClick","aria-label","aria-labelledby","children"]);const p=ve(k("bg-surface-base",J("lg"),"border","border-line-default","shadow-sm"),{variants:{variant:{default:"",hover:k("hover:shadow-md","transition-shadow","cursor-pointer"),selected:k("border-line-brand","shadow-md")},padding:{none:"",small:E("xs","p"),medium:E("base","p"),large:E("lg","p")}},defaultVariants:{variant:"default",padding:"medium"}}),m=l.useMemo(()=>a!==void 0||t==="hover",[a,t]),h=m?"button":void 0,x=m?0:void 0,y=k(p({variant:t,padding:r}),s),w=l.useCallback(g=>{m&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),a==null||a())},[m,a]);return n.jsx("div",P(T({className:y,role:h,tabIndex:x,onClick:a,onKeyDown:w,"aria-label":o,"aria-labelledby":i},u),{children:c}))});fr.displayName="Card";const Sr=l.createContext(void 0);function ks(){const e=l.useContext(Sr);if(e===void 0)throw new Error("useFormContext must be used within a Form component with react-hook-form integration");return e}function Tc(){return l.useContext(Sr)}function ka({form:e,loading:t=!1,children:r}){const s={form:e,loading:t};return n.jsx(Sr.Provider,{value:s,children:r})}function Ac(c){var u=c,{children:e,onSubmit:t,loading:r=!1,error:s=null,success:a=null,className:o=""}=u,i=O(u,["children","onSubmit","loading","error","success","className"]);const d=k(E("lg","gap"),"flex","flex-col",o);if("form"in i&&i.form!==void 0){const y=i,{form:g,onSubmit:j,onSubmitError:C}=y,b=O(y,["form","onSubmit","onSubmitError"]),v=g.handleSubmit(N=>rr(null,null,function*(){try{yield j(N)}catch(_){C==null||C(_)}}),N=>{C==null||C(N)});return n.jsx(ka,{form:g,loading:r,children:n.jsxs("form",P(T({className:d,onSubmit:v,noValidate:!0},b),{children:[e,s&&n.jsx("div",{role:"alert",className:k(E("md","p"),ye("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:k(E("md","p"),ye("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))})}const p=i.onSubmit||t,w=i,{onSubmit:m}=w,h=O(w,["onSubmit"]),x=g=>{g.preventDefault(),p&&!r&&p(g)};return n.jsxs("form",P(T({className:d,onSubmit:x,noValidate:!0},h),{children:[e,s&&n.jsx("div",{role:"alert",className:k(E("md","p"),ye("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:k(E("md","p"),ye("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))}function Rc({name:e,label:t,children:r,rules:s,className:a=""}){var m;const{form:o}=ks();if(!o)throw new Error("FormField must be used within a Form component with react-hook-form integration");const{register:i,formState:{errors:c},watch:u}=o,d=i(e,s),f=(m=c[e])==null?void 0:m.message,p=u(e);return n.jsxs("div",{className:k("flex","flex-col",E("sm","gap"),a),children:[t&&n.jsx(Tt,{htmlFor:e,className:k("block",ye("sm"),Mt("medium"),"text-fg-primary"),children:t}),r({name:e,register:h=>i(h,s),error:f,value:p,onChange:d.onChange,onBlur:d.onBlur}),f&&n.jsx(ba,{message:f})]})}var Ic=e=>e.type==="checkbox",Dc=e=>e instanceof Date,Be=e=>e==null;const Fc=e=>typeof e=="object";var Ge=e=>!Be(e)&&!Array.isArray(e)&&Fc(e)&&!Dc(e),Lc=e=>{const t=e.constructor&&e.constructor.prototype;return Ge(t)&&t.hasOwnProperty("isPrototypeOf")},ja=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function pt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList!="undefined"&&e instanceof FileList;if(ja&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(Ge(e)&&Lc(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=pt(e[a]));return s}var js=e=>/^\w*$/.test(e),ze=e=>e===void 0,Na=e=>Array.isArray(e)?e.filter(Boolean):[],Ns=e=>Na(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Le=(e,t,r)=>{if(!t||!Ge(e))return r;const s=(js(t)?[t]:Ns(t)).reduce((a,o)=>Be(a)?a:a[o],e);return ze(s)||s===e?ze(e[t])?r:e[t]:s},Sa=e=>typeof e=="boolean",_c=e=>typeof e=="function",mr=(e,t,r)=>{let s=-1;const a=js(t)?[t]:Ns(t),o=a.length,i=o-1;for(;++s<o;){const c=a[s];let u=r;if(s!==i){const d=e[c];u=Ge(d)||Array.isArray(d)?d:isNaN(+a[s+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=u,e=e[c]}};const $t={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},He={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ca=l.createContext(null);Ca.displayName="HookFormControlContext";const Pc=()=>l.useContext(Ca),zc=typeof window!="undefined"?l.useLayoutEffect:l.useEffect;var Je=e=>typeof e=="string";const Oc=l.createContext(null);Oc.displayName="HookFormContext";var Vc=(e,t,r,s,a)=>t?P(T({},r[e]),{types:P(T({},r[e]&&r[e].types?r[e].types:{}),{[s]:a||!0})}):{},_e=e=>Array.isArray(e)?e:[e],pr=e=>Ge(e)&&!Object.keys(e).length,Wc=e=>e.type==="file",Hc=e=>{if(!ja)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Bc=e=>e.type==="radio";function Uc(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;)e=ze(e)?s++:e[t[s++]];return e}function qc(e){for(const t in e)if(e.hasOwnProperty(t)&&!ze(e[t]))return!1;return!0}function $a(e,t){const r=Array.isArray(t)?t:js(t)?[t]:Ns(t),s=r.length===1?e:Uc(e,r),a=r.length-1,o=r[a];return s&&delete s[o],a!==0&&(Ge(s)&&pr(s)||Array.isArray(s)&&qc(s))&&$a(e,r.slice(0,-1)),e}var Ea=e=>e instanceof RegExp,ir=e=>({isOnSubmit:!e||e===$t.onSubmit,isOnBlur:e===$t.onBlur,isOnChange:e===$t.onChange,isOnAll:e===$t.all,isOnTouch:e===$t.onTouched}),Gc=(e,t,r)=>t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length)));const os=(e,t,r,s)=>{for(const o of Object.keys(e)){const i=Le(e,o);if(i){const a=i,{_f:c}=a,u=O(a,["_f"]);if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],o))return!0;if(c.ref&&t(c.ref,c.name))return!0;if(os(u,t))break}else if(Ge(u)&&os(u,t))break}}};var Kc=(e,t,r)=>{const s=_e(Le(e,r));return mr(s,"root",t[r]),mr(e,r,s),e};function Mn(e,t,r="validate"){if(Je(e)||Array.isArray(e)&&e.every(Je)||Sa(e)&&!e)return{type:r,message:Je(e)?e:"",ref:t}}var St=e=>Ge(e)&&!Ea(e)?e:{value:e,message:""},Yc=(e,t,r,s,a,o)=>rr(null,null,function*(){const{ref:i,refs:c,required:u,maxLength:d,minLength:f,min:p,max:m,pattern:h,validate:x,name:y,valueAsNumber:w,mount:g}=e._f,j=Le(r,y);if(!g||t.has(y))return{};const C=c?c[0]:i,b=M=>{a&&C.reportValidity&&(C.setCustomValidity(Sa(M)?"":M||""),C.reportValidity())},v={};Bc(i),Ic(i);const N=(w||Wc(i))&&ze(i.value)&&ze(j)||Hc(i)&&i.value===""||j===""||Array.isArray(j)&&!j.length,_=Vc.bind(null,y,s,v),S=(M,F,R,D=He.maxLength,I=He.minLength)=>{const A=M?F:R;v[y]=T({type:M?D:I,message:A,ref:i},_(M?D:I,A))};if(!Array.isArray(j)||!j.length){const{value:M,message:F}=Je(u)?{value:!!u,message:u}:St(u);if(M&&(v[y]=T({type:He.required,message:F,ref:C},_(He.required,F)),!s))return b(F),v}if(!N&&(!Be(p)||!Be(m))){let M,F;const R=St(m),D=St(p);if(!Be(j)&&!isNaN(j)){const I=i.valueAsNumber||j&&+j;Be(R.value)||(M=I>R.value),Be(D.value)||(F=I<D.value)}else{const I=i.valueAsDate||new Date(j),A=H=>new Date(new Date().toDateString()+" "+H),V=i.type=="time",Y=i.type=="week";Je(R.value)&&j&&(M=V?A(j)>A(R.value):Y?j>R.value:I>new Date(R.value)),Je(D.value)&&j&&(F=V?A(j)<A(D.value):Y?j<D.value:I<new Date(D.value))}if((M||F)&&(S(!!M,R.message,D.message,He.max,He.min),!s))return b(v[y].message),v}if((d||f)&&!N&&(Je(j)||Array.isArray(j))){const M=St(d),F=St(f),R=!Be(M.value)&&j.length>+M.value,D=!Be(F.value)&&j.length<+F.value;if((R||D)&&(S(R,M.message,F.message),!s))return b(v[y].message),v}if(h&&!N&&Je(j)){const{value:M,message:F}=St(h);if(Ea(M)&&!j.match(M)&&(v[y]=T({type:He.pattern,message:F,ref:i},_(He.pattern,F)),!s))return b(F),v}if(x){if(_c(x)){const M=yield x(j,r),F=Mn(M,C);if(F&&(v[y]=T(T({},F),_(He.validate,F.message)),!s))return b(F.message),v}else if(Ge(x)){let M={};for(const F in x){if(!pr(M)&&!s)break;const R=Mn(yield x[F](j,r),C,F);R&&(M=T(T({},R),_(F,R.message)),b(R.message),s&&(v[y]=M))}if(!pr(M)&&(v[y]=T({ref:C},M),!s))return v}}return b(!0),v}),Xe=()=>{if(typeof crypto!="undefined"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance=="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Kr=(e,t,r={})=>r.shouldFocus||ze(r.shouldFocus)?r.focusName||`${e}.${ze(r.focusIndex)?t:r.focusIndex}.`:"",Yr=(e,t)=>[...e,..._e(t)],Xr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Jr(e,t,r){return[...e.slice(0,t),..._e(r),...e.slice(t)]}var Qr=(e,t,r)=>Array.isArray(e)?(ze(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Zr=(e,t)=>[..._e(t),..._e(e)];function Xc(e,t){let r=0;const s=[...e];for(const a of t)s.splice(a-r,1),r++;return Na(s).length?s:[]}var es=(e,t)=>ze(t)?[]:Xc(e,_e(t).sort((r,s)=>r-s)),ts=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Tn=(e,t,r)=>(e[t]=r,e);function Jc(e){const t=Pc(),{control:r=t,name:s,keyName:a="id",shouldUnregister:o,rules:i}=e,[c,u]=l.useState(r._getFieldArray(s)),d=l.useRef(r._getFieldArray(s).map(Xe)),f=l.useRef(!1);r._names.array.add(s),l.useMemo(()=>i&&c.length>=0&&r.register(s,i),[r,s,c.length,i]),zc(()=>r._subjects.array.subscribe({next:({values:b,name:v})=>{if(v===s||!v){const N=Le(b,s);Array.isArray(N)&&(u(N),d.current=N.map(Xe))}}}).unsubscribe,[r,s]);const p=l.useCallback(b=>{f.current=!0,r._setFieldArray(s,b)},[r,s]),m=(b,v)=>{const N=_e(pt(b)),_=Yr(r._getFieldArray(s),N);r._names.focus=Kr(s,_.length-1,v),d.current=Yr(d.current,N.map(Xe)),p(_),u(_),r._setFieldArray(s,_,Yr,{argA:Xr(b)})},h=(b,v)=>{const N=_e(pt(b)),_=Zr(r._getFieldArray(s),N);r._names.focus=Kr(s,0,v),d.current=Zr(d.current,N.map(Xe)),p(_),u(_),r._setFieldArray(s,_,Zr,{argA:Xr(b)})},x=b=>{const v=es(r._getFieldArray(s),b);d.current=es(d.current,b),p(v),u(v),!Array.isArray(Le(r._fields,s))&&mr(r._fields,s,void 0),r._setFieldArray(s,v,es,{argA:b})},y=(b,v,N)=>{const _=_e(pt(v)),S=Jr(r._getFieldArray(s),b,_);r._names.focus=Kr(s,b,N),d.current=Jr(d.current,b,_.map(Xe)),p(S),u(S),r._setFieldArray(s,S,Jr,{argA:b,argB:Xr(v)})},w=(b,v)=>{const N=r._getFieldArray(s);ts(N,b,v),ts(d.current,b,v),p(N),u(N),r._setFieldArray(s,N,ts,{argA:b,argB:v},!1)},g=(b,v)=>{const N=r._getFieldArray(s);Qr(N,b,v),Qr(d.current,b,v),p(N),u(N),r._setFieldArray(s,N,Qr,{argA:b,argB:v},!1)},j=(b,v)=>{const N=pt(v),_=Tn(r._getFieldArray(s),b,N);d.current=[..._].map((S,M)=>!S||M===b?Xe():d.current[M]),p(_),u([..._]),r._setFieldArray(s,_,Tn,{argA:b,argB:N},!0,!1)},C=b=>{const v=_e(pt(b));d.current=v.map(Xe),p([...v]),u([...v]),r._setFieldArray(s,[...v],N=>N,{},!0,!1)};return l.useEffect(()=>{if(r._state.action=!1,Gc(s,r._names)&&r._subjects.state.next(T({},r._formState)),f.current&&(!ir(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!ir(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([s]).then(b=>{r._updateIsValidating([s]);const v=Le(b.errors,s),N=Le(r._formState.errors,s);(N?!v&&N.type||v&&(N.type!==v.type||N.message!==v.message):v&&v.type)&&(v?mr(r._formState.errors,s,v):$a(r._formState.errors,s),r._subjects.state.next({errors:r._formState.errors}))});else{const b=Le(r._fields,s);b&&b._f&&!(ir(r._options.reValidateMode).isOnSubmit&&ir(r._options.mode).isOnSubmit)&&Yc(b,r._names.disabled,r._formValues,r._options.criteriaMode===$t.all,r._options.shouldUseNativeValidation).then(v=>!pr(v)&&r._subjects.state.next({errors:Kc(r._formState.errors,v,s)}))}r._subjects.state.next({name:s,values:pt(r._formValues)}),r._names.focus&&os(r._fields,(b,v)=>{if(r._names.focus&&v.startsWith(r._names.focus)&&b.focus)return b.focus(),1}),r._names.focus="",r._setValid(),f.current=!1},[c,s,r]),l.useEffect(()=>(!Le(r._formValues,s)&&r._setFieldArray(s),()=>{const b=(v,N)=>{const _=Le(r._fields,v);_&&_._f&&(_._f.mount=N)};r._options.shouldUnregister||o?r.unregister(s):b(s,!1)}),[s,r,a,o]),{swap:l.useCallback(w,[p,s,r]),move:l.useCallback(g,[p,s,r]),prepend:l.useCallback(h,[p,s,r]),append:l.useCallback(m,[p,s,r]),remove:l.useCallback(x,[p,s,r]),insert:l.useCallback(y,[p,s,r]),update:l.useCallback(j,[p,s,r]),replace:l.useCallback(C,[p,s,r]),fields:l.useMemo(()=>c.map((b,v)=>P(T({},b),{[a]:d.current[v]||Xe()})),[c,a])}}function Qc(e){const{form:t}=ks();if(!t)throw new Error("useFormFieldArray must be used within a Form component with react-hook-form integration");return Jc(P(T({},e),{control:t.control}))}function Ma(a){var o=a,{items:e,separator:t="/",className:r=""}=o,s=O(o,["items","separator","className"]);const i=["flex","items-center",E("sm","space-x"),re("bodySmall")],c=k(...i,r);return n.jsx("nav",P(T({"aria-label":"Breadcrumb",className:c},s),{children:n.jsx("ol",{className:k("flex","items-center",E("sm","space-x")),children:e.map((u,d)=>{const f=d===e.length-1;return n.jsxs("li",{className:"flex items-center",children:[d>0&&n.jsx("span",{className:k(E("sm","mx"),"text-fg-tertiary"),"aria-hidden":"true",children:t}),f?n.jsx("span",{className:k("text-fg-primary",Pe("label")),"aria-current":"page",children:u.label}):u.href?n.jsx("a",{href:u.href,className:k("inline-flex","items-center",E("xs","px"),E("xs","pt"),"border-b-2","border-transparent",re("bodySmall"),Pe("label"),"transition-colors","text-fg-secondary","hover:border-line-emphasis","hover:text-fg-primary"),children:u.label}):n.jsx("span",{className:"text-fg-secondary",children:u.label})]},d)})})}))}function Ta(u){var d=u,{currentPage:e,totalPages:t,onPageChange:r,totalItems:s,itemsPerPage:a,showPageInfo:o=!0,className:i=""}=d,c=O(d,["currentPage","totalPages","onPageChange","totalItems","itemsPerPage","showPageInfo","className"]);const f=()=>{e>1&&r(e-1)},p=()=>{e<t&&r(e+1)},m=g=>{g>=1&&g<=t&&g!==e&&r(g)},h=()=>{const g=[];if(t<=5)for(let C=1;C<=t;C++)g.push(C);else if(e<=3){for(let C=1;C<=4;C++)g.push(C);g.push("ellipsis"),g.push(t)}else if(e>=t-2){g.push(1),g.push("ellipsis");for(let C=t-3;C<=t;C++)g.push(C)}else{g.push(1),g.push("ellipsis");for(let C=e-1;C<=e+1;C++)g.push(C);g.push("ellipsis"),g.push(t)}return g},x=s&&a?(e-1)*a+1:void 0,y=s&&a?Math.min(e*a,s):void 0,w=k("flex","items-center","justify-between",E("base","px"),E("md","py"),i);return n.jsxs("nav",P(T({className:w,"aria-label":"Pagination"},c),{children:[n.jsxs("div",{className:k("flex","items-center",E("sm","gap")),children:[n.jsx(Z,{variant:"secondary",onClick:f,disabled:e===1,size:"sm",children:"Previous"}),n.jsx("div",{className:k("flex","items-center",E("xs","gap")),children:h().map((g,j)=>{if(g==="ellipsis")return n.jsx("span",{className:k(E("sm","px"),"text-fg-tertiary"),children:"..."},`ellipsis-${j}`);const C=g,b=C===e;return n.jsx(Z,{variant:b?"primary":"ghost",onClick:()=>m(C),size:"sm","aria-current":b?"page":void 0,"aria-label":`Go to page ${C}`,children:C},C)})}),n.jsx(Z,{variant:"secondary",onClick:p,disabled:e===t,size:"sm",children:"Next"})]}),o&&s&&a&&n.jsxs("div",{className:k(ye("sm"),"text-fg-primary"),children:["Showing ",x," to ",y," of ",s," results"]})]}))}function Aa(u){var d=u,{title:e,message:t,actionLabel:r,onAction:s,illustration:a,variant:o="default",className:i=""}=d,c=O(d,["title","message","actionLabel","onAction","illustration","variant","className"]);const f=k("flex","flex-col","items-center","justify-center","text-center",E("xl","py"),E("base","px"),i),p=o==="withAction"||r&&s,m=o==="withIllustration"||a;return n.jsxs("div",P(T({className:f,role:"status","aria-live":"polite","aria-label":`${e}. ${t}`},c),{children:[m&&a&&n.jsx("div",{className:k(E("base","mb")),"aria-hidden":"true",children:a}),n.jsx(Ue,{as:"h3",className:k(re("h4"),Mt("semibold"),"text-fg-primary",E("sm","mb")),children:e}),n.jsx(Ue,{as:"p",className:k(re("bodySmall"),"text-fg-secondary",E("md","mb"),"max-w-sm"),children:t}),p&&r&&s&&n.jsx(Z,{variant:"primary",onClick:s,children:r})]}))}function Ra(c){var u=c,{trigger:e,items:t,align:r="right",variant:s="default",className:a="","aria-label":o}=u,i=O(u,["trigger","items","align","variant","className","aria-label"]);const[d,f]=l.useState(!1),[p,m]=l.useState(-1),h=l.useRef(null),x=l.useRef(null),y=l.useRef(null),w=l.useRef([]),g=`dropdown-menu-${Math.random().toString(36).substr(2,9)}`,j=`dropdown-trigger-${Math.random().toString(36).substr(2,9)}`;l.useEffect(()=>{const S=M=>{h.current&&!h.current.contains(M.target)&&(f(!1),m(-1))};return d&&(document.addEventListener("mousedown",S),setTimeout(()=>{var F;const M=t.findIndex(R=>!R.disabled);M>=0&&(m(M),(F=w.current[M])==null||F.focus())},0)),()=>{document.removeEventListener("mousedown",S)}},[d,t]),l.useEffect(()=>{if(!d)return;const S=F=>{var I,A,V,Y;const R=t.map((H,W)=>({item:H,index:W})).filter(({item:H})=>!H.disabled),D=R.findIndex(({index:H})=>H===p);switch(F.key){case"ArrowDown":{F.preventDefault();const H=D<R.length-1?R[D+1].index:R[0].index;m(H),(I=w.current[H])==null||I.focus();break}case"ArrowUp":{F.preventDefault();const H=D>0?R[D-1].index:R[R.length-1].index;m(H),(A=w.current[H])==null||A.focus();break}case"Home":{F.preventDefault();const H=R[0].index;m(H),(V=w.current[H])==null||V.focus();break}case"End":{F.preventDefault();const H=R[R.length-1].index;m(H),(Y=w.current[H])==null||Y.focus();break}case"Enter":case" ":F.preventDefault(),p>=0&&!t[p].disabled&&C(t[p]);break;case"Escape":F.preventDefault(),f(!1),m(-1),setTimeout(()=>{var H;(H=x.current)==null||H.focus()},0);break}},M=y.current;if(M){const F=S;return M.addEventListener("keydown",F),()=>{M.removeEventListener("keydown",F)}}},[d,p,t]);const C=S=>{S.disabled||(S.onClick(),f(!1),m(-1),setTimeout(()=>{var M;(M=x.current)==null||M.focus()},0))},b=()=>{f(!d),m(-1)},v=S=>{(S.key==="Enter"||S.key===" "||S.key==="ArrowDown")&&(S.preventDefault(),f(!0))},N=r==="right"?"right-0":"left-0",_=l.isValidElement(e)?l.cloneElement(e,{onClick:S=>{b(),e.props.onClick&&e.props.onClick(S)},onKeyDown:S=>{v(S),e.props.onKeyDown&&e.props.onKeyDown(S)},"aria-haspopup":"menu","aria-expanded":d,"aria-controls":g,"aria-label":o||e.props["aria-label"]||"Open menu",id:j,ref:S=>{x.current=S,typeof e.ref=="function"?e.ref(S):e.ref&&(e.ref.current=S)}}):n.jsx("div",{ref:x,onClick:b,onKeyDown:v,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":g,"aria-label":o||"Open menu",id:j,children:e});return n.jsxs("div",P(T({className:k("relative","inline-block",a),ref:h},i),{children:[_,d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:k("fixed","inset-0","z-10"),onClick:()=>{f(!1),m(-1)},"aria-hidden":"true"}),n.jsx("div",{ref:y,id:g,className:k("absolute","z-20",E("sm","mt"),"w-48",J("md"),$e("lg"),"bg-surface-overlay","ring-1","ring-line-strong","ring-opacity-5",N),role:"menu","aria-orientation":"vertical","aria-labelledby":j,"aria-activedescendant":p>=0?`${g}-item-${p}`:void 0,children:n.jsx("div",{className:k(E("xs","py")),role:"none",children:t.map((S,M)=>{const F=k("block",E("base","px"),E("xs","py"),re("bodySmall"),"w-full","text-left","focus:outline-none",S.disabled?k("text-fg-disabled","cursor-not-allowed","opacity-50"):S.variant==="danger"?k("text-error-dark","hover:bg-error-bg-emphasis","focus:bg-error-bg-emphasis"):k("text-fg-primary","hover:bg-surface-hover","focus:bg-surface-hover"));return n.jsx("button",{id:`${g}-item-${M}`,ref:R=>{w.current[M]=R},type:"button",className:F,onClick:()=>C(S),disabled:S.disabled,role:"menuitem","aria-disabled":S.disabled,tabIndex:S.disabled?-1:p===M?0:-1,children:S.label},M)})})})]})]}))}const Ia=l.createContext(void 0);function Da(){const e=l.useContext(Ia);if(!e)throw new Error("DatePicker components must be used within a DatePicker component");return e}function is({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,locale:u}){const d=()=>{if(r!==void 0)return null;if(s){if(t==="single"&&s instanceof Date)return s;if(t==="range"&&typeof s=="object"&&"start"in s)return null}return null},f=()=>r!==void 0?null:s&&t==="range"&&typeof s=="object"&&"start"in s?s:{start:null,end:null},[p,m]=l.useState(d()),[h,x]=l.useState(f()),y=t==="single"?r instanceof Date?r:p:null,w=t==="range"?r&&typeof r=="object"&&"start"in r?r:h:null,C={selectedDate:y,selectedRange:w,mode:t,onDateChange:b=>{t==="single"&&(r===void 0&&m(b),a==null||a(b))},onRangeChange:b=>{t==="range"&&(r===void 0&&x(b),a==null||a(b))},minDate:o,maxDate:i,disabledDates:c,locale:u};return n.jsx(Ia.Provider,{value:C,children:e})}function Vt(e,t="yyyy-MM-dd"){const r=e.getFullYear(),s=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",s).replace("dd",a).replace("MM/dd/yyyy",`${s}/${a}/${r}`).replace("dd/MM/yyyy",`${a}/${s}/${r}`)}function An(e){if(!e)return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(t){const[,a,o,i]=t,c=new Date(parseInt(a),parseInt(o)-1,parseInt(i));if(!isNaN(c.getTime()))return c}const r=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(r){const[,a,o,i]=r,c=new Date(parseInt(i),parseInt(a)-1,parseInt(o));if(!isNaN(c.getTime()))return c}const s=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(s){const[,a,o,i]=s,c=new Date(parseInt(i),parseInt(o)-1,parseInt(a));if(!isNaN(c.getTime()))return c}return null}function Ss(c){var u=c,{placeholder:e="Select date",format:t="yyyy-MM-dd",showCalendarButton:r=!0,"aria-label":s,onFocus:a,className:o=""}=u,i=O(u,["placeholder","format","showCalendarButton","aria-label","onFocus","className"]);const{selectedDate:d,selectedRange:f,mode:p,onDateChange:m}=Da(),[h,x]=l.useState(""),[y,w]=l.useState(!1),g=l.useRef(null);l.useEffect(()=>{p==="single"&&d?x(Vt(d,t)):p==="range"&&f?f.start&&f.end?x(`${Vt(f.start,t)} - ${Vt(f.end,t)}`):f.start?x(Vt(f.start,t)):x(""):x("")},[d,f,p,t]);const j=v=>{const N=v.target.value;if(x(N),p==="single"){const _=An(N);m(_)}},C=()=>{if(w(!1),h&&p==="single"){const v=An(h);v&&x(Vt(v,t))}},b=()=>{var v;(v=g.current)==null||v.focus()};return n.jsx("div",P(T({className:`relative ${o}`},i),{children:n.jsx(Se,{ref:g,type:"text",value:h,onChange:j,onFocus:()=>{w(!0),a==null||a()},onBlur:C,placeholder:e,"aria-label":s||e,rightIcon:r?n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:b,"aria-label":"Open calendar",type:"button",children:n.jsx(Tl,{className:"h-4 w-4"})}):void 0})}))}function Zc(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function ed(e){return new Date(e.getFullYear(),e.getMonth(),1).getDay()}function ht(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Wt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function td(e,t,r){if(!t||!r)return!1;const s=e.getTime();return s>=t.getTime()&&s<=r.getTime()}function Rn(e,t,r,s){return!!(t&&e<t||r&&e>r||s!=null&&s.some(a=>ht(e,a)))}const rd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],sd=["January","February","March","April","May","June","July","August","September","October","November","December"];function Cs(a){var o=a,{month:e,onMonthChange:t,className:r=""}=o,s=O(o,["month","onMonthChange","className"]);const{selectedDate:i,selectedRange:c,mode:u,onDateChange:d,onRangeChange:f,minDate:p,maxDate:m,disabledDates:h}=Da(),[x,y]=l.useState(e||i||(c==null?void 0:c.start)||new Date),w=l.useRef(null),[g,j]=l.useState(()=>{const D=new Date,I=e||i||(c==null?void 0:c.start)||D;return i&&Wt(i,I)?i:Wt(D,I)?D:new Date(I.getFullYear(),I.getMonth(),1)});l.useEffect(()=>{e&&y(e)},[e]),l.useEffect(()=>{if(!w.current)return;const D=w.current.querySelector(`[data-date="${g.toISOString()}"]`);D&&D.focus()},[g]);const C=(()=>{if(Wt(g,x))return g;const D=new Date;return Wt(D,x)?D:new Date(x.getFullYear(),x.getMonth(),1)})(),b=Zc(x),v=ed(x),N=[];for(let D=0;D<v;D++)N.push(null);for(let D=1;D<=b;D++)N.push(new Date(x.getFullYear(),x.getMonth(),D));const _=D=>{if(!Rn(D,p,m,h)){if(u==="single")d(D);else if(u==="range"){const I=c||{start:null,end:null};!I.start||I.start&&I.end?f({start:D,end:null}):I.start&&!I.end&&(D<I.start?f({start:D,end:I.start}):f({start:I.start,end:D}))}}},S=()=>{const D=new Date(x.getFullYear(),x.getMonth()-1,1);y(D),t==null||t(D)},M=()=>{const D=new Date(x.getFullYear(),x.getMonth()+1,1);y(D),t==null||t(D)},F=(D,I)=>{let A=null;switch(D.key){case"ArrowLeft":D.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),I.getDate()-1);break;case"ArrowRight":D.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),I.getDate()+1);break;case"ArrowUp":D.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),I.getDate()-7);break;case"ArrowDown":D.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),I.getDate()+7);break;case"Home":D.preventDefault(),A=new Date(I.getFullYear(),I.getMonth(),1);break;case"End":D.preventDefault(),A=new Date(I.getFullYear(),I.getMonth()+1,0);break;case"Enter":case" ":D.preventDefault(),_(I);return}A&&(Wt(A,x)||y(new Date(A.getFullYear(),A.getMonth(),1)),j(A))},R=[];for(let D=0;D<N.length;D+=7)R.push(N.slice(D,D+7));return n.jsxs("div",P(T({ref:w,className:`p-4 ${r}`},s),{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:S,"aria-label":"Previous month",children:n.jsx(Bt,{className:"h-4 w-4"})}),n.jsxs("div",{className:"text-sm font-semibold",children:[sd[x.getMonth()]," ",x.getFullYear()]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:M,"aria-label":"Next month",children:n.jsx(bt,{className:"h-4 w-4"})})]}),n.jsxs("div",{role:"grid","aria-label":"Calendar",children:[n.jsx("div",{role:"row",className:"grid grid-cols-7 gap-1 mb-2",children:rd.map(D=>n.jsx("div",{role:"columnheader",className:"text-center text-xs font-medium text-fg-tertiary py-1",children:D},D))}),R.map((D,I)=>n.jsx("div",{role:"row",className:"grid grid-cols-7 gap-1",children:D.map((A,V)=>{if(!A)return n.jsx("div",{role:"gridcell",className:"aspect-square"},`empty-${I}-${V}`);const Y=u==="single"?ht(A,i):ht(A,(c==null?void 0:c.start)||null)||ht(A,(c==null?void 0:c.end)||null),H=u==="range"&&c?td(A,c.start,c.end):!1,W=Rn(A,p,m,h),ie=ht(A,new Date),ne=ht(A,g),L=ht(A,C);return n.jsx("button",{role:"gridcell",type:"button","data-date":A.toISOString(),tabIndex:L?0:-1,onClick:()=>_(A),onKeyDown:B=>F(B,A),className:`
|
|
178
178
|
aspect-square
|
|
179
179
|
text-sm
|
|
180
180
|
${J("md")}
|
|
@@ -182,18 +182,18 @@ React keys must be passed directly to JSX without using spread:
|
|
|
182
182
|
focus:outline-none
|
|
183
183
|
focus:ring-2
|
|
184
184
|
focus:ring-offset-1
|
|
185
|
-
${W?"text-fg-disabled cursor-not-allowed opacity-50":Y?"bg-surface-brand-strong text-fg-inverse font-semibold":
|
|
186
|
-
`,"aria-label":
|
|
185
|
+
${W?"text-fg-disabled cursor-not-allowed opacity-50":Y?"bg-surface-brand-strong text-fg-inverse font-semibold":H?"bg-surface-brand-muted text-fg-brand-emphasis":ie?"border-2 border-line-brand font-semibold":ne?"bg-surface-brand-muted":"hover:bg-surface-active"}
|
|
186
|
+
`,"aria-label":A.toDateString(),"aria-selected":Y,"aria-disabled":W,children:A.getDate()},A.toISOString())})},`week-${I}`))]})]}))}function Cr({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,placeholder:u,format:d,showCalendarButton:f=!0,"aria-label":p,className:m=""}){const[h,x]=l.useState(!1),y=l.useRef(null),w=l.useRef(null);return l.useEffect(()=>{if(!h)return;const g=j=>{var N,_,S,M;const C=j.target,b=(_=(N=y.current)==null?void 0:N.contains(C))!=null?_:!1,v=(M=(S=w.current)==null?void 0:S.contains(C))!=null?M:!1;!b&&!v&&x(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[h]),l.useEffect(()=>{if(!h)return;const g=j=>{j.key==="Escape"&&x(!1)};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[h]),e?n.jsx(is,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:e}):n.jsx("div",{ref:y,className:`relative ${m}`,children:n.jsxs(is,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:[n.jsx(Ss,{placeholder:u,format:d,showCalendarButton:f,"aria-label":p,onFocus:()=>x(!0)}),h&&n.jsx(Fa,{containerRef:y,popupRef:w,children:n.jsx(Cs,{})})]})})}function Fa({children:e,containerRef:t,popupRef:r}){const s=l.useRef(null),a=r||s,[o,i]=l.useState(null);if(l.useEffect(()=>{if(t!=null&&t.current){const u=t.current.getBoundingClientRect();i({top:u.bottom+window.scrollY+8,left:u.left+window.scrollX})}},[t]),!o)return null;const c=n.jsx("div",{ref:a,className:`
|
|
187
187
|
fixed ${ue("popover")}
|
|
188
188
|
bg-surface-overlay
|
|
189
189
|
${J("lg")}
|
|
190
|
-
${
|
|
190
|
+
${$e("xl")}
|
|
191
191
|
border border-line-default
|
|
192
|
-
`,role:"dialog","aria-modal":"false","aria-label":"Date picker calendar",style:{top:`${o.top}px`,left:`${o.left}px`},children:e});return typeof window!="undefined"?
|
|
192
|
+
`,role:"dialog","aria-modal":"false","aria-label":"Date picker calendar",style:{top:`${o.top}px`,left:`${o.left}px`},children:e});return typeof window!="undefined"?qe.createPortal(c,document.body):c}Cr.Input=Ss;Cr.Calendar=Cs;Cr.Popup=Fa;const nd=Cr,$r=l.createContext(void 0);function Er(){const e=l.useContext($r);if(e===void 0)throw new Error("useTabsContext must be used within a Tabs component");return e}function ad(){return l.useContext($r)}function La({defaultValue:e,value:t,onValueChange:r,orientation:s="horizontal",activationMode:a="automatic",children:o}){const[i,c]=l.useState(e||""),u=t!==void 0,d=u?t:i,f=l.useCallback(m=>{u||c(m),r==null||r(m)},[u,r]),p={value:d,onValueChange:f,orientation:s,activationMode:a};return n.jsx($r.Provider,{value:p,children:o})}function _a(a){var o=a,{children:e,className:t="",variant:r="default"}=o,s=O(o,["children","className","variant"]);const{orientation:i}=Er(),c=l.useRef(null);l.useEffect(()=>{const f=c.current;if(!f)return;const p=m=>{var w;const h=Array.from(f.querySelectorAll('[role="tab"]:not([disabled])')),x=h.findIndex(g=>g===document.activeElement);if(x===-1)return;let y=x;i==="horizontal"?m.key==="ArrowRight"?(m.preventDefault(),y=(x+1)%h.length):m.key==="ArrowLeft"&&(m.preventDefault(),y=(x-1+h.length)%h.length):m.key==="ArrowDown"?(m.preventDefault(),y=(x+1)%h.length):m.key==="ArrowUp"&&(m.preventDefault(),y=(x-1+h.length)%h.length),m.key==="Home"?(m.preventDefault(),y=0):m.key==="End"&&(m.preventDefault(),y=h.length-1),y!==x&&((w=h[y])==null||w.focus())};return f.addEventListener("keydown",p),()=>f.removeEventListener("keydown",p)},[i]);const u=r==="compact"&&i==="vertical"?"flex":"inline-flex",d=k(i==="vertical"?"flex-col":"flex-row",E("xs","gap"));return n.jsx("div",P(T({ref:c,role:"tablist","aria-orientation":i,className:k(u,d,E("xs","p"),"bg-surface-muted",J("md"),t)},s),{children:e}))}function Pa(c){var u=c,{value:e,children:t,disabled:r=!1,className:s="",onClick:a,onKeyDown:o}=u,i=O(u,["value","children","disabled","className","onClick","onKeyDown"]);const{value:d,onValueChange:f,orientation:p,activationMode:m}=Er(),h=d===e,x=g=>{r||((m==="automatic"||h)&&f(e),a==null||a(g))},y=g=>{var j;m==="automatic"&&!r&&!h&&f(e),(j=i.onFocus)==null||j.call(i,g)},w=g=>{if(!r&&!(g.key==="ArrowRight"||g.key==="ArrowLeft"||g.key==="ArrowDown"||g.key==="ArrowUp"||g.key==="Home"||g.key==="End")){if(m==="manual"&&(g.key==="Enter"||g.key===" ")){g.preventDefault(),f(e);return}o==null||o(g)}};return n.jsx("button",P(T({type:"button",role:"tab","aria-selected":h,"aria-controls":`tabpanel-${e}`,id:`tab-${e}`,tabIndex:r?-1:h?0:-1,disabled:r,onClick:x,onFocus:y,onKeyDown:w,className:k("inline-flex","items-center","justify-center",E("sm","px"),E("xs","py"),re("bodySmall"),Pe("label"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",J("sm"),h?k("bg-surface-brand-strong","text-fg-inverse"):k("text-fg-secondary","hover:bg-surface-active"),r?"opacity-50 cursor-not-allowed":"cursor-pointer",s)},i),{children:t}))}function za(o){var i=o,{value:e,children:t,forceMount:r=!1,className:s=""}=i,a=O(i,["value","children","forceMount","className"]);const{value:c}=Er(),u=c===e;return!u&&!r?null:n.jsx("div",P(T({role:"tabpanel",id:`tabpanel-${e}`,"aria-labelledby":`tab-${e}`,hidden:!u,className:`
|
|
193
193
|
mt-2
|
|
194
194
|
focus:outline-none
|
|
195
195
|
${s}
|
|
196
|
-
`},a),{children:t}))}function Mr(r){var s=r,{children:e}=s,t=O(s,["children"]);return n.jsx(
|
|
196
|
+
`},a),{children:t}))}function Mr(r){var s=r,{children:e}=s,t=O(s,["children"]);return n.jsx(La,P(T({},t),{children:e}))}Mr.List=_a;Mr.Trigger=Pa;Mr.Content=za;const od=Mr,Tr=l.forwardRef(function(m,p){var h=m,{onSearch:t,onClear:r,loading:s=!1,showClearButton:a=!0,debounceMs:o=300,value:i,defaultValue:c,onChange:u,className:d=""}=h,f=O(h,["onSearch","onClear","loading","showClearButton","debounceMs","value","defaultValue","onChange","className"]);const[x,y]=l.useState(typeof c=="string"?c:""),[w,g]=l.useState(null),j=i!==void 0,C=j?i:x,b=C!=null&&String(C).length>0,v=S=>{const M=S.target.value;j||y(M),u==null||u(S),w&&clearTimeout(w);const F=setTimeout(()=>{t==null||t(M)},o);g(F)},N=()=>{j||y("");const S={target:{value:""},currentTarget:{value:""}};u==null||u(S),r==null||r(),t==null||t("")},_=S=>{var M;S.key==="Enter"&&t&&t(String(C||"")),(M=f.onKeyDown)==null||M.call(f,S)};return n.jsx("div",{className:k("relative",d),children:n.jsx(Se,P(T({ref:p},f),{type:"search",value:C,onChange:v,onKeyDown:_,leftIcon:s?n.jsx("div",{className:"animate-spin",children:n.jsx(as,{className:"h-4 w-4"})}):n.jsx(as,{className:"h-4 w-4"}),rightIcon:a&&b&&!s?n.jsx(Z,{variant:"ghost",size:"sm",onClick:N,className:"h-auto p-1","aria-label":"Clear search",children:n.jsx(Ne,{className:"h-4 w-4"})}):void 0,className:k(E("lg","pr"))}))})});Tr.displayName="SearchInput";const $s=l.forwardRef(function({option:t,isHighlighted:r,onSelect:s},a){const o=()=>{t.disabled||s(t)};return n.jsxs("div",{ref:a,role:"option","aria-selected":r,"aria-disabled":t.disabled,onClick:o,className:`
|
|
197
197
|
flex
|
|
198
198
|
items-center
|
|
199
199
|
gap-2
|
|
@@ -209,7 +209,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
209
209
|
${ue("popover")}
|
|
210
210
|
bg-surface-overlay
|
|
211
211
|
${J("md")}
|
|
212
|
-
${
|
|
212
|
+
${$e("lg")}
|
|
213
213
|
border
|
|
214
214
|
border-line-default
|
|
215
215
|
max-h-60
|
|
@@ -234,17 +234,17 @@ React keys must be passed directly to JSX without using spread:
|
|
|
234
234
|
hover:bg-surface-hover
|
|
235
235
|
border-b
|
|
236
236
|
border-line-default
|
|
237
|
-
`,onClick:u?f:d,children:u?"Deselect All":"Select All"}),t.map((y,k)=>n.jsx($s,{option:y,isHighlighted:k===r,onSelect:s},y.value))]})});return typeof window!="undefined"?Ue.createPortal(x,document.body):null});Ar.displayName="AutocompleteList";const Oa=l.forwardRef(function({options:t,value:r,defaultValue:s,onChange:a,onSelect:o,placeholder:i="Type to search...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",debounceMs:f=300,filterOptions:p,className:m="",inputClassName:h="",size:x="md"},y){const[k,g]=l.useState(typeof s=="string"?s:""),[j,C]=l.useState(!1),[b,v]=l.useState(-1),[N,_]=l.useState(""),S=l.useRef(null),M=l.useRef(null),F=l.useRef(null),A=l.useRef(null),R=r!==void 0,I=R?r:k,z=N.trim()?p?p(t,N):t.filter(D=>D.label.toLowerCase().includes(N.toLowerCase())):t,Y=z.length>0,q=D=>{const B=D.target.value;_(B),R||g(B),a==null||a(B),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{C(!0),v(-1)},f)},W=D=>{var B;D.disabled||(R||g(D.value),_(D.label),C(!1),v(-1),a==null||a(D.value),o==null||o(D),(B=M.current)==null||B.focus())},ae=D=>{if(!j||z.length===0){(D.key==="ArrowDown"||D.key==="Enter")&&C(!0);return}switch(D.key){case"ArrowDown":D.preventDefault(),v(B=>B<z.length-1?B+1:0);break;case"ArrowUp":D.preventDefault(),v(B=>B>0?B-1:z.length-1);break;case"Enter":D.preventDefault(),b>=0&&b<z.length&&W(z[b]);break;case"Escape":D.preventDefault(),C(!1),v(-1);break}};l.useEffect(()=>{if(!j)return;const D=B=>{S.current&&!S.current.contains(B.target)&&(C(!1),v(-1))};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[j]),l.useEffect(()=>{if(b>=0&&F.current){const D=F.current.querySelectorAll('[role="option"]');D[b]&&typeof D[b].scrollIntoView=="function"&&D[b].scrollIntoView({block:"nearest",behavior:"smooth"})}},[b]),l.useEffect(()=>{if(I){const D=t.find(B=>B.value===I);_(D?D.label:I)}else _("")},[I,t]);const se=j&&(Y||c||d);return n.jsxs("div",{ref:S,className:`relative ${m}`,children:[n.jsx(ke,{ref:M||y,value:N,onChange:q,onKeyDown:ae,onFocus:()=>C(!0),placeholder:i,disabled:u,size:x,rightIcon:c?n.jsx(fa,{className:"h-4 w-4 animate-spin"}):n.jsx(hs,{className:`h-4 w-4 transition-transform ${j?"rotate-180":""}`}),className:h}),se&&n.jsx(Ar,{ref:F,options:z,highlightedIndex:b,onSelect:W,loading:c,emptyMessage:d,containerRef:S})]})});Oa.displayName="Autocomplete";const Va=l.forwardRef(function({options:t,value:r,defaultValue:s=[],onChange:a,onSelect:o,placeholder:i="Select options...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",maxSelected:f,showSelectAll:p=!1,className:m="",inputClassName:h="",size:x="md"},y){const[k,g]=l.useState(s),[j,C]=l.useState(!1),[b,v]=l.useState(-1),[N,_]=l.useState(""),S=l.useRef(null),M=l.useRef(null),F=l.useRef(null),A=r!==void 0,R=A?r:k,I=t.filter(H=>R.includes(H.value)),z=(()=>{let H=t;return N.trim()&&(H=t.filter(U=>U.label.toLowerCase().includes(N.toLowerCase()))),H})(),Y=z.length>0,q=H=>{const U=H.target.value;_(U),C(!0),v(-1)},W=H=>{if(H.disabled||f&&R.length>=f&&!R.includes(H.value))return;const U=R.includes(H.value)?R.filter(V=>V!==H.value):[...R,H.value];A||g(U),a==null||a(U),o==null||o(t.filter(V=>U.includes(V.value))),_("")},ae=()=>{const H=z.filter(V=>!V.disabled).map(V=>V.value),U=[...new Set([...R,...H])];A||g(U),a==null||a(U),o==null||o(t.filter(V=>U.includes(V.value)))},se=()=>{const H=z.map(V=>V.value),U=R.filter(V=>!H.includes(V));A||g(U),a==null||a(U),o==null||o(t.filter(V=>U.includes(V.value)))},D=H=>{const U=R.filter(V=>V!==H);A||g(U),a==null||a(U),o==null||o(t.filter(V=>U.includes(V.value)))},B=H=>{if(!j||z.length===0){(H.key==="ArrowDown"||H.key==="Enter")&&C(!0),H.key==="Backspace"&&N===""&&R.length>0&&D(R[R.length-1]);return}switch(H.key){case"ArrowDown":H.preventDefault(),v(U=>U<z.length-1?U+1:0);break;case"ArrowUp":H.preventDefault(),v(U=>U>0?U-1:z.length-1);break;case"Enter":H.preventDefault(),b>=0&&b<z.length&&W(z[b]);break;case"Escape":H.preventDefault(),C(!1),v(-1);break}};l.useEffect(()=>{if(!j)return;const H=U=>{S.current&&!S.current.contains(U.target)&&(C(!1),v(-1),_(""))};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[j]);const X=z.filter(H=>!H.disabled).every(H=>R.includes(H.value)),Q=j&&(Y||c||d);return n.jsxs("div",{ref:S,className:w("relative",m),children:[n.jsxs("div",{className:w("flex","flex-wrap",E("sm","gap"),E("sm","p"),"border","border-line-default",J("md"),"min-h-10","focus-within:outline-none","focus-within:ring-2","focus-within:ring-offset-2","focus-within:border-line-brand","focus-within:ring-line-brand"),children:[I.map(H=>n.jsx(ws,{onRemove:()=>D(H.value),size:x==="sm"?"sm":x==="lg"?"lg":"md",children:H.label},H.value)),n.jsx("input",{ref:H=>{typeof y=="function"?y(H):y&&(y.current=H),M.current=H},type:"text",value:N,onChange:q,onKeyDown:B,onFocus:()=>C(!0),placeholder:R.length===0?i:"",disabled:u,className:w("flex-1","min-w-32","outline-none","bg-transparent",h)})]}),Q&&n.jsx(Ar,{ref:F,options:z.map(H=>P(T({},H),{icon:R.includes(H.value)?n.jsx(ns,{className:w("h-4","w-4","text-fg-brand")}):H.icon})),highlightedIndex:b,onSelect:W,loading:c,emptyMessage:d,containerRef:S,showSelectAll:p&&z.length>0,allSelected:X,onSelectAll:ae,onDeselectAll:se})]})});Va.displayName="MultiSelect";function id({value:e,defaultValue:t=0,max:r=5,size:s="md",variant:a="filled",readOnly:o=!1,allowHalf:i=!1,showValue:c=!1,onChange:u,onHover:d,className:f="",icon:p,emptyIcon:m}){const[h,x]=l.useState(t),[y,k]=l.useState(null),g=e!==void 0,j=y!=null?y:g?e:h,C={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},b=S=>{o||(g||x(S),u==null||u(S))},v=S=>{o||(k(S),d==null||d(S))},N=()=>{o||k(null)},_=S=>{const M=S+1,F=i&&j>=M-.5&&j<M,A=j>=M,R=w(C[s],he("base"),!o&&"cursor-pointer",A||F?"text-fg-warning":"text-fg-disabled"),I=p||n.jsx(jt,{className:R,fill:A?"currentColor":"none"}),L=m||n.jsx(jt,{className:R,fill:"none"});return n.jsx("span",{className:"relative inline-block",onClick:()=>b(M),onMouseEnter:()=>v(M),onMouseLeave:N,role:o?void 0:"button",tabIndex:o?void 0:0,"aria-label":o?void 0:`Rate ${M} out of ${r}`,onKeyDown:z=>{!o&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),b(M))},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(jt,{className:R,fill:"currentColor"}):I}),a==="filled"?n.jsx(jt,{className:R,fill:"none"}):L]}):A?a==="filled"?n.jsx(jt,{className:R,fill:"currentColor"}):I:a==="filled"?n.jsx(jt,{className:R,fill:"none"}):L},S)};return n.jsxs("div",{className:w("inline-flex","items-center",E("xs","gap"),f),children:[n.jsx("div",{className:w("flex","items-center"),role:o?"img":void 0,"aria-label":o?`Rating: ${j} out of ${r}`:void 0,children:Array.from({length:r},(S,M)=>_(M))}),c&&n.jsxs("span",{className:w(E("sm","ml"),ve("sm"),"text-fg-secondary"),children:[j.toFixed(i?1:0),"/",r]})]})}function ld({accept:e,multiple:t=!1,maxSize:r,maxFiles:s,onFilesChange:a,onFileRemove:o,showPreview:i=!0,showProgress:c=!1,disabled:u=!1,className:d="",label:f,description:p}){const[m,h]=l.useState([]),[x,y]=l.useState(!1),k=l.useRef(null),g=A=>{if(A===0)return"0 Bytes";const R=1024,I=["Bytes","KB","MB","GB"],L=Math.floor(Math.log(A)/Math.log(R));return Math.round(A/Math.pow(R,L)*100)/100+" "+I[L]},j=A=>r&&A.size>r?`File size exceeds ${g(r)}`:null,C=A=>{const R=Array.from(A),I=[];return R.forEach(L=>{const z=j(L),Y=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,q={file:L,id:Y,error:z,progress:c?0:void 0};if(i&&L.type.startsWith("image/")){const W=new FileReader;W.onload=ae=>{h(se=>se.map(D=>{var B;return D.id===Y?P(T({},D),{preview:(B=ae.target)==null?void 0:B.result}):D}))},W.readAsDataURL(L)}I.push(q)}),I},b=A=>{const R=t?[...m,...A]:A,I=s?R.slice(0,s):R;h(I),a==null||a(I)},v=A=>{if(A.preventDefault(),y(!1),u)return;const R=A.dataTransfer.files;if(R.length>0){const I=C(R);b(I)}},N=A=>{A.preventDefault(),u||y(!0)},_=A=>{A.preventDefault(),y(!1)},S=A=>{if(A.target.files&&A.target.files.length>0){const R=C(A.target.files);b(R)}k.current&&(k.current.value="")},M=A=>{const R=m.filter(I=>I.id!==A);h(R),a==null||a(R),o==null||o(A)},F=()=>{var A;u||(A=k.current)==null||A.click()};return n.jsxs("div",{className:w(E("lg","gap"),"flex","flex-col",d),children:[(f||p)&&n.jsxs("div",{children:[f&&n.jsx("label",{className:w("block",ve("sm"),Et("medium"),"text-fg-primary",E("xs","mb")),children:f}),p&&n.jsx("p",{className:w(ve("sm"),"text-fg-secondary"),children:p})]}),n.jsxs("div",{onDrop:v,onDragOver:N,onDragLeave:_,onClick:F,className:w("relative","border-2","border-dashed",x?"border-line-brand":"border-line-default",J("lg"),E("lg","p"),"text-center","cursor-pointer",he("base"),"focus:border-line-focus",u?"opacity-50 cursor-not-allowed":w("hover:border-line-strong","focus:outline-none","focus:ring-2","focus:ring-offset-2")),role:"button",tabIndex:u?-1:0,"aria-label":"Upload files","aria-disabled":u,children:[n.jsx("input",{ref:k,type:"file",accept:e,multiple:t,onChange:S,disabled:u,className:"hidden"}),n.jsxs("div",{className:w("flex","flex-col","items-center",E("sm","gap")),children:[n.jsx(hc,{className:w("h-8","w-8",x?"text-fg-brand":"text-fg-secondary")}),n.jsxs("div",{children:[n.jsx("span",{className:w(ve("sm"),Et("medium"),"text-fg-primary"),children:x?"Drop files here":"Click to upload or drag and drop"}),e&&n.jsxs("p",{className:w(ve("xs"),"text-fg-secondary",E("xs","mt")),children:["Accepted: ",e]}),r&&n.jsxs("p",{className:w(ve("xs"),"text-fg-secondary"),children:["Max size: ",g(r)]})]})]})]}),m.length>0&&n.jsx("div",{className:w("flex","flex-col",E("sm","gap")),children:m.map(A=>n.jsxs("div",{className:w("flex","items-center",E("md","gap"),E("base","p"),"border","border-line-default",J("md"),A.error?"bg-error-bg":"bg-surface-muted"),children:[i&&A.preview?n.jsx("img",{src:A.preview,alt:A.file.name,className:w("w-12","h-12","object-cover",J("md"))}):n.jsx(Xl,{className:w("h-8","w-8","text-fg-secondary")}),n.jsxs("div",{className:w("flex-1","min-w-0"),children:[n.jsx("p",{className:w(ve("sm"),Et("medium"),"text-fg-primary","truncate"),children:A.file.name}),n.jsx("p",{className:w(ve("xs"),"text-fg-secondary"),children:g(A.file.size)}),A.error&&n.jsxs("div",{className:w("flex","items-center",E("xs","gap"),E("xs","mt")),children:[n.jsx(bs,{className:w("h-3","w-3","text-fg-error")}),n.jsx("span",{className:w(ve("xs"),"text-fg-error"),children:A.error})]}),c&&A.progress!==void 0&&n.jsx("div",{className:w(E("sm","mt")),children:n.jsx(vs,{value:A.progress,size:"sm"})})]}),!A.error&&!c&&n.jsx(dr,{className:w("h-5","w-5","text-fg-success")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:R=>{R.stopPropagation(),M(A.id)},className:"h-auto p-1","aria-label":`Remove ${A.file.name}`,children:n.jsx(we,{className:"h-4 w-4"})})]},A.id))})]})}function Es({trigger:e,children:t,open:r,defaultOpen:s=!1,onOpenChange:a,placement:o="bottom",showCloseButton:i=!1,title:c,closeOnClickOutside:u=!0,closeOnEscape:d=!0,className:f="",triggerClassName:p="",contentClassName:m=""}){const[h,x]=l.useState(s),y=l.useRef(null),k=l.useRef(null),[g,j]=l.useState({top:0,left:0}),C=r!==void 0,b=C?r:h,v=l.useCallback(()=>{if(!y.current||!k.current)return;const M=y.current.getBoundingClientRect(),F=k.current.getBoundingClientRect(),A=window.scrollY,R=window.scrollX;let I=0,L=0;o.startsWith("top")?(I=M.top+A-F.height-8,o==="top-start"?L=M.left+R:o==="top-end"?L=M.right+R-F.width:L=M.left+R+(M.width-F.width)/2):o.startsWith("bottom")?(I=M.bottom+A+8,o==="bottom-start"?L=M.left+R:o==="bottom-end"?L=M.right+R-F.width:L=M.left+R+(M.width-F.width)/2):o.startsWith("left")?(L=M.left+R-F.width-8,o==="left-start"?I=M.top+A:o==="left-end"?I=M.bottom+A-F.height:I=M.top+A+(M.height-F.height)/2):o.startsWith("right")&&(L=M.right+R+8,o==="right-start"?I=M.top+A:o==="right-end"?I=M.bottom+A-F.height:I=M.top+A+(M.height-F.height)/2);const z=8;I=Math.max(z,Math.min(I,window.innerHeight+A-F.height-z)),L=Math.max(z,Math.min(L,window.innerWidth+R-F.width-z)),j({top:I,left:L})},[o]);l.useEffect(()=>{if(b){v();const M=()=>v(),F=()=>v();return window.addEventListener("resize",M),window.addEventListener("scroll",F,!0),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",F,!0)}}},[b,o,v]),l.useEffect(()=>{b&&k.current&&setTimeout(v,0)},[b,v]);const N=l.useCallback(M=>{C||x(M),a==null||a(M)},[C,a]),_=l.useCallback(()=>{N(!1)},[N]);l.useEffect(()=>{if(b&&d){const M=F=>{F.key==="Escape"&&_()};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)}},[b,d,_]),l.useEffect(()=>{if(b&&u){const M=F=>{k.current&&y.current&&!k.current.contains(F.target)&&!y.current.contains(F.target)&&_()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)}},[b,u,_]);const S=b?n.jsxs("div",{ref:k,className:`
|
|
237
|
+
`,onClick:u?f:d,children:u?"Deselect All":"Select All"}),t.map((y,w)=>n.jsx($s,{option:y,isHighlighted:w===r,onSelect:s},y.value))]})});return typeof window!="undefined"?qe.createPortal(x,document.body):null});Ar.displayName="AutocompleteList";const Oa=l.forwardRef(function({options:t,value:r,defaultValue:s,onChange:a,onSelect:o,placeholder:i="Type to search...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",debounceMs:f=300,filterOptions:p,className:m="",inputClassName:h="",size:x="md"},y){const[w,g]=l.useState(typeof s=="string"?s:""),[j,C]=l.useState(!1),[b,v]=l.useState(-1),[N,_]=l.useState(""),S=l.useRef(null),M=l.useRef(null),F=l.useRef(null),R=l.useRef(null),D=r!==void 0,I=D?r:w,V=N.trim()?p?p(t,N):t.filter(L=>L.label.toLowerCase().includes(N.toLowerCase())):t,Y=V.length>0,H=L=>{const B=L.target.value;_(B),D||g(B),a==null||a(B),R.current&&clearTimeout(R.current),R.current=setTimeout(()=>{C(!0),v(-1)},f)},W=L=>{var B;L.disabled||(D||g(L.value),_(L.label),C(!1),v(-1),a==null||a(L.value),o==null||o(L),(B=M.current)==null||B.focus())},ie=L=>{if(!j||V.length===0){(L.key==="ArrowDown"||L.key==="Enter")&&C(!0);return}switch(L.key){case"ArrowDown":L.preventDefault(),v(B=>B<V.length-1?B+1:0);break;case"ArrowUp":L.preventDefault(),v(B=>B>0?B-1:V.length-1);break;case"Enter":L.preventDefault(),b>=0&&b<V.length&&W(V[b]);break;case"Escape":L.preventDefault(),C(!1),v(-1);break}};l.useEffect(()=>{if(!j)return;const L=B=>{S.current&&!S.current.contains(B.target)&&(C(!1),v(-1))};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[j]),l.useEffect(()=>{if(b>=0&&F.current){const L=F.current.querySelectorAll('[role="option"]');L[b]&&typeof L[b].scrollIntoView=="function"&&L[b].scrollIntoView({block:"nearest",behavior:"smooth"})}},[b]),l.useEffect(()=>{if(I){const L=t.find(B=>B.value===I);_(L?L.label:I)}else _("")},[I,t]);const ne=j&&(Y||c||d);return n.jsxs("div",{ref:S,className:`relative ${m}`,children:[n.jsx(Se,{ref:M||y,value:N,onChange:H,onKeyDown:ie,onFocus:()=>C(!0),placeholder:i,disabled:u,size:x,rightIcon:c?n.jsx(fa,{className:"h-4 w-4 animate-spin"}):n.jsx(hs,{className:`h-4 w-4 transition-transform ${j?"rotate-180":""}`}),className:h}),ne&&n.jsx(Ar,{ref:F,options:V,highlightedIndex:b,onSelect:W,loading:c,emptyMessage:d,containerRef:S})]})});Oa.displayName="Autocomplete";const Va=l.forwardRef(function({options:t,value:r,defaultValue:s=[],onChange:a,onSelect:o,placeholder:i="Select options...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",maxSelected:f,showSelectAll:p=!1,className:m="",inputClassName:h="",size:x="md",label:y},w){const g=l.useId(),[j,C]=l.useState(s),[b,v]=l.useState(!1),[N,_]=l.useState(-1),[S,M]=l.useState(""),F=l.useRef(null),R=l.useRef(null),D=l.useRef(null),I=r!==void 0,A=I?r:j,V=t.filter(z=>A.includes(z.value)),H=(()=>{let z=t;return S.trim()&&(z=t.filter(U=>U.label.toLowerCase().includes(S.toLowerCase()))),z})(),W=H.length>0,ie=z=>{const U=z.target.value;M(U),v(!0),_(-1)},ne=z=>{if(z.disabled||f&&A.length>=f&&!A.includes(z.value))return;const U=A.includes(z.value)?A.filter(X=>X!==z.value):[...A,z.value];I||C(U),a==null||a(U),o==null||o(t.filter(X=>U.includes(X.value))),M("")},L=()=>{const z=H.filter(X=>!X.disabled).map(X=>X.value),U=[...new Set([...A,...z])];I||C(U),a==null||a(U),o==null||o(t.filter(X=>U.includes(X.value)))},B=()=>{const z=H.map(X=>X.value),U=A.filter(X=>!z.includes(X));I||C(U),a==null||a(U),o==null||o(t.filter(X=>U.includes(X.value)))},K=z=>{const U=A.filter(X=>X!==z);I||C(U),a==null||a(U),o==null||o(t.filter(X=>U.includes(X.value)))},Q=z=>{if(!b||H.length===0){(z.key==="ArrowDown"||z.key==="Enter")&&v(!0),z.key==="Backspace"&&S===""&&A.length>0&&K(A[A.length-1]);return}switch(z.key){case"ArrowDown":z.preventDefault(),_(U=>U<H.length-1?U+1:0);break;case"ArrowUp":z.preventDefault(),_(U=>U>0?U-1:H.length-1);break;case"Enter":z.preventDefault(),N>=0&&N<H.length&&ne(H[N]);break;case"Escape":z.preventDefault(),v(!1),_(-1);break}};l.useEffect(()=>{if(!b)return;const z=U=>{F.current&&!F.current.contains(U.target)&&(v(!1),_(-1),M(""))};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[b]);const le=H.filter(z=>!z.disabled).every(z=>A.includes(z.value)),se=b&&(W||c||d);return n.jsxs("div",{ref:F,className:k("relative",m),children:[n.jsx("label",{htmlFor:g,className:k("block",E("sm","mb"),"text-sm","font-medium","text-fg-primary"),children:y}),n.jsxs("div",{className:k("flex","flex-wrap",E("sm","gap"),E("sm","p"),"border","border-line-default",J("md"),"min-h-10","focus-within:outline-none","focus-within:ring-2","focus-within:ring-offset-2","focus-within:border-line-brand","focus-within:ring-line-brand"),children:[V.map(z=>n.jsx(ws,{onRemove:()=>K(z.value),size:x==="sm"?"sm":x==="lg"?"lg":"md",children:z.label},z.value)),n.jsx("input",{id:g,ref:z=>{typeof w=="function"?w(z):w&&(w.current=z),R.current=z},type:"text",value:S,onChange:ie,onKeyDown:Q,onFocus:()=>v(!0),placeholder:A.length===0?i:"",disabled:u,className:k("flex-1","min-w-32","outline-none","bg-transparent",h)})]}),se&&n.jsx(Ar,{ref:D,options:H.map(z=>P(T({},z),{icon:A.includes(z.value)?n.jsx(ns,{className:k("h-4","w-4","text-fg-brand")}):z.icon})),highlightedIndex:N,onSelect:ne,loading:c,emptyMessage:d,containerRef:F,showSelectAll:p&&H.length>0,allSelected:le,onSelectAll:L,onDeselectAll:B})]})});Va.displayName="MultiSelect";function id({value:e,defaultValue:t=0,max:r=5,size:s="md",variant:a="filled",readOnly:o=!1,allowHalf:i=!1,showValue:c=!1,onChange:u,onHover:d,className:f="",icon:p,emptyIcon:m}){const[h,x]=l.useState(t),[y,w]=l.useState(null),g=e!==void 0,j=y!=null?y:g?e:h,C={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},b=S=>{o||(g||x(S),u==null||u(S))},v=S=>{o||(w(S),d==null||d(S))},N=()=>{o||w(null)},_=S=>{const M=S+1,F=i&&j>=M-.5&&j<M,R=j>=M,D=k(C[s],be("base"),!o&&"cursor-pointer",R||F?"text-fg-warning":"text-fg-disabled"),I=p||n.jsx(Nt,{className:D,fill:R?"currentColor":"none"}),A=m||n.jsx(Nt,{className:D,fill:"none"});return n.jsx("span",{className:"relative inline-block",onClick:()=>b(M),onMouseEnter:()=>v(M),onMouseLeave:N,role:o?void 0:"button",tabIndex:o?void 0:0,"aria-label":o?void 0:`Rate ${M} out of ${r}`,onKeyDown:V=>{!o&&(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),b(M))},children: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(Nt,{className:D,fill:"currentColor"}):I}),a==="filled"?n.jsx(Nt,{className:D,fill:"none"}):A]}):R?a==="filled"?n.jsx(Nt,{className:D,fill:"currentColor"}):I:a==="filled"?n.jsx(Nt,{className:D,fill:"none"}):A},S)};return n.jsxs("div",{className:k("inline-flex","items-center",E("xs","gap"),f),children:[n.jsx("div",{className:k("flex","items-center"),role:o?"img":void 0,"aria-label":o?`Rating: ${j} out of ${r}`:void 0,children:Array.from({length:r},(S,M)=>_(M))}),c&&n.jsxs("span",{className:k(E("sm","ml"),ye("sm"),"text-fg-secondary"),children:[j.toFixed(i?1:0),"/",r]})]})}function ld({accept:e,multiple:t=!1,maxSize:r,maxFiles:s,onFilesChange:a,onFileRemove:o,showPreview:i=!0,showProgress:c=!1,disabled:u=!1,className:d="",label:f,description:p}){const[m,h]=l.useState([]),[x,y]=l.useState(!1),w=l.useRef(null),g=R=>{if(R===0)return"0 Bytes";const D=1024,I=["Bytes","KB","MB","GB"],A=Math.floor(Math.log(R)/Math.log(D));return Math.round(R/Math.pow(D,A)*100)/100+" "+I[A]},j=R=>r&&R.size>r?`File size exceeds ${g(r)}`:null,C=R=>{const D=Array.from(R),I=[];return D.forEach(A=>{const V=j(A),Y=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,H={file:A,id:Y,error:V,progress:c?0:void 0};if(i&&A.type.startsWith("image/")){const W=new FileReader;W.onload=ie=>{h(ne=>ne.map(L=>{var B;return L.id===Y?P(T({},L),{preview:(B=ie.target)==null?void 0:B.result}):L}))},W.readAsDataURL(A)}I.push(H)}),I},b=R=>{const D=t?[...m,...R]:R,I=s?D.slice(0,s):D;h(I),a==null||a(I)},v=R=>{if(R.preventDefault(),y(!1),u)return;const D=R.dataTransfer.files;if(D.length>0){const I=C(D);b(I)}},N=R=>{R.preventDefault(),u||y(!0)},_=R=>{R.preventDefault(),y(!1)},S=R=>{if(R.target.files&&R.target.files.length>0){const D=C(R.target.files);b(D)}w.current&&(w.current.value="")},M=R=>{const D=m.filter(I=>I.id!==R);h(D),a==null||a(D),o==null||o(R)},F=()=>{var R;u||(R=w.current)==null||R.click()};return n.jsxs("div",{className:k(E("lg","gap"),"flex","flex-col",d),children:[(f||p)&&n.jsxs("div",{children:[f&&n.jsx("label",{className:k("block",ye("sm"),Mt("medium"),"text-fg-primary",E("xs","mb")),children:f}),p&&n.jsx("p",{className:k(ye("sm"),"text-fg-secondary"),children:p})]}),n.jsxs("div",{onDrop:v,onDragOver:N,onDragLeave:_,onClick:F,className:k("relative","border-2","border-dashed",x?"border-line-brand":"border-line-default",J("lg"),E("lg","p"),"text-center","cursor-pointer",be("base"),"focus:border-line-focus",u?"opacity-50 cursor-not-allowed":k("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:w,type:"file",accept:e,multiple:t,onChange:S,disabled:u,className:"hidden"}),n.jsxs("div",{className:k("flex","flex-col","items-center",E("sm","gap")),children:[n.jsx(hc,{className:k("h-8","w-8",x?"text-fg-brand":"text-fg-secondary")}),n.jsxs("div",{children:[n.jsx("span",{className:k(ye("sm"),Mt("medium"),"text-fg-primary"),children:x?"Drop files here":"Click to upload or drag and drop"}),e&&n.jsxs("p",{className:k(ye("xs"),"text-fg-secondary",E("xs","mt")),children:["Accepted: ",e]}),r&&n.jsxs("p",{className:k(ye("xs"),"text-fg-secondary"),children:["Max size: ",g(r)]})]})]})]}),m.length>0&&n.jsx("div",{className:k("flex","flex-col",E("sm","gap")),children:m.map(R=>n.jsxs("div",{className:k("flex","items-center",E("md","gap"),E("base","p"),"border","border-line-default",J("md"),R.error?"bg-error-bg":"bg-surface-muted"),children:[i&&R.preview?n.jsx("img",{src:R.preview,alt:R.file.name,className:k("w-12","h-12","object-cover",J("md"))}):n.jsx(Xl,{className:k("h-8","w-8","text-fg-secondary")}),n.jsxs("div",{className:k("flex-1","min-w-0"),children:[n.jsx("p",{className:k(ye("sm"),Mt("medium"),"text-fg-primary","truncate"),children:R.file.name}),n.jsx("p",{className:k(ye("xs"),"text-fg-secondary"),children:g(R.file.size)}),R.error&&n.jsxs("div",{className:k("flex","items-center",E("xs","gap"),E("xs","mt")),children:[n.jsx(bs,{className:k("h-3","w-3","text-fg-error")}),n.jsx("span",{className:k(ye("xs"),"text-fg-error"),children:R.error})]}),c&&R.progress!==void 0&&n.jsx("div",{className:k(E("sm","mt")),children:n.jsx(vs,{value:R.progress,size:"sm"})})]}),!R.error&&!c&&n.jsx(dr,{className:k("h-5","w-5","text-fg-success")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:D=>{D.stopPropagation(),M(R.id)},className:"h-auto p-1","aria-label":`Remove ${R.file.name}`,children:n.jsx(Ne,{className:"h-4 w-4"})})]},R.id))})]})}function Es({trigger:e,children:t,open:r,defaultOpen:s=!1,onOpenChange:a,placement:o="bottom",showCloseButton:i=!1,title:c,closeOnClickOutside:u=!0,closeOnEscape:d=!0,className:f="",triggerClassName:p="",contentClassName:m=""}){const[h,x]=l.useState(s),y=l.useRef(null),w=l.useRef(null),[g,j]=l.useState({top:0,left:0}),C=r!==void 0,b=C?r:h,v=l.useCallback(()=>{if(!y.current||!w.current)return;const M=y.current.getBoundingClientRect(),F=w.current.getBoundingClientRect(),R=window.scrollY,D=window.scrollX;let I=0,A=0;o.startsWith("top")?(I=M.top+R-F.height-8,o==="top-start"?A=M.left+D:o==="top-end"?A=M.right+D-F.width:A=M.left+D+(M.width-F.width)/2):o.startsWith("bottom")?(I=M.bottom+R+8,o==="bottom-start"?A=M.left+D:o==="bottom-end"?A=M.right+D-F.width:A=M.left+D+(M.width-F.width)/2):o.startsWith("left")?(A=M.left+D-F.width-8,o==="left-start"?I=M.top+R:o==="left-end"?I=M.bottom+R-F.height:I=M.top+R+(M.height-F.height)/2):o.startsWith("right")&&(A=M.right+D+8,o==="right-start"?I=M.top+R:o==="right-end"?I=M.bottom+R-F.height:I=M.top+R+(M.height-F.height)/2);const V=8;I=Math.max(V,Math.min(I,window.innerHeight+R-F.height-V)),A=Math.max(V,Math.min(A,window.innerWidth+D-F.width-V)),j({top:I,left:A})},[o]);l.useEffect(()=>{if(b){v();const M=()=>v(),F=()=>v();return window.addEventListener("resize",M),window.addEventListener("scroll",F,!0),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",F,!0)}}},[b,o,v]),l.useEffect(()=>{b&&w.current&&setTimeout(v,0)},[b,v]);const N=l.useCallback(M=>{C||x(M),a==null||a(M)},[C,a]),_=l.useCallback(()=>{N(!1)},[N]);l.useEffect(()=>{if(b&&d){const M=F=>{F.key==="Escape"&&_()};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)}},[b,d,_]),l.useEffect(()=>{if(b&&u){const M=F=>{w.current&&y.current&&!w.current.contains(F.target)&&!y.current.contains(F.target)&&_()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)}},[b,u,_]);const S=b?n.jsxs("div",{ref:w,className:`
|
|
238
238
|
absolute
|
|
239
239
|
${ue("popover")}
|
|
240
240
|
bg-surface-overlay
|
|
241
241
|
${J("lg")}
|
|
242
|
-
${
|
|
242
|
+
${$e("lg")}
|
|
243
243
|
border
|
|
244
244
|
border-line-default
|
|
245
245
|
min-w-48
|
|
246
246
|
max-w-96
|
|
247
|
-
${
|
|
247
|
+
${be("base")}
|
|
248
248
|
${m}
|
|
249
249
|
`,style:{top:`${g.top}px`,left:`${g.left}px`},role:"dialog","aria-modal":"false",children:[(c||i)&&n.jsxs("div",{className:`
|
|
250
250
|
flex
|
|
@@ -254,25 +254,25 @@ React keys must be passed directly to JSX without using spread:
|
|
|
254
254
|
${E("md","py")}
|
|
255
255
|
border-b
|
|
256
256
|
border-line-default
|
|
257
|
-
`,children:[c&&n.jsx("h3",{className:`${re("bodySmall")} ${
|
|
257
|
+
`,children:[c&&n.jsx("h3",{className:`${re("bodySmall")} ${Pe("h5")} text-fg-primary`,children:c}),i&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:_,className:"h-auto p-1","aria-label":"Close popover",children:n.jsx(Ne,{className:"h-4 w-4"})})]}),n.jsx("div",{className:`
|
|
258
258
|
${E("base","p")}
|
|
259
259
|
${c||i?"":E("md","p")}
|
|
260
|
-
`,children:t})]}):null;return n.jsxs("div",{className:`inline-block ${f}`,children:[n.jsx("div",{ref:y,className:p,onClick:()=>N(!b),children:e}),typeof window!="undefined"&&
|
|
260
|
+
`,children:t})]}):null;return n.jsxs("div",{className:`inline-block ${f}`,children:[n.jsx("div",{ref:y,className:p,onClick:()=>N(!b),children:e}),typeof window!="undefined"&&qe.createPortal(S,document.body)]})}function cd({value:e,defaultValue:t,format:r="24h",onChange:s,disabled:a=!1,label:o,error:i=!1,helperText:c,className:u=""}){const[d,f]=l.useState(t||""),[p,m]=l.useState(12),[h,x]=l.useState(0),[y,w]=l.useState("AM"),g=e!==void 0,j=g?e:d,C=l.useCallback(I=>{if(!I)return{hours:12,minutes:0,amPm:"AM"};if(r==="24h"){const[A,V]=I.split(":").map(Number);return{hours:A||12,minutes:V||0,amPm:"AM"}}else{const A=I.match(/(\d+):(\d+)\s*(AM|PM)/i);return A?{hours:parseInt(A[1]),minutes:parseInt(A[2]),amPm:A[3].toUpperCase()}:{hours:12,minutes:0,amPm:"AM"}}},[r]),b=(I,A,V)=>{if(r==="24h")return`${String(I).padStart(2,"0")}:${String(A).padStart(2,"0")}`;{const Y=V==="PM"&&I!==12?I+12:V==="AM"&&I===12?0:I;return`${String(Y===0?12:Y>12?Y-12:Y).padStart(2,"0")}:${String(A).padStart(2,"0")} ${V||"AM"}`}};l.useEffect(()=>{if(j){const I=C(j);m(I.hours),x(I.minutes),w(I.amPm)}},[j,C]);const v=I=>{const A=r==="24h"?Math.max(0,Math.min(23,I)):Math.max(1,Math.min(12,I));m(A);const V=b(A,h,r==="12h"?y:void 0);g||f(V),s==null||s(V)},N=I=>{const A=Math.max(0,Math.min(59,I));x(A);const V=b(p,A,r==="12h"?y:void 0);g||f(V),s==null||s(V)},_=()=>{const I=y==="AM"?"PM":"AM";w(I);const A=b(p,h,I);g||f(A),s==null||s(A)},S=()=>{if(r==="24h")v((p+1)%24);else{const I=p===12?1:p+1;v(I)}},M=()=>{if(r==="24h")v(p===0?23:p-1);else{const I=p===1?12:p-1;v(I)}},F=()=>{N((h+1)%60)},R=()=>{N(h===0?59:h-1)},D=n.jsx("div",{className:`${E("base","p")} min-w-48`,children:n.jsxs("div",{className:"flex items-center justify-center gap-4",children:[n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx(Z,{variant:"ghost",size:"sm",onClick:S,disabled:a,"aria-label":"Increment hours",children:"↑"}),n.jsx("div",{className:"text-2xl font-mono font-semibold w-12 text-center",children:String(p).padStart(2,"0")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:M,disabled:a,"aria-label":"Decrement hours",children:"↓"})]}),n.jsx("div",{className:"text-2xl font-semibold",children:":"}),n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx(Z,{variant:"ghost",size:"sm",onClick: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(Z,{variant:"ghost",size:"sm",onClick:R,disabled:a,"aria-label":"Decrement minutes",children:"↓"})]}),r==="12h"&&n.jsxs("div",{className:"flex flex-col gap-2 ml-2",children:[n.jsx(Z,{variant:y==="AM"?"primary":"outline",size:"sm",onClick:()=>_(),disabled:a,children:"AM"}),n.jsx(Z,{variant:y==="PM"?"primary":"outline",size:"sm",onClick:()=>_(),disabled:a,children:"PM"})]})]})});return n.jsx("div",{className:u,children:n.jsx(Es,{trigger:n.jsx(Se,{label:o,value:j||b(p,h,r==="12h"?y:void 0),readOnly:!0,disabled:a,error:i,helperText:c,leftIcon:n.jsx(Pl,{className:"h-4 w-4"}),className:"cursor-pointer"}),placement:"bottom-start",showCloseButton:!0,title:"Select Time",children:D})})}function dd({value:e,defaultValue:t="#000000",format:r="hex",onChange:s,presets:a,showInput:o=!0,disabled:i=!1,label:c,className:u=""}){const[d,f]=l.useState(t),[p,m]=l.useState({r:0,g:0,b:0}),h=e!==void 0,x=h?e:d,y=N=>{const _=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(N);return _?{r:parseInt(_[1],16),g:parseInt(_[2],16),b:parseInt(_[3],16)}:{r:0,g:0,b:0}},w=(N,_,S)=>"#"+[N,_,S].map(M=>{const F=M.toString(16);return F.length===1?"0"+F:F}).join("");l.useEffect(()=>{if(x){const N=y(x);m(N)}},[x]);const g=N=>{const _=N.target.value;(/^#[0-9A-F]{6}$/i.test(_)||_==="")&&(h||f(_),s==null||s(_),_&&m(y(_)))},j=(N,_)=>{const S=P(T({},p),{[N]:Math.max(0,Math.min(255,_))});m(S);const M=w(S.r,S.g,S.b);h||f(M),s==null||s(M)},b=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#808080","#ffa500"],v=n.jsxs("div",{className:`${E("base","p")} min-w-[280px]`,children:[n.jsx("div",{className:`
|
|
261
261
|
w-full
|
|
262
262
|
h-32
|
|
263
263
|
${J("md")}
|
|
264
|
-
${
|
|
264
|
+
${$e("sm")}
|
|
265
265
|
mb-4
|
|
266
266
|
border
|
|
267
267
|
border-line-default
|
|
268
|
-
`,style:{backgroundColor:x}}),n.jsxs("div",{className:"space-y-3 mb-4",children:[n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Red: ",p.r]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.r,onChange:N=>j("r",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Green: ",p.g]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.g,onChange:N=>j("g",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Blue: ",p.b]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.b,onChange:N=>j("b",parseInt(N.target.value)),disabled:i,className:"w-full"})]})]}),o&&n.jsx("div",{className:"mb-4",children:n.jsx(
|
|
268
|
+
`,style:{backgroundColor:x}}),n.jsxs("div",{className:"space-y-3 mb-4",children:[n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Red: ",p.r]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.r,onChange:N=>j("r",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Green: ",p.g]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.g,onChange:N=>j("g",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Blue: ",p.b]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.b,onChange:N=>j("b",parseInt(N.target.value)),disabled:i,className:"w-full"})]})]}),o&&n.jsx("div",{className:"mb-4",children:n.jsx(Se,{label:"Hex",value:x,onChange:g,disabled:i,placeholder:"#000000",className:"font-mono"})}),b.length>0&&n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-fg-secondary mb-2",children:"Presets"}),n.jsx("div",{className:"grid grid-cols-10 gap-1",children:b.map((N,_)=>n.jsx("button",{type:"button",onClick:()=>{i||(h||f(N),s==null||s(N),m(y(N)))},disabled:i,className:`
|
|
269
269
|
w-6
|
|
270
270
|
h-6
|
|
271
271
|
${J("sm")}
|
|
272
272
|
border
|
|
273
273
|
border-line-emphasis
|
|
274
274
|
hover:scale-110
|
|
275
|
-
${
|
|
275
|
+
${$e("sm")}
|
|
276
276
|
${x.toLowerCase()===N.toLowerCase()?"ring-2 ring-offset-1 ring-line-brand":""}
|
|
277
277
|
`,style:{backgroundColor:N},"aria-label":`Select color ${N}`},_))})]})]});return n.jsx("div",{className:u,children:n.jsx(Es,{trigger:n.jsxs("div",{className:"flex items-center gap-2",children:[c&&n.jsx("label",{className:"text-sm font-medium text-fg-secondary",children:c}),n.jsx("div",{className:`
|
|
278
278
|
w-10
|
|
@@ -280,15 +280,15 @@ React keys must be passed directly to JSX without using spread:
|
|
|
280
280
|
${J("md")}
|
|
281
281
|
border
|
|
282
282
|
border-line-emphasis
|
|
283
|
-
${
|
|
283
|
+
${$e("sm")}
|
|
284
284
|
cursor-pointer
|
|
285
285
|
${i?"opacity-50 cursor-not-allowed":""}
|
|
286
|
-
`,style:{backgroundColor:x}}),o&&n.jsx(
|
|
286
|
+
`,style:{backgroundColor:x}}),o&&n.jsx(Se,{value:x,onChange:g,disabled:i,placeholder:"#000000",className:"w-24 font-mono"})]}),placement:"bottom-start",showCloseButton:!0,title:"Pick a Color",children:v})})}const Wa=l.createContext(void 0);function ud({children:e,value:t}){return n.jsx(Wa.Provider,{value:t,children:e})}function fd(){const e=l.useContext(Wa);if(!e)throw new Error("Drawer components must be used within Drawer");return e}function Ms({children:e,className:t="",showCloseButton:r=!1}){const{isOpen:s,closeDrawer:a,position:o,size:i,closeOnOverlayClick:c,closeOnEscape:u}=fd();if(l.useEffect(()=>{if(s&&u){const m=h=>{h.key==="Escape"&&a()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)}},[s,u,a]),l.useEffect(()=>{if(s)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[s]),!s)return null;const d={sm:o==="left"||o==="right"?"w-64":"h-64",md:o==="left"||o==="right"?"w-96":"h-96",lg:o==="left"||o==="right"?"w-[32rem]":"h-[32rem]",xl:o==="left"||o==="right"?"w-[42rem]":"h-[42rem]",full:o==="left"||o==="right"?"w-full":"h-full"},f={left:"left-0 top-0 bottom-0",right:"right-0 top-0 bottom-0",top:"top-0 left-0 right-0",bottom:"bottom-0 left-0 right-0"},p=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`
|
|
287
287
|
fixed
|
|
288
288
|
inset-0
|
|
289
289
|
bg-scrim
|
|
290
290
|
${ue("modal")}
|
|
291
|
-
${
|
|
291
|
+
${be("base")}
|
|
292
292
|
${s?"opacity-100":"opacity-0"}
|
|
293
293
|
`,onClick:c?a:void 0,"aria-hidden":"true"}),n.jsxs("div",{className:`
|
|
294
294
|
fixed
|
|
@@ -296,9 +296,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
296
296
|
${d[i]}
|
|
297
297
|
${o==="left"||o==="right"?"max-w-[90vw]":"max-h-[90vh]"}
|
|
298
298
|
bg-surface-overlay
|
|
299
|
-
${
|
|
299
|
+
${$e("xl")}
|
|
300
300
|
${ue("modal")}
|
|
301
|
-
${
|
|
301
|
+
${be("base")}
|
|
302
302
|
flex
|
|
303
303
|
flex-col
|
|
304
304
|
${t}
|
|
@@ -308,7 +308,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
308
308
|
${E("sm","p")}
|
|
309
309
|
border-b
|
|
310
310
|
border-line-default
|
|
311
|
-
`,children:n.jsx(Z,{variant:"ghost",size:"sm",onClick:a,className:"h-auto p-1","aria-label":"Close drawer",children:n.jsx(
|
|
311
|
+
`,children:n.jsx(Z,{variant:"ghost",size:"sm",onClick:a,className:"h-auto p-1","aria-label":"Close drawer",children:n.jsx(Ne,{className:"h-4 w-4"})})}),e]})]});return typeof window!="undefined"?qe.createPortal(p,document.body):null}function Ha(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",P(T({className:`
|
|
312
312
|
${E("lg","p")}
|
|
313
313
|
border-b
|
|
314
314
|
border-line-default
|
|
@@ -321,18 +321,18 @@ React keys must be passed directly to JSX without using spread:
|
|
|
321
321
|
justify-end
|
|
322
322
|
${E("sm","gap")}
|
|
323
323
|
${t}
|
|
324
|
-
`},r),{children:e}))}function Gt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,position:a="right",size:o="md",closeOnOverlayClick:i=!0,closeOnEscape:c=!0}){const[u,d]=l.useState(r),f=t!==void 0,p=f?t:u,m=x=>{f||d(x),s==null||s(x)},h=()=>{m(!1)};return n.jsx(ud,{value:{isOpen:p,closeDrawer:h,position:a,size:o,closeOnOverlayClick:i,closeOnEscape:c},children:e})}Gt.Content=Ms;Gt.Header=Ha;Gt.Footer=Ba;const Ua=l.createContext(void 0);function md({children:e,value:t}){return n.jsx(Ua.Provider,{value:t,children:e})}function Ts(){const e=l.useContext(Ua);if(!e)throw new Error("Menu components must be used within Menu");return e}const As=l.forwardRef(function(i,o){var c=i,{children:t,asChild:r=!1,onClick:s}=c,a=O(c,["children","asChild","onClick"]);const{isOpen:u,setIsOpen:d}=Ts(),f=p=>{s==null||s(p),r||d(!u)};return n.jsx("div",P(T({ref:o,onClick:f,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":u},a),{children:t}))});As.displayName="MenuTrigger";function qa({children:e,className:t="",align:r="start"}){const{isOpen:s,closeMenu:a,placement:o}=Ts(),i=l.useRef(null),c=l.useRef(null),[u,d]=l.useState({top:0,left:0});if(l.useEffect(()=>{if(s){const p=document.querySelector('[aria-haspopup="menu"]');c.current=p}},[s]),l.useEffect(()=>{if(s&&i.current&&c.current){const p=()=>{const x=c.current.getBoundingClientRect(),y=i.current.getBoundingClientRect(),
|
|
324
|
+
`},r),{children:e}))}function Gt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,position:a="right",size:o="md",closeOnOverlayClick:i=!0,closeOnEscape:c=!0}){const[u,d]=l.useState(r),f=t!==void 0,p=f?t:u,m=x=>{f||d(x),s==null||s(x)},h=()=>{m(!1)};return n.jsx(ud,{value:{isOpen:p,closeDrawer:h,position:a,size:o,closeOnOverlayClick:i,closeOnEscape:c},children:e})}Gt.Content=Ms;Gt.Header=Ha;Gt.Footer=Ba;const Ua=l.createContext(void 0);function md({children:e,value:t}){return n.jsx(Ua.Provider,{value:t,children:e})}function Ts(){const e=l.useContext(Ua);if(!e)throw new Error("Menu components must be used within Menu");return e}const As=l.forwardRef(function(i,o){var c=i,{children:t,asChild:r=!1,onClick:s}=c,a=O(c,["children","asChild","onClick"]);const{isOpen:u,setIsOpen:d}=Ts(),f=p=>{s==null||s(p),r||d(!u)};return n.jsx("div",P(T({ref:o,onClick:f,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":u},a),{children:t}))});As.displayName="MenuTrigger";function qa({children:e,className:t="",align:r="start"}){const{isOpen:s,closeMenu:a,placement:o}=Ts(),i=l.useRef(null),c=l.useRef(null),[u,d]=l.useState({top:0,left:0});if(l.useEffect(()=>{if(s){const p=document.querySelector('[aria-haspopup="menu"]');c.current=p}},[s]),l.useEffect(()=>{if(s&&i.current&&c.current){const p=()=>{const x=c.current.getBoundingClientRect(),y=i.current.getBoundingClientRect(),w=window.scrollY,g=window.scrollX;let j=0,C=0;o==="bottom"?(j=x.bottom+w+4,r==="start"?C=x.left+g:r==="end"?C=x.right+g-y.width:C=x.left+g+(x.width-y.width)/2):o==="top"?(j=x.top+w-y.height-4,r==="start"?C=x.left+g:r==="end"?C=x.right+g-y.width:C=x.left+g+(x.width-y.width)/2):o==="right"?(C=x.right+g+4,r==="start"?j=x.top+w:r==="end"?j=x.bottom+w-y.height:j=x.top+w+(x.height-y.height)/2):o==="left"&&(C=x.left+g-y.width-4,r==="start"?j=x.top+w:r==="end"?j=x.bottom+w-y.height:j=x.top+w+(x.height-y.height)/2);const b=8;j=Math.max(b,Math.min(j,window.innerHeight+w-y.height-b)),C=Math.max(b,Math.min(C,window.innerWidth+g-y.width-b)),d({top:j,left:C})};p();const m=()=>p(),h=()=>p();return window.addEventListener("resize",m),window.addEventListener("scroll",h,!0),()=>{window.removeEventListener("resize",m),window.removeEventListener("scroll",h,!0)}}},[s,o,r]),l.useEffect(()=>{if(s){const p=m=>{m.key==="Escape"&&a()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)}},[s,a]),l.useEffect(()=>{if(s){const p=m=>{i.current&&c.current&&!i.current.contains(m.target)&&!c.current.contains(m.target)&&a()};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)}},[s,a]),!s)return null;const f=n.jsx("div",{ref:i,role:"menu",className:`
|
|
325
325
|
absolute
|
|
326
326
|
${ue("popover")}
|
|
327
327
|
bg-surface-overlay
|
|
328
328
|
${J("md")}
|
|
329
|
-
${
|
|
329
|
+
${$e("lg")}
|
|
330
330
|
border
|
|
331
331
|
border-line-default
|
|
332
332
|
min-w-40
|
|
333
333
|
${E("xs","py")}
|
|
334
334
|
${t}
|
|
335
|
-
`,style:{top:`${u.top}px`,left:`${u.left}px`},children:e});return typeof window!="undefined"?
|
|
335
|
+
`,style:{top:`${u.top}px`,left:`${u.left}px`},children:e});return typeof window!="undefined"?qe.createPortal(f,document.body):null}const Rs=l.forwardRef(function(p,f){var m=p,{children:t,icon:r,rightIcon:s,disabled:a=!1,onClick:o,onSelect:i,hasSubmenu:c=!1,className:u=""}=m,d=O(m,["children","icon","rightIcon","disabled","onClick","onSelect","hasSubmenu","className"]);const{closeMenu:h}=Ts(),x=w=>{a||(o==null||o(w),i==null||i(w),!c&&!w.defaultPrevented&&h())},y=w=>{a||(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),x(w))};return n.jsxs("div",P(T({ref:f,role:"menuitem",tabIndex:a?-1:0,"aria-disabled":a,onClick:x,onKeyDown:y,className:`
|
|
336
336
|
flex
|
|
337
337
|
items-center
|
|
338
338
|
gap-2
|
|
@@ -347,7 +347,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
347
347
|
focus:outline-none
|
|
348
348
|
${a?"opacity-50 cursor-not-allowed":""}
|
|
349
349
|
${u}
|
|
350
|
-
`},d),{children:[r&&n.jsx("span",{className:"shrink-0",children:r}),n.jsx("span",{className:"flex-1",children:t}),c&&n.jsx(
|
|
350
|
+
`},d),{children:[r&&n.jsx("span",{className:"shrink-0",children:r}),n.jsx("span",{className:"flex-1",children:t}),c&&n.jsx(bt,{className:"h-4 w-4 text-fg-secondary shrink-0"}),s&&!c&&n.jsx("span",{className:"shrink-0",children:s})]}))});Rs.displayName="MenuItem";function Ga(r){var s=r,{className:e=""}=s,t=O(s,["className"]);return n.jsx("div",T({role:"separator",className:`
|
|
351
351
|
h-px
|
|
352
352
|
bg-line-default
|
|
353
353
|
${E("sm","my")}
|
|
@@ -368,22 +368,22 @@ React keys must be passed directly to JSX without using spread:
|
|
|
368
368
|
focus:ring-2
|
|
369
369
|
focus:ring-offset-2
|
|
370
370
|
focus:ring-line-focus
|
|
371
|
-
${
|
|
371
|
+
${be("base")}
|
|
372
372
|
${p?"opacity-50 cursor-not-allowed":"cursor-pointer"}
|
|
373
373
|
`,"aria-expanded":f,"aria-controls":`accordion-content-${d.id}`,"aria-disabled":p,children:[n.jsx("span",{children:d.title}),n.jsx(hs,{className:`
|
|
374
374
|
${E("sm","ml")}
|
|
375
|
-
${
|
|
375
|
+
${be("base")}
|
|
376
376
|
${f?"transform rotate-180":""}
|
|
377
377
|
${p?"opacity-50":""}
|
|
378
378
|
`,"aria-hidden":"true"})]}),n.jsx("div",{id:`accordion-content-${d.id}`,className:`
|
|
379
379
|
overflow-hidden
|
|
380
|
-
${
|
|
380
|
+
${be("base")}
|
|
381
381
|
${f?"max-h-[1000px] opacity-100":"max-h-0 opacity-0"}
|
|
382
382
|
`,"aria-hidden":!f,children:n.jsx("div",{className:`
|
|
383
383
|
${E("base","px")}
|
|
384
384
|
${E("md","py")}
|
|
385
385
|
text-fg-secondary
|
|
386
|
-
`,children:d.content})})]},d.id)})})}const Ka=l.createContext(void 0);function ls({children:e,mobileMenuOpen:t,onMobileMenuChange:r,defaultMobileMenuOpen:s=!1}){const[a,o]=l.useState(s),i=t!==void 0,c=i?t:a,u=l.useCallback(m=>{i||o(m),r==null||r(m)},[i,r]),d=l.useCallback(()=>{u(!c)},[c,u]),f=l.useCallback(()=>{u(!0)},[u]),p=l.useCallback(()=>{u(!1)},[u]);return n.jsx(Ka.Provider,{value:{isMobileMenuOpen:c,toggleMobileMenu:d,setMobileMenuOpen:u,openMobileMenu:f,closeMobileMenu:p},children:e})}function Is(){const e=l.useContext(Ka);if(!e)throw new Error("useHeaderContext must be used within HeaderProvider");return e}function Ya(s){var a=s,{children:e,className:t}=a,r=O(a,["children","className"]);return n.jsx("div",{className:"flex-shrink-0",children:n.jsx(xs,P(T({href:r.href||"/",variant:"default",className:w("flex items-center font-semibold text-lg",t)},r),{children:e}))})}function Xa({children:e,className:t}){return n.jsx("nav",{className:w("flex-1 flex items-center justify-center gap-4","hidden md:flex",t),"aria-label":"Main navigation",children:e})}function Ja({children:e,className:t}){return n.jsx("div",{className:w("flex-shrink-0 flex items-center gap-2",t),children:e})}function Za({className:e,icon:t,closeIcon:r,variant:s="ghost",size:a="md"}){const{isMobileMenuOpen:o,toggleMobileMenu:i}=Is(),c=t||n.jsx(ac,{className:"h-5 w-5"}),u=r||n.jsx(we,{className:"h-5 w-5"});return n.jsx(Z,{variant:s,size:a,onClick:i,className:w("md:hidden",e),"aria-label":o?"Close menu":"Open menu","aria-expanded":o,children:o?u:c})}function Qa({children:e,className:t}){const{isMobileMenuOpen:r,closeMobileMenu:s}=Is();return n.jsx(Gt,{open:r,onOpenChange:a=>{a||s()},position:"left",size:"sm",closeOnOverlayClick:!0,closeOnEscape:!0,children:n.jsx(Ms,{className:w("p-4",t),children:n.jsx("nav",{className:"flex flex-col gap-2","aria-label":"Mobile navigation",children:e})})})}const hd={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"},ot=l.forwardRef((u,c)=>{var d=u,{className:e,maxWidth:t="lg",paddingX:r="base",paddingY:s="base",center:a=!0,children:o}=d,i=O(d,["className","maxWidth","paddingX","paddingY","center","children"]);return n.jsx("div",P(T({ref:c,className:w("w-full",hd[t],E(r,"px"),E(s,"py"),a&&"mx-auto",e)},i),{children:o}))});ot.displayName="Container";const Tt=l.forwardRef((u,c)=>{var d=u,{className:e,spacing:t="base",align:r="stretch",justify:s="start",direction:a="column",children:o}=d,i=O(d,["className","spacing","align","justify","direction","children"]);const f=a==="column"?E(t,"gap-y"):E(t,"gap-x"),p={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},m={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsx("div",P(T({ref:c,className:w("flex",a==="column"?"flex-col":"flex-row",f,p[r],m[s],e)},i),{children:o}))});Tt.displayName="Stack";const bd=xe(w("w-full","bg-surface-base","transition-shadow","transition-colors"),{variants:{variant:{default:"",elevated:"shadow-sm",bordered:w("border-b","border-line-muted")}},defaultVariants:{variant:"default"}});function gt(c){var u=c,{children:e,variant:t="default",sticky:r=!1,maxWidth:s="full",bare:a=!1,className:o}=u,i=O(u,["children","variant","sticky","maxWidth","bare","className"]);const d=n.jsx("div",{className:"flex items-center justify-between gap-4",children:e});return a?n.jsx(ls,{children:n.jsx("div",P(T({className:w(o)},i),{children:d}))}):n.jsx(ls,{children:n.jsx("header",P(T({className:w(bd({variant:t}),r&&`sticky top-0 ${ue("sticky")}`,r&&"backdrop-blur-sm bg-surface-base/95",o)},i),{children:n.jsx(ot,{maxWidth:s,paddingX:"base",paddingY:"sm",children:d})}))})}gt.Logo=Ya;gt.Navigation=Xa;gt.Actions=Ja;gt.Hamburger=Za;gt.MobileMenu=Qa;const In=xe(w("flex","items-center","gap-2"),{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},variant:{default:"",pills:"",tabs:""}},defaultVariants:{orientation:"horizontal",variant:"default"},compoundVariants:[{orientation:"vertical",variant:"default",class:"items-stretch"},{orientation:"vertical",variant:"pills",class:"items-stretch"},{orientation:"vertical",variant:"tabs",class:"items-stretch"}]});function gd(u){var d=u,{items:e,orientation:t="horizontal",variant:r="default",className:s,"aria-label":a="Main navigation",bare:o=!1,pathname:i}=d,c=O(d,["items","orientation","variant","className","aria-label","bare","pathname"]);let f=i;if(!f)try{const h=typeof require!="undefined"?require("next/navigation"):null;if(h!=null&&h.usePathname){const x=h.usePathname;f=x()}}catch(h){f=void 0}const p=l.useMemo(()=>e.map(h=>{if(h.active!==void 0)return h;if(f){const x=f===h.href||h.href!=="/"&&f.startsWith(`${h.href}/`);return P(T({},h),{active:x})}return P(T({},h),{active:!1})}),[e,f]),m=n.jsx(n.Fragment,{children:p.map((h,x)=>{const y=r==="pills"?"background":r==="tabs"?"underline":"default";return n.jsxs(xs,{href:h.href,active:h.active,disabled:h.disabled,variant:y,className:w("flex items-center gap-2",t==="vertical"&&"w-full justify-start",h.className),children:[h.icon&&n.jsx("span",{className:"flex-shrink-0","aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.label}),h.badge&&n.jsx("span",{className:"ml-auto",children:h.badge})]},h.href||x)})});return o?n.jsx("div",P(T({className:w(In({orientation:t,variant:r}),s)},c),{children:m})):n.jsx("nav",P(T({className:w(In({orientation:t,variant:r}),s),"aria-label":a},c),{children:m}))}function eo(e){return n.jsx(gd,P(T({},e),{pathname:e.pathname}))}const xd=xe(w("w-full","flex","flex-col","gap-2"),{variants:{variant:{default:w(E("base","mb")),compact:w(E("sm","mb"))}},defaultVariants:{variant:"default"}});function to(c){var u=c,{title:e,description:t,breadcrumb:r,actions:s,variant:a="default",className:o}=u,i=O(u,["title","description","breadcrumb","actions","variant","className"]);return n.jsxs("div",P(T({className:w(xd({variant:a}),o)},i),{children:[r&&r.length>0&&n.jsx(Ma,{items:r}),n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx(Be,{variant:"heading",as:"h1",className:"mb-2 text-2xl font-bold",children:e}),t&&n.jsx(Be,{variant:"body",className:"text-fg-secondary",children:t})]}),s&&n.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:s})]})]}))}function vd(s){var a=s,{onForgotPasswordClick:e,className:t}=a,r=O(a,["onForgotPasswordClick","className"]);return n.jsx("div",{className:w(E("base","p"),"bg-surface-muted",J("md"),t),children:n.jsxs("form",P(T({},r),{onSubmit:o=>{o.preventDefault(),r.onSubmit&&r.onSubmit(o)},className:w("space-y-4",r.className),children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(Mt,{htmlFor:"login-email",variant:"required",children:"Your email"}),n.jsx(ke,{id:"login-email",placeholder:"myname@email.com",type:"email"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(Mt,{htmlFor:"login-password",variant:"required",children:"Your password"}),n.jsx(ke,{id:"login-password",placeholder:"••••••••",type:"password"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx(Z,{variant:"secondary",type:"button",onClick:e,children:"Forgot password?"}),n.jsx(Z,{variant:"regular",type:"submit",children:"Sign in"})]})]}))})}function yd(d){var f=d,{isOpen:e,onClose:t,title:r,children:s,variant:a="default",showCloseButton:o=!0,footer:i,className:c=""}=f,u=O(f,["isOpen","onClose","title","children","variant","showCloseButton","footer","className"]);const p=l.useRef(null),m=l.useRef(null);if(l.useEffect(()=>{if(!e)return;m.current=document.activeElement;const j=setTimeout(()=>{var b;(b=p.current)==null||b.focus()},0),C=b=>{b.key==="Escape"&&t()};return document.addEventListener("keydown",C),()=>{var b;clearTimeout(j),document.removeEventListener("keydown",C),(b=m.current)==null||b.focus()}},[e,t]),l.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const h=["fixed","inset-0",ue("modal"),"overflow-y-auto"],x=["fixed","inset-0","bg-scrim","transition-opacity"],k=["relative","bg-surface-overlay","rounded-lg","shadow-xl","my-8","mx-auto",{default:"max-w-md",large:"max-w-2xl",fullscreen:"max-w-full h-full"}[a],"p-6",c].filter(Boolean).join(" "),g=n.jsxs("div",{className:h.join(" "),role:"dialog","aria-modal":"true","aria-labelledby":r?"modal-title":void 0,onClick:j=>{j.target===j.currentTarget&&t()},children:[n.jsx("div",{className:x.join(" "),"aria-hidden":"true"}),n.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:n.jsxs("div",P(T({ref:p,tabIndex:-1,className:k,onClick:j=>j.stopPropagation()},u),{children:[r&&n.jsxs("div",{className:"flex justify-between items-center mb-4",children:[n.jsx("h2",{id:"modal-title",className:"text-xl font-semibold text-fg-primary",children:r}),o&&n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(we,{className:"h-6 w-6"})})]}),!r&&o&&n.jsx("div",{className:"flex justify-end mb-4",children:n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(we,{className:"h-6 w-6"})})}),n.jsx("div",{className:"mb-4",children:s}),i&&n.jsx("div",{className:"flex justify-end gap-2 mt-4",children:i})]}))})]});return typeof window!="undefined"?Ue.createPortal(g,document.body):g}const Rr=l.createContext(void 0);function Pe(){const e=l.useContext(Rr);if(e===void 0)throw new Error("useTableContext must be used within a Table component");return e}function wd(){const e=l.useContext(Rr);return e||void 0}function cs({columns:e,data:t,loading:r=!1,paginationMode:s,page:a,pageSize:o,total:i,onPageChange:c,onPageSizeChange:u,defaultPageSize:d=10,pageSizeOptions:f,sortColumn:p,sortDirection:m,onSort:h,defaultSortColumn:x,defaultSortDirection:y="asc",filters:k,filterValues:g,onFilter:j,initialFilterValues:C={},selectable:b=!1,selectedRows:v,onSelectionChange:N,rowId:_,actions:S,emptyMessage:M="No data available",emptyStateTitle:F,emptyStateMessage:A,emptyStateIllustration:R,emptyStateAction:I,onRowClick:L,resizable:z=!1,columnWidths:Y,onColumnResize:q,virtualScrolling:W,virtualScrollingOptions:ae,children:se}){const D=l.useMemo(()=>s||(i!==void 0&&c?"server":"client"),[s,i,c]),B=a!==void 0,[X,Q]=l.useState(1),[H,U]=l.useState(d),V=B?a:X,ne=o!=null?o:H,oe=l.useMemo(()=>D==="server"?i!=null?i:0:t.length,[D,i,t.length]),ie=l.useMemo(()=>Math.ceil(oe/ne),[oe,ne]),Ne=p!==void 0,[ze,Lt]=l.useState(x||""),[Ae,Ft]=l.useState(y),$e=Ne?p:ze,Xt=Ne?m||"asc":Ae,Vr=g!==void 0,[Eo,Mo]=l.useState(C),Jt=Vr?g:Eo,Wr=v!==void 0,[To,Ao]=l.useState([]),Re=Wr?v:To,Zt=l.useMemo(()=>!k||k.length===0?t:t.filter(ee=>k.every(de=>{const be=Jt[de.key];if(!be||be==="")return!0;const er=ee[de.key];return de.type==="text"?String(er||"").toLowerCase().includes(String(be).toLowerCase()):String(er)===String(be)})),[t,k,Jt]),Hr=l.useMemo(()=>{if(Ne&&h||!$e)return Zt;const ee=[...Zt];return ee.sort((de,be)=>{const er=de[$e],Lo=be[$e],un=String(er||"").localeCompare(String(Lo||""));return Xt==="asc"?un:-un}),ee},[Zt,$e,Xt,h,Ne]),Oe=l.useMemo(()=>{if(D==="server")return Hr;const ee=(V-1)*ne,de=ee+ne;return Hr.slice(ee,de)},[Hr,D,V,ne]),yt=l.useCallback((ee,de)=>{var be;return _?_(ee):((be=ee==null?void 0:ee.id)==null?void 0:be.toString())||de.toString()},[_]),Qt=l.useMemo(()=>!b||Oe.length===0?!1:Oe.every((ee,de)=>{const be=yt(ee,de);return Re.includes(be)}),[b,Oe,Re,yt]),rn=l.useMemo(()=>{if(!b)return!1;const ee=Re.length;return ee>0&&ee<Oe.length},[b,Re.length,Oe.length]),wt=l.useCallback(ee=>{B?c==null||c(ee):Q(ee)},[B,c]),sn=l.useCallback(ee=>{u?u(ee):U(ee),wt(1)},[u,wt]),nn=l.useCallback((ee,de)=>{Ne?h==null||h(ee,de):(Lt(ee),Ft(de))},[Ne,h]),an=l.useCallback(ee=>{Vr?j==null||j(ee):Mo(ee),wt(1)},[Vr,j,wt]),dt=l.useCallback(ee=>{Wr?N==null||N(ee):Ao(ee)},[Wr,N]),on=l.useCallback(ee=>{const de=Re.includes(ee)?Re.filter(be=>be!==ee):[...Re,ee];dt(de)},[Re,dt]),ln=l.useCallback(()=>{if(Qt)dt([]);else{const ee=Oe.map((de,be)=>yt(de,be));dt(ee)}},[Qt,Oe,yt,dt]),[Ro,Io]=l.useState({}),Br=Y!==void 0,cn=Br?Y:Ro,dn=l.useCallback((ee,de)=>{Br?q==null||q(ee,de):Io(be=>P(T({},be),{[ee]:de}))},[Br,q]),Do=l.useMemo(()=>({columns:e,data:t,paginatedData:Oe,loading:r,paginationState:{page:V,pageSize:ne,total:oe,totalPages:ie},sortState:{column:$e,direction:Xt},filterState:{values:Jt,config:k||[]},selectionState:{selectedRows:Re,isAllSelected:Qt,isIndeterminate:rn},paginationMode:D,selectable:b,rowId:_,actions:S,resizable:z,columnWidths:cn,virtualScrolling:W,emptyMessage:M,emptyStateTitle:F,emptyStateMessage:A,emptyStateIllustration:R,emptyStateAction:I,setPage:wt,setPageSize:sn,setSorting:nn,setFilters:an,setSelection:dt,toggleRowSelection:on,toggleSelectAll:ln,getRowId:yt,setColumnWidth:dn,onPageChange:c,onPageSizeChange:u,onSort:h,onFilter:j,onSelectionChange:N,onRowClick:L,onColumnResize:q}),[e,t,Oe,r,V,ne,oe,ie,$e,Xt,Jt,k,Re,Qt,rn,D,b,_,S,M,F,A,R,I,wt,sn,nn,an,dt,on,ln,yt,dn,c,u,h,j,N,L,q,z,cn,W]);return n.jsx(Rr.Provider,{value:Do,children:se})}function Ds(u){var d=u,{column:e,resizable:t=!1,width:r,onResize:s,minWidth:a=50,maxWidth:o,className:i=""}=d,c=O(d,["column","resizable","width","onResize","minWidth","maxWidth","className"]);const{sortState:f,setSorting:p,onSort:m}=Pe(),h=l.useRef(null),x=l.useRef(null),y=l.useRef(null),k=()=>{if(!e.sortable||!m&&!p)return;const N=f.column===e.key&&f.direction==="asc"?"desc":"asc";m?m(e.key,N):p(e.key,N)},g=N=>{b&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),k())},j=N=>{if(N.preventDefault(),N.stopPropagation(),!x.current||!s)return;const _=r||x.current.offsetWidth;y.current={x:N.clientX,width:_};const S=F=>{if(!y.current)return;const A=F.clientX-y.current.x,R=y.current.width+A,I=Math.max(a,o?Math.min(R,o):R);s(e.key,I)},M=()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",M),y.current=null};document.addEventListener("mousemove",S),document.addEventListener("mouseup",M)},C=f.column===e.key,b=e.sortable&&(m||p),v=C?f.direction:void 0;return n.jsx("th",P(T({ref:x,scope:"col",role:"columnheader","aria-sort":C?v==="asc"?"ascending":"descending":b?"none":void 0,className:`px-6 py-3 text-left text-xs font-medium text-fg-tertiary uppercase tracking-wider ${b?"cursor-pointer hover:bg-surface-active focus:bg-surface-active focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2 select-none":""} ${e.hiddenOnMobile?"hidden md:table-cell":""} ${i}`,onClick:b?k:void 0,onKeyDown:b?g:void 0,tabIndex:b?0:void 0,style:r?{width:`${r}px`,minWidth:`${r}px`}:void 0},c),{children:n.jsxs("div",{className:"flex items-center gap-2 relative",children:[n.jsx("span",{children:e.label}),C&&n.jsx("span",{className:"text-fg-tertiary","aria-hidden":"true",children:f.direction==="asc"?"↑":"↓"}),t&&s&&n.jsx("div",{ref:h,className:"absolute right-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-surface-brand transition-colors",onMouseDown:j,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${e.label} column`,style:{touchAction:"none"}})]})}))}function Ls(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{columns:a,selectable:o,selectionState:i,toggleSelectAll:c,actions:u,resizable:d,columnWidths:f,setColumnWidth:p}=Pe();return n.jsxs("tr",P(T({role:"row",className:e},t),{children:[o&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 w-12","aria-label":"Select all",children:n.jsx(Nr,{checked:i.isAllSelected,onChange:c,"aria-label":"Select all rows",className:"my-0",indeterminate:i.isIndeterminate})}),a.map(m=>n.jsx(Ds,{column:m,resizable:d,width:f==null?void 0:f[m.key],onResize:p},m.key)),u&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 text-right text-xs font-medium text-fg-tertiary uppercase tracking-wider w-12","aria-label":"Actions",children:n.jsx("span",{className:"sr-only",children:"Actions"})})]}))}function Fs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);return Pe(),n.jsx("thead",P(T({className:`bg-surface-subtle sticky top-0 ${ue("sticky")} ${e}`},t),{children:n.jsx(Ls,{})}))}function _s(a){var o=a,{column:e,row:t,className:r=""}=o,s=O(o,["column","row","className"]);const i=e.key in t?t[e.key]:void 0;return n.jsx("td",P(T({className:`px-6 py-4 whitespace-nowrap text-sm text-fg-primary ${e.hiddenOnMobile?"hidden md:table-cell":""} ${r}`},s),{children:e.render?e.render(i,t):String(i!=null?i:"")}))}function kd(o){var i=o,{actions:e,row:t,align:r="right",className:s=""}=i,a=O(i,["actions","row","align","className"]);const c=e.map(u=>({label:u.label,onClick:()=>u.onClick(t),variant:u.variant,disabled:u.disabled}));return n.jsx("div",P(T({className:`inline-flex ${s}`},a),{children:n.jsx(Ra,{trigger:n.jsx(Z,{variant:"ghost",size:"sm","aria-label":"Row actions",className:"h-8 w-8 p-0",children:n.jsx(Bl,{className:"h-4 w-4"})}),items:c,align:r})}))}function Ps(a){var o=a,{row:e,align:t="right",className:r=""}=o,s=O(o,["row","align","className"]);const{actions:i}=Pe();if(!i)return null;const c=i(e);return c.length===0?null:n.jsx(kd,T({row:e,actions:c,align:t,className:r},s))}function hr(i){var c=i,{row:e,rowIndex:t,className:r="",onClick:s,style:a}=c,o=O(c,["row","rowIndex","className","onClick","style"]);const{columns:u,selectable:d,selectionState:f,toggleRowSelection:p,getRowId:m,actions:h,onRowClick:x}=Pe(),y=m(e,t),k=f.selectedRows.includes(y),g=j=>{s&&s(j),x&&x(e)};return n.jsxs("tr",P(T({role:"row","aria-selected":d?k:void 0,"aria-rowindex":t+1,className:`hover:bg-surface-hover ${k?"bg-surface-selected":""} ${r}`,onClick:g,style:a},o),{children:[d&&n.jsx("td",{className:"px-6 py-4",children:n.jsx(Nr,{checked:k,onChange:()=>p(y),"aria-label":`Select row ${y}`,className:"my-0"})}),u.map(j=>n.jsx(_s,{column:j,row:e},String(j.key))),h&&n.jsx("td",{className:"px-6 py-4 text-right",children:n.jsx(Ps,{row:e})})]}))}function zs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{emptyMessage:a,emptyStateTitle:o,emptyStateMessage:i,emptyStateIllustration:c,emptyStateAction:u}=Pe();return o||i||c?n.jsxs("div",P(T({className:e},t),{children:[n.jsx(Aa,{title:o||"No data available",message:i||a||"No data available",variant:c?"withIllustration":"default",illustration:c}),u&&n.jsx("div",{className:"mt-4 flex justify-center",children:u})]})):n.jsx("div",P(T({className:`text-center text-fg-secondary ${e}`},t),{children:a||"No data available"}))}function ro(e,t){const{itemHeight:r,containerHeight:s,overscan:a=5,enabled:o=!0}=t,[i,c]=l.useState(0),u=l.useRef(null),d=l.useMemo(()=>{if(!o||e.length===0)return e.map((y,k)=>({index:k,start:k*r,end:(k+1)*r,size:r}));const m=Math.max(0,Math.floor(i/r)-a),h=s?Math.min(e.length,Math.ceil((i+s)/r)+a):e.length,x=[];for(let y=m;y<h;y++)x.push({index:y,start:y*r,end:(y+1)*r,size:r});return x},[e,r,i,s,a,o]),f=e.length*r;return l.useEffect(()=>{if(!o||!u.current)return;const m=u.current,h=()=>{c(m.scrollTop)};return m.addEventListener("scroll",h,{passive:!0}),()=>m.removeEventListener("scroll",h)},[o]),{virtualItems:d,totalHeight:f,scrollOffset:i,setScrollOffset:c,scrollToIndex:m=>{if(!u.current)return;const h=m*r;u.current.scrollTop=h,c(h)},containerRef:u}}function Os(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);var y,k;const{paginatedData:o,loading:i,columns:c,selectable:u,actions:d,virtualScrolling:f,virtualScrollingOptions:p}=Pe(),m=c.length+(u?1:0)+(d?1:0),h=ro(o,{itemHeight:(p==null?void 0:p.itemHeight)||50,containerHeight:p==null?void 0:p.containerHeight,overscan:(p==null?void 0:p.overscan)||5,enabled:f||!1}),x=l.useMemo(()=>f&&h.virtualItems.length>0?h.virtualItems.map(g=>({row:o[g.index],index:g.index})).filter(g=>g.row!==void 0):o.map((g,j)=>({row:g,index:j})),[f,h.virtualItems,o]);return i?n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:Array.from({length:5}).map((g,j)=>n.jsx("tr",{children:Array.from({length:m}).map((C,b)=>n.jsx("td",{className:"px-6 py-4",children:n.jsx(ga,{className:"h-4 w-full"})},b))},j))})):o.length===0?n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:n.jsx("tr",{children:n.jsx("td",{colSpan:m,className:"px-6 py-12",children:n.jsx(zs,{})})})})):typeof e=="function"?n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:o.map((g,j)=>e(g,j))})):n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`,role:"rowgroup"},r),{children:f&&h.virtualItems.length>0&&x.length>0?n.jsxs(n.Fragment,{children:[((y=h.virtualItems[0])==null?void 0:y.start)>0&&n.jsx("tr",{style:{height:h.virtualItems[0].start},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})}),x.map(({row:g,index:j})=>n.jsx(hr,{row:g,rowIndex:j},j)),h.virtualItems.length>0&&n.jsx("tr",{style:{height:Math.max(0,h.totalHeight-(((k=h.virtualItems[h.virtualItems.length-1])==null?void 0:k.end)||0))},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})})]}):x.map(({row:g,index:j})=>n.jsx(hr,{row:g,rowIndex:j},j))}))}function jd(i){var c=i,{filters:e,onFilter:t,initialValues:r={},showClearAll:s=!0,className:a=""}=c,o=O(c,["filters","onFilter","initialValues","showClearAll","className"]);const[u,d]=l.useState(r),[f,p]=l.useState(!1),m=Object.values(u).some(g=>g!==""&&g!==null&&g!==void 0),h=(g,j)=>{const C=P(T({},u),{[g]:j});d(C),t(C)},x=()=>{const g={};e.forEach(j=>{g[j.key]=""}),d(g),t(g)},y=g=>{const j=P(T({},u),{[g]:""});d(j),t(j)},k=Object.values(u).filter(g=>g!==""&&g!==null&&g!==void 0).length;return n.jsx("div",P(T({className:`bg-surface-base border-b border-line-default ${a}`},o),{children:n.jsxs("div",{className:"px-4 py-3 sm:px-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("button",{type:"button",onClick:()=>p(!f),className:"flex items-center gap-2 text-sm font-medium text-fg-secondary hover:text-fg-primary",children:[n.jsx(Zl,{className:"h-4 w-4"}),n.jsx("span",{children:"Filters"}),k>0&&n.jsx("span",{className:`inline-flex items-center ${E("sm","px")} ${E("0.5","py")} rounded text-xs font-medium bg-surface-brand-muted text-fg-brand-emphasis`,children:k})]}),m&&s&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:x,className:"text-sm",children:"Clear all"})]}),f&&n.jsx("div",{className:"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(g=>{const j=u[g.key]||"";return n.jsxs("div",{className:"space-y-1",children:[n.jsx(Mt,{htmlFor:`filter-${g.key}`,variant:"optional",children:g.label}),n.jsxs("div",{className:"relative",children:[g.type==="text"&&n.jsx(ke,{id:`filter-${g.key}`,type:"text",value:j,onChange:C=>h(g.key,C.target.value),placeholder:g.placeholder||`Filter by ${g.label.toLowerCase()}`,size:"sm",variant:"outlined"}),g.type==="select"&&n.jsxs("div",{className:"relative",children:[n.jsx(jr,{id:`filter-${g.key}`,options:[{value:"",label:`All ${g.label}`},...g.options||[]],value:j,onChange:C=>h(g.key,C.target.value)}),j&&n.jsx("button",{type:"button",onClick:()=>y(g.key),className:"absolute right-8 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${g.label} filter`,children:n.jsx(we,{className:"h-4 w-4"})})]}),g.type==="date"&&n.jsx(ke,{id:`filter-${g.key}`,type:"date",value:j,onChange:C=>h(g.key,C.target.value),size:"sm",variant:"outlined"}),j&&g.type!=="select"&&n.jsx("button",{type:"button",onClick:()=>y(g.key),className:"absolute right-2 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${g.label} filter`,children:n.jsx(we,{className:"h-4 w-4"})})]})]},g.key)})})]})}))}function Vs(s){var a=s,{showClearAll:e=!0,className:t=""}=a,r=O(a,["showClearAll","className"]);const{filterState:o,setFilters:i}=Pe();return o.config.length===0?null:n.jsx(jd,T({filters:o.config,onFilter:i,initialValues:o.values,showClearAll:e,className:t},r))}function Nd(f){var p=f,{page:e,pageSize:t,total:r,onPageChange:s,onPageSizeChange:a,pageSizeOptions:o=[10,25,50,100],showPageSizeSelector:i=!0,showPageInfo:c=!0,className:u=""}=p,d=O(p,["page","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showPageInfo","className"]);const m=Math.ceil(r/t),h=r===0?0:(e-1)*t+1,x=Math.min(e*t,r),y=()=>{e>1&&s(e-1)},k=()=>{e<m&&s(e+1)},g=()=>{e>1&&s(1)},j=()=>{e<m&&s(m)};return n.jsxs("div",P(T({className:`flex items-center justify-between px-4 py-3 bg-surface-base border-t border-line-default sm:px-6 ${u}`},d),{children:[n.jsxs("div",{className:"flex flex-1 justify-between sm:hidden",children:[n.jsx(Z,{variant:"outline",size:"sm",onClick:y,disabled:e===1,children:"Previous"}),n.jsx(Z,{variant:"outline",size:"sm",onClick:k,disabled:e>=m,children:"Next"})]}),n.jsxs("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[c&&n.jsx("div",{children:n.jsxs(Be,{as:"p",className:"text-sm text-fg-secondary",children:["Showing ",n.jsx("span",{className:"font-medium",children:h})," to"," ",n.jsx("span",{className:"font-medium",children:x})," of"," ",n.jsx("span",{className:"font-medium",children:r})," results"]})}),n.jsxs("div",{className:"flex items-center gap-4",children:[i&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Be,{as:"span",className:"text-sm text-fg-secondary",children:"Show:"}),n.jsx(jr,{"aria-label":"Items per page",options:o.map(C=>({value:C.toString(),label:C.toString()})),value:t.toString(),onChange:C=>{const b=parseInt(C.target.value);a(b),s(1)},className:"w-20"})]}),n.jsxs("nav",{className:"flex items-center gap-1","aria-label":"Pagination",children:[n.jsxs(Z,{variant:"ghost",size:"sm",onClick:g,disabled:e===1,"aria-label":"First page",children:[n.jsx(Bt,{className:"h-4 w-4"}),n.jsx(Bt,{className:"h-4 w-4 -ml-2"})]}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:y,disabled:e===1,"aria-label":"Previous page",children:n.jsx(Bt,{className:"h-4 w-4"})}),n.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(5,m)},(C,b)=>{let v;return m<=5||e<=3?v=b+1:e>=m-2?v=m-4+b:v=e-2+b,n.jsx(Z,{variant:e===v?"primary":"ghost",size:"sm",onClick:()=>s(v),className:"min-w-10","aria-label":`Page ${v}`,"aria-current":e===v?"page":void 0,children:v},v)})}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:k,disabled:e>=m,"aria-label":"Next page",children:n.jsx(ht,{className:"h-4 w-4"})}),n.jsxs(Z,{variant:"ghost",size:"sm",onClick:j,disabled:e>=m,"aria-label":"Last page",children:[n.jsx(ht,{className:"h-4 w-4"}),n.jsx(ht,{className:"h-4 w-4 -ml-2"})]})]})]})]})]}))}function Ws(o){var i=o,{showPageSizeSelector:e=!0,showPageInfo:t=!0,pageSizeOptions:r,className:s=""}=i,a=O(i,["showPageSizeSelector","showPageInfo","pageSizeOptions","className"]);const{paginationState:c,setPage:u,setPageSize:d,paginationMode:f}=Pe();return f==="client"&&c.totalPages<=1?null:n.jsx(Nd,T({page:c.page,pageSize:c.pageSize,total:c.total,onPageChange:u,onPageSizeChange:d,pageSizeOptions:r,showPageSizeSelector:e,showPageInfo:t,className:s},a))}function je(e){const o=e,{className:t=""}=o,r=O(o,["className"]),s="children"in e&&e.children!==void 0,a=s?r:Sd(r);return s?n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsx(cs,P(T({},a),{children:e.children}))}):n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsxs(cs,P(T({},a),{children:[a.filters&&a.filters.length>0&&n.jsx(Vs,{}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-line-default",role:"table","aria-label":e["aria-label"],"aria-labelledby":e["aria-labelledby"],"aria-rowcount":a.total||a.data.length,"aria-colcount":a.columns.length+(a.selectable?1:0)+(a.actions?1:0),children:[n.jsx(Fs,{}),n.jsx(Os,{})]})}),n.jsx(Ws,{})]}))})}function Sd(e){const{columns:t,data:r,loading:s,onSort:a,sortColumn:o,sortDirection:i,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,pagination:m,filters:h,selectable:x,selectedRows:y,onSelectionChange:k,rowId:g,actions:j,onRowClick:C,paginationMode:b,defaultPageSize:v,resizable:N,columnWidths:_,onColumnResize:S,virtualScrolling:M,virtualScrollingOptions:F}=e;let A=b||"auto";return A==="auto"&&(A=m&&m.total!==void 0&&m.onPageChange?"server":"client"),{columns:t,data:r,loading:s,paginationMode:A,page:m==null?void 0:m.page,pageSize:m==null?void 0:m.pageSize,total:m==null?void 0:m.total,onPageChange:m==null?void 0:m.onPageChange,onPageSizeChange:m==null?void 0:m.onPageSizeChange,defaultPageSize:v||(m==null?void 0:m.pageSize)||10,pageSizeOptions:m==null?void 0:m.pageSizeOptions,sortColumn:o,sortDirection:i,onSort:a,filters:h==null?void 0:h.config,filterValues:h==null?void 0:h.initialValues,onFilter:h==null?void 0:h.onFilter,initialFilterValues:h==null?void 0:h.initialValues,selectable:x,selectedRows:y,onSelectionChange:k,rowId:g,actions:j,onRowClick:C,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,resizable:N,columnWidths:_,onColumnResize:S,virtualScrolling:M,virtualScrollingOptions:F,children:n.jsx(n.Fragment,{})}}je.Header=Fs;je.HeaderRow=Ls;je.HeaderCell=Ds;je.Body=Os;je.Row=hr;je.Cell=_s;je.Filters=Vs;je.Pagination=Ws;je.EmptyState=zs;je.Actions=Ps;function Cd(e={}){const{defaultWidths:t={},minWidth:r=50,maxWidth:s,resizable:a=!0}=e,[o,i]=l.useState(t),[c,u]=l.useState(!1),[d,f]=l.useState(null),p=l.useRef(null),m=l.useCallback((C,b)=>{const v=Math.max(r,s?Math.min(b,s):b);i(N=>P(T({},N),{[C]:v}))},[r,s]),h=l.useCallback(()=>{i(t)},[t]),x=l.useCallback((C,b,v)=>{a&&(u(!0),f(C),p.current={startX:b,startWidth:v})},[a]),y=l.useCallback(C=>{if(!c||!d||!p.current)return;const b=C-p.current.startX,v=p.current.startWidth+b;m(d,v)},[c,d,m]),k=l.useCallback(()=>{u(!1),f(null),p.current=null},[]),g=l.useRef(void 0),j=l.useRef(void 0);return typeof window!="undefined"&&(g.current=C=>{c&&y(C.clientX)},j.current=()=>{c&&k()},c?(document.addEventListener("mousemove",g.current),document.addEventListener("mouseup",j.current)):(g.current&&document.removeEventListener("mousemove",g.current),j.current&&document.removeEventListener("mouseup",j.current))),{columnWidths:o,setColumnWidth:m,resetColumnWidths:h,isResizing:c,resizingColumn:d,startResize:x,handleResize:y,endResize:k}}const Ir=l.createContext(null);function $d(){return l.useContext(Ir)}function it(){const e=l.useContext(Ir);if(!e)throw new Error("useSideNavbarThemeRequired must be used within SideNavbarThemeProvider");return e}const $t={variant:"default",navigationWidth:"56px",contentWidth:"320px",animationDuration:300,animationEasing:"ease-in-out"};function Hs({children:e,variant:t=$t.variant,navigationWidth:r=$t.navigationWidth,contentWidth:s=$t.contentWidth,animationDuration:a=$t.animationDuration,animationEasing:o=$t.animationEasing}){const i=l.useMemo(()=>({variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o}),[t,r,s,a,o]);return n.jsx(Ir.Provider,{value:i,children:e})}const Dr=l.createContext(null);function Ed(){return l.useContext(Dr)}function xt(){const e=l.useContext(Dr);if(!e)throw new Error("useSideNavbarConfigRequired must be used within SideNavbarConfigProvider");return e}const ye={mode:"full",resizable:!1,minWidth:void 0,maxWidth:void 0,snapPoints:void 0,responsive:!1,mobileBreakpoint:768,mobileVariant:"collapse",overlayBackdrop:!0,persistState:!0,persistWidth:!1,storageKey:void 0,keyboardShortcut:"Ctrl+B",enableKeyboardShortcut:!0};function Bs({children:e,mode:t=ye.mode,resizable:r=ye.resizable,minWidth:s=ye.minWidth,maxWidth:a=ye.maxWidth,snapPoints:o=ye.snapPoints,responsive:i=ye.responsive,mobileBreakpoint:c=ye.mobileBreakpoint,mobileVariant:u=ye.mobileVariant,overlayBackdrop:d=ye.overlayBackdrop,persistState:f=ye.persistState,persistWidth:p=ye.persistWidth,storageKey:m=ye.storageKey,keyboardShortcut:h=ye.keyboardShortcut,enableKeyboardShortcut:x=ye.enableKeyboardShortcut}){const y=l.useMemo(()=>({mode:t,resizable:r,minWidth:s,maxWidth:a,snapPoints:o,responsive:i,mobileBreakpoint:c,mobileVariant:u,overlayBackdrop:d,persistState:f,persistWidth:p,storageKey:m,keyboardShortcut:h,enableKeyboardShortcut:x}),[t,r,s,a,o,i,c,u,d,f,p,m,h,x]);return n.jsx(Dr.Provider,{value:y,children:e})}const Lr=l.createContext(null);function Md(){return l.useContext(Lr)}function lt(){const e=l.useContext(Lr);if(!e)throw new Error("useSideNavbarStateRequired must be used within SideNavbarStateProvider");return e}function br(e){if(typeof e=="number")return e;const t=parseFloat(e);return isNaN(t)?0:e.endsWith("rem")||e.endsWith("em")?t*16:(e.endsWith("px"),t)}function so(e,t){return e===void 0||t===void 0?!0:e<t}function lr(e,t,r){let s=e;return t!==void 0&&(s=Math.max(s,t)),r!==void 0&&(s=Math.min(s,r)),s}const Td=["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(Td.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 Ad(e,t="windows"){if(!e.isValid)return"";const r=[];return t==="mac"?(e.ctrl&&r.push("⌘"),e.shift&&r.push("⇧"),e.alt&&r.push("⌥"),e.meta&&r.push("⌃"),r.push(e.key.toUpperCase()),r.join("")):(e.ctrl&&r.push("Ctrl"),e.shift&&r.push("Shift"),e.alt&&r.push("Alt"),e.meta&&r.push("Meta"),r.push(e.key.toUpperCase()),r.join("+"))}function ao({initialWidth:e,minWidth:t,maxWidth:r,snapPoints:s,snapThreshold:a=20,onWidthChange:o,enabled:i=!0}){process.env.NODE_ENV==="development"&&(so(t,r)||console.warn("[useResize] Invalid bounds: minWidth must be less than maxWidth",{minWidth:t,maxWidth:r}));const c=lr(e,t,r),[u,d]=l.useState(c),[f,p]=l.useState(!1),m=l.useRef(0),h=l.useRef(c),x=l.useCallback(j=>{let C=lr(j,t,r);if(s&&s.length>0){const b=s.reduce((v,N)=>{const _=Math.abs(C-N),S=Math.abs(C-v);return _<S?N:v},s[0]);Math.abs(C-b)<=a&&(C=b)}d(C),o==null||o(C)},[t,r,s,a,o]),y=l.useCallback(j=>{if(!i||!f)return;const C=j.clientX-m.current,b=h.current+C;x(b)},[i,f,x]),k=l.useCallback(()=>{i&&(p(!1),m.current=0,h.current=u)},[i,u]),g=l.useCallback(j=>{i&&(j.preventDefault(),j.stopPropagation(),p(!0),m.current=j.clientX,h.current=u)},[i,u]);return l.useEffect(()=>{if(f)return document.addEventListener("mousemove",y),document.addEventListener("mouseup",k),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",k),document.body.style.userSelect="",document.body.style.cursor=""}},[f,y,k]),l.useEffect(()=>{f||d(lr(e,t,r))},[e,t,r,f]),{width:u,isResizing:f,startResize:g,setWidth:x}}function oo({mobileBreakpoint:e=768,onMobileChange:t,enabled:r=!0}={}){const[s,a]=l.useState(typeof window!="undefined"?window.innerWidth:1024),[o,i]=l.useState(typeof window!="undefined"?window.innerWidth<e:!1),c=l.useCallback(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),d!==o&&(i(d),t==null||t(d))},[r,e,o,t]);return l.useEffect(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),i(d),window.addEventListener("resize",c);let f=null;return window.ResizeObserver&&(f=new ResizeObserver(()=>{c()}),f.observe(document.body)),()=>{window.removeEventListener("resize",c),f==null||f.disconnect()}},[r,e,c]),{isMobile:o,viewportWidth:s}}function io({isActive:e,containerRef:t,restoreFocus:r=!0,initialFocusRef:s}){const a=l.useRef(null);l.useEffect(()=>{if(e){if(a.current=document.activeElement,s!=null&&s.current)s.current.focus();else if(t.current){const i=t.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');i==null||i.focus()}}else r&&a.current&&(a.current.focus(),a.current=null)},[e,t,s,r]);const o=l.useCallback(i=>{if(!(!e||!t.current)&&i.key==="Tab"){const c=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),u=c[0],d=c[c.length-1];i.shiftKey?document.activeElement===u&&(i.preventDefault(),d==null||d.focus()):document.activeElement===d&&(i.preventDefault(),u==null||u.focus())}},[e,t]);l.useEffect(()=>{if(e)return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[e,o])}function lo({key:e,ctrl:t=!1,shift:r=!1,alt:s=!1,meta:a=!1,onTrigger:o,enabled:i=!0,preventDefault:c=!0}){const u=l.useCallback(d=>{if(!i)return;const f=d.target;if((f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.isContentEditable)&&!t&&!a)return;const m=e.length===1?d.key.toLowerCase()===e.toLowerCase():d.key===e,h=t?d.ctrlKey||d.metaKey:!d.ctrlKey&&!d.metaKey,x=r?d.shiftKey:!d.shiftKey,y=s?d.altKey:!d.altKey,k=a?d.metaKey:!d.metaKey,g=t?(d.ctrlKey||d.metaKey)&&!a:h&&k;m&&g&&x&&y&&(c&&(d.preventDefault(),d.stopPropagation()),o())},[i,e,t,r,s,a,o,c]);l.useEffect(()=>{if(i)return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[i,u])}function Us({children:e,defaultCollapsed:t=!1,collapsed:r,onCollapseChange:s,onWidthChange:a,onMobileChange:o,exclusiveGroups:i=!1}){const c=it(),u=xt(),d=l.useRef(null),f=r!==void 0,p=()=>{if(f)return r;if(u.storageKey&&u.persistState&&typeof window!="undefined"){const L=localStorage.getItem(`${u.storageKey}-collapsed`);if(L!==null)return L==="true"}return t},m=()=>{if(u.storageKey&&u.persistWidth&&typeof window!="undefined"){const L=localStorage.getItem(`${u.storageKey}-width`);if(L!==null){const z=parseInt(L,10);if(!isNaN(z))return z}}return br(c.contentWidth)},[h,x]=l.useState(p),[y,k]=l.useState({}),{isMobile:g}=oo({mobileBreakpoint:u.mobileBreakpoint,onMobileChange:L=>{o==null||o(L),L&&u.mobileVariant==="collapse"&&!f&&x(!0)},enabled:u.responsive}),{width:j,isResizing:C,startResize:b,setWidth:v}=ao({initialWidth:m(),minWidth:u.minWidth,maxWidth:u.maxWidth,snapPoints:u.snapPoints,onWidthChange:L=>{a==null||a(L),u.storageKey&&u.persistWidth&&typeof window!="undefined"&&localStorage.setItem(`${u.storageKey}-width`,String(L))},enabled:u.resizable&&!g});io({isActive:g&&u.mobileVariant==="overlay"&&!h,containerRef:d,restoreFocus:!0});const N=f?r:h,_=l.useCallback(L=>{f||x(L),s==null||s(L)},[f,s]),S=l.useCallback(()=>{_(!N)},[N,_]),M=no(u.keyboardShortcut);lo({key:M.key,ctrl:M.ctrl,shift:M.shift,alt:M.alt,meta:M.meta,onTrigger:S,enabled:u.enableKeyboardShortcut});const F=l.useCallback(L=>{v(L)},[v]),A=l.useCallback(L=>{k(i?z=>{const q=z[L]===!1,W={},ae=new Set([...Object.keys(z),L]);return q?ae.forEach(se=>{W[se]=!0}):ae.forEach(se=>{W[se]=se!==L}),W}:z=>P(T({},z),{[L]:!z[L]}))},[i]),R=l.useCallback((L,z)=>{k(Y=>P(T({},Y),{[L]:z}))},[]);l.useEffect(()=>{f&&r!==h&&x(r)},[f,r,h]),l.useEffect(()=>{u.storageKey&&u.persistState&&typeof window!="undefined"&&!f&&localStorage.setItem(`${u.storageKey}-collapsed`,String(h))},[u.storageKey,u.persistState,h,f]);const I=l.useMemo(()=>({collapsed:N,toggle:S,setCollapsed:_,currentWidth:j,setWidth:F,isMobile:g,isResizing:C,startResize:b,groupStates:y,toggleGroup:A,setGroupCollapsed:R,sidebarRef:d}),[N,S,_,j,F,g,C,b,y,A,R]);return n.jsx(Lr.Provider,{value:I,children:e})}function qs({children:e,variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:y,persistWidth:k,storageKey:g,keyboardShortcut:j,enableKeyboardShortcut:C,defaultCollapsed:b,collapsed:v,onCollapseChange:N,onWidthChange:_,onMobileChange:S,exclusiveGroups:M}){return n.jsx(Hs,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,children:n.jsx(Bs,{mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:y,persistWidth:k,storageKey:g,keyboardShortcut:j,enableKeyboardShortcut:C,children:n.jsx(Us,{defaultCollapsed:b,collapsed:v,onCollapseChange:N,onWidthChange:_,onMobileChange:S,exclusiveGroups:M,children:e})})})}const Fr=l.createContext(null);function Gs(){return l.useContext(Fr)}function Ks(){const e=l.useContext(Fr);if(!e)throw new Error("useSidebarSlotRequired must be used within SidebarSlotProvider");return e}function co({children:e,defaultSlot:t=null}){const[r,s]=l.useState(t),a=l.useRef(new Map),o=l.useCallback((u,d)=>{a.current.set(u,d)},[]),i=l.useCallback(u=>{a.current.delete(u)},[]),c=l.useMemo(()=>({activeSlot:r,setActiveSlot:s,slots:a.current,registerSlot:o,unregisterSlot:i}),[r,o,i]);return n.jsx(Fr.Provider,{value:c,children:e})}const _r=l.createContext(null);function Rd(){return l.useContext(_r)}function Ys(){const e=l.useContext(_r);return e||{showMainToggle:!0,mainTogglePosition:"floating"}}function Xs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{currentWidth:a,setWidth:o,isResizing:i,startResize:c}=lt(),{resizable:u}=xt();return u?n.jsxs("div",P(T({className:`
|
|
386
|
+
`,children:d.content})})]},d.id)})})}const Ka=l.createContext(void 0);function ls({children:e,mobileMenuOpen:t,onMobileMenuChange:r,defaultMobileMenuOpen:s=!1}){const[a,o]=l.useState(s),i=t!==void 0,c=i?t:a,u=l.useCallback(m=>{i||o(m),r==null||r(m)},[i,r]),d=l.useCallback(()=>{u(!c)},[c,u]),f=l.useCallback(()=>{u(!0)},[u]),p=l.useCallback(()=>{u(!1)},[u]);return n.jsx(Ka.Provider,{value:{isMobileMenuOpen:c,toggleMobileMenu:d,setMobileMenuOpen:u,openMobileMenu:f,closeMobileMenu:p},children:e})}function Is(){const e=l.useContext(Ka);if(!e)throw new Error("useHeaderContext must be used within HeaderProvider");return e}function Ya(s){var a=s,{children:e,className:t}=a,r=O(a,["children","className"]);return n.jsx("div",{className:"flex-shrink-0",children:n.jsx(xs,P(T({href:r.href||"/",variant:"default",className:k("flex items-center font-semibold text-lg",t)},r),{children:e}))})}function Xa({children:e,className:t}){return n.jsx("nav",{className:k("flex-1 flex items-center justify-center gap-4","hidden md:flex",t),"aria-label":"Main navigation",children:e})}function Ja({children:e,className:t}){return n.jsx("div",{className:k("flex-shrink-0 flex items-center gap-2",t),children:e})}function Qa({className:e,icon:t,closeIcon:r,variant:s="ghost",size:a="md"}){const{isMobileMenuOpen:o,toggleMobileMenu:i}=Is(),c=t||n.jsx(ac,{className:"h-5 w-5"}),u=r||n.jsx(Ne,{className:"h-5 w-5"});return n.jsx(Z,{variant:s,size:a,onClick:i,className:k("md:hidden",e),"aria-label":o?"Close menu":"Open menu","aria-expanded":o,children:o?u:c})}function Za({children:e,className:t}){const{isMobileMenuOpen:r,closeMobileMenu:s}=Is();return n.jsx(Gt,{open:r,onOpenChange:a=>{a||s()},position:"left",size:"sm",closeOnOverlayClick:!0,closeOnEscape:!0,children:n.jsx(Ms,{className:k("p-4",t),children:n.jsx("nav",{className:"flex flex-col gap-2","aria-label":"Mobile navigation",children:e})})})}const hd={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},it=l.forwardRef((u,c)=>{var d=u,{className:e,maxWidth:t="lg",paddingX:r="base",paddingY:s="base",center:a=!0,children:o}=d,i=O(d,["className","maxWidth","paddingX","paddingY","center","children"]);return n.jsx("div",P(T({ref:c,className:k("w-full",hd[t],E(r,"px"),E(s,"py"),a&&"mx-auto",e)},i),{children:o}))});it.displayName="Container";const At=l.forwardRef((u,c)=>{var d=u,{className:e,spacing:t="base",align:r="stretch",justify:s="start",direction:a="column",children:o}=d,i=O(d,["className","spacing","align","justify","direction","children"]);const f=a==="column"?E(t,"gap-y"):E(t,"gap-x"),p={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},m={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsx("div",P(T({ref:c,className:k("flex",a==="column"?"flex-col":"flex-row",f,p[r],m[s],e)},i),{children:o}))});At.displayName="Stack";const bd=ve(k("w-full","bg-surface-base","transition-shadow","transition-colors"),{variants:{variant:{default:"",elevated:"shadow-sm",bordered:k("border-b","border-line-muted")}},defaultVariants:{variant:"default"}});function xt(c){var u=c,{children:e,variant:t="default",sticky:r=!1,maxWidth:s="full",bare:a=!1,className:o}=u,i=O(u,["children","variant","sticky","maxWidth","bare","className"]);const d=n.jsx("div",{className:"flex items-center justify-between gap-4",children:e});return a?n.jsx(ls,{children:n.jsx("div",P(T({className:k(o)},i),{children:d}))}):n.jsx(ls,{children:n.jsx("header",P(T({className:k(bd({variant:t}),r&&`sticky top-0 ${ue("sticky")}`,r&&"backdrop-blur-sm bg-surface-base/95",o)},i),{children:n.jsx(it,{maxWidth:s,paddingX:"base",paddingY:"sm",children:d})}))})}xt.Logo=Ya;xt.Navigation=Xa;xt.Actions=Ja;xt.Hamburger=Qa;xt.MobileMenu=Za;const In=ve(k("flex","items-center","gap-2"),{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},variant:{default:"",pills:"",tabs:""}},defaultVariants:{orientation:"horizontal",variant:"default"},compoundVariants:[{orientation:"vertical",variant:"default",class:"items-stretch"},{orientation:"vertical",variant:"pills",class:"items-stretch"},{orientation:"vertical",variant:"tabs",class:"items-stretch"}]});function gd(u){var d=u,{items:e,orientation:t="horizontal",variant:r="default",className:s,"aria-label":a="Main navigation",bare:o=!1,pathname:i}=d,c=O(d,["items","orientation","variant","className","aria-label","bare","pathname"]);let f=i;if(!f)try{const h=typeof require!="undefined"?require("next/navigation"):null;if(h!=null&&h.usePathname){const x=h.usePathname;f=x()}}catch(h){f=void 0}const p=l.useMemo(()=>e.map(h=>{if(h.active!==void 0)return h;if(f){const x=f===h.href||h.href!=="/"&&f.startsWith(`${h.href}/`);return P(T({},h),{active:x})}return P(T({},h),{active:!1})}),[e,f]),m=n.jsx(n.Fragment,{children:p.map((h,x)=>{const y=r==="pills"?"background":r==="tabs"?"underline":"default";return n.jsxs(xs,{href:h.href,active:h.active,disabled:h.disabled,variant:y,className:k("flex items-center gap-2",t==="vertical"&&"w-full justify-start",h.className),children:[h.icon&&n.jsx("span",{className:"flex-shrink-0","aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.label}),h.badge&&n.jsx("span",{className:"ml-auto",children:h.badge})]},h.href||x)})});return o?n.jsx("div",P(T({className:k(In({orientation:t,variant:r}),s)},c),{children:m})):n.jsx("nav",P(T({className:k(In({orientation:t,variant:r}),s),"aria-label":a},c),{children:m}))}function eo(e){return n.jsx(gd,P(T({},e),{pathname:e.pathname}))}const xd=ve(k("w-full","flex","flex-col","gap-2"),{variants:{variant:{default:k(E("base","mb")),compact:k(E("sm","mb"))}},defaultVariants:{variant:"default"}});function to(c){var u=c,{title:e,description:t,breadcrumb:r,actions:s,variant:a="default",className:o}=u,i=O(u,["title","description","breadcrumb","actions","variant","className"]);return n.jsxs("div",P(T({className:k(xd({variant:a}),o)},i),{children:[r&&r.length>0&&n.jsx(Ma,{items:r}),n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx(Ue,{variant:"heading",as:"h1",className:"mb-2 text-2xl font-bold",children:e}),t&&n.jsx(Ue,{variant:"body",className:"text-fg-secondary",children:t})]}),s&&n.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:s})]})]}))}function vd(s){var a=s,{onForgotPasswordClick:e,className:t}=a,r=O(a,["onForgotPasswordClick","className"]);return n.jsx("div",{className:k(E("base","p"),"bg-surface-muted",J("md"),t),children:n.jsxs("form",P(T({},r),{onSubmit:o=>{o.preventDefault(),r.onSubmit&&r.onSubmit(o)},className:k("space-y-4",r.className),children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(Tt,{htmlFor:"login-email",variant:"required",children:"Your email"}),n.jsx(Se,{id:"login-email",placeholder:"myname@email.com",type:"email"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(Tt,{htmlFor:"login-password",variant:"required",children:"Your password"}),n.jsx(Se,{id:"login-password",placeholder:"••••••••",type:"password"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx(Z,{variant:"secondary",type:"button",onClick:e,children:"Forgot password?"}),n.jsx(Z,{variant:"regular",type:"submit",children:"Sign in"})]})]}))})}function yd(d){var f=d,{isOpen:e,onClose:t,title:r,children:s,variant:a="default",showCloseButton:o=!0,footer:i,className:c=""}=f,u=O(f,["isOpen","onClose","title","children","variant","showCloseButton","footer","className"]);const p=l.useRef(null),m=l.useRef(null);if(l.useEffect(()=>{if(!e)return;m.current=document.activeElement;const j=setTimeout(()=>{var b;(b=p.current)==null||b.focus()},0),C=b=>{b.key==="Escape"&&t()};return document.addEventListener("keydown",C),()=>{var b;clearTimeout(j),document.removeEventListener("keydown",C),(b=m.current)==null||b.focus()}},[e,t]),l.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const h=["fixed","inset-0",ue("modal"),"overflow-y-auto"],x=["fixed","inset-0","bg-scrim","transition-opacity"],w=["relative","bg-surface-overlay","rounded-lg","shadow-xl","my-8","mx-auto",{default:"max-w-md",large:"max-w-2xl",fullscreen:"max-w-full h-full"}[a],"p-6",c].filter(Boolean).join(" "),g=n.jsxs("div",{className:h.join(" "),role:"dialog","aria-modal":"true","aria-labelledby":r?"modal-title":void 0,onClick:j=>{j.target===j.currentTarget&&t()},children:[n.jsx("div",{className:x.join(" "),"aria-hidden":"true"}),n.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:n.jsxs("div",P(T({ref:p,tabIndex:-1,className:w,onClick:j=>j.stopPropagation()},u),{children:[r&&n.jsxs("div",{className:"flex justify-between items-center mb-4",children:[n.jsx("h2",{id:"modal-title",className:"text-xl font-semibold text-fg-primary",children:r}),o&&n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Ne,{className:"h-6 w-6"})})]}),!r&&o&&n.jsx("div",{className:"flex justify-end mb-4",children:n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Ne,{className:"h-6 w-6"})})}),n.jsx("div",{className:"mb-4",children:s}),i&&n.jsx("div",{className:"flex justify-end gap-2 mt-4",children:i})]}))})]});return typeof window!="undefined"?qe.createPortal(g,document.body):g}const Rr=l.createContext(void 0);function Oe(){const e=l.useContext(Rr);if(e===void 0)throw new Error("useTableContext must be used within a Table component");return e}function wd(){const e=l.useContext(Rr);return e||void 0}function cs({columns:e,data:t,loading:r=!1,paginationMode:s,page:a,pageSize:o,total:i,onPageChange:c,onPageSizeChange:u,defaultPageSize:d=10,pageSizeOptions:f,sortColumn:p,sortDirection:m,onSort:h,defaultSortColumn:x,defaultSortDirection:y="asc",filters:w,filterValues:g,onFilter:j,initialFilterValues:C={},selectable:b=!1,selectedRows:v,onSelectionChange:N,rowId:_,actions:S,emptyMessage:M="No data available",emptyStateTitle:F,emptyStateMessage:R,emptyStateIllustration:D,emptyStateAction:I,onRowClick:A,resizable:V=!1,columnWidths:Y,onColumnResize:H,virtualScrolling:W,virtualScrollingOptions:ie,children:ne}){const L=l.useMemo(()=>s||(i!==void 0&&c?"server":"client"),[s,i,c]),B=a!==void 0,[K,Q]=l.useState(1),[le,se]=l.useState(d),z=B?a:K,U=o!=null?o:le,X=l.useMemo(()=>L==="server"?i!=null?i:0:t.length,[L,i,t.length]),ae=l.useMemo(()=>Math.ceil(X/U),[X,U]),fe=p!==void 0,[ke,je]=l.useState(x||""),[Ie,Lt]=l.useState(y),Me=fe?p:ke,Xt=fe?m||"asc":Ie,Vr=g!==void 0,[Eo,Mo]=l.useState(C),Jt=Vr?g:Eo,Wr=v!==void 0,[To,Ao]=l.useState([]),De=Wr?v:To,Qt=l.useMemo(()=>!w||w.length===0?t:t.filter(ee=>w.every(de=>{const ge=Jt[de.key];if(!ge||ge==="")return!0;const er=ee[de.key];return de.type==="text"?String(er||"").toLowerCase().includes(String(ge).toLowerCase()):String(er)===String(ge)})),[t,w,Jt]),Hr=l.useMemo(()=>{if(fe&&h||!Me)return Qt;const ee=[...Qt];return ee.sort((de,ge)=>{const er=de[Me],Fo=ge[Me],un=String(er||"").localeCompare(String(Fo||""));return Xt==="asc"?un:-un}),ee},[Qt,Me,Xt,h,fe]),Ve=l.useMemo(()=>{if(L==="server")return Hr;const ee=(z-1)*U,de=ee+U;return Hr.slice(ee,de)},[Hr,L,z,U]),wt=l.useCallback((ee,de)=>{var ge;return _?_(ee):((ge=ee==null?void 0:ee.id)==null?void 0:ge.toString())||de.toString()},[_]),Zt=l.useMemo(()=>!b||Ve.length===0?!1:Ve.every((ee,de)=>{const ge=wt(ee,de);return De.includes(ge)}),[b,Ve,De,wt]),rn=l.useMemo(()=>{if(!b)return!1;const ee=De.length;return ee>0&&ee<Ve.length},[b,De.length,Ve.length]),kt=l.useCallback(ee=>{B?c==null||c(ee):Q(ee)},[B,c]),sn=l.useCallback(ee=>{u?u(ee):se(ee),kt(1)},[u,kt]),nn=l.useCallback((ee,de)=>{fe?h==null||h(ee,de):(je(ee),Lt(de))},[fe,h]),an=l.useCallback(ee=>{Vr?j==null||j(ee):Mo(ee),kt(1)},[Vr,j,kt]),ut=l.useCallback(ee=>{Wr?N==null||N(ee):Ao(ee)},[Wr,N]),on=l.useCallback(ee=>{const de=De.includes(ee)?De.filter(ge=>ge!==ee):[...De,ee];ut(de)},[De,ut]),ln=l.useCallback(()=>{if(Zt)ut([]);else{const ee=Ve.map((de,ge)=>wt(de,ge));ut(ee)}},[Zt,Ve,wt,ut]),[Ro,Io]=l.useState({}),Br=Y!==void 0,cn=Br?Y:Ro,dn=l.useCallback((ee,de)=>{Br?H==null||H(ee,de):Io(ge=>P(T({},ge),{[ee]:de}))},[Br,H]),Do=l.useMemo(()=>({columns:e,data:t,paginatedData:Ve,loading:r,paginationState:{page:z,pageSize:U,total:X,totalPages:ae},sortState:{column:Me,direction:Xt},filterState:{values:Jt,config:w||[]},selectionState:{selectedRows:De,isAllSelected:Zt,isIndeterminate:rn},paginationMode:L,selectable:b,rowId:_,actions:S,resizable:V,columnWidths:cn,virtualScrolling:W,emptyMessage:M,emptyStateTitle:F,emptyStateMessage:R,emptyStateIllustration:D,emptyStateAction:I,setPage:kt,setPageSize:sn,setSorting:nn,setFilters:an,setSelection:ut,toggleRowSelection:on,toggleSelectAll:ln,getRowId:wt,setColumnWidth:dn,onPageChange:c,onPageSizeChange:u,onSort:h,onFilter:j,onSelectionChange:N,onRowClick:A,onColumnResize:H}),[e,t,Ve,r,z,U,X,ae,Me,Xt,Jt,w,De,Zt,rn,L,b,_,S,M,F,R,D,I,kt,sn,nn,an,ut,on,ln,wt,dn,c,u,h,j,N,A,H,V,cn,W]);return n.jsx(Rr.Provider,{value:Do,children:ne})}function Ds(u){var d=u,{column:e,resizable:t=!1,width:r,onResize:s,minWidth:a=50,maxWidth:o,className:i=""}=d,c=O(d,["column","resizable","width","onResize","minWidth","maxWidth","className"]);const{sortState:f,setSorting:p,onSort:m}=Oe(),h=l.useRef(null),x=l.useRef(null),y=l.useRef(null),w=()=>{if(!e.sortable||!m&&!p)return;const N=f.column===e.key&&f.direction==="asc"?"desc":"asc";m?m(e.key,N):p(e.key,N)},g=N=>{b&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),w())},j=N=>{if(N.preventDefault(),N.stopPropagation(),!x.current||!s)return;const _=r||x.current.offsetWidth;y.current={x:N.clientX,width:_};const S=F=>{if(!y.current)return;const R=F.clientX-y.current.x,D=y.current.width+R,I=Math.max(a,o?Math.min(D,o):D);s(e.key,I)},M=()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",M),y.current=null};document.addEventListener("mousemove",S),document.addEventListener("mouseup",M)},C=f.column===e.key,b=e.sortable&&(m||p),v=C?f.direction:void 0;return n.jsx("th",P(T({ref:x,scope:"col",role:"columnheader","aria-sort":C?v==="asc"?"ascending":"descending":b?"none":void 0,className:`px-6 py-3 text-left text-xs font-medium text-fg-tertiary uppercase tracking-wider ${b?"cursor-pointer hover:bg-surface-active focus:bg-surface-active focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2 select-none":""} ${e.hiddenOnMobile?"hidden md:table-cell":""} ${i}`,onClick:b?w:void 0,onKeyDown:b?g:void 0,tabIndex:b?0:void 0,style:r?{width:`${r}px`,minWidth:`${r}px`}:void 0},c),{children:n.jsxs("div",{className:"flex items-center gap-2 relative",children:[n.jsx("span",{children:e.label}),C&&n.jsx("span",{className:"text-fg-tertiary","aria-hidden":"true",children:f.direction==="asc"?"↑":"↓"}),t&&s&&n.jsx("div",{ref:h,className:"absolute right-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-surface-brand transition-colors",onMouseDown:j,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${e.label} column`,style:{touchAction:"none"}})]})}))}function Fs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{columns:a,selectable:o,selectionState:i,toggleSelectAll:c,actions:u,resizable:d,columnWidths:f,setColumnWidth:p}=Oe();return n.jsxs("tr",P(T({role:"row",className:e},t),{children:[o&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 w-12","aria-label":"Select all",children:n.jsx(Nr,{checked:i.isAllSelected,onChange:c,"aria-label":"Select all rows",className:"my-0",indeterminate:i.isIndeterminate})}),a.map(m=>n.jsx(Ds,{column:m,resizable:d,width:f==null?void 0:f[m.key],onResize:p},m.key)),u&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 text-right text-xs font-medium text-fg-tertiary uppercase tracking-wider w-12","aria-label":"Actions",children:n.jsx("span",{className:"sr-only",children:"Actions"})})]}))}function Ls(r){var s=r,{className:e=""}=s,t=O(s,["className"]);return Oe(),n.jsx("thead",P(T({className:`bg-surface-subtle sticky top-0 ${ue("sticky")} ${e}`},t),{children:n.jsx(Fs,{})}))}function _s(a){var o=a,{column:e,row:t,className:r=""}=o,s=O(o,["column","row","className"]);const i=e.key in t?t[e.key]:void 0;return n.jsx("td",P(T({className:`px-6 py-4 whitespace-nowrap text-sm text-fg-primary ${e.hiddenOnMobile?"hidden md:table-cell":""} ${r}`},s),{children:e.render?e.render(i,t):String(i!=null?i:"")}))}function kd(o){var i=o,{actions:e,row:t,align:r="right",className:s=""}=i,a=O(i,["actions","row","align","className"]);const c=e.map(u=>({label:u.label,onClick:()=>u.onClick(t),variant:u.variant,disabled:u.disabled}));return n.jsx("div",P(T({className:`inline-flex ${s}`},a),{children:n.jsx(Ra,{trigger:n.jsx(Z,{variant:"ghost",size:"sm","aria-label":"Row actions",className:"h-8 w-8 p-0",children:n.jsx(Bl,{className:"h-4 w-4"})}),items:c,align:r})}))}function Ps(a){var o=a,{row:e,align:t="right",className:r=""}=o,s=O(o,["row","align","className"]);const{actions:i}=Oe();if(!i)return null;const c=i(e);return c.length===0?null:n.jsx(kd,T({row:e,actions:c,align:t,className:r},s))}function hr(i){var c=i,{row:e,rowIndex:t,className:r="",onClick:s,style:a}=c,o=O(c,["row","rowIndex","className","onClick","style"]);const{columns:u,selectable:d,selectionState:f,toggleRowSelection:p,getRowId:m,actions:h,onRowClick:x}=Oe(),y=m(e,t),w=f.selectedRows.includes(y),g=j=>{s&&s(j),x&&x(e)};return n.jsxs("tr",P(T({role:"row","aria-selected":d?w:void 0,"aria-rowindex":t+1,className:`hover:bg-surface-hover ${w?"bg-surface-selected":""} ${r}`,onClick:g,style:a},o),{children:[d&&n.jsx("td",{className:"px-6 py-4",children:n.jsx(Nr,{checked:w,onChange:()=>p(y),"aria-label":`Select row ${y}`,className:"my-0"})}),u.map(j=>n.jsx(_s,{column:j,row:e},String(j.key))),h&&n.jsx("td",{className:"px-6 py-4 text-right",children:n.jsx(Ps,{row:e})})]}))}function zs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{emptyMessage:a,emptyStateTitle:o,emptyStateMessage:i,emptyStateIllustration:c,emptyStateAction:u}=Oe();return o||i||c?n.jsxs("div",P(T({className:e},t),{children:[n.jsx(Aa,{title:o||"No data available",message:i||a||"No data available",variant:c?"withIllustration":"default",illustration:c}),u&&n.jsx("div",{className:"mt-4 flex justify-center",children:u})]})):n.jsx("div",P(T({className:`text-center text-fg-secondary ${e}`},t),{children:a||"No data available"}))}function ro(e,t){const{itemHeight:r,containerHeight:s,overscan:a=5,enabled:o=!0}=t,[i,c]=l.useState(0),u=l.useRef(null),d=l.useMemo(()=>{if(!o||e.length===0)return e.map((y,w)=>({index:w,start:w*r,end:(w+1)*r,size:r}));const m=Math.max(0,Math.floor(i/r)-a),h=s?Math.min(e.length,Math.ceil((i+s)/r)+a):e.length,x=[];for(let y=m;y<h;y++)x.push({index:y,start:y*r,end:(y+1)*r,size:r});return x},[e,r,i,s,a,o]),f=e.length*r;return l.useEffect(()=>{if(!o||!u.current)return;const m=u.current,h=()=>{c(m.scrollTop)};return m.addEventListener("scroll",h,{passive:!0}),()=>m.removeEventListener("scroll",h)},[o]),{virtualItems:d,totalHeight:f,scrollOffset:i,setScrollOffset:c,scrollToIndex:m=>{if(!u.current)return;const h=m*r;u.current.scrollTop=h,c(h)},containerRef:u}}function Os(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);var y,w;const{paginatedData:o,loading:i,columns:c,selectable:u,actions:d,virtualScrolling:f,virtualScrollingOptions:p}=Oe(),m=c.length+(u?1:0)+(d?1:0),h=ro(o,{itemHeight:(p==null?void 0:p.itemHeight)||50,containerHeight:p==null?void 0:p.containerHeight,overscan:(p==null?void 0:p.overscan)||5,enabled:f||!1}),x=l.useMemo(()=>f&&h.virtualItems.length>0?h.virtualItems.map(g=>({row:o[g.index],index:g.index})).filter(g=>g.row!==void 0):o.map((g,j)=>({row:g,index:j})),[f,h.virtualItems,o]);return i?n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:Array.from({length:5}).map((g,j)=>n.jsx("tr",{children:Array.from({length:m}).map((C,b)=>n.jsx("td",{className:"px-6 py-4",children:n.jsx(ga,{className:"h-4 w-full"})},b))},j))})):o.length===0?n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:n.jsx("tr",{children:n.jsx("td",{colSpan:m,className:"px-6 py-12",children:n.jsx(zs,{})})})})):typeof e=="function"?n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:o.map((g,j)=>e(g,j))})):n.jsx("tbody",P(T({className:`bg-surface-base divide-y divide-line-default ${t}`,role:"rowgroup"},r),{children:f&&h.virtualItems.length>0&&x.length>0?n.jsxs(n.Fragment,{children:[((y=h.virtualItems[0])==null?void 0:y.start)>0&&n.jsx("tr",{style:{height:h.virtualItems[0].start},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})}),x.map(({row:g,index:j})=>n.jsx(hr,{row:g,rowIndex:j},j)),h.virtualItems.length>0&&n.jsx("tr",{style:{height:Math.max(0,h.totalHeight-(((w=h.virtualItems[h.virtualItems.length-1])==null?void 0:w.end)||0))},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})})]}):x.map(({row:g,index:j})=>n.jsx(hr,{row:g,rowIndex:j},j))}))}function jd(i){var c=i,{filters:e,onFilter:t,initialValues:r={},showClearAll:s=!0,className:a=""}=c,o=O(c,["filters","onFilter","initialValues","showClearAll","className"]);const[u,d]=l.useState(r),[f,p]=l.useState(!1),m=Object.values(u).some(g=>g!==""&&g!==null&&g!==void 0),h=(g,j)=>{const C=P(T({},u),{[g]:j});d(C),t(C)},x=()=>{const g={};e.forEach(j=>{g[j.key]=""}),d(g),t(g)},y=g=>{const j=P(T({},u),{[g]:""});d(j),t(j)},w=Object.values(u).filter(g=>g!==""&&g!==null&&g!==void 0).length;return n.jsx("div",P(T({className:`bg-surface-base border-b border-line-default ${a}`},o),{children:n.jsxs("div",{className:"px-4 py-3 sm:px-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("button",{type:"button",onClick:()=>p(!f),className:"flex items-center gap-2 text-sm font-medium text-fg-secondary hover:text-fg-primary",children:[n.jsx(Ql,{className:"h-4 w-4"}),n.jsx("span",{children:"Filters"}),w>0&&n.jsx("span",{className:`inline-flex items-center ${E("sm","px")} ${E("0.5","py")} rounded text-xs font-medium bg-surface-brand-muted text-fg-brand-emphasis`,children:w})]}),m&&s&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:x,className:"text-sm",children:"Clear all"})]}),f&&n.jsx("div",{className:"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(g=>{const j=u[g.key]||"";return n.jsxs("div",{className:"space-y-1",children:[n.jsx(Tt,{htmlFor:`filter-${g.key}`,variant:"optional",children:g.label}),n.jsxs("div",{className:"relative",children:[g.type==="text"&&n.jsx(Se,{id:`filter-${g.key}`,type:"text",value:j,onChange:C=>h(g.key,C.target.value),placeholder:g.placeholder||`Filter by ${g.label.toLowerCase()}`,size:"sm",variant:"outlined"}),g.type==="select"&&n.jsxs("div",{className:"relative",children:[n.jsx(jr,{id:`filter-${g.key}`,options:[{value:"",label:`All ${g.label}`},...g.options||[]],value:j,onChange:C=>h(g.key,C.target.value)}),j&&n.jsx("button",{type:"button",onClick:()=>y(g.key),className:"absolute right-8 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${g.label} filter`,children:n.jsx(Ne,{className:"h-4 w-4"})})]}),g.type==="date"&&n.jsx(Se,{id:`filter-${g.key}`,type:"date",value:j,onChange:C=>h(g.key,C.target.value),size:"sm",variant:"outlined"}),j&&g.type!=="select"&&n.jsx("button",{type:"button",onClick:()=>y(g.key),className:"absolute right-2 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${g.label} filter`,children:n.jsx(Ne,{className:"h-4 w-4"})})]})]},g.key)})})]})}))}function Vs(s){var a=s,{showClearAll:e=!0,className:t=""}=a,r=O(a,["showClearAll","className"]);const{filterState:o,setFilters:i}=Oe();return o.config.length===0?null:n.jsx(jd,T({filters:o.config,onFilter:i,initialValues:o.values,showClearAll:e,className:t},r))}function Nd(f){var p=f,{page:e,pageSize:t,total:r,onPageChange:s,onPageSizeChange:a,pageSizeOptions:o=[10,25,50,100],showPageSizeSelector:i=!0,showPageInfo:c=!0,className:u=""}=p,d=O(p,["page","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showPageInfo","className"]);const m=Math.ceil(r/t),h=r===0?0:(e-1)*t+1,x=Math.min(e*t,r),y=()=>{e>1&&s(e-1)},w=()=>{e<m&&s(e+1)},g=()=>{e>1&&s(1)},j=()=>{e<m&&s(m)};return n.jsxs("div",P(T({className:`flex items-center justify-between px-4 py-3 bg-surface-base border-t border-line-default sm:px-6 ${u}`},d),{children:[n.jsxs("div",{className:"flex flex-1 justify-between sm:hidden",children:[n.jsx(Z,{variant:"outline",size:"sm",onClick:y,disabled:e===1,children:"Previous"}),n.jsx(Z,{variant:"outline",size:"sm",onClick:w,disabled:e>=m,children:"Next"})]}),n.jsxs("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[c&&n.jsx("div",{children:n.jsxs(Ue,{as:"p",className:"text-sm text-fg-secondary",children:["Showing ",n.jsx("span",{className:"font-medium",children:h})," to"," ",n.jsx("span",{className:"font-medium",children:x})," of"," ",n.jsx("span",{className:"font-medium",children:r})," results"]})}),n.jsxs("div",{className:"flex items-center gap-4",children:[i&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Ue,{as:"span",className:"text-sm text-fg-secondary",children:"Show:"}),n.jsx(jr,{"aria-label":"Items per page",options:o.map(C=>({value:C.toString(),label:C.toString()})),value:t.toString(),onChange:C=>{const b=parseInt(C.target.value);a(b),s(1)},className:"w-20"})]}),n.jsxs("nav",{className:"flex items-center gap-1","aria-label":"Pagination",children:[n.jsxs(Z,{variant:"ghost",size:"sm",onClick:g,disabled:e===1,"aria-label":"First page",children:[n.jsx(Bt,{className:"h-4 w-4"}),n.jsx(Bt,{className:"h-4 w-4 -ml-2"})]}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:y,disabled:e===1,"aria-label":"Previous page",children:n.jsx(Bt,{className:"h-4 w-4"})}),n.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(5,m)},(C,b)=>{let v;return m<=5||e<=3?v=b+1:e>=m-2?v=m-4+b:v=e-2+b,n.jsx(Z,{variant:e===v?"primary":"ghost",size:"sm",onClick:()=>s(v),className:"min-w-10","aria-label":`Page ${v}`,"aria-current":e===v?"page":void 0,children:v},v)})}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:w,disabled:e>=m,"aria-label":"Next page",children:n.jsx(bt,{className:"h-4 w-4"})}),n.jsxs(Z,{variant:"ghost",size:"sm",onClick:j,disabled:e>=m,"aria-label":"Last page",children:[n.jsx(bt,{className:"h-4 w-4"}),n.jsx(bt,{className:"h-4 w-4 -ml-2"})]})]})]})]})]}))}function Ws(o){var i=o,{showPageSizeSelector:e=!0,showPageInfo:t=!0,pageSizeOptions:r,className:s=""}=i,a=O(i,["showPageSizeSelector","showPageInfo","pageSizeOptions","className"]);const{paginationState:c,setPage:u,setPageSize:d,paginationMode:f}=Oe();return f==="client"&&c.totalPages<=1?null:n.jsx(Nd,T({page:c.page,pageSize:c.pageSize,total:c.total,onPageChange:u,onPageSizeChange:d,pageSizeOptions:r,showPageSizeSelector:e,showPageInfo:t,className:s},a))}function Ce(e){const o=e,{className:t=""}=o,r=O(o,["className"]),s="children"in e&&e.children!==void 0,a=s?r:Sd(r);return s?n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsx(cs,P(T({},a),{children:e.children}))}):n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsxs(cs,P(T({},a),{children:[a.filters&&a.filters.length>0&&n.jsx(Vs,{}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-line-default",role:"table","aria-label":e["aria-label"],"aria-labelledby":e["aria-labelledby"],"aria-rowcount":a.total||a.data.length,"aria-colcount":a.columns.length+(a.selectable?1:0)+(a.actions?1:0),children:[n.jsx(Ls,{}),n.jsx(Os,{})]})}),n.jsx(Ws,{})]}))})}function Sd(e){const{columns:t,data:r,loading:s,onSort:a,sortColumn:o,sortDirection:i,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,pagination:m,filters:h,selectable:x,selectedRows:y,onSelectionChange:w,rowId:g,actions:j,onRowClick:C,paginationMode:b,defaultPageSize:v,resizable:N,columnWidths:_,onColumnResize:S,virtualScrolling:M,virtualScrollingOptions:F}=e;let R=b||"auto";return R==="auto"&&(R=m&&m.total!==void 0&&m.onPageChange?"server":"client"),{columns:t,data:r,loading:s,paginationMode:R,page:m==null?void 0:m.page,pageSize:m==null?void 0:m.pageSize,total:m==null?void 0:m.total,onPageChange:m==null?void 0:m.onPageChange,onPageSizeChange:m==null?void 0:m.onPageSizeChange,defaultPageSize:v||(m==null?void 0:m.pageSize)||10,pageSizeOptions:m==null?void 0:m.pageSizeOptions,sortColumn:o,sortDirection:i,onSort:a,filters:h==null?void 0:h.config,filterValues:h==null?void 0:h.initialValues,onFilter:h==null?void 0:h.onFilter,initialFilterValues:h==null?void 0:h.initialValues,selectable:x,selectedRows:y,onSelectionChange:w,rowId:g,actions:j,onRowClick:C,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,resizable:N,columnWidths:_,onColumnResize:S,virtualScrolling:M,virtualScrollingOptions:F,children:n.jsx(n.Fragment,{})}}Ce.Header=Ls;Ce.HeaderRow=Fs;Ce.HeaderCell=Ds;Ce.Body=Os;Ce.Row=hr;Ce.Cell=_s;Ce.Filters=Vs;Ce.Pagination=Ws;Ce.EmptyState=zs;Ce.Actions=Ps;function Cd(e={}){const{defaultWidths:t={},minWidth:r=50,maxWidth:s,resizable:a=!0}=e,[o,i]=l.useState(t),[c,u]=l.useState(!1),[d,f]=l.useState(null),p=l.useRef(null),m=l.useCallback((C,b)=>{const v=Math.max(r,s?Math.min(b,s):b);i(N=>P(T({},N),{[C]:v}))},[r,s]),h=l.useCallback(()=>{i(t)},[t]),x=l.useCallback((C,b,v)=>{a&&(u(!0),f(C),p.current={startX:b,startWidth:v})},[a]),y=l.useCallback(C=>{if(!c||!d||!p.current)return;const b=C-p.current.startX,v=p.current.startWidth+b;m(d,v)},[c,d,m]),w=l.useCallback(()=>{u(!1),f(null),p.current=null},[]),g=l.useRef(void 0),j=l.useRef(void 0);return typeof window!="undefined"&&(g.current=C=>{c&&y(C.clientX)},j.current=()=>{c&&w()},c?(document.addEventListener("mousemove",g.current),document.addEventListener("mouseup",j.current)):(g.current&&document.removeEventListener("mousemove",g.current),j.current&&document.removeEventListener("mouseup",j.current))),{columnWidths:o,setColumnWidth:m,resetColumnWidths:h,isResizing:c,resizingColumn:d,startResize:x,handleResize:y,endResize:w}}const Ir=l.createContext(null);function $d(){return l.useContext(Ir)}function lt(){const e=l.useContext(Ir);if(!e)throw new Error("useSideNavbarThemeRequired must be used within SideNavbarThemeProvider");return e}const Et={variant:"default",navigationWidth:"56px",contentWidth:"320px",animationDuration:300,animationEasing:"ease-in-out"};function Hs({children:e,variant:t=Et.variant,navigationWidth:r=Et.navigationWidth,contentWidth:s=Et.contentWidth,animationDuration:a=Et.animationDuration,animationEasing:o=Et.animationEasing}){const i=l.useMemo(()=>({variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o}),[t,r,s,a,o]);return n.jsx(Ir.Provider,{value:i,children:e})}const Dr=l.createContext(null);function Ed(){return l.useContext(Dr)}function vt(){const e=l.useContext(Dr);if(!e)throw new Error("useSideNavbarConfigRequired must be used within SideNavbarConfigProvider");return e}const we={mode:"full",resizable:!1,minWidth:void 0,maxWidth:void 0,snapPoints:void 0,responsive:!1,mobileBreakpoint:768,mobileVariant:"collapse",overlayBackdrop:!0,persistState:!0,persistWidth:!1,storageKey:void 0,keyboardShortcut:"Ctrl+B",enableKeyboardShortcut:!0};function Bs({children:e,mode:t=we.mode,resizable:r=we.resizable,minWidth:s=we.minWidth,maxWidth:a=we.maxWidth,snapPoints:o=we.snapPoints,responsive:i=we.responsive,mobileBreakpoint:c=we.mobileBreakpoint,mobileVariant:u=we.mobileVariant,overlayBackdrop:d=we.overlayBackdrop,persistState:f=we.persistState,persistWidth:p=we.persistWidth,storageKey:m=we.storageKey,keyboardShortcut:h=we.keyboardShortcut,enableKeyboardShortcut:x=we.enableKeyboardShortcut}){const y=l.useMemo(()=>({mode:t,resizable:r,minWidth:s,maxWidth:a,snapPoints:o,responsive:i,mobileBreakpoint:c,mobileVariant:u,overlayBackdrop:d,persistState:f,persistWidth:p,storageKey:m,keyboardShortcut:h,enableKeyboardShortcut:x}),[t,r,s,a,o,i,c,u,d,f,p,m,h,x]);return n.jsx(Dr.Provider,{value:y,children:e})}const Fr=l.createContext(null);function Md(){return l.useContext(Fr)}function ct(){const e=l.useContext(Fr);if(!e)throw new Error("useSideNavbarStateRequired must be used within SideNavbarStateProvider");return e}function br(e){if(typeof e=="number")return e;const t=parseFloat(e);return isNaN(t)?0:e.endsWith("rem")||e.endsWith("em")?t*16:(e.endsWith("px"),t)}function so(e,t){return e===void 0||t===void 0?!0:e<t}function lr(e,t,r){let s=e;return t!==void 0&&(s=Math.max(s,t)),r!==void 0&&(s=Math.min(s,r)),s}const Td=["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(Td.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 Ad(e,t="windows"){if(!e.isValid)return"";const r=[];return t==="mac"?(e.ctrl&&r.push("⌘"),e.shift&&r.push("⇧"),e.alt&&r.push("⌥"),e.meta&&r.push("⌃"),r.push(e.key.toUpperCase()),r.join("")):(e.ctrl&&r.push("Ctrl"),e.shift&&r.push("Shift"),e.alt&&r.push("Alt"),e.meta&&r.push("Meta"),r.push(e.key.toUpperCase()),r.join("+"))}function ao({initialWidth:e,minWidth:t,maxWidth:r,snapPoints:s,snapThreshold:a=20,onWidthChange:o,enabled:i=!0}){process.env.NODE_ENV==="development"&&(so(t,r)||console.warn("[useResize] Invalid bounds: minWidth must be less than maxWidth",{minWidth:t,maxWidth:r}));const c=lr(e,t,r),[u,d]=l.useState(c),[f,p]=l.useState(!1),m=l.useRef(0),h=l.useRef(c),x=l.useCallback(j=>{let C=lr(j,t,r);if(s&&s.length>0){const b=s.reduce((v,N)=>{const _=Math.abs(C-N),S=Math.abs(C-v);return _<S?N:v},s[0]);Math.abs(C-b)<=a&&(C=b)}d(C),o==null||o(C)},[t,r,s,a,o]),y=l.useCallback(j=>{if(!i||!f)return;const C=j.clientX-m.current,b=h.current+C;x(b)},[i,f,x]),w=l.useCallback(()=>{i&&(p(!1),m.current=0,h.current=u)},[i,u]),g=l.useCallback(j=>{i&&(j.preventDefault(),j.stopPropagation(),p(!0),m.current=j.clientX,h.current=u)},[i,u]);return l.useEffect(()=>{if(f)return document.addEventListener("mousemove",y),document.addEventListener("mouseup",w),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",w),document.body.style.userSelect="",document.body.style.cursor=""}},[f,y,w]),l.useEffect(()=>{f||d(lr(e,t,r))},[e,t,r,f]),{width:u,isResizing:f,startResize:g,setWidth:x}}function oo({mobileBreakpoint:e=768,onMobileChange:t,enabled:r=!0}={}){const[s,a]=l.useState(typeof window!="undefined"?window.innerWidth:1024),[o,i]=l.useState(typeof window!="undefined"?window.innerWidth<e:!1),c=l.useCallback(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),d!==o&&(i(d),t==null||t(d))},[r,e,o,t]);return l.useEffect(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),i(d),window.addEventListener("resize",c);let f=null;return window.ResizeObserver&&(f=new ResizeObserver(()=>{c()}),f.observe(document.body)),()=>{window.removeEventListener("resize",c),f==null||f.disconnect()}},[r,e,c]),{isMobile:o,viewportWidth:s}}function io({isActive:e,containerRef:t,restoreFocus:r=!0,initialFocusRef:s}){const a=l.useRef(null);l.useEffect(()=>{if(e){if(a.current=document.activeElement,s!=null&&s.current)s.current.focus();else if(t.current){const i=t.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');i==null||i.focus()}}else r&&a.current&&(a.current.focus(),a.current=null)},[e,t,s,r]);const o=l.useCallback(i=>{if(!(!e||!t.current)&&i.key==="Tab"){const c=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),u=c[0],d=c[c.length-1];i.shiftKey?document.activeElement===u&&(i.preventDefault(),d==null||d.focus()):document.activeElement===d&&(i.preventDefault(),u==null||u.focus())}},[e,t]);l.useEffect(()=>{if(e)return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[e,o])}function lo({key:e,ctrl:t=!1,shift:r=!1,alt:s=!1,meta:a=!1,onTrigger:o,enabled:i=!0,preventDefault:c=!0}){const u=l.useCallback(d=>{if(!i)return;const f=d.target;if((f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.isContentEditable)&&!t&&!a)return;const m=e.length===1?d.key.toLowerCase()===e.toLowerCase():d.key===e,h=t?d.ctrlKey||d.metaKey:!d.ctrlKey&&!d.metaKey,x=r?d.shiftKey:!d.shiftKey,y=s?d.altKey:!d.altKey,w=a?d.metaKey:!d.metaKey,g=t?(d.ctrlKey||d.metaKey)&&!a:h&&w;m&&g&&x&&y&&(c&&(d.preventDefault(),d.stopPropagation()),o())},[i,e,t,r,s,a,o,c]);l.useEffect(()=>{if(i)return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[i,u])}function Us({children:e,defaultCollapsed:t=!1,collapsed:r,onCollapseChange:s,onWidthChange:a,onMobileChange:o,exclusiveGroups:i=!1}){const c=lt(),u=vt(),d=l.useRef(null),f=r!==void 0,p=()=>{if(f)return r;if(u.storageKey&&u.persistState&&typeof window!="undefined"){const A=localStorage.getItem(`${u.storageKey}-collapsed`);if(A!==null)return A==="true"}return t},m=()=>{if(u.storageKey&&u.persistWidth&&typeof window!="undefined"){const A=localStorage.getItem(`${u.storageKey}-width`);if(A!==null){const V=parseInt(A,10);if(!isNaN(V))return V}}return br(c.contentWidth)},[h,x]=l.useState(p),[y,w]=l.useState({}),{isMobile:g}=oo({mobileBreakpoint:u.mobileBreakpoint,onMobileChange:A=>{o==null||o(A),A&&u.mobileVariant==="collapse"&&!f&&x(!0)},enabled:u.responsive}),{width:j,isResizing:C,startResize:b,setWidth:v}=ao({initialWidth:m(),minWidth:u.minWidth,maxWidth:u.maxWidth,snapPoints:u.snapPoints,onWidthChange:A=>{a==null||a(A),u.storageKey&&u.persistWidth&&typeof window!="undefined"&&localStorage.setItem(`${u.storageKey}-width`,String(A))},enabled:u.resizable&&!g});io({isActive:g&&u.mobileVariant==="overlay"&&!h,containerRef:d,restoreFocus:!0});const N=f?r:h,_=l.useCallback(A=>{f||x(A),s==null||s(A)},[f,s]),S=l.useCallback(()=>{_(!N)},[N,_]),M=no(u.keyboardShortcut);lo({key:M.key,ctrl:M.ctrl,shift:M.shift,alt:M.alt,meta:M.meta,onTrigger:S,enabled:u.enableKeyboardShortcut});const F=l.useCallback(A=>{v(A)},[v]),R=l.useCallback(A=>{w(i?V=>{const H=V[A]===!1,W={},ie=new Set([...Object.keys(V),A]);return H?ie.forEach(ne=>{W[ne]=!0}):ie.forEach(ne=>{W[ne]=ne!==A}),W}:V=>P(T({},V),{[A]:!V[A]}))},[i]),D=l.useCallback((A,V)=>{w(Y=>P(T({},Y),{[A]:V}))},[]);l.useEffect(()=>{f&&r!==h&&x(r)},[f,r,h]),l.useEffect(()=>{u.storageKey&&u.persistState&&typeof window!="undefined"&&!f&&localStorage.setItem(`${u.storageKey}-collapsed`,String(h))},[u.storageKey,u.persistState,h,f]);const I=l.useMemo(()=>({collapsed:N,toggle:S,setCollapsed:_,currentWidth:j,setWidth:F,isMobile:g,isResizing:C,startResize:b,groupStates:y,toggleGroup:R,setGroupCollapsed:D,sidebarRef:d}),[N,S,_,j,F,g,C,b,y,R,D]);return n.jsx(Fr.Provider,{value:I,children:e})}function qs({children:e,variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:y,persistWidth:w,storageKey:g,keyboardShortcut:j,enableKeyboardShortcut:C,defaultCollapsed:b,collapsed:v,onCollapseChange:N,onWidthChange:_,onMobileChange:S,exclusiveGroups:M}){return n.jsx(Hs,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,children:n.jsx(Bs,{mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:y,persistWidth:w,storageKey:g,keyboardShortcut:j,enableKeyboardShortcut:C,children:n.jsx(Us,{defaultCollapsed:b,collapsed:v,onCollapseChange:N,onWidthChange:_,onMobileChange:S,exclusiveGroups:M,children:e})})})}const Lr=l.createContext(null);function Gs(){return l.useContext(Lr)}function Ks(){const e=l.useContext(Lr);if(!e)throw new Error("useSidebarSlotRequired must be used within SidebarSlotProvider");return e}function co({children:e,defaultSlot:t=null}){const[r,s]=l.useState(t),a=l.useRef(new Map),o=l.useCallback((u,d)=>{a.current.set(u,d)},[]),i=l.useCallback(u=>{a.current.delete(u)},[]),c=l.useMemo(()=>({activeSlot:r,setActiveSlot:s,slots:a.current,registerSlot:o,unregisterSlot:i}),[r,o,i]);return n.jsx(Lr.Provider,{value:c,children:e})}const _r=l.createContext(null);function Rd(){return l.useContext(_r)}function Ys(){const e=l.useContext(_r);return e||{showMainToggle:!0,mainTogglePosition:"floating"}}function Xs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{currentWidth:a,setWidth:o,isResizing:i,startResize:c}=ct(),{resizable:u}=vt();return u?n.jsxs("div",P(T({className:`
|
|
387
387
|
group
|
|
388
388
|
absolute
|
|
389
389
|
top-0
|
|
@@ -419,21 +419,21 @@ React keys must be passed directly to JSX without using spread:
|
|
|
419
419
|
transition-opacity
|
|
420
420
|
absolute
|
|
421
421
|
${i?"opacity-100":""}
|
|
422
|
-
`,"aria-hidden":"true"})]})):null}function Js(o){var i=o,{visible:e,onBackdropClick:t,className:r="",style:s}=i,a=O(i,["visible","onBackdropClick","className","style"]);const{collapsed:c,setCollapsed:u,isMobile:d}=
|
|
422
|
+
`,"aria-hidden":"true"})]})):null}function Js(o){var i=o,{visible:e,onBackdropClick:t,className:r="",style:s}=i,a=O(i,["visible","onBackdropClick","className","style"]);const{collapsed:c,setCollapsed:u,isMobile:d}=ct(),{animationDuration:f}=lt(),{mobileVariant:p,overlayBackdrop:m}=vt(),h=d&&p==="overlay",x=e!=null?e:h&&m&&!c,y=()=>{t?t():u(!0)};return x?n.jsx("div",T({className:`
|
|
423
423
|
fixed inset-0
|
|
424
424
|
bg-scrim
|
|
425
425
|
${ue("modal-backdrop")}
|
|
426
426
|
${r}
|
|
427
|
-
`,style:T({animation:`fadeIn ${f}ms ease-in-out`},s),onClick:y,"aria-hidden":"true","data-testid":"side-navbar-backdrop"},a)):null}const Id={xs:"w-5 h-5",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},Dd={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},
|
|
427
|
+
`,style:T({animation:`fadeIn ${f}ms ease-in-out`},s),onClick:y,"aria-hidden":"true","data-testid":"side-navbar-backdrop"},a)):null}const Id={xs:"w-5 h-5",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},Dd={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},Fd={floating:`absolute ${ue("fixed")}`,top:"absolute top-2 right-2 z-10",bottom:"absolute bottom-2 right-2 z-10",inside:"relative z-10","navigation-top":"relative mt-2 mx-auto z-10","navigation-bottom":"relative mt-auto mb-2 mx-auto z-10"},Ld={default:"bg-surface-raised border border-line-default shadow-sm hover:bg-surface-hover hover:shadow",ghost:"bg-transparent hover:bg-surface-hover border-0",outline:"bg-transparent border border-line-default hover:bg-surface-hover"},_d={floating:"right",top:"bottom",bottom:"top",inside:"right","navigation-top":"right","navigation-bottom":"right"};function Qs(y){var w=y,{position:e="floating",offset:t,icon:r,expandIcon:s,collapseIcon:a,size:o="sm",variant:i="default",showTooltip:c=!0,tooltipPosition:u,keyboardShortcut:d,enableKeyboardShortcut:f,className:p="",style:m,"aria-label":h}=w,x=O(w,["position","offset","icon","expandIcon","collapseIcon","size","variant","showTooltip","tooltipPosition","keyboardShortcut","enableKeyboardShortcut","className","style","aria-label"]);var W,ie;const{collapsed:g,toggle:j}=ct(),{animationDuration:C,animationEasing:b,navigationWidth:v,contentWidth:N,minWidth:_}=lt(),S=vt(),M=d!=null?d:S.keyboardShortcut,F=f!=null?f:S.enableKeyboardShortcut,R=()=>{if(typeof r=="function")return r(g);if(r)return r;if(g&&s)return s;if(!g&&a)return a;const ne=g?cc:ic;return n.jsx(ne,{className:Dd[o],style:{transition:"none",transform:"none",willChange:"auto"}})},D=g?"Expand sidebar":"Collapse sidebar",I=u!=null?u:_d[e],A=c?`${g?"Expand":"Collapse"} sidebar${F?` (${M})`:""}`:void 0,V=t?{transform:`translate(${(W=t.x)!=null?W:0}px, ${(ie=t.y)!=null?ie:0}px)`}:{},Y=e==="floating"?T({right:"-12px",top:"1rem",transform:"translateY(-50%)",transition:`right ${C}ms ${b}`},V):V,H=n.jsx("button",P(T({type:"button",onClick:j,className:`
|
|
428
428
|
${Id[o]}
|
|
429
|
-
${
|
|
429
|
+
${Ld[i]}
|
|
430
430
|
rounded-full
|
|
431
431
|
flex items-center justify-center
|
|
432
432
|
text-fg-secondary hover:text-fg-primary
|
|
433
433
|
focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-1
|
|
434
|
-
${e==="floating"?"":
|
|
434
|
+
${e==="floating"?"":Fd[e]}
|
|
435
435
|
${p}
|
|
436
|
-
`,style:T(T(T(T({},e==="floating"?{position:"absolute",right:"-11px",left:"auto"}:{}),e!=="floating"?Y:{}),e==="floating"?{zIndex:kn.fixed.value}:{}),m),"aria-label":h||
|
|
436
|
+
`,style:T(T(T(T({},e==="floating"?{position:"absolute",right:"-11px",left:"auto"}:{}),e!=="floating"?Y:{}),e==="floating"?{zIndex:kn.fixed.value}:{}),m),"aria-label":h||D,"aria-expanded":!g,"aria-controls":"side-navbar-sidebar","data-position":e},x),{children:R()}));if(e==="floating"){const ne=c&&A?n.jsx(Ut,{content:A,position:I,preservePositioning:!0,children:H}):H;return n.jsx("div",{style:{position:"absolute",right:"0",top:"1rem",transform:"translateY(-50%)",zIndex:kn.fixed.value},children:ne})}return c&&A?n.jsx(Ut,{content:A,position:I,children:H}):H}const Pd={default:"",compact:"text-sm",elevated:"shadow-lg",minimal:"border-0",bordered:"border-2"};function uo(o){var i=o,{children:e,className:t="",style:r,"aria-label":s}=i,a=O(i,["children","className","style","aria-label"]);const c=ct(),u=lt(),d=vt(),f=Ys(),{collapsed:p,setCollapsed:m,currentWidth:h,isResizing:x,sidebarRef:y,isMobile:w}=c,{variant:g,navigationWidth:j,contentWidth:C,animationDuration:b,animationEasing:v}=u,{mode:N,resizable:_,mobileVariant:S,overlayBackdrop:M}=d,F=typeof j=="number"?`${j}px`:j,R=typeof C=="number"?`${C}px`:C,I=N==="navigation"||p?F:_?`${h}px`:R,[A,V]=l.useState(!1);l.useEffect(()=>{V(!0)},[]);const Y=w&&S==="overlay",H=A&&Y,W=H?`fixed left-0 top-0 ${ue("fixed")}`:"relative";return n.jsxs(n.Fragment,{children:[A&&Y&&M&&!p&&n.jsx(Js,{}),n.jsxs("aside",P(T({ref:y,className:k(W,"flex","h-full","overflow-visible",Pd[g],H&&p?"-translate-x-full":"translate-x-0",t),style:T({position:H?"fixed":"relative",backgroundColor:"var(--color-surface-subtle)",borderRight:"1px solid var(--color-line-default)",width:I,minWidth:I,transitionProperty:x?"none":"width, min-width, transform",transitionDuration:`${b}ms`,transitionTimingFunction:v},r),role:"complementary","aria-label":s||"Sidebar navigation","aria-expanded":N!=="navigation"?!p:void 0,"data-mode":N,"data-collapsed":p},a),{children:[_&&N!=="navigation"&&!p&&n.jsx(Xs,{}),f.showMainToggle&&N!=="navigation"&&n.jsx(Qs,{position:f.mainTogglePosition}),n.jsx("div",{className:"flex h-full w-full overflow-visible",children:e})]}))]})}const Pr=l.createContext(null);function zd(){return l.useContext(Pr)}function zr(){const e=l.useContext(Pr);if(!e)throw new Error("useNavbarRequired must be used within a SideNavbar.Navbar component");return e}function gr(o){var i=o,{icon:e,size:t="sm",variant:r="ghost",className:s=""}=i,a=O(i,["icon","size","variant","className"]);const{collapsed:c,toggle:u}=zr(),d=()=>{if(e)return typeof e=="function"?e(c):e;const h=c?bt:Bt;return n.jsx(h,{className:p[t],style:{transition:"none",transform:"none",willChange:"auto"}})},f={xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10"},p={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5"},m={default:"bg-surface-base border border-line-default shadow-sm hover:bg-surface-hover",ghost:"hover:bg-surface-active",outline:"border border-line-emphasis hover:bg-surface-hover"};return n.jsx(Ut,{content:c?"Expand sidebar":"Collapse sidebar",position:"right",children:n.jsx("button",P(T({type:"button",onClick:u,className:`
|
|
437
437
|
flex
|
|
438
438
|
items-center
|
|
439
439
|
justify-center
|
|
@@ -448,7 +448,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
448
448
|
${m[r]}
|
|
449
449
|
[&:hover]:!transform-none
|
|
450
450
|
${s}
|
|
451
|
-
`,style:{willChange:"auto",transform:"none",transition:"none"},"aria-label":c?"Expand sidebar":"Collapse sidebar","aria-expanded":!c},a),{children:d()}))})}const Od={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"}},Vd={default:"bg-error",success:"bg-success",warning:"bg-warning",danger:"bg-error-dark"},Wd={tooltip:"",inline:`flex-row ${E("sm","gap")} w-full ${E("md","px")}`,below:`flex-col ${E("1.5","gap")}`};function fo(g){var j=g,{id:e,icon:t,label:r,labelMode:s,showLabel:a=!0,active:o=!1,showTooltip:i=!0,badge:c,badgeVariant:u="default",variant:d="default",size:f="md",href:p,target:m,onClick:h,disabled:x=!1,className:y=""}=j,
|
|
451
|
+
`,style:{willChange:"auto",transform:"none",transition:"none"},"aria-label":c?"Expand sidebar":"Collapse sidebar","aria-expanded":!c},a),{children:d()}))})}const Od={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"}},Vd={default:"bg-error",success:"bg-success",warning:"bg-warning",danger:"bg-error-dark"},Wd={tooltip:"",inline:`flex-row ${E("sm","gap")} w-full ${E("md","px")}`,below:`flex-col ${E("1.5","gap")}`};function fo(g){var j=g,{id:e,icon:t,label:r,labelMode:s,showLabel:a=!0,active:o=!1,showTooltip:i=!0,badge:c,badgeVariant:u="default",variant:d="default",size:f="md",href:p,target:m,onClick:h,disabled:x=!1,className:y=""}=j,w=O(j,["id","icon","label","labelMode","showLabel","active","showTooltip","badge","badgeVariant","variant","size","href","target","onClick","disabled","className"]);var Y;const{activeItem:C,setActiveItem:b,labelMode:v}=zr(),N=(Y=s!=null?s:v)!=null?Y:"tooltip",_=o||e&&C===e,S=Od[f],M=H=>{if(x){H.preventDefault();return}e&&b(e),h==null||h()},F=N!=="tooltip"&&a&&r&&n.jsx("span",{className:k("text-xs","flex-shrink-0","relative z-10",N==="below"&&"text-center",N==="inline"&&"truncate"),style:{willChange:"auto",transform:"none",zIndex:10},children:r}),R=k("relative","flex","items-center",N==="inline"?"justify-start":"justify-center",N==="below"&&"flex-col","rounded-lg","box-border","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1","w-full","flex-shrink-0","min-w-0","[&>*]:!transition-none","[&>*]:!transform-none",N==="tooltip"?S.container:k(E("sm","px"),E("1.5","py")),N!=="tooltip"&&Wd[N],x?"opacity-50 cursor-not-allowed":"cursor-pointer",y),D={default:_?"bg-surface-brand-muted text-fg-brand-emphasis":x?"text-fg-disabled":"text-fg-secondary hover:bg-surface-active hover:text-fg-primary [&:hover]:!transform-none",ghost:_?"text-fg-brand-emphasis":x?"text-fg-disabled":"text-fg-secondary hover:text-fg-primary [&:hover]:!transform-none",subtle:_?"bg-surface-active text-fg-primary":x?"text-fg-disabled":"text-fg-tertiary hover:bg-surface-hover hover:text-fg-primary [&:hover]:!transform-none"},I=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:k("flex-shrink-0",S.icon,"[&>svg]:transition-none","[&>svg]:!transform-none","[&>svg]:!will-change-auto","box-border","flex items-center justify-center",`relative ${ue("base")}`),style:{minWidth:S.icon==="w-4 h-4"?"1rem":S.icon==="w-5 h-5"?"1.25rem":"1.5rem",minHeight:S.icon==="w-4 h-4"?"1rem":S.icon==="w-5 h-5"?"1.25rem":"1.5rem",willChange:"auto",transform:"none",transition:"none",zIndex:N!=="tooltip"?0:"auto"},children:t}),F,c!=null&&n.jsx("span",{className:k("absolute","-top-1","-right-1","flex","items-center","justify-center","px-1","font-medium","text-fg-inverse","rounded-full",S.badge,Vd[u]),children:c})]}),A={willChange:"auto",transform:"none",transition:"none"},V=p?n.jsx("a",{href:p,target:m,rel:m==="_blank"?"noopener noreferrer":void 0,onClick:M,className:k(R,D[d]),style:A,"aria-label":r,"aria-current":_?"page":void 0,"aria-disabled":x,children:I}):n.jsx("button",P(T({type:"button",onClick:M,disabled:x,className:k(R,D[d]),style:A,"aria-label":r,"aria-current":_?"page":void 0},w),{children:I}));return N==="tooltip"&&i&&r&&!x?n.jsx(Ut,{content:r,position:"right",children:V}):V}function mo(s){var a=s,{orientation:e="horizontal",className:t=""}=a,r=O(a,["orientation","className"]);return e==="vertical"?n.jsx("div",T({className:k("w-px","h-6","bg-line-default","mx-auto",t),role:"separator","aria-orientation":"vertical"},r)):n.jsx("div",T({className:k("w-full","h-px","bg-line-default","my-2","flex-shrink-0",t),role:"separator","aria-orientation":"horizontal",style:{willChange:"auto",transform:"none"}},r))}function po(c){var u=c,{id:e,label:t,collapsible:r=!1,defaultCollapsed:s=!1,children:a,className:o}=u,i=O(u,["id","label","collapsible","defaultCollapsed","children","className"]);const[d,f]=l.useState(s);return n.jsxs("div",P(T({id:e,className:k("flex flex-col",o)},i),{children:[t&&n.jsx("div",{className:k(E("sm","px"),E("1.5","py"),"text-xs text-fg-tertiary uppercase tracking-wider",r&&"cursor-pointer hover:text-fg-secondary"),onClick:r?()=>f(!d):void 0,children:n.jsxs("div",{className:k("flex items-center",E("1.5","gap")),children:[" ",r&&n.jsx("span",{className:"shrink-0",children:d?n.jsx(bt,{className:"w-3 h-3",style:{transition:"none",transform:"none"}}):n.jsx(hs,{className:"w-3 h-3",style:{transition:"none",transform:"none"}})}),n.jsx("span",{children:t})]})}),!d&&n.jsxs("div",{className:"flex flex-col gap-2",children:[" ",a]})]}))}function yt(f){var p=f,{children:e,showMainToggle:t,mainTogglePosition:r,showToggle:s=!1,togglePosition:a="bottom",labelMode:o="tooltip",expandedWidth:i=200,className:c="",style:u}=p,d=O(p,["children","showMainToggle","mainTogglePosition","showToggle","togglePosition","labelMode","expandedWidth","className","style"]);const m=ct(),h=lt(),x=vt(),y=Ys(),w=l.useRef(null),[g,j]=l.useState(null),[C,b]=l.useState(!1),v=t!=null?t:y.showMainToggle;r!=null||y.mainTogglePosition;const N=o==="inline"&&!m.collapsed,_=N?typeof i=="number"?`${i}px`:i:h.navigationWidth,S=l.useMemo(()=>({collapsed:m.collapsed,toggle:m.toggle,navbarRef:w,activeItem:g,setActiveItem:j,isHovered:C,showInternalToggle:s,togglePosition:a,labelMode:o}),[m.collapsed,m.toggle,g,C,s,a,o]);return v&&x.mode,n.jsx(Pr.Provider,{value:S,children:n.jsxs("nav",P(T({ref:w,className:k("relative","flex-shrink-0","flex","flex-col","h-full",N?"items-stretch":"items-center",c),style:T({position:"relative",backgroundColor:"var(--color-surface-raised)",borderRight:"1px solid var(--color-line-default)",width:_,transitionProperty:"width",transitionDuration:`${h.animationDuration}ms`,transitionTimingFunction:h.animationEasing},u),onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),"aria-label":"Side navigation"},d),{children:[s&&a==="top"&&n.jsx("div",{className:"flex-shrink-0 p-2",style:{borderBottom:"1px solid var(--color-line-default)"},children:n.jsx(gr,{})}),n.jsx("div",{className:k("relative","flex-1","flex","flex-col","overflow-y-auto","overflow-x-hidden","p-2","gap-2","w-full","min-w-0",N?"items-stretch":"items-center","justify-start"),style:{zIndex:1},children:e}),s&&a==="bottom"&&n.jsx("div",{className:"flex-shrink-0 p-2",style:{borderTop:"1px solid var(--color-line-default)"},children:n.jsx(gr,{})})]}))})}yt.Toggle=gr;yt.Item=fo;yt.Separator=mo;yt.Group=po;yt.displayName="Navbar";const Or=l.createContext(null);function ho(){return l.useContext(Or)}function Yt(){const e=l.useContext(Or);if(!e)throw new Error("useSidebarRequired must be used within a SideNavbar.Sidebar component");return e}function bo(c){var u=c,{title:e,subtitle:t,showBorder:r=!0,children:s,className:a="",style:o}=u,i=O(u,["title","subtitle","showBorder","children","className","style"]);const{collapsed:d,registerHeader:f,unregisterHeader:p}=Yt();return l.useEffect(()=>(f(),()=>p()),[f,p]),d?null:n.jsx("div",P(T({className:`
|
|
452
452
|
flex-shrink-0
|
|
453
453
|
${E("md","px")}
|
|
454
454
|
${E("sm","py")}
|
|
@@ -465,7 +465,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
465
465
|
text-fg-secondary
|
|
466
466
|
m-0
|
|
467
467
|
mt-1
|
|
468
|
-
`,children:t})]})}))}function go(i){var c=i,{scrollable:e=!0,padding:t="md",children:r,className:s="",style:a}=c,o=O(c,["scrollable","padding","children","className","style"]);const{collapsed:u,setScrollPosition:d}=Yt();if(u)return null;const f=t!=="none"?E(t,"p"):"",p=e?"overflow-y-auto overflow-x-hidden":"overflow-hidden",m=e?{scrollbarWidth:
|
|
468
|
+
`,children:t})]})}))}function go(i){var c=i,{scrollable:e=!0,padding:t="md",children:r,className:s="",style:a}=c,o=O(c,["scrollable","padding","children","className","style"]);const{collapsed:u,setScrollPosition:d}=Yt();if(u)return null;const f=t!=="none"?E(t,"p"):"",p=e?"overflow-y-auto overflow-x-hidden":"overflow-hidden",m=e?{scrollbarWidth:Qe.content.scrollbar.width,scrollbarColor:`${Qe.content.scrollbar.color.thumb} ${Qe.content.scrollbar.color.track}`}:{},h=x=>{e&&d(x.currentTarget.scrollTop)};return n.jsx("div",P(T({className:`
|
|
469
469
|
flex-1
|
|
470
470
|
min-h-0
|
|
471
471
|
${p}
|
|
@@ -477,7 +477,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
477
477
|
${t?"border-t border-line-default":""}
|
|
478
478
|
bg-surface-subtle
|
|
479
479
|
${s}
|
|
480
|
-
`,style:a},o),{children:r}))}function vo(d){var f=d,{id:e,title:t,icon:r,actions:s,collapsible:a=!0,defaultCollapsed:o=!1,children:i,className:c=""}=f,u=O(f,["id","title","icon","actions","collapsible","defaultCollapsed","children","className"]);var N;const{collapsed:p,activeGroup:m,setActiveGroup:h}=Yt(),{groupStates:x,toggleGroup:y,setGroupCollapsed:
|
|
480
|
+
`,style:a},o),{children:r}))}function vo(d){var f=d,{id:e,title:t,icon:r,actions:s,collapsible:a=!0,defaultCollapsed:o=!1,children:i,className:c=""}=f,u=O(f,["id","title","icon","actions","collapsible","defaultCollapsed","children","className"]);var N;const{collapsed:p,activeGroup:m,setActiveGroup:h}=Yt(),{groupStates:x,toggleGroup:y,setGroupCollapsed:w}=ct(),{animationDuration:g}=lt(),j=l.useRef(!1);if(l.useEffect(()=>{!j.current&&x[e]===void 0&&(j.current=!0,w(e,o))},[e,o,x,w]),p)return null;const C=(N=x[e])!=null?N:o,b=m===e,v=()=>{h(e),a&&y(e)};return n.jsxs("div",P(T({className:`
|
|
481
481
|
border-b
|
|
482
482
|
border-line-default
|
|
483
483
|
last:border-b-0
|
|
@@ -500,14 +500,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
500
500
|
text-fg-tertiary
|
|
501
501
|
transition-transform
|
|
502
502
|
${C?"-rotate-90":"rotate-0"}
|
|
503
|
-
`,style:{transitionDuration:`${g}ms`},"aria-hidden":"true"})]})]}),a?n.jsx(xa,{open:!C,duration:g,children:n.jsx("div",{id:`sidebar-group-${e}`,className:"px-3 py-2",children:i})}):n.jsx("div",{className:"px-3 py-2",children:i})]}))}function yo({id:e,children:t}){const{activeSlot:r,registerSlot:s,unregisterSlot:a}=Ks();return l.useEffect(()=>(s(e,t),()=>a(e)),[e,t,s,a]),r!==e?null:n.jsx(n.Fragment,{children:t})}function wo({fallback:e=null}){const{activeSlot:t,slots:r}=Ks();return!t||!r.has(t)?n.jsx(n.Fragment,{children:e}):n.jsx(n.Fragment,{children:r.get(t)})}function
|
|
503
|
+
`,style:{transitionDuration:`${g}ms`},"aria-hidden":"true"})]})]}),a?n.jsx(xa,{open:!C,duration:g,children:n.jsx("div",{id:`sidebar-group-${e}`,className:"px-3 py-2",children:i})}):n.jsx("div",{className:"px-3 py-2",children:i})]}))}function yo({id:e,children:t}){const{activeSlot:r,registerSlot:s,unregisterSlot:a}=Ks();return l.useEffect(()=>(s(e,t),()=>a(e)),[e,t,s,a]),r!==e?null:n.jsx(n.Fragment,{children:t})}function wo({fallback:e=null}){const{activeSlot:t,slots:r}=Ks();return!t||!r.has(t)?n.jsx(n.Fragment,{children:e}):n.jsx(n.Fragment,{children:r.get(t)})}function dt(a){var o=a,{children:e,className:t="",style:r}=o,s=O(o,["children","className","style"]);const i=ct(),c=lt(),u=l.useRef(null),[d,f]=l.useState(0),[p,m]=l.useState(!1),[h,x]=l.useState(!1),[y,w]=l.useState(null),g=l.useCallback(()=>m(!0),[]),j=l.useCallback(()=>m(!1),[]),C=l.useCallback(()=>x(!0),[]),b=l.useCallback(()=>x(!1),[]),v=l.useMemo(()=>({collapsed:i.collapsed,currentWidth:i.currentWidth,isMobile:i.isMobile,sidebarRef:u,scrollPosition:d,setScrollPosition:f,hasHeader:p,hasFooter:h,registerHeader:g,unregisterHeader:j,registerFooter:C,unregisterFooter:b,activeGroup:y,setActiveGroup:w}),[i.collapsed,i.currentWidth,i.isMobile,d,p,h,g,j,C,b,y]),N=br(c.contentWidth),_=br(c.navigationWidth),S=N-_;return n.jsx(Or.Provider,{value:v,children:n.jsx("div",P(T({ref:u,id:"side-navbar-sidebar",className:k("flex","flex-col","h-full","bg-surface-subtle","border-r","border-line-default","overflow-hidden",t),style:T({width:i.collapsed?0:S,opacity:i.collapsed?0:1,visibility:i.collapsed?"hidden":"visible",transitionProperty:"width, opacity, visibility",transitionDuration:`${c.animationDuration}ms`,transitionTimingFunction:c.animationEasing},r),"aria-hidden":i.collapsed},s),{children:e}))})}dt.Header=bo;dt.Content=go;dt.Footer=xo;dt.Group=vo;dt.Slot=yo;dt.SlotContent=wo;function Ee(M){var F=M,{mode:e="full",variant:t="default",navigationWidth:r="56px",width:s="320px",animationDuration:a=300,resizable:o=!1,minWidth:i,maxWidth:c,snapPoints:u,responsive:d=!1,mobileBreakpoint:f=768,mobileVariant:p="collapse",overlayBackdrop:m=!0,storageKey:h,persistWidth:x=!1,defaultCollapsed:y=!1,collapsed:w,onCollapseChange:g,onWidthChange:j,onMobileChange:C,exclusiveGroups:b=!1,showToggle:v=!0,togglePosition:N="floating",children:_}=F,S=O(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 R=l.useMemo(()=>({showMainToggle:v,mainTogglePosition:N}),[v,N]);return n.jsx(_r.Provider,{value:R,children:n.jsx(qs,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,mode:e,resizable:o,minWidth:i,maxWidth:c,snapPoints:u,responsive:d,mobileBreakpoint:f,mobileVariant:p,overlayBackdrop:m,storageKey:h,persistWidth:x,defaultCollapsed:y,collapsed:w,onCollapseChange:g,onWidthChange:j,onMobileChange:C,exclusiveGroups:b,children:n.jsx(uo,P(T({},S),{children:_}))})})}Ee.Navbar=yt;Ee.Sidebar=dt;Ee.Toggle=Qs;Ee.ResizeHandle=Xs;Ee.Backdrop=Js;Ee.Provider=qs;Ee.ThemeProvider=Hs;Ee.ConfigProvider=Bs;Ee.StateProvider=Us;Ee.SlotProvider=co;function Hd({defaultStates:e={},persist:t=!1,storageKey:r}={}){const s=()=>{if(t&&r&&typeof window!="undefined"){const d=localStorage.getItem(`${r}-groups`);if(d)try{const f=JSON.parse(d);return T(T({},e),f)}catch(f){}}return e},[a,o]=l.useState(s);l.useEffect(()=>{t&&r&&typeof window!="undefined"&&localStorage.setItem(`${r}-groups`,JSON.stringify(a))},[t,r,a]);const i=l.useCallback(d=>{o(f=>P(T({},f),{[d]:!f[d]}))},[]),c=l.useCallback((d,f)=>{o(p=>P(T({},p),{[d]:f}))},[]),u=l.useCallback(()=>{o(e)},[e]);return{groupStates:a,toggleGroup:i,setGroupCollapsed:c,resetGroups:u}}function Bd(){const{activeItem:e,setActiveItem:t}=zr(),r=Gs(),s=l.useCallback((a,o)=>{t(a),o&&(r!=null&&r.setActiveSlot)&&r.setActiveSlot(o)},[t,r]);return{activeItem:e,setActiveItem:t,navigate:s}}function Ud(){var r,s,a,o;const e=Gs(),t=ho();return{activeSlot:(r=e==null?void 0:e.activeSlot)!=null?r:null,setActiveSlot:(s=e==null?void 0:e.setActiveSlot)!=null?s:(()=>{}),scrollPosition:(a=t==null?void 0:t.scrollPosition)!=null?a:0,setScrollPosition:(o=t==null?void 0:t.setScrollPosition)!=null?o:(()=>{})}}function qd(){const e=useSideNavbarThemeRequired(),t=useSideNavbarConfigRequired(),r=useSideNavbarStateRequired();return{theme:e,config:t,state:r}}function ko({children:e,asChild:t=!1}){const{onOpenChange:r}=Ft();return t&&l.isValidElement(e)?l.cloneElement(e,{onClick:s=>{r(!0),e.props.onClick&&e.props.onClick(s)}}):n.jsx("button",{type:"button",onClick:()=>r(!0),"aria-haspopup":"dialog",children:e})}function Zs(i){var c=i,{children:e,size:t="md",closeOnOverlayClick:r=!0,closeOnEscape:s=!0,className:a=""}=c,o=O(c,["children","size","closeOnOverlayClick","closeOnEscape","className"]);const{isOpen:u,onClose:d,titleId:f,descriptionId:p}=Ft(),m=l.useRef(null),h=l.useRef(null);if(l.useEffect(()=>{if(!u)return;const g=setTimeout(()=>{var N;const b=(N=m.current)==null?void 0:N.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),v=b==null?void 0:b[0];v==null||v.focus()},0),j=b=>{s&&b.key==="Escape"&&d()},C=b=>{if(b.key!=="Tab"||!m.current)return;const v=Array.from(m.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(S=>!S.disabled&&S.offsetParent!==null);if(v.length===0){b.preventDefault();return}const N=v[0],_=v[v.length-1];b.shiftKey?document.activeElement===N&&(b.preventDefault(),_.focus()):document.activeElement===_&&(b.preventDefault(),N.focus())};return document.addEventListener("keydown",j),document.addEventListener("keydown",C),()=>{clearTimeout(g),document.removeEventListener("keydown",j),document.removeEventListener("keydown",C)}},[u,d,s]),!u)return null;const x={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",fullscreen:"max-w-full h-full m-0 rounded-none"},y=g=>{r&&g.target===h.current&&d()},w=n.jsxs("div",{className:`fixed inset-0 ${ue("modal")} overflow-y-auto`,onClick:y,children:[n.jsx("div",{ref:h,className:"fixed inset-0 bg-scrim transition-opacity","aria-hidden":"true"}),n.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:n.jsx("div",P(T({ref:m,role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":p,className:`
|
|
504
504
|
relative ${ue("modal")} w-full
|
|
505
505
|
${x[t]}
|
|
506
506
|
bg-surface-overlay
|
|
507
507
|
${J("lg")}
|
|
508
|
-
${
|
|
508
|
+
${$e("xl")}
|
|
509
509
|
${a}
|
|
510
|
-
`,tabIndex:-1},o),{children:e}))})]});return typeof window!="undefined"?
|
|
510
|
+
`,tabIndex:-1},o),{children:e}))})]});return typeof window!="undefined"?qe.createPortal(w,document.body):w}function en(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",P(T({className:`flex flex-col space-y-1.5 p-6 pb-4 ${t}`},r),{children:e}))}function jo(o){var i=o,{as:e="h2",children:t,className:r="",id:s}=i,a=O(i,["as","children","className","id"]);const c=Ft(),u=l.useId(),d=s||c.titleId||u;return n.jsx(e,P(T({id:d,className:`${ce("h3")} font-semibold leading-none tracking-tight ${r}`},a),{children:t}))}function No(a){var o=a,{children:e,className:t="",id:r}=o,s=O(o,["children","className","id"]);const i=Ft(),c=l.useId(),u=r||i.descriptionId||c;return n.jsx("p",P(T({id:u,className:`${ce("bodySmall")} text-fg-secondary ${t}`},s),{children:e}))}function tn(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",P(T({className:`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 p-6 pt-4 ${t}`},r),{children:e}))}function So({"aria-label":e="Close dialog",className:t="",asChild:r=!1,children:s}){const{onClose:a}=Ft();return r&&l.isValidElement(s)?l.cloneElement(s,{onClick:o=>{a(),s.props.onClick&&s.props.onClick(o)}}):n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:a,className:`absolute right-4 top-4 ${t}`,"aria-label":e,children:n.jsx(Ne,{className:"h-4 w-4"})})}function Re({children:e,open:t,defaultOpen:r,onOpenChange:s}){const a=l.useId(),o=l.useId();return n.jsx(ps,{open:t,defaultOpen:r,onOpenChange:s,titleId:a,descriptionId:o,children:e})}Re.Trigger=ko;Re.Content=Zs;Re.Header=en;Re.Title=jo;Re.Description=No;Re.Footer=tn;Re.Close=So;function Gd({open:e,defaultOpen:t,onOpenChange:r,title:s,description:a,confirmLabel:o="Confirm",cancelLabel:i="Cancel",variant:c="default",onConfirm:u,onCancel:d,children:f}){const p=()=>{u==null||u(),r==null||r(!1)},m=()=>{d==null||d(),r==null||r(!1)};return n.jsx(Re,{open:e,defaultOpen:t,onOpenChange:r,children:n.jsx(Zs,{size:"sm",closeOnOverlayClick:!1,children:f||n.jsxs(n.Fragment,{children:[n.jsxs(en,{children:[n.jsx(Re.Title,{children:s}),a&&n.jsx(Re.Description,{children:a})]}),n.jsxs(tn,{children:[n.jsx(Z,{variant:"outline",onClick:m,children:i}),n.jsx(Z,{variant:c==="destructive"?"error":"primary",onClick:p,children:o})]})]})})})}const Kd={success:dr,error:bs,warning:mc,info:rc},Yd={success:"border-success",error:"border-error",warning:"border-warning",info:"border-info"},Xd={success:"text-fg-success",error:"text-fg-error",warning:"text-fg-warning",info:"text-fg-info"};function Co(i){var c=i,{toast:e,onDismiss:t,position:r="top-right",className:s="",style:a}=c,o=O(c,["toast","onDismiss","position","className","style"]);const[u,d]=l.useState(!1),[f,p]=l.useState(!1),m=Kd[e.variant];l.useEffect(()=>{if(e.duration===void 0)return;d(!0);const y=setTimeout(()=>{p(!0),setTimeout(()=>{t(e.id)},300)},e.duration);return()=>clearTimeout(y)},[e.duration,e.id,t]),l.useEffect(()=>{const y=setTimeout(()=>d(!0),10);return()=>clearTimeout(y)},[]);const h={"top-right":"top-4 right-4","top-left":"top-4 left-4","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","bottom-center":"bottom-4 left-1/2 -translate-x-1/2"},x=()=>{p(!0),setTimeout(()=>{t(e.id)},300)};return n.jsx("div",P(T({className:`
|
|
511
511
|
fixed ${h[r]} ${ue("toast")}
|
|
512
512
|
w-full max-w-sm
|
|
513
513
|
transition-all duration-300 ease-in-out
|
|
@@ -519,10 +519,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
519
519
|
p-4
|
|
520
520
|
bg-surface-overlay
|
|
521
521
|
${J("lg")}
|
|
522
|
-
${
|
|
522
|
+
${$e("lg")}
|
|
523
523
|
border
|
|
524
524
|
${Yd[e.variant]}
|
|
525
|
-
`,children:[n.jsx("div",{className:`flex-shrink-0 ${Xd[e.variant]}`,children:n.jsx(m,{className:"h-5 w-5","aria-hidden":"true"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"font-medium text-fg-primary",children:e.title}),e.description&&n.jsx("div",{className:"mt-1 text-sm text-fg-secondary",children:e.description}),e.action&&n.jsx("div",{className:"mt-3",children:n.jsx(Z,{variant:"outline",size:"sm",onClick:()=>{var y;(y=e.action)==null||y.onClick(),x()},children:e.action.label})})]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:x,className:"flex-shrink-0","aria-label":"Dismiss notification",children:n.jsx(
|
|
525
|
+
`,children:[n.jsx("div",{className:`flex-shrink-0 ${Xd[e.variant]}`,children:n.jsx(m,{className:"h-5 w-5","aria-hidden":"true"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"font-medium text-fg-primary",children:e.title}),e.description&&n.jsx("div",{className:"mt-1 text-sm text-fg-secondary",children:e.description}),e.action&&n.jsx("div",{className:"mt-3",children:n.jsx(Z,{variant:"outline",size:"sm",onClick:()=>{var y;(y=e.action)==null||y.onClick(),x()},children:e.action.label})})]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:x,className:"flex-shrink-0","aria-label":"Dismiss notification",children:n.jsx(Ne,{className:"h-4 w-4"})})]})}))}function Jd({position:e="top-right",maxToasts:t}){const{toasts:r,removeToast:s}=ms(),a=t?r.slice(0,t):r;if(a.length===0)return null;const o=n.jsx("div",{className:`fixed inset-0 pointer-events-none ${ue("toast")}`,"aria-live":"polite","aria-label":"Notifications",children:a.map((i,c)=>{const u=e.includes("top"),d=1+c*5;return n.jsx(Co,{toast:i,onDismiss:s,position:e,style:{[u?"top":"bottom"]:`${d}rem`}},i.id)})});return typeof window!="undefined"?qe.createPortal(o,document.body):o}function Qd(){const{addToast:e,removeToast:t,clearAll:r}=ms(),s=l.useCallback(d=>e({title:d.title,description:d.description,variant:d.variant||"info",duration:d.duration,action:d.action}),[e]),a=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"success"},p)),[s]),o=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"error"},p)),[s]),i=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"warning"},p)),[s]),c=l.useCallback((d,f,p)=>s(T({title:d,description:f,variant:"info"},p)),[s]),u=l.useCallback((d,f,p,m="info",h)=>s({title:d,description:f,variant:m,duration:h,action:{label:"Undo",onClick:p}}),[s]);return{show:s,success:a,error:o,warning:i,info:c,withUndo:u,dismiss:t,clearAll:r}}function $o({steps:e,currentStep:t,defaultCurrentStep:r=0,onStepChange:s,onComplete:a,allowNavigation:o=!0,showStepNumbers:i=!0,orientation:c="horizontal",className:u=""}){const[d,f]=l.useState(r),p=t!==void 0,m=p?t:d,h=b=>b<m?"completed":b===m?"active":"pending",x=()=>{if(m<e.length-1){const b=m+1;p||f(b),s==null||s(b)}else a==null||a()},y=()=>{if(m>0){const b=m-1;p||f(b),s==null||s(b)}},w=b=>{o&&(e[b].disabled||(p||f(b),s==null||s(b)))},g=e[m],j=m===0,C=m===e.length-1;return c==="vertical"?n.jsxs("div",{className:`flex gap-4 ${u}`,children:[n.jsx("div",{className:"flex flex-col",children:e.map((b,v)=>{const N=b.status||h(v),_=v===m;return n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("button",P(T({type:"button",onClick:()=>w(v),disabled:!o||b.disabled,"aria-label":b.title?`Step ${v+1}: ${b.title}`:`Step ${v+1}`},N==="pending"?{"data-marker":"pending"}:{}),{className:`
|
|
526
526
|
flex
|
|
527
527
|
items-center
|
|
528
528
|
justify-center
|
|
@@ -530,7 +530,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
530
530
|
h-10
|
|
531
531
|
${J("full")}
|
|
532
532
|
border-2
|
|
533
|
-
${
|
|
533
|
+
${be("base")}
|
|
534
534
|
${N==="completed"?"bg-success border-success text-fg-inverse":N==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":N==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
535
535
|
${!o||b.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
536
536
|
`,children:N==="completed"?n.jsx(ns,{className:"h-5 w-5"}):i?v+1:null})),v<e.length-1&&n.jsx("div",{className:`
|
|
@@ -538,7 +538,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
538
538
|
h-12
|
|
539
539
|
mt-2
|
|
540
540
|
${N==="completed"?"bg-success":"bg-line-emphasis"}
|
|
541
|
-
`})]}),n.jsxs("div",{className:"flex-1 pb-8",children:[n.jsx("button",{type:"button",onClick:()=>
|
|
541
|
+
`})]}),n.jsxs("div",{className:"flex-1 pb-8",children:[n.jsx("button",{type:"button",onClick:()=>w(v),disabled:!o||b.disabled,className:`
|
|
542
542
|
text-left
|
|
543
543
|
${_?"font-semibold":"font-medium"}
|
|
544
544
|
${N==="active"?"text-fg-brand-emphasis":"text-fg-secondary"}
|
|
@@ -549,7 +549,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
549
549
|
border-line-default
|
|
550
550
|
${J("lg")}
|
|
551
551
|
bg-surface-base
|
|
552
|
-
`,children:g.content}),n.jsxs("div",{className:`flex justify-between mt-4 ${E("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:y,disabled:j,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:C?"Complete":"Next"})]})]})]}):n.jsxs("div",{className:`space-y-6 ${u}`,children:[n.jsx("div",{className:"flex items-center",children:e.map((b,v)=>{const N=b.status||h(v),_=v===m;return n.jsxs("div",{className:"flex items-center flex-1",children:[n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("button",P(T({type:"button",onClick:()=>
|
|
552
|
+
`,children:g.content}),n.jsxs("div",{className:`flex justify-between mt-4 ${E("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:y,disabled:j,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:C?"Complete":"Next"})]})]})]}):n.jsxs("div",{className:`space-y-6 ${u}`,children:[n.jsx("div",{className:"flex items-center",children:e.map((b,v)=>{const N=b.status||h(v),_=v===m;return n.jsxs("div",{className:"flex items-center flex-1",children:[n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("button",P(T({type:"button",onClick:()=>w(v),disabled:!o||b.disabled,"aria-label":b.title?`Step ${v+1}: ${b.title}`:`Step ${v+1}`},N==="pending"?{"data-marker":"pending"}:{}),{className:`
|
|
553
553
|
flex
|
|
554
554
|
items-center
|
|
555
555
|
justify-center
|
|
@@ -557,7 +557,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
557
557
|
h-10
|
|
558
558
|
${J("full")}
|
|
559
559
|
border-2
|
|
560
|
-
${
|
|
560
|
+
${be("base")}
|
|
561
561
|
${N==="completed"?"bg-success border-success text-fg-inverse":N==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":N==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
562
562
|
${!o||b.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
563
563
|
`,children:N==="completed"?n.jsx(ns,{className:"h-5 w-5"}):i?v+1:null})),n.jsxs("div",{className:`mt-2 text-center ${E("sm","px")}`,children:[n.jsx("p",{className:`
|
|
@@ -572,7 +572,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
572
572
|
border-line-default
|
|
573
573
|
${J("lg")}
|
|
574
574
|
bg-surface-base
|
|
575
|
-
`,children:g.content}),n.jsxs("div",{className:`flex justify-between ${E("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:y,disabled:j,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:C?"Complete":"Next"})]})]})}function
|
|
575
|
+
`,children:g.content}),n.jsxs("div",{className:`flex justify-between ${E("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:y,disabled:j,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:C?"Complete":"Next"})]})]})}function Zd({items:e,orientation:t="vertical",className:r=""}){return t==="horizontal"?n.jsx("div",{className:`flex items-start ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(c=>c.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsx("div",{className:"flex items-start flex-1",children:n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("div",P(T({},o==="default"?{"data-marker":"pending"}:{}),{className:`
|
|
576
576
|
flex
|
|
577
577
|
items-center
|
|
578
578
|
justify-center
|
|
@@ -605,7 +605,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
605
605
|
text-base
|
|
606
606
|
font-semibold
|
|
607
607
|
${o==="active"?"text-fg-brand-emphasis":"text-fg-primary"}
|
|
608
|
-
`,children:s.title}),s.description&&n.jsx("p",{className:"text-sm text-fg-secondary mt-1",children:s.description}),s.content&&n.jsx("div",{className:"mt-3",children:s.content})]})]},s.id)})})}function eu({items:e,open:t,defaultOpen:r=!1,onOpenChange:s,trigger:a,placeholder:o="Type a command or search...",emptyMessage:i="No commands found",className:c=""}){const[u,d]=l.useState(r),[f,p]=l.useState(""),[m,h]=l.useState(0),x=l.useRef(null),y=l.useRef(null),
|
|
608
|
+
`,children:s.title}),s.description&&n.jsx("p",{className:"text-sm text-fg-secondary mt-1",children:s.description}),s.content&&n.jsx("div",{className:"mt-3",children:s.content})]})]},s.id)})})}function eu({items:e,open:t,defaultOpen:r=!1,onOpenChange:s,trigger:a,placeholder:o="Type a command or search...",emptyMessage:i="No commands found",className:c=""}){const[u,d]=l.useState(r),[f,p]=l.useState(""),[m,h]=l.useState(0),x=l.useRef(null),y=l.useRef(null),w=t!==void 0,g=w?t:u,j=e.filter(S=>{var I,A;if(!f)return!0;const M=f.toLowerCase(),F=S.label.toLowerCase().includes(M),R=(I=S.description)==null?void 0:I.toLowerCase().includes(M),D=(A=S.keywords)==null?void 0:A.some(V=>V.toLowerCase().includes(M));return F||R||D}),C=j.reduce((S,M)=>{const F=M.group||"Other";return S[F]||(S[F]=[]),S[F].push(M),S},{}),b=l.useCallback(S=>{w||d(S),s==null||s(S),S&&(p(""),h(0),setTimeout(()=>{var M;return(M=x.current)==null?void 0:M.focus()},0))},[w,s]),v=S=>{S.action(),b(!1)},N=S=>{if(S.key==="Escape"){b(!1);return}if(S.key==="ArrowDown"){S.preventDefault(),h(M=>Math.min(M+1,j.length-1));return}if(S.key==="ArrowUp"){S.preventDefault(),h(M=>Math.max(M-1,0));return}if(S.key==="Enter"){S.preventDefault(),j[m]&&v(j[m]);return}};l.useEffect(()=>{if(y.current&&m>=0){const S=y.current.querySelector(`[data-index="${m}"]`);S&&typeof S.scrollIntoView=="function"&&S.scrollIntoView({block:"nearest",behavior:"smooth"})}},[m]),l.useEffect(()=>{h(0)},[f]),l.useEffect(()=>{const S=M=>{(M.metaKey||M.ctrlKey)&&M.key==="k"&&(M.preventDefault(),b(!g))};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[g,b]);const _=g?n.jsx("div",{className:`
|
|
609
609
|
fixed
|
|
610
610
|
inset-0
|
|
611
611
|
${ue("modal-backdrop")}
|
|
@@ -614,16 +614,16 @@ React keys must be passed directly to JSX without using spread:
|
|
|
614
614
|
items-start
|
|
615
615
|
justify-center
|
|
616
616
|
pt-[20vh]
|
|
617
|
-
${
|
|
617
|
+
${be("base")}
|
|
618
618
|
`,onClick:()=>b(!1),children:n.jsxs("div",{className:`
|
|
619
619
|
w-full
|
|
620
620
|
max-w-2xl
|
|
621
621
|
${E("base","mx")}
|
|
622
622
|
bg-surface-overlay
|
|
623
623
|
${J("lg")}
|
|
624
|
-
${
|
|
624
|
+
${$e("xl")}
|
|
625
625
|
${ue("modal")}
|
|
626
|
-
${
|
|
626
|
+
${be("base")}
|
|
627
627
|
${c}
|
|
628
628
|
`,onClick:S=>S.stopPropagation(),children:[n.jsxs("div",{className:`
|
|
629
629
|
flex
|
|
@@ -632,7 +632,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
632
632
|
${E("base","p")}
|
|
633
633
|
border-b
|
|
634
634
|
border-line-default
|
|
635
|
-
`,children:[n.jsx(as,{className:"h-5 w-5 text-fg-secondary"}),n.jsx(
|
|
635
|
+
`,children:[n.jsx(as,{className:"h-5 w-5 text-fg-secondary"}),n.jsx(Se,{ref:x,value:f,onChange:S=>p(S.target.value),onKeyDown:N,placeholder:o,className:"flex-1 border-0 focus:ring-0",autoFocus:!0}),n.jsxs("div",{className:`
|
|
636
636
|
flex
|
|
637
637
|
items-center
|
|
638
638
|
gap-1
|
|
@@ -659,7 +659,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
659
659
|
text-fg-tertiary
|
|
660
660
|
uppercase
|
|
661
661
|
tracking-wider
|
|
662
|
-
`,children:S}),M.map((F,
|
|
662
|
+
`,children:S}),M.map((F,R)=>{const D=j.indexOf(F),I=D===m;return n.jsxs("button",{type:"button","data-index":D,onClick:()=>v(F),className:`
|
|
663
663
|
w-full
|
|
664
664
|
flex
|
|
665
665
|
items-center
|
|
@@ -667,7 +667,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
667
667
|
${E("base","px")}
|
|
668
668
|
${E("md","py")}
|
|
669
669
|
text-left
|
|
670
|
-
${
|
|
670
|
+
${be("base")}
|
|
671
671
|
${I?"bg-surface-brand-muted":"hover:bg-surface-hover"}
|
|
672
672
|
`,children:[F.icon&&n.jsx("div",{className:`
|
|
673
673
|
${I?"text-fg-brand-emphasis":"text-fg-secondary"}
|
|
@@ -675,8 +675,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
675
675
|
text-sm
|
|
676
676
|
font-medium
|
|
677
677
|
${I?"text-fg-brand-emphasis":"text-fg-primary"}
|
|
678
|
-
`,children:F.label}),F.description&&n.jsx("div",{className:`text-xs ${I?"text-fg-secondary":"text-fg-tertiary"} ${E("0.5","mt")}`,children:F.description})]})]},F.id)})]},S))})]})}):null;return n.jsxs(n.Fragment,{children:[a?n.jsx("div",{onClick:()=>b(!0),children:a}):null,typeof window!="undefined"&&
|
|
679
|
-
`),
|
|
678
|
+
`,children:F.label}),F.description&&n.jsx("div",{className:`text-xs ${I?"text-fg-secondary":"text-fg-tertiary"} ${E("0.5","mt")}`,children:F.description})]})]},F.id)})]},S))})]})}):null;return n.jsxs(n.Fragment,{children:[a?n.jsx("div",{onClick:()=>b(!0),children:a}):null,typeof window!="undefined"&&qe.createPortal(_,document.body)]})}function tu({columns:e,data:t,loading:r=!1,onSort:s,sortColumn:a,sortDirection:o,multiSort:i=!1,groups:c=[],onGroupChange:u,groupable:d=!1,resizable:f=!0,reorderable:p=!1,onColumnReorder:m,columnWidths:h,onColumnResize:x,selectable:y=!1,selectedRows:w,onSelectionChange:g,rowId:j,exportable:C=!1,onExport:b,exportFormats:v=["csv","xlsx","json"],pagination:N,filters:_,actions:S,toolbarActions:M,virtualScrolling:F=!1,virtualScrollingOptions:R,emptyMessage:D,emptyStateTitle:I,emptyStateMessage:A,emptyStateIllustration:V,emptyStateAction:Y,className:H=""}){const[W,ie]=l.useState(c),[ne,L]=l.useState(h||{}),B=l.useMemo(()=>e.map(se=>P(T({},se),{width:ne[se.key]||se.defaultWidth})),[e,ne]),K=se=>{b?b(se):se==="csv"?Q(t,e):se==="json"&&le(t)},Q=(se,z)=>{const U=z.filter(Ie=>Ie.exportable!==!1).map(Ie=>Ie.label||Ie.key),X=se.map(Ie=>z.filter(Lt=>Lt.exportable!==!1).map(Lt=>{const Me=Ie[Lt.key];return typeof Me=="string"&&Me.includes(",")?`"${Me}"`:Me})),ae=[U.join(","),...X.map(Ie=>Ie.join(","))].join(`
|
|
679
|
+
`),fe=new Blob([ae],{type:"text/csv"}),ke=URL.createObjectURL(fe),je=document.createElement("a");je.href=ke,je.download=`export-${Date.now()}.csv`,je.click(),URL.revokeObjectURL(ke)},le=se=>{const z=JSON.stringify(se,null,2),U=new Blob([z],{type:"application/json"}),X=URL.createObjectURL(U),ae=document.createElement("a");ae.href=X,ae.download=`export-${Date.now()}.json`,ae.click(),URL.revokeObjectURL(X)};return n.jsxs("div",{className:`space-y-4 ${H}`,children:[(C||d||M)&&n.jsxs("div",{className:`
|
|
680
680
|
flex
|
|
681
681
|
items-center
|
|
682
682
|
justify-between
|
|
@@ -685,5 +685,5 @@ React keys must be passed directly to JSX without using spread:
|
|
|
685
685
|
border
|
|
686
686
|
border-line-default
|
|
687
687
|
rounded-lg
|
|
688
|
-
`,children:[n.jsx("div",{className:"flex items-center gap-2",children:d&&n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(El,{className:"h-4 w-4"}),children:"Group"})}),n.jsxs("div",{className:"flex items-center gap-2",children:[M,C&&n.jsx("div",{className:"flex items-center gap-1",children:v.map(U=>n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(Wl,{className:"h-4 w-4"}),onClick:()=>X(U),children:U.toUpperCase()},U))})]})]}),n.jsx(je,{columns:B,data:t,loading:r,onSort:s,sortColumn:a,sortDirection:o,pagination:N,filters:_,selectable:y,selectedRows:k,onSelectionChange:g,rowId:j,actions:S,resizable:f,columnWidths:se,onColumnResize:(U,V)=>{D(ne=>P(T({},ne),{[U]:V})),x==null||x(U,V)},virtualScrolling:F,virtualScrollingOptions:A,emptyMessage:R,emptyStateTitle:I,emptyStateMessage:L,emptyStateIllustration:z,emptyStateAction:Y})]})}function ru({columns:e,data:t,searchPlaceholder:r="Search...",enableSearch:s=!0,itemsPerPage:a=10,enablePagination:o=!0,actions:i,onRowClick:c,loading:u=!1,emptyMessage:d="No data available"}){const[f,p]=l.useState(""),[m,h]=l.useState(1),x=l.useMemo(()=>e.map(b=>{if(b.accessor||b.header){const v=b.key||(typeof b.accessor=="string"?b.accessor:String(b.accessor)),N=b.label||b.header||"";return P(T({},b),{key:v,label:N})}return b}),[e]),y=l.useMemo(()=>{if(!f.trim())return t;const b=f.toLowerCase();return t.filter(v=>x.some(N=>{const _=v[String(N.key)];return String(_).toLowerCase().includes(b)}))},[t,f,x]),k=l.useMemo(()=>{if(!o)return y;const b=(m-1)*a,v=b+a;return y.slice(b,v)},[y,m,a,o]),g=o?Math.ceil(y.length/a):1,j=b=>{h(b)},C=b=>{p(b),h(1)};return n.jsx(ot,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Tt,{spacing:"md",children:[n.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s&&n.jsx("div",{className:"flex-1 max-w-md",children:n.jsx(Tr,{placeholder:r,value:f,onSearch:C})}),i&&n.jsx("div",{className:"flex gap-2",children:i})]}),n.jsx(je,{columns:x,data:k,loading:u,emptyMessage:d,onRowClick:c?b=>{const v=y.findIndex(N=>N===b);c(b,v>=0?v:k.findIndex(N=>N===b))}:void 0}),o&&g>1&&n.jsx("div",{className:"flex justify-center",children:n.jsx(Ta,{currentPage:m,totalPages:g,onPageChange:j})}),s&&n.jsxs("div",{className:"text-sm text-fg-secondary text-center",children:["Showing ",k.length," of ",y.length," results"]})]})})}function su({steps:e,onComplete:t,allowBackNavigation:r=!0,showStepNumbers:s=!0}){const[a,o]=l.useState(0),[i,c]=l.useState({}),[u,d]=l.useState({}),f=()=>rr(null,null,function*(){const k=e[a];if(k.validate&&!(yield k.validate())){d(P(T({},u),{[a]:!0}));return}d(P(T({},u),{[a]:!1})),k.onSubmit&&(yield k.onSubmit(i)),a<e.length-1?o(a+1):t&&t(i)}),p=()=>{a>0&&r&&(o(a-1),d(P(T({},u),{[a-1]:!1})))},m=k=>{r&&k<a&&o(k)},h=e[a],x=a===e.length-1,y=u[a]===!0;return n.jsx(ot,{maxWidth:"lg",paddingX:"base",paddingY:"lg",children:n.jsxs(Tt,{spacing:"lg",children:[n.jsx($o,{steps:e.map((k,g)=>({id:k.id,title:k.title,content:k.content,description:k.description,status:g<a?"completed":g===a?y?"error":"active":"pending"})),currentStep:a,onStepChange:m,allowNavigation:r}),n.jsx("div",{className:"bg-surface-base rounded-lg border p-6",children:n.jsxs(Tt,{spacing:"md",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-semibold",children:h.title}),h.description&&n.jsx("p",{className:"text-fg-secondary mt-1",children:h.description})]}),y&&n.jsx("div",{className:"bg-error-bg border border-error-border rounded p-3",children:n.jsx("p",{className:"text-sm text-fg-error",children:"Please fix the errors before proceeding."})}),n.jsx("div",{className:"min-h-48",children:h.fields}),n.jsxs("div",{className:"flex justify-between pt-4 border-t",children:[n.jsx(Z,{variant:"outline",onClick:p,disabled:a===0,children:"Back"}),n.jsx(Z,{variant:"primary",onClick:f,children:x?"Complete":"Next"})]})]})})]})})}function nu({items:e,searchFn:t,filterFn:r,renderItem:s,filters:a=[],searchPlaceholder:o="Search...",emptyMessage:i="No results found",showResultsCount:c=!0}){const[u,d]=l.useState(""),[f,p]=l.useState({}),m=l.useMemo(()=>{let k=e;if(u.trim()&&t){const g=u.toLowerCase();k=k.filter(j=>t(g,j))}return r&&Object.keys(f).length>0&&(k=k.filter(g=>r(f,g))),k},[e,u,f,t,r]),h=(k,g)=>{p(j=>P(T({},j),{[k]:g}))},x=()=>{p({}),d("")},y=u.trim().length>0||Object.keys(f).length>0;return n.jsx(ot,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Tt,{spacing:"md",children:[n.jsx(fr,{padding:"medium",children:n.jsxs(Tt,{spacing:"md",children:[n.jsx("div",{children:n.jsx(Tr,{placeholder:o,value:u,onSearch:d})}),a.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:a.map(k=>{var g;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(Be,{className:"text-fg-secondary text-sm",children:[k.label,":"]}),n.jsxs("select",{className:"px-3 py-1 border rounded text-sm",value:String(f[k.id]||""),onChange:j=>h(k.id,j.target.value||void 0),children:[n.jsx("option",{value:"",children:"All"}),(g=k.options)==null?void 0:g.map(j=>n.jsx("option",{value:String(j.value||""),children:j.label},j.id))]})]},k.id)})}),y&&n.jsx("div",{children:n.jsx(Z,{variant:"outline",size:"sm",onClick:x,children:"Clear Filters"})})]})}),c&&n.jsxs("div",{className:"text-sm text-fg-secondary",children:["Showing ",m.length," of ",e.length," results",y&&" (filtered)"]}),m.length===0?n.jsx(fr,{padding:"large",children:n.jsx("div",{className:"text-center text-fg-secondary",children:n.jsx(Be,{children:i})})}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:m.map((k,g)=>n.jsx("div",{children:s(k,g)},g))})]})})}function au({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(Ce,P(T({defaultCollapsed:a},o),{children:e})),n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r&&n.jsx("header",{className:"border-b bg-surface-base",children:n.jsx(ot,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:r})}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsx(ot,{maxWidth:"xl",paddingX:"base",paddingY:"base",children:t})}),s&&n.jsx("footer",{className:"border-t bg-surface-base",children:n.jsx(ot,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:s})})]})]})}exports.AMBER=st;exports.Accordion=pd;exports.AlertDialog=Gd;exports.AppProvider=bl;exports.Autocomplete=Oa;exports.AutocompleteList=Ar;exports.AutocompleteOption=$s;exports.Avatar=ur;exports.AvatarGroup=Mc;exports.BLUE=zn;exports.BRAND_COLORS=li;exports.BREAKPOINT_TOKENS=yr;exports.Badge=pa;exports.Breadcrumb=Ma;exports.BreakpointTokenFactory=St;exports.Button=Z;exports.COLOR_SCALES=Uo;exports.CYAN=et;exports.Card=fr;exports.Checkbox=Nr;exports.Chip=ws;exports.Collapsible=xa;exports.ColorPicker=dd;exports.CommandPalette=eu;exports.ConfigProvider=ca;exports.DashboardLayout=au;exports.DataGrid=tu;exports.DataTablePattern=ru;exports.DatePicker=nd;exports.DatePickerCalendar=Cs;exports.DatePickerInput=Ss;exports.DatePickerProvider=is;exports.Dialog=Te;exports.DialogClose=So;exports.DialogContent=Qs;exports.DialogContext=kr;exports.DialogDescription=No;exports.DialogFooter=tn;exports.DialogHeader=en;exports.DialogProvider=ps;exports.DialogTitle=jo;exports.DialogTrigger=ko;exports.Drawer=Gt;exports.DrawerContent=Ms;exports.DrawerFooter=Ba;exports.DrawerHeader=Ha;exports.Dropdown=Ra;exports.EMERALD=rt;exports.EmptyState=Aa;exports.ErrorMessage=ba;exports.FONT_FAMILY_TOKENS=Vo;exports.FONT_WEIGHT_TOKENS=Wo;exports.FUCHSIA=On;exports.FileUpload=ld;exports.Form=Ac;exports.FormContext=Sr;exports.FormField=Rc;exports.FormProvider=ka;exports.FormWizardPattern=su;exports.GRAY=Dn;exports.GREEN=Ln;exports.Header=gt;exports.HeaderActions=Ja;exports.HeaderComponent=gt;exports.HeaderHamburger=Za;exports.HeaderLogo=Ya;exports.HeaderMobileMenu=Qa;exports.HeaderNavigation=Xa;exports.HeaderProvider=ls;exports.INDIGO=Ze;exports.Info=vl;exports.Input=ke;exports.LIME=Bn;exports.Label=Mt;exports.LoginBox=vd;exports.Menu=Kt;exports.MenuContent=qa;exports.MenuItem=Rs;exports.MenuSeparator=Ga;exports.MenuTrigger=As;exports.Modal=yd;exports.MultiSelect=Va;exports.NavLink=xs;exports.Navbar=vt;exports.NavbarContext=Pr;exports.NavbarGroup=po;exports.NavbarItem=fo;exports.NavbarSeparator=mo;exports.NavbarToggle=gr;exports.Navigation=eo;exports.NavigationComponent=eo;exports.ORANGE=_n;exports.PINK=Vn;exports.PRIMITIVE_COLORS=ds;exports.PURPLE=Wn;exports.PageHeader=to;exports.PageHeaderComponent=to;exports.Pagination=Ta;exports.Popover=Es;exports.Progress=vs;exports.RED=Pn;exports.ROSE=nt;exports.Radio=va;exports.Rating=id;exports.SEMANTIC_COLORS=Yo;exports.SEMANTIC_COLORS_DARK=vr;exports.SEMANTIC_COLORS_LIGHT=qt;exports.SIDEBAR_TOKENS=Je;exports.SKY=at;exports.SLATE=tt;exports.SPACING_TOKENS=xr;exports.SearchAndFilterPattern=nu;exports.SearchInput=Tr;exports.Select=jr;exports.Separator=ys;exports.SideNavbar=Ce;exports.SideNavbarBackdrop=Js;exports.SideNavbarConfigContext=Dr;exports.SideNavbarConfigProvider=Bs;exports.SideNavbarProvider=qs;exports.SideNavbarResizeHandle=Xs;exports.SideNavbarRoot=uo;exports.SideNavbarStateContext=Lr;exports.SideNavbarStateProvider=Us;exports.SideNavbarThemeContext=Ir;exports.SideNavbarThemeProvider=Hs;exports.SideNavbarToggle=Zs;exports.SideNavbarToggleContext=_r;exports.Sidebar=ct;exports.SidebarContent=go;exports.SidebarContext=Or;exports.SidebarFooter=xo;exports.SidebarGroup=vo;exports.SidebarHeader=bo;exports.SidebarSlot=yo;exports.SidebarSlotContent=wo;exports.SidebarSlotContext=Fr;exports.SidebarSlotProvider=co;exports.Skeleton=ga;exports.Slider=wa;exports.SpacingTokenFactory=pe;exports.Spinner=gs;exports.Stepper=$o;exports.Switch=ya;exports.TEAL=Hn;exports.TYPOGRAPHY_TOKENS=bt;exports.Table=je;exports.TableActions=Ps;exports.TableBody=Os;exports.TableCell=_s;exports.TableContext=Rr;exports.TableEmptyState=zs;exports.TableFilters=Vs;exports.TableHeader=Fs;exports.TableHeaderCell=Ds;exports.TableHeaderRow=Ls;exports.TablePagination=Ws;exports.TableProvider=cs;exports.TableRow=hr;exports.Tabs=od;exports.TabsContent=za;exports.TabsContext=$r;exports.TabsList=_a;exports.TabsProvider=Fa;exports.TabsTrigger=Pa;exports.Text=Be;exports.Textarea=ha;exports.ThemeProvider=ia;exports.TimePicker=cd;exports.Timeline=Qd;exports.Toast=Co;exports.ToastContainer=Jd;exports.ToastContext=wr;exports.ToastProvider=da;exports.Tooltip=Ut;exports.TypographyTokenFactory=fe;exports.VIOLET=Qe;exports.YELLOW=Fn;exports.blendColors=us;exports.clampWidth=lr;exports.cn=w;exports.darken=ii;exports.defaultConfigValues=ye;exports.defaultThemeValues=$t;exports.formatKeyboardShortcut=Ad;exports.getAnimation=tl;exports.getAnimationClass=he;exports.getBreakpoint=ci;exports.getColor=Jo;exports.getColorClass=Qo;exports.getContrastColor=ai;exports.getFocusColorClass=ri;exports.getFocusRingClass=si;exports.getHoverColorClass=ti;exports.getMediaQuery=di;exports.getNestedIndentClass=zo;exports.getOpacity=nl;exports.getOpacityClass=al;exports.getPrimitiveColor=At;exports.getPrimitiveColorPalette=Ko;exports.getSemanticColor=Ht;exports.getSemanticColorClass=ei;exports.getSemanticColorRole=Xo;exports.getSemanticColorValue=Zo;exports.getSpacing=Oo;exports.getSpacingClass=E;exports.getTransitionClass=rl;exports.getTypography=Ho;exports.getTypographyClasses=ce;exports.getTypographyLineHeight=Bo;exports.getTypographySize=re;exports.getTypographySizeFromFontSize=ve;exports.getTypographyWeight=Fe;exports.getTypographyWeightFromFontWeight=Et;exports.getZIndex=sl;exports.getZIndexClass=ue;exports.isLightColor=Un;exports.lighten=oi;exports.parseKeyboardShortcut=no;exports.parseWidthToPixels=br;exports.useApp=gl;exports.useColumnResizing=Cd;exports.useConfig=ul;exports.useDialogContext=Dt;exports.useDialogContextOptional=ml;exports.useFocusManagement=io;exports.useFormContext=ks;exports.useFormContextOptional=Tc;exports.useFormFieldArray=Zc;exports.useGroupState=Hd;exports.useHeaderContext=Is;exports.useKeyboardShortcut=lo;exports.useNavLink=ma;exports.useNavbar=zd;exports.useNavbarRequired=zr;exports.useResize=ao;exports.useResponsiveSidebar=oo;exports.useSideNavbarCombined=qd;exports.useSideNavbarConfig=Ed;exports.useSideNavbarConfigRequired=xt;exports.useSideNavbarContent=Ud;exports.useSideNavbarNavigation=Bd;exports.useSideNavbarState=Md;exports.useSideNavbarStateRequired=lt;exports.useSideNavbarTheme=$d;exports.useSideNavbarThemeRequired=it;exports.useSideNavbarToggleContext=Rd;exports.useSideNavbarToggleContextRequired=Ys;exports.useSidebar=ho;exports.useSidebarRequired=Yt;exports.useSidebarSlot=Gs;exports.useSidebarSlotRequired=Ks;exports.useTableContext=Pe;exports.useTableContextOptional=wd;exports.useTabsContext=Er;exports.useTabsContextOptional=ad;exports.useTheme=cl;exports.useToast=Zd;exports.useToastContext=ms;exports.useToastContextOptional=fl;exports.useVirtualScrolling=ro;exports.validateWidthBounds=so;exports.withOpacity=ni;
|
|
688
|
+
`,children:[n.jsx("div",{className:"flex items-center gap-2",children:d&&n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(El,{className:"h-4 w-4"}),children:"Group"})}),n.jsxs("div",{className:"flex items-center gap-2",children:[M,C&&n.jsx("div",{className:"flex items-center gap-1",children:v.map(se=>n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(Wl,{className:"h-4 w-4"}),onClick:()=>K(se),children:se.toUpperCase()},se))})]})]}),n.jsx(Ce,{columns:B,data:t,loading:r,onSort:s,sortColumn:a,sortDirection:o,pagination:N,filters:_,selectable:y,selectedRows:w,onSelectionChange:g,rowId:j,actions:S,resizable:f,columnWidths:ne,onColumnResize:(se,z)=>{L(U=>P(T({},U),{[se]:z})),x==null||x(se,z)},virtualScrolling:F,virtualScrollingOptions:R,emptyMessage:D,emptyStateTitle:I,emptyStateMessage:A,emptyStateIllustration:V,emptyStateAction:Y})]})}function ru({columns:e,data:t,searchPlaceholder:r="Search...",enableSearch:s=!0,itemsPerPage:a=10,enablePagination:o=!0,actions:i,onRowClick:c,loading:u=!1,emptyMessage:d="No data available"}){const[f,p]=l.useState(""),[m,h]=l.useState(1),x=l.useMemo(()=>e.map(b=>{if(b.accessor||b.header){const v=b.key||(typeof b.accessor=="string"?b.accessor:String(b.accessor)),N=b.label||b.header||"";return P(T({},b),{key:v,label:N})}return b}),[e]),y=l.useMemo(()=>{if(!f.trim())return t;const b=f.toLowerCase();return t.filter(v=>x.some(N=>{const _=v[String(N.key)];return String(_).toLowerCase().includes(b)}))},[t,f,x]),w=l.useMemo(()=>{if(!o)return y;const b=(m-1)*a,v=b+a;return y.slice(b,v)},[y,m,a,o]),g=o?Math.ceil(y.length/a):1,j=b=>{h(b)},C=b=>{p(b),h(1)};return n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(At,{spacing:"md",children:[n.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s&&n.jsx("div",{className:"flex-1 max-w-md",children:n.jsx(Tr,{placeholder:r,value:f,onSearch:C})}),i&&n.jsx("div",{className:"flex gap-2",children:i})]}),n.jsx(Ce,{columns:x,data:w,loading:u,emptyMessage:d,onRowClick:c?b=>{const v=y.findIndex(N=>N===b);c(b,v>=0?v:w.findIndex(N=>N===b))}:void 0}),o&&g>1&&n.jsx("div",{className:"flex justify-center",children:n.jsx(Ta,{currentPage:m,totalPages:g,onPageChange:j})}),s&&n.jsxs("div",{className:"text-sm text-fg-secondary text-center",children:["Showing ",w.length," of ",y.length," results"]})]})})}function su({steps:e,onComplete:t,allowBackNavigation:r=!0,showStepNumbers:s=!0}){const[a,o]=l.useState(0),[i,c]=l.useState({}),[u,d]=l.useState({}),f=()=>rr(null,null,function*(){const w=e[a];if(w.validate&&!(yield w.validate())){d(P(T({},u),{[a]:!0}));return}d(P(T({},u),{[a]:!1})),w.onSubmit&&(yield w.onSubmit(i)),a<e.length-1?o(a+1):t&&t(i)}),p=()=>{a>0&&r&&(o(a-1),d(P(T({},u),{[a-1]:!1})))},m=w=>{r&&w<a&&o(w)},h=e[a],x=a===e.length-1,y=u[a]===!0;return n.jsx(it,{maxWidth:"lg",paddingX:"base",paddingY:"lg",children:n.jsxs(At,{spacing:"lg",children:[n.jsx($o,{steps:e.map((w,g)=>({id:w.id,title:w.title,content:w.content,description:w.description,status:g<a?"completed":g===a?y?"error":"active":"pending"})),currentStep:a,onStepChange:m,allowNavigation:r}),n.jsx("div",{className:"bg-surface-base rounded-lg border p-6",children:n.jsxs(At,{spacing:"md",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-semibold",children:h.title}),h.description&&n.jsx("p",{className:"text-fg-secondary mt-1",children:h.description})]}),y&&n.jsx("div",{className:"bg-error-bg border border-error-border rounded p-3",children:n.jsx("p",{className:"text-sm text-fg-error",children:"Please fix the errors before proceeding."})}),n.jsx("div",{className:"min-h-48",children:h.fields}),n.jsxs("div",{className:"flex justify-between pt-4 border-t",children:[n.jsx(Z,{variant:"outline",onClick:p,disabled:a===0,children:"Back"}),n.jsx(Z,{variant:"primary",onClick:f,children:x?"Complete":"Next"})]})]})})]})})}function nu({items:e,searchFn:t,filterFn:r,renderItem:s,filters:a=[],searchPlaceholder:o="Search...",emptyMessage:i="No results found",showResultsCount:c=!0}){const[u,d]=l.useState(""),[f,p]=l.useState({}),m=l.useMemo(()=>{let w=e;if(u.trim()&&t){const g=u.toLowerCase();w=w.filter(j=>t(g,j))}return r&&Object.keys(f).length>0&&(w=w.filter(g=>r(f,g))),w},[e,u,f,t,r]),h=(w,g)=>{p(j=>P(T({},j),{[w]:g}))},x=()=>{p({}),d("")},y=u.trim().length>0||Object.keys(f).length>0;return n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(At,{spacing:"md",children:[n.jsx(fr,{padding:"medium",children:n.jsxs(At,{spacing:"md",children:[n.jsx("div",{children:n.jsx(Tr,{placeholder:o,value:u,onSearch:d})}),a.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:a.map(w=>{var g;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(Ue,{className:"text-fg-secondary text-sm",children:[w.label,":"]}),n.jsxs("select",{className:"px-3 py-1 border rounded text-sm",value:String(f[w.id]||""),onChange:j=>h(w.id,j.target.value||void 0),children:[n.jsx("option",{value:"",children:"All"}),(g=w.options)==null?void 0:g.map(j=>n.jsx("option",{value:String(j.value||""),children:j.label},j.id))]})]},w.id)})}),y&&n.jsx("div",{children:n.jsx(Z,{variant:"outline",size:"sm",onClick:x,children:"Clear Filters"})})]})}),c&&n.jsxs("div",{className:"text-sm text-fg-secondary",children:["Showing ",m.length," of ",e.length," results",y&&" (filtered)"]}),m.length===0?n.jsx(fr,{padding:"large",children:n.jsx("div",{className:"text-center text-fg-secondary",children:n.jsx(Ue,{children:i})})}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:m.map((w,g)=>n.jsx("div",{children:s(w,g)},g))})]})})}function au({sidebar:e,children:t,header:r,footer:s,defaultCollapsed:a=!1,sidebarProps:o}){return n.jsxs("div",{className:"flex h-screen overflow-hidden",children:[e&&n.jsx(Ee,P(T({defaultCollapsed:a},o),{children:e})),n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r&&n.jsx("header",{className:"border-b bg-surface-base",children:n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:r})}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsx(it,{maxWidth:"xl",paddingX:"base",paddingY:"base",children:t})}),s&&n.jsx("footer",{className:"border-t bg-surface-base",children:n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:s})})]})]})}exports.AMBER=nt;exports.Accordion=pd;exports.AlertDialog=Gd;exports.AppProvider=bl;exports.Autocomplete=Oa;exports.AutocompleteList=Ar;exports.AutocompleteOption=$s;exports.Avatar=ur;exports.AvatarGroup=Mc;exports.BLUE=zn;exports.BRAND_COLORS=li;exports.BREAKPOINT_TOKENS=yr;exports.Badge=pa;exports.Breadcrumb=Ma;exports.BreakpointTokenFactory=Ct;exports.Button=Z;exports.COLOR_SCALES=Uo;exports.CYAN=tt;exports.Card=fr;exports.Checkbox=Nr;exports.Chip=ws;exports.Collapsible=xa;exports.ColorPicker=dd;exports.CommandPalette=eu;exports.ConfigProvider=ca;exports.DashboardLayout=au;exports.DataGrid=tu;exports.DataTablePattern=ru;exports.DatePicker=nd;exports.DatePickerCalendar=Cs;exports.DatePickerInput=Ss;exports.DatePickerProvider=is;exports.Dialog=Re;exports.DialogClose=So;exports.DialogContent=Zs;exports.DialogContext=kr;exports.DialogDescription=No;exports.DialogFooter=tn;exports.DialogHeader=en;exports.DialogProvider=ps;exports.DialogTitle=jo;exports.DialogTrigger=ko;exports.Drawer=Gt;exports.DrawerContent=Ms;exports.DrawerFooter=Ba;exports.DrawerHeader=Ha;exports.Dropdown=Ra;exports.EMERALD=st;exports.EmptyState=Aa;exports.ErrorMessage=ba;exports.FONT_FAMILY_TOKENS=Vo;exports.FONT_WEIGHT_TOKENS=Wo;exports.FUCHSIA=On;exports.FileUpload=ld;exports.Form=Ac;exports.FormContext=Sr;exports.FormField=Rc;exports.FormProvider=ka;exports.FormWizardPattern=su;exports.GRAY=Dn;exports.GREEN=Fn;exports.Header=xt;exports.HeaderActions=Ja;exports.HeaderComponent=xt;exports.HeaderHamburger=Qa;exports.HeaderLogo=Ya;exports.HeaderMobileMenu=Za;exports.HeaderNavigation=Xa;exports.HeaderProvider=ls;exports.INDIGO=Ze;exports.Info=vl;exports.Input=Se;exports.LIME=Bn;exports.Label=Tt;exports.LoginBox=vd;exports.Menu=Kt;exports.MenuContent=qa;exports.MenuItem=Rs;exports.MenuSeparator=Ga;exports.MenuTrigger=As;exports.Modal=yd;exports.MultiSelect=Va;exports.NavLink=xs;exports.Navbar=yt;exports.NavbarContext=Pr;exports.NavbarGroup=po;exports.NavbarItem=fo;exports.NavbarSeparator=mo;exports.NavbarToggle=gr;exports.Navigation=eo;exports.NavigationComponent=eo;exports.ORANGE=_n;exports.PINK=Vn;exports.PRIMITIVE_COLORS=ds;exports.PURPLE=Wn;exports.PageHeader=to;exports.PageHeaderComponent=to;exports.Pagination=Ta;exports.Popover=Es;exports.Progress=vs;exports.RED=Pn;exports.ROSE=at;exports.Radio=va;exports.Rating=id;exports.SEMANTIC_COLORS=Yo;exports.SEMANTIC_COLORS_DARK=vr;exports.SEMANTIC_COLORS_LIGHT=qt;exports.SIDEBAR_TOKENS=Qe;exports.SKY=ot;exports.SLATE=rt;exports.SPACING_TOKENS=xr;exports.SearchAndFilterPattern=nu;exports.SearchInput=Tr;exports.Select=jr;exports.Separator=ys;exports.SideNavbar=Ee;exports.SideNavbarBackdrop=Js;exports.SideNavbarConfigContext=Dr;exports.SideNavbarConfigProvider=Bs;exports.SideNavbarProvider=qs;exports.SideNavbarResizeHandle=Xs;exports.SideNavbarRoot=uo;exports.SideNavbarStateContext=Fr;exports.SideNavbarStateProvider=Us;exports.SideNavbarThemeContext=Ir;exports.SideNavbarThemeProvider=Hs;exports.SideNavbarToggle=Qs;exports.SideNavbarToggleContext=_r;exports.Sidebar=dt;exports.SidebarContent=go;exports.SidebarContext=Or;exports.SidebarFooter=xo;exports.SidebarGroup=vo;exports.SidebarHeader=bo;exports.SidebarSlot=yo;exports.SidebarSlotContent=wo;exports.SidebarSlotContext=Lr;exports.SidebarSlotProvider=co;exports.Skeleton=ga;exports.Slider=wa;exports.SpacingTokenFactory=he;exports.Spinner=gs;exports.Stepper=$o;exports.Switch=ya;exports.TEAL=Hn;exports.TYPOGRAPHY_TOKENS=gt;exports.Table=Ce;exports.TableActions=Ps;exports.TableBody=Os;exports.TableCell=_s;exports.TableContext=Rr;exports.TableEmptyState=zs;exports.TableFilters=Vs;exports.TableHeader=Ls;exports.TableHeaderCell=Ds;exports.TableHeaderRow=Fs;exports.TablePagination=Ws;exports.TableProvider=cs;exports.TableRow=hr;exports.Tabs=od;exports.TabsContent=za;exports.TabsContext=$r;exports.TabsList=_a;exports.TabsProvider=La;exports.TabsTrigger=Pa;exports.Text=Ue;exports.Textarea=ha;exports.ThemeProvider=ia;exports.TimePicker=cd;exports.Timeline=Zd;exports.Toast=Co;exports.ToastContainer=Jd;exports.ToastContext=wr;exports.ToastProvider=da;exports.Tooltip=Ut;exports.TypographyTokenFactory=me;exports.VIOLET=et;exports.YELLOW=Ln;exports.blendColors=us;exports.clampWidth=lr;exports.cn=k;exports.darken=ii;exports.defaultConfigValues=we;exports.defaultThemeValues=Et;exports.formatKeyboardShortcut=Ad;exports.getAnimation=tl;exports.getAnimationClass=be;exports.getBreakpoint=ci;exports.getColor=Jo;exports.getColorClass=Zo;exports.getContrastColor=ai;exports.getFocusColorClass=ri;exports.getFocusRingClass=si;exports.getHoverColorClass=ti;exports.getMediaQuery=di;exports.getNestedIndentClass=zo;exports.getOpacity=nl;exports.getOpacityClass=al;exports.getPrimitiveColor=Rt;exports.getPrimitiveColorPalette=Ko;exports.getSemanticColor=Ht;exports.getSemanticColorClass=ei;exports.getSemanticColorRole=Xo;exports.getSemanticColorValue=Qo;exports.getSpacing=Oo;exports.getSpacingClass=E;exports.getTransitionClass=rl;exports.getTypography=Ho;exports.getTypographyClasses=ce;exports.getTypographyLineHeight=Bo;exports.getTypographySize=re;exports.getTypographySizeFromFontSize=ye;exports.getTypographyWeight=Pe;exports.getTypographyWeightFromFontWeight=Mt;exports.getZIndex=sl;exports.getZIndexClass=ue;exports.isLightColor=Un;exports.lighten=oi;exports.parseKeyboardShortcut=no;exports.parseWidthToPixels=br;exports.useApp=gl;exports.useColumnResizing=Cd;exports.useConfig=ul;exports.useDialogContext=Ft;exports.useDialogContextOptional=ml;exports.useFocusManagement=io;exports.useFormContext=ks;exports.useFormContextOptional=Tc;exports.useFormFieldArray=Qc;exports.useGroupState=Hd;exports.useHeaderContext=Is;exports.useKeyboardShortcut=lo;exports.useNavLink=ma;exports.useNavbar=zd;exports.useNavbarRequired=zr;exports.useResize=ao;exports.useResponsiveSidebar=oo;exports.useSideNavbarCombined=qd;exports.useSideNavbarConfig=Ed;exports.useSideNavbarConfigRequired=vt;exports.useSideNavbarContent=Ud;exports.useSideNavbarNavigation=Bd;exports.useSideNavbarState=Md;exports.useSideNavbarStateRequired=ct;exports.useSideNavbarTheme=$d;exports.useSideNavbarThemeRequired=lt;exports.useSideNavbarToggleContext=Rd;exports.useSideNavbarToggleContextRequired=Ys;exports.useSidebar=ho;exports.useSidebarRequired=Yt;exports.useSidebarSlot=Gs;exports.useSidebarSlotRequired=Ks;exports.useTableContext=Oe;exports.useTableContextOptional=wd;exports.useTabsContext=Er;exports.useTabsContextOptional=ad;exports.useTheme=cl;exports.useToast=Qd;exports.useToastContext=ms;exports.useToastContextOptional=fl;exports.useVirtualScrolling=ro;exports.validateWidthBounds=so;exports.withOpacity=ni;
|
|
689
689
|
//# sourceMappingURL=index.cjs.map
|