@qodo/design-system 0.6.1 → 0.6.2

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.js CHANGED
@@ -27,7 +27,7 @@ Check the top-level render call using <`+M+">.")}return I}}function Xo(b,I){{if(
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,un,it,Pu,it),Jo[it+un]=!0}}return b===n?yu(me):bu(me),me}}function wu(b,I,M){return Qo(b,I,M,!0)}function Cu(b,I,M){return Qo(b,I,M,!1)}var Su=Cu,Eu=wu;Wt.Fragment=n,Wt.jsx=Su,Wt.jsxs=Eu})()),Wt}var rs;function Ou(){return rs||(rs=1,process.env.NODE_ENV==="production"?lr.exports=_u():lr.exports=Iu()),lr.exports}var d=Ou();function Qs(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Qs(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ea(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Qs(e))&&(n&&(n+=" "),n+=t);return n}const ns=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,os=ea,Dr=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return os(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(u=>{const f=r==null?void 0:r[u],p=s==null?void 0:s[u];if(f===null)return null;const g=ns(f)||ns(p);return o[u][g]}),i=r&&Object.entries(r).reduce((u,f)=>{let[p,g]=f;return g===void 0||(u[p]=g),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:p,className:g,...v}=f;return Object.entries(v).every(w=>{let[m,x]=w;return Array.isArray(x)?x.includes({...s,...i}[m]):{...s,...i}[m]===x})?[...u,p,g]:u},[]);return os(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)},qn="-",ju=e=>{const t=Mu(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const i=a.split(qn);return i[0]===""&&i.length!==1&&i.shift(),ta(i,t)||Du(a)},getConflictingClassGroupIds:(a,i)=>{const c=r[a]||[];return i&&n[a]?[...c,...n[a]]:c}}},ta=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?ta(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(qn);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},ss=/^\[(.+)\]$/,Du=e=>{if(ss.test(e)){const t=ss.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Mu=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)An(r[o],n,o,t);return n},An=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:as(t,o);s.classGroupId=r;return}if(typeof o=="function"){if(Fu(o)){An(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,a])=>{An(a,as(t,s),r,n)})})},as=(e,t)=>{let r=e;return t.split(qn).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Fu=e=>e.isThemeGetter,$u=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(s,a)=>{r.set(s,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){r.has(s)?r.set(s,a):o(s,a)}}},Nn="!",_n=":",Lu=_n.length,Vu=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let a=0,i=0,c=0,u;for(let w=0;w<o.length;w++){let m=o[w];if(a===0&&i===0){if(m===_n){s.push(o.slice(c,w)),c=w+Lu;continue}if(m==="/"){u=w;continue}}m==="["?a++:m==="]"?a--:m==="("?i++:m===")"&&i--}const f=s.length===0?o:o.substring(c),p=Bu(f),g=p!==f,v=u&&u>c?u-c:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:v}};if(t){const o=t+_n,s=n;n=a=>a.startsWith(o)?s(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},Bu=e=>e.endsWith(Nn)?e.substring(0,e.length-1):e.startsWith(Nn)?e.substring(1):e,Wu=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let s=[];return n.forEach(a=>{a[0]==="["||t[a]?(o.push(...s.sort(),a),s=[]):s.push(a)}),o.push(...s.sort()),o}},zu=e=>({cache:$u(e.cacheSize),parseClassName:Vu(e),sortModifiers:Wu(e),...ju(e)}),Gu=/\s+/,Hu=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(Gu);let c="";for(let u=i.length-1;u>=0;u-=1){const f=i[u],{isExternal:p,modifiers:g,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:m}=r(f);if(p){c=f+(c.length>0?" "+c:c);continue}let x=!!m,y=n(x?w.substring(0,m):w);if(!y){if(!x){c=f+(c.length>0?" "+c:c);continue}if(y=n(w),!y){c=f+(c.length>0?" "+c:c);continue}x=!1}const h=s(g).join(":"),C=v?h+Nn:h,S=C+y;if(a.includes(S))continue;a.push(S);const k=o(y,x);for(let N=0;N<k.length;++N){const _=k[N];a.push(C+_)}c=f+(c.length>0?" "+c:c)}return c};function Uu(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ra(t))&&(n&&(n+=" "),n+=r);return n}const ra=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=ra(e[n]))&&(r&&(r+=" "),r+=t);return r};function Ku(e,...t){let r,n,o,s=a;function a(c){const u=t.reduce((f,p)=>p(f),e());return r=zu(u),n=r.cache.get,o=r.cache.set,s=i,i(c)}function i(c){const u=n(c);if(u)return u;const f=Hu(c,r);return o(c,f),f}return function(){return s(Uu.apply(null,arguments))}}const ge=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},na=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,oa=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Yu=/^\d+\/\d+$/,qu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xu=/\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$/,Zu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ju=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yt=e=>Yu.test(e),ne=e=>!!e&&!Number.isNaN(Number(e)),Ze=e=>!!e&&Number.isInteger(Number(e)),dn=e=>e.endsWith("%")&&ne(e.slice(0,-1)),He=e=>qu.test(e),ed=()=>!0,td=e=>Xu.test(e)&&!Zu.test(e),sa=()=>!1,rd=e=>Ju.test(e),nd=e=>Qu.test(e),od=e=>!V(e)&&!B(e),sd=e=>Ot(e,ca,sa),V=e=>na.test(e),ct=e=>Ot(e,la,td),fn=e=>Ot(e,ud,ne),is=e=>Ot(e,aa,sa),ad=e=>Ot(e,ia,nd),ur=e=>Ot(e,ua,rd),B=e=>oa.test(e),zt=e=>jt(e,la),id=e=>jt(e,dd),cs=e=>jt(e,aa),cd=e=>jt(e,ca),ld=e=>jt(e,ia),dr=e=>jt(e,ua,!0),Ot=(e,t,r)=>{const n=na.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},jt=(e,t,r=!1)=>{const n=oa.exec(e);return n?n[1]?t(n[1]):r:!1},aa=e=>e==="position"||e==="percentage",ia=e=>e==="image"||e==="url",ca=e=>e==="length"||e==="size"||e==="bg-size",la=e=>e==="length",ud=e=>e==="number",dd=e=>e==="family-name",ua=e=>e==="shadow",fd=()=>{const e=ge("color"),t=ge("font"),r=ge("text"),n=ge("font-weight"),o=ge("tracking"),s=ge("leading"),a=ge("breakpoint"),i=ge("container"),c=ge("spacing"),u=ge("radius"),f=ge("shadow"),p=ge("inset-shadow"),g=ge("text-shadow"),v=ge("drop-shadow"),w=ge("blur"),m=ge("perspective"),x=ge("aspect"),y=ge("ease"),h=ge("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...S(),B,V],N=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],T=()=>[B,V,c],H=()=>[yt,"full","auto",...T()],K=()=>[Ze,"none","subgrid",B,V],ee=()=>["auto",{span:["full",Ze,B,V]},Ze,B,V],J=()=>[Ze,"auto",B,V],Y=()=>["auto","min","max","fr",B,V],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...T()],D=()=>[yt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],E=()=>[e,B,V],G=()=>[...S(),cs,is,{position:[B,V]}],oe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],le=()=>["auto","cover","contain",cd,sd,{size:[B,V]}],R=()=>[dn,zt,ct],F=()=>["","none","full",u,B,V],W=()=>["",ne,zt,ct],L=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],O=()=>[ne,dn,cs,is],q=()=>["","none",w,B,V],te=()=>["none",ne,B,V],re=()=>["none",ne,B,V],ie=()=>[ne,B,V],se=()=>[yt,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[He],breakpoint:[He],color:[ed],container:[He],"drop-shadow":[He],ease:["in","out","in-out"],font:[od],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[He],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[He],shadow:[He],spacing:["px",ne],text:[He],"text-shadow":[He],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yt,V,B,x]}],container:["container"],columns:[{columns:[ne,V,B,i]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{start:H()}],end:[{end:H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[Ze,"auto",B,V]}],basis:[{basis:[yt,"full","auto",i,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ne,yt,"auto","initial","none",V]}],grow:[{grow:["",ne,B,V]}],shrink:[{shrink:["",ne,B,V]}],order:[{order:[Ze,"first","last","none",B,V]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[i,"screen",...D()]}],"min-w":[{"min-w":[i,"screen","none",...D()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",r,zt,ct]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,B,fn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",dn,V]}],"font-family":[{font:[id,V,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:[o,B,V]}],"line-clamp":[{"line-clamp":[ne,"none",B,fn]}],leading:[{leading:[s,...T()]}],"list-image":[{"list-image":["none",B,V]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",B,V]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",B,ct]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[ne,"auto",B,V]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B,V]}],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",B,V]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:oe()}],"bg-size":[{bg:le()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ze,B,V],radial:["",B,V],conic:[Ze,B,V]},ld,ad]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...L(),"hidden","none"]}],"divide-style":[{divide:[...L(),"hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...L(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,B,V]}],"outline-w":[{outline:["",ne,zt,ct]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",f,dr,ur]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",p,dr,ur]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[ne,ct]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",g,dr,ur]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[ne,B,V]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":O()}],"mask-image-linear-to-pos":[{"mask-linear-to":O()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":O()}],"mask-image-t-to-pos":[{"mask-t-to":O()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":O()}],"mask-image-r-to-pos":[{"mask-r-to":O()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":O()}],"mask-image-b-to-pos":[{"mask-b-to":O()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":O()}],"mask-image-l-to-pos":[{"mask-l-to":O()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":O()}],"mask-image-x-to-pos":[{"mask-x-to":O()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":O()}],"mask-image-y-to-pos":[{"mask-y-to":O()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[B,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":O()}],"mask-image-radial-to-pos":[{"mask-radial-to":O()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":O()}],"mask-image-conic-to-pos":[{"mask-conic-to":O()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:oe()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",B,V]}],filter:[{filter:["","none",B,V]}],blur:[{blur:q()}],brightness:[{brightness:[ne,B,V]}],contrast:[{contrast:[ne,B,V]}],"drop-shadow":[{"drop-shadow":["","none",v,dr,ur]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",ne,B,V]}],"hue-rotate":[{"hue-rotate":[ne,B,V]}],invert:[{invert:["",ne,B,V]}],saturate:[{saturate:[ne,B,V]}],sepia:[{sepia:["",ne,B,V]}],"backdrop-filter":[{"backdrop-filter":["","none",B,V]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[ne,B,V]}],"backdrop-contrast":[{"backdrop-contrast":[ne,B,V]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,B,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,B,V]}],"backdrop-invert":[{"backdrop-invert":["",ne,B,V]}],"backdrop-opacity":[{"backdrop-opacity":[ne,B,V]}],"backdrop-saturate":[{"backdrop-saturate":[ne,B,V]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,B,V]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",B,V]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",B,V]}],ease:[{ease:["linear","initial",y,B,V]}],delay:[{delay:[ne,B,V]}],animate:[{animate:["none",h,B,V]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,B,V]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:ie()}],"skew-x":[{"skew-x":ie()}],"skew-y":[{"skew-y":ie()}],transform:[{transform:[B,V,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"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",B,V]}],"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":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",B,V]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[ne,zt,ct,fn]}],stroke:[{stroke:["none",...E()]}],"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"]}},pd=Ku(fd);function $(...e){return pd(ea(e))}const md=Dr("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer",{variants:{variant:{default:"bg-purple-300 text-black font-normal hover:bg-primary/80 dark:bg-primary dark:text-primary-foreground dark:hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80 dark:bg-destructive dark:text-destructive-foreground dark:hover:bg-destructive/80",outline:"border border-purple-mutted-600 shadow-xs hover:text-purple-100 text-purple-mutted-400",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 dark:bg-secondary dark:text-secondary-foreground dark:hover:bg-secondary/80",ghost:"text-foreground hover:bg-accent hover:text-accent-foreground dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline dark:text-primary",success:"bg-success text-success-foreground hover:bg-success/80 dark:bg-success dark:text-success-foreground dark:hover:bg-success/80",warning:"bg-warning text-warning-foreground hover:bg-warning/80 dark:bg-warning dark:text-warning-foreground dark:hover:bg-warning/80"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Mr=l.forwardRef(({className:e,variant:t,size:r,...n},o)=>d.jsx("button",{className:$(md({variant:t,size:r,className:e})),ref:o,...n}));Mr.displayName="Button";const gd=Dr("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input flex h-9 w-full min-w-0 rounded-md border bg-background px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-input dark:bg-background dark:text-foreground dark:placeholder:text-muted-foreground",{variants:{variant:{default:"bg-purple-mutted-700 border-purple-mutted-500 text-purple-mutted-300 text-sm",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-muted-foreground dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-muted-foreground",accent:"bg-accent border-accent text-accent-foreground placeholder:text-muted-foreground dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-muted-foreground",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"bg-destructive border-destructive text-destructive-foreground placeholder:text-destructive-foreground/70 dark:bg-destructive dark:border-destructive dark:text-destructive-foreground dark:placeholder:text-destructive-foreground/70"}},defaultVariants:{variant:"default"}});function da({className:e,variant:t,type:r,...n}){return d.jsx("input",{type:r,"data-slot":"input",className:$(gd({variant:t,className:e})),...n})}function ls(e,[t,r]){return Math.min(r,Math.max(t,e))}function Z(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function vd(e,t){const r=l.createContext(t),n=s=>{const{children:a,...i}=s,c=l.useMemo(()=>i,Object.values(i));return d.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function o(s){const a=l.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function ke(e,t=[]){let r=[];function n(s,a){const i=l.createContext(a),c=r.length;r=[...r,a];const u=p=>{var y;const{scope:g,children:v,...w}=p,m=((y=g==null?void 0:g[e])==null?void 0:y[c])||i,x=l.useMemo(()=>w,Object.values(w));return d.jsx(m.Provider,{value:x,children:v})};u.displayName=s+"Provider";function f(p,g){var m;const v=((m=g==null?void 0:g[e])==null?void 0:m[c])||i,w=l.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=r.map(a=>l.createContext(a));return function(i){const c=(i==null?void 0:i[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,hd(o,...t)]}function hd(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=n.reduce((i,{useScope:c,scopeName:u})=>{const p=c(s)[`__scope${u}`];return{...i,...p}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function us(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lt(...e){return t=>{let r=!1;const n=e.map(o=>{const s=us(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():us(e[o],null)}}}}function de(...e){return l.useCallback(lt(...e),e)}function ut(e){const t=xd(e),r=l.forwardRef((n,o)=>{const{children:s,...a}=n,i=l.Children.toArray(s),c=i.find(yd);if(c){const u=c.props.children,f=i.map(p=>p===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:p);return d.jsx(t,{...a,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,f):null})}return d.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var fa=ut("Slot");function xd(e){const t=l.forwardRef((r,n)=>{const{children:o,...s}=r;if(l.isValidElement(o)){const a=Cd(o),i=wd(s,o.props);return o.type!==l.Fragment&&(i.ref=n?lt(n,a):a),l.cloneElement(o,i)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pa=Symbol("radix.slottable");function bd(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=pa,t}function yd(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pa}function wd(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Cd(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Xn(e){const t=e+"CollectionProvider",[r,n]=ke(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:x,children:y}=m,h=P.useRef(null),C=P.useRef(new Map).current;return d.jsx(o,{scope:x,itemMap:C,collectionRef:h,children:y})};a.displayName=t;const i=e+"CollectionSlot",c=ut(i),u=P.forwardRef((m,x)=>{const{scope:y,children:h}=m,C=s(i,y),S=de(x,C.collectionRef);return d.jsx(c,{ref:S,children:h})});u.displayName=i;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=ut(f),v=P.forwardRef((m,x)=>{const{scope:y,children:h,...C}=m,S=P.useRef(null),k=de(x,S),N=s(f,y);return P.useEffect(()=>(N.itemMap.set(S,{ref:S,...C}),()=>void N.itemMap.delete(S))),d.jsx(g,{[p]:"",ref:k,children:h})});v.displayName=f;function w(m){const x=s(e+"CollectionConsumer",m);return P.useCallback(()=>{const h=x.collectionRef.current;if(!h)return[];const C=Array.from(h.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((N,_)=>C.indexOf(N.ref.current)-C.indexOf(_.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:a,Slot:u,ItemSlot:v},w,n]}var Sd=l.createContext(void 0);function Fr(e){const t=l.useContext(Sd);return e||t||"ltr"}var Ed=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],U=Ed.reduce((e,t)=>{const r=ut(`Primitive.${t}`),n=l.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Pd(e,t){e&&jr.flushSync(()=>e.dispatchEvent(t))}function Qe(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Rd(e,t=globalThis==null?void 0:globalThis.document){const r=Qe(e);l.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var kd="DismissableLayer",In="dismissableLayer.update",Td="dismissableLayer.pointerDownOutside",Ad="dismissableLayer.focusOutside",ds,ma=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qt=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,u=l.useContext(ma),[f,p]=l.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=l.useState({}),w=de(t,_=>p(_)),m=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(x),h=f?m.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,S=h>=y,k=Id(_=>{const T=_.target,H=[...u.branches].some(K=>K.contains(T));!S||H||(o==null||o(_),a==null||a(_),_.defaultPrevented||i==null||i())},g),N=Od(_=>{const T=_.target;[...u.branches].some(K=>K.contains(T))||(s==null||s(_),a==null||a(_),_.defaultPrevented||i==null||i())},g);return Rd(_=>{h===u.layers.size-1&&(n==null||n(_),!_.defaultPrevented&&i&&(_.preventDefault(),i()))},g),l.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ds=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),fs(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=ds)}},[f,g,r,u]),l.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),fs())},[f,u]),l.useEffect(()=>{const _=()=>v({});return document.addEventListener(In,_),()=>document.removeEventListener(In,_)},[]),d.jsx(U.div,{...c,ref:w,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,k.onPointerDownCapture)})});Qt.displayName=kd;var Nd="DismissableLayerBranch",_d=l.forwardRef((e,t)=>{const r=l.useContext(ma),n=l.useRef(null),o=de(t,n);return l.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),d.jsx(U.div,{...e,ref:o})});_d.displayName=Nd;function Id(e,t=globalThis==null?void 0:globalThis.document){const r=Qe(e),n=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let c=function(){ga(Td,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Od(e,t=globalThis==null?void 0:globalThis.document){const r=Qe(e),n=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!n.current&&ga(Ad,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function fs(){const e=new CustomEvent(In);document.dispatchEvent(e)}function ga(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Pd(o,s):o.dispatchEvent(s)}var pn=0;function Zn(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ps()),document.body.insertAdjacentElement("beforeend",e[1]??ps()),pn++,()=>{pn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),pn--}},[])}function ps(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var mn="focusScope.autoFocusOnMount",gn="focusScope.autoFocusOnUnmount",ms={bubbles:!1,cancelable:!0},jd="FocusScope",$r=l.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=l.useState(null),u=Qe(o),f=Qe(s),p=l.useRef(null),g=de(t,m=>c(m)),v=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(n){let m=function(C){if(v.paused||!i)return;const S=C.target;i.contains(S)?p.current=S:Je(p.current,{select:!0})},x=function(C){if(v.paused||!i)return;const S=C.relatedTarget;S!==null&&(i.contains(S)||Je(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const k of C)k.removedNodes.length>0&&Je(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const h=new MutationObserver(y);return i&&h.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),h.disconnect()}}},[n,i,v.paused]),l.useEffect(()=>{if(i){vs.add(v);const m=document.activeElement;if(!i.contains(m)){const y=new CustomEvent(mn,ms);i.addEventListener(mn,u),i.dispatchEvent(y),y.defaultPrevented||(Dd(Vd(va(i)),{select:!0}),document.activeElement===m&&Je(i))}return()=>{i.removeEventListener(mn,u),setTimeout(()=>{const y=new CustomEvent(gn,ms);i.addEventListener(gn,f),i.dispatchEvent(y),y.defaultPrevented||Je(m??document.body,{select:!0}),i.removeEventListener(gn,f),vs.remove(v)},0)}}},[i,u,f,v]);const w=l.useCallback(m=>{if(!r&&!n||v.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(x&&y){const h=m.currentTarget,[C,S]=Md(h);C&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&Je(C,{select:!0})):m.shiftKey&&y===C&&(m.preventDefault(),r&&Je(S,{select:!0})):y===h&&m.preventDefault()}},[r,n,v.paused]);return d.jsx(U.div,{tabIndex:-1,...a,ref:g,onKeyDown:w})});$r.displayName=jd;function Dd(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Je(n,{select:t}),document.activeElement!==r)return}function Md(e){const t=va(e),r=gs(t,e),n=gs(t.reverse(),e);return[r,n]}function va(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function gs(e,t){for(const r of e)if(!Fd(r,{upTo:t}))return r}function Fd(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $d(e){return e instanceof HTMLInputElement&&"select"in e}function Je(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&$d(e)&&t&&e.select()}}var vs=Ld();function Ld(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=hs(e,t),e.unshift(t)},remove(t){var r;e=hs(e,t),(r=e[0])==null||r.resume()}}}function hs(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Vd(e){return e.filter(t=>t.tagName!=="A")}var he=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Bd=l[" useId ".trim().toString()]||(()=>{}),Wd=0;function ve(e){const[t,r]=l.useState(Bd());return he(()=>{r(n=>n??String(Wd++))},[e]),t?`radix-${t}`:""}const zd=["top","right","bottom","left"],et=Math.min,Ce=Math.max,Cr=Math.round,fr=Math.floor,Ve=e=>({x:e,y:e}),Gd={left:"right",right:"left",bottom:"top",top:"bottom"},Hd={start:"end",end:"start"};function On(e,t,r){return Ce(e,et(t,r))}function Ue(e,t){return typeof e=="function"?e(t):e}function Ke(e){return e.split("-")[0]}function Dt(e){return e.split("-")[1]}function Jn(e){return e==="x"?"y":"x"}function Qn(e){return e==="y"?"height":"width"}const Ud=new Set(["top","bottom"]);function Le(e){return Ud.has(Ke(e))?"y":"x"}function eo(e){return Jn(Le(e))}function Kd(e,t,r){r===void 0&&(r=!1);const n=Dt(e),o=eo(e),s=Qn(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Sr(a)),[a,Sr(a)]}function Yd(e){const t=Sr(e);return[jn(e),t,jn(t)]}function jn(e){return e.replace(/start|end/g,t=>Hd[t])}const xs=["left","right"],bs=["right","left"],qd=["top","bottom"],Xd=["bottom","top"];function Zd(e,t,r){switch(e){case"top":case"bottom":return r?t?bs:xs:t?xs:bs;case"left":case"right":return t?qd:Xd;default:return[]}}function Jd(e,t,r,n){const o=Dt(e);let s=Zd(Ke(e),r==="start",n);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(jn)))),s}function Sr(e){return e.replace(/left|right|bottom|top/g,t=>Gd[t])}function Qd(e){return{top:0,right:0,bottom:0,left:0,...e}}function ha(e){return typeof e!="number"?Qd(e):{top:e,right:e,bottom:e,left:e}}function Er(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function ys(e,t,r){let{reference:n,floating:o}=e;const s=Le(t),a=eo(t),i=Qn(a),c=Ke(t),u=s==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,g=n[i]/2-o[i]/2;let v;switch(c){case"top":v={x:f,y:n.y-o.height};break;case"bottom":v={x:f,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:p};break;case"left":v={x:n.x-o.width,y:p};break;default:v={x:n.x,y:n.y}}switch(Dt(t)){case"start":v[a]-=g*(r&&u?-1:1);break;case"end":v[a]+=g*(r&&u?-1:1);break}return v}const ef=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=r,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=ys(u,n,c),g=n,v={},w=0;for(let m=0;m<i.length;m++){const{name:x,fn:y}=i[m],{x:h,y:C,data:S,reset:k}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});f=h??f,p=C??p,v={...v,[x]:{...v[x],...S}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(g=k.placement),k.rects&&(u=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:f,y:p}=ys(u,g,c)),m=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:v}};async function qt(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:v=0}=Ue(t,e),w=ha(v),x=i[g?p==="floating"?"reference":"floating":p],y=Er(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(x)))==null||r?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:c})),h=p==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),S=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},k=Er(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:h,offsetParent:C,strategy:c}):h);return{top:(y.top-k.top+w.top)/S.y,bottom:(k.bottom-y.bottom+w.bottom)/S.y,left:(y.left-k.left+w.left)/S.x,right:(k.right-y.right+w.right)/S.x}}const tf=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:u,padding:f=0}=Ue(e,t)||{};if(u==null)return{};const p=ha(f),g={x:r,y:n},v=eo(o),w=Qn(v),m=await a.getDimensions(u),x=v==="y",y=x?"top":"left",h=x?"bottom":"right",C=x?"clientHeight":"clientWidth",S=s.reference[w]+s.reference[v]-g[v]-s.floating[w],k=g[v]-s.reference[v],N=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let _=N?N[C]:0;(!_||!await(a.isElement==null?void 0:a.isElement(N)))&&(_=i.floating[C]||s.floating[w]);const T=S/2-k/2,H=_/2-m[w]/2-1,K=et(p[y],H),ee=et(p[h],H),J=K,Y=_-m[w]-ee,z=_/2-m[w]/2+T,j=On(J,z,Y),A=!c.arrow&&Dt(o)!=null&&z!==j&&s.reference[w]/2-(z<J?K:ee)-m[w]/2<0,D=A?z<J?z-J:z-Y:0;return{[v]:g[v]+D,data:{[v]:j,centerOffset:z-j-D,...A&&{alignmentOffset:D}},reset:A}}}),rf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...x}=Ue(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=Ke(o),h=Le(i),C=Ke(i)===i,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=g||(C||!m?[Sr(i)]:Yd(i)),N=w!=="none";!g&&N&&k.push(...Jd(i,m,w,S));const _=[i,...k],T=await qt(t,x),H=[];let K=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&H.push(T[y]),p){const z=Kd(o,a,S);H.push(T[z[0]],T[z[1]])}if(K=[...K,{placement:o,overflows:H}],!H.every(z=>z<=0)){var ee,J;const z=(((ee=s.flip)==null?void 0:ee.index)||0)+1,j=_[z];if(j&&(!(p==="alignment"?h!==Le(j):!1)||K.every(E=>Le(E.placement)===h?E.overflows[0]>0:!0)))return{data:{index:z,overflows:K},reset:{placement:j}};let A=(J=K.filter(D=>D.overflows[0]<=0).sort((D,E)=>D.overflows[1]-E.overflows[1])[0])==null?void 0:J.placement;if(!A)switch(v){case"bestFit":{var Y;const D=(Y=K.filter(E=>{if(N){const G=Le(E.placement);return G===h||G==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(G=>G>0).reduce((G,oe)=>G+oe,0)]).sort((E,G)=>E[1]-G[1])[0])==null?void 0:Y[0];D&&(A=D);break}case"initialPlacement":A=i;break}if(o!==A)return{reset:{placement:A}}}return{}}}};function ws(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cs(e){return zd.some(t=>e[t]>=0)}const nf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Ue(e,t);switch(n){case"referenceHidden":{const s=await qt(t,{...o,elementContext:"reference"}),a=ws(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Cs(a)}}}case"escaped":{const s=await qt(t,{...o,altBoundary:!0}),a=ws(s,r.floating);return{data:{escapedOffsets:a,escaped:Cs(a)}}}default:return{}}}}},xa=new Set(["left","top"]);async function of(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Ke(r),i=Dt(r),c=Le(r)==="y",u=xa.has(a)?-1:1,f=s&&c?-1:1,p=Ue(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof w=="number"&&(v=i==="end"?w*-1:w),c?{x:v*f,y:g*u}:{x:g*u,y:v*f}}const sf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await of(t,e);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},af=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:x=>{let{x:y,y:h}=x;return{x:y,y:h}}},...c}=Ue(e,t),u={x:r,y:n},f=await qt(t,c),p=Le(Ke(o)),g=Jn(p);let v=u[g],w=u[p];if(s){const x=g==="y"?"top":"left",y=g==="y"?"bottom":"right",h=v+f[x],C=v-f[y];v=On(h,v,C)}if(a){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",h=w+f[x],C=w-f[y];w=On(h,w,C)}const m=i.fn({...t,[g]:v,[p]:w});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[g]:s,[p]:a}}}}}},cf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=Ue(e,t),f={x:r,y:n},p=Le(o),g=Jn(p);let v=f[g],w=f[p];const m=Ue(i,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const C=g==="y"?"height":"width",S=s.reference[g]-s.floating[C]+x.mainAxis,k=s.reference[g]+s.reference[C]-x.mainAxis;v<S?v=S:v>k&&(v=k)}if(u){var y,h;const C=g==="y"?"width":"height",S=xa.has(Ke(o)),k=s.reference[p]-s.floating[C]+(S&&((y=a.offset)==null?void 0:y[p])||0)+(S?0:x.crossAxis),N=s.reference[p]+s.reference[C]+(S?0:((h=a.offset)==null?void 0:h[p])||0)-(S?x.crossAxis:0);w<k?w=k:w>N&&(w=N)}return{[g]:v,[p]:w}}}},lf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...u}=Ue(e,t),f=await qt(t,u),p=Ke(o),g=Dt(o),v=Le(o)==="y",{width:w,height:m}=s.floating;let x,y;p==="top"||p==="bottom"?(x=p,y=g===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(y=p,x=g==="end"?"top":"bottom");const h=m-f.top-f.bottom,C=w-f.left-f.right,S=et(m-f[x],h),k=et(w-f[y],C),N=!t.middlewareData.shift;let _=S,T=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(T=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(_=h),N&&!g){const K=Ce(f.left,0),ee=Ce(f.right,0),J=Ce(f.top,0),Y=Ce(f.bottom,0);v?T=w-2*(K!==0||ee!==0?K+ee:Ce(f.left,f.right)):_=m-2*(J!==0||Y!==0?J+Y:Ce(f.top,f.bottom))}await c({...t,availableWidth:T,availableHeight:_});const H=await a.getDimensions(i.floating);return w!==H.width||m!==H.height?{reset:{rects:!0}}:{}}}};function Lr(){return typeof window<"u"}function Mt(e){return ba(e)?(e.nodeName||"").toLowerCase():"#document"}function Se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function We(e){var t;return(t=(ba(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ba(e){return Lr()?e instanceof Node||e instanceof Se(e).Node:!1}function Ne(e){return Lr()?e instanceof Element||e instanceof Se(e).Element:!1}function Be(e){return Lr()?e instanceof HTMLElement||e instanceof Se(e).HTMLElement:!1}function Ss(e){return!Lr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Se(e).ShadowRoot}const uf=new Set(["inline","contents"]);function er(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=_e(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!uf.has(o)}const df=new Set(["table","td","th"]);function ff(e){return df.has(Mt(e))}const pf=[":popover-open",":modal"];function Vr(e){return pf.some(t=>{try{return e.matches(t)}catch{return!1}})}const mf=["transform","translate","scale","rotate","perspective"],gf=["transform","translate","scale","rotate","perspective","filter"],vf=["paint","layout","strict","content"];function to(e){const t=ro(),r=Ne(e)?_e(e):e;return mf.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||gf.some(n=>(r.willChange||"").includes(n))||vf.some(n=>(r.contain||"").includes(n))}function hf(e){let t=tt(e);for(;Be(t)&&!Nt(t);){if(to(t))return t;if(Vr(t))return null;t=tt(t)}return null}function ro(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xf=new Set(["html","body","#document"]);function Nt(e){return xf.has(Mt(e))}function _e(e){return Se(e).getComputedStyle(e)}function Br(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if(Mt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ss(e)&&e.host||We(e);return Ss(t)?t.host:t}function ya(e){const t=tt(e);return Nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Be(t)&&er(t)?t:ya(t)}function Xt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=ya(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),a=Se(o);if(s){const i=Dn(a);return t.concat(a,a.visualViewport||[],er(o)?o:[],i&&r?Xt(i):[])}return t.concat(o,Xt(o,[],r))}function Dn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wa(e){const t=_e(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Be(e),s=o?e.offsetWidth:r,a=o?e.offsetHeight:n,i=Cr(r)!==s||Cr(n)!==a;return i&&(r=s,n=a),{width:r,height:n,$:i}}function no(e){return Ne(e)?e:e.contextElement}function Tt(e){const t=no(e);if(!Be(t))return Ve(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=wa(t);let a=(s?Cr(r.width):r.width)/n,i=(s?Cr(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const bf=Ve(0);function Ca(e){const t=Se(e);return!ro()||!t.visualViewport?bf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yf(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Se(e)?!1:t}function dt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=no(e);let a=Ve(1);t&&(n?Ne(n)&&(a=Tt(n)):a=Tt(e));const i=yf(s,r,n)?Ca(s):Ve(0);let c=(o.left+i.x)/a.x,u=(o.top+i.y)/a.y,f=o.width/a.x,p=o.height/a.y;if(s){const g=Se(s),v=n&&Ne(n)?Se(n):n;let w=g,m=Dn(w);for(;m&&n&&v!==w;){const x=Tt(m),y=m.getBoundingClientRect(),h=_e(m),C=y.left+(m.clientLeft+parseFloat(h.paddingLeft))*x.x,S=y.top+(m.clientTop+parseFloat(h.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,p*=x.y,c+=C,u+=S,w=Se(m),m=Dn(w)}}return Er({width:f,height:p,x:c,y:u})}function Wr(e,t){const r=Br(e).scrollLeft;return t?t.left+r:dt(We(e)).left+r}function Sa(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Wr(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function wf(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",a=We(n),i=t?Vr(t.floating):!1;if(n===a||i&&s)return r;let c={scrollLeft:0,scrollTop:0},u=Ve(1);const f=Ve(0),p=Be(n);if((p||!p&&!s)&&((Mt(n)!=="body"||er(a))&&(c=Br(n)),Be(n))){const v=dt(n);u=Tt(n),f.x=v.x+n.clientLeft,f.y=v.y+n.clientTop}const g=a&&!p&&!s?Sa(a,c):Ve(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+g.x,y:r.y*u.y-c.scrollTop*u.y+f.y+g.y}}function Cf(e){return Array.from(e.getClientRects())}function Sf(e){const t=We(e),r=Br(e),n=e.ownerDocument.body,o=Ce(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Ce(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Wr(e);const i=-r.scrollTop;return _e(n).direction==="rtl"&&(a+=Ce(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:i}}const Es=25;function Ef(e,t){const r=Se(e),n=We(e),o=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const f=ro();(!f||f&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const u=Wr(n);if(u<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),v=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(n.clientWidth-p.clientWidth-v);w<=Es&&(s-=w)}else u<=Es&&(s+=u);return{width:s,height:a,x:i,y:c}}const Pf=new Set(["absolute","fixed"]);function Rf(e,t){const r=dt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=Be(e)?Tt(e):Ve(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,u=n*s.y;return{width:a,height:i,x:c,y:u}}function Ps(e,t,r){let n;if(t==="viewport")n=Ef(e,r);else if(t==="document")n=Sf(We(e));else if(Ne(t))n=Rf(t,r);else{const o=Ca(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Er(n)}function Ea(e,t){const r=tt(e);return r===t||!Ne(r)||Nt(r)?!1:_e(r).position==="fixed"||Ea(r,t)}function kf(e,t){const r=t.get(e);if(r)return r;let n=Xt(e,[],!1).filter(i=>Ne(i)&&Mt(i)!=="body"),o=null;const s=_e(e).position==="fixed";let a=s?tt(e):e;for(;Ne(a)&&!Nt(a);){const i=_e(a),c=to(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&Pf.has(o.position)||er(a)&&!c&&Ea(e,a))?n=n.filter(f=>f!==a):o=i,a=tt(a)}return t.set(e,n),n}function Tf(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?Vr(t)?[]:kf(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((u,f)=>{const p=Ps(t,f,o);return u.top=Ce(p.top,u.top),u.right=et(p.right,u.right),u.bottom=et(p.bottom,u.bottom),u.left=Ce(p.left,u.left),u},Ps(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Af(e){const{width:t,height:r}=wa(e);return{width:t,height:r}}function Nf(e,t,r){const n=Be(t),o=We(t),s=r==="fixed",a=dt(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=Ve(0);function u(){c.x=Wr(o)}if(n||!n&&!s)if((Mt(t)!=="body"||er(o))&&(i=Br(t)),n){const v=dt(t,!0,s,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&u();s&&!n&&o&&u();const f=o&&!n&&!s?Sa(o,i):Ve(0),p=a.left+i.scrollLeft-c.x-f.x,g=a.top+i.scrollTop-c.y-f.y;return{x:p,y:g,width:a.width,height:a.height}}function vn(e){return _e(e).position==="static"}function Rs(e,t){if(!Be(e)||_e(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return We(e)===r&&(r=r.ownerDocument.body),r}function Pa(e,t){const r=Se(e);if(Vr(e))return r;if(!Be(e)){let o=tt(e);for(;o&&!Nt(o);){if(Ne(o)&&!vn(o))return o;o=tt(o)}return r}let n=Rs(e,t);for(;n&&ff(n)&&vn(n);)n=Rs(n,t);return n&&Nt(n)&&vn(n)&&!to(n)?r:n||hf(e)||r}const _f=async function(e){const t=this.getOffsetParent||Pa,r=this.getDimensions,n=await r(e.floating);return{reference:Nf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function If(e){return _e(e).direction==="rtl"}const Of={convertOffsetParentRelativeRectToViewportRelativeRect:wf,getDocumentElement:We,getClippingRect:Tf,getOffsetParent:Pa,getElementRects:_f,getClientRects:Cf,getDimensions:Af,getScale:Tt,isElement:Ne,isRTL:If};function Ra(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jf(e,t){let r=null,n;const o=We(e);function s(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:p,width:g,height:v}=u;if(i||t(),!g||!v)return;const w=fr(p),m=fr(o.clientWidth-(f+g)),x=fr(o.clientHeight-(p+v)),y=fr(f),C={rootMargin:-w+"px "+-m+"px "+-x+"px "+-y+"px",threshold:Ce(0,et(1,c))||1};let S=!0;function k(N){const _=N[0].intersectionRatio;if(_!==c){if(!S)return a();_?a(!1,_):n=setTimeout(()=>{a(!1,1e-7)},1e3)}_===1&&!Ra(u,e.getBoundingClientRect())&&a(),S=!1}try{r=new IntersectionObserver(k,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(k,C)}r.observe(e)}return a(!0),s}function Df(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=no(e),f=o||s?[...u?Xt(u):[],...Xt(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const p=u&&i?jf(u,r):null;let g=-1,v=null;a&&(v=new ResizeObserver(y=>{let[h]=y;h&&h.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),r()}),u&&!c&&v.observe(u),v.observe(t));let w,m=c?dt(e):null;c&&x();function x(){const y=dt(e);m&&!Ra(m,y)&&r(),m=y,w=requestAnimationFrame(x)}return r(),()=>{var y;f.forEach(h=>{o&&h.removeEventListener("scroll",r),s&&h.removeEventListener("resize",r)}),p==null||p(),(y=v)==null||y.disconnect(),v=null,c&&cancelAnimationFrame(w)}}const Mf=sf,Ff=af,$f=rf,Lf=lf,Vf=nf,ks=tf,Bf=cf,Wf=(e,t,r)=>{const n=new Map,o={platform:Of,...r},s={...o.platform,_c:n};return ef(e,t,{...o,platform:s})};var zf=typeof document<"u",Gf=function(){},xr=zf?P.useLayoutEffect:Gf;function Pr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Pr(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Pr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ka(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ts(e,t){const r=ka(e);return Math.round(t*r)/r}function hn(e){const t=l.useRef(e);return xr(()=>{t.current=e}),t}function Hf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[f,p]=l.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=l.useState(n);Pr(g,n)||v(n);const[w,m]=l.useState(null),[x,y]=l.useState(null),h=l.useCallback(E=>{E!==N.current&&(N.current=E,m(E))},[]),C=l.useCallback(E=>{E!==_.current&&(_.current=E,y(E))},[]),S=s||w,k=a||x,N=l.useRef(null),_=l.useRef(null),T=l.useRef(f),H=c!=null,K=hn(c),ee=hn(o),J=hn(u),Y=l.useCallback(()=>{if(!N.current||!_.current)return;const E={placement:t,strategy:r,middleware:g};ee.current&&(E.platform=ee.current),Wf(N.current,_.current,E).then(G=>{const oe={...G,isPositioned:J.current!==!1};z.current&&!Pr(T.current,oe)&&(T.current=oe,jr.flushSync(()=>{p(oe)}))})},[g,t,r,ee,J]);xr(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,p(E=>({...E,isPositioned:!1})))},[u]);const z=l.useRef(!1);xr(()=>(z.current=!0,()=>{z.current=!1}),[]),xr(()=>{if(S&&(N.current=S),k&&(_.current=k),S&&k){if(K.current)return K.current(S,k,Y);Y()}},[S,k,Y,K,H]);const j=l.useMemo(()=>({reference:N,floating:_,setReference:h,setFloating:C}),[h,C]),A=l.useMemo(()=>({reference:S,floating:k}),[S,k]),D=l.useMemo(()=>{const E={position:r,left:0,top:0};if(!A.floating)return E;const G=Ts(A.floating,f.x),oe=Ts(A.floating,f.y);return i?{...E,transform:"translate("+G+"px, "+oe+"px)",...ka(A.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:G,top:oe}},[r,i,A.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:Y,refs:j,elements:A,floatingStyles:D}),[f,Y,j,A,D])}const Uf=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ks({element:n.current,padding:o}).fn(r):{}:n?ks({element:n,padding:o}).fn(r):{}}}},Kf=(e,t)=>({...Mf(e),options:[e,t]}),Yf=(e,t)=>({...Ff(e),options:[e,t]}),qf=(e,t)=>({...Bf(e),options:[e,t]}),Xf=(e,t)=>({...$f(e),options:[e,t]}),Zf=(e,t)=>({...Lf(e),options:[e,t]}),Jf=(e,t)=>({...Vf(e),options:[e,t]}),Qf=(e,t)=>({...Uf(e),options:[e,t]});var ep="Arrow",Ta=l.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return d.jsx(U.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ta.displayName=ep;var tp=Ta;function Aa(e){const[t,r]=l.useState(void 0);return he(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,i=u.blockSize}else a=e.offsetWidth,i=e.offsetHeight;r({width:a,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var oo="Popper",[Na,Ft]=ke(oo),[rp,_a]=Na(oo),Ia=e=>{const{__scopePopper:t,children:r}=e,[n,o]=l.useState(null);return d.jsx(rp,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ia.displayName=oo;var Oa="PopperAnchor",ja=l.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=_a(Oa,r),a=l.useRef(null),i=de(t,a),c=l.useRef(null);return l.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||a.current,u!==c.current&&s.onAnchorChange(c.current)}),n?null:d.jsx(U.div,{...o,ref:i})});ja.displayName=Oa;var so="PopperContent",[np,op]=Na(so),Da=l.forwardRef((e,t)=>{var O,q,te,re,ie,se;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:w,...m}=e,x=_a(so,r),[y,h]=l.useState(null),C=de(t,xe=>h(xe)),[S,k]=l.useState(null),N=Aa(S),_=(N==null?void 0:N.width)??0,T=(N==null?void 0:N.height)??0,H=n+(s!=="center"?"-"+s:""),K=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},ee=Array.isArray(u)?u:[u],J=ee.length>0,Y={padding:K,boundary:ee.filter(ap),altBoundary:J},{refs:z,floatingStyles:j,placement:A,isPositioned:D,middlewareData:E}=Hf({strategy:"fixed",placement:H,whileElementsMounted:(...xe)=>Df(...xe,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[Kf({mainAxis:o+T,alignmentAxis:a}),c&&Yf({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?qf():void 0,...Y}),c&&Xf({...Y}),Zf({...Y,apply:({elements:xe,rects:Pe,availableWidth:De,availableHeight:Te})=>{const{width:Xe,height:cr}=Pe.reference,Ge=xe.floating.style;Ge.setProperty("--radix-popper-available-width",`${De}px`),Ge.setProperty("--radix-popper-available-height",`${Te}px`),Ge.setProperty("--radix-popper-anchor-width",`${Xe}px`),Ge.setProperty("--radix-popper-anchor-height",`${cr}px`)}}),S&&Qf({element:S,padding:i}),ip({arrowWidth:_,arrowHeight:T}),g&&Jf({strategy:"referenceHidden",...Y})]}),[G,oe]=$a(A),le=Qe(w);he(()=>{D&&(le==null||le())},[D,le]);const R=(O=E.arrow)==null?void 0:O.x,F=(q=E.arrow)==null?void 0:q.y,W=((te=E.arrow)==null?void 0:te.centerOffset)!==0,[L,Q]=l.useState();return he(()=>{y&&Q(window.getComputedStyle(y).zIndex)},[y]),d.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:D?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(re=E.transformOrigin)==null?void 0:re.x,(ie=E.transformOrigin)==null?void 0:ie.y].join(" "),...((se=E.hide)==null?void 0:se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(np,{scope:r,placedSide:G,onArrowChange:k,arrowX:R,arrowY:F,shouldHideArrow:W,children:d.jsx(U.div,{"data-side":G,"data-align":oe,...m,ref:C,style:{...m.style,animation:D?void 0:"none"}})})})});Da.displayName=so;var Ma="PopperArrow",sp={top:"bottom",right:"left",bottom:"top",left:"right"},Fa=l.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=op(Ma,n),a=sp[s.placedSide];return d.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:d.jsx(tp,{...o,ref:r,style:{...o.style,display:"block"}})})});Fa.displayName=Ma;function ap(e){return e!==null}var ip=e=>({name:"transformOrigin",options:e,fn(t){var x,y,h;const{placement:r,rects:n,middlewareData:o}=t,a=((x=o.arrow)==null?void 0:x.centerOffset)!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,f]=$a(r),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+i/2,v=(((h=o.arrow)==null?void 0:h.y)??0)+c/2;let w="",m="";return u==="bottom"?(w=a?p:`${g}px`,m=`${-c}px`):u==="top"?(w=a?p:`${g}px`,m=`${n.floating.height+c}px`):u==="right"?(w=`${-c}px`,m=a?p:`${v}px`):u==="left"&&(w=`${n.floating.width+c}px`,m=a?p:`${v}px`),{data:{x:w,y:m}}}});function $a(e){const[t,r="center"]=e.split("-");return[t,r]}var ao=Ia,zr=ja,io=Da,co=Fa,cp="Portal",tr=l.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,s]=l.useState(!1);he(()=>s(!0),[]);const a=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Jt.createPortal(d.jsx(U.div,{...n,ref:t}),a):null});tr.displayName=cp;var lp=l[" useInsertionEffect ".trim().toString()]||he;function Ee({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,a]=up({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:o;{const f=l.useRef(e!==void 0);l.useEffect(()=>{const p=f.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,n])}const u=l.useCallback(f=>{var p;if(i){const g=dp(f)?f(e):f;g!==e&&((p=a.current)==null||p.call(a,g))}else s(f)},[i,e,s,a]);return[c,u]}function up({defaultProp:e,onChange:t}){const[r,n]=l.useState(e),o=l.useRef(r),s=l.useRef(t);return lp(()=>{s.current=t},[t]),l.useEffect(()=>{var a;o.current!==r&&((a=s.current)==null||a.call(s,r),o.current=r)},[r,o]),[r,n,s]}function dp(e){return typeof e=="function"}function La(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Va=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),fp="VisuallyHidden",Ba=l.forwardRef((e,t)=>d.jsx(U.span,{...e,ref:t,style:{...Va,...e.style}}));Ba.displayName=fp;var pp=Ba,mp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wt=new WeakMap,pr=new WeakMap,mr={},xn=0,Wa=function(e){return e&&(e.host||Wa(e.parentNode))},gp=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Wa(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},vp=function(e,t,r,n){var o=gp(t,Array.isArray(e)?e:[e]);mr[r]||(mr[r]=new WeakMap);var s=mr[r],a=[],i=new Set,c=new Set(o),u=function(p){!p||i.has(p)||(i.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(g){if(i.has(g))f(g);else try{var v=g.getAttribute(n),w=v!==null&&v!=="false",m=(wt.get(g)||0)+1,x=(s.get(g)||0)+1;wt.set(g,m),s.set(g,x),a.push(g),m===1&&w&&pr.set(g,!0),x===1&&g.setAttribute(r,"true"),w||g.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),i.clear(),xn++,function(){a.forEach(function(p){var g=wt.get(p)-1,v=s.get(p)-1;wt.set(p,g),s.set(p,v),g||(pr.has(p)||p.removeAttribute(n),pr.delete(p)),v||p.removeAttribute(r)}),xn--,xn||(wt=new WeakMap,wt=new WeakMap,pr=new WeakMap,mr={})}},lo=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=mp(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),vp(n,o,r,"aria-hidden")):function(){return null}},$e=function(){return $e=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},$e.apply(this,arguments)};function za(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function hp(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var br="right-scroll-bar-position",yr="width-before-scroll-bar",xp="with-scroll-bars-hidden",bp="--removed-body-scroll-bar-size";function bn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yp(e,t){var r=P.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var wp=typeof window<"u"?l.useLayoutEffect:l.useEffect,As=new WeakMap;function Cp(e,t){var r=yp(null,function(n){return e.forEach(function(o){return bn(o,n)})});return wp(function(){var n=As.get(r);if(n){var o=new Set(n),s=new Set(e),a=r.current;o.forEach(function(i){s.has(i)||bn(i,null)}),s.forEach(function(i){o.has(i)||bn(i,a)})}As.set(r,e)},[e]),r}function Sp(e){return e}function Ep(e,t){t===void 0&&(t=Sp);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=t(s,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(i){return s(i)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(s),a=r}var c=function(){var f=a;a=[],f.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return o}function Pp(e){e===void 0&&(e={});var t=Ep(null);return t.options=$e({async:!0,ssr:!1},e),t}var Ga=function(e){var t=e.sideCar,r=za(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return l.createElement(n,$e({},r))};Ga.isSideCarExport=!0;function Rp(e,t){return e.useMedium(t),Ga}var Ha=Pp(),yn=function(){},Gr=l.forwardRef(function(e,t){var r=l.useRef(null),n=l.useState({onScrollCapture:yn,onWheelCapture:yn,onTouchMoveCapture:yn}),o=n[0],s=n[1],a=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,v=e.noRelative,w=e.noIsolation,m=e.inert,x=e.allowPinchZoom,y=e.as,h=y===void 0?"div":y,C=e.gapMode,S=za(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=g,N=Cp([r,t]),_=$e($e({},S),o);return l.createElement(l.Fragment,null,f&&l.createElement(k,{sideCar:Ha,removeScrollBar:u,shards:p,noRelative:v,noIsolation:w,inert:m,setCallbacks:s,allowPinchZoom:!!x,lockRef:r,gapMode:C}),a?l.cloneElement(l.Children.only(i),$e($e({},_),{ref:N})):l.createElement(h,$e({},_,{className:c,ref:N}),i))});Gr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Gr.classNames={fullWidth:yr,zeroRight:br};var kp=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Tp(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kp();return t&&e.setAttribute("nonce",t),e}function Ap(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Np(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _p=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Tp())&&(Ap(t,r),Np(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ip=function(){var e=_p();return function(t,r){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Ua=function(){var e=Ip(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Op={left:0,top:0,right:0,gap:0},wn=function(e){return parseInt(e||"",10)||0},jp=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[wn(r),wn(n),wn(o)]},Dp=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Op;var t=jp(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Mp=Ua(),At="data-scroll-locked",Fp=function(e,t,r,n){var o=e.left,s=e.top,a=e.right,i=e.gap;return r===void 0&&(r="margin"),`
30
+ <%s key={someKey} {...props} />`,un,it,Pu,it),Jo[it+un]=!0}}return b===n?yu(me):bu(me),me}}function wu(b,I,M){return Qo(b,I,M,!0)}function Cu(b,I,M){return Qo(b,I,M,!1)}var Su=Cu,Eu=wu;Wt.Fragment=n,Wt.jsx=Su,Wt.jsxs=Eu})()),Wt}var rs;function Ou(){return rs||(rs=1,process.env.NODE_ENV==="production"?lr.exports=_u():lr.exports=Iu()),lr.exports}var d=Ou();function Qs(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Qs(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ea(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Qs(e))&&(n&&(n+=" "),n+=t);return n}const ns=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,os=ea,Dr=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return os(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(u=>{const f=r==null?void 0:r[u],p=s==null?void 0:s[u];if(f===null)return null;const g=ns(f)||ns(p);return o[u][g]}),i=r&&Object.entries(r).reduce((u,f)=>{let[p,g]=f;return g===void 0||(u[p]=g),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:p,className:g,...v}=f;return Object.entries(v).every(w=>{let[m,x]=w;return Array.isArray(x)?x.includes({...s,...i}[m]):{...s,...i}[m]===x})?[...u,p,g]:u},[]);return os(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)},qn="-",ju=e=>{const t=Mu(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const i=a.split(qn);return i[0]===""&&i.length!==1&&i.shift(),ta(i,t)||Du(a)},getConflictingClassGroupIds:(a,i)=>{const c=r[a]||[];return i&&n[a]?[...c,...n[a]]:c}}},ta=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?ta(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(qn);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},ss=/^\[(.+)\]$/,Du=e=>{if(ss.test(e)){const t=ss.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Mu=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)An(r[o],n,o,t);return n},An=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:as(t,o);s.classGroupId=r;return}if(typeof o=="function"){if(Fu(o)){An(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,a])=>{An(a,as(t,s),r,n)})})},as=(e,t)=>{let r=e;return t.split(qn).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Fu=e=>e.isThemeGetter,$u=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(s,a)=>{r.set(s,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){r.has(s)?r.set(s,a):o(s,a)}}},Nn="!",_n=":",Lu=_n.length,Vu=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let a=0,i=0,c=0,u;for(let w=0;w<o.length;w++){let m=o[w];if(a===0&&i===0){if(m===_n){s.push(o.slice(c,w)),c=w+Lu;continue}if(m==="/"){u=w;continue}}m==="["?a++:m==="]"?a--:m==="("?i++:m===")"&&i--}const f=s.length===0?o:o.substring(c),p=Bu(f),g=p!==f,v=u&&u>c?u-c:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:v}};if(t){const o=t+_n,s=n;n=a=>a.startsWith(o)?s(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},Bu=e=>e.endsWith(Nn)?e.substring(0,e.length-1):e.startsWith(Nn)?e.substring(1):e,Wu=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let s=[];return n.forEach(a=>{a[0]==="["||t[a]?(o.push(...s.sort(),a),s=[]):s.push(a)}),o.push(...s.sort()),o}},zu=e=>({cache:$u(e.cacheSize),parseClassName:Vu(e),sortModifiers:Wu(e),...ju(e)}),Gu=/\s+/,Hu=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(Gu);let c="";for(let u=i.length-1;u>=0;u-=1){const f=i[u],{isExternal:p,modifiers:g,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:m}=r(f);if(p){c=f+(c.length>0?" "+c:c);continue}let x=!!m,y=n(x?w.substring(0,m):w);if(!y){if(!x){c=f+(c.length>0?" "+c:c);continue}if(y=n(w),!y){c=f+(c.length>0?" "+c:c);continue}x=!1}const h=s(g).join(":"),C=v?h+Nn:h,S=C+y;if(a.includes(S))continue;a.push(S);const k=o(y,x);for(let N=0;N<k.length;++N){const _=k[N];a.push(C+_)}c=f+(c.length>0?" "+c:c)}return c};function Uu(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ra(t))&&(n&&(n+=" "),n+=r);return n}const ra=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=ra(e[n]))&&(r&&(r+=" "),r+=t);return r};function Ku(e,...t){let r,n,o,s=a;function a(c){const u=t.reduce((f,p)=>p(f),e());return r=zu(u),n=r.cache.get,o=r.cache.set,s=i,i(c)}function i(c){const u=n(c);if(u)return u;const f=Hu(c,r);return o(c,f),f}return function(){return s(Uu.apply(null,arguments))}}const ge=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},na=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,oa=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Yu=/^\d+\/\d+$/,qu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xu=/\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$/,Zu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ju=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yt=e=>Yu.test(e),ne=e=>!!e&&!Number.isNaN(Number(e)),Ze=e=>!!e&&Number.isInteger(Number(e)),dn=e=>e.endsWith("%")&&ne(e.slice(0,-1)),He=e=>qu.test(e),ed=()=>!0,td=e=>Xu.test(e)&&!Zu.test(e),sa=()=>!1,rd=e=>Ju.test(e),nd=e=>Qu.test(e),od=e=>!V(e)&&!B(e),sd=e=>Ot(e,ca,sa),V=e=>na.test(e),ct=e=>Ot(e,la,td),fn=e=>Ot(e,ud,ne),is=e=>Ot(e,aa,sa),ad=e=>Ot(e,ia,nd),ur=e=>Ot(e,ua,rd),B=e=>oa.test(e),zt=e=>jt(e,la),id=e=>jt(e,dd),cs=e=>jt(e,aa),cd=e=>jt(e,ca),ld=e=>jt(e,ia),dr=e=>jt(e,ua,!0),Ot=(e,t,r)=>{const n=na.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},jt=(e,t,r=!1)=>{const n=oa.exec(e);return n?n[1]?t(n[1]):r:!1},aa=e=>e==="position"||e==="percentage",ia=e=>e==="image"||e==="url",ca=e=>e==="length"||e==="size"||e==="bg-size",la=e=>e==="length",ud=e=>e==="number",dd=e=>e==="family-name",ua=e=>e==="shadow",fd=()=>{const e=ge("color"),t=ge("font"),r=ge("text"),n=ge("font-weight"),o=ge("tracking"),s=ge("leading"),a=ge("breakpoint"),i=ge("container"),c=ge("spacing"),u=ge("radius"),f=ge("shadow"),p=ge("inset-shadow"),g=ge("text-shadow"),v=ge("drop-shadow"),w=ge("blur"),m=ge("perspective"),x=ge("aspect"),y=ge("ease"),h=ge("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...S(),B,V],N=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],T=()=>[B,V,c],H=()=>[yt,"full","auto",...T()],K=()=>[Ze,"none","subgrid",B,V],ee=()=>["auto",{span:["full",Ze,B,V]},Ze,B,V],J=()=>[Ze,"auto",B,V],Y=()=>["auto","min","max","fr",B,V],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...T()],D=()=>[yt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],E=()=>[e,B,V],G=()=>[...S(),cs,is,{position:[B,V]}],oe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],le=()=>["auto","cover","contain",cd,sd,{size:[B,V]}],R=()=>[dn,zt,ct],F=()=>["","none","full",u,B,V],W=()=>["",ne,zt,ct],L=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],O=()=>[ne,dn,cs,is],q=()=>["","none",w,B,V],te=()=>["none",ne,B,V],re=()=>["none",ne,B,V],ie=()=>[ne,B,V],se=()=>[yt,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[He],breakpoint:[He],color:[ed],container:[He],"drop-shadow":[He],ease:["in","out","in-out"],font:[od],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[He],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[He],shadow:[He],spacing:["px",ne],text:[He],"text-shadow":[He],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yt,V,B,x]}],container:["container"],columns:[{columns:[ne,V,B,i]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{start:H()}],end:[{end:H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[Ze,"auto",B,V]}],basis:[{basis:[yt,"full","auto",i,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ne,yt,"auto","initial","none",V]}],grow:[{grow:["",ne,B,V]}],shrink:[{shrink:["",ne,B,V]}],order:[{order:[Ze,"first","last","none",B,V]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[i,"screen",...D()]}],"min-w":[{"min-w":[i,"screen","none",...D()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",r,zt,ct]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,B,fn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",dn,V]}],"font-family":[{font:[id,V,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:[o,B,V]}],"line-clamp":[{"line-clamp":[ne,"none",B,fn]}],leading:[{leading:[s,...T()]}],"list-image":[{"list-image":["none",B,V]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",B,V]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",B,ct]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[ne,"auto",B,V]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B,V]}],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",B,V]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:oe()}],"bg-size":[{bg:le()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ze,B,V],radial:["",B,V],conic:[Ze,B,V]},ld,ad]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...L(),"hidden","none"]}],"divide-style":[{divide:[...L(),"hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...L(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,B,V]}],"outline-w":[{outline:["",ne,zt,ct]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",f,dr,ur]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",p,dr,ur]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[ne,ct]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",g,dr,ur]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[ne,B,V]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":O()}],"mask-image-linear-to-pos":[{"mask-linear-to":O()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":O()}],"mask-image-t-to-pos":[{"mask-t-to":O()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":O()}],"mask-image-r-to-pos":[{"mask-r-to":O()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":O()}],"mask-image-b-to-pos":[{"mask-b-to":O()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":O()}],"mask-image-l-to-pos":[{"mask-l-to":O()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":O()}],"mask-image-x-to-pos":[{"mask-x-to":O()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":O()}],"mask-image-y-to-pos":[{"mask-y-to":O()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[B,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":O()}],"mask-image-radial-to-pos":[{"mask-radial-to":O()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":O()}],"mask-image-conic-to-pos":[{"mask-conic-to":O()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:oe()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",B,V]}],filter:[{filter:["","none",B,V]}],blur:[{blur:q()}],brightness:[{brightness:[ne,B,V]}],contrast:[{contrast:[ne,B,V]}],"drop-shadow":[{"drop-shadow":["","none",v,dr,ur]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",ne,B,V]}],"hue-rotate":[{"hue-rotate":[ne,B,V]}],invert:[{invert:["",ne,B,V]}],saturate:[{saturate:[ne,B,V]}],sepia:[{sepia:["",ne,B,V]}],"backdrop-filter":[{"backdrop-filter":["","none",B,V]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[ne,B,V]}],"backdrop-contrast":[{"backdrop-contrast":[ne,B,V]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,B,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,B,V]}],"backdrop-invert":[{"backdrop-invert":["",ne,B,V]}],"backdrop-opacity":[{"backdrop-opacity":[ne,B,V]}],"backdrop-saturate":[{"backdrop-saturate":[ne,B,V]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,B,V]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",B,V]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",B,V]}],ease:[{ease:["linear","initial",y,B,V]}],delay:[{delay:[ne,B,V]}],animate:[{animate:["none",h,B,V]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,B,V]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:ie()}],"skew-x":[{"skew-x":ie()}],"skew-y":[{"skew-y":ie()}],transform:[{transform:[B,V,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"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",B,V]}],"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":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",B,V]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[ne,zt,ct,fn]}],stroke:[{stroke:["none",...E()]}],"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"]}},pd=Ku(fd);function $(...e){return pd(ea(e))}const md=Dr("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer",{variants:{variant:{default:"bg-purple-300 text-black font-normal hover:bg-primary/80 dark:bg-primary dark:text-primary-foreground dark:hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80 dark:bg-destructive dark:text-destructive-foreground dark:hover:bg-destructive/80",outline:"border border-purple-mutted-600 shadow-xs hover:text-purple-100 text-purple-mutted-400",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 dark:bg-secondary dark:text-secondary-foreground dark:hover:bg-secondary/80",ghost:"text-foreground hover:bg-accent hover:text-accent-foreground dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline dark:text-primary",success:"bg-success text-success-foreground hover:bg-success/80 dark:bg-success dark:text-success-foreground dark:hover:bg-success/80",warning:"bg-warning text-warning-foreground hover:bg-warning/80 dark:bg-warning dark:text-warning-foreground dark:hover:bg-warning/80"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Mr=l.forwardRef(({className:e,variant:t,size:r,...n},o)=>d.jsx("button",{className:$(md({variant:t,size:r,className:e})),ref:o,...n}));Mr.displayName="Button";const gd=Dr("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input flex h-9 w-full min-w-0 rounded-md border bg-background px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-input dark:bg-background dark:text-foreground dark:placeholder:text-muted-foreground",{variants:{variant:{default:"bg-purple-mutted-700 border-purple-mutted-500 text-purple-mutted-300 text-sm",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-muted-foreground dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-muted-foreground",accent:"bg-accent border-accent text-accent-foreground placeholder:text-muted-foreground dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-muted-foreground",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"border-destructive text-purple-mutted-200 placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70"}},defaultVariants:{variant:"default"}});function da({className:e,variant:t,type:r,error:n,...o}){const s=n?"destructive":t;return d.jsx("input",{type:r,"data-slot":"input",className:$(gd({variant:s,className:e})),...o})}function ls(e,[t,r]){return Math.min(r,Math.max(t,e))}function Z(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function vd(e,t){const r=l.createContext(t),n=s=>{const{children:a,...i}=s,c=l.useMemo(()=>i,Object.values(i));return d.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function o(s){const a=l.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function ke(e,t=[]){let r=[];function n(s,a){const i=l.createContext(a),c=r.length;r=[...r,a];const u=p=>{var y;const{scope:g,children:v,...w}=p,m=((y=g==null?void 0:g[e])==null?void 0:y[c])||i,x=l.useMemo(()=>w,Object.values(w));return d.jsx(m.Provider,{value:x,children:v})};u.displayName=s+"Provider";function f(p,g){var m;const v=((m=g==null?void 0:g[e])==null?void 0:m[c])||i,w=l.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=r.map(a=>l.createContext(a));return function(i){const c=(i==null?void 0:i[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,hd(o,...t)]}function hd(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=n.reduce((i,{useScope:c,scopeName:u})=>{const p=c(s)[`__scope${u}`];return{...i,...p}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function us(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lt(...e){return t=>{let r=!1;const n=e.map(o=>{const s=us(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():us(e[o],null)}}}}function de(...e){return l.useCallback(lt(...e),e)}function ut(e){const t=xd(e),r=l.forwardRef((n,o)=>{const{children:s,...a}=n,i=l.Children.toArray(s),c=i.find(yd);if(c){const u=c.props.children,f=i.map(p=>p===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:p);return d.jsx(t,{...a,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,f):null})}return d.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var fa=ut("Slot");function xd(e){const t=l.forwardRef((r,n)=>{const{children:o,...s}=r;if(l.isValidElement(o)){const a=Cd(o),i=wd(s,o.props);return o.type!==l.Fragment&&(i.ref=n?lt(n,a):a),l.cloneElement(o,i)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pa=Symbol("radix.slottable");function bd(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=pa,t}function yd(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pa}function wd(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Cd(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Xn(e){const t=e+"CollectionProvider",[r,n]=ke(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:x,children:y}=m,h=P.useRef(null),C=P.useRef(new Map).current;return d.jsx(o,{scope:x,itemMap:C,collectionRef:h,children:y})};a.displayName=t;const i=e+"CollectionSlot",c=ut(i),u=P.forwardRef((m,x)=>{const{scope:y,children:h}=m,C=s(i,y),S=de(x,C.collectionRef);return d.jsx(c,{ref:S,children:h})});u.displayName=i;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=ut(f),v=P.forwardRef((m,x)=>{const{scope:y,children:h,...C}=m,S=P.useRef(null),k=de(x,S),N=s(f,y);return P.useEffect(()=>(N.itemMap.set(S,{ref:S,...C}),()=>void N.itemMap.delete(S))),d.jsx(g,{[p]:"",ref:k,children:h})});v.displayName=f;function w(m){const x=s(e+"CollectionConsumer",m);return P.useCallback(()=>{const h=x.collectionRef.current;if(!h)return[];const C=Array.from(h.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((N,_)=>C.indexOf(N.ref.current)-C.indexOf(_.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:a,Slot:u,ItemSlot:v},w,n]}var Sd=l.createContext(void 0);function Fr(e){const t=l.useContext(Sd);return e||t||"ltr"}var Ed=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],U=Ed.reduce((e,t)=>{const r=ut(`Primitive.${t}`),n=l.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Pd(e,t){e&&jr.flushSync(()=>e.dispatchEvent(t))}function Qe(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Rd(e,t=globalThis==null?void 0:globalThis.document){const r=Qe(e);l.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var kd="DismissableLayer",In="dismissableLayer.update",Td="dismissableLayer.pointerDownOutside",Ad="dismissableLayer.focusOutside",ds,ma=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qt=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,u=l.useContext(ma),[f,p]=l.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=l.useState({}),w=de(t,_=>p(_)),m=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(x),h=f?m.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,S=h>=y,k=Id(_=>{const T=_.target,H=[...u.branches].some(K=>K.contains(T));!S||H||(o==null||o(_),a==null||a(_),_.defaultPrevented||i==null||i())},g),N=Od(_=>{const T=_.target;[...u.branches].some(K=>K.contains(T))||(s==null||s(_),a==null||a(_),_.defaultPrevented||i==null||i())},g);return Rd(_=>{h===u.layers.size-1&&(n==null||n(_),!_.defaultPrevented&&i&&(_.preventDefault(),i()))},g),l.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ds=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),fs(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=ds)}},[f,g,r,u]),l.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),fs())},[f,u]),l.useEffect(()=>{const _=()=>v({});return document.addEventListener(In,_),()=>document.removeEventListener(In,_)},[]),d.jsx(U.div,{...c,ref:w,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,k.onPointerDownCapture)})});Qt.displayName=kd;var Nd="DismissableLayerBranch",_d=l.forwardRef((e,t)=>{const r=l.useContext(ma),n=l.useRef(null),o=de(t,n);return l.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),d.jsx(U.div,{...e,ref:o})});_d.displayName=Nd;function Id(e,t=globalThis==null?void 0:globalThis.document){const r=Qe(e),n=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let c=function(){ga(Td,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Od(e,t=globalThis==null?void 0:globalThis.document){const r=Qe(e),n=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!n.current&&ga(Ad,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function fs(){const e=new CustomEvent(In);document.dispatchEvent(e)}function ga(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Pd(o,s):o.dispatchEvent(s)}var pn=0;function Zn(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ps()),document.body.insertAdjacentElement("beforeend",e[1]??ps()),pn++,()=>{pn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),pn--}},[])}function ps(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var mn="focusScope.autoFocusOnMount",gn="focusScope.autoFocusOnUnmount",ms={bubbles:!1,cancelable:!0},jd="FocusScope",$r=l.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=l.useState(null),u=Qe(o),f=Qe(s),p=l.useRef(null),g=de(t,m=>c(m)),v=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(n){let m=function(C){if(v.paused||!i)return;const S=C.target;i.contains(S)?p.current=S:Je(p.current,{select:!0})},x=function(C){if(v.paused||!i)return;const S=C.relatedTarget;S!==null&&(i.contains(S)||Je(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const k of C)k.removedNodes.length>0&&Je(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",x);const h=new MutationObserver(y);return i&&h.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",x),h.disconnect()}}},[n,i,v.paused]),l.useEffect(()=>{if(i){vs.add(v);const m=document.activeElement;if(!i.contains(m)){const y=new CustomEvent(mn,ms);i.addEventListener(mn,u),i.dispatchEvent(y),y.defaultPrevented||(Dd(Vd(va(i)),{select:!0}),document.activeElement===m&&Je(i))}return()=>{i.removeEventListener(mn,u),setTimeout(()=>{const y=new CustomEvent(gn,ms);i.addEventListener(gn,f),i.dispatchEvent(y),y.defaultPrevented||Je(m??document.body,{select:!0}),i.removeEventListener(gn,f),vs.remove(v)},0)}}},[i,u,f,v]);const w=l.useCallback(m=>{if(!r&&!n||v.paused)return;const x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(x&&y){const h=m.currentTarget,[C,S]=Md(h);C&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&Je(C,{select:!0})):m.shiftKey&&y===C&&(m.preventDefault(),r&&Je(S,{select:!0})):y===h&&m.preventDefault()}},[r,n,v.paused]);return d.jsx(U.div,{tabIndex:-1,...a,ref:g,onKeyDown:w})});$r.displayName=jd;function Dd(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Je(n,{select:t}),document.activeElement!==r)return}function Md(e){const t=va(e),r=gs(t,e),n=gs(t.reverse(),e);return[r,n]}function va(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function gs(e,t){for(const r of e)if(!Fd(r,{upTo:t}))return r}function Fd(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $d(e){return e instanceof HTMLInputElement&&"select"in e}function Je(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&$d(e)&&t&&e.select()}}var vs=Ld();function Ld(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=hs(e,t),e.unshift(t)},remove(t){var r;e=hs(e,t),(r=e[0])==null||r.resume()}}}function hs(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Vd(e){return e.filter(t=>t.tagName!=="A")}var he=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Bd=l[" useId ".trim().toString()]||(()=>{}),Wd=0;function ve(e){const[t,r]=l.useState(Bd());return he(()=>{r(n=>n??String(Wd++))},[e]),t?`radix-${t}`:""}const zd=["top","right","bottom","left"],et=Math.min,Ce=Math.max,Cr=Math.round,fr=Math.floor,Ve=e=>({x:e,y:e}),Gd={left:"right",right:"left",bottom:"top",top:"bottom"},Hd={start:"end",end:"start"};function On(e,t,r){return Ce(e,et(t,r))}function Ue(e,t){return typeof e=="function"?e(t):e}function Ke(e){return e.split("-")[0]}function Dt(e){return e.split("-")[1]}function Jn(e){return e==="x"?"y":"x"}function Qn(e){return e==="y"?"height":"width"}const Ud=new Set(["top","bottom"]);function Le(e){return Ud.has(Ke(e))?"y":"x"}function eo(e){return Jn(Le(e))}function Kd(e,t,r){r===void 0&&(r=!1);const n=Dt(e),o=eo(e),s=Qn(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Sr(a)),[a,Sr(a)]}function Yd(e){const t=Sr(e);return[jn(e),t,jn(t)]}function jn(e){return e.replace(/start|end/g,t=>Hd[t])}const xs=["left","right"],bs=["right","left"],qd=["top","bottom"],Xd=["bottom","top"];function Zd(e,t,r){switch(e){case"top":case"bottom":return r?t?bs:xs:t?xs:bs;case"left":case"right":return t?qd:Xd;default:return[]}}function Jd(e,t,r,n){const o=Dt(e);let s=Zd(Ke(e),r==="start",n);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(jn)))),s}function Sr(e){return e.replace(/left|right|bottom|top/g,t=>Gd[t])}function Qd(e){return{top:0,right:0,bottom:0,left:0,...e}}function ha(e){return typeof e!="number"?Qd(e):{top:e,right:e,bottom:e,left:e}}function Er(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function ys(e,t,r){let{reference:n,floating:o}=e;const s=Le(t),a=eo(t),i=Qn(a),c=Ke(t),u=s==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,g=n[i]/2-o[i]/2;let v;switch(c){case"top":v={x:f,y:n.y-o.height};break;case"bottom":v={x:f,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:p};break;case"left":v={x:n.x-o.width,y:p};break;default:v={x:n.x,y:n.y}}switch(Dt(t)){case"start":v[a]-=g*(r&&u?-1:1);break;case"end":v[a]+=g*(r&&u?-1:1);break}return v}const ef=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=r,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=ys(u,n,c),g=n,v={},w=0;for(let m=0;m<i.length;m++){const{name:x,fn:y}=i[m],{x:h,y:C,data:S,reset:k}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});f=h??f,p=C??p,v={...v,[x]:{...v[x],...S}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(g=k.placement),k.rects&&(u=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:f,y:p}=ys(u,g,c)),m=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:v}};async function qt(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:v=0}=Ue(t,e),w=ha(v),x=i[g?p==="floating"?"reference":"floating":p],y=Er(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(x)))==null||r?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:c})),h=p==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),S=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},k=Er(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:h,offsetParent:C,strategy:c}):h);return{top:(y.top-k.top+w.top)/S.y,bottom:(k.bottom-y.bottom+w.bottom)/S.y,left:(y.left-k.left+w.left)/S.x,right:(k.right-y.right+w.right)/S.x}}const tf=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:u,padding:f=0}=Ue(e,t)||{};if(u==null)return{};const p=ha(f),g={x:r,y:n},v=eo(o),w=Qn(v),m=await a.getDimensions(u),x=v==="y",y=x?"top":"left",h=x?"bottom":"right",C=x?"clientHeight":"clientWidth",S=s.reference[w]+s.reference[v]-g[v]-s.floating[w],k=g[v]-s.reference[v],N=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let _=N?N[C]:0;(!_||!await(a.isElement==null?void 0:a.isElement(N)))&&(_=i.floating[C]||s.floating[w]);const T=S/2-k/2,H=_/2-m[w]/2-1,K=et(p[y],H),ee=et(p[h],H),J=K,Y=_-m[w]-ee,z=_/2-m[w]/2+T,j=On(J,z,Y),A=!c.arrow&&Dt(o)!=null&&z!==j&&s.reference[w]/2-(z<J?K:ee)-m[w]/2<0,D=A?z<J?z-J:z-Y:0;return{[v]:g[v]+D,data:{[v]:j,centerOffset:z-j-D,...A&&{alignmentOffset:D}},reset:A}}}),rf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...x}=Ue(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=Ke(o),h=Le(i),C=Ke(i)===i,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=g||(C||!m?[Sr(i)]:Yd(i)),N=w!=="none";!g&&N&&k.push(...Jd(i,m,w,S));const _=[i,...k],T=await qt(t,x),H=[];let K=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&H.push(T[y]),p){const z=Kd(o,a,S);H.push(T[z[0]],T[z[1]])}if(K=[...K,{placement:o,overflows:H}],!H.every(z=>z<=0)){var ee,J;const z=(((ee=s.flip)==null?void 0:ee.index)||0)+1,j=_[z];if(j&&(!(p==="alignment"?h!==Le(j):!1)||K.every(E=>Le(E.placement)===h?E.overflows[0]>0:!0)))return{data:{index:z,overflows:K},reset:{placement:j}};let A=(J=K.filter(D=>D.overflows[0]<=0).sort((D,E)=>D.overflows[1]-E.overflows[1])[0])==null?void 0:J.placement;if(!A)switch(v){case"bestFit":{var Y;const D=(Y=K.filter(E=>{if(N){const G=Le(E.placement);return G===h||G==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(G=>G>0).reduce((G,oe)=>G+oe,0)]).sort((E,G)=>E[1]-G[1])[0])==null?void 0:Y[0];D&&(A=D);break}case"initialPlacement":A=i;break}if(o!==A)return{reset:{placement:A}}}return{}}}};function ws(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cs(e){return zd.some(t=>e[t]>=0)}const nf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Ue(e,t);switch(n){case"referenceHidden":{const s=await qt(t,{...o,elementContext:"reference"}),a=ws(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Cs(a)}}}case"escaped":{const s=await qt(t,{...o,altBoundary:!0}),a=ws(s,r.floating);return{data:{escapedOffsets:a,escaped:Cs(a)}}}default:return{}}}}},xa=new Set(["left","top"]);async function of(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Ke(r),i=Dt(r),c=Le(r)==="y",u=xa.has(a)?-1:1,f=s&&c?-1:1,p=Ue(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof w=="number"&&(v=i==="end"?w*-1:w),c?{x:v*f,y:g*u}:{x:g*u,y:v*f}}const sf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await of(t,e);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},af=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:x=>{let{x:y,y:h}=x;return{x:y,y:h}}},...c}=Ue(e,t),u={x:r,y:n},f=await qt(t,c),p=Le(Ke(o)),g=Jn(p);let v=u[g],w=u[p];if(s){const x=g==="y"?"top":"left",y=g==="y"?"bottom":"right",h=v+f[x],C=v-f[y];v=On(h,v,C)}if(a){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",h=w+f[x],C=w-f[y];w=On(h,w,C)}const m=i.fn({...t,[g]:v,[p]:w});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[g]:s,[p]:a}}}}}},cf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=Ue(e,t),f={x:r,y:n},p=Le(o),g=Jn(p);let v=f[g],w=f[p];const m=Ue(i,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const C=g==="y"?"height":"width",S=s.reference[g]-s.floating[C]+x.mainAxis,k=s.reference[g]+s.reference[C]-x.mainAxis;v<S?v=S:v>k&&(v=k)}if(u){var y,h;const C=g==="y"?"width":"height",S=xa.has(Ke(o)),k=s.reference[p]-s.floating[C]+(S&&((y=a.offset)==null?void 0:y[p])||0)+(S?0:x.crossAxis),N=s.reference[p]+s.reference[C]+(S?0:((h=a.offset)==null?void 0:h[p])||0)-(S?x.crossAxis:0);w<k?w=k:w>N&&(w=N)}return{[g]:v,[p]:w}}}},lf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...u}=Ue(e,t),f=await qt(t,u),p=Ke(o),g=Dt(o),v=Le(o)==="y",{width:w,height:m}=s.floating;let x,y;p==="top"||p==="bottom"?(x=p,y=g===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(y=p,x=g==="end"?"top":"bottom");const h=m-f.top-f.bottom,C=w-f.left-f.right,S=et(m-f[x],h),k=et(w-f[y],C),N=!t.middlewareData.shift;let _=S,T=k;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(T=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(_=h),N&&!g){const K=Ce(f.left,0),ee=Ce(f.right,0),J=Ce(f.top,0),Y=Ce(f.bottom,0);v?T=w-2*(K!==0||ee!==0?K+ee:Ce(f.left,f.right)):_=m-2*(J!==0||Y!==0?J+Y:Ce(f.top,f.bottom))}await c({...t,availableWidth:T,availableHeight:_});const H=await a.getDimensions(i.floating);return w!==H.width||m!==H.height?{reset:{rects:!0}}:{}}}};function Lr(){return typeof window<"u"}function Mt(e){return ba(e)?(e.nodeName||"").toLowerCase():"#document"}function Se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function We(e){var t;return(t=(ba(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ba(e){return Lr()?e instanceof Node||e instanceof Se(e).Node:!1}function Ne(e){return Lr()?e instanceof Element||e instanceof Se(e).Element:!1}function Be(e){return Lr()?e instanceof HTMLElement||e instanceof Se(e).HTMLElement:!1}function Ss(e){return!Lr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Se(e).ShadowRoot}const uf=new Set(["inline","contents"]);function er(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=_e(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!uf.has(o)}const df=new Set(["table","td","th"]);function ff(e){return df.has(Mt(e))}const pf=[":popover-open",":modal"];function Vr(e){return pf.some(t=>{try{return e.matches(t)}catch{return!1}})}const mf=["transform","translate","scale","rotate","perspective"],gf=["transform","translate","scale","rotate","perspective","filter"],vf=["paint","layout","strict","content"];function to(e){const t=ro(),r=Ne(e)?_e(e):e;return mf.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||gf.some(n=>(r.willChange||"").includes(n))||vf.some(n=>(r.contain||"").includes(n))}function hf(e){let t=tt(e);for(;Be(t)&&!Nt(t);){if(to(t))return t;if(Vr(t))return null;t=tt(t)}return null}function ro(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xf=new Set(["html","body","#document"]);function Nt(e){return xf.has(Mt(e))}function _e(e){return Se(e).getComputedStyle(e)}function Br(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if(Mt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ss(e)&&e.host||We(e);return Ss(t)?t.host:t}function ya(e){const t=tt(e);return Nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Be(t)&&er(t)?t:ya(t)}function Xt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=ya(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),a=Se(o);if(s){const i=Dn(a);return t.concat(a,a.visualViewport||[],er(o)?o:[],i&&r?Xt(i):[])}return t.concat(o,Xt(o,[],r))}function Dn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wa(e){const t=_e(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Be(e),s=o?e.offsetWidth:r,a=o?e.offsetHeight:n,i=Cr(r)!==s||Cr(n)!==a;return i&&(r=s,n=a),{width:r,height:n,$:i}}function no(e){return Ne(e)?e:e.contextElement}function Tt(e){const t=no(e);if(!Be(t))return Ve(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=wa(t);let a=(s?Cr(r.width):r.width)/n,i=(s?Cr(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const bf=Ve(0);function Ca(e){const t=Se(e);return!ro()||!t.visualViewport?bf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yf(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Se(e)?!1:t}function dt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=no(e);let a=Ve(1);t&&(n?Ne(n)&&(a=Tt(n)):a=Tt(e));const i=yf(s,r,n)?Ca(s):Ve(0);let c=(o.left+i.x)/a.x,u=(o.top+i.y)/a.y,f=o.width/a.x,p=o.height/a.y;if(s){const g=Se(s),v=n&&Ne(n)?Se(n):n;let w=g,m=Dn(w);for(;m&&n&&v!==w;){const x=Tt(m),y=m.getBoundingClientRect(),h=_e(m),C=y.left+(m.clientLeft+parseFloat(h.paddingLeft))*x.x,S=y.top+(m.clientTop+parseFloat(h.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,p*=x.y,c+=C,u+=S,w=Se(m),m=Dn(w)}}return Er({width:f,height:p,x:c,y:u})}function Wr(e,t){const r=Br(e).scrollLeft;return t?t.left+r:dt(We(e)).left+r}function Sa(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Wr(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function wf(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",a=We(n),i=t?Vr(t.floating):!1;if(n===a||i&&s)return r;let c={scrollLeft:0,scrollTop:0},u=Ve(1);const f=Ve(0),p=Be(n);if((p||!p&&!s)&&((Mt(n)!=="body"||er(a))&&(c=Br(n)),Be(n))){const v=dt(n);u=Tt(n),f.x=v.x+n.clientLeft,f.y=v.y+n.clientTop}const g=a&&!p&&!s?Sa(a,c):Ve(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+g.x,y:r.y*u.y-c.scrollTop*u.y+f.y+g.y}}function Cf(e){return Array.from(e.getClientRects())}function Sf(e){const t=We(e),r=Br(e),n=e.ownerDocument.body,o=Ce(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Ce(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Wr(e);const i=-r.scrollTop;return _e(n).direction==="rtl"&&(a+=Ce(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:i}}const Es=25;function Ef(e,t){const r=Se(e),n=We(e),o=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const f=ro();(!f||f&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const u=Wr(n);if(u<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),v=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(n.clientWidth-p.clientWidth-v);w<=Es&&(s-=w)}else u<=Es&&(s+=u);return{width:s,height:a,x:i,y:c}}const Pf=new Set(["absolute","fixed"]);function Rf(e,t){const r=dt(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=Be(e)?Tt(e):Ve(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,u=n*s.y;return{width:a,height:i,x:c,y:u}}function Ps(e,t,r){let n;if(t==="viewport")n=Ef(e,r);else if(t==="document")n=Sf(We(e));else if(Ne(t))n=Rf(t,r);else{const o=Ca(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Er(n)}function Ea(e,t){const r=tt(e);return r===t||!Ne(r)||Nt(r)?!1:_e(r).position==="fixed"||Ea(r,t)}function kf(e,t){const r=t.get(e);if(r)return r;let n=Xt(e,[],!1).filter(i=>Ne(i)&&Mt(i)!=="body"),o=null;const s=_e(e).position==="fixed";let a=s?tt(e):e;for(;Ne(a)&&!Nt(a);){const i=_e(a),c=to(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&Pf.has(o.position)||er(a)&&!c&&Ea(e,a))?n=n.filter(f=>f!==a):o=i,a=tt(a)}return t.set(e,n),n}function Tf(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?Vr(t)?[]:kf(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((u,f)=>{const p=Ps(t,f,o);return u.top=Ce(p.top,u.top),u.right=et(p.right,u.right),u.bottom=et(p.bottom,u.bottom),u.left=Ce(p.left,u.left),u},Ps(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Af(e){const{width:t,height:r}=wa(e);return{width:t,height:r}}function Nf(e,t,r){const n=Be(t),o=We(t),s=r==="fixed",a=dt(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=Ve(0);function u(){c.x=Wr(o)}if(n||!n&&!s)if((Mt(t)!=="body"||er(o))&&(i=Br(t)),n){const v=dt(t,!0,s,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&u();s&&!n&&o&&u();const f=o&&!n&&!s?Sa(o,i):Ve(0),p=a.left+i.scrollLeft-c.x-f.x,g=a.top+i.scrollTop-c.y-f.y;return{x:p,y:g,width:a.width,height:a.height}}function vn(e){return _e(e).position==="static"}function Rs(e,t){if(!Be(e)||_e(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return We(e)===r&&(r=r.ownerDocument.body),r}function Pa(e,t){const r=Se(e);if(Vr(e))return r;if(!Be(e)){let o=tt(e);for(;o&&!Nt(o);){if(Ne(o)&&!vn(o))return o;o=tt(o)}return r}let n=Rs(e,t);for(;n&&ff(n)&&vn(n);)n=Rs(n,t);return n&&Nt(n)&&vn(n)&&!to(n)?r:n||hf(e)||r}const _f=async function(e){const t=this.getOffsetParent||Pa,r=this.getDimensions,n=await r(e.floating);return{reference:Nf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function If(e){return _e(e).direction==="rtl"}const Of={convertOffsetParentRelativeRectToViewportRelativeRect:wf,getDocumentElement:We,getClippingRect:Tf,getOffsetParent:Pa,getElementRects:_f,getClientRects:Cf,getDimensions:Af,getScale:Tt,isElement:Ne,isRTL:If};function Ra(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jf(e,t){let r=null,n;const o=We(e);function s(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:p,width:g,height:v}=u;if(i||t(),!g||!v)return;const w=fr(p),m=fr(o.clientWidth-(f+g)),x=fr(o.clientHeight-(p+v)),y=fr(f),C={rootMargin:-w+"px "+-m+"px "+-x+"px "+-y+"px",threshold:Ce(0,et(1,c))||1};let S=!0;function k(N){const _=N[0].intersectionRatio;if(_!==c){if(!S)return a();_?a(!1,_):n=setTimeout(()=>{a(!1,1e-7)},1e3)}_===1&&!Ra(u,e.getBoundingClientRect())&&a(),S=!1}try{r=new IntersectionObserver(k,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(k,C)}r.observe(e)}return a(!0),s}function Df(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=no(e),f=o||s?[...u?Xt(u):[],...Xt(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const p=u&&i?jf(u,r):null;let g=-1,v=null;a&&(v=new ResizeObserver(y=>{let[h]=y;h&&h.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),r()}),u&&!c&&v.observe(u),v.observe(t));let w,m=c?dt(e):null;c&&x();function x(){const y=dt(e);m&&!Ra(m,y)&&r(),m=y,w=requestAnimationFrame(x)}return r(),()=>{var y;f.forEach(h=>{o&&h.removeEventListener("scroll",r),s&&h.removeEventListener("resize",r)}),p==null||p(),(y=v)==null||y.disconnect(),v=null,c&&cancelAnimationFrame(w)}}const Mf=sf,Ff=af,$f=rf,Lf=lf,Vf=nf,ks=tf,Bf=cf,Wf=(e,t,r)=>{const n=new Map,o={platform:Of,...r},s={...o.platform,_c:n};return ef(e,t,{...o,platform:s})};var zf=typeof document<"u",Gf=function(){},xr=zf?P.useLayoutEffect:Gf;function Pr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Pr(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Pr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ka(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ts(e,t){const r=ka(e);return Math.round(t*r)/r}function hn(e){const t=l.useRef(e);return xr(()=>{t.current=e}),t}function Hf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[f,p]=l.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=l.useState(n);Pr(g,n)||v(n);const[w,m]=l.useState(null),[x,y]=l.useState(null),h=l.useCallback(E=>{E!==N.current&&(N.current=E,m(E))},[]),C=l.useCallback(E=>{E!==_.current&&(_.current=E,y(E))},[]),S=s||w,k=a||x,N=l.useRef(null),_=l.useRef(null),T=l.useRef(f),H=c!=null,K=hn(c),ee=hn(o),J=hn(u),Y=l.useCallback(()=>{if(!N.current||!_.current)return;const E={placement:t,strategy:r,middleware:g};ee.current&&(E.platform=ee.current),Wf(N.current,_.current,E).then(G=>{const oe={...G,isPositioned:J.current!==!1};z.current&&!Pr(T.current,oe)&&(T.current=oe,jr.flushSync(()=>{p(oe)}))})},[g,t,r,ee,J]);xr(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,p(E=>({...E,isPositioned:!1})))},[u]);const z=l.useRef(!1);xr(()=>(z.current=!0,()=>{z.current=!1}),[]),xr(()=>{if(S&&(N.current=S),k&&(_.current=k),S&&k){if(K.current)return K.current(S,k,Y);Y()}},[S,k,Y,K,H]);const j=l.useMemo(()=>({reference:N,floating:_,setReference:h,setFloating:C}),[h,C]),A=l.useMemo(()=>({reference:S,floating:k}),[S,k]),D=l.useMemo(()=>{const E={position:r,left:0,top:0};if(!A.floating)return E;const G=Ts(A.floating,f.x),oe=Ts(A.floating,f.y);return i?{...E,transform:"translate("+G+"px, "+oe+"px)",...ka(A.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:G,top:oe}},[r,i,A.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:Y,refs:j,elements:A,floatingStyles:D}),[f,Y,j,A,D])}const Uf=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ks({element:n.current,padding:o}).fn(r):{}:n?ks({element:n,padding:o}).fn(r):{}}}},Kf=(e,t)=>({...Mf(e),options:[e,t]}),Yf=(e,t)=>({...Ff(e),options:[e,t]}),qf=(e,t)=>({...Bf(e),options:[e,t]}),Xf=(e,t)=>({...$f(e),options:[e,t]}),Zf=(e,t)=>({...Lf(e),options:[e,t]}),Jf=(e,t)=>({...Vf(e),options:[e,t]}),Qf=(e,t)=>({...Uf(e),options:[e,t]});var ep="Arrow",Ta=l.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return d.jsx(U.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ta.displayName=ep;var tp=Ta;function Aa(e){const[t,r]=l.useState(void 0);return he(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,i=u.blockSize}else a=e.offsetWidth,i=e.offsetHeight;r({width:a,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var oo="Popper",[Na,Ft]=ke(oo),[rp,_a]=Na(oo),Ia=e=>{const{__scopePopper:t,children:r}=e,[n,o]=l.useState(null);return d.jsx(rp,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ia.displayName=oo;var Oa="PopperAnchor",ja=l.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=_a(Oa,r),a=l.useRef(null),i=de(t,a),c=l.useRef(null);return l.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||a.current,u!==c.current&&s.onAnchorChange(c.current)}),n?null:d.jsx(U.div,{...o,ref:i})});ja.displayName=Oa;var so="PopperContent",[np,op]=Na(so),Da=l.forwardRef((e,t)=>{var O,q,te,re,ie,se;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:w,...m}=e,x=_a(so,r),[y,h]=l.useState(null),C=de(t,xe=>h(xe)),[S,k]=l.useState(null),N=Aa(S),_=(N==null?void 0:N.width)??0,T=(N==null?void 0:N.height)??0,H=n+(s!=="center"?"-"+s:""),K=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},ee=Array.isArray(u)?u:[u],J=ee.length>0,Y={padding:K,boundary:ee.filter(ap),altBoundary:J},{refs:z,floatingStyles:j,placement:A,isPositioned:D,middlewareData:E}=Hf({strategy:"fixed",placement:H,whileElementsMounted:(...xe)=>Df(...xe,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[Kf({mainAxis:o+T,alignmentAxis:a}),c&&Yf({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?qf():void 0,...Y}),c&&Xf({...Y}),Zf({...Y,apply:({elements:xe,rects:Pe,availableWidth:De,availableHeight:Te})=>{const{width:Xe,height:cr}=Pe.reference,Ge=xe.floating.style;Ge.setProperty("--radix-popper-available-width",`${De}px`),Ge.setProperty("--radix-popper-available-height",`${Te}px`),Ge.setProperty("--radix-popper-anchor-width",`${Xe}px`),Ge.setProperty("--radix-popper-anchor-height",`${cr}px`)}}),S&&Qf({element:S,padding:i}),ip({arrowWidth:_,arrowHeight:T}),g&&Jf({strategy:"referenceHidden",...Y})]}),[G,oe]=$a(A),le=Qe(w);he(()=>{D&&(le==null||le())},[D,le]);const R=(O=E.arrow)==null?void 0:O.x,F=(q=E.arrow)==null?void 0:q.y,W=((te=E.arrow)==null?void 0:te.centerOffset)!==0,[L,Q]=l.useState();return he(()=>{y&&Q(window.getComputedStyle(y).zIndex)},[y]),d.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:D?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(re=E.transformOrigin)==null?void 0:re.x,(ie=E.transformOrigin)==null?void 0:ie.y].join(" "),...((se=E.hide)==null?void 0:se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(np,{scope:r,placedSide:G,onArrowChange:k,arrowX:R,arrowY:F,shouldHideArrow:W,children:d.jsx(U.div,{"data-side":G,"data-align":oe,...m,ref:C,style:{...m.style,animation:D?void 0:"none"}})})})});Da.displayName=so;var Ma="PopperArrow",sp={top:"bottom",right:"left",bottom:"top",left:"right"},Fa=l.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=op(Ma,n),a=sp[s.placedSide];return d.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:d.jsx(tp,{...o,ref:r,style:{...o.style,display:"block"}})})});Fa.displayName=Ma;function ap(e){return e!==null}var ip=e=>({name:"transformOrigin",options:e,fn(t){var x,y,h;const{placement:r,rects:n,middlewareData:o}=t,a=((x=o.arrow)==null?void 0:x.centerOffset)!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,f]=$a(r),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+i/2,v=(((h=o.arrow)==null?void 0:h.y)??0)+c/2;let w="",m="";return u==="bottom"?(w=a?p:`${g}px`,m=`${-c}px`):u==="top"?(w=a?p:`${g}px`,m=`${n.floating.height+c}px`):u==="right"?(w=`${-c}px`,m=a?p:`${v}px`):u==="left"&&(w=`${n.floating.width+c}px`,m=a?p:`${v}px`),{data:{x:w,y:m}}}});function $a(e){const[t,r="center"]=e.split("-");return[t,r]}var ao=Ia,zr=ja,io=Da,co=Fa,cp="Portal",tr=l.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,s]=l.useState(!1);he(()=>s(!0),[]);const a=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?Jt.createPortal(d.jsx(U.div,{...n,ref:t}),a):null});tr.displayName=cp;var lp=l[" useInsertionEffect ".trim().toString()]||he;function Ee({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,a]=up({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:o;{const f=l.useRef(e!==void 0);l.useEffect(()=>{const p=f.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,n])}const u=l.useCallback(f=>{var p;if(i){const g=dp(f)?f(e):f;g!==e&&((p=a.current)==null||p.call(a,g))}else s(f)},[i,e,s,a]);return[c,u]}function up({defaultProp:e,onChange:t}){const[r,n]=l.useState(e),o=l.useRef(r),s=l.useRef(t);return lp(()=>{s.current=t},[t]),l.useEffect(()=>{var a;o.current!==r&&((a=s.current)==null||a.call(s,r),o.current=r)},[r,o]),[r,n,s]}function dp(e){return typeof e=="function"}function La(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Va=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),fp="VisuallyHidden",Ba=l.forwardRef((e,t)=>d.jsx(U.span,{...e,ref:t,style:{...Va,...e.style}}));Ba.displayName=fp;var pp=Ba,mp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wt=new WeakMap,pr=new WeakMap,mr={},xn=0,Wa=function(e){return e&&(e.host||Wa(e.parentNode))},gp=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Wa(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},vp=function(e,t,r,n){var o=gp(t,Array.isArray(e)?e:[e]);mr[r]||(mr[r]=new WeakMap);var s=mr[r],a=[],i=new Set,c=new Set(o),u=function(p){!p||i.has(p)||(i.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(g){if(i.has(g))f(g);else try{var v=g.getAttribute(n),w=v!==null&&v!=="false",m=(wt.get(g)||0)+1,x=(s.get(g)||0)+1;wt.set(g,m),s.set(g,x),a.push(g),m===1&&w&&pr.set(g,!0),x===1&&g.setAttribute(r,"true"),w||g.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),i.clear(),xn++,function(){a.forEach(function(p){var g=wt.get(p)-1,v=s.get(p)-1;wt.set(p,g),s.set(p,v),g||(pr.has(p)||p.removeAttribute(n),pr.delete(p)),v||p.removeAttribute(r)}),xn--,xn||(wt=new WeakMap,wt=new WeakMap,pr=new WeakMap,mr={})}},lo=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=mp(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),vp(n,o,r,"aria-hidden")):function(){return null}},$e=function(){return $e=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},$e.apply(this,arguments)};function za(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function hp(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var br="right-scroll-bar-position",yr="width-before-scroll-bar",xp="with-scroll-bars-hidden",bp="--removed-body-scroll-bar-size";function bn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yp(e,t){var r=P.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var wp=typeof window<"u"?l.useLayoutEffect:l.useEffect,As=new WeakMap;function Cp(e,t){var r=yp(null,function(n){return e.forEach(function(o){return bn(o,n)})});return wp(function(){var n=As.get(r);if(n){var o=new Set(n),s=new Set(e),a=r.current;o.forEach(function(i){s.has(i)||bn(i,null)}),s.forEach(function(i){o.has(i)||bn(i,a)})}As.set(r,e)},[e]),r}function Sp(e){return e}function Ep(e,t){t===void 0&&(t=Sp);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=t(s,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(i){return s(i)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(s),a=r}var c=function(){var f=a;a=[],f.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return o}function Pp(e){e===void 0&&(e={});var t=Ep(null);return t.options=$e({async:!0,ssr:!1},e),t}var Ga=function(e){var t=e.sideCar,r=za(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return l.createElement(n,$e({},r))};Ga.isSideCarExport=!0;function Rp(e,t){return e.useMedium(t),Ga}var Ha=Pp(),yn=function(){},Gr=l.forwardRef(function(e,t){var r=l.useRef(null),n=l.useState({onScrollCapture:yn,onWheelCapture:yn,onTouchMoveCapture:yn}),o=n[0],s=n[1],a=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,v=e.noRelative,w=e.noIsolation,m=e.inert,x=e.allowPinchZoom,y=e.as,h=y===void 0?"div":y,C=e.gapMode,S=za(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=g,N=Cp([r,t]),_=$e($e({},S),o);return l.createElement(l.Fragment,null,f&&l.createElement(k,{sideCar:Ha,removeScrollBar:u,shards:p,noRelative:v,noIsolation:w,inert:m,setCallbacks:s,allowPinchZoom:!!x,lockRef:r,gapMode:C}),a?l.cloneElement(l.Children.only(i),$e($e({},_),{ref:N})):l.createElement(h,$e({},_,{className:c,ref:N}),i))});Gr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Gr.classNames={fullWidth:yr,zeroRight:br};var kp=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Tp(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kp();return t&&e.setAttribute("nonce",t),e}function Ap(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Np(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _p=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Tp())&&(Ap(t,r),Np(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ip=function(){var e=_p();return function(t,r){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Ua=function(){var e=Ip(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Op={left:0,top:0,right:0,gap:0},wn=function(e){return parseInt(e||"",10)||0},jp=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[wn(r),wn(n),wn(o)]},Dp=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Op;var t=jp(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Mp=Ua(),At="data-scroll-locked",Fp=function(e,t,r,n){var o=e.left,s=e.top,a=e.right,i=e.gap;return r===void 0&&(r="margin"),`
31
31
  .`.concat(xp,` {
32
32
  overflow: hidden `).concat(n,`;
33
33
  padding-right: `).concat(i,"px ").concat(n,`;
@@ -126,5 +126,5 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
126
126
  - less than the value passed to \`max\` (or ${Po} if no \`max\` prop is set)
127
127
  - \`null\` or \`undefined\` if the progress is indeterminate.
128
128
 
129
- Defaulting to \`null\`.`}var yv=Pc,wv=kc;function Cv({className:e,value:t,...r}){return d.jsx(yv,{"data-slot":"progress",className:$("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:d.jsx(wv,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all dark:bg-primary",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function Sv({className:e,...t}){return d.jsx("div",{"data-slot":"skeleton",className:$("bg-accent animate-pulse rounded-md dark:bg-accent",e),...t})}var Jr="Switch",[Ev,Hb]=ke(Jr),[Pv,Rv]=Ev(Jr),Ac=l.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:s,required:a,disabled:i,value:c="on",onCheckedChange:u,form:f,...p}=e,[g,v]=l.useState(null),w=de(t,C=>v(C)),m=l.useRef(!1),x=g?f||!!g.closest("form"):!0,[y,h]=Ee({prop:o,defaultProp:s??!1,onChange:u,caller:Jr});return d.jsxs(Pv,{scope:r,checked:y,disabled:i,children:[d.jsx(U.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":Oc(y),"data-disabled":i?"":void 0,disabled:i,value:c,...p,ref:w,onClick:Z(e.onClick,C=>{h(S=>!S),x&&(m.current=C.isPropagationStopped(),m.current||C.stopPropagation())})}),x&&d.jsx(Ic,{control:g,bubbles:!m.current,name:n,value:c,checked:y,required:a,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});Ac.displayName=Jr;var Nc="SwitchThumb",_c=l.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=Rv(Nc,r);return d.jsx(U.span,{"data-state":Oc(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});_c.displayName=Nc;var kv="SwitchBubbleInput",Ic=l.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const a=l.useRef(null),i=de(a,s),c=La(r),u=Aa(t);return l.useEffect(()=>{const f=a.current;if(!f)return;const p=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&v){const w=new Event("click",{bubbles:n});v.call(f,r),f.dispatchEvent(w)}},[c,r,n]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ic.displayName=kv;function Oc(e){return e?"checked":"unchecked"}var Tv=Ac,Av=_c;function Nv({className:e,...t}){return d.jsx(Tv,{"data-slot":"switch",className:$("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-input",e),...t,children:d.jsx(Av,{"data-slot":"switch-thumb",className:$("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground")})})}var jc="Toggle",Ro=l.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...s}=e,[a,i]=Ee({prop:r,onChange:o,defaultProp:n??!1,caller:jc});return d.jsx(U.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:Z(e.onClick,()=>{e.disabled||i(!a)})})});Ro.displayName=jc;var _v=Ro;const Dc=Dr("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap dark:text-foreground dark:hover:bg-muted dark:hover:text-muted-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent text-foreground dark:bg-transparent dark:text-foreground",outline:"border border-input bg-transparent text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-transparent dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Iv({className:e,variant:t,size:r,...n}){return d.jsx(_v,{"data-slot":"toggle",className:$(Dc({variant:t,size:r,className:e})),...n})}var Pn="rovingFocusGroup.onEntryFocus",Ov={bubbles:!1,cancelable:!0},or="RovingFocusGroup",[Gn,Mc,jv]=Xn(or),[Dv,Fc]=ke(or,[jv]),[Mv,Fv]=Dv(or),$c=l.forwardRef((e,t)=>d.jsx(Gn.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Gn.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx($v,{...e,ref:t})})}));$c.displayName=or;var $v=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=l.useRef(null),v=de(t,g),w=Fr(s),[m,x]=Ee({prop:a,defaultProp:i??null,onChange:c,caller:or}),[y,h]=l.useState(!1),C=Qe(u),S=Mc(r),k=l.useRef(!1),[N,_]=l.useState(0);return l.useEffect(()=>{const T=g.current;if(T)return T.addEventListener(Pn,C),()=>T.removeEventListener(Pn,C)},[C]),d.jsx(Mv,{scope:r,orientation:n,dir:w,loop:o,currentTabStopId:m,onItemFocus:l.useCallback(T=>x(T),[x]),onItemShiftTab:l.useCallback(()=>h(!0),[]),onFocusableItemAdd:l.useCallback(()=>_(T=>T+1),[]),onFocusableItemRemove:l.useCallback(()=>_(T=>T-1),[]),children:d.jsx(U.div,{tabIndex:y||N===0?-1:0,"data-orientation":n,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:Z(e.onMouseDown,()=>{k.current=!0}),onFocus:Z(e.onFocus,T=>{const H=!k.current;if(T.target===T.currentTarget&&H&&!y){const K=new CustomEvent(Pn,Ov);if(T.currentTarget.dispatchEvent(K),!K.defaultPrevented){const ee=S().filter(A=>A.focusable),J=ee.find(A=>A.active),Y=ee.find(A=>A.id===m),j=[J,Y,...ee].filter(Boolean).map(A=>A.ref.current);Bc(j,f)}}k.current=!1}),onBlur:Z(e.onBlur,()=>h(!1))})})}),Lc="RovingFocusGroupItem",Vc=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:a,...i}=e,c=ve(),u=s||c,f=Fv(Lc,r),p=f.currentTabStopId===u,g=Mc(r),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:m}=f;return l.useEffect(()=>{if(n)return v(),()=>w()},[n,v,w]),d.jsx(Gn.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:d.jsx(U.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:Z(e.onMouseDown,x=>{n?f.onItemFocus(u):x.preventDefault()}),onFocus:Z(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:Z(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=Bv(x,f.orientation,f.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let C=g().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const S=C.indexOf(x.currentTarget);C=f.loop?Wv(C,S+1):C.slice(S+1)}setTimeout(()=>Bc(C))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:m!=null}):a})})});Vc.displayName=Lc;var Lv={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Vv(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Bv(e,t,r){const n=Vv(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Lv[n]}function Bc(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Wv(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var zv=$c,Gv=Vc,at="ToggleGroup",[Wc,Ub]=ke(at,[Fc]),zc=Fc(),ko=P.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return d.jsx(Hv,{...o,ref:t})}if(r==="multiple"){const o=n;return d.jsx(Uv,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${at}\``)});ko.displayName=at;var[Gc,Hc]=Wc(at),Hv=P.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[a,i]=Ee({prop:r,defaultProp:n??"",onChange:o,caller:at});return d.jsx(Gc,{scope:e.__scopeToggleGroup,type:"single",value:P.useMemo(()=>a?[a]:[],[a]),onItemActivate:i,onItemDeactivate:P.useCallback(()=>i(""),[i]),children:d.jsx(Uc,{...s,ref:t})})}),Uv=P.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[a,i]=Ee({prop:r,defaultProp:n??[],onChange:o,caller:at}),c=P.useCallback(f=>i((p=[])=>[...p,f]),[i]),u=P.useCallback(f=>i((p=[])=>p.filter(g=>g!==f)),[i]);return d.jsx(Gc,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:c,onItemDeactivate:u,children:d.jsx(Uc,{...s,ref:t})})});ko.displayName=at;var[Kv,Yv]=Wc(at),Uc=P.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:s,dir:a,loop:i=!0,...c}=e,u=zc(r),f=Fr(a),p={role:"group",dir:f,...c};return d.jsx(Kv,{scope:r,rovingFocus:o,disabled:n,children:o?d.jsx(zv,{asChild:!0,...u,orientation:s,dir:f,loop:i,children:d.jsx(U.div,{...p,ref:t})}):d.jsx(U.div,{...p,ref:t})})}),Ar="ToggleGroupItem",Kc=P.forwardRef((e,t)=>{const r=Hc(Ar,e.__scopeToggleGroup),n=Yv(Ar,e.__scopeToggleGroup),o=zc(e.__scopeToggleGroup),s=r.value.includes(e.value),a=n.disabled||e.disabled,i={...e,pressed:s,disabled:a},c=P.useRef(null);return n.rovingFocus?d.jsx(Gv,{asChild:!0,...o,focusable:!a,active:s,ref:c,children:d.jsx(Vs,{...i,ref:t})}):d.jsx(Vs,{...i,ref:t})});Kc.displayName=Ar;var Vs=P.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,s=Hc(Ar,r),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=s.type==="single"?a:void 0;return d.jsx(Ro,{...i,...o,ref:t,onPressedChange:c=>{c?s.onItemActivate(n):s.onItemDeactivate(n)}})}),qv=ko,Xv=Kc;const Yc=l.createContext({size:"default",variant:"default"});function Zv({className:e,variant:t,size:r,children:n,...o}){return d.jsx(qv,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:$("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs dark:data-[variant=outline]:shadow-xs",e),...o,children:d.jsx(Yc.Provider,{value:{variant:t,size:r},children:n})})}function Jv({className:e,children:t,variant:r,size:n,...o}){const s=l.useContext(Yc);return d.jsx(Xv,{"data-slot":"toggle-group-item","data-variant":s.variant||r,"data-size":s.size||n,className:$(Dc({variant:s.variant||r,size:s.size||n}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o,children:t})}var Qr="Collapsible",[Qv,qc]=ke(Qr),[eh,To]=Qv(Qr),Xc=l.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:s,onOpenChange:a,...i}=e,[c,u]=Ee({prop:n,defaultProp:o??!1,onChange:a,caller:Qr});return d.jsx(eh,{scope:r,disabled:s,contentId:ve(),open:c,onOpenToggle:l.useCallback(()=>u(f=>!f),[u]),children:d.jsx(U.div,{"data-state":No(c),"data-disabled":s?"":void 0,...i,ref:t})})});Xc.displayName=Qr;var Zc="CollapsibleTrigger",Jc=l.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=To(Zc,r);return d.jsx(U.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":No(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:Z(e.onClick,o.onOpenToggle)})});Jc.displayName=Zc;var Ao="CollapsibleContent",Qc=l.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=To(Ao,e.__scopeCollapsible);return d.jsx(Ye,{present:r||o.open,children:({present:s})=>d.jsx(th,{...n,ref:t,present:s})})});Qc.displayName=Ao;var th=l.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...s}=e,a=To(Ao,r),[i,c]=l.useState(n),u=l.useRef(null),f=de(t,u),p=l.useRef(0),g=p.current,v=l.useRef(0),w=v.current,m=a.open||i,x=l.useRef(m),y=l.useRef(void 0);return l.useEffect(()=>{const h=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(h)},[]),he(()=>{const h=u.current;if(h){y.current=y.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const C=h.getBoundingClientRect();p.current=C.height,v.current=C.width,x.current||(h.style.transitionDuration=y.current.transitionDuration,h.style.animationName=y.current.animationName),c(n)}},[a.open,n]),d.jsx(U.div,{"data-state":No(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...s,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:m&&o})});function No(e){return e?"open":"closed"}var rh=Xc,nh=Jc,oh=Qc,Oe="Accordion",sh=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[_o,ah,ih]=Xn(Oe),[en,Kb]=ke(Oe,[ih,qc]),Io=qc(),el=P.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,s=n;return d.jsx(_o.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?d.jsx(dh,{...s,ref:t}):d.jsx(uh,{...o,ref:t})})});el.displayName=Oe;var[tl,ch]=en(Oe),[rl,lh]=en(Oe,{collapsible:!1}),uh=P.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:s=!1,...a}=e,[i,c]=Ee({prop:r,defaultProp:n??"",onChange:o,caller:Oe});return d.jsx(tl,{scope:e.__scopeAccordion,value:P.useMemo(()=>i?[i]:[],[i]),onItemOpen:c,onItemClose:P.useCallback(()=>s&&c(""),[s,c]),children:d.jsx(rl,{scope:e.__scopeAccordion,collapsible:s,children:d.jsx(nl,{...a,ref:t})})})}),dh=P.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[a,i]=Ee({prop:r,defaultProp:n??[],onChange:o,caller:Oe}),c=P.useCallback(f=>i((p=[])=>[...p,f]),[i]),u=P.useCallback(f=>i((p=[])=>p.filter(g=>g!==f)),[i]);return d.jsx(tl,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u,children:d.jsx(rl,{scope:e.__scopeAccordion,collapsible:!0,children:d.jsx(nl,{...s,ref:t})})})}),[fh,tn]=en(Oe),nl=P.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:s="vertical",...a}=e,i=P.useRef(null),c=de(i,t),u=ah(r),p=Fr(o)==="ltr",g=Z(e.onKeyDown,v=>{var T;if(!sh.includes(v.key))return;const w=v.target,m=u().filter(H=>{var K;return!((K=H.ref.current)!=null&&K.disabled)}),x=m.findIndex(H=>H.ref.current===w),y=m.length;if(x===-1)return;v.preventDefault();let h=x;const C=0,S=y-1,k=()=>{h=x+1,h>S&&(h=C)},N=()=>{h=x-1,h<C&&(h=S)};switch(v.key){case"Home":h=C;break;case"End":h=S;break;case"ArrowRight":s==="horizontal"&&(p?k():N());break;case"ArrowDown":s==="vertical"&&k();break;case"ArrowLeft":s==="horizontal"&&(p?N():k());break;case"ArrowUp":s==="vertical"&&N();break}const _=h%y;(T=m[_].ref.current)==null||T.focus()});return d.jsx(fh,{scope:r,disabled:n,direction:o,orientation:s,children:d.jsx(_o.Slot,{scope:r,children:d.jsx(U.div,{...a,"data-orientation":s,ref:c,onKeyDown:n?void 0:g})})})}),Nr="AccordionItem",[ph,Oo]=en(Nr),ol=P.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,s=tn(Nr,r),a=ch(Nr,r),i=Io(r),c=ve(),u=n&&a.value.includes(n)||!1,f=s.disabled||e.disabled;return d.jsx(ph,{scope:r,open:u,disabled:f,triggerId:c,children:d.jsx(rh,{"data-orientation":s.orientation,"data-state":ul(u),...i,...o,ref:t,disabled:f,open:u,onOpenChange:p=>{p?a.onItemOpen(n):a.onItemClose(n)}})})});ol.displayName=Nr;var sl="AccordionHeader",al=P.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=tn(Oe,r),s=Oo(sl,r);return d.jsx(U.h3,{"data-orientation":o.orientation,"data-state":ul(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:t})});al.displayName=sl;var Hn="AccordionTrigger",il=P.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=tn(Oe,r),s=Oo(Hn,r),a=lh(Hn,r),i=Io(r);return d.jsx(_o.ItemSlot,{scope:r,children:d.jsx(nh,{"aria-disabled":s.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...i,...n,ref:t})})});il.displayName=Hn;var cl="AccordionContent",ll=P.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=tn(Oe,r),s=Oo(cl,r),a=Io(r);return d.jsx(oh,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...a,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ll.displayName=cl;function ul(e){return e?"open":"closed"}var mh=el,gh=ol,vh=al,hh=il,xh=ll;function bh({...e}){return d.jsx(mh,{"data-slot":"accordion",...e})}function yh({className:e,...t}){return d.jsx(gh,{"data-slot":"accordion-item",className:$("border-b last:border-b-0 dark:border-border",e),...t})}function wh({className:e,children:t,...r}){return d.jsx(vh,{className:"flex",children:d.jsxs(hh,{"data-slot":"accordion-trigger",className:$("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium text-foreground transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:text-foreground dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",e),...r,children:[t,d.jsx(fo,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function Ch({className:e,children:t,...r}){return d.jsx(xh,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-foreground dark:text-foreground",...r,children:d.jsx("div",{className:$("pt-0 pb-4",e),children:t})})}var Sh=e=>e.type==="checkbox",Ut=e=>e instanceof Date,jo=e=>e==null;const dl=e=>typeof e=="object";var vt=e=>!jo(e)&&!Array.isArray(e)&&dl(e)&&!Ut(e),Eh=e=>vt(e)&&e.target?Sh(e.target)?e.target.checked:e.target.value:e,Ph=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Rh=(e,t)=>e.has(Ph(t)),kh=e=>{const t=e.constructor&&e.constructor.prototype;return vt(t)&&t.hasOwnProperty("isPrototypeOf")},Th=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function fl(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Th&&(e instanceof Blob||n))&&(r||vt(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!kh(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=fl(e[o]));else return e;return t}var pl=e=>/^\w*$/.test(e),Un=e=>e===void 0,Ah=e=>Array.isArray(e)?e.filter(Boolean):[],ml=e=>Ah(e.replace(/["|']|\]/g,"").split(/\.|\[/)),we=(e,t,r)=>{if(!t||!vt(e))return r;const n=(pl(t)?[t]:ml(t)).reduce((o,s)=>jo(o)?o:o[s],e);return Un(n)||n===e?Un(e[t])?r:e[t]:n},Rn=e=>typeof e=="boolean",Bs=(e,t,r)=>{let n=-1;const o=pl(t)?[t]:ml(t),s=o.length,a=s-1;for(;++n<s;){const i=o[n];let c=r;if(n!==a){const u=e[i];c=vt(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=c,e=e[i]}};const Ws={BLUR:"blur",CHANGE:"change"},zs={all:"all"},Do=P.createContext(null);Do.displayName="HookFormContext";const sr=()=>P.useContext(Do),Nh=e=>{const{children:t,...r}=e;return P.createElement(Do.Provider,{value:r},t)};var _h=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const a=s;return t._proxyFormState[a]!==zs.all&&(t._proxyFormState[a]=!n||zs.all),r&&(r[a]=!0),e[a]}});return o};const gl=typeof window<"u"?P.useLayoutEffect:P.useEffect;function vl(e){const t=sr(),{control:r=t.control,disabled:n,name:o,exact:s}=e||{},[a,i]=P.useState(r._formState),c=P.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return gl(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:u=>{!n&&i({...r._formState,...u})}}),[o,n,s]),P.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),P.useMemo(()=>_h(a,r,c.current,!1),[a,r])}var Ih=e=>typeof e=="string",Oh=(e,t,r,n,o)=>Ih(e)?we(r,e,o):Array.isArray(e)?e.map(s=>we(r,s)):r,Gs=e=>jo(e)||!dl(e);function hl(e,t,r=new WeakSet){if(Gs(e)||Gs(t))return e===t;if(Ut(e)&&Ut(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const a=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const i=t[s];if(Ut(a)&&Ut(i)||vt(a)&&vt(i)||Array.isArray(a)&&Array.isArray(i)?!hl(a,i,r):a!==i)return!1}}return!0}function jh(e){const t=sr(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:a,compute:i}=e||{},c=P.useRef(o),u=P.useRef(i),f=P.useRef(void 0);u.current=i;const p=P.useMemo(()=>r._getWatch(n,c.current),[r,n]),[g,v]=P.useState(u.current?u.current(p):p);return gl(()=>r._subscribe({name:n,formState:{values:!0},exact:a,callback:w=>{if(!s){const m=Oh(n,r._names,w.values||r._formValues,!1,c.current);if(u.current){const x=u.current(m);hl(x,f.current)||(v(x),f.current=x)}else v(m)}}}),[r,s,n,a]),P.useEffect(()=>r._removeUnmounted()),g}function Dh(e){const t=sr(),{name:r,disabled:n,control:o=t.control,shouldUnregister:s,defaultValue:a}=e,i=Rh(o._names.array,r),c=P.useMemo(()=>we(o._formValues,r,we(o._defaultValues,r,a)),[o,r,a]),u=jh({control:o,name:r,defaultValue:c,exact:!0}),f=vl({control:o,name:r,exact:!0}),p=P.useRef(e),g=P.useRef(o.register(r,{...e.rules,value:u,...Rn(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const v=P.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!we(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!we(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!we(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!we(f.validatingFields,r)},error:{enumerable:!0,get:()=>we(f.errors,r)}}),[f,r]),w=P.useCallback(h=>g.current.onChange({target:{value:Eh(h),name:r},type:Ws.CHANGE}),[r]),m=P.useCallback(()=>g.current.onBlur({target:{value:we(o._formValues,r),name:r},type:Ws.BLUR}),[r,o._formValues]),x=P.useCallback(h=>{const C=we(o._fields,r);C&&h&&(C._f.ref={focus:()=>h.focus&&h.focus(),select:()=>h.select&&h.select(),setCustomValidity:S=>h.setCustomValidity(S),reportValidity:()=>h.reportValidity()})},[o._fields,r]),y=P.useMemo(()=>({name:r,value:u,...Rn(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:w,onBlur:m,ref:x}),[r,n,f.disabled,w,m,x,u]);return P.useEffect(()=>{const h=o._options.shouldUnregister||s;o.register(r,{...p.current.rules,...Rn(p.current.disabled)?{disabled:p.current.disabled}:{}});const C=(S,k)=>{const N=we(o._fields,S);N&&N._f&&(N._f.mount=k)};if(C(r,!0),h){const S=fl(we(o._options.defaultValues,r));Bs(o._defaultValues,r,S),Un(we(o._formValues,r))&&Bs(o._formValues,r,S)}return!i&&o.register(r),()=>{(i?h&&!o._state.action:h)?o.unregister(r):C(r,!1)}},[r,o,i,s]),P.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),P.useMemo(()=>({field:y,formState:f,fieldState:v}),[y,f,v])}const Mh=e=>e.render(Dh(e)),xl=P.createContext(void 0),bl=e=>{const{methods:t,disabled:r,children:n}=e;return d.jsx(xl.Provider,{value:{disabled:r},children:d.jsx(Nh,{...t,children:n})})},yl=()=>{const e=P.useContext(xl),t=sr();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},Fh=({type:e="button",...t})=>{const r=()=>e==="submit"||e==="reset"?"default":"outline";return d.jsx(Mr,{type:e,variant:r(),...t})};var wl={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Hs=P.createContext&&P.createContext(wl),$h=["attr","size","title"];function Lh(e,t){if(e==null)return{};var r=Vh(e,t),n,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Vh(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function _r(){return _r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_r.apply(this,arguments)}function Us(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Us(Object(r),!0).forEach(function(n){Bh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Us(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bh(e,t,r){return t=Wh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wh(e){var t=zh(e,"string");return typeof t=="symbol"?t:t+""}function zh(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cl(e){return e&&e.map((t,r)=>P.createElement(t.tag,Ir({key:r},t.attr),Cl(t.child)))}function Sl(e){return t=>P.createElement(Gh,_r({attr:Ir({},e.attr)},t),Cl(e.child))}function Gh(e){var t=r=>{var{attr:n,size:o,title:s}=e,a=Lh(e,$h),i=o||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),P.createElement("svg",_r({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:c,style:Ir(Ir({color:e.color||r.color},r.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),s&&P.createElement("title",null,s),e.children)};return Hs!==void 0?P.createElement(Hs.Consumer,null,r=>t(r)):t(wl)}function Hh(e){return Sl({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Circle_Info"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M11.5,15a.5.5,0,0,0,1,0h0V10.981a.5.5,0,0,0-1,0Z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"8.999",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M12,2.065A9.934,9.934,0,1,1,2.066,12,9.945,9.945,0,0,1,12,2.065Zm0,18.867A8.934,8.934,0,1,0,3.066,12,8.944,8.944,0,0,0,12,20.932Z"},child:[]}]}]}]})(e)}var Uh="Label",El=l.forwardRef((e,t)=>d.jsx(U.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));El.displayName=Uh;var Kh=El;function Yh({className:e,...t}){return d.jsx(Kh,{"data-slot":"label",className:$("flex items-center text-purple-mutted-300 gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const Pl=l.createContext({}),qh=({...e})=>d.jsx(Pl.Provider,{value:{name:e.name},children:d.jsx(Mh,{...e})}),rn=()=>{const e=l.useContext(Pl),t=l.useContext(Rl),{getFieldState:r}=sr(),n=vl({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...o}},Rl=l.createContext({});function Xh({className:e,...t}){const r=l.useId();return d.jsx(Rl.Provider,{value:{id:r},children:d.jsx("div",{"data-slot":"form-item",className:$("grid gap-2",e),...t})})}function Zh({className:e,...t}){const{error:r,formItemId:n}=rn();return d.jsx(Yh,{"data-slot":"form-label","data-error":!!r,className:$("data-[error=true]:text-destructive font-normal text-sm",e),htmlFor:n,...t})}function Jh({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=rn();return d.jsx(fa,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function Qh({className:e,...t}){const{formDescriptionId:r}=rn();return d.jsx("p",{"data-slot":"form-description",id:r,className:$("text-purple-mutted-300 text-sm",e),...t})}function ex({className:e,...t}){const{error:r,formMessageId:n}=rn(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?d.jsx("p",{"data-slot":"form-message",id:n,className:$("text-destructive text-sm",e),...t,children:o}):null}var[nn,Yb]=ke("Tooltip",[Ft]),on=Ft(),kl="TooltipProvider",tx=700,Kn="tooltip.open",[rx,Mo]=nn(kl),Tl=e=>{const{__scopeTooltip:t,delayDuration:r=tx,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:s}=e,a=l.useRef(!0),i=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),d.jsx(rx,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:l.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:s})};Tl.displayName=kl;var Zt="Tooltip",[nx,ar]=nn(Zt),Al=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,c=Mo(Zt,e.__scopeTooltip),u=on(t),[f,p]=l.useState(null),g=ve(),v=l.useRef(0),w=a??c.disableHoverableContent,m=i??c.delayDuration,x=l.useRef(!1),[y,h]=Ee({prop:n,defaultProp:o??!1,onChange:_=>{_?(c.onOpen(),document.dispatchEvent(new CustomEvent(Kn))):c.onClose(),s==null||s(_)},caller:Zt}),C=l.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),S=l.useCallback(()=>{window.clearTimeout(v.current),v.current=0,x.current=!1,h(!0)},[h]),k=l.useCallback(()=>{window.clearTimeout(v.current),v.current=0,h(!1)},[h]),N=l.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{x.current=!0,h(!0),v.current=0},m)},[m,h]);return l.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),d.jsx(ao,{...u,children:d.jsx(nx,{scope:t,contentId:g,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?N():S()},[c.isOpenDelayedRef,N,S]),onTriggerLeave:l.useCallback(()=>{w?k():(window.clearTimeout(v.current),v.current=0)},[k,w]),onOpen:S,onClose:k,disableHoverableContent:w,children:r})})};Al.displayName=Zt;var Yn="TooltipTrigger",Nl=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=ar(Yn,r),s=Mo(Yn,r),a=on(r),i=l.useRef(null),c=de(t,i,o.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),p=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),d.jsx(zr,{asChild:!0,...a,children:d.jsx(U.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:Z(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Z(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Z(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Z(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Z(e.onBlur,o.onClose),onClick:Z(e.onClick,o.onClose)})})});Nl.displayName=Yn;var Fo="TooltipPortal",[ox,sx]=nn(Fo,{forceMount:void 0}),_l=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,s=ar(Fo,t);return d.jsx(ox,{scope:t,forceMount:r,children:d.jsx(Ye,{present:r||s.open,children:d.jsx(tr,{asChild:!0,container:o,children:n})})})};_l.displayName=Fo;var It="TooltipContent",Il=l.forwardRef((e,t)=>{const r=sx(It,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=e,a=ar(It,e.__scopeTooltip);return d.jsx(Ye,{present:n||a.open,children:a.disableHoverableContent?d.jsx(Ol,{side:o,...s,ref:t}):d.jsx(ax,{side:o,...s,ref:t})})}),ax=l.forwardRef((e,t)=>{const r=ar(It,e.__scopeTooltip),n=Mo(It,e.__scopeTooltip),o=l.useRef(null),s=de(t,o),[a,i]=l.useState(null),{trigger:c,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,g=l.useCallback(()=>{i(null),p(!1)},[p]),v=l.useCallback((w,m)=>{const x=w.currentTarget,y={x:w.clientX,y:w.clientY},h=ux(y,x.getBoundingClientRect()),C=dx(y,h),S=fx(m.getBoundingClientRect()),k=mx([...C,...S]);i(k),p(!0)},[p]);return l.useEffect(()=>()=>g(),[g]),l.useEffect(()=>{if(c&&f){const w=x=>v(x,f),m=x=>v(x,c);return c.addEventListener("pointerleave",w),f.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",m)}}},[c,f,v,g]),l.useEffect(()=>{if(a){const w=m=>{const x=m.target,y={x:m.clientX,y:m.clientY},h=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),C=!px(y,a);h?g():C&&(g(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,f,a,u,g]),d.jsx(Ol,{...e,ref:s})}),[ix,cx]=nn(Zt,{isInside:!1}),lx=bd("TooltipContent"),Ol=l.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,c=ar(It,r),u=on(r),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(Kn,f),()=>document.removeEventListener(Kn,f)),[f]),l.useEffect(()=>{if(c.trigger){const p=g=>{const v=g.target;v!=null&&v.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),d.jsx(Qt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:d.jsxs(io,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(lx,{children:n}),d.jsx(ix,{scope:r,isInside:!0,children:d.jsx(pp,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Il.displayName=It;var jl="TooltipArrow",Dl=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=on(r);return cx(jl,r).isInside?null:d.jsx(co,{...o,...n,ref:t})});Dl.displayName=jl;function ux(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function dx(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function fx(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function px(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],u=i.x,f=i.y,p=c.x,g=c.y;f>n!=g>n&&r<(p-u)*(n-f)/(g-f)+u&&(o=!o)}return o}function mx(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),gx(t)}function gx(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var vx=Tl,hx=Al,xx=Nl,bx=_l,yx=Il,wx=Dl;function Ml({delayDuration:e=0,...t}){return d.jsx(vx,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Fl({...e}){return d.jsx(Ml,{children:d.jsx(hx,{"data-slot":"tooltip",...e})})}function $l({...e}){return d.jsx(xx,{"data-slot":"tooltip-trigger",...e})}function Ll({className:e,sideOffset:t=0,children:r,...n}){return d.jsx(bx,{children:d.jsxs(yx,{"data-slot":"tooltip-content",sideOffset:t,className:$("bg-purple-mutted-700 border border-purple-mutted-600 text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...n,children:[r,d.jsx(wx,{className:"bg-purple-mutted-700 fill-purple-mutted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const $o=e=>t=>{const{name:r,label:n,description:o,tooltip:s,...a}=t,{control:i,disabled:c}=yl(),u=()=>s?d.jsxs(Fl,{children:[d.jsx($l,{asChild:!0,children:d.jsx(Hh,{size:16})}),d.jsx(Ll,{children:d.jsx("p",{children:s})})]}):d.jsx(d.Fragment,{}),f=()=>o?d.jsx(Qh,{children:o}):d.jsx(d.Fragment,{});return d.jsx(qh,{control:i,name:r,render:({field:p})=>d.jsxs(Xh,{className:"flex flex-col gap-1.5",children:[n&&d.jsx(Zh,{children:d.jsxs("span",{className:"flex items-center gap-1",children:[n,!!s&&u()]})}),d.jsx(Jh,{children:d.jsx(e,{...p,...a,disabled:c})}),!!o&&f(),d.jsx(ex,{})]})})},Cx=$o(da),Vl=P.forwardRef(({options:e,placeholder:t,value:r,onChange:n,disabled:o},s)=>{var c;const a=u=>{n&&n({target:{value:u}})},i=u=>d.jsx(ho,{value:u.value,disabled:u.disabled,children:d.jsxs("div",{className:"flex flex-col",children:[u.label,u.subLabel&&d.jsx("span",{className:"text-xs text-muted-foreground",style:{overflowWrap:"anywhere"},children:u.subLabel})]})},u.value);return d.jsxs(ji,{value:r,onValueChange:a,disabled:o,children:[d.jsx(po,{ref:s,children:d.jsx(Di,{placeholder:t,children:r&&((c=e.find(u=>u.value===r))==null?void 0:c.label)})}),d.jsx(vo,{children:e.map(i)})]})});Vl.displayName="BaseSelectComponent";const Sx=$o(Vl),Ex=P.forwardRef((e,t)=>{const{options:r=[],placeholder:n,value:o,onChange:s=()=>{},disabled:a,searchPlaceholder:i,emptyText:c}=e,u=f=>{s({target:{value:f}})};return d.jsx(So,{ref:t,options:r,value:o,onValueChange:u,placeholder:n,searchPlaceholder:i,emptyText:c,disabled:a})}),Px=$o(Ex),Rx=e=>d.jsx("hr",{className:"w-full h-px border-purple-mutted-500",...e}),kx=({children:e,description:t,className:r})=>d.jsxs("div",{className:$("space-y-1",r),children:[d.jsx("h2",{className:"flex items-center gap-2.5 text-2xl text-white",children:e}),t&&d.jsx("span",{className:"text-sm text-purple-mutted-300",children:t})]}),ht=e=>{const{className:t,disabled:r=!1,methods:n,onSubmit:o=()=>{},...s}=e,{handleSubmit:a}=n,i=$("flex flex-col gap-6",{},t);return d.jsx(bl,{methods:n,disabled:r,children:d.jsx("form",{className:i,onSubmit:a(o),...s})})};ht.Button=Fh;ht.Input=Cx;ht.Select=Sx;ht.Combobox=Px;ht.Divider=Rx;ht.Title=kx;function Tx(e){return e==null?[]:Array.isArray(e)?e:[e]}var Ax=e=>Array.from(Array(e).keys()),Ks=e=>(e==null?void 0:e.constructor.name)==="Array",Nx=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Lo(e[r],t[r]))return!1;return!0},Lo=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(Ks(e)&&Ks(t))return Nx(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(t??Object.create(null)),n=r.length;for(let o=0;o<n;o++)if(!Reflect.has(e,r[o]))return!1;for(let o=0;o<n;o++){const s=r[o];if(!Lo(e[s],t[s]))return!1}return!0},_x=e=>e!=null&&typeof e=="object",wr=e=>typeof e=="string",Kt=e=>typeof e=="function",Ix=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Ox=e=>Object.prototype.toString.call(e),Bl=Function.prototype.toString,jx=Bl.call(Object),Dx=e=>{if(!_x(e)||Ox(e)!="[object Object]"||$x(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=Ix(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Bl.call(r)==jx},Mx=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Fx=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,$x=e=>Mx(e)||Fx(e),Lx=e=>e(),Vx=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},Bx=e=>Number.isNaN(e),Wx=e=>Bx(e)?0:e,zx=(e,t,r)=>{const n=Wx(e),o=n>=t,s=r==null||n<=r;return o&&s};function Wl(e){if(!Dx(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(const n of t){const o=e[n];o!==void 0&&(r[n]=Wl(o))}return r}function Ys(...e){const t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&process.env.NODE_ENV!=="production"&&console.warn(t)}function Gx(e,t){if(e==null)throw new Error(t())}var zl=e=>typeof e=="object"&&e!==null,Me=e=>e?"":void 0,Hx=9,Ux=e=>zl(e)&&e.nodeType===Hx,Kx=e=>zl(e)&&e===e.window;function Yx(e){if(!e)return!1;const t=e.getRootNode();return Gl(t)===e}function qx(e){return Ux(e)?e:Kx(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function Gl(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const r=t.shadowRoot.activeElement;if(!r||r===t)break;t=r}return t}var Xx=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),Zx=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,qs=e=>{const t={};let r;for(;r=Zx.exec(e);)t[r[1]]=r[2];return t},Jx=(e,t)=>{if(wr(e)){if(wr(t))return`${e};${t}`;e=qs(e)}else wr(t)&&(t=qs(t));return Object.assign({},e??{},t??{})};function je(...e){let t={};for(let r of e){if(!r)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof r[o]=="function"){t[o]=Vx(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=Xx(t[o],r[o]);continue}if(o==="style"){t[o]=Jx(t[o],r[o]);continue}t[o]=r[o]!==void 0?r[o]:t[o]}for(let o in r)t[o]===void 0&&(t[o]=r[o]);const n=Object.getOwnPropertySymbols(r);for(let o of n)t[o]=r[o]}return t}function Qx(e,t,r){let n=[],o;return s=>{const a=e(s);return(a.length!==n.length||a.some((c,u)=>!Lo(n[u],c)))&&(n=a,o=t(a,s)),o}}var kt=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(kt||{}),kn="__init__";function eb(e){const t=()=>{var a;return((a=e.getRootNode)==null?void 0:a.call(e))??document},r=()=>qx(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>Gl(t()),isActiveElement:Yx,getById:a=>t().getElementById(a)}}function tb(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var rb=()=>e=>Array.from(new Set(e)),Hl=typeof globalThis.document<"u"?P.useLayoutEffect:P.useEffect;function Or(e){const t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=P.useState(t),[o,s]=P.useState(n),a=e().value!==void 0,i=P.useRef(o);i.current=a?e().value:o;const c=P.useRef(i.current);Hl(()=>{c.current=i.current},[o,e().value]);const u=p=>{var w,m;const g=c.current,v=Kt(p)?p(g):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:g}),a||s(v),r(v,g)||(m=(w=e()).onChange)==null||m.call(w,v,g)};function f(){return a?e().value:o}return{initial:n,ref:i,get:f,set(p){(e().sync?Jt.flushSync:Lx)(()=>u(p))},invoke(p,g){var v,w;(w=(v=e()).onChange)==null||w.call(v,p,g)},hash(p){var g,v;return((v=(g=e()).hash)==null?void 0:v.call(g,p))??String(p)}}}Or.cleanup=e=>{P.useEffect(()=>e,[])};Or.ref=e=>{const t=P.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function nb(e){const t=P.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var ob=(e,t)=>{const r=P.useRef(!1),n=P.useRef(!1);P.useEffect(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(o=>typeof o=="function"?o():o)]),P.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function sb(e,t={}){var ee,J,Y,z;const r=P.useMemo(()=>{const{id:j,ids:A,getRootNode:D}=t;return eb({id:j,ids:A,getRootNode:D})},[t]),n=(...j)=>{e.debug&&console.log(...j)},o=((ee=e.props)==null?void 0:ee.call(e,{props:Wl(t),scope:r}))??t,s=ab(o),a=(J=e.context)==null?void 0:J.call(e,{prop:s,bindable:Or,scope:r,flush:Xs,getContext(){return c},getComputed(){return k},getRefs(){return m},getEvent(){return v()}}),i=Ul(a),c={get(j){var A;return(A=i.current)==null?void 0:A[j].ref.current},set(j,A){var D;(D=i.current)==null||D[j].set(A)},initial(j){var A;return(A=i.current)==null?void 0:A[j].initial},hash(j){var D,E;const A=(D=i.current)==null?void 0:D[j].get();return(E=i.current)==null?void 0:E[j].hash(A)}},u=P.useRef(new Map),f=P.useRef(null),p=P.useRef(null),g=P.useRef({type:""}),v=()=>({...g.current,current(){return g.current},previous(){return p.current}}),w=()=>({...N,matches(...j){return j.includes(N.ref.current)},hasTag(j){var A,D;return!!((D=(A=e.states[N.ref.current])==null?void 0:A.tags)!=null&&D.includes(j))}}),m=nb(((Y=e.refs)==null?void 0:Y.call(e,{prop:s,context:c}))??{}),x=()=>({state:w(),context:c,event:v(),prop:s,send:K,action:y,guard:h,track:ob,refs:m,computed:k,flush:Xs,scope:r,choose:S}),y=j=>{const A=Kt(j)?j(x()):j;if(!A)return;const D=A.map(E=>{var oe,le;const G=(le=(oe=e.implementations)==null?void 0:oe.actions)==null?void 0:le[E];return G||Ys(`[zag-js] No implementation found for action "${JSON.stringify(E)}"`),G});for(const E of D)E==null||E(x())},h=j=>{var A,D;return Kt(j)?j(x()):(D=(A=e.implementations)==null?void 0:A.guards)==null?void 0:D[j](x())},C=j=>{const A=Kt(j)?j(x()):j;if(!A)return;const D=A.map(G=>{var le,R;const oe=(R=(le=e.implementations)==null?void 0:le.effects)==null?void 0:R[G];return oe||Ys(`[zag-js] No implementation found for effect "${JSON.stringify(G)}"`),oe}),E=[];for(const G of D){const oe=G==null?void 0:G(x());oe&&E.push(oe)}return()=>E.forEach(G=>G==null?void 0:G())},S=j=>Tx(j).find(A=>{let D=!A.guard;return wr(A.guard)?D=!!h(A.guard):Kt(A.guard)&&(D=A.guard(x())),D}),k=j=>{Gx(e.computed,()=>"[zag-js] No computed object found on machine");const A=e.computed[j];return A({context:c,event:v(),prop:s,refs:m,scope:r,computed:k})},N=Or(()=>({defaultValue:e.initialState({prop:s}),onChange(j,A){var E,G,oe,le;if(A){const R=u.current.get(A);R==null||R(),u.current.delete(A)}A&&y((E=e.states[A])==null?void 0:E.exit),y((G=f.current)==null?void 0:G.actions);const D=C((oe=e.states[j])==null?void 0:oe.effects);if(D&&u.current.set(j,D),A===kn){y(e.entry);const R=C(e.effects);R&&u.current.set(kn,R)}y((le=e.states[j])==null?void 0:le.entry)}})),_=P.useRef(void 0),T=P.useRef(kt.NotStarted);Hl(()=>{queueMicrotask(()=>{const D=T.current===kt.Started;T.current=kt.Started,n(D?"rehydrating...":"initializing...");const E=_.current??N.initial;N.invoke(E,D?N.get():kn)});const j=u.current,A=N.ref.current;return()=>{n("unmounting..."),_.current=A,T.current=kt.Stopped,j.forEach(D=>D==null?void 0:D()),u.current=new Map,f.current=null,queueMicrotask(()=>{y(e.exit)})}},[]);const H=()=>"ref"in N?N.ref.current:N.get(),K=j=>{queueMicrotask(()=>{var le,R;if(T.current!==kt.Started)return;p.current=g.current,g.current=j;let A=H();const D=((le=e.states[A].on)==null?void 0:le[j.type])??((R=e.on)==null?void 0:R[j.type]),E=S(D);if(!E)return;f.current=E;const G=E.target??A;n("transition",j.type,E.target||A,`(${E.actions})`);const oe=G!==A;oe?Jt.flushSync(()=>N.set(G)):E.reenter&&!oe?N.invoke(A,A):y(E.actions??[])})};return(z=e.watch)==null||z.call(e,x()),{state:w(),send:K,context:c,prop:s,scope:r,refs:m,computed:k,event:v(),getStatus:()=>T.current}}function Ul(e){const t=P.useRef(e);return t.current=e,t}function ab(e){const t=Ul(e);return function(n){return t.current[n]}}function Xs(e){queueMicrotask(()=>{Jt.flushSync(()=>e())})}var ib=tb(e=>e);function cb(...e){return t=>{const r=[];for(const n of e)if(typeof n=="function"){const o=n(t);typeof o=="function"&&r.push(o)}else n&&(n.current=t);if(r.length)return()=>{for(const n of r)n()}}}function lb(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const Tn=e=>{const t=P.memo(P.forwardRef((r,n)=>{const{asChild:o,children:s,...a}=r;if(!o)return P.createElement(e,{...a,ref:n},s);if(!P.isValidElement(s))return null;const i=P.Children.only(s),c=lb(i);return P.cloneElement(i,{...je(a,i.props),ref:n?cb(n,c):c})}));return t.displayName=e.displayName||e.name,t},ub=()=>{const e=new Map;return new Proxy(Tn,{apply(t,r,n){return Tn(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,Tn(n)),e.get(n)}})},ze=ub();function db(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ir(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:s,defaultValue:a}=e,i=P.createContext(a);i.displayName=t;function c(){var f;const u=P.useContext(i);if(!u&&r){const p=new Error(s??db(n,o));throw p.name="ContextError",(f=Error.captureStackTrace)==null||f.call(Error,p,c),p}return u}return[i.Provider,c,i]}const[fb,qe]=ir({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),Kl=P.forwardRef((e,t)=>{const r=qe(),n=je(r.getContentProps({index:r.count}),e);return d.jsx(ze.div,{...n,ref:t})});Kl.displayName="StepsCompletedContent";const Vo=()=>(e,t)=>t.reduce((r,n)=>{const[o,s]=r,a=n;return s[a]!==void 0&&(o[a]=s[a]),delete s[a],[o,s]},[{},{...e}]),Yl=P.forwardRef((e,t)=>{const[r,n]=Vo()(e,["index"]),o=qe(),s=je(o.getContentProps(r),n);return d.jsx(ze.div,{...s,ref:t})});Yl.displayName="StepsContent";const[pb,Bo]=ir({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),ql=P.forwardRef((e,t)=>{const r=qe(),n=Bo(),o=je(r.getIndicatorProps(n),e);return d.jsx(ze.div,{...o,ref:t})});ql.displayName="StepsIndicator";const[mb,qb]=ir({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),Xl=P.forwardRef((e,t)=>{const[r,n]=Vo()(e,["index"]),o=qe(),s=je(o.getItemProps(r),n),a=o.getItemState(r);return d.jsx(pb,{value:r,children:d.jsx(mb,{value:a,children:d.jsx(ze.div,{...s,ref:t})})})});Xl.displayName="StepsItem";const Zl=P.forwardRef((e,t)=>{const r=qe(),n=je(r.getListProps(),e);return d.jsx(ze.div,{...n,ref:t})});Zl.displayName="StepsList";const Jl=P.forwardRef((e,t)=>{const r=qe(),n=je(r.getNextTriggerProps(),e);return d.jsx(ze.button,{...n,ref:t})});Jl.displayName="StepsNextTrigger";const Ql=P.forwardRef((e,t)=>{const r=qe(),n=je(r.getPrevTriggerProps(),e);return d.jsx(ze.button,{...n,ref:t})});Ql.displayName="StepsPrevTrigger";var Yt=(e,t=[])=>({parts:(...r)=>{if(gb(t))return Yt(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>Yt(e,[...t,...r]),omit:(...r)=>Yt(e,t.filter(n=>!r.includes(n))),rename:r=>Yt(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Et(e)}"][data-part="${Et(n)}"]`,`& [data-scope="${Et(e)}"][data-part="${Et(n)}"]`].join(", "),attrs:{"data-scope":Et(e),"data-part":Et(n)}}}),{})}),Et=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),gb=e=>e.length===0,vb=Yt("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),Fe=vb.build(),hb=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},xb=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Zs=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.triggerId)==null?void 0:n.call(r,t))??`steps:${e.id}:trigger:${t}`},bb=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.contentId)==null?void 0:n.call(r,t))??`steps:${e.id}:content:${t}`};function yb(e,t){const{context:r,send:n,computed:o,prop:s,scope:a}=e,i=r.get("step"),c=s("count"),u=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),g=y=>({triggerId:Zs(a,y.index),contentId:bb(a,y.index),current:y.index===i,completed:y.index<i,incomplete:y.index>i,index:y.index,first:y.index===0,last:y.index===c-1}),v=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},w=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},m=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},x=y=>{n({type:"STEP.SET",value:y,src:"api.setValue"})};return{value:i,count:c,percent:u,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:v,goToPrevStep:w,resetStep:m,getItemState:g,setStep:x,getRootProps(){return t.element({...Fe.root.attrs,id:hb(a),dir:s("dir"),"data-orientation":s("orientation"),style:{"--percent":`${u}%`}})},getListProps(){const h=Ax(c).map((C,S)=>Zs(a,S));return t.element({...Fe.list.attrs,dir:s("dir"),id:xb(a),role:"tablist","aria-owns":h.join(" "),"aria-orientation":s("orientation"),"data-orientation":s("orientation")})},getItemProps(y){const h=g(y);return t.element({...Fe.item.attrs,dir:s("dir"),"aria-current":h.current?"step":void 0,"data-orientation":s("orientation")})},getTriggerProps(y){const h=g(y);return t.button({...Fe.trigger.attrs,id:h.triggerId,role:"tab",dir:s("dir"),tabIndex:!s("linear")||h.current?0:-1,"aria-selected":h.current,"aria-controls":h.contentId,"data-state":h.current?"open":"closed","data-orientation":s("orientation"),"data-complete":Me(h.completed),"data-current":Me(h.current),"data-incomplete":Me(h.incomplete),onClick(C){C.defaultPrevented||s("linear")||n({type:"STEP.SET",value:y.index,src:"trigger.click"})}})},getContentProps(y){const h=g(y);return t.element({...Fe.content.attrs,dir:s("dir"),id:h.contentId,role:"tabpanel",tabIndex:0,hidden:!h.current,"data-state":h.current?"open":"closed","data-orientation":s("orientation"),"aria-labelledby":h.triggerId})},getIndicatorProps(y){const h=g(y);return t.element({...Fe.indicator.attrs,dir:s("dir"),"aria-hidden":!0,"data-complete":Me(h.completed),"data-current":Me(h.current),"data-incomplete":Me(h.incomplete)})},getSeparatorProps(y){const h=g(y);return t.element({...Fe.separator.attrs,dir:s("dir"),"data-orientation":s("orientation"),"data-complete":Me(h.completed),"data-current":Me(h.current),"data-incomplete":Me(h.incomplete)})},getNextTriggerProps(){return t.button({...Fe.nextTrigger.attrs,dir:s("dir"),type:"button",disabled:!f,onClick(y){y.defaultPrevented||v()}})},getPrevTriggerProps(){return t.button({dir:s("dir"),...Fe.prevTrigger.attrs,type:"button",disabled:!p,onClick(y){y.defaultPrevented||w()}})},getProgressProps(){return t.element({dir:s("dir"),...Fe.progress.attrs,role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${u}% complete`,"data-complete":Me(u===100)})}}}var wb={props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:"horizontal",...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e("defaultStep"),value:e("step"),onChange(r){var o,s;(o=e("onStepChange"))==null||o({step:r}),r==e("count")&&((s=e("onStepComplete"))==null||s())}}))}},computed:{percent:Qx(({context:e,prop:t})=>[e.get("step"),t("count")],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get("step")<t("count"),hasPrevStep:({context:e})=>e.get("step")>0,completed:({context:e,prop:t})=>e.get("step")===t("count")},initialState(){return"idle"},entry:["validateStep"],states:{idle:{on:{"STEP.SET":{actions:["setStep"]},"STEP.NEXT":{actions:["goToNextStep"]},"STEP.PREV":{actions:["goToPrevStep"]},"STEP.RESET":{actions:["resetStep"]}}}},implementations:{actions:{goToNextStep({context:e,prop:t}){const r=Math.min(e.get("step")+1,t("count"));e.set("step",r)},goToPrevStep({context:e}){const t=Math.max(e.get("step")-1,0);e.set("step",t)},resetStep({context:e}){e.set("step",0)},setStep({context:e,event:t}){e.set("step",t.value)},validateStep({context:e,prop:t}){Cb(t("count"),e.get("step"))}}}},Cb=(e,t)=>{if(!zx(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};rb()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[Xb,Sb]=ir({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[Zb,Eb]=ir({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function Pb(e){const t=P.useId(),{getRootNode:r}=Sb(),{dir:n}=Eb(),o={id:t,dir:n,getRootNode:r,...e},s=sb(wb,o);return yb(s,ib)}const eu=P.forwardRef((e,t)=>{const[r,n]=Vo()(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=Pb(r),s=je(o.getRootProps(),n);return d.jsx(fb,{value:o,children:d.jsx(ze.div,{...s,ref:t})})});eu.displayName="StepsRoot";const tu=P.forwardRef((e,t)=>{const r=qe(),n=Bo(),o=je(r.getSeparatorProps(n),e);return d.jsx(ze.div,{...o,ref:t})});tu.displayName="StepsSeparator";const ru=P.forwardRef((e,t)=>{const r=qe(),n=Bo(),o=je(r.getTriggerProps(n),e);return d.jsx(ze.button,{...o,ref:t})});ru.displayName="StepsTrigger";function Rb(e){return Sl({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 6 9 17l-5-5"},child:[]}]})(e)}const nu=P.createContext(void 0),kb=({children:e,step:t})=>d.jsx(nu.Provider,{value:{step:t},children:e}),ou=()=>{const e=P.useContext(nu);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},Tb=({className:e,step:t,...r})=>{const n=$("flex flex-col gap-4",e);return d.jsx(kb,{step:t??0,children:d.jsx(eu,{className:n,step:t,...r})})},Ab=({className:e,...t})=>{const r=$("flex flex-row gap-4",e);return d.jsx(Zl,{className:r,...t})},Nb=({className:e,...t})=>{const r=$("flex flex-row items-center gap-4",e);return d.jsx(Xl,{className:r,...t})},_b=({className:e,...t})=>{const r=$("flex flex-row items-center gap-4 text-purple-mutted-100 text-sm",e);return d.jsx(ru,{className:r,...t})},Ib=({index:e,className:t,...r})=>{const{step:n}=ou(),o=e===n,s=e<n,a=$("flex items-center justify-center w-8 h-8 rounded-full text-white",s&&"bg-green-700",o&&"bg-green-600",!s&&!o&&"bg-purple-mutted-500",t),i=$({"text-white":o,"text-purple-mutted-300":!s&&e!==n});return d.jsx(ql,{className:a,...r,children:s?d.jsx(Rb,{className:"text-green-400"}):d.jsx("span",{className:i,children:e+1})})},Ob=({index:e,className:t,...r})=>{const{step:n}=ou(),o=e<n,s=$("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return d.jsx(tu,{className:s,...r})},jb=({className:e,...t})=>{const r=$(e);return d.jsx(Yl,{className:r,...t})},Db=({className:e,...t})=>{const r=$(e);return d.jsx(Kl,{className:r,...t})},Mb=({className:e,...t})=>{const r=$("bg-primary text-white px-4 py-2 rounded-md",e);return d.jsx(Ql,{className:r,...t})},Fb=({className:e,...t})=>{const r=$("bg-primary text-white px-4 py-2 rounded-md",e);return d.jsx(Jl,{className:r,...t})},$b={Root:Tb,List:Ab,Item:Nb,Trigger:_b,Indicator:Ib,Separator:Ob,Content:jb,CompletedContent:Db,PrevTrigger:Mb,NextTrigger:Fb},Lb=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>d.jsx(Ml,{...r,children:d.jsxs(Fl,{children:[d.jsx($l,{...n,children:e}),t&&d.jsx(Ll,{...o,children:t})]})});exports.Accordion=bh;exports.AccordionContent=Ch;exports.AccordionItem=yh;exports.AccordionTrigger=wh;exports.Badge=av;exports.Button=Mr;exports.Card=iv;exports.CardAction=dv;exports.CardContent=fv;exports.CardDescription=uv;exports.CardFooter=pv;exports.CardHeader=cv;exports.CardTitle=lv;exports.Combobox=So;exports.Dialog=Tg;exports.DialogClose=Ng;exports.DialogContent=_g;exports.DialogDescription=Dg;exports.DialogFooter=Og;exports.DialogHeader=Ig;exports.DialogOverlay=mc;exports.DialogPortal=pc;exports.DialogTitle=jg;exports.DialogTrigger=Ag;exports.Form=ht;exports.FormProvider=bl;exports.Input=da;exports.Progress=Cv;exports.Select=ji;exports.SelectContent=vo;exports.SelectGroup=Wm;exports.SelectItem=ho;exports.SelectLabel=Mi;exports.SelectScrollDownButton=go;exports.SelectScrollUpButton=mo;exports.SelectSeparator=Fi;exports.SelectTrigger=po;exports.SelectValue=Di;exports.Skeleton=Sv;exports.Steps=$b;exports.Switch=Nv;exports.Toggle=Iv;exports.ToggleGroup=Zv;exports.ToggleGroupItem=Jv;exports.Tooltip=Lb;exports.borderRadius=Au;exports.cn=$;exports.colors=ku;exports.spacing=Tu;exports.typography=Nu;exports.useFormContext=yl;
129
+ Defaulting to \`null\`.`}var yv=Pc,wv=kc;function Cv({className:e,value:t,...r}){return d.jsx(yv,{"data-slot":"progress",className:$("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:d.jsx(wv,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all dark:bg-primary",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function Sv({className:e,...t}){return d.jsx("div",{"data-slot":"skeleton",className:$("bg-accent animate-pulse rounded-md dark:bg-accent",e),...t})}var Jr="Switch",[Ev,Hb]=ke(Jr),[Pv,Rv]=Ev(Jr),Ac=l.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:s,required:a,disabled:i,value:c="on",onCheckedChange:u,form:f,...p}=e,[g,v]=l.useState(null),w=de(t,C=>v(C)),m=l.useRef(!1),x=g?f||!!g.closest("form"):!0,[y,h]=Ee({prop:o,defaultProp:s??!1,onChange:u,caller:Jr});return d.jsxs(Pv,{scope:r,checked:y,disabled:i,children:[d.jsx(U.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":Oc(y),"data-disabled":i?"":void 0,disabled:i,value:c,...p,ref:w,onClick:Z(e.onClick,C=>{h(S=>!S),x&&(m.current=C.isPropagationStopped(),m.current||C.stopPropagation())})}),x&&d.jsx(Ic,{control:g,bubbles:!m.current,name:n,value:c,checked:y,required:a,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});Ac.displayName=Jr;var Nc="SwitchThumb",_c=l.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=Rv(Nc,r);return d.jsx(U.span,{"data-state":Oc(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});_c.displayName=Nc;var kv="SwitchBubbleInput",Ic=l.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const a=l.useRef(null),i=de(a,s),c=La(r),u=Aa(t);return l.useEffect(()=>{const f=a.current;if(!f)return;const p=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&v){const w=new Event("click",{bubbles:n});v.call(f,r),f.dispatchEvent(w)}},[c,r,n]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ic.displayName=kv;function Oc(e){return e?"checked":"unchecked"}var Tv=Ac,Av=_c;function Nv({className:e,...t}){return d.jsx(Tv,{"data-slot":"switch",className:$("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-input",e),...t,children:d.jsx(Av,{"data-slot":"switch-thumb",className:$("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground")})})}var jc="Toggle",Ro=l.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...s}=e,[a,i]=Ee({prop:r,onChange:o,defaultProp:n??!1,caller:jc});return d.jsx(U.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:Z(e.onClick,()=>{e.disabled||i(!a)})})});Ro.displayName=jc;var _v=Ro;const Dc=Dr("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap dark:text-foreground dark:hover:bg-muted dark:hover:text-muted-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent text-foreground dark:bg-transparent dark:text-foreground",outline:"border border-input bg-transparent text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-transparent dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Iv({className:e,variant:t,size:r,...n}){return d.jsx(_v,{"data-slot":"toggle",className:$(Dc({variant:t,size:r,className:e})),...n})}var Pn="rovingFocusGroup.onEntryFocus",Ov={bubbles:!1,cancelable:!0},or="RovingFocusGroup",[Gn,Mc,jv]=Xn(or),[Dv,Fc]=ke(or,[jv]),[Mv,Fv]=Dv(or),$c=l.forwardRef((e,t)=>d.jsx(Gn.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Gn.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx($v,{...e,ref:t})})}));$c.displayName=or;var $v=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=l.useRef(null),v=de(t,g),w=Fr(s),[m,x]=Ee({prop:a,defaultProp:i??null,onChange:c,caller:or}),[y,h]=l.useState(!1),C=Qe(u),S=Mc(r),k=l.useRef(!1),[N,_]=l.useState(0);return l.useEffect(()=>{const T=g.current;if(T)return T.addEventListener(Pn,C),()=>T.removeEventListener(Pn,C)},[C]),d.jsx(Mv,{scope:r,orientation:n,dir:w,loop:o,currentTabStopId:m,onItemFocus:l.useCallback(T=>x(T),[x]),onItemShiftTab:l.useCallback(()=>h(!0),[]),onFocusableItemAdd:l.useCallback(()=>_(T=>T+1),[]),onFocusableItemRemove:l.useCallback(()=>_(T=>T-1),[]),children:d.jsx(U.div,{tabIndex:y||N===0?-1:0,"data-orientation":n,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:Z(e.onMouseDown,()=>{k.current=!0}),onFocus:Z(e.onFocus,T=>{const H=!k.current;if(T.target===T.currentTarget&&H&&!y){const K=new CustomEvent(Pn,Ov);if(T.currentTarget.dispatchEvent(K),!K.defaultPrevented){const ee=S().filter(A=>A.focusable),J=ee.find(A=>A.active),Y=ee.find(A=>A.id===m),j=[J,Y,...ee].filter(Boolean).map(A=>A.ref.current);Bc(j,f)}}k.current=!1}),onBlur:Z(e.onBlur,()=>h(!1))})})}),Lc="RovingFocusGroupItem",Vc=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:a,...i}=e,c=ve(),u=s||c,f=Fv(Lc,r),p=f.currentTabStopId===u,g=Mc(r),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:m}=f;return l.useEffect(()=>{if(n)return v(),()=>w()},[n,v,w]),d.jsx(Gn.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:d.jsx(U.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:Z(e.onMouseDown,x=>{n?f.onItemFocus(u):x.preventDefault()}),onFocus:Z(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:Z(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=Bv(x,f.orientation,f.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let C=g().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const S=C.indexOf(x.currentTarget);C=f.loop?Wv(C,S+1):C.slice(S+1)}setTimeout(()=>Bc(C))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:m!=null}):a})})});Vc.displayName=Lc;var Lv={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Vv(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Bv(e,t,r){const n=Vv(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Lv[n]}function Bc(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Wv(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var zv=$c,Gv=Vc,at="ToggleGroup",[Wc,Ub]=ke(at,[Fc]),zc=Fc(),ko=P.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return d.jsx(Hv,{...o,ref:t})}if(r==="multiple"){const o=n;return d.jsx(Uv,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${at}\``)});ko.displayName=at;var[Gc,Hc]=Wc(at),Hv=P.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[a,i]=Ee({prop:r,defaultProp:n??"",onChange:o,caller:at});return d.jsx(Gc,{scope:e.__scopeToggleGroup,type:"single",value:P.useMemo(()=>a?[a]:[],[a]),onItemActivate:i,onItemDeactivate:P.useCallback(()=>i(""),[i]),children:d.jsx(Uc,{...s,ref:t})})}),Uv=P.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[a,i]=Ee({prop:r,defaultProp:n??[],onChange:o,caller:at}),c=P.useCallback(f=>i((p=[])=>[...p,f]),[i]),u=P.useCallback(f=>i((p=[])=>p.filter(g=>g!==f)),[i]);return d.jsx(Gc,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:c,onItemDeactivate:u,children:d.jsx(Uc,{...s,ref:t})})});ko.displayName=at;var[Kv,Yv]=Wc(at),Uc=P.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:s,dir:a,loop:i=!0,...c}=e,u=zc(r),f=Fr(a),p={role:"group",dir:f,...c};return d.jsx(Kv,{scope:r,rovingFocus:o,disabled:n,children:o?d.jsx(zv,{asChild:!0,...u,orientation:s,dir:f,loop:i,children:d.jsx(U.div,{...p,ref:t})}):d.jsx(U.div,{...p,ref:t})})}),Ar="ToggleGroupItem",Kc=P.forwardRef((e,t)=>{const r=Hc(Ar,e.__scopeToggleGroup),n=Yv(Ar,e.__scopeToggleGroup),o=zc(e.__scopeToggleGroup),s=r.value.includes(e.value),a=n.disabled||e.disabled,i={...e,pressed:s,disabled:a},c=P.useRef(null);return n.rovingFocus?d.jsx(Gv,{asChild:!0,...o,focusable:!a,active:s,ref:c,children:d.jsx(Vs,{...i,ref:t})}):d.jsx(Vs,{...i,ref:t})});Kc.displayName=Ar;var Vs=P.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,s=Hc(Ar,r),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=s.type==="single"?a:void 0;return d.jsx(Ro,{...i,...o,ref:t,onPressedChange:c=>{c?s.onItemActivate(n):s.onItemDeactivate(n)}})}),qv=ko,Xv=Kc;const Yc=l.createContext({size:"default",variant:"default"});function Zv({className:e,variant:t,size:r,children:n,...o}){return d.jsx(qv,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:$("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs dark:data-[variant=outline]:shadow-xs",e),...o,children:d.jsx(Yc.Provider,{value:{variant:t,size:r},children:n})})}function Jv({className:e,children:t,variant:r,size:n,...o}){const s=l.useContext(Yc);return d.jsx(Xv,{"data-slot":"toggle-group-item","data-variant":s.variant||r,"data-size":s.size||n,className:$(Dc({variant:s.variant||r,size:s.size||n}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o,children:t})}var Qr="Collapsible",[Qv,qc]=ke(Qr),[eh,To]=Qv(Qr),Xc=l.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:s,onOpenChange:a,...i}=e,[c,u]=Ee({prop:n,defaultProp:o??!1,onChange:a,caller:Qr});return d.jsx(eh,{scope:r,disabled:s,contentId:ve(),open:c,onOpenToggle:l.useCallback(()=>u(f=>!f),[u]),children:d.jsx(U.div,{"data-state":No(c),"data-disabled":s?"":void 0,...i,ref:t})})});Xc.displayName=Qr;var Zc="CollapsibleTrigger",Jc=l.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=To(Zc,r);return d.jsx(U.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":No(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:Z(e.onClick,o.onOpenToggle)})});Jc.displayName=Zc;var Ao="CollapsibleContent",Qc=l.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=To(Ao,e.__scopeCollapsible);return d.jsx(Ye,{present:r||o.open,children:({present:s})=>d.jsx(th,{...n,ref:t,present:s})})});Qc.displayName=Ao;var th=l.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...s}=e,a=To(Ao,r),[i,c]=l.useState(n),u=l.useRef(null),f=de(t,u),p=l.useRef(0),g=p.current,v=l.useRef(0),w=v.current,m=a.open||i,x=l.useRef(m),y=l.useRef(void 0);return l.useEffect(()=>{const h=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(h)},[]),he(()=>{const h=u.current;if(h){y.current=y.current||{transitionDuration:h.style.transitionDuration,animationName:h.style.animationName},h.style.transitionDuration="0s",h.style.animationName="none";const C=h.getBoundingClientRect();p.current=C.height,v.current=C.width,x.current||(h.style.transitionDuration=y.current.transitionDuration,h.style.animationName=y.current.animationName),c(n)}},[a.open,n]),d.jsx(U.div,{"data-state":No(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...s,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:m&&o})});function No(e){return e?"open":"closed"}var rh=Xc,nh=Jc,oh=Qc,Oe="Accordion",sh=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[_o,ah,ih]=Xn(Oe),[en,Kb]=ke(Oe,[ih,qc]),Io=qc(),el=P.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,s=n;return d.jsx(_o.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?d.jsx(dh,{...s,ref:t}):d.jsx(uh,{...o,ref:t})})});el.displayName=Oe;var[tl,ch]=en(Oe),[rl,lh]=en(Oe,{collapsible:!1}),uh=P.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:s=!1,...a}=e,[i,c]=Ee({prop:r,defaultProp:n??"",onChange:o,caller:Oe});return d.jsx(tl,{scope:e.__scopeAccordion,value:P.useMemo(()=>i?[i]:[],[i]),onItemOpen:c,onItemClose:P.useCallback(()=>s&&c(""),[s,c]),children:d.jsx(rl,{scope:e.__scopeAccordion,collapsible:s,children:d.jsx(nl,{...a,ref:t})})})}),dh=P.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[a,i]=Ee({prop:r,defaultProp:n??[],onChange:o,caller:Oe}),c=P.useCallback(f=>i((p=[])=>[...p,f]),[i]),u=P.useCallback(f=>i((p=[])=>p.filter(g=>g!==f)),[i]);return d.jsx(tl,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u,children:d.jsx(rl,{scope:e.__scopeAccordion,collapsible:!0,children:d.jsx(nl,{...s,ref:t})})})}),[fh,tn]=en(Oe),nl=P.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:s="vertical",...a}=e,i=P.useRef(null),c=de(i,t),u=ah(r),p=Fr(o)==="ltr",g=Z(e.onKeyDown,v=>{var T;if(!sh.includes(v.key))return;const w=v.target,m=u().filter(H=>{var K;return!((K=H.ref.current)!=null&&K.disabled)}),x=m.findIndex(H=>H.ref.current===w),y=m.length;if(x===-1)return;v.preventDefault();let h=x;const C=0,S=y-1,k=()=>{h=x+1,h>S&&(h=C)},N=()=>{h=x-1,h<C&&(h=S)};switch(v.key){case"Home":h=C;break;case"End":h=S;break;case"ArrowRight":s==="horizontal"&&(p?k():N());break;case"ArrowDown":s==="vertical"&&k();break;case"ArrowLeft":s==="horizontal"&&(p?N():k());break;case"ArrowUp":s==="vertical"&&N();break}const _=h%y;(T=m[_].ref.current)==null||T.focus()});return d.jsx(fh,{scope:r,disabled:n,direction:o,orientation:s,children:d.jsx(_o.Slot,{scope:r,children:d.jsx(U.div,{...a,"data-orientation":s,ref:c,onKeyDown:n?void 0:g})})})}),Nr="AccordionItem",[ph,Oo]=en(Nr),ol=P.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,s=tn(Nr,r),a=ch(Nr,r),i=Io(r),c=ve(),u=n&&a.value.includes(n)||!1,f=s.disabled||e.disabled;return d.jsx(ph,{scope:r,open:u,disabled:f,triggerId:c,children:d.jsx(rh,{"data-orientation":s.orientation,"data-state":ul(u),...i,...o,ref:t,disabled:f,open:u,onOpenChange:p=>{p?a.onItemOpen(n):a.onItemClose(n)}})})});ol.displayName=Nr;var sl="AccordionHeader",al=P.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=tn(Oe,r),s=Oo(sl,r);return d.jsx(U.h3,{"data-orientation":o.orientation,"data-state":ul(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:t})});al.displayName=sl;var Hn="AccordionTrigger",il=P.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=tn(Oe,r),s=Oo(Hn,r),a=lh(Hn,r),i=Io(r);return d.jsx(_o.ItemSlot,{scope:r,children:d.jsx(nh,{"aria-disabled":s.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...i,...n,ref:t})})});il.displayName=Hn;var cl="AccordionContent",ll=P.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=tn(Oe,r),s=Oo(cl,r),a=Io(r);return d.jsx(oh,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...a,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ll.displayName=cl;function ul(e){return e?"open":"closed"}var mh=el,gh=ol,vh=al,hh=il,xh=ll;function bh({...e}){return d.jsx(mh,{"data-slot":"accordion",...e})}function yh({className:e,...t}){return d.jsx(gh,{"data-slot":"accordion-item",className:$("border-b last:border-b-0 dark:border-border",e),...t})}function wh({className:e,children:t,...r}){return d.jsx(vh,{className:"flex",children:d.jsxs(hh,{"data-slot":"accordion-trigger",className:$("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium text-foreground transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:text-foreground dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",e),...r,children:[t,d.jsx(fo,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function Ch({className:e,children:t,...r}){return d.jsx(xh,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-foreground dark:text-foreground",...r,children:d.jsx("div",{className:$("pt-0 pb-4",e),children:t})})}var Sh=e=>e.type==="checkbox",Ut=e=>e instanceof Date,jo=e=>e==null;const dl=e=>typeof e=="object";var vt=e=>!jo(e)&&!Array.isArray(e)&&dl(e)&&!Ut(e),Eh=e=>vt(e)&&e.target?Sh(e.target)?e.target.checked:e.target.value:e,Ph=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Rh=(e,t)=>e.has(Ph(t)),kh=e=>{const t=e.constructor&&e.constructor.prototype;return vt(t)&&t.hasOwnProperty("isPrototypeOf")},Th=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function fl(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Th&&(e instanceof Blob||n))&&(r||vt(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!kh(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=fl(e[o]));else return e;return t}var pl=e=>/^\w*$/.test(e),Un=e=>e===void 0,Ah=e=>Array.isArray(e)?e.filter(Boolean):[],ml=e=>Ah(e.replace(/["|']|\]/g,"").split(/\.|\[/)),we=(e,t,r)=>{if(!t||!vt(e))return r;const n=(pl(t)?[t]:ml(t)).reduce((o,s)=>jo(o)?o:o[s],e);return Un(n)||n===e?Un(e[t])?r:e[t]:n},Rn=e=>typeof e=="boolean",Bs=(e,t,r)=>{let n=-1;const o=pl(t)?[t]:ml(t),s=o.length,a=s-1;for(;++n<s;){const i=o[n];let c=r;if(n!==a){const u=e[i];c=vt(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=c,e=e[i]}};const Ws={BLUR:"blur",CHANGE:"change"},zs={all:"all"},Do=P.createContext(null);Do.displayName="HookFormContext";const sr=()=>P.useContext(Do),Nh=e=>{const{children:t,...r}=e;return P.createElement(Do.Provider,{value:r},t)};var _h=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const a=s;return t._proxyFormState[a]!==zs.all&&(t._proxyFormState[a]=!n||zs.all),r&&(r[a]=!0),e[a]}});return o};const gl=typeof window<"u"?P.useLayoutEffect:P.useEffect;function vl(e){const t=sr(),{control:r=t.control,disabled:n,name:o,exact:s}=e||{},[a,i]=P.useState(r._formState),c=P.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return gl(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:u=>{!n&&i({...r._formState,...u})}}),[o,n,s]),P.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),P.useMemo(()=>_h(a,r,c.current,!1),[a,r])}var Ih=e=>typeof e=="string",Oh=(e,t,r,n,o)=>Ih(e)?we(r,e,o):Array.isArray(e)?e.map(s=>we(r,s)):r,Gs=e=>jo(e)||!dl(e);function hl(e,t,r=new WeakSet){if(Gs(e)||Gs(t))return e===t;if(Ut(e)&&Ut(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const a=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const i=t[s];if(Ut(a)&&Ut(i)||vt(a)&&vt(i)||Array.isArray(a)&&Array.isArray(i)?!hl(a,i,r):a!==i)return!1}}return!0}function jh(e){const t=sr(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:a,compute:i}=e||{},c=P.useRef(o),u=P.useRef(i),f=P.useRef(void 0);u.current=i;const p=P.useMemo(()=>r._getWatch(n,c.current),[r,n]),[g,v]=P.useState(u.current?u.current(p):p);return gl(()=>r._subscribe({name:n,formState:{values:!0},exact:a,callback:w=>{if(!s){const m=Oh(n,r._names,w.values||r._formValues,!1,c.current);if(u.current){const x=u.current(m);hl(x,f.current)||(v(x),f.current=x)}else v(m)}}}),[r,s,n,a]),P.useEffect(()=>r._removeUnmounted()),g}function Dh(e){const t=sr(),{name:r,disabled:n,control:o=t.control,shouldUnregister:s,defaultValue:a}=e,i=Rh(o._names.array,r),c=P.useMemo(()=>we(o._formValues,r,we(o._defaultValues,r,a)),[o,r,a]),u=jh({control:o,name:r,defaultValue:c,exact:!0}),f=vl({control:o,name:r,exact:!0}),p=P.useRef(e),g=P.useRef(o.register(r,{...e.rules,value:u,...Rn(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const v=P.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!we(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!we(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!we(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!we(f.validatingFields,r)},error:{enumerable:!0,get:()=>we(f.errors,r)}}),[f,r]),w=P.useCallback(h=>g.current.onChange({target:{value:Eh(h),name:r},type:Ws.CHANGE}),[r]),m=P.useCallback(()=>g.current.onBlur({target:{value:we(o._formValues,r),name:r},type:Ws.BLUR}),[r,o._formValues]),x=P.useCallback(h=>{const C=we(o._fields,r);C&&h&&(C._f.ref={focus:()=>h.focus&&h.focus(),select:()=>h.select&&h.select(),setCustomValidity:S=>h.setCustomValidity(S),reportValidity:()=>h.reportValidity()})},[o._fields,r]),y=P.useMemo(()=>({name:r,value:u,...Rn(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:w,onBlur:m,ref:x}),[r,n,f.disabled,w,m,x,u]);return P.useEffect(()=>{const h=o._options.shouldUnregister||s;o.register(r,{...p.current.rules,...Rn(p.current.disabled)?{disabled:p.current.disabled}:{}});const C=(S,k)=>{const N=we(o._fields,S);N&&N._f&&(N._f.mount=k)};if(C(r,!0),h){const S=fl(we(o._options.defaultValues,r));Bs(o._defaultValues,r,S),Un(we(o._formValues,r))&&Bs(o._formValues,r,S)}return!i&&o.register(r),()=>{(i?h&&!o._state.action:h)?o.unregister(r):C(r,!1)}},[r,o,i,s]),P.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),P.useMemo(()=>({field:y,formState:f,fieldState:v}),[y,f,v])}const Mh=e=>e.render(Dh(e)),xl=P.createContext(void 0),bl=e=>{const{methods:t,disabled:r,children:n}=e;return d.jsx(xl.Provider,{value:{disabled:r},children:d.jsx(Nh,{...t,children:n})})},yl=()=>{const e=P.useContext(xl),t=sr();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},Fh=({type:e="button",...t})=>{const r=()=>e==="submit"||e==="reset"?"default":"outline";return d.jsx(Mr,{type:e,variant:r(),...t})};var wl={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Hs=P.createContext&&P.createContext(wl),$h=["attr","size","title"];function Lh(e,t){if(e==null)return{};var r=Vh(e,t),n,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Vh(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function _r(){return _r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_r.apply(this,arguments)}function Us(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Us(Object(r),!0).forEach(function(n){Bh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Us(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bh(e,t,r){return t=Wh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wh(e){var t=zh(e,"string");return typeof t=="symbol"?t:t+""}function zh(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cl(e){return e&&e.map((t,r)=>P.createElement(t.tag,Ir({key:r},t.attr),Cl(t.child)))}function Sl(e){return t=>P.createElement(Gh,_r({attr:Ir({},e.attr)},t),Cl(e.child))}function Gh(e){var t=r=>{var{attr:n,size:o,title:s}=e,a=Lh(e,$h),i=o||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),P.createElement("svg",_r({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:c,style:Ir(Ir({color:e.color||r.color},r.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),s&&P.createElement("title",null,s),e.children)};return Hs!==void 0?P.createElement(Hs.Consumer,null,r=>t(r)):t(wl)}function Hh(e){return Sl({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Circle_Info"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M11.5,15a.5.5,0,0,0,1,0h0V10.981a.5.5,0,0,0-1,0Z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"8.999",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M12,2.065A9.934,9.934,0,1,1,2.066,12,9.945,9.945,0,0,1,12,2.065Zm0,18.867A8.934,8.934,0,1,0,3.066,12,8.944,8.944,0,0,0,12,20.932Z"},child:[]}]}]}]})(e)}var Uh="Label",El=l.forwardRef((e,t)=>d.jsx(U.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));El.displayName=Uh;var Kh=El;function Yh({className:e,...t}){return d.jsx(Kh,{"data-slot":"label",className:$("flex items-center text-purple-mutted-300 gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const Pl=l.createContext({}),qh=({...e})=>d.jsx(Pl.Provider,{value:{name:e.name},children:d.jsx(Mh,{...e})}),rn=()=>{const e=l.useContext(Pl),t=l.useContext(Rl),{getFieldState:r}=sr(),n=vl({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...o}},Rl=l.createContext({});function Xh({className:e,...t}){const r=l.useId();return d.jsx(Rl.Provider,{value:{id:r},children:d.jsx("div",{"data-slot":"form-item",className:$("grid gap-2",e),...t})})}function Zh({className:e,...t}){const{formItemId:r}=rn();return d.jsx(Yh,{"data-slot":"form-label",className:$("data-[error=true]:text-destructive font-normal text-sm",e),htmlFor:r,...t})}function Jh({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=rn();return d.jsx(fa,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function Qh({className:e,...t}){const{formDescriptionId:r}=rn();return d.jsx("p",{"data-slot":"form-description",id:r,className:$("text-purple-mutted-300 text-sm",e),...t})}function ex({className:e,...t}){const{error:r,formMessageId:n}=rn(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?d.jsx("p",{"data-slot":"form-message",id:n,className:$("text-destructive text-sm",e),...t,children:o}):null}var[nn,Yb]=ke("Tooltip",[Ft]),on=Ft(),kl="TooltipProvider",tx=700,Kn="tooltip.open",[rx,Mo]=nn(kl),Tl=e=>{const{__scopeTooltip:t,delayDuration:r=tx,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:s}=e,a=l.useRef(!0),i=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),d.jsx(rx,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:l.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:s})};Tl.displayName=kl;var Zt="Tooltip",[nx,ar]=nn(Zt),Al=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,c=Mo(Zt,e.__scopeTooltip),u=on(t),[f,p]=l.useState(null),g=ve(),v=l.useRef(0),w=a??c.disableHoverableContent,m=i??c.delayDuration,x=l.useRef(!1),[y,h]=Ee({prop:n,defaultProp:o??!1,onChange:_=>{_?(c.onOpen(),document.dispatchEvent(new CustomEvent(Kn))):c.onClose(),s==null||s(_)},caller:Zt}),C=l.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),S=l.useCallback(()=>{window.clearTimeout(v.current),v.current=0,x.current=!1,h(!0)},[h]),k=l.useCallback(()=>{window.clearTimeout(v.current),v.current=0,h(!1)},[h]),N=l.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{x.current=!0,h(!0),v.current=0},m)},[m,h]);return l.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),d.jsx(ao,{...u,children:d.jsx(nx,{scope:t,contentId:g,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?N():S()},[c.isOpenDelayedRef,N,S]),onTriggerLeave:l.useCallback(()=>{w?k():(window.clearTimeout(v.current),v.current=0)},[k,w]),onOpen:S,onClose:k,disableHoverableContent:w,children:r})})};Al.displayName=Zt;var Yn="TooltipTrigger",Nl=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=ar(Yn,r),s=Mo(Yn,r),a=on(r),i=l.useRef(null),c=de(t,i,o.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),p=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),d.jsx(zr,{asChild:!0,...a,children:d.jsx(U.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:Z(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Z(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Z(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Z(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Z(e.onBlur,o.onClose),onClick:Z(e.onClick,o.onClose)})})});Nl.displayName=Yn;var Fo="TooltipPortal",[ox,sx]=nn(Fo,{forceMount:void 0}),_l=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,s=ar(Fo,t);return d.jsx(ox,{scope:t,forceMount:r,children:d.jsx(Ye,{present:r||s.open,children:d.jsx(tr,{asChild:!0,container:o,children:n})})})};_l.displayName=Fo;var It="TooltipContent",Il=l.forwardRef((e,t)=>{const r=sx(It,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=e,a=ar(It,e.__scopeTooltip);return d.jsx(Ye,{present:n||a.open,children:a.disableHoverableContent?d.jsx(Ol,{side:o,...s,ref:t}):d.jsx(ax,{side:o,...s,ref:t})})}),ax=l.forwardRef((e,t)=>{const r=ar(It,e.__scopeTooltip),n=Mo(It,e.__scopeTooltip),o=l.useRef(null),s=de(t,o),[a,i]=l.useState(null),{trigger:c,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,g=l.useCallback(()=>{i(null),p(!1)},[p]),v=l.useCallback((w,m)=>{const x=w.currentTarget,y={x:w.clientX,y:w.clientY},h=ux(y,x.getBoundingClientRect()),C=dx(y,h),S=fx(m.getBoundingClientRect()),k=mx([...C,...S]);i(k),p(!0)},[p]);return l.useEffect(()=>()=>g(),[g]),l.useEffect(()=>{if(c&&f){const w=x=>v(x,f),m=x=>v(x,c);return c.addEventListener("pointerleave",w),f.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",m)}}},[c,f,v,g]),l.useEffect(()=>{if(a){const w=m=>{const x=m.target,y={x:m.clientX,y:m.clientY},h=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),C=!px(y,a);h?g():C&&(g(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,f,a,u,g]),d.jsx(Ol,{...e,ref:s})}),[ix,cx]=nn(Zt,{isInside:!1}),lx=bd("TooltipContent"),Ol=l.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,c=ar(It,r),u=on(r),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(Kn,f),()=>document.removeEventListener(Kn,f)),[f]),l.useEffect(()=>{if(c.trigger){const p=g=>{const v=g.target;v!=null&&v.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),d.jsx(Qt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:d.jsxs(io,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(lx,{children:n}),d.jsx(ix,{scope:r,isInside:!0,children:d.jsx(pp,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Il.displayName=It;var jl="TooltipArrow",Dl=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=on(r);return cx(jl,r).isInside?null:d.jsx(co,{...o,...n,ref:t})});Dl.displayName=jl;function ux(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function dx(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function fx(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function px(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],u=i.x,f=i.y,p=c.x,g=c.y;f>n!=g>n&&r<(p-u)*(n-f)/(g-f)+u&&(o=!o)}return o}function mx(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),gx(t)}function gx(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var vx=Tl,hx=Al,xx=Nl,bx=_l,yx=Il,wx=Dl;function Ml({delayDuration:e=0,...t}){return d.jsx(vx,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Fl({...e}){return d.jsx(Ml,{children:d.jsx(hx,{"data-slot":"tooltip",...e})})}function $l({...e}){return d.jsx(xx,{"data-slot":"tooltip-trigger",...e})}function Ll({className:e,sideOffset:t=0,children:r,...n}){return d.jsx(bx,{children:d.jsxs(yx,{"data-slot":"tooltip-content",sideOffset:t,className:$("bg-purple-mutted-700 border border-purple-mutted-600 text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...n,children:[r,d.jsx(wx,{className:"bg-purple-mutted-700 fill-purple-mutted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const $o=e=>t=>{const{name:r,label:n,description:o,tooltip:s,...a}=t,{control:i,disabled:c}=yl(),u=()=>s?d.jsxs(Fl,{children:[d.jsx($l,{asChild:!0,children:d.jsx(Hh,{size:16})}),d.jsx(Ll,{children:d.jsx("p",{children:s})})]}):d.jsx(d.Fragment,{}),f=()=>o?d.jsx(Qh,{children:o}):d.jsx(d.Fragment,{});return d.jsx(qh,{control:i,name:r,render:({field:p,fieldState:g})=>d.jsxs(Xh,{className:"flex flex-col gap-1.5",children:[n&&d.jsx(Zh,{children:d.jsxs("span",{className:"flex items-center gap-1",children:[n,!!s&&u()]})}),d.jsx(Jh,{children:d.jsx(e,{...p,...a,disabled:c,error:!!g.error})}),!!o&&f(),d.jsx(ex,{})]})})},Cx=$o(da),Vl=P.forwardRef(({options:e,placeholder:t,value:r,onChange:n,disabled:o},s)=>{var c;const a=u=>{n&&n({target:{value:u}})},i=u=>d.jsx(ho,{value:u.value,disabled:u.disabled,children:d.jsxs("div",{className:"flex flex-col",children:[u.label,u.subLabel&&d.jsx("span",{className:"text-xs text-muted-foreground",style:{overflowWrap:"anywhere"},children:u.subLabel})]})},u.value);return d.jsxs(ji,{value:r,onValueChange:a,disabled:o,children:[d.jsx(po,{ref:s,children:d.jsx(Di,{placeholder:t,children:r&&((c=e.find(u=>u.value===r))==null?void 0:c.label)})}),d.jsx(vo,{children:e.map(i)})]})});Vl.displayName="BaseSelectComponent";const Sx=$o(Vl),Ex=P.forwardRef((e,t)=>{const{options:r=[],placeholder:n,value:o,onChange:s=()=>{},disabled:a,searchPlaceholder:i,emptyText:c}=e,u=f=>{s({target:{value:f}})};return d.jsx(So,{ref:t,options:r,value:o,onValueChange:u,placeholder:n,searchPlaceholder:i,emptyText:c,disabled:a})}),Px=$o(Ex),Rx=e=>d.jsx("hr",{className:"w-full h-px border-purple-mutted-500",...e}),kx=({children:e,description:t,className:r})=>d.jsxs("div",{className:$("space-y-1",r),children:[d.jsx("h2",{className:"flex items-center gap-2.5 text-2xl text-white",children:e}),t&&d.jsx("span",{className:"text-sm text-purple-mutted-300",children:t})]}),ht=e=>{const{className:t,disabled:r=!1,methods:n,onSubmit:o=()=>{},...s}=e,{handleSubmit:a}=n,i=$("flex flex-col gap-6",{},t);return d.jsx(bl,{methods:n,disabled:r,children:d.jsx("form",{className:i,onSubmit:a(o),...s})})};ht.Button=Fh;ht.Input=Cx;ht.Select=Sx;ht.Combobox=Px;ht.Divider=Rx;ht.Title=kx;function Tx(e){return e==null?[]:Array.isArray(e)?e:[e]}var Ax=e=>Array.from(Array(e).keys()),Ks=e=>(e==null?void 0:e.constructor.name)==="Array",Nx=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Lo(e[r],t[r]))return!1;return!0},Lo=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(Ks(e)&&Ks(t))return Nx(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(t??Object.create(null)),n=r.length;for(let o=0;o<n;o++)if(!Reflect.has(e,r[o]))return!1;for(let o=0;o<n;o++){const s=r[o];if(!Lo(e[s],t[s]))return!1}return!0},_x=e=>e!=null&&typeof e=="object",wr=e=>typeof e=="string",Kt=e=>typeof e=="function",Ix=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Ox=e=>Object.prototype.toString.call(e),Bl=Function.prototype.toString,jx=Bl.call(Object),Dx=e=>{if(!_x(e)||Ox(e)!="[object Object]"||$x(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=Ix(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Bl.call(r)==jx},Mx=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Fx=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,$x=e=>Mx(e)||Fx(e),Lx=e=>e(),Vx=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},Bx=e=>Number.isNaN(e),Wx=e=>Bx(e)?0:e,zx=(e,t,r)=>{const n=Wx(e),o=n>=t,s=r==null||n<=r;return o&&s};function Wl(e){if(!Dx(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(const n of t){const o=e[n];o!==void 0&&(r[n]=Wl(o))}return r}function Ys(...e){const t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&process.env.NODE_ENV!=="production"&&console.warn(t)}function Gx(e,t){if(e==null)throw new Error(t())}var zl=e=>typeof e=="object"&&e!==null,Me=e=>e?"":void 0,Hx=9,Ux=e=>zl(e)&&e.nodeType===Hx,Kx=e=>zl(e)&&e===e.window;function Yx(e){if(!e)return!1;const t=e.getRootNode();return Gl(t)===e}function qx(e){return Ux(e)?e:Kx(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function Gl(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const r=t.shadowRoot.activeElement;if(!r||r===t)break;t=r}return t}var Xx=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),Zx=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,qs=e=>{const t={};let r;for(;r=Zx.exec(e);)t[r[1]]=r[2];return t},Jx=(e,t)=>{if(wr(e)){if(wr(t))return`${e};${t}`;e=qs(e)}else wr(t)&&(t=qs(t));return Object.assign({},e??{},t??{})};function je(...e){let t={};for(let r of e){if(!r)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof r[o]=="function"){t[o]=Vx(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=Xx(t[o],r[o]);continue}if(o==="style"){t[o]=Jx(t[o],r[o]);continue}t[o]=r[o]!==void 0?r[o]:t[o]}for(let o in r)t[o]===void 0&&(t[o]=r[o]);const n=Object.getOwnPropertySymbols(r);for(let o of n)t[o]=r[o]}return t}function Qx(e,t,r){let n=[],o;return s=>{const a=e(s);return(a.length!==n.length||a.some((c,u)=>!Lo(n[u],c)))&&(n=a,o=t(a,s)),o}}var kt=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(kt||{}),kn="__init__";function eb(e){const t=()=>{var a;return((a=e.getRootNode)==null?void 0:a.call(e))??document},r=()=>qx(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>Gl(t()),isActiveElement:Yx,getById:a=>t().getElementById(a)}}function tb(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var rb=()=>e=>Array.from(new Set(e)),Hl=typeof globalThis.document<"u"?P.useLayoutEffect:P.useEffect;function Or(e){const t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=P.useState(t),[o,s]=P.useState(n),a=e().value!==void 0,i=P.useRef(o);i.current=a?e().value:o;const c=P.useRef(i.current);Hl(()=>{c.current=i.current},[o,e().value]);const u=p=>{var w,m;const g=c.current,v=Kt(p)?p(g):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:g}),a||s(v),r(v,g)||(m=(w=e()).onChange)==null||m.call(w,v,g)};function f(){return a?e().value:o}return{initial:n,ref:i,get:f,set(p){(e().sync?Jt.flushSync:Lx)(()=>u(p))},invoke(p,g){var v,w;(w=(v=e()).onChange)==null||w.call(v,p,g)},hash(p){var g,v;return((v=(g=e()).hash)==null?void 0:v.call(g,p))??String(p)}}}Or.cleanup=e=>{P.useEffect(()=>e,[])};Or.ref=e=>{const t=P.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function nb(e){const t=P.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var ob=(e,t)=>{const r=P.useRef(!1),n=P.useRef(!1);P.useEffect(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(o=>typeof o=="function"?o():o)]),P.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function sb(e,t={}){var ee,J,Y,z;const r=P.useMemo(()=>{const{id:j,ids:A,getRootNode:D}=t;return eb({id:j,ids:A,getRootNode:D})},[t]),n=(...j)=>{e.debug&&console.log(...j)},o=((ee=e.props)==null?void 0:ee.call(e,{props:Wl(t),scope:r}))??t,s=ab(o),a=(J=e.context)==null?void 0:J.call(e,{prop:s,bindable:Or,scope:r,flush:Xs,getContext(){return c},getComputed(){return k},getRefs(){return m},getEvent(){return v()}}),i=Ul(a),c={get(j){var A;return(A=i.current)==null?void 0:A[j].ref.current},set(j,A){var D;(D=i.current)==null||D[j].set(A)},initial(j){var A;return(A=i.current)==null?void 0:A[j].initial},hash(j){var D,E;const A=(D=i.current)==null?void 0:D[j].get();return(E=i.current)==null?void 0:E[j].hash(A)}},u=P.useRef(new Map),f=P.useRef(null),p=P.useRef(null),g=P.useRef({type:""}),v=()=>({...g.current,current(){return g.current},previous(){return p.current}}),w=()=>({...N,matches(...j){return j.includes(N.ref.current)},hasTag(j){var A,D;return!!((D=(A=e.states[N.ref.current])==null?void 0:A.tags)!=null&&D.includes(j))}}),m=nb(((Y=e.refs)==null?void 0:Y.call(e,{prop:s,context:c}))??{}),x=()=>({state:w(),context:c,event:v(),prop:s,send:K,action:y,guard:h,track:ob,refs:m,computed:k,flush:Xs,scope:r,choose:S}),y=j=>{const A=Kt(j)?j(x()):j;if(!A)return;const D=A.map(E=>{var oe,le;const G=(le=(oe=e.implementations)==null?void 0:oe.actions)==null?void 0:le[E];return G||Ys(`[zag-js] No implementation found for action "${JSON.stringify(E)}"`),G});for(const E of D)E==null||E(x())},h=j=>{var A,D;return Kt(j)?j(x()):(D=(A=e.implementations)==null?void 0:A.guards)==null?void 0:D[j](x())},C=j=>{const A=Kt(j)?j(x()):j;if(!A)return;const D=A.map(G=>{var le,R;const oe=(R=(le=e.implementations)==null?void 0:le.effects)==null?void 0:R[G];return oe||Ys(`[zag-js] No implementation found for effect "${JSON.stringify(G)}"`),oe}),E=[];for(const G of D){const oe=G==null?void 0:G(x());oe&&E.push(oe)}return()=>E.forEach(G=>G==null?void 0:G())},S=j=>Tx(j).find(A=>{let D=!A.guard;return wr(A.guard)?D=!!h(A.guard):Kt(A.guard)&&(D=A.guard(x())),D}),k=j=>{Gx(e.computed,()=>"[zag-js] No computed object found on machine");const A=e.computed[j];return A({context:c,event:v(),prop:s,refs:m,scope:r,computed:k})},N=Or(()=>({defaultValue:e.initialState({prop:s}),onChange(j,A){var E,G,oe,le;if(A){const R=u.current.get(A);R==null||R(),u.current.delete(A)}A&&y((E=e.states[A])==null?void 0:E.exit),y((G=f.current)==null?void 0:G.actions);const D=C((oe=e.states[j])==null?void 0:oe.effects);if(D&&u.current.set(j,D),A===kn){y(e.entry);const R=C(e.effects);R&&u.current.set(kn,R)}y((le=e.states[j])==null?void 0:le.entry)}})),_=P.useRef(void 0),T=P.useRef(kt.NotStarted);Hl(()=>{queueMicrotask(()=>{const D=T.current===kt.Started;T.current=kt.Started,n(D?"rehydrating...":"initializing...");const E=_.current??N.initial;N.invoke(E,D?N.get():kn)});const j=u.current,A=N.ref.current;return()=>{n("unmounting..."),_.current=A,T.current=kt.Stopped,j.forEach(D=>D==null?void 0:D()),u.current=new Map,f.current=null,queueMicrotask(()=>{y(e.exit)})}},[]);const H=()=>"ref"in N?N.ref.current:N.get(),K=j=>{queueMicrotask(()=>{var le,R;if(T.current!==kt.Started)return;p.current=g.current,g.current=j;let A=H();const D=((le=e.states[A].on)==null?void 0:le[j.type])??((R=e.on)==null?void 0:R[j.type]),E=S(D);if(!E)return;f.current=E;const G=E.target??A;n("transition",j.type,E.target||A,`(${E.actions})`);const oe=G!==A;oe?Jt.flushSync(()=>N.set(G)):E.reenter&&!oe?N.invoke(A,A):y(E.actions??[])})};return(z=e.watch)==null||z.call(e,x()),{state:w(),send:K,context:c,prop:s,scope:r,refs:m,computed:k,event:v(),getStatus:()=>T.current}}function Ul(e){const t=P.useRef(e);return t.current=e,t}function ab(e){const t=Ul(e);return function(n){return t.current[n]}}function Xs(e){queueMicrotask(()=>{Jt.flushSync(()=>e())})}var ib=tb(e=>e);function cb(...e){return t=>{const r=[];for(const n of e)if(typeof n=="function"){const o=n(t);typeof o=="function"&&r.push(o)}else n&&(n.current=t);if(r.length)return()=>{for(const n of r)n()}}}function lb(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const Tn=e=>{const t=P.memo(P.forwardRef((r,n)=>{const{asChild:o,children:s,...a}=r;if(!o)return P.createElement(e,{...a,ref:n},s);if(!P.isValidElement(s))return null;const i=P.Children.only(s),c=lb(i);return P.cloneElement(i,{...je(a,i.props),ref:n?cb(n,c):c})}));return t.displayName=e.displayName||e.name,t},ub=()=>{const e=new Map;return new Proxy(Tn,{apply(t,r,n){return Tn(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,Tn(n)),e.get(n)}})},ze=ub();function db(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ir(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:s,defaultValue:a}=e,i=P.createContext(a);i.displayName=t;function c(){var f;const u=P.useContext(i);if(!u&&r){const p=new Error(s??db(n,o));throw p.name="ContextError",(f=Error.captureStackTrace)==null||f.call(Error,p,c),p}return u}return[i.Provider,c,i]}const[fb,qe]=ir({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),Kl=P.forwardRef((e,t)=>{const r=qe(),n=je(r.getContentProps({index:r.count}),e);return d.jsx(ze.div,{...n,ref:t})});Kl.displayName="StepsCompletedContent";const Vo=()=>(e,t)=>t.reduce((r,n)=>{const[o,s]=r,a=n;return s[a]!==void 0&&(o[a]=s[a]),delete s[a],[o,s]},[{},{...e}]),Yl=P.forwardRef((e,t)=>{const[r,n]=Vo()(e,["index"]),o=qe(),s=je(o.getContentProps(r),n);return d.jsx(ze.div,{...s,ref:t})});Yl.displayName="StepsContent";const[pb,Bo]=ir({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),ql=P.forwardRef((e,t)=>{const r=qe(),n=Bo(),o=je(r.getIndicatorProps(n),e);return d.jsx(ze.div,{...o,ref:t})});ql.displayName="StepsIndicator";const[mb,qb]=ir({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),Xl=P.forwardRef((e,t)=>{const[r,n]=Vo()(e,["index"]),o=qe(),s=je(o.getItemProps(r),n),a=o.getItemState(r);return d.jsx(pb,{value:r,children:d.jsx(mb,{value:a,children:d.jsx(ze.div,{...s,ref:t})})})});Xl.displayName="StepsItem";const Zl=P.forwardRef((e,t)=>{const r=qe(),n=je(r.getListProps(),e);return d.jsx(ze.div,{...n,ref:t})});Zl.displayName="StepsList";const Jl=P.forwardRef((e,t)=>{const r=qe(),n=je(r.getNextTriggerProps(),e);return d.jsx(ze.button,{...n,ref:t})});Jl.displayName="StepsNextTrigger";const Ql=P.forwardRef((e,t)=>{const r=qe(),n=je(r.getPrevTriggerProps(),e);return d.jsx(ze.button,{...n,ref:t})});Ql.displayName="StepsPrevTrigger";var Yt=(e,t=[])=>({parts:(...r)=>{if(gb(t))return Yt(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>Yt(e,[...t,...r]),omit:(...r)=>Yt(e,t.filter(n=>!r.includes(n))),rename:r=>Yt(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Et(e)}"][data-part="${Et(n)}"]`,`& [data-scope="${Et(e)}"][data-part="${Et(n)}"]`].join(", "),attrs:{"data-scope":Et(e),"data-part":Et(n)}}}),{})}),Et=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),gb=e=>e.length===0,vb=Yt("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),Fe=vb.build(),hb=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},xb=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Zs=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.triggerId)==null?void 0:n.call(r,t))??`steps:${e.id}:trigger:${t}`},bb=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.contentId)==null?void 0:n.call(r,t))??`steps:${e.id}:content:${t}`};function yb(e,t){const{context:r,send:n,computed:o,prop:s,scope:a}=e,i=r.get("step"),c=s("count"),u=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),g=y=>({triggerId:Zs(a,y.index),contentId:bb(a,y.index),current:y.index===i,completed:y.index<i,incomplete:y.index>i,index:y.index,first:y.index===0,last:y.index===c-1}),v=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},w=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},m=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},x=y=>{n({type:"STEP.SET",value:y,src:"api.setValue"})};return{value:i,count:c,percent:u,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:v,goToPrevStep:w,resetStep:m,getItemState:g,setStep:x,getRootProps(){return t.element({...Fe.root.attrs,id:hb(a),dir:s("dir"),"data-orientation":s("orientation"),style:{"--percent":`${u}%`}})},getListProps(){const h=Ax(c).map((C,S)=>Zs(a,S));return t.element({...Fe.list.attrs,dir:s("dir"),id:xb(a),role:"tablist","aria-owns":h.join(" "),"aria-orientation":s("orientation"),"data-orientation":s("orientation")})},getItemProps(y){const h=g(y);return t.element({...Fe.item.attrs,dir:s("dir"),"aria-current":h.current?"step":void 0,"data-orientation":s("orientation")})},getTriggerProps(y){const h=g(y);return t.button({...Fe.trigger.attrs,id:h.triggerId,role:"tab",dir:s("dir"),tabIndex:!s("linear")||h.current?0:-1,"aria-selected":h.current,"aria-controls":h.contentId,"data-state":h.current?"open":"closed","data-orientation":s("orientation"),"data-complete":Me(h.completed),"data-current":Me(h.current),"data-incomplete":Me(h.incomplete),onClick(C){C.defaultPrevented||s("linear")||n({type:"STEP.SET",value:y.index,src:"trigger.click"})}})},getContentProps(y){const h=g(y);return t.element({...Fe.content.attrs,dir:s("dir"),id:h.contentId,role:"tabpanel",tabIndex:0,hidden:!h.current,"data-state":h.current?"open":"closed","data-orientation":s("orientation"),"aria-labelledby":h.triggerId})},getIndicatorProps(y){const h=g(y);return t.element({...Fe.indicator.attrs,dir:s("dir"),"aria-hidden":!0,"data-complete":Me(h.completed),"data-current":Me(h.current),"data-incomplete":Me(h.incomplete)})},getSeparatorProps(y){const h=g(y);return t.element({...Fe.separator.attrs,dir:s("dir"),"data-orientation":s("orientation"),"data-complete":Me(h.completed),"data-current":Me(h.current),"data-incomplete":Me(h.incomplete)})},getNextTriggerProps(){return t.button({...Fe.nextTrigger.attrs,dir:s("dir"),type:"button",disabled:!f,onClick(y){y.defaultPrevented||v()}})},getPrevTriggerProps(){return t.button({dir:s("dir"),...Fe.prevTrigger.attrs,type:"button",disabled:!p,onClick(y){y.defaultPrevented||w()}})},getProgressProps(){return t.element({dir:s("dir"),...Fe.progress.attrs,role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${u}% complete`,"data-complete":Me(u===100)})}}}var wb={props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:"horizontal",...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e("defaultStep"),value:e("step"),onChange(r){var o,s;(o=e("onStepChange"))==null||o({step:r}),r==e("count")&&((s=e("onStepComplete"))==null||s())}}))}},computed:{percent:Qx(({context:e,prop:t})=>[e.get("step"),t("count")],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get("step")<t("count"),hasPrevStep:({context:e})=>e.get("step")>0,completed:({context:e,prop:t})=>e.get("step")===t("count")},initialState(){return"idle"},entry:["validateStep"],states:{idle:{on:{"STEP.SET":{actions:["setStep"]},"STEP.NEXT":{actions:["goToNextStep"]},"STEP.PREV":{actions:["goToPrevStep"]},"STEP.RESET":{actions:["resetStep"]}}}},implementations:{actions:{goToNextStep({context:e,prop:t}){const r=Math.min(e.get("step")+1,t("count"));e.set("step",r)},goToPrevStep({context:e}){const t=Math.max(e.get("step")-1,0);e.set("step",t)},resetStep({context:e}){e.set("step",0)},setStep({context:e,event:t}){e.set("step",t.value)},validateStep({context:e,prop:t}){Cb(t("count"),e.get("step"))}}}},Cb=(e,t)=>{if(!zx(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};rb()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[Xb,Sb]=ir({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[Zb,Eb]=ir({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function Pb(e){const t=P.useId(),{getRootNode:r}=Sb(),{dir:n}=Eb(),o={id:t,dir:n,getRootNode:r,...e},s=sb(wb,o);return yb(s,ib)}const eu=P.forwardRef((e,t)=>{const[r,n]=Vo()(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=Pb(r),s=je(o.getRootProps(),n);return d.jsx(fb,{value:o,children:d.jsx(ze.div,{...s,ref:t})})});eu.displayName="StepsRoot";const tu=P.forwardRef((e,t)=>{const r=qe(),n=Bo(),o=je(r.getSeparatorProps(n),e);return d.jsx(ze.div,{...o,ref:t})});tu.displayName="StepsSeparator";const ru=P.forwardRef((e,t)=>{const r=qe(),n=Bo(),o=je(r.getTriggerProps(n),e);return d.jsx(ze.button,{...o,ref:t})});ru.displayName="StepsTrigger";function Rb(e){return Sl({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 6 9 17l-5-5"},child:[]}]})(e)}const nu=P.createContext(void 0),kb=({children:e,step:t})=>d.jsx(nu.Provider,{value:{step:t},children:e}),ou=()=>{const e=P.useContext(nu);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},Tb=({className:e,step:t,...r})=>{const n=$("flex flex-col gap-4",e);return d.jsx(kb,{step:t??0,children:d.jsx(eu,{className:n,step:t,...r})})},Ab=({className:e,...t})=>{const r=$("flex flex-row gap-4",e);return d.jsx(Zl,{className:r,...t})},Nb=({className:e,...t})=>{const r=$("flex flex-row items-center gap-4",e);return d.jsx(Xl,{className:r,...t})},_b=({className:e,...t})=>{const r=$("flex flex-row items-center gap-4 text-purple-mutted-100 text-sm",e);return d.jsx(ru,{className:r,...t})},Ib=({index:e,className:t,...r})=>{const{step:n}=ou(),o=e===n,s=e<n,a=$("flex items-center justify-center w-8 h-8 rounded-full text-white",s&&"bg-green-700",o&&"bg-green-600",!s&&!o&&"bg-purple-mutted-500",t),i=$({"text-white":o,"text-purple-mutted-300":!s&&e!==n});return d.jsx(ql,{className:a,...r,children:s?d.jsx(Rb,{className:"text-green-400"}):d.jsx("span",{className:i,children:e+1})})},Ob=({index:e,className:t,...r})=>{const{step:n}=ou(),o=e<n,s=$("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return d.jsx(tu,{className:s,...r})},jb=({className:e,...t})=>{const r=$(e);return d.jsx(Yl,{className:r,...t})},Db=({className:e,...t})=>{const r=$(e);return d.jsx(Kl,{className:r,...t})},Mb=({className:e,...t})=>{const r=$("bg-primary text-white px-4 py-2 rounded-md",e);return d.jsx(Ql,{className:r,...t})},Fb=({className:e,...t})=>{const r=$("bg-primary text-white px-4 py-2 rounded-md",e);return d.jsx(Jl,{className:r,...t})},$b={Root:Tb,List:Ab,Item:Nb,Trigger:_b,Indicator:Ib,Separator:Ob,Content:jb,CompletedContent:Db,PrevTrigger:Mb,NextTrigger:Fb},Lb=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>d.jsx(Ml,{...r,children:d.jsxs(Fl,{children:[d.jsx($l,{...n,children:e}),t&&d.jsx(Ll,{...o,children:t})]})});exports.Accordion=bh;exports.AccordionContent=Ch;exports.AccordionItem=yh;exports.AccordionTrigger=wh;exports.Badge=av;exports.Button=Mr;exports.Card=iv;exports.CardAction=dv;exports.CardContent=fv;exports.CardDescription=uv;exports.CardFooter=pv;exports.CardHeader=cv;exports.CardTitle=lv;exports.Combobox=So;exports.Dialog=Tg;exports.DialogClose=Ng;exports.DialogContent=_g;exports.DialogDescription=Dg;exports.DialogFooter=Og;exports.DialogHeader=Ig;exports.DialogOverlay=mc;exports.DialogPortal=pc;exports.DialogTitle=jg;exports.DialogTrigger=Ag;exports.Form=ht;exports.FormProvider=bl;exports.Input=da;exports.Progress=Cv;exports.Select=ji;exports.SelectContent=vo;exports.SelectGroup=Wm;exports.SelectItem=ho;exports.SelectLabel=Mi;exports.SelectScrollDownButton=go;exports.SelectScrollUpButton=mo;exports.SelectSeparator=Fi;exports.SelectTrigger=po;exports.SelectValue=Di;exports.Skeleton=Sv;exports.Steps=$b;exports.Switch=Nv;exports.Toggle=Iv;exports.ToggleGroup=Zv;exports.ToggleGroupItem=Jv;exports.Tooltip=Lb;exports.borderRadius=Au;exports.cn=$;exports.colors=ku;exports.spacing=Tu;exports.typography=Nu;exports.useFormContext=yl;
130
130
  //# sourceMappingURL=index.cjs.js.map